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.SetGameRating

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 SetGameRating(name: string, value: int): void;
public static void SetGameRating(string name, int value);

Parameters

name The name of the ratings board that you are setting the rating value for.
value The new 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

Set the rating value that is specified in the appxmanifest.xml file.

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.