Exemplo n.º 1
0
        public void SetMaterial(Material mat)
        {
            _renderDepthMaterial = mat;
            var rend = GetComponent <Renderer>();

            LodDataSeaFloorDepth.RemoveRenderOceanDepth(rend);
            LodDataSeaFloorDepth.AddRenderOceanDepth(rend, _renderDepthMaterial);
        }
Exemplo n.º 2
0
 private void OnDisable()
 {
     LodDataSeaFloorDepth.RemoveRenderOceanDepth(GetComponent <Renderer>());
 }
Exemplo n.º 3
0
        private void OnEnable()
        {
            var mat = _renderDepthMaterial != null ? _renderDepthMaterial : new Material(Shader.Find("Ocean/Ocean Depth"));

            LodDataSeaFloorDepth.AddRenderOceanDepth(GetComponent <Renderer>(), mat);
        }