diff options
Diffstat (limited to 'Runtime/Export/ClassLibraryInitializer.cs')
-rw-r--r-- | Runtime/Export/ClassLibraryInitializer.cs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Runtime/Export/ClassLibraryInitializer.cs b/Runtime/Export/ClassLibraryInitializer.cs new file mode 100644 index 0000000..d561399 --- /dev/null +++ b/Runtime/Export/ClassLibraryInitializer.cs @@ -0,0 +1,17 @@ +namespace UnityEngine +{ + internal static class ClassLibraryInitializer + { + static void Init() + { +#if !UNITY_FLASH && !UNITY_WEBGL && !UNITY_WINRT + UnityLogWriter.Init(); +#endif + +#if UNITY_STANDALONE || (WEBPLUG && !UNITY_NACL) + if (Application.platform.ToString().Contains("WebPlayer")) + System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.DefaultSurrogateSelector = new UnityEngine.Serialization.UnitySurrogateSelector(); +#endif + } + } +}
\ No newline at end of file |