disunity icon indicating copy to clipboard operation
disunity copied to clipboard

Error when bundle extracting with property file

Open davidferguson opened this issue 8 years ago • 1 comments

I'm trying to extract, modify and then pack a .unity3d webplayer bundle. Looking at the readme, I need to unpack with the --prop option to generate a bundle property file which is needed to repack the bundle. However, when I use the --prop option, I get an error. The files are extracted, however no property file is created.

My file is main.unity3d, the output folder is unpacked

Running the command ./disunity.sh bundle unpack --output unpacked --prop main.unity3d gives me the output:

thelabKunaiEngine.dll
thelabForgeEngine.dll
aquirisSplatPainterEngine.dll
UnityScript.Lang.dll
System.Xml.dll
Boo.Lang.dll
Assembly-UnityScript.dll
Assembly-UnityScript-firstpass.dll
Assembly-CSharp.dll
Assembly-CSharp-firstpass.dll
sharedassets0.assets
resources.assets
mainData
sharedassets1.assets
level0
[error] DisUnityCli: Fatal error, caused by java.lang.NullPointerException
	at info.ata4.disunity.cli.command.bundle.BundleUnpack.runFile(BundleUnpack.java:102)
	at java.util.ArrayList.forEach(ArrayList.java:1249)
	at info.ata4.disunity.cli.command.FileCommand.run(FileCommand.java:32)
	at info.ata4.disunity.cli.command.Command.run(Command.java:50)
	at info.ata4.disunity.cli.command.Command.run(Command.java:50)
	at info.ata4.disunity.cli.command.DisUnityRoot.run(DisUnityRoot.java:62)
	at info.ata4.disunity.cli.DisUnityCli.main(DisUnityCli.java:46)```

davidferguson avatar Jun 25 '17 16:06 davidferguson

There's a few parts of disunity that don't like relative paths, and it looks like this is one of them. That line is

Path propsFile = outputDir.getParent().resolve(bundleName + ".json");

so I'd guess it's outputDir.getParent() that's null. Try specifying at least --output as an absolute path (or possibly .\unpacked will do).

RupW avatar Jun 25 '17 21:06 RupW