Component:TextureSizeDriver

From Resonite Wiki
This page contains changes which are not marked for translation.


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

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

Values
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.


See Also