skip to Main Content

For Unity, how do I serialize a Json string file path and load it into a ScriptableObject asset like sprites?

//Json-------------------------- [ { "name": "Generic Ability", "icon": "Assets/Database/Images/default.png" }, { "name": "Another Ability", "icon": "Assets/Database/Images/another.png" } ] //Ability-------------------------- [System.Serializable] public class Ability { public string abilityName; public Sprite icon; } //AbilityDatabase-------------------------- using UnityEngine; using System.Collections.Generic; [CreateAssetMenu(fileName = "AbilityDatabase", menuName =…

VIEW QUESTION

Json – BEGIN_ARRAY but was STRING at line 1 column 1 java android sketchware

OnResponse code : card_list = new Gson().fromJson(_response, new TypeToken>>(){}.getType()); if (card_list.size() > 5) { recyclerview1.setAdapter(new Recyclerview1Adapter(card_list)); }else{ SketchwareUtil.showMessage(getApplicationContext(), _response); } Json 200 Result like : { "user": [ { "id": "string", "address": "string", "contact": "string", "name": "string", "description": "string", "image_url":…

VIEW QUESTION
Back To Top
Search