Answer the question
In order to leave comments, you need to log in
How to implement such an interface in unity?
Good afternoon!
Plz tell me how to implement such a thing in the unit, similar to the script of a standard button: so that a certain method is executed on a certain event, but at the same time so that this method can be assigned from the inspector?
Answer the question
In order to leave comments, you need to log in
You need the UnityEvent class , you can inherit from it if you want to pass some data, or just use it. Call from code using Invoke .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question