Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Anyone uploading video to twitter?

Discussion in 'Scripting' started by dgoyette, Jun 18, 2019.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,193
    I've been considering adding some social media integration to my PC game. Specifically, players tend to die a lot in my game, at which point they ragdoll, and amusing things sometimes happen. I thought I'd allow players to share their amusing deaths on Twitter. I'm curious what approaches others have taken to this.

    The general approach sounds pretty simple: when the player dies, start recording, up until a certain maximum video length. But I'm wondering what specifics people are using. Unity has a "Unity Recording" package, which I've tried out briefly, and it seems decent. I don't know how it compares to other options, performance-wise. Performance would be the main concern.

    And then as far as Twitter sharing goes, I see some GitHub projects for this, but they seems a bit old and unmaintained now. I also don't see much on the asset store for this. Is anyone actually uploading video to Twitter within a Unity game? I'm not sure whether I can just use generic C# to use the Twitter API, or if I'll run into problems with the user's credentials. I'm assuming most people won't trust a game to manage their credentials, and that no one's going to type their Twitter credentials directly into my game. (Nor do I want them to.)

    I realize I haven't shown any code here, as I'm mainly looking for general approaches, and not specifics. I have some budget for this if there's a good asset for this, but I'm also fine with implementing things more from scratch if that's the best approach.