override public void activateSelf() { objectsMenu = transform.parent.GetComponent<ObjectsMenu>(); transform.Find("Text").GetComponent<Text>().color = objectsMenu.activeColor; if (hasSelection) { objSelectionCount.color = objectsMenu.activeColor; objSelectionLimit.color = objectsMenu.activeColor; } objectsMenu.resetAll(category); if (hasSelection) checkSelection(); }
void Start() { objectsMenu = GameObject.Find("ObjectsMenu").GetComponent<ObjectsMenu>(); objectCategory = transform.parent.parent.name; }