s&
newspaperAbout
infoAbout s&box newspaperLatest News published_with_changesChanges mapRoadmap monitoringMetrics
gamesGames
sports_esportsBrowse Games rocketDiscover Games
business_centerWorkshop
sports_esportsGames landscapeMaps chairModels textureMaterials apparelClothing constructionMore..
forumForum docsDocs
docsDocumentation dashboardApi Reference schoolTutorials
inputLog in with Steam chevron_leftChange Language
简体中文EnglishРусскийEspañolPortuguês-BrasilDeutsch日本語FrançaisPolskiTürkçe한국어PirateItalianoไทย繁體中文УкраїнськаČeštinaNederlandsMagyarDanskSuomiSvenskaNorskΕλληνικάRomânăБългарскиTiếng ViệtBahasa IndonesiaEspañol-Latinoaméricaالعربية
Api
Classes
ResourceCompileContext
chevron_left Classes
class
ResourceCompileContext

Constructors

lockResourceCompileContext

Properties

data_objectAbsolutePathdata_objectDatadata_objectRelativePathdata_objectResourceVersiondata_objectStreamingData

Methods

functionsAddCompileReferencefunctionsAddGameFileReferencefunctionsAddRuntimeReferencefunctionsCreateChildfunctionsReadSourcefunctionsReadSourceAsJsonfunctionsReadSourceAsStringfunctionsScanJson
ResourceCompileContext
class Sandbox.Resources .
abstractSandbox.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.
  • News
  • Docs
  • Metrics
  • FAQ
  • Forum
  • Discord
  • Twitter