Replies: 1 comment
-
Hi @nRammm, If AttachCustomReticle is called by any interactable with a custom reticle (i.e. the bounding box handles) it will replace any custom reticle you have previously attached. You would need to call AttachCustomReticle again to reattach it. There isn't a sample of this but I think perhaps adding a listener to the interactor's hoverExited event, you could reattach your reticle so that it doen't revert back to the base reticle. Setting your desired reticle as the base reticle might be preferable (however this must be set in the inspector/cannot be set programmatically at runtime). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I've added custom cursor for interactors via script using
IXRCustomReticleProvider. AttachCustomReticle(GameObject reticleInstance)
.But on hovering over the handles of bounding box, the reticle is changed to the arrows (indicating scale/Rotate handles), on exiting the hover of handles , the reticle is resetted to the base one rather than the custom one which I added via script.
What I could understand from the script is , in BaseReticleVisual.cs there is a property called
CustomReticle
, on adding a custom reticle this will override the previous one , if any . Due to this , the previous cursor which was added my me becomes stale in the scene(disabled) and the reference ofCustomReticle
points to base reticle since the booleanCustomReticleAttached
will be set to false now.In a nut shell I want my custom cursor back instead of the base reticle . Is there any way to solve this issue?
Video for reference : Green colored reticle is the one which I added via script.
https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/assets/93316456/16d03a55-4464-4f64-a621-1397600d9b21
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions