示例#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());
 }
 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;
 }