generated from max/template-unity-project
28 lines
745 B
C#
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;
|
|
}
|
|
}
|
|
} |