// Use this for initialization
    void Start()
    {
        // Build a shared materials array to use for each of the meshes that we generate.
        sharedMaterials    = new Material[3];
        sharedMaterials[0] = grassMaterial;
        sharedMaterials[1] = sandMaterial;
        sharedMaterials[2] = waterMaterial;

        // Build local references to Arm annotation objects.
        GameController gameController = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameController>();

        terrainControllerChannel = gameController.terrainControllerChannel;
        armMap    = gameController.terrainCAM;
        armTracks = gameController.terrainTracks;
    }
Exemple #2
0
    void Start()
    {
        // Persist across scene changes
        DontDestroyOnLoad(this);

        // Configure Channels for Arm annotations.
        sceneChannel             = new Arm.Annotations.Channel("Scene");
        terrainControllerChannel = new Arm.Annotations.Channel("TerrainController");

        // Configure the Custom Activity Map for Terrain Job activity
        terrainCAM = new Arm.Annotations.CAM("Terrain Generation");

        terrainTracks = new Arm.Annotations.CAM.CAMTrack[16];
        for (int i = 0; i < 16; i++)
        {
            terrainTracks[i] = terrainCAM.createTrack("TerrainJob");
        }

        // Kick off the first scene.
        SceneManager.LoadScene(sceneList[currentScene]);
        Invoke("ChangeScene", sceneChangeTime);
    }