Editor scripts to import custom formats?

Does Xenko have a way to import models in a custom format? In Unity3d, I use editor scripts to do it. Is there a way to do it in Xenko?

Yes, you just need to implement an IAssetImporter class. Check the AssetImporterBase class and maybe one of the implementation provided in the engine.

The only problem is that there is currently no straightforward way to create design-time objects such as an importer, so there are a few manual steps to do. You will need to add a design-time assembly (Windows class library) to your project. Xenko requires some special edits in the csproj file, have a look at the Windows executable csproj of your project, especially the Import and Target at the end.

Then you need a proper Module initializer for this assembly it it registers itself as an assembly containing types related to asset. Look for example how the Mathematics assembly is doing that.

I think that’s about all, however if you have any trouble to make this feel free to ask more here. We are planning to improve how to make design-time assemblies (for importers, but also custom assets, compilers, etc.) in 2016 when we will work on the Plugin System feature from our roadmap. This roadmap will be updated at the beginning of the year to let you see when we plan to do stuff.

Ok, thank you for helping.