dmc31a42 / UnityL10nTool

Unity Game Localization Tools is helper to make localization patch for un-supported language.
70 stars 9 forks source link

tool crashed during load project #31

Closed nbg1rp closed 4 years ago

nbg1rp commented 5 years ago

During "Loading class information...", tool crashed. From folder ClassDatabase, cannot find 2017.4.14f1.dat, and the target game is built with 2017.4.14f1.

How can I get this database? or is there any workaround?

Thanks!

dmc31a42 commented 5 years ago

You can extract from DerPopo's UABE. https://github.com/DerPopo/UABE In UABE, from package(pkg), you can extract classdatabase file. And, uncompress extracted classdatabase. Then, you can use in UnityL10nTool. I'll update as soon as possible

dmc31a42 commented 5 years ago

I checked my building Unity 2017.4.27f1 game. and as i make, U2017.4.8f1.dat cover all 2017.4.* version. Maybe it crash regardless of version or classdatabase. can you tell me what name game is?

nbg1rp commented 5 years ago

It's an Android apk file, is that the reason?

dmc31a42 commented 5 years ago

Maybe. I only test for Win32 build game. I'll check for Android build.

dmc31a42 commented 5 years ago

I checked why it crash. In Windows, "unity default resources" assets is assumed in Resources folder. But in Android, in Data (or ./). It can be solved temparary to copy 'unity default resources' file into Resources. then UnityL10nTool will open successful. But there is other problem. sharedassets0.assets file is splited different from Win. It is not expected, so I'm not sure when i can solve problem.

nbg1rp commented 5 years ago

Thanks for your comment. It did open properly with your suggestion. sharedassets0 split into 1MB per file, perhaps we can modify the load process for this Android case.

nbg1rp commented 5 years ago

If the load problem fix, could this tool help to change English only game which only contains Arial font to show Chinese Character?

dmc31a42 commented 5 years ago

This tool only support Text Mesh Pro, Next-Gen UI, Unity default font(bitmap font) used game. In case of those, you can change only english game to Non-Latin support game. And if you make chinese font, please tell me which font system is. I'll write english manual Otherwise, you tell me game name and I will check.

nbg1rp commented 5 years ago

I'm newbie for Unity, I don't how to distinguish which font system it uses. From asset studio, it contains some sdf atlas files which are Texture2D/bitmap file, perhaps it uses default font?

dmc31a42 commented 5 years ago

If there are items at each FontAssetPlugin tab in UnityL10nTool (I'll attach sample image latee, I'm outside now), This game use that font system. If there is no item, open all assets in Data folder using UABE(unity assetbundle extractor), then check wether TMPFont, UIFont class is or not. I'll tell detail maybe 2~3 hours later

nbg1rp commented 5 years ago

Thanks! In UnityL10nTool, there is no item in font asset, perhaps it relates with the sharedassets0 loading problem? In UABE, I find some materials relate with TMP, such as: image And as below: image Could them show this game use TMPFont ?

If I need fix the asset load problem for splited sharedassets0 assets, which part of code shall we edit?

dmc31a42 commented 5 years ago

Maybe. And if you want to fix, please check https://github.com/dmc31a42/UnityL10nTool/blob/52a12b5dca837dd1bdc2381f952784178edbea13/ULTFontPlugins/TMPFontAssetULTFontPlugin/TMPFontAssetULTFontPlugin/TMPFontAssetULTFontPlugin.cpp#L40 Check split file is, load splited asset files using GetFontAssetMapListFromMonoClassName function second arg is file name.

nbg1rp commented 5 years ago

OK, Thanks! And another way, maybe I can merge the Android assets into the one like Win32's Assets. Then UnitL10Tool can process Android project without modify code? But I don't know the differences between Android and Win32 for the asset file. Is this way more convenient for us?

dmc31a42 commented 5 years ago

'And another way, maybe I can merge the Android assets into the one like Win32's Assets. Then UnitL10Tool can process Android project without modify code? ', yes. 'But I don't know the differences between Android and Win32 for the asset file.' assets file (as is) is no difference according to architecture. but there are some different what i see. example, unity default asset file is at _Data/Resources/ in win and linux, at _Data/../ in mac, and at _Data/ in Android. I think it is different of implement. Third, I'm not sure...

dmc31a42 commented 5 years ago

'Is this way more convenient for us?', yes. I think so. I test and work. First, merge, If you extract some asset and import same asset in sharedassets0.assets, then nothing is change but you can save assets as merged in UABE tool. After that you can use UnityL10nTool. I made patcher(build), and patch android assets/bin/Data After self-signing and install. Font is changed.

dmc31a42 commented 5 years ago

and. I will translate https://github.com/dmc31a42/UnityL10nTool/wiki/Font-Asset-TMPFontAsset-ko-KR to english as soon as possible.

