Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Last active March 18, 2019 11:15
Show Gist options
  • Save tsubaki/9ad30c6bdb97b060b6ee6038f7513ba3 to your computer and use it in GitHub Desktop.
Save tsubaki/9ad30c6bdb97b060b6ee6038f7513ba3 to your computer and use it in GitHub Desktop.
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