Beispiel #1
0
        static internal bool OnGUI(SerializedProperty value, GUIContent title)
        {
            if (value.propertyType != SerializedPropertyType.ObjectReference)
            {
                return(false);
            }

            var rect = EditorGUILayout.GetControlRect();

            EditorGUI.BeginProperty(rect, title, value);
            TextureParameterHelper.DoObjectField(rect, value, title, typeof(Cubemap), typeof(RenderTexture), validator);
            EditorGUI.EndProperty();
            return(true);
        }
Beispiel #2
0
        public override bool OnGUI(SerializedDataParameter parameter, GUIContent title)
        {
            var value = parameter.value;

            if (value.propertyType != SerializedPropertyType.ObjectReference)
            {
                return(false);
            }

            var rect = EditorGUILayout.GetControlRect();

            EditorGUI.BeginProperty(rect, title, value);
            TextureParameterHelper.DoObjectField(rect, value, title, typeof(Texture3D), typeof(RenderTexture), validator);
            EditorGUI.EndProperty();
            return(true);
        }