Example #1
0
        public static void DrawPublishSettingsPreferences()
        {
            EditorGUILayout.LabelField("Publish settings", EditorStyles.boldLabel);
            EditorPrefs.SetString(TexturePackerPublishing.TexturePackerPath, EditorGUILayout.TextField(TexturePackerPublishing.TexturePackerPath,
                                                                                                       EditorPrefs.GetString(TexturePackerPublishing.TexturePackerPath)));
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.LabelField(TexturePackerPublishing.DestinationTexturePath, GUILayout.Width(150));
            EditorGUILayout.LabelField("Assets", GUILayout.Width(50));
            EditorPrefs.SetString(TexturePackerPublishing.DestinationTexturePath, EditorGUILayout.TextField(EditorPrefs.GetString(TexturePackerPublishing.DestinationTexturePath)));
            EditorGUILayout.EndHorizontal();
            EditorGUILayout.BeginHorizontal();
            EditorGUILayout.LabelField(TexturePackerPublishing.DestinationDataPath, GUILayout.Width(150));
            EditorGUILayout.LabelField("Assets", GUILayout.Width(50));
            EditorPrefs.SetString(TexturePackerPublishing.DestinationDataPath, EditorGUILayout.TextField(EditorPrefs.GetString(TexturePackerPublishing.DestinationDataPath)));
            EditorGUILayout.EndHorizontal();
            EditorPrefs.SetString(TexturePackerPublishing.SourceFolder, EditorGUILayout.TextField(TexturePackerPublishing.SourceFolder,
                                                                                                  EditorPrefs.GetString(TexturePackerPublishing.SourceFolder)));
            EditorPrefs.SetInt(TexturePackerPublishing.ShapePadding, EditorGUILayout.IntField(TexturePackerPublishing.ShapePadding,
                                                                                              EditorPrefs.GetInt(TexturePackerPublishing.ShapePadding)));
            EditorPrefs.SetInt(TexturePackerPublishing.Extrude, EditorGUILayout.IntField(TexturePackerPublishing.Extrude,
                                                                                         EditorPrefs.GetInt(TexturePackerPublishing.Extrude)));

            if (GUILayout.Button("Publish"))
            {
                TexturePackerPublishing.Publish();
            }
        }
 private void DrawHeaderInspector()
 {
     EditorGUILayout.LabelField("Texture transformation", EditorStyles.boldLabel);
     EditorGUILayout.BeginHorizontal();
     if (GUILayout.Button("Refresh", EditorStyles.miniButtonLeft))
     {
         InitTextureDescriptions();
         InitTextureRepositories();
     }
     if (GUILayout.Button("Publish", EditorStyles.miniButtonRight, GUILayout.Width(100)))
     {
         _argsOutput = TexturePackerPublishing.Publish();
     }
     EditorGUILayout.EndHorizontal();
 }
 private void Publish(PublishDescription publishDescription)
 {
     _argsOutput = TexturePackerPublishing.Publish(publishDescription);
 }