HKI Core
InitializerLoader.cs
Go to the documentation of this file.
1 using UnityEngine;
2 
3 namespace HKI.Core.Init
4 {
8  public class InitializerLoader
9  {
10  [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
12  {
13  Initializer initializer = Resources.Load<Initializer>("Initializer");
14 
15  if(initializer != null)
16  initializer.Init();
17  else
18  Debug.LogError("InitializerLoader.OnBeforeSceneLoadRuntimeMethod(): Couldn't load the Initializer! Probably there is no Initializer in a Resource folder.");
19  }
20  }
21 }
void Init()
This function will be called at the start of the game. It will initialize special system like setting...
Definition: Initializer.cs:48
This class loads the Initializer from the resource folder and starts the initialization process...
This Initializer controlls the initialization of anything that implements the IInit interface...
Definition: Initializer.cs:11