Relationship between AvatarManager prefab and Player prefab #23
-
Hi all, I've been trying to figure this out by reading the code, but no luck for me yet. Using the "Start Here" project as an example, how is it that the AvatarManager spawns the Avatar where the Player prefab is and is aware of its existence, or vice versa? It's unclear to me how these reference each other. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @jason-ortiz! The Avatar transforms come from a 'hints' system. You provide a few hints about, for e.g., head and hands positions. Then the avatar makes use of them if it can. You can add or remove hints from the system at runtime. There's no direct connection between the Player prefab and the AvatarManager or the Avatars. The idea is that this way you can be free to use different Player prefabs, and it should be easier to attach an avatar to an existing player prefab from another toolkit, like MRTK. For the Start Here scene, have a look at |
Beta Was this translation helpful? Give feedback.
Hi @jason-ortiz! The Avatar transforms come from a 'hints' system. You provide a few hints about, for e.g., head and hands positions. Then the avatar makes use of them if it can. You can add or remove hints from the system at runtime. There's no direct connection between the Player prefab and the AvatarManager or the Avatars. The idea is that this way you can be free to use different Player prefabs, and it should be easier to attach an avatar to an existing player prefab from another toolkit, like MRTK.
For the Start Here scene, have a look at
UbiqAvatarHintsHelper
. It lives on the AvatarManager GameObject and attaches the simple Ubiq Player prefab to the AvatarManager at runtime. Try ent…