Achievements
Workflow
Achievements works with library-based scriptable objects. You can expand the ‘Achievements’ category on the UI Manager to see the selected library. You can later on hit the ‘Show Library’ button.
Here you can add new achievements or edit existing ones. If you need to localize the content, you can fill in the key parameters. You can set different achievement type for each item. If you need to preview content during development, you can set ‘Data Behaviour’ to ‘Unlocked’. Make sure to set it to ‘Default’ when you’re done previewing.
All library items are handled by the ‘Achievement Manager’ component, which is added to the Achievements panel by default.
Scripting
using UnityEngine;
using Michsky.UI.Heat; // Heat UI namespace
public class SampleClass : MonoBehaviour
{
[SerializeField] private AchievementManager achManager;
void Start()
{
// Manually initialize achievement items
achManager.InitializeItems();
// Set achievement {name} to true or false
// No reference required for this call as it's static
AchievementManager.SetAchievement("Ach Name", true);
}
}
How can we help?
A premium WordPress theme with an integrated Knowledge Base,
providing 24/7 community-based support.