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

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