Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

Is there a way to increase the limit of model loads during runtime?  I'm making a multiplayer game and want players to be able to change models.  I can't use "load from prefab instance" because 1) other instances of the player object are treated as extra players and 2) when the host syncs instances to peers, the UIDs are different for peers.  My current approach works great except for the one-load runtime limit.   

I'm also open to suggestions if you have any ideas!  Thanks!

Use a 2d sprite as the main player. So uid never changes. Connect the current model / 3DObject to that 2d sprite. When model changes delete old, create new model and attach it to the original 2d sprite.

In general, I'd also say this is a good game dev pattern, for exactly the reasons you describe. Your model or animated sprite is decoupled from the 'player controller' and you can be more flexible in control vs animation or mode.

Thanks so much for the replies!  This worked.  I was using a 2d sprite for the controller originally, but I had it in a container with the model for ease of referencing so I couldn't destroy the model without destroying the player controller.  Instead of using a container, I added an instance variable to the model representing which 2d player controller it should follow.  This way, I can easily destroy and re-create the model without impacting a player's container.  Your idea to destroy & create new works just as well as the "reload" I initially wanted.


Thanks again, and great plugin!

Great! When you are ready, would love to see some gameplay vids!