Search Issue Tracker
By Design
Votes
0
Found in
2022.2.5f1
2023.1.0b3
Issue ID
UUM-26342
Regression
No
"The provided object cannot be assigned a managed reference ID because it cannot be serialized on a [SerializeReference] field." thrown in the Console window when using SerializationUtility.SetManagedReferenceIdForObject with an Enum value
How to reproduce:
- Open the attached project "SerializeReferenceEnum.zip"
- Select Assets/New MyObject.asset
- Click "Assign Managed Reference id using SerializationUtility" in the Inspector window
Expected results: No errors thrown
Actual results: "The provided object cannot be assigned a managed reference ID because it cannot be serialized on a [SerializeReference] field." thrown in the Console window
Reproducible with: 2022.2.5f1, 2023.1.0b3
Could not test with: 2020.3.44f1, 2021.3.17f1, 2022.1.24f1 (compilation errors in the Console window)
Reproducible on: Windows 10
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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Resolution Note:
The value assigned to a field with SerializedReference attribute has to be marked by [Serializable], i.e. the enums in the repro project must have [Serializable] attribute.