This occurs in a few places in AC - you'll have to place a Debug.Log statement next to each, to get a Console message that points to which one is being run.
So how do I write this next to the line of code in each script?
How do I not have the cursor be affected by Player hotspot, so he doesnt get in the way, but when objects dragged on him they have affect? Plus, I would like to remove the label of Rufus, how do I do this?
Plus, can i set Unity UI prefab menus to not get in the way of hotspots? I have my Inventory buttons that block my hover and click interaction with hotspots.
Comments
Open the solution in Visual Studio and ctrl-F.
sorry to be such a noob, but what is the solution?
The code. Double-clicking any script file should bring it up.
Ok so I’m guessing I’ll search in any custom scripts rather than any of yours?
so I open each script within AC one by one and search for this line?
gameObject.layer = LayerMask.NameToLayer (KickStarter.settingsManager.deactivatedLayer);
Run a project-wide search: it'll show each script that contains it, no need to open each script individually.
The relevant scripts are:
If it's not any of those, it may be from a custom script.
I have checked all of the above and they all have that line of code in
Indeed - that's why I listed them.
ok, so then what are the next steps to fix this?
So how do I write this next to the line of code in each script?
Either write a Debug.Log statement under each that identifies the script and object it's coming from, e.g.:
or comment out each instance of the line one-by-one and run the game to see which one is causing the layer change.
ok thanks
it was the first one Hotpost.cs - it now works!
Revert the code but keep a Debug.Log in the Hotspot script - what is the message in full?
like this?
Yes - what is the Console message it produces?
sorry, my bad, so for Rufus sprietw ith hotspot on it says this:
HOTSPOT OFF Sprite (AC.Hotspot)
UnityEngine.Debug:Log (object,UnityEngine.Object)
AC.Hotspot:TurnOff (bool) (at Assets/AdventureCreator/Scripts/Logic/Hotspot.cs:719)
AC.Hotspot:TurnOff () (at Assets/AdventureCreator/Scripts/Logic/Hotspot.cs:708)
AC.Player:AutoSyncHotspot () (at Assets/AdventureCreator/Scripts/Character/Player.cs:1190)
AC.Player:OnSetPlayer (AC.Player) (at Assets/AdventureCreator/Scripts/Character/Player.cs:1176)
AC.EventManager:Call_OnSetPlayer (AC.Player) (at Assets/AdventureCreator/Scripts/Managers/EventManager.cs:1105)
AC.KickStarter:set_player (AC.Player) (at Assets/AdventureCreator/Scripts/Game engine/KickStarter.cs:1049)
AC.PlayerPrefab:SpawnInScene (bool) (at Assets/AdventureCreator/Scripts/Character/PlayerPrefab.cs:124)
AC.KickStarter:PreparePlayer () (at Assets/AdventureCreator/Scripts/Game engine/KickStarter.cs:1181)
AC.KickStarter:Initialise () (at Assets/AdventureCreator/Scripts/Game engine/KickStarter.cs:1146)
AC.MultiSceneChecker:Awake () (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:43)
and then underneath that:
Hotspot.cs Sprite (AC.Hotspot)
UnityEngine.Debug:Log (object,UnityEngine.Object)
AC.Hotspot:TurnOff (bool) (at Assets/AdventureCreator/Scripts/Logic/Hotspot.cs:722)
AC.Hotspot:TurnOff () (at Assets/AdventureCreator/Scripts/Logic/Hotspot.cs:708)
AC.Player:AutoSyncHotspot () (at Assets/AdventureCreator/Scripts/Character/Player.cs:1190)
AC.Player:OnSetPlayer (AC.Player) (at Assets/AdventureCreator/Scripts/Character/Player.cs:1176)
AC.EventManager:Call_OnSetPlayer (AC.Player) (at Assets/AdventureCreator/Scripts/Managers/EventManager.cs:1105)
AC.KickStarter:set_player (AC.Player) (at Assets/AdventureCreator/Scripts/Game engine/KickStarter.cs:1049)
AC.PlayerPrefab:SpawnInScene (bool) (at Assets/AdventureCreator/Scripts/Character/PlayerPrefab.cs:124)
AC.KickStarter:PreparePlayer () (at Assets/AdventureCreator/Scripts/Game engine/KickStarter.cs:1181)
AC.KickStarter:Initialise () (at Assets/AdventureCreator/Scripts/Game engine/KickStarter.cs:1146)
AC.MultiSceneChecker:Awake () (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:43)
Another hotspot, eg umbrella hotspot, that works fi e, has this debug:
Hotspot.cs Umbrella (AC.Hotspot)
UnityEngine.Debug:Log (object,UnityEngine.Object)
AC.Hotspot:TurnOff (bool) (at Assets/AdventureCreator/Scripts/Logic/Hotspot.cs:722)
AC.Hotspot:TurnOff () (at Assets/AdventureCreator/Scripts/Logic/Hotspot.cs:708)
AC.ActionHotspotEnable:DoChange (AC.Hotspot) (at Assets/AdventureCreator/Scripts/Actions/ActionHotspotEnable.cs:79)
AC.ActionHotspotEnable:Run () (at Assets/AdventureCreator/Scripts/Actions/ActionHotspotEnable.cs:53)
AC.ActionList/d__41:MoveNext () (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:429)
UnityEngine.MonoBehaviour:StartCoroutine (System.Collections.IEnumerator)
AC.ActionList:ProcessAction (int) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:379)
AC.ActionList:ProcessActionEnd (AC.ActionEnd,int,bool) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:581)
AC.ActionList:EndAction (AC.Action) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:540)
AC.ActionList/d__41:MoveNext () (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:494)
UnityEngine.MonoBehaviour:StartCoroutine (System.Collections.IEnumerator)
AC.ActionList:ProcessAction (int) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:379)
AC.ActionList:BeginActionList (int,bool) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:346)
AC.ActionList:Interact (int,bool) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:247)
AC.ActionRunActionList:Run () (at Assets/AdventureCreator/Scripts/Actions/ActionRunActionList.cs:153)
AC.ActionList/d__41:MoveNext () (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:429)
UnityEngine.MonoBehaviour:StartCoroutine (System.Collections.IEnumerator)
AC.ActionList:ProcessAction (int) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:379)
AC.ActionList:ProcessActionEnd (AC.ActionEnd,int,bool) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:581)
AC.ActionList:EndAction (AC.Action) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:540)
AC.ActionList/d__41:MoveNext () (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:494)
UnityEngine.MonoBehaviour:StartCoroutine (System.Collections.IEnumerator)
AC.ActionList:ProcessAction (int) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:379)
AC.ActionList:ProcessActionEnd (AC.ActionEnd,int,bool) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:581)
AC.ActionList:EndActionParallel (AC.Action) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:663)
AC.ActionList/d__41:MoveNext () (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:490)
UnityEngine.MonoBehaviour:StartCoroutine (System.Collections.IEnumerator)
AC.ActionList:ProcessAction (int) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:379)
AC.ActionList:BeginActionList (int,bool) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:346)
AC.ActionList:Interact (int,bool) (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:247)
AC.ActionList:Interact () (at Assets/AdventureCreator/Scripts/ActionList/ActionList.cs:210)
AC.SceneSettings:PlayStartCutscene () (at Assets/AdventureCreator/Scripts/Game engine/SceneSettings.cs:332)
AC.SceneSettings:OnStart () (at Assets/AdventureCreator/Scripts/Game engine/SceneSettings.cs:110)
AC.SaveSystem:InitAfterLoad () (at Assets/AdventureCreator/Scripts/Save system/SaveSystem.cs:692)
AC.MultiSceneChecker:Start () (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:62)
Open up the Player's Inspector and uncheck Auto-sync Hotspot state?.
Works!
How do I not have the cursor be affected by Player hotspot, so he doesnt get in the way, but when objects dragged on him they have affect? Plus, I would like to remove the label of Rufus, how do I do this?
Plus, can i set Unity UI prefab menus to not get in the way of hotspots? I have my Inventory buttons that block my hover and click interaction with hotspots.
Thanks!