Skip to content

Commit 98c47cc

Browse files
committed
方便查找�Game�Settings
1 parent 171feb4 commit 98c47cc

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

FirClient/Assets/Editor/BaseEditor.cs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -164,15 +164,16 @@ public static long FileSize(string filePath)
164164
[MenuItem("Assets/Create/Game/Game Settings", false, 82)]
165165
static void CreateGameSettings()
166166
{
167-
string gameSettingPath = AppConst.GameSettingPath + ".asset";
168-
string fullPath = AppDataWithoutAssetPath + "/" + gameSettingPath;
169-
if (!File.Exists(fullPath))
170-
{
171-
var scriptObj = ScriptableObject.CreateInstance<GameSettings>();
172-
AssetDatabase.CreateAsset(scriptObj, gameSettingPath);
173-
AssetDatabase.Refresh();
174-
Debug.LogWarning("Create GameSettings OK!!");
175-
}
167+
string gameSettingPath ="Assets/Res/Resources/"+ AppConst.GameSettingPath+".asset";
168+
string fullPath = AppDataPath + gameSettingPath;
169+
if (!File.Exists(fullPath))
170+
{
171+
var scriptObj = ScriptableObject.CreateInstance<GameSettings>();
172+
AssetDatabase.CreateAsset(scriptObj, gameSettingPath);
173+
AssetDatabase.Refresh();
174+
Debug.LogWarning("Create GameSettings OK!!");
175+
}
176+
Selection.activeObject = gameSettings;
176177
}
177178

178179
public static string GetSelectedPathOrFallback()

0 commit comments

Comments
 (0)