void testCombine(){
		MB3_MeshCombinerSingle mb = new MB3_MeshCombinerSingle();
		Debug.Log ("About to bake 1");
		mb.AddDeleteGameObjects(listOfObjsToCombineGood,null);
		mb.Apply();
		mb.UpdateGameObjects(listOfObjsToCombineGood);
		mb.Apply ();
		mb.AddDeleteGameObjects(null,listOfObjsToCombineGood);
		mb.Apply ();
		Debug.Log ("Did bake 1");
		Debug.Log ("About to bake 2");
		mb.AddDeleteGameObjects(listOfObjsToCombineBad,null);
		mb.Apply();
		Debug.Log ("Did bake 2");

		Debug.Log("Doing same with multi mesh combiner");
		MB3_MultiMeshCombiner mmb = new MB3_MultiMeshCombiner();
		Debug.Log ("About to bake 3");
		mmb.AddDeleteGameObjects(listOfObjsToCombineGood,null);
		mmb.Apply();
		mmb.UpdateGameObjects(listOfObjsToCombineGood);
		mmb.Apply ();
		mmb.AddDeleteGameObjects(null,listOfObjsToCombineGood);
		mmb.Apply ();
		Debug.Log ("Did bake 3");
		Debug.Log ("About to bake 4");
		mmb.AddDeleteGameObjects(listOfObjsToCombineBad,null);
		mmb.Apply();
		Debug.Log ("Did bake 4");
	}
Пример #2
0
    void testCombine()
    {
        MB3_MeshCombinerSingle mb = new MB3_MeshCombinerSingle();

        Debug.Log("About to bake 1");
        mb.AddDeleteGameObjects(listOfObjsToCombineGood, null);
        mb.Apply();
        mb.UpdateGameObjects(listOfObjsToCombineGood);
        mb.Apply();
        mb.AddDeleteGameObjects(null, listOfObjsToCombineGood);
        mb.Apply();
        Debug.Log("Did bake 1");
        Debug.Log("About to bake 2 should get error that one material doesn't match");
        mb.AddDeleteGameObjects(listOfObjsToCombineBad, null);
        mb.Apply();
        Debug.Log("Did bake 2");

        Debug.Log("Doing same with multi mesh combiner");
        MB3_MultiMeshCombiner mmb = new MB3_MultiMeshCombiner();

        Debug.Log("About to bake 3");
        mmb.AddDeleteGameObjects(listOfObjsToCombineGood, null);
        mmb.Apply();
        mmb.UpdateGameObjects(listOfObjsToCombineGood);
        mmb.Apply();
        mmb.AddDeleteGameObjects(null, listOfObjsToCombineGood);
        mmb.Apply();
        Debug.Log("Did bake 3");
        Debug.Log("About to bake 4  should get error that one material doesn't match");
        mmb.AddDeleteGameObjects(listOfObjsToCombineBad, null);
        mmb.Apply();
        Debug.Log("Did bake 4");
    }
Пример #3
0
    private void testCombine()
    {
        MB3_MeshCombinerSingle mb3_MeshCombinerSingle = new MB3_MeshCombinerSingle();

        Debug.Log("About to bake 1");
        mb3_MeshCombinerSingle.AddDeleteGameObjects(this.listOfObjsToCombineGood, null, true);
        mb3_MeshCombinerSingle.Apply();
        mb3_MeshCombinerSingle.UpdateGameObjects(this.listOfObjsToCombineGood, true, true, true, true, false, false, false, false, false, false);
        mb3_MeshCombinerSingle.Apply();
        mb3_MeshCombinerSingle.AddDeleteGameObjects(null, this.listOfObjsToCombineGood, true);
        mb3_MeshCombinerSingle.Apply();
        Debug.Log("Did bake 1");
        Debug.Log("About to bake 2");
        mb3_MeshCombinerSingle.AddDeleteGameObjects(this.listOfObjsToCombineBad, null, true);
        mb3_MeshCombinerSingle.Apply();
        Debug.Log("Did bake 2");
        Debug.Log("Doing same with multi mesh combiner");
        MB3_MultiMeshCombiner mb3_MultiMeshCombiner = new MB3_MultiMeshCombiner();

        Debug.Log("About to bake 3");
        mb3_MultiMeshCombiner.AddDeleteGameObjects(this.listOfObjsToCombineGood, null, true);
        mb3_MultiMeshCombiner.Apply();
        mb3_MultiMeshCombiner.UpdateGameObjects(this.listOfObjsToCombineGood, true, true, true, true, false, false, false, false, false, false);
        mb3_MultiMeshCombiner.Apply();
        mb3_MultiMeshCombiner.AddDeleteGameObjects(null, this.listOfObjsToCombineGood, true);
        mb3_MultiMeshCombiner.Apply();
        Debug.Log("Did bake 3");
        Debug.Log("About to bake 4");
        mb3_MultiMeshCombiner.AddDeleteGameObjects(this.listOfObjsToCombineBad, null, true);
        mb3_MultiMeshCombiner.Apply();
        Debug.Log("Did bake 4");
    }