using Unity; using System; using Unity.Entities; using Unity.Jobs; public class DOTS_MATRIX_ASSIGNSIN_GLETON : SystemBase { protected override void OnUpdate() { float deltaTime = Time.DeltaTime; Entities .WithName("DumbEntity") .ForEach((Entity entity, ref DEntity data) => { if (!data.set111) { UnityEngine.Debug.Log(string.Format("{0}", data.set111)); if (data.index1 == 1) if (data.index2 == 1) GameBoardModel.playerEntity = data.me; //This line gave an error. data.set111 = true; } }).ScheduleParallel(); } }