Skip to content

Commit

Permalink
v2023.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenlucerne committed Jun 20, 2023
1 parent e239536 commit 15005b0
Show file tree
Hide file tree
Showing 47 changed files with 1,302 additions and 148 deletions.
Binary file modified Documentation/Full_Documentation.pdf
Binary file not shown.
4 changes: 3 additions & 1 deletion Editor/ModIO.EditorCode/EditorMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ internal static SettingsAsset GetConfigAsset()
public static void ClearStoredData()
{
// Only used for the editor
SystemIOWrapper.DeleteDirectory(EditorDataService.GlobalRootDirectory);
SystemIOWrapper.DeleteDirectory(EditorDataService.TempRootDirectory);
SystemIOWrapper.DeleteDirectory(EditorDataService.UserRootDirectory);
SystemIOWrapper.DeleteDirectory(EditorDataService.PersistentDataRootDirectory);
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion Editor/ModIO.EditorCode/SettingsAssetEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ public override void OnInspectorGUI()
// If the gameId has been changed, update the url
if(gameId.intValue != previousGameId)
{
if(myTarget.serverSettings.serverURL != "https://api.test.mod.io/v1")
if(myTarget.serverSettings.serverURL != "https://api.test.mod.io/v1"
&& myTarget.serverSettings.serverURL != "https://api-staging.moddemo.io/v1")
{
serverURL.stringValue = $"https://g-{gameId.intValue}.modapi.io/v1";
}
Expand Down
22 changes: 15 additions & 7 deletions Platform/Editor/ModIO.Implementation.Platform/EditorDataService.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#if UNITY_EDITOR || (MODIO_COMPILE_ALL && UNITY_EDITOR)

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using UnityEngine;
Expand All @@ -11,11 +12,18 @@ namespace ModIO.Implementation.Platform
/// <summary>Editor implementation of the data services.</summary>
internal class EditorDataService : IUserDataService, IPersistentDataService, ITempDataService
{
/// <summary>Root directory for all data services.</summary>
public readonly static string GlobalRootDirectory =
$@"{Application.persistentDataPath}/mod.io";
/// <summary>Root directory for persistent data.</summary>
public static readonly string PersistentDataRootDirectory =
$"{Application.persistentDataPath}/mod.io";

#region Data
/// <summary>Root directory for User Specific data.</summary>
public readonly static string UserRootDirectory =
$"{Application.persistentDataPath}/UserData/mod.io";

/// <summary>Root directory for Temporary data.</summary>
public readonly static string TempRootDirectory = Application.temporaryCachePath;

#region Data

/// <summary>Root directory for the data service.</summary>
string rootDir;
Expand All @@ -37,7 +45,7 @@ Result IUserDataService.Initialize(string userProfileIdentifier,
long gameId, BuildSettings settings)
{
rootDir =
$"{GlobalRootDirectory}/{gameId.ToString("00000")}/users/{userProfileIdentifier}";
$"{UserRootDirectory}/{gameId.ToString("00000")}/users/{userProfileIdentifier}";

Logger.Log(LogLevel.Verbose, "Initialized EditorUserDataService: " + rootDir);

Expand All @@ -49,7 +57,7 @@ Result IPersistentDataService.Initialize(long gameId,
BuildSettings settings)
{
rootDir =
$"{GlobalRootDirectory}/{gameId.ToString("00000")}/data";
$"{PersistentDataRootDirectory}/{gameId.ToString("00000")}/data";

Logger.Log(LogLevel.Verbose, "Initialized EditorPersistentDataService: " + rootDir);

Expand All @@ -60,7 +68,7 @@ Result IPersistentDataService.Initialize(long gameId,
Result ITempDataService.Initialize(long gameId, BuildSettings settings)
{
rootDir =
$"{GlobalRootDirectory}/{gameId.ToString("00000")}/temp";
$"{TempRootDirectory}/{gameId.ToString("00000")}/temp";

Logger.Log(LogLevel.Verbose, "Initialized EditorTempDataService: " + rootDir);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ internal partial class SettingsAsset : ScriptableObject
public BuildSettings iosConfiguration;

#if UNITY_IOS && !UNITY_EDITOR
private void Awake()
{
iosConfiguration.userPortal = UserPortal.Apple;
}

/// <summary>Gets the configuration for iOS.</summary>
public BuildSettings GetBuildSettings()
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<a href="https://mod.io"><img src="https://mod.io/images/branding/modio-logo-bluedark.svg" alt="mod.io" width="360" align="right"/></a>
# mod.io Unity Plugin v2023.5.12
# mod.io Unity Plugin v2023.6.1
[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](https://github.com/modio/modio-unity/blob/master/LICENSE)
[![Discord](https://img.shields.io/discord/389039439487434752.svg?label=Discord&logo=discord&color=7289DA&labelColor=2C2F33)](https://discord.mod.io)
[![Master docs](https://img.shields.io/badge/docs-master-green.svg)](https://go.mod.io/unity-docs)
Expand All @@ -12,16 +12,16 @@ Welcome to the mod.io Unity Engine plugin repository. It allows game developers

## Platform Support

|Platform | Support |
| ------------- | ------- |
|Windows | |
|Windows (GDK) | [Contact us](#game-studios-and-publishers) |
|XBox (GDK) | [Contact us](#game-studios-and-publishers) |
|PlayStation 4 | [Contact us](#game-studios-and-publishers) |
|PlayStation 5 | [Contact us](#game-studios-and-publishers) |
|Nintendo Switch| [Contact us](#game-studios-and-publishers) |
|Linux | |
|macOS | |
|Platform | Support |
| ------------- |------------------------------------------------|
|Windows | Yes |
|Windows (GDK) | Yes [Contact us](#game-studios-and-publishers) |
|XBox (GDK) | Yes [Contact us](#game-studios-and-publishers) |
|PlayStation 4 | Yes [Contact us](#game-studios-and-publishers) |
|PlayStation 5 | Yes [Contact us](#game-studios-and-publishers) |
|Nintendo Switch| Yes [Contact us](#game-studios-and-publishers) |
|Linux | Yes |
|macOS | Yes |

### Git Repository or .unitypackage
You can import the plugin directly from the [Unity Asset Store](https://assetstore.unity.com/packages/tools/integration/mod-browser-manager-by-mod-io-138866), or by downloading the package directly from the [Releases page](https://github.com/modio/modio-unity/releases). If you have any previous versions of the plugin installed, it is highly recommended to delete them before importing a newer version.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ protected async Task CompressStream(string entryName, Stream fileStream, ZipOutp

long max = fileStream.Length;
byte[] data = new byte[4096];
if (fileStream.CanSeek)
{
fileStream.Seek(0, SeekOrigin.Begin);
}
fileStream.Position = 0;
while(fileStream.Position < fileStream.Length)
{
// TODO @Jackson ensure ReadAsync and WriteAsync are
Expand Down
Loading

0 comments on commit 15005b0

Please sign in to comment.