I want to realize such a function, role touch different objects when they made the action of different,
I think the object inspector to join a public interface parameters, can be in the drop-down menu, select the current role of the animation animation
Then triggers the corresponding incident will play the role of the object animation
The forehead, is mainly the drop-down menu to achieve? I've put the role of the gameobject object as a parameter to the script
CodePudding user response:
Enum parameter of the public said the object's script to add action, or the parameters of the string and then write their own scripts to add a class object corresponding to the script editor, search online Unity3D CustomEditor keyword