File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 1010using Murder . Serialization ;
1111using Murder . Utilities ;
1212using System . Collections . Immutable ;
13+ using System . IO ;
1314using System . Numerics ;
1415
1516namespace Murder . Editor
@@ -237,6 +238,21 @@ private void DrawSelectedAsset(GameAsset asset)
237238 }
238239 }
239240
241+ if ( asset . IsSavePacked )
242+ {
243+ ImGui . SameLine ( ) ;
244+ if ( ImGui . Button ( "Save as Text" ) )
245+ {
246+ string outputPath = Path . GetTempPath ( ) ;
247+ string outputFile = Path . Combine ( Path . GetTempPath ( ) , "save.json" ) ;
248+
249+ _ = Game . Data . FileManager . SaveSerializedAsync ( asset , outputFile ) ;
250+
251+ GameLogger . Log ( $ "Saved asset at { outputFile } .") ;
252+ EditorFileManager . OpenFolder ( outputPath ) ;
253+ }
254+ }
255+
240256 ImGui . SameLine ( ) ;
241257 if ( ImGui . Button ( "Discard Changes" ) )
242258 {
You can’t perform that action at this time.
0 commit comments