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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Visual Studio Code Editor 'Implement method' shortcut

Discussion in 'Editor & General Support' started by giggioz, Oct 24, 2021.

  1. giggioz

    giggioz

    Joined:
    May 11, 2017
    Posts:
    52
    I don't know where to post this, hope this is the right channel:

    After struggling 2 days to make Visual Studio Code EDITOR working on my Macbook Pro I realized that there is no 'implement this method' shortcut to create a method in a class when you're coding.

    Similar problem when I add a Class that needs a library (for example Button needs UnityEngine.UI) I don't have the option to automatically add the missing library.

    Please, tell me that it does exist and I'm just not able to find out.
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,779
    This may help you with intellisense and possibly other Visual Studio integration problems:

    Sometimes the fix is as simple as doing Assets -> Open C# Project from Unity. Other times it requires more.

    https://forum.unity.com/threads/intellisense-not-working-with-visual-studio-fix.836599/

    Also, try update the VSCode package inside of Unity: Window -> Package Manager -> Search for Visual Studio Code Editor -> Press the Update button

    Also, this: https://forum.unity.com/threads/no-suggestions-in-vscode.955197/#post-6227874
     
  3. giggioz

    giggioz

    Joined:
    May 11, 2017
    Posts:
    52
    My intellisense Is working (Unity objects are showing their methods), i'm not able to insert a method just by clicking it with right mouse Button while i'm coding.
    For example
    myInstance.methodThatStillDoesntExist(int value)


    By the way, I'm using Visual Studio Code Editor, not Visual Studio
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,779
    Oh gotcha, I've never bothered with that one, I just copy/paste the name and hammer the function in.

    I am in way too many different languages regularly to begin to rely on that feature!

    Good luck.