Search Issue Tracker
By Design
Votes
0
Found in
5.0.0f4
Issue ID
683862
Regression
No
Using or not using the 'new' keyword gives conflicting warnings in the Editor and when building to any platform
How to reproduce:
1. Open attached project
- Notice the warning upon compilation
2. Add a 'new' keyword after the 'private' keyword in the script
- The editor gives no warnings
3. Build to any platform
- Notice Unity gives a warning that 'new' is not necessary
For a simple workaround, please surround the offending code like this:
#pragma warning disable 0108
private Rigidbody rigidbody = null;
#pragma warning restore 0108
This disables (and then reenables) the Editor warning that says that 'rigidbody' is being hidden.
Comments (1)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- Crash with “Fatal Error! The file ‘MemoryStream’ is corrupted!” when adding a large number in Font Character Rects Size field
skiplist
Mar 29, 2015 09:33
How come this is by design?