Assets/Sleepytime Village/Scripts/InventoryOnlyHotspot.cs(2,1): error CS1529: A using clause must precede all other elements defined in the namespace except extern alias declarations
Plus, do I just attach this to to the child with hotspot on of player?
okay so compiles but the hotspots behind Rufus are not accessible, so so doesn't seem to work. The interaction source is set to Asset File if that makes any difference?
OK, so this is all amazing, is there a way to disable this for a moment or per inventory object, OR give a certain hotspot priority over Rufus or per inventory object? I have an issue when Rufus is standing at the front of the screen and the hotspot is directly over him. The hotspot becomes impossible to click on as Rufus hotspot takes precedence.
A Hotspot's Position along the Z-axis will control its priority relative to other objects. If you move the Lamp's Hotspot closer to the camera than the Player's, it should take precedence.
It is also possible to have the script only work for items that the Player has a valid interaction for:
Comments
Use this script to only enable the Hotspot when an inventory item is selected:
Clicks on AC buttons will override the click behaviour on the scene underneath them.
Getting this error:
Assets/Sleepytime Village/Scripts/InventoryOnlyHotspot.cs(2,1): error CS1529: A using clause must precede all other elements defined in the namespace except extern alias declarations
Plus, do I just attach this to to the child with hotspot on of player?
Did you replace the script file's entire contents with the above?
Once compiled, yes - attach it to the Hotspot and assign that Hotspot in its Inspector.
okay so compiles but the hotspots behind Rufus are not accessible, so so doesn't seem to work. The interaction source is set to Asset File if that makes any difference?
See video here:
https://www.dropbox.com/s/wvd7uswvcwwy5gx/Hotspotissue.mov?dl=0
OK, so this is all amazing, is there a way to disable this for a moment or per inventory object, OR give a certain hotspot priority over Rufus or per inventory object? I have an issue when Rufus is standing at the front of the screen and the hotspot is directly over him. The hotspot becomes impossible to click on as Rufus hotspot takes precedence.
https://www.dropbox.com/s/88isff2a6gcq1dm/Hotspot Access.png?dl=0
A Hotspot's Position along the Z-axis will control its priority relative to other objects. If you move the Lamp's Hotspot closer to the camera than the Player's, it should take precedence.
It is also possible to have the script only work for items that the Player has a valid interaction for:
Awesome thanks