How do I get a variable from a TArray,TSubclassOf without creating a new actor?

Hello, I’m currently trying to access a public variable inside of a class so I can use it in an if statement but I don’t want to create an actor of that class and I can’t cast because I don’t have an actor to cast from in the first place. Is there anyway I can do this? Some snippets below to help explain it:

UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Blasts")
	TArray<TSubclassOf<ABlast>> BlastTypes;

and I’m trying to get the variable inside ABlast:

UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Energy", meta = (ClampMin = "0.0", ClampMax = "100.0",
		UIMin = "0.0", UIMax = "100.0"))
		float EnergyAmount;

Any suggestions or help is greatly appreciated!

I assume you want to access defaults, reflection system holds copy of object in default state to store default values of varables, you can access it via ClassDefaultObject of UClass (TSubclassOf is just template of UClass*). Remember to not modify or call anything in it, only reading or else you might mess up the future spawning of that actor.

Yes this worked perfectly, Thank you for both letting me know about that and just in general helping me! For anybody wanting to see what I wrote(I’m using it in an IF statement so I’m only getting it):

BlastTypes[CurrentWeapon].GetDefaultObject()->EnergyAmount