Possible to apply Ambient Occlusion in script? thanks in advance!

Hello, everyone!

I am currently developing a game based on LEGO elements, and it gives the opportunity to
build using the LEGO bricks. But our project director wants to apply Ambient Occlusion to the user built models, and I know you can make Ambient Occlusion maps in Blender and even in the Unity editor but is it possible to do it in a script without actually having to code a new light mapping system? Would I need to use the Blender’s(or any other artist tool’s) API (if one exists) to do so?

If you have Unity Pro, there is this post process shader for SSAO, you can give it a try. Just import “Image Effects” package that comes with Unity Pro.