Example #1
0
        void AddSlots(IEnumerable <MaterialSlot> slots)
        {
            foreach (var slot in slots)
            {
                if (slot.hidden)
                {
                    continue;
                }

                var port = ShaderPort.Create(slot, m_ConnectorListener);
                if (slot.isOutputSlot)
                {
                    outputContainer.Add(port);
                }
                else
                {
                    inputContainer.Add(port);
                }
            }
        }
        void AddSlots(IEnumerable <MaterialSlot> slots)
        {
            foreach (var slot in slots)
            {
                if (slot.hidden)
                {
                    continue;
                }

                var port = ShaderPort.Create(Orientation.Horizontal, slot.isInputSlot ? Direction.Input : Direction.Output, null, m_ConnectorListener);
                port.portName    = slot.displayName;
                port.userData    = slot;
                port.visualClass = slot.concreteValueType.ToClassName();

                if (slot.isOutputSlot)
                {
                    outputContainer.Add(port);
                }
                else
                {
                    inputContainer.Add(port);
                }
            }
        }