// Update is called once per frame
 void Update()
 {
     m_Job = new MeshJob()
     {
         deltaTime = Time.deltaTime,
         moveSpeed = Vector3.right * SpeedParam,
         ListV     = Listpt,
         Length    = Count
     };
     m_JobHandle = m_Job.Schedule(Count, 64);
 }
Exemple #2
0
    void ScheduleNewJob()
    {
        job = new MeshJob()
        {
            vertices = vertices,
            uvs      = uvs,
            length   = length,
            width    = width,
            t        = t
        };

        handle = job.Schedule();
    }
    protected override void OnUpdate()
    {
        delta += (Time.DeltaTime * meshController.speed);
        MeshJob meshJob = new MeshJob()
        {
            s          = meshController.yScale,
            d          = delta,
            noiseScale = meshController.noiseScale,
            size       = meshController.size,
            vertices   = meshController.vertices
        };

        var jh = meshJob.Schedule(meshController.vertices.Length, 64, Dependency);

        jh.Complete();
        meshController.mesh.vertices = meshController.vertices.ToArray();
        meshController.mesh.RecalculateNormals();
    }