//private UnityAction myCancelAction; void Awake() { modalPanell = ModalPanell.Instance(); // displayManager = DisplayManager.Instance (); myYesAction = new UnityAction(TestYesFunction); myNoAction = new UnityAction(TestNoFunction); //myCancelAction = new UnityAction (TestCancelFunction); }
public static ModalPanell Instance() { if (!modalPanell) { modalPanell = FindObjectOfType(typeof(ModalPanell)) as ModalPanell; if (!modalPanell) { Debug.LogError("There needs to be one active ModalPanel script on a GameObject in your scene."); } } return(modalPanell); }