S
S
SkyCrusher2020-08-04 19:00:31
Unity
SkyCrusher, 2020-08-04 19:00:31

How to spawn an object while keeping the nested prefabs of this object?

The situation is this. I'm writing a level generator. In order not to write the spawn of each repeating element in the level, I created a template and spawn it with the usual Instantiate () on the stage, for subsequent customization and turning the already configured level into a prefab. But when installing, the prefab label drops from all nested objects and they become ordinary game objects, which is very bad, because when you change some object, it is necessary that all elements in the levels change too. In this regard, the question is, is there a way to spawn an object into the stage in such a way that nested objects remain prefabs?
How it spawns now
5f29850411db9568298779.png
How it needs to spawn
5f29852fa6d46520053375.png
The line of code in which the installation takes place
5f2985b6b3061324933638.png

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