Photon Quantum 3.0.0

Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Quantum.Editor.QuantumDotnetBuildSettings Class Reference

A configuration asset to generate and build the non-Unity Quantum simualtion dll. More...

Inheritance diagram for Quantum.Editor.QuantumDotnetBuildSettings:
Quantum.QuantumGlobalScriptableObject< QuantumDotnetBuildSettings >

Public Types

enum  DotnetConfiguration
 The configuration to build the dll. More...
 
enum  DotnetPlatform
 The platform to build for. More...
 

Public Member Functions

void DetectPluginSdk ()
 Automatically search for the Photon Server SDK folder. More...
 
void LaunchPhotonServer ()
 Launches PhotonServer.exe from the Plugin SDK folder. More...
 

Static Public Member Functions

static void BuildProject (QuantumDotnetBuildSettings settings, string copyOutputDir=null, bool disablePopup=false)
 Run dotnet build on the generated csproj. More...
 
static void ExportLutFiles (string destinationPath)
 Export the LUT files to the destination path. More...
 
static void ExportPluginSdkData (QuantumDotnetBuildSettings settings)
 Export the LUT files and Quantum DB to the Quantum Plugin SDK. More...
 
static void ExportQuantumDb (string destinationPath)
 Export the Quantum DB to the destination path. More...
 
static void GenerateProject (QuantumDotnetBuildSettings settings)
 Generate a csproj file from the ProjectSettings and ProjectTemplate. More...
 
static void SynchronizePluginSdk (QuantumDotnetBuildSettings settings)
 Synchronize the Quantum Plugin SDK with the Unity project by exporting the LUT files and Quantum DB and building the project. More...
 
static bool TryFindPluginSdkFolder (out string result)
 Searching for a folder with the subfolder called Photon.Server inside the unity project and max one above. More...
 
static bool TryFindPluginSdkFolderWithPopup (ref string result)
 Attempts to find the Photon Server SDK folder. If not found, opens a folder selection dialog. More...
 

Public Attributes

string BinOutputPath = "bin"
 Where to output the compiled DLL. Relative to the project folder. More...
 
bool HasCustomPluginSdk => string.IsNullOrEmpty(PluginSdkPath) == false && Directory.Exists(PluginSdkPath)
 A quick check if the plugin sdk was found and its path saved. More...
 
string PluginSdkPath = ""
 The path to the Photon Server SDK. More...
 
string ProjectBasePath = "Quantum.Dotnet"
 The path to the base folder of the dotnet project structure relative to the Unity project folder. More...
 
QuantumDotnetProjectSettings ProjectSettings
 The project settings to use for the generated csproj. More...
 
TextAsset RunnerProjectTemplate
 The project template to use for the generated runner csproj. More...
 
bool ShowCompiledDllAfterBuild = true
 If true, opens and highlights the DLL after compilation. More...
 
TextAsset SimulationProjectTemplate
 The project template to use for the generated simulation csproj. More...
 
DotnetConfiguration TargetConfiguration
 The target configuration to build for. e.g. Debug or Release. More...
 
DotnetPlatform TargetPlatform
 The target platform to build for. More...
 

Static Public Attributes

const string DefaultPath = "Assets/QuantumUser/Editor/QuantumDotnetBuildSettings.asset"
 Default path of the global asset. More...
 

Detailed Description

A configuration asset to generate and build the non-Unity Quantum simualtion dll.

Member Enumeration Documentation

◆ DotnetPlatform

The platform to build for.

Enumerator
Windows 

Windows platform

Linux 

Linux platform

◆ DotnetConfiguration

The configuration to build the dll.

Enumerator
Release 

Release mode

Debug 

Debug mode

Member Function Documentation

◆ DetectPluginSdk()

void Quantum.Editor.QuantumDotnetBuildSettings.DetectPluginSdk ( )
inline

Automatically search for the Photon Server SDK folder.

◆ SynchronizePluginSdk()

static void Quantum.Editor.QuantumDotnetBuildSettings.SynchronizePluginSdk ( QuantumDotnetBuildSettings  settings)
inlinestatic

Synchronize the Quantum Plugin SDK with the Unity project by exporting the LUT files and Quantum DB and building the project.

Parameters
settings

◆ ExportPluginSdkData()

static void Quantum.Editor.QuantumDotnetBuildSettings.ExportPluginSdkData ( QuantumDotnetBuildSettings  settings)
inlinestatic

