Forum rules - please read before posting.

Hotspots don't do anything

edited July 2016 in Technical Q&A
ok I give up. After a full day of trying to figure this out, I have no idea what is going wrong here. maybe someone else knows.

I am using Unity 5.3.5f1, the latest Adventure creator because I just redownloaded it a few days ago. Windows 7.

So... I add a hotspot. I start the game and click the hotspot and nothing happens. I set it to make the mesh glow when the mouse is over the hotspot and it does indeed glow so it knows my mouse is over a hotspot. But trying to interact with it does nothing at all. It doesn't trigger the unhandled handler, it doesn't trigger the actionlist for that hotspot, absolutely nothing. I don't know what other info to give because I have no idea where the problem might be. It just completely doesn't work.

Have started a brand new scene and it doesn't work there either. The demo scene is a little more weird. The sword, door, stairs, poster board don't work... but Brain and the oil drum you can tip over do work for some reason.

Comments

  • In case it's relevant, proximity detection method works perfectly. Unfortunately, I don't want to use proximity detection for this game.
  • Strange - I apologise for your trouble.  Was this from a fresh install, or were you updating a pre-existing project?

    Check that there are no warnings or error messages in the Console - AC should warn you if it detects an issue like undefined Inputs or Layers.

    We'll need to see what all your Interaction settings are set to within your Settings Manager, but if the Demo game is not working either it could be part of a wider issue.  Let us know what the Console looks like, and post a shot of your Settings Manager, and we'll do our best to help.
  • edited July 2016
    Ummm.. I'm having a similar issue...

    Little while after I updated AC, My hotspots just stopped responding. I don't get the menu with the hotspots name when I hover, neither do I get any interaction menu when I click the hotspot. To verify if AC was actually detecting them (to make sure other colliders where not in the way) I tried moving the hotspots in the open, or very high up above the ground, but no reaction. I also selected to display the hotspot's icon, in screenspace, set it to always, and to hide when interaction menus are visible. And what I discovered was that the icons are hiding when the character gets close to a standard hotpot, even though in the settings is set as "mouse over" instead of in "player vicinity". I also noticed hotspots set to use Actionlist assets do not react at all....

    Because, I'm making a method to pet a pet with the pointer, and the first screen is a close up of the pet, I used the Engine: Manage Systems Action to disable the cursors and interactions (some hotspots where in the way, so clicking the screen brought the unwanted interaction menus). At first I thought the problem was I had forgotten to re-enable the systems, but the action to re enabled them was in the button to get out of the close up just fine. So, I tried to disconnect all "Engine: Manage systems" actions but the problem keeps happening. Then, I tried removing the script for patting the pet (which was detecting the pet with a raycast and changing the cursor/pointer whenever you pat it) but still no change. 

    I've also made doubly sure that my interaction's and hotspot's menus are set up properly. Made a new empty scene with nothing but a plane, the character and a lone hotspot, and same thing...

    Finally, I tried to make a clean install of AC in a new project, but in my case, the demo seemed to work just fine. Except, I tested it in PC mode. But my current project is in Android mode (DX11 on DX9 GPU), so I'm not sure if the "Editor mode" has anything to do with it. I'll try to check when I get back.

    PS: I also noticed that all other player movement methods have stopped working. Only direct/mouse and keyboard seems to move the player... but in this case it's alright because that's how I wanted it, but it's still weird... 

    Edit: Ah, also, highlighting isn't working in my case. And the last thing I remember doing before getting the errors (besides updating AC) was tinkering with the settings in the cursor manager, but later I put them back to how they were before, to no effect... Ah, and I'm currently using Unity 5.3.4p5
  • edited July 2016
    Ah, I was forgetting one detail. A little time before the hotspots stopped working, I started getting some strange errors. Had them for an hour or two after updating. Not sure if they're related. Basically, every time I went into play mode, I would get one of two errors: 

    1. Unity stated it could not load some object (In the main camera) 
    2. Unity stated there were duplicated components (in the main camera), so it would delete one of them automatically for me. 

    Annoyingly, It gave no reference to any scripts at all. But, every time I checked the camera there was nothing wrong with it... After a while it just stopped happening by itself, though...

    Anyways, I'm not sure if that has anything to do with it. I do wonder if hightreason or anybody else has seen any of these strange symptoms of it's just in my project...

  • Any error messages in your Console, @Alverik?  Check that the GameEngine object in your scene has an EventManager component on it - it should be there, but missing that component would have an effect similar to the one you're describing.
  • Hi Chris

    This is a fresh project. AC is not the only plugin being used though. I have also imported UFPS (although I am not using a UFPS character in the AC scenes) which is a full project so overwrote some things from AC like tags, layers, and inputs, but I think I got them all back.

    There are no warnings or errors in the console.

    Here are some screen shots:

    image
    image
    image

    Thanks
  • also keep in mind though that when I try the demo scene, I swap out the managers for the demo managers so it can't be a settings thing in the manager
  • Oh and if I make a new project and do nothing but just import AC and run the demo, it works of course. Just need to figure out why it's not working in my actual project.
  • Aha! I just figured out how to make it work. If I uncheck "Is Trigger" on the hotspot box collider, it works. That is checked by default when adding a hotspot. I probably do want it to be a trigger, but if it is, it doesn't work.
  • edited July 2016
    Very odd.  The Hotspot is indeed intended to have Is Trigger checked, as you don't want Hotspots to conflict with navigation.

    Are there any other assets beside UFPS present in your project?  It sounds like this is caused by some kind of unknown conflict between two assets.  I haven't had any such issues with UFPS in the past - which version of UFPS are you using?

    Try re-importing AC again, but only the AdventureCreator asset folder - not the Project Settings that will overwrite UFPS's things.
  • The event manager is in the game engine. And removing Is Trigger didn't do anything for me...

    What baffles me, is that even though I have been adding a few new plugins/assets to my project everything was working just fine. All I remember was getting that issue with the unwanted hotspots when I had the close up on the pet. Which made me try disabling the pointer and interactions, and also made me try disabling cursors in the cursor manager. After that hotspots never worked again, even when I disabled/disconnected the Engine: manage systems Actions and re-enabled the cursor manager...

    Anyways, just in case, here are the names of the assets I had just installed between one and two days prior to the issue (maybe anyone'll recognize if one of them gave them issues...):

    -SwiftShadows (but, as far as I remember, it was working just fine with the hotspots)
    -Zone Controller (still haven't used it, but no errors from it)
    -Draw Call Minimizer (still didn't use it, but also no errors)
    -Amplify Color (it will be for later in the development process, no errors from it)
    -MaterialMotionv2-fixed- (actually, I think I installed this one way after finding about the issue. but just in case...)

    Well, I'm not too anxious about the issue, because I have a custom alternative hotspot system, which works almost the same and can call multiple AC's Actionlists (Depending on player proximity). But, still, the issue bothers me. I like having alternative methods to do the same thing just in case... 

    Anyways, I'll also try reinstalling AC and see if there's any difference...
  • edited July 2016
    Ok, I've found the culprit, but I need some advice. 

    A few moments ago I noticed something interesting. If I hit play and quickly positioned my pointer over a hotspot before playmode started, once the game played, I would see the the hotspot text for an instant, then it would disappear again. I tried attaching an Action List to the actionlist when turned on slot for my hotspot menu, had that action list open a menu which paused the game. and the game indeed paused, so the menu was showing up but just for an instant. So then I told myself, what's the only thing I still have here that I had in my other scene, asnwer was: my Virtual controls. So I tried unticking Enabled on Start and them, boom, hotspots start working again!

    But this is the weirdest thing, I've had menus always on screen before as HUD and they never got in the way. I even tried disabling just the joystick to see if it was something about the CN Controls, but the same thing happens, and the rest of the buttons sitting in a corner of the screen (5 buttons A/B/Select/LT/RT) are just regular buttons simulating AC input (directly from the menu manager), they have no scripts attached or anything. No action lists on the onstart or on close. no Action lists on any buttons. I don't see why they would get in the way of the raycast, and they are all set to the UI Layer... Anyways, I really do need the virtual controls. Any idea why they would get in the way of the hotspot system?

    Anyways, any advice would be greatly appreciated...
  • edited July 2016
    Ummm, I ended up chopping up my virtual controller's UI into smaller bits (in separate canvases) to make sure the bounds don't cover more than it's necessary, now hotspots works fine. But it' still weird... I have my own raycasts working in-game and they never had any problem with the virtual control's UI bounds. Is this normal AC behaviour or is it a bug?
  • edited July 2016
    I figured out my whole issue. In physics settings you can turn off raycasts hitting trigger colliders. Paragon Shooter AI wants that off, but AC wants it on. I never use AC and Paragon in the same scene, but it's a project wide setting, so not sure how I will deal with that, but at least I know what the problem is.

    Sounds like not the same issue as Alverik has though.
  • @hightreason: Thanks for the update.  Is that the 3D or 2D Physics manager?  I can't find that option, but AC does indeed rely on raycasts to detect triggers - a standard practice for the type of gameplay it provides.

    @Alverik: If the UI was connected to the Menu Manager, the RectTransform field you assign will mark out an area under which objects in the scene can't be clicked - that may have been blocking it.  Otherwise, it may be to do with the UI components naturally blocking raycasts due to their default settings.

    One further thing to try is to disable the Menu on start, but have it turn on manually with the Menu: Change state Action in your OnStart Cutscene - that shouldn't make a difference, but it may do if a bug is present.
  • edited July 2016
    I'll check but, as I said, it's weird. I have a raycast to detect if the player has the pointer on top of the pet and that one worked perfectly, and most of the time both the pet and the hotspots were in the same general area (both very close together, at the center of the screen). And my raycast computed just fine. I had it send messages when the pointer was or wasn't on top of the pet, and for a while I even had it send the name of what it was hitting, so I'm sure it went through the UI, just fine. Yet AC's raycast didn't seem to manage go through the menu's bounding box?... 

    Mind you, this didn't happen with the previous version. Before I updated AC I never noticed any issues, and I already had the virtual controller menu setup.
  • If you PM me your Menu Manager asset + the UI prefab, I'll see if I can reproduce the error.
  • edited July 2016
    Do I need to send you the images and scripts used by the prefab or is the naked prefab file enough? (sorry, I've never sent one before). 

    Also, I already split the virtual controls UI into two parts, I didn't really change any of the settings in the components though, just moved some stuff from one canvas to another, and then resized the the bounding box of the "Content" empty game object to as small as possible. The bounding box of the original "Content" empty game object covered the whole screen. 
  • You've said its works now with the newer UIs, so I'd only be interested in the larger one that doesn't.  But if the bounding box covered the whole screen, that's most likely why it wasn't working.  In which case, it's not a bug - just the way it's been set up.

    If you still need to send something over, leaving out the graphics should be OK.  Same for the scripts, provided that they only get run when the UI itself is interacted with.
  • Alright, in that case I won't fuss about it anymore, seeing as it's working as intended. Still, it would be nice if a detail like that was in the manual, or one of the tutorials.  ;)
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.