Custom File Importer

Hi All,
I have a text based file format that I’ve been using. I’m able to create the geometry in Unity on run-time (when I click the PLAY button). But what I would like to do is import the geometry into the editor and be able to add attributes, shaders etc. to the geometry before the game is played.

  1. Can anybody point me in the direction how I would be able to lock in the geometry created from the script? (i.e. play the game once to instantiate the geometry, stop the game and continue to edit the geometry).

  2. or can anybody point me in the direction how I can create a custom geometry importer?

Thanks,

It should be the same as doing it at runtime. Just create a simple editor extension with an “import” button and use the same code as for creating you stuff at runtime (eg: Programatically instantiating GameObjects to the editor (not during gameplay) - Questions & Answers - Unity Discussions)

Awesome that worked!! Thanks!