ailia  1.6.0.0
静的公開メンバ関数 | 全メンバ一覧
ailia.AiliaLicense クラス

静的公開メンバ関数

static void CheckAndDownloadLicense ()
 

関数詳解

◆ CheckAndDownloadLicense()

static void ailia.AiliaLicense.CheckAndDownloadLicense ( )
inlinestatic
97  {
98  if (Marshal.PtrToStringAnsi(Ailia.ailiaGetVersion()).Contains("perpetual_license")){
99  return; // not required license file
100  }
101 
102 #if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN
103  string currentDirectory = Environment.CurrentDirectory;
104  string licFolder = currentDirectory;
105 #else
106  #if UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
107  string homePath = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
108  string licFolder = Path.Combine(homePath, "Library/SHALO/");
109  #else
110  #if UNITY_EDITOR_LINUX || UNITY_STANDALONE_LINUX
111  string homePath = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
112  string licFolder = Path.Combine(homePath, ".shalo/");
113  #else
114  return; // iOS and Android not required license file
115  #endif
116  #endif
117 #endif
118 #if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN || UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX || UNITY_EDITOR_LINUX || UNITY_STANDALONE_LINUX
119  string licFile = Path.Combine(licFolder, "AILIA.lic");
120 
121  string userData = CheckLicense(licFile);
122  if (userData == null)
123  {
124  Debug.Log("Downloading license file for ailia SDK.");
125  DirectoryInfo di = Directory.CreateDirectory(licFolder);
126  DownloadLicense(licFile);
127  userData = CheckLicense(licFile);
128  }
129 
130  if (userData == null){
131  Debug.Log("Download license file failed.");
132  return;
133  }
134 
135  if (userData.Contains("trial version"))
136  {
137  DisplayWarning();
138  }
139 #endif
140  }

このクラス詳解は次のファイルから抽出されました: