2025-11-05 17:34:40 +08:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using Unity.Mathematics;
|
|
|
|
|
using UnityEditor;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.Rendering;
|
|
|
|
|
|
|
|
|
|
namespace TexturePacker
|
|
|
|
|
{
|
|
|
|
|
public sealed class TextureMapInfo : ScriptableObject
|
|
|
|
|
{
|
|
|
|
|
public const string TextureMapDir = "Assets/Editor/TexturePack/Resources";
|
|
|
|
|
|
|
|
|
|
[Serializable]
|
|
|
|
|
public struct TextureInfo
|
|
|
|
|
{
|
|
|
|
|
public Texture2D OriginTexture;
|
|
|
|
|
public int ArrayIndex;
|
|
|
|
|
public float2 Offset;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Serializable]
|
|
|
|
|
public enum EPackType
|
|
|
|
|
{
|
|
|
|
|
Atlas,
|
|
|
|
|
Array
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public EPackType PackType = EPackType.Atlas;
|
|
|
|
|
public SerializedDictionary<Texture2D, TextureInfo> OriginTexture2TextureInfo = new();
|
|
|
|
|
public List<Texture2D> Textures;
|
2025-11-11 15:19:01 +08:00
|
|
|
public List<UnityEngine.Object> Fbxs;
|
2025-11-05 17:34:40 +08:00
|
|
|
public Texture2D TextureAtlas;
|
|
|
|
|
public float AtlasScale;
|
|
|
|
|
public string TextureAtlasPath;
|
|
|
|
|
public Texture2DArray TextureArray;
|
|
|
|
|
public string TextureArrayPath;
|
|
|
|
|
public bool IsNormalMap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|