Search Results for

    Class SUiElement<T>

    Inheritance
    object
    SUiElement
    SUiElement<T>
    SBgButtonOptions
    SButtonOptions
    SContainerOptions
    SLabelDividerOptions
    SMaskedImageOptions
    SMenuButtonOptions
    SUiElement<T, TData>
    Inherited Members
    SUiElement.RectTransform
    SUiElement.Root
    SUiElement.Parent
    SUiElement._id
    SUiElement._classes
    SUiElement.SetParent(Transform)
    SUiElement.SetParent(SUiElement)
    SUiElement.Remove()
    SUiElement.As<T>()
    SUiElement.GetClass(string)
    SUiElement.GetOrAdd<T>()
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: SUI
    Assembly: SonsSdk.dll
    Syntax
    public class SUiElement<T> : SUiElement
    Type Parameters
    Name Description
    T

    Constructors

    SUiElement(GameObject)

    Declaration
    public SUiElement(GameObject root)
    Parameters
    Type Name Description
    GameObject root

    Fields

    TextObject

    Declaration
    protected TMP_Text TextObject
    Field Value
    Type Description
    TMP_Text

    VisibilityObservable

    Declaration
    protected Observable<bool> VisibilityObservable
    Field Value
    Type Description
    Observable<bool>

    Properties

    this[string]

    Declaration
    public SUiElement this[string id] { get; }
    Parameters
    Type Name Description
    string id
    Property Value
    Type Description
    SUiElement

    Methods

    Active(bool)

    Set the root gameobject to active or inactive

    Declaration
    public T Active(bool active)
    Parameters
    Type Name Description
    bool active
    Returns
    Type Description
    T

    Add(SUiElement)

    Declaration
    public virtual T Add(SUiElement element)
    Parameters
    Type Name Description
    SUiElement element
    Returns
    Type Description
    T

    Anchor(AnchorType)

    Set the rect anchor

    Declaration
    public T Anchor(AnchorType anchorType)
    Parameters
    Type Name Description
    AnchorType anchorType
    Returns
    Type Description
    T

    AspectRatio(AspectMode)

    Sets the aspect ratio mode for the objects's aspect ratio fitter.

    Declaration
    public T AspectRatio(AspectRatioFitter.AspectMode mode)
    Parameters
    Type Name Description
    AspectMode mode

    The aspect ratio mode to apply.

    Returns
    Type Description
    T

    BindVisibility(Observable<bool>)

    Binds the visibility of the container to an observable boolean value.

    Declaration
    public T BindVisibility(Observable<bool> observable)
    Parameters
    Type Name Description
    Observable<bool> observable

    The observable boolean value to bind to.

    Returns
    Type Description
    T

    Class(string)

    Declaration
    public T Class(string classes)
    Parameters
    Type Name Description
    string classes
    Returns
    Type Description
    T

    Dock(EDockType)

    An abstraction of the anchor and offset settings

    Declaration
    public T Dock(EDockType type)
    Parameters
    Type Name Description
    EDockType type
    Returns
    Type Description
    T

    Find<TObj>(string)

    Finds a child object and returns it as a SUiElement

    Declaration
    public TObj Find<TObj>(string path) where TObj : SUiElement
    Parameters
    Type Name Description
    string path
    Returns
    Type Description
    TObj
    Type Parameters
    Name Description
    TObj

    FlexHeight(float)

    Declaration
    public T FlexHeight(float height)
    Parameters
    Type Name Description
    float height
    Returns
    Type Description
    T

    FlexWidth(float)

    Declaration
    public T FlexWidth(float width)
    Parameters
    Type Name Description
    float width
    Returns
    Type Description
    T

    FontAutoSize(bool)

    Toggle auto sizing of the main text object

    Declaration
    public T FontAutoSize(bool enabled)
    Parameters
    Type Name Description
    bool enabled
    Returns
    Type Description
    T

    FontColor(string)

    Declaration
    public T FontColor(string color)
    Parameters
    Type Name Description
    string color
    Returns
    Type Description
    T

    FontColor(Color)

    Set the font color of the main text object

    Declaration
    public T FontColor(Color color)
    Parameters
    Type Name Description
    Color color
    Returns
    Type Description
    T

    FontSize(int)

    Set the font size of the main text object

    Declaration
    public virtual T FontSize(int size)
    Parameters
    Type Name Description
    int size
    Returns
    Type Description
    T

    HFill()

    Sets the anchor and offsets to fill horizontally

    Declaration
    public T HFill()
    Returns
    Type Description
    T

    HOffset(float, float)

    Set the vertical rect offset

    Declaration
    public T HOffset(float left, float right)
    Parameters
    Type Name Description
    float left
    float right
    Returns
    Type Description
    T

    Height(float)

    Set the size delta height of the rect transform

    Declaration
    public T Height(float height)
    Parameters
    Type Name Description
    float height
    Returns
    Type Description
    T

    Id(string)

    Declaration
    public T Id(string id)
    Parameters
    Type Name Description
    string id
    Returns
    Type Description
    T

    MHeight(float)

    Set the minimum height of the layout element

    Declaration
    public T MHeight(float height)
    Parameters
    Type Name Description
    float height
    Returns
    Type Description
    T

    MWidth(float)

    Set the minimum width of the layout element

    Declaration
    public T MWidth(float width)
    Parameters
    Type Name Description
    float width
    Returns
    Type Description
    T

    MaxOffset(int?, int?)

    Set the maximum offset of the rect transform

    Declaration
    public T MaxOffset(int? x = null, int? y = null)
    Parameters
    Type Name Description
    int? x
    int? y
    Returns
    Type Description
    T

    MinOffset(int?, int?)

    Set the minimum offset of the rect transform

    Declaration
    public T MinOffset(int? x = null, int? y = null)
    Parameters
    Type Name Description
    int? x
    int? y
    Returns
    Type Description
    T

    Name(string)

    Declaration
    public T Name(string name)
    Parameters
    Type Name Description
    string name
    Returns
    Type Description
    T

    OnClick(Action)

    Fire an action when the container is clicked (FOR BUTTONS USE .Notify() INSTEAD)

    Declaration
    public T OnClick(Action action)
    Parameters
    Type Name Description
    Action action
    Returns
    Type Description
    T

    PHeight(float)

    Set the preferred height of the layout element

    Declaration
    public T PHeight(float height)
    Parameters
    Type Name Description
    float height
    Returns
    Type Description
    T

    PWidth(float)

    Set the preferred width of the layout element

    Declaration
    public T PWidth(float width)
    Parameters
    Type Name Description
    float width
    Returns
    Type Description
    T

    Pivot(float?, float?)

    Set the rect pivot

    Declaration
    public T Pivot(float? x = null, float? y = null)
    Parameters
    Type Name Description
    float? x
    float? y
    Returns
    Type Description
    T

    Position(float?, float?)

    Set the anchor position of the rect transform

    Declaration
    public T Position(float? x, float? y = null)
    Parameters
    Type Name Description
    float? x
    float? y
    Returns
    Type Description
    T

    Ppu(float)

    Sets the pixels per unit multiplier for the object's image.

    Declaration
    public T Ppu(float ppu)
    Parameters
    Type Name Description
    float ppu
    Returns
    Type Description
    T

    RectPadding(float)

    Set the offsets of the rect transform

    Declaration
    public T RectPadding(float padding)
    Parameters
    Type Name Description
    float padding
    Returns
    Type Description
    T

    RectPadding(float, float)

    Set the offsets of the rect transform

    Declaration
    public T RectPadding(float rightLeft, float topBottom)
    Parameters
    Type Name Description
    float rightLeft
    float topBottom
    Returns
    Type Description
    T

    RectPadding(float, float, float, float)

    Set the offsets of the rect transform

    Declaration
    public T RectPadding(float left, float right, float top, float bottom)
    Parameters
    Type Name Description
    float left
    float right
    float top
    float bottom
    Returns
    Type Description
    T

    RichText(string)

    Set the text of the main text object as rich text

    Declaration
    public virtual T RichText(string text)
    Parameters
    Type Name Description
    string text
    Returns
    Type Description
    T

    Size(float?, float?)

    Set the size delta of the rect transform

    Declaration
    public T Size(float? width = null, float? height = null)
    Parameters
    Type Name Description
    float? width
    float? height
    Returns
    Type Description
    T

    Size(Vector2)

    Set the size delta of the rect transform

    Declaration
    public T Size(Vector2 size)
    Parameters
    Type Name Description
    Vector2 size
    Returns
    Type Description
    T

    Text(string)

    Set the text of the main text object

    Declaration
    public virtual T Text(string text)
    Parameters
    Type Name Description
    string text
    Returns
    Type Description
    T

    Toggle()

    Toggle the root gameobject

    Declaration
    public T Toggle()
    Returns
    Type Description
    T

    UnbindVisibility()

    Unbinds the visibility of the container from any previously bound observable.

    Declaration
    public T UnbindVisibility()
    Returns
    Type Description
    T

    VFill()

    Sets the anchor and offsets to fill vertically

    Declaration
    public T VFill()
    Returns
    Type Description
    T

    VOffset(float, float)

    Set the horizontal rect offset

    Declaration
    public T VOffset(float top, float bottom)
    Parameters
    Type Name Description
    float top
    float bottom
    Returns
    Type Description
    T

    VisibilityObservalbleChanged(bool)

    Declaration
    protected virtual void VisibilityObservalbleChanged(bool value)
    Parameters
    Type Name Description
    bool value

    Visible(bool)

    Set the visibility of the element (by setting the alpha and blocking raycasts)

    Declaration
    public T Visible(bool visible)
    Parameters
    Type Name Description
    bool visible
    Returns
    Type Description
    T

    Width(float)

    Set the size delta width of the rect transform

    Declaration
    public T Width(float width)
    Parameters
    Type Name Description
    float width
    Returns
    Type Description
    T