Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't recovery of the mapping #2

Open
hushengkai opened this issue Jul 22, 2022 · 5 comments
Open

can't recovery of the mapping #2

hushengkai opened this issue Jul 22, 2022 · 5 comments

Comments

@hushengkai
Copy link

hushengkai commented Jul 22, 2022

Hi

I can convert my mapping into XML storage, but I can't restore the mapping content from XML again.

I have uploaded my basic structure, enumeration, and all blueprints. They are all describing the terrain state and vector position relationship on the chessboard.

My design logic is to obtain the structure of my stored terrain information according to the customized two-dimensional XY structure. The structure of terrain information includes the location of the center point of the terrain unit, the location of the lower left corner of the terrain unit, whether it contains snow, enumeration of terrain height, enumeration of forest, etc. they are all described in Chinese.

image

As long as the "mainmouse" playercontrol is configured as the default controller and the "qipansystem" is placed in the scene, the basic test environment can be pieced together

The XML file is stored in the project directory with the name test2.xml

Press 1 to load the XML file

Press 2 to replace the stored XML file

I can save meaningful XML files by pressing 2 first, but I can't deserialize from XML to structure by pressing 1 again

image

image

Thank you for checking
[Content.zip]

@RLoris
Copy link
Owner

RLoris commented Jul 22, 2022

Thank you for submitting the issue form ! I have received it and I'm testing it out right now, will come back at you with an answer !

@RLoris
Copy link
Owner

RLoris commented Jul 23, 2022

@hushengkai I think I have located the issue, this happens only for maps that uses complex type as their key, I have pushed a new version to the marketplace v1.3, can you try and tell me if it works for you ?

@hushengkai
Copy link
Author

I checked the market and haven't shown the latest version, but your program repair is really too fast. Thank you very much for your work. I will check the updates every day.
@RLoris

@hushengkai
Copy link
Author

Thank you. The problem has been solved. Now we can read the original content. I commend your work again, which makes us less difficult to develop

@hushengkai
Copy link
Author

In recent months, I have been using your plug-in, which is very easy to use. But now I have a problem.

I add, delete, view and modify a compound key value pair. The key is a GUID, and the value is a structure. This structure is also include other structure.

When I finish the operations I need to do, including modification, deletion and addition.

I saved the mapping variable as a file, and found that there were internal garbled codes. At the same time, some keys, whose types were GUIDs, became very strange values. Some data is also lost in value.

I am sure that the blueprint program I wrote is normal, and that it is also normal to save and read it separately. I used breakpoints to view the content of the mapping, and found that there was no problem. Only when the data is saved between, there will be garbled code and data confusion in file. the saved file there is no problem with the structure, but there is a problem with the internal data.

At present, my solution is to create an empty mapping variable temp before saving. Pass the variable I want to store to the new variable(temp), and then store the temp variable to map to the file. Then I can use it normally.
image

@hushengkai hushengkai reopened this Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants