Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #10 from vodp-sp/master
Browse files Browse the repository at this point in the history
Update SDK and IDE version
  • Loading branch information
natsumo committed Sep 11, 2017
2 parents fc2e899 + c71c3da commit bc4308b
Show file tree
Hide file tree
Showing 70 changed files with 1,744 additions and 882 deletions.
9 changes: 9 additions & 0 deletions Assets/Editor.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions Assets/Editor/NCMBMenu.cs
@@ -0,0 +1,22 @@
using System.IO;
using UnityEditor;
using UnityEngine;

namespace NCMB
{
internal class NCMBMenu
{
[MenuItem ("NCMB/DeleteCurrentUserCache")]
private static void DeleteCurrentUserCache ()
{
File.Delete (Application.persistentDataPath + "/" + "currentUser");
Debug.Log ("CurrentUser cache is deleted");
}

[MenuItem ("NCMB/DeleteCurrentUserCache", true)]
private static bool DeleteCurrentUserCacheValidation ()
{
return (File.Exists (Application.persistentDataPath + "/" + "currentUser"));
}
}
}
12 changes: 12 additions & 0 deletions Assets/Editor/NCMBMenu.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Assets/NCMB/NCMBManager.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 42 additions & 2 deletions Assets/NCMB/NCMBSettings.cs
Expand Up @@ -41,6 +41,10 @@ public class NCMBSettings : MonoBehaviour
private static bool _usePush = false;
//開封通知フラグ
private static bool _useAnalytics = false;
//ドメインURL
private static string _domainURL = "";
//APIバージョン
private static string _apiVersion = "";
//static NG
[SerializeField]
internal string
Expand All @@ -63,6 +67,12 @@ internal string
[SerializeField]
internal bool
responseValidation = false;

internal string
domainURL = "";

internal string
apiVersion = "";
//Current user
private static string _currentUser = null;
internal static string filePath = "";
Expand Down Expand Up @@ -131,6 +141,30 @@ internal bool
}
}

/// <summary>
/// ドメインURLの取得、または設定を行います。
/// </summary>
internal static string DomainURL {
get {
return _domainURL;
}
set {
_domainURL = value;
}
}

/// <summary>
/// APIバージョンの取得、または設定を行います。
/// </summary>
internal static string APIVersion {
get {
return _apiVersion;
}
set {
_apiVersion = value;
}
}

/// <summary>
/// コンストラクター
/// </summary>
Expand All @@ -143,12 +177,18 @@ public NCMBSettings ()
/// </summary>
/// <param name="applicationKey">アプリケーションキー</param>
/// <param name="clientKey">クライアントキー</param>
public static void Initialize (String applicationKey, String clientKey)
/// <param name="domainURL">ドメイン</param>
/// <param name="apiVersion">APIバージョン</param>
public static void Initialize (String applicationKey, String clientKey, String domainURL, String apiVersion)
{
// アプリケーションキーを設定
_applicationKey = applicationKey;
// クライアントキーを設定
_clientKey = clientKey;
// ドメインURLを設定
_domainURL = string.IsNullOrEmpty(domainURL) ? CommonConstant.DOMAIN_URL : domainURL;
// APIバージョンを設定
_apiVersion = string.IsNullOrEmpty(apiVersion) ? CommonConstant.API_VERSION : apiVersion;
}

/// <summary>
Expand Down Expand Up @@ -206,7 +246,7 @@ public virtual void Awake ()
NCMBSettings._isInitialized = true;
_responseValidationFlag = responseValidation;
DontDestroyOnLoad (base.gameObject);
NCMBSettings.Initialize (this.applicationKey, this.clientKey);
NCMBSettings.Initialize (this.applicationKey, this.clientKey, this.domainURL, this.apiVersion);
//NCMBSettings.RegisterPush(this.usePush, this.androidSenderId, this.getLocation);
filePath = Application.persistentDataPath;
currentInstallationPath = filePath + "/currentInstallation";
Expand Down
4 changes: 2 additions & 2 deletions Assets/NCMB/NCMBSettings.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Assets/NCMB/Script/CommonConstant.cs
Expand Up @@ -41,7 +41,7 @@ internal static class CommonConstant
public static readonly string DOMAIN_URL = "https://mb.api.cloud.nifty.com";//ドメインのURL

public static readonly string API_VERSION = "2013-09-01";//APIバージョン
public static readonly string SDK_VERSION = "2.2.0"; //SDKバージョン
public static readonly string SDK_VERSION = "3.0.1"; //SDKバージョン
//DEBUG LOG Setting: NCMBDebugにてdefine設定をしてください
}
}
4 changes: 2 additions & 2 deletions Assets/NCMB/Script/CommonConstant.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Assets/NCMB/Script/ExtensionsClass.cs
@@ -1,12 +1,12 @@
/*******
Copyright 2017 FUJITSU CLOUD TECHNOLOGIES LIMITED All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -32,9 +32,9 @@ internal static class ExtensionsClass
{
/// <summary>
/// 以下の二つのメソッドは型チェックで用いる
/// GetTypeInfoはライブラリ内の指定した型の情報を取得します。
/// 拡張メソッドの定義の仕方ですが、 以下のように、
/// 静的クラス中に、 第一引数に this キーワードを修飾子として付けた static メソッドを書きます。
/// GetTypeInfoはライブラリ内の指定した型の情報を取得します。
/// 拡張メソッドの定義の仕方ですが、 以下のように、
/// 静的クラス中に、 第一引数に this キーワードを修飾子として付けた static メソッドを書きます。
/// </summary>
public static Type GetTypeInfo (this Type t)
{
Expand Down
4 changes: 2 additions & 2 deletions Assets/NCMB/Script/ExtensionsClass.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bc4308b

Please sign in to comment.