In may game user can change cloths of character but I want to updates the new clothes via internet.
1 Answer
1You haven’t asked a question, but the answer is probably the WWW class:
using UnityEngine;
using System.Collections;
public class Example : MonoBehaviour {
public string url = "http://yourserver.com/yournewclothes.jpg";
IEnumerator Start() {
WWW www = new WWW(url);
yield return www;
renderer.material.mainTexture = www.texture;
}
}
Thanks for the answer!! is it easy by this way or Assetbundle?
– ganesh.pingaleHow do you define "easy"? The above does what you asked in under 10 lines of code... if you want to have downloadable clothes "packs", for example, that update your game then asset bundles are probably what you're looking for.
– tanoshimi