UPROPERTY(EditAnywhere, BlueprintReadWrite) TSubclassOf<UObject> MyObjectClass;
How it looks in the details panel:
UObject* MyObject = NewObject<UObject>(MyObjectClass);