Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Social

Generic access to the Social API.
Read time 1 minuteLast updated 4 days ago

Definition

  • Type: Class
  • Namespace: UnityEngine
  • Assembly: UnityEngine.GameCenterModule
Warning
Deprecated. Social is deprecated and will be removed in a future release.
public static class Social

Remarks

Social.Active can be used to target a specific social platform implementation. All platforms default to the Local implementation which can be used for testing. See Social API Reference Manual for an overview.
The Social class should always be used as an entry point. It contains helper functions for accessing the current active implementation and always uses the interfaces of the other Social API classes. This way it is easier to use versions of the interfaces which have been extended beyond the generic API by the implementation.
There are various classes associated with the Social API and all of these reside in the UnityEngine.SocialPlatforms.Impl namespace. You need to import/use this namespace in order to use these classes.

Static Properties

Property

Description

ActiveThis is the currently active social platform.
localUserThe local user (potentially not logged in).

Static Methods

Method

Description

CreateAchievementCreate an IAchievement instance.
CreateLeaderboardCreate an ILeaderboard instance.
LoadAchievementDescriptionsLoads the achievement descriptions associated with this application.
LoadAchievementsLoad the achievements the logged in user has already achieved or reported progress on.
LoadScoresLoad a default set of scores from the given leaderboard.
LoadUsersLoad the user profiles associated with the given array of user IDs.
ReportProgressReports the progress of an achievement.
ReportScoreReport a score to a specific leaderboard.
ShowAchievementsUIShow a default/system view of the games achievements.
ShowLeaderboardUIShow a default/system view of the games leaderboards.