m formatting |
989onan bot (talk | contribs) Automated: update Fields |
||
Line 14: | Line 14: | ||
|Texture|{{RootFieldType|AssetRef`1|[[Type:ITexture2D|ITexture2D]]}}|TypeAdv0=true| The texture to get a size from. | |Texture|{{RootFieldType|AssetRef`1|[[Type:ITexture2D|ITexture2D]]}}|TypeAdv0=true| The texture to get a size from. | ||
|Target|{{RootFieldType|FieldDrive`1|[[Type:Float2|Float2]]}}|TypeAdv1=true| The value field to drive with the final result value. | |Target|{{RootFieldType|FieldDrive`1|[[Type:Float2|Float2]]}}|TypeAdv1=true| The value field to drive with the final result value. | ||
|DriveMode|'''[[#Mode|Mode]]'''|TypeAdv2=true| The way of restricting <code>Texture</code> size values as second step. | |DriveMode|'''[[#Mode|TextureSizeDriver.Mode]]'''|TypeAdv2=true| The way of restricting <code>Texture</code> size values as second step. | ||
|Premultiply|Float2| The value to multiply the <code>Texture</code> size by as first step. | |Premultiply|Float2| The value to multiply the <code>Texture</code> size by as first step. | ||
|Ratio|Float2| The value to multiply the <code>Texture</code> size by as the third step. | |Ratio|Float2| The value to multiply the <code>Texture</code> size by as the third step. |
Latest revision as of 06:05, 17 March 2025
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
Component image 
Texture Size Driver component as seen in the Scene Inspector

The TextureSizeDriver component drives a field with the size of a texture in pixels.
Fields
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. Some components stop their functionality when this field is disabled, but some don't. |
Texture
|
ITexture2D | The texture to get a size from. |
Target
|
field drive of Float2 | The value field to drive with the final result value. |
DriveMode
|
TextureSizeDriver.Mode | The way of restricting Texture size values as second step.
|
Premultiply
|
Float2 | The value to multiply the Texture size by as first step.
|
Ratio
|
Float2 | The value to multiply the Texture size by as the third step.
|
MaxSize
|
Float2 | The value to restrict the output value to be less than this as the final step. |
Mode
Name | Value | Description |
---|---|---|
Absolute
|
0 | Use the Texture size without modifying the value.
|
UnitHeight
|
1 | Take the Texture size and divide it by the height of the texture.
|
UnitWidth
|
2 | Take the Texture size and divide it by the width of the texture.
|
Normalized
|
3 | treat the Texture size as a vector and normalize it.
|
Usage
Attach to a slot and provide a Texture
and a Target
to get started.
Examples
This article or section is a Stub. You can help the Resonite Wiki by expanding it.