fix: ArgumentException with components with missing script (#327)

This commit is contained in:
anatawa12 2023-06-06 23:40:46 +09:00 committed by GitHub
parent ed4c1ad5a0
commit 5577e4c1bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,6 +50,8 @@ namespace nadena.dev.modular_avatar.core.editor
{
foreach (var component in obj.GetComponents<Component>())
{
// component is null if script is missing
if (!component) continue;
switch (component)
{
case Transform t: break;
@ -184,4 +186,4 @@ namespace nadena.dev.modular_avatar.core.editor
}
}
}
}
}