Created
September 4, 2018 09:03
Star
You must be signed in to star a gist
Updateの前後でシステムを動かす例
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class AnyUpdate : MonoBehaviour | |
{ | |
void Update () { | |
Debug.Log("update"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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