Exemplo n.º 1
0
    static void CreateSettingsFile()
    {
        // ScriptableObjectを探す
        var path = folderPath + settingsFileName;
        MyGDESettingsData settings = AssetDatabase.LoadAssetAtPath <MyGDESettingsData>(path);

        // ない場合
        if (settings == null)
        {
            // フォルダがない場合は作成
            if (!Directory.Exists(folderPath))
            {
                Directory.CreateDirectory(folderPath);
            }

            settings = ScriptableObject.CreateInstance <MyGDESettingsData>();
            AssetDatabase.CreateAsset(settings, path);
            AssetDatabase.Refresh();
        }
        // ある場合
        else
        {
            Debug.Log("Settings file already exists.");
        }
    }
Exemplo n.º 2
0
    public override async void OnInspectorGUI()
    {
        base.OnInspectorGUI();
        MyGDESettingsData mod = target as MyGDESettingsData;

        if (GUILayout.Button("Import CSV"))
        {
            await CSVDownloader.DownloadAsync(mod._documentID, mod._sheetInfos);

            mod._lastUpdate = DateTime.Now.ToString();
        }
    }