Esempio n. 1
0
        public sealed override void OnGUI(Rect position, MaterialProperty prop, string label, MaterialEditor editor)
        {
            // In case the material is shown in the inspector, the editor will not be linked to a node
            if (!mixtureDrawerInfos.ContainsKey(editor))
            {
                DrawerGUI(position, prop, label, editor, null, null);
                return;
            }

            var nodeView = GetNodeView(editor);
            var graph    = GetGraph(editor);
            var node     = nodeView.nodeTarget as MixtureNode;

            allowedDimensions = MixtureUtils.GetAllowedDimentions(prop.name);

            if (IsVisible(editor))
            {
                DrawerGUI(position, prop, label, editor, graph, nodeView);
            }
        }
Esempio n. 2
0
 bool PropertySupportsDimension(string name, TextureDimension dim)
 {
     return(MixtureUtils.GetAllowedDimentions(name).Contains(dim));
 }
Esempio n. 3
0
 bool PropertySupportsDimension(MaterialProperty prop, TextureDimension dim)
 {
     return(MixtureUtils.GetAllowedDimentions(prop.name).Contains(dim));
 }