I added a basic monobehaviour with an OnMouseDown() function to a network spawnable object . This is so the player can select the object at runtime by clicking on it.
The OnMouseDown() works when the object is in the scene at startup, but not if it's instantiated at runtime using PhotonNetwork.Instantiate()
Assistance is appreciated.
Snippit:
using UnityEngine;
using System.Collections;
public class Commandable : MonoBehaviour
{
public void OnMouseDown()
{
Debug.Log("OnMouseDown");
}
}
The OnMouseDown() works when the object is in the scene at startup, but not if it's instantiated at runtime using PhotonNetwork.Instantiate()
Assistance is appreciated.
Snippit:
using UnityEngine;
using System.Collections;
public class Commandable : MonoBehaviour
{
public void OnMouseDown()
{
Debug.Log("OnMouseDown");
}
}