Search Issue Tracker

Fixed in 2020.2

Fixed in 2019.3, 2020.1

Votes

0

Found in

2017.4

2018.4

2019.3

2019.3.0f5

2020.1

2020.2

Issue ID

1224238

Regression

No

A warning is thrown in the Console window when a non-MonoBehaviour script is added to the project with a name of a component

Scripting

-

How to reproduce:
1. Create and open a new project
2. Drag and drop the attached 'Transform.cs' script into the Project window
3. Observe the Console window

Expected result: no warnings are thrown
Actual result: a warning is thrown (even though the script is not a MonoBehavior)

Reproducible with: 2017.4.37f1, 2018.4.18f1, 2019.3.4f1, 2020.1.0a26, 2020.2.0a1

Full warning:
Script 'Transform' has the same name as built-in Unity component.
AddComponent and GetComponent will not work with this script.
UnityEditorInternal.InternalEditorUtility:ProjectWindowDrag(HierarchyProperty, Boolean)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

  1. Response avatar

    Resolution Note (fix version 2020.2):

    Fixed in 2020.2.0a9

  2. Response avatar

    Resolution Note (fix version 2020.1):

    Fixed in 2020.1.0b9

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.