mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-27 22:00:23 -04:00
fixed bug
This commit is contained in:
parent
4666b378b3
commit
7ddbf3ce3e
@ -777,6 +777,8 @@ namespace Unity_Studio
|
||||
|
||||
public byte[] ConvertToContainer()
|
||||
{
|
||||
if (image_data == null || image_data.Length == 0)
|
||||
return null;
|
||||
switch (m_TextureFormat)
|
||||
{
|
||||
case TextureFormat.Alpha8:
|
||||
|
@ -1610,6 +1610,8 @@ namespace Unity_Studio
|
||||
public static bool ExportTexture(AssetPreloadData asset, string exportPathName, bool flip)
|
||||
{
|
||||
var m_Texture2D = new Texture2D(asset, true);
|
||||
if (m_Texture2D.image_data == null)
|
||||
return false;
|
||||
var convert = (bool)Properties.Settings.Default["convertTexture"];
|
||||
if (convert)
|
||||
{
|
||||
@ -1631,6 +1633,7 @@ namespace Unity_Studio
|
||||
bitmap.Dispose();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
var exportFullName2 = exportPathName + asset.Text + asset.extension;
|
||||
if (ExportFileExists(exportFullName2))
|
||||
@ -1641,6 +1644,9 @@ namespace Unity_Studio
|
||||
|
||||
public static bool ExportAudioClip(AssetPreloadData asset, string exportFilename, string exportFileextension)
|
||||
{
|
||||
var m_AudioClip = new AudioClip(asset, true);
|
||||
if (m_AudioClip.m_AudioData == null)
|
||||
return false;
|
||||
var oldextension = exportFileextension;
|
||||
var convertfsb = (bool)Properties.Settings.Default["convertfsb"];
|
||||
if (convertfsb && exportFileextension == ".fsb")
|
||||
@ -1650,7 +1656,6 @@ namespace Unity_Studio
|
||||
var exportFullname = exportFilename + exportFileextension;
|
||||
if (ExportFileExists(exportFullname))
|
||||
return false;
|
||||
var m_AudioClip = new AudioClip(asset, true);
|
||||
if (convertfsb && oldextension == ".fsb")
|
||||
{
|
||||
FMOD.System system;
|
||||
|
@ -821,7 +821,7 @@ namespace Unity_Studio
|
||||
}
|
||||
else
|
||||
{
|
||||
StatusStripUpdate("Unsupported image for preview. Can only export the texture file.");
|
||||
StatusStripUpdate("Unsupported image for preview");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user