Forum rules - please read before posting.

Component Variable on this object

Is there a way to determine whether the component variable that has just changed is one that is on the same object as the script?

I have an onevent that triggers when a variable changes, which is also triggered by a component variable change. But is this component variable belonging to the object the script is running on, that's the question.

Is it possible to find out?

Olly

Comments

  • Yes - you can use this to check if a variable is part of a given Variables component:

    if (GetComponent<Variables>().vars.Contains (myVar);
    
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.