LoginSignup
1
1

More than 5 years have passed since last update.

UE4のMaterialParameterCollectionにコメントを追加しよう

Last updated at Posted at 2016-12-10

MaterialParameterCollection便利ですよね。ただ多用しているとどれが何のパラメーターだかわからなくなってきます。
そんなときにパラメータごとにコメントを付けられたら良いのにと思ったことはないですか?

エンジンソースにちょっと追加するだけで簡単に拡張できるのでそのやり方です。

Engine/Source/Runtine/Engine/Classes/Materials/MaterialParameterCollection.hの29行目あたりに追加します。

    /** Uniquely identifies the parameter, used for fixing up materials that reference this parameter when renaming. */
    UPROPERTY()
    FGuid Id;

//@dgtanaka BEGIN
#if WITH_EDITORONLY_DATA
    /** Describe usage of the parameter. */
    UPROPERTY(EditAnywhere, Category = Default, meta = (MultiLine = true))
    FString Desc;
#endif
//@dgtanaka END
};

これだけです。

mpc_desc.JPG

こんな感じで各パラメーターにコメント(DESC)が付けられます。

1
1
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
1
1