0
ネットワーク内のすべてのプレイヤーの位置を取得する方法を知りたい。 スクリプトを更新するにはどうしたらいいですか?Photonのすべてのプレイヤーの位置を取得する方法
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Pathfinding : MonoBehaviour {
Transform[] Players;
int TotalPlayerCount=0;
void Update() {
foreach (PhotonPlayer pl in PhotonNetwork.playerList) {
if (GetComponent<PhotonView>().isMine) {
Players[TotalPlayerCount].position= //position of my player
TotalPlayerCount++;
}
else
{
Players[TotalPlayerCount].position=//position of all other player available in the room
TotalPlayerCount++;
}
}
}