Skip to content

muna-ai/muna-unity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Muna for Unity Engine

Muna logo

Run AI models anywhere.

Installing Muna

Add the following items to your Unity project's Packages/manifest.json:

{
  "scopedRegistries": [
    {
      "name": "Muna",
      "url": "https://registry.npmjs.com",
      "scopes": ["ai.muna"]
    }
  ],
  "dependencies": {
    "ai.muna.muna": "0.0.45"
  }
}

Retrieving your Access Key

Head over to muna.ai to create an account by logging in. Once you do, generate an access key:

generate access key

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

add access key to Unity

Caution

If your Unity project is open-source, make sure to add UserSettings/ to your .gitignore file to keep your Muna access key private.

Making a Prediction

First, create a Muna client:

using Muna;

// 💥 Create a Muna client
var muna = MunaUnity.Create();

Then make a prediction:

// 🔥 Make a prediction
var prediction = await muna.Predictions.Create(
    tag: "@fxn/greeting",
    inputs: new () { ["name"] = "Roberta" }
);

Finally, use the results

// 🚀 Use the results
Debug.Log(prediction.results[0]);

Requirements

  • Unity 2022.3+

Supported Platforms

  • Android API Level 24+
  • iOS 14+
  • macOS 13+ (Apple Silicon only)
  • Windows 10+ (ARM64 and x64)
  • WebGL:
    • Chrome 91+
    • Firefox 90+
    • Safari 16.4+

Useful Links

Thank you very much!

About

Run AI models in Unity Engine. https://muna.ai/explore

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •