From 84096b117c4ca90413afbcc98c04edd00feb65ed Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Mon, 12 Jun 2017 14:10:44 -0700 Subject: [PATCH] Add Assets.hasLibrary --- lime/utils/Assets.hx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lime/utils/Assets.hx b/lime/utils/Assets.hx index b490704f6..765312689 100644 --- a/lime/utils/Assets.hx +++ b/lime/utils/Assets.hx @@ -296,6 +296,19 @@ class Assets { } + public static function hasLibrary (name:String):Bool { + + if (name == null || name == "") { + + name = "default"; + + } + + return libraries.exists (name); + + } + + public static function isLocal (id:String, type:AssetType = null, useCache:Bool = true):Bool { #if (tools && !display)