Search Issue Tracker
Fixed in 12.0.0
Votes
0
Found in [Package]
11.0.0
Issue ID
1320535
Regression
No
[2D][URP] Increasing Freeform Light 2D Falloff greater than 53 causes errors in console
[2D][URP] Increasing Freeform Light 2D Falloff greater than 53 causes errors in console
Repro steps:
1. Open SampleScene in attached "2DLight_Falloff_Bug_2" project
2. Observe Light 2D in scene, increase its Falloff in inspector to any value greater than 53, observe IndexOutOfRange exception in console
IndexOutOfRangeException: Index 1024 is out of range of '1024' Length.
Unity.Collections.NativeArray`1[T].FailOutOfRangeError (System.Int32 index) (at <382795dbdc064c2c97e30b4fbf6ba703>:0)
Unity.Collections.NativeArray`1[T].CheckElementWriteAccess (System.Int32 index) (at <382795dbdc064c2c97e30b4fbf6ba703>:0)
Unity.Collections.NativeArray`1[T].set_Item (System.Int32 index, T value) (at <382795dbdc064c2c97e30b4fbf6ba703>:0)
UnityEngine.Experimental.Rendering.Universal.LightUtility.GenerateShapeMesh (UnityEngine.Experimental.Rendering.Universal.Light2D light, UnityEngine.Vector3[] shapePath, System.Single falloffDistance) (at Library/PackageCache/com.unity.render-pipelines.universal@12.0.0/Runtime/2D/LightUtility.cs:334)
UnityEngine.Experimental.Rendering.Universal.Light2D.UpdateMesh (System.Boolean forceUpdate) (at Library/PackageCache/com.unity.render-pipelines.universal@12.0.0/Runtime/2D/Light2D.cs:244)
UnityEngine.Experimental.Rendering.Universal.Light2D.LateUpdate () (at Library/PackageCache/com.unity.render-pipelines.universal@12.0.0/Runtime/2D/Light2D.cs:318)
Expected result: Falloff increases gracefully without errors in console
Actual result: Errors in console if Falloff increases above 53
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Resolution Note (fix version 12.0.0):
Fix for this issue available on Unity 2021.2.0b14 and above