Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Interesting fusion of polymorphic MonoBehaviours and ECS in the source code for this one.  I was on the latest commit (not playing on Windows) and missed out on the project impact effects, but get how this could become spectacular at scale.

I’m trying to implement the “Data-Driven Event System in Unity ECS”. But I cannot figure out how. So i write it to buffer singleton. And that will be read by mono.

Still trying to make it cleaner callbacks, and is that efficient? The code works fine though. Any thoughts?

(1 edit)

Your guess is better than mine when it comes to mixing ECS and MonoBehaviours; I've scrupulously avoided trying to do that.  In just ECS, I think the answer would depend on what the events record.  If there is a large volume of sequential accumulative events applied to a single entity, I'd probably try to pile them up in a DynamicBuffer of each event type and the process them in a later system.  If the events are singular, then maybe they could be enableable components on the entities to which they apply.  I'm still figuring out these things too, though, especially compared to those experienced users (e.g. tertle) who have a whole framework for broadcasting and consuming events in serial.