Beispiel #1
0
        /// <summary>
        /// Rebuilds the mesh with the current settings
        /// <summary>
        public void BuildMesh()
        {
            if (_mesh == null)
            {
                _mesh = new Mesh();
            }

            ParentRenderer.GetMeshLattice(ref _mesh);
        }
Beispiel #2
0
        public void OnValidate()
        {
            #if UNITY_EDITOR
            if (this.Shader == null)
            {
                this.Shader = Shader.Find(DefaultShaderString());
            }
            #endif

            ParentRenderer.SetMaterialDirty();
        }
Beispiel #3
0
        protected void Init()
        {
            #if UNITY_EDITOR
            if (this.Shader == null)
            {
                this.Shader = Shader.Find(DefaultShaderString());
            }
            #endif

            _geometryDirty = true;
            ParentRenderer.SetLayersDirty();
            ParentRenderer.Draw();
        }
Beispiel #4
0
 void OnDestroy()
 {
     ParentRenderer.SetLayersDirty();
 }