Beispiel #1
0
 public static void OnPostprocessAllAssets(string[] imported, string[] deleted, string[] moved, string[] path)
 {
     if (imported.Length > 0)
     {
         if (MaterialBuffer.active != null && !MaterialBuffer.refresh)
         {
             Log.Show("[ExtendedMaterial] Asset Refreshing -- " + MaterialBuffer.active.menuPath);
             ExtendedMaterial.DestroyImmediate(MaterialBuffer.active);
         }
     }
 }
Beispiel #2
0
        public ExtendedMaterial Copy()
        {
            ExtendedMaterial copy = this.Clone();

            copy.properties = new Dictionary <string, Property>();
            copy.subShaders = new List <SubShader>();
            foreach (var item in this.properties)
            {
                copy.properties[item.Key] = item.Value.Clone();
            }
            foreach (var item in this.subShaders)
            {
                copy.subShaders.Add(item.Copy());
            }
            copy.category = this.category.Copy();
            return(copy);
        }