N
N
NeoLight32020-07-21 14:42:06
Unity
NeoLight3, 2020-07-21 14:42:06

How to load your .prefab file into Unity resources.assets in C#?

There is a .prefab file.
How can I load this prefab into Unity's resources.assets resource file in a C# script?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
freeExec, 2020-07-21
@NeoLight3

Resources are generated by Unity itself, so none.

G
Glawrou, 2022-03-30
@Glawrou

If I understand the question correctly. That is such a way.
https://docs.unity3d.com/ru/530/ScriptReference/Re... First create a Resources
folder and put prefab in it

var prefab = Resources.Load<GameObject>("namePrefab");

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question