diff options
| author | Egor <egor.yusov@gmail.com> | 2018-02-20 05:38:48 +0000 |
|---|---|---|
| committer | Egor <egor.yusov@gmail.com> | 2018-02-20 05:38:48 +0000 |
| commit | c44da0f15cbc3ddef49294d727c6d3a4e7431257 (patch) | |
| tree | 862b059f6c111376c3fa46ea925b38ab9d1365e6 /unityplugin/GhostCubePlugin/PluginSource | |
| parent | Updated core submodule (diff) | |
| download | DiligentEngine-c44da0f15cbc3ddef49294d727c6d3a4e7431257.tar.gz DiligentEngine-c44da0f15cbc3ddef49294d727c6d3a4e7431257.zip | |
Fixed crash in Unity emulator on Android when changing device orientation
Diffstat (limited to 'unityplugin/GhostCubePlugin/PluginSource')
| -rw-r--r-- | unityplugin/GhostCubePlugin/PluginSource/src/RenderingPlugin.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/unityplugin/GhostCubePlugin/PluginSource/src/RenderingPlugin.cpp b/unityplugin/GhostCubePlugin/PluginSource/src/RenderingPlugin.cpp index 878c28e..7b71f16 100644 --- a/unityplugin/GhostCubePlugin/PluginSource/src/RenderingPlugin.cpp +++ b/unityplugin/GhostCubePlugin/PluginSource/src/RenderingPlugin.cpp @@ -72,6 +72,8 @@ extern "C" void UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API UnityPluginLoad(IUnit extern "C" void UNITY_INTERFACE_EXPORT UNITY_INTERFACE_API UnityPluginUnload() { s_Graphics->UnregisterDeviceEventCallback(OnGraphicsDeviceEvent); + s_Graphics = nullptr; + s_UnityInterfaces = nullptr; } #if UNITY_WEBGL @@ -164,6 +166,8 @@ static void UNITY_INTERFACE_API OnGraphicsDeviceEvent(UnityGfxDeviceEventType ev s_CurrentAPI.reset(); } s_DeviceType = kUnityGfxRendererNull; + g_RenderTargetHandle = nullptr; + g_DepthBufferHandle = nullptr; } else if (s_CurrentAPI) { |
