What do you want to save?
Add Code snippet
New code examples
-
C# 2022-02-12 04:45:13
first person camera controller unity
//Fixed the issues with the previous controller using System.Collections; using System.Collections.Generic; using UnityEngine; public class CameraLook : MonoBehaviour { public float minX = -60f; public float maxX = 60f; public float sensitivity; pub... Add solution -
C# 2021-11-18 23:50:14
detecting a right click unity
function Update() { if(Input.GetMouseButtonDown(0)) Debug.Log("Pressed left click."); if(Input.GetMouseButtonDown(1)) Debug.Log("Pressed right click."); if(Input.GetMouseButtonDown(2)) Debug.Log("Pressed middle click.&quo... Add solution -
Other 2021-11-09 23:49:07
3d mouse raycast object hit name
if ( Input.GetMouseButtonDown (0)){ RaycastHit hit; Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); if ( Physics.Raycast (ray,out hit,100.0f)) { StartCoroutine(ScaleMe(hit.transform)); Debug.Log("You selected the &q... Add solution -
C# 2021-11-06 02:59:12
how to fix on Input.GetMouseButtonDown(0) conting as ui
using UnityEngine.EventSystems; void Update() { if (Input.GetMouseButtonDown(0)) { // This line prevents the Code from activating UI if (EventSystem.current.IsPointerOverGameObject()) return; // Put your code ... Add solution
Best helpers
Ranking is empty