public void Init() { UnityCppBindings.Init(32); MapGeneratorData data = new MapGeneratorData() { seed = Random.Range(0, 100), H = 10, I = 5, singleMapSize = 65, /*64+1,1 for same edge line*/ worldMapSize = 1, //only support 1 splatWidth = 65, splatCount = 2, height0 = 500, height1 = 300, height2 = 800, height3 = 240, flags = 0 }; _data = data; WorldMapBindings_InitilizeWorldMap(data, Application.dataPath + "/../Map"); WorldMapBindings_SetGenerateCallBack(OnMapGenerateSuccess); /* if ((data.flags & 0x3) == 1) * { * ThreadStart start = new ThreadStart(Runner); * workThread = new Thread(start); * workThread.Start(); * } * else if ((data.flags & 0x3) == 2) * WorldMapBindings_WorkThreadRunner();*/ // Debug.LogFormat("WorldMapBindings_WorkThreadRunner exit"); //Runner(); }
private static extern void WorldMapBindings_InitilizeWorldMap(MapGeneratorData data, string mapDir);