s&
newspaper
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
rocket
Discover Games
business_center
Workshop
sports_esports
Games
landscape
Maps
chair
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
docs
Docs
docs
Documentation
dashboard
Api Reference
school
Tutorials
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Classes
Compiler
chevron_left
Classes
class
Compiler
search
Properties
data_object
AssemblyName
data_object
BuildResult
data_object
BuildSuccess
data_object
Diagnostics
data_object
FileSystem
data_object
GeneratedCode
data_object
Group
data_object
IsBuilding
data_object
Name
data_object
NeedsBuild
data_object
Output
data_object
UseAbsoluteSourcePaths
Methods
functions
AddReference
functions
AddSourcePath
functions
DependencyIndex
functions
Dispose
functions
GetConfiguration
functions
HasReference
functions
MarkForRecompile
functions
NotifyFastHotload
functions
SetConfiguration
functions
UpdateFromArchive
functions
WatchForChanges
Static Methods
functions
AddBaseReference
functions
AddEditorReference
functions
AddToolBaseReference
functions
StripDisabledTextTrivia
Compiler
Given a folder of .cs files, this will produce (and load) an assembly
class
Sandbox
.
sealed
Sandbox.Compiling
data_object
Properties
12
AssemblyName
string
Generated assembly name, without an extension. This will be "package.{Name}".
BuildResult
EmitResult
Results for the assembly build. This can contain warnings or errors.
BuildSuccess
bool
Accesses Output.Successful
Diagnostics
Diagnostic[]
A list of warnings and errors created by the last build
FileSystem
BaseFileSystem
An aggregate of all the filesystem this compiler has
GeneratedCode
StringBuilder
Global namespaces
Group
CompileGroup
Each compiler must belong to a compile group
IsBuilding
bool
Is this compiler currently building?
Name
string
Name of the project this compiler was created for. This could be something like "base" or "org.ident".
NeedsBuild
bool
Returns true if this compiler is pending a build, or currently building.
Output
CompilerOutput
The output from the previous build
UseAbsoluteSourcePaths
bool
During development we use absolute source paths so that debugging works better. In a packed/release build it's good to use relative paths instead, just to avoid exposing the builder's file system.
functions
Methods
11
AddReference
(
referenceName
)
Add a reference to this compiler. This might be a system dll, or an assembly name from a fellow compiler.
AddSourcePath
(
fullPath
)
Add an extra source path. Useful for situations where you want to combine multiple addons into one.
DependencyIndex
(
depth
)
int
Dispose
(
)
GetConfiguration
(
)
Configuration
HasReference
(
referenceName
,
deep
)
bool
Returns true if Sandbox.Compiler._references contains the given reference assembly name. If
is true, referenced compilers are searched too.
MarkForRecompile
(
)
Recompile this as soon as is appropriate
NotifyFastHotload
(
fastHotloadedVersion
)
SetConfiguration
(
newConfig
)
UpdateFromArchive
(
a
)
Fill this compiler from a code archive
WatchForChanges
(
)
Watch the filesystem for changes to our c# files, and trigger a recompile if they change.
functions
Static Methods
4
AddBaseReference
(
compiler
)
Add a reference to the "
base
" package.
AddEditorReference
(
compiler
,
reference
)
Add a reference to the given package's editor assembly.
AddToolBaseReference
(
compiler
)
Add a reference to the "
toolbase
" package.
StripDisabledTextTrivia
(
tree
)
SyntaxTree
Strips out disabled text trivia from the syntax tree. This is stuff like `#if false` blocks that are not compiled.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.