protected override JobHandle OnUpdate(JobHandle inputDeps)
        {
            var job = new ConvertJob()
            {
                m_charaMoves = m_group.GetComponentDataArray <CharaMove>(),
                m_positions  = m_group.GetComponentDataArray <Position>(),
            };

            inputDeps = job.Schedule(inputDeps);
            inputDeps.Complete();
            return(inputDeps);
        }
        protected override JobHandle OnUpdate(JobHandle inputDeps)
        {
            NativeArray <CharaLook> charaLooks = m_query.ToComponentDataArray <CharaLook>(Allocator.TempJob);
            NativeArray <CharaMuki> charaMukis = m_query.ToComponentDataArray <CharaMuki>(Allocator.TempJob);

            var job = new ConvertJob()
            {
                m_charaLooks = charaLooks,
                m_charaMukis = charaMukis,
            };

            inputDeps = job.Schedule(inputDeps);
            inputDeps.Complete();

            m_query.CopyFromComponentDataArray(job.m_charaLooks);
            charaLooks.Dispose();
            charaMukis.Dispose();

            return(inputDeps);
        }
Exemple #3
0
        protected override JobHandle OnUpdate(JobHandle inputDeps)
        {
            NativeArray <CharaPos>    charaPoses = m_query.ToComponentDataArray <CharaPos>(Allocator.TempJob);
            NativeArray <Translation> positions  = m_query.ToComponentDataArray <Translation>(Allocator.TempJob);

            var job = new ConvertJob()
            {
                m_charaPoses = charaPoses,
                m_positions  = positions,
            };

            inputDeps = job.Schedule(inputDeps);
            inputDeps.Complete();

            m_query.CopyFromComponentDataArray(job.m_positions);

            charaPoses.Dispose();
            positions.Dispose();

            return(inputDeps);
        }