예제 #1
0
        /// <summary>
        /// Called only if RequiresLocationGUI is false.
        /// Returns the information necessary to locate the export operation.
        /// By default it lets the user select a path as string[1].
        /// </summary>
        public virtual bool ExportLocationArgsSelection(string canvasName, out object[] locationArgs)
        {
            string path = null;

#if UNITY_EDITOR
            path = UnityEditor.EditorUtility.SaveFilePanel(
                "Export " + FormatIdentifier + (!string.IsNullOrEmpty(FormatDescription)? (" (" + FormatDescription + ")") : ""),
                "Assets", canvasName, FormatExtension.ToLower());
#endif
            locationArgs = new object[] { path };
            return(!string.IsNullOrEmpty(path));
        }
        public TestsFormatting()
        {
            book = new Book()
            {
                Author        = "Author",
                Name          = "Name",
                Cost          = 100,
                NumberOfPages = 826,
                Publisher     = "Publisher",
                Year          = 2012,
            };

            extension = new FormatExtension();
        }