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. #40

Closed
IssueSyncBot opened this issue Aug 20, 2023 · 2 comments
Assignees
Labels
Type: Bug A problem with an existing feature that can be fixed with the next patched release.

Comments

@IssueSyncBot
Copy link

IssueSyncBot commented Aug 20, 2023

Original issue opened by:

@Chris-70 Chris-70


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

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.


ISSUE MIGRATION

Issue migrated from: microsoft/MixedRealityToolkit-Unity#11770

@IssueSyncBot IssueSyncBot added Type: Bug A problem with an existing feature that can be fixed with the next patched release. MRTK3 labels Aug 20, 2023
@IssueSyncBot
Copy link
Author

Original comment by:

@ChrisGuyML ChrisGuyML


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

@AMollis AMollis removed the MRTK3 label Aug 20, 2023
IssueSyncBot pushed a commit that referenced this issue Aug 21, 2023
…2022.3.2f1 (#430)

* Fix regex in repackaging script (#427)

The regex for extracting the version number from the package.json file was grabbing the wrong version in some instances.  Fixed.

(cherry picked from commit 20a0728)

* Fix ExperimentalDrawer.cs doesn't compile in Unity Editor 2022.3.2f1 and above. #40
Use a cached height calculated in OnGUI().
shaynie added a commit to shaynie/swhMRTKFork that referenced this issue Aug 21, 2023
…le in Unity Editor 2022.3.2f1 (MixedRealityToolkit#430)

* Fix regex in repackaging script (MixedRealityToolkit#427)

The regex for extracting the version number from the package.json file was grabbing the wrong version in some instances.  Fixed.

(cherry picked from commit 20a0728)

* Fix ExperimentalDrawer.cs doesn't compile in Unity Editor 2022.3.2f1 and above. MixedRealityToolkit#40
Use a cached height calculated in OnGUI().

(cherry picked from commit 770b1c4)
shaynie added a commit that referenced this issue Aug 22, 2023
* Fix ExperimentalDrawer.cs doesn't compile in Unity Editor 2022.3.2f1
and above. #40 Use a cached height calculated in OnGUI().

(cherry picked from commit 770b1c4)
@AMollis
Copy link
Contributor

AMollis commented Aug 22, 2023

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug A problem with an existing feature that can be fixed with the next patched release.
Projects
None yet
Development

No branches or pull requests

3 participants