shadowmage45 / TUFX

Textures Unlimited Special Effects
Other
24 stars 10 forks source link

Fix https://github.com/shadowmage45/TUFX/issues/32 #33

Closed Vandest1 closed 2 years ago

Vandest1 commented 2 years ago

Hello,

I found what is make this issue, it's due to strange behavior of "GetCurrentCamera()" that it working well when it's called by "setProfileForScene" method and it found the correct camera (Camera ScaledSpace) but it stay on flight camera (Camera 00) when it's called by "enableProfileForCurrentScene". So when you switch from flight scene to map scene, map profile is apply on flight camera and you can't see it because we are on map scene. And of course when we revert back on flight scene, it reapply flight profile correctly, so it seems map profile is never apply.

To solve this, we can force it to apply map profile on "Camera ScaledSpace" when we switch to map scene and let it to use "GetCurrentCamera()" method to get flight camera (Camera 00).

I hope I saved you some time, because it's a little thing but strange. And thank you for maintaining this mod.

JonnyOThan commented 2 years ago

I merged this manually (just the functional change)

Vandest1 commented 2 years ago

OK, I understand. I should have to only push TexturesUnlimitedFXLoader.cs. I thought it after but it was too late.

JonnyOThan commented 2 years ago

No worries, thanks for tracking this down! I changed the csproj setup a bit which should make things easier in the future; you just need to set the reference directory to the root of your KSP install and everything should just work.