G
G
GoldeNKingMiDaS2021-12-06 11:54:41
C++ / C#
GoldeNKingMiDaS, 2021-12-06 11:54:41

How to search for sprites on the stage in a script?

In general, here is the question. It is possible to search for objects on the stage via GameObject.Find(). But I'm working with a SpriteRenderer and it needs to specify a sprite. Can I somehow find the desired sprite on the stage and insert it into the SpriteRenderer inside the script itself, by analogy with finding an object? I'm just getting started with Unity and the language in general. Internet searches turned up nothing. I searched all last night in English, in Russian, nothing like that.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question