@@ -108,7 +108,7 @@ public virtual void OnUpdate () { }
108
108
// done during 'OnInitialize' cycle.
109
109
public void Register ( params System . Type [ ] typesOf ) {
110
110
if ( this . isInitialized == true )
111
- throw new System . Exception ( "Unable to registered system outsize of OnInitialize cycle" ) ;
111
+ throw new System . Exception ( "Cannot to registered System outsize of OnInitialize cycle" ) ;
112
112
113
113
for ( var _typeOfIndex = 0 ; _typeOfIndex < typesOf . Length ; _typeOfIndex ++ ) {
114
114
var _instance = System . Activator . CreateInstance ( typesOf [ _typeOfIndex ] ) ;
@@ -183,15 +183,15 @@ public bool IsSystemEnabled<S> () {
183
183
for ( var _systemIndex = 0 ; _systemIndex < this . systems . Count ; _systemIndex ++ )
184
184
if ( this . systems [ _systemIndex ] . GetType ( ) == _typeOfS )
185
185
return ( S ) this . systems [ _systemIndex ] ;
186
- throw new System . Exception ( "Unable to get system , it was not registerd to the controller " ) ;
186
+ throw new System . Exception ( $ "Unable to get System of type { _typeOfS } , it was not registerd to the Controller ") ;
187
187
}
188
188
189
189
/// Gets a system from this controller.
190
190
public System . Object GetSystem ( System . Type typeOf ) {
191
191
for ( var _systemIndex = 0 ; _systemIndex < this . systems . Count ; _systemIndex ++ )
192
192
if ( this . systems [ _systemIndex ] . GetType ( ) == typeOf )
193
193
return this . systems [ _systemIndex ] ;
194
- throw new System . Exception ( "Unable to get system , it was not registerd to the controller " ) ;
194
+ throw new System . Exception ( $ "Unable to get System of type { typeOf } , it was not registerd to the Controller ") ;
195
195
}
196
196
197
197
/// Check whether this controller has a system.
@@ -209,15 +209,15 @@ public System.Object GetSystem (System.Type typeOf) {
209
209
for ( var _serviceIndex = 0 ; _serviceIndex < this . services . Count ; _serviceIndex ++ )
210
210
if ( this . services [ _serviceIndex ] . GetType ( ) == _typeOfS )
211
211
return ( S ) this . services [ _serviceIndex ] ;
212
- throw new System . Exception ( "Unable to get service , it was not registerd to the controller " ) ;
212
+ throw new System . Exception ( $ "Unable to get Service of type { _typeOfS } , it was not registerd to the Controller ") ;
213
213
}
214
214
215
215
/// Gets a system from this controller.
216
216
public System . Object GetService ( System . Type typeOf ) {
217
217
for ( var _serviceIndex = 0 ; _serviceIndex < this . services . Count ; _serviceIndex ++ )
218
218
if ( this . services [ _serviceIndex ] . GetType ( ) == typeOf )
219
219
return this . services [ _serviceIndex ] ;
220
- throw new System . Exception ( "Unable to get service , it was not registerd to the controller " ) ;
220
+ throw new System . Exception ( $ "Unable to get Service of type { typeOf } , it was not registerd to the Controller ") ;
221
221
}
222
222
223
223
/// Check whether this controller has a service.
@@ -234,7 +234,7 @@ public UnityEngine.Object GetAsset (string name) {
234
234
for ( var _i = 0 ; _i < this . assets . Length ; _i ++ )
235
235
if ( this . assets [ _i ] . name == name )
236
236
return this . assets [ _i ] ;
237
- throw new System . Exception ( $ "Unable to get asset '{ name } ', it was not found on the controller ") ;
237
+ throw new System . Exception ( $ "Unable to get Asset '{ name } ', it was not found on the Controller ") ;
238
238
}
239
239
240
240
/// Gets an asset from this controller.
0 commit comments