void Awake() { if (instance != null) { Destroy(gameObject); //DontDestroyOnLoad(this.gameObject); } else { instance = this; } }
public static void UiBindOnPointerUp(Component uiElement, Action onPointerUp) { UiEventHandler uiHandler = (UiEventHandler)uiElement; uiHandler.onPointerUp = onPointerUp; }
public static void UiBindOnPointerDown(Component uiElement, Action onPointerDown) { UiEventHandler uiHandler = (UiEventHandler)uiElement; uiHandler.onPointerDown = onPointerDown; }