Fixed playerCanvas issues with ui

This commit is contained in:
Evan Nydahl
2022-03-11 15:27:54 -06:00
parent 38e01ac1e5
commit bc9a6715da
4 changed files with 34 additions and 92 deletions

View File

@@ -73,6 +73,7 @@ public class PopUpScript : MonoBehaviour
temp.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f);
//due to low number, gonna hardcode this to be first
temp.transform.localPosition = new Vector3(0, 0);
temp.transform.localRotation = Quaternion.identity;
//set icon to ui icon
temp.transform.GetComponent<Image>().sprite = item.itemSprite;
//set text
@@ -102,6 +103,7 @@ public class PopUpScript : MonoBehaviour
temp.transform.SetParent(canvas.transform);
temp.name = "SlidePopUp";
temp.transform.localScale = new Vector3(1.0f, 1.0f, 1.0f);
temp.transform.localRotation = Quaternion.identity;
//due to low number, gonna hardcode this to be first
temp.transform.localPosition = new Vector3(0, 0);
//set text