Morpheus UserID

UserID Replication Component

The M2_UserIDReplicationComponent is a Morpheus Actor Component added to all M2M_CharacterBase classes. It is used to inform the server of the character's web platform UserId, since this information comes from the local client.

On the server, you can call HandleUserIdReplicatedToServer to trigger a callback with the UserId once it has been obtained. (If this is called after the UserId has already been obtained, the callback will trigger immediately).

Once you are certain that the UserId has been obtained, you can subsequently use GetUserIdAsString.

On the auth client, you can instead obtain the local User ID directly from the M2_WebServiceProfileDataProvider world service (see World Services)

UserID to Morpheus Actor

Each authenticated user in Morpheus should have a UserID but how to obtain the MorpheusActor that represents this UserID in the game world?

UserID Tracker Subsystem

The UserIDTrackerSubsystem is a WorldSubsystem that tracks player MorpheusActors and their UserIDs . It contains a mapping between a UserID to the user's currently active MorpheusActor if the User exists in the game world.

For example, you can do this in Blueprints to obtain the MorpheusActor belonging to a given UserID and vice versa.

Last updated

Was this helpful?