ResoniteImportHelper
ResoniteImportHelper copied to clipboard
lilToon焼き込みかつTTTを使っていると例外が発生して死ぬ
private void CopyTextureSetting(Texture2D fromTexture, Texture2D toTexture)
{
if(fromTexture == null || toTexture == null) return;
string fromPath = AssetDatabase.GetAssetPath(fromTexture);
string toPath = AssetDatabase.GetAssetPath(toTexture);
Debug.Log($"{fromPath} => {toPath}");
var fromTextureImporter = (TextureImporter)AssetImporter.GetAtPath(fromPath);
var toTextureImporter = (TextureImporter)AssetImporter.GetAtPath(toPath);
}
Texture2Dのアセットのパスのインポーターが常に TextureImporter と仮定しているのがよくなさそう。最新版にしたら治ったりする?
それともupstream?
例:
Packages/nadena.dev.ndmf/__Generated/Chiffon_kisekae Variant(Clone)/_assets/Chiffon_Hair_Kaihen_MergedStack.asset => Assets/ZZZ_TemporalAsset/Run_20250224-045519/unnamed_fff42b92.texture.png