UPROPERTY(EditAnywhere) causes actor Transform to disappear

Hi all, decided to dive into the world of Unreal, but I got hung up on something while following the Getting Started doc.



    UPROPERTY(EditAnywhere)
    int32 TotalDamage;


Compiled and then my cone stopped bobbing up and down. Oh no! After a few restarts, create new project, forum searching, etc, I just happened to notice that the Transform section in the details box disappears when you add that UPROPERTY line and compile.

So am I doing something wrong?
Is the Getting Started doc out of date?

Keep in mind this is my first time looking at Unreal, and there is a lot to take in, so at this stage it’s hard to tell if I have slipped up somewhere along the way, or if there is a problem with the editor or docs. I hope it’s simply just me doing something wrong that someone can easily point out. Otherwise, UX–. Please help.

No, those two lines of code are 100% perfect.

There must be something else going on elsewhere, but I can’t tell you where without knowing more on what you’re doing.

I’m following the Getting Started docs verbatim (I think). It’s %100 reproducible for me - I started from scratch twice. Like I said, everything works fine, then simply adding UPROPERTY(EditAnywhere) causes the Transform to disappear from the details of the Actor instances in the editor. To summarize, the steps are:

  • New C++ Blank project. Table and Chairs are auto-added.
  • Add code to project, Actor, drag an instance into the scene, Add component->Cone, cut-and-paste sample code, everything works as expected, cone floats up and down.
  • Add UPROPERTY(EditAnywhere), Transform disappears from Actor in the editor, no movement on cone.

I’m experiencing the same thing. However it doesn’t appear to be a problem with the UPROPERTY. At first I thought it was. However I found it happens whenever I recompile the actor with a component like a cone attached. If you delete the cone and re-add it, the transform comes back. However deleting the component makes it jump back to the center of the world.

Found a work around. You can also add a new component on top of the old one. This will then add the transform back. Then simply delete the new component. All is well.

I guess you didn’t create a SceneComponent in c++ Code