{"record":{"id":"24f6eb953aa1270d","repo":"Cysharp/UniTask","slug":"target-playerloopsystem-does-not-found-type","errorCode":null,"errorMessage":"Target PlayerLoopSystem does not found. Type:","messagePattern":"Target PlayerLoopSystem does not found\\. Type:","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"critical","filePath":"src/UniTask/Assets/Plugins/UniTask/Runtime/PlayerLoopHelper.cs","lineNumber":379,"sourceCode":"                }\n            }\n\n            UniTaskSynchronizationContext.Run();\n        }\n\n#endif\n\n        private static int FindLoopSystemIndex(PlayerLoopSystem[] playerLoopList, Type systemType)\n        {\n            for (int i = 0; i < playerLoopList.Length; i++)\n            {\n                if (playerLoopList[i].type == systemType)\n                {\n                    return i;\n                }\n            }\n\n            throw new Exception(\"Target PlayerLoopSystem does not found. Type:\" + systemType.FullName);\n        }\n\n        static void InsertLoop(PlayerLoopSystem[] copyList, InjectPlayerLoopTimings injectTimings, Type loopType, InjectPlayerLoopTimings targetTimings,\n            int index, bool injectOnFirst, Type loopRunnerYieldType, Type loopRunnerType, PlayerLoopTiming playerLoopTiming)\n        {\n            var i = FindLoopSystemIndex(copyList, loopType);\n            if ((injectTimings & targetTimings) == targetTimings)\n            {\n                copyList[i].subSystemList = InsertRunner(copyList[i], injectOnFirst,\n                    loopRunnerYieldType, yielders[index] = new ContinuationQueue(playerLoopTiming),\n                    loopRunnerType, runners[index] = new PlayerLoopRunner(playerLoopTiming));\n            }\n            else\n            {\n                copyList[i].subSystemList = RemoveRunner(copyList[i], loopRunnerYieldType, loopRunnerType);\n            }\n        }\n","sourceCodeStart":361,"sourceCodeEnd":397,"githubUrl":"https://github.com/Cysharp/UniTask/blob/ceac8d6946b1125fe782cd171fbcb245b567dbf9/src/UniTask/Assets/Plugins/UniTask/Runtime/PlayerLoopHelper.cs#L361-L397","documentation":"Thrown by PlayerLoopHelper.FindLoopSystemIndex during initialization when scanning the Unity PlayerLoopSystem[] array for a subsystem type (e.g., UnityEngine.PlayerLoop.Update, LateUpdate, FixedUpdate) that is not present. UniTask injects its update/delay runners into these subsystems; if a required type is missing it cannot function and aborts initialization.","triggerScenarios":"Calling PlayerLoopHelper.Initialize() after another plugin or framework has modified or stripped the Unity player loop, removing standard subsystem types. Running on a Unity version whose internal player loop structure differs from what UniTask expects.","commonSituations":"Another asset (e.g., a custom game framework) rebuilds the player loop from scratch and omits standard subsystems. Unity beta/alpha versions with restructured player loop. A stripped or custom player runtime. Scripting define symbols or platform settings that alter the player loop.","solutions":["Call PlayerLoopHelper.Initialize() early at startup, before any other system modifies the player loop.","Ensure no other plugin has stripped standard subsystem types (Update, LateUpdate, FixedUpdate, etc.) from PlayerLoop.GetCurrentPlayerLoop().","Upgrade or downgrade UniTask to a version compatible with your Unity version.","If you must use a custom player loop, merge UniTask's hooks into it rather than replacing it wholesale."],"exampleFix":"// before (another plugin replaces player loop first)\nCustomFramework.ReplacePlayerLoop();\nPlayerLoopHelper.Initialize(); // throws: subsystem not found\n\n// after (initialize UniTask first, then customize)\nPlayerLoopHelper.Initialize();\nCustomFramework.ModifyPlayerLoop(); // preserve existing subsystems","handlingStrategy":"validation","validationCode":"// Verify standard subsystems exist before initializing UniTask\nvar loop = PlayerLoop.GetCurrentPlayerLoop();\nvar requiredTypes = new[] { typeof(PlayerLoop.Update), typeof(PlayerLoop.LateUpdate), typeof(PlayerLoop.FixedUpdate) };\nforeach (var t in requiredTypes)\n{\n    bool found = false;\n    foreach (var sys in loop.subSystemList)\n        if (sys.type == t) { found = true; break; }\n    if (!found)\n        Debug.LogError($\"Missing player loop subsystem: {t.FullName}\");\n}\nPlayerLoopHelper.Initialize();","typeGuard":null,"tryCatchPattern":"try\n{\n    PlayerLoopHelper.Initialize();\n}\ncatch (Exception ex) when (ex.Message.Contains(\"PlayerLoopSystem does not found\"))\n{\n    // A subsystem type is missing; check for conflicting plugins\n    Debug.LogError(\"PlayerLoop initialization failed: \" + ex.Message);\n}","preventionTips":["Call PlayerLoopHelper.Initialize() early — before other plugins modify the player loop.","Check your Unity version is compatible with the UniTask version you are using.","Avoid frameworks that wholesale-replace the player loop; prefer additive modification."],"tags":["player-loop","initialization","unity-compatibility","startup"],"backgroundTag":null,"analyzedSha":"ceac8d6946b1125fe782cd171fbcb245b567dbf9","analyzedAt":"2026-08-13T19:16:39.025Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}