ata4 / disunity

An experimental toolset for Unity asset and asset bundle files.
The Unlicense
2.7k stars 663 forks source link

Extracting scenes #23

Open twisted89 opened 10 years ago

twisted89 commented 10 years ago

There is the fixrefs command to fix 'extracted scenes' but how do you extract a scene? The extract command doesn't produce any and the split command just returns empty folders? Any help is appreciated.

ata4 commented 10 years ago

You need to use bundle-extract first if the game is inside a .unity3d file. Then you can change the extension to .unity to open the files. I also figured out that the fixrefs command isn't necessary, as long as you just make sure that the .unity and .sharedAssets files are in the root directory of your project.

twisted89 commented 10 years ago

Still can't get this to work, the game I'm trying to open is a PC one so it consists of level0, level1 etc.. Sharedassets0.assets... these are all individual 'asset' files according to disunity (can't use bundle-extract), renaming them to .unity and attempting to open them in the Unity editor just causes it to freeze.

LaserSpacer commented 10 years ago

I'm having the exact same problem trying to extract a PC unity scene into the editor. I'm using the disunity GUI. Would be extremely grateful if you could help us sort this out.

Scrivener07 commented 10 years ago

Try your command using only disunity from the command line. If it works then that is an issue with my helper program. Dont bother ata4 about disunity helper if that turns out to be the case :)

twisted89 commented 10 years ago

I don't think you read my posts properly, according to ata4's instructions we don't even need to use his tool but that's not working. Also I've run both the binaries and compiled the source myself with no difference

DarkLotus commented 10 years ago

Its been stated plenty of times, webplayer 'scenes/assets' are stored with much more information than standalone scenes/assets. Currently there is no way to auto recreate scenes from standalone( as in PC/mac client) assets yet.

On Wed, Apr 30, 2014 at 5:00 PM, twisted89 notifications@github.com wrote:

I don't think you read my posts properly, according to ata4's instructions we don't even need to use his tool but that's not working. Also I've run both the binaries and compiled the source myself with no difference

— Reply to this email directly or view it on GitHubhttps://github.com/ata4/disunity/issues/23#issuecomment-41766368 .

ata4 commented 10 years ago

If the game isn't a browser game, then it probably won't work. Some of the required metadata is missing and the asset format may also be different. I still have to work on a command that can fix this.

twisted89 commented 10 years ago

Ok, so I manged to find a web player version of the game and I can open up the scenes in unity with all files in the project root which works great. However, if I try to move any of the scene objects out they all lose their links to the materials and turn pink. Is there anyway to avoid this? I've tried making prefabs and exporting packages but this doesn't work either, I'd rather not have to export all the materials and attempt to fix this manually as that would take forever! Is it also possible to fix the script links when opening the asset files as scenes?

ata4 commented 10 years ago

Sorry for forgetting your latest comment.

However, if I try to move any of the scene objects out they all lose their links to the materials and turn pink. Is there anyway to avoid this?

Unfortunately not. I'm also trying to figure out a way to merge scene and shared asset files to fix any dependency issues. I believe that this kind of dependency isn't even intended to be used or configured from within the editor, it's merely supported because the editor mostly behaves like the engine when it loads the asset files.

Is it also possible to fix the script links when opening the asset files as scenes?

I think the editor doesn't accept compiled scripts, so the only way would be to use a C# decompiler and fix all the decompiling bugs until the scripts are working again. I've tried it before, it's really tedious work even for small games, but it's working.

gittimon commented 9 years ago

Hello :D I just wanted to ask you, "ata4" if you think that there will be a possibility in future to open scene files (level0...) from standalones (.ipa/apk) in Unity. The reason why I'm asking is: A "game" was released which was to come out as triology, both on android and ios. So Volume I appeared on both systems - and I played it on my Galaxy III - but unfortunately Volume II was released only on IOs and shortly afterwards the company ran out of money. Now I have Volume II in .ipa format and since I don't want to buy an Ipad (or something) just because of a game - I thought maybe it would be possible to open the scenes in the browser. And this how I found this thread.

I now for now it appearently isn't possible - but I wanted to hear your opinion on a future feasibility =) (I guess there are some errors in my post - sorry for that I'm not native speaker)

Wish you all a nice day/evening =)

ata4 commented 9 years ago

It's hard to say if it's possible to convert Unity standalone games to browser games or to any other platform. The engine components are interchangeable, but some of the assets, such as textures and sounds, may use formats that aren't available on other platforms. I think it should be relatively easy to convert a Windows/Linux/MacOS standalone game to a browser game and vice versa, but from Wii to iOS or PS4 to Android, for example, is complicated or maybe even impossible. I think iOS to Android is somewhat doable, but it still requires the textures to be converted. I'm also not sure if the compiled scripts will work on both platforms, that's probably another question.

And don't worry about errors, I'm not a native speaker either. :smile:

CurrenJ commented 7 years ago

Any updates on this? I am trying to open scenes from a PC build of a game. I've changed the extension of the level0 file to .unity, however, when I try to open it in the editor it simply freezes.

Any help would be much appreciated.