Skip to content

Commit

Permalink
Merge branch 'release/1.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
lurim-nhn committed Nov 19, 2020
2 parents 2ee2242 + c717b35 commit c0a91cd
Show file tree
Hide file tree
Showing 80 changed files with 564 additions and 835 deletions.
4 changes: 4 additions & 0 deletions GamebaseSample/Assets/Plugins/Android/mainTemplate.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ android {
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'

dexOptions {
javaMaxHeapSize "4g"
}

defaultConfig {
minSdkVersion 16
targetSdkVersion **TARGETSDKVERSION**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<!-- Smart Downloader start -->
<domain includeSubdomains="true">cdn.toastcloud.com</domain>
<domain includeSubdomains="true">toastcdn.net</domain>
<!-- Smart Downloader end -->
</domain-config>
</network-security-config>
Binary file not shown.
Binary file not shown.
Binary file modified GamebaseSample/Assets/Sample/Resources/Prefabs/Bullet.prefab
Binary file not shown.
Binary file modified GamebaseSample/Assets/Sample/Resources/Prefabs/Enemy.prefab
Binary file not shown.
Binary file modified GamebaseSample/Assets/Sample/Resources/Prefabs/Rocket.prefab
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified GamebaseSample/Assets/Sample/Scene/ingame.unity
Binary file not shown.
Binary file modified GamebaseSample/Assets/Sample/Scene/intro.unity
Binary file not shown.
Binary file modified GamebaseSample/Assets/Sample/Scene/login.unity
Binary file not shown.
Binary file modified GamebaseSample/Assets/Sample/Scene/main.unity
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ private bool IsWebFilePath(string filePath)
private IEnumerator LoadWebFile(string filePath, System.Action<string> callback)
{
#if !UNITY_EDITOR && UNITY_ANDROID
WWW www = new WWW(filePath);
yield return www;
callback(www.text);
WWW www = new WWW(filePath);
yield return www;
callback(www.text);
#else
UnityWebRequest www = UnityWebRequest.Get(filePath);
www.timeout = 10;
Expand Down
4 changes: 2 additions & 2 deletions GamebaseSample/Assets/Sample/Scripts/Popup/DownloadPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ private void Update()
messageText.text = string.Empty;

uint completedCount = progress.CompletedFileCount;
uint totalCount = progress.TotalFileNumber;
uint totalCount = progress.TotalFileCount;

totalDownloadStatusText.text = string.Format("{0}/{1} ({2}/{3})",
StringUtil.BytesToString(progress.TotalReceivedBytes), StringUtil.BytesToString(progress.TotalFileBytes),
StringUtil.BytesToString(progress.DownloadedBytes), StringUtil.BytesToString(progress.TotalFileBytes),
completedCount, totalCount);

if (progress.FileMap != null)
Expand Down
22 changes: 11 additions & 11 deletions GamebaseSample/Assets/Sample/Scripts/Popup/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,17 @@ private void OnEnable()
ChangeLanguageButton();

#if !UNITY_EDITOR && UNITY_IOS
mappingView.SetActive(true);
googleButton.SetActive(false);
gamecenterButton.SetActive(true);
facebookButton.SetActive(true);
paycoButton.SetActive(true);
mappingView.SetActive(true);
googleButton.SetActive(false);
gamecenterButton.SetActive(true);
facebookButton.SetActive(true);
paycoButton.SetActive(true);
#elif !UNITY_EDITOR && UNITY_ANDROID
mappingView.SetActive(true);
googleButton.SetActive(true);
gamecenterButton.SetActive(false);
facebookButton.SetActive(true);
paycoButton.SetActive(true);
mappingView.SetActive(true);
googleButton.SetActive(true);
gamecenterButton.SetActive(false);
facebookButton.SetActive(true);
paycoButton.SetActive(true);
#else
pushSettingButton.color = PUSH_BUTTON_DIMMED;

Expand Down Expand Up @@ -227,7 +227,7 @@ public void ClickPushSettingButton()
LocalizationManager.Instance.GetLocalizedValue(GameStrings.COMMON_OK_BUTTON),
null);
#else
Push.OpenPush(gameObject, () => { }, true);
Push.OpenPush(gameObject, () => { }, true);
#endif
}

Expand Down
2 changes: 1 addition & 1 deletion GamebaseSample/Assets/Sample/Scripts/SampleVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
{
public static class SampleVersion
{
public const string VERSION = "1.0.0";
public const string VERSION = "1.0.1";
}
}
42 changes: 21 additions & 21 deletions GamebaseSample/Assets/Sample/Scripts/Scene/Login.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,23 +67,23 @@ private void Start()
private void Update()
{
#if !UNITY_EDITOR && UNITY_ANDROID
if (Input.GetKeyDown(KeyCode.Escape) == true)
{
Application.Quit();
}
if (Input.GetKeyDown(KeyCode.Escape) == true)
{
Application.Quit();
}
#endif

#if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS)
if (0 < Input.touchCount)
{
for (int i = 0; i < Input.touchCount; ++i)
if (0 < Input.touchCount)
{
if (Input.GetTouch(i).phase == TouchPhase.Began)
for (int i = 0; i < Input.touchCount; ++i)
{
CreateTouchEffect(Input.GetTouch(i).position);
if (Input.GetTouch(i).phase == TouchPhase.Began)
{
CreateTouchEffect(Input.GetTouch(i).position);
}
}
}
}
#else
if (Input.GetMouseButtonDown(0) == true)
{
Expand Down Expand Up @@ -192,7 +192,7 @@ private void CheckLaunchingStatus()
private void GamebaseLogin()
{
#if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS)
LoginForLastLoggedInProvider();
LoginForLastLoggedInProvider();
#else
ActiveButton(true);
Loading.GetInstance().HideLoading();
Expand Down Expand Up @@ -246,10 +246,10 @@ private void LoginWithProviderName(string loginType)
if (Gamebase.IsSuccess(error) == true)
{
#if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS)
ActiveButton(false);
Push.CheckPushSettings(gameObject, ()=> { OnLogin(); });
ActiveButton(false);
Push.CheckPushSettings(gameObject, ()=> { OnLogin(); });
#else
OnLogin();
OnLogin();
#endif
}
else
Expand Down Expand Up @@ -288,12 +288,12 @@ private void LoadMainScene()
{
DataManager.User.Id = Gamebase.GetUserID();
#if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS)
DataManager.User.IdP = Gamebase.GetLastLoggedInProvider();
DataManager.User.IdP = Gamebase.GetLastLoggedInProvider();
#else
DataManager.User.IdP = "guest";
DataManager.User.IdP = "guest";
#endif

SceneManager.LoadSceneAsync("main");
SceneManager.LoadSceneAsync("main");
}
else
{
Expand All @@ -320,11 +320,11 @@ private void ActiveButton(bool isActive)
cacheDeleteButton.SetActive(isActive);

#if !UNITY_EDITOR && UNITY_IOS
gamecenterButton.SetActive(isActive);
otherButtonContainer.SetActive(isActive);
gamecenterButton.SetActive(isActive);
otherButtonContainer.SetActive(isActive);
#elif !UNITY_EDITOR && UNITY_ANDROID
googleButton.SetActive(isActive);
otherButtonContainer.SetActive(isActive);
googleButton.SetActive(isActive);
otherButtonContainer.SetActive(isActive);
#elif UNITY_EDITOR
googleButton.SetActive(false);
gamecenterButton.SetActive(false);
Expand Down
22 changes: 11 additions & 11 deletions GamebaseSample/Assets/Sample/Scripts/Scene/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,22 @@ private void OnDestroy()
private void Update()
{
#if !UNITY_EDITOR && UNITY_ANDROID
if (Input.GetKeyDown(KeyCode.Escape) == true)
{
Application.Quit();
}
if (Input.GetKeyDown(KeyCode.Escape) == true)
{
Application.Quit();
}
#endif
#if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS)
if (0 < Input.touchCount)
{
for (int i = 0; i < Input.touchCount; ++i)
if (0 < Input.touchCount)
{
if (Input.GetTouch(i).phase == TouchPhase.Began)
for (int i = 0; i < Input.touchCount; ++i)
{
CreateTouchEffect(Input.GetTouch(i).position);
if (Input.GetTouch(i).phase == TouchPhase.Began)
{
CreateTouchEffect(Input.GetTouch(i).position);
}
}
}
}
#else
if (Input.GetMouseButtonDown(0) == true)
{
Expand Down Expand Up @@ -182,7 +182,7 @@ private void GamebaseServerPushHandler(GamebaseResponse.SDK.ServerPushMessage me
private void EndSession()
{
#if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS)
SceneManager.LoadSceneAsync("login");
SceneManager.LoadSceneAsync("login");
#else
Loading.GetInstance().ShowLoading(gameObject);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ private static string DownloadPath
{
return
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + Seperator + LEAF_DIRECTORY;
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + Seperator + LEAF_DIRECTORY;
#elif UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
// MacOS Path : /Users/{USER_NAME}/Documents/SmartDLDownloads
Environment.GetFolderPath(Environment.SpecialFolder.Personal) + Seperator + "Documents" + Seperator + LEAF_DIRECTORY;
// MacOS Path : /Users/{USER_NAME}/Documents/SmartDLDownloads
Environment.GetFolderPath(Environment.SpecialFolder.Personal) + Seperator + "Documents" + Seperator + LEAF_DIRECTORY;
#else
Application.persistentDataPath + Seperator + LEAF_DIRECTORY;
Application.persistentDataPath + Seperator + LEAF_DIRECTORY;
#endif
}
}
Expand Down Expand Up @@ -60,7 +60,7 @@ public void StartDownload(Action<bool> callback, params string[] downloadPaths)
DataManager.Launching.smartdl.appkey,
DataManager.Launching.smartdl.service_android,
DownloadPath,
result => { callback(result.IsSuccessful); });
result => { callback(result.Code == ResultCode.SUCCESS || result.Code == ResultCode.SUCCESS_NO_DIFFERENCE); });
}

public void StopDownload()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public static class UnityWebRequest
public static AsyncOperation Send(UnityEngine.Networking.UnityWebRequest request)
{
#if UNITY_2017_2_OR_NEWER
return request.SendWebRequest();
return request.SendWebRequest();
#else
return request.Send();
#endif
Expand All @@ -18,7 +18,7 @@ public static AsyncOperation Send(UnityEngine.Networking.UnityWebRequest request
public static bool IsError(UnityEngine.Networking.UnityWebRequest request)
{
#if UNITY_2017_1_OR_NEWER
return request.isNetworkError;
return request.isNetworkError;
#else
return request.isError;
#endif
Expand Down
Loading

0 comments on commit c0a91cd

Please sign in to comment.