Tasharen Entertainment Forum

Support => TNet 3 Support => Topic started by: dreb4o on June 02, 2016, 06:25:32 PM

Title: TNet 3 Support Ufps
Post by: dreb4o on June 02, 2016, 06:25:32 PM
TNet 3 Support Ufps
is there anyone who can say?
Title: Re: TNet 3 Support Ufps
Post by: ArenMook on June 04, 2016, 01:52:56 PM
I don't know what Ufps is, so I'm going to say "no".
Title: Re: TNet 3 Support Ufps
Post by: nosyrbllewe on June 04, 2016, 09:58:34 PM
I sort of got TNet working with UFPS (though I still have issues with the BodyAnimator has some issues right now and requires heavy modification of UFPS's scripts). In order to get it to work you have to instantiate the same First Person controller for both the local player and remote players and then skip all of the first person code using tno.isMine in each of UFPS's scripts. This can become a huge pain due to the inheritance structure of UFPS, but what I did was move all of the First Person logic to methods like DoAwake() and only calling such methods from Awake() if tno.IsMine == true (See below for better explanation)

In vp_FPXXXXX:

void Awake()
{
if(tno.isMine)
DoAwake();
base.Awake();
}

DoAwake()
{
//Move UFPS's First person code here
}


I hope this helps.
Title: Re: TNet 3 Support Ufps
Post by: ArenMook on June 06, 2016, 10:21:26 PM
Just a quick note, Awake() is a terrible place to do anything other than immediate local variable initialization. Awake() is called before the AddComponent() call has a chance to return. Unrelated to this post, but the more you know...!
Title: Re: TNet 3 Support Ufps
Post by: devomage on June 10, 2016, 01:41:40 AM
I sort of got TNet working with UFPS

The UFPS team recently added a photon package to the asset store...  if you are code savvy; looking into this package might help adapting UFPS to TNET.