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
ResourceCompileContext
chevron_left
Classes
class
ResourceCompileContext
search
Constructors
lock
ResourceCompileContext
Properties
data_object
AbsolutePath
data_object
Data
data_object
RelativePath
data_object
ResourceVersion
data_object
StreamingData
Methods
functions
AddCompileReference
functions
AddGameFileReference
functions
AddRuntimeReference
functions
CreateChild
functions
ReadSource
functions
ReadSourceAsJson
functions
ReadSourceAsString
functions
ScanJson
ResourceCompileContext
class
Sandbox.Resources
.
abstract
Sandbox.Engine
build
Constructors
1
ResourceCompileContext
(
)
data_object
Properties
5
AbsolutePath
string
The absolute path to the resource on disk
Data
DataStream
Get the data to write to
RelativePath
string
The path relative to the assets folder
ResourceVersion
int
The resource version can be important
StreamingData
DataStream
Get the streaming data to write to
functions
Methods
8
AddCompileReference
(
path
)
Add a reference that is needed to compile this resource, but isn't actually needed once compiled.
AddGameFileReference
(
path
)
Add a game file reference. This file will be included in packages but is not a native resource. Use this for arbitrary data files that are loaded by managed code (e.g. navdata files).
AddRuntimeReference
(
path
)
Add a reference. This means that the resource we're compiling depends on this resource.
CreateChild
(
absolutePath
)
Child
Create a child resource
ReadSource
(
)
Byte[]
Read the source, either from in memory, or from disk
ReadSourceAsJson
(
)
JsonObject
Read the source, either from in memory, or from disk
ReadSourceAsString
(
)
string
Read the source, either from in memory, or from disk
ScanJson
(
json
)
string
Load the json and scan it for paths or any embedded resources
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.