V
V
Viktor2021-11-15 17:58:56
C++ / C#
Viktor, 2021-11-15 17:58:56

Interaction between scene scripts in Unity, how right?

Hello everybody.

Generally. There is an empty object with the SceneController script on the Unity scene, it paws mouse clicks and passes some data to the script on the CharacterController object-character by calling a certain method from the script (the method takes several data as arguments). In the character controller, some actions take place based on the information received, these actions are related to the distances between objects, animations and other things, in general, actions are not instantaneous. The question is, how should the CharacterController notify the SceneController that it has completed the action, and how can I continue to give it "commands"? What to google, what to read, as smart people do?

Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
freeExec, 2021-11-15
@freeExec

https://metanit.com/sharp/tutorial/3.14.php

N
Nekit Medvedev, 2021-11-16
@NIKROTOS

Maybe I'm wrong, but this is a bit like a command pattern, can I take part of the implementation from it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question