-
Notifications
You must be signed in to change notification settings - Fork 3
6) Unity 4 Compatability
Nicholas Ventimiglia edited this page Jan 2, 2016
·
4 revisions
Unity 4 is missing two features used in the project. Here is how to fix them.
The lobby system requires a json serializer. You will need to include a json serializer and patch the code. Json serialization is used in two locations
void DoRPC() {
#if UNITY_4_7
UnityEngine.Debug.LogWarning("Please Add a JsonSerializer Here.");
#else
_lobby.SendLobbyRPC(new CustomRPC
{
Message = JsonUtility.ToJson(new CustomRPC { Message = "Hello" })
});
#endif
}
Init() {
#if UNITY_4_7
Debug.LogWarning("Please Add a JsonSerializer Here.");
#else
_toJson = JsonUtility.ToJson;
_fromJson = JsonUtility.FromJson;
#endif
}
The Unity 5 project include a helper to include XCode dependencies. In Unity 4, you will need to add them manually.
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>realtime.co</key>
<dict>
<!--Include to allow subdomains-->
<key>NSIncludesSubdomains</key>
<true/>
<!--Include to allow HTTP requests-->
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
-ObjC
Security.framework
libicucore.tbd