PropertyBox のバックアップソース(No.2)

**概要 [#zf7a8f1b]

何かの状態を追跡し、そのパラメータを保持することができる。

保持した値は様々なActionのパラメータとして使用でき、ConditionalTriggerで条件をつけてトリガーすることもできる。

追跡以外にも、SetPropertyBoxで値を演算して更新することができる。

そのため、追跡機能を使用せずとも単純な変数格納器として使用することができる。

**パラメータ [#v23f7eb9]
|Value Type|数値型。Bool、Int、Float、Vector3、Stringの5種類。|
|Value|保持される値。実行中に更新されるが、初期値を設定しておくことができる。|
|Track Type|None:何も追跡しない。値を保持する機能のみを持つ。&br;Player:プレイヤーの情報を追跡する。&br;GameObject:GameObjectの情報を追跡する。&br;World:インスタンスメンバー数や時刻など、オブジェクトに関わらない情報を追跡する。&br;UI:UIコンポーネントの状態を追跡する。&br;AnimatorParameter:AnimatorのParameter値を追跡する。&br;Controller:コントローラーの入力値を追跡する。|
|Target Player|TrackType=Playerの場合、どのプレイヤーを追跡するか。&br;Local:LocalPlayer(自分自身)&br;ObjectOwner:TargetObjectに指定したGameObjectの所有者。&br;TriggeredPlayer:TargetObjectに指定したGameObjectにある、特定のTriggerの起動者。&br; (起動されていない場合、LocalPlayerになる。)&br;ByIndex:ワールドインスタンスにいるプレイヤーをIndexで指定。&br; (もし、プレイヤー数を超えるIndexが指定された場合、LocalPlayerになる。)|
|Target Object|対象となるGameObject、または対象となるコンポーネント等が存在するGameObject。|
|Spot|何の情報を追跡するか。詳細は後述。|
|Spot Detail|Spotの中で、さらにどの部分を抽出するか。詳細は後述。|

**Spot詳細 [#k405b75f]

SpotはTrackTypeと&size(16){ValueType};&size(16){によって、選択肢が変化する。};
#br
***&size(16){TrackType=Player}; [#tbb80392]
|''Value Type''|''Spot''|''説明''|
|Bool|InUserInVR|VRモードであればTrue|
|Bool|IsPlayerGrounded|着地していればTrue|
|Bool|IsMaster|MasterであればTrue|
|Bool|IsInstanceOwner|インスタンスオーナーであればTrue|
|Bool|IsGameObjectOwner|このGameObjectの所有者であればTrue|
|Vector3|Position|プレイヤーのPosition|
|Vector3|Rotation|プレイヤーのRotation|
|Vector3|HeadPosition|LocalPlayerの場合は頭トラッキング座標のPosition&br;RemotePlayerの場合はモデルの頭ボーンのPosition|
|Vector3|HeadRotation|&size(16){LocalPlayerの場合は頭トラッキング};&size(16){座標のRotation};&br;&size(16){RemotePlayerの場合はモデルの頭ボーンのRotation};|
|&size(16){Vector3};|RightHandPosition|&size(16){LocalPlayerの場合は右手トラッキング};&size(16){座標のPosition};&br;&size(16){RemotePlayerの場合はモデルの右手ボーンのPosition};|
|&size(16){Vector3};|&size(16){RightHandRotation};|&size(16){LocalPlayerの場合は右手トラッキング};&size(16){座標のRotation};&br;&size(16){RemotePlayerの場合はモデルの右手ボーンのRotation};|
|&size(16){Vector3};|&size(16){LeftHandPosition};|&size(16){LocalPlayerの場合は左手トラッキング};&size(16){座標のPosition};&br;&size(16){RemotePlayerの場合はモデルの左手ボーンのPosition};|
|&size(16){Vector3};|&size(16){LeftHandRotation};|&size(16){LocalPlayerの場合は左手トラッキング};&size(16){座標のRotation};&br;&size(16){RemotePlayerの場合はモデルの左手ボーンのRotation};|
|&size(16){Vector3};|&size(16){Velocity};|&size(16){速度ベクトル};|
|String|DisplayName|プレイヤー名|
#br
***&size(16){TrackType=GameObject}; [#qf351a63]
|''Value Type''|''Spot''|''説明''|
|Bool|IsActive|GameObjectがActiveであればTrue|
|Vector3|Position|GameObjectのPosition|
|Vector3|Rotation|GameObjectのRotation|
|&size(16){Vector3};|LocalPosition|GameObjectのLocalPosition(親からの相対座標)|
|&size(16){Vector3};|LocalRotation|&size(16){GameObjectのLocalRotation(親からの相対座標)};|
|Vector3|Velocity|速度ベクトル(Rigidbodyが必要)|
|Vector3|AngularVelocity|&size(16){角速度ベクトル(Rigidbodyが必要)};|
#br
***&size(16){TrackType=World}; [#ld252ebc]
|''Value Type''|''Spot''|''説明''|
|Int, Float|PlayerCount|ワールドインスタンスにいるプレイヤー数|
|Int, Float|Year|現在の年|
|Int, Float|Month|現在の月|
|&size(16){Int, Float};|Day|現在の日|
|&size(16){Int, Float};|DayOfWeek|&size(16){現在の曜日(0:日曜日~6:土曜日)};|
|&size(16){Int, Float};|Hour|現在の時|
|&size(16){Int, Float};|Minute|&size(16){現在の分};|
|Int, Float&size(16){&br;};|Second|現在の秒|
|Int, Float&size(16){&br;};|JoinHours|インスタンスにJoinしてからの時間数|
|Int, Float&size(16){&br;};|JoinMinutes|&size(16){インスタンスに};Joinしてからの分数|
|&size(16){Int, Float};|JoinSeconds|インスタンスに&size(16){Joinしてからの秒数};|
#br
#br
#br
#br
なお、Int用のSpotはFloatでも選択できる。

Vector3用のSpotはFloatでも選択でき、Spot Detailの選択を要する。