mirror of
https://github.com/maxartz15/MA_TextureAtlasser.git
synced 2024-11-12 16:45:29 +01:00
Updated & tested with Unity 2019.1.8f1
Minor changes.
This commit is contained in:
parent
78e4fb0ad1
commit
1251736f5b
@ -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;
|
||||
|
@ -1,5 +1,4 @@
|
||||
//Maxartz15
|
||||
//Version 1.0
|
||||
//https://github.com/maxartz15/MA_EditorUtils
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using System.Collections;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// Some base converters and texture settings setters.
|
||||
/// </summary>
|
||||
|
||||
public static Texture ConvertToReadableTexture(Texture texture)
|
||||
{
|
||||
if (texture == null)
|
||||
|
Loading…
Reference in New Issue
Block a user