Quick Start Guide
Getting started with the MeshifAI Scripting API is simply and easy to use. Let's dive into using it below.
Basic Usage
Here's a simple example to generate a 3D model from a text description:
using UnityEngine;
using MeshifAI.Core;
public class QuickStartExample : MonoBehaviour
{
private void Start()
{
// Generate a model with a simple description
Meshifai.GenerateModel(
"A futuristic spaceship",
OnModelGenerated
);
}
private void OnModelGenerated(GameObject model)
{
// Position the model in your scene
model.transform.SetParent(transform);
model.transform.localPosition = Vector3.zero;
// That's it! Your AI-generated model is ready to use
Debug.Log("Model generated successfully!");
}
}Adding Error Handling
For more robust implementation, add error handling:
Showing Progress Updates
Keep your users informed with progress updates:
Accessing Model Metadata
Each generated model includes metadata about how it was created:
Now that you have a general understanding, you're ready to dive into the world of 3D Model generation. We look forward to see what you choose to build with it.
Last updated