升级6.4.升级水,升级天气
This commit is contained in:
@@ -52,14 +52,14 @@ namespace WaveHarmonic.Crest
|
||||
WatertightHullMode _Mode = WatertightHullMode.Displacement;
|
||||
|
||||
[Tooltip("Inverts the effect to remove clipping (ie add water).")]
|
||||
[@Predicated(nameof(_Mode), inverted: true, nameof(WatertightHullMode.Clip), hide: true)]
|
||||
[@Show(nameof(_Mode), nameof(WatertightHullMode.Clip))]
|
||||
[@GenerateAPI]
|
||||
[@DecoratedField, SerializeField]
|
||||
bool _Inverted;
|
||||
|
||||
[@Label("Use Clip")]
|
||||
[Tooltip("Whether to also to clip the surface when using displacement mode.\n\nDisplacement mode can have a leaky hull by allowing chop top push waves across the hull boundaries slightly. Clipping the surface will remove these interior leaks.")]
|
||||
[@Predicated(nameof(_Mode), inverted: true, nameof(WatertightHullMode.Displacement), hide: true)]
|
||||
[@Show(nameof(_Mode), nameof(WatertightHullMode.Displacement))]
|
||||
[@GenerateAPI(Setter.Custom)]
|
||||
[@DecoratedField, SerializeField]
|
||||
bool _UseClipWithDisplacement = true;
|
||||
@@ -248,28 +248,19 @@ namespace WaveHarmonic.Crest
|
||||
}
|
||||
}
|
||||
|
||||
partial class WatertightHull : ISerializationCallbackReceiver
|
||||
partial class WatertightHull
|
||||
{
|
||||
[SerializeField, HideInInspector]
|
||||
#pragma warning disable 414
|
||||
int _Version = 1;
|
||||
#pragma warning restore 414
|
||||
private protected override int Version => Mathf.Max(base.Version, 1);
|
||||
|
||||
/// <inheritdoc/>
|
||||
void ISerializationCallbackReceiver.OnAfterDeserialize()
|
||||
private protected override void OnMigrate()
|
||||
{
|
||||
base.OnMigrate();
|
||||
|
||||
if (_Version < 1)
|
||||
{
|
||||
// Keep clip for existing.
|
||||
_Mode = WatertightHullMode.Clip;
|
||||
_Version = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
void ISerializationCallbackReceiver.OnBeforeSerialize()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user