Пример #1
0
        /// <summary>
        /// Initializes and returns a newly created <see cref="ISN_NSURL"/> object as a file URL with a specified path.
        /// </summary>
        /// <param name="path">The path that the <see cref="ISN_NSURL"/> object will represent.
        /// path should be a valid system path, and must not be an empty path.
        /// </param>
        public static ISN_NSURL FileURLWithPath(string path)
        {
            var uri = new ISN_NSURL();

            uri.m_url  = path;
            uri.m_type = URLType.File;

            return(uri);
        }
Пример #2
0
        /// <summary>
        /// Initializes and returns a newly created <see cref="ISN_NSURL"/> object as a file URL with a specified path
        /// relative to the unity StreamingAssets folder.
        /// </summary>
        /// <param name="path">The path that the <see cref="ISN_NSURL"/> object will represent.
        /// path should be a valid StreamingAssets folder relative path, and must not be an empty path.
        /// </param>
        public static ISN_NSURL StreamingAssetsURLWithPath(string path)
        {
            var uri = new ISN_NSURL();

            uri.m_url  = Path.Combine(Application.streamingAssetsPath, path);
            uri.m_type = URLType.File;

            return(uri);
        }
Пример #3
0
        /// <summary>
        /// Creates and returns an NSURL object initialized with a provided URL string.
        /// </summary>
        /// <param name="url">
        /// The URL string with which to initialize the NSURL object.
        /// Must be a URL that conforms to RFC 2396.
        /// This method parses URLString according to RFCs 1738 and 1808..
        /// </param>
        public static ISN_NSURL URLWithString(string url)
        {
            var uri = new ISN_NSURL();

            uri.m_url  = url;
            uri.m_type = URLType.Default;

            return(uri);
        }