Photon Quantum 3.0.0

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

Utility methods to create initial user files required for the Quantum SDK. These files are never overwritten by SDK updates. Files include asmref files, readme files or partial classes. Files are identified by their Unity script GUIDs. More...

Static Public Member Functions

static void GenerateUserFiles ()
 Generate user files. More...
 
static void GenerateWorkspaceFiles ()
 Generate workspace asmref files. More...
 

Static Public Attributes

const string FolderPath = "Assets/QuantumUser"
 The default user folder path. More...
 
static string PingUserFile => AssetDatabase.GUIDToAssetPath(UserFiles[0].Guid)
 Return a user files path. More...
 
static string PingWorkspaceFile => AssetDatabase.GUIDToAssetPath(WorkspaceFiles[0].Guid)
 Return a workspace asmref file path. More...
 
static string TemplateUserCodeGenSettings
 Template to add user code to QuantumCodeGenSettings. More...
 
static string TemplateUserCommandSetup
 Template to add user code to DeterministicCommandSetup. More...
 
static string TemplateUserFrame
 Template to add user code to Frame. More...
 
static string TemplateUserFrameContext
 Template to add user code to FrameContextUser. More...
 
static string TemplateUserRuntimeConfig
 Template to add user code to RuntimeConfig. More...
 
static string TemplateUserRuntimePlayer
 Template to add user code to RuntimePlayer. More...
 
static string TemplateUserSimulationConfig
 Template to add user code to SimulationConfig. More...
 
static string TemplateUserSystemSetup
 Template to add user code to DeterministicSystemSetup. More...
 
static bool UserFilesExist => FilesExist(UserFiles)
 Return true if all important partial user files exist. More...
 
static bool WorkspaceFilesExist => FilesExist(WorkspaceFiles)
 Return true if important asmref files exist. More...
 

Detailed Description

Utility methods to create initial user files required for the Quantum SDK. These files are never overwritten by SDK updates. Files include asmref files, readme files or partial classes. Files are identified by their Unity script GUIDs.

Member Function Documentation

◆ GenerateUserFiles()

static void Quantum.Editor.QuantumEditorUserScriptGeneration.GenerateUserFiles ( )
inlinestatic

Generate user files.

◆ GenerateWorkspaceFiles()

static void Quantum.Editor.QuantumEditorUserScriptGeneration.GenerateWorkspaceFiles ( )
inlinestatic

Generate workspace asmref files.

Member Data Documentation

◆ FolderPath

const string Quantum.Editor.QuantumEditorUserScriptGeneration.FolderPath = "Assets/QuantumUser"
static

The default user folder path.

◆ UserFilesExist

bool Quantum.Editor.QuantumEditorUserScriptGeneration.UserFilesExist => FilesExist(UserFiles)
static

Return true if all important partial user files exist.

◆ WorkspaceFilesExist

bool Quantum.Editor.QuantumEditorUserScriptGeneration.WorkspaceFilesExist => FilesExist(WorkspaceFiles)
static

Return true if important asmref files exist.

◆ PingUserFile

string Quantum.Editor.QuantumEditorUserScriptGeneration.PingUserFile => AssetDatabase.GUIDToAssetPath(UserFiles[0].Guid)
static

Return a user files path.

◆ PingWorkspaceFile

string Quantum.Editor.QuantumEditorUserScriptGeneration.PingWorkspaceFile => AssetDatabase.GUIDToAssetPath(WorkspaceFiles[0].Guid)
static

Return a workspace asmref file path.

◆ TemplateUserSystemSetup

string Quantum.Editor.QuantumEditorUserScriptGeneration.TemplateUserSystemSetup
static
Initial value:
=> "namespace Quantum" + Environment.NewLine +
"{" + Environment.NewLine +
" using System;" + Environment.NewLine +
" using System.Collections.Generic;" + Environment.NewLine + Environment.NewLine +
" public static partial class DeterministicSystemSetup" + Environment.NewLine +
" {" + Environment.NewLine +
" static partial void AddSystemsUser(ICollection<SystemBase> systems, RuntimeConfig gameConfig, SimulationConfig simulationConfig, SystemsConfig systemsConfig)" + Environment.NewLine +
" {" + Environment.NewLine +
" // The system collection is already filled with systems coming from the SystemsConfig. " + Environment.NewLine +
" // Add or remove systems to the collection: systems.Add(new SystemFoo());" + Environment.NewLine +
" }" + Environment.NewLine +
" }" + Environment.NewLine +
"}"