Export the LUT files and Quantum DB to the Quantum Plugin SDK.

Parameters
settings

◆ GenerateProject()

static void Quantum.Editor.QuantumDotnetBuildSettings.GenerateProject ( QuantumDotnetBuildSettings  settings)
inlinestatic

Generate a csproj file from the ProjectSettings and ProjectTemplate.

Parameters
settingsSettings instance

◆ BuildProject()

static void Quantum.Editor.QuantumDotnetBuildSettings.BuildProject ( QuantumDotnetBuildSettings  settings,
string  copyOutputDir = null,
bool  disablePopup = false 
)
inlinestatic

Run dotnet build on the generated csproj.

Parameters
settingsSettings instance
copyOutputDirCopy result to output dir
disablePopupDisable file explorer popup

◆ TryFindPluginSdkFolderWithPopup()

static bool Quantum.Editor.QuantumDotnetBuildSettings.TryFindPluginSdkFolderWithPopup ( ref string  result)
inlinestatic

Attempts to find the Photon Server SDK folder. If not found, opens a folder selection dialog.

Parameters
resultPlugin SDK path
Returns
True when the directory has been found.

◆ TryFindPluginSdkFolder()

static bool Quantum.Editor.QuantumDotnetBuildSettings.TryFindPluginSdkFolder ( out string  result)
inlinestatic

Searching for a folder with the subfolder called Photon.Server inside the unity project and max one above.

Parameters
resultPlugin SDK path
Returns
True when the Photon.Server directory marked folder can be found automatically.

◆ ExportLutFiles()

static void Quantum.Editor.QuantumDotnetBuildSettings.ExportLutFiles ( string  destinationPath)
inlinestatic

Export the LUT files to the destination path.

Parameters
destinationPathThe path to export the files.

◆ ExportQuantumDb()

static void Quantum.Editor.QuantumDotnetBuildSettings.ExportQuantumDb ( string  destinationPath)
inlinestatic

Export the Quantum DB to the destination path.

Parameters
destinationPathThe path to export the files.

◆ LaunchPhotonServer()

void Quantum.Editor.QuantumDotnetBuildSettings.LaunchPhotonServer ( )
inline

Launches PhotonServer.exe from the Plugin SDK folder.

Member Data Documentation

◆ DefaultPath

const string Quantum.Editor.QuantumDotnetBuildSettings.DefaultPath = "Assets/QuantumUser/Editor/QuantumDotnetBuildSettings.asset"
static

Default path of the global asset.

◆ ShowCompiledDllAfterBuild

bool Quantum.Editor.QuantumDotnetBuildSettings.ShowCompiledDllAfterBuild = true

If true, opens and highlights the DLL after compilation.

◆ ProjectSettings

QuantumDotnetProjectSettings Quantum.Editor.QuantumDotnetBuildSettings.ProjectSettings

The project settings to use for the generated csproj.

◆ SimulationProjectTemplate

TextAsset Quantum.Editor.QuantumDotnetBuildSettings.SimulationProjectTemplate

The project template to use for the generated simulation csproj.

◆ RunnerProjectTemplate

TextAsset Quantum.Editor.QuantumDotnetBuildSettings.RunnerProjectTemplate

The project template to use for the generated runner csproj.

◆ ProjectBasePath

string Quantum.Editor.QuantumDotnetBuildSettings.ProjectBasePath = "Quantum.Dotnet"

The path to the base folder of the dotnet project structure relative to the Unity project folder.

◆ BinOutputPath

string Quantum.Editor.QuantumDotnetBuildSettings.BinOutputPath = "bin"

Where to output the compiled DLL. Relative to the project folder.

◆ PluginSdkPath

string Quantum.Editor.QuantumDotnetBuildSettings.PluginSdkPath = ""

The path to the Photon Server SDK.

◆ TargetPlatform

DotnetPlatform Quantum.Editor.QuantumDotnetBuildSettings.TargetPlatform

The target platform to build for.

◆ TargetConfiguration

DotnetConfiguration Quantum.Editor.QuantumDotnetBuildSettings.TargetConfiguration

The target configuration to build for. e.g. Debug or Release.

◆ HasCustomPluginSdk

bool Quantum.Editor.QuantumDotnetBuildSettings.HasCustomPluginSdk => string.IsNullOrEmpty(PluginSdkPath) == false && Directory.Exists(PluginSdkPath)

A quick check if the plugin sdk was found and its path saved.