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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Beginner Question: want to use Vector3 but Visual Studios doesnt know it

Discussion in 'Scripting' started by paulneowalther, Mar 30, 2020.

  1. paulneowalther

    paulneowalther

    Joined:
    Mar 30, 2020
    Posts:
    7
    Its like already said in the title. I want to create a normal Vector3 within my C# file but the the system kind of doesnt know what Vector3 is. And yes I implemented
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    in the begining of my file.
    Please send help.
     
  2. Alvarezmd90

    Alvarezmd90

    Joined:
    Jul 21, 2016
    Posts:
    149
    That sounds odd. Can you please post the code.
     
  3. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,748
    If you don't have any autocomplete/etc in your Visual Studio, try these steps.

    If those don't work post your code, you might be doing something strange there.
     
  4. paulneowalther

    paulneowalther

    Joined:
    Mar 30, 2020
    Posts:
    7
    Wow somehow now the same code is working. I dont know wtf happend there but ok.
    But there is still one small problem. In any video I have seen that the Vector3 lights up blue but it doesnt do that in my file. Does anybody know why?
     
  5. Alvarezmd90

    Alvarezmd90

    Joined:
    Jul 21, 2016
    Posts:
    149
    Strange. Did you check your external tools in preferences?
    Also, is your scripting runtime version set to .NET4.x equivalent?

    Otherwise I suggest rebooting both Unity and Visual Studio altogether.
     
  6. paulneowalther

    paulneowalther

    Joined:
    Mar 30, 2020
    Posts:
    7
    Sorry but i dont know what .NET4.x is. Could you please explain this to me? and how I change it xD
    and i checked the external tools, I selected game developing with unity.
     
  7. Alvarezmd90

    Alvarezmd90

    Joined:
    Jul 21, 2016
    Posts:
    149
    Go to project settings - Player and then other settings. You'll see scripting runtime version under configuration.
     
  8. paulneowalther

    paulneowalther

    Joined:
    Mar 30, 2020
    Posts:
    7
    Well... this option isnt even there xD
    i gooogled it and it shoulb be there
     

    Attached Files:

  9. paulneowalther

    paulneowalther

    Joined:
    Mar 30, 2020
    Posts:
    7
    I downloaded Unity 2019.1 now and set this option to .NET 4. x Equivalent and its somehow working now. Does anybody have an idea how i can make it work in unity 2019.3?