Skip to content

Commit

Permalink
modify minor error
Browse files Browse the repository at this point in the history
  • Loading branch information
Taku3939 committed Nov 5, 2021
1 parent 451772f commit 4c287c7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion Assets/SPModelImporter/Editor/SPModelSetting.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.IO;
using UnityEditor;
using UnityEngine;
using UnityEngine.UIElements;
Expand Down Expand Up @@ -32,7 +33,14 @@ public void Init()

internal static SPModelSetting GetOrCreate()
{
var settings = AssetDatabase.LoadAssetAtPath<SPModelSetting>(SPSettingsProvider.PATH);
SPModelSetting settings = null;
var path = $"{Application.dataPath}/Settings/";
if (Directory.Exists(path))
settings = AssetDatabase.LoadAssetAtPath<SPModelSetting>(SPSettingsProvider.PATH);
else
Directory.CreateDirectory(path);


if (settings == null)
{
settings = ScriptableObject.CreateInstance<SPModelSetting>();
Expand Down
2 changes: 1 addition & 1 deletion Assets/SPModelImporter/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "com.astript.spmodelimporter",
"displayName": "SPModelImporter",
"version": "0.1.0",
"version": "0.1.1",
"unity": "2020.3",
"description": " Model of SubstancePainter importer",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion ProjectSettings/EditorBuildSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ EditorBuildSettings:
serializedVersion: 2
m_Scenes:
- enabled: 1
path: Assets/SPModelImporter/Scenes/SPModelImporter.unity
path: Assets/Scenes/SPModelImporter.unity
guid: d1c3109bdb54ad54c8a2b2838528e640
m_configObjects: {}

0 comments on commit 4c287c7

Please sign in to comment.