- Home /
Unity Serializer Scene Only?
Hey guys, I'm using whydoidoit's Unity Serializer. I'm trying to save only placed (instantiated) objects in the scene. I have them all set as prefab identifiers. The problem is that when I load the level, the entire scene is opened (including objects not set up in the wizard). I don't want cameras remade or anything like that, just the objects in the scene that were instantiated. I dunno what to do!
Thanks!
Answer by whydoidoit · Aug 29, 2012 at 01:56 AM
When it reloads the level it has to reload the base state - so it goes back to the scene and loads that from the project first - then it instantiates anything that was saved that wasn't in the scene. It has to go through that initial load to get everything back the way it should be. What problem is it causing?
Well, my game has a level editor and I am using your serializer to upload the data. I want users to be able to download a level and play it, but not edit it. When you upload the level, you are in the level editor. I created a new scene and recall the level through the serializer, but it makes an identical scene to the editor, making it so that you can edit it. I just want the files to be instantiated and then play it, not the level editor to come back up.
I'm willing to send project files to you if it will help you understand what my goal is, just let me know!
Thanks.
I'll add a thing that stops the level load and presumes that you are setup and ready - give me a day and I'll push it out. If that doesn't work then I'll happily look at the project.
Awesome! I'll continue working with GUI and getting everything set up. Thanks a lot, I appreciate it!
Hey! I know this is a pretty old question, but i need it...
How do i do "the thing that stops the level load and presumes that you are setup and ready" when I load a level using LevelSerializer.LoadSavedLevelFromServer(); ?