Can't edit Mesh in the Editor with UPROPERTY

I just put this same setup together myself and I’m not even seeing the same issue you’re seeing. Are you sure you’re checking in the right spot? This is the setup I used and this is what I’m seeing when I click on the component in the blueprint:

This is in 4.17. The constructor only has:

MeshComp = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("MeshComp"));

Also, as I mentioned before, there have been many changes since 4.13 so the layout is different. If you look at the tags on that Playlist, it created even longer ago, in 4.10

expanding the screenshot field of view, it should look the same to both of us

But still, the girl in the video see the StaticMesh “Browser” instead of the white drop-down menu at the top… maybe it’s just a different version…

There is no difference. It’s just the difference between 4.10 and 4.17

You also must take into account the fact that you are also missing specifiers that are being used for the StaticMeshComponent in the tutorial. You can see its declaration here: C++ Battery Collector: Adding Variables & Functions | 04 | v4.9 Tutorial Series | Unreal Engine - YouTube

The only difference with the video is that SHE uses VisibleAnywhere and I use EditDefaultsOnly

WITH EDIT-DEFAULTS-ONLY

WITH VISIBLE-ANYWHERE

With EditDefaultsOnly (screenshot 1) I see a lot more things than VisibleAnywhere.
But I can also see the NAME OF THE VARIABLE (identifier) that I gave: MeshComp

With VisibleAnywhere (screenshot 2) I only see the part where I’m allowed to choose a StaticMesh for my StaticMeshComponent
BUT I can’t see the name of the variable that I gave (MeshComp).
Instead, I just see “StaticMesh”

ALSO, with VisibleAnywhere the Category of the Component is no longer “MyMesh” as I decided through the code and as EditDefaultsOnly correctly shows…

Is there a logic behind all this?

You’re also missing that she is also using meta = (AllowPrivateAccess = “true”) which is very important when using a Private variable, or one set to VisibleAnywhere.

Although, I agree that the Mesh should not be editable when the VisibleAnywhere specifier is being used. I’ll be looking into that, but your original issue (of not being able to edit your mesh) should be solved, so I’ll be marking this as resolved. I’ll update here with whatever information I find about the other problem.

Actually my code looks like this:

 private:    
    	UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "My Mesh", meta = (AllowPrivateAccess = "true"))
    	UStaticMeshComponent* MeshComp;
    
    	UPROPERTY(EditDefaultsOnly, Category = "Trigger")
    	float Delay;
    
    	UPROPERTY(EditDefaultsOnly, Category = "My Mesh") 
    	UStaticMesh* MyMesh;

So yes, there IS the meta

You can’t omit information and expect me to know :), anyway I’ll continue looking into this as I said.

Hey ,

After looking into the functionality of VisibleAnywhere, I’ve entered a bug report for the fact that you are still able to edit the properties of a Component when it is marked with that specifier. You can find the bug report here: UE-51397

Have a nice day!

Hi, I am able to reproduce this error as it is still not fixed in 4.18. I have 2 components set as visibleanywhere but they are still able to be edited.

Pretty frustrating when you think you’re doing something wrong, spend hours of research only to find it as a bug.