How might you tranfer a game object from one collection to another?
e.g: perhaps if you have levels and you want the same player game object to be in the next level when you switch levels like I do, how might you do that?
For e.g a player object etc, I use a player.collection and then include that in my levels.
1 Like
Another way is to store pertinent information (e.g. position etc) in a module, then respawn the game object in the new collection with reference to that information.
1 Like
could you please explain more :? Like do you require that module in the player script?
Yeah that would be one sensible way to go about it. In final(), the player could store info about itself in the module. Then in init(), it could read and apply that information.
Tons of ways to go about it though so whatever suits you!
2 Likes