Class Player.Other
다른 사람의 플레이어 정보를 가져오는 API
public static class Player.Other
- Inheritance
-
objectPlayer.Other
Examples
// Player의 닉네임으로 UserID를 가져옵니다.
// 내 아이디는 Player.Mine을 참고해 주세요.
string playerId = Player.Other.GetPlayerID("닉네임");
// 다른 플레이어를 순간이동합니다.
Vector3 targetPos = new Vector3(1.0f, 0.0f, 1.0f);
Quaternion targetRot = Quaternion.identity;
Player.Other.TeleportOtherPlayer(playerId, targetPos, targetRot);
Methods
GetPlayerData(string)
Player의 PlayerID로 PlayerData를 가져옵니다.
PlayerData{
nickname : string,
userId : string,
userTag : string
}
public static LuaTable GetPlayerData(string playerID)
Parameters
playerID
stringuuid
Returns
- LuaTable
GetPlayerID(string)
Player의 닉네임으로 PlayerID를 가져옵니다. 내 아이디는 Player.Mine을 참고해 주세요.
public static string GetPlayerID(string nickName)
Parameters
nickName
stringstring
Returns
- string
uuid
GetPlayerProfileImage(string, LuaFunction)
Player의 PlayerID로 Profile Image를 가져옵니다.
public static void GetPlayerProfileImage(string playerId, LuaFunction callback)
Parameters
playerId
stringplayer id
callback
LuaFunctionLua Callback(bool isSuccess, Texture2D profileImage)
TeleportOtherPlayer(string, Vector3, Quaternion)
다른 플레이어를 순간이동시킵니다.
public static void TeleportOtherPlayer(string playerId, Vector3 pos, Quaternion rot)
Parameters
playerId
stringuuid
pos
Vector3Vector3
rot
QuaternionQuaternion