From 4e1974fc9ffc4edfefe61f4527cea0bb5058fd09 Mon Sep 17 00:00:00 2001 From: Josh Tynjala Date: Tue, 14 Jun 2022 07:07:09 -0700 Subject: [PATCH] ManifestResources: if disable_preloader_assets is defined, keep the public API available Ensures that existing custom templates still work --- templates/haxe/ManifestResources.hx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/templates/haxe/ManifestResources.hx b/templates/haxe/ManifestResources.hx index a49c845f6..214de9ce0 100644 --- a/templates/haxe/ManifestResources.hx +++ b/templates/haxe/ManifestResources.hx @@ -1,7 +1,5 @@ -#if !disable_preloader_assets package; - import haxe.io.Bytes; import lime.utils.AssetBundle; import lime.utils.AssetLibrary; @@ -12,6 +10,18 @@ import lime.utils.Assets; import sys.FileSystem; #end +#if disable_preloader_assets +@:dox(hide) class ManifestResources { + public static var preloadLibraries:Array; + public static var preloadLibraryNames:Array; + public static var rootPath:String; + + public static function init (config:Dynamic):Void { + preloadLibraries = new Array (); + preloadLibraryNames = new Array (); + } +} +#else @:access(lime.utils.Assets)