Class LayoutManager
A Component-based layout manager.
Inherited Members
Namespace: FM.LiveSwitch.Unity
Assembly: FM.LiveSwitch.Unity.dll
Syntax
public class LayoutManager : LayoutManager<RectTransform>
Constructors
LayoutManager(RectTransform)
Initializes a new instance of the LayoutManager class.
Declaration
public LayoutManager(RectTransform container)
Parameters
Type | Name | Description |
---|---|---|
RectTransform | container |
LayoutManager(RectTransform, LayoutPreset)
Initializes a new instance of the LayoutManager class.
Declaration
public LayoutManager(RectTransform container, LayoutPreset preset)
Parameters
Type | Name | Description |
---|---|---|
RectTransform | container | |
LayoutPreset | preset |
Properties
Container
Gets the container.
Declaration
public RectTransform Container { get; }
Property Value
Type | Description |
---|---|
RectTransform |
Mode
Gets or sets the mode used by the layout engine. Defaults to FloatLocal.
Declaration
public override LayoutMode Mode { get; set; }
Property Value
Type | Description |
---|---|
LayoutMode |
Overrides
Methods
AddView(RectTransform)
Adds a view to the container.
Declaration
protected override void AddView(RectTransform view)
Parameters
Type | Name | Description |
---|---|---|
RectTransform | view | The view to add. |
Overrides
FM.LiveSwitch.LayoutManager<RectTransform>.AddView(RectTransform)
Destroy()
Destroys this instance.
Declaration
public void Destroy()
DispatchToMainThread(Action2<Object, Object>, Object, Object)
Dispatches an action to the main thread.
Declaration
protected override void DispatchToMainThread(Action2<object, object> action, object arg1, object arg2)
Parameters
Type | Name | Description |
---|---|---|
Action2<System.Object, System.Object> | action | The action to invoke. |
System.Object | arg1 | The first argument. |
System.Object | arg2 | The second argument. |
Layout()
Positions the local and remote views within the layout.
Declaration
public override void Layout()
Overrides
FM.LiveSwitch.LayoutManager<RectTransform>.Layout()
RemoveView(RectTransform)
Removes a view from the container.
Declaration
protected override void RemoveView(RectTransform view)
Parameters
Type | Name | Description |
---|---|---|
RectTransform | view | The view to remove. |
Overrides
FM.LiveSwitch.LayoutManager<RectTransform>.RemoveView(RectTransform)