Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Steamworks.net How to add paid features to my game?

Discussion in 'Editor & General Support' started by Airmouse, Dec 11, 2022.

  1. Airmouse

    Airmouse

    Joined:
    Jan 12, 2019
    Posts:
    106
    I am developing a Unity game and would like users to be able to play the game freely however I really would like some of the features to be behind a paywall to help support development while allowing users to purchasing access to the feature on Steam.

    I currently am using the Steamworks.net plugin for Steam Workshop integration but I was wondering if it's possible to use Steamworks.net to also lock features so users have a option to pay to unlock the feature?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,713
    Sounds like a question perfectly suited to the Steamworks forum.
     
  3. Airmouse

    Airmouse

    Joined:
    Jan 12, 2019
    Posts:
    106
    I've not used that forum, I have always asked Steamworks related questions here in the past and usually received a answer. I just searched hours looking for Unity Steamworks purchased features but found zero results pertaining to how developers can implement paywalls on features in Unity games. I kind of feel the Steamworks forums would be even less informative than Unity forums, so I am still interested to know how to paywall certain features, if Steamworks doesn't offer that service than how can I add paywalls to features in a Unity game in a more general way??
     
  4. AnimalMan

    AnimalMan

    Joined:
    Apr 1, 2018
    Posts:
    1,164
    Yes dlc is an option on steam. And very popular. But you are best to read the steam sdk documentation.
     
    Kurt-Dekker likes this.
  5. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,713
    Code (csharp):
    1. if (SteamworksPlayerHasPaidForFeature())
    2. {
    3.   PaidFeature.enabled = true;
    4. }
    5. else
    6. {
    7.   PaidFeature.enabled = false;
    8. }
    9.  
     
  6. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,194
    AnimalMan likes this.
  7. AnimalMan

    AnimalMan

    Joined:
    Apr 1, 2018
    Posts:
    1,164
    The game would basically check if a directory exists and if it contains the correct files, sub directories, or asset bundle then you would activate your bool for the game to load up and attempt to use this content. Many mobile games do not have this opportunity, and the content is always shipped in the one version. Making them subject to unlawful ownership.
     
  8. Airmouse

    Airmouse

    Joined:
    Jan 12, 2019
    Posts:
    106
    I was asking about paid features, not downloadable content. I need to be able to lock functionality of my game.