UniTAS icon indicating copy to clipboard operation
UniTAS copied to clipboard

[Bug]: Lethal Company: Launches but freezes after pressing host button

Open searriez opened this issue 1 year ago • 1 comments

What happened?

Launched the game, noticed the TAS tools didn't even work properly, pressing F1 didn't do anything, tried launching a game by pressing host and the game freezes.

What should have happened?

Not that lmao

UniTAS version

Latest main

BepInEx version

v5.4.x

Game name

Lethal Company

Game build

Windows x64 - Mono

How to reproduce

  1. Launch the game
  2. Press Online or LAN (either gives the same result)
  3. Press Host
  4. Freeze

Log output

UniTAS.log

Additional context

No response

searriez avatar Feb 19 '24 03:02 searriez

hm interesting i never really know what i expected with this tool and online games like lethal company i'm wondering playing completely solo is TASable i'll look into this and see what the problem is

Eddio0141 avatar Feb 19 '24 21:02 Eddio0141

Seems like loading scene is a bit broken for lethal

[Error  : Unity Log] Exception: Failed to find any loaded scene named SampleSceneRelay!
Stack trace:
Unity.Netcode.NetworkSceneManager.GetAndAddNewlyLoadedSceneByName (System.String sceneName) (at <895801699cfc4b4ab52267f31e2a4998>:0)
Unity.Netcode.NetworkSceneManager.OnSceneLoaded (System.UInt32 sceneEventId) (at <895801699cfc4b4ab52267f31e2a4998>:0)
Unity.Netcode.SceneEventProgress.<SetAsyncOperation>b__37_0 (UnityEngine.AsyncOperation asyncOp2) (at <895801699cfc4b4ab52267f31e2a4998>:0)
UnityEngine.AsyncOperation.add_completed (System.Action`1[T] value) (at <e27997765c1848b09d8073e5d642717a>:0)
Unity.Netcode.SceneEventProgress.SetAsyncOperation (UnityEngine.AsyncOperation asyncOperation) (at <895801699cfc4b4ab52267f31e2a4998>:0)
Unity.Netcode.DefaultSceneManagerHandler.LoadSceneAsync (System.String sceneName, UnityEngine.SceneManagement.LoadSceneMode loadSceneMode, Unity.Netcode.SceneEventProgress sceneEventProgress) (at <895801699cfc4b4ab52267f31e2a4998>:0)
Unity.Netcode.NetworkSceneManager.LoadScene (System.String sceneName, UnityEngine.SceneManagement.LoadSceneMode loadSceneMode) (at <895801699cfc4b4ab52267f31e2a4998>:0)
MenuManager+<delayedStartScene>d__91.MoveNext () (at <0b5b829887344817a21214132ea92eef>:0)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <e27997765c1848b09d8073e5d642717a>:0)

This doesn't happen without UniTAS

Eddio0141 avatar Jul 16 '24 04:07 Eddio0141

so looks like it can't find the scene when the AsyncOperation event is called back immediately here I should delay the event callback either way, this can break existing movies sadly as it alters when the event is called back to be more accurate in behaviour

todo

  • [x] do I callback on FixedUpdate or Update, or either
  • [x] on AsyncOperation event callback, is isDone true or false, and what value is priority? Test normal behaviour
    • isDone: true, priority: 1

Eddio0141 avatar Jul 17 '24 05:07 Eddio0141

Pushed fix, new input system would probably stop it from working, but that's a whole different issue, closing

Eddio0141 avatar Jul 21 '24 01:07 Eddio0141