- Home /
How Does Weapon Selection Work In-Game?
I would like to get an understanding of the mechanical approach to this subject. My approach would be to create an array in which you drag in all the gun model prefabs which are disabled within the scene/hierarchy, however are technically within the scene under the player fps controller. This can then easily be accessible from a script and the players current weapon can be manipulated, as well as the current guns values; i.e. weapon type, ammo type etc...
My fear with this is that it may drastically increase rendering times/loading time. I know that because they are within the scene, but disabled - will not render them or take into account their scripts and components until they are enabled, however can someone clear this up please?
To summaries, if I have a weapon manager gameobject, that has a script attached to it, that has every weapon prefab within the game dragged into an array, however disabled - is this inefficient? If so, can you elaborate on a more efficient approach please?
Cheers
Your answer
Follow this Question
Related Questions
Making Weapon Switching Code more effective. 3 Answers
PhotonNetwork Switching Weapons (network sync) 3 Answers
Weapon Switching 3th Person 0 Answers
How do I draw directly (and quickly) into the rendered frame? 1 Answer
Weapon switching. 1 Answer