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
Resource
chevron_left
Classes
class
Resource
search
Constructors
lock
Resource
Properties
data_object
EmbeddedResource
data_object
HasUnsavedChanges
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
6
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
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
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.