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
- WebGL build dependencies are not refreshed until the Editor is restarted
- “Audio Random Container” allows adding unlimited number in “Audio Clips” numeric field, causing Editor to freeze
- In Deferred rendering path, mixed lights don't render when enabling "Use Rendering Layers" in the Decal renderer feature
- [Windows] Special characters in file names are sorted to the end of the alphabet in the Project window
- Information box icons are not contained within the information box bounds in Render Pipeline Converter window
Add comment