Beispiel #1
0
        private static void OpenWindow()
        {
            ProductIcons asset = AssetDatabase.LoadAssetAtPath <ProductIcons>(ProductIcons.FUUL_PATH);

            if (asset == null)
            {
                asset = ProductIcons.CreateInstance <ProductIcons>();
                AssetDatabase.CreateAsset(asset, ProductIcons.FUUL_PATH);
                AssetDatabase.SaveAssets();
            }

            EditorUtility.FocusProjectWindow();
            Selection.activeObject = asset;
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            ValidateArguments(args);

            using (Image srcImage = Image.FromFile(args[0]))
            {
                List <ProductIcon> icons = ProductIcons.GetProducstIconList();
                foreach (ProductIcon icon in icons)
                {
                    string outputFile = Path.Combine(args[1], icon.Name);
                    ResizeImage(srcImage, outputFile, icon.Width, icon.Height);
                }
            }

            Console.ReadKey();
        }