private static void PostUnregisterEffectorReactor() { if (s_effectorMap.Count > 0 || s_reactorMap.Count > 0 || s_fieldMap.Count > 0 || s_cpuSamplerMap.Count > 0 || s_gpuSamplerMap.Count > 0) { return; } s_effectorParamsList = null; s_effectorParamsBuffer.Dispose(); s_effectorParamsBuffer = null; #if UNITY_2018_1_OR_NEWER BoingWorkAsynchronous.PostUnregisterEffectorReactorCleanUp(); #endif }
private static void PostUnregisterEffectorReactor() { if (s_effectorMap.Count > 0 || s_reactorMap.Count > 0 || s_fieldMap.Count > 0 || s_cpuSamplerMap.Count > 0 || s_gpuSamplerMap.Count > 0) { return; } s_effectorParamsList = null; s_effectorParamsBuffer.Dispose(); s_effectorParamsBuffer = null; #if UNITY_2018_1_OR_NEWER BoingWorkAsynchronous.PostUnregisterEffectorReactorCleanUp(); #endif Camera.onPreCull -= UpdateReactorsPreCull; Camera.onPostRender -= UpdateReactorsPostRender; #if UNITY_2019_1_OR_NEWER RenderPipelineManager.beginFrameRendering -= UpdateReactorsPreCull; RenderPipelineManager.endFrameRendering -= UpdateReactorsPostRender; #endif }