Esempio n. 1
0
        void Start()
        {
            if (contextManager == null)
            {
                try
                {
                    contextManager  = GameObject.Find("Context Menu").GetComponent <ContextMenuManager>();
                    contextAnimator = contextManager.contextAnimator;
                    itemParent      = contextManager.transform.Find("Content/Item List").transform;
                }

                catch { Debug.Log("Context Menu - No variable attached to Context Manager.", this); }
            }

            foreach (Transform child in itemParent)
            {
                Destroy(child.gameObject);
            }
        }
 private void OnEnable()
 {
     // Set target
     cmTarget = (ContextMenuManager)target;
 }