Forum rules - please read before posting.

Hotspot component not showing for Prefab

My Current versions:
Unity: 2019.3.9f1
AC: v1.71.7

I'm not sure if this happened when I updated AC from v1.70.4 to v1.71.7, or if it has been happing for longer, but I cannot see the yellow box of a hotspot which is a component of a Sprite object in a prefab.

In the Hotspot component Draw yellow cube is ticked.
The Gizmos button is active and the dropdown has Hotspot ticked.
In the AC Game Editor under Scene --> Visability --> Hotspots is ticked.

I have tried adding a new Hotspot component to the prefab and that works but I cannot see that Hotspot either.

I have tried adding a new Hotspot component to a normal game object in scene and that works and I CAN see it.

I have tried adding a new Hotspot object to the scene from the Scene tab of the AC Game Editor and that works, but I cannot drag it into the prefab as AC wont let me. I'd be happy with this workaround if I could.

The Hotspot functions, but I just want to resize it and cannot do that without seeing it.

Many thanks.

Comments

  • What's stopping the Hotspot being dragged onto the prefab? There's no restriction so far as AC is concerned.

    Is the prefab present in the scene, and what kind of collider is present on the object? Screenshots of the elements concerned will help understand the issue.

  • So for whatever reason today dragging a newly created hotspot into the Prefab in scene works.

    The component hotspot is still not showing up of course and the collider of the same object is a Character Controller (thats a collider too right?).

  • edited July 2020

    Here's images for the Prefab Inspector (I did have a Box Collider component as well, but made no difference.)



    On a side note dragging a brand new sprite into the scene, then dragging it to Resources folder to make a prefab, then adding a hotspot, character collider, box collider components within the prefab root works.

    Is it possible that with my prefab something has got "messed up" (a bug I guess) and now the hotspot just wont show up?

    Or maybe you can see another conflict I'm not noticing.

  • Ok, I think I've found the issue. Hotspot won't show up if I have NPC component present. If I delete NPC component then hotspot shows up. Is this a bug?

  • Open up Hotspot.cs and replace (around) line 1281:

    if (this.GetComponent <AC.Char>() == null && drawGizmos)
    

    with:

    if (drawGizmos)
    
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.