示例#1
0
        /// <summary>
        /// Returns children assets
        /// </summary>
        /// <returns></returns>
        public List <ArkAsset> GetAssetChildren()
        {
            List <ArkAsset> children = new List <ArkAsset>();

            string[] paths = Directory.GetFiles(pathname);
            foreach (var p in paths)
            {
                children.Add(ArkAsset.GetAssetFromFolderPath(p, installation));
            }
            return(children);
        }
示例#2
0
        /// <summary>
        /// Returns a named child asset. Does NOT include the extension and assumes it is a usasset
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public ArkAsset GetAssetChildByName(string name)
        {
            //Get the pathname
            string path = pathname + name + ".uasset";

            //Make sure this exists
            if (!File.Exists(path))
            {
                throw new Exception("Could not get child file because it did not exist!");
            }

            //Get
            return(ArkAsset.GetAssetFromFolderPath(path, installation));
        }