Get it on Google Play


Wm뮤 :: 유니티 csv 에셋

블로그 이미지
가끔 그림그리거나 3D모델링하거나
취미로 로봇만드는
퇴직한 전자과 게임프로그래머
2020.3.48f1 , 2022.3.6f1 주로 사용
모카쨩
@Ahzkwid

Recent Comment

Archive


2022. 4. 30. 11:46 Unity

 

 

 

https://assetstore.unity.com/packages/tools/integration/csv-serialize-135763

 

CSV Serialize | 기능 통합 | Unity Asset Store

Use the CSV Serialize from VisualWorks on your next project. Find this integration tool & more on the Unity Asset Store.

assetstore.unity.com

 

 

 

 

 

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Demo : MonoBehaviour
{

    public Test[] tests;
    [System.Serializable]
    public class Test
    {
        public int num = 0;
        public string name = "";
    }
        // Start is called before the first frame update
    void Start()
    {

        var csv = "num,name\n0,\"mom\"\r\n1,dad\n\"2\",\"me\"\n\"3\",\"한국어\"";
        tests = CSVSerializer.Deserialize<Test>(csv);
        var list = CSVSerializer.ParseCSV(csv);
        for (int x = 0; x < list.Count; x++)
        {
            for (int y = 0; y < list[x].Length; y++)
            {
                Debug.Log($"[{x}][{y}]{list[x][y]}");
            }
        }
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}

 

 

잘된다

'Unity' 카테고리의 다른 글

유니티 창위치 설정  (0) 2022.06.18
유니티 차트  (0) 2022.04.24
유니티 Log 확인 에셋  (0) 2022.04.23
posted by 모카쨩

  • total
  • today
  • yesterday

Recent Post

저사양 유저용 블로그 진입