Upgraded to latest version 1.76.1 from version 1.75.4
Main Issue:
Cannot drag item from inventory it just moves the screen (drag), AND cannot click on hotspot, nothing happens.
NOTE: This worked fine using v.1.75.4, but not with 1.76.1 with the same settings !!
I use a custom method for dragging from inventory and clicking hotspots
On Start() I do: KickStarter.stateHandler.SetInteractionSystem(false);
In Update() I use the following to detect hotspot:
if ((Input.GetMouseButtonUp(0) || (Input.touchCount == 1 && Input.GetTouch(0).phase == TouchPhase.Ended)) && KickStarter.stateHandler.IsInGameplay() && KickStarter.playerInput.GetDragState() == DragState.None)
And this to detect inventory interaction:
if ((Input.GetMouseButtonUp(0) || (Input.touchCount == 1 && Input.GetTouch(0).phase == TouchPhase.Ended)) && KickStarter.stateHandler.IsInGameplay() && KickStarter.playerInput.GetDragState() == DragState.Inventory)
Another issue:
This issue is for both versions 1.75.4 and 1.76.1
When clicking on a Unity GUI button, the GUI button triggers, but in addition also the hotspot behind the GUI button is triggered.
Setting: "Unity GUI blocks interaction and movement" is set to True.
What could be the reason for this, and more importantly, how to fix this ?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
By "moving the screen", is this a reference to your camera being a "GameCamera 2D Drag"?
As you're using a custom script to handle input, tempoarily remove it and see if it works with AC alone.
If so, you'll need to share more of your code so that I can recreate the issue.
What effect does the Button have, is it Button linked to AC's Menu Manager, and - if so - have you assigned a suitable "RectTransform boundary"?
--- Hotspot not reacting ---
Look at the video above, doors and Christmas tree has hotspots.
When I tried a lot more using the custom script method, I actually found out that clicking very quick (very short press) it did work, but when not clicking very quick (pressing down longer), nothing happens. Perhaps some adjustment here ?
Also using AC, witch means disabling the custom script and setting hotspot ray length back to 20, did NOT work at all, regardless of click press length!
Code:
using UnityEngine;
using AC;
public class ClickUpInteract : MonoBehaviour
{
public float rayLength = 20f;
}
--- GUI Button ---
I have not added buttons to AC Menu Manager.
Is there a way to block GUI without adding to Menu Manager ?
Apologies for the trouble - but rest assured, we'll get to the bottom of it.
I've recreated your settings and tested your script, and it's working OK on my end - at least in the Editor.
Is the issue occuring for you in the Editor, or only in builds?
As the issue may be down to some key setting unique to your project, it may be easiest to see the same project for myself. You're welcome to PM me a link to download your project from, with instructions on how to see the issue. This can be a cut-down project (ie. one with only a single scene, and no Library folder) to help reduce file-size.
The Unity GUI blocks interaction and movement? option you mentioned should handle this, but only if you're using AC's built-in movement and interaction systems.
If you're using your own script for these systems, you can use a simplified copy of the same function that AC uses:
To use it, copy/paste into your script, and read the state of UnityUIBlocksClick() before processing movement/interactions.