![Schaken-Mods](/assets/img/avatar_default.png)
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.
24 lines
782 B
C#
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);
|
|
}
|
|
}
|
|
}
|