Forum rules - please read before posting.

GlobalVariables could not be found -Are you missing a using directive or an assembly reference?

edited May 2014 in Technical Q&A
What is wrong with this code (with the changes to AC scrit)

IE= GameObject.FindwithTag(Tags.persistenteEngine).GetComponent <GlobalVariables>().GetIntegerValue (1);

GlobalVariables are not recognized

Comments

  • I Read that you changed GlobalVariables back to RuntmeVariables

    and changed that

    But now i am getting error CS0176 : Static member "RuntimeVariables.GetIntegerValue(int)" cannot be accessed with an instance reference, qualify it with a type name instead

  • I apologise for the script changing, but in fact the GlobalVariables class is still the right one to use - but they're static now meaning the syntax is easier.  This tutorial has the full list of functions available, but the corrected line you've posted would be:

    int value = AC.GlobalVariables.GetIntegerValue (1);
  • Worked like a charm, thanks Chris
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.