Z
Z
Zefirot2021-04-11 12:32:23
Unity
Zefirot, 2021-04-11 12:32:23

How to adjust finger touch on the mouse?

Now I'm rebuilding on the touch in this way

#if UNITY_EDITOR
        void OnMouseDown(){ Ci.OnMouseDownCell(this); }
        void OnMouseOver(){ Ci.OnMouseOverCell(this); }
    #endif
    void Update(){
        #if UNITY_EDITOR
        #else
            if(Input.touchCount > 0){
                Touch touch = Input.GetTouch(0);
                switch(touch.phase){
                    case TouchPhase.Began: Ci.OnMouseDownCell(this); break;
                    case TouchPhase.Moved: Ci.OnMouseOverCell(this); break;
                    case TouchPhase.Ended: Ci.OnMouseOverCell(this); break;
                    }
                }
        #endif

but everything is not going quite smoothly, it doesn’t work as it should, for each test you need to install it on your phone and check if there is some way to turn the mouse into a finger, so to speak?
In order not to run and see how it will be on the phone ....

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
ReyGrau, 2021-04-20
@ReyGrau

Use Unity Remote 5

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question