Forum rules - please read before posting.

Camera Filter Pack - Fighting With AC / Unity UI Integration

Hey there!

First, a million apologies for all of the support I've needed on various AC / Unity UI issues. Honestly, if I could start this project all over again, I would have just used the AC UI system which I'm 99% sure would've met my needs just fine, or with minimal compromise. Don't be so quick to rush into Unity UI with it...!

So this is the latest thing: Camera Filter Pack (https://www.assetstore.unity3d.com/en/#!/content/18433) which is a great asset, and has an effect that I'd really like to use, acts really weird with my AC / Unity UI.

Essentially, it makes some elements of my UI (The portrait image in my dialogue boxes, most notably) vanish, while others (the background panel on it, for example) remain just fine.

Here's a gallery:


Now, I know it can be janky trying to push assets together - believe me, I already went through hell-and-a-half (with your help!) getting TextMesh Pro to integrate well, but just in case someone can think of something obvious that I do not: Is there any kind of layer / Z / whatever reason that an effect on the Main Camera could make certain elements in a UI prefab disappear while the others remain intact?

If you've got any ideas, let me know! The less elegant solution is that I can simply rebuild my UI for these scenes with filters using the AC UI. I already tested it and, sure enough, it works just fine.

If only I had stuck with AC UI...! If only, if only, if only...

Thanks!

Comments

  • edited May 2017
    Ummm, this may be more of a UGUI or the image effect's requirements thing. Try making sure the effect is supposed to work properly using the render mode and platform you are using. Some image effects have more requirements, like using HDR or having its own camera, or using a specific camera perspective for example. I think, it would probably be best to mention the issue to the author of the filter pack.
  • edited May 2017
    Thanks Alverik! I'll take a look. I wish there was a way to simply tell Unity to put any AC-UGUI stuff on top of everything else, no matter what it is or what it wants to do... That would be the easiest way out of it.

    I've sent a note to the makers of the other asset as well, maybe they can shed some of the light. Some of their less motion-intensive effects don't seem to interrupt AC's UGUI in this way at all, and I've been able to isolate ones that do and ones that don't, hopefully that'll help 'em.
  • Good news! I managed to figure it out on my own.

    I have no idea why this works, but by giving the UI elements that weren't showing up a Z position of 1000 in the Rect Transform, they somehow punched their way to the top of the pile appropriately.

    If anyone would like to explain why this may have worked, I would be interested in hearing it...! But it isn't what I would call necessary. :)
  • edited May 2017
    Actually, the moment I wrote this, I had one more idea: 

    What if the reason some of these UI elements are showing up and others aren't (unless you give them a Rect Transform Z of 1000) is because those elements are the ones nested lower than one level in the prefab?

    And wouldn't you know it: That was exactly it.

    So there you go. I have my canvas, and then a panel inside it, and then TMP text and a portrait image inside of that.

    It didn't come to mind at first because the text was showing up fine, but because my text is actually being written by TMP (fed through AC) I guess it somehow doesn't 'count' as being 'too deep' inside the prefab for this purpose.

    So if you're stumbling on this thread with the same problem, you can either make sure that either all of your UI elements are two layers deep at maximum or - if need be - keep anything nested below that second level at a Z position on the rect transform on at least 1000.

    I'm pretty jazzed. I thought this problem was gonna turn into a whole thing...!
  • Glad to hear, thanks for posting the update!
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.