unity4.6 crashed when i import local csv file

More
4 years 4 months ago #387 by weijinbao
hi, i just bought this plugin.
when i import csv file by the step:
1.open the example scene uGUI Localization.unity;
2.export Localization.csv to local path such as "Lib/Localization/Resources/Localization.csv";
3.click the tap "Spreadsheets"
4.click the tap "Local"
5. file:Lib/Localization/Resources/Localization.csv;
6.click the import button to import "Lib/Localization/Resources/Localization.csv";
7.unity4.6 crashed when i selected the flie "Localization.csv";

but when i do this in unity 5, everying is ok. that's why?( the required version is upper the 4.5.5 )

Please Log in or Create an account to join the conversation.

More
4 years 4 months ago #388 by Frank
Hi,
I tried the steps you mentioned but couldn't reproduce any crash.
I tried exporting the CSV into a path inside the project and a path outside the project. Both worked fine. And even if delete all terms in the source, when I import by clicking "Replace" it restores all the terms.

I ran the tests on a windows computer with 4.6.1p1

Are you getting the crash on windows or mac? I don't have access to a mac until monday, but will try it as soon as possible.

Thanks
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
The following user(s) said Thank You: weijinbao

Please Log in or Create an account to join the conversation.

More
4 years 4 months ago #391 by weijinbao
Thanks for your reply´╝ü

I am getting the crash on mac ( MacBook Pro (Retina, 15-inch, Mid 2014) ) , the environment is:

1.operating system: OS X Yosemite 10.10.1 (14B25)
2.Unity Version: 4.6.0f3, free
3.I2 Localization 2.3.2

the crash will occur.

Please Log in or Create an account to join the conversation.

More
4 years 4 months ago #393 by Frank
Hi,
I check the steps in Mac, and it seems that Unity has a bug on the latest mac versions when selecting some extensions in the OpenFileDialog.
Even if you select from the unity menu: Assets/Import New Asset... and click on a CSV file, Unity crashes.

However, if the file is renamed into txt, unity is able to select it without crashing. I guess it has something to do with the file preview shown next to the file. I just reported that bug to unity.

However, a workaround to be able of using local spreadsheets in Mac, is to save the spreadsheet as txt instead of csv.

To allow you selecting the csv file you will need to modify the file:
Assets\I2\Localization\Editor\Localization\LocalizationEditor_Spreadsheets_Local.cs

line 169:
From: File = EditorUtility.OpenFilePanel("Select CSV", File, "csv");
to: File = EditorUtility.OpenFilePanel("Select CSV", File, "txt");

Another issue is that OpenFilePanel in Mac doesn't allow multiple extensions, thats why it has to be "txt" and not "csv;txt". That works on windows, but not on mac.

I'm adding a proper fix to the new version of the plugin, that should allow you selecting which type of file you want to use (forcing you to txt on mac to avoid the crash)

Thanks,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out
The following user(s) said Thank You: weijinbao

Please Log in or Create an account to join the conversation.

More
4 years 4 months ago #395 by weijinbao

Please Log in or Create an account to join the conversation.

More
4 years 3 months ago #458 by Frank
I'm glad to announce, that the workaround for the Unity crash on mac is now included on version 2.4.1 a4 that can be downloaded from the I2 Community.

Now, the local spreadsheets can be imported/exported as CSV files or CSV files renamed as TXT.
When on Mac, only the TXT file is used to avoid having Unity crash when it tries to preview the content of the CSV file.

Also, its now possible to drag a CSV or TXT file into the Filename textField without opening the Open/Save File Dialog which also avoids the Unity bug.

Hope that helps,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

Time to create page: 0.153 seconds
Template by JoomlaShine