Git Product home page Git Product logo

dots-hybrid-simulation-worlds's Introduction

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.

dots-hybrid-simulation-worlds's People

Contributors

tbg10101 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

kyapp69

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.