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

Is there any other way to get the Reference of a GameObject?

Discussion in 'Scripting' started by tiny2014, Jul 9, 2014.

  1. tiny2014

    tiny2014

    Joined:
    Jun 28, 2014
    Posts:
    13
    I know Drag the object from Hierarchy to Inspector can do it.
    Tell me some other ways
    Thx.
     
  2. LeftyRighty

    LeftyRighty

    Joined:
    Nov 2, 2012
    Posts:
    5,148
  3. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,716
    OnCollision, OnTrigger, Physic.RayCast, Physic.SphereCast, Singleton pattern, Events, Registrable pattern, and probably many other I forgot.
     
    IvanAuda likes this.