# Learn if a mesh has the second UV channel

**URL:** <https://forum.babylonjs.com/t/learn-if-a-mesh-has-the-second-uv-channel/25010>\
**Category:** Questions\
**Created:** [November 4, 2021, 11:01pm UTC](https://forum.babylonjs.com/t/learn-if-a-mesh-has-the-second-uv-channel/25010 "2021-11-04T23:01:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![artteq](https://avatars.discourse-cdn.com/v4/letter/a/858c86/32.png) [@artteq](https://forum.babylonjs.com/u/artteq)\
**Post date:** [November 4, 2021, 11:01pm UTC](https://forum.babylonjs.com/t/learn-if-a-mesh-has-the-second-uv-channel/25010/1 "2021-11-04T23:01:01Z")

</div>

Hi guys,

sorry for a noob question. How can I learn if a mesh has the second UV channel? Is there a method inside Babylon to define if a mesh has the second UV channel or get a list of UV channels in a mesh?

Thank you

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [November 4, 2021, 11:05pm UTC](https://forum.babylonjs.com/t/learn-if-a-mesh-has-the-second-uv-channel/25010/2 "2021-11-04T23:05:41Z")

</div>

You can use `mesh.isVerticesDataPresent(VertexBuffer.UV2Kind)` to know if the mesh has this attribute data setup

---

<div class="post-metadata">

**Author:** ![artteq](https://avatars.discourse-cdn.com/v4/letter/a/858c86/32.png) [@artteq](https://forum.babylonjs.com/u/artteq)\
**Post date:** [November 4, 2021, 11:38pm UTC](https://forum.babylonjs.com/t/learn-if-a-mesh-has-the-second-uv-channel/25010/3 "2021-11-04T23:38:21Z")

</div>

Thank you for a quick answer, unfortunately this throws an error that VertexBuffer is not defined. The editor then added the following line automatically:

const { VertexBuffer } = require(“babylonjs”);

But then the console throws another error that require is not defined.

What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [November 5, 2021, 12:16am UTC](https://forum.babylonjs.com/t/learn-if-a-mesh-has-the-second-uv-channel/25010/4 "2021-11-05T00:16:16Z")

</div>

> [@sebavan](#):
>
> mesh.isVerticesDataPresent(VertexBuffer.UV2Kind)

so use mesh.isVerticesDataPresent(“uv2”)

---

<div class="post-metadata">

**Author:** ![Blake](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/blake/32/21509_2.png) [@Blake](https://forum.babylonjs.com/u/Blake)\
**Post date:** [November 5, 2021, 1:15am UTC](https://forum.babylonjs.com/t/learn-if-a-mesh-has-the-second-uv-channel/25010/5 "2021-11-05T01:15:26Z")

</div>

If you’re writing vanilla browser javascript, you should be able to use BABYLON.VertexBuffer.UV2Kind like on the playground. 🙂  
[https://playground.babylonjs.com/#7QQ3M5#2](https://playground.babylonjs.com/#7QQ3M5#2)

---

<div class="post-metadata">

**Author:** ![artteq](https://avatars.discourse-cdn.com/v4/letter/a/858c86/32.png) [@artteq](https://forum.babylonjs.com/u/artteq)\
**Post date:** [November 5, 2021, 3:32pm UTC](https://forum.babylonjs.com/t/learn-if-a-mesh-has-the-second-uv-channel/25010/6 "2021-11-05T15:32:35Z")

</div>

Yeah, thanks! That worked for me!
