This Unity plugin makes it straightforward to integrate with the NEAR blockchain. The following functionality is supported:
- Wallet Sign In
- Get account details
- Contract method calls
Now supports Android, iOS and WebGL! Also 'works' in the Unity Editor but you must paste the deep link generated by your wallet login.
Build Setting -> Platform = WebGL
Player Settings -> Player -> Resolution and Presentation -> WebGL Template = NEARWS
Build
Both the more minimal near-api-js and the richer wallet-selector apis are supported. The NFTScene and ContractScene use the near-api-js api and the WSScene uses the wallet-selector api. The advantage of the wallet-selector api is that it gives a choice of multiple different wallets. 2 html templates are offered, NEARJS only supports the near-api-js but NEARWS supports both. If in doubt use NEARWS but NEARJS is more minimal and will be faster to load if you don't need the multiple wallet support.
https://docs.near.org/tools/near-api-js/quick-reference
See the LICENSE file for license rights and limitations (MIT).