xiaoye97 / xiaoye97-BepInEx-Plugins

基于BepInex的Unity游戏插件
57 stars 23 forks source link

Exception after latestest patch #19

Open Dawzzy42 opened 3 years ago

Dawzzy42 commented 3 years ago

Was working fine last night. I think the latest patch broke the mod. Got this error when I went to lay down a smelter line.

Exception hit 120 times: MissingMethodException: Method not found: 'PlayerAction_Build.DoDestructObject'.
AdvancedBuildDestruct.BuildPatch.CreatePrebuildsPrePatch (PlayerAction_Build) <0x0002e>
(wrapper dynamic-method) PlayerAction_Build.DMD<PlayerAction_Build..CreatePrebuilds> (PlayerAction_Build) <0x00150>
PlayerAction_Build.BuildMainLogic () <0x0008c>
PlayerAction_Build.GameTick (long) <0x002c0>
PlayerController.GameTick (long) <0x0013f>
Player.GameTick (long) <0x0006c>
GameData.GameTick (long) <0x00110>
GameMain.FixedUpdate () <0x00262>

Target methods matching by name:
System.Void PlayerAction_Build::CreatePrebuilds()

Relevant plugins:
1. org.fezeral.plugins.copyinserters - thisisbrad-CopyInserters\CopyInserters.dll
    Postfix[index=0]: static System.Void DSP_Mods.CopyInserters.PlayerAction_Build_Patch::CreatePrebuilds_Prefix(PlayerAction_Build __instance)

2. harmony-auto-aae49424-c7de-4cd3-a166-51ee8ba009e0 - xiaoye97-AdvancedBuildDestruct\AdvancedBuildDestruct.dll
    Postfix[index=1]: static System.Boolean AdvancedBuildDestruct.BuildPatch::CreatePrebuildsPrePatch(PlayerAction_Build __instance)

==================
Dawzzy42 commented 3 years ago

It will let me place previews of buildings but when I click it says collides with object, even when not colliding. The crash happens as soon as I press the key to multi-copy (I changed it to ctrl so it I could keep flying but that was still working last night).

tpaktop77 commented 3 years ago

Same story

skilz80 commented 3 years ago

Same Here!

skilz80 commented 3 years ago

Okay, I'm more of a C++ programmer and not a C#, but after getting the same exact error or exception handler error thrown as others it appears to me that the provided message is stating that an undefined function or method is being called.

After reading through your source code in BuildPatch.cs pertaining to the code block from lines [543-556]

int num9 = 0; foreach (BuildPreview buildPreview4 in _this.buildPreviews) { if (buildPreview4.coverObjId != 0 && buildPreview4.willCover) { _this.DoDestructObject(buildPreview4.coverObjId, out num9); } foreach (int objId in _this.tmp_links) { _this.DoDestructObject(objId, out num9); } } _this.AfterPrebuild(); begin = false;

The method .DoDestructObject(...) is not defined or declared anywhere within your source and I don't know if this function is or was defined either in the original game or within the BepInex Plugin Library as I'm not familiar with their code bases. However, it appears that before the most resent patch or update from the game developers on Steam your mod did work and now this function is trying to be invoked but the game doesn't seem to be able to find it. I don't know if they removed or changed the name of this method or not... but this is the general symptom and bug that I'm seeing... It shouldn't be too hard to track down to fix it and to update your amazing mod! Hope to see it fixed soon! I hope that this helps make it easier for you to make the appropriate changes... Keep up the amazing work on such a wonderful mod! Cheers!