Git Product home page Git Product logo

fusionvr's Introduction

FusionVRLogoNoBackSmall

A Unity Package containing all the necessary components to do VR networking with Photon Fusion

NOTE: FusionVR is still in beta, bugs, issues, unfinished features and such are to be expected.

Download Discord

FusionPreview1

Documentation

The recommended Unity version is 2021.3.25.1.

You need the Photon Fusion SDK and Photon Voice installed to proceed.

If you are having trouble with Voice, please read Fusion Voice Intergration Docs

Start off by finding the player in the Resources folder, press on it and you'll be met with this dialog.

image

Press Import TMP Essentials.

After that navigate to Resources/FusionVR/Prefabs.

image

Then drag FusionVRManager into your scene. There should only be 1 manager in the entire game. The manager will therefore mark itself your player as "DontDestroyOnLoad". The manager will automatically attempt to fill out the required fields

image

Including Fusion.VR

using Fusion.VR

Connecting to servers

FusionVRManager.Connect();

Joining rooms

// It will only join people on the same queue but the room codes themselves are random
string queue = "Space";
// Optional
int maxPlayers = 100;
FusionVRManager.JoinRandomRoom(queue, maxPlayers);

Joining private rooms

string roomCode = "1234";
// Optional
int maxPlayers = 100;
FusionVRManager.JoinPrivateRoom(roomCode, maxPlayers);

Leaving the current room

FusionVRManager.LeaveRoom();

Setting name

FusionVRManager.SetUsername("fchb1239");

Setting colour

Color myColour = new Color(0, 0, 1);
FusionVRManager.SetColour(myColour);

Cosmetics

Cosmetics in Fusion VR Work differently to Photon VR. In Fusion, cosmetics are stored as a dictionary, with the slot name, and the cosmetic name.

Start off by locating "Cosmetic Slots" on the manager. image Here you can add or remove slots.

Navigate to the player in Resources/FusionVR, here you can add the cosmetic slot parents. image A cosmetic slot parent, is the parent of all the comsetics in that slot. Under a parent, you make the cosmetics. Set the GameObject/cosmetic name to something under 32 characters.

Enabling a cosmetic

string SlotName = "Head";
string CosmeticName = "VRTopHat"; // VRTopHat is one of the 4 default cosmetics
FusionVRManager.SetCosmetics(SlotName, CosmeticName);

Enabling a list cosmetic

Dictionary<string, string> Cosmetics = new Dictionary<string, string>();
Cosmetics.Add("Head", "VRTopHat");
Cosmetics.Add("Face", "VRSunglasses");
FusionVRManager.SetCosmetics(Cosmetics);

Small note: Some functions are async, they may cause warnings but don't worry about them. If you have your own async function, you can await them. Have fun devs!

fusionvr's People

Contributors

fchb1239 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.