Hi All,
Just a question regarding the XR interaction toolkit. I am trying to understand why the interaction manager is written the way it is and the performance implications. Say I have a scene of 20 interactors and 200 interactables.
-
Is the XR Interaction Manager more efficient in terms of updating everything all at once or is there no difference? It just seems like calling update methods for each interactor/interactable is a waste.
-
Instead of maintain a huge dictionary mapping possibly 1000+ colliders to interactables, couldn’t I just add a monobehaviour on each collider to the correct interactable? What is the performance difference?
Thanks,
Colton
Couple of reasons:
1- you can spatially partition your entities and have multiple interaction managers in the scene. so rather than having 1k objects in one manager. you might have 4 or 5 discrete areas with their own interaction managers with much fewer objects. we haven’t tried migrating objects from one IM to another yet, but it should be possible.
2- the long term intention is that the IM will be used to negotiate between multiple networked users. with one IM being authoritative. we have no timeline for this. but thats the idea 
3- we use the IM as a way to resolve simultaneous interactions where multiple interactors are attempting to interact with a single intractable (also see #2)
also finally, we use the IM to ensure that things get updated in the right order. it simplifies the overall update process from a code pov!
1 Like
Thanks for the reply @Matt_D_work
@Matt_D_work just thought of a follow up, say I did only want 1 IM per scene, if I made that a singleton, how would that affect performance (i.e. would it be better to create a cached reference in awake on each interactor/interactable or reference InteractionManager.Instance each time I need it?)
Cheers,
Colton