Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug of null access when loading vrm1.0 prefab placed in the scene. #1790

Merged
merged 1 commit into from
Sep 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Assets/VRM10/Runtime/Components/Vrm10Runtime/Vrm10Runtime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ public class Vrm10Runtime : IDisposable

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; }
Expand Down Expand Up @@ -165,7 +170,7 @@ private static BlittableColliderType TranslateColliderType(VRM10SpringBoneCollid
public void Process()
{
// 1. Control Rig
ControlRig.Process();
ControlRig?.Process();

// 2. Constraints
foreach (var constraint in Constraints)
Expand Down