Files
Temp.BattleRoyale.Map.Unity/Assets/GSpawn - Level Designer/Scripts/Level Design/Object Spawn/CurveObjectSpawnSettingsProfile.cs
CortexCore a379dc5cd3 1
2024-05-13 01:28:33 +08:00

32 lines
777 B
C#

#if UNITY_EDITOR
using UnityEngine;
namespace GSpawn
{
public class CurveObjectSpawnSettingsProfile : Profile
{
[SerializeField]
private CurveObjectSpawnSettings _settings;
public CurveObjectSpawnSettings settings
{
get
{
if (_settings == null)
{
_settings = ScriptableObject.CreateInstance<CurveObjectSpawnSettings>();
AssetDbEx.addObjectToAsset(_settings, this);
}
return _settings;
}
}
private void OnDestroy()
{
AssetDbEx.removeObjectFromAsset(_settings, this);
ScriptableObjectEx.destroyImmediate(_settings);
}
}
}
#endif