Example #1
0
        public void RevertToDefault()
        {
            showLightmapSettings          = deaultShowLightmapSettings;
            realtimeGlobalIllumination    = defaultRealtimeGlobalIllumination;
            bakedGlobalIllumination       = defaultBakedGlobalIllumination;
            lightmappingMode              = defaultLightmappingMode;
            indirectRelolution            = defaultIndirectRelolution;
            lightmapResolution            = defaultLightmapResolution;
            lightmapPadding               = defaultLightmapPadding;
            useHighResolutionLightmapSize = defaultUseHighResolutionLightmapSize;
            compressLightmaps             = defaultCompressLightmaps;
            ambientOcclusion              = defaultAmbientOcclusion;
            maxDistance                      = defaultMaxDistance;
            indirectContribution             = defaultIndirectContribution;
            directContribution               = defaultDirectContribution;
            useDirectionalMode               = defaultUseDirectionalMode;
            lightIndirectIntensity           = defaultLightIndirectIntensity;
            lightBoostIntensity              = defaultLightBoostIntensity;
            finalGather                      = defaultFinalGather;
            finalGatherRayCount              = defaultFinalGatherRayCount;
            finalGatherDenoising             = defaultFinalGatherDenoising;
            autoLightmapGeneration           = defaultAutoLightmapGeneration;
            reflectionProbeName              = defaultReflectionProbeName;
            reflectionProbeSpawnType         = defaultReflectionProbeSpawnType;
            reflectionProbeMode              = defaultReflectionProbeMode;
            reflectionProbeRefresh           = defaultReflectionProbeRefresh;
            reflectionCubemapCompression     = defaultReflectionCubemapCompression;
            reflectionProbeTimeSlicingMode   = defaultReflectionProbeTimeSlicingMode;
            reflectionProbeScale             = defaultReflectionProbeScale;
            reflectionProbeOffset            = defaultReflectionProbeOffset;
            reflectionProbesPerRow           = defaultReflectionProbesPerRow;
            reflectionProbeClipPlaneDistance = defaultReflectionProbeClipPlaneDistance;
            reflectionProbeBlendDistance     = defaultReflectionProbeBlendDistance;
            reflectionprobeCullingMask       = defaultReflectionprobeCullingMask;
            reflectionProbeShadowDistance    = defaultReflectionProbeShadowDistance;
            reflectionProbeResolution        = defaultReflectionProbeResolution;
            lightProbesPerRow                = defaultLightProbesPerRow;
            lightProbeSpawnType              = defaultLightProbeSpawnType;
            lightProbeSpawnRadius            = defaultLightProbeSpawnRadius;
            seaLevel = defaultSeaLevel;
#if UNITY_2018_3_OR_NEWER && UNITY_EDITOR
            filterMode = defaultFilterMode;
#endif
        }
Example #2
0
        public void SaveCurrentToDefault()
        {
            deaultShowLightmapSettings           = showLightmapSettings;
            defaultRealtimeGlobalIllumination    = realtimeGlobalIllumination;
            defaultBakedGlobalIllumination       = bakedGlobalIllumination;
            defaultLightmappingMode              = lightmappingMode;
            defaultIndirectRelolution            = indirectRelolution;
            defaultLightmapResolution            = lightmapResolution;
            defaultLightmapPadding               = lightmapPadding;
            defaultUseHighResolutionLightmapSize = useHighResolutionLightmapSize;
            defaultCompressLightmaps             = compressLightmaps;
            defaultAmbientOcclusion              = ambientOcclusion;
            defaultMaxDistance                      = maxDistance;
            defaultIndirectContribution             = indirectContribution;
            defaultDirectContribution               = directContribution;
            defaultUseDirectionalMode               = useDirectionalMode;
            defaultLightIndirectIntensity           = lightIndirectIntensity;
            defaultLightBoostIntensity              = lightBoostIntensity;
            defaultFinalGather                      = finalGather;
            defaultFinalGatherRayCount              = finalGatherRayCount;
            defaultFinalGatherDenoising             = finalGatherDenoising;
            defaultAutoLightmapGeneration           = autoLightmapGeneration;
            defaultReflectionProbeName              = reflectionProbeName;
            defaultReflectionProbeSpawnType         = reflectionProbeSpawnType;
            defaultReflectionProbeMode              = reflectionProbeMode;
            defaultReflectionProbeRefresh           = reflectionProbeRefresh;
            defaultReflectionCubemapCompression     = reflectionCubemapCompression;
            defaultReflectionProbeTimeSlicingMode   = reflectionProbeTimeSlicingMode;
            defaultReflectionProbeScale             = reflectionProbeScale;
            defaultReflectionProbeOffset            = reflectionProbeOffset;
            defaultReflectionProbesPerRow           = reflectionProbesPerRow;
            defaultReflectionProbeClipPlaneDistance = reflectionProbeClipPlaneDistance;
            defaultReflectionProbeBlendDistance     = reflectionProbeBlendDistance;
            defaultReflectionprobeCullingMask       = reflectionprobeCullingMask;
            defaultReflectionProbeShadowDistance    = reflectionProbeShadowDistance;
            defaultReflectionProbeResolution        = reflectionProbeResolution;
            defaultLightProbesPerRow                = lightProbesPerRow;
            defaultLightProbeSpawnType              = lightProbeSpawnType;
            defaultLightProbeSpawnRadius            = lightProbeSpawnRadius;
            defaultSeaLevel = seaLevel;
#if UNITY_2018_3_OR_NEWER && UNITY_EDITOR
            defaultFilterMode = filterMode;
#endif
        }
