API ReferenceSandbox.Resources
TextureGeneratorclass
Constructors1
Showing 1 constructors
protected TextureGenerator()
No results match this filter.
Methods4
Showing 4 methods
public virtual sealed Sandbox.Texture Create(Sandbox.Resources.ResourceGenerator.Options options)
Create a texture. Will replace a placeholder texture, which will turn into the generated texture later, if it's not immediately available.
| Parameter | Type | Description |
|---|---|---|
| options | Options | — |
public virtual sealed System.Threading.Tasks.ValueTask`1<Sandbox.Texture> CreateAsync(Sandbox.Resources.ResourceGenerator.Options options, System.Threading.CancellationToken token)
Create a texture. Will wait until the texture is fully loaded and return when done.
| Parameter | Type | Description |
|---|---|---|
| options | Options | — |
| token | CancellationToken | — |
public virtual System.Nullable`1<Sandbox.Resources.EmbeddedResource> CreateEmbeddedResource()
protected virtual System.Threading.Tasks.ValueTask`1<Sandbox.Texture> CreateTexture(Sandbox.Resources.ResourceGenerator.Options options, System.Threading.CancellationToken ct)
Find an existing texture for this
| Parameter | Type | Description |
|---|---|---|
| options | Options | — |
| ct | CancellationToken | — |
No results match this filter.
Properties1
Showing 1 properties
public virtual System.Nullable`1<Sandbox.ImageFormat> Sandbox.Resources.TextureGenerator.FormatOverride { get; set; }
When set, the compiled texture will use this format instead of automatically determining one. Useful to avoid block compression (BC1/BC7) for textures that require pixel-perfect quality (sprites, UI, icons).
No results match this filter.