r/UnityStock • • 9m ago

Discussion How do I call a 3D generation API from Unity at runtime?

1 Upvotes

I tried calling a 3D generation API from Unity at runtime and the first lesson was that the call is not instant. My attempt froze the game while it waited for a response, which is not something a player will tolerate. I moved the request to a background task, showed a loading state, and polled for the result instead of blocking the main thread. That change alone made the whole flow feel usable. The second lesson was about the model that came back. A generated mesh may look fine in a preview and still need work before it belongs in a scene. I check the triangle count, look for flipped faces and loose parts, and test the materials after import. Generation is only a starting point, and retopology, mesh repair, part splitting, and texturing may still be needed before the asset is game ready. I also think about failure cases. What happens if the API is slow, the job fails, or the player goes offline mid request. A fallback asset and a clear message keep the experience intact. Auth is another detail to get right, so I keep keys on the server side and never ship a secret inside a build if I can avoid it. I compared docs by reading how each provider handles async jobs, webhooks, and download links. Tripo Studio lists an API in its docs, so I read its job flow alongside the others before deciding. If your reference image includes a character, logo, or artwork you did not make, verify the rights before using the result in a shipped game. How are you handling long generation waits in Unity without freezing play?