您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

58 行
1.2 KiB

using System.IO;
#if UNITY_EDITOR
using UnityEditor;
#endif
using UnityEngine;
namespace AxelF {
public enum OcclusionFunction {
None,
Distance,
Raycast,
Slapback
}
public class OcclusionSettings : ScriptableObject {
public static readonly string path = "Assets/Features/AxelF/Resources/OcclusionSettings.asset";
public static OcclusionSettings instance {
get {
var s = Resources.Load<OcclusionSettings>("OcclusionSettings");
#if UNITY_EDITOR
if (s == null) {
s = ScriptableObject.CreateInstance<OcclusionSettings>();
AssetDatabase.CreateAsset(s, path);
}
#endif
return s;
}
}
#if UNITY_EDITOR
//[MenuItem("AxelF/Settings/Occlusion Settings")]
static void PingImportSettingst() {
EditorGUIUtility.PingObject(instance);
}
#endif
public LayerMask layerMask = 1;
[MinMax(0, 22000)]
public MinMaxFloat highPassRange = new MinMaxFloat {
min = 0,
max = 1100,
};
[MinMax(0, 22000)]
public MinMaxFloat lowPassRange = new MinMaxFloat {
min = 4400,
max = 22000,
};
public float speedOfSound = 340f;
}
} // AxelF