Skip to content

Feature Request - Generic debug window for inspecting / updating any struct using reflection #44

@ShadyHippo

Description

@ShadyHippo

I've had this idea for a little while. From my research it's possible but I don't know enough about golang yet.

I would like a dedicated debug window to show me editable information about whatever entity or projectile or any object I pass in.

In theory, my understanding of reflection would allow passing a struct of any kind to a window function and having that window function iterate through the struct and display the output in struct order all the way down through any slices it has and displaying those too.

This would allow much faster iteration for game development to be able to display and edit any information on any struct without having to change the code for your debug window every time you update an entity and it would make it so you don't need bespoke edit windows per different struct types.

If it was a number I would want a slider for it, if it was a string I'd want a bound text box, etc.

There's details to be made, but I'm considering doing this (with the help of ChatGPT to guide me)

If I did something like this would you want it mainlined into debugUI in the library as a window someone could use? Maybe just an example?

Source of the idea (and one implementation of the idea. He uses C# for his language though)

https://noelberry.ca/posts/making_games_in_2025/
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions