Search Issue Tracker

By Design

Votes

0

Found in

2017.3.0f3

Issue ID

1011101

Regression

No

Object reference is set to an instance of an object in Visual Studio but Unity fails to detect it

Scripting

-

Reproduction steps:
1. Download user's project and open in Unity
2. Enter Play mode
3. Open ReferenceBase script
4. Put breakpoint on line 105 (var useReference = ReferenceValue != null)
5. Press Attach to Unity in Visual Studio
6. Select the Game view and press up arrow

Expected: useReference is set to true because the ReferenceValue is not empty
Actual: useReference is set to false

Reproduced on: 5.6.5p2; 2017.1.3p2; 2017.2.2p1; 2017.3.1p4; 2018.1.0b11; 2018.2.0a4

Note: If manually setting useReference to true, after returning ReferenceValue value error appears in the console
Error message:
"NullReferenceException: Object reference not set to an instance of an object
Edge.UnityStandard.ReferenceBase`1[System.Single].get_Value () (at Assets/Scripts/Base/ReferenceBase.cs:106)
TestFloat.Update () (at Assets/Scripts/TestFloat.cs:17)"

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.