Skip to content
This repository has been archived by the owner on Dec 22, 2021. It is now read-only.

Latest commit

 

History

History
51 lines (28 loc) · 2.29 KB

README.md

File metadata and controls

51 lines (28 loc) · 2.29 KB

Coverage Quality Gate Status Discord release

Simple Web Transport

Websocket Transport for Mirror

This Transport uses the websocket protocol. This allows this transport to be used in WebGL builds of unity.

Usage

  1. Download the code from the source folder or package on Release page.
  2. Put the code somewhere in your Assets folder
  3. Replace your existing Transport with SimpleWebTransport on your NetworkManager

Bugs?

Please report any bugs or issues Here

Websocket Secure

This transport supports the wss protocol which is required for https pages.

How to create and setup an SSL Cert

If you host your webgl build on a https domain you will need to use wss which will require a ssl cert.

See this page

Logging

Log levels can be set using the dropdown on the transport or or setting Mirror.SimpleWeb.Log.level.

The transport applies the dropdown value in its Awake and OnValidate methods.

Log methods

Log methods in this transport use the ConditionalAttribute so they are removed depending on the preprocessor defines.

These preprocessor defines effect the logging

  • DEBUG allows warn/error logs
  • SIMPLEWEB_LOG_ENABLED allows all logs

Without SIMPLEWEB_LOG_ENABLED info or verbose logging will never happen even if log level allows it.

See the Unity docs on how set custom defines.