Procedurally set EditAnywhere (UPROPERTY)
How do I set a dynamically spawned Component/Actor to EditAnywhere if I cannot use the UPROPERTY() macro, since this is purely runtime based from c++.
I want to spawn a child actor via UChildActorComponent, which works to some extent. But the spawned child actor is not editable or selectable in the World Outliner or Editor Viewport. But setting a UPROPERTY() macro is not possible since the actor and UChildActorComponents are spawned at runtime and I do not have class attribute where I could put the UPROPERTY() macro. So I need to be able to set an Actor/Component to EditAnywhere purely from C++ at runtime. How do I do this=
Related, but not answered / working: "> How to add UPROPERTY dynamically?"
asked Jul 29 '18 at 08:22 PM in C++ Programming
It's not practical because you will need to add property to UClass and this will alter class information and all objects on the level of that class, possibly permanently since UClass don't reset with the world.... and i don't see reason why you would want to have it in first place, there easier way to do this:
EditInstanceOnly will make it visible only in level property editor and Instanced will make actor properties editable. And then after
answered Jul 30 '18 at 12:21 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here