コード例 #1
0
    void Start()
    {
        var obj = AssetDatabase.LoadAssetAtPath <GameObject>(string.Format("Assets/Data_oe/world/terrains/{0}.prefab", "TerrainRoot"));

        root = Instantiate(obj).GetComponent <TerrainRoot>();
        var config = AssetDatabase.LoadAssetAtPath <TerrainAssets>(string.Format("Assets/Data_oe/world/terrains/{0}.asset", "TerrainData"));

        root.Init(config, size);

        var pos = transform.position;

        root.MoveTo(pos.x, pos.z, dx, dz);
    }
コード例 #2
0
    void Update()
    {
        var pos = transform.position;

        root.MoveTo(pos.x, pos.z, dx, dz);
    }