Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

¿How Add object?

Discussion in 'Scripting' started by indexomega, Mar 19, 2011.

  1. indexomega

    indexomega

    Joined:
    Feb 1, 2011
    Posts:
    10
    Hello.I'm a beginner with unity and I want to add an object to other with Scripting (if it is necessary),

    I want to change the animation to the player when it select a weapon (I did it). But now I´d want to add his weapon.

    How do I do it? Thanks

    PD: I've posted this here because I think I need an script to do it.
     
    Last edited: Mar 19, 2011
  2. mattcscz

    mattcscz

    Joined:
    Mar 7, 2010
    Posts:
    411
    what do you mean? like you want your character to hold a weapon? This can be done through parenting and binding, there are many other ways to do it but this probably the easiest way. another way ( if you don't have a vast selection of weapons) would be to already place the weapon then use renderer.enabled = true/false; theres quite alot scripts around this forum that will do that so try using the search bar to find one :D
     
  3. pakfront

    pakfront

    Joined:
    Oct 6, 2010
    Posts:
    551