1. In order to unlock a certain achievement, you can follow the code template shown below.
Since we will be determining the platform type via PlatformSetting Scriptable Object, make sure to drag it in in the Inspector Panel.
// Example code
public class GameManager : MonoBehaviour
{
[SerializeField]
private PlatformSetting platformSetting;
void Update()
{
// ...
if (platformSetting.platformType == PlatformType.Stove)
{
StoveAchievementHandler.UnlockAchievement("STAT_ID");
}
if (platformSetting.platformType == PlatformType.Steam)
{
SteamUserStats.SetAchievement("STAT_ID");
}
}
}
C#
๋ณต์ฌ