Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Foldout doesn't work properly in child classes #251

Open
SegFaultGitHub opened this issue Apr 11, 2024 · 0 comments
Open

Foldout doesn't work properly in child classes #251

SegFaultGitHub opened this issue Apr 11, 2024 · 0 comments

Comments

@SegFaultGitHub
Copy link

SegFaultGitHub commented Apr 11, 2024

It seems like the access modifiers sometimes prevent the field to be added in the foldouts for child classes.
Example:

public class Parent : MonoBehaviour {
    #region Serialized fields
    [field: Foldout("Parent", true)]
    [field: SerializeField] protected bool AAA;
    [field: SerializeField] protected bool BBB;
    [field: SerializeField] public bool DDD { get; private set; }
    [field: SerializeField] public bool EEE { get; protected set; }
    [field: SerializeField] public bool FFF { protected get; set; }
    [field: SerializeField] public bool GGG;
    [field: SerializeField] private protected bool HHH;
    #endregion
}

public class Child : Parent {
    #region Serialized fields
    [field: Foldout("Child", true)]
    [field: SerializeField] private bool CCC;
    #endregion
}

image

@SegFaultGitHub SegFaultGitHub changed the title Foldout doesn Foldout doesn't work properly in child classes Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant