Forum rules - please read before posting.

1.73.1 RuntimeCanvas returns null

edited February 19 in Engine development

Hi, I've encountered a problem with the 1.73 release.
Trying to access runtime canvas of a menu in a OnStartScene event doesn't work anymore. RuntimeCanvas is null.
At this point AC should be fully initialized and the RuntimeCanvas should have a value.

Edit: Just noticed it's because of this change:

Changed: Unity UI prefabs are now only spawned when they are requested, to reduce initial loading times

Comments

  • Yes, while the runtime instances of all Menus will be accessible from the start, their associated Canvases may not be.

    You can access the Canvas when it's first shown either via an OnEnable script function attached to the Canvas, or by hooking into the OnMenuTurnOn custom event.

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.