I've been implementing the "Puzzle template: Item arranging" package into my project.
I have most of the functionality working but have been stuck on 2 points for some time now.
Firstly when clicking and dragging, I cannot get the system to display the sprite whilst dragging. The image is there at at the start and when it is sitting in a slot but just not during the dragging.
Secondly I'm using touch screen, and as of yet I havn't been able to change the double click required interaction on the items into a single tap and hold. My settings are set to "Point and Click/Touch Screen/Context Sensititve.
Any thoughts on these.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
How many of these issues occur with the package's example scene?
This behaviour is set in the Arranging Puzzle Manager's Inspector. Set the Selected Piece Position to Follow Cursor to have it move when selected.
In the Settings Manager, set the Hotspot input mode to Touch Down.
Both of the above settings require the latest releases of both AC and the template package.
Thanks that simple setting change in the Puzzle MGR solved that.
My game is currently set to Hotspot Touch Up. I navigate with pinches to go back and taps to go forward. I have to use touch up in this game otherwise if you pinch over a hotspot, as soon as the finger touches the screen to begin the pinch it sees it as a touch down and triggers the user to progress.
Since I need to keep settings as Touch Up for navigation hotspots, for the item arranging hotspots, can one over-ride the defined hotspot interaction settings on an individual hotspot case by case?
It's possible to alter Manager fields at runtime through scripting - see this tutorial.
One approach would be to rely on the OnHotspotSelect and OnHotspotDeselect custom events to set this to Touch Down when selecting a Hotspot that has the "Arranging Puzzle Piece" component:
This may not work on mobile, since selection and interaction needs to occur on the same frame when working on touch-screen. Try it out in the Editor first, and then if it has trouble on mobile, try adding in the following in the OnHotspotSelect function:
Thanks Chris, this code worked brilliantly, and works on mobile!