I am writing the code for my button, but it's giving me errors like this:
Assets\Scripts\SteamIntegration.cs (60, 6): 'Button' is not an attribute class
Where did I make a mistake in this code?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class SteamIntegration : MonoBehaviour
{
public Button button;
void Start()
{
button.onClick.AddListener(() => {
});
try
{
Steamworks.SteamClient.Init(/*AppID here*/);
}
catch (System.Exeption e)
{
Debug.Log(e);
}
}
// ...
[Button]
public void IsThisAchievementUnlocked(string id)
{
var ach = new Steamworks.Data.Achievement(id);
Debug.Log($"Achievement {id} status: " + ach.State);
}
[Button]
public void UnlockAchievement(string id)
{
var ach = new Steamworks.Data.Achievement(id);
ach.Trigger();
Debug.Log($"Achievement {id} unlocked");
}
}
[Button]
public void ClearAchievementStatus(string id)
{
var ach = new Steamworks.Data.Achievement(id);
ach.Clear();
Debug.Log($"Achievement {id} cleared");
}
[Button]
attributes above your achievement methods? \$\endgroup\$