s&
About
The Project
info
About s&box
map
Roadmap
monitoring
Metrics
Engine startup and usage numbers
Updates
newspaper
Latest News
published_with_changes
Changes
Release-by-release changelog
Games
Browse Games
Discover Games
gamejams
live now
Game Jam III
Ends
Fri 25 Sep
Theme
One More Round
The jam is running. Build something, or play the entries.
£
50,000
prizepool
View the jam
Workshop
Playable
sports_esports
Games
Standalone games and gamemodes
Assets
landscape
Maps
view_in_ar
Models
texture
Materials
apparel
Clothing
apps
Everything
Every asset type in one list
Forum
Learn
Documentation
rocket_launch
Getting Started
docs
Documentation
api
API Reference
Resources
school
Tutorials
manage_search
Code Search
input
Log in with Steam
Api
Classes
Resource
chevron_left
Classes
class
Resource
Constructors
lock
Resource
Properties
data_object
EmbeddedResource
data_object
HasUnsavedChanges
data_object
IsError
data_object
IsValid
remove_circle
ResourceId
data_object
ResourceName
data_object
ResourcePath
Methods
functions
ConfigurePublishing
lock
CreateAssetTypeIcon
lock
Finalize
functions
GetAssetTypeIcon
functions
RenderThumbnail
functions
StateHasChanged
Static Methods
lock
CreateSimpleAssetTypeIcon
functions
WaitForLoadAsync
Resource
A resource loaded in the engine, such as a Sandbox.Model or Sandbox.Material.
class
Sandbox
.
abstract
Sandbox.Engine
build
Constructors
1
Resource
(
)
data_object
Properties
7
EmbeddedResource
Nullable`1
Embedded data for this resource
HasUnsavedChanges
bool
True if this resource has been changed but the changes aren't written to disk
IsError
bool
IsValid
bool
ResourceId
obsolete
int
ID of this resource,
ResourceName
string
File name of the resource without the extension.
ResourcePath
string
Path to this resource.
functions
Methods
6
ConfigurePublishing
(
context
)
When publishing an asset we'll call into this method to allow the resource to configure how it wants to be published. This allows your resource to make bespoke decisions to configure publishing based on its content.
CreateAssetTypeIcon
(
width
,
height
)
Bitmap
Create an icon for this type of asset. This is an icon that is shown in the editor.
Finalize
(
)
GetAssetTypeIcon
(
width
,
height
)
Bitmap
Get the icon for this type of asset. This is an icon that is shown in the editor.
RenderThumbnail
(
options
)
Bitmap
Render a thumbnail for this specific resource.
StateHasChanged
(
)
Should be called after the resource has been edited by the inspector
functions
Static Methods
2
CreateSimpleAssetTypeIcon
(
icon
,
width
,
height
,
background
,
foreground
)
Bitmap
WaitForLoadAsync
(
resource
,
ct
)
Task
Creates a task that completes when
is fully loaded.
Inheritance
Resource
AnimationGraph
GameResource
BaseAmmoResource
Clothing
ClutterDefinition
DecalDefinition
MovieResource
NavMeshAreaDefinition
PrefabFile
RenderTextureAsset
ResourceExtension<T>
ResourceExtension<T,TSelf>
SceneFile
SoundEvent
Soundscape
Sprite
Surface
TerrainMaterial
TerrainStorage
Material
Model
ParticleSnapshot
ParticleSystem
PhysicsGroupDescription
Shader
SoundFile
Texture
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.