Merge pull request #1790 from Santarh/fixBug

Fix bug of null access when loading vrm1.0 prefab placed in the scene.
This commit is contained in:
ousttrue 2022-09-12 17:58:56 +09:00 committed by GitHub
commit e9bbbd6bd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,7 +28,12 @@ namespace UniVRM10
private FastSpringBoneBuffer m_fastSpringBoneBuffer;
/// <summary>
/// Control Rig may be null.
/// Control Rig is generated at loading runtime only.
/// </summary>
public Vrm10RuntimeControlRig ControlRig { get; }
public IVrm10Constraint[] Constraints { get; }
public Vrm10RuntimeExpression Expression { get; }
public Vrm10RuntimeLookAt LookAt { get; }
@ -165,7 +170,7 @@ namespace UniVRM10
public void Process()
{
// 1. Control Rig
ControlRig.Process();
ControlRig?.Process();
// 2. Constraints
foreach (var constraint in Constraints)