SW 중심대학 OSS GIT 서버 박건태, 이승준, 고기완, 이준호 새로운 배포
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

38 lines
1.1 KiB

using UnityEngine;
using UnityEditor;
/// <summary>
/// This is a static class that makes sure that there always is a
/// ARLocationConfig resource for the project.
/// </summary>
[InitializeOnLoad]
// ReSharper disable once InconsistentNaming
public class ARLocationEditorConfigManager {
static ARLocationEditorConfigManager()
{
Debug.Log("[ARLocation]: Starting up!");
if (AssetDatabase.IsValidFolder("Assets/Resources"))
{
Debug.Log("[ARLocation]: Resource folder already exists!");
}
else
{
Debug.Log("[ARLocation]: Creating resource folder...");
AssetDatabase.CreateFolder("Assets", "Resources");
}
var ss = AssetDatabase.FindAssets("ARLocationConfig", new [] {"Assets/Resources"});
if (ss.Length > 0)
{
Debug.Log("[ARLocation]: Config already exists!");
}
else
{
Debug.Log("[ARLocation]: Creating new configuration!");
AssetDatabase.CopyAsset("Assets/ARLocation/ARLocationConfig.asset", "Assets/Resources/ARLocationConfig.asset");
}
}
}