Search Issue Tracker
Fixed in 2018.3.X
Fixed in 2018.2.X
Votes
9
Found in
2017.2.0f3
Issue ID
962275
Regression
No
"using static" directive causes Unity to not find the class in the script
The issue happens wit .NET 4.6 only
To reproduce:
1. Open the project, attached by the tester (usingStaticBug.zip)
2. Add Fred.cs script to any game object
3. (Optional) Examine the code in Fred.cs
Expected: using "using static" directive in the script doesn't prevent Unity from finding the class in the script
Reproduced in 2017.1.0a6, 2017.1.2p2, 2017.2.0f3, 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
Vapid-Linus
Jul 15, 2018 10:56
Still a problem in 2018.2.2f1 when using a statically imported class from a class inside a namespace.
dog_funtom
May 19, 2018 19:22
Followup: actually, it is found for a moment, just after compilation (or maybe during). Can be attached to GO and displayed in inspector as usual. Then it changes to invalid and stays like this for a moment. And only then it disappears and can't be added.
But during/just after a next compilation, it appears back, then follows the described cycle again.
In other words, it is found successfully, but then somehow "unfound" by some kind of process that runs after errorless compilation.
dog_funtom
May 19, 2018 19:13
2018.1.0f2 still can't find such script.