ai.muna.muna
Version:
Run AI inference in Unity Engine.
79 lines (63 loc) • 1.84 kB
Markdown
# Muna for Unity Engine

Run AI inference in your Unity applications. In a few steps:
## Installing Muna
Add the following items to your Unity project's `Packages/manifest.json`:
```json
{
"scopedRegistries": [
{
"name": "Muna",
"url": "https://registry.npmjs.com",
"scopes": ["ai.muna"]
}
],
"dependencies": {
"ai.muna.muna": "0.0.48"
}
}
```
## Retrieving your Access Key
Head over to [muna.ai](https://muna.ai) to create an account by logging in. Once you do, generate an access key:

Then add it to your Unity project in `Project Settings > Muna`:

## Making a Prediction
First, create a Muna client:
```csharp
using Muna;
// 💥 Create a Muna client
var muna = MunaUnity.Create();
```
Then make a prediction:
```csharp
// 🔥 Make a prediction
var prediction = await muna.Predictions.Create(
tag: "@fxn/greeting",
inputs: new () { ["name"] = "Roberta" }
);
```
Then use the results:
```csharp
// 🚀 Use the results
Debug.Log(prediction.results[0]);
```
___
## Requirements
- Unity 2022.3+
## Supported Platforms
- Android API Level 24+
- iOS 14+
- macOS 12+ (Apple Silicon and Intel)
- Windows 10+ (64-bit only)
- WebGL:
- Chrome 91+
- Firefox 90+
- Safari 16.4+
## Useful Links
- [Discover predictors to use in your apps](https://muna.ai/explore).
- [Join our Discord community](https://muna.ai/community).
- [Check out our docs](https://docs.muna.ai).
- Learn more about us [on our blog](https://blog.muna.ai).
- Reach out to us at [hi@muna.ai](mailto:hi@muna.ai).
Thank you very much!