(Asking for advice) Automation of tasks on Unity

Hi,
I am looking for a way to automate several steps on Unity such as saving a .fbx, attaching script, assigning object to the script as public variables or drag and drop an object onto the scene. Basically the task I want to get done automatically is attaching two different model.fbx together by scripting.

I understand all of these tasks are very high-level and hard to be implemented, so I am not expecting an entire automation but wanted to bring it up as much as possible.

I have only found the automation tools like RockTomate or uTomate, which are for automating I/O tasks, or build job/ run job.

Also, if there is any third party asset that would work for Unity, no matter how much it costs, I would be happy to get any recommendations or advice.

Thank you.

Hi there, RockTomate dev here.

I am interested in your workflow.

If I understood correctly, you’d like to do the following:

  • Importing FBX file
  • Attaching script to a component
  • Set component values
  • Add game objects into the scene

Regards,

Elmar

1 Like

You can automate the entire lot, and it’s not as hard as you think.

look into the AssetPostProcessor and AssetDatabase and the PrefabUtility

https://docs.unity3d.com/ScriptReference/AssetDatabase.html
https://docs.unity3d.com/ScriptReference/PrefabUtility.html

1 Like