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

Vrm10Instance生成後に非アクティブにしてそのままOnDestroy()が実施された場合にエラーとなる問題の対策 #2212

Merged

Conversation

tsgcpp
Copy link
Contributor

@tsgcpp tsgcpp commented Jan 5, 2024

環境情報

  • UniVRM version: v0.116.0
  • Unity version: Unity-2021.3.27f1
  • OS: Windows 10

概要

  • Vrm10Instance生成後に非アクティブにしてそのままOnDestroy()が実施されるとエラーになるようなので、対策案を提出させていただきます
  • 以下の流れでエラーになるようです
    • Vrm10Instance.OnDestory がコールされた時点でGameObjectは破棄されている
    • 非アクティブのままだと m_runtime が生成されておらず、その状態でVrm10Instance.OnDestoryが発生するとRuntimeコールで m_runtime の生成が動いてしまう
    • Vrm10Runtimeの生成はGameObjectや階層の編集が発生するため、Cannot set the parent of the GameObject 'Runtime Control Rig' while its new parent 'VRM1' is being destroyed のエラーが発生する

問題の再現方法

@vrm-github-bot
Copy link
Collaborator

Can one of the admins verify this patch?

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 bbff2fa into vrm-c:master Jan 9, 2024
@ousttrue ousttrue added the 1.0 label Jan 9, 2024
@tsgcpp tsgcpp deleted the feature/skip_vrm10instance_instantiation branch January 11, 2024 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants