How do i send a massage from a .js in a gameobject to a .cs in a folder?
Are you referring to SendMessage()?
What do you mean to a .cs in a folder? Is the .cs not a monobehavior script
Game.cs
using System;
using System.Collections;
using System.Collections.Generic;
using ExitGames.Client.Photon;
public class Game : IPhotonPeerListener
You should have a monobehavior script that instantiates (using “new”) your Game class. The mono script will have a function that will call whatever you want from the Game.cs.
From the .js look for that game object (by name or tag, e.g. GameObject.Find(“NameOfGameObject”) ).
Once you have the game object, call send message from the game object, e.g. gameObject.SendMessage(“NameOf_CS_Function”).
You can also try and rearrange your js and cs files, so that the cs will be under the “Plugin” folder in the project browser and the js files under your custom folder (not under plugin!). This way your cs will know the js, and you won’t need to use SendMessage at all.