Template to add user code to DeterministicSystemSetup.

◆ TemplateUserCommandSetup

string Quantum.Editor.QuantumEditorUserScriptGeneration.TemplateUserCommandSetup
static
Initial value:
=> "namespace Quantum" + Environment.NewLine +
"{" + Environment.NewLine +
" using System.Collections.Generic;" + Environment.NewLine +
" using Photon.Deterministic;" + Environment.NewLine + Environment.NewLine +
" public static partial class DeterministicCommandSetup" + Environment.NewLine +
" {" + Environment.NewLine +
" static partial void AddCommandFactoriesUser(ICollection<IDeterministicCommandFactory> factories, RuntimeConfig gameConfig, SimulationConfig simulationConfig)" + Environment.NewLine +
" {" + Environment.NewLine +
" // Add or remove commands to the collection." + Environment.NewLine +
" // factories.Add(new NavMeshAgentTestSystem.RunTest());" + Environment.NewLine +
" }" + Environment.NewLine +
" }" + Environment.NewLine +
"}"

Template to add user code to DeterministicCommandSetup.

◆ TemplateUserFrame

string Quantum.Editor.QuantumEditorUserScriptGeneration.TemplateUserFrame
static
Initial value:
=> "namespace Quantum" + Environment.NewLine +
"{" + Environment.NewLine +
" public unsafe partial class Frame" + Environment.NewLine +
" {" + Environment.NewLine +
"#if UNITY_ENGINE" + Environment.NewLine + Environment.NewLine +
"#endif" + Environment.NewLine +
" }" + Environment.NewLine +
"}"

Template to add user code to Frame.

◆ TemplateUserFrameContext

string Quantum.Editor.QuantumEditorUserScriptGeneration.TemplateUserFrameContext
static
Initial value:
=> "namespace Quantum" + Environment.NewLine +
"{" + Environment.NewLine +
" public partial class FrameContextUser" + Environment.NewLine +
" {" + Environment.NewLine +
" }" + Environment.NewLine +
"}"

Template to add user code to FrameContextUser.

◆ TemplateUserRuntimeConfig

string Quantum.Editor.QuantumEditorUserScriptGeneration.TemplateUserRuntimeConfig
static
Initial value:
=> "namespace Quantum" + Environment.NewLine +
"{" + Environment.NewLine +
" public partial class RuntimeConfig" + Environment.NewLine +
" {" + Environment.NewLine +
" }" + Environment.NewLine +
"}"

Template to add user code to RuntimeConfig.

◆ TemplateUserRuntimePlayer

string Quantum.Editor.QuantumEditorUserScriptGeneration.TemplateUserRuntimePlayer
static
Initial value:
=> "namespace Quantum" + Environment.NewLine +
"{" + Environment.NewLine +
" public partial class RuntimePlayer" + Environment.NewLine +
" {" + Environment.NewLine +
" }" + Environment.NewLine +
"}"

Template to add user code to RuntimePlayer.

◆ TemplateUserSimulationConfig

string Quantum.Editor.QuantumEditorUserScriptGeneration.TemplateUserSimulationConfig
static
Initial value:
=> "namespace Quantum" + Environment.NewLine +
"{" + Environment.NewLine +
" public partial class SimulationConfig : AssetObject" + Environment.NewLine +
" {" + Environment.NewLine +
" }" + Environment.NewLine +
"}"

Template to add user code to SimulationConfig.

◆ TemplateUserCodeGenSettings

string Quantum.Editor.QuantumEditorUserScriptGeneration.TemplateUserCodeGenSettings
static
Initial value:
=> "namespace Quantum.Editor" + Environment.NewLine +
"{" + Environment.NewLine +
" using Quantum.CodeGen;" + Environment.NewLine + Environment.NewLine +
" public static partial class QuantumCodeGenSettings" + Environment.NewLine +
" {" + Environment.NewLine +
" static partial void GetCodeGenFolderPathUser(ref string path) { }" + Environment.NewLine +
" static partial void GetCodeGenUnityRuntimeFolderPathUser(ref string path) { }" + Environment.NewLine +
" static partial void GetOptionsUser(ref GeneratorOptions options) { }" + Environment.NewLine +
" }" + Environment.NewLine +
"}"

Template to add user code to QuantumCodeGenSettings.