public static z_ColorPalette AddNew()
        {
            string path = z_EditorUtility.FindFolder(z_Pref.ProductName + "/" + "Color Palettes");

            if (string.IsNullOrEmpty(path))
            {
                path = "Assets";
            }

            path = AssetDatabase.GenerateUniqueAssetPath(path + "/New Color Palette.asset");

            if (!string.IsNullOrEmpty(path))
            {
                z_ColorPalette palette = ScriptableObject.CreateInstance <z_ColorPalette>();
                palette.SetDefaultValues();

                AssetDatabase.CreateAsset(palette, path);
                AssetDatabase.Refresh();

                EditorGUIUtility.PingObject(palette);

                return(palette);
            }

            return(null);
        }
Пример #2
0
 private void SetColorPalette(z_ColorPalette palette)
 {
     colorPalette = palette;
     RefreshAvailablePalettes();
 }
Пример #3
0
		private void SetColorPalette(z_ColorPalette palette)
		{
			colorPalette = palette;
			RefreshAvailablePalettes();
		}
Пример #4
0
 public void CopyTo(z_ColorPalette target)
 {
     target.colors = new List <Color>(colors);
 }
Пример #5
0
		public void CopyTo(z_ColorPalette target)
		{
			target.colors = new List<Color>(colors);
		}