How do I make a dynamic array UPROPERTY that I can inherit on to the blueprints?
I tried TArray < TSubobjectPtr > but it crashes the editor complaining that this cannot be cast to UPROPERTY .
So how do I make this work through other feasible approaches?
its deprecated? whats the norm then? my code was simply
UPROPERTY(EditAnywhere)
TArray < TSubobjectPtr >> var_name
DarthB
(DarthB)
4
EDIT: Without Codeblocks the template arguments are swallowed.
yes but it should still work…
Didnt you have:
TArray<TSubobjectPtr<MyType>>
I think otherwise it would not even compile.You can replace it with:
TArray<MyType*>
but that should not fix your crash. To give you more help we need more information.
Didn’t I just wrote I used TArray? and I should replace what with TArray?
DarthB
(DarthB)
6
Aye I edited the previous comment, without code-blocks the template arguments are missing. I think that also happened in your posts?
yes I used
TArray<TSubobjectPtr<MyType>>
and it causes crashes