Skip to content

docs: explain drawing hidden managed references - #111

Closed
mackysoft wants to merge 1 commit into
mainfrom
fix/issue-85-hidden-properties
Closed

mackysoft wants to merge 1 commit into
mainfrom
fix/issue-85-hidden-properties

Conversation

@mackysoft

@mackysoft mackysoft commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Summary

An explicitly drawn [HideInInspector] managed reference can show its selector without its subtype fields. Document how a custom editor can display those fields using Unity's existing SerializedObject.forceChildVisibility API.

Scope

  • Add a README FAQ with a drawing scope that restores the previous visibility setting in finally.
  • Explain that the setting also reveals individually hidden descendants, and that screen-specific filtering belongs in the custom editor when those hiding rules should be preserved.
  • This is usage guidance; automatic drawer visibility behavior is unchanged.

Verification

  • Reproduced the reported omission with package 1.6.1 on Unity 2022.3.62f3, both in a standalone EditorWindow and an xNode GlobalNodeEditor subclass. Standard Unity PropertyField without SubclassSelector showed the same omission.
  • Seven isolated EditMode GUI cases passed against main 9587592: child rendering, keyboard editing and application, restoration of the caller's visibility setting, a separate SerializedObject retaining its default setting, and ordinary Inspector hiding.
  • git diff --check passed. The repository change is documentation only.
  • The same commit passed the Tests workflow, including Verification; the EditMode matrix was skipped by the documentation-only change filter.

Closes #85

Why
Hidden managed references can omit child fields when explicitly drawn in custom editors.

What Changed
Document scoped SerializedObject.forceChildVisibility, restoration, and its effect on hidden descendants.

Impact
Provide an existing-API solution for EditorWindows and xNode custom inspectors while preserving package behavior.
@mackysoft

Copy link
Copy Markdown
Owner Author

Closing this PR because the investigation result and the existing Unity API workaround are sufficiently covered by the reply to #85. A README addition is unnecessary for this issue.

@mackysoft mackysoft closed this Oct 15, 2026
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

Successfully merging this pull request may close these issues.

[BUG] Unexpected behavior with [HideInInspector]

1 participant