sentry-unity icon indicating copy to clipboard operation
sentry-unity copied to clipboard

Investigate `filename` reporting

Open bitsandfoxes opened this issue 5 months ago • 1 comments
trafficstars

The SDK is setting filename to just the file name (e.g., "SomeMonoBehaviour.cs") instead of the relative path from project root (e.g., "Assets/Scripts/SomeMonoBehaviour.cs"). This breaks code mapping functionality in Sentry.

On Mono, the frame.FileName resolves to the absolute path. On IL2CPP the frame.FileName resolves to the absolute path.

bitsandfoxes avatar Jun 20 '25 14:06 bitsandfoxes

In .NET we have a build time thing that sets the project path to an attribute (C#), which we can read at runtime to find what we should be cutting off of the path.

We could do the same with Unity since we run code during the Editor build.

bruno-garcia avatar Jun 20 '25 14:06 bruno-garcia