我试着在我已经发布的蒸汽游戏中使用Steamworks.NET。
我从https://github.com/rlabrecque/Steamworks.NET/releases下面的网站下载单位包装
这是我使用的代码:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Steamworks;
public class init : MonoBehaviour {
CGameID m_GameID;
void Start(){
if(SteamManager.Initialized) {
string name = SteamFriends.GetPersonaName();
Debug.Log(name);
// Cache the GameID for use in the Callbacks
m_GameID = new CGameID(SteamUtils.GetAppID());
Debug.Log ("gameID: "+m_GameID);
Debug.Log ("achi: "+SteamUserStats.GetNumAchievements ());
}
}
}
但是由于某些原因,游戏总是返回游戏ID 480 (来自Spacewar),请检查下面的图像
我将游戏id放在steam_appid.txt中,并在SteamManager中更改代码。
从…
若(SteamAPI.RestartAppIfNecessary(AppId_t.Invalid)) {
至
若(SteamAPI.RestartAppIfNecessary((AppId_t)711930)) {
但我还是不明白为什么我仍然从SpaceWars那里得到应用程序id。
我怎么才能纠正呢?
发布于 2017-10-16 04:38:13
我导出一个构建并使用steam_appid.txt来识别我的游戏。这样,我就可以在我的游戏中用Steamworks.NET测试成绩。
https://stackoverflow.com/questions/46756953
复制