First, the basic configuration
Second, create a startup script Entitas
The script is created and assigned to the scene empty objects.
The script action:
Using Unity lifecycle API, the basic framework of the life cycle interface calls look, this framework code will work.
using Entitas;
using UnityEngine;
namespace Game
{
public class GameController : MonoBehaviour
{
Systems _system;
public void Start()
{
_system = new Feature("Systems");
_system.Initialize();
}
private void Update()
{
_system.Execute();
_system.Cleanup();
}
private void OnDestroy()
{
_system.TearDown();
}
}
}