I have been working on an experiment to create a markup language (or XML schema) for unity assets and so far I have a partially working example of it in the attached below. The example basically encodes and decodes AML for mesh assets in unity. It would be nice if I could get feedback on cleanup (there probably is much to say about that), performance, or any other constructive feedback.
Explanation of files:
AMLAttribute.cs - struct for holding metadata, nothing much else
AMLMeshEncoder.cs - meat of example which has the methods Encode() and Decode() to convert meshes to and from AML
AMLExample.cs - a tiny script that implements both Encode() and Decode(); attach it to a gameObject and it will encode it to a file which will likely be at C:\AMLExample.xml unless a firewall blocks it and then it will read the AML file and create a gameObject with an identical (save for the materials and textures) reconstructed mesh of the original gameObject.
I don’t mind if anyone happens to mess around with it afterwards in whole or part since I’m fairly pro-open source.
1629390–100221–$AMLMeshEncoder.cs (34.2 KB)
1629390–100222–$AMLAttribute.cs (174 Bytes)
1629390–100223–$AMLExample.cs (563 Bytes)