示例#1
0
        /// <summary>
        /// Initializes the renderers list with monobehaviour/scriptableobjects fields and method,
        /// then with method from the editor script delegate.
        /// </summary>
        override protected void InitializeRenderersList()
        {
            base.InitializeRenderersList();

            renderers = new List <InspectorItemRenderer>();

            renderers.AddRange(RendererFinder.GetListOfFields(_serializedObject.targetObject));
            renderers.AddRange(RendererFinder.GetListOfMethods(_serializedObject.targetObject));
            renderers.AddRange(RendererFinder.GetListOfMethods(editorScript));

            InspectorItemRendererOrderComparer comparer = new InspectorItemRendererOrderComparer(groups, renderers);

            renderers.Sort(comparer);
        }
示例#2
0
        protected override void InitializeRenderersList()
        {
            base.InitializeRenderersList();

            subtarget = FieldInfoHelper.GetObjectFromPath(entityInfo.propertyPath, _serializedObject.targetObject);
            List <InspectorItemRenderer> fieldsRenderers  = RendererFinder.GetListOfFields(subtarget, entityInfo.propertyPath);
            List <InspectorItemRenderer> methodsRenderers = RendererFinder.GetListOfMethods(subtarget);

            renderers = new List <InspectorItemRenderer>();
            renderers.AddRange(fieldsRenderers);
            renderers.AddRange(methodsRenderers);

            InspectorItemRendererOrderComparer comparer = new InspectorItemRendererOrderComparer(groups, renderers);

            renderers.Sort(comparer);

            foreach (InspectorItemRenderer renderer in renderers)
            {
                renderer.serializedObject = _serializedObject;
            }
        }