Search Issue Tracker
Fixed in 2017.1.X
Votes
3
Found in
5.5.0f3
Issue ID
863274
Regression
No
External dll classes are not recognized if they inherit NetworkBehaviour
Reproduction steps:
1. Open project attached (NetworkBehaviourBug.zip)
2. Go to Assets and check TheEngine.dll.
Expected result: TheEngine class NetworkBehaviourTest will be recognized.
Actual result: TheEngine class NetworkBehaviourTest is not recognized.
Workaround:
Add UnityEngine.Networking.dll under TheEngine.dll and reimport TheEngine.dll.
Reproduced on: 5.3.7p3, 5.4.4f1, 5.5.0p3, 5.6.0b3.
Note: class inherits NetworkBehaviour. For best experience, users should not be forced to add UnityEngine.Networking.dll in order to get their scripts recognized.
Comments (2)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on JobQueue::HasJobGroupIDCompleted when closing the Editor while in Play mode on a specific project
- In "Preferences" section the “SpriteShape” menu item, the details page title “SpriteShape”, and “ControlPoint” entries are displayed as code strings rather than formatted UI strings
- Errors thrown constantly when Virtual Offset Debug is enabled and lighting was baked on AMD machine
- Persistent Memory Leak when reloading domain and using Distance-based Ghost Importance
- HDRP project doesn't render in standalone player when using High stripping
Benzor
May 11, 2017 18:48
To clarify, the workaround is to copy the UnityEngine.Networking.dll such that it's beside your custom TheEngine.dll in the project's folder structure. You can automate this with a post-build step from e.g. Visual Studio.
http://stackoverflow.com/questions/49972/in-what-order-are-locations-searched-to-load-referenced-dlls
deemen
Jan 24, 2017 15:17
I can confirm this issue occurs in 5.5.0p4. The suggested workaround does cause Unity to correctly recognize the NetworkBehaviours, however it's important that the UnityEngine.Networking.dll be correctly flagged as an editor-only DLL otherwise it will cause errors when building the player.
Also note that SyncVars will not work correctly since the UNetWeaver does not run on DLLs (see: https://forum.unity3d.com/threads/networkbehaviour-in-external-dll.368167/)