protected override void OnEnable()
            {
                base.OnEnable();

                sets = new InspectorList(serializedObject.FindProperty("sets"));
                sets.elementHeight = 60f;
            }
示例#2
0
            protected override void OnEnable()
            {
                base.OnEnable();

                options = new InspectorList(serializedObject.FindProperty("options"));

                InitValue();

                transition = new EnumVisibiltyControllerDrawer <Transition>(serializedObject.FindProperty("m_Transition"));
                colors     = serializedObject.FindProperty("m_Colors");
                animations = serializedObject.FindProperty("m_AnimationTriggers");
                sprites    = serializedObject.FindProperty("m_SpriteState");
                transition.Assign(Transition.ColorTint, colors);
                transition.Assign(Transition.Animation, animations);
                transition.Assign(Transition.SpriteSwap, sprites);

                CustomGUI.Ignores.Add(colors.name);
                CustomGUI.Ignores.Add(animations.name);
                CustomGUI.Ignores.Add(sprites.name);

                CustomGUI.Overrides.Add(transition.Property.name, DrawTransition);

                CustomGUI.Overrides.Add(options.serializedProperty.name, DrawOptions);
                CustomGUI.Overrides.Add(value.Property.name, DrawValue);
            }
示例#3
0
 protected virtual void InitList(SerializedProperty property, GUIContent label)
 {
     if (list == null)
     {
         list       = new InspectorList(GetList(property));
         list.label = label.text;
     }
 }
示例#4
0
                protected override void OnEnable()
                {
                    base.OnEnable();

                    pathsConstraints = new InspectorList(serializedObject.FindProperty("pathsConstraints"));

                    gui.Overrides.Add(pathsConstraints.serializedProperty.name, DrawFoldersConstraints);
                }
示例#5
0
            protected override void OnEnable()
            {
                base.OnEnable();

                clips = new InspectorList(serializedObject.FindProperty("clips"));

                gui.Overrides.Add(clips.serializedProperty.name, DrawClips);
            }
            protected override void OnEnable()
            {
                base.OnEnable();

                elements = new InspectorList(serializedObject.FindProperty("elements"));

                CustomGUI.Overrides.Add(elements.serializedProperty, DrawElements);
            }
            protected override void OnEnable()
            {
                base.OnEnable();

                index = new ListPopup <Tab>(serializedObject.FindProperty("index"), target.TabsNames);

                tabs = new InspectorList(serializedObject.FindProperty("tabs"));
            }
            protected override void OnEnable()
            {
                base.OnEnable();

                sets = new InspectorList(serializedObject.FindProperty("sets"));
                sets.elementHeight = 60f;

                CustomGUI.Overrides.Add(sets.serializedProperty, DrawSets);
            }
示例#9
0
            protected override void OnEnable()
            {
                base.OnEnable();

                index = new ListPopup <Tab>(serializedObject.FindProperty("index"), target.TabsNames);
                CustomGUI.Overrides.Add(index.Property, DrawIndex);

                tabs = new InspectorList(serializedObject.FindProperty("tabs"));
                CustomGUI.Overrides.Add(tabs.serializedProperty, DrawTabs);
            }
            protected override void OnEnable()
            {
                base.OnEnable();

                objects = new InspectorList(serializedObject.FindProperty("objects"));
                objects.drawElementCallback = DrawObjectsElement;
                objects.elementHeight       = 80f;

                objects.onAddCallback = delegate
                {
                    ReorderableList.defaultBehaviours.DoAddButton(objects);

                    if (objects.count == 1)
                    {
                        SerializedProperty scale = objects.GetArrayElement(0).FindPropertyRelative("scale");

                        scale.FindPropertyRelative("x").floatValue = 1f;
                        scale.FindPropertyRelative("y").floatValue = 1f;
                        scale.FindPropertyRelative("z").floatValue = 1f;
                    }
                };
            }
示例#11
0
        public void RefreshSelectedList()
        {
            if (main.index == -1)
            {
                preview = null;
            }
            else
            {
                if (GetPreviewProperty != null)
                {
                    preview = new InspectorList(GetPreviewProperty(main.GetArrayElement(main.index)));
                }
                else if (GetPreviewListData != null)
                {
                    PreviewListData data = GetPreviewListData();

                    preview = new InspectorList(data.label, data.list, data.type);
                }

                InitPreview(preview);

                preview.Expanded = true;
            }
        }
示例#12
0
        public DualInspectorList(string label, IList mainList, Type elementsType)
        {
            this.main = new InspectorList(label, mainList, elementsType);

            Init();
        }
示例#13
0
        public DualInspectorList(SerializedProperty mainProperty)
        {
            this.main = new InspectorList(mainProperty);

            Init();
        }
示例#14
0
 void InitPlatformsPreview(InspectorList list)
 {
     list.drawElementCallback = DrawPlatformsPreviewElement;
 }
示例#15
0
            protected override void OnEnable()
            {
                base.OnEnable();

                tags = new InspectorList(serializedObject.FindProperty("tags"));
            }