Post by badunclegames on Mar 19, 2018 5:28:22 GMT
Hi folks,
I have recently moved from the Opsive TPC to Invector ShooterMeelee TPC as I like the features of Invector more and find it (generally) easier to integrate. However I have an interesting problem I am hoping someone can shed some light on.
I generate my UMA in a separate character build scene and use the generic locomotion animator controller for that purpose, save the UMA off to my SQL database (I am also using Darkrift for networking), then load up my play scene.
The UMA reads in fine etc and the recipe loads. Once the UMA has finished building I call a routine that loads all the shooter template components (Pretty much mimicking the create() function in the editor Shooter/Create Controller script).
When I add the vThirdPersonController i don't get any errors but of course I cant move etc (the idle does play by default)
As soon as I add the vThirdPersonInput (OR the vShooterMeleeInput ) i get a raft of errors UNTIL i select the player instance in the editor. The moment I select the player instance in the editor (when in play mode) the stamina fills, the errors stop, and I can move as expected.
I understand the vThirdPersonController creates an instance and puts the player into the DoNotDestroy On Load section (The free locomotion one didnt do that from memory)
I am at a little bit of a loss as to why this might occur, especially since selecting the player in the hierarchy seems to "switch" it on and it works fine after that.
I'm not sure if the error messages actually give any insight but here are a few of them:
I have recently moved from the Opsive TPC to Invector ShooterMeelee TPC as I like the features of Invector more and find it (generally) easier to integrate. However I have an interesting problem I am hoping someone can shed some light on.
I generate my UMA in a separate character build scene and use the generic locomotion animator controller for that purpose, save the UMA off to my SQL database (I am also using Darkrift for networking), then load up my play scene.
The UMA reads in fine etc and the recipe loads. Once the UMA has finished building I call a routine that loads all the shooter template components (Pretty much mimicking the create() function in the editor Shooter/Create Controller script).
When I add the vThirdPersonController i don't get any errors but of course I cant move etc (the idle does play by default)
As soon as I add the vThirdPersonInput (OR the vShooterMeleeInput ) i get a raft of errors UNTIL i select the player instance in the editor. The moment I select the player instance in the editor (when in play mode) the stamina fills, the errors stop, and I can move as expected.
I understand the vThirdPersonController creates an instance and puts the player into the DoNotDestroy On Load section (The free locomotion one didnt do that from memory)
I am at a little bit of a loss as to why this might occur, especially since selecting the player in the hierarchy seems to "switch" it on and it works fine after that.
I'm not sure if the error messages actually give any insight but here are a few of them:
NullReferenceException: Object reference not set to an instance of an object
Invector.CharacterController.vThirdPersonAnimator.OnAnimatorMove () (at Assets/Invector-3rdPersonController/Basic Locomotion/Scripts/CharacterController/vThirdPersonAnimator.cs:61)
NullReferenceException: Object reference not set to an instance of an object
vShooterMeleeInput.ShotInput () (at Assets/Invector-3rdPersonController/Shooter/Scripts/Shooter/vShooterMeleeInput.cs:278)
vShooterMeleeInput.UpdateAimBehaviour () (at Assets/Invector-3rdPersonController/Shooter/Scripts/Shooter/vShooterMeleeInput.cs:601)
vShooterMeleeInput.LateUpdate () (at Assets/Invector-3rdPersonController/Shooter/Scripts/Shooter/vShooterMeleeInput.cs:101)