diff --git a/osu.Framework.Templates/templates/template-empty/TemplateGame.Game.Tests/Visual/TestSceneTemplateGameGame.cs b/osu.Framework.Templates/templates/template-empty/TemplateGame.Game.Tests/Visual/TestSceneTemplateGameGame.cs index bdaac3367d..a9f34c6299 100644 --- a/osu.Framework.Templates/templates/template-empty/TemplateGame.Game.Tests/Visual/TestSceneTemplateGameGame.cs +++ b/osu.Framework.Templates/templates/template-empty/TemplateGame.Game.Tests/Visual/TestSceneTemplateGameGame.cs @@ -1,5 +1,4 @@ using osu.Framework.Allocation; -using osu.Framework.Platform; using NUnit.Framework; namespace TemplateGame.Game.Tests.Visual @@ -10,15 +9,10 @@ public partial class TestSceneTemplateGameGame : TemplateGameTestScene // Add visual tests to ensure correct behaviour of your game: https://github.com/ppy/osu-framework/wiki/Development-and-Testing // You can make changes to classes associated with the tests and they will recompile and update immediately. - private TemplateGameGame game; - [BackgroundDependencyLoader] - private void load(GameHost host) + private void load() { - game = new TemplateGameGame(); - game.SetHost(host); - - AddGame(game); + AddGame(new TemplateGameGame()); } } } diff --git a/osu.Framework.Templates/templates/template-flappy/FlappyDon.Game.Tests/Visual/TestSceneFlappyDonGame.cs b/osu.Framework.Templates/templates/template-flappy/FlappyDon.Game.Tests/Visual/TestSceneFlappyDonGame.cs index dfb9bc7531..3de074c08c 100644 --- a/osu.Framework.Templates/templates/template-flappy/FlappyDon.Game.Tests/Visual/TestSceneFlappyDonGame.cs +++ b/osu.Framework.Templates/templates/template-flappy/FlappyDon.Game.Tests/Visual/TestSceneFlappyDonGame.cs @@ -1,5 +1,4 @@ using osu.Framework.Allocation; -using osu.Framework.Platform; using NUnit.Framework; namespace FlappyDon.Game.Tests.Visual @@ -11,14 +10,10 @@ namespace FlappyDon.Game.Tests.Visual [TestFixture] public partial class TestSceneFlappyDonGame : FlappyDonTestScene { - private FlappyDonGame game; - [BackgroundDependencyLoader] - private void load(GameHost host) + private void load() { - game = new FlappyDonGame(); - game.SetHost(host); - AddGame(game); + AddGame(new FlappyDonGame()); } } } diff --git a/osu.Framework/Testing/TestScene.cs b/osu.Framework/Testing/TestScene.cs index 545f59161e..307ffaa82d 100644 --- a/osu.Framework/Testing/TestScene.cs +++ b/osu.Framework/Testing/TestScene.cs @@ -90,6 +90,7 @@ protected void AddGame([NotNull] Game game) exitNestedGame(); nestedGame = game; + nestedGame.SetupLogging(host.Storage, host.CacheStorage); nestedGame.SetHost(host); base.Add(nestedGame);