Importing my own model formats

Hello, i was wondering if there is a way to build a script or something similar in unity for an additional format supporting.

I want to transfer all my work to this new engine and the formats are different (it’s a custom format for the game exclusively), and although i can convert it to fbx via 3ds max with a script i coded, i wonder if i can code the same script in unity, so that way i don’t have to convert tons of models and i can just do everything in an instant.

Thanks in advance.

You can hook into this: Unity - Scripting API: AssetPostprocessor.OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths, bool didDomainReload)

Using the “importedAssets” parameter you can find the file path(local to the project folder) of the file. Then check if it’s your custom file format. Next, open the file and you can parse it.

Here’s an example of parsing a .fbx file in Java(using a custom game engine, but easily transferable).