Search Issue Tracker
Postponed means that the issue was either a feature request or something that requires major refactoring on our side. Since that makes the issue not actionable in the close future we choose to close it as Postponed and add it on our internal roadmaps and technical debt pages instead.
Postponed
Votes
9
Found in
2019.4
2020.2
2021.1
2021.2
Issue ID
1298773
Regression
No
[UnityEvent] PropertyField() doesn't display the correct type when using SerializeReference on a polymorphic class
How to reproduce:
1. Open the attached "" project
2. Open the "SampleScene" Scene from the Assets > Scenes folder
3. Select the "ScriptHolder" GameObject from the Hierarchy window
4. Open the Inspector window
5. Expand the collapsed fields
Expected results: the type of the 3rd and 4th fields in the Inspector window is "Callback(TestEvent1)
Actual results: the type of the 3rd and 4th fields in the Inspector window is "Callback()
Reproducible with: 2019.4.20f1, 2020.2.3f1, 2021.1.0b5, 2020.2.0a3
Could not test with: 2018.4.31f1 (SerializeReference attribute isn't available)
Notes:
-Putting a breakpoint in the OnInspectorGUI and debugging reveals that the type of the "eventPropert" object is "managedReference<TestEvent1Entry>"
-
sindrijo_
Jul 01, 2021 21:00
I'm not sure this is so hard to fix, the GetDummyEvent just has to take into account managedReference when resolving the event-type to instantiate for the 'dummyevent' used in the event inspector.
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
- Additional empty space becomes visible under "Scripts" in the "Add Component" window
- Longer component titles overlap navigation arrow in the "Add Component" window
- Joint Physics result in unexpected behaviors when used for articulated vehicles like buses or trucks
- 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
Resolution Note:
As of now we dont support the