예제 #1
0
        /// <summary>
        /// Beware of this engine. Reading directly the input like I am doing in this class is a bad practice
        /// The input should always be read in separate input specialised classes and translated in pure ECS values,
        /// for example in actions. For Jobified engines this is even more important.
        /// It is not possible to mix jobified code with not jobified code without taking care of the dependencies.
        /// Completing a job passed as dependency is also a very bad practice.
        /// However if the job is not completed, race conditions are very likely to occur. Svelto.ECS is not thread safe
        /// and in this specific case building entities would cause a race condition of entities are built
        /// in jobified engines too.
        /// In this case I solved the problem using the NativeEntityFactory which is by design thread safe.
        /// </summary>
        /// <param name="inputDeps"></param>
        /// <returns></returns>
        public JobHandle Execute(JobHandle _jobHandle)
        {
            UIInteractionRunner.Step();

            return(_jobHandle);
        }
예제 #2
0
        /// <summary>
        /// Beware of this engine. Reading directly the input like I am doing in this class is a bad practice
        /// The input should always be read in separate input specialised classes and translated in pure ECS values,
        /// for example in actions. For Jobified engines this is even more important.
        /// It is not possible to mix jobified code with not jobified code without taking care of the dependencies.
        /// Completing a job passed as dependency is also a very bad practice.
        /// However if the job is not completed, race conditions are very likely to occur. Svelto.ECS is not thread safe
        /// and in this specific case building entities would cause a race condition of entities are built
        /// in jobified engines too.
        /// In this case I solved the problem using the NativeEntityFactory which is by design thread safe.
        /// </summary>
        /// <param name="inputDeps"></param>
        /// <returns></returns>
        public JobHandle Execute(JobHandle inputDeps)
        {
            UIInteractionRunner.Step();

            return(inputDeps);
        }