Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public static void Initialize()
DomainReloadDisableScopeRecovery.RestoreForEditorStartup();
ExternalSceneChangeTracker.Initialize();
ControlPlayModeEditorStartup.Initialize();
PausePointEditorStartup.Initialize();
Comment thread
coderabbitai[bot] marked this conversation as resolved.
ExecuteDynamicCodeEditorStartup.Initialize();
GetLogsEditorStartup.Initialize();
ScreenshotEditorStartup.Initialize();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("UnityCLILoop.FirstPartyTools.Editor")]
[assembly: InternalsVisibleTo("UnityCLILoop.Tests.Editor.SourcePausePointResolver")]
[assembly: InternalsVisibleTo("UnityCLILoop.Tests.Editor.SourcePausePointCapture")]
[assembly: InternalsVisibleTo("UnityCLILoop.Tests.Editor.SourcePausePointPatcher")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,30 @@
using System;

using UnityEditor;
using UnityEngine;

namespace io.github.hatayama.UnityCliLoop.FirstPartyTools
{
// [InitializeOnLoad] runs this type's static field initializers once per AppDomain load, so
// LoadedAtUtc marks this domain's birth. Used by physics-callback dispatch diagnostics to
// report how long the current domain has been alive without a reload -- a suspected factor in
// the existing-instance physics-dispatch miss (see docs/regression-harness.md).
[InitializeOnLoad]
// MarkDomainLoaded is invoked once per AppDomain load by the composition-root bootstrap
// (through FirstPartyToolsEditorStartup), so the recorded timestamp marks this domain's
// birth. Used by physics-callback dispatch diagnostics to report how long the current
// domain has been alive without a reload -- a suspected factor in the existing-instance
// physics-dispatch miss (see docs/regression-harness.md).
internal static class PausePointDomainReloadTracker
{
public static readonly DateTime LoadedAtUtc = DateTime.UtcNow;
private static DateTime? _loadedAtUtc;

public static void MarkDomainLoaded()
{
Debug.Assert(!_loadedAtUtc.HasValue, "MarkDomainLoaded must run once per domain load");

_loadedAtUtc = DateTime.UtcNow;
Comment thread
coderabbitai[bot] marked this conversation as resolved.
}

public static double SecondsSinceLoad()
{
return (DateTime.UtcNow - LoadedAtUtc).TotalSeconds;
Debug.Assert(_loadedAtUtc.HasValue, "MarkDomainLoaded must run before SecondsSinceLoad");

return (DateTime.UtcNow - _loadedAtUtc.Value).TotalSeconds;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace io.github.hatayama.UnityCliLoop.FirstPartyTools
{
// Keeps pause-point startup wiring inside the pause-point assembly so the composition
// root only depends on the bundled-tool facade.
internal static class PausePointEditorStartup
{
public static void Initialize()
{
PausePointDomainReloadTracker.MarkDomainLoaded();
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.ComponentModel;

using io.github.hatayama.UnityCliLoop.ToolContracts;

namespace io.github.hatayama.UnityCliLoop.FirstPartyTools
Expand All @@ -9,10 +7,8 @@ namespace io.github.hatayama.UnityCliLoop.FirstPartyTools
/// </summary>
public sealed class SetGameViewSizeSchema : UnityCliLoopToolSchema
{
[Description("Target Game View rendering width in pixels. Provide with Height to change the resolution.")]
public int? Width { get; set; }

[Description("Target Game View rendering height in pixels. Provide with Width to change the resolution.")]
public int? Height { get; set; }
}
}
Loading