Closed SrfRfRing closed 6 years ago
I'm going to write something like README soon. This tool mostrly designed for developers (who already familiar with VS and Unity) but despite this fact I added console application for testing. You have to build solution yourself. To do that u need Visual Studio 2017 or other NET 4.6.1 compiler with C# 7 support. Build UnityRipper project, open Bins\Debug folder take UnityRipper.exe and UnityRipperCore.dll file from there. That is your built application. When you have your built application, drag and drop AssetBundle (.unity3d) or Assets file(s) to UnityRipper.exe and it extract supported assets to Ripped folder. Copy created folder to your Unity project (you need Unity 2017.3 version). If UnityRipper fail to process any file (red log in console window), unpload this file somewhere, create new issue and post a link there. I will try to fix it as soon as I have spare time.
Thank you so much for responding! I'm glad to hear your reply. I'll let you know if I have problems processing a fie.
Okay, I did all of those steps. When I open UnityRipper.exe after doing all the other steps, it says "No Arguments". When I drag in a sharedassets file, it just closes on me. Am i doing something wrong?
I accidently commited my debug tests. Dowload last version and try again.
Okay, thank you. I will :)
I think I am doing something wrong. When I open UnityRipper.exe it always says "No arguments". Whenever I drag a sharedassets file into UnityRipper.exe, it closes and doesn't extract anything. I checked the Ripped folder but there's nothing in there.
"@When I open UnityRipper.exe it always says "No arguments". " I have to drag files into exe "it closes and doesn't extract anything" Does it close automaticly? It should wait for key input before closing. Besides, it should write list of exported files and files which it failed to export. Does UnityStudio process this 'sharedassets' file successfully? What kind of assets present in that file? Could you upload this file so that I can test it myself?
"I have to drag files into exe" Do you mean as in drag it into the application? Yeah, that's what I did. And then it closes automatically without saying anything at all.
Yes, unity studio always processes those sharedassets files. But the one I'm trying to load is only 23 mbs so it doesn't have a lot of stuff in it, some animations some meshes and some shaders, etc.
Here's the file. https://mega.nz/#!0yxlXKhA!ktf1D6zRZsPb9t9Ks71y3epBC-O_FKmE_CI_3KIqmrs
"And then it closes automatically " It shouldn't. Maybe OS feature, I don't really know. Anyway, I looked your file and confirm that it crashes UR. I will fix it soon. Btw I created separate issue https://github.com/mafaca/UnityRipper/issues/2
Alright, thank you for responding. :-)
fixed. Btw, I added texture export, but it doesn't completed yet and support only native container (dds, pvr, kxt and crn) so don't pay attention to it.
Man, I don't know what the problem is.. It's still happening again. I've tried again with no luck. Oh well, thank you for helping me either way :)
To make sure it's not my PC, i'm gonna try it on another device..
I configured project on AppVeyor https://ci.appveyor.com/project/mafaca/unityripper You can download last binaries going to Configuration Debug/Release -> Artifacts -> UnityRipper.zip I've tested those binaries with file you provided. It works fine. Try to copy your sharedassets8 file in an empty directory and try again.
I will test it right now.
Also, when I open UnityRipper.exe from that link you gave me, should it say "No arguments" until I put in a file?
Yes, it necessarily requires arguments (file(s) path)
Sadly, the same issue still occurs when I downloaded unityripper from appveyor.. I'll ask my friend to see if it works for him later. Thanks for your hard work though :) 👍
@SrfRfRing Have you tried to put sharedassets8.assets file into separate empty directory and process it from there?
Yes, I emptied the C directory, put sharedassets8.assets in there, and then opened UnityRipper from the D directory. I still got the same issue, sadly. :(
Okay, so I tried it on another device, a Windows 7 Laptop instead of Windows 10. The same thing still occurred, sadly.
I double checked code and didn't find any reason for such strange behavior. Try start UR with command prompt. 1) Open cmd.exe https://www.digitalcitizen.life/7-ways-launch-command-prompt-windows-7-windows-8 2) Drag and drop UR exe file onto cmd window 3) Type Space character 4) Drag and drop sharedassets8.assets file into cmd widnow 5) Press enter Any log should be outputted to this cmd window and saved after application exit. Preliminary put sharedassets8.assets file into empty directory.
There's also an error written in red.
"General:General: System.Exception: Unsupported gpu program type DX9VertexSM30 at UnityRipper.Classes.Shaders.ShaderGpuProgramTypeExtensions.ToGPUPlatform(ShaderGpuProgramType _this) in C:\Users\user\Downloads\UnityRipper-master\UnityRipperCore\Parser\Classes\Shader\Enums\ShaderGpuProgramType.cs:line 123 at UnityRipper.Classes.Shaders.SerializedProgram.ToString(StringBuilder sb, SShader shader, ShaderType type) in C:\Users\user\Downloads\UnityRipper-master\UnityRipperCore\Parser\Classes\Shader\SerializedShader\SerializedProgram.cs:line 34 at UnityRipper.Classes.Shaders.SerializedPass.ToString(StringBuilder sb, SShader shader) in C:\Users\user\Downloads\UnityRipper-master\UnityRipperCore\Parser\Classes\Shader\SerializedShader\SerializedPass.cs:line 68 at UnityRipper.Classes.Shaders.SerializedSubShader.ToString(StringBuilder sb, SShader shader) in C:\Users\user\Downloads\UnityRipper-master\UnityRipperCore\Parser\Classes\Shader\SerializedShader\SerializedSubShader.cs:line 36 at UnityRipper.Classes.Shaders.SerializedShader.ToString(StringBuilder sb, SShader shader) in C:\Users\user\Downloads\UnityRipper-master\UnityRipperCore\Parser\Classes\Shader\SerializedShader\SerializedShader.cs:line 40 at UnityRipper.Classes.SShader.ExportBinary() in C:\Users\user\Downloads\UnityRipper-master\UnityRipperCore\Parser\Classes\Shader\SerializedShader\SShader.cs:line 77 at UnityRipper.AssetExporters.BinaryAssetExporter.Export(IExportCollection collection, String dirPath) in C:\Users\user\Downloads\UnityRipper-master\UnityRipperCore\Parser\AssetCollection\Exporter\Exporters\BinaryAssetExporter.cs:line 19 at UnityRipper.AssetExporters.AssetsExporter.Export(String path, IEnumerable`1 objects) in C:\Users\user\Downloads\UnityRipper-master\UnityRipperCore\Parser\AssetCollection\Exporter\AssetsExporter.cs:line 87 at UnityRipper.Program.Main(String[] args) in C:\Users\user\Downloads\UnityRipper-master\UnityRipper\Program.cs:line 56"
You helped me a bunch - thank you! I have managed to export a lot of assets, so thank you. The only problem was the error, that's about it!
I also noticed that it there are some asset files that it doesn't load (from a game called Yandere Simulator).
I fixed the error above https://github.com/mafaca/UnityRipper/issues/4 What do you mean by 'doesn't load'?
This is an error I got trying to open a file named "sharedassets10.assets":
General: System.IO.EndOfStreamException: Unable to read beyond the end of the stream.
at System.IO.BinaryReader.FillBuffer(Int32 numBytes)
at System.IO.BinaryReader.ReadSingle()
at UnityRipper.EndianStream.ReadSingle() in C:\Users\user\Downloads\UnityRipper-master\UnityRipperCore\IO\EndianStream\EndianStream.cs:line 136
at UnityRipper.Classes.Vector4f.Read(EndianStream stream) in C:\Users\user\Downloads\UnityRipper-master\UnityRipperCore\Parser\Classes\Serialize\Vector4f.cs:line 22
at UnityRipper.Classes.AnimationClips.KeyframeTpl1.Read(EndianStream stream) in C:\Users\user\Downloads\UnityRipper-master\UnityRipperCore\Parser\Classes\AnimationClip\KeyframeTpl.cs:line 32 at UnityRipper.IListExtensions.Read[T](IList
1 _this, EndianStream stream, Func1 instantiator) in C:\Users\user\Downloads\UnityRipper-master\UnityRipperCore\IO\Utils\Extensions\IListExtensions.cs:line 27 at UnityRipper.Classes.AnimationClips.AnimationCurveTpl
1.Read(EndianStream stream) in C:\Users\user\Downloads\UnityRipper-master\UnityRipperCore\Parser\Classes\AnimationClip\AnimationCurveTpl.cs:line 24
at UnityRipper.Classes.AnimationClips.QuaternionCurve.Read(EndianStream stream) in C:\Users\user\Downloads\UnityRipper-master\UnityRipperCore\Parser\Classes\AnimationClip\Curves\QuaternionCurve.cs:line 29
at UnityRipper.EndianStream.ReadArray[T](Func1 instantiator) in C:\Users\user\Downloads\UnityRipper-master\UnityRipperCore\IO\EndianStream\EndianStream.cs:line 353 at UnityRipper.Classes.AnimationClip.Read(EndianStream stream) in C:\Users\user\Downloads\UnityRipper-master\UnityRipperCore\Parser\Classes\AnimationClip\AnimationClip.cs:line 35 at UnityRipper.AssetsFiles.AssetPreloadData.Parse(EndianStream stream) in C:\Users\user\Downloads\UnityRipper-master\UnityRipperCore\Parser\AssetsFile\AssetPreloadData.cs:line 138 at UnityRipper.AssetsFiles.AssetsFile.Parse(Stream baseStream) in C:\Users\user\Downloads\UnityRipper-master\UnityRipperCore\Parser\AssetsFile\AssetsFile.cs:line 214 at UnityRipper.AssetsFiles.AssetsFile.Load(String assetPath) in C:\Users\user\Downloads\UnityRipper-master\UnityRipperCore\Parser\AssetsFile\AssetsFile.cs:line 37 at UnityRipper.AssetCollection.LoadAssetsFile(String filePath, String fileName) in C:\Users\user\Downloads\UnityRipper-master\UnityRipperCore\Parser\AssetCollection\AssetCollection.cs:line 51 at UnityRipper.AssetCollection.Load(String filePath) in C:\Users\user\Downloads\UnityRipper-master\UnityRipperCore\Parser\AssetCollection\AssetCollection.cs:line 26 at UnityRipper.AssetCollection.Load(IReadOnlyCollection
1 filePathes) in C:\Users\user\Downloads\UnityRipper-master\UnityRipperCore\Parser\AssetCollection\AssetCollection.cs:line 59
at UnityRipper.Program.Main(String[] args) in C:\Users\user\Downloads\UnityRipper-master\UnityRipper\Program.cs:line 45
Here is the file: https://mega.nz/#!0qQFCKQY!HTF2YxMN0LudIA1G4HKsTDDcEkkexkOZIbWWnYjLtqU
Another thing that happens, when I tried loading resources.assets (which is a heavy 500 mb file), it randomly stopped loading the rest of the assets, and didn't write anything. However, this might just be because it's heavy?
I can't reproduce this error. I had placed 'sharedassets10.assets' file in empty folder, so UR processed it without dependencies, and it was processed without such errors. I fixed several other bugs though. I fixed performance of 'prepare to export' stage. 500mb file should be preprocessed pretty fast now. However, export itself is still very slow. I will try to improve it later.
Ah.. I tried placing it in an empty folder right now, and I still get the same exact error. It's very weird, some items get processed very easily, others not at all. Thanks for responding :]
I optimized memory usage and fixed resource loading bug. Big files should be processed appropriately now.
I will check now - thanks!
Great update! Resources.assets loaded very fast, and exported fast as well. I only got one error General: System.ArgumentException: Illegal characters in path. General: System.ArgumentException: Illegal characters in path. at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional) at System.IO.Path.Combine(String path1, String path2) at UnityRipper.AssetExporters.YAMLAssetExporter.Export(IAssetsExporter exporter, IExportCollection collection, String dirPath) in C:\Users\user\Downloads\UnityRipper-master\UnityRipperCore\Parser\AssetCollection\Exporter\Exporters\YAMLAssetExporter.cs:line 52 at UnityRipper.AssetExporters.AssetsExporter.Export(String path, IEnumerable`1 objects) in C:\Users\user\Downloads\UnityRipper-master\UnityRipperCore\Parser\AssetCollection\Exporter\AssetsExporter.cs:line 97 at UnityRipper.Program.Main(String[] args) in C:\Users\user\Downloads\UnityRipper-master\UnityRipper\Program.cs:line 56
I fixed https://github.com/mafaca/UnityRipper/issues/5 this error. As I see there is problem with prefab export. It is too slow and projects contain too much of them. I don't know how to fix it yet, maybe later I will figure it out.
That's okay! I'm happy that all files work properly now. And one question: Do you think unityripper will support export for C# scripts one day?
I'm planning to add MonoBehaviour script export with public/SerializedField members only (without methods, other fields, non monobeh classes, etc). But if you talking about whole C# project then the answer is no. But still you can do it manually with such tools as Perfare's Il2CppDumper for Il2Cpp and IlSpy for Mono projects.
Thanks for replying!
I fixed prefab export performance. Now it's processed much more faster.
That's awesome! Will download. (Also, is it possible to search for specific assets? I'm not sure if that's available on a console application..)
No, console application is only suitable for exporting all assets from given files. As I told earlier this project mainly intended for developers. Let's hope someday someone write GUI application for it :)
I'm not a developer, but I like it a lot either way. It does the job really well!
For some reason, shaders never work for me. When I put any of them into unity, I get 2 errors: "Parse error: syntax error, unexpected TVAL_ID, expecting TOK_SETTEXTURE or '}'" on line 26 of the shader I will post.
and "Shader is not supported on this GPU (none of subshaders/fallbacks are suitable)"
This happens with ALL of the shaders, but I'll upload one. https://mega.nz/#!4jgjmR5I!g4eyTmEDkOIUL2nuYdyeCWCCf_b91_RANpfO7buOQOw
Unfortunately, currently there is no way to automatically restore shaders to its source state. Shaders are stored in application as compiled data, so the only way to make it work in Unity is to restore them manually. And it is even worth. Android and iOS gles/gles3 shaders are compiled in a human readable text which is pretty easy to manually translate to ShaderLab's HLSL/cg. However, for windows applications Unity uses D3 compiler and translate shader's code into binary form. So it can't be restored even manually (it has to be disassembled first).
Oh! That's okay. I'm still very content with the current features of unityripper. It's really useful.
The readme doesn't have the instructions and the appveyor link seems to be dead. Are there any CI builds so I don't need to build it myself?
@ChildishGiant appveyor is alive and huge green source forge button is alive as well
I'm not very experienced, and I'm having serious trouble installing it. I have both Visual studio and unity studio, but I'm not sure how to get unityripper working.