I am using Anima2D in my project. When I enter prefab mode I can still see the bone gizmos from my game inside the isolation mode. I have included an example below. I have dug into the issue from the Anima2D side of things as my first thought was to just disable the gizmo via the Unity interface. Unfortunately Anima2D renders it’s gizmos in a non-standard way and the ability to hide the gizmos hasn’t been implemented yet.
Has anyone found a workaround for these bone gizmos being rendered inside the prefab mode despite not being part of the prefab?
There’s no way I’m aware of that doesn’t require modifying the plugin (Anima2D). You could try to ask them to update it.
They could use the normal Gizmo approaches, or if they use a global callback where Camera-current can be relied on, then they can use this code to early out when the gizmos shouldn’t be drawn:
if (!StageUtility.IsGameObjectRenderedByCamera(gizmoGameObject, Camera.current))
return;
1 Like
That’s exactly what I was looking for and it worked once I found the right places to put it. I don’t mind patching my local version for now and I’ll look into cleaning up my implementation and posting it in the Anima2D thread so Sergi_Valls can add it.
Thanks!
1 Like