popcron / gizmos

Used for drawing runtime gizmos in builds and editor (Unity3D)
MIT License
550 stars 43 forks source link

gizmos get rendererd by one camera only #15

Closed TKUsaneers closed 4 years ago

TKUsaneers commented 4 years ago

Gizmos are only drawn by the first camera (aka the first raise of Camera.onPostRender(...)) each frame.

Bug location: https://github.com/popcron/gizmos/blob/58288ca4a20ada517435f1f46cfb4826c02297fa/Runtime/GizmosInstance.cs#L278 Element.active is set to false after first camera's rendering call. This should only happen after all cameras rendered.

popcron commented 4 years ago

I believe the fix would be to remove the active bool altogether. It was there in the first place to prevent duplicate calls to the same operation from a while ago. Can't test tho, I'm on campus atm

popcron commented 4 years ago

Commit 5991fc7b9bfd7654e24f32bc7b28876f6e07232f should have fixed this, let me know

TKUsaneers commented 4 years ago

Works, thank you!