What's new

How to find text files in Unity games?


goldnugget

New member
Joined
Sep 26, 2018
Messages
2
Reputation score
0
Recently, there are some hentai games made with Unity engine. I want to translate some of them.

I searched google for hours but no luck.

For example, I tried [AssetsBundleExtractor_2.2beta4_64bit] 's plugin, extract txt, to find text from asset files. But there is no txt files in sharedasset0, resources, etc.

This is the game I'm currently trying to find the txt files.

([RJ228027] 1room v1.0.6)

If anyone know something, then pls give me some advice. Thank you.
 

Strange

Demon Girl Pro
Joined
Jul 24, 2014
Messages
1,256
Reputation score
486
I'd like to second this question/request; would one of the many Unity developers around here enlighten us?
To be specific: how to access ALL text strings in a bundled Unity project?


So far, I've concluded:
- some, usually few Text objects are external(?) and can be accessed/edited easily.
- however, the 'core' text is unreachable without the uncompressed/unbundled project files

As an example/learning experience, the necro of https://ulmf.org/threads/chougoukindentaru-harem-in-maze-2-no-rj106025.3682/ made me give that one another go, but all I could edit were skills (actives/passives) and some items prefixes.

More and more Unity games will become legit abandonware, so having a clear answer from someone with actual Unity experience would help.
 

habisain

Tentacle God
Joined
Jul 15, 2012
Messages
1,447
Reputation score
465
OK, so not a Unity developer, but I do understand the technology somewhat. The basic answer is "it depends". Unity is a platform, but it's one that's designed to be extended in fairly fundamental ways - this is in contrast to (for example) RPGMaker, where you're very unlikely to see games that extend the core engine - one could argue that OneOne1's games do this with their text obfuscation, but I'm not really aware of anything else.

Given that, you're going to be looking at three basic types of text strings within a given project.

1) Text strings in "standard" data files (e.g. TXT, CSV, JSON, or Unity objects)
2) Text strings in non-standard data files (e.g. a game specific way of storing text in an external file)
3) Text strings which are compiled into C# assemblies

The degree of difficulty in extracting all text strings is going to depend on the balance of how text strings are distributed between these. Again, going back to my example of RPGMaker, pretty much every string in RPGMaker would be category 1 - they're universally stored as Ruby Marshal/JSON files, depending on RPGMaker version. This is the easy case, because it's possible to implement a tool which can extract/insert text into all games using e.g. Unity objects. However, games might implement 2, which will require game/library specific tools, or 3, which will require decompiling/patching/recompiling the C# assemblies (which is actually do-able with the way Unity compiles stuff - there's also the option of directly editting the assemblies, but this comes with the restriction that new text can't take up more space than the old text, so it's not a great option).

So doable? Yes, but we're some distance off. At a minimum I think you'd need to handle the 1 and 3 cases, and there's a good chance that at least some games will use non-standard data files as well.
 

Cleanfeel

Demon Girl
Joined
Sep 28, 2015
Messages
225
Reputation score
77
Happy to announce that you can use this software

To translate any Unity games with ease.

After you hook into the game, and the auto translator is running, open up the _Substitution.txt file

You can basically use it as a standard Find and Replace. So if you open up _AutoGeneratedTranslations.txt, and see a text you want to preserve through the game, such as a character's name, you put it into the _Substitution.txt file and the software will use it instead of hitting Google Translate.

I was able to quick and dirty a partial translator for a Unity Game in seconds. Not the most ideal way, since you're not editing the game files directly. But works really well
 

Chrono_Black

New member
Joined
Mar 17, 2020
Messages
1
Reputation score
0
Happy to announce that you can use this software

To translate any Unity games with ease.

After you hook into the game, and the auto translator is running, open up the _Substitution.txt file

You can basically use it as a standard Find and Replace. So if you open up _AutoGeneratedTranslations.txt, and see a text you want to preserve through the game, such as a character's name, you put it into the _Substitution.txt file and the software will use it instead of hitting Google Translate.

I was able to quick and dirty a partial translator for a Unity Game in seconds. Not the most ideal way, since you're not editing the game files directly. But works really well
Thank you so much man. This is exactly what i've been looking for. really appreciate it homie.
 
Top