diff --git a/Plugin.cs b/Plugin.cs index 58585e8..b4f303e 100644 --- a/Plugin.cs +++ b/Plugin.cs @@ -162,6 +162,7 @@ public static Map createMap(string name){ public static bool currentlyPlayingCustomMap = false; public static int lastCustomMapID = -1; public static bool allObjectsTextured = false; + public static bool globalPointFiltering = false; public static bool gameLoaded = false; public static bool addedGamemodeSupportedMaps = false; public static string customMapPath; @@ -218,8 +219,11 @@ public static void onSceneLoad(Scene scene, LoadSceneMode mode) { { string config = System.IO.File.ReadAllText(mapConfigPath); allObjectsTextured = false; + globalPointFiltering = false; if (config.Contains("allObjectsTextured")) allObjectsTextured = true; + if (config.Contains("globalPointFiltering")) + globalPointFiltering = true; string lightIntensity = tryGetValue(config, "lightingIntensity"); if (lightIntensity != null) { Light light = GameObject.Find("Directional Light").GetComponent(); @@ -395,7 +399,7 @@ public static void PostFix(MonoBehaviourPublicGaplfoGaTrorplTrRiBoUnique __insta public static bool defaultLoaderActions(GameObject go, Mesh msh) { MeshFilter mf = go.GetComponent(); MeshRenderer mr = go.GetComponent(); - if (go.name.Contains("pixel")) { + if (go.name.Contains("pixel") || globalPointFiltering) { mr.material.mainTexture.filterMode = FilterMode.Point; } if (go.name.Contains("spawnzone"))