- [Core] handle HasMesh exception.
This commit is contained in:
@@ -39,6 +39,8 @@ namespace AssetStudio
|
|||||||
|
|
||||||
public bool HasModel() => HasMesh(m_Transform, new List<bool>());
|
public bool HasModel() => HasMesh(m_Transform, new List<bool>());
|
||||||
private static bool HasMesh(Transform m_Transform, List<bool> meshes)
|
private static bool HasMesh(Transform m_Transform, List<bool> meshes)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
m_Transform.m_GameObject.TryGet(out var m_GameObject);
|
m_Transform.m_GameObject.TryGet(out var m_GameObject);
|
||||||
|
|
||||||
@@ -62,6 +64,12 @@ namespace AssetStudio
|
|||||||
|
|
||||||
return meshes.Any(x => x == true);
|
return meshes.Any(x => x == true);
|
||||||
}
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
Logger.Warning($"Unable to verify if {m_Transform?.Name} has meshes, skipping...");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static Mesh GetMesh(Renderer meshR)
|
private static Mesh GetMesh(Renderer meshR)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user