Skip to content

UIElement

Source: Assets/UpscaleSDK/Core/UI/Runtime/UIElement.cs

class UIElement

Represents a ui element class.

Events

public event Action OnInteracted

Occurs when interacted.

public event Action<bool, bool> OnFocusChanged

Occurs when focus changed.

public event Action<bool, bool> OnEnabledChanged

Occurs when enabled changed.

Properties

public bool IsInFocus

Gets or sets the is in focus.

public bool IsEnabled

Gets or sets the is enabled.

public Layer Layer

Gets or sets the layer.

Methods

public void SetFocus(bool isInFocus)

Sets the focus.

Parameters

Name Description
isInFocus The is in focus.

public void SetEnabled(bool isEnabled)

Sets the enabled.

Parameters

Name Description
isEnabled The is enabled.

public void SetLayer(Layer layer)

Sets the layer.

Parameters

Name Description
layer The layer.

protected virtual void Interact()

Interact.