You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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.
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.
This discussion was converted from issue #11835 on November 20, 2024 18:00.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Environment
UnityEditor version: 2022.3.42f1
Version of MRTK: 2.7.3.0
Problem
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
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.
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.
Beta Was this translation helpful? Give feedback.
All reactions