Are there any known issues with parameters not getting pass or passed unreliably?
I'm passing a simple int to a function using tno.Send and it doesn't make it over to the function. Sometimes if I call SendQuickly it will work but its unreliable. I could be in an edge-case situation but I can't be sure. In doing my debug tracing I know the value is making it to my GeneratePlanet function just fine but from there it never makes it to the target class and I can't figure out why. Anything glaringly obvious I'm doing wrong here?
Speaking of debugging, sometimes when attaching VS to Unity I sometimes experience issues with all the TNet functions firing. Does that happen to anyone else?
Code sample is as follows:
class PFactory
{
IEnumerator GenerateScene()
{
GUIManager.instance.SetState(GameState.Loader);
GameSettings _settings = ReadSettings();
yield return new WaitForSeconds
(2);
//Some super secret code here ;p
int perlinSeed = Random.Range(0, 90000);
TNet.TNManager.Instantiate(GameNetwork.instance.channel.id, "GeneratePlanet", path, true, perlinSeed);
yield return new WaitForSeconds
(2); //At least 1 seconds of loading screen GameNetwork.instance.isLevelBuilt = true;
}
[TNet.RCC]
static GameObject GeneratePlanet(GameObject prefab, int seedVal)
{
GameObject _planet = Instantiate(prefab) as GameObject;
PBuilder pbr = _planet.GetComponent<PBuilder>();
//tns.tno.Send("Generate", TNet.Target.All, seedVal); //Never works
tns.tno.SendQuickly("Generate", TNet.Target.All, seedVal); //Barely works
//Generate Vegetation
//Cleanup
return _planet;
}
}
class PBuilder
{
[TNet.RFC]
public void Generate(int seed)
{
perlinSeed = seed; //This value is always 0
//Magic Happens
}
}