Jump to content

Proper way to get assets into resouces folder?


yfoo

Recommended Posts

With the new API introduced a few client versions back, the proper approach without downloading from the web would be:

In the local script project:
- Create a 'resources' package/folder in the root (not in a sub-package)
- Put resource files in this folder
- Get the resources using Script#getScriptResourceAsStream (provide relative path, eg. "resources/image.png")

On the SDN:
- Put the resources folder at the root level of your script directory

> ScriptName
--> src
----> scriptname.mainpackage
--> resources
----> image.png
----> font.ttf


 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...