Search Issue Tracker
Won't Fix
Votes
0
Found in
2017.4.5f1
Issue ID
1046309
Regression
No
Script Updater does not update "renderer" to "GetComponent<Renderer>()"
Steps to reproduce:
1. Open either: example project from https://docs.unity3d.com/Manual/SparseTextures.html or QA-supplied project
2. Press Upgrade once prompted by the Script Updater
3. Once in the project, inspect the Console window and the script "MapTexture.cs"
Expected: No errors are thrown and all the lines are upgraded correctly
Actual: Unity throws some errors and inside the script 'renderer' is not changed to GetComponent<Renderer>()
Reproduced in: 2017.1.4f1, 2017.2.3p1, 2017.3.2f1, 2017.4.5f1, 2018.1.4.f1, 2018.2.0b7
Errors:
Assets/MapTexture.cs(94,12): error CS1061: Type `UnityEngine.Component' does not contain a definition for `sharedMaterial' and no extension method `sharedMaterial' of type `UnityEngine.Component' could be found. Are you missing an assembly reference?
Assets/MapTexture.cs(108,21): error CS1061: Type `UnityEngine.Component' does not contain a definition for `bounds' and no extension method `bounds' of type `UnityEngine.Component' could be found. Are you missing an assembly reference?
Assets/MapTexture.cs(122,12): error CS1061: Type `UnityEngine.Component' does not contain a definition for `sharedMaterial' and no extension method `sharedMaterial' of type `UnityEngine.Component' could be found. Are you missing an assembly reference?
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [Android] Stage information is not logged when Log Shader Compilation is enabled
- [Vulkan] The memory allocation increases rapidly when there are multiple (three or more) Real-Time Reflection Probes in the Scene
- [macOS] Library folder of the opened project can be deleted which leads to the crash
- “Default Scene” dropdown field contains a spelling mistake “Default Builtin”
- Editor crashes on PPtr<Mesh> after adding Text Mesh and Cloth Components to the same GameObject
Add comment