Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

White Vectors

Discussion in 'Editor & General Support' started by Ichbinbin, May 13, 2021.

  1. Ichbinbin

    Ichbinbin

    Joined:
    Mar 30, 2021
    Posts:
    8
    When I use Vector3, the vectors turn white, why is that and how can I fix it?

    Here is my code, it's just to move an enemy

    Code (CSharp):
    1. gameObject.transform.position -= new Vector3(speed * Time.deltaTime,0,0);
     
  2. Ichbinbin

    Ichbinbin

    Joined:
    Mar 30, 2021
    Posts:
    8
    here is how it looks on my screen:
    upload_2021-5-13_17-48-0.png
     
  3. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
    The
    Vector3
    definition in this image is not white though?
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,762
  5. Ichbinbin

    Ichbinbin

    Joined:
    Mar 30, 2021
    Posts:
    8
    I tried all of your suggestions ,but nothing seems to help.
    also the code does work, it is just white and may just be a visual glitch.
    alost the 'new' is green and the 'Vector3' is yellow, which is weird, because when I just type 'new Vector3' it shows up normal, but when I add the '()', it goes to green, yellow and white instead of the normal blue, green and light blue

    upload_2021-5-14_10-33-53.png
     
    Last edited: May 14, 2021
  6. Ichbinbin

    Ichbinbin

    Joined:
    Mar 30, 2021
    Posts:
    8
    the Vector3 isn't white, it's the code after that