Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

read json from assets c#

using System.IO;
using Newtonsoft.Json; //import in csproj

string path = Application.streamingAssetsPath + "/Assets/ShipTypes.json";
string contents = File.ReadAllText(path);
ShipTypes shipTypes = JsonConvert.DeserializeObject<ShipTypes>(countriesData);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #read #json #assets
ADD COMMENT
Topic
Name
9+8 =