Last active
March 18, 2019 11:15
-
-
Save tsubaki/9ad30c6bdb97b060b6ee6038f7513ba3 to your computer and use it in GitHub Desktop.
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; | |
public class SampleSystem3 : ComponentSystem | |
{ | |
protected override void OnUpdate() | |
{ | |
Entities.ForEach((Entity entity, ref Score score) => { | |
// EntityManager.DestroyEntity(entity) // エラーが出る | |
PostUpdateCommands.DestroyEntity(entity); // こちらならOK | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment