Exemple #1
0
        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);
            }
        }
Exemple #2
0
    public void Select()
    {
        if (!isInitialized)
        {
            return;
        }

        if (applyOutline)
        {
            originMaterialTree = new MaterialTree(gameObject);
            MaterialTree.ApplyOutline(gameObject, selectedMaterial);
        }

        isSelected = true;
        tooltip.OpenTooltip(transform, _tooltipText);
    }