PropertyBox のバックアップ(No.3)


概要 Edit

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

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

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

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

パラメータ Edit

Value Type数値型。Bool、Int、Float、Vector3、Stringの5種類。
Value保持される値。実行中に更新されるが、初期値を設定しておくことができる。
Track TypeNone:何も追跡しない。値を保持する機能のみを持つ。
Player:プレイヤーの情報を追跡する。
GameObject:GameObjectの情報を追跡する。
World:インスタンスメンバー数や時刻など、オブジェクトに関わらない情報を追跡する。
UI:UIコンポーネントの状態を追跡する。
AnimatorParameter:Animatorのパラメーターの値を追跡する。
Controller:コントローラーの入力値を追跡する。
Target PlayerTrackType=Playerの場合、どのプレイヤーを追跡するか。
Local:LocalPlayer(自分自身)
ObjectOwner:TargetObjectに指定したGameObjectの所有者。
TriggeredPlayer:TargetObjectに指定したGameObjectにある、特定のTriggerの起動者。
 (起動されていない場合、LocalPlayerになる。)
ByIndex:ワールドインスタンスにいるプレイヤーをIndexで指定。
 (もし、プレイヤー数を超えるIndexが指定された場合、LocalPlayerになる。)
Target Object対象となるGameObject、または対象となるコンポーネント等が存在するGameObject。
Spot何の情報を追跡するか。詳細は後述。
Spot DetailSpotの中で、さらにどの部分を抽出するか。詳細は後述。
PositionTracking追跡時にこのPropertyBoxのあるGameObjectを追跡対象の位置に移動する。
Position関連のSpotを選択した場合にのみ選択できる。
UpdateEveryFrameTrueの場合、毎フレーム追跡する。多用するとパフォーマンスに影響するため注意。
Falseの場合、UsePropertyBoxでUpdateを実行したときのみ追跡する。
 

Spot詳細 Edit

SpotはTrackTypeとValueTypeによって、選択肢が変化する。

 

TrackType=Player Edit

Value TypeSpot説明
BoolInUserInVRVRモードであればTrue
BoolIsPlayerGrounded着地していればTrue
BoolIsMasterMasterであればTrue
BoolIsInstanceOwnerインスタンスオーナーであればTrue
BoolIsGameObjectOwnerこのGameObjectの所有者であればTrue
Vector3PositionプレイヤーのPosition
Vector3RotationプレイヤーのRotation
Vector3HeadPositionLocalPlayerの場合は頭トラッキング座標のPosition
RemotePlayerの場合はモデルの頭ボーンのPosition
Vector3HeadRotationLocalPlayerの場合は頭トラッキング座標のRotation
RemotePlayerの場合はモデルの頭ボーンのRotation
Vector3RightHandPositionLocalPlayerの場合は右手トラッキング座標のPosition
RemotePlayerの場合はモデルの右手ボーンのPosition
Vector3RightHandRotationLocalPlayerの場合は右手トラッキング座標のRotation
RemotePlayerの場合はモデルの右手ボーンのRotation
Vector3LeftHandPositionLocalPlayerの場合は左手トラッキング座標のPosition
RemotePlayerの場合はモデルの左手ボーンのPosition
Vector3LeftHandRotationLocalPlayerの場合は左手トラッキング座標のRotation
RemotePlayerの場合はモデルの左手ボーンのRotation
Vector3Velocity速度ベクトル
StringDisplayNameプレイヤー名
 

TrackType=GameObject Edit

Value TypeSpot説明
BoolIsActiveGameObjectがActiveであればTrue
Vector3PositionGameObjectのPosition
Vector3RotationGameObjectのRotation
Vector3LocalPositionGameObjectのLocalPosition(親からの相対座標)
Vector3LocalRotationGameObjectのLocalRotation(親からの相対座標)
Vector3Velocity速度ベクトル(Rigidbodyが必要)
Vector3AngularVelocity角速度ベクトル(Rigidbodyが必要)
 

TrackType=World Edit

Value TypeSpot説明
Int, FloatPlayerCountワールドインスタンスにいるプレイヤー数
Int, FloatYear現在の年
Int, FloatMonth現在の月
Int, FloatDay現在の日
Int, FloatDayOfWeek現在の曜日(0:日曜日~6:土曜日)
Int, FloatHour現在の時
Int, FloatMinute現在の分
Int, Float
Second現在の秒
Int, Float
JoinHoursインスタンスにJoinしてからの時間数
Int, Float
JoinMinutesインスタンスにJoinしてからの分数
Int, FloatJoinSecondsインスタンスにJoinしてからの秒数
 

TrackType=Input Edit

Value TypeSpot説明
FloatRightIndexTrigger右手のIndexトリガー強度(0~1)
FloatLeftIndexTrigger左手のIndexトリガー強度(0~1)
FloatRightGrip右手のGrip強度(0~1)
FloatLeftGrip左手のGrip強度(0~1)
FloatMoveHorizo​​ntal移動スティック(左)の横方向の強度(-1~1)
FloatMoveVertical移動スティック(左)の縦方向の強度(-1~1)
FloatLookHorizo​​ntal回転スティック(右)の横方向の強度(-1~1)
Float
LookVertical回転スティック(右)の縦方向の強度(-1~1)
 

TrackType=AnimatorParameterの場合、Parameter名がSpotとなる。
対象のAnimatorをセットすると、ValueTypeと型が一致したParameter名が選択できるようになる。

 

Spot Detailについて Edit

ValueType=FloatでもVector3のSpotを選択でき、次のSpot DetailでFloat値に変換する。

XXの値
YYの値
ZZの値
Magnitudeベクトルの大きさ
 
 
 

ValueType=Stringの場合、次のSpot Detailが選択できる。

Nomal文字列そのまま。未選択の場合も同等。
OneLetter文字列の中の1文字のみ。Indexを指定する。
Indexが文字列の長さを超える場合、ブランクとなる。