Quantum 3 3.0.5

Public Member Functions | Public Attributes | List of all members
Quantum.QuantumMachineId Class Reference

A scriptable object that has an id used by the sample menus as a unique AppVersion. Mostly a development feature to ensure to only match compatible clients in the Photon matchmaking. Reimporting this asset will generate new Bytes and thus a new ids. More...

Inheritance diagram for Quantum.QuantumMachineId:
Quantum.QuantumScriptableObject

Public Member Functions

string CreateReadableId (int length, int offset)
 Generate a deterministic and readable id using the ReadableCharacters and the random data Bytes. More...
 

Public Attributes

string AppVersion => CreateReadableId(8, 21)
 An id that should be unique to this machine, used by the demo menus as AppVersion. An explicit asset importer is used to create local ids during import (see QuantumMachineIdImporter). More...
 
Byte[] Bytes
 Random data set during importing the id asset inside QuantumMachineIdImporter/> More...
 
string ReadableCharacters
 A list of valid characters to generate unique readable ids. More...
 

Detailed Description

A scriptable object that has an id used by the sample menus as a unique AppVersion. Mostly a development feature to ensure to only match compatible clients in the Photon matchmaking. Reimporting this asset will generate new Bytes and thus a new ids.

Member Function Documentation

◆ CreateReadableId()

string Quantum.QuantumMachineId.CreateReadableId ( int  length,
int  offset 
)
inline

Generate a deterministic and readable id using the ReadableCharacters and the random data Bytes.

Parameters
lengthLength of the id.
offsetThe bit offset in the random data.
Returns
A random id that only changes when Bytes changes, e.g this asset is reimported.
Exceptions
ArgumentExceptionToo many valid characters.

Member Data Documentation

◆ ReadableCharacters

string Quantum.QuantumMachineId.ReadableCharacters

A list of valid characters to generate unique readable ids.

◆ Bytes

Byte [] Quantum.QuantumMachineId.Bytes

Random data set during importing the id asset inside QuantumMachineIdImporter/>

◆ AppVersion

string Quantum.QuantumMachineId.AppVersion => CreateReadableId(8, 21)

An id that should be unique to this machine, used by the demo menus as AppVersion. An explicit asset importer is used to create local ids during import (see QuantumMachineIdImporter).