How to convert this code to get prefab or FPS model rather then a sprite image. i try to write gameobject but it doesn't work ?,how we can convert this code to get PREFAB or FBS model rather then Sprite image.. i try to write gamwobject but it donesn't work ?
............
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class SelectionScript : MonoBehaviour {
public Image selectionimage;
public GameObject[] player ;
//public List Itemlist = new List();
private int itemspot= 0;
public void rightselection()
{
if (itemspot < player.Count - 1)
{
itemspot++;
selectionimage = player[itemspot];
}
}
public void leftseletion()
{
if (itemspot > 0)
{
itemspot--;
selectionimage= player[itemspot];
}
}
}
↧