I want to make a point and click game, and the way it’ll work (no idea how to do it any other ways) Is you’ll click on arrows and then it’ll send you to another scene. what I’ve tried so far: I’m
i
f ( Input.GetMouseButtonDown (0)){
RaycastHit hit;
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
if(hit.transform == gameObject) //replace gameobject with the GameObject you want
{
//load your scene here
}
}
}
I have also used this:
using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;
public class cpWarpHouse : MonoBehaviour
{
public string sceneName;
void Update()
{
if (Input.GetMouseButtonDown(0))
{
SceneManager.LoadScene("Scene2);
}
}
}