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

[Milestone] IMGUI: Expandable should use object editor/custom editor instead of drawing each field #25

Closed
TylerTemp opened this issue May 9, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request invalid This doesn't seem right

Comments

@TylerTemp
Copy link
Owner

No description provided.

@TylerTemp TylerTemp added this to the The Golden Casket milestone May 9, 2024
@TylerTemp TylerTemp self-assigned this May 9, 2024
@TylerTemp TylerTemp added enhancement New feature or request invalid This doesn't seem right labels May 9, 2024
@TylerTemp
Copy link
Owner Author

After some digging, this seems impossible. For anyone who wants to try this feature, here are some problems I've encount which might help:

  1. CustomDrawer of PropertyAttribute, it can create and draw editor by:

    Object scriptableObject = property.objectReferenceValue;
    UnityEditor.Editor.CreateEditor(scriptableObject);
    editor.OnInspectorGUI();
  2. Doing this will trigger the layout system, which will close the current property drawer. This means in list this will be drawn under the list

  3. As most ScriptableObject uses CustomEditor rather than CustomPropertyDrawer, the propertyDrawer solution will have no point.

  4. This is possible for UnityEngine.Editor to solve for top level fields, but it will still not work for list/array because list element uses propertyDrawer not editor drawer.

@TylerTemp TylerTemp closed this as not planned Won't fix, can't repro, duplicate, stale Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant