Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit 3fc16cd

Browse files
authored
Merge pull request #200 from Unity-Technologies/fix-192
Added the enable toggle back on Fog for custom Fog effects
2 parents 62306ce + 2a0a172 commit 3fc16cd

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

PostProcessing/Editor/Models/FogModelEditor.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace UnityEditor.PostProcessing
44
{
55
using Settings = FogModel.Settings;
66

7-
[PostProcessingModelEditor(typeof(FogModel), alwaysEnabled: true)]
7+
[PostProcessingModelEditor(typeof(FogModel))]
88
public class FogModelEditor : PostProcessingModelEditor
99
{
1010
SerializedProperty m_ExcludeSkybox;
@@ -16,8 +16,8 @@ public override void OnEnable()
1616

1717
public override void OnInspectorGUI()
1818
{
19-
EditorGUILayout.HelpBox("This effect adds fog compatibility to the deferred rendering path; actual fog settings should be set in the Lighting panel.", MessageType.Info);
20-
EditorGUILayout.PropertyField(m_ExcludeSkybox, EditorGUIHelper.GetContent("Exclude Skybox (deferred only)"));
19+
EditorGUILayout.HelpBox("This effect adds fog compatibility to the deferred rendering path; enabling it with the forward rendering path won't have any effect. Actual fog settings should be set in the Lighting panel.", MessageType.Info);
20+
EditorGUILayout.PropertyField(m_ExcludeSkybox);
2121
EditorGUI.indentLevel--;
2222
}
2323
}

PostProcessing/Editor/PostProcessingFactory.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ internal static PostProcessingProfile CreatePostProcessingProfileAtPath(string p
1818
{
1919
var profile = ScriptableObject.CreateInstance<PostProcessingProfile>();
2020
profile.name = Path.GetFileName(path);
21+
profile.fog.enabled = true;
2122
AssetDatabase.CreateAsset(profile, path);
2223
return profile;
2324
}

0 commit comments

Comments
 (0)