// Use this for initialization void Start() { InstructionPresenter = GameObject.Find("InstructionPresenter"); PresentationSpace = GameObject.Find("PresentationSpace"); ControlsCanvas = GameObject.Find("ControlsCanvas"); CanvasManager = ControlsCanvas.GetComponent <ControlsCanvasManager>(); StartButton = GameObject.Find("StartButton"); NextButton = GameObject.Find("NextButton"); BackButton = GameObject.Find("BackButton"); CloseButton = GameObject.Find("CloseButton"); NextTransform = NextButton.GetComponent <RectTransform>(); BackTransform = BackButton.GetComponent <RectTransform>(); SetInstructionState(InstructionStates.Unseen); }
private void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } if (!enabledOnStart) { enabled = false; } rect = GetComponent <RectTransform>(); scale = rect.localScale; minSize = new Vector3(rect.sizeDelta.x * scale.x, rect.sizeDelta.y * scale.y); }