edited October 2014 in ORK Scripting
I need to change object variables from outside the object in a script. I've reference the object variables component and looked for something that looked like it could set the variables, but came up empty. It does not seem to be similar to the way you change game variables: ORK.Game.Variable.Set("someBool",true);

Am I missing something?
Post edited by drod7425 on
  • Something like this?

    OBJVariablesComponent = gameObject.GetComponent<ObjectVariablesComponent> ();

    VariableHandler OBJHandler = OBJVariablesComponent.GetHandler ();

    From the handler you can check and change variables and access all the basic functionality. At least...it seems to work that way on my end unless I royally screwed something up.
    My little chunk of the internet: http://artemic.com
  • That's correct - get the handler (using GetHandler()) and change the variables there.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Ah, I had the reference to the component, but no handler. Thanks, Firrerreo!
Sign In or Register to comment.