WuhuIslandTesting/Library/PackageCache/com.unity.services.core@1.6.0/Runtime/Configuration/StreamingAssetsConfigurationLoader.cs

17 lines
553 B
C#
Raw Normal View History

2025-01-07 02:06:59 +01:00
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace Unity.Services.Core.Configuration
{
class StreamingAssetsConfigurationLoader : IConfigurationLoader
{
public async Task<SerializableProjectConfiguration> GetConfigAsync()
{
var jsonConfig = await StreamingAssetsUtils.GetFileTextFromStreamingAssetsAsync(
ConfigurationUtils.ConfigFileName);
var config = JsonConvert.DeserializeObject<SerializableProjectConfiguration>(jsonConfig);
return config;
}
}
}