/ReeseUnityDemos

Unity packages and demos—emphasizing ECS, jobs and the Burst compiler—by me, Reese.

Primary LanguageC#MIT LicenseMIT

ReeseUnityDemos

Discord Shield

Unity packages and demos—emphasizing ECS, jobs and the Burst compiler—by me, Reese.

Packages

This project is a UPM package monorepo that supports the included demos, featuring:

  1. Nav - DOTS navigation with auto-jumping agents and movable surfaces.
  2. Spawning - Generic DOTS runtime spawning for any combination of prefab, components, and buffers (not compatible with IL2CPP).
  3. Randomization - Unity.Mathematics.Random number generators in jobs, including Burst-capable ones.

All of my packages are available on OpenUPM.

Demos

Here's how my articles on reeseschultz.com relate to samples in this project:

Video of agents navigating complex terrain.

Assets/Scenes/Nav/NavTerrainDemo.unity.

Video of agents jumping across moving surfaces.

Assets/Scenes/Nav/NavMovingJumpDemo.unity.

Video of agents spawning and avoiding obstacles.

Assets/Scenes/Nav/NavPerformanceDemo.unity.

Video of an agent moving to point-and-clicked destinations.

Assets/Scenes/Nav/NavPointAndClickDemo.unity.


Video of changing prefab colors with Unity ECS.

Assets/Scenes/PointAndClickDemo.unity.


Video of projectile motion demonstration with Unity DOTS.

Assets/Scenes/ProjectileDemo.unity


Assets/Scenes/ProjectileDemo.unity

Assets/Scenes/SpawnDemo.unity

Assets/Scenes/Nav/NavPerformanceDemo.unity


Assets/Scenes/ProjectileDemo.unity


Video of spawning prefabs with Unity ECS.

Assets/Scenes/SpawnDemo.unity


IL2CPP

The demos may use the spawning package, which isn't compatible with IL2CPP. Keep that in mind when building and running scenes.

Linux & You

Linux users may need to do some extra work to get the project and/or packages up and running.

Mono Setup

Install Mono by following these directions.

Burst Prerequisite Setup

Avoid sandboxing Unity Hub and Unity with Flatpak or Snap, otherwise libdl.so may be inaccessible to the editor.

Also, on Ubuntu, you may need to manually install gcc-multilib and libncurses5 with:

sudo apt install gcc-multilib libncurses5

IL2CPP Setup

If, despite prior warning, you still want to use IL2CPP, note that you need to install clang on Ubuntu via:

sudo apt install clang

Contributing

Find a problem, or have an improvement in mind? Great. Go ahead and submit a pull request. Note that the maintainer offers no assurance he will respond to you, fix bugs or add features on your behalf in a timely fashion, if ever. All that said, GitHub Issues is fine for constructive discussion.

By submitting a pull request, you agree to license your work under this project's MIT license.