Example #1
0
        public CustomLevelLoader(string path)
        {
            AssetsConfig config = new AssetsConfig()
            {
                RootFileProvider = new BundleFileProvider(path, false),
                AssetsPath       = path.GetDirectoryFwdSlash()
            };

            Engine = new AssetsEngine(config, "NONE");
        }
Example #2
0
        static void Main(string[] args)
        {
            string bundleFile;

            if (args.Length == 2)
            {
                bundleFile = args[1];
            }
            else
            {
                Console.WriteLine("Enter the path to your unity3d file or drag and drop your unity3d file into this window and press enter...");
                Console.WriteLine("THIS PATH MUST HAVE NO SPACES!");
                bundleFile = Console.ReadLine();
            }
            bundleFile = bundleFile.Replace("\"", "");
            try
            {
                AssetsConfig config = new AssetsConfig()
                {
                    RootFileProvider = new BundleFileProvider(bundleFile, false),
                    AssetsPath       = bundleFile.GetDirectoryFwdSlash()
                };
                Engine = new AssetsEngine(config, "NONE");
                Console.WriteLine("Press (1) for dumps (2) for parse");
                Console.WriteLine("Dumps will be created in: dumps/ and raws/");
                var key = Console.ReadKey();
                switch (key.KeyChar)
                {
                case '1':
                    DumpKnowns();
                    break;

                case '2':
                    LoadDumps();
                    Engine.Save();
                    break;

                default:
                    throw new InvalidOperationException("Must press either 1 or 2!");
                }
            } catch (Exception e)
            {
                Console.Write(e);
            } finally
            {
                Console.WriteLine("\nPress enter to close...");
                Console.ReadLine();
            }
        }