Skip to content

Quickstart guide, V6, Headless Client and Server compatible, with auto traffic, for Mirror

Notifications You must be signed in to change notification settings

JesusLuvsYooh/QuickStartHeadlessMirror

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Website Stephen Allen Games

Donate

QuickStart V6 - Headless - Mirror

The public quickstart guide, modified to be headless server and client.

The quickstart is how it sounds, to get a user up and running with a multiplayer scene. It is client authority based, contains very few comments or explanations, and doesnt follow 'best practises', for example firing physical objects rather than raycasting. But it serves its purpose of being a template with basic mirror multiplayer features. :)

Original Guide located here: https://mirror-networking.gitbook.io/docs/community-guides/quick-start-guide

Running headless server or client

Inside terminal/cmd console, add the complete line, type 0 for default or none.

File Location - Client/Sever - frame rate - host IP - host port - traffic

Example of server arguements: C:\Users\location\QuickStartHeadless s 30 0 0 0

Example of client arguements" C:\Users\location\QuickStartHeadless c 30 123.0.0.123 0 3

Traffic explanation

  • 0 = none (just initial player setup such as name and colour)
  • 1 = light (card game) (traffic: 0 + some cmd/rpcs every few seconds)
  • 2 = active (social game) (traffic: 1 increased + player rotation only + rigidbody sphere projectile)
  • 3 = heavy (mmo) (traffic: 2 increased + player movement)
  • 4 = frequent (fps) (traffic: 3 increased)

Other

Port argument section for headless has been temporary disabled, whilst doing the many transport tests. Directly change port to 7777 on NetworkManagers Transport.

Walkthrough Guide

1: Download the QuickStart project, open with Unity (made with 2019)

2: Import Mirror from Asset Store or Github Releases

3a: Check the Player Prefab has NetworkTransform on it
NetworkTransform

3b: Check MyScene NetworkManager has a Transport, you can use any (KCP, Telepathy, LiteNet, Asio, Ignorance etc)
NetworkManager

3c: Check the Build Settings has the 2 main scenes, make sure GamesList is set as the first scene.
Also check that these are set in NetworkManager (GamesList - offline map and MyScene - online map)
(Optional, tick Server Build if you want headless versions, non-headless also works.)
Build Settings

4: After you have build the headless from Unity, open up Cmd, and enter the server arguements
(check top of the ReadMe for arguments, server does not need to enter IP address or traffic)
Server

5: Do the same, but enter client arguements, open as many of these as you want.
(check top of the ReadMe for arguments, client can enter 0 as ip for localhost)
Client

6: In Unity Editor, in the GamesList scene, enter your VPS IP Address (or localhost if you are doing everything on same PC)
Editor

7: Here you can play, and see the other clients moving around.
Press the Players Canvas button to tally up gameobject players, if you are using a Proximity checker, this will only show those near you. Editor

8: Enjoy! ^_^

About

Quickstart guide, V6, Headless Client and Server compatible, with auto traffic, for Mirror

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages