Step 2. Install the Hive Axyl SDK
To install the Hive Axyl SDK, connect your Unity project to the Hive Axyl package registry and add the SDK runtime. The Hive Axyl SDK currently supports only the Unity engine.
1. Prepare for installation
Before you install the Hive Axyl SDK, check the Unity version, API compatibility level, and Scripting Backend settings.
- Unity version: Unity 6 (6000.0 LTS) or later
- Player Settings > Api Compatibility Level: .NET Standard 2.1
- Player Settings > Scripting Backend: IL2CPP recommended, Mono supported
In versions earlier than Unity 6 (6000.0 LTS), Hive Axyl packages do not appear in the Unity Package Manager list even if you register the registry.
If you develop on Windows or build Windows apps, also prepare the Windows runtime prerequisites.
Windows runtime prerequisites
On Windows, you must install the Microsoft Visual C++ 2015-2022 Redistributable (x64) on every PC that runs the app. This is because the native plugin that the SDK uses on Windows requires this runtime. Without the runtime, a DllNotFoundException saying that the HiveAxyl_Core native plugin could not be loaded occurs when you initialize the SDK.
- Install on: Every PC that runs the app, including development PCs
- Installer: aka.ms/vs/17/release/vc_redist.x64.exe
- Version requirement: The combined 2015-2022 package
Download the file above and install it on each PC that runs the app. It must be the combined 2015-2022 package. Because VCRUNTIME140_1.dll is included only in releases from 2019 onward, initialization fails even if an older redistributable package is already installed.
A native plugin is a component that is built as an operating system binary, not as Unity C# code, and included in the package. This runtime is not included in Windows by default, and Unity does not install it with the player either.
Even when a DllNotFoundException occurs, the package contains the plugin file correctly. What is missing is the runtime that this file depends on.
Note
For apps distributed through Steam, you can add this package to the redistributables list in the Steamworks app settings so that it is installed together with the app.
2. Connect the SDK to your Unity project
Configure your Unity project to download and reference the Hive Axyl packages as dependencies. When Unity Package Manager (UPM) registers the packages in the project, the common runtime and the script compilation environment are prepared together.
You install the Hive Axyl SDK only through a Scoped Registry. Other installation methods are not supported. A Scoped Registry is a way to register a specific package repository in UPM by specifying a package name prefix, and you declare it in Packages/manifest.json. For details, see Why only Scoped Registry is supported.
There are two ways to register the registry and install packages. Use only one of them. When you register in the Unity Editor, Unity writes to Packages/manifest.json for you, so both methods produce the same result.
- Method 1: Register the registry and install packages in the Unity Editor: Work in Project Settings and Package Manager in the Unity Editor
- Method 2: Register the registry and packages in Packages/manifest.json: Work in Packages/manifest.json, which you open in a text editor
Method 1: Register the registry and install packages in the Unity Editor
Register the registry from the Unity menu, and then install the SDK common package from the Package Manager list.
- In the Unity Editor, open Edit > Project Settings > Package Manager.
- Under Scoped Registries, select +.
-
Enter the following values.
- Name: Hive Axyl
- URL:
https://package.openupm.com - Scope(s):
com.com2usplatform.hiveaxyl
Name is the name displayed in the Unity Package Manager list, so enter any value you want. This document uses Hive Axyl. URL is the address of OpenUPM, a registry that distributes Unity packages publicly. When you specify
com.com2usplatform.hiveaxylin Scope(s), all Hive Axyl packages that start with this prefix are looked up in this registry. -
Select Apply.
- Open Window > Package Manager.
- In the left list, select My Registries > Hive Axyl. The list of Hive Axyl packages that the registered registry provides appears.
- Select
com.com2usplatform.hiveaxyl.core, the SDK common package, and then select Install.
Even if you skip step 7, com.com2usplatform.hiveaxyl.core is installed together when you install a feature module in the next step. However, follow step 7 as written, because it lets you check at this point that the registry is registered correctly.
If you already know the name of the package to install, you can install it directly without looking for it in the list. Select + > Install package by name… in the upper-left corner of Package Manager, and enter the package name.
Method 2: Register the registry and packages in Packages/manifest.json
Open Packages/manifest.json of your Unity project in a text editor, and register the Hive Axyl Scoped Registry and the SDK common package. When you specify com.com2usplatform.hiveaxyl in scopes, all Hive Axyl packages that start with this prefix are looked up in this registry.
Version rules
Hive Axyl packages are released together, with the same version applied to all packages in each release. The officially supported configuration is a combination in which all installed Hive Axyl packages are on the same release version, so when you add feature modules in the next step, also use the same version as com.com2usplatform.hiveaxyl.core.
Configurations that mix different versions of Hive Axyl packages are not supported, and their behavior is not guaranteed. The SDK does not check whether the package versions match at installation or initialization. Because UPM installs only one version per package, if you specify different versions, they are resolved to one of those versions, and you are not told which version was selected.
Additional registry required when you use Steam Add-ons
When you install the Steam login Add-on or the Steam payment Add-on, the Steamworks integration package com.com2usplatform.hiveaxyl.steamworks is installed together. This package requires, as a dependency, the external package com.rlabrecque.steamworks.net, which wraps the Steamworks SDK so that it can be called from C#. The Hive Axyl registry entry you registered earlier finds only packages that start with com.com2usplatform.hiveaxyl, which you specified in Scope(s), so you need a separate entry to find this external package.
Register one more registry by the same method you used earlier. If you used Method 1, repeat steps 1 through 4 of Method 1: Register the registry and install packages in the Unity Editor and enter the following values. If you used Method 2, add one more entry with the following values to the scopedRegistries array in Packages/manifest.json.
- Name: rlabrecque
- URL:
https://package.openupm.com - Scope(s):
com.rlabrecque
Apps that do not use Steam login or Steam payment do not need to register this registry.
Why only Scoped Registry is supported
With methods other than a Scoped Registry, native components are missing or dependencies between Hive Axyl packages are not resolved.
- The native components of the Hive Axyl SDK are included only in the distributed packages. Therefore, you cannot install the complete SDK by referencing the source repository directly with a Git URL.
- UPM resolves the dependencies between Hive Axyl packages for you. For example, even if you declare only the authentication package, UPM also downloads
com.com2usplatform.hiveaxyl.core, which that package requires, from the same registry.
3. Troubleshoot installation
If the package list is empty or installation fails, check the cause for each symptom below.
The Hive Axyl package list in the registry is empty
If the registry you registered appears under My Registries but the Hive Axyl package list is empty, check that your Unity version is Unity 6 (6000.0 LTS) or later and that the registry URL is accessible from your current network.
Registry URL connection error
If an error says that the connection to the registry URL failed, check that you entered the registry URL correctly and that the URL is accessible from your current network.
The Steamworks external package cannot be found
If an error says that the com.rlabrecque.steamworks.net package cannot be found, check that you registered a registry entry whose Scope(s) is com.rlabrecque, as described in Additional registry required when you use Steam Add-ons.
Add-on features do not work
If you installed an Add-on but its feature does not work, check that you also installed the feature module that the Add-on extends, as described in Modules to install together when you use Add-ons.
The same error repeats even after you fix the cause
If a failed result remains in Packages/packages-lock.json, the same error repeats even after you fix the cause. Delete this file and reopen Unity.
Next steps
To install the Hive Axyl SDK authentication module, see Install modules.