Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifying globalgamemanagers? #5

Open
Randomno opened this issue May 22, 2024 · 1 comment
Open

Modifying globalgamemanagers? #5

Randomno opened this issue May 22, 2024 · 1 comment

Comments

@Randomno
Copy link

Hi, thanks for the tool, it's very handy.

As I understand it any porting is going to be limited by the shaders. But if a game uses few or no shaders (e.g. 2D games) I'm wondering if it can be made playable with some more work. I tried this with Deepest Sword. I decompiled the game with AssetRipper and exported the project to Linux. Since the decompilation process is imperfect and I'm unfamiliar with Unity errors, the game launched but was fairly broken.

So I tried taking the version ported with unify, and seeing what I could replace with the exported Linux version to get it to launch. Initially it will fail to launch with this message:

Unknown renderer 2

No supported renderers found, exiting

Replacing globalgamemanagers with the Linux version allows it to launch, but the screen is pink (typical broken shader sign).

Replacing unity_builtin_extra as well fixed the graphics. The only issue is the text not loading. I think this is an issue from when I recompiled the game. It's probably fixable but I couldn't figure it out.

So the question for the purpose of this tool is if there's a generalised way to modify globalgamemanagers to allow games to launch. I haven't looked into the format of the file at all so I have no idea (AssetRipper will open it and show the contents). I also don't know what unity_builtin_extra contains and if anything is possible there.

@0xf4b1
Copy link
Owner

0xf4b1 commented May 22, 2024

Hey, this tool sounds very interesting :)

I did a quick check with an empty unity project and did the following:

  1. unify: windows (opengl) -> linux (opengl) works
  2. unify: windows (directx) -> linux (opengl) Unknown renderer 2
  3. assetripper: windows (directx) -> linux (opengl) works

I had to copy globalgamemanagers, unity_builtin_extra and sharedassets0.assets from the working port 3 with assetripper into the non working port 2 with unify and it lets me start the game as expected.

But with a quick look into a binary diff of there files, I don't think there is a way to patch some bytes or something to get it to work as the files are quite different.
For unify, the script checks the file unity_builtin_extra to contain symbols starting with GL_ which I found as best indicator if a game has opengl support, so I think it will need all this stuff properly build in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants