From b724bfdf9bd4b22b90229a213a37279f08769e6e Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Wed, 1 Nov 2017 11:25:40 -0700 Subject: [PATCH] Add 'bytes' as alias for asset type 'binary', warn if asset type is not recognized --- lime/project/ProjectXMLParser.hx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lime/project/ProjectXMLParser.hx b/lime/project/ProjectXMLParser.hx index dc9ae42e5..f5d31866f 100644 --- a/lime/project/ProjectXMLParser.hx +++ b/lime/project/ProjectXMLParser.hx @@ -531,7 +531,21 @@ class ProjectXMLParser extends HXProject { } else if (element.has.type) { - type = Reflect.field (AssetType, substitute (element.att.type).toUpperCase ()); + var typeName = substitute (element.att.type); + + if (Reflect.hasField (AssetType, typeName.toUpperCase ())) { + + type = Reflect.field (AssetType, typeName.toUpperCase ()); + + } else if (typeName == "bytes") { + + type = AssetType.BINARY; + + } else { + + LogHelper.warn ("Ignoring unknown asset type \"" + typeName + "\""); + + } }