-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fix unwanted file changes #1770
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you restart unity? |
I did not, I would try that |
Tried restarting unity and the problem persisted. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe you need to replace the fonts one by one through the game? |
…rse_of_mirra into fix-unwanted-file-changes
This PR is trying to solve two different issues, the fonts one is being handled here: Fix dynamic font assets changing version control, the materials/textures one will be investigated and tackled later on. |
Motivation
TextMeshPro dynamic font assets have a very annoying habit of saving their dynamically generated binary data in the same text file as their configuration data. This causes massive headaches for version control.
Renderer.sharedMaterial returns the actual instance(s) of the Material at renderer.sharedMaterials[0] that is on the object.
This can be modified, and it will affect every use of this Material in the Scene.
renderer.material, on the other hand, creates a copy of renderer.sharedMaterials[0]
So with this we are not overriding the material saved in the scene.
Summary of changes
How has this been tested?
Normal play the game, no changes of fonts and the danger zone should appear in the source control.
Checklist