rlabrecque / Steamworks.NET

Steamworks wrapper for Unity / C#
http://steamworks.github.io
MIT License
2.74k stars 362 forks source link

The name 'SteamManager' does not exist in the current context #642

Open ChurikiTenna opened 3 weeks ago

ChurikiTenna commented 3 weeks ago

I have installed Steamworks through Package Manager, and using namespace seems working fine. However, when I try to use SteamManager according to GettingStarted, it fails with this error:

The name 'SteamManager' does not exist in the current context

Code

#if UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX || UNITY_EDITOR
using Steamworks;
#endif
...
#if UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX || UNITY_EDITOR
        Debug.Log($"Steamworks.Version {new Steamworks.CGameID()}");//this works
        if(SteamManager.Initialized) {// this does not work.
            string name = SteamFriends.GetPersonaName();
            Debug.Log(name);
        }
        #endif

Running on Mac(Apple Silicon).

rlabrecque commented 3 weeks ago

I think you need to pull down https://github.com/rlabrecque/Steamworks.NET-SteamManager/ into your project separately currently. It's not inside the package manager version because it's supposed to be the starting point for your own code. There's a ticket around here somewhere to make this more-automatic; which is highly needed.

I'm going to leave this ticket open primarily to improve the documentation