Search Issue Tracker
Fixed in 4.5.X
Votes
0
Found in
4.0.0f1
Issue ID
496529
Regression
No
Combining namespaces MBs with default params break
1) What happened
Combining namespaces MBs with default params break
Having a default parameter value specified for a method in a mono behaviour in a namespace will result in great weirdness - including the behaviour no longer being addable to GameObjects.
2) How can we reproduce it using the example you attached.
In ImpactCamera.cs and TouchGestures.cs you'll find some TODOs around workarounds for this problem. Flip the commenting on the code involved and try adding either component to a GO.
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
- GPU utilization increases by 20% on Meta Quest headsets when Render Graph is enabled on 6000.0.16f1 and higher
- Value on Slider (Int) control in UI Builder displays as default when saving UI Document
- Color mismatch in UI Builders Library panel when the Editors theme is set to Light Mode
- [Android ] "AndroidJNI.ToBooleanArray" returns a random non-zero value instead of "IntPtr.Zero" when the method argument is null
- Non-HDR color picker opens when selecting material color with HDR enabled
felixmann
Apr 30, 2017 06:20
Still experiencing this on Unity 5.51f1 :(
Randomman159
Oct 31, 2015 02:30
Currently having the issue in 5.1.3f1 on Windows 8.1
ilya_ca
Sep 29, 2014 02:32
The issue is still present on Mac OS X.
mstevenson
Jul 08, 2014 21:48
This issue appears to have been fixed in Unity 4.5 on Windows, however it is still easily reproducible on OS X.
genail
Apr 10, 2014 13:23
Still present in 4.3.4.
cjke.7777
Feb 23, 2014 11:41
Yep this is still happening. Super easy to reproduce
Rob-A
Feb 06, 2014 08:49
"NOT" FIXED. I am still having this issue in version 4.3.1f. It even happens with scriptable objects which is just logical while this seems to be an compiler issue to me.
Aurore
Feb 03, 2014 15:41
Just had a look at the bug, it's fixed in the next version of Unity, which is why it's marked as fixed now. We can see this isn't very clear and will try to resolve this.
codestage
Feb 03, 2014 07:44
I'd like to add issue described here is not exactly what we see today.
We see message:
The class defined in script file named 'Tester' does not match the file name!
if class Tester is placed into namespace, have method with default parameter and derives from MonoBehavior.
Just like I described in comments here: http://issuetracker.unity3d.com/issues/a-monobehaviour-cant-be-in-a-namespace-and-have-optional-parameters-in-its-method-signature-at-the-same-time
jedy
Feb 02, 2014 19:50
It still reproduces.