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 - gevarre

Pages: [1]
TNet 3 Support / TNManager.isHosting always returning true
« on: February 05, 2016, 03:07:49 PM »
So I'm trying to get a spawning system going for target objects controlled by the host. I've got this at the start of the control script:

  1. using UnityEngine;
  2. using System.Collections;
  3. using TNet;
  5. public class TargetSpawnControl : TNBehaviour
  6. {
  7.         public GameObject target;
  8.         public GameObject[] targetSpawners;
  9.         public bool hosting = false;   
  11.         void Awake()
  12.         {
  13.                 Debug.LogError(TNManager.isHosting);
  15.                 if(!TNManager.isHosting) return;
  16.                 if(TNManager.isHosting) hosting = true;
  18.                 StartCoroutine(StartTargetSpawnTimer());       
  19.         }
  20. }

But for some reason, no matter what I do, TNManager.isHosting always returns true on all the clients and hijinks ensue. Anyone know what's happening? I'm taking this from the tutorial here.

TNet 3 Support / Tnet and Unity's FPSController
« on: February 04, 2016, 03:49:03 PM »
Anyone had any luck using unity's Standard Asset FPSController?

If I set it up with a TNObject script and TNAutoSynch on the base transform, all is well, but when I try to add the same thing to the "head", in their case what they've labeled "FirstPersonCharacter", (adding either a rotation or localRotation parameter to TNAutoSync) I get "Mismatched number of parameters sent via TNAutoSync!" errors every time I rotate the head transform.

I'm guessing it has to do with the way Unity has the whole prefab set up and I'll just have to create a character from scratch, but I thought I'd ask if anyone else has had success with this first.

TNet 3 Support / if(TNManager.isThisMyObject) error message
« on: February 03, 2016, 07:58:30 PM »
Hi, I'm using Tnet 3 and following the old "TNet: Making a Game from Scratch" tutorial.

In my GamePlayer script I've got this:

  1. using UnityEngine;
  2. using TNet;
  4. public class GamePlayer : TNBehaviour
  5. {
  7.         static public GamePlayer instance;
  9.         void Awake()
  10.         {
  11.                 if(TNManager.isThisMyObject)
  12.                 {
  13.                         instance = this;
  14.                 }
  15.         }
  16. }

Unfortunately, I'm getting this error:
Assets/_Scripts/GamePlayer.cs(11,30): error CS0117: `TNManager' does not contain a definition for `isThisMyObject'

Any ideas? It's a new, empty project and I'm using Unity 5.3.1f1

Note: at 15.28 of the tutorial video, the GameObject in the start scene suddenly has the TNManager script attached to it. If I just click on the "Add Component" button, this doesn't show up. I had to manually find the script and drag it onto the object. Could this be significant or just the way it works?

TNet 3 Support / Stuck on "Connection" Screen
« on: September 10, 2014, 01:13:52 PM »
so I've followed the examples and created the basic game.

If I start TNserver, I can connected to it and play the game just fine on one computer. The problem is, if I start the server and then try to connect on any other computer in the house, it loads the start scene with the "Connecting" text, and just sits there.

The server shows the Gateway and External IP's and says that all ports were opened successfully: lobby server started on port 5129 with interface and game server started on port 5127.

I know this could be a lot of things, but any thoughts on what to check? Are there any diagnostics I can add to the scripts to help figure out what's going on? I'm running the server on Windows 7, and the first time I ran it I did make sure that both the "private" and "public" checkboxes were checked, then restarted it.

I'm a little concerned because if I'm going to release something publicly, it has to just work without the end user having much IT knowledge and I thought this was what Tnet was specifically good for. On the other hand, if it's something peculiar that I've messed up with my own network setup that has nothing to do with Tnet, then obviously I need to figure that out, too.

All help and thoughts are appreciated. Thanks.

NGUI 3 Support / How to do a circular progress bar?
« on: July 19, 2013, 11:03:14 PM »
Okay, so I've been watching/reading too many tutorials and now I can't remember where I've found things.

I'm trying to do a progress bar, but instead of a bar that fills, I'd like to take a sprite that has an image of a circle and slowly reveal it, if that makes any sense. I thought I had seen somewhere where there was a setting in one of the scripts to select a straight or circular "wipe", but maybe I'm mistaken.

Anyway, anyone have any thoughts on how to do this?


I need to send a text string to a label at runtime that consists of several segments seperated by new line feed character. The NGui docs say to use \n in the text string to do this, but it doesn't actually work. It just prints that along with the rest of the text on one long line.

I have Encoding checked, but unfortunately, the docs are obviously for an outdated version of the label and the options are not the same, so I don't know if things have changed or what. I am using the full version of NGui, not the free one, if that makes a difference.

Does anyone know how to do this?

Love the package, but I'm having a few issues. I'm converting a project from straight Unity networking. The player is a vehicle, so it's input forces that are interpolated using M2H's "NetworkRigidBody.cs" script. This works just fine in the original project, but I'm looking for a similar solution with Tnet.

From reading the posts here, it seems that there's supposed to be no need for this with Tnet, but I'm seeing horrendous jittering, the same as I had with the original project Until I added the interpolation script. the way it would work is that the network view would watch the script, the script would interpolate/extrapolate where the player was supposed to be, then the network view would send the data using stream.isWriting, etc. I have no idea what would be analogous to this in Tnet. Anyone have any ideas?

It would be so immensly helpful if there was an fps example included in the package that people could build on, or even just something using the character controller. The included click-to-move sample is sort of helpful, but I don't think it's really all that applicable to the majority of users. Is anyone working on this?

Pages: [1]