Ejemplo n.º 1
0
        /// <summary>
        /// Creates a new empty GUI skin in the specified folder.
        /// </summary>
        /// <param name="folder">Folder relative to project library to create the GUI skin in.</param>
        public static void CreateEmptyGUISkin(string folder)
        {
            string path = Path.Combine(folder, "New GUI Skin.asset");

            path = GetUniquePath(path);

            GUISkin guiSkin = new GUISkin();

            ProjectLibrary.Create(guiSkin, path);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a new empty string table in the specified folder.
        /// </summary>
        /// <param name="folder">Folder relative to project library to create the string table in.</param>
        public static void CreateEmptyStringTable(string folder)
        {
            string path = Path.Combine(folder, "New String Table.asset");

            path = GetUniquePath(path);

            StringTable stringTable = new StringTable();

            ProjectLibrary.Create(stringTable, path);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Creates a new material with the default shader in the specified folder.
        /// </summary>
        /// <param name="folder">Folder relative to project library to create the material in.</param>
        public static void CreateEmptyMaterial(string folder)
        {
            string path = Path.Combine(folder, "New Material.asset");

            path = GetUniquePath(path);

            Material material = new Material(Builtin.GetShader(BuiltinShader.Standard));

            ProjectLibrary.Create(material, path);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Creates a new empty sprite texture in the specified folder.
        /// </summary>
        /// <param name="folder">Folder relative to project library to create the sprite texture in.</param>
        public static void CreateEmptySpriteTexture(string folder)
        {
            string path = Path.Combine(folder, "New Sprite Texture.asset");

            path = GetUniquePath(path);

            SpriteTexture spriteTexture = new SpriteTexture(null);

            ProjectLibrary.Create(spriteTexture, path);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Creates a new physics material with the default properties in the specified folder.
        /// </summary>
        /// <param name="folder">Folder relative to project library to create the material in.</param>
        public static void CreateEmptyPhysicsMaterial(string folder)
        {
            string path = Path.Combine(folder, "New Physics Material.asset");

            path = GetUniquePath(path);

            PhysicsMaterial material = new PhysicsMaterial();

            ProjectLibrary.Create(material, path);
        }