Search Unity

Issue: "The previously scheduled job SpriteShapeGenerator writes to the NativeArray SpriteShapeG..."

Discussion in 'Getting Started' started by stephenwitwick, Jul 10, 2020.

  1. stephenwitwick

    stephenwitwick

    Joined:
    Jul 10, 2020
    Posts:
    1
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. private class Move : MonoBehaviour
    6. {
    7.     private void Start(){
    8.      
    9.     }
    10.     public float speed = 20f;
    11.     private void Update() {
    12.         Vector3 pos = transform.position;
    13.  
    14.         if (Input.GetKey("w"))
    15.         {
    16.             pos.z += speed * Time.deltaTime;
    17.         }
    18.         if (Input.GetKey("s"))
    19.         {
    20.             pos.z -= speed * Time.deltaTime;
    21.         }
    22.         if (Input.GetKey("d"))
    23.         {
    24.             pos.x += speed * Time.deltaTime;
    25.         }
    26.         if (Input.GetKey("a"))
    27.         {
    28.             pos.x -= speed * Time.deltaTime;
    29.         }
    30.         transform.position = pos;
    31.      
    32.     }
    33. }
    34.  
    What am I doing wrong?