Hi all.
I hopefully have a pretty basic question for someone. What I want to do is to Set a variables value based on the variables name and a value. how I have been trying this is to have a function on the script with the variable as fallows.
public Void SetInt (string _name, Int _value){
/* would be something like*/ this.getcomponent<script name>().??? _name ??? = _value.
}
I probably will find a way because the animator has this exact thing with
animator.SetInt(string name, int val);
Just couldn’t find the answer on the forums.