You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.1 KiB
44 lines
1.1 KiB
# if UNITY_EDITOR
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEditor.Rendering;
|
|
using UnityEngine;
|
|
|
|
namespace UnityEngine.Rendering
|
|
{
|
|
public class RequiredSettingsSOT<T> : RequiredSettingsSO where T : RequiredSettingBase
|
|
{
|
|
[SerializeField]
|
|
public List<T> m_requiredSettings;
|
|
|
|
public override List<RequiredSettingBase> requiredSettings => new List<RequiredSettingBase>(m_requiredSettings);
|
|
|
|
|
|
public bool allGood
|
|
{
|
|
get
|
|
{
|
|
if (requiredSettings == null || requiredSettings.Count == 0)
|
|
return true;
|
|
|
|
foreach(var setting in requiredSettings)
|
|
{
|
|
if (!setting.state)
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
|
|
public abstract class RequiredSettingsSO : ScriptableObject, RequiredSettingsSOI
|
|
{
|
|
public abstract List<RequiredSettingBase> requiredSettings { get; }
|
|
}
|
|
|
|
public interface RequiredSettingsSOI
|
|
{
|
|
public List<RequiredSettingBase> requiredSettings { get; }
|
|
}
|
|
}
|
|
#endif
|