Forum rules - please read before posting.

AC Bugging out due to World Space UI

So this is gonna be a weird question but bear with me.

In my game, I have a Laptop UI in World Space overlaid upon a laptop model. I only want it on in certain situations. However, Adventure Creator seems to be having a big issue with this.

If the UI game object is left on, the game functions as normal. However, if any of that UI's game object or itself are turned off at the start of the game, Unity and AC acts very weird. AC's camera switch won't transition properly and freeze, visual glitches start happening both in the game and in the editor, the profiler's performance chart and frame rate drops significantly, and the mouse will sense hotspots in odd places. None of this happens if the UI is left on.

I was thinking it might be the UI, but nothing within it reacts or references AC. I was thinking it might be the Pixel Crusher Dialogue System, but it doesn't reference it at all and it doesn't act up when its active. It's purely on AC's end when everything goes bonkers so I've narrowed down that there must be something about World Space UI that AC doesn't like.

What makes it even weirder though is I'm on a Mac, but my friend on a PC doesn't experience this when he tries it. We're both running Unity 2020.1.1f1 and I'm using AC Ver 1.70.4.

I realize this might be hard to visualize so I'm going to share a video I shared with my friend that demonstrates the issue: https://drive.google.com/file/d/1PzFsY4n_NaNFgjgMT0ERXxUpegyPOP_t/view?usp=sharing

If I could get any insight on this, I'd appreciate it.

Comments

  • edited September 2020

    So the UI itself isn't tied to AC's Menu Manager?

    You're disabling a child of the Canvas, but not technically the UI itself. What is the effect of disabling the "LaptopUI" object, and separately, the custom "Browser" component?

    What else is in the UI's Hierarchy chain? Any non-UI components, e.g. a Camera?

    In game, when the Hotspots don't match up with the cursor's percieved position, pause the game and select AC's MainCamera. Is that not in the same position as the Game window suggests? My first thought would be that the Game window is no longer rendering from the MainCamera - if not, what camera is it rendering from?

    If you enable Deep Profile during the frame-rate drop, does it reveal any clue as to what the cause is?

    The odd behaviour in the Scene window looks to be a glitch with Unity. Does this occur if you (without saving) delete the AC GameEngine and MainCamera objects and then run the scene? It's hard to tell if this is a combination of issues, but knowing more about the LaptopUI and the custom scripts you're using may help to narrow things down.

    Your friend on PC - does he experience any of these issues?

  • So the UI itself isn't tied to AC's Menu Manager?

    Nope. It was created completely independent of AC.

    You're disabling a child of the Canvas, but not technically the UI itself. What is the effect of disabling the "LaptopUI" object, and separately, the custom "Browser" component?

    Disabling any component of that UI be it the parent or the child results in this happening. All that is in the UI chain are UI components. No cameras, etc.

    In game, when the Hotspots don't match up with the cursor's percieved position, pause the game and select AC's MainCamera. Is that not in the same position as the Game window suggests? My first thought would be that the Game window is no longer rendering from the MainCamera - if not, what camera is it rendering from?

    That's the thing. When I check using AC's debug settings, it says it's at the correct camera, but it doesn't show it and the hotspot position isn't even accurate if I try to pretend it was and just froze. From what I can tell, nothing seems to suggest it isn't where it should be. However one anomaly that I saw during one of the glitches that I can't reliably replicate is that the smaller camera object above the AC cameras turned orange sometimes which I thought was odd. It's not consistent though.

    If you enable Deep Profile during the frame-rate drop, does it reveal any clue as to what the cause is?

    Admittedly, I don't know how to do that. I'm very new to the profiler in general and wouldn't really know what to look for unless you can give me some tips on what to check. All I could confirm was the performance seems to dip every time an AC camera Switch occurs and does so massively once the glitch happens.

  • edited September 2020

    the smaller camera object above the AC cameras turned orange sometimes

    Can you elaborate on this with screenshots?

    My guess is that two cameras are now rendering, in that what you see in the Game window is not what AC considers to be the "Main camera" view. That may also account for the dip in framerate, if things are being rendered twice.

    I can't tell, however, where the source of the issue lies. It may well even be from within Unity, given the Scene window glitches, and the fact that it seems to be platform-dependent.

    Deep Profile is available as a toggle option at the top of the Profiler window. Keep it enabled, and then select the "CPU Usage" section from the top-left portion of the window, so that the bottom half then lists the Overview of all processes.

    Each entry in the Overview panel will list the time it takes, and you can use the foldouts on the left to drill down to the source. Pause the game once the slowdown occurs, and you should be able to compare this section before and after the FPS dip. Does anything stand out? You're welcome to post screens if you'd like another pair of eyes on it.

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.