Exemple #1
0
    //Gets one of the nodes materials
    private Material GetMaterial(string Name)
    {
        //Search through all the materials in the nodes material list
        for (int i = 0; i < Materials.Length; i++)
        {
            //Check the names until we find the requested material
            NodeMaterial NodeMat = Materials[i];
            if (NodeMat.Name == Name)
            {
                return(NodeMat.Material);
            }
        }

        Debug.Log("Couldnt find node material: " + Name);
        return(null);
    }
        public override void OnNodeEnable()
        {
            node = target as NodeMaterial;

            matPreview = new GUIMaterialPreview();
        }