internal static void Studio_ChangeCamera_Postfix(OCICamera _ociCamera) { if (!EnableChangeCameraHook || _insideHook || StudioSaveLoadApi.LoadInProgress || _ociCamera == null) { return; } try { _insideHook = true; if (!Enabled.Value) { return; } var controller = GetController(); if (controller == null || controller.InitialCamera == null || !controller.InitialCameraReady || _ociCamera != controller.InitialCamera) { return; } Logger.DebugLogDebug($"{nameof(Studio_ChangeCamera_Postfix)}: Initial camera selected"); controller.ActivateInitialCamera(); } catch (Exception err) { Logger.LogException(err, nameof(Studio_ChangeCamera_Postfix)); _insideHook = false; } finally { _insideHook = false; } }
public static void AddCameraHook1(OCICamera __result) { _lastCamera = __result; }