public bool CanEdit() { if (GameBuilderApplication.IsStandaloneExport) { return(false); } if (networkingController.GetIsInMultiplayer()) { VirtualPlayerManager.VirtualPlayerInfo?playerInfo = virtualPlayerManager.GetVirtualPlayerById(playerControlsManager.GetVirtualPlayerId()); return(playerInfo != null ? playerInfo.Value.canEdit : true); } else { return(singlePlayerCanEdit); } }
// Returns my player# or 0 if not yet assigned. public int GetMyPlayerNumber() { VirtualPlayerManager.VirtualPlayerInfo?playerInfo = virtualPlayerManager.GetVirtualPlayerById(virtualPlayerId); return(playerInfo != null ? playerInfo.Value.slotNumber : 0); }