Ejemplo n.º 1
0
        void OnGUI()
        {
            using (EditorGUILayout.ScrollViewScope scrollScope = new EditorGUILayout.ScrollViewScope(dictionaryScrollPosition, GUIStyle.none, GUI.skin.verticalScrollbar))
            {
                dictionaryScrollPosition = scrollScope.scrollPosition;

                using (new EditorGUILayout.VerticalScope())
                {
                    using (new EditorGUILayout.VerticalScope())
                    {
                        serializedObject.Update();
                        EditorGUILayout.PropertyField(settingsProp);
                        serializedObject.ApplyModifiedProperties();

                        if (settings == null)
                        {
                            LogSettings newSettings = LogLevelsGui.DrawCreateNewButton();
                            if (newSettings != null)
                            {
                                settingsProp.objectReferenceValue = newSettings;
                                serializedObject.ApplyModifiedProperties();
                            }
                        }
                        else
                        {
                            LogLevelsGui.DrawLogFactoryDictionary(settings);
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public override void OnInspectorGUI()
        {
            DrawDefaultInspector();

            NetworkLogSettings target = this.target as NetworkLogSettings;

            if (target.settings == null)
            {
                LogSettings newSettings = LogLevelsGui.DrawCreateNewButton();
                if (newSettings != null)
                {
                    SerializedProperty settingsProp = serializedObject.FindProperty("settings");
                    settingsProp.objectReferenceValue = newSettings;
                    serializedObject.ApplyModifiedProperties();
                }
            }
            else
            {
                LogLevelsGui.DrawLogFactoryDictionary(target.settings);
            }
        }
Ejemplo n.º 3
0
        public override void OnInspectorGUI()
        {
            CurrentScriptField();

            LogLevelsGui.DrawLogFactoryDictionary(target as LogSettings);
        }