Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Created September 4, 2018 09:03
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save tsubaki/8e3b8deb851068464b50d744d257de41 to your computer and use it in GitHub Desktop.
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