Firstborn/Library/PackageCache/com.unity.addressables@1.19.19/Runtime/ResourceManager/ResourceProviders/JSONAssetProvider.cs
Schaken-Mods 7502018d20 Adding Mod Support
There is an asset in the store I grabbed. the coding is WAY above my head, I got about half of it and integrated and adapted what I can to it. im going as far as I can with it and ill come back in a few month when I understand t better.
2023-05-13 22:01:48 -05:00

24 lines
782 B
C#

using System;
using System.ComponentModel;
namespace UnityEngine.ResourceManagement.ResourceProviders
{
/// <summary>
/// Converts JSON serialized text into the requested object.
/// </summary>
[DisplayName("JSON Asset Provider")]
public class JsonAssetProvider : TextDataProvider
{
/// <summary>
/// Converts raw text into requested object type via JSONUtility.FromJson.
/// </summary>
/// <param name="type">The object type the text is converted to.</param>
/// <param name="text">The text to convert.</param>
/// <returns>Returns the converted object.</returns>
public override object Convert(Type type, string text)
{
return JsonUtility.FromJson(text, type);
}
}
}