Forum rules - please read before posting.

Unity 4.6 GUI Integration Request

Hey Chris,

I'm currently reworking on the UI design for Last Life and I'm very curious about what you have planned for the upcoming AC / Unity GUI integration update. Could you shed some light on how we can expect this to work?

Here's what I'm hoping for:
  1. I'd like to be able to use the Unity GUI tools to create a wider variety of dialogue boxes with subtitles and response options. In particular, I'd love to be able to create a scrolling dialogue box with subtitles and responses like in this video of Kentucky Route Zero.
  2. On the canvas component that's at the heart of the new Unity GUI system, there's the option to switch render modes from "Screen Space - Overlay" to "Screen Space - Camera" to "World Space." Will we be able to render our UI in World Space?
Thanks!

Comments

  • following up on this too.

    ps @pixelartist I'm very excited about Last Life, i'm one of your Kickstarter backers. 

  • :D Thanks for backing, SoundGuy!
  • I just downloaded 4.6 to try the new input system, so I'm interested in this too...
  • edited November 2014
    I'm still working on how best to integrate AC with Unity's UI, so I'm not in a position to talk about what it will / won't be, but here's what I'm intending:

    As a quick parallel: When using Legacy for animation, AC does all the "background work" to make sure the correct animations play at the correct time - you supply the clips, and AC will do pretty much everything else.  It's a good option for those who want something up and running quickly.  But Mecanim, on the other hand, is good for those who want to have full control over their animation: AC leaves it to the designer to set things up exactly how they want.  AC can call the correct Mecanim parameters, but assigning the FSMs, Blend trees etc is up to the designer - it won't try to take control over anything it shouldn't.

    I think the same should be for AC's Menu system vs Unity UI.  Essentially, you'd have the option (on a per-menu basis) to decide whether a Menu is drawn by AC, or by Unity UI.  If you choose Unity UI, all visual controls are removed from the Menu Manager, and it's up to the designer to take care of everything with Unity's UI tools.  You then link the two together by assigning an appropriate field (this will likely be a Canvas Group).

    When a Unity UI is linked to an AC menu, AC will handle it's display (turning on/off, locking etc), but not it's appearance.  However, you'd also be able to link each element to UI objects - e.g. Button -> Button, Label -> Text.  If linked, AC would take over e.g. a Text object's label, or handle a Button's click response.

    Before all that, though, I've got to work out how best to link AC Menus to UI objects.  My first thought was just to reference prefabs, but that would prevent World space and camera-dependent UIs from working, since they need to reference scene objects.  So, it'll likely use the same Constant ID system that ActionList prefabs use.  This way, you can link AC to both prefabbed UIs and scene-based ones.

    So to cover your points:
    1. Having full control over a UIs behaviour would be the real benefit here.  Take your KRZ video as an example, AC would handle the on/off state of the subtitle box, as well as the subtitle label - but it would be up to your own design (via inspector properties / custom scripting) to handle any effects like scrolling.
    2. I'm hoping to allow for all three Render Modes, though there'll likely be some restriction.  For "Mouse over" menus, for example, it's looking like "Screen Space - Overlay" won't be an option - you'd have to change to either Camera or World Space for it to work.

    All this is subject to change until it's actually released, but that's my current thinking.  How much of this is implemented in 1.41 is also up in the air - though certainly control over basic menus and common element types should be in there, but more complex types like like SaveLists may not be initially supported.

  • That sounds rad, Chris! Thanks for your transparency in laying out your intentions here.
  • Hello,

    I am also very interested in using Unity's new UI and linking it with AC, I've trialed so many NGUI and BullGui's but really its best to stick to either the built in Unity GUI (new one) or AC's with some limitations... 

    However I am really feeling the new Unity UI and would really love to see the integration with AC as soon as possible, that way when a button is pressed the character wont magically attempt to travel backwards towards it :)

    Please keep us updated Chris, this is a critical change for the whole system and would require tons of work which we are aware of.

    Thanks for all of the updates you've constantly given out.
  • I'm intending to get one more update out before the holidays (during which I'll be taking a long-overdue rest) - and this update will include support for Unity's new UI.

    All being well, it'll have full support - with the ability to link each of AC's elements to Unity UI equivalents.  Progress is going well - integrating the two together is basically a matter of creating the UI as normal, then dragging the correct GameObject into each AC Menu element slot.  The single-slot elements are done (Buttons, Labels, etc), but things get quite a bit more complicated when multi-slot elements (e.g. Inventory) are involved.
  • Amazing Thanks Chris!

    Really looking forward to that update, excited to simply have my current Unity UI Menu link to AC so that it doesn't trigger the character to walk towards the buttons :)

    Thank you!
  •  "....and this update will include support for Unity's new UI"

    Wow .....great news! Amazing job on your part. You will certainly deserve a rest.
  • Thanks, Chris! You're the best!  :D
  • And it's done.. I think.  The multi-slot problem just means you have to manually link each slot to a UI button (e.g. Inventory Slot 1, Inventory Slot 2), but it's not as annoying as it might sound.  The real killer was drag-and-drop (and getting it to work in Touch Screen, too), but I think it's sorted out.

    Expect 1.41 next week.
  • Wonderful, thanks Chris!

    I'm looking forward to this and hopefully a quick video :)
  • Thanks for the early Christmas gift! I'm definitely looking forward to hooking this up next week.
  • Me too! 
    Happy holidays!
  • I'm very interested by a scrolling dialogue box. PixelArtist if you find a way to do it, I would be curious to know how. Because for now with the new UI system I have not really succeeded. (We can scroll/mask, but I'm stuck with the auto scroll of text and image).
    Btw, is it possible to adjust the subtitles position with Unity UI when you choose "above speaking character"? (we can do that with AC UI)

    I'm annoying I know, but thank you in advance :)
  • (and I don't know if it's a bug, but "use character text colour" doesn't work with Unity UI)
  • Ok, if anyone is interested, I found a part of the solution to my problem with unitydoc:
    http://docs.unity3d.com/460/Documentation/Manual/HOWTO-UIFitContentSize.html
    (background image fit automatically with text size, we can use padding, max height, etc.)
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.