fmod / fmod-for-unreal

FMOD Studio integration with Unreal.
https://fmod.com/resources/documentation-unreal
MIT License
202 stars 84 forks source link

FMODStudioEditor erase previously updated style #62

Closed hugoattal closed 2 years ago

hugoattal commented 3 years ago

Hello, I'm the developer of "Darker Nodes", a plugin to update the theme of the Unreal Engine https://www.unrealengine.com/marketplace/en-US/product/darker-nodes

I got a bug report from a user that also use FMOD: https://github.com/hugoattal/DarkerNodes/issues/142

It appears that FMOD erase all previously updated style of the editor here: https://github.com/fmod/ue4integration/blob/2.01-UE4.26/FMODStudio/Source/FMODStudioEditor/Private/FMODStudioStyle.cpp#L22

This is executed on the "PostEngineInit" event, which is pretty late, so that it erase a bunch of updates from my plugin... https://github.com/fmod/ue4integration/blob/2.01-UE4.26/FMODStudio/Source/FMODStudioEditor/Private/FMODStudioEditorModule.cpp#L288

If you want to update the style of the editor, I suggest you do something like that:

EditorStyle = static_cast<FSlateStyleSet*>(&FEditorStyle::Get());
EditorStyle->Set("ClassIcon.FMODAmbientSound", new IMAGE_BRUSH("Icons/AssetIcons/AmbientSound_16x", FVector2D(16.0f, 16.0f)));

So that the style is updated without being completely erased :)

Have a nice day!

fmod-cameron commented 3 years ago

Thank you for the information, I have added a task to investigate this further.

mastercoms commented 2 years ago

Seems to be fixed

fmod-andrew commented 2 years ago

Fixed in 2.01.14, 2.02.05.