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
ClothingContainer
chevron_left
Classes
class
ClothingContainer
search
Constructors
functions
ClothingContainer
Fields
crop_din
Clothing
Properties
data_object
Age
data_object
DisplayName
data_object
Height
data_object
PrefersHuman
data_object
Tint
Methods
functions
Add
functions
AddRange
functions
Apply
functions
ApplyAsync
functions
Deserialize
functions
FindEntry
functions
GetBodyGroups
functions
Has
functions
Normalize
functions
RemoveUnownedItems
functions
Reset
functions
Serialize
functions
Toggle
Static Methods
functions
CreateFromConnection
functions
CreateFromJson
functions
CreateFromLocalUser
ClothingContainer
Holds a collection of clothing items. Won't let you add items that aren't compatible.
class
Sandbox
.
Sandbox.Engine
build
Constructors
1
ClothingContainer
(
)
crop_din
Fields
1
Clothing
List`1
A list of clothing items the avatar is wearing
data_object
Properties
5
Age
float
The avatar's age. Default is 0.0f. We'll pick a skin based on this.
DisplayName
string
A user set name for this setup
Height
float
The avatar's height. Default is 0.5f.
PrefersHuman
bool
If true, this avatar prefers to use a human model when possible
Tint
float
For the citizen the skin color is dynamic, based on a gradient. This is 0-1.
functions
Methods
13
Add
(
clothing
)
ClothingEntry
Add clothing item
AddRange
(
clothing
)
Apply
(
body
)
Dress a skinned model renderer with an outfit. Doesn't download missing clothing.
ApplyAsync
(
body
,
token
)
Task
Dresses a skinned model with an outfit. Will apply all the clothes it can immediately, then download any missing clothing.
Deserialize
(
json
)
Deserialize from Json
FindEntry
(
clothing
)
ClothingEntry
Find a clothing entry matching this clothing item
GetBodyGroups
(
)
IEnumerable`1
Return a list of bodygroups and what their value should be
Has
(
clothing
)
bool
Returns true if we have this clothing item
Normalize
(
)
Restrict things like Height to their sensible limits
RemoveUnownedItems
(
)
Removes any clothing items that require Steam inventory ownership but the local user doesn't own.
Reset
(
body
)
Clear the outfit from this model, make it named
Serialize
(
)
string
Serialize to Json
Toggle
(
clothing
)
Add a clothing item if we don't already contain it, else remove it
functions
Static Methods
3
CreateFromConnection
(
connection
,
removeUnowned
)
ClothingContainer
Create the container from a connection's avatar, filtered to only items they are verified to own.
CreateFromJson
(
json
)
ClothingContainer
Create the container from json definitions
CreateFromLocalUser
(
)
ClothingContainer
Create the container from the local user's setup, stripped of any unowned items.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.