Getting Started
For those looking for a direct link to the L1 for Unity package, follow this link for the latest available release. For those new to the tools, do make sure to read below for guidance on getting started.
Prerequisites
Unity Editor
Development of the Unity SDK is intended to track with the latest LTS release of the Unity Editor. The SDK has been tested with the following versions of the Unity Editor:
- Recommended version: 2021.3 LTS
- Minimum version: 2019.3 LTS
Project Package Requirements
The SDK is dependent on two external packages, Newtonsoft.Json for Unity (for JSON serialization tasks during RPC API calls), and UniTask which enables the usage of async/await coding pattern during calls to the LAMINA1 network. Ensure that both of these packages are installed without errors before proceeding to install the SDK package.
Newtonsoft.Json for Unity
According to the github wiki for this package, it is now well maintained by Unity since version 3.0 of the package in the Unity package registry. However, installation instructions are still available at this link which may help if issues are encountered with earlier project versions.
UniTask
Cysharp provides detailed instructions to install UniTask via Git URL, OpenUPM and NuGet at the Github README here.
Receiving test tokens on the L1 SDK Subnet
The LAMINA1 SDK Subnet is a test network that is intended to be used for development and testing purposes. It is not intended to be used for production applications. The SDK Subnet is based on its own native 'SDK' token, which is separate from the primary network L1 test tokens. In order to retrieve a small amount of test tokens per day, you can access the SDK Subnet faucet at this link. You may use any existing wallet address to receive SDK tokens, but it is recommended to use a new address while working within the SDK subnet.
There will be more to come on both the SDK subnet as well as the subnet concept in general; in the meantime, here is a walkthrough of our first internal implementation of a simple 2D shooter game utilizing this subnet:
Local Development Node (optional)
It is possible to install and run a local LAMINA1 node for usage in development environments. Please see Running a LAMINA1 Node documentation for prerequisite information and installation instructions.
Getting and Importing the SDK
The LAMINA1 Unity SDK is currently made available via a release zip file via this link.
Future releases will be available via Github Releases when the public repo is enabled. Once unzipped, the contained unitypackage can be imported as usual, by either double-clicking the package while your project is open, or navigating to the Assets -> Import Package -> Custom Package menu option.
For future releases, the SDK is intended to be provided as a scoped registry within the Unity Package Manager. This will allow for easier updates, messaging to the development community and management of SDK dependencies within your project.
Common issues/Caveats
Unity "Safe Mode"
If there are errors during project compilation (related to the SDK or not), the editor may ask to enter Safe Mode. If this is the case, enter Safe Mode and review the compilation errors. You should resolve these issues on a case-by-case basis if they are related to other resources in your project.
Assembly Collisions
If your project already contains a version of the Newtonsoft.Json.dll
assembly, you may encounter an error similar to the following:
Assembly 'Assets/Plugins/Newtonsoft.Json.dll' will not be loaded due to errors:
...
This assembly is commonly used in Unity projects for interaction with external APIs and response JSON data. There will likely be two of these errors, pointing to the two conflicting assemblies in question.
What's Next?
Continue on to learn more about interacting with the LAMINA1 Network via the SDK.