mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-20 01:25:45 -05:00
NotVrm0Exception
This commit is contained in:
@@ -25,7 +25,14 @@ namespace VRM
|
||||
var ext = Path.GetExtension(path).ToLower();
|
||||
if (ext == ".vrm")
|
||||
{
|
||||
ImportVrm(UnityPath.FromUnityPath(path));
|
||||
try
|
||||
{
|
||||
ImportVrm(UnityPath.FromUnityPath(path));
|
||||
}
|
||||
catch (VRMImporterContext.NotVrm0Exception)
|
||||
{
|
||||
// is not vrm0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,12 @@ namespace VRM
|
||||
{
|
||||
public class VRMImporterContext : ImporterContext
|
||||
{
|
||||
public class NotVrm0Exception : Exception
|
||||
{
|
||||
public NotVrm0Exception()
|
||||
{ }
|
||||
}
|
||||
|
||||
public VRM.glTF_VRM_extensions VRM { get; private set; }
|
||||
|
||||
public VRMImporterContext(GltfParser parser,
|
||||
@@ -25,7 +31,7 @@ namespace VRM
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new KeyNotFoundException("not vrm0");
|
||||
throw new NotVrm0Exception();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user