public void GetFromObject(GameObject obj) { try { parentMaterial = obj.GetComponent <Renderer>().material; } catch {} foreach (Transform child in obj.transform) { MaterialTree subtree = new MaterialTree(child.gameObject); childTrees.Add(child, subtree); } }
public void Select() { if (!isInitialized) { return; } if (applyOutline) { originMaterialTree = new MaterialTree(gameObject); MaterialTree.ApplyOutline(gameObject, selectedMaterial); } isSelected = true; tooltip.OpenTooltip(transform, _tooltipText); }