File tree 2 files changed +15
-0
lines changed
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,20 @@ protected Game()
128
128
129
129
protected sealed override void AddInternal ( Drawable drawable ) => throw new InvalidOperationException ( $ "Use { nameof ( Add ) } or { nameof ( Content ) } instead.") ;
130
130
131
+ /// <summary>
132
+ /// The earliest point of entry during <see cref="GameHost.Run"/> starting execution of a game.
133
+ /// This should be used to set up any low level tasks such as exception handling.
134
+ /// </summary>
135
+ /// <remarks>
136
+ /// At this point in execution, only <see cref="GameHost.Storage"/> and <see cref="GameHost.CacheStorage"/> are guaranteed to be valid for use.
137
+ /// They are provided as <paramref name="gameStorage"/> and <paramref name="cacheStorage"/> respectively for convenience.
138
+ /// </remarks>
139
+ /// <param name="gameStorage">The default game storage.</param>
140
+ /// <param name="cacheStorage">The default cache storage.</param>
141
+ public virtual void SetupLogging ( Storage gameStorage , Storage cacheStorage )
142
+ {
143
+ }
144
+
131
145
/// <summary>
132
146
/// As Load is run post host creation, you can override this method to alter properties of the host before it makes itself visible to the user.
133
147
/// </summary>
Original file line number Diff line number Diff line change @@ -741,6 +741,7 @@ public void Run(Game game)
741
741
CacheStorage = GetDefaultGameStorage ( ) . GetStorageForDirectory ( "cache" ) ;
742
742
743
743
SetupForRun ( ) ;
744
+ game . SetupLogging ( Storage , CacheStorage ) ;
744
745
745
746
populateInputHandlers ( ) ;
746
747
You can’t perform that action at this time.
0 commit comments