BrettRyland / BDArmory

Gun turrets and other weapon systems for KSP
32 stars 23 forks source link

Gun turrets shoot with problems #615

Closed liups233 closed 4 months ago

liups233 commented 4 months ago

Describe the bug At mod version 1.6.10 and 1.6.10.1, when I shoot, the bullet trace seems to have some problem, shown in the picture below. Every gun turret, including guns brought by other mods, will produce the same problem.

While the older versions, like 1.6.9, work well.

The errors shown in console are:

Cannot add component of type 'Renderer' because it is abstract. Add component of type is derived from 'Renderer' instead. 
Exception: ArgumentNullException: Value cannot be null. 
Parameter name: shader. 

To Reproduce Please provide the steps to reproduce the behavior: Game version: 1.9.1.2788 Installed mods: image

I have tried removing other mods, leaving only BDA Plus, but the problem stills occurs.

Expected behaviour The bullet trace should not be purple.

Logs Please attach your <KSP Directory>/KSP.log file. KSP.log

Screenshots If applicable, add screenshots to help explain your problem. image

BrettRyland commented 4 months ago

OK, it looks like the new shader bundle in v1.6.10.0 broke something for older versions of KSP, which is the root cause of this issue:

[LOG 16:00:12.793] [BDArmory.BDAShaderLoader] start bundle load process
[LOG 16:00:12.794] [BDArmory.BDAShaderLoader] Loading bundle data
[ERR 16:00:12.794] Unable to read header from archive file: C:/Program Files (x86)/Steam/steamapps/common/Kerbal Space Program/KSP_x64_Data/../GameData/BDArmory/AssetBundles/bdarmoryshaders_windows.bundle

[LOG 16:00:12.794] [BDArmory.BDAShaderLoader] Error: Found no asset bundle to load

We'll try to get this fixed ASAP.

In the meantime, using the shader bundle from v1.6.9.0 should make bullet traces work again (though I'm noticing that they're sometimes missing for the initially pooled bullets), but may cause issues with the RCS (radar cross-section) shader that was added in v1.6.10.0.

liups233 commented 4 months ago

好的,看起來 v1.6.10.0 中的新著色器包破壞了舊版本的 KSP 的某些內容,這是此問題的根本原因:

[LOG 16:00:12.793] [BDArmory.BDAShaderLoader] start bundle load process
[LOG 16:00:12.794] [BDArmory.BDAShaderLoader] Loading bundle data
[ERR 16:00:12.794] Unable to read header from archive file: C:/Program Files (x86)/Steam/steamapps/common/Kerbal Space Program/KSP_x64_Data/../GameData/BDArmory/AssetBundles/bdarmoryshaders_windows.bundle

[LOG 16:00:12.794] [BDArmory.BDAShaderLoader] Error: Found no asset bundle to load

我們將嘗試儘快修復此問題。

同時,使用 v1.6.9.0 中的著色器包應該會使專案符號跟蹤再次工作(儘管我注意到它們有時對於初始池化的專案符號丟失),但可能會導致 v1.6.10.0 中添加的 RCS(雷達橫截面)著色器出現問題。

Got it. Thanks so much for your help!

BrettRyland commented 4 months ago

This ought to be working in v1.6.11.0 now. I've regenerated the shaders using an older version of Unity and tested that they work on Linux as far back as KSP 1.9.1. I've seen others using them on Windows with the current version and I expect that they'll work on Windows with 1.9.1 too. If they're working for you again now, then you can close this as completed. Thanks!

liups233 commented 4 months ago

This ought to be working in v1.6.11.0 now. I've regenerated the shaders using an older version of Unity and tested that they work on Linux as far back as KSP 1.9.1. I've seen others using them on Windows with the current version and I expect that they'll work on Windows with 1.9.1 too. If they're working for you again now, then you can close this as completed. Thanks!

It seems that everything works well in 1.9.1. Thanks for your help!