DeathWrench / BestestTVMod

combines these two mods, so videos play sequentially and you can use TV controls.
1 stars 1 forks source link

Shuffle and Channels not working #7

Closed Drachoth closed 4 months ago

Drachoth commented 4 months ago

Is there a maximum # of videos or total size that breaks the snuffle feature and the channels?

TV stops playing after changing channels, only way to skip to next video is by turning TV off and on. For reference my Television Video folder has 221 files and is a total of 1.5GB

DeathWrench commented 4 months ago

I've had over 300 before. Not experiencing this issue. Though I've been getting this error recently and don't know how to solve it. It seems related.

[Error  : Unity Log] ArgumentException: Field currentClip defined on type TVScript is not a field on the target object which is of type UnityEngine.Video.VideoPlayer.
Parameter name: obj
Stack trace:
System.Reflection.RuntimeFieldInfo.SetValue (System.Object obj, System.Object val, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Globalization.CultureInfo culture) (at <787acc3c9a4c471ba7d971300105af24>:IL_0045)
System.Reflection.FieldInfo.SetValue (System.Object obj, System.Object value) (at <787acc3c9a4c471ba7d971300105af24>:IL_0009)
BestestTVModPlugin.TVScriptPatches.TVIndexUp () (at <84bade3961b1439493d92f2cf5e30336>:IL_0070)
BestestTVModPlugin.TVScriptPatches.GetTVInput (GameNetcodeStuff.PlayerControllerB __instance) (at <84bade3961b1439493d92f2cf5e30336>:IL_029E)
(wrapper dynamic-method) GameNetcodeStuff.PlayerControllerB.DMD<GameNetcodeStuff.PlayerControllerB::Update>(GameNetcodeStuff.PlayerControllerB)
Drachoth commented 4 months ago

I turned off everything and just had the minimum for this mod and this is the error I get:

[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object Stack trace: BestestTVModPlugin.TVScriptPatches.Update (TVScript __instance) (at <84bade3961b1439493d92f2cf5e30336>:0) (wrapper dynamic-method) TVScript.DMD(TVScript)

[Info :BestestTelevisionMod] file://C:\Users\\AppData\Roaming\Thunderstore Mod Manager\DataFolder\LethalCompany\profiles\\\BepInEx\plugins\drachoth-Dracs_Pack\Television Videos\Commercials-Toyota Pre-Thon.mp4

It spams this on repeat so quickly I couldn't scroll back up to see how it loaded in through Bepin. Upon quitting and reloading several times the file in question changes - I'm guessing it's whatever file it is trying to load first.

When I load the game with the full modpack (includes some QoL mods for cleaning up the cmd output this what is shown:

[Info :BestestTelevisionMod] Turning on TV [Warning: Unity Log] Only custom filters can be played. Please add a custom filter or an audioclip to the audiosource (TVAudio). [Info : TVLoader] TVOnOff: True [Info : TVLoader] Destroy TVScript (UnityEngine.VideoPlayer) [Info : TVLoader] Prepared next video! [Info :BestestTelevisionMod] Turning on TV [Warning: Unity Log] Only custom filters can be played. Please add a custom filter or an audioclip to the audiosource (TVAudio). [Info : TVLoader] TVOnOff: False

The mod, TV randomizer works, but doesn't come with the other setting options this mod does

DeathWrench commented 4 months ago

Are you running TVLoader(and/or)LethalTVManager at the same time as using this mod? Must disable/uninstall them if you have them, they will conflict.

Drachoth commented 4 months ago

Good lord you're right, TV pack was forcing TVLoader to work, now it works great and I'm in the same boat as you are - thank you

[Error : Unity Log] ArgumentException: Field currentClip defined on type TVScript is not a field on the target object which is of type UnityEngine.Video.VideoPlayer. Parameter name: obj Stack trace: System.Reflection.RuntimeFieldInfo.SetValue (System.Object obj, System.Object val, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Globalization.CultureInfo culture) (at <787acc3c9a4c471ba7d971300105af24>:IL_0045) System.Reflection.FieldInfo.SetValue (System.Object obj, System.Object value) (at <787acc3c9a4c471ba7d971300105af24>:IL_0009) BestestTVModPlugin.TVScriptPatches.TVIndexUp () (at <84bade3961b1439493d92f2cf5e30336>:IL_0070) BestestTVModPlugin.TVScriptPatches.TVFinishedClip (TVScript __instance) (at <84bade3961b1439493d92f2cf5e30336>:IL_004F) (wrapper dynamic-method) TVScript.DMD(TVScript,UnityEngine.Video.VideoPlayer) UnityEngine.Video.VideoPlayer.InvokeLoopPointReachedCallback_Internal (UnityEngine.Video.VideoPlayer source) (at :IL_000E)

DeathWrench commented 4 months ago

1.3.1 should fix the errors when skipping channels.