Skip to content

Player Customization

rxxyn edited this page Jul 19, 2024 · 10 revisions

Player Customization

To customize your player, over the network, access the FlowVRPlayer class.

Usernames

Sets a username and displays it over the network.

FlowVRPlayer.Instance.SetUsername(string username);

The Player's username is stored in PlayerPrefs.GetString("Username") unless configured otherwise.


Colors

Sets a color and displays it over the network.

FlowVRPlayer.Instance.SetColor(Color color);

The Player's color is stored in PlayerPrefs.GetString("Color") unless configured otherwise.


Cosmetics

Enables or disables a cosmetic, depending on the parameters provided, and displays it over the network.
The cosmetic must be set up first in the Cosmetics struct located in the FlowVRPlayer prefab, or you will experience errors, and it will not work.
cosmetic must be the same name as the GameObject set on the Cosmetic item struct.

FlowVRPlayer.Instance.SetCosmetic(string cosmetic, bool choice);

Each cosmetic that is set will create a entry in PlayerPrefs.
image
cosmeticobj should be set to a GameObject inside of the FlowVR Player prefab.
Cosmetics will automatically sync for late joiners.
FlowVR stops syncing cosmetics over the network after 10 are enabled on a player.