Page 1 of 1

Getting Started in Unity

Posted: 18 Jul 2022, 16:37
by TheChief
Hi,

I wanted to try out this middleware in unity (2021.3.6f1) to see if this could replace my current solution. However after installing and dragging the UITestMainView-XAML onto the camera nothing (only default Unity skybox) is visible when entering play-mode.

P.S. Seems I can't add attachments to this post

Re: Getting Started in Unity

Posted: 18 Jul 2022, 17:27
by jsantos
Not sure what you mean with "UITestMainView-XAML". Do the examples that come with the package work? (HelloWorld, Buttons, ...).

Re: Getting Started in Unity

Posted: 19 Jul 2022, 11:43
by TheChief
Yes, I can see the hello world button in Blend and also in the preview when clicking the XAML in Unity.

I then dragged it onto the main camera (3D Core URP Template) and entered play-mode. But it is not visible.

Re: Getting Started in Unity

Posted: 19 Jul 2022, 13:00
by TheChief
I tried it again:
1) Create new project (3D Core URP - Template)
2) Add NoesisGUI 3.1.5 via Package-Manager from disk (Do not enable the new Input-API backends) --> See the welcome screen
3) Fill in license information
4) Open Blend-Project (Assets -> Open Blend Project)
5) Close Blend Project
6) Drag "UITestMainView.xaml" from "Assets" folder onto "Main Camera" in "SampleScene"(this adds a Noesis View component)
7) Run
8) I can't see the UI

Re: Getting Started in Unity

Posted: 19 Jul 2022, 18:29
by jsantos
Have you tried opening any of the examples? Not dragging a XAML to the camera, but opening a scene and playing it. As described in the Unity First Steps tutorial.

Re: Getting Started in Unity

Posted: 20 Jul 2022, 10:16
by TheChief
They seem to work fine.

Interestingly the sample XAML files also don't work when I drag them onto the main camera of my default scene. But I couldn't find any meaningful difference between the samples and the custom scene.

Re: Getting Started in Unity

Posted: 20 Jul 2022, 10:30
by TheChief
It seems that it is required to set the background type of the Camera to Solid instead of Skybox.

As this is not mentioned in the guide and the screenshot in the guide clearly shows the Skybox enabled, I think this is a bug.

Re: Getting Started in Unity

Posted: 20 Jul 2022, 11:07
by jsantos
We are compatible with both background types: solid and skybox. I don't have enough details about your setup to understand what's happening.

Re: Getting Started in Unity

Posted: 20 Jul 2022, 11:34
by TheChief
The easies way to reproduce is probably
1) Make new project using "3D Core URP" template (Unity 2021.3.6f1)
2) Setup NoesisGUI package and add "Hello World Sample"
3) Open "Hello World Sample"
4) Run --> Works ok
5) Change Camera Background to Sky-Box
6) Run --> Only Skybox is shown

Re: Getting Started in Unity

Posted: 20 Jul 2022, 18:01
by jsantos
Thanks for the detailed description. This is probably a corner case, I remember fixing a similar issue on iOS when using empty scenes. Unity was over-optimizing and not calling the callbacks we are using for invoking our native code. The problem disappeared when adding objects to the scene.

I will carefully analyze this. I have created the report #2385 for it.