complete python code to help unity unet migrate to mirror: replace the old UNet object reference with Mirror ones
- open
python/fix_UNet.py, - fix
unet_ref_filewith UNet_ref.txt file full path on your computer - fix
asset_folderwith your real unity project asset folder - run
python fix_UNet.pyunder command line
You will not run this file unless you find some UNet objects ref which list here are not completely cover yours. The following are UNet object guid refs found which exist in UNet_ref.txt:
- UnityEngine.Networking.NetworkManager
- UnityEngine.Networking.NetworkIdentity
- UnityEngine.Networking.NetworkLobbyManager
- UnityEngine.Networking.NetworkMigrationManager
- UnityEngine.Networking.NetworkStartPosition
- UnityEngine.Networking.NetworkDiscovery
- UnityEngine.Networking.NetworkAnimator
- UnityEngine.Networking.NetworkProximityChecker
- UnityEngine.Networking.NetworkLobbyPlayer
- UnityEngine.Networking.NetworkManagerHUD
- UnityEngine.Networking.NetworkTransformChild
- UnityEngine.Networking.NetworkTransform
- UnityEngine.Networking.NetworkBehaviour
- UnityEngine.Networking.NetworkTransformVisualizer
If you find those are not enough, you can add the missing ones into the unity scene, then run create_UNet_ref.py to get the whole list
This repo contains the complete source code or scripts used to migrate UNet to Mirror, to view other issued involved, you can check My blog.
In the blog, more details are covered, such as csharp code migrated and so on! And the whole precess works in real project, you can reference it.
Thanks a lots!