Skip to content

Commit b4f759f

Browse files
authored
Merge pull request #14 from modio/v2048.1.0
Syncing v2048.1.0
2 parents ada341f + 42180c2 commit b4f759f

32 files changed

+298
-104
lines changed

.github/workflows/push-modio-docs.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

Experimental/modio-ui.unitypackage

3.34 MB
Binary file not shown.

Platform/Mobile/MobilePurchaseHelper.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#if UNITY_ANDROID || UNITY_IOS
2-
#if MODIO_IN_APP_PURCHASING
1+
#if (UNITY_IOS || UNITY_ANDROID) && MODIO_MOBILE_IAP
32
using System;
43
using System.Collections.Generic;
54
using System.Linq;
@@ -111,4 +110,3 @@ public static void QueuePurchase(Product product, Action completeValidation)
111110
}
112111
}
113112
#endif
114-
#endif

Platform/Mobile/MobilePurchasingExample.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#if (UNITY_IOS || UNITY_ANDROID)
2-
#if MODIO_IN_APP_PURCHASING
3-
1+
#if (UNITY_IOS || UNITY_ANDROID) && MODIO_MOBILE_IAP
42
using System;
53
using System.Collections.Generic;
64
using ModIO;
@@ -185,4 +183,3 @@ public void OnPurchaseFailed(Product product, PurchaseFailureDescription failure
185183
}
186184
}
187185
#endif
188-
#endif

Platform/Mobile/PurchaseData.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#if UNITY_IOS || UNITY_ANDROID
2-
#if MODIO_IN_APP_PURCHASING
3-
1+
#if (UNITY_IOS || UNITY_ANDROID) && MODIO_MOBILE_IAP
42
using System;
53
using UnityEngine.Purchasing;
64

@@ -16,4 +14,3 @@ public class PurchaseData
1614
}
1715
}
1816
#endif
19-
#endif

Platform/Steam/Facepunch/ModioPlatformFacepunch.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public static void SetAsPlatform()
1515
ActivePlatform = new ModioPlatformFacepunch();
1616
}
1717

18-
public async void PerformSso(TermsHash? displayedTerms, Action<bool> onComplete, string optionalThirdPartyEmailAddressUsedForAuthentication = null)
18+
public async void PerformSso(TermsHash? displayedTerms, Action<Result> onComplete, string optionalThirdPartyEmailAddressUsedForAuthentication = null)
1919
{
2020
#if UNITY_FACEPUNCH
2121

@@ -25,10 +25,7 @@ public async void PerformSso(TermsHash? displayedTerms, Action<bool> onComplete,
2525
ModIOUnity.AuthenticateUserViaSteam(base64Ticket,
2626
optionalThirdPartyEmailAddressUsedForAuthentication,
2727
displayedTerms,
28-
result =>
29-
{
30-
onComplete(result.Succeeded());
31-
});
28+
onComplete);
3229
#endif
3330
}
3431

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sidebar_position: 0
77
---
88

