com.trilitech.tezos-unity-sdk

2.0.7 • Public • Published

Tezos Unity SDK

Tezos SDK for Unity

Intro Issues License

The Tezos Unity SDK invites developers to discover the future of Web3 gaming with a complete kit that empowers game developers with the ability to:

  • Connect to a Tezos wallet
  • Utilize data on the blockchain
  • Call smart contracts
  • True ownership of in-game assets

The Tezos SDK supports Desktop, Android, iOS, and browsers. Beyond allowing game developers to interact with the Tezos blockchain, this SDK is a helpful resource for developing any Tezos decentralized application (dApp).

Install from unitypackage file

You can install TezosUnitySdk via .unitypackage file. To load a package from a unitypackage file:

  • Go to Releases page and download the latest TezosUnitySdk.unitypackage.
  • Open your project in Unity Editor.
  • Double-click the TezosUnitySdk.unitypackage file to import it into the current project.

Install from a Git URL

You can install the UPM package via directly Git URL. To load a package from a Git URL:

  • Open Unity Package Manager window.
  • Click the add + button in the status bar.
  • The options for adding packages appear.
  • Select Add package from git URL from the add menu. A text box and an Add button appear.
  • Enter the https://github.com/trilitech/tezos-unity-sdk.git Git URL in the text box and click Add.
  • You may also install a specific package version by using the URL with the specified version.
    • https://github.com/trilitech/tezos-unity-sdk.git#X.Y.Z
    • Please note that the version X.Y.Z stated here is to be replaced with the version you would like to get.
    • You can find all the available releases here.
    • The latest available release version is Last Release

For more information about what protocols Unity supports, see Git URLs.

Install from NPM

  • Navigate to the Packages directory of your project.
  • Adjust the project manifest file manifest.json in a text editor.
  • Ensure https://registry.npmjs.org/ is part of scopedRegistries.
    • Ensure com.trilitech is part of scopes.
    • Add com.trilitech.tezos-unity-sdk to the dependencies, stating the latest version.

A minimal example ends up looking like this. Please note that the version X.Y.Z stated here is to be replaced with the latest released version, which is currently NPM Package.

{
  "scopedRegistries": [
    {
      "name": "npmjs",
      "url": "https://registry.npmjs.org/",
      "scopes": [
        "com.trilitech"
      ]
    }
  ],
  "dependencies": {
    "com.trilitech.tezos-unity-sdk": "X.Y.Z",
    ...
  }
}
  • Switch back to the Unity Editor and wait for it to finish importing the added package.

WebGL Support

  • Open Unity Editor.
  • Navigate to Packages and find the Tezos Unity SDK.
  • Go to WebGLFrontend/output and copy the StreamingAssets and WebGLTemplates folders.
  • Navigate to the Assets folder of your project and paste copied folders.
  • This action will create WebGL template folders for your project. Each template is a subfolder within the WebGLTemplates folder. Each template subfolder contains an index.html file along with any other resources the page needs, such as images or stylesheets. You can choose the appropriate template to use in the WebGL build in Project settings/Player/Web tab/Resolution and Presentation
  • By default, unfortunately, Web builds didn't support copy-and-paste operations. To handle them properly, install with double-clicking WebGLFrontend/output/WebGLCopyAndPaste.unitypackage, this action will create WebGLCopyAndPaste alongside with StreamingAssets and WebGLTemplates folders inside your project Assets directory.

Mobiles Support

If you are using SDK on mobile platforms (IOS or Android) you need to build your project with Disabled Managed Stripping Level, otherwise you may encounter assembly errors.

To do this:

  • Open Project settings.
  • Navigate to Player tab.
  • Chose platform-specific settings (Android or IOS).
  • Make sure that Managed Stripping Level is disabled. (It's in optimization section)

📝 Read the documentation.

Package Sidebar

Install

npm i com.trilitech.tezos-unity-sdk

Weekly Downloads

0

Version

2.0.7

License

MIT

Unpacked Size

62.8 MB

Total Files

688

Last publish

Collaborators

  • big-smike
  • m_kus