Browse Source

hooked in the EditorPlayRequest event to be able to perform logic prior to the player launching

Shaddock Heath 10 years ago
parent
commit
ddcdece2c9

+ 2 - 1
Script/AtomicEditor/editor/EditorEvents.ts

@@ -27,7 +27,7 @@ export interface ModalErrorEvent {
   message: string;
   message: string;
 
 
 }
 }
-
+export const PlayerStartRequest = "EditorPlayRequest";
 export const PlayerStarted = "EditorPlayerStarted";
 export const PlayerStarted = "EditorPlayerStarted";
 export const PlayerStopped = "EditorPlayerStopped";
 export const PlayerStopped = "EditorPlayerStopped";
 export const PlayerLog = "EditorPlayerLog";
 export const PlayerLog = "EditorPlayerLog";
@@ -65,6 +65,7 @@ export const CloseProject = "EditorCloseProject";
 export const ProjectClosed = "EditorProjectClosed";
 export const ProjectClosed = "EditorProjectClosed";
 
 
 export const LoadProject = "EditorLoadProject";
 export const LoadProject = "EditorLoadProject";
+export const LoadProjectNotification = "EditorLoadProjectNotification";
 export interface LoadProjectEvent {
 export interface LoadProjectEvent {
 
 
   // The full path to the .atomic file
   // The full path to the .atomic file

+ 2 - 0
Source/AtomicEditor/EditorMode/AEEditorMode.cpp

@@ -73,6 +73,8 @@ void EditorMode::HandleIPCWorkerStarted(StringHash eventType, VariantMap& eventD
 
 
     startupData["debugHudMode"] = debugHud ? debugHud->GetMode() : (unsigned) 0;
     startupData["debugHudMode"] = debugHud ? debugHud->GetMode() : (unsigned) 0;
 
 
+    SendEvent(E_EDITORPLAYREQUEST);
+
     playerBroker_->PostMessage(E_IPCINITIALIZE, startupData);
     playerBroker_->PostMessage(E_IPCINITIALIZE, startupData);
 
 
     SendEvent(E_EDITORPLAYERSTARTED);
     SendEvent(E_EDITORPLAYERSTARTED);