mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-07-16 19:14:15 -04:00
Add support for Texture2DArray
This commit is contained in:
@ -68,6 +68,26 @@ namespace AssetStudioCLI
|
||||
}
|
||||
}
|
||||
|
||||
public static bool ExportTexture2DArray(AssetItem item, string exportPath)
|
||||
{
|
||||
var m_Texture2DArray = (Texture2DArray)item.Asset;
|
||||
var count = 0;
|
||||
foreach (var texture in m_Texture2DArray.TextureList)
|
||||
{
|
||||
var fakeItem = new AssetItem(texture)
|
||||
{
|
||||
Text = texture.m_Name,
|
||||
Container = item.Container,
|
||||
};
|
||||
if (ExportTexture2D(fakeItem, exportPath))
|
||||
{
|
||||
count++;
|
||||
}
|
||||
}
|
||||
Logger.Debug($"{item.TypeString} \"{item.Text}\" exported to \"{exportPath}\"");
|
||||
return count > 0;
|
||||
}
|
||||
|
||||
public static bool ExportAudioClip(AssetItem item, string exportPath)
|
||||
{
|
||||
string exportFullPath;
|
||||
@ -451,6 +471,8 @@ namespace AssetStudioCLI
|
||||
{
|
||||
case ClassIDType.Texture2D:
|
||||
return ExportTexture2D(item, exportPath);
|
||||
case ClassIDType.Texture2DArray:
|
||||
return ExportTexture2DArray(item, exportPath);
|
||||
case ClassIDType.AudioClip:
|
||||
return ExportAudioClip(item, exportPath);
|
||||
case ClassIDType.VideoClip:
|
||||
|
Reference in New Issue
Block a user