-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Protocol updater #55
base: master
Are you sure you want to change the base?
Protocol updater #55
Conversation
@@ -441,6 +453,8 @@ public static void SerializeAll() | |||
createJson: () => new JsonObject() | |||
{ | |||
{ ProtocolKeys.Version, protocolDataVersion }, | |||
{ ProtocolKeys.LastModifiedVersion, loadedProtocolSetVersion }, | |||
{ ProtocolKeys.LastCompatibleAppBuildNumber, PlayerSettings.iOS.buildNumber.ToString() }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PlayerSettings.iOD.buildNumber
only works in editor. See this thread: https://forum.unity.com/threads/get-build-number-from-a-script.641725/
To my knowledge, there's no straightforward way to get build number without manually serializing it out to a file. Perhaps using Application.version
would work here?
@@ -233,7 +233,7 @@ public static class Rest | |||
/// </param> | |||
/// <param name="abortToken">Cancellation token for the request.</param> | |||
[ItemCanBeNull] | |||
public static async Task<WebRequestResponse> GetRequestAsync( | |||
public static async Task<WebRequestResponseWithHandler> GetRequestAsync( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method writes the data directly to file so no handler is needed. Revert the return type back. I am using this in PolyRules and this change is breaking.
@@ -733,7 +733,7 @@ public static class Rest | |||
/// </param> | |||
/// <param name="abortToken">Optional cancellation token.</param> | |||
/// <returns>The finished unity web request. Can be NULL if operation cancelled or error occurs.</returns> | |||
private static async Task<WebRequestResponse> RunGetAsync( | |||
private static async Task<WebRequestResponseWithHandler> RunGetAsync( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert to WebRequestResponse
. This one is deceptive because of the naming. This method does take a file download handler so that the data is written directly to disc, which is memory-efficient for Unity compared to a standard download handler. However, this all happens and is disposed of after the request succeeds. With DownloadFileHandler
, you can't directly access the bytes, which results in access exceptions. Therefore, the return type does not require a handler to be associated with it.
No description provided.