Class FloatingContainer
Inheritance
Inherited Members
Namespace: GameKit.Dependencies.Utilities.Types.CanvasContainers
Assembly: GameKit.Dependencies.dll
Syntax
public class FloatingContainer : CanvasGroupFader
Fields
EdgeAvoidance
How much to avoid screen edges when being moved.
Declaration
[Tooltip("How much to avoid screen edges when being moved.")]
[SerializeField]
protected Vector2 EdgeAvoidance
Field Value
Type | Description |
---|---|
UnityEngine.Vector2 |
RectTransform
RectTransform to move.
Declaration
[Tooltip("RectTransform to move.")]
[SerializeField]
protected RectTransform RectTransform
Field Value
Type | Description |
---|---|
UnityEngine.RectTransform |
UseEdgeAvoidance
True to use edge avoidance.
Declaration
[Tooltip("True to use edge avoidance.")]
[SerializeField]
protected bool UseEdgeAvoidance
Field Value
Type | Description |
---|---|
System.Boolean |
Methods
AttachGameObject(GameObject)
Attachs a gameObject as a child of this object and sets transform valus to default.
Declaration
public void AttachGameObject(GameObject go)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.GameObject | go | GameObject to attach. |
Move()
Moves to configured goals.
Declaration
protected virtual void Move()
Show(Transform, Nullable<Vector2>)
Shows the container.
Declaration
public virtual void Show(Transform startingPoint, Vector2? edgeAvoidanceOverride = null)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Transform | startingPoint | Transform to use for position, rotation, and scale. |
System.Nullable<UnityEngine.Vector2> | edgeAvoidanceOverride | How far to keep the RectTransform from the edge. If null serialized avoidance will be used. |
Show(Vector3, Nullable<Vector2>)
Shows the container.
Declaration
public virtual void Show(Vector3 position, Vector2? edgeAvoidanceOverride = null)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | position | Position to use. |
System.Nullable<UnityEngine.Vector2> | edgeAvoidanceOverride | How far to keep the RectTransform from the edge. If null serialized avoidance will be used. |
Show(Vector3, Quaternion, Nullable<Vector2>)
Shows the container.
Declaration
public virtual void Show(Vector3 position, Quaternion rotation, Vector2? edgeAvoidanceOverride = null)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | position | Position to use. |
UnityEngine.Quaternion | rotation | Rotation to use. |
System.Nullable<UnityEngine.Vector2> | edgeAvoidanceOverride | How far to keep the RectTransform from the edge. If null serialized avoidance will be used. |
Show(Vector3, Quaternion, Vector3, Vector2, Nullable<Vector2>)
Shows the container.
Declaration
public virtual void Show(Vector3 position, Quaternion rotation, Vector3 scale, Vector2 pivot, Vector2? edgeAvoidanceOverride = null)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | position | Position to use. |
UnityEngine.Quaternion | rotation | Rotation to use. |
UnityEngine.Vector3 | scale | Scale to use. |
UnityEngine.Vector2 | pivot | Pivot for rectTransform. |
System.Nullable<UnityEngine.Vector2> | edgeAvoidanceOverride | How far to keep the RectTransform from the edge. If null serialized avoidance will be used. |
UpdateEdgeAvoidance(Nullable<Vector2>, Boolean)
Updates how much edge avoidance to use. When null serialized values are used.
Declaration
public virtual void UpdateEdgeAvoidance(Vector2? edgeAvoidanceOverride = null, bool move = true)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<UnityEngine.Vector2> | edgeAvoidanceOverride | How far to keep the RectTransform from the edge. If null serialized avoidance will be used. |
System.Boolean | move | True to move the RectTransform after updating. |
UpdatePivot(Vector2, Boolean)
Updates the rectTransform pivot.
Declaration
public virtual void UpdatePivot(Vector2 pivot, bool move = true)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector2 | pivot | New pivot. |
System.Boolean | move | True to move the RectTransform after updating. |
UpdatePosition(Vector3, Boolean)
Updates to a new position.
Declaration
public virtual void UpdatePosition(Vector3 position, bool move = true)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | position | Next position. |
System.Boolean | move | True to move towards new position. |
UpdatePositionAndRotation(Vector3, Quaternion, Boolean)
Updates to a new position and rotation.
Declaration
public virtual void UpdatePositionAndRotation(Vector3 position, Quaternion rotation, bool move = true)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | position | Next position. |
UnityEngine.Quaternion | rotation | Next rotation. |
System.Boolean | move | True to move the RectTransform after updating. |
UpdatePositionRotationAndScale(Vector3, Quaternion, Vector3, Boolean)
Updates to a new position, rotation, and scale.
Declaration
public virtual void UpdatePositionRotationAndScale(Vector3 position, Quaternion rotation, Vector3 scale, bool move = true)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | position | Next position. |
UnityEngine.Quaternion | rotation | Next rotation. |
UnityEngine.Vector3 | scale | Next scale. |
System.Boolean | move | True to move the RectTransform after updating. |
UpdateRotation(Quaternion, Boolean)
Updates to a new rotation.
Declaration
public virtual void UpdateRotation(Quaternion rotation, bool move = true)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Quaternion | rotation | Next rotation. |
System.Boolean | move |
UpdateScale(Vector3, Boolean)
Updates to a new scale.
Declaration
public virtual void UpdateScale(Vector3 scale, bool move = true)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | scale | Next scale. |
System.Boolean | move | True to move the RectTransform after updating. |