SendMessageToSDK
Description
Send the message to sdk, the message can be a string or json. When this method is called the ReceivedMessage method on the SDK side will receive the sent message.
danger
Only support SDK 2.0.0-pre.12
Method
public void SendMessageToSDK(string _data)
Example
Received.cs
using SDKEntry.Runtime;
public void Start(){
NativePlugins.Plugin.NativeAPI.OnMessageReceviedHandle += _str=>{
Debug.Log(_str);
};
}
XRExperience.cs
using SDKEntry.Runtime;
internal static API ARMODAPI = new API(nameof(Examlpe));
private void OnLoad(){
ARMODAPI.SendMessageToSDK("Hi, This message from XR-Experience!");
}