Author Topic: Getting Started  (Read 1956 times)

vidjogamer

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 48
    • View Profile
Getting Started
« on: December 03, 2013, 06:16:56 PM »
Hello, I'm just trying to figure out how TNet works. I downloaded the StarlinkUI project and I am able to create a build of the basic menu and game scenes and run two instances of that build on my computer and chat between them. So the networking is working. I want to know how to add my own functionality to the game scene. Right now I added a default sphere and attached the TNet ColoredObject component. It works if you play the scene inside of Unity, and also works if I launch the build .exe selecting the Single Player mode from the StarLink Menu Scene. However, if I create a LAN the ColoredObject script does not seem to work. The "void OnClick()" function is called but the "[RFC] void OnColor (Color c)" never gets called. Again, the StarLink chat functionality DOES work. What am I missing here?

vidjogamer

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 48
    • View Profile
Re: Getting Started
« Reply #1 on: December 03, 2013, 07:25:36 PM »
Ok, it seems to be working now that I gave the Sphere object's TNObject component an ID other than 0.

Can someone confirm if this is usual behavior and if so, explain what is going on. Thanks!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Getting Started
« Reply #2 on: December 03, 2013, 09:05:27 PM »
TNO ID of 0 means "dynamically set on object instantiation". If it's not, you should give it a unique value.