ScenePartition/Editor/ScenePartitionUtils.cs
2023-06-24 16:43:10 +02:00

28 lines
745 B
C#

using System.IO;
using UnityEditor;
using UnityEngine;
namespace VertexColor.ScenePartition.Editor
{
public static class ScenePartitionUtils
{
public static string GetDataPath(ScenePartitionSO scenePartitionSO)
{
string dataPath = Path.Combine(Application.dataPath, $"../Data/Scenes/{scenePartitionSO.name}");
if (!Directory.Exists(dataPath))
{
Directory.CreateDirectory(dataPath);
}
return dataPath;
}
public static string GetScenePath(ScenePartitionSO scenePartitionSO)
{
string scenePath = AssetDatabase.GetAssetOrScenePath(scenePartitionSO.sceneAsset);
return scenePath;
}
}
}