Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Create Box Collider by script

Discussion in 'Scripting' started by errormaker, Oct 9, 2006.

  1. errormaker

    errormaker

    Joined:
    Aug 30, 2006
    Posts:
    81
    Hi all UnityUsers!

    Question:
    Is there a way to create/assign...

    • Box Collider (and assign "Size" and "Center")
    • Audio Source (and assign some values)
    • and assign a script

    ... to a game object BY SCRIPTING (at startup), instead of using Unitys interface?


    Imagine You have 200 game-objects, already exists in the
    3D world who needs this things... I don't want to make a prefab
    and replace all...

    AND I'm a lingo-programmer used to do everything by code...

    Even if Unity don't have the flexibility Director have
    I think it's capable of this. Or maybe Unity HAVE the flexibility of Director...?


    /Your sweet little errormaker :twisted:
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
  3. errormaker

    errormaker

    Joined:
    Aug 30, 2006
    Posts:
    81
    I bow...

    This forum is a model for forums...

    And... Unity HAS the flexibility of Director....
    Actually I have hard to believe it!
    But I shall think again... and bow for Your work with Unity.

    Thanks!