Default Tags and Layers in Unity

So when you first pull up Unity it has 6 default tags

  • Respawn
  • Finish
  • Editor Only
  • Main Camera
  • Player
  • Game Controller

and 4 default layers (not including the 4 un-named ones unity predefines)

  • Default
  • TransparentFX
  • Ignore Raycast
  • Water

Do these layers and tags have specific purposes that are unique or are they are just ones people usually use so they included them for convenience? If they are special how so? Thanks in advance.

"Respawn" rather than "Respond".

fixed that. Thanks

You need to "Untagged" to the tags.

Thanks for asking this question :)

1 Answer

1

Main Camera: an object tagged this will respond to Camera.main.

Editor Only: an object tagged this will not appear in a build.

TransparentFX: lens flares will show through the collider of an object on this layer.

Ignore Raycast: an object on this layer will be ignored by raycasts (including OnMouseOver, etc.).

Does "Editor Only" get destroyed or just hidden?

I think they are just ignored by the engine when building the game.

If I have a gameObjectA which refer some resource (eg: textures, models), now I tag gameObjectA "Editor Only" and make gameObjectA as a child of gameObjectB. (Note: gameObjectB is no resource dependency and not Editor Only) When I build the game, gameObjectA's resource will be load or not? (The fundamental problem is : does "Editor Only" make gameobject exclude from building system or just create and destory)