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

The name of the cloned Material is not copied. #2339

Closed
jtabibito opened this issue Aug 19, 2024 · 0 comments · Fixed by #2576
Closed

The name of the cloned Material is not copied. #2339

jtabibito opened this issue Aug 19, 2024 · 0 comments · Fixed by #2576
Assignees
Labels
bug Something isn't working

Comments

@jtabibito
Copy link
Contributor

jtabibito commented Aug 19, 2024

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
`

var entity = scene.createRootEntity("Cylinder");
var mr = entity.addComponent(MeshRenderer);
mr.mesh = PrimitiveMesh.createCylinder(engine, 0.3, 0.3, 0.5);
var mat = new BlinnPhongMaterial(engine);
mat.baseColor = new Color(0.3, 0.7, 0);
mr.setMaterial(mat);
mat.name = 'BlinnPhong';
var mat1 = mat.clone();
if (mat1.name === 'BlinnPhong') {
  console.log("True");
} else {
  console.log(mat1.name);
}

`

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@GuoLei1990 GuoLei1990 self-assigned this Feb 8, 2025
@GuoLei1990 GuoLei1990 added the bug Something isn't working label Mar 3, 2025
@GuoLei1990 GuoLei1990 linked a pull request Mar 3, 2025 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants