Class UILayoutService
Inheritance
System.Object
UILayoutService
Syntax
public static class UILayoutService
Methods
Calculates the dimensions of a RectTransform component using the supplied
values.
Declaration
public static float2 ComputeRectTransformSize(float2 anchorMin, float2 anchorMax, float2 sizeDelta, float2 parentSize)
Parameters
Type |
Name |
Description |
float2 |
anchorMin |
|
float2 |
anchorMax |
|
float2 |
sizeDelta |
|
float2 |
parentSize |
|
Returns
Gets the dimensions of a RectTransform component.
This method assumes that entity has both a Transform component and a
RectTransform component.
Declaration
public static float2 GetRectTransformSizeOfEntity(ComponentSystem sys, Entity entity)
Parameters
Type |
Name |
Description |
ComponentSystem |
sys |
|
Entity |
entity |
|
Returns
Returns the size of the childTransform's parent. If the childTransform
doesn't have a parent, returns the screen size.
Declaration
public static float2 GetRectTransformSizeOfParent(ComponentSystem sys, Entity parent)
Parameters
Type |
Name |
Description |
ComponentSystem |
sys |
|
Entity |
parent |
|
Returns
GetScreenSize(ComponentSystemBase)
Declaration
public static float2 GetScreenSize(ComponentSystemBase sys)
Parameters
Type |
Name |
Description |
ComponentSystemBase |
sys |
|
Returns