Example #3
0
    public void Save()
    {
        if (_ambientEquatorColor != RenderSettings.ambientEquatorColor)
        {
            _ambientEquatorColor = RenderSettings.ambientEquatorColor;
        }
        if (_ambientGroundColor != RenderSettings.ambientGroundColor)
        {
            _ambientGroundColor = RenderSettings.ambientGroundColor;
        }
        if (_ambientIntensity != RenderSettings.ambientIntensity)
        {
            _ambientIntensity = RenderSettings.ambientIntensity;
        }
        if (_subtractiveShadowColor != RenderSettings.subtractiveShadowColor)
        {
            _subtractiveShadowColor = RenderSettings.subtractiveShadowColor;
        }
        if (_ambientProbe != RenderSettings.ambientProbe)
        {
            _ambientProbe = RenderSettings.ambientProbe;
        }
        if (_ambientMode != RenderSettings.ambientMode)
        {
            _ambientMode = RenderSettings.ambientMode;
        }
        if (_ambientSkyColor != RenderSettings.ambientSkyColor)
        {
            _ambientSkyColor = RenderSettings.ambientSkyColor;
        }

        if (_defaultReflectionMode != RenderSettings.defaultReflectionMode)
        {
            _defaultReflectionMode = RenderSettings.defaultReflectionMode;
        }
        if (_defaultReflectionResolution != RenderSettings.defaultReflectionResolution)
        {
            _defaultReflectionResolution = RenderSettings.defaultReflectionResolution;
        }
        if (_reflectionBounces != RenderSettings.reflectionBounces)
        {
            _reflectionBounces = RenderSettings.reflectionBounces;
        }
        if (_reflectionIntensity != RenderSettings.reflectionIntensity)
        {
            _reflectionIntensity = RenderSettings.reflectionIntensity;
        }
        if (_aoExponentDirect != LightmapEditorSettings.aoExponentDirect)
        {
            _aoExponentDirect = LightmapEditorSettings.aoExponentDirect;
        }
        if (_aoExponentIndirect != LightmapEditorSettings.aoExponentIndirect)
        {
            _aoExponentIndirect = LightmapEditorSettings.aoExponentIndirect;
        }
        if (_aoMaxDistance != LightmapEditorSettings.aoMaxDistance)
        {
            _aoMaxDistance = LightmapEditorSettings.aoMaxDistance;
        }
        if (_bakeResolution != LightmapEditorSettings.bakeResolution)
        {
            _bakeResolution = LightmapEditorSettings.bakeResolution;
        }
        if (_enableAmbientOcclusion != LightmapEditorSettings.enableAmbientOcclusion)
        {
            _enableAmbientOcclusion = LightmapEditorSettings.enableAmbientOcclusion;
        }
        if (_maxAtlasSize != LightmapEditorSettings.maxAtlasSize)
        {
            _maxAtlasSize = LightmapEditorSettings.maxAtlasSize;
        }
        if (_padding != LightmapEditorSettings.padding)
        {
            _padding = LightmapEditorSettings.padding;
        }
        if (_realtimeResolution != LightmapEditorSettings.realtimeResolution)
        {
            _realtimeResolution = LightmapEditorSettings.realtimeResolution;
        }
        if (_reflectionCubemapCompression != LightmapEditorSettings.reflectionCubemapCompression)
        {
            _reflectionCubemapCompression = LightmapEditorSettings.reflectionCubemapCompression;
        }
        if (_textureCompression != LightmapEditorSettings.textureCompression)
        {
            _textureCompression = LightmapEditorSettings.textureCompression;
        }

        if (_bakedGI != Lightmapping.bakedGI)
        {
            _bakedGI = Lightmapping.bakedGI;
        }
        if (_bounceBoost != Lightmapping.bounceBoost)
        {
            _bounceBoost = Lightmapping.bounceBoost;
        }
        if (_giWorkflowMode != Lightmapping.giWorkflowMode)
        {
            _giWorkflowMode = Lightmapping.giWorkflowMode;
        }
        if (_indirectOutputScale != Lightmapping.indirectOutputScale)
        {
            _indirectOutputScale = Lightmapping.indirectOutputScale;
        }
        if (_realtimeGI != Lightmapping.realtimeGI)
        {
            _realtimeGI = Lightmapping.realtimeGI;
        }
        if (_lightmapsMode != LightmapSettings.lightmapsMode)
        {
            _lightmapsMode = LightmapSettings.lightmapsMode;
        }
    }