Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

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:
    105
    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:
    1,065
    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:
    856
    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.