Unity Ninja Unity 3D Forum
To have exclusive access to all downloads, recourses and links within this forum, a free registered account is required. Just a heads up Wink

You are not connected. Please login or register

Unity Ninja Unity 3D Forum » HELP » Help (General) » [SOLVED]Unity 2017.1.0f3 UriFormatException: Invalid URI: Invalid port number

[SOLVED]Unity 2017.1.0f3 UriFormatException: Invalid URI: Invalid port number

View previous topic View next topic Go down  Message [Page 1 of 1]

MotionBrain


Member [Lv. 1]
Member [Lv. 1]
Hey Guys,

I'm on windows 10 and my unity projekt it's a VR application with the HTC-Vive - don't know if you need this informations but here we go!

I recently updated my Unity 5.6 to Unity 2017.1.0f3 I get on my currently working project this error :
**
UriFormatException: Invalid URI: Invalid port number
System.Uri.Parse (UriKind kind, System.String uriString)
System.Uri.ParseUri (UriKind kind)
System.Uri..ctor (System.String uriString, Boolean dontEscape)
System.Uri..ctor (System.String uriString)
UnityEngineInternal.WebRequestUtils.MakeInitialUrl (System.String targetUrl, System.String localUrl) (at C:/buildslave/unity/build/Runtime/WebRequest/Managed/WebRequestUtils.cs:481)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
JoachimLipka.<LoadAssetBundles>c__Iterator0:MoveNext() (at Assets/Scripts/SystemController Login/AssetBundleAdministration.cs:258)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
**
This error appears on this line

Code:
yield return StartCoroutine(GetComponent<LoadDatafiles>().LoadAssetBundle<Sprite>(assetDataPath, deviceImagesAsset, deviceImages));

where i have

Code:
public IEnumerator LoadAssetBundle<T>(string dataPath, string datafileName, List<T> assets) where T : UnityEngine.Object
        {
            if (File.Exists(dataPath + "/" + datafileName))
            {
                 WWW www = W(W)W.LoadFromCacheOrDownload("file:///" + dataPath + "/"
                     + datafileName, 1);
                yield return www;
 

I want to download assetbundles from a local path. It worked like a charm back in unity 5.6 ... please i need your help !


Thank you for your help,

Joachim



Last edited by MotionBrain on Tue Jul 18, 2017 4:54 pm; edited 1 time in total

View user profile

2 Solved on Tue Jul 18, 2017 4:53 pm

MotionBrain


Member [Lv. 1]
Member [Lv. 1]
I changed this line

Code:
WWW www = W(W)W.LoadFromCacheOrDownload("file:///" + dataPath + "/" + datafileName, 1);
to this
Code:
WWW www = new W(W)W(dataPath + "/" + datafileName);

View user profile

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum