Skip to main content

All 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 ...
Vintertid's user avatar
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. ...
Матвей Тинин's user avatar
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: { ...
RobloxHero's user avatar
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\":[{\&...
天才小当家's user avatar
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. - "#...
swiftenjoyer's user avatar
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, ...
ShulkTNT2's user avatar
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 ...
des54321's user avatar
  • 141
-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, ...
Klausbdl's user avatar
-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"...
it's jayway's user avatar
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 ...
Jean Mahmoud 's user avatar
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": "...
Anonymous's user avatar
  • 447
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 ...
Will McVay's user avatar
-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 ...
Mrtnchps's user avatar
  • 185
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 ...
Bogdan's user avatar
  • 3
-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. ...
Alex Weber's user avatar

15 30 50 per page
1
2 3 4 5
40