I started to make a game in unity 3, but I had to migrate it to unity 4, the problem is that now I need to get it back to unity 3, but I have done a lot of work since I migrated the project, and although I can import almost every asset (like models and textures), I can’t import my prefabs and scenes, and that’s quite a lot of stuff.
So, I was thinking about making an editor script to save every object in my scenes, with it’s properties, in a xml file, and read it in unity 3 to build up everything back. My question is: how can I get every single gameObject in my scene, and it’s atributes, to a list?
Thanks for the help, I’m using C# btw.
If you want to do that, you can use FindObjectsOfType()
If you want to have them be nested, you could then filter that down to the ones where transform.parent is null, and then iterate over their children.
However, saving a scene already does this. Like, exactly this. Have you considered switching to “text mode” for your assets, and using that scene file? (Editor Preferences, Asset Serialization → Force Text)
StarManta, I did what you said, then I created a package and tried to import in a unity 3 project, but at some point I got an fatal error and unity stops working… So I tried to manually add the folders to my project, same result.
exiguous, I tried that way too, same result as with StarManta suggestion… 