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. Dismiss Notice

How to tell the difference between a GameObject created from FBX directly and one from a prefab?

Discussion in 'Scripting' started by Aldrick, Aug 24, 2014.

  1. Aldrick

    Aldrick

    Joined:
    Feb 19, 2014
    Posts:
    64
    Because in inpector they all share the very same components and attributes as they are originated from a same fbx mesh.But how should I do if want to detect via scripts which objects are created directly by dragging the fbx into the scene and which are by prefabs.I seems all GameObject models share a same class name "GameObject",not like in MAXScript there are many differecnt classes for mesh objects.
     
  2. GarthSmith

    GarthSmith

    Joined:
    Apr 26, 2012
    Posts:
    1,240
  3. Aldrick

    Aldrick

    Joined:
    Feb 19, 2014
    Posts:
    64
    Thank you garth,yes that's how the engine differentiate them.I figured it out earlier,forgot to update here.And the page your direct gives more specifics,thanks a lot.
     
    Last edited: Aug 27, 2014