MixedRealityToolkit-Unity
MixedRealityToolkit-Unity copied to clipboard
Can a SyncSpawnModel get notified when a new User joins the session, and filter content based on specific components to that User
So my ideal scenario is this:
- There are two User "roles": Instructor and Viewer. Where the Instructor has all the interactive power and a viewer can simply just view whats going on.
- On App start, but before connecting to the Sharing Server the User will choose to either Instructor or Viewer. Which this info will be contained locally in SharingUserInfo.cs
- I have a SceneContainer, that as you guessed contains multiple scenes (As GameObjects, not Unity Scenes)
- I only want 1 scene container to be spawned. So currently, only the instructor spawns the scene container. But if I add another instructor, it spawns another. Is there a way to check the sharing server to see what has been spawned, so we don't have repeats?
- Is there a way for the Model to get Notified when a User joins the session? I found SessionUsersTracker.UserJoined, which I think will suit my needs
- Once a User joins, can the existing SyncSpawnModel access the new User's SharingUserInfo component? And then Filter content based on that? This is the main thing I am concerned with, I think the SyncSpawnModel would just call SharingUserInfo.Instance.getUserInfo() to get the info (since its local). And then to filter the content I would need to link somehow the HoloToolkit User to SharingUserInfo so they are the same User. Which I would then check if that User needs any filtering on On_Property_Changed in the Model?
Im pretty sure this is pretty solid logic, I just don't know how to check for existing spawned models, and accessing User specific components.
I'll try to answer some of these questions on my next livestream this weekend and update this issue.
That sounds awesome! Thanks Stephen!
Closing issues older than 180 days. If this is still an issue, please reactivate with recent information.