Class DotsRuntimeCSharpProgram
DotsRuntimeCSharpProgram is a csharp program that targets dots-runtime. It follows a particular file structure. It always has a folder
that folder can have *.cs files, which will be part of the csharp program. The folder can also have a .cpp~ and .js~ folder. If any
of those are present, DotsRuntimeCSharpProgram will build a NativeProgram with those .cpp files and .js libraries side by side. The common
usecase for this is for the c# code to [DllImport] pinvoke into the c++ code.
A DotsRuntimeCSharpProgram does not know about asmdefs (e.g. Unity.LowLevel)
Inheritance
DotsRuntimeCSharpProgram
Syntax
public class DotsRuntimeCSharpProgram : CSharpProgram
Constructors
DotsRuntimeCSharpProgram(NPath, IEnumerable<NPath>, String, Boolean, Boolean)
Declaration
public DotsRuntimeCSharpProgram(NPath mainSourcePath, IEnumerable<NPath> extraSourcePaths = null, string name = null, bool isExe = false, bool deferConstruction = false)
Parameters
Properties
Declaration
public Platform[] ExcludePlatforms { get; set; }
Property Value
Type |
Description |
Platform[] |
|
Declaration
public List<NPath> ExtraSourcePaths { get; }
Property Value
Type |
Description |
List<NPath> |
|
Declaration
public Platform[] IncludePlatforms { get; set; }
Property Value
Type |
Description |
Platform[] |
|
MainSourcePath
Declaration
public NPath MainSourcePath { get; }
Property Value
NativeProgram
Declaration
public NativeProgram NativeProgram { get; set; }
Property Value
Type |
Description |
NativeProgram |
|
Methods
Construct(String, Boolean)
Declaration
protected void Construct(string name, bool isExe)
Parameters
DeterminePathForProjectFile()
Declaration
protected virtual NPath DeterminePathForProjectFile()
Returns
DoesPackageSourceIndicateUserHasControlOverSource(String)
Declaration
public static bool DoesPackageSourceIndicateUserHasControlOverSource(string packageSource)
Parameters
Type |
Name |
Description |
String |
packageSource |
|
Returns
GetTargetFramework(CSharpProgramConfiguration, DotsRuntimeCSharpProgram)
Declaration
protected virtual TargetFramework GetTargetFramework(CSharpProgramConfiguration config, DotsRuntimeCSharpProgram program)
Parameters
Returns
IsSupportedFor(CSharpProgramConfiguration)
Declaration
public virtual bool IsSupportedFor(CSharpProgramConfiguration config)
Parameters
Type |
Name |
Description |
CSharpProgramConfiguration |
config |
|
Returns
SetupDotsRuntimeNativeProgram(String, NativeProgram)
Declaration
public static void SetupDotsRuntimeNativeProgram(string libname, NativeProgram np)
Parameters
Type |
Name |
Description |
String |
libname |
|
NativeProgram |
np |
|
SetupNativeProgram(CSharpProgramConfiguration, DotNetAssembly)
Declaration
protected virtual DotNetAssembly SetupNativeProgram(CSharpProgramConfiguration config, DotNetAssembly result)
Parameters
Type |
Name |
Description |
CSharpProgramConfiguration |
config |
|
DotNetAssembly |
result |
|
Returns
Type |
Description |
DotNetAssembly |
|
SetupSpecificConfiguration(CSharpProgramConfiguration)
Declaration
public override DotNetAssembly SetupSpecificConfiguration(CSharpProgramConfiguration config)
Parameters
Type |
Name |
Description |
CSharpProgramConfiguration |
config |
|
Returns
Type |
Description |
DotNetAssembly |
|