Hi,
I've just started learning Unreal and I'm trying to expose a variable from one of my classes to be set in the editor.
For example this code works fine:
I can then assign any particle effect I want. However if I want to do the same thing for a custom class I have made, it no longer works:
I can see the field under Class Defaults in the editor, but I can not select any of my APXBaseWeapon subclasses, or even the base class itself (including blueprint extensions of these). The only way I can get it to work is to do:
Why are they different? I'm confused why I have to use two separate methods when I feel like I'm essentially doing the same thing.
Thanks!
I've just started learning Unreal and I'm trying to expose a variable from one of my classes to be set in the editor.
For example this code works fine:
Code:
UPROPERTY(EditDefaultsOnly, Category="Particles") UParticleSystem* ParticleSystem;
Code:
UPROPERTY(EditDefaultsOnly, Category="Weapon") APXBaseWeapon* MyWeapon;
Code:
UPROPERTY(EditDefaultsOnly, Category="Weapon") TSubclassOf<APXBaseWeapon> MyWeapon;
Thanks!
Comment