MultiConnectMultiConnectDocs Website home
MultiConnectSDK › Export to .NET

4. Export your prefabs from Unity

  1. In Unity's Project window, right-click your prefab.
  2. Choose MultiConnect > Export Prefab. To export every prefab in a folder, right-click the folder and choose MultiConnect > Export Prefabs from Folder.
  3. Find the file in Assets/Plugins/MultiConnectPlugin/MultiConnectExport. It is named after your prefab, such as Arena.mcprefab.

Export again whenever you change the prefab.

What is exported

In your prefab On the server
Object names and parents Kept
Position, rotation and scale Kept
Your scripts, when the server has a class with the same name and namespace Added
Public fields: numbers, bool, string, Vector3 Kept
Public fields: List<T>, arrays, and your own classes marked [McSerializationObject] Kept
Fields that are empty The server keeps its own default
Fields pointing at a GameObject, component or other Unity asset Not exported. Set them in code
Unity's own components: renderers, colliders, Rigidbody, Animator Skipped
Private fields, even with [SerializeField] Not exported

Other Unity types, such as Quaternion and Color, are not checked by MultiConnectSDK. Test them before relying on them, or store them as separate numbers.