Installation

This page shows how to install and import the NAREON AI NPC WEB3 SDK into your Unity project.


Unity Package Manager (UPM)

  1. Open Unity and go to Window > Package Manager

  2. Press the + button in the top-left corner

  3. Select "Add package from git URL..."

  4. Enter the repository link: https://github.com/nareon/NareonSDK.git

  5. Unity will download and install the package into Packages/com.nareon.ainpcweb3

Dependencies Installation

Ethereum Dependencies

  • Install Nethereum via one of these methods:

    • NuGetForUnity, or

    • Bundled .dll files in Plugins/ or Dependencies/

Solana Dependencies

  • Install Solnet via one of these methods:

    • NuGetForUnity, or

    • Bundled .dll files in Plugins/ or Dependencies/

Additional Dependencies

  • The package requires the following Unity packages:

    {
      "dependencies": {
        "com.unity.nuget.newtonsoft-json": "3.0.2",
        "com.unity.mathematics": "1.2.6"
      }
    }

Post-Installation Verification

  1. Check Console

    • Confirm there are no compile errors in the Unity Console

    • If you see references to Nethereum missing, ensure you installed it

    • If you see references to Solnet missing, ensure you installed it

  2. Verify Blockchain Support

    • Check NAREON/Blockchain/Ethereum directory exists

    • Check NAREON/Blockchain/Solana directory exists

    • Verify all required assemblies are loaded

  3. Test Network Connections

    • Use the included test scene: NAREON/Samples/NetworkTest

    • Verify connection to both networks

Configuration

Once installed, proceed to configure:

  1. Environment variables for network providers

  2. AI service API keys

  3. Token configurations for both chains

For detailed setup instructions, check out the Configuration guide!

Troubleshooting

Common Issues

  1. Missing Dependencies

    • Error: Nethereum namespace not found

      • Solution: Install Nethereum via NuGetForUnity

    • Error: Solnet namespace not found

      • Solution: Install Solnet via NuGetForUnity

  2. Assembly Reference Issues

    • Error: Cannot resolve reference 'System.Numerics'

      • Solution: Add reference in Assembly Definition file

    • Error: Missing assembly reference 'Microsoft.Bcl.AsyncInterfaces'

      • Solution: Install via NuGetForUnity

  3. Network Connection Issues

    • Error: Provider URL not configured

      • Solution: Set environment variables:

        # Ethereum
        export ETH_PROVIDER_URL="your_ethereum_provider"
        
        # Solana
        export SOL_PROVIDER_URL="your_solana_provider"

Package Structure

Packages/com.nareon.ainpcweb3/
├── Runtime/
│   ├── Blockchain/
│   │   ├── Ethereum/
│   │   └── Solana/
│   ├── AI/
│   └── Core/
├── Samples~/
│   ├── NetworkTest/
│   └── TokenExample/
└── package.json

System Requirements

  • Unity 2021.3 or later

  • .NET Standard 2.0 or later

  • Nethereum 4.14.0 or later

  • Solnet 6.1.0 or later

Last updated