Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BG - Cannot Set Material on an entity with multiple material slots #6440

Open
j-conrad opened this issue Jan 17, 2024 · 0 comments
Open

BG - Cannot Set Material on an entity with multiple material slots #6440

j-conrad opened this issue Jan 17, 2024 · 0 comments
Labels

Comments

@j-conrad
Copy link
Contributor

Description
If an entity has more than 1 material slot (materials assigned to different faces), trying to perform a Set Material operation fails with the following error:

set material: called on a non mesh

To Reproduce
Steps to reproduce the behavior:

  1. Open attached .blend
  2. Note the graph and setup of materials on the two plane objects
  3. Run in Hubs / click on the hexagon on the floor.
  4. Note the lefthand object changes while the righthand one throws an error.

Expected behavior
There needs to be a way to specify which material slot you want to affect (and perhaps an option for 'all') when using Set Material or Get Material.

Screenshots
This screenshot shows a graph that works on the lefthand object (because it has 1 material slot), whereas the righthand object throws an error due to having 2 material slots.

image

Looking at the ECS Debug reveals the problem. The object is split into two entities because of the material assignments.
image
It appears that the meshes are children of the parent entity which is apparently 'not a mesh'.

Hardware

  • Device: Desktop
  • OS: Windows
  • Browser: Chrome
@j-conrad j-conrad added bug P2 Address when able Behavior Graphs labels Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant