using System; using UnityEngine.Serialization; namespace UnityEngine.Rendering.HighDefinition { public partial class PhysicallyBasedSky : IVersionable { /// /// The version used during the migration /// protected enum Version { /// Version Step Initial, /// Version Step TypeEnum, } /// /// The migration steps for PhysicallyBasedSky /// protected static readonly MigrationDescription k_Migration = MigrationDescription.New( MigrationStep.New(Version.TypeEnum, (PhysicallyBasedSky p) => { #pragma warning disable 618 // Type or member is obsolete p.type.value = p.m_ObsoleteEarthPreset.value ? PhysicallyBasedSkyModel.EarthAdvanced : PhysicallyBasedSkyModel.Custom; p.type.overrideState = p.m_ObsoleteEarthPreset.overrideState; #pragma warning restore 618 }) ); void Awake() { k_Migration.Migrate(this); } [SerializeField] Version m_SkyVersion; Version IVersionable.version { get => m_SkyVersion; set => m_SkyVersion = value; } /// Obsolete field. Simplifies the interface by using parameters suitable to simulate Earth. [SerializeField, FormerlySerializedAs("earthPreset"), Obsolete("For Data Migration")] BoolParameter m_ObsoleteEarthPreset = new BoolParameter(true); } }