// *********************************************************************** // Assembly : Game // Author : Kimch // Created : 2021-04-17 // Description : // Last Modified By : // Last Modified On : // *********************************************************************** // // // *********************************************************************** using System.Collections; using System.Collections.Generic; using UnityEngine; namespace G { /// /// 类功能描述 /// public class EffectRoot : MonoBehaviour { #region Field RenderTexture _renderTexture; #endregion #region Method public RenderTexture GetTexture() { return _renderTexture; } #endregion #region Unity public static EffectRoot Instance; // Use this for initialization private void Awake() { Instance = this; DontDestroyOnLoad(this.gameObject); transform.position = Vector3.one * -1000f; var camera = GetComponentInChildren(); _renderTexture = RenderTexture.GetTemporary(512, 512); camera.targetTexture = _renderTexture; } #endregion } }