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
- Tile Palette grid is moved after entering Play Mode
- Tile Palette Edit mode turns off in Play Mode
- The Editor crashes when Generating Font Atlas in the Font Asset Creator with “9999999999” padding and 256x256 Atlas Resolution
- [iOS] An “ArgumentNullException” error is thrown when GetIntroductoryPriceDictionary() method is called
- Font Import Settings documentation page is missing when the documentation button is pressed in the Inspector window
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/)