RichMonoBehaviour

RichMonoBehaviour is a base class for all UItools components.

Details

It contains base methods and variables that can be used for any UItools component.

In editor view there is a two general options for each component.  Event OnInitFinish and initOnStart option.

Summary
RichMonoBehaviourRichMonoBehaviour is a base class for all UItools components.
Properties
IsInitializedIs current component already initialized or not
Functions
Init ()Initialize current component if it’s not initialized yet
InitForce ()Force component initialization
Variables
initOnStartShould this component be initialized at Start or not
OnInitFinishThis UnityEvent is called when initialization is finished

Properties

IsInitialized

public bool IsInitialized { get }

Is current component already initialized or not

Functions

Init ()

public void Init(bool force = false)

Initialize current component if it’s not initialized yet

GetComponent<UIItem>().Init();

You can force component re-init by passing true as a parameter.

GetComponent<UIItem>().Init(true);

But it’s better to use special helper method for that InitForce ()

Parameters

forcebool, defines should initialization be forced or not.  Default - false

InitForce ()

public void InitForce()

Force component initialization

It means that IsInitialized value will be ignored.

GetComponent<UIItem>().InitForce();

Variables

initOnStart

public bool initOnStart

Should this component be initialized at Start or not

OnInitFinish

public UnityEvent OnInitFinish

This UnityEvent is called when initialization is finished

You can subscribe any of your functions to this event.

GetComponent<UIItem>().OnInitFinish.AddListener(ItemInitFinished);

...

void ItemInitFinished() {
    Debug.Log("Item initialized");
}
UIGroup component allows you to create a group of items and get access to any item by name or id.
UIItem is one of the base components that implements core item properties.
UIStateItemExtention is a mediator class of all UIStateItem extension classes
RichMonoBehaviour is a base class for all UItools components.
public bool IsInitialized { get }
Is current component already initialized or not
public void Init(bool force = false)
Initialize current component if it’s not initialized yet
public void InitForce()
Force component initialization
public bool initOnStart
Should this component be initialized at Start or not
public UnityEvent OnInitFinish
This UnityEvent is called when initialization is finished
Close