Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

UnityWebRequest Loading materials

Discussion in 'Scripting' started by btckey, Mar 20, 2021.

  1. btckey

    btckey

    Joined:
    Nov 1, 2012
    Posts:
    40
    Good day
    How can I download materials from the server and assign them to GameObject ?
    using UnityWebRequest
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,519
    Asset bundles or addressibles are your best bet.
     
  3. btckey

    btckey

    Joined:
    Nov 1, 2012
    Posts:
    40
    After i have loaded the stuff how can i assign it to GameObject
    AssetBundle bundle = DownloadHandlerAssetBundle.GetContent(uwr);
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,519
    Definitely work through any one of the Unity asset bundle tutorials, or the other ones available online. No sense somebody here laboriously retyping everything and then getting it wrong!