//---------------------------------------------------------------------------- void LateUpdate() { if (g_LastFrameCount != Time.frameCount) { if (!PKFxSettings.SplitUpdateInComponents) { PKFxManager.UpdateParticles(); } g_LastFrameCount = Time.frameCount; if (_updated) { _updated = false; _Render(); } } PKFxSoundManager.DeleteSoundsIFN(); }
void Awake() { PKFxManager.StartupPopcorn(true); m_CameraID = GetUniqueID; m_CurrentCameraID = m_CameraID; #if !UNITY_SWITCH && !UNITY_XBOXONE if (Application.platform != RuntimePlatform.IPhonePlayer && UnityEngine.XR.XRSettings.enabled && UnityEngine.XR.XRDevice.isPresent) { m_VRReservedID = GetUniqueID; } #endif m_Camera = GetComponent <Camera>(); // We disable the rendering of the distortion objects, this is going to be handled in a command buffer: m_Camera.cullingMask &= ~(1 << PKFxManagerImpl.m_DistortionLayer); //Enable depth texture on mobile if (PKFxSettings.EnableSoftParticles) { m_Camera.depthTextureMode = DepthTextureMode.Depth; } PKFxSoundManager.ClearSounds(); }