Unity: Load Image/Sprite on JSON

前端 未结 3 842
孤城傲影
孤城傲影 2021-01-28 12:57

I want to load sprite on json but how ? Text are showing but not the images.

This is the JSON code to load my text data.

 private void myLoadGameData() /         


        
3条回答
  •  盖世英雄少女心
    2021-01-28 13:02

    To be a valid JSON, your text file content should be inside brackets, like this:

    { "questionImage":"Assets/ImagesQuiz/NoentryPlate.png" }
    

    Please check JSON format documentation here.

提交回复
热议问题