• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by AndreaMar · Jan 22 at 12:51 PM · google play gamescloudleaderboardsocialgamecenter

Making hundreds of leaderboards with Unity built-in Social class (or Cloud Code?).

I'm trying to make hundreds of leaderboards. A maximum of 4 leaderboards for each level in my game. I don't want to do it manually and I'd prefer to not use third-party services (besides default services like GameCenter or PlayServices), as I'm already using Unity Game Services for Authentication and Cloud Save which I'm going to pay (I hope ;) ).


I've tried to get some information on how UnityEngine.Social.CreateLeaderboard() works, as I'm thinking of creating the many leaderboards via code, if that's what this function is supposed to do. Does it remotely create a leaderboard instance in both GameCenter and Google PlayServices via code? Is that this powerful?


Alternatively, I'm thinking of using Unity Cloud Code to create leaderboards, add scores, etc... since it's highly customizable. But, where am I supposed to save data? ChatGPT told me that there's a Unity Database I can use and access from Cloud Code scripts, but I've found none. Is it been dismissed since 2021?


As far as my mediocre skills can take me, the only viable solution is to save leaderboards via Cloud Code in a fictitious player's data on Cloud Save. But it's a very ugly solution. I'd prefer to avoid third party backend services or servers,

Comment

People who like this

0 Show 0
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image

Answer by AndreaMar · Jan 22 at 12:59 PM

This is what ChatGPT thinks about Social.CreateLeaderboard().

Can anybody confirm?


 What does this Unity function do Social.CreateLeaderboard()?
 
 Social.CreateLeaderboard() is a Unity API method that creates a leaderboard on the platform's social service. It allows a developer to create a leaderboard on a platform's social service, such as Game Center on iOS or Google Play Games on Android, and then submit scores to the leaderboard. Once a leaderboard has been created, players can view their own scores and the scores of other players on the leaderboard.
 It is important to note that this function is not available on all platforms, and it requires Unity's UnityEngine.Social API to be imported.
 
 
 What if the leaderboard already exists?
 
 If a leaderboard with the same ID already exists on the platform's social service, the Social.CreateLeaderboard() method will not create a new leaderboard. Instead, it will return a reference to the existing leaderboard.
 It's important to note that the existing leaderboard should have the same name, and the same sort order as the one that you're trying to create. If the existing leaderboard does not have the same name or sort order, the Social.CreateLeaderboard() method will fail, and it will throw an error.

Comment

People who like this

0 Show 0 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Update about the future of Unity Answers

Unity Answers content will be migrated to a new Community platform and we are aiming to launch a public beta later in June. Please note, we are aiming to set Unity Answers to read-only mode on the 31st of May in order to prepare for the final data migration.

For more information, please read our full announcement.

Follow this Question

Answers Answers and Comments

156 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Can sign in using Google Play Games Plugin, but unable to load scores from the leaderboard 2 Answers

Social.ShowAchievementsUI() not showing achievements 1 Answer

Is there an easy way to tell if Social.ReportScore is passed a new highscore? 0 Answers

Understanding the "daily" and "weekly" scopes in Unity.Social & Apple GameCenter Leaderboards 1 Answer

Social on Android and iOS not working 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges