/
AwaitLocalUser (Unity)
AwaitLocalUser (Unity)
- Declaration
public static async void AwaitLocalUser(this CavrnusSpaceConnection spaceConnection, Action<CavrnusUser> localUserArrived)
- Description
Triggers localUserArrived
when the local user becomes present in the given space. Normally there is a delay between first calling JoinSpace and the local user fully connecting/setting up.
If the local user is already present localUserArrived
will trigger immediately.
- Sample
public class WelcomeUserUI : MonoBehaviour
{
[SerializeField] private TextMeshProUGUI userName;
public void Start()
{
CavrnusFunctionLibrary.AwaitAnySpaceConnection(spaceConn => {
spaceConn.AwaitLocalUser(ShowUI);
});
}
private void ShowUI(CavrnusUser localUser)
{
userName.text = $"Welcome, {localUser.GetUserName()}!";
}
}
, multiple selections available,
Related content
AwaitLocalUser (.NET)
AwaitLocalUser (.NET)
More like this
AwaitLocalUser (Unreal Engine)
AwaitLocalUser (Unreal Engine)
More like this
AwaitAnySpaceConnection (Unity)
AwaitAnySpaceConnection (Unity)
More like this
AwaitSpaceConnectionByTag (Unity)
AwaitSpaceConnectionByTag (Unity)
More like this
SetLocalUserStreamingState (Unity)
SetLocalUserStreamingState (Unity)
Read with this
SetLocalUserMutedState (Unity)
SetLocalUserMutedState (Unity)
Read with this