Author Topic: Material Support and Tnet Update  (Read 2547 times)

Yarashiel

  • Guest
Material Support and Tnet Update
« on: March 14, 2013, 01:33:24 PM »
Hi everyone.

I'm come back to you because I really can't deal with a RFC problem -_-.
Basically, I'm trying to communicate the change of material of an object. Are Materials supported by Tnet ? (I'm currently using Tnet 1.3.1)
If so, could anyone post an example of such a code ?

I don't understand because I got this working with the colors of a Default Material...

Other query : If I want to update my version of Tnet within my Unity project, what would be the workflow without messing up everything ?

Thanks in advance.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Material Support and Tnet Update
« Reply #1 on: March 14, 2013, 04:11:23 PM »
1. Start a new scene.
2. Delete TNet folder
3. Import the updated TNet package

TNet doesn't handle Material parameters. If you want to change a material, you need to identify it somehow. For example pass "1" to replace it with a red material, "2" to replace it with green, etc.

Yarashiel

  • Guest
Re: Material Support and Tnet Update
« Reply #2 on: March 21, 2013, 12:57:59 PM »
Thank you Aren I could set my materials by doing what you told me too.

I declared my materials into public array (so I could assign them in the inspector), and then all a RFC by specifying an int relating to my array's index I want to ...

I also could succesfully update Tnet. Nevertheless, the only thing that appears to be not working anymore is the "auto sync".

I have an AI "patrol-like" in my game. Until now I was using Auto Sync to keep it simple (it's just a prototype after all ... ). It was working fine (even if there was some latencies issues, because it's a mobile game connecting to a server set on an Amazone Instance).

The AI is "pre-built" on my scene.
It has a script which make it move from a waypoint to another, avoids walls, and reacts to a particular event.
It also has a Tn Object on it, and a "Auto Sync" with every checkboxes checked.

Now, the AI appears at different places on screens. Any idea about this ? (I have no clue, I just updated Tnet, tried to reassign an Auto Sync... ) .

Is there any known issue concerning the "Auto Sync" component ?

Anyway thanks again for you support !

EDIT : more details concerning my AI object ^^'
EDIT 2 : All of the sudden it is now working >_< (I didn't change anything). Thank you anyway Aren :p !
« Last Edit: March 21, 2013, 01:27:13 PM by Yarashiel »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Material Support and Tnet Update
« Reply #3 on: March 22, 2013, 01:50:15 AM »
I love issues that fix themselves! :)