Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Question Intellisense not working when coding non-monobehaviour scripts

Discussion in 'Code Editors & IDEs' started by karderos, Jul 27, 2023.

  1. karderos

    karderos

    Joined:
    Mar 28, 2023
    Posts:
    376
    I am using visual studio and everything works correctly, intellisense auto complete works

    but only when I am coding inside a monobehaviour script

    when I create something like an editor script

    Intellisense doesnt work in the editor script, so I end up coding inside a monobehaviour script and then I just paste it to the editor script

    Is this a known issue?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    39,420
    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.

    Other times it requires you also nuke the userprefs and .vsconfig and other crufty low-value high-hassle files that Visual Studio tends to slowly damage over time, then try the above trick.

    Barring all that, move on to other ideas:

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

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

    Update: The VSC extension has been deprecated.

    https://forum.unity.com/threads/update-on-the-visual-studio-code-package.1302621/

    There is a community fork available that is receiving updates.

    https://github.com/Chizaruu/com.tsk.ide.vscode

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

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    8,417
    The type of script you're making should have no difference on Intellisense working. Are you just forgetting to include
    using
    's?
     
  4. karderos

    karderos

    Joined:
    Mar 28, 2023
    Posts:
    376
    it shouldnt be the usings right? the script works even without the intellisense detecting anything