Create GameObject during pre-build phase

Hello,

I want to create a unity project for rapid prototyping. With an external tool you can add objects which then will be exported as Json. (including art asset paths)
Before the build phase I would like to parse the Json, copy all art assets to the unity folders and create game objects with the filled data in those Json objects. After the build is done the app should contains all those game object which were create with external tool before.

Is this somehow possible?

Thank you for your help in advanced.

Hi zlSimon,

you could do this with uTomate. You would need to create custom action which parses your proprietary JSON format and creates the necessary game objects from it (that logic is of course not built into uTomate). Then you can use the Copy Files action to copy the assets and finally the Build Player action to build one or more players (e.g. for different target platforms) from your project. Finally you can combine these three actions into an Automation plan and invoke everything with a single click, or run it via a script from outside of Unity.

Hope this helps :slight_smile:

Kind regards,
Jan