コード例 #1
0
    protected override JobHandle OnUpdate(JobHandle inputDeps)
    {
        FallJob fallJob = new FallJob()
        {
            DeltaTime = Time.deltaTime
        };

        return(fallJob.Schedule(this, inputDeps));
    }
コード例 #2
0
    protected override JobHandle OnUpdate(JobHandle inputDependencies)
    {
        var job = new FallJob
        {
            DeltaTime = Time.deltaTime,
        }.Schedule(this, inputDependencies);

        return(job);
    }
        protected override JobHandle OnUpdate(JobHandle inputDeps)
        {
            var job = new FallJob
            {
                deltaTime = Time.deltaTime,
                parentPos = SnowFallGenerator.position,
            };

            return(job.Schedule(this, 64, inputDeps));
        }
コード例 #4
0
    // OnUpdate runs on the main thread.
    protected override JobHandle OnUpdate(JobHandle inputDependencies)
    {
        var commandBuffer = m_Barrier.CreateCommandBuffer().ToConcurrent();

        var job = new FallJob
        {
            DeltaTime     = Time.deltaTime,
            CommandBuffer = commandBuffer,
        }.Schedule(this, inputDependencies);

        m_Barrier.AddJobHandleForProducer(job);

        return(job);
    }