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 do I import variables from another script? (Java)

Discussion in 'Scripting' started by Brammosaurus, Dec 31, 2014.

  1. Brammosaurus

    Brammosaurus

    Joined:
    Nov 16, 2014
    Posts:
    3
    I'm using a script that basically works as a quest, if the quest is finished, the variable is set to true. If that variable is true, it should trigger another script, however; I can't trigger the script if I don't have the variable imported.

    tl;dr: how do I import variables from another script
     
  2. tanoshimi

    tanoshimi

    Joined:
    May 21, 2013
    Posts:
    297
  3. Brammosaurus

    Brammosaurus

    Joined:
    Nov 16, 2014
    Posts:
    3
  4. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008
    here's a video on get component and class inheritance.
     
  5. Hesham

    Hesham

    Joined:
    May 29, 2008
    Posts:
    147
    What's better than one tutorial video? Two tutorial videos, though I like yours better.