MeshSyncServer
A component to sync meshes/models editing in DCC tools into Unity in real time.
This sync process is done via TCP/IP, allowing developers to use DCC tools in different machines, and
this connection can be configured in the server/port settings of
the MeshSync DCC Plugin
installed in the appropriate DCC tool.
Properties
Auto Start
Values Description On automatically start the server using the specified port. Off start/stop the server manually by clicking the Start/Stop button. Caveat: in a public network, other users will have access to MeshSync as well when the server is running. For example: they may view our Unity screen.
Asset Dir
The local folder of the component where synced assets will be created.Root Object
Designate a GameObject as the root for objects generated by the sync process.
If empty, the objects will be created in the root.
Instance Handling
We can specify how Unity will create the instances of a geometry node (or its equivalent) using one of the following values:
Values Description Instance Renderer Create a MeshSync specific render component that batches the draw calls of each instance type. This is good for instances that do not need individual GameObjects. The instances are attached to their parent and transform with it. Copies Create a GameObject for each instance. The processing load is greater than Instance Renderer but gives more control over each object. Prefabs Create a prefab of the instanced object and place prefab instances in the scene. The prefab is saved in the Asset Dir property of the MeshSyncServer. This option allows changes to instanced objects or addition of custom components to be applied to all instances. Some caveats about the Prefabs mode:
- Setting the mode to Prefabs will create a reference between each prefab and its corresponding original name in the DCC tool. Therefore, if the name in the DCC tool changes, then MeshSync will consider it as a new object and will create a new prefab.
- Changes in the source objects in the DCC tool will not be applied to the prefabs automatically.
To resync the prefabs, turn on Auto Sync in the DCC tool plugin and press the "Clear/resync prefabs" button in the inspector of MeshSyncServer.
DCC asset file
We can assign a DCC asset file inside the Unity project to launch a new instance of the applicable DCC tool and open the file.
Further, if MeshSyncDCCPlugins has been installed in the DCC tool, Auto-Sync in the plugin will also be automatically turned on.
The Run mode property specifies how to launch the DCC tool.
Values | Description |
---|---|
GUI | Run the DCC tool in normal window mode. |
Background | Run the DCC tool in headless mode without any window. |
Console | Runs the DCC tool with the console window only. |
Please refer to common properties for details on the other properties.
Tips
When there is a MeshSyncServer object in the scene in Unity, we can:
view Unity's Game view in the browser by typing MeshSyncServer's IP address and port in the URL box (the default is 127.0.0.1:8080).
send a message from a message form in the browser to Unity's console.
Caveats
Necessary MeshSync assets are automatically created in StreamingAssets/MeshSyncServerRoot. These files should be left as they are.
Although this package is designed to be used in the Editor, model syncing will still work in runtime as well, except for the animations.
For performance reasons, make sure that syncing is not executed in the final build, unless it is required.