K
K
Kvaskin2019-04-22 14:43:20
Unity
Kvaskin, 2019-04-22 14:43:20

How to save a prefab with links to scripts?

Hello!
The task is to instantiate an object with a huge number of public links to scripts. I can’t understand why when creating a prefab, links to scripts in the scene are lost? Is it possible to save them somehow, or is the only option to restore them all through the getcomponent?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Gaydak, 2019-04-22
@MrMureno

prefab = blank / drawing / sketch of an object
it CANNOT!! have links only within themselves and global from resources and the like.
if you need to save - save links in the scene (for example, some component to an object in the scene ala SceneRefs).
Or do not instantiate - but store the object immediately on the stage.
but the main thing in the answer is to understand that it won’t work to save what you want, not for that the prefabs were made) (how are you with links and other things (not links inside yourself) - will you use it outside of this scene here ?? or if the scene changes ))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question