A
A
a16a2017-04-12 11:21:37
C++ / C#
a16a, 2017-04-12 11:21:37

How to run another script on unity?

Hello. How can another script be run within a script? That is, so that the first script starts another one during execution.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alex Maximovich, 2017-04-12
@a16a

To download, read a thread of a book on c#. If by call a script you mean call a method of some other class of their current instance, then you need to do something like the following construction:
someObject = new SomeClass();
someObject.SomeMethod();
someObject may need to be created once. it all depends on what exactly you need to do.

S
Stanislav Silin, 2017-04-12
@byme

Read the book (watch the "video tutorials")... It will be much easier for you and us

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question