Всем доброго времени суток, собственно такой вопрос - Я создал класс от объекта AActor в С++, объявил указатель на USkeletalMeshComponent* и в конструкторе класса проинициализировал указатель новым объектом
WeaponMesh = CreateDefaultSubobject<USkeletalMeshComponent>(TEXT("WeaponMesh"));
Весь код заголовочника и листинга
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "BaseWeapon.generated.h"
UCLASS()
class ADVANCEDLOCOMOTIONV3_API ABaseWeapon : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
ABaseWeapon();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Weapon")
USkeletalMeshComponent* WeaponMesh; //weapon mesh
};
#include "BaseWeapon.h"
#include "Components/SkeletalMeshComponent.h"
// Sets default values
ABaseWeapon::ABaseWeapon()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = false;
WeaponMesh = CreateDefaultSubobject<USkeletalMeshComponent>(TEXT("WeaponMesh"));
}
// Called when the game starts or when spawned
void ABaseWeapon::BeginPlay()
{
Super::BeginPlay();
}
// Called every frame
void ABaseWeapon::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}
Вопрос такой, почему при создании blueprint класса не отображается объект USkeletalMeshComponent в редакторе?