Code inspection: String based lookup of component type is inefficient
Using the string for the component type variants in methods like GetComponent results in additional overhead that should not be incurred when possible. Also, using string literal as a type name is unsafe, because the target class can be renamed, removed or typo could occurred inside string literal.
JetBrains Rider provides auto-completion for string literal, also supports refactoring and navigation from string literal.
This inspection will highlight using string literal inside GetComponent, AddComponent and CreateInstance and provide quick fix to convert string literal to type parameter.
24 March 2026