Facepunch.Steamworks
Facepunch.Steamworks copied to clipboard
Namespace "Steamworks" wasn't found
Describe the bug I import the library from the releases page, it says that the namespace "Steamworks" wasn't found. I'm on linux if that helps. Unity Version: 2020.3.24f1. My Unity Player uses Mono with Net Standard 2.0.
To Reproduce Steps to reproduce the behavior:
- Use Unity Editor 2020.3.24f1.
- Select Mono with Net Standard 2.0.
- Attempt to import the library.
- See error.
Calling Code
public uint id;
// Start is called before the first frame update
void Start()
{
DontDestroyOnLoad(gameObject);
try
{
Steamworks.SteamClient.Init( id );
}
catch ( System.Exception e )
{
// Something went wrong - it's one of these:
//
// Steam is closed?
// Can't find steam_api dll?
// Don't have permission to play app?
//
Debug.LogError(e.Message);
}
}
// Update is called once per frame
void Update()
{
Steamworks.SteamClient.RunCallbacks();
}
void OnDisable()
{
Steamworks.SteamClient.Shutdown();
}
Expected behavior I expected to be able to use the namespace Steamworks.
Desktop (please complete the following information):
- OS: Linux
- Unity: 2020.3.24f1
Additional context Mono Net Standard 2.0 (No IL2CPP). Tried to compile library from source but still didn't work.
@ozhanghe as a workaround install latest version and change Facepunch.Steamworks.Posix
dll Editor settings to OS linux:
Just to share info FWIW, it seems working fine if setting OS to AnyOS
and adding a UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX
constraint. It should support Mac and Linux with the same code then.
It's working now. Thanks!