Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AltronMaxX opened this issue Jan 18, 2023 · 2 comments
Open

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

AltronMaxX opened this issue Jan 18, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@AltronMaxX
Copy link
Contributor

What does polymod mean by "Assets"?
image

@EliteMasterEric EliteMasterEric changed the title Getting error while using polymod hscript [BUG] Unknown identifier Assets for argument 'assetHandler' Jan 19, 2023
@EliteMasterEric
Copy link
Collaborator

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
Copy link
Contributor Author

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

@EliteMasterEric EliteMasterEric added the bug Something isn't working label Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants