Merge branch 'Tryibion-play-game-fix'
This commit is contained in:
@@ -127,13 +127,12 @@ namespace FlaxEditor.Modules
|
|||||||
public void RequestStartPlayGame()
|
public void RequestStartPlayGame()
|
||||||
{
|
{
|
||||||
if (!Editor.StateMachine.IsEditMode)
|
if (!Editor.StateMachine.IsEditMode)
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
var firstScene = Content.Settings.GameSettings.Load().FirstScene;
|
var firstScene = Content.Settings.GameSettings.Load().FirstScene;
|
||||||
if (firstScene == Guid.Empty)
|
if (firstScene == Guid.Empty)
|
||||||
{
|
{
|
||||||
|
Editor.LogWarning("No First Scene assigned in Game Settings.");
|
||||||
if (Level.IsAnySceneLoaded)
|
if (Level.IsAnySceneLoaded)
|
||||||
Editor.Simulation.RequestStartPlayScenes();
|
Editor.Simulation.RequestStartPlayScenes();
|
||||||
return;
|
return;
|
||||||
@@ -141,6 +140,9 @@ namespace FlaxEditor.Modules
|
|||||||
if (!FlaxEngine.Content.GetAssetInfo(firstScene.ID, out var info))
|
if (!FlaxEngine.Content.GetAssetInfo(firstScene.ID, out var info))
|
||||||
{
|
{
|
||||||
Editor.LogWarning("Invalid First Scene in Game Settings.");
|
Editor.LogWarning("Invalid First Scene in Game Settings.");
|
||||||
|
if (Level.IsAnySceneLoaded)
|
||||||
|
Editor.Simulation.RequestStartPlayScenes();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load scenes after entering the play mode
|
// Load scenes after entering the play mode
|
||||||
|
|||||||
Reference in New Issue
Block a user