larsiusprime / polymod

Atomic modding framework for Haxe
MIT License
159 stars 60 forks source link

[BUG] Unknown identifier Assets for argument 'assetHandler' #151

Open AltronMaxX opened 1 year ago

AltronMaxX commented 1 year ago

What does polymod mean by "Assets"? image

EliteMasterEric commented 1 year ago

When loading a script, a class which extends HScriptable will call Assets.getText() to retrieve the data of the script file.

This means that the class needs to import an Assets class, for example lime.utils.Assets or openfl.utils.Assets. HScriptable doesn't add that import for you because we don't know what framework you're using.

If you're having this issue with a specific framework that isn't Lime/OpenFL/HaxeFlixel, let me know.

Leaving this open because this error is supposed to be more verbose (Class does not import an Assets class for Polymod to fetch scripts with!) but it's not for some reason.

AltronMaxX commented 1 year ago

Okay, so I did the right thing by importing openfl.utils.Assets.