Пример #1
0
 // Token: 0x060001DF RID: 479 RVA: 0x0001AFF0 File Offset: 0x000191F0
 private void OnDestroy()
 {
     if (GlobalProjectorManager.Exists())
     {
         GlobalProjectorManager.Get().RemoveProjector(this);
     }
 }
Пример #2
0
 void AddShadowTrigger()
 {
     if (GlobalProjectorManager.Exists())
     {
         GlobalProjectorManager.Get().AddShadowTrigger(this);
     }
 }
Пример #3
0
 void RemoveShadowTrigger()
 {
     if (GlobalProjectorManager.Exists())
     {
         GlobalProjectorManager.Get().RemoveShadowTrigger(this);
     }
 }
Пример #4
0
 // Token: 0x060001F6 RID: 502 RVA: 0x0001B5D0 File Offset: 0x000197D0
 private void RemoveReceiver()
 {
     if (GlobalProjectorManager.Exists() && this._meshFilter != null)
     {
         GlobalProjectorManager.Get().RemoveReceiver(this);
     }
 }
Пример #5
0
 // Token: 0x060001F5 RID: 501 RVA: 0x0001B5B0 File Offset: 0x000197B0
 private void AddReceiver()
 {
     if (this._meshFilter != null)
     {
         GlobalProjectorManager.Get().AddReceiver(this);
     }
 }
Пример #6
0
 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());
 }
Пример #8
0
 // 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());
 }
Пример #9
0
 void AddReceiver()
 {
     if (_meshFilter != null || _terrain != null)
     {
         if (IsTerrain())
         {
             _terrain.enabled = true;
         }
         GlobalProjectorManager.Get().AddReceiver(this);
     }
 }
Пример #10
0
 void OnDisable()
 {
     if (GlobalProjectorManager.Exists())
     {
         GlobalProjectorManager.Get().RemoveProjector(this);
         if (_ShadowDummy != null)
         {
             _Renderer.enabled = false;
         }
     }
 }
Пример #11
0
 void RemoveReceiver()
 {
     if (GlobalProjectorManager.Exists())
     {
         if (_meshFilter != null || _terrain != null)
         {
             if (IsTerrain())
             {
                 _terrain.enabled = false;
             }
             GlobalProjectorManager.Get().RemoveReceiver(this);
         }
     }
 }
Пример #12
0
 // Token: 0x060001DD RID: 477 RVA: 0x0001AFC8 File Offset: 0x000191C8
 private void OnEnable()
 {
     GlobalProjectorManager.Get().AddProjector(this);
 }
Пример #13
0
 // Token: 0x060001DC RID: 476 RVA: 0x0001AFB8 File Offset: 0x000191B8
 private void Start()
 {
     GlobalProjectorManager.Get().AddProjector(this);
 }
Пример #14
0
 void OnEnable()
 {
     GlobalProjectorManager.Get().AddProjector(this);
     _Renderer.enabled = true;
 }