Skip to content

Commit

Permalink
fix(Utility): limit pipeline material applier to unity 2020 or above
Browse files Browse the repository at this point in the history
The mechanism within the ScenePipelineMaterialApplier uses the
`FindObjectsOfType` method that in Unity 2019.2 had the additional
parameter of `findInactive` added, which is required for this
functionality to work.

However, in Unity 2019.4 this parameter is randomly removed, probably
due to poor quality control from Unity, so this means that this
functionality works in 2019.2, 2019.3 but throws an error in 2019.4.

The feature is reintroduced in 2020.1, so the fix is just to support
this functionality in 2020.1 as Unity won't back port a fix.
  • Loading branch information
thestonefox committed Apr 15, 2023
1 parent c744ebe commit c0a0466
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Editor/Utility/ScenePipelineMaterialApplier.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
namespace Zinnia.Utility
{
#if UNITY_2019_2_OR_NEWER
#if UNITY_2020_1_OR_NEWER
using UnityEditor;
#endif
using UnityEngine;

public class ScenePipelineMaterialApplier : ScriptableObject
{
#if UNITY_2019_2_OR_NEWER
#if UNITY_2020_1_OR_NEWER
[MenuItem("Window/Zinnia/Apply Pipeline Materials", false, 51)]
private static void AddSpatialTargetsDispatcher()
{
Expand Down

0 comments on commit c0a0466

Please sign in to comment.