Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(2 edits)

I looked at the project you gave me. I can't understand. Prefabs allow you to change the model of the same object during the game? If so, how do I make multiple prefabs? So I made 3 prefabs of weapons and recorded their UID in an array. Then during the game I try to change the model of the object through the UID, but nothing happens. More precisely, I load the UID of one prefab, and as a result, the model is loaded from another prefab.

The prefabs only allow you to _load_ a model during a game. Once the model is loaded in an instance, it cannot be changed.

It sounds like you are tying to allow a model to use different weapons and change them during runtime? For that we usually create a 3d model with all weapons attached to the model and then use enable/disable nodes to determine which weapon will be visible when the model is rendered.

If you want to see a model designed like this, see the character models in https://quaternius.com/packs/toonshootergamekit.html Load them into the babylon sandbox and you can see each character has 5+ weapons attached to each single model, also in sandbox you can disable / enable nodes to see what it would look like.

(1 edit)

Thank you!