However, for some reason it always breaks with a nullptr at the ->CustomWidget() line.
Not really sure why it returns null, would be great if someone could help me out or share some ideas (the original property in my custom class is not hidden, using PROPERTY(EditAnywhere).
An update on the issue.
I found what causes it, as it now works without issues the moment I commented this line out. And it also immediately breaks after I uncomment it. IDetailCategoryBuilder& Category = DetailBuilder.EditCategory("CName", LOCTEXT("MyC", "CName"), ECategoryPriority::Important);
Now, to be honest I DO NOT KNOW WHY, this causes EditDefaultProperty to return a nullptr. I hope that someone smarter than me can help me understand what broke it.
*Edit, although it doesn’t explain why, it is what solved it for me, so I’ll mark this as a solution.
Hey @Neuffexx,
When I looked into it, it seemed like Category is a property used by Unreal already. I’m not sure if that’s the problem, and overriding that name is causing an error. I’m not 100% sure though, as I haven’t delved into the slate too much.
I hope this can help,
-Zen
Hey, thanks for the reply.
Although that seems like something that could cause an issue it hasnt before actually.
I’ve had this variable for a long time doing many different changes to the category by directly adding / removing / changing rows.
But this was the first time I tried using the EditDefaultProperty function, and as such the only time it actually conflicted.
Which is exactly what confused me about it. Since it would lead me to think that this would force you to either work on your own addition from scratch or edit existing properties- but not both at the same time.
But that would seem like a massive oversight to me that I don’t want to believe is the case.
*Edit: If the category was a redeclaration issue I think it would have crashed at compile time rather than when the code enters the function. Correct me if I’m wrong though.