diff --git a/Winch/Util/AssetBundleUtil.cs b/Winch/Util/AssetBundleUtil.cs index 8a85c73a..8c88d065 100644 --- a/Winch/Util/AssetBundleUtil.cs +++ b/Winch/Util/AssetBundleUtil.cs @@ -29,7 +29,7 @@ public static Shader GetReplacementShader(string name) Shader replacementShader; if (cachedShaders.TryGetValue(name, out replacementShader)) return replacementShader; - replacementShader = Resources.FindObjectsOfTypeAll().Reverse().FirstOrDefault(shader => shader.name == name);// Shader.Find(name); + replacementShader = Resources.FindObjectsOfTypeAll().Where(shader => shader.isSupported).Reverse().FirstOrDefault(shader => shader.name == name);// Shader.Find(name); if (replacementShader != null) return replacementShader.CacheShader(); diff --git a/Winch/Util/PoiUtil.cs b/Winch/Util/PoiUtil.cs index acfa5a3b..9828e91b 100644 --- a/Winch/Util/PoiUtil.cs +++ b/Winch/Util/PoiUtil.cs @@ -60,7 +60,7 @@ public static CustomPOI GetModdedPOI(string id) internal static void PopulateHarvestablesAndHarvestParticlePrefabs() { - foreach (var harvestableParticle in Resources.FindObjectsOfTypeAll().Reverse()) + foreach (var harvestableParticle in Resources.FindObjectsOfTypeAll().Where(hp => !ModdedHarvestParticlePrefabs.Values.Contains(hp.gameObject)).Reverse()) { var prefab = harvestableParticle.gameObject; var name = prefab.name.RemoveClone();