1. Knowledge Base
  2. Homa Belly SDK
  3. Getting started on Homa Belly

Initialization

Homa Belly is initialized automatically, initializing also all the installed libraries. There is no need to initialize any library manually.

Initialization Callback & Property

Homa Belly does offer a way to be notified when the whole SDK has been initialized: either listening to the event Events.onInitialized or reading the property HomaBelly.Instance.IsInitialized

Example:


// Don't forget to import the HomaBelly namespace
using HomaGames.HomaBelly;

public class MyMonoBehaviour : MonoBehaviour
{
        public void Awake()
        {
            if (!HomaBelly.Instance.IsInitialized)
            {
                // Listen event for initialization
                Events.onInitialized += OnInitialized;
            }
            else
            {
                // Homa Belly already initialized
            }
        }
        
        private void OnDisable()
    {
        Events.onInitialized -= OnInitialized;
    }

        private void OnInitialized()
        {
            // Homa Belly initialized, call any Homa Belly method
        }
}