Forum rules - please read before posting.

The Objectives' Description doesn't appear

It worked up until a couple of weeks ago, but suddenly it stopped functioning.

  • The description doesn't display, and
  • 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.

Comments

  • I'm sorry, please disregard the post. Everything works now.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.