Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        _terrainGen = GameObject.Find("terrain").GetComponent <TerrainGenerator> ();
        Renderer  rend = GetComponent <Renderer> ();
        Texture2D tex  = GenerateTexture();

        rend.material.mainTexture = (tex);
        if (!_makeTerrain)
        {
            return;
        }
        //GenerateTerrain1 (tex);
        _terrainGen.Begin(tex);
        //Debug.Log (GameObject.Find ("terrain").transform.childCount);
    }