nbg1rp commented 5 years ago

Hi, I checked this wiki with the help of google translate, during the process 'Get script information' ('Dump export') of the TMP font, the dll prompt seems PC related, when process Android apk's assets, from the managed folder, I cannot find these dlls, is it OK to skip this process?

nbg1rp commented 5 years ago

After I merge the split assets in the data folder, the tool can recognize the font this android unity game used, but a little confused about how to do next...

nbg1rp commented 5 years ago

After I gen Light It Up Patcher.exe, and run it, only splash screen showed, then dismiss and nothing happened, I have change the "font family" to MyFont for each original TMP font of this game. And then build.

dmc31a42 commented 5 years ago

Is there any window of patcher?

nbg1rp commented 5 years ago

Nope, only splash gui and then exit...

dmc31a42 notifications@github.com于2019年6月1日 周六11:24写道:

Is there any window of patcher?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dmc31a42/UnityL10nTool/issues/31?email_source=notifications&email_token=AD3TDRBHH54XERZQYFRW223PYHTVDA5CNFSM4HLQRJZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWWXSXA#issuecomment-497908060, or mute the thread https://github.com/notifications/unsubscribe-auth/AD3TDRCN4653KO3HGF7OWWTPYHTVDANCNFSM4HLQRJZA .

dmc31a42 commented 5 years ago

Please pack patcher folder and attach here.

nbg1rp commented 5 years ago

Projects.zip

Please refer to the attachment. :P

nbg1rp commented 5 years ago

It's an Android apk game, and I only extract the Data folder to work. After I generate the patcher, do I need to copy it to the game's Data folder to run the xxx patcher.exe, or I can run this .exe in the patcher's folder.

dmc31a42 commented 5 years ago

As I understood, is showing only splash and exiting due to just copy only exe file to Data folder, and is it solved? or still have problem? when I run patcher, it show as I expect.

nbg1rp commented 5 years ago

no, still have proble. I did not copy any file to Data folder to run, and only run the patcher under tool's original folder, is that OK?

nbg1rp commented 5 years ago

Oh.... right now, it is ok! What I have done just now is: I download this tool source code and try to build with VS 2013. And some error prompt, the I try to fix the build environment to update NuGet, and NuGet try to down/update some component, maybe...

nbg1rp commented 5 years ago

Although the build environment is still broken, but the patcher can show GUI now.

dmc31a42 commented 5 years ago

Library author-DerPopo- said UABE_API only works and should be compiled in VC++ 2010 Release mode due to STL library compatibility. (https://github.com/DerPopo/UABE/issues/43#issuecomment-219455080) So, I only set up project setting of release not debug. Maybe It is reason(both program does not work as expected and build error) i guess.

nbg1rp commented 5 years ago

OKay, thanks for your remind. I run the patcher successfully, but result in broken game, after patch, the game cannot run properly. image It seems something different with PC unity and Android unity ....

dmc31a42 commented 5 years ago

When I test my Android test build, It works. So, I test step by step using the game(written in project settings.json) I unpack original apk and remove META-INF, pack, align, self-signing, and install using adb. The game does not work loop Loading screen, cannot find Default.mp4 toast. Second, remove only CERT.RSA, CERT.SF, and MANIFEST.MF, do same thing and also doesn't work. maybe dependency of game protect, not difference between PC, android. Did you success make just repacked game work?

dmc31a42 commented 5 years ago

Oh, in deep analysizing, I found there are some stranges. I'll check more and tell you

dmc31a42 commented 5 years ago

I made TextMesh Pro unity project and build android apk, and I modify font using UnityL10nTool and install my phone and run. Then, It works. So, I thought It should be work too. But failed to this game... maybe something hidden or there is mistake. It will take long time to figure out

nbg1rp commented 5 years ago

Thanks for your efforts. Maybe there are differences when writing back to sharedasset. What I have done is merge the split assests then use the tool, and patch, after that split the patched assest again and repack the apk. Maybe something different between pc unity assest and the merged android assest.

dmc31a42 notifications@github.com于2019年6月3日 周一12:48写道:

I make TextMesh Pro unity project and build android apk, and i modify font using UnityL10nTool and install my phone and run. Then, It works. So, I thought It should be work too. But failed... maybe something hidden or there is mistake.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dmc31a42/UnityL10nTool/issues/31?email_source=notifications&email_token=AD3TDRDMGGK5Y2S56ZAKBJLPYSPCTA5CNFSM4HLQRJZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWYJJCI#issuecomment-498111625, or mute the thread https://github.com/notifications/unsubscribe-auth/AD3TDRAA43PA67S6LRBXC63PYSPCTANCNFSM4HLQRJZA .

nbg1rp commented 5 years ago

Perhaps we can check the patched apk's loading process...