This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void rayGo() | |
{ | |
//Converting Mouse Pos to 2D (vector2) World Pos | |
Vector2 rayPos = new Vector2(Camera.main.ScreenToWorldPoint(Input.mousePosition).x, Camera.main.ScreenToWorldPoint(Input.mousePosition).y); | |
RaycastHit2D hit = Physics2D.Raycast(rayPos, Vector2.zero, 0f); | |
if (hit) | |
{ | |
Debug.Log(hit.transform.name); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Update() | |
{ | |
if (Application.platform == RuntimePlatform.Android) | |
{ | |
// エスケープキー取得 | |
if (Input.GetKeyDown(KeyCode.Escape)) | |
{ | |
//ダイアログ開く | |
dialogOpen(); | |
} |