Save prefab and load it with parent

Discussion and help for Easy Save 3
Post Reply
HairlessGorilla
Posts: 5
Joined: Sun May 29, 2022 10:40 am

Save prefab and load it with parent

Post by HairlessGorilla »

How would I make a saved prefab load into the scene as a child of the same parent that it got saved in? I'm trying to load UI prefabs but I can't properly do this as it isn't a child of the canvas when it is loaded in.

Thanks
User avatar
Joel
Moodkie Staff
Posts: 4849
Joined: Wed Nov 07, 2012 10:32 pm

Re: Save prefab and load it with parent

Post by Joel »

Hi there,

By default the parent/child relationship is defined by the Transform's 'parent' variable, so you need to ensure that this is saved along with the data and that it's possible to save a reference to the parent.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply