public TextureSlotControlView(Texture2DInputMaterialSlot slot) { m_Slot = slot; var objectField = new ObjectField { objectType = typeof(Texture), value = m_Slot.texture }; objectField.OnValueChanged(OnValueChanged); Add(objectField); }
public TextureSlotControlView(Texture2DInputMaterialSlot slot) { m_Slot = slot; styleSheets.Add(Resources.Load <StyleSheet>("Styles/Controls/TextureSlotControlView")); var objectField = new ObjectField { objectType = typeof(Texture), value = m_Slot.texture }; objectField.RegisterValueChangedCallback(OnValueChanged); Add(objectField); }