Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - blueskined

Pages: [1]
1
although I saw the post about get list of the channel, but should such function be supported officially? it is quite a standard function.
otherwise we have to manually add them in on each TNet's update.

2
TNet 3 Support / How To Generate dynamic Channel?
« on: February 26, 2013, 08:42:21 PM »
If I understand correctly so far, it seems player create or join the channel all by specific ID and channel name? (TNManager.JoinChannel(ID, SceneName))
is that possible when player create channel, the id and scene name is dynamically allocated? Player can change the channel name to customer name later? other players can quire the channel list and join them?

like the chess game, when player log in, they can either join other player's created channel, or start his own, when start their own channel, they can set the name of the channel, or password, the meantime, other players can do the same, without any conflict in the channel ID.

3
TNet 3 Support / Unable to save type TNet.TcpProtocol error...
« on: February 20, 2013, 07:14:36 AM »
I am not very experienced on network thing, so I am trying to start a new scene from scratch, trying to get some sense of TNet. Using NTServer.exe standlon on my pc, ip is 192.168.1.6.
I made 2 game objects, 1 TNManager, 1 TNObject, script attached on TNObject, and TNManager Objects reference TNObject. I am trying to setup a very simple scene, just a label, when players click the button cross internet the label will show the player's ID who clicked the button.
  1. using UnityEngine;
  2. using System.Collections;
  3. using TNet;
  4.  
  1.         void Start ()
  2.         {
  3.                 TNManager.Connect(ServerIP);
  4.                 TNManager.StartUDP(Random.Range(10000, 50000));
  5.                 owner = TNManager.player;
  6.         }
  7.  
  1.         void OnGUI()
  2.         {
  3.                 if(GUI.Button(new Rect(ButtonPosition.x, ButtonPosition.y, ButtonSize.x, ButtonSize.y), "Print Info"))
  4.                 {
  5.                         TNObject tno = GetComponent<TNObject>();
  6.                         tno.Send("PrintInstanceInfo", Target.AllSaved, owner);
  7.                 }
  8.                
  9.                 GUI.Label(new Rect(ButtonPosition.x, ButtonPosition.y + 30, ButtonSize.x, ButtonSize.y), labelText, style);
  10.         }
  11.  

  1.         [RFC] void PrintInstanceInfo(Player owner)
  2.         {
  3.                 labelText = "The Last Player Updated is: " + owner.id.ToString();
  4.                 Debug.Log("RFC Function go in");
  5.         }
  6.  
when I play the scene, it work, but when I click the "Print Info" button, I got this error:

Unable to save type TNet.TcpProtocol
UnityEngine.Debug:LogError(Object)
TNet.UnityTools:Write(BinaryWriter, Object[]) (at Assets/TNet/Client/TNUnityTools.cs:260)
TNObject:SendRFC(UInt32, Byte, String, Target, Boolean, Object[]) (at Assets/TNet/Client/TNObject.cs:551)
TNObject:Send(String, Target, Object[]) (at Assets/TNet/Client/TNObject.cs:439)
PrintInfo:OnGUI() (at Assets/TNet/Examples/Scripts/Test/PrintInfo.cs:51)

I am sure I did something wrong, but I just can't figure it out, please help!!
(I haven't even try to create multiple clients yet....)

4
TNet 3 Support / ExampleMenu couldn't find my local machine's ip?
« on: February 20, 2013, 03:49:48 AM »
the example menu working well for 1.3
when I update to 1.5, this example doen't work anymore. when I click start a local server, I can see actually the serverlist's ip is my external ip instead of a Internal IP.
when I click the list button to try to connect, it failed, the message: invald arguments.
what can possibly wrong?

5
NGUI 3 Support / Problem with Sliced Sprite
« on: November 15, 2012, 06:36:00 AM »
the latest version's sliced sprite got some issues, unless I didn't use it correctly.
the middle part supposed to be tiled, instead of scratch longer, this makes the middle part very blur, I remember the older version was tiled all right, I dont know what happend to this version, could u please check? or is there any new way to use ngui now?




Pages: [1]