Photon Fusion 2.0.4

Public Member Functions | Public Attributes | List of all members
NormalizedRectAttribute Class Reference

Enables a special inspector drawer for Unity Rect type, specially designed for editing RectTransforms using normalized values. More...

Inherits PropertyAttribute.

Public Member Functions

 NormalizedRectAttribute (bool invertY=true, float aspectRatio=0)
 Constructor for NormalizedRectAttribute. InvertY inverts Y handling, for RectTransforms which treat lowerRight as origin, rather than upper left. More...
 

Public Attributes

float AspectRatio
 Set the Aspect Ratio More...
 
bool InvertY
 Signal if Y should be inverted More...
 

Detailed Description

Enables a special inspector drawer for Unity Rect type, specially designed for editing RectTransforms using normalized values.

Constructor & Destructor Documentation

◆ NormalizedRectAttribute()

NormalizedRectAttribute ( bool  invertY = true,
float  aspectRatio = 0 
)

Constructor for NormalizedRectAttribute. InvertY inverts Y handling, for RectTransforms which treat lowerRight as origin, rather than upper left.

Parameters
invertYInvert Y handling
aspectRatioExpressed as Width/Height, this defines the ratio of the box shown in the inspector. Value of 0 indicates game window resolution will be used.

Member Data Documentation

◆ AspectRatio

float AspectRatio

Set the Aspect Ratio

◆ InvertY

bool InvertY

Signal if Y should be inverted