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
- Inspector elements are rendered twice when the script component is added via drag-and-drop while the HideFlags.HideInInspector property is set
- Error "Light baking failed with error code 5 (Convergence data not available while rendering lightmaps)" thrown in Console when generating lighting for specific GameObjects
- Copy and Paste options for an Animation Property value are disabled in the Right click contextual menu
- Asset is not found when searching the Label "NewLabel" in Search Window
- "Compute dispatch: missing texture ID..." and "Compute dispatch: missing UAV ID..." warnings are thrown after changing the platform in High Definition 3D template
Add comment