edited January 2016 in ORK Support
Hi Guys,

Banged up some UI images, just having trouble implementing them and hoping somebody can shed some light.

My main menu BG prefab spawns but...

Problem: There a no buttons on said menu prefab.

Two thoughts, firstly is there some camera, layer, render order etc issue that is preventing the buttons from being shown? (I only have a BG camera (for a BG image - not shown in the screen shot) and the main camera.

My second thought is that a content box setting or some other setting from when I built the UI from the ORK tutorials is in some way interfering (guessing this should't happen as I am using an input mask - which is the image itself again.)

Here is what I have checked etc.

- Read the 'Using the New UI' tute, (Have a default font, made sure my menu prefab and choice button prefabs were allocated etc.) Read the community posts containing uGUI
- Allocated the exact same image on top as a content mask in ORK. (I literally just used the same prefab, is this ok?)
- Made sure my button prefab has a button component
- Making my way through the UI tute vids in the Unity Manual (all great but not in relation to integration with ORK)
- All panels in prefabs are set to UI layer, I turned the alpha up as I didn't like it transparent, but I did change it back down to check the buttons just weren't showing through etc.

I thought it was just create asset prefab, drop in, and define input mask.

I feel like I've missed something really simple. When I created each of my prefabs (Main menu, buttons, skill bar, inventory etc) I just imported the image --> sprite --> placed on a canvas as a panel, re sized, and changed the stretch mode and then dragged across onto a prefab. I got part of the way there as the menu bg/container shows up, but....no buttons. Please note the button was created on a separate canvas. When I created ones on the same canvas/panel as the main menu, they showed up but were not in any way ORK connected/spawned.

This will probably be just the first of a few UI related questions as I try and bring it in.

Thanks for any help with this!


Post edited by Phesant33 on
  • edited January 2016
    uGUI can be tricky - e.g. it could be an issue with your anchor settings or image setup, etc.
    ORK doesn't do much more than spawn your prefabs and adjust them to the content, like the box prefab will get the position and size of the GUI box it's used to display.

    Make sure your prefabs are just prefabs of the different parts and not include the canvas - a button prefab should just be the button without any text or other content on it (otherwise that'll also be spawned/displayed by ORK).

    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited January 2016
    Thanks GIL will check that.

    Yep I was only using the panel and not the canvas.
    Post edited by Phesant33 on
  • edited January 2016
    So I enlarged the content box settings in ORK (which I didn't realize were still being used i.e. I thought we just provided the prefab and it was the content mask that tells the content where to go), however the effect of this was to spawn the buttons seemingly behind my main menu bg (and very stretched so that just the corners are visible like strange wings sticking out of the main menu bg.

    Here is a brief video of my current settings (for prefabs and cameras in unity)
    https://youtu.be/afOGYMeHsTg

    And here is the resultant screen I get when I hit play.
    s377.photobucket.com/user/Phesant33/media/Buttons%20not%20showing%20up%20issue_zps6mnaaspg.jpg.html?sort=3&o=0

    I dropped the alpha so you can see through the menu image to whats going on behind??? guessing its behind as I cant click on the buttons
    image

    Not sure whats going on here but it looks like ORK is spawning them, just behind where I want them to be, and way stretched.

    Thanks heaps for any help guys, would love to get this sorted so I can push the new UI graphics in
    Post edited by Phesant33 on
  • Your main menu prefab clearly has a Canvas component attached.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thanks, really, and......sorry....ah the face palms.
    Main menu is happily working now! Thank you so much!

    I now have an issue where menus like the shop menu or the one after I die, or even my map no longer interact. They display fine, but none of the buttons actually do anything. I can bring them up but can't press the buttons or close them even (either by pressing exit or esc key). They won't close even when I double tap the key I used to call them and I have that 2nd call closes option selected.

    Any thoughts on why this might be?

    Thanks again

  • I saw in your video that you already have an Event System in your scene - that might be the cause for issues. Unity doesn't support multiple event systems in the scene (at least it didn't in previous versoins), and ORK has it's own event system for uGUI.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • You sir are a legend! once again thank you. Interestingly this may have resolved my shop issue, cant tell yet as I cant see if the item quantity/money figures are changing, but at least its not crashing unity.
  • edited January 2016
    So just jumped in to add more UI panels and discovered some more issues (is there a tute somewhere? If not I'll be able to make one by the end of this :) )

    Issues:
    1. I can't interact with the menus using the mouse, EXCEPT for the start game menu. Really weird. My mouse over button effects, and executing the buttons works fine on this menu but not on any of the in game menus like inventory and dialogue options or even the skill bar
    2. I can't exit any of these menus at all once I've moved down or up a few options or say used a potion (using the keyboard - not mouse).

    Note: I have 2nd call closes- and even this doesn't work even though I used the very same key to bring up the menu, a 2nd press does not close it, neither does the Esc key.

    I have disable control checked but I was assuming this meant player control not the mouse.

    The mouse still works, just not on these menu panels (except for the start game lol) could there be some weird layer issue? I do have a second camera in the start game scene for my background (my main camera is set to "depth only" culling mask "mixed")

    3. I am trying to set up a standard grid inventory. I changed my "menu screen" settings for the inventory to increase the columns (in this case to 7). My panel shows up fine but the item names and icons are laid out in one long column. :( Also nothing has changed when I look at it in the cGUI editor in ORK either (i.e. there are not 7 columns). Can I add rows? Or am I going about this the wrong way, should this be a HUD like my skill bar?

    Essentially I can make all the pretty graphic assets but struggling to implement them at this point. Would really appreciate any help/tute, and perhaps, when I've finished the UI saga I'll make one if there isn't one already. (I've read the ORK one a number of times and its great, I just need it really spelled out for a very simple PEBKAC user, especially once it gets to the inventory/paper doll holder.)
    Post edited by Phesant33 on
  • 1+2) Check if there's a 2nd event system in your scene. ORK creates it's own canvas and event system, multiple event systems aren' supported by uGUI.

    3) This is handled by the Choice Column setting of the GUI box (in the choice settings). The column settings in the content box settings are for text columns. Since the inventory displays items as choices, you'll need the choice columns here :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited January 2016
    I had a problem when I tried to move to Ugui a few months back. I lost the ability to interacts with shops so I went back to legacy graphics. I'm going to try it again and see what happens. I did get the grid looking good for the inventory but sometimes couldn't open a shop. I didn't have any trouble with other menus just shops and not always.
    Post edited by Catacomber on
  • Thanks guys, I'll check it out and give it a go. Thanks again :)
  • edited February 2016
    I opened my old UGUI Omber file to see if I could help you -- it was made with an older version of Unity and ORK so updated to latest everything--but everything is off. My text shows up above the buttons--I can't click on an Interact icon or open a shop so can't see my inventory layout in the shop.

    I'm going to start over with UGUI in my new game and I'll let you know if I have any problems similar to yours. Hope you can solve yours.

    I'd like to use UGUI so will see what happens. I did do a lot of side reading on it lately and think I have a grasp about how to set things up better than I did before.

    By the way--updating our game Omber legacy graphics to the latest Unity and ORK versions --- I'm stuck with the text still being off in relation to the buttons and dialogue boxes but I can click on things and everything works as normal but the gui/ui is really off--and this is legacy ui.

    Wasn't planning on doing an update right now but it looks like if I do want to do one, it's going to take some work. What happened?
    Post edited by Catacomber on
  • I haven't had any problem with updating projects and the UI being off, especially not in legacy (uGUI implementation had some major changes in ORK 2.6.0).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Hey Guys, as usual Master Jedi GIL was right, thanks heaps @gamingislove.

    Issues 1 and 2 are solved (I had a separate event system running an area transition in my world map panel - I'll now use ORK for that - plus ORK will dump the player group in there too, not just change the scene).

    @Catacomber , thanks heaps too, great to know somebody is always willing to help a mate out! Will hopefully put a tute or something together once I've got the last few kinks ironed out.

    Issue 3 also solved, again GIL was on the money.

    Note: Shop is now fixed, not exactly sure why - perhaps this was also the extra event system - will update other thread.

    (The next major task will be the paper doll viewer, hoping to get a 3d view of the player and equipable items and finally finishing with the character creation (quite simple) UI at start game. I have the panels, just need the code/events behind them (Got a few tutes and reading too just need to give it a go over the next few build sessions).

    ...THIS IS A BRILLIANT FRAMEWORK.

    Currently just one small issue, not sure if its entirely gUI related but worth some thoughts:

    1. My spartan helmet equipment item is not equipable on the player.

    What happens:
    My other equipment parts like wooden shield or short sword all behave perfectly, i.e. they equip/uneqip as expected and drag and drop appropriately. The spartan helmet can be purchased in the shop, shows up in inventory and can be dragged onto the world space, where it spawns/displays fine. So why can't I equip it?

    However I can't equip it from the menu, it just says "helmet - Empty" and wont let me click on that space to fill it like all the others e.g. right and left hand etc. I can drag and drop the others to equip, but I cant drag the helmet to the equipable spot, it dosn't even let me click in on it to open a description box either (but the others e.g. short sword does).

    What I have tried:
    1. Made sure that the "helmet" game object has been added to the player bone structure - its blue and in the hierarchy at the correct spot, with an equipment viewer script attached. (it is quite some way down in the hierarchy but so is right and left hand and they both work)
    2. The helmet item has been added under Armors in the ORK items. The helmet box is ticked
    3. none of my items block any equipment parts

    Please let me know of any thoughts

    I will try and create other items with other equipment parts etc. to see if this is isolated.

    Unfortunately having some issues getting a video - keeps crashing fraps.

    Thanks heaps guys. Aside from tweeks to text boxes etc (and the paper doll holder) the new UI is working nicely.













  • Beside enabling the equipment part in the equipment to make it equipable on that part, you also need to enable the equipment itself in the class of the combatant (or combatant, if you override the class equipment settings there).
    In general, the classes define the equipment parts and equipment a combatant can use.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.