diff options
author | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
commit | 15740faf9fe9fe4be08965098bbf2947e096aeeb (patch) | |
tree | a730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/Export/ClassLibraryInitializer.cs |
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 |