diff --git a/.github/workflows/octopus.yaml b/.github/workflows/octopus.yaml new file mode 100644 index 0000000..99f90ab --- /dev/null +++ b/.github/workflows/octopus.yaml @@ -0,0 +1,73 @@ +name: Octopus Review + +on: + pull_request: + types: + - opened + - synchronize + - reopened + +permissions: + contents: read + pull-requests: write + +jobs: + review: + runs-on: ubuntu-latest + + steps: + - name: Run Octopus Review + uses: octopusreview/action@v1 + with: + # Public Repoなら不要 + # Private Repoの場合のみ設定 + octopus-api-key: ${{ secrets.OCTOPUS_API_KEY }} + + # 日本語レビュー + review-language: "ja" + + # Unity/C#向けチューニング + extra-instructions: | + **必ず日本語のみでレビューしてください。英語は使わないでください。** + You MUST respond in Japanese only. Do not use English. + + + レビューは簡潔にしてください。 + 重大な問題を優先してください。 + + 以下を重点的に確認: + - NullReferenceException の可能性 + - GC Alloc + - Update/LateUpdate/FixedUpdate内の重い処理 + - LINQ多用 + - foreach boxing + - async/await の例外処理 + - async void + - UniTaskの誤用 + - IDisposable/NativeArray の Dispose漏れ + - Addressables誤用 + - Unity main thread問題 + - ScriptableObject誤用 + - イベント購読解除漏れ + - メモリリーク + - パフォーマンス問題 + - マルチスレッド問題 + - URP互換性 + - Shader負荷 + + 以下は指摘しない: + - 命名スタイル + - コメント不足 + - 個人の好みレベルの設計 + - 過剰なリファクタ提案 + - 小さなコードスタイル + - var使用有無 + - 改行位置 + - インデント + - using順 + - trivialな最適化 + + Unity特有の問題を優先してください。 + + 明確な問題のみ指摘してください。 + 推測ベースの指摘は避けてください。 \ No newline at end of file diff --git a/Assets/Runtime/Scripts/Log/ErrorIndicator.cs b/Assets/Runtime/Scripts/Log/ErrorIndicator.cs index ad3837b..8c738bd 100644 --- a/Assets/Runtime/Scripts/Log/ErrorIndicator.cs +++ b/Assets/Runtime/Scripts/Log/ErrorIndicator.cs @@ -19,22 +19,19 @@ protected override void Awake() protected override void OnEnable() { - if (SDSettings.Instance.IsShowErrorIndicator) - { - Application.logMessageReceived += OnLogMessageReceived; - } - + Application.logMessageReceivedThreaded += OnLogMessageReceived; Clear(); } protected override void OnDisable() { - Application.logMessageReceived -= OnLogMessageReceived; + Application.logMessageReceivedThreaded -= OnLogMessageReceived; Clear(); } private void OnLogMessageReceived(string condition, string stackTrace, LogType type) { + if (!SDSettings.Instance.IsShowErrorIndicator) return; if (type is not (LogType.Error or LogType.Exception or LogType.Assert) || _isBlinking) return; HasError = true; StopAllCoroutines(); diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 99122bc..1aa2765 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -71,10 +71,11 @@ } }, "jp.co.cyberagent.instant-replay": { - "version": "file:C:/Users/kurob/Desktop/Unity/ScreenRecord/Packages/InstantReplay/Packages/jp.co.cyberagent.instant-replay", + "version": "https://github.com/CyberAgentGameEntertainment/InstantReplay.git?path=/Packages/jp.co.cyberagent.instant-replay", "depth": 0, - "source": "local", - "dependencies": {} + "source": "git", + "dependencies": {}, + "hash": "e9c51149ddf586c2da5672d8795c68f68925d2b1" }, "jp.co.cyberagent.instant-replay.dependencies": { "version": "https://github.com/CyberAgentGameEntertainment/InstantReplay.git?path=/Packages/jp.co.cyberagent.instant-replay.dependencies",