NetworkTransform コンポーネントはネットワークを介してゲームオブジェクトの移動を同期します。このコンポーネントは権限を持ちます。そのため(ローカル権限を持つ)LocalPlayer オブジェクトはそれらの位置をクライアントからサーバーへと同期し、その後その他のクライアントの位置へと反映します。その他の(サーバー権限を持つ)オブジェクトはそれらの位置をサーバーからクライアントへと同期します。
このコンポーネントを使用するためには、移動を同期したいプレハブかゲームオブジェクトにコンポーネントを追加してください。コンポーネントは NetworkIdentity をアタッチされたゲームオブジェクトで使用できます。ネットワーク接続されたオブジェクトは同期するために生成しなくてはならないことに注意してください。
プロパティー | 説明 |
---|---|
CharacterController コンポーネントのキャッシュ | CharacterController コンポーネントのキャッシュ |
clientMoveCallback2D | クライアント主導でオブジェクトの動きをサーバー上で検証するために使用できるコールバック |
clientMoveCallback3D | クライアント主導でオブジェクトの動きをサーバー上で検証するために使用できるコールバック |
grounded | NetworkTransform が表面上(地面)にいることを通知します(デフォルト) |
interpolateMovement | 動きの同期で補間を有効にします。 |
interpolateRotation | 回転の同期で補間を有効にします。 |
lastSyncTime | オブジェクトが動きの同期パケットを最後に受け取った時間 |
movementTheshold | オブジェクトを同期処理(更新の送信)なしで移動させる事のできる距離 |
rigidbody2D | キャッシュされた Rigidbody2D |
rigidbody3D | キャッシュされた Rigidbody |
rotationSyncCompression | どのくらい圧縮させて回転を同期させるか |
sendInterval | sendInterval は送信される状態の更新頻度を制御します。 |
snapThreshold | この値は、現在位置から離れた場所にオブジェクトを置いた時の更新として、スムーズに移動させるのではなく位置をスナップさせて移動させます。 |
syncRotationAxis | 同期をさせる回転軸 |
targetSyncPosition | ターゲットに向けて補完される位置 |
targetSyncRotation2D | ターゲットに向けて補完される角度 |
targetSyncRotation3D | ターゲットに向けて補完される位置 |
targetSyncVelocity | 同期のために送信される速度 |
transformSyncMode | オブジェクトの位置の同期方法 |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.