Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Updateの前後でシステムを動かす例
using UnityEngine;
public class AnyUpdate : MonoBehaviour
{
void Update () {
Debug.Log("update");
}
}
using Unity.Entities;
using UnityEngine;
[UpdateAfter(typeof(UnityEngine.Experimental.PlayerLoop.Update))]
[AlwaysUpdateSystem]
public class SampleSystem2 : ComponentSystem
{
protected override void OnUpdate()
{
Debug.Log("system : update after");
}
}
using Unity.Entities;
using UnityEngine;
[UpdateBefore(typeof( UnityEngine.Experimental.PlayerLoop.Update))]
[AlwaysUpdateSystem]
public class SampleSystem3 : ComponentSystem
{
protected override void OnUpdate()
{
Debug.Log("system : update before");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment