Skip to main content

Luna Playground - Media Library

The Luna Media Library allows you to store assets in your own library for future use. This is ideal for commonly used items like button backgrounds, pointer GIFs, utility images and so on.

How to navigate to your Media Library#

Whilst viewing any of your playables inside of Luna Playground, navigate to a field that allows you to choose an asset (such as an image, audio file or video). This will open the Media Library view.

In order to setup a field that allows you to select an asset, you will need to make use of the LunaPlaygroundAssets attribute in your Unity project or JavaScript playable and then update your build in Playground.
images-small

How to upload to your Media Library#

The Media Library is split into 2 sections, one for uploading and one for selecting assets to use. Let's first look at the upload tab and what options are available within it.

To begin uploading simply drag an image, video or audio file into into the upload window. You can alternatively click within the upload window to open your file explorer and select a file that way. (Note: if when using the file explorer method your assets are not showing up, you may need to change the shown file types from 'Image Files' to 'All Files', this option is located just above the open & cancel buttons on windows)

images-medium

Once the file has been dragged/selected configurable options will appear to the right hand side of the preview, these will differ depending on the file type chosen.

Universal options#

  • Name: This will be what your asset will be labelled as in your library (it does not need to include the file extension)
    images-ml-options

Image Upload options#

  • Crop media: Changing these values will begin cropping the image (You can also crop by dragging the dotted outlines)
  • Max resolution: This sets the upper limit for image resolution
  • Image format: Choose between keeping the original format, JPEG (Medium Quality), PNG (Lossless), PNG (Lossless, Optimised) & PNG (Lossy, Optimised)
images-ml-options

Video Upload options#

  • Crop media: Changing these values will begin cropping the video dimensions (You can also crop by dragging the dotted outlines)
  • Max resolution: This sets the upper limit for video resolution
  • Trim media: Set the desired start and end point of the video
  • Audio, kbps: Set the audio bit rate in kilobits per second
  • Video, CRF: Set the constant rate factor
  • Video FPS: Set the frames per second value
  • Video format: Choose between keeping the original format, H.264 Mobile Ready & Convert to Animated PNG
images-ml-options

Audio Upload options#

  • Trim media: Set the desired start and end point of the video
  • Audio bitrate, kbps: Set the audio bit rate in kilobits per second







Using assets in your Media Library#

Within the 'Browse files' section you can navigate to and choose assets to use in your playables.

Assets you upload are automatically sorted into one of 4 folders based on their type: Audios, Images, Videos & Unsorted.

images-medium

Simply click on the asset you wish to use for the field you opened the library from, and then hit the 'Choose' button in the bottom right of the window.