File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,8 @@ void ISerializationCallbackReceiver.OnBeforeSerialize()
123123 }
124124 public static class NotesSettingsExtensions
125125 {
126+ public static bool IsNullOrDummy ( this AuthorInfo self ) => self == null || self == DUMMY_AUTHOR ;
127+ public static bool IsNullOrDummy ( this NoteTypeInfo self ) => self == null || self == DUMMY_NOTE_TYPE ;
126128 public static bool IsDummy ( this AuthorInfo self ) => self == DUMMY_AUTHOR ;
127129 public static bool IsDummy ( this NoteTypeInfo self ) => self == DUMMY_NOTE_TYPE ;
128130 }
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ public AuthorInfo Author
6868 get
6969 {
7070#if UNITY_EDITOR
71- if ( _author == null ) UpdateRefs ( ) ;
71+ if ( _author . IsNullOrDummy ( ) == false ) UpdateRefs ( ) ;
7272 return _author ;
7373#else
7474 return null ;
@@ -87,7 +87,7 @@ public NoteTypeInfo Type
8787 get
8888 {
8989#if UNITY_EDITOR
90- if ( _type == null ) UpdateRefs ( ) ;
90+ if ( _type . IsNullOrDummy ( ) == false ) UpdateRefs ( ) ;
9191 return _type ;
9292#else
9393 return null ;
@@ -118,7 +118,7 @@ public Color Color
118118 get
119119 {
120120#if UNITY_EDITOR
121- return _type . color ;
121+ return Type . color ;
122122#else
123123 return default ;
124124#endif
You can’t perform that action at this time.
0 commit comments