From 89719f4f4c58a141fbde24f769b9ec70df84fc08 Mon Sep 17 00:00:00 2001 From: David Finol Date: Tue, 2 Oct 2018 19:31:17 -0500 Subject: [PATCH] Release version 1.5.0 --- Assets/Scripts/CGS/Menus/DeckLoadMenu.cs | 3 +-- Assets/Scripts/CGS/Menus/GameSelectionMenu.cs | 15 +++++++-------- Assets/Scripts/CGS/Menus/TitleScreen.cs | 2 +- ProjectSettings/GraphicsSettings.asset | 1 + 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Assets/Scripts/CGS/Menus/DeckLoadMenu.cs b/Assets/Scripts/CGS/Menus/DeckLoadMenu.cs index a8b0a2752..6eaac8f1c 100644 --- a/Assets/Scripts/CGS/Menus/DeckLoadMenu.cs +++ b/Assets/Scripts/CGS/Menus/DeckLoadMenu.cs @@ -25,7 +25,6 @@ public class DeckLoadMenu : SelectionPanel public const string DeletePrompt = "Are you sure you would like to delete this deck?"; public const string DeckDeleteErrorMessage = "There was an error while attempting to delete the deck: "; - public const string ShareMessage = "Deck text copied to clipboard"; public const string DeckLoadErrorMessage = "There was an error while loading the deck: "; public const string DeckSaveErrorMessage = "There was an error saving the deck to file: "; @@ -197,7 +196,7 @@ public void Share() (new NativeShare()).SetText(shareText).Share(); #else UniClipboard.SetText(shareText); - CardGameManager.Instance.Messenger.Show(ShareMessage); + CardGameManager.Instance.Messenger.Show(DeckSaveMenu.DeckCopiedMessage); #endif } diff --git a/Assets/Scripts/CGS/Menus/GameSelectionMenu.cs b/Assets/Scripts/CGS/Menus/GameSelectionMenu.cs index 2f07960d6..45907438a 100644 --- a/Assets/Scripts/CGS/Menus/GameSelectionMenu.cs +++ b/Assets/Scripts/CGS/Menus/GameSelectionMenu.cs @@ -19,7 +19,7 @@ public class GameSelectionMenu : SelectionPanel public const string ShareTitle = "Card Game Simulator - {0}"; public const string ShareDescription = "Play {0} on CGS!"; public const string ShareMessage = "Get CGS for {0}: {1}"; - public const string ShareMessage2 = "Share link copied to clipboard: {0}"; + public const string ShareMessage2 = "Share functionality only available on Android/iOS."; public const string DominoesUrl = "https://cardgamesim.finoldigital.com/games/Dominoes/Dominoes.json"; public const string StandardUrl = "https://cardgamesim.finoldigital.com/games/Standard/Standard.json"; public const string MahjongUrl = "https://cardgamesim.finoldigital.com/games/Mahjong/Mahjong.json"; @@ -111,7 +111,11 @@ public void Share() BranchLinkProperties linkProperties = new BranchLinkProperties(); linkProperties.controlParams.Add(TitleScreen.GameName, CardGameManager.Current.Name); linkProperties.controlParams.Add(TitleScreen.GameUrl, CardGameManager.Current.AutoUpdateUrl); +#if (UNITY_ANDROID || UNITY_IOS) && !UNITY_EDITOR Branch.getShortURL(universalObject, linkProperties, BranchCallbackWithUrl); +#else + CardGameManager.Instance.Messenger.Show(string.Format(ShareMessage2)); +#endif } public void BranchCallbackWithUrl(string url, string error) @@ -122,13 +126,8 @@ public void BranchCallbackWithUrl(string url, string error) return; } - string shareText = string.Format(ShareMessage, CardGameManager.Current.Name, url); -#if (UNITY_ANDROID || UNITY_IOS) && !UNITY_EDITOR - (new NativeShare()).SetText(shareText).Share(); -#else - UniClipboard.SetText(url); - CardGameManager.Instance.Messenger.Show(string.Format(ShareMessage2, url)); -#endif + NativeShare nativeShare = new NativeShare(); + nativeShare.SetText(string.Format(ShareMessage, CardGameManager.Current.Name, url)).Share(); } public void ShowDownloadPanel() diff --git a/Assets/Scripts/CGS/Menus/TitleScreen.cs b/Assets/Scripts/CGS/Menus/TitleScreen.cs index 73af22a05..ce6889407 100644 --- a/Assets/Scripts/CGS/Menus/TitleScreen.cs +++ b/Assets/Scripts/CGS/Menus/TitleScreen.cs @@ -18,7 +18,7 @@ public class TitleScreen : MonoBehaviour void Start() { versionText.text = MainMenu.VersionMessage + Application.version; -#if UNITY_ANDROID || UNITY_IOS +#if (UNITY_ANDROID || UNITY_IOS) && !UNITY_EDITOR Branch.initSession(BranchCallbackWithBranchUniversalObject); #endif } diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset index 6e7e2d976..bd131f47c 100644 --- a/ProjectSettings/GraphicsSettings.asset +++ b/ProjectSettings/GraphicsSettings.asset @@ -37,6 +37,7 @@ GraphicsSettings: - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0} - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 16002, guid: 0000000000000000f000000000000000, type: 0} m_PreloadedShaders: [] m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}