public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem) { var spawnCapsuleData = new SpawnCapsuleData { SpawnInterval = SpawnInterval, SpawnTimer = SpawnInterval, EntityPrefab = conversionSystem.GetPrimaryEntity(CapsulePrefab), Random = Unity.Mathematics.Random.CreateFromIndex(0), MinSpawnPosition = MinSpawnPosition, MaxSpawnPosition = MaxSpawnPosition }; dstManager.AddComponentData(entity, spawnCapsuleData); }
protected override void OnStartRunning() { _spawnCapsuleData = GetSingleton <SpawnCapsuleData>(); }