コード例 #1
0
        public TextureArraySlotControlView(Texture2DArrayInputMaterialSlot slot)
        {
            m_Slot = slot;
            styleSheets.Add(Resources.Load <StyleSheet>("Styles/Controls/TextureArraySlotControlView"));
            var objectField = new ObjectField {
                objectType = typeof(Texture2DArray), value = m_Slot.textureArray
            };

            objectField.RegisterValueChangedCallback(OnValueChanged);
            Add(objectField);
        }
コード例 #2
0
        public TextureArraySlotControlView(Texture2DArrayInputMaterialSlot slot)
        {
            m_Slot = slot;
            AddStyleSheetPath("Styles/Controls/TextureArraySlotControlView");
            var objectField = new ObjectField {
                objectType = typeof(Texture2DArray), value = m_Slot.textureArray
            };

            objectField.OnValueChanged(OnValueChanged);
            Add(objectField);
        }