Hey there,
whenever I move my mouse over a hotspot that has an examine interaction, but no use interaction, my console is flooded with error messages:
NullReferenceException: Object reference not set to an instance of an object
AC.PlayerCursor.DrawCursor () (at Assets/AdventureCreator/Scripts/Controls/PlayerCursor.cs:281)
AC.StateHandler._OnGUI () (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:588)
AC.StateHandler.OnGUI () (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:508)
The result is that no cursor is drawn while hovering over the hotspot, even though an examine interaction exists and an examine cursor is defined in the cursor manager.
Now I've added some debug messages and found out that the following returns null:
KickStarter.playerInteraction.GetActiveHotspot ().GetFirstUseButton ()
Hence,
selectedCursor = KickStarter.playerInteraction.GetActiveHotspot ().GetFirstUseButton ().iconID;
returns an error.
This happens with my custom CursorManager, the Default_CursorManager and the Demo_CursorManager. Please let me know if you need any more info.
Thanks,
Matthias
Comments
if (useButton != null) selectedCursor = useButton.iconID;