-
Notifications
You must be signed in to change notification settings - Fork 114
Description
Describe the bug
I save the .uasset file as a .json file. Without editing anything, I save the .json file as a .uasset and the following error message pops up,
Failed to save! Could not serialize EnumProperty value ATK_CMB as UInt16Property
To Reproduce
Steps to reproduce the behavior:
- Open UAssetGUI
- Drag event.json file into UAssetGUI
- Press File > Save As > P0001_v00prm_mot_event.uasset (original .uasset file name)
- Error message "Failed to save! Could not serialize EnumProperty value ATK_CMB as UInt16Property"
Expected behavior
I expected the previous P0001_v00prm_mot_event.uasset file to be replaced by my event.json file
Desktop (please complete the following information):
- OS: Windows 10
- Version or Commit: UAssetGUI v1.0.3/UAssetAPI 1.0.2.0 (39a20ea)
Additional context
It doesn't have to replace P0001_v00prm_mot_event.uasset. It just won't convert back to a .uasset file. I'm trying modify the converted .json file and then have it converted back to a .uasset file and use retoc to-zen to use for modding. But I can't even turn the unmodified .json file back to a .uasset file, much less a modified .json file.
I was trying to use the command-line to test if converting .json -> .uasset would work here. On my terminal I put,
C:\Users\admin\Desktop> UAssetGUI.exe fromjson event.json test.uasset 503_DemonSlayer.usmap > error_log.txt 2>&1
and I got this error message:
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
at UAssetAPI.PropertyTypes.Objects.EnumPropertyData.Write(AssetBinaryWriter writer, Boolean includeHeader, PropertySerializationContext serializationContext) in C:\Users\Alexandros\source\repos\UAssetGUI\UAssetAPI\UAssetAPI\PropertyTypes\Objects\EnumPropertyData.cs:line 141
at UAssetAPI.MainSerializer.Write(PropertyData property, AssetBinaryWriter writer, Boolean includeHeader) in C:\Users\Alexandros\source\repos\UAssetGUI\UAssetAPI\UAssetAPI\MainSerializer.cs:line 573
at UAssetAPI.PropertyTypes.Structs.StructPropertyData.WriteNTPL(AssetBinaryWriter writer) in C:\Users\Alexandros\source\repos\UAssetGUI\UAssetAPI\UAssetAPI\PropertyTypes\Structs\StructPropertyData.cs:line 213
at UAssetAPI.PropertyTypes.Structs.StructPropertyData.Write(AssetBinaryWriter writer, Boolean includeHeader, PropertySerializationContext serializationContext) in C:\Users\Alexandros\source\repos\UAssetGUI\UAssetAPI\UAssetAPI\PropertyTypes\Structs\StructPropertyData.cs:line 258
at UAssetAPI.ExportTypes.DataTableExport.Write(AssetBinaryWriter writer) in C:\Users\Alexandros\source\repos\UAssetGUI\UAssetAPI\UAssetAPI\ExportTypes\DataTableExport.cs:line 213
at UAssetAPI.UAsset.WriteData() in C:\Users\Alexandros\source\repos\UAssetGUI\UAssetAPI\UAssetAPI\UAsset.cs:line 2652
at UAssetAPI.UAsset.Write(String outputPath) in C:\Users\Alexandros\source\repos\UAssetGUI\UAssetAPI\UAssetAPI\UAsset.cs:line 2740
at UAssetGUI.Program.Main() in C:\Users\Alexandros\source\repos\UAssetGUI\UAssetGUI\Program.cs:line 67
I think it's a NullReferenceException during writing of an EnumPropertyData inside a DataTableExport? But I'm not sure and I don't even know what that means. This error might not be related to the issue. It might be because I tried converting a .json file that was initially converted by UAssetGUI. Or I didn't do the command-line method properly π
Is it possible that the usmap is the problem?
Side note, thank you so much for enabling us to create mods for the games we love!