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
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
Add comment