AR + GPS Location  3.0.0
All Classes Namespaces Functions Variables Properties Events Pages
ARLocationEditorConfigManager.cs
1 using UnityEngine;
2 using UnityEditor;
3 
8 [InitializeOnLoad]
9 // ReSharper disable once InconsistentNaming
12  {
13  Debug.Log("[ARLocation]: Starting up!");
14 
15  if (AssetDatabase.IsValidFolder("Assets/Resources"))
16  {
17  Debug.Log("[ARLocation]: Resource folder already exists!");
18  }
19  else
20  {
21  Debug.Log("[ARLocation]: Creating resource folder...");
22  AssetDatabase.CreateFolder("Assets", "Resources");
23  }
24 
25  var ss = AssetDatabase.FindAssets("ARLocationConfig", new [] {"Assets/Resources"});
26 
27  if (ss.Length > 0)
28  {
29  Debug.Log("[ARLocation]: Config already exists!");
30  }
31  else
32  {
33  Debug.Log("[ARLocation]: Creating new configuration!");
34  AssetDatabase.CopyAsset("Assets/ARLocation/ARLocationConfig.asset", "Assets/Resources/ARLocationConfig.asset");
35  }
36 
37  }
38 }
ARLocationEditorConfigManager
This is a static class that makes sure that there always is a ARLocationConfig resource for the proje...
Definition: ARLocationEditorConfigManager.cs:10