jacobdufault / fullinspector

Full Inspector supercharges Unity's inspector
MIT License
111 stars 27 forks source link

Inspecting not available for classes deriving from abstract : BaseBehavior type classes #173

Closed WiktorWasowski closed 7 years ago

WiktorWasowski commented 7 years ago

If I have a class like this one:

using UnityEngine;
using System.Collections.Generic
using FullInspector;

public abstract class SomeClass : BaseBehavior
{
    public int field;
    public int property { get; set; }
    public Dictionary<int, int> dictionary;
}

And then a class that derives from it:

using UnityEngine;
using System.Collections.Generic;

public class DerivedClass : SomeClass
{
    public int otherField;
    public int otherProperty { get; set; }
    public Dictionary<int, int> otherDictionary;
}

If I now plug DerivedClass to a GameObject, I can only inspect the fields field and otherField in the editor.

jacobdufault commented 7 years ago

This works as expected for me using the current master. Please reopen if you can reproduce using this (or a more recent) build. Thanks!

image

WiktorWasowski commented 7 years ago

I'm sorry. I wrote this code here to illustrate the problem in my own scripts in a short way, without testing it. It works indeed (with the same version I used before). I found out what's the true source of the problem with my derived classes. They have editor scripts associated with them and I forgot I had to modify them in a Full Inspector way. Now that I've done that, everything works great.