Answer the question
In order to leave comments, you need to log in
How to make a callback (or something like that) in Unity3D?
Why "like that": I'm still new to this topic, so I know what I want, but I don't know which tool is suitable.
I have a main script. You need to call a script from it located on another object - manipulate the object, then get some feedback (for example, the user selects a certain option) and return it to the first script. It is not necessary to do this asynchronously.
Google coroutines, callbacks, events, await, in general, mess in my head.
Answer the question
In order to leave comments, you need to log in
If it's not asynchronous AT ALL, then you simply call the method of the second script from the first script. The method should return what you need + you need a link to the script, of course.
If at least somehow asynchronously (and the input is like this) - then google Action and and lambda. Pass it to the method, the second script will remember and pull when necessary.
And learn seasharp before you get into the unit.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question