99
<a href="https://mod.io"><img src="https://mod.io/images/branding/modio-logo-bluewhite.svg" alt="mod.io" width="360" align="right"/></a>
10-
# mod.io Unity Plugin v2024.7.1
10+
# mod.io Unity Plugin v2024.8
1111
[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://github.com/modio/modio-unity/blob/master/LICENSE)
1212
[![Discord](https://img.shields.io/discord/389039439487434752.svg?label=Discord&logo=discord&color=7289DA&labelColor=2C2F33)](https://discord.mod.io)
1313
[![Master docs](https://img.shields.io/badge/docs-master-green.svg)](https://docs.mod.io/unity/)
@@ -26,10 +26,17 @@ mod.io enables game developers of all sizes to integrate user-generated content
2626
The mod.io Unity Engine plugin is the simplest and fastest way to integrate UGC into your Unity **2020.3+** game. It handles all of the common tasks, allowing game developers to quickly and easily implement a solution that enables players to access and discover user-generated content for their games.
2727

2828
A custom built [ready-made UI](#browser-ui) for mod discovery is included, along with installation and collection management, and a full-featured [C# interface](#getting-started) which connects to the [mod.io REST API](https://docs.mod.io).
29+
> [!WARNING]
30+
> The Browser UI is scheduled for deprecation, and may not receive updates.
31+
> This is to be replaced with the [Component UI / Template UI](#component-ui)
2932
3033
## Platform Support
3134
To access console platforms and documentation, see [Supporting Console Platforms](https://docs.mod.io/platforms/).
3235

36+
> [!WARNING]
37+
> To enable Mobile In-App Purchasing you need to define the `MODIO_MOBILE_IAP` in Project Settings > Player > Script Compilation > Scripting Define Symbols
38+
> This will also require the Unity.Purchasing package to be installed.
39+
3340
| Platform | Support |
3441
|-----------------|:-------:|
3542
| Windows ||
@@ -91,6 +98,9 @@ If you have any questions or need some help join our [Discord](https://discord.m
9198
The mod.io Unity Engine plugin comes with a prebuilt UI, a drop-in, instant solution for browsing and installing your game's mods.
9299

93100
If you want to skip implementing your own UI, head to the [Browser UI](#browser-ui) section for setup and usage instructions. However, we recommend following the guide below to better understand how the plugin works.
101+
> [!WARNING]
102+
> The Browser UI is scheduled for deprecation, and may not receive updates.
103+
> This is to be replaced with the [Component UI / Template UI](#component-ui)
94104
95105
## Getting Started
96106

@@ -1240,6 +1250,10 @@ namespace ModIO
12401250

12411251
## Browser UI
12421252

1253+
> [!WARNING]
1254+
> The Browser UI is scheduled for deprecation, and may not receive updates.
1255+
> This is to be replaced with the [Component UI / Template UI](#component-ui)
1256+
12431257
> [!IMPORTANT]
12441258
> The Browser UI relies on the *config file* that is configured during the [setup instructions](#setup) above. Ensure you have completed all of those steps before proceeding.
12451259
@@ -1261,6 +1275,13 @@ When a user authenticates, the Browser UI will localize mod.io's terms of use ba
12611275

12621276
To avoid the plugin conflicting with an existing solution, in the case of right-to-left languages you will need to apply your current implementation for mixed RTL and LTR text to the terms text-elements in the browser.
12631277

1278+
## Component UI
1279+
The Component UI is an experimental module that allows for a more easily integrated and customised Mod Browsing UI.
1280+
This can be accessed via the `modio-ui.unitypackage` provided in the plugin in the `experimental` folder.
1281+
A Readme is provided in the package.
1282+
> [!IMPORTANT]
1283+
> This will be replacing the functionality provided by the Browser UI, once the Browser UI is deprecated.
1284+
12641285
# Marketplace
12651286
The mod.io SDK supports full monetization features, allowing you to sell a per-game virtual currency to your players that they can use to purchase mods, with a share of the revenue split between creators and your studio. Every platform requires specific setup for monetization features to work, with regards to the virtual currency configuration and API calls.
12661287

Runtime/Classes/SearchFilter.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public class SearchFilter
2626
internal List<string> tags = new List<string>();
2727
internal List<long> users = new List<long>();
2828
internal bool showMatureContent = false;
29+
internal int platformStatus = 0; // 0 = null
2930

3031
[SerializeField] internal RevenueType revenueType = RevenueType.Free;
3132
[SerializeField] internal int stock = Mods_DontShowSoldOut;
@@ -216,6 +217,16 @@ public IReadOnlyList<long> GetUserIds()
216217
return users;
217218
}
218219

220+
/// <summary>
221+
/// Adds a specific platform status to the filter to show mods that are either pending
222+
/// or both pending and live. This is primarily to be used in QA of mods.
223+
/// </summary>
224+
/// <param name="status">Platform verified status to show mods of</param>
225+
public void AddPlatformStatus(SearchFilterPlatformStatus status)
226+
{
227+
platformStatus = Convert.ToInt32(status);
228+
}
229+
219230
/// <summary>
220231
/// You can use this method to check if a search filter is setup correctly before using it
221232
/// in a GetMods request.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
namespace ModIO
2+
{
3+
public enum SearchFilterPlatformStatus
4+
{
5+
PendingOnly = 1,
6+
LiveAndPending = 2,
7+
}
8+
9+
internal static class SearchFilterPlatformStatusExtension
10+
{
11+
public static string GetString(this SearchFilterPlatformStatus status) => status switch
12+
{
13+
SearchFilterPlatformStatus.PendingOnly => "pending_only",
14+
SearchFilterPlatformStatus.LiveAndPending => "live_and_pending",
15+
_ => string.Empty,
16+
};
17+
}
18+
}

Runtime/Enums/SearchFilterPlatformStatus.cs.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)