Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

New to Unity and why all GameObjects must have a transform component?

Discussion in 'Editor & General Support' started by DuffCola, Feb 1, 2014.

  1. DuffCola

    DuffCola

    Joined:
    Feb 1, 2014
    Posts:
    7
    Hello,
    I am new to Unity 2D.
    Before I made something with XNA and Artemis(Entity Component System).
    I am trying to understand how Unity works, but I dont find good tutorials where Unity is declared.
    Know someone good ones?

    Now the main Question: Why must every GameObject have a Transform component?

    Thanks.
     
  2. Danimita92

    Danimita92

    Joined:
    Jan 25, 2010
    Posts:
    31
    GameObjects are objects placed in Unity's different scenes, so they all need a position, rotation and scale.
     
  3. DuffCola

    DuffCola

    Joined:
    Feb 1, 2014
    Posts:
    7
    Ok, but is it possible to pragram a script that must not placed into the scene?
    For example a timer that change the scene after 100 seconds ?
     
  4. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Yes.
     
  5. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Typically you just put "manager" scripts on empty game objects in the scene. You can use DontDestroyOnLoad if you want the object to persist through multiple scenes.

    --Eric
     
  6. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
  7. Smooth-P

    Smooth-P

    Joined:
    Sep 15, 2012
    Posts:
    214
    The real question is why must all TransformS have a gameobject. :)