3using Microsoft.MixedReality.Toolkit.UI;
58 Debug.LogError($
"Can't instantiate prefab, unable to find specified index '{index}'.");
66 Debug.LogError(
"Can't load avatar prefab.");
75 var position = Camera.main.transform.position + Camera.main.transform.forward * 3 +
new Vector3(0, -0.6f, 0);
76 m_LastAvatar = Instantiate(prefab, position, Quaternion.identity);
This script is responsible for spawning the avatar in the scene.
GameObject m_LastAvatar
Last avatar.
const int m_NumberOfAvatars
Defines the number of avatars.
int m_AvatarIndex
Avatar index value.
void SpawnAvatar()
Spawn the avatar corresponding to the specified index.
void SetVisibleCellIndex()
Set the current cell index belong to the avatar.
ScrollingObjectCollection m_Scrollview
Reference to the scrollview
GameObject[] m_AvatarPrefabs
Reference to the avatar prefabs.
void Update()
Gets called per each frame