UnityEditor integration for ECS framework.
This software in work-in-progress stage.
Tested / developed on unity 2017.3 and contains assembly definition for compiling to separate assembly file for performance reason.
Dependent on ECS framework - ECS framework should be imported to unity project first.
Integration can be processed with one call of LeopotamGroup.Ecs.UnityIntegration.EcsWorldObserver.Create()
metod - this call should be wrapped to #if UNITY_EDITOR
preprocessor define:
public class Startup : MonoBehaviour {
EcsSystems _systems;
void Start () {
var world = new EcsWorld ();
#if UNITY_EDITOR
UnityIntegration.EcsWorldObserver.Create (world);
#endif
_systems = new EcsSystems(world)
.Add (new RunSystem1());
// Additional initialization here...
_systems.Initialize ();
}
}
Observer must be created before any entity will be created in ecs-world.
Integration can be processed with one call of LeopotamGroup.Ecs.UnityIntegration.EcsSystemsObserver.Create()
metod - this call should be wrapped to #if UNITY_EDITOR
preprocessor define:
public class Startup : MonoBehaviour {
EcsSystems _systems;
void Start () {
var world = new EcsWorld ();
#if UNITY_EDITOR
UnityIntegration.EcsWorldObserver.Create (world);
#endif
_systems = new EcsSystems(world)
.Add (new RunSystem1());
// Additional initialization here...
_systems.Initialize ();
#if UNITY_EDITOR
UnityIntegration.EcsSystemsObserver.Create (_systems);
#endif
}
}
By design, observer works as readonly copy of ecs world data.
By design, inspector will be updated only on any unity editor interaction. For example, you can click inside inspector and component's data will be updated.
The software released under the terms of the MIT license. Enjoy.