Forum rules - please read before posting.

Adding new property to "Objectives"

Hi everyone,

I'm currently working on an educational game, and I’d like to add a new property to the "Objectives" — basically, a detailed description field.

Does anyone know how I can implement this?
I’ve searched through the forum but haven’t found any related discussions yet.

Thanks in advance!

Comments

  • Welcome to the community, @crosiles.

    Properties aren't available for Objectives - they're for Items only, I'm afraid.

    It is possible to store additional data in a custom script, however, that references your Objectives by ID number. Something like:

    using System;
    using UnityEngine;
    
    public class ObjectiveDescrioptions : MonoBehaviour
    {
    
        public ObjectiveDescription[] descriptions;
    
        [Serializable]
        public class ObjectiveDescription
        {
            public int objectiveID;
            public string description;
        }
    
    }
    

    You would, however, need additional scripting to display such data in your Menu, so you'd be best off using Unity UI for this.

    If you can share more details on your intent, I can give more specific advice.

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.