Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.CollectionsGeneric;
- using UnityEngine;
- using UnityEngine.VI;
- using System.IO;
- using System.Linq;
- public class InfoLookUp : MonoBehaviour
- {
- string Path;
- string [] Items;
- string [] Results;
- public void GetItemList(list,id)
- {
- if (list == "Planets")
- {
- string Path = Application.StreamingAssetsPath + "/list/Planets.txt";
- }
- else if (list == "Treaties")
- {
- string Path = Application.StreamingAssetsPath + "/list/Treaties.txt";
- }
- else if (list == "Org_Groups")
- {
- string Path = Application.StreamingAssetsPath + "/list/Org_Groups.txt";
- }
- else if (list == "Loc_Groups")
- {
- string Path = Application.StreamingAssetsPath + "/list/Loc_Groups.txt";
- }
- else if (list == "People")
- {
- string Path = Application.StreamingAssetsPath + "/list/People.txt";
- }
- Items = File.ReadAllLines(Path);
- foreach( string line in Items){
- if (string.sub(line,1,1) == "{"}){
- void DataSheet = {line};
- if (DataSheet[1] == id){
- return DataSheet;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement