RAW image won't show on UI
Hello, I'm trying to get it so once you press [E] the camera changes and a large hand written raw image displays what's on the floor but larger. Everything is running smoothly but the image won't load on the game's UI after pressing [E]. I'm quite new to Unity and I've tried to make it work without success. If anyone can help me out it would be greatly appreciated. If you need any more info please ask. Thanks in advance, Henry
This is my script for interaction with the note:
public float TheDistance;
public GameObject ActionDisplay;
public GameObject UIQuest;
public GameObject ThePlayer;
public GameObject NoticeCam;
void Update()
{
TheDistance = PlayerCasting.DistanceFromTarget;
}
void OnMouseOver()
{
if (TheDistance <= 50)
{
ActionDisplay.SetActive(true);
}
if (Input.GetButtonDown("Action"))
{
if (TheDistance <= 50)
{
ActionDisplay.SetActive(false);
UIQuest.SetActive(true);
NoticeCam.SetActive(true);
ThePlayer.SetActive(false);
}
}
}
void OnMouseExit()
{
ActionDisplay.SetActive(false);
}
}
unityforum1.jpg
(505.5 kB)
Comment