This is my First time for posting an issue, so if the format is bad, I will change it.
First of all, thanks for the fantastic library! This library really helps me a lot.
When using this library, I found an issue that,
the editor of a class that inherit from a base class with private SerializedField won't show, and keep throwing error of:
ArgumentException: Could not find the field or property of property
AnnulusGames.LucidTools.Editor.SerializedPropertyExtensions.GetAttributes[TAttribute] (UnityEditor.SerializedProperty property, System.Boolean inherit) (at ***/PackageCache/com.annulusgames.lucid-editor@0bf342eaec/Editor/Extensions/SerializedPropertyExtensions.cs:87)
example:
public class BaseClass : MonoBehaviour
{
[SerializedField] private bool somePrivateField;
}
// in another file
public class InheritClass : BaseClass
{
// the editor of this class won't show
[SerializedField] private bool someFieldInInheritClass;
}
I found out that SerializedPropertyExtensions.GetAttributes() is using Type.GetField() to retrieve types, but GetField() can't retrieve members that the type can't see (= private members in parent class). I think this is the reason.
Edit:
By the same reason, base class's private method with [Button] attribute won't show in editor of inherit classes. (There are other similar issues with the same reason I think)
This is my First time for posting an issue, so if the format is bad, I will change it.
First of all, thanks for the fantastic library! This library really helps me a lot.
When using this library, I found an issue that, the editor of a class that inherit from a base class with private SerializedField won't show, and keep throwing error of:
example:
I found out that
SerializedPropertyExtensions.GetAttributes()
is usingType.GetField()
to retrieve types, butGetField()
can't retrieve members that the type can't see (= private members in parent class). I think this is the reason.Edit: By the same reason, base class's private method with
[Button]
attribute won't show in editor of inherit classes. (There are other similar issues with the same reason I think)