// Token: 0x060001DF RID: 479 RVA: 0x0001AFF0 File Offset: 0x000191F0 private void OnDestroy() { if (GlobalProjectorManager.Exists()) { GlobalProjectorManager.Get().RemoveProjector(this); } }
void AddShadowTrigger() { if (GlobalProjectorManager.Exists()) { GlobalProjectorManager.Get().AddShadowTrigger(this); } }
void RemoveShadowTrigger() { if (GlobalProjectorManager.Exists()) { GlobalProjectorManager.Get().RemoveShadowTrigger(this); } }
// Token: 0x060001F6 RID: 502 RVA: 0x0001B5D0 File Offset: 0x000197D0 private void RemoveReceiver() { if (GlobalProjectorManager.Exists() && this._meshFilter != null) { GlobalProjectorManager.Get().RemoveReceiver(this); } }
// Token: 0x060001F5 RID: 501 RVA: 0x0001B5B0 File Offset: 0x000197B0 private void AddReceiver() { if (this._meshFilter != null) { GlobalProjectorManager.Get().AddReceiver(this); } }
void OnGUI() { if (GUI.Button(new Rect(Screen.width - 140, 50, 130, 40), "Toggle Shadows")) { GlobalProjectorManager.Get().ShadowsOn = !GlobalProjectorManager.Get().ShadowsOn; } }
// This is just for sample scene, when creating your own scene & terrain this will be done automatically void Awake() { #if UNITY_5_0 || UNITY_5_1 duplicateTerrain.materialType = Terrain.MaterialType.Custom; #endif duplicateTerrain.materialTemplate = terrainMat; duplicateTerrain.materialTemplate.SetTexture("_ShadowTex", GlobalProjectorManager.Get().GetShadowTexture()); }
// This is just for sample scene, when creating your own scene & terrain this will be done automatically void Awake() { #if UNITY_5_1 || UNITY_5_2 || UNITY_5_3 || UNITY_5_4 || UNITY_5_5 || UNITY_5_6 || UNITY_5_7 || UNITY_2017 || UNITY_2018 || UNITY_2019 || UNITY_2020 duplicateTerrain.materialType = Terrain.MaterialType.Custom; #endif duplicateTerrain.materialTemplate = terrainMat; duplicateTerrain.materialTemplate.SetTexture("_ShadowTex", GlobalProjectorManager.Get().GetShadowTexture()); }
void AddReceiver() { if (_meshFilter != null || _terrain != null) { if (IsTerrain()) { _terrain.enabled = true; } GlobalProjectorManager.Get().AddReceiver(this); } }
void OnDisable() { if (GlobalProjectorManager.Exists()) { GlobalProjectorManager.Get().RemoveProjector(this); if (_ShadowDummy != null) { _Renderer.enabled = false; } } }
void RemoveReceiver() { if (GlobalProjectorManager.Exists()) { if (_meshFilter != null || _terrain != null) { if (IsTerrain()) { _terrain.enabled = false; } GlobalProjectorManager.Get().RemoveReceiver(this); } } }
// Token: 0x060001DD RID: 477 RVA: 0x0001AFC8 File Offset: 0x000191C8 private void OnEnable() { GlobalProjectorManager.Get().AddProjector(this); }
// Token: 0x060001DC RID: 476 RVA: 0x0001AFB8 File Offset: 0x000191B8 private void Start() { GlobalProjectorManager.Get().AddProjector(this); }
void OnEnable() { GlobalProjectorManager.Get().AddProjector(this); _Renderer.enabled = true; }