Unity Serialization Support

Pablo Daniel González
senzil
Published in
2 min readJun 3, 2011

--

I have been interested in Unity serialization support for a long time, this first approach has worked very well.

Until the release of Unity 2.0, it was already added the proposal of unity realization support to the issue tracker

Several people asked me which were the possible solutions that I considered would work and I had two on my mind. First, the Unity source code could be changed and a branch could be realized. Second, some kind of wrapper or decorator could be performed.

Then I asked myself: Unity could be use for this purpose, couldn’t it?

Today I’m proposing a library of interceptors which are intercepted. Their behaviors replicate nearly all the logic of interceptors and, moreover, they provide the logic to perform a Proxy Serializable.

As I have mentioned in the beginning, this is the first approach and its logic is similar to most AOP Frameworks. The proxy can be serialized by Binary and Soap Formaters. The logic RoadMap should provide support for XMLSerializer and XmlObjectSerializer.

There also exists an issue which contains CLR’s versions, dynamic assemblies and JIT compiler, I strongly recommend you to use the interceptors which were built up over the same CLR’s version of project

Finally, I hope you can take advantage of this library and also improve it if you want, this is the reason why I ask you to tell me if you find mistakes.

Warning: The implementation use reflection to read private fields, so a new version of Unity could break this.

Update: 21/11/2013 We removed the old sources

Unity Serialization Support por Pablo González se distribuye bajo una Licencia Creative Commons Atribución-CompartirIgual 4.0 Internacional.

--

--

Pablo Daniel González
senzil

Father, writer, musician. IT architect just for pleasure