Beispiel #1
0
        public static Mesh Load(string path)
        {
            if (!File.Exists(path))
            {
                return(null);
            }

            ParserBase parser = null;

            string extention = Path.GetExtension(path);

            switch (extention)
            {
            case ".obj":
                parser = new ObjParser();
                break;
            }

            if (!File.Exists(path))
            {
                Debug.LogError("Path does not exit: " + path);
            }
            Mesh mesh = parser.Parse(path);

            return(mesh);
        }
		public static Mesh Load (string path) {
			if (!File.Exists(path)) return null;

			ParserBase parser = null;

			string extention = Path.GetExtension(path);
			switch (extention) {
			case ".obj":
				parser = new ObjParser();
				break;
			}

			if (!File.Exists (path)) {
				Debug.LogError ("Path does not exit: " + path);
			}
			Mesh mesh = parser.Parse(path);

			return mesh;
		}