/// <summary> /// Dispose GPU resources. /// </summary> /// <remarks> /// This has to be called before the application exits. /// Otherwise, UnityEditor can freeze. /// </remarks> public static void Shutdown() { if (GpuResources != null) { GpuResources.Dispose(); GpuResources = null; } if (GlCalculatorHelper != null) { GlCalculatorHelper.Dispose(); GlCalculatorHelper = null; } IsInitialized = false; }