From 1251736f5b361b798c73eac5dfac0962f78ec03e Mon Sep 17 00:00:00 2001 From: max Date: Wed, 3 Jul 2019 00:02:40 +0200 Subject: [PATCH] Updated & tested with Unity 2019.1.8f1 Minor changes. --- .../Data/MA_TextureAtlasserProSettings.cs | 2 +- .../EditorUtils/MA_EditorGridUtils.cs | 3 +-- .../EditorUtils/MA_EditorRectUtils.cs | 6 ++++-- .../EditorUtils/MA_EditorZoomUtils.cs | 6 ++++-- .../MA_Utilities/MeshUtils/MA_MeshUtils.cs | 14 +++++++------ .../TextureUtils/MA_TextureUtils.cs | 20 +++++++------------ 6 files changed, 25 insertions(+), 26 deletions(-) diff --git a/MA_ToolBox/MA_TextureAtlasserPro/Scripts/Data/MA_TextureAtlasserProSettings.cs b/MA_ToolBox/MA_TextureAtlasserPro/Scripts/Data/MA_TextureAtlasserProSettings.cs index eca954e..5ce0441 100644 --- a/MA_ToolBox/MA_TextureAtlasserPro/Scripts/Data/MA_TextureAtlasserProSettings.cs +++ b/MA_ToolBox/MA_TextureAtlasserPro/Scripts/Data/MA_TextureAtlasserProSettings.cs @@ -11,7 +11,7 @@ namespace MA_TextureAtlasserPro public class MA_TextureAtlasserProSettings : ScriptableObject { [Header("Selection")] - public bool autoFocus = true; + public bool autoFocus = false; [Header("Duplication:")] public bool copySelectedQuadData = false; diff --git a/MA_ToolBox/MA_Utilities/EditorUtils/MA_EditorGridUtils.cs b/MA_ToolBox/MA_Utilities/EditorUtils/MA_EditorGridUtils.cs index 9b68cca..a85605a 100644 --- a/MA_ToolBox/MA_Utilities/EditorUtils/MA_EditorGridUtils.cs +++ b/MA_ToolBox/MA_Utilities/EditorUtils/MA_EditorGridUtils.cs @@ -1,5 +1,4 @@ -//Maxartz15 -//Version 1.0 +//https://github.com/maxartz15/MA_EditorUtils #if UNITY_EDITOR using System.Collections; diff --git a/MA_ToolBox/MA_Utilities/EditorUtils/MA_EditorRectUtils.cs b/MA_ToolBox/MA_Utilities/EditorUtils/MA_EditorRectUtils.cs index 131747b..f8b73f7 100644 --- a/MA_ToolBox/MA_Utilities/EditorUtils/MA_EditorRectUtils.cs +++ b/MA_ToolBox/MA_Utilities/EditorUtils/MA_EditorRectUtils.cs @@ -1,5 +1,7 @@ -//Maxartz15 -//Version 1.0 +//https://github.com/maxartz15/MA_EditorUtils + +//References: +//http://martinecker.com/martincodes/unity-editor-window-zooming/ #if UNITY_EDITOR using UnityEngine; diff --git a/MA_ToolBox/MA_Utilities/EditorUtils/MA_EditorZoomUtils.cs b/MA_ToolBox/MA_Utilities/EditorUtils/MA_EditorZoomUtils.cs index b8130bf..b29916a 100644 --- a/MA_ToolBox/MA_Utilities/EditorUtils/MA_EditorZoomUtils.cs +++ b/MA_ToolBox/MA_Utilities/EditorUtils/MA_EditorZoomUtils.cs @@ -1,5 +1,7 @@ -//Maxartz15 -//Version 1.0 +//https://github.com/maxartz15/MA_EditorUtils + +//References: +//http://martinecker.com/martincodes/unity-editor-window-zooming/ #if UNITY_EDITOR using UnityEngine; diff --git a/MA_ToolBox/MA_Utilities/MeshUtils/MA_MeshUtils.cs b/MA_ToolBox/MA_Utilities/MeshUtils/MA_MeshUtils.cs index 60016c8..feffb45 100644 --- a/MA_ToolBox/MA_Utilities/MeshUtils/MA_MeshUtils.cs +++ b/MA_ToolBox/MA_Utilities/MeshUtils/MA_MeshUtils.cs @@ -1,5 +1,7 @@ -//Maxartz15 -//Version 1.0 +//https://github.com/maxartz15/MA_MeshUtils + +//References: +//http://wiki.unity3d.com/index.php?title=ObjExporter #if UNITY_EDITOR using System; @@ -90,15 +92,15 @@ namespace MA_Mesh { if(flipY) { - Debug.Log("01" + uvs[i].x); + //Debug.Log("01" + uvs[i].x); uvs[i] = new Vector2((uvs[i].x / atlasSize.x * textureRect.width) + (1 / atlasSize.x * textureRect.x), (uvs[i].y / atlasSize.y * textureRect.height) + (1 / atlasSize.y * (atlasSize.y - textureRect.height - textureRect.y))); - Debug.Log("02" + uvs[i].x); + //Debug.Log("02" + uvs[i].x); } else { - Debug.Log("01" + uvs[i].x); + //Debug.Log("01" + uvs[i].x); uvs[i] = new Vector2((uvs[i].x / atlasSize.x * textureRect.width) + (1 / atlasSize.x * textureRect.x), (uvs[i].y / atlasSize.y * textureRect.height) + (1 / atlasSize.y * textureRect.y)); - Debug.Log("02" + uvs[i].x); + //Debug.Log("02" + uvs[i].x); } } diff --git a/MA_ToolBox/MA_Utilities/TextureUtils/MA_TextureUtils.cs b/MA_ToolBox/MA_Utilities/TextureUtils/MA_TextureUtils.cs index 41f2781..3ed79c7 100644 --- a/MA_ToolBox/MA_Utilities/TextureUtils/MA_TextureUtils.cs +++ b/MA_ToolBox/MA_Utilities/TextureUtils/MA_TextureUtils.cs @@ -1,7 +1,10 @@ -//Maxartz15 -//Version 1.0 -//Part of MA_TextureUtils -//https://github.com/maxartz15/MA_TextureUtils +//https://github.com/maxartz15/MA_TextureUtils + +//References: +//http://www.gamasutra.com/blogs/JoshSutphin/20131007/201829/Adding_to_Unitys_BuiltIn_Classes_Using_Extension_Methods.php +//https://forum.unity3d.com/threads/contribution-texture2d-blur-in-c.185694/ +//http://orbcreation.com/orbcreation/page.orb?1180 +//https://support.unity3d.com/hc/en-us/articles/206486626-How-can-I-get-pixels-from-unreadable-textures- #if UNITY_EDITOR using UnityEngine; @@ -10,19 +13,10 @@ using System.IO; using System.Collections; using System.Collections.Generic; -//http://www.gamasutra.com/blogs/JoshSutphin/20131007/201829/Adding_to_Unitys_BuiltIn_Classes_Using_Extension_Methods.php -//https://forum.unity3d.com/threads/contribution-texture2d-blur-in-c.185694/ -//http://orbcreation.com/orbcreation/page.orb?1180 -//https://support.unity3d.com/hc/en-us/articles/206486626-How-can-I-get-pixels-from-unreadable-textures- - namespace MA_Texture { public static class MA_TextureUtils { - /// - /// Some base converters and texture settings setters. - /// - public static Texture ConvertToReadableTexture(Texture texture) { if (texture == null)