Author Topic: Get Material Index Name  (Read 1123 times)


  • Playmaker Newbie
  • *
  • Posts: 4
    • View Profile
Get Material Index Name
« on: November 08, 2018, 05:12:39 PM »

Is there anyway to get the material index of mesh? For example if I have a player walking on an object that has multiple textures, I'd like to know what texture the player is currently on.


  • Administrator
  • Hero Member
  • *****
  • Posts: 15489
  • Official Playmaker Support
    • View Profile
Re: Get Material Index Name
« Reply #1 on: November 09, 2018, 02:26:40 AM »

 Ok, can you try the action GetRaycastHitInfoMaterial on the ecosystem, I just made it, let me know if it works for you.

- you need a meshCollider to raycast onto
- you need to reference a meshRenderer or a skinnedMeshRenderer.

If it doesn't work, can you send me a prefab of the object ( with mesh and material and meshcollider) you are trying to get material from?