Legacy Documentation: Version 5.3
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

PlayerSettings.XboxOne.GetGameRating

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Switch to Manual
public static function GetGameRating(name: string): int;
public static int GetGameRating(string name);

Parameters

name The name of the ratings board that you want the rating value for.

Returns

int The current rating level. The meaning of the value depends on the name of the ratings board. The value corresponds to the entries the rating board's drop down menu, top most entry being 0 and each item lower in the list being 1 higher than the previous.

Description

Get the rating value that is specified in the appxmanifest.xml file for the given ratings board.

The names and values correspond to the what you'll see in the the Player Settings > Xbox One > Publishing Settings > Game Age Ratings settings. The names are on the left, and the values are in the drop down menus.