I’m trying to use below code in Animation but it’s not working.
Can I use multiple parameter function in Animation?
public void DoSomething(int myInt, string myString) {
Debug.Log(myInt);
Debug.Log(myString);
}
I’m trying to use below code in Animation but it’s not working.
Can I use multiple parameter function in Animation?
public void DoSomething(int myInt, string myString) {
Debug.Log(myInt);
Debug.Log(myString);
}
No you cannot do that like this, but you can create a method that accept an animation event as parameter
public void DoSomething(AnimationEvent myEvent) {
Debug.Log(myEvent.floatParameter);
Debug.Log(myEvent.stringParameter);
Debug.Log(myEvent.intParameter);
}
Thanks! but I solved this problem with ‘String.Split();’
You have two options: