Fix.
This commit is contained in:
@@ -1320,9 +1320,18 @@ namespace FlaxEditor
|
|||||||
AnimGraphDebugFlow?.Invoke(debugFlow);
|
AnimGraphDebugFlow?.Invoke(debugFlow);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static void Internal_RequestStartPlay()
|
private static void RequestStartPlayOnStartup()
|
||||||
{
|
{
|
||||||
Instance.Simulation.RequestStartPlay();
|
if (Instance.StateMachine.IsEditMode)
|
||||||
|
{
|
||||||
|
Instance.Simulation.RequestStartPlay();
|
||||||
|
Instance.StateMachine.StateChanged -= RequestStartPlayOnStartup;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal static void Internal_RequestStartPlayOnStartup()
|
||||||
|
{
|
||||||
|
Instance.StateMachine.StateChanged += RequestStartPlayOnStartup;
|
||||||
}
|
}
|
||||||
|
|
||||||
[MethodImpl(MethodImplOptions.InternalCall)]
|
[MethodImpl(MethodImplOptions.InternalCall)]
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ MMethod* Internal_GetGameWindowSize = nullptr;
|
|||||||
MMethod* Internal_OnAppExit = nullptr;
|
MMethod* Internal_OnAppExit = nullptr;
|
||||||
MMethod* Internal_OnVisualScriptingDebugFlow = nullptr;
|
MMethod* Internal_OnVisualScriptingDebugFlow = nullptr;
|
||||||
MMethod* Internal_OnAnimGraphDebugFlow = nullptr;
|
MMethod* Internal_OnAnimGraphDebugFlow = nullptr;
|
||||||
MMethod* Internal_RequestStartPlay = nullptr;
|
MMethod* Internal_RequestStartPlayOnStartup = nullptr;
|
||||||
|
|
||||||
void OnLightmapsBake(ShadowsOfMordor::BuildProgressStep step, float stepProgress, float totalProgress, bool isProgressEvent)
|
void OnLightmapsBake(ShadowsOfMordor::BuildProgressStep step, float stepProgress, float totalProgress, bool isProgressEvent)
|
||||||
{
|
{
|
||||||
@@ -232,7 +232,7 @@ void ManagedEditor::Init()
|
|||||||
args[0] = &isHeadless;
|
args[0] = &isHeadless;
|
||||||
args[1] = &skipCompile;
|
args[1] = &skipCompile;
|
||||||
Guid sceneId;
|
Guid sceneId;
|
||||||
if (Guid::Parse(CommandLine::Options.Game.GetValue(), sceneId))
|
if (CommandLine::Options.Game.HasValue() && Guid::Parse(CommandLine::Options.Game.GetValue(), sceneId))
|
||||||
{
|
{
|
||||||
sceneId = Guid::Empty;
|
sceneId = Guid::Empty;
|
||||||
}
|
}
|
||||||
@@ -492,12 +492,12 @@ void ManagedEditor::RequestStartPlay()
|
|||||||
{
|
{
|
||||||
if (!HasManagedInstance())
|
if (!HasManagedInstance())
|
||||||
return;
|
return;
|
||||||
if (Internal_RequestStartPlay == nullptr)
|
if (Internal_RequestStartPlayOnStartup == nullptr)
|
||||||
{
|
{
|
||||||
Internal_RequestStartPlay = GetClass()->GetMethod("Internal_RequestStartPlay");
|
Internal_RequestStartPlayOnStartup = GetClass()->GetMethod("Internal_RequestStartPlayOnStartup");
|
||||||
ASSERT(Internal_RequestStartPlay);
|
ASSERT(Internal_RequestStartPlayOnStartup);
|
||||||
}
|
}
|
||||||
Internal_RequestStartPlay->Invoke(GetManagedInstance(), nullptr, nullptr);
|
Internal_RequestStartPlayOnStartup->Invoke(GetManagedInstance(), nullptr, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ManagedEditor::OnEditorAssemblyLoaded(MAssembly* assembly)
|
void ManagedEditor::OnEditorAssemblyLoaded(MAssembly* assembly)
|
||||||
|
|||||||
Reference in New Issue
Block a user