Forum rules - please read before posting.

Hotspot - Objet to highlight by constant ID

Hello,

Is it possible to highlight an object by constantID? I have my objects on another that is loaded additively and it can't find the object from another scene, therefore can't highlight

Thanks

Comments

  • No, but if the Hotspots and object you want to highlight are both part of the same prefab, the connection will remain intact.

    Otherwise, you'll have to use scripting to re-connect the two once you add the object into the scene.

    You could do this with e.g. this script, attached to the Object to highlight, which I'm assuming is what's getting spawned in:

    using UnityEngine;
    using AC;
    
    public class ReconnectHotspotHighlight : MonoBehaviour
    {
    
        public string hotspotGameObjectName;
    
        void Start ()
        {
            GameObject hotspot = GameObject.Find (hotspotGameObjectName);
            hotspot.GetComponent <Hotspot>().highlight = GetComponent <Highlight>();
        }
    
    }
    
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.