Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tbg10101/DOTS-Hybrid-Simulation-Worlds
A framework for using FixedUpdate in a simulation world which is linked to a GameObject-based presentation layer.
https://github.com/tbg10101/DOTS-Hybrid-Simulation-Worlds
unity unity-dots unity-ecs unity-entities unity3d unity3d-ecs
Last synced: 3 months ago
JSON representation
A framework for using FixedUpdate in a simulation world which is linked to a GameObject-based presentation layer.
- Host: GitHub
- URL: https://github.com/tbg10101/DOTS-Hybrid-Simulation-Worlds
- Owner: tbg10101
- License: mit
- Created: 2020-04-19T18:40:19.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-08-23T15:48:47.000Z (5 months ago)
- Last Synced: 2024-08-23T17:43:49.799Z (5 months ago)
- Topics: unity, unity-dots, unity-ecs, unity-entities, unity3d, unity3d-ecs
- Language: C#
- Homepage:
- Size: 224 KB
- Stars: 29
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-unity3d - DOTS-Hybrid-Simulation-Worlds - A framework for using FixedUpdate in a simulation world which is linked to a GameObject-based presentation layer. (Open Source Repositories / DOTS)
README
# DOTS-Hybrid-Simulation-Worlds
A framework for using FixedUpdate in a simulation world which is linked to a GameObject-based presentation layer.
# How To
Each instance of the Bootstrapper class contains it's own world.This handles simulation and presentation a little differently than the default Unity world:
* Simulation systems are run during Unity's FixedUpdate. Presentation still runs during Update so there are utilities and examples that demonstrate how to render an interpolated simulation state.
* The top level system groups are not sorted using UpdateAfter/UpdateBefore annotations. Instead they execute in the order configured in the inspector. Other groups can be sorted using those annotations if you want.Systems are set up to do presentation using GameObjects. Your custom Components should inherit from EntityMonoBehaviour instead of MonoBehaviour.
Prefabs and EntityArchetypes are managed in the Bootstrapper class as well. Utility methods for creation and destruction are provided to ease the management of the simulation and presentation sides of an object.
Add a GameObject with ResetDotsOnDestroy into your scene to clean things up when the scene transitions.
Remember to add `UNITY_DISABLE_AUTOMATIC_SYSTEM_BOOTSTRAP` to the Scripting Define Symbols in Project Settings > Player if you want to turn off the default world that Unity creates. This doesn't stop you from using any of the default systems but you will need to set them up in a Bootstrapper.
See the Example scene for more information.
# Development Environment
Turn on `.csproj` generation for local packages to enable IDE analysis of package files.