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 System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using Unity.QuickSearch; | |
using UnityEngine; | |
using System; | |
using UnityEditor; | |
using UnityEditorInternal; | |
public class TagProvider : MonoBehaviour |
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; | |
using Unity.Collections; | |
using Unity.Jobs; | |
public class NativeListExample : MonoBehaviour | |
{ | |
JobHandle handle; | |
NativeQueue<int> queue; | |
NativeList<int> list; |
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 Unity.Transforms; | |
using Unity.Collections; | |
using Unity.Mathematics; | |
using Unity.Jobs; | |
public class NewComponentDataArrayWithJobSampleSystem : JobComponentSystem | |
{ | |
ComponentGroup playerGroup, enemyGroup; |
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 Unity.Transforms; | |
using Unity.Collections; | |
using Unity.Mathematics; | |
public class NewComponentDataArraySampleSystem : ComponentSystem | |
{ | |
ComponentGroup playerGroup, enemyGroup; | |
protected override void OnCreateManager() |
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; | |
using Unity.Entities; | |
public class DamageSystem : ComponentSystem | |
{ | |
protected override void OnCreateManager() | |
{ | |
RequireSingletonForUpdate<Score>(); // Scoreがある場合のみSystemが動作するようにする | |
} |
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 System.Collections; | |
using System.Collections.Generic; | |
using Unity.Burst; | |
using Unity.Collections; | |
using Unity.Collections.LowLevel.Unsafe; | |
using Unity.Entities; | |
using Unity.Jobs; | |
using Unity.Jobs.LowLevel.Unsafe; | |
using Unity.Transforms; | |
using UnityEngine; |
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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using Unity.Jobs; | |
using UnityEngine.Jobs; | |
using Unity.Collections; | |
using Unity.Mathematics; | |
public class IJobParallelForFilterTest : MonoBehaviour | |
{ |
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 |
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 Unity.Transforms; | |
public class SampleSystem2 : ComponentSystem | |
{ | |
ComponentGroup _group; | |
protected override void OnCreateManager() | |
{ | |
_group = GetComponentGroup( |