Unity Script Reader?

Qleaf

Workaholic
Modder
Donor
Respected User
Oct 14, 2016
1,030
6,978
Hello guys, I'm not quite sure if my post is in the correct thread, if not please move it to the correct place. I would apreaciate it, thanks in advance!

I want to expand my knowledge in reading the script in Unity games so I could write more walkthroughs.

Is there a way to sneak peak at the script so I can figure out what's the required condition(s) to trigger a specific scene?

For example, in Ren'Py games I could always peak at the "Script" file and can read what is required to unlock the scene.
 

Qleaf

Workaholic
Modder
Donor
Respected User
Oct 14, 2016
1,030
6,978
Been at it for hours now, and I feel like I didn't achieve any progress >.<
Anyone can help with locating where the required variable for scene triggers are stored at?

Currently testing on "Two sides" redone. I'll be thankful for any kind of help >.<
 

Reaver

Active Member
May 31, 2017
714
623
Quick question? Is there an Unity save editor?
they are not able to open the save file for me to edit... :/
 

vimmers

Engaged Member
Aug 12, 2017
3,767
3,127
Quick question? Is there an Unity save editor?
they are not able to open the save file for me to edit... :/
that varies from game to game
some unity saves are encrypted and will looks like this
123q45w67er89
others you can see the variables like this char_info > Cashier > progress_label 1/0 :(0)
others are stored in registry
first one you probably need to ask the developer or pay for a cheat code
 
  • Like
Reactions: Reaver

Reaver

Active Member
May 31, 2017
714
623
that varies from game to game
some unity saves are encrypted and will looks like this
123q45w67er89
others you can see the variables like this char_info > Cashier > progress_label 1/0 :(0)
others are stored in registry
first one you probably need to ask the developer or pay for a cheat code
that's good to know, thx for the heads up.

Guess i'll play it properly then... was trying to cut down the grind.
 

Rich

Old Fart
Modder
Donor
Respected User
Game Developer
Jun 25, 2017
2,494
7,045
that varies from game to game
With Unity, there are several categories of saves:
  1. Unity provides support for "user settings." Although it wasn't really intended for that, many game developers use them as a way to implement saves. These are stored in the Registry on Windows.
  2. C# has a built-in way of taking an object or collection of objects and serializing them out to a file that can be reloaded later on. These files can be manipulated, it just takes a tiny bit of programming. Basically, the file contains header information showing the type of each variable that's stored in the file and where in the file it's located (by offset). It's possible to dump this information from a save file, and then use a binary editor to go back in and change values inside the file. I did this at one point for a Unity-based game just to explore the whole process.
  3. Developer-developed save systems. Instead of using the "create a C# object and serialize it," the developer might have rolled his/her own save systems. This is actually the most flexible and powerful method. The first approach is kind of limited in terms of the number of saves you can support. The second approach works, but is hard to deal with when you want to add new variables in a subsequent release - you have to jump through a few hoops. A developer-written save system can take that into account. The formats of these files can vary all over the place - I've see as simply as a text file with a list of key/value pairs, a JSON file all the way through to a custom binary file with encryption.
To identify what the game was doing, first you'd have to figure out if it was saving files externally, or using the Registry. That's usually pretty straightforward. If it's using external files, then you'd have to analyze the file to see if its category #2 or category #3.

So, it's doable in many cases, but it's not as simple as something like Ren'py. Ren'py, the save support is built into the engine, so the saves all have the same format. Unity left this up to the developer, so YMMV.
 
  • Like
Reactions: vimmers

TheCuckoo9

New Member
Jul 21, 2019
3
0
The Unity Engine is much more open in terms of functionality. You can build MMO or Point&Click games. Unity comes with little pre-built/packaged streamlined game functionality like Saves/MainMenu/Dialog. This can vary heavily from game to game.
Of course, there are some best practices but nothing like Ren`Py which "just" appeals a specific purpose.

Cheers