Search Unity

LoadLevelAdditive and JavaScript variables

Discussion in 'Scripting' started by 3D_Content, Apr 29, 2011.

  1. 3D_Content

    3D_Content

    Joined:
    Apr 19, 2011
    Posts:
    7
    I am using LoadLevelAdditive and I have two scenes.

    How can I get GameObject from scene one to my JavaScript in scene zero?

    Like this:
    Scene 0: JavaScript:
    var object : GameObject;

    Scene 1: object (GameObject)

    I have tested "FindWithTag" and "GameObject.Find" but without luck.
     
  2. polytropoi

    polytropoi

    Joined:
    Aug 16, 2006
    Posts:
    681