Skip to content
This repository has been archived by the owner on Jun 19, 2021. It is now read-only.

Commit

Permalink
Fixed a UWP Build error
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenHodgson committed Mar 31, 2018
1 parent 618bbfc commit aee8e50
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
#if !UNITY_WSA || UNITY_EDITOR
using System.Diagnostics;
using System.Runtime.CompilerServices;
#endif

using System.Threading.Tasks;

public static class AwaitExtensions
{
#if !UNITY_WSA || UNITY_EDITOR
public static TaskAwaiter<int> GetAwaiter(this Process process)
{
var tcs = new TaskCompletionSource<int>();
process.EnableRaisingEvents = true;

process.Exited += (s, e) => tcs.TrySetResult(process.ExitCode);
process.Exited += (sender, args) => tcs.TrySetResult(process.ExitCode);

if (process.HasExited)
{
Expand All @@ -18,6 +22,7 @@ public static TaskAwaiter<int> GetAwaiter(this Process process)

return tcs.Task.GetAwaiter();
}
#endif

/// <summary>
/// Any time you call an async method from sync code, you can either use this wrapper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ GraphicsSettings:
- {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 16002, guid: 0000000000000000f000000000000000, type: 0}
m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}
Expand Down

0 comments on commit aee8e50

Please sign in to comment.