All Questions
592
questions
0
votes
1
answer
31
views
Read json dictionary with multiple sub keys into unity c# script
I am trying to get my data from a json file into unity with a c# script. The goal is to move all players at the same time based on positional data, which i already have. I need to group the ...
0
votes
0
answers
58
views
Why ToJson saves only {}? [duplicate]
Before this, I saved only one instance of the class in Json, and everything worked. Now when I try to save the whole array, nothing works for me. Please don't advise me to switch to some Newtonsoft. ...
0
votes
1
answer
35
views
AWS Cognito Auth JSON request isn't Deserializing with nested classes in Unity
My JSON request isn't Deserializing with my nested classes in Unity.
I have tried many things to figure this problem out. Can someone spot the issue?
Here is the JSON Login Request from AWS Cognito:
{
...
0
votes
1
answer
43
views
How can I get array from json in unity? [duplicate]
I get a json str in unity:
{"action":"result","code":"0","data":"{\"seg_id\":2,\"cn\":{\"st\":{\"rt\":[{\&...
1
vote
1
answer
48
views
Issue with deserializing JSON into Trie structure in Unity using Newtonsoft.Json
I have a 18MB JSON file called JsonFileAsset that is a nested dictionary representation of a Trie structure with the following characteristics:
- "@" represents the end of a string.
- "#...
1
vote
1
answer
64
views
Loading Multiple Objects as GameObjects from Json In Unity 3d
I am trying to implement a simple Save/Load System using JSON in my Unity Project, however have run into multiple Issues. Any help?
public void SaveToJson(string ObjectName, float trfx, float trfy, ...
3
votes
0
answers
86
views
Why is Unity JsonUtility not serializing custom class fields?
I've been trying to use Unity's JsonUtility class to save and load some data in a project that needs to be human-readable, and am having a very strange issue where I cannot get the Unity serializer to ...
-4
votes
1
answer
107
views
C# How to serialize and deserialize a Dictionary<string,List<string>>? [duplicate]
I am developing an app made in Unity and I have a ConfigSave class. Among other variables, it has a dictionary public Dictionary<string, List<string>> outfits = new Dictionary<string, ...
-2
votes
1
answer
135
views
Parse JSON into C# objects [duplicate]
I am trying to parse a JSON with the following structure in my Unity C# script:
{
"Location1": [
{
"text": "Hello!",
"action": "wave"...
1
vote
1
answer
105
views
How to read a JSON in Unity to make an Array of objects?
I am currently working on a Visual Novel project in Unity.
To make the story, I used this website : https://twinery.org/ to make the script and the behaviour of buttons. Made a js script to transform ...
0
votes
3
answers
464
views
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": "...
1
vote
0
answers
2k
views
Use System.Text.Json with Unity
I was having trouble finding a JSON serialization/deserialization solution that was compatible with the latest LTS version of Unity (2022.3.9f1), with the issue being that this was specifically needed ...
-1
votes
2
answers
131
views
JsonUtility in Unity not deserializing certain fields from JSON
I'm trying to deserialize a JSON string into a Unity struct using JsonUtility.FromJson(), but certain fields like description, name, thumbnailAddress, and imageAddress always come out as null. Other ...
0
votes
1
answer
169
views
Unity Newtonsoft.Json serializing int default value as string
When I'm serializing any class that have int field inside, when it's value is 0, it serializes it as string instead of int.
I have a class:
[Serializable]
public class ResourceData
{
public int ...
-1
votes
1
answer
47
views
Unity3d parsed Json file is printing Null values
My guess is, I am either having problems with my class structures or I am having problems with my json file itself. I've looked at plenty of examples of how to read the file, and I think that's okay. ...