-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
95 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using UnityEngine; | ||
|
||
namespace ElectronicFish.utils | ||
{ | ||
internal static class AndroidUtils | ||
{ | ||
public static void ShowAndroidToastMessage(string message) | ||
{ | ||
var unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); | ||
var unityActivity = unityPlayer.GetStatic<AndroidJavaObject>("currentActivity"); | ||
|
||
if (unityActivity == null) return; | ||
var toastClass = new AndroidJavaClass("android.widget.Toast"); | ||
unityActivity.Call("runOnUiThread", new AndroidJavaRunnable(() => | ||
{ | ||
var toastObject = toastClass.CallStatic<AndroidJavaObject>("makeText", unityActivity, message, 0); | ||
toastObject.Call("show"); | ||
})); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"Keys":["com.unity.services.core.cloud-environment","com.unity.services.core.version"],"Values":[{"m_Value":"production","m_IsReadOnly":true},{"m_Value":"1.4.2","m_IsReadOnly":true}]} |
7 changes: 7 additions & 0 deletions
7
Assets/StreamingAssets/UnityServicesProjectConfiguration.json.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters