mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2024-12-29 02:35:06 +08:00
fix: NullReferenceExceptions from ShapeChangerPreview
This commit is contained in:
parent
faa8d210f2
commit
4e3001ad65
@ -133,12 +133,18 @@ namespace nadena.dev.modular_avatar.core.editor
|
||||
.ToImmutableList();
|
||||
}
|
||||
|
||||
public Task<IRenderFilterNode> Instantiate(RenderGroup group, IEnumerable<(Renderer, Renderer)> proxyPairs, ComputeContext context)
|
||||
public async Task<IRenderFilterNode> Instantiate(RenderGroup group, IEnumerable<(Renderer, Renderer)> proxyPairs, ComputeContext context)
|
||||
{
|
||||
var shapeValues = group.GetData<StaticContext>();
|
||||
var node = new Node(shapeValues, proxyPairs.First().Item2 as SkinnedMeshRenderer, _blendshapeCache);
|
||||
|
||||
return node.Refresh(proxyPairs, context, 0);
|
||||
var rv = await node.Refresh(proxyPairs, context, 0);
|
||||
if (rv == null)
|
||||
{
|
||||
context.Invalidate();
|
||||
}
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
private class Node : IRenderFilterNode
|
||||
|
Loading…
Reference in New Issue
Block a user