-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Simplify Gizmo creation #6981
Comments
I have to say, I did think the same the first time I played with the Gizmo API. Let's get some thoughts from Chief Gizmo Architect @kpal81xd... |
I would suggest for the constructor to take an optional layer argument:
and if this is not provided, the gizmo should use the existing |
So the first version of the api included the layer creation itself however we felt like it is clearer for the user to provide and setup their own layer in case of a particular behavior. Including the layer also comes with complications of layer insertion being dependent on when the gizmo is created along with potential naming conflicts. One solution might be allowing for gizmo creation with an optional parameter for settinga custom layer? |
Also, if you have to provide CameraComponent, you can get an |
I would just like it configurable but still opinionated enough to basically never really needing to configure it besides in cases which are clearly "non-defaultish".
I believe putting it by default on Immediate is contra productive - it would depth test and be drawn e.g. under a box that is supposed to be "movable"? People may not find that gizmo. |
Having thought about it a little more I dont think I would like to set the gizmo default to create the layer internally. I believe there should be a minimum expected understanding to use gizmos and having better visibility over your layer to know how it behaves is better than having the default create the layer internally. |
Playing devil's advocate again, give it a rest... Same story as with the Gizmo Attach issue, other Gizmo implementations are just simple and straight-forward to use, but we need to collect half-baked idiosyncrasies again. |
Currently we need this code to create a gizmo:
The upper/big block of code is just... complicated boilerplate code that no one can remember (at least not me). The last two lines do what a person really wants from a gizmo.
Ideally I would like the required code for adding a gizmo to be short like this:
It would be nice if the gizmo system ensures creation of the layer if it doesn't exist yet?
Considering we are also running into issues like #6949 it's nice to not make everyone refactor layer code if it happens to need a change. The gizmo system would just do what is needed for certain updates.
The text was updated successfully, but these errors were encountered: