// methods public GameObject CreateGameObject(string name, string appearance) { GameObject obj = ( GameObject )Instantiate(Resources.Load(Common.AGENT_PREFAB)); obj.name = name; LoadAppearance la = obj.GetComponent <LoadAppearance>(); la.SetAppearance(appearance); return(obj); }
// Awake public void Start() { LoadAppearance la = GetComponent <LoadAppearance>(); la.SetAppearance("innova/demos/appearance/AppPlayer"); }