ImportWin8Support
How do I use Import Win8 Support
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
250 | private static void ImportWin8Support() | 1 |
331 | PhotonEditor.ImportWin8Support(); | 2 |
File name: PhotonEditor.cs
Copy
250 private static void ImportWin8Support()
251 {
252 if (EditorApplication.isCompiling || EditorApplication.isPlayingOrWillChangePlaymode)
253 {
254 return; // don't import while compiling
255 }
256
257 #if UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5 || UNITY_5_1 || UNITY_5_2
258 const string win8Package = "Assets/Plugins/Photon3Unity3D-Win8.unitypackage";
259
260 bool win8LibsExist = File.Exists("Assets/Plugins/WP8/Photon3Unity3D.dll") && File.Exists("Assets/Plugins/Metro/Photon3Unity3D.dll");
261 if (!win8LibsExist && File.Exists(win8Package))
262 {
263 AssetDatabase.ImportPackage(win8Package, false);
264 }
265 #endif
266 }
File name: PhotonEditor.cs
Copy
318 private static void OnUpdate()
319 {
320 // after a compile, check RPCs to create a cache-list
321 if (!postCompileActionsDone && !EditorApplication.isCompiling && !EditorApplication.isPlayingOrWillChangePlaymode && PhotonEditor.Current != null)
322 {
323 #if UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5 || UNITY_5_1 || UNITY_5_2
324 if (EditorApplication.isUpdating) return;
325 #endif
326
327 PhotonEditor.UpdateRpcList();
328 postCompileActionsDone = true; // on compile, this falls back to false (without actively doing anything)
329
330 #if UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6 || UNITY_5 || UNITY_5_1 || UNITY_5_2
331 PhotonEditor.ImportWin8Support();
332 #endif
333 }
334 }
ImportWin8Support 111 lượt xem
Gõ tìm kiếm nhanh...