It worked up until a couple of weeks ago, but suddenly it stopped functioning.
when a task is completed, the checkbox icon doesn't appear either. I attached the following code to each image object next to every task.
using UnityEngine;
using UnityEngine.UI;
using AC;
public class ObjectiveIcon : MonoBehaviour
{
public int slot;
public Sprite completed;
public Sprite notCompleted;
public Image image;
void OnEnable()
{
ObjectiveInstance[] objectives = KickStarter.runtimeObjectives.GetObjectives();
if (slot >= 0 && slot < objectives.Length)
{
if (objectives[slot].CurrentState.stateType == ObjectiveStateType.Complete)
{
image.sprite = completed;
}
else
{
image.sprite = notCompleted;
}
}
}
}
Inventory
https://imgur.com/nPKuYvv
Menu
https://imgur.com/shlJZUp
Hierarchy
https://imgur.com/nLKkLSr
What am I missing here? Thank you so much for your help.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
I'm sorry, please disregard the post. Everything works now.