Improve support for legacy Unity versions (WIP). Close #103

This commit is contained in:
VaDiM
2026-04-20 03:03:51 +03:00
parent e92d96bb08
commit 36699541fa
39 changed files with 959 additions and 423 deletions
+6 -2
View File
@@ -37,10 +37,14 @@ namespace AssetStudio
CollectAnimationClip(m_GameObject.m_Animator);
}
}
else
else if (m_GameObject.m_Transform != null)
{
InitWithGameObject(m_GameObject);
}
else
{
throw new NotSupportedException("Unable to export model from this object");
}
if (animationList != null && animationList.Count > 0)
{
Logger.Debug($"Selected AnimationClip(s):\n\"{string.Join("\"\n\"", animationList.Select(x => x.m_Name))}\"");
@@ -656,7 +660,7 @@ namespace AssetStudio
return iMat;
}
iMat = new ImportedMaterial();
iMat.Name = mat.m_Name;
iMat.Name = mat.m_Name ?? $"material {mat.m_PathID}";
//default values
iMat.Diffuse = new Color(0.8f, 0.8f, 0.8f, 1);
iMat.Ambient = new Color(0.2f, 0.2f, 0.2f, 1);