Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Can't find text in files of a unity game

Featured Replies

  • Author
  • Localization

martanius, posted Sat Dec 18, 2021 5:00 am (68323)


Hello. I'd like to translate a game called She Will Punish Them.

I used UnityEx to find a .txt localization file with a lot of texts. But it seems the game does not use all of them and is loading them from a different files. And some texts are not even in the localizaton file at all.

I encountered such text in game already, but I was able to find it in a monobehavior file and once I changed it and import back in the game, it worked.

But this text is something else:

Image

I'd like to translate "Slaver" but it is not in the text localization file at all. So what I tried:

I used TotalCommander method to find the string in game files and it found it inside these:
Image

I used UnityEx to find text Slaver and it was found in these files:

    Level1
-UISlaver.gobj
-Slaver.gobj
-Btn Close (3)_00001.Button
-Tittle(2)_00006.Text


The only file with exact match of text I'm looking for was the last one. It's a monobehaviour file and it contains this line:

So I changed it but to no avail. The game still shows the original text.

    Level10
-UISlaver.gobj
-Btn Close (3)_00004.Button
-Tittle(2)_00002.Text


Again, the only file with exact match of text I'm looking for was the last one. It's a monobehaviour file and it contains this line:

So I changed it but to no avail. The game still shows the original text.
It was almost the exact same file as before. Only some variables were changed.

    Level15
-UISlaver.gobj
-Btn Close (3)_00004.Button
-Tittle(2).Text


Again, the only file with exact match of text I'm looking for was the last one. It's a monobehaviour file and it contains this line:

So I changed it but to no avail. The game still shows the original text.
It was almost the exact same file as before. Only some variables were changed.

    globalgamemanagers.assets
-Slaver.script
-UISlaver.script


These are just scripts. I found a tool and extracted the scripts itself from them and this is how they look like:

Slaver.cs
Code:
using System;
using UnityEngine;


public class Slaver : MonoBehaviour
{
public Transform[] possibleSlaves;

public CommonArray slaves;

public int refreshTimer;

public int lastPlayerLevel;

private void Start()
{
base.InvokeRepeating("CS", 1f, 1f);
this.Refresh();
}

private void CS()
{
this.refreshTimer ;
if (this.refreshTimer > 500)
{
this.Refresh();
}
}

public void InitiateInteract()
{
Global.code.uiSlaver.Open(this);
}

public void QuitInteract()
{
Global.code.uiSlaver.Close();
}

public void Refresh()
{
this.slaves.ClearItems();
if (this.slaves.items.Count {
Transform[] array = this.possibleSlaves;
for (int i = 0; i {
Transform transform = array[i];
for (int j = 0; j {
if (UnityEngine.Random.Range(0, 100) {
this.slaves.AddItem(transform);
}
}
}
}
array
i
transform
j
}
}


UISlaver.cs
Code:
using System;
using UnityEngine;


public class UISlaver : MonoBehaviour
{
public Transform iconPrefab;

public Transform iconGroup;

public AudioClip sndHire;

public Slaver curSlaver;

public void Open(Slaver slaver)
{
this.curSlaver = slaver;
base.gameObject.SetActive(true);
for (int i = 0; i {
if (this.iconGroup.GetChild(i))
{
UnityEngine.Object.Destroy(this.iconGroup.GetChild(i).gameObject);
}
}
foreach (Transform current in slaver.slaves.items)
{
if (current)
{
Transform expr_80 = UnityEngine.Object.Instantiate(this.iconPrefab);
expr_80.SetParent(this.iconGroup);
expr_80.localScale = Vector3.one;
expr_80.GetComponent().Initiate(current.GetComponent());
}
}
i
enumerator
current
expr_80
}

public void Close()
{
base.gameObject.SetActive(false);
}
}


I don't think the game is loading the text from these scripts.

And of course there could be more of texts like this in the game.

Do you have any idea where the game could be loading the text from?
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.