예제 #1
0
    void CreateDataSource(string content)
    {
        if (DataSource != null)
        {
            Destroy(DataSource);
        }

        DataSource = gameObject.AddComponent <CSVDataSource>();
        DataSource.Load(content);

        DataSourceLoaded.Invoke(DataSource);
    }
    void CreateDataSource(string content)
    {
        if (DataSource != null)
        {
            Destroy(DataSource);
        }

        DataSource = gameObject.AddComponent <CSVDataSource>();
        DataSource.Load(content);

        CreateVisualization(DataSource);

        StartCoroutine(CreateTableCoroutine());
        //init bounding box if datasource loaded
        Boundingbox?.Init();
    }
예제 #3
0
        public void TestCSVDataSource_Positive()
        {
            var source = new CSVDataSource();

            source.Load();

            var expected = new List <string>()
            {
                "name,address_line1,address_line2",
                "Dave,Market Street,London",
                "John,Queen Street,York"
            };

            var actual = source.Data;

            CollectionAssert.AreEqual(expected, actual);
        }