How can I create an icon at the center of an object targeted and stay put no matter where the players is. The script I’ve made is on the object itself.
This is what I’ve got so far. Any assistance is welcome! Thanks.
private Transform myTransform;
public Texture2d icon1;
void Start ()
{
myTransform = transform;
}
void OnGUI()
{
Vector2 myPos = myTransform.position;
GUIStyle myStyle = new GUIStyle(GUI.skin.label);
GUI.Label(new Rect(myPos[0], myPos[1], 50, 50), icon1);
}
Stop spamming link that is not even working.
– Lovrencthank you for the reply. page says "This ID doesn't exist!"
– GlitchBait