Пример #1
0
        /// <inheritdoc />
        protected override void DoBuildMembers()
        {
                        #if DEV_MODE
            Debug.Log(ToString() + ".DoBuildMembers()");
                        #endif

            ParentDrawerUtility.BuildMembers(DrawerProvider, this, memberBuildList, ref members);

            if (inspector.Preferences.drawScriptReferenceFields || DebugMode)
            {
                var monoScript = MonoScript;
                if (monoScript != null)
                {
                    DrawerArrayPool.InsertAt(ref members, 0, ScriptReferenceDrawer.Create(MonoScript, this, false), true);
                }
            }

            if (DebugMode && (members.Length == 0 || !(members[0] is DebugModeDisplaySettingsDrawer)))
            {
                                #if DEV_MODE
                Debug.Log("InsertAt(0, DebugModeDisplaySettingsDrawer)");
                                #endif

                DrawerArrayPool.InsertAt(ref members, 0, SpaceDrawer.Create(7f, this), true);
                DrawerArrayPool.InsertAt(ref members, 0, DebugModeDisplaySettingsDrawer.Create(this, debugModeDisplaySettings), true);
                DrawerArrayPool.InsertAt(ref members, 0, SpaceDrawer.Create(7f, this), true);
            }

                        #if DEV_MODE && PI_ASSERTATIONS
            Debug.Assert(!members.ContainsNullMembers());
                        #endif
        }
Пример #2
0
        /// <inheritdoc />
        protected override void DoBuildMembers()
        {
                        #if DEV_MODE
            Debug.Log(ToString() + ".DoBuildMembers()");
                        #endif

            ParentDrawerUtility.BuildMembers(DrawerProvider, this, memberBuildList, ref members);

                        #if UNITY_EDITOR
            if (Platform.EditorMode && (inspector.Preferences.drawScriptReferenceFields || DebugMode))
            {
                var monoScript = MonoScript;
                if (monoScript != null)
                {
                    DrawerArrayPool.InsertAt(ref members, 0, ScriptReferenceDrawer.Create(MonoScript, this, false), true);
                }
            }
                        #endif
        }
Пример #3
0
        /// <inheritdoc/>
        protected override void DoBuildMembers()
        {
            if (parent == null)
            {
                return;
            }

                        #if UNITY_EDITOR
            DrawerArrayPool.Resize(ref members, 2);
            var scriptReference = ScriptReferenceDrawer.Create(monoScript, this, monoScript != null);
            scriptReference.OnValueChanged += SetMonoScript;
            members[0] = scriptReference;
            int index = 1;
                        #else
            int index = 0;
                        #endif

            DrawerArrayPool.Resize(ref members, index + 1);

            members[index] = BoxDrawer.Create(this, GUIContentPool.Create(GetWarningMessage()), MessageType.Warning, ReadOnly);
        }