This is the Unity Hybrid extension to Leopotam Entity Component System Framework.
Hybrid ECS let you to connect scenes and prefabs of Unity with ECS in easy way. It's working like Unity.Entities.Hybrid
.
You need to install LeoECS and LeoECS Unity Integration to proper work.
This repository can be installed as unity module directly from git url. In this way new line should be added to Packages/manifest.json
:
"com.leopotam.ecs-hybrid": "https://github.com/SH42913/leoecshybrid.git",
By default last released version will be used. If you need trunk / developing version then develop
name of branch should be added after hash:
"com.leopotam.ecs-hybrid": "https://github.com/SH42913/leoecshybrid.git#develop",
HybridEntity
to represent Entity on scene/prefab.- ECS One Frame Component
NewHybridEntityEvent
to let you know about any newHybridEntity
. ComponentWrapper
to add/remove ECS components to HybridEntity. You also can override some methods.- Inspector to
ComponentWrapper
. It will warning you when something went wrong. - Interface
ICanCopyData
.
It's mandatory interface to component inComponentWrapper
, you need to copy every field to other instance to proper work. - ECS Component
UnityObject
to let you refer to GameObject of HybridEntity. - ECS Component
Updated<>
to let you know when component changed from Inspector.
You also can use it to reactive-like systems. Just makeEcsFilter<Updated<Component>>
and fire event with... - Entity Extension
MarkAsUpdated<>
. It will simply addUpdated<>
component to entity. - Abstract mono behaviour
BaseStartup
. You can inherit it to get simple interface for working in Unity. All ECS One Frame components will remove afterlateUpdateSystems
processing.
internal sealed class $STARTUP$ : BaseStartup
{
private void OnEnable() {
CreateWorld();
CreateSystems();
//fixedUpdateSystems.Add(new FixedUpdateSystem());
//updateSystems.Add(new UpdateSystem());
//lateUpdateSystems.Add(new LateUpdateSystem());
//gizmosSystems.Add(new GizmosSystem());
//updateSystems.Inject(something);
FinalizeSystems();
}
}
I also very recommend to think "One startup - one scene" and to decompose your game to scenes!