Author Topic: info on tnet  (Read 5826 times)

pcutile

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 81
    • View Profile
info on tnet
« on: July 25, 2014, 09:24:16 AM »
i want buy it but i need some info because i understood well.

1) RFC function what type on data i can use in parameter?
 for example i can use int, float, string, custom type, gameobject?

i need a sync abot custom type like this..
public class Categorie : MonoBehaviour {
   
   public string parent_id="0";
   public GameObject root;
   public Categorie catscript;
   public GestoreCategory gestcat;
   public Panel_Show_Cat psc;
   public Category element,catzero;
   public GameObject lemecat;
   public int minindex=1,maxindex=5000;
   public int currentindex=1,lastindex=0;
   public int voiceinpanel=0;
   public GameObject rigazer,rigazer2,nuovariga,pivot;
   public UILabel labteorem,labteorem2;
   public UIPanel elencocategorie,elencocategorie2,ele3;
   public rigazero rigazeroscript,rigazeroscript2,rigazeroscript3;
   public UIButton b1;
   public Vector3 coords;
   
.......
}



ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: info on tnet
« Reply #1 on: July 26, 2014, 04:00:05 AM »
Any value type, including custom classes, but not Unity components passed by reference. This means you can't pass game objects, MonoBehaviours, transform references, etc. You can pass your own custom classes though. Basically anything that's serializable into a stream can be passed as an argument.

pcutile

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 81
    • View Profile
Re: info on tnet
« Reply #2 on: July 26, 2014, 07:44:46 AM »
arenmook ok thanks as always for your patience.
Do not get mad if I tell you to assess your suite but I am using an older version (1.7 ....) downloaded from the net. However quiet I have no intention of using this version in my commercial software. When I have problem make rfc
for example ... i make like this ...

[RFC] public void OnSyncCat (string x1, x2 string) {....
}
/ / Test or second type of call
[RFC] public void OnSyncCat (Category cat) {....
}

if you can give some suggestion to clarify this problem i can buy it tonight ..
please post some rfc to sync the class that i show you in previous comment ...

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: info on tnet
« Reply #3 on: July 27, 2014, 03:31:03 AM »
1.7 doesn't have support for sending of custom data. It's too old.

pcutile

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 81
    • View Profile
Re: info on tnet
« Reply #4 on: July 27, 2014, 05:14:13 AM »
ok thanks, but if i can see example with actual code it's equal...

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: info on tnet
« Reply #5 on: July 27, 2014, 11:27:48 PM »
Example of what? [RFC] void OnSyncCat (Category cat) {} will work just fine, provided Category only contains serializable types (meaning no GameObject, no Panel references, no UIButton references, etc). As I said -- serializable data synchronizes just fine. References do not.

You can derive your Category class from IBinarySerializable and add your own serialization / deserialization functions however, and then it would sync everything you want, including references if you are smart about how you do that (the only way to sync references is to send TNObject IDs across, then find game objects using TNObject.Find(id).

pcutile

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 81
    • View Profile
Re: info on tnet
« Reply #6 on: July 29, 2014, 07:09:42 AM »
thanks arenmook.
My problem was because with 1.7.. give me some error, i will try new version, but at this time i must ask you, why so high price for tnet :-) can you give me some discounts (why it never appear in discount section of asset store???).
Excuse me me for this but at this time is a very high price, i wait to discount but seems is not possibile..or yes? :-)
In any case thanks.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: info on tnet
« Reply #7 on: July 30, 2014, 11:08:33 AM »
As I mentioned, 1.7 is too old and doesn't support this functionality.

$65 is high price? o_O NGUI costs $95 per seat. TNet isn't even per-seat. If that's too high, then I suggest waiting until it's on sale.