Skip to main content
Version: 1.2.0

Menus Available in SmoothMQTT

Gameobject

EntryDescriptionWhen to Use
Gameobject
↳ SmoothMQTT
  ↳ MqttManager With Broker
Instantiates the equally-named prefab into your current sceneRun everything MQTT from within Unity
Gameobject
↳ SmoothMQTT
  ↳ MqttManager Without Broker
Instantiates the equally-named prefab into your current sceneUse external Broker, e.g. smarthome, mosquitto or cloud provider
tip

If you are unsure about using an external broker, we suggest you use the first option. If you later on decide to use an external broker, you can simply deactivate the broker component.

Tools

EntryDescriptionWhen to Use
Tools
↳ SmoothMQTT
  ↳ Receive
path to the following menu entries (to declutter the table)...
↳ String payloadAdds a Subscriber component with random client ID to the selected Gameobject
  • Setting Text or TextMeshPro UI elements
  • Setting animation triggers by name
↳ Float payloadAdds a Subscriber component with random client ID to the selected Gameobject and adds a float UniversalConverter to interpret the payload as decimal number and pass it onto components using float values
  • light intensity or range
  • gravity scale on rigidbodies
  • sphere collider radius, nav mesh agent speed
  • ...
↳ Int payloadAdds a Subscriber component with random client ID to the selected Gameobject and adds a int UniversalConverter to interpret the payload as whole number and pass it onto components using int values
  • mainly for custom scripts
  • gameobject layer
↳ Bool payloadAdds a Subscriber component with random client ID to the selected Gameobject and adds a boolean UniversalConverter to interpret the payload as truth value and pass it onto components using bool values
  • enable/disable gameobjects and components
  • pretty much anything that shows as checkbox in inspector
↳ Color payloadAdds a Subscriber component with random client ID to the selected Gameobject and adds a Color UniversalConverter to interpret the payload as a color value and pass it onto components using colors
  • camera background color
  • sprite/UI tint
  • light color
↳ Vector3 payloadAdds a Subscriber component with random client ID to the selected Gameobject and adds a Vector3 UniversalConverter to interpret the payload as a vector and pass it onto components using vectors
  • position, rotation, scale, LookAt
  • nav mesh agent destination
  • collider size
↳ Quaternion payloadAdds a Subscriber component with random client ID to the selected Gameobject and adds a Quaternion UniversalConverter to interpret the payload as a rotation and pass it onto components using quaternions
  • rotation
  • rotation on directional light for daytime
------------------------
Tools
↳ SmoothMQTT
  ↳ Send
path to the following menu entries (to declutter the table)...
↳ String payloadAdds a Publish Value component to the selected Gameobject that can be called from any UnityEvent to send string, int, float, or bool values.Use buttons or unityevents to send arbitrary values to e.g. smart light bulbs or smart sockets.
↳ Color payloadAdds a Publish Color component to the selected Gameobject that can be called from any UnityEvent to send a hexadecimal representation of a color.Send color value to e.g. LEDs
↳ Vector3 payloadAdds a Publish Vector3 component to the selected Gameobject that can be called from any UnityEvent to send the string representation of a vector.Send vector3 value (mainly used to communicate with other SmoothMQTT components)
↳ Quaternion payloadAdds a Publish Quaternion component to the selected Gameobject that can be called from any UnityEvent to send the string representation of a quaternion.Send static rotation or send rotation of a transform (mainly used to communicate with other SmoothMQTT components)
↳ TMPInputFieldAdds a Publish From TMP Input Field component to the selected Gameobject that can be called from any UnityEvent to send the string representation of a quaternion.Send content of a TextMeshPro Input Field. This component's OnSendInputField function is supposed to be called from the On End Edit event on a TMPInputField
↳ React to UnityEventsAdds a Send On Event component to the selected Gameobject. This component sends a static payload to the defined topic upon gameobject event triggersThis is great for click or drag events on objects in the scene. Use-cases are: click a virtual button to switch on LEDs or motors. Hover over an object and show the tooltip on a 16x2 liquid crystal display.
↳ React to Trigger or CollisionAdds a Publish Trigger Collision component to the selected Gameobject. This component can send the description of a collision to a dynamically configurable topicSwitch on/off fans or heaters when player enters triggerzone (windy mountain top, scorchign desert). Also great for detecting object collisions and switching on alarm lights. We sincerely hope no horror game will ever use SmoothMQTT for flickering the room lights.

Assets

EntryDescriptionWhen to Use
Create
↳ SmoothMQTT
  ↳ Certificate
Creates a scriptable asset to hold information to a SSL certificate (e.g. path, password)When you want to encrypt communication between Unity and MQTT broker through mqtts://
Create
↳ SmoothMQTT
  ↳ User Credentials
This very simple object stores a user and password to be used by the local SmoothMQTT brokerWhen you require username and passwords from inbound connecting clients, create one of these assets per user/password pair