Answer the question
In order to leave comments, you need to log in
Why is the Source Image not checked?
void Start()
{
spr1 = Resources.Load("камень_0");
spr2 = Resources.Load("fs");
}
void IPointerEnterHandler.OnPointerEnter(PointerEventData eventData)
{
if (GetComponent().sprite = spr1)
{
Debug.Log("Enter");
}
}
Answer the question
In order to leave comments, you need to log in
Or maybe it's better to start with the basics of the language?
if (GetComponent().sprite = spr1)
There is a syntax error here (even if you add the component type) - and the compiler tells you about it.
And to make a comparison through resources is the most incorrect
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question