Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
searriez opened this issue Feb 19, 2024 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@searriez
Copy link

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

@Eddio0141
Copy link
Owner

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
Copy link
Owner

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 Eddio0141 added the bug Something isn't working label Jul 16, 2024
@Eddio0141
Copy link
Owner

Eddio0141 commented Jul 17, 2024

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

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

@Eddio0141
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants