Unityアセット「Game Creator」には自作Trigger・Condition・Actionをする際に利用できる、Inspectorで予め変数からの取得などを可能にした便利な拡張クラスが存在します。そのいくつかを紹介します。
Target Character
Game CreatorのCharacterクラス、及びCharacterクラスを継承しているキャラを取得します。
using GameCreator.Characters;
public TargetCharacter character = new TargetCharacter();
public override bool InstantExecute(GameObject target, IAction[] actions, int index)
{
	Character characterTarget = this.character.GetCharacter(target);
	if (characterTarget == null) return true;
	return true;
}Target Game Object
ゲームオブジェクトを取得します。
public TargetGameObject instance = new TargetGameObject();
public override bool InstantExecute(GameObject target, IAction[] actions, int index)
{
	GameObject Target = this.instance.GetGameObject(target);
	if (Target == null) return true;
	return true;
}Target Position
ポジションをVector3で取得します。
public TargetPosition position = new TargetPosition();
public override bool InstantExecute(GameObject target, IAction[] actions, int index)
{
	Vector3 Target = this.position.GetPosition(target);
	if (Target == null) return true;
	return true;
}Target Direction
Direction(方向)をVector3で取得します。
public TargetDirection direction = new TargetDirection();
public override bool InstantExecute(GameObject target, IAction[] actions, int index)
{
	Vector3 Target = this.direction.GetDirection(target);
	if (Target == null) return true;
	return true;
}変数と直接入力の混合
各種変数に格納可能な型や変数は、Inspectorからの直接入力、又は変数から選択することが可能なクラスが用意されています。それぞれGetValueで取得可能です。
| BoolProperty | Bool型 | 
| NumberProperty | Float型 | 
| StringProperty | String型 | 
| Vector2Property | Vector2型 | 
| Vector3Property | Vector3型 | 
| ColorProperty | Color型 | 
| SpriteProperty | Sprite型 | 
| Texture2D | Texture2D型 | 
| GameObject | GameObject型 | 
| VariableProperty | 型は値による(型チェックが必要) | 
using GameCreator.Variables;
//~
//()の中に初期値を入れると、Inspectorの初期値になります。
public BoolProperty boolP = new BoolProperty(true);
public NumberProperty numP = new NumberProperty(5f);
public StringProperty stringP = new StringProperty("Hello");
public Vector2Property vec2P = new Vector2Property(Vector2.zero);
public Vector3Property vec3P = new Vector3Property(Vector3.zero);
public ColorProperty colorP = new ColorProperty();
public SpriteProperty spriteP = new SpriteProperty();
public Texture2DProperty texP = new Texture2DProperty();
public GameObjectProperty goP = new GameObjectProperty();
public VariableProperty vaP = new VariableProperty();
public override bool InstantExecute(GameObject target, IAction[] actions, int index)
{
	bool boolGet = this.boolP.GetValue(target);
	float numGet = this.numP.GetValue(target);
	string stringGet = this.stringP.GetValue(target);
	Vector2 vec2Get = this.vec2P.GetValue(target);
	Vector3 vec3Get = this.vec3P.GetValue(target);
	Color colorGet = this.colorP.GetValue(target);
	Sprite spGet = this.spriteP.GetValue(target);
	Texture2D texGet = this.texP.GetValue(target);
	GameObject goGet = this.goP.GetValue(target);
	var vaGet = this.vaP.Get(target);
	return true;
}








