diff --git a/Assets/Scripts/Behaviours/Loader.cs b/Assets/Scripts/Behaviours/Loader.cs index 4e8afa51..0738b677 100644 --- a/Assets/Scripts/Behaviours/Loader.cs +++ b/Assets/Scripts/Behaviours/Loader.cs @@ -223,6 +223,8 @@ namespace SanAndreasUnity.Behaviours private static void StepLoadConfig () { Config.Load (); + + TextureDictionary.DontLoadTextures = Config.Get("dontLoadTextures"); } private static IEnumerator StepSelectGTAPath () diff --git a/Assets/Scripts/Importing/Conversion/TextureDictionary.cs b/Assets/Scripts/Importing/Conversion/TextureDictionary.cs index e0940d77..c8e7c2e4 100644 --- a/Assets/Scripts/Importing/Conversion/TextureDictionary.cs +++ b/Assets/Scripts/Importing/Conversion/TextureDictionary.cs @@ -224,7 +224,7 @@ namespace SanAndreasUnity.Importing.Conversion private static readonly Utilities.AsyncLoader s_asyncLoader = new Utilities.AsyncLoader (StringComparer.InvariantCultureIgnoreCase); - private static bool DontLoadTextures => true; + public static bool DontLoadTextures { get; set; } = false; private static Texture2D s_dummyTexture; private static Texture2D DummyTexture { @@ -406,7 +406,7 @@ namespace SanAndreasUnity.Importing.Conversion { if (DontLoadTextures) return new LoadedTexture(DummyTexture, false); - + if (!_alpha.ContainsKey(name)) { return ParentName != null ? Parent.GetAlpha(name) : null; diff --git a/config.json b/config.json index 56761c04..1461ebe0 100644 --- a/config.json +++ b/config.json @@ -38,6 +38,8 @@ "${game_dir}/data/animgrp.dat", "${data_dir}/auxanimgrp.dat" ], - "weapons_path": "${game_dir}/data/weapon.dat" + "weapons_path": "${game_dir}/data/weapon.dat", + + "dontLoadTextures": false, } \ No newline at end of file