Hello,
I am very disapointed about system’s lifecicle.
Systems created whenever it need on current level, it looks strange, but we can use [DisableAutoCreation] attribute to manualy create them but theirfor it isnt being added to the update lifecicle.
Is there way of registating system in updated loop except manual updating each system?
here is my system’s code
[DisableAutoCreation]
public class TransformSimplificationSystem : SystemBase
{
protected override void OnUpdate()
{
Entities.ForEach(
(
Transform transform,
HeightComponent heightComponent,
ref DirractionComponent dirractionComponent,
ref Translation translation) =>
{
translation.Value = transform.position;
dirractionComponent.Value = transform.forward;
}).
WithoutBurst().
Run();
Entities.ForEach(
(HeightComponent heightComponent, ref Translation translation) =>
{
Vector3 result = Vector3.up * heightComponent.Value;
float3 r = new float3(result.x, result.y, result.z);
translation.Value = translation.Value + r;
}).
Run();
}
}
creation process
ComponentSystemBase componentSystemBase = World.DefaultGameObjectInjectionWorld.GetOrCreateSystem(type);