Search Issue Tracker
Active
Under Consideration for 2.0.X
Votes
0
Found in [Package]
2.0.0
Issue ID
XRCLB-126
Regression
No
Warning When Building Mixed Reality Template: MonoBehaviour Instantiated with new Keyword
*Steps to reproduce:*
# Open Unity Hub
# Create a new project using the Mixed Reality Template
# Build the project
# Observe the console after the build completes
\\
*Actual results:* The warning appears:
{code:java}
"You are trying to create a MonoBehaviour using the 'new' keyword. This is not allowed. MonoBehaviours can only be added using AddComponent(). Alternatively, your script can inherit from ScriptableObject or no base class at all"
{code}
*Expected results:* No warnings should occur after building the template
\\
*Reproducible with versions:* 2.1.2 (6000.2.0b7)
*Not reproducible with versions:* 6000.0.51f1, 6000.1.8f1
\\
*Tested on (OS):* macOS 15.3 (Intel)
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Linux] The Error "ReleaseButton expects buttonId" is thrown when trying to add file using drag and hold in the Project Window
- Highlighted text is difficult to see in “Create Node” menu when Editor theme is set to light
- Blank, Light-Themed "Create Node" window becomes visible on the next project open
- UI Elements/Layout inconsistencies in the Particle System component
- The Game view and Scene view fail to render when launching the Editor with a maximized Render Graph Viewer window
Add comment