wipshit
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using FlaxEngine;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using FlaxEditor;
|
||||
using FlaxEditor.Windows;
|
||||
using FlaxEngine.Assertions;
|
||||
using Console = Cabrito.Console;
|
||||
using Stopwatch = System.Diagnostics.Stopwatch;
|
||||
|
||||
namespace Game
|
||||
{
|
||||
@@ -187,8 +190,63 @@ namespace Game
|
||||
vertices = new Vector3[0];
|
||||
}
|
||||
|
||||
[OnSerializing]
|
||||
internal void OnSerializing(StreamingContext context)
|
||||
{
|
||||
Debug.Log("OnSerializing: " + Editor.IsPlayMode);
|
||||
}
|
||||
|
||||
[OnSerialized]
|
||||
internal void OnSerialized(StreamingContext context)
|
||||
{
|
||||
Debug.Log("OnSerialized: " + Editor.IsPlayMode);
|
||||
}
|
||||
|
||||
[OnDeserializing]
|
||||
internal void OnDeserializing(StreamingContext context)
|
||||
{
|
||||
Debug.Log("OnDeserializing: " + Editor.IsPlayMode);
|
||||
}
|
||||
|
||||
[OnDeserialized]
|
||||
internal void OnDeserialized(StreamingContext context)
|
||||
{
|
||||
Debug.Log("OnDeserialized: " + Editor.IsPlayMode);
|
||||
}
|
||||
|
||||
public override void OnStart()
|
||||
{
|
||||
#if false
|
||||
Action onScriptsReloadBegin = null;
|
||||
onScriptsReloadBegin = () =>
|
||||
{
|
||||
Debug.Log("LoadMap ScriptsReloadEnd");
|
||||
Actor worldSpawnActor = Actor.GetChild("WorldSpawn");
|
||||
if (worldSpawnActor != null)
|
||||
{
|
||||
Debug.Log("LoadMap: removing DontSave flag");
|
||||
worldSpawnActor.HideFlags &= ~HideFlags.DontSave;
|
||||
}
|
||||
ScriptsBuilder.ScriptsReloadBegin -= onScriptsReloadBegin;
|
||||
};
|
||||
ScriptsBuilder.ScriptsReloadBegin += onScriptsReloadBegin;
|
||||
|
||||
Action onScriptsReloadEnd = null;
|
||||
onScriptsReloadEnd = () =>
|
||||
{
|
||||
Debug.Log("LoadMap ScriptsReloadEnd");
|
||||
Actor worldSpawnActor = Actor.GetChild("WorldSpawn");
|
||||
if (worldSpawnActor != null)
|
||||
{
|
||||
Debug.Log("LoadMap: restoring DontSave flag");
|
||||
worldSpawnActor.HideFlags |= HideFlags.DontSave;
|
||||
}
|
||||
ScriptsBuilder.ScriptsReloadEnd -= onScriptsReloadEnd;
|
||||
};
|
||||
ScriptsBuilder.ScriptsReloadEnd += onScriptsReloadEnd;
|
||||
#endif
|
||||
|
||||
Debug.Log("LoadMap");
|
||||
LoadMap(false);
|
||||
}
|
||||
|
||||
@@ -203,7 +261,7 @@ namespace Game
|
||||
}
|
||||
else
|
||||
{
|
||||
//Console.Print("Map already loaded in the scene");
|
||||
Console.Print("Map already loaded in the scene");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user