Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
136 stars 2 forks source link

Ability to specify the type of item when saving an object to inventory #1588

Open JackTheFoxOtter opened 6 months ago

JackTheFoxOtter commented 6 months ago

Is your feature request related to a problem? Please describe.

I am currently working on a camera that allows you to attach facets to it. However, once I actually save the camera with a facet installed, I am no longer able to favorite that camera, as the "set camera" button doesn't show up anymore, instead it turns into "spawn facet".

Describe the solution you'd like

I need a way to define the type of item my object is so that the inventory handles it properly. I can imagine tagging a sub-hierarchy on my camera (the one the facets get parented under) so that it doesn't get considered when the inventory type of the item is determined would be one option. Another could be a component to explicitly define the type of inventory item on the object root so it's not ambiguous.

Describe alternatives you've considered

None that I'm aware of - if there is an existing solution please let me know! As it stands right now this will require me to save the facets separately from the camera, which would defy the point of my system, since it wouldn't automatically be loaded for the favorited camera.

Additional Context

No response

Requesters

No response

shiftyscales commented 6 months ago

It would probably be better that they instead be entirely separate buttons in the interface, this is probably something that could be considered in the Inventory UI Rework #1119- or otherwise having a better mechanism favouriting/tracking favourited interfaces could also improve the experience of setting a favourite interface. Since we aren't going to be making any further modification to the existing inventory interface, I'm going to close this out for now, sorry.

JackTheFoxOtter commented 6 months ago

I don't think this would make much sense in my case? If I have 10 facets on my camera, I don't want to see 10 facet buttons and 1 camera button in the inventory. I just want to be able to say "hey, this is a camera, treat it as one" when I save the item.

JackTheFoxOtter commented 6 months ago

Like, my camera isn't a facet. Attempting to spawn it as a facet itself would likely break it. I need a way to let the cloud know that the item I'm saving is - in fact - not a facet. And I don't think this has much to do with the inventory UI directly.

shiftyscales commented 6 months ago

With regards to the inventory button- the presence alone of a facet component allows the object containing it to be spawned in userspace (this is how users make a 'userspace inspector').

Separately from the UI it may be worth making a tweak to its behaviour to only check if the top level slot of the hierarchy contains the facet component- but either way- the solution you proposed would still not be suitable.

Seeking input from @Frooxius on the best option here- I feel like if only the top-most/root slot of an object were checked for a facet component, or favouritable interface component- it would resolve the needs of this issue/be a generally more intuitive behaviour?

JackTheFoxOtter commented 6 months ago

the solution you proposed would still not be suitable.

Yeah I noticed I didn't properly phrase this ticket to be indicative of the root problem, I think I've rephrased / updated it to be a bit more specific.