Component:Facet

From Resonite Wiki
Revision as of 17:40, 22 December 2024 by 989onan (talk | contribs) (add much needed info)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Component image 
Facet component as seen in the Scene Inspector

The Facet Component is the component that drives every user made facet in the game. This component specifically handles the sizes in which a facet can/can't, and prefers to be placed. It also reports the last size a facet was placed, the aspect ratio sizes it can be placed, and the Canvas that makes up the facet's contents.

When being placed into a spot, this facet finds the closest one of PreferredSizes that can be used while still fitting and automatically makes it the size when dropped in that spot. This only triggers if the user is just dropping it on their dash, as opposed to drag clicking the facet in.

Usage

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.
MinWidth Float The minimum width this facet can be.
MaxWidth Float The maximum width this facet can be.
MinHeight Float The minimum height this facet can be.
MaxHeight Float The maximum height this facet can be.
LastPlacedSize Nullable`1<Float2> The last size that this Facet was placed as.
PreferredSizes direct SyncFieldList`1<Float2> A list of sizes this canvas prefers to be placed when being dropped onto a facet holder.
AllowedAspectRatios direct SyncFieldList`1<Float2> A list of allowed ratios between width and height this facet allows when being placed, lest the placement guide turns red and prevents placement.
IsStandalone Bool Whether this facet has not been placed in a dash or otherwise and is out in free form space.
Canvas Canvas The canvas being used for the visuals of this Facet.

Usage

See Facets.

Examples

See Facets.

See Also