How to set execution order of injected MonoBehaviors? #738
-
This might be the wrong place to ask for this, this is very complicated! I'm using bepinex to mod Lethal Company, and the game uses LateUpdate to move the ship around. This causes injected monobehaviors to jitter, which normally would be fixed by setting Execution Order in script import settings within Unity. https://github.com/BepInEx/BepInEx/assets/1131571/3495433a-f466-445a-a223-8242d7bfca76 This isn't available from the Unity API at runtime, and I cannot find any documentation about modifying script execution order in Bepinex, or Harmony docs. Does anyone know where I should be looking for this? I've tried setting |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I actually figured out I can just manually inject my update order by using the PlayerLoopSystem api. The article below taught me everything I needed to know. https://medium.com/@thebeardphantom/unity-2018-and-playerloop-5c46a12a677 The following code is what I used to make sure my jiggle executes after all bones are done moving. https://github.com/naelstrof/UnityJigglePhysics/blob/bcompat/Scripts/JiggleRigHandler.cs |
Beta Was this translation helpful? Give feedback.
I actually figured out I can just manually inject my update order by using the PlayerLoopSystem api. The article below taught me everything I needed to know.
https://medium.com/@thebeardphantom/unity-2018-and-playerloop-5c46a12a677
The following code is what I used to make sure my jiggle executes after all bones are done moving.
https://github.com/naelstrof/UnityJigglePhysics/blob/bcompat/Scripts/JiggleRigHandler.cs