@@ -141,44 +141,67 @@ private static void UploadDebugSymbols(IDiagnosticLogger logger, BuildTarget tar
141
141
} ;
142
142
143
143
addPath ( executableName ) ;
144
- if ( ! isMono )
145
- {
146
- addPath ( Path . GetFileNameWithoutExtension ( executableName ) + "_BackUpThisFolder_ButDontShipItWithYourGame" ) ;
147
- }
148
- if ( target is BuildTarget . StandaloneWindows64 )
149
- {
150
- addPath ( "UnityPlayer.dll" ) ;
151
- addPath ( Path . GetFileNameWithoutExtension ( executableName ) + "_Data/Plugins/x86_64/sentry.dll" ) ;
152
- addPath ( Path . GetFullPath ( $ "Packages/{ SentryPackageInfo . GetName ( ) } /Plugins/Windows/Sentry/sentry.pdb") ) ;
153
- if ( isMono )
154
- {
155
- addPath ( "MonoBleedingEdge/EmbedRuntime" ) ;
156
- addFilesMatching ( buildOutputDir , new [ ] { "*.pdb" } ) ;
157
- }
158
- else
159
- {
160
- addPath ( "GameAssembly.dll" ) ;
161
- }
162
- }
163
- else if ( target is BuildTarget . StandaloneLinux64 )
164
- {
165
- addPath ( "GameAssembly.so" ) ;
166
- addPath ( "UnityPlayer.so" ) ;
167
- addPath ( Path . GetFullPath ( $ "Packages/{ SentryPackageInfo . GetName ( ) } /Plugins/Linux/Sentry/libsentry.dbg.so") ) ;
168
- if ( isMono )
169
- {
170
- addPath ( Path . GetFileNameWithoutExtension ( executableName ) + "_Data/MonoBleedingEdge/x86_64" ) ;
171
- addFilesMatching ( buildOutputDir , new [ ] { "*.debug" } ) ;
172
- }
173
- }
174
- else if ( target is BuildTarget . StandaloneOSX )
175
- {
176
- addPath ( Path . GetFullPath ( $ "Packages/{ SentryPackageInfo . GetName ( ) } /Plugins/macOS/Sentry/Sentry.dylib.dSYM") ) ;
177
- }
178
144
179
- if ( isMono )
145
+ switch ( target )
180
146
{
181
- addFilesMatching ( $ "{ projectDir } /Temp", new [ ] { "**/UnityEngine.*.pdb" , "**/Assembly-CSharp.pdb" } ) ;
147
+ case BuildTarget . StandaloneWindows64 :
148
+ addPath ( "UnityPlayer.dll" ) ;
149
+ addPath ( Path . GetFileNameWithoutExtension ( executableName ) + "_Data/Plugins/x86_64/sentry.dll" ) ;
150
+ addPath ( Path . GetFullPath ( $ "Packages/{ SentryPackageInfo . GetName ( ) } /Plugins/Windows/Sentry/sentry.pdb") ) ;
151
+
152
+ if ( isMono )
153
+ {
154
+ addPath ( "MonoBleedingEdge/EmbedRuntime" ) ;
155
+ addFilesMatching ( buildOutputDir , new [ ] { "*.pdb" } ) ;
156
+
157
+ // Unity stores the .pdb files in './Library/ScriptAssemblies/' and starting with 2020 in
158
+ // './Temp/ManagedSymbols/'. We want the one in 'Temp/ManagedSymbols/' specifically.
159
+ var managedSymbolsDirectory = $ "{ projectDir } /Temp/ManagedSymbols";
160
+ if ( Directory . Exists ( managedSymbolsDirectory ) )
161
+ {
162
+ addFilesMatching ( managedSymbolsDirectory , new [ ] { "*.pdb" } ) ;
163
+ }
164
+ }
165
+ else // IL2CPP
166
+ {
167
+ addPath ( Path . GetFileNameWithoutExtension ( executableName ) + "_BackUpThisFolder_ButDontShipItWithYourGame" ) ;
168
+ addPath ( "GameAssembly.dll" ) ;
169
+ }
170
+ break ;
171
+ case BuildTarget . StandaloneLinux64 :
172
+ addPath ( "GameAssembly.so" ) ;
173
+ addPath ( "UnityPlayer.so" ) ;
174
+ addPath ( Path . GetFullPath ( $ "Packages/{ SentryPackageInfo . GetName ( ) } /Plugins/Linux/Sentry/libsentry.dbg.so") ) ;
175
+
176
+ if ( isMono )
177
+ {
178
+ addPath ( Path . GetFileNameWithoutExtension ( executableName ) + "_Data/MonoBleedingEdge/x86_64" ) ;
179
+ addFilesMatching ( buildOutputDir , new [ ] { "*.debug" } ) ;
180
+
181
+ var managedSymbolsDirectory = $ "{ projectDir } /Temp/ManagedSymbols";
182
+ if ( Directory . Exists ( managedSymbolsDirectory ) )
183
+ {
184
+ addFilesMatching ( managedSymbolsDirectory , new [ ] { "*.pdb" } ) ;
185
+ }
186
+ }
187
+ else // IL2CPP
188
+ {
189
+ addPath ( Path . GetFileNameWithoutExtension ( executableName ) + "_BackUpThisFolder_ButDontShipItWithYourGame" ) ;
190
+ }
191
+ break ;
192
+ case BuildTarget . StandaloneOSX :
193
+ addPath ( Path . GetFullPath ( $ "Packages/{ SentryPackageInfo . GetName ( ) } /Plugins/macOS/Sentry/Sentry.dylib.dSYM") ) ;
194
+
195
+ if ( isMono )
196
+ { }
197
+ else // IL2CPP
198
+ {
199
+ addPath ( Path . GetFileNameWithoutExtension ( executableName ) + "_BackUpThisFolder_ButDontShipItWithYourGame" ) ;
200
+ }
201
+ break ;
202
+ default :
203
+ logger . LogError ( $ "Symbol upload for '{ target } ' is currently not supported.") ;
204
+ break ;
182
205
}
183
206
184
207
var cliArgs = "upload-dif " ;
0 commit comments