Commit 90996d7
committed
Fix null reference in PrefabCollectionList sync
Syncing the prefab list in OnCreated was throwing a null reference exception due to the Sync method relying on the AssetDatabase, which is not guaranteed to be in a stable state during overlay creation. Moved the sync call to OnDisplayChanged so it only runs once the editor UI is fully initialised.1 parent 28e3926 commit 90996d7
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | 29 | | |
32 | 30 | | |
33 | 31 | | |
| |||
74 | 72 | | |
75 | 73 | | |
76 | 74 | | |
| 75 | + | |
77 | 76 | | |
78 | 77 | | |
79 | 78 | | |
| |||
0 commit comments