I’m trying to fill an array (of FVector) in the editor, using PostEditChangeProperty. The array should be filled with results from a line cast. However it doesn’t let me add to the array after the linecast check. The debug does draw at the hit location (so it looks like it actually gets a valid FVector from the hit result).
Also, when I manually add a FVector to the array (in the same function) before the linecast it does work.
Could anybody please explain why this isn’t working?
Is the Blueprint placed in the level?
If you want to modify Blueprints and keep changes you usually have to call BP->Modify() on it before you make changes to the default object in Editor.
If it’s in the Blueprint viewer than you are modifying the asset.
I’m not sure I would do that inside PostEditChange, but yeah you have to notify the Editor you’re about to modify the Blueprint asset.
Thats what I thought, but it doesnt seem to update in the linetrace. And when I modify it outside the linetrace it gets updated correctly, what I don’t really understand .
Is it somehow possible then to do a linetrace from inside the (blueprint) editor? Using construction in blueprint allows you to, yet I cant get it to work in c++ using OnConstruction either…
No problem, I didn’t even know GEditor was exposing World() to use… Now I know lol
Thanks for sharing. I always note these things, this is why I keep on lurking the forums =]