3
2

More than 5 years have passed since last update.

UE4のエラー「LogCompile: Error: An explicit Category specifier is required for any property exposed to the editor or Blueprints in an Engine module.」の解決方法

Last updated at Posted at 2019-07-01

はじめに

現在作成しているゲームをスマホにデプロイしようとした時にでたエラーの対処方法についての日本語の記事が無かったので、備忘録も兼ねて記事を書いてみます。

エラーの内容

<ファイルパス>/<問題のあるヘッダー>.h (問題の行) LogCompile: Error: An explicit Category specifier is required for any property exposed to the editor or Blueprints in an Engine module.
今回発生したエラーがこれです。簡単に言うと「ブループリントに公開する変数にはカテゴリが必要」とのこと。
また、アウトプットログにはなにやらファイルパスとエラーの行数が書いてありました。

対処法

現在作成しているゲームの「PathFollow」というプラグインを使用していて発生したエラーを例に説明します。
エラーの内容からカテゴリの指定がされていないものがあると思い、指定されたファイルの指定された行を見てみると案の定CategoryがないUPROPERTYが...

「PathFollow」の場合のファイルパス
../Engine/UE4/Plugins/Marketplace/PathFollow/Source/PathFollow/Classes/PFSpeedCurve.h

PFSpeedCurve.h
USTRUCT(BlueprintType)
struct PATHFOLLOW_API FPFSpeedCurve
{
    GENERATED_BODY()

    FPFSpeedCurve();

    static float GetSpeedAtDistance(const FInterpCurveFloat& Curve, float Distance);
    /*void Clear();
    void Dump();*/

    static TTuple<float, float> GetMinMaxSpeed(const FInterpCurveFloat& Curve);

    const FInterpCurveFloat& GetCurve() const { return _speedCurve; }
    FInterpCurveFloat& GetCurve() { return _speedCurve; }

    UPROPERTY(EditAnywhere) //-----カテゴリが指定されていない (63行目)
    FInterpCurveFloat _speedCurve;
};

問題のUPROPETYにカテゴリを指定してビルドします。

ここまでやった後に再度デプロイしたら正常にできました!

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2