Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Question: Material Instance is automatically attached to multiple objects. #11835

Closed
hwstojimaryuta opened this issue Sep 25, 2024 · 0 comments
Closed

Comments

@hwstojimaryuta
Copy link

Environment

UnityEditor version: 2022.3.42f1
Version of MRTK: 2.7.3.0

Problem

  • Material Instance is automatically attached to multiple objects.
  • Material Instance is attached again to an object to which Material Instance is already attached, and two Material Instances are attached to one object.
    In this state, the processing of Material Instance increased and the load on Unity increased.
    Currently, the load is temporarily reduced by deleting the Material Instance of objects that do not change material in scripts.

Questions

  1. Which operations cause automatic attachment of Material Instance?
     I have verified the possible parts in my environment, but could not reproduce the problem.
     The following are the assumed verification details.
      - Duplicate the object.
      - Change to a different material.
     Also, EnsureComponent() automatically creates a component when there is no MaterialInstance, so I checked the script I implemented, but it was not used.

  2. Tentatively, I am trying to reduce the load by deleting the Material Instance component of the object that does not change material in the script. If this is incorrect, I would like to know the correct way to handle this as well as the negative effects of not having Material Instance.

@microsoft microsoft locked and limited conversation to collaborators Nov 20, 2024
@AMollis AMollis converted this issue into discussion #11841 Nov 20, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant