Tencent / puerts

PUER(普洱) Typescript. Let's write your game in UE or Unity with TypeScript.
Other
5.09k stars 709 forks source link

[UE] Bug: PuerTS Button disappearing #1256

Closed faseceroo closed 1 year ago

faseceroo commented 1 year ago

前置阅读 | Pre-reading

Puer的版本 | Puer Version

Unreal_v1.0.3

UE的版本 | UE Version

5.1.1

发生在哪个平台 | Platform

Editor(win)

错误信息 | Error Message

It seems that PuerTS' toolbar button and menu item has issues with engine plugins that create buttons in the same places.

image1

In the image above the "Easy Bookmarks" plugin menu item disappears after installing Puerts as a project plugin.

In the image below PuerTS' toolbar button does not appear if I activate an engine plugin that creates a button in that place.

image2

问题重现 | Bug reproduce

Install engine plugins that adds toolbar editor items or a new window menu item in Unreal. The engine plugin button or PuertTS button will dissapear.

chexiongsheng commented 1 year ago

You can use the console command: Puerts.Gen, or Puerts.Gen FULL, before I fixed it.

faseceroo commented 1 year ago

I will, thank you so much!

faseceroo commented 1 year ago

I have checked where the buttons are created. Both plugins create the toolbar button in the exact same section and they are overlapping for some reason

UToolMenu* ToolbarMenu = UToolMenus::Get()->ExtendMenu("LevelEditor.LevelEditorToolBar.PlayToolBar");

file Plugins/Puerts/Source/DeclarationGenerator/Private/DeclarationGenerator.cpp class FDeclarationGenerator function RegisterMenus line 1346

After change PuerTS button section I have the button back

UToolMenu* ToolbarMenu = UToolMenus::Get()->ExtendMenu("LevelEditor.LevelEditorToolBar.User"); // PlayToolBar

image

chexiongsheng commented 1 year ago

I have checked where the buttons are created. Both plugins create the toolbar button in the exact same section and they are overlapping for some reason

UToolMenu* ToolbarMenu = UToolMenus::Get()->ExtendMenu("LevelEditor.LevelEditorToolBar.PlayToolBar");

file Plugins/Puerts/Source/DeclarationGenerator/Private/DeclarationGenerator.cpp class FDeclarationGenerator function RegisterMenus line 1346

After change PuerTS button section I have the button back

UToolMenu* ToolbarMenu = UToolMenus::Get()->ExtendMenu("LevelEditor.LevelEditorToolBar.User"); // PlayToolBar

image

Can you give me a pull request? thank you!

faseceroo commented 1 year ago

Done, also did the same for PuertTS window menu item ^^

faseceroo commented 1 year ago

https://github.com/Tencent/puerts/pull/1261