0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Blueprint Introduction

Last updated at Posted at 2016-08-06

1 - Blueprint Introduction

  • Blueprintとはなんぞや?
    • ソースコードを使用したコーディングではなく、レゴブロックのように組み合わせてつくるVisual Scripting.
  • UE3ではKismetと呼ばれていた。

  • AAA

3 - Adding Toggling in Level Blueprint:部屋への侵入を検知して自動で明かりを点滅させる

  • 直接PointLightは参照できないので、Blueprint_Cellinglightへの参照をBlueprint内に設置、そこからPointLightを取得する。
  • 部屋への侵入/離脱で明かりをON/OFFするサンプル。
    キャプチャ.PNG

4 - Creating a Class Blueprint

  • Class Blueprintを使うことでモジュール化した各個のBlueprintを使いまわすことが可能になる。
  • Blueprint->New Empty Blueprint Class... 目的別に親クラスを選択し、保存ディレクトリを指定し、名前入力。

5 - Setting Up Initial Class Blueprint Components:Class Blueprintにより照明を設置する。ComponentsにPointLightを設定し調整。

  • Defaults
  • Components
    • Content BrowserからオブジェクトをD&Dで設置する。Spotlight等はAddComponentからも可能。
    • DefaultscenerootにオブジェクトをD&Dすれば置換可能。
    • Componentsでの修正は配置してあるすべての同Blueprintオブジェクトに影響する。
  • Graph

6 - Adding Functional Components:当たり判定とヘルプメッセージ表示

  • AddComponents->Collision->Boxであたり判定を作る。

7 - Adding Class Blueprint Functionality:Class BlueprintのEvent Graphにより自動でOn/Offするところまで。

  • MyBlueprint->D&DによりEvent Graph内でGet/Setできる。

8 - Using Inputs to Control a Class Blueprint

  • Target:Self means "This(Currently) Blueprint.

9 - Adding Construction Script Customization

  • ConstructionScript
    • 実際ゲームが始まった際はここの処理は止まる。
  • Blueprint内で変数を追加する場合、MyBlueprint以下でAddしたり変数の種類を決定することもできるが、ノードの口を右クリックすることによりPromote Variableから新規作成することもできる。
  • Blueprint内の変数はオブジェクトのDetailsから個別に値を設定可能。(If that eye has open or editable-true)
  • 対応する属性の変数をノードの口にD&Dすることで直接設置可能。
  • Details->Categoryの値を追加/選択することでシーン中個々の設定をする箇所でのカテゴリ名を指定可能。
    キャプチャ.PNG

10 - Using Loops : Procedural Level Design

  • Vector形式の変数を定義し、Editable・Show 3D WidgetをTrueにすることでシーン中で対象変数の場所を移動させることができる。
  • AttachToComponentメソッドは「Attach Type」のみではなく、「Location/Rotation/Scale Rule」に別れている。
    • 全部を「Keep Relative」にすることで動画と同じ動作になる?
  • 動くことは動くが、なんか震えるような見た目になる理由は不明。
    bibe.png

11 - For Loop with Break

  • 実行中のループをBreakしたい場合、カスタムイベントノードをループのBreakに繋ぎ、条件合致した場合にそのカスタムイベントを呼び出す。
    • 動画中ではインデックスが20以上の時にBreakしている。

12 - For Each Loop

  • 変数タイプ選択ボックス横の格子状のアイコンで配列にすることができる。
    キャプチャ.PNG
  • ForEachLoopノードは、接続した配列の各要素に対応してループを行う。

13 - While Loops

  • 当たり前だがWhileはBreak条件(Condition)が無いと無限ループになるため使用には注意。

14 - Custom Loops

  • UEのバージョン次第ではMacro内でDelayは使えない。従ってBlueprintで直にDelayを使用しDelay付きLoopを実装する。
  • これ全体をノード化できれば大丈夫な気がする。
    キャプチャ.PNG
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?