Home>
I want to instantiate by reading prefab from URL in C # of Unity

I want to instantiate by reading prefab from URL in Unity's C #.
I read the image from the URL and displayed it in RawImage, but I don't know how to do prefab.

Error message

The source code below
GameObject HogeObj = www;
Gives the error below

Unable to implicitly convert type 'UnityEngine.WWW' to 'UnityEngine.GameObject'
Applicable source code
using UnityEngine;
using System.Collections;
public class WWWLoader: MonoBehaviour
{
    IEnumerator Start ()
    {
        string url = "https://www.dropbox.com/s/s4ycl5ry9t6seub/Cube.prefab?dl=1";
        WWW www = new WWW (url);
        yield return www;
        GameObject HogeObj = www;
        Instantiate (HogeObj, new Vector3 (0, 0, 0), Quaternion.identity);
    }
}
Source code for images loaded from URL (success)
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class ImageDownloder: MonoBehaviour
{
    IEnumerator Start ()
    {
        string url = "http://www.wanpug.com/illust/illust3038.png";
        WWW www = new WWW (url);
        yield return www;
        RawImage rawImage = GetComponent<RawImage>();
        rawImage.texture = www.textureNonReadable;
        rawImage.SetNativeSize ();
    }
}
Tried

GameObject HogeObj = www;
I tried what appears in the candidate at www. But I got an error.

I examined how to convert UnityEngine.WWW'to'UnityEngine.GameObject&apos ;, but I didn't understand

Supplemental information

Unity 2018.2.2f1 Personal
Build target iOS 11.4
Visual Studio 2017
Development PC Windows 10, MacBook