ScenePartition/Editor/ScenePartitionSO.cs

24 lines
686 B
C#
Raw Normal View History

using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
namespace VertexColor.ScenePartition
{
[CreateAssetMenu(fileName = "Scene", menuName = "Max/ScenePartitionSO")]
public class ScenePartitionSO : ScriptableObject
{
[field: SerializeField]
public SceneAsset sceneAsset { get; private set; } = null;
public string sceneName { get; private set; } = "";
private List<string> loadedPartitions = new List<string>();
private void OnValidate()
{
if (string.IsNullOrWhiteSpace(sceneName) && sceneAsset != null)
{
sceneName= sceneAsset.name;
}
}
}
}