-
Notifications
You must be signed in to change notification settings - Fork 1
FAQ
This FAQ answers common questions about using, configuring, and troubleshooting FlexComm.
Q: What is FlexComm?
A: FlexComm is a modular, protocol-agnostic communication framework for Unity. It enables seamless data exchange over MQTT, TCP, UDP, REST, WebSocket, and Serial using a unified FlexMessage structure.
Q: Where can I get FlexComm?
A: FlexComm is available on the Unity Asset Store. Custom licensing can be arranged by contacting Eagle Creative.
Q: Do I need to import FlexComm-Lab into my Unity project?
A: No. FlexComm-Lab provides standalone test servers (written in Python) and example tools that run outside Unity. Use it to simulate communication endpoints for testing.
Q: Is FlexComm suitable for commercial/industrial projects?
A: Yes. FlexComm is already used in research, robotics, XR, and industrial applications and was built with performance and modularity in mind.
Q: What does protocol-agnostic mean?
A: It means your application logic doesn’t need to change when switching between MQTT, TCP, UDP, REST, etc. The communication layer is abstracted behind the FlexClient and FlexMessage structure.
Q: Is FlexComm open source?
A: No, FlexComm is a commercial package available through the Unity Asset Store. However, FlexComm-Lab is a public companion repo with tools and extensions which is open source.
Q: Is FlexComm thread-safe?
A: FlexComm uses Unity's main thread for handler invocation and queues protocol callbacks accordingly. It is safe for Unity contexts!
Q: Which Unity version is required?
A: FlexComm works with Unity 2021.3 LTS and newer. For full compatibility, use a scripting backend that supports the required .NET APIs.
Q: What scripting backend should I use?
A: If you require Serial support, use .NET Framework. For other protocols, .NET Standard is sufficient.
Q: Can I switch protocols at runtime?
A: Yes. FlexClient allows you to swap out the underlying protocol connection while keeping your application logic unchanged.
Q: Can I run multiple FlexClients in a single scene?
A: Yes, FlexComm supports multiple FlexClients operating independently. Each should be configured individually and handler set.
Q: Does FlexComm support Unity Cloud Build?
A: FlexComm itself does not include platform-incompatible code, but protocols like Serial may fail if the build target does not support them. Use scripting defines to isolate features per platform.
Q: Does FlexComm require any additional Unity packages?
A: No external dependencies are required. Some protocol handlers optionally use plugins but these are included in the package.
Q: Does FlexComm support WebGL?
A: Yes, via WebSocket and REST. TCP/UDP are emulated through WebSocket fallbacks using NativeWebSocket.
Q: Is Serial supported on all platforms?
A: No. Serial is supported only on Desktop (via System.IO.Ports) and UWP (via Windows.Devices.SerialCommunication). It is not available under .NET Standard or on WebGL/mobile.
Q: Can I use REST as both a sender and receiver?
A: Yes. RESTClient supports GET for long-poll subscriptions and POST for message dispatching. Configure routes to match your server-side handlers.
Q: Can FlexComm connect to public brokers and APIs?
A: Yes. MQTT, REST, TCP/UDP and WebSocket protocols can be configured with remote endpoints and credentials.
Q: Can I send binary data or files?
A: Yes. Use the FlexFileTransferHandler or send raw byte[] in a FlexMessage. Chunking is handled automatically.
Q: Can I send large files with FlexComm?
A: Yes. FlexComm supports chunked file transfers with progress tracking. The maximum payload size depends on the protocol and platform.
Q: How can I test FlexComm without a live server?
A: Use FlexComm-Lab to simulate servers for TCP, UDP, REST, WebSocket, or Serial. It’s a great way to validate data flow and performance before deploying.
Q: Why am I not receiving messages?
A: Check that your FlexClient is connected, subscribed, and properly routed. Also verify that your target field in the FlexMessage matches the handler’s filter or logic.
Q: Can I log all incoming/outgoing messages?
A: Yes. Attach a FlexLogger handler to your FlexClient GameObject to log all traffic for debugging.
Q: Are there tools for inspecting file transfer or stream progress?
A: Yes. FlexFileTransferHandler includes progress callbacks and UnityEvents that can be used for UI display.
Q: Can I create my own protocol module?
A: Yes. Implement the ICommProtocol interface to define a custom protocol, and register it with your FlexClient.
Q: Can I define custom fields in FlexMessage?
A: Yes. Use the Metadata object to add any additional key-value pairs required for your application.
Q: How can I conditionally handle messages?
A: Use custom FlexHandlers and filter messages by target, payload content, or metadata fields.
Q: Can I create my own FlexHandlers?
A: Absolutely. FlexHandlers are MonoBehaviours that subscribe to FlexClient message events. You can write your own to implement game logic, visualization, or control logic.
Q: Can FlexComm work with Unity DOTS or ECS?
A: Currently, FlexComm is MonoBehaviour-based. Integration with DOTS would require a wrapper or adapter pattern.
Q: Can I use FlexComm in editor tools or custom inspectors?
A: Yes, you can. FlexClient and most protocol managers work in edit mode when needed, but some protocols may need play mode for full functionality.
This documentation is part of the official FlexComm Wiki.© 2025 Eagle Creative. All rights reserved.For more information, visit www.eagle-creative.com or reach out at info@eagle-creative.com.