unity-game-engineeveryplay

Unity 3D EveryPlay Check if video has been uploaded


How do I find out if a user uploads a video with EveryPlay?

if (Everyplay.SharedInstance.UploadDidComplete())
{
   ...

Is this correct?

#pragma strict
// JavaScript

function Start () {
Everyplay.SharedInstance.UploadDidComplete +=  UploadDidCompleteDelegate(int videoId);
}

function UploadDidComplete () {
// upload successful
}

Solution

  • Use C# instead.

    void Start() {
        Everyplay.SharedInstance.UploadDidComplete += UploadDidComplete;
    }
    
    void Destroy() {
        if(Everyplay.SharedInstance != null) {
            Everyplay.SharedInstance.UploadDidComplete -= UploadDidComplete;
        }
    }
    
    private void UploadDidComplete(int videoId) {
        // Upload did complete
    }