Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component Visualizers and Details Customizations dont work inside BlueprintEditorViewport #17

Open
MrTapa opened this issue Jun 22, 2023 · 4 comments

Comments

@MrTapa
Copy link

MrTapa commented Jun 22, 2023

When editing a blueprint, and showing the viewport, then selecting on a component, the component visualizer doesn't seem to be running any of its functions.

Details Customizations do show up in the details tab, however, the customized object(s) they return, are immutable and calls to them will result in warnings about missing World, and data changes won't be reflected to the component instance inside of the Blueprint Actor they are in

@MrTapa
Copy link
Author

MrTapa commented Jun 22, 2023

I am coming up empty on solutions for the component visualizer not working, for the Details Customization, I did go down the route of getting outer, from CustomizedObjects, then getting the class, and then CDO, and from there the component's archetype, which did result in allowing me to make changes, but those are now changes to the CDO, and wouldn't get propagated unless the whole blueprint was recompiled. So I feel like that was the wrong direction to go towards

@HoussineMehnik
Copy link
Owner

HoussineMehnik commented Jun 25, 2023

To be able to Customize the CDO in the BlueprintEditor you will need to set "AllowDefaultObjectCustomization" to true (Under "CustomizedClass" property )

@HoussineMehnik
Copy link
Owner

For Viewport drawing, interactions... ( for EditorModes and ComponentVisualizers ) I choosed to avoid performance issues do it only the CurrentLevelEditingViewport only this is why VisualizerBlueprint functions are not called when the component is selected in BlueprintEditorViewport.

To make it work you can comment this condition "LevelEditingViewportUtils::IsCurrentLevelEditingViewport" in NativeComponentVisualizerInstance

@MrTapa
Copy link
Author

MrTapa commented Jun 28, 2023

To be able to Customize the CDO in the BlueprintEditor you will need to set "AllowDefaultObjectCustomization" to true (Under "CustomizedClass" property )

Yes, that flag works as expected for actually editing the CDO, but what I am talking about is editing a component instance in another blueprint.

Lets say I create a details customization for the CharacterMovementComponent class, add a couple of widgets to categories, and have those execture some logic. If I then go an open any character BP, click on the CMC, I will see the details customization and the widgets will be added correctly, however, I'll be unable to modify that component

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants