Exemple #1
0
        /// <summary>
        /// Updates only the materials preview. Only performs update if
        /// <c>Settings.DisplayPreview</c> is true
        /// </summary>
        public void TriggerMaterialsUpdate()
        {
            if (Settings.DisplayPreview)
            {
                //Remove old splats
                Splats = null;
                Paint  = null;

                if (Settings.GetComponent <MeshRenderer>() != null)
                {
                    Object.DestroyImmediate(Settings.GetComponent <MeshRenderer>());
                }

                AddMaterialComponent();
            }
        }