So I’ve got a variety of curves that are stored as FRichCurves in my own UDataAsset that I want to show in an editor plugin.
This requires creating temporary UCurveFloat* objects with no physical counterparts in the content browser (there’s about 500 curves, which would stink up the content browser and require a lot more lookups) because SCurveEditor only takes those.
UCurveFloat* Curve = NewObject<UCurveFloat>(); // there seems to be no other way to build a curve that's not part of an actual actor or package. Remember, we're part of a widget, so we can't hook it onto that
My question is, what can I do to make UE stop apparently auto-garbage collecting parts of them at inopportune times? When the editor tries to autosave, I get… this result, which isn’t very useful. I can’t make it a safer reference-counted pointer, because apparently you cannot do that with an UObject.
If nobody has any suggestions, I guess I could write my own FRichFloat editor, but I was really hoping I could stick to the built-in stuff. I mean, that’s what it’s for, right?
(also, you know, you might want to sanity check the data at that point in SCurveEditor.cpp anyway, since apparently it can sometimes be null)