Ejemplo n.º 1
0
    public static void FMDLWrite(string path)
    {
        FileStream stream = new FileStream(path, FileMode.Create);

        GameObject selectedGameObject = Selection.activeGameObject;
        Fmdl       fmdl = new Fmdl(selectedGameObject.name);

        fmdl.Write(selectedGameObject, stream);

        stream.Close();
    }
Ejemplo n.º 2
0
        public static void ExportFMDLOption()
        {
            if (Selection.activeGameObject != null)
            {
                string windowPath = EditorUtility.SaveFilePanel("Export To FMDL", "", Selection.activeGameObject.name, "fmdl");

                if (!string.IsNullOrWhiteSpace(windowPath))
                {
                    Fmdl fmdl = new Fmdl(Selection.activeGameObject.name);
                    fmdl.Write(Selection.activeGameObject, windowPath);
                    Debug.Log("Fmdl Exported to: " + windowPath);
                } //if
                else
                    Debug.Log("No path selected.");
            }
            else
                Debug.Log("No objects selected.");
        } //ExportFMDLOption