Instantly share code, notes, and snippets.

Embed
What would you like to do?
using UnityEngine;
using UnityEngine.Experimental.LowLevel;
public class SpawnSystem
{
[RuntimeInitializeOnLoadMethod()]
static void Init()
{
var mySystem = new PlayerLoopSystem()
{
type = typeof(MyLoopSystemUpdate),
updateDelegate = () =>
{
Debug.Log("DO IT!!!");
}
};
var playerLoop = new PlayerLoopSystem();
playerLoop.subSystemList = new PlayerLoopSystem[] { mySystem };
PlayerLoop.SetPlayerLoop(playerLoop);
}
public struct MyLoopSystemUpdate{ }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment