Dresserclass

Creates clothing renderers for the outfit owned by this Dresser.

object→Component→Dresser
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.Dresser : Sandbox.Component

Constructors1

Showing 1 constructors

Methods10

Showing 10 methods

public System.Threading.Tasks.Task ApplyAsync(Sandbox.ClothingContainer clothing, System.Threading.CancellationToken token = null)PUBLIC

Applies an outfit immediately and downloads missing items. Completion uses the current appearance properties, including edits made while the download was pending. A newer outfit request, retargeting or destruction cancels this request.

ParameterTypeDescription
clothingClothingContainer—
token = nullCancellationToken—
Returns:Task—

public void CancelDressing()PUBLIC

If we're dressing in an async way - stop it.

Returns:void—

public void Clear()PUBLIC

Removes the outfit while preserving the current appearance.

Returns:void—

public static Sandbox.Dresser GetOrCreate(Sandbox.SkinnedModelRenderer body)PUBLICSTATIC

Finds the Dresser for a body or adds a transient, manually controlled one. Reuse the returned component for outfit requests and live appearance edits.

ParameterTypeDescription
bodySkinnedModelRenderer—
Returns:Dresser—

public void OnManualChange(float a, float b)PUBLIC

Called when Height, Age or Tint is changed

ParameterTypeDescription
afloat—
bfloat—
Returns:void—

public void Randomize()PUBLIC

Make a random outfit

Returns:void—

Properties19

Showing 19 properties

public bool Sandbox.Dresser.ApplyHeightScale { get; set; }PUBLICGETSET

Should we change the height too?

Returns:bool—

public float Sandbox.Dresser.ChestSize { get; set; }PUBLICGETSET

Normalized chest deformation. Clothing loads initialize this value; subsequent edits control the model.

Returns:float—

public float Sandbox.Dresser.ChinSize { get; set; }PUBLICGETSET

Normalized chin deformation. Clothing loads initialize this value; subsequent edits control the model.

Returns:float—

public float Sandbox.Dresser.EyeAlign { get; set; }PUBLICGETSET

Citizen-only horizontal iris alignment from zero to one. The midpoint preserves Iris Center. This rotates the iris projection around the eyeball without changing the eye bones.

Returns:float—

public float Sandbox.Dresser.EyeColor { get; set; }PUBLICGETSET

Position on the eye colour gradient, from zero to one. Local and owner avatars populate this automatically.

Returns:float—

public static Sandbox.Gradient Sandbox.Dresser.EyeColorGradient { get; set; }PUBLICSTATICGETSET

Shared sRGB iris palette for dressing and the avatar editor, starting at Citizen's brown. Browns occupy the first 15%, leaving room for hazel, green, teal, blue and grey.

Returns:Gradient—

public float Sandbox.Dresser.HeadShape { get; set; }PUBLICGETSET

Normalized head deformation. Clothing loads initialize this value; subsequent edits control the model.

Returns:float—

public bool Sandbox.Dresser.IsDressing { get; set; }PUBLICGETSET

True if we're dressing, in an async way

Returns:bool—

public float Sandbox.Dresser.ManualAge { get; set; }PUBLICGETSET

Returns:float—

public float Sandbox.Dresser.ManualHeight { get; set; }PUBLICGETSET

Returns:float—

public float Sandbox.Dresser.ManualTint { get; set; }PUBLICGETSET

Returns:float—

public float Sandbox.Dresser.NeckSize { get; set; }PUBLICGETSET

Normalized neck deformation. Clothing loads initialize this value; subsequent edits control the model.

Returns:float—

public float Sandbox.Dresser.NoseSize { get; set; }PUBLICGETSET

Normalized nose deformation. Clothing loads initialize this value; subsequent edits control the model.

Returns:float—

public bool Sandbox.Dresser.RemoveUnownedItems { get; set; }PUBLICGETSET

When using `Sandbox.Dresser.ClothingSource.OwnerConnection`, strip any clothing items that are not owned in their Steam Inventory. Disable only if your game handles ownership checks itself.

Returns:bool—

public float Sandbox.Dresser.WaistSize { get; set; }PUBLICGETSET

Normalized waist deformation. Clothing loads initialize this value; subsequent edits control the model.

Returns:float—

public System.Collections.Generic.List`1<string> Sandbox.Dresser.WorkshopItems { get; set; }PUBLICGETSET

Returns:List<string>—

On this page

Constructorspublic Dresser()Methodspublic System.Threading.Tasks.ValueTask Apply()public System.Void Apply(Sandbox.ClothingContainer clothing)public System.Threading.Tasks.Task ApplyAsync(Sandbox.ClothingContainer clothing, System.Threading.CancellationToken token = null)public System.Void CancelDressing()public System.Void Clear()public static Sandbox.Dresser GetOrCreate(Sandbox.SkinnedModelRenderer body)public System.Void OnManualChange(System.Single a, System.Single b)public System.Void Randomize()public System.Void UpdateAppearance()public System.Void UpdateAppearance(Sandbox.ClothingContainer appearance)Propertiespublic System.Boolean Sandbox.Dresser.ApplyHeightScale { get; set; }public Sandbox.SkinnedModelRenderer Sandbox.Dresser.BodyTarget { get; set; }public System.Single Sandbox.Dresser.ChestSize { get; set; }public System.Single Sandbox.Dresser.ChinSize { get; set; }public System.Collections.Generic.List`1<Sandbox.ClothingContainer.ClothingEntry> Sandbox.Dresser.Clothing { get; set; }public System.Single Sandbox.Dresser.EyeAlign { get; set; }public System.Single Sandbox.Dresser.EyeColor { get; set; }public static Sandbox.Gradient Sandbox.Dresser.EyeColorGradient { get; set; }public System.Single Sandbox.Dresser.HeadShape { get; set; }public System.Boolean Sandbox.Dresser.IsDressing { get; set; }public System.Single Sandbox.Dresser.ManualAge { get; set; }public System.Single Sandbox.Dresser.ManualHeight { get; set; }public System.Single Sandbox.Dresser.ManualTint { get; set; }public System.Single Sandbox.Dresser.NeckSize { get; set; }public System.Single Sandbox.Dresser.NoseSize { get; set; }public System.Boolean Sandbox.Dresser.RemoveUnownedItems { get; set; }public Sandbox.Dresser.ClothingSource Sandbox.Dresser.Source { get; set; }public System.Single Sandbox.Dresser.WaistSize { get; set; }public System.Collections.Generic.List`1<System.String> Sandbox.Dresser.WorkshopItems { get; set; }Metadata