//------------------------------------------------------------------------------------------------------------- private void Initialization(string sMessage, ShowMyAppShareOnCompleteBlock sCompleteBlock = null) { #if UNITY_EDITOR bool tReturn = EditorUtility.DisplayDialog("Share not working in editor", sMessage, "OK", "NOK"); if (tReturn == true) { sCompleteBlock?.Invoke(ShowMyAppState.OK); } else { sCompleteBlock?.Invoke(ShowMyAppState.NOK); } #else #if UNITY_IPHONE ShowMyAppShareIOS.Create(sMessage, sCompleteBlock); #elif UNITY_ANDROID ShowMyAppShareAndroid.Create(sMessage, sCompleteBlock); #elif UNITY_STANDALONE_OSX ShowMyAppShareOSX.Create(sMessage, sCompleteBlock); #elif UNITY_STANDALONE_WIN Debug.Log("ALERT " + sTitle + " " + sMessage); #elif UNITY_STANDALONE_LINUX Debug.Log("ALERT " + sTitle + " " + sMessage); #else Debug.Log("ALERT " + sTitle + " " + sMessage); #endif #endif }
//------------------------------------------------------------------------------------------------------------- public static ShowMyAppShareIOS Create(string sMessage, ShowMyAppShareOnCompleteBlock sCompleteBlock) { ShowMyAppShareIOS tDialog = new GameObject("ShowMyAppIOS_GameObject").AddComponent<ShowMyAppShareIOS>(); tDialog.Message = sMessage; tDialog.CompleteBlock = sCompleteBlock; tDialog.Initialization(tDialog.name, "OnShareCompletedCallback"); return tDialog; }
public void ShareFull(ShowMyAppShareOnCompleteBlock sCompleteBlock) { GetFullURL(delegate(string sURL) { ShowMyAppShare.Share(Message + "\n" + sURL, sCompleteBlock); } ); }
//------------------------------------------------------------------------------------------------------------- public static ShowMyAppShareAndroid Create(string sMessage, ShowMyAppShareOnCompleteBlock sCompleteBlock) { Debug.Log("ShowMyAppShareAndroid Create()"); ShowMyAppShareAndroid tDialog = new GameObject("ShowMyAppAndroid_GameObject").AddComponent <ShowMyAppShareAndroid>(); tDialog.Message = sMessage; tDialog.CompleteBlock = sCompleteBlock; tDialog.Initialization(tDialog.name, "OnShareCompletedCallback"); return(tDialog); }
public void Share(ShowMyAppShareOnCompleteBlock sCompleteBlock = null) { if (Tiny == true) { ShareTiny(sCompleteBlock); } else { ShareFull(sCompleteBlock); } }
//------------------------------------------------------------------------------------------------------------- public static ShowMyAppShareOSX Create(string sTitle, string sMessage, string sOK, ShowMyAppShareOnCompleteBlock sCompleteBlock) { ShowMyAppShareOSX tDialog = new GameObject("ShowMyAppOSX_GameObject").AddComponent <ShowMyAppShareOSX>(); tDialog.Message = sMessage; tDialog.CompleteBlock = sCompleteBlock; tDialog.Initialization(tDialog.name, "OnShareCompletedCallback"); return(tDialog); }
//------------------------------------------------------------------------------------------------------------- public ShowMyAppShare(string sMessage, ShowMyAppShareOnCompleteBlock sCompleteBlock) { Initialization(sMessage, sCompleteBlock); }
//------------------------------------------------------------------------------------------------------------- public static ShowMyAppShare Share(string sMessage, ShowMyAppShareOnCompleteBlock sCompleteBlock) { ShowMyAppShare rReturn = new ShowMyAppShare(sMessage, sCompleteBlock); return(rReturn); }