void Awake()
		{
			Instance = this;

			if(specifiedUICanvasRectTransform == null)
				throw new System.ArgumentNullException("UI Canvas is unspecified", "specifiedUiCanvas");

			uiCanvasRectTransform = specifiedUICanvasRectTransform;
		}
コード例 #2
0
        private void Awake()
        {
            UIStateController.RegisterPanel(gameObject.name, this);

            RectTransform thisRectTransform = GetComponent <RectTransform>();

            if (thisRectTransform == null)
            {
                throw new System.Exception("No RectTransform is found on this GameObject: " + gameObject.name);
            }
            rectTransform = thisRectTransform;
        }
コード例 #3
0
 private void OnDestroy()
 {
     UIStateController.UnregisterPanel(gameObject.name);
 }