Model groups.

Added model group support, you can now have multiple meshes in one export.
Removed OBJ and mesh replace export options.
Mesh replace didn't work, might get added again in the feature.
OBJ needs to be rewritten as well to support the multiple meshes, and Unity now has model export options in engine.
Version 1.8.0+ is now only supports Unity2018.3+.
This commit is contained in:
max
2020-04-20 22:30:08 +02:00
parent 3532465e69
commit 8ff2db7e87
20 changed files with 469 additions and 453 deletions

View File

@ -0,0 +1,15 @@
#if UNITY_EDITOR
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace MA_TextureAtlasserPro
{
[System.Serializable]
public class MA_ModelGroup
{
public string name = "Model";
public List<Mesh> meshes = new List<Mesh>();
}
}
#endif

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1f74ddc7d8c9c30429ec163b4fc801c4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -15,7 +15,7 @@ namespace MA_TextureAtlasserPro
public List<MA_TextureAtlasserProQuad> textureQuads;
public MA_TextureAtlasserProQuad selectedTextureQuad;
private Rect editorWorkRect;
public bool showTextures = false;
public bool showTextures = true;
public MA_TextureAtlasserProExportSettings exportSettings;
//Data

View File

@ -50,9 +50,7 @@ namespace MA_TextureAtlasserPro
public enum ModelFormat
{
None,
UnityMeshPrefab,
ReplaceMesh,
Obj
UnityMeshPrefab
}
public enum TextureFormat

View File

@ -11,22 +11,28 @@ namespace MA_TextureAtlasserPro
public class MA_TextureAtlasserProQuad : ScriptableObject
{
//Editor
public bool isSelected = false; //Is this thing selected
public Rect rect; //The internal rect
public Rect guiRect; //The visual clamped and snapped rect
public bool debugMode = false; //Are we debugging, for showing some other things (like handles)
[HideInInspector]
public bool isSelected = false; //Is this thing selected
public Rect rect; //The internal rect
[HideInInspector]
public Rect guiRect; //The visual clamped and snapped rect
[HideInInspector]
public bool debugMode = false; //Are we debugging, for showing some other things (like handles)
private bool isDragging = false; //Are we editing the pos or size
private bool isDragging = false; //Are we editing the pos or size
private bool isDraggingRectHeigt = false;
[HideInInspector]
public Rect dragRectHeight;
private bool isDraggingRectWidth = false;
[HideInInspector]
public Rect dragRectWidth;
private bool isDraggingRectPos = false;
[HideInInspector]
public Rect dragRectPos;
//Data
public List<MA_TextureGroup> textureGroups;
public List<Mesh> meshes;
public List<MA_ModelGroup> modelGroups;
public void UpdateTextureQuad(Event e, Rect editorViewRect, Rect editorWorkRect, Vector2 zoomCoordsOrigin, bool useEvents, bool showTexture)
{

View File

@ -23,7 +23,6 @@ namespace MA_TextureAtlasserPro
public KeyCode zoomOutHotKey = KeyCode.Minus;
[Header("Duplication:")]
public bool copySelectedQuadData = true;
public string duplicatedQuadNamePrefix = "new ";
[Header("Selection")]