On mouse click event won't work

You might have to try "Use Mouse for Touch. For some reasons, the Line Trace doesn’t work the same in editor mode.