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

Commit 7cba7a0

Browse files
PierreGacPierre GAC
authored and
Pierre GAC
committed
Fixed method ReloadBaseTypes being called 2 times when entering play mode.
The same thing occurs with EditorUtilities.ReloadDecoratorTypes, but the fix cannot be applied in this context.
1 parent a5fe3f1 commit 7cba7a0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: PostProcessing/Runtime/PostProcessManager.cs

+5-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ public static PostProcessManager instance
5959
[UnityEditor.Callbacks.DidReloadScripts]
6060
static void OnEditorReload()
6161
{
62-
instance.ReloadBaseTypes();
62+
// ctor() will also call ReloadBaseTypes. This "dirty" test will avoid 2 calls of ReloadBaseTypes
63+
if (s_Instance == null)
64+
s_Instance = new PostProcessManager();
65+
else
66+
s_Instance.ReloadBaseTypes();
6367
}
6468
#endif
6569

0 commit comments

Comments
 (0)