Skip to content

ckendal3/Unity-ECS-Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Unity-ECS-Example

Purpose

This repo is a testing ground for Unity's ECS system. It will contain examples for key systems such as movement and lifetime systems. Hopefully it helps others taking the first step into the realm of "Performance by Default"...

Instructions

There is only one scene in the project. The boostrap file handles the creation of entities (for now) with multiple settings. While most values are random within a given range, the settings exposed to the inspector are used for testing workload specifically.

SpawnType

  • This controls how the cubes spawn. The options are:
    1. None which will not spawn any cubes.
    2. Input which will spawn cubes when the space bar is released.
    3. Timer which will spawn cubes on a timer.

cubeSpawnRate

  • This determines how many seconds in between batches of cubes being spawned.

numCubeToSpawnAtOnce

  • This determines how many cubes to spawn in every batch. (This will be useful for batch instantion)

rotationCube

  • This bool determines if a batch of cubes will have a rotation component added to it and consequently - rotate.

inMesh

- This cannot be null/empty
  • This is the mesh that will be "added" to an entity for rendering.

inMaterial_Primary

- This cannot be null/empty
  • This is the primary instanced material that will be used on the inMesh.

inMaterial_Secondary

- This cannot be null/empty
  • This is the secondary instanced material that will be used on the inMesh.

Future Additions

  • Utilize batch instantions and batch destruction
  • Implement Batch Raycast System for hit detection

From ckendal3

I will try and keep this updated as future versions release.

Please feel free to let me know better ways of doing things or any bugs that you come across.

Created by ckendal3

About

This repo is a testing ground for Unity's ECS as it releases. Current Entities: 0.2.0 preview.13

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages