Declaration
public static ParaPlayer GetPlayer(GameObject go)
Parameter
go | Specified GameObject |
Description
If it exists, the ParaPlayer object associated with the GameObject will be returned; otherwise, null will be returned.
function GetPlayerByGameObject(go)
local player = CS.ParaPlayerService.GetPlayer(go)
if player ~= nil then
print(player.gameObject.name)
end
return player
end