Search Issue Tracker
Won't Fix
Votes
0
Found in [Package]
1.0.14 (Patch 3)
1.0.16 (Patch 4)
1.1.0-pre.3 - Entities
Issue ID
ECSB-956
Regression
No
"InvalidCastException: Specified cast is not valid" error is thrown when accessing UnityEngine.Material "Value" Property in UnityObjectRef
Reproduction steps:
1. Open the “ReproProject“ project
2. Open the “Assets/Scenes/SampleScene“ scene
3. Enter Play Mode
4. Observe the Console window
Expected result: There are no errors in the Console window
Actual result: “InvalidCastException: Specified cast is not valid.“ error is thrown in the Console window
Reproducible with: 1.0.14, 1.0.16, 1.1.0-pre.3 (2022.3.20f1, 2023.3.0a19)
Fixed in: 1.2.0-pre.6 (2022.3.20f1, 2023.3.0b7)
Reproducible on: Windows 11 Pro (22H2)
Not reproducible on: No other environment tested
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
- NullReferenceException is thrown when assigning an Object to a custom DebugUI.ObjectField in Rendering Debugger
- SystemInfo.get_graphicsDeviceName() is generating garbage GC Alloc when using Metal graphics API
- Crash on D3D12CommonShader::ApplyGpuProgram when attaching material which samples "_UnityFBInput0" to "Full Screen Pass Renderer Feature" Component
- SpeedTree meshes and objects count differs when comparing the numbers in the Player with the Editor
- Model and Prefab Preview icons are not updated after upgrading associated Materials to URP
Resolution Note:
This bug is fixed in 1.2.0+ we have no plans to fix it in any earlier version. We recommend users upgrade if they encounter this issue.