16 lines
380 B
C#
16 lines
380 B
C#
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
public class AtlasImporter : AssetPostprocessor
|
|
{
|
|
void OnPreprocessAsset()
|
|
{
|
|
if (assetPath.EndsWith(".atlas"))
|
|
{
|
|
var text = System.IO.File.ReadAllText(assetPath);
|
|
var textAsset = new TextAsset(text);
|
|
AssetDatabase.CreateAsset(textAsset, assetPath + ".asset");
|
|
}
|
|
}
|
|
}
|