// -------------------------------------------------------------------------------------------------------------------- // // Copyright (c) VRMADA, All rights reserved. // // -------------------------------------------------------------------------------------------------------------------- using UltimateXR.Core.Components.Composite; using UnityEngine; namespace UltimateXR.CameraUtils { /// /// Component added to a camera, enabling camera depth texture mode . Depth texture mode is /// required for soft particles. /// public class UxrCameraDepthEnable : UxrAvatarComponent { #region Inspector Properties/Serialized Fields [SerializeField] private DepthTextureMode _depthTextureMode = DepthTextureMode.Depth; #endregion #region Unity /// /// Called at startup. Sets up the camera with the given parameter. /// protected override void Awake() { base.Awake(); if (Avatar.CameraComponent) { Avatar.CameraComponent.depthTextureMode = _depthTextureMode; } } #endregion } }