We get the “Removing unnecessary CanvasRenderer component from text object” log from all over our project. Nearly every object that has a ‘Text Mesh Pro - Text’ component on it.
But there aren’t any CanvasRenderer components on these objects! So there’s nothing to remove. Nonetheless, these errors persist, and we can’t get rid of them.
As per the message, the CanvasRenderer was automatically removed from those objects / prefabs. However, until these objects / prefabs or scenes that contain them are re-saved, the message will keep showing up again.
Hi, and thanks for the prompt response! I’ve already read those threads. The difference in this situation is that there never were any CanvasRenderer components, in edit mode, after saving/loading… anything. We’ve never seen any component like that in all the years of the project.
So saving and loading does absolutely nothing in this case.
However, I think we’ve found the problem. Many of our components are TextMeshPro - Text components, under a Canvas component. Changing these components to TextMeshPro - Text (UI) fixes the problem.
In our case, this was causing fatal errors, because TMP was trying to destroy these components with DestroyImmediate, during a collision callback.
That is because the CanvasRenderer was hidden in the Scene hierarchy but it has always been present since it was automatically added by the Graphic class which all TMP text objects inherited from.
That’s… confusing. I guess something about the ‘TextMeshPro - Text’ component must be adding them back – because they’re sticking around even after save. :shrug:
In this case moving to UI components seem to work fine. Thanks for the help!
I just had this problem upgrading from 2019 LTS to 2021 LTS. After struggling here is my solution :
If you don’t see any “CanvasRenderer” to remove on your object (in its inspector), set the inspector in DEBUG mode (click on the 3 little dots up-right of the inspector), then you will see this hidden annoying CanvasRenderer which drove you crazy. Remove it.