Search Issue Tracker
Duplicate
Duplicate in 2018.4.X, 2019.3.X
Votes
1
Found in
2018.4.9f1
2018.4.12f1
2019.2.5f1
2019.3.0a12
2020.1.0a1
Issue ID
1194769
Regression
Yes
UnityEvent's type from a derived class is not displayed in the inspector
Steps to reproduce:
1. Open the project attached by the user ("2018.4.8f1_toMigrate.zip")
2. Open "SampleScene"
3. Click on the "Main Camera" GameObject
4. Observe the "My Event Component Derivated" Component
Expected result: "My Private Event" event's type is recognized and displayed in the Inspector
Actual result: "My Private Event" event's type not displayed in the Inspector
Reproducible with: 2018.4.12f1, 2019.2.11f1, 2019.3.0b9, 2020.1.0a9
Not reproducible with: 2017.4, 2018.4.8f1, 2019.2.4f1, 2019.3.0a11
Note:
- "MyEventComponentDerivated" class is derived from "MyEventComponent" class. The latter is displayed as expected in newer versions after the case 1188593 was fixed
Comments (1)
-
agauthierCAE
Oct 30, 2019 14:28
For completeness
- MyEventComponent.cs:
[System.Serializable]
public class MyIntEvent : UnityEvent<int>
{ }public class MyEventComponent : MonoBehaviour
{
public MyIntEvent m_MyEvent;[SerializeField]
private MyIntEvent m_MyPrivateEvent;
}- MyEventComponentDerivated.cs:
public class MyEventComponentDerivated : MyEventComponent
{ }Attaching MyEventComponentDerivated on a GameObject will report the event "My Private Event ( )" where it should have been "My Private Event (Int32)".
This blocks all dynamic bindings (or breaks all existing binding if you were on a Unity version that didn't had the issue)
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
- [UI Builder] Viewport's gizmos for Margin and Padding disappear when dragging to modify the value and the cursor leaves the Spacing section
- "Multiplayer Center" window does not reflect changes made in "Other Packages" section
- Crash on D3DKMTOpenResource when capturing with RenderDoc while GPU Skinning is set to GPU(Batched)
- Editing and saving Curve changes in UI Builder window throws multiple errors in the Console
- [UI Builder] Value is not selected when left clicking on Spacing/Border Widget values
This is a duplicate of issue #1196591