- Unity Version >= 2018.1
- Unity Version >= 2018.2 (TLS support)
- Create an Unity Project.
- Set API compatibility level to .Net 4.x ( in Edit > Project Settings > Player ).
- Import two packages, JsonNet.9.0.1 and M2MQTT, from packages folder.
- Create two Empty Gameobjects ( recommended to be named DA and SA ).
- Add
IoTTalkV2SA.cs
as a component to SA Gameobject. - Add
IoTTalkV2DAI.cs
as a component to DA Gameobject. - Assign SA GameObject to
SAobject
, which is public variable ofIoTTalkV2DAI
in DA Gameobject. - Press Play button to start program.
- TLS 1.2 support via .Net45 APIs (SslStream, HttpRequest, ...) in 2018.2 or newer version ( recommend to use LTS version ). For more information, please refer to the Unity official website.
- odf & idf:
public object <function_name>(params object[] args)
{
// do someting
// in odf function, args must be changed before use
// ex: float f = float.Parse(args[0].ToString());
// if no return value, return null
}