Пример #1
0
        protected override void OnUpdate()
        {
            if (Count == 0)
            {
                return;
            }

            var dispatcherQueue = _dispatcherSystem.CreateDispatcherQueue <ValueTestData>();
            var count           = Count;

            Job
            .WithCode(
                () =>
            {
                for (var index = 0; index < count; index++)
                {
                    dispatcherQueue.Enqueue(new ValueTestData(index));
                }
            }
                )
            .Run();

            if (AddJobHandleForProducer)
            {
                _dispatcherSystem.AddJobHandleForProducer(Dependency);
            }
        }
Пример #2
0
        protected override void OnUpdate()
        {
            if (Count == 0)
            {
                return;
            }

            var dispatcherQueue = _dispatcherSystem.CreateDispatcherQueue <ZeroSizeTestData>();
            var count           = Count;

            Job
            .WithCode(
                () =>
            {
                for (var index = 0; index < count; index++)
                {
                    dispatcherQueue.Enqueue(default);