Trying to make a loot system that spawns chests in dynamically, and i would like to spawn in Entity Prefabs that have an interactable component and subscribe to them, then destroy them after they are interacted with. This would save me the trouble of having to cycle and teleport an array of buttons, greatly speeding up workflow and saving memory. How can I spawn these entities in from a Verse device that manages them and then removes them when they are interacted with?
Hey @swaggod how are you?
I found this tutorial that I think solves your question about spawning “prefabs” (Props in the case of UEFN). Since it’s a bit old, it’s possible that not all of the code will work by simply copying and pasting, but it shouldn’t be a problem to adapt it to the latest version of UEFN/Verse.
Here you have a slightly newer video about how to spawn props that could help you adapt the code.
And here is another video that could be useful for you. This one is about how to create a chest.
I hope this helps with what you want to do!
Yeah sadly the spawning devices dynamically doesn’t work anymore, which is why I’m trying to use scene graph and entities because of the built in interactable component. However, I couldn’t get the interactable component to spawn in at realtime which is what I need for this procedurally generated map Im making. Spawning props don’t allow interaction. Thanks for the response tho!
My current solution is pooling buttons and using a check in and check out system to track what button is being used for what, and spawning chest props on the buttons.