edited April 2022 in ORK Support
I am trying to access my combatants object variables component via a script in ORK Framework 3, however no matter what I do the VariableHandler contains an empty list.

image

As you can see the variable shows up under nonpublic members but I cant access it. Any help would be appreciated.
My code to access the object variable component is as follows:



private void Update()
{
if (objectVariablesComponent == null)
{
try
{
objectVariablesComponent = GetComponent<ObjectVariablesComponent>();
if (objectVariablesComponent != null)
variableHandler = objectVariablesComponent.Handler;
}
catch
{
objectVariablesComponent = null;
}
}
}
Post edited by Vanisle on
  • Fixed it. There were a few things that I needed to do. For one I had an extra object variables component directly attached to my prefab. Two I needed to forward the object variables script component at runtime to my IMovementComponent via a forwarding coroutine on a monobehaviour script

    image

    image
Sign In or Register to comment.