Search Issue Tracker
Fixed in 2018.2.2f1
Votes
5
Found in
2017.1.1f1
Issue ID
962043
Regression
No
Default argument value makes the Editor recognize a script as not valid
To reproduce:
1. Open the project, attached by the tester (defaultArgsBug.zip)
2. Open the "scene" scene
3. Select the obj game object in the hierarchy and see that Z script is recognized as valid script
4. Open the Z script and add default value to the testMethod's string a argument in the class Y
5. Return to the Editor and wait for compilation to end
6. Select the game object again and observe how script is not recognized anymore
Expected: default argument value doesn't have an influence on whether the script is valid or not
Reproduced in 5.5.5p1, 5.6.4p1, 2017.1.1f1, 2017.1.2p2, 2017.2.0p1, 2017.3.0b6, 2018.1.0a1
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
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
TylerVezina
Mar 08, 2018 13:03
I ran into the same issue. The following script exhibits this issue; removing the default value fixes the script, and so does removing the namespace:
using UnityEngine;
namespace Fake
{
public class NotComponent
{
public void Something(bool value = true) { }
}
public class Test : MonoBehaviour { }
}