Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. 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:
    36,336
    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:
    36,336
    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!