Assembly
Creates an assembly with the default compiler options.
Read time 2 minutesLast updated 3 hours ago
Definition
- Type: Constructor
- Namespace: UnityEditor.Compilation
- Assembly: UnityEditor.CoreModule
Assembly(string, string, string[], string[], Assembly[], string[], AssemblyFlags)
Creates an assembly with the default compiler options.
public Assembly(string name, string outputPath, string[] sourceFiles, string[] defines, Assembly[] assemblyReferences, string[] compiledAssemblyReferences, AssemblyFlags flags)
Parameters
The name of the assembly.
The full file path to write the compiled assembly to.
The paths of the script files to compile into the assembly.
The scripting symbols to define when compiling the assembly.
The assemblies compiled by Unity that this assembly references.
The file paths of precompiled assemblies that this assembly references.
Flags that describe the assembly, for example whether it's an Editor assembly. For more information, refer to AssemblyFlags.
Remarks
The assembly uses the default ScriptCompilerOptions and has an empty root namespace. To set either, use one of the other constructors.
Assembly(string, string, string[], string[], Assembly[], string[], AssemblyFlags, ScriptCompilerOptions)
Creates an assembly with the specified compiler options.
public Assembly(string name, string outputPath, string[] sourceFiles, string[] defines, Assembly[] assemblyReferences, string[] compiledAssemblyReferences, AssemblyFlags flags, ScriptCompilerOptions compilerOptions)
Parameters
The name of the assembly.
The full file path to write the compiled assembly to.
The paths of the script files to compile into the assembly.
The scripting symbols to define when compiling the assembly.
The assemblies compiled by Unity that this assembly references.
The file paths of precompiled assemblies that this assembly references.
Flags that describe the assembly, for example whether it's an Editor assembly. For more information, refer to AssemblyFlags.
The options to pass to the compiler, such as whether to allow unsafe code, the code optimization mode, and the API compatibility level. For more information, refer to ScriptCompilerOptions.
Remarks
The assembly has an empty root namespace. To set a root namespace, use the constructor that takes .
rootNamespaceAssembly(string, string, string[], string[], Assembly[], string[], AssemblyFlags, ScriptCompilerOptions, string)
Creates an assembly with the specified compiler options and root namespace.
public Assembly(string name, string outputPath, string[] sourceFiles, string[] defines, Assembly[] assemblyReferences, string[] compiledAssemblyReferences, AssemblyFlags flags, ScriptCompilerOptions compilerOptions, string rootNamespace)
Parameters
The name of the assembly.
The full file path to write the compiled assembly to.
The paths of the script files to compile into the assembly.
The scripting symbols to define when compiling the assembly.
The assemblies compiled by Unity that this assembly references.
The file paths of precompiled assemblies that this assembly references.
Flags that describe the assembly, for example whether it's an Editor assembly. For more information, refer to AssemblyFlags.
The options to pass to the compiler, such as whether to allow unsafe code, the code optimization mode, and the API compatibility level. For more information, refer to ScriptCompilerOptions.
The root namespace that the scripts in the assembly belong to.