private void LoadAssetsFile(string path)
        {
            OpenAssetsDialog openFile = new OpenAssetsDialog(path);

            openFile.ShowDialog();
            if (openFile.selection > -1)
            {
                LoadMainAssetsFile(helper.LoadAssetsFile(path, openFile.selection == 1));
            }
        }
Beispiel #2
0
        private void addFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.DefaultExt = "";
            //ofd.Filter = "Unity content (*.unity3d;*.bundle;*.assets;globalgamemanagers;unity_builtin_extra;unity default resources)|*.unity3d;*.bundle;*.assets;globalgamemanagers;unity_builtin_extra;unity default resources|Bundle file (*.unity3d;*.bundle)|*.unity3d;*.bundle|Assets file (*.assets)|*.assets|Level file (level*)|level*|All types (*.*)|*.*";
            if (ofd.ShowDialog() == DialogResult.OK)
            {
                OpenAssetsDialog openFile = new OpenAssetsDialog(ofd.FileName);
                openFile.ShowDialog();
                if (openFile.selection > -1)
                {
                    AssetsFileInstance inst = helper.LoadAssetsFile(ofd.FileName, (openFile.selection == 0) ? false : true);
                    inst.table.GenerateQuickLookupTree();
                    helper.UpdateDependencies();
                    UpdateFileList();
                    string fileName = Path.GetFileName(ofd.FileName);
                    currentFile = inst;
                    if (fileName == "resources.assets")
                    {
                        LoadResources(inst);
                    }
                    else if (fileName == "globalgamemanagers")
                    {
                        LoadGGM(inst);
                    }
                    else if (fileName.StartsWith("level"))
                    //else if (Regex.Matches(fileName, @"/^level\d+$/g").Count > 0)
                    {
                        LoadGeneric(inst, true);
                    }
                    else if (fileName.StartsWith("sharedassets"))
                    //else if (Regex.Matches(fileName, @"/^sharedassets\d+.assets$/g").Count > 0)
                    {
                        LoadGeneric(inst, false);
                    }
                    else if (fileName == "unity default resources")
                    {
                        LoadGeneric(inst, false);
                    }
                    else
                    {
                        LoadGeneric(inst, false);
                    }
                }
            }
        }
Beispiel #3
0
        private void addFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.DefaultExt = "";
            if (ofd.ShowDialog() == DialogResult.OK)
            {
                OpenAssetsDialog openFile = new OpenAssetsDialog(ofd.FileName);
                openFile.ShowDialog();
                if (openFile.selection > -1)
                {
                    AssetsFileInstance inst = helper.LoadAssetsFile(ofd.FileName, (openFile.selection == 0) ? false : true);
                    inst.table.GenerateQuickLookupTree();
                    helper.UpdateDependencies();
                    UpdateFileList();
                    string fileName = Path.GetFileName(ofd.FileName);
                    currentFile = inst;
                    LoadGeneric(inst, false);
                }
            }
        }