浏览代码
Bug fixes (#83)
Bug fixes (#83)
* Fix profiling scope Obsolete code * fix caustic shader null on load * Removal of un-needed VolumeHolder * Hid debugs behind Pipeline debug setting * More caustics shader null checking * Navmesh obsolete API change * Fix for PostVolume prefab not instantiating on load * Updated URP version * used new 7.2.0 API for getting additional camera data * Moved volume init code to later in the frame as it was being destroyed as it was being created if duplicate * Revert "Navmesh obsolete API change" This reverts commit 66baf983dc53f0c11d9ea14bd414e184efc739ec./main
GitHub
5 年前
当前提交
988f8ccd
共有 7 个文件被更改,包括 35 次插入 和 87 次删除
-
29Assets/Scripts/GameSystem/DefaultVolume.cs
-
13Packages/com.verasl.water-system/Scripts/Rendering/WaterSystemFeature.cs
-
2Packages/com.verasl.water-system/Scripts/Rendering/WaterSystemFeature.cs.meta
-
10Packages/com.verasl.water-system/Scripts/Water.cs
-
7Packages/manifest.json
-
50Assets/Scripts/GameSystem/VolumeHolder.cs
-
11Assets/Scripts/GameSystem/VolumeHolder.cs.meta
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using UnityEngine.AddressableAssets; |
|||
using UnityEngine.Rendering; |
|||
using UnityEngine.Serialization; |
|||
|
|||
[CreateAssetMenu(fileName = "VolumeHolder", menuName = "Volume Holder", order = 0)] |
|||
public class VolumeHolder : ScriptableObject |
|||
{ |
|||
[SerializeField] |
|||
public AssetReference[] _Volumes; |
|||
[FormerlySerializedAs("qualityIndicies")] [SerializeField] |
|||
public List<int> qualityIndices = new List<int>(); |
|||
[FormerlySerializedAs("qualityVolumeIndicies")] [SerializeField] |
|||
public List<int> qualityVolumeIndices = new List<int>(); |
|||
|
|||
public bool ContainsKey(int key) |
|||
{ |
|||
return qualityIndices.Contains(key); |
|||
} |
|||
|
|||
public void Add(int key, int value) |
|||
{ |
|||
qualityIndices.Add(key); |
|||
qualityVolumeIndices.Add(value); |
|||
} |
|||
|
|||
public void SetKey(int key, int value) |
|||
{ |
|||
if (qualityIndices.Contains(key)) |
|||
{ |
|||
qualityVolumeIndices[qualityIndices.IndexOf(key)] = value; |
|||
} |
|||
else |
|||
{ |
|||
Add(key, value); |
|||
} |
|||
} |
|||
|
|||
public int GetValue(int key) |
|||
{ |
|||
if (qualityIndices.Contains(key)) |
|||
{ |
|||
return qualityVolumeIndices[qualityIndices.IndexOf(key)]; |
|||
} |
|||
|
|||
throw new Exception(message: $"{qualityIndices} does not contain key {key}"); |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: bea894b80a78a4f9a9d5210e78f59e3b |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
撰写
预览
正在加载...
取消
保存
Reference in new issue