How can I make own file importer?

I am going to make simple RAGNAROK game on PC.
I have read “EDITOR API Beta released”.
Can I import SPR/ACT file(Ragnarok sprite files) to pc using above api?

Hi @Fan_Flex,

I have been able in the past to import both text and binary custom file types in the PlayCanvas editor. I think that may still work, and also allowed by the server/database (@yaustar/@vaios).

For text in any case you can upload standard TXT files, that is a valid asset type.

What type of files are Ragnarok sprites?

This is some older example code on how to create an asset using the private editor API. You should study the public API and refactor it to work with the public Assets/Asset objects.

    const extension = 'blob';
    const params = {
      name: filename,
      type: type,
      preload: true,
      tags: tags,
      filename: filename + '.' + extension,
      file: new Blob([data], { type: 'application/octet-stream'}),
    };'assets:create', params, (err, assetId) => {
1 Like