nadako / TinkStateSharp

Handle those pesky states, now in C#
https://nadako.github.io/TinkStateSharp/
The Unlicense
40 stars 1 forks source link

Make DisposableLifetimeHelper.DisposeOnDestroy work properly on never-enabled objects. #30

Open nadako opened 1 week ago

nadako commented 1 week ago

It's kinda edge-casey and it's a bit annoying to implement, but should be possible, since gameObject == null returns true if GO was destroyed, we can add a playerloop hook to poll this condition until it's true and call OnDestroy manually.