fix: error when deleting Material Setter target (#1066)

This commit is contained in:
nekobako 2024-08-31 10:05:07 +09:00 committed by GitHub
parent 580cb2bfe9
commit 6cb249be44
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,6 +33,11 @@ namespace nadena.dev.modular_avatar.core.editor
private static ImmutableList<(int, Material)> GetMaterialOverridesForRenderer(ComputeContext ctx, Renderer r)
{
if (r == null)
{
return ImmutableList<(int, Material)>.Empty;
}
var avatar = ctx.GetAvatarRoot(r.gameObject);
var analysis = ReactiveObjectAnalyzer.CachedAnalyze(ctx, avatar);