-
Download the latest version of the
Sui Unity SDK 2023
filesui-unity-sdk.unitypackage
from releases of this repository:. -
Import Sui Unity SDK into your Unity project:
Navigation: Assets -> Import Package -> Custom Package
select the downloadedSui Unity SDK 2023
package. -
Set up the Unity scene to work with the Sui SDK.
You can do this by adding theSuiCanvas
prefab to your scene. This prefab contains a canvas and a script that initializes the Sui SDK. -
Involve class
SuiManager
fromSui Unity SDK 2023
to initialize Sui SDK and set up any necessary configurations in your script.
For a more detailed explanation, including sample code, please refer to the documentation provided by Sui in the SDK package or on their website.
-
Backend and frontend separation functionality
-
Data upload functionality
-
Data retrieval functionality
-
Event reporting
-
Custom UI component library
-
Make sure you have imported the SDK correctly and follow the usage instructions provided in the Sui documentation.
-
Before using the SDK, please read the documentation to ensure that you are familiar with all the features and requirements of the SDK.
-
Be careful that do not to leak sensitive data and consider checking and deleting all code or information that may contain sensitive data before publishing.
The code examples for using RPCs in Unity depend on which RPC library you choose to use. Here are two examples that may be helpful:
- Photon Unity Networking(PUN)
using Photon.Pun;
using UnityEngine;
public class SomeScript : MonoBehaviourPun
{
[PunRPC]
void SomeRPCFunction(string someParameter)
{
Debug.Log("Received RPC with parameter: " + someParameter);
}
void CallRPC()
{
photonView.RPC("SomeRPCFunction", RpcTarget.All, "someParameter");
}
}
In this example, we define an RPC function called SomeRPCFunction
and call it in the CallRPC
function. The function has a string parameter that will be passed to other clients when the function is called. When calling the RPC, we use the photonView.RPC
function and set the target to RpcTarget.All
(send the RPC to all clients).
using Mirror;
using UnityEngine;
public class SomeScript : NetworkBehaviour
{
[TargetRpc]
void RpcSomeFunction(NetworkConnection target, string someParameter)
{
Debug.Log("Received RPC with parameter: " + someParameter);
}
void CallRPC()
{
RpcSomeFunction(connectionToServer, "someParameter");
}
}
In this example, we define an RPC function called RpcSomeFunction
and call it in the CallRPC
function. The function has a string parameter that will be passed to the server when the function is called, and will be sent to the target client via the target
parameter. When calling the RPC, we use the RpcSomeFunction
function and set the target to the connection of the client we want to send the RPC to.
Please note that these examples are conceptual proof-of-concepts and should not be copy-pasted directly into your code. You should modify these examples to suit your specific needs in order to use RPCs correctly in your project.
Plans to access Wallet list:
- Suiet
- Mofa
- Morphis
- FoxWallet
- MartianWallet
- Splash Wallet
- SensuiWallet
- ethos
- WELLDONE Wallet
- Keystone
Some more wallet in perfect, some only browser version, undeveloped app version, need research to try to access.
- NFT Kiosk
- NFT - Coin swap
Update smart contract to match SUI v14.
Coming changes: Enhance the AMM Contract.