Forum rules - please read before posting.

Scrolling though documents

https://adventurecreator.org/tutorials/scrolling-through-documents/

I'm following the above tutorial but I've seemed to have lost the yellow and white outlines that help you create the menu. I've tried to use the organise the rooms buttons to help bring them back but with no luck. Any idea what I'm doing wrong?

Also, what would be the best method for the user to exit a scrolling menu? Add another button to the top of the menu that alllows the user to exit?

Comments

  • I'm getting the following error:
    NullReferenceException: Object reference not set to an instance of an object
    AC.MenuPreview.Update () (at Assets/AdventureCreator/Scripts/Menu/MenuPreview.cs:63)
  • That error would suggest you've somehow gotten a "null" element.  What version of AC are you using, and in what version of Unity?  Unfortunately it looks like you'll have to delete the Menu and start again, though I'd like to know how that error could occur.  What was it you did when that started appearing?

    It should be said that the "document dragging" feature of AC's own Drag element is now superseded by Unity's own ScrollRect component, which can be used when using Unity UI-based Menus - see the "Unity UI menus" chapter in the Manual for more.

    To exit a Menu, yes - a Button element can be used to close it.  A Button Element can have it's Click type set to Turn Off Menu.  Alternatively, it can be set to Run Action List - so that is can run an ActionList asset when run.  This ActionList can include the Menu: Change state Action to turn that particular Menu off.
  • 5.6.3 p2 Unity and most recent AC.

    I've deleted the menu and it's removed the error but I've still lost the guidelines that help you understand the boundaries of the drag and such. I just adjusted the drag coordinates and then got the error and lost my guidelines.

    Would you suggest switching to the Unity-based menu's or stick with AC's? 

    Another question... Is their a way to set an icon for the scroll? It's not obvious that the user can scroll a document.


  • edited January 2018
    I'll play around with the Drag element to see if I can reproduce the error.  I do recommend using Unity UI over AC, but it should still be an option.

    In general, AC is best for rapid prototyping, while Unity UI is best for final styling.  It's also easier to script changes / animate Unity UI-based Menus.  For example, you could have a script or animation change the scrolling graphic for different documents.

    It is possible to change the cursor when hovering over a Button - so I'll see if it's possible to allow for this when over Drag elements too.
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.