VSCode Autocompletion for Nakama classes

Hey,

I’m using VS Code and golang, and when i was watching the fish game videos I saw some nice autocompletion and references in action.
However i don’t get those locally.

Currently my editor doesn’t recognise the Nakama classes like ISocket, IClient, IMatch etc. which makes devving a lot harder than it should be :sweat_smile:

  1. Versions: Nakama 3.9, Mac, Nakama Unity 3.1.1
  2. Server Framework Runtime language Go

I initially installed the nakama package through the asset store / package manager, and afterwards updated the package to look for https://github.com/heroiclabs/nakama-unity.git?path=/Packages/Nakama#v3.2.0

Can you help me with things to verify, so i (and others) can get that setup as well?

@novabyte @zyro if one of you has some insights regarding this, that would really be appreciated.

@TheWolfNL We don’t have anything official - I think what was displayed in the video was the memorised auth-complete by the IDE because of previous code examples written by @tom.

This is something that we are looking at solving at some point in the future. @Sean Let’s have a chat about this in the new year together, I think this would provide a massive productivity boost for developers.

1 Like

Hi @TheWolfNL,

Is it the VSCode / Unity intellisense you’re having trouble with?

If so, this can be a little finicky to get working at the best of times; unfortunately it isn’t something directly related to our SDK and I’ve experienced it myself too.

A couple of suggestions:

  • Make sure you have all the appropriate .NET Framework SDKs installed
  • Close VSCode and from within Unity choose Assets → Open C# Project

If this doesn’t work I would recommend giving another IDE a shot as VSCode’s Unity integration is unfortunately just a bit flaky. I would suggest Rider as this is a tool I’ve been using recently and has worked flawlessly with Unity.

Hope this helps.

1 Like

Ah thanks @tom - I misunderstood the original issue; I was thinking more in the lines of auto-complete for the server runtime functions (that are in JS/Lua).

Hey,
Thanks @tom and @mofirouz, I discovered yesterday that Github’s Copilot (AI-driven suggestions) was causing some interference here.
And thanks for making the tutorial videos they help a lot.

So yeah i was indeed talking about the VSCode / Unity intellisense completions.
Unfortunately i can’t produce an easy list of steps for someone else either as I tried multiple things before turning the Co-pilot off and seeing it worked :sweat_smile:

I’m working with nakama and custom Go modules for the server, but am just getting started and finding my way around. Since i’m using matches more as a room / server type of way, is there any intention of creating some tutorials to explain such a setup, because then I might be able to assist, after i get it all working that is…

@mofirouz it might be off topic for this question but is there some kind of page that acts as reference for the Go code and when methods are called / which hooks we can use? for example methods like MatchJoinAttempt don’t have much documentation or i just overlooked it :sweat_smile:

1 Like

We are actively working on revamping the docs to make the discovery better;

In the meantime, have a look at this:

https://heroiclabs.com/docs/nakama/server-framework/function-reference/

https://heroiclabs.com/docs/nakama/concepts/server-authoritative-multiplayer/#match-handler-api_1

1 Like