Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Destroying GameObjects immediately is not permitted during physics trigger/contact
#5
(17-09-2024, 01:30 PM)josemendez Wrote: Hi,

Where are you calling AttachRope() from? Judging from your stack trace, it would seem like you are doing this from OnTriggerStay() which is a trigger callback.

You're deleting the rope and creating it anew, this triggers the collision system destruction (the DestroyImmediate call) during a trigger callback, which as the error message itself is telling you isn't allowed:


Simplest workaround is to store the condition using a boolean, and attach the rope during Update() or some other callback that's not part of the triggers/collision system.

kind regards,
Yes cashing bool and use it in update was helpful, thank's.
But perhaps, we can unload rope more safe?
Reply


Messages In This Thread
RE: Destroying GameObjects immediately is not permitted during physics trigger/contact - by Alexander34 - 17-09-2024, 02:13 PM