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

ExpressionのPreviewのPrefabを切り替えたときにパラメータが表示されなくなる問題を修正 #2162

Merged

Conversation

mkc1370
Copy link
Contributor

@mkc1370 mkc1370 commented Oct 11, 2023

概要

ExpressionのPreviewのPrefabを切り替えたときにパラメータが表示されなくなる問題を修正しました。

発生するエラー

MissingReferenceException: The object of type 'SkinnedMeshRenderer' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
UniVRM10.SerializedExpressionEditor.MorphTargetBindsGUI () (at Assets/VRM10/Editor/Components/Expression/SerializedExpressionEditor.cs:179)
UniVRM10.SerializedExpressionEditor.Draw (UniVRM10.VRM10Expression& bakeValue) (at Assets/VRM10/Editor/Components/Expression/SerializedExpressionEditor.cs:96)
UniVRM10.ExpressionEditor.OnInspectorGUI () (at Assets/VRM10/Editor/Components/Expression/VRM10ExpressionEditor.cs:308)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass59_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <db8dd72d302542a48429f7c30a0e34c7>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

変更内容

  • ExpressionのPreviewを切り替えた際に、PreviewFaceRendererとSerializedExpressionEditorを生成し直すように変更

image
image
image

@vrm-github-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@Santarh Santarh requested a review from ousttrue October 11, 2023 08:35
Copy link
Contributor

@ousttrue ousttrue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

なるほどー

@ousttrue ousttrue merged commit 6b0e660 into vrm-c:master Oct 12, 2023
1 check passed
@ousttrue ousttrue added this to the v0.115 milestone Oct 12, 2023
@mkc1370 mkc1370 deleted the fix/error_on_expression_preview_prefab_changed branch October 12, 2023 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants