- Home /
How to re-serialize assets so they are stored as text?
In our Unity projects we set the Assets Serialization mode to Force Text so it plays well with our SVC.
From time to time an artists can generate an Unity package that contains assets and prefabs, so is easier for the rest of the team to share.
If that package is generated inside a project where the Asset Serialization Mode is not set to Force Text, the prefabs are stored as binary. So far so good.
The problem is that when we import the package into the project with Force Text enabled, those imported prefabs are not reserialized as text, and remain serialized in the binary format.
The only way to make the prefaba to reserialize in text format is, either to delete its meta file (bad idea), or to modify the prefab and then save it.
Reimporting the prefab does not work.
Does anyone encountered this problem and has a solution? Is there any way to force an asset to reserialize, even if it is using a script?
When I had to re-serialize assets to text, it worked straight away. Can you try it in an empty project with just some prefabs, to see how it works there for you?
The problem only happens when importing from a unitypackage. $$anonymous$$oving the assets to the Unity Assets folder works fine.
Answer by dumaike · Nov 05, 2014 at 12:43 AM
I had this exact same problem. I found out that, after importing a package, you switch your project to "Force Binary" and then back to "Force Text" it converts all the binary assets that were imported over to text. Depending on how big your project is, this could take a while. I like to import the assets into an empty project, switch them to text, then export them again for our core project.
I'm having this issue too but sadly the "Force Binary" to "Force Text" approach doesn't seem to be working. If it helps anyone find a solution we're using Projeny to link packages of files rather than having them duplicated in each project. I suspect that's why the above isn't working for us.
How about 'Force Binary', Save Project, 'Force Text', Save Project. ?
Ah ignore me, turns out it had converted everything correctly, I was just getting confused by the git large file storage.
Your answer
Follow this Question
Related Questions
Asset Serialization - what is "Mixed" 1 Answer
Custom assets give Missing (Mono Script) 0 Answers
Assistance needed with serialization, inheritance and scriptableobject 1 Answer
How to use XML Serialization to load custom asset types 3 Answers
How Is 'fileID' Generated For Classes Inside an External DLL? 1 Answer