This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
//Put this under a folder called Editor in your project | |
public class EmptyGOCreator | |
{ | |
[MenuItem ("GameObject/Create Empty at level %g")] | |
static void CreateEmptyGOAtLevel () | |
{ | |
var go = new GameObject("GameObject"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This code is provided as is without warranty, guarantee of function, | |
* or provided support | |
*/ | |
using System.Collections; | |
using UnityEngine.Events; | |
namespace UnityEngine.UI.CoroutineTween | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Enable this if you want it to work in NUNIT, see the test example at the bottom | |
//#define UNIT_TESTING | |
/** | |
* | |
* https://i.imgur.com/GoH9rkv.png | |
* | |
* One of the frustrating things about Unity is that there are a spate of magic methods that can be | |
* called from the runtime. They do not have an interface defined, which by itself is pretty frustrating, | |
* but it can allow some valid c# that is bad Unity mojo. Consider a private 'OnEnable' function unity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.EventSystems; | |
[AddComponentMenu("Event/Controller Input Module")] | |
public class ControllerInputModule : BaseInputModule | |
{ | |
private float m_NextAction; | |
protected ControllerInputModule() | |
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using UnityEngine.EventSystems; | |
namespace UnityEngine.UI | |
{ | |
[AddComponentMenu("Event/Graphic Raycaster")] | |
[RequireComponent(typeof(Canvas))] | |
public class GraphicRaycaster : BaseRaycaster, ISerializationCallbackReceiver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using UnityEngine.Events; | |
using UnityEngine.EventSystems; | |
namespace UnityEngine.UI | |
{ | |
/// <summary> | |
/// Simple toggle -- something that has an 'on' and 'off' states: checkbox, toggle button, radio button, etc. | |
/// </summary> | |
[AddComponentMenu("UI/Toggle", 35)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Text; | |
using UnityEngine.Events; | |
using UnityEngine.EventSystems; | |
using UnityEngine.Serialization; | |
namespace UnityEngine.UI | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Text; | |
namespace UnityEngine.EventSystems | |
{ | |
public abstract class PointerInputModule : BaseInputModule | |
{ | |
public const int kMouseId = -1; | |
public const int kFakeTouchesId = -2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Reflection; | |
namespace UnityEngine.EventSystems | |
{ | |
[AddComponentMenu("Event/Standalone Input Module")] | |
public class StandaloneInputModule : PointerInputModule | |
{ | |
private float m_NextAction; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using UnityEngine.EventSystems; | |
using UnityEngine.UI.CoroutineTween; | |
namespace UnityEngine.UI | |
{ | |
/// <summary> | |
/// Base class for all UI components that should be derived from when creating new Graphic types. | |
/// </summary> |
OlderNewer