Answer the question
In order to leave comments, you need to log in
Why is the click method not working? InputValue?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.PlayerLoop;
public class TapMoving : MonoBehaviour
{
public Variables variables;
public Vector2 vector2;
public Vector2 playerVector;
public GameObject objectThis;
public void Move(InputValue value)
{
Debug.Log(123);
vector2 = value.Get<Vector2>();
objectThis.transform.position = new Vector3(vector2.x, vector2.y, 1);
}
}
Answer the question
In order to leave comments, you need to log in
Friend, if the game is for mobile phones, then this needs to be added and implemented then, see:
public class Click : MonoBehaviour , IPointerHandler{
public void OnPointerUp(PointerEventData eventData)
{
персонаж.что-то там туда сюда // к примеру сделал что-то
}
public void OnPointerDown(PointerEventData eventData)
{
персонаж.перестал свое что-то там туда сюда // перестал делать это что-то
}
public void Onclick()
{
ну вот что-то там где-то сработало
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question