Search Issue Tracker
Duplicate
Votes
0
Found in
5.5.0b1
Issue ID
840159
Regression
No
[Inspector] Changing the type of an assigned public variable beween Transform and GameObject does not give a type mismatch
Changing the type of a public variable with an assignment from GameObject to Transform or the other way around does not give a type mismatch error.
Repro steps:
1. Open Scene1 from attached project.
2. Open Assignment script and change the type of 'go' to GameObject
3. Select Cube in scene and in its assignment script assign the same cube to the `go` variable.
4. Go back in the script and change the type of `go` to `Transform`
5. Select the Cube in the scene again and observe that it is still referencing the game object.
6. Assign the cube again to the same `go` slow and observe how the icon is changing.
Expected outcome: to get a type mismatch (if the type of 'go' is changed to LineRenderer for example, inspector will show type mismatch)
Notes:
- Not a regression, repros in 5.5.0b1 and in 5.4.1f1
- Attached gif shows process
- Attached jpg shows expected result when using a different type (LineRenderer in this case)
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
- Standalone Player crashes with "TDerived GetOrLoad<TDerived>() where TDerived : T" when IL2CPP Code generation is set to "Faster (smaller) Builds"
- IndexOutOfRangeException and InvalidOperationException when logging XML string
- Script missing in "Assets/Settings/Mobile_Renderer/GlobalVolumeFeature" of "com.unity.template.urp-blank" template
- “Font Asset Creator - Error Code [Invalid_File_Structure]…“ error is logged when generating Font Assets from fonts with meta files from previous Editor versions
- Input.mousePosition returns (NaN, NaN, 0.00) when Scene view is opened
This is a duplicate of issue #837920