void GenerateObj() { Camera camera = projector.GetComponent <Camera>(); List <GameObject> activeGos = new List <GameObject>(); foreach (GameObject go in this.toProjectList) { if (go.activeSelf) { activeGos.Add(go); } } ObjExportUtils.Export(new List <Camera> { camera }, activeGos); }
void GenerateObj() { Debug.Log("Divide walls into smaller triangles"); Math3DUtils.MeshDivide(wallsQuads, 7); List <Camera> cameras = new List <Camera>(); foreach (GameObject go in projectors) { if (go.active) //to be able to disable some projection to debug { cameras.Add(go.GetComponent <Camera>()); } } String path = ObjExportUtils.Export(cameras, this.wallsQuads); Debug.Log("File created: " + path); }