6 static void FreeCameraToggle(
PlayerBase player,
bool teleport_player =
false)
8 if (!IsFreeCameraEnabled())
10 EnableFreeCamera(player);
14 DisableFreeCamera(player, teleport_player);
18 static void EnableFreeCameraSceneEditor(
PlayerBase player)
20 EnableFreeCamera(player);
23 static bool IsFreeCameraEnabled()
25 return FreeDebugCamera.GetInstance().IsActive();
28 protected static void EnableFreeCamera(
PlayerBase player)
32 FreeDebugCamera.GetInstance().SetActive(
true);
35 GetGame().GetMission().RefreshCrosshairVisibility();
40 Debug.LogError(
"EnableFreeCamera( PlayerBase player ) -> player is NULL",
"DeveloperFreeCamera");
44 static void DisableFreeCamera(
PlayerBase player,
bool teleport_player =
false)
48 if (FreeDebugCamera.GetInstance().IsActive())
53 FreeDebugCamera.GetInstance().SetActive(
false);
57 GetGame().GetMission().RefreshCrosshairVisibility();
63 Debug.LogError(
"DisableFreeCamera( PlayerBase player, bool teleport_player ) -> player is NULL",
"DeveloperFreeCamera");
67 static void OnSetFreeCameraEvent(
PlayerBase player, FreeDebugCamera camera)
74 PluginSceneManager sceneManager = PluginSceneManager.Cast(
GetPlugin(PluginSceneManager));
76 if (sceneManager.IsOpened())
77 sceneManager.EditorToggle();
80 GetGame().GetMission().RefreshCrosshairVisibility();