Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExperimentalDrawer.cs doesn't compile in Unity Editor 2022.3.2f1 and above. #11770

Closed
Chris-70 opened this issue Aug 18, 2023 · 2 comments
Closed

Comments

@Chris-70
Copy link

Chris-70 commented Aug 18, 2023

This issue has been migrated a new MRTK repository, and the status of this issue will now be tracked at the following location:


Describe the bug

The current MRTK3 Unity project uses the editor version 2021.3.2f1, upgrading to Unity Editor 2022.3.2f1 causes the ExperimentalDrawer.cs file to fail compilation with the error:

ArgumentException: You can only call GUI functions from inside OnGUI.
image

This results in the components of Theme Provider showing as empty in the Inspector.
image

When it should be:
image

To reproduce

Steps to reproduce the behavior:

  1. Open the CoreUXThemingExample scene in Unity Editor 2022.3.2f1 (or later). I haven't tested the editors between 2021.3.2f1 (working) and 2022.3.2f1 (not working)
  2. Go to 'the Theme Provider under SceneContent'
    image
  3. Click on 'Theme Provider'
  4. Open the Console window ''
  5. See error
  6. In the Inspector window you'll see Data Source Provider Singleton; Data Source Theme Provider; and Theme Selector all empty.
    image

Expected behavior

There should be no compile errors and the Inspector window should show all components for the Theme Provider.
image

My setup

  • Unity Version 2021.3.2f1
  • MRTK3 branch, Commit c86b0e9
  • Windows 10, 22H2

Target platform

  • Android, x86-64, Magic Leap 2

Additional context

Removing the file will fix the compilation error as well as the Inspector window error. The only use for this file is to add the warning message above these components and isn't necessary for the correct operation of the editor.

@Chris-70 Chris-70 added the Bug label Aug 18, 2023
@github-actions github-actions bot added the MRTK3 label Aug 18, 2023
@ChrisGuyML
Copy link

Removing the [CustomPropertyDrawer(typeof(ExperimentalAttribute))] from the class will also fix this issue, however the Inspector will not show the warning.

@AMollis
Copy link
Member

AMollis commented Aug 22, 2023

Issue is fix please see status in new repository

MixedRealityToolkit/MixedRealityToolkit-Unity#40

@AMollis AMollis closed this as completed Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants