Search Unity

Accessing public static variable of other script

Discussion in 'Scripting' started by Invictus_, Oct 21, 2016.

  1. Invictus_

    Invictus_

    Joined:
    Jul 30, 2015
    Posts:
    19
    hey guys, trying to access a static variable of another script, easily done with non-statics but i can't find out how to obtain the static variable,

    any help is appreciated
     
  2. romatallinn

    romatallinn

    Joined:
    Dec 26, 2015
    Posts:
    161
    ClassName.staticVariableName
    TUTORIAL
     
    Kiwasi likes this.
  3. Invictus_

    Invictus_

    Joined:
    Jul 30, 2015
    Posts:
    19
    ty sir, had tried that didn't work but then i saw an error in my code causing it to not work, :p working now