Skip to content

Commit 5d1da2c

Browse files
kennytannEvergreen
authored andcommitted
[Port] [2021.3] [UUM-116587][6000.4][URP 2D] Fix Light 2D name on game object creation
1 parent 97062ec commit 5d1da2c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Packages/com.unity.render-pipelines.universal/Editor/2D/Renderer2DMenus.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ internal static void Place(GameObject go, GameObject parent)
7676

7777
static Light2D CreateLight(MenuCommand menuCommand, Light2D.LightType type, Vector3[] shapePath = null)
7878
{
79-
GameObject go = ObjectFactory.CreateGameObject("Light 2D", typeof(Light2D));
79+
var lightName = type != Light2D.LightType.Point ? type.ToString() : "Spot";
80+
GameObject go = ObjectFactory.CreateGameObject(lightName + " Light 2D", typeof(Light2D));
8081
Light2D light2D = go.GetComponent<Light2D>();
8182
light2D.lightType = type;
8283

0 commit comments

Comments
 (0)