void Awake() { Ins = this; this._projector = GetComponent <Projector>(); RenderTexture texture = new RenderTexture((int)this.Size.x, (int)this.Size.y, 0, this.Format); this.shadowRendererCamera = GetComponent <Camera>(); // this.shadowRendererCamera.enabled = false; this.shadowRendererCamera.targetTexture = texture; this.Material.mainTexture = texture; this._projector.material = this.Material; }
void OnDestroy() { Ins = null; }