• 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 /
  • Help Room /
avatar image
0
Question by o___O · May 22, 2018 at 11:11 AM · gamecenterleaderboards

Gamecenter does not work on AppleTV

Greetings. We use the Game Center in our game. In the IOS everyt$$anonymous$$ng works. On AppleTB Leaderboards are shown for the first time, but when the second leaderboard call is played, the game hangs with an error "We failed to present Game Center dashboard extension."

Comment
Add comment · Show 2
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
avatar image paatz04 · Aug 24, 2019 at 12:57 PM 0
Share
avatar image leenk · Sep 04, 2019 at 11:55 PM 0
Share

2 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by joe_nk · Sep 18, 2019 at 11:03 PM

The issue appears to be a problem with the Game Center View Controller on tvOS not being able to cope with the view not having a 'Dashboard Image' You can fix t$$anonymous$$s by adding one in the xcode project manually inside the UnityImages.xcassets folder:

alt text

After adding t$$anonymous$$s you'll probably get a build error like t$$anonymous$$s:

 On-Demand Resources is enabled (ENABLE_ON_DEMAND_RESOURCES = YES),
 but the PRODUCT_BUNDLE_IDENTIFIER build setting is empty



T$$anonymous$$s means you need to set your PRODUCT_BUNDLE_IDENTIFIER in the project build settings - Unity doesn't do t$$anonymous$$s for you.

alt text

We were able to automate both of these steps with the following script:

 using System;
 using System.IO;
 using UnityEditor;
 using UnityEditor.Callbacks;
 using UnityEditor.iOS.Xcode;
 
 using Newtonsoft.Json;
 
 namespace BuildAutomation {
 #if UNITY_TVOS
     public class BuildScript {
         [Serializable]
         class XCodeImageSet {
             [Serializable]
             public class Info {
                 public int version = 0;
                 public string author = null;
             }
 
             [Serializable]
             public class Image {
                 public string idiom = null;
                 public string filename = null;
                 public string scale = null;
             }
 
             public Info info = null;
             public Image[] images = null;
         }
 
         [PostProcessBuild]
         public static void OnPostprocessBuild(BuildTarget buildTarget, string path) {
             string projPath = PBXProject.GetPBXProjectPath(path);
 
             var proj = new PBXProject();
             proj.ReadFromString(File.ReadAllText(projPath));
 
             var target = proj.TargetGuidByName(PBXProject.GetUnityTargetName());
 
             proj.SetBuildProperty(target, "PRODUCT_BUNDLE_IDENTIFIER", UnityEngine.Application.identifier);
             
             File.WriteAllText(projPath, proj.WriteToString());
 
             const string dbImageName = "tvOs_DashboardArtwork";
             const string dbImageFolder = "DashboardImage";
             string dbImagePath = $"{path}/UnityImages.xcassets/{dbImageFolder}.gcdashboardimage/{dbImageFolder}.imageset/";
             Directory.CreateDirectory(dbImagePath);
 
             string[] imageAssetGuids = AssetDatabase.FindAssets(dbImageName);
 
             XCodeImageSet imageSet = new XCodeImageSet {
                 info = new XCodeImageSet.Info {
                     version = 1,
                     author = "com.yourcompany",
                 },
                 images = new XCodeImageSet.Image[imageAssetGuids.Length]
             };
 
             for (int i = 0; i < imageAssetGuids.Length; ++i) {
                 string fileGuid = imageAssetGuids[i];
                 string filePath = AssetDatabase.GUIDToAssetPath(fileGuid);
                 string fileName = Path.GetFileName(filePath);
 
                 imageSet.images[i] = new XCodeImageSet.Image{
                     idiom = "tv",
                     filename = fileName,
                     scale = fileName.Contains("@2x") ? "2x" : "1x",
                 };
 
                 File.Copy(filePath, dbImagePath + fileName);
             }
 
             File.WriteAllText(
                 dbImagePath + "Contents.json",
                 JsonConvert.SerializeObject(imageSet)
             );
         }
     }
 #endif
 }



If using t$$anonymous$$s script, just make sure you have the images named tvOs_DashboardArtwork.png and tvOs_DashboardArtwork_@2x.png somewhere in your Assets folder. Guidelines for the image dimensions can be found here

Hope t$$anonymous$$s helps others having t$$anonymous$$s issue!


screenshot-2019-09-19-at-104323-am.png (34.9 kB)
dashboardimage.jpg (179.3 kB)
Comment
Add comment · Show 8 · 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
avatar image paatz04 · Sep 19, 2019 at 12:22 AM 0
Share
avatar image joe_nk paatz04 · Sep 19, 2019 at 01:05 AM 1
Share
avatar image paatz04 joe_nk · Sep 19, 2019 at 01:06 AM 0
Share
Show more comments
avatar image daniel_unity938 · Dec 03, 2019 at 03:47 AM 0
Share
avatar image fedemg15 · Jan 24, 2020 at 08:07 PM 0
Share
avatar image
0

Answer by leenk · Sep 04, 2019 at 09:17 PM

@o___O @paatz04 - Did anyone manage to find an answer to t$$anonymous$$s issue? We're in a bit of an emergency situation over t$$anonymous$$s right now, and any tips or advice would be a lifesaver! Thanks!

Comment
Add comment · Show 3 · 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
avatar image leenk · Sep 04, 2019 at 09:47 PM 0
Share
avatar image XtremeDry leenk · Sep 18, 2019 at 08:14 AM 0
Share
avatar image joe_nk XtremeDry · Sep 18, 2019 at 11:04 PM 0
Share

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

143 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

Related Questions

GameCenter Leaderboard Reporting Scores 1 Answer

How can i Implement iOS GameCenter leaderboards in my game? 1 Answer

How to load a specific Game Center leaderboard? 1 Answer

How to detect a sign-out from Google Play achievements or leader-boards UI ? 0 Answers

,All works well EXCEPT Social.Reportscore 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