Hello I’m trying to setup a photon cloud server but I have come into a problem when scripting in Js.
As far as I can tell in order to be able to use photonView in a C# script you need to have
public class RandomMatchmaker : Photon.MonoBehaviour{
Is there anyway to accomplish this in a Js script?
I have tried adding
import Photon.MonoBehaviour;
to the beginning of my Js script and my error in Unity changes from this
Assets/_Scripts/Movement.js(16,12): BCE0005: Unknown identifier: ‘photonView’.
to this
Assets/_Scripts/Movement.js(16,12): BCE0020: An instance of type ‘Photon.MonoBehaviour’ is required to access non static member ‘photonView’.
so I assume I’m doing something right? When it comes to these namespaces (or whatever they are called) I don’t know what I’m doing. Any help would be much appreciated.
Thanks!