Warning: Declaration of action_plugin_linebreak::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /home/stepism/www/ue4/wiki/lib/plugins/linebreak/action.php on line 41

Warning: Declaration of action_plugin_markdownextra::register(&$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /home/stepism/www/ue4/wiki/lib/plugins/markdownextra/action.php on line 16

Warning: Declaration of action_plugin_syntaxhighlighter3_action::register(Doku_Event_Handler &$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /home/stepism/www/ue4/wiki/lib/plugins/syntaxhighlighter3/action/action.php on line 28

Warning: Cannot modify header information - headers already sent by (output started at /home/stepism/www/ue4/wiki/lib/plugins/linebreak/action.php:0) in /home/stepism/www/ue4/wiki/inc/auth.php on line 430

Warning: Cannot modify header information - headers already sent by (output started at /home/stepism/www/ue4/wiki/lib/plugins/linebreak/action.php:0) in /home/stepism/www/ue4/wiki/inc/actions.php on line 38

Warning: Cannot modify header information - headers already sent by (output started at /home/stepism/www/ue4/wiki/lib/plugins/linebreak/action.php:0) in /home/stepism/www/ue4/wiki/lib/tpl/dokuwiki/main.php on line 12
コンポーネントの追加(4.7.6) [stepism@UE4メモ]

ユーザ用ツール

サイト用ツール


wiki:ue4:tips:506

コンポーネントの追加(4.7.6)

ブループリント版

ブループリントの場合は「Add(追加) Component」でノードを探せば色々出くるので任意のコンポーネントを追加します。


C++版

 

#include "BillboardActorComponent.h"	// コンポーネント追加用 

// コンストラクタ 
AMyActor::AMyActor() 
{ 
	// ビルボードオブジェクト生成 
	UBillboardActorComponent* Billboard = CreateDefaultSubobject<UBillboardActorComponent>(TEXT("UBillboardActorComponent")); 
	 
	// コンポーネント追加 
	Super::AddComponent(FName("BillboardActorComponent"), false, FTransform(), Billboard); 
} 

「CreateDefaultSubobject」は初期化時にしか使えないので注意すること。

wiki/ue4/tips/506.txt · 最終更新: 2015/05/18 04:50 (外部編集)