Files
2026-03-04 10:03:45 +08:00

36 lines
1008 B
C#

using System.Collections.Generic;
namespace UnityEngine.AzureSky
{
[CreateAssetMenu(fileName = "Weather Profile", menuName = "Azure[Sky] Dynamic Skybox/New Weather Profile", order = 1)]
public class AzureWeatherProfile : ScriptableObject
{
[Tooltip("The override object with the custom properties list.")]
public AzureOverrideObject overrideObject;
[Tooltip("List with the profile properties created from the override object to be stored and edited in this profile.")]
public List<AzureProfileProperty> profilePropertyList = new List<AzureProfileProperty>();
public void ResizeList(int newCount)
{
if (newCount == profilePropertyList.Count)
{
return;
}
if (newCount <= 0)
{
profilePropertyList.Clear();
return;
}
while (profilePropertyList.Count > newCount)
{
profilePropertyList.RemoveAt(profilePropertyList.Count - 1);
}
while (profilePropertyList.Count < newCount)
{
profilePropertyList.Add(new AzureProfileProperty());
}
}
}
}