Sunday, September 18, 2022
HomeGame Developmentc++ - UProperty of AStaticMeshActor kind resets to "None" after selecting in...

c++ – UProperty of AStaticMeshActor kind resets to “None” after selecting in Editor [UE5]


I’ve an C++ class “Supervisor” that derivatives from AActor.
Within it, I’ve a property of kind AStaticMeshActor:

UCLASS(Blueprintable)
class MYGAME_API AManager : public AActor
{
...

UPROPERTY(BlueprintReadOnly, EditAnywhere)
        AStaticMeshActor* actor;

Once I run the Editor and place my “Supervisor” in scene, I can see it having the “actor” member. I can see the drop-down there itemizing all my StaticMeshActors in scene, however as soon as I click on on any of them, the fields get’s again to “None” as an alternative of chosen actor.

enter image description here

The mesh actors that seem in checklist are simply plain regular actors spawned in scene however drag-and-drop meshes from content material browser (so the AStaticMeshActor is created and positioned in identical scene because the Supervisor is).

Observe: Once I change property kind from AStaticMeshActor to AActor, I’ve checklist of my my static meshes + another actors and if I choose one other actor (some customized Blueprints inherited from Actor), they really fill the sphere and it’s now not “None”. Once I change to static mesh actor, it’s get “None” as an alternative of chosen mesh in scene once more.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments