void ScheduleSceneRead(ReferencedUnityObjects objRefs) { var transaction = _EntityManager.BeginExclusiveEntityTransaction(); SerializeUtilityHybrid.DeserializeObjectReferences(objRefs, out var objectReferences); var loadJob = new AsyncLoadSceneJob { Transaction = transaction, LoadingOperationHandle = GCHandle.Alloc(this), ObjectReferencesHandle = GCHandle.Alloc(objectReferences), FileContent = _FileContent }; _EntityManager.ExclusiveEntityTransactionDependency = loadJob.Schedule(JobHandle.CombineDependencies(_EntityManager.ExclusiveEntityTransactionDependency, _ReadHandle.JobHandle)); }
void ScheduleSceneRead(GameObject sharedComponents) { var transaction = _EntityManager.BeginExclusiveEntityTransaction(); int sharedComponentCount = SerializeUtilityHybrid.DeserializeSharedComponents(_EntityManager, sharedComponents, _ScenePath); if (_ExpectedSharedComponentCount != sharedComponentCount) { _LoadingFailure = $"Expected shared component count ({_ExpectedSharedComponentCount}) didn't match actual shared component count ({sharedComponentCount}) '{_ResourcesPath}'"; _LoadingStatus = LoadingStatus.Completed; return; } var loadJob = new AsyncLoadSceneJob { Transaction = transaction, LoadingOperationHandle = GCHandle.Alloc(this), SharedComponentCount = sharedComponentCount, FileContent = _FileContent }; _EntityManager.ExclusiveEntityTransactionDependency = loadJob.Schedule(JobHandle.CombineDependencies(_EntityManager.ExclusiveEntityTransactionDependency, _ReadHandle.JobHandle)); }