Exemple #1
0
        /// <summary>
        /// EditorGUILayout Serialize all visible properties in this Scriptable Object. Returns true if expanded;
        /// </summary>
        public virtual bool DrawGui(Object target, bool asFoldout, bool includeScriptField, bool initializeAsOpen = true, bool asWindow = false)
        {
            EditorGUI.indentLevel = 0;
            bool isExpanded = ScriptableObjectGUITools.DrawHeaderFoldout(target, this, asFoldout, SettingsName, HelpURL, initializeAsOpen, asWindow);

            if (asWindow)
            {
                EditorGUI.indentLevel = 1;
            }

            if (!asFoldout || isExpanded)
            {
                DrawGuiPre(asWindow);
                ScriptableObjectGUITools.RenderContentsOfScriptableObject(Single, includeScriptField);
                DrawGuiPost(asWindow);
            }
            else
            {
                EditorGUILayout.Space();
            }

            return(isExpanded);
        }
Exemple #2
0
 public virtual void DrawGuiMid(bool includeScriptField)
 {
     ScriptableObjectGUITools.RenderContentsOfScriptableObject(Single, includeScriptField);
 }