曹衍涛
4 years ago
5 changed files with 51 additions and 0 deletions
Binary file not shown.
@ -0,0 +1,32 @@ |
|||||||
|
using Newtonsoft.Json; |
||||||
|
using System.Collections; |
||||||
|
using System.Collections.Generic; |
||||||
|
using System.IO; |
||||||
|
using UnityEngine; |
||||||
|
using UnityEngine.UI; |
||||||
|
|
||||||
|
public class LoadTitle : MonoBehaviour |
||||||
|
{ |
||||||
|
public Text text; |
||||||
|
// Start is called before the first frame update |
||||||
|
void Start() |
||||||
|
{ |
||||||
|
LoadTitlefunc(); |
||||||
|
} |
||||||
|
|
||||||
|
// Update is called once per frame |
||||||
|
void Update() |
||||||
|
{ |
||||||
|
|
||||||
|
} |
||||||
|
void LoadTitlefunc() |
||||||
|
{ |
||||||
|
string json = null; |
||||||
|
string path = Path.Combine(Application.streamingAssetsPath, "Title.json"); |
||||||
|
if (File.Exists(path)) |
||||||
|
{ |
||||||
|
json = File.ReadAllText(path); |
||||||
|
} |
||||||
|
text.text = JsonConvert.DeserializeObject<string>(json); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,11 @@ |
|||||||
|
fileFormatVersion: 2 |
||||||
|
guid: d64e4ca3b4bbfe646bf7890bd597e47b |
||||||
|
MonoImporter: |
||||||
|
externalObjects: {} |
||||||
|
serializedVersion: 2 |
||||||
|
defaultReferences: [] |
||||||
|
executionOrder: 0 |
||||||
|
icon: {instanceID: 0} |
||||||
|
userData: |
||||||
|
assetBundleName: |
||||||
|
assetBundleVariant: |
Loading…
Reference in new issue