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>()"

Scripting

-

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?

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.