Exposing UObject derived class variables in Editor

Does this work for you:

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Text)
	FString Text;

Docs

I guess this would be more specific.

https://docs.unrealengine.com/latest/INT/Programming/UnrealArchitecture/Reference/Properties/Specifiers/EditInline/index.html

However I generally just expose to blueprint and that seems to expose in the editor also.

Ammo Pouch does not show in the component list. I don’t really want it to be an object in the scene. I just want to be able to access its ammo variables and set them to determine how much the npc, or player has in the pouch when the game starts.

I first had Ammo Pouch as a struct, but I could not find out how to access it from other classes than the player and I did not want to have to create several structs of type Ammo Pouch, so I made it a class.

I have a class called AmmoPouch, which is basically a collection of uint16s. I would like to expose these variables in the editor, but I cannot seem to find the correct UCLASS, or UPROPERTY specifier. Currently I can only see the class itself in the Editor, but I would like to see its variables as well. An example would be the USceneComponent class, which has a drop down that shows it’s variables.

150300-ammopouch1.jpg

Hi Tom, thank you for your answer. Unfortunately BlueprintReadWrite does not do the trick and EditInline gives me the error that it is deprecated. If I use Instanced instead I get one step closer to the way SceneComponent looks, but the drop down is still missing and the ammoPouch class is none, with nothing else to choose, although I declare it in the .cpp file as:

_ammoPouch = CreateDefaultSubobject(TEXT(“AmmoPouch”));

150317-ammopouch2.jpg

I assume Ammo Pouch is component, do you properly initiate that component, does it shows in component list? If yes, is it selelectable in that varable? UObject object won’t show if they don’t exist at the time in actor, which also mean they won’t be set on default

I don’t know why you making it component because way you describe it does not need to be component, but array or struct.

Also you mention “uint16”, this type is not supported by blueprints and general property editor, you can use only int32 (Integer type in blueprints) or uint8 (Byte type in blueprints) but in C++ you free to use whatever integer type you like and need.

Ok, so I have ditched the UObject idea and created a single h file that contains ammo pouch as a struct and it works exactly how I need it.
Thanks guys.