GetId#

ExportRoomPlayer.GetId()#

プレイヤーのIDを取得します。
フォーマットは16桁の16進数文字列 (e.g. "4b32da78cc0a9213" ) です。

Returns:

プレイヤーのID

Return type:

string

Example#

local player = vci.vc.room.GetLocalPlayer()

-- プレイヤー情報の取得
print("ID: "..player.GetId()) -- 16-digit hex
print("Name: "..player.GetName()) -- player name
print("IsLocal: "..tostring(player.GetIsLocal())) -- true
print("UserType: "..player.GetUserType()) -- "TSO" or "Anonymous"
print("Position: "..tostring(player.GetPosition()))
print("Rotation: "..tostring(player.GetRotation()))

-- 物理演算制御クラスの取得
local playerController = player.GetRoomPlayerController() -- ローカルプレイヤー以外では nil が返る

-- キャラクターモデル情報の取得
local character = player.Character