Search Unity

Efficient way to swap/change/equip armor pieces

Discussion in 'Scripting' started by henmachuca, Jan 29, 2018.

  1. henmachuca

    henmachuca

    Joined:
    Oct 14, 2016
    Posts:
    95
    Hello, I have a character in game that I would like to swap armor parts at run time.

    Right now, I export my 3d model with all the pieces together with the .fbx and hide all the armor parts inside unity. When I want to equip that item I simply enable the part(gameobject) that I want.

    Is this an efficient way to do this kind of functionallity?
    Thank you.
     
  2. Laperen

    Laperen

    Joined:
    Feb 1, 2016
    Posts:
    823
    Its nice and simple, but difficult when you want to include a new piece of equipment, so its more of a pipeline and production issue more so than an efficiency issue.
     
    henmachuca likes this.
  3. mahdiii

    mahdiii

    Joined:
    Oct 30, 2014
    Posts:
    803
    You can make empty gameobjects for every item as spawn point that you want to equip your model with them.
    So you can easily instantiate them in defined and known spawn points or you can add all of them to your model and activate and deactivate them appropriately
     
    henmachuca likes this.
unityunity