Skip to content

Instantly share code, notes, and snippets.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Follow : MonoBehaviour {
[SerializeField]
private Transform follow = null;
private Vector3 originalLocalPosition;
@krzys-h
krzys-h / UnityWebRequestAwaiter.cs
Created July 20, 2018 22:47
[Unity] Use UnityWebRequest with async/await
public class UnityWebRequestAwaiter : INotifyCompletion
{
private UnityWebRequestAsyncOperation asyncOp;
private Action continuation;
public UnityWebRequestAwaiter(UnityWebRequestAsyncOperation asyncOp)
{
this.asyncOp = asyncOp;
asyncOp.completed += OnRequestCompleted;
}