Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Let us know a bit about your interests, and if you'd like to become more directly involved. Take our survey!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Transforms don't have a C# example

Discussion in 'Documentation' started by Deeeds, Apr 28, 2018.

  1. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    739
    https://docs.unity3d.com/ScriptReference/Transform.html

    At a guess: this is the most fundamental and significant part of Unity. And foundational, at its core, so to speak.

    If it's not, it probably is for new users. A welcoming and insightful example would go a long way to helping them see how to access and move things... which (and I'm still guessing) might be imperative to games.
     
  2. NicBischoff

    NicBischoff

    Joined:
    Mar 19, 2014
    Posts:
    108
    I’m not sure you are reading the script reference correctly.
     
  3. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    739
    Please, go on...
     
  4. NicBischoff

    NicBischoff

    Joined:
    Mar 19, 2014
    Posts:
    108
  5. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    739
    argh, I see the problem. You've missed the part in bold:

    " how to access and move things..."
     
  6. NicBischoff

    NicBischoff

    Joined:
    Mar 19, 2014
    Posts:
    108
    The example on the page outlines this.
     
  7. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    739
    No, it outlines accessing the transform of the object 'self'. That's akin to accessing a component, not a thing. Components being parts of things as opposed to things in their own right.

    Within Unity, as I understand it, Transforms, like GameObjects, are unique identifiers of things. Hence the point of the post.

    But also because Transforms can be nested.
     
  8. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    340
    Transforms are components, like any other. A GameObject is indeed a unique identifier, and a list of Components.

    You can see in the manual that Transform inherits from Component, its nothing special.
     
  9. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    739
    Congratulations.

    You win the irrelevant and obtuse commentator of the month award. From me. Pat yourself on the back.