Skip to content
sensor0x0Public

About

A fork of fchb1239's FusionVR, edited to support Fusion 2 and to be compatible with Unity 6.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

Repository files navigation

FusionVRLogoNoBackSmall

FusionVR2

This project is based on FusionVR by fchb1239.
It has been updated to support Photon Fusion 2 and Unity 6.3 LTS.


Requirements

Note (Photon Voice 2 SDK) if upgrading: Version 2.50 contains breaking changes. Please see the release info or Assets/Photon/PhotonVoice/changes-voice.txt for migration guide.


Setup

  1. Import the FusionVR2 Unity package into your project.
  2. Make sure your project has the requirements installed (Photon Fusion 2 and Photon Voice 2).
  3. Important: On newer versions, Fusion-Voice integration should happen automatically. If not, visit the Fusion Voice Documentation.
  4. Import TMP Essentials if prompted.

Using FusionVR2 in code (Documentation)

Add FusionVRManager

  • Navigate to FusionVR2/Prefabs
  • Drag FusionVRManager into your scene
  • The manager will attempt to fill most fields, but you may have to fill some out yourself.

Connecting and Joining Rooms

Connect()

  • Connects to the Photon Fusion server.
  • Doesn't take any parameters.
FusionVRManager.Connect();

JoinRandomRoom(string queue, int maxPlayers = 100)

  • Joins a random room on the specified queue.
string queue = "DefaultQueue";
int maxPlayers = 10;
FusionVRManager.JoinRandomRoom(queue, maxPlayers);

JoinPrivateRoom(string roomCode, int maxPlayers = 100)

  • Joins a specific private room using a room code.
string roomCode = "1234";
FusionVRManager.JoinPrivateRoom(roomCode, 10);

LeaveRoom()

  • Leaves the current room.
  • Doesn't take any parameters.
FusionVRManager.LeaveRoom();

Player Customisation

SetUsername(string userName)

  • Sets the player's username.
FusionVRManager.SetUsername("sensor0x0");

SetColour(Color color)

  • Sets the player's colour
  • color is a Unity RGBA colour (0-1).
FusionVRManager.SetColour(new Color(0f, 0f, 1f)); // blue colour

Cosmetics

  • Cosmetics are stored in a dictionary: { slotName : cosmeticName }.
  • Add slots through the manager, then assign cosmetics under Resources/FusionVR2/Player.

SetCosmetics(string slotName, string cosmeticName)

  • Single cosmetic:
FusionVRManager.SetCosmetics("Head", "VRTopHat");
  • Enable multiple cosmetics:
var cosmetics = new Dictionary<string, string> {
    { "Head", "VRTopHat" },
    { "Face", "VRSunglasses" }
};

FusionVRManager.SetCosmetics(cosmetics);

Note: Some functions are async and may show warnings, this is normal. You can await them if needed.

About

A fork of fchb1239's FusionVR, edited to support Fusion 2 and to be compatible with Unity 6.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages