public VolumeData(bool isGlobal, VolumeProfile profile) { this.isGlobal = isGlobal; this.profile = profile; VisualEnvironment visualEnvironment = null; this.hasVisualEnvironment = profile != null?profile.TryGet <VisualEnvironment>(typeof(VisualEnvironment), out visualEnvironment) : false; if (this.hasVisualEnvironment) { this.skyType = (SkyType)visualEnvironment.skyType.value; this.fogType = visualEnvironment.fogType.value; } else { this.skyType = (SkyType)1; this.fogType = (FogType)0; } }
public VolumeData(bool isGlobal, VolumeProfile profile, bool hasStaticLightingSky) { this.isGlobal = isGlobal; this.profile = profile; VisualEnvironment visualEnvironment = null; this.hasVisualEnvironment = profile.TryGet <VisualEnvironment>(typeof(VisualEnvironment), out visualEnvironment); if (this.hasVisualEnvironment) { this.skyType = (SkyType)visualEnvironment.skyType.value; this.fogType = visualEnvironment.fogType.value; } else { this.skyType = (SkyType)1; this.fogType = (FogType)0; } this.hasStaticLightingSky = hasStaticLightingSky; }