void Start() { MySkyInputEvent inputEvent = gameObject.AddComponent <MySkyInputEvent>(); MySkyInputEvent.instance.SetCamera(this.gameObject.GetComponent <Camera>()); MySkyInputEvent.instance.SetUICamera(this.gameObject.GetComponent <Camera>()); Messenger.AddListener <GameObject, MySkyInputEvent.DragState, Vector2, Vector2, Vector3>(MySkyInputEvent.EventDrag, EventDrag); }
void Awake() { instance = this; }