Incontrol value cannot be null

robinhood751

New member
I'm having trouble integrating TPC and Incontrol in 2019.4.20f1
I was having problems in my main game and wanted to see if the same would happen in an empty project, and they did.

After opening an empty project, installing TPC and Incontrol. I opened the demo scene in TPC. Removed Unity controls, add Incontrol input from the integration.
I've placed Opsive.UltimateCharacterController.Integrations.InControl.SampleBindings in the BindingsType.
I add the Incontrol manager in the scene. I deleted the virtual controls in the Canvas.

On play I get many errors.

ArgumentNullException: Value cannot be null.
Parameter name: type
System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Activator.CreateInstance (System.Type type) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
Opsive.Shared.Integrations.InControl.InControlInput.Awake () (at Assets/Opsive/Shared/Integrations/InControl/InControlInput.cs:75)


Help would be much appreciated.
 
It looks like it can't find the BindingsType:

Code:
            ActionSet = Activator.CreateInstance(Type.GetType(m_BindingsType)) as PlayerActionSet;

As a test you could create a new script which just does Type.GetType("Opsive.UltimateCharacterController.Integrations.InControl.SampleBindings") to make sure that class exists in your project.
 
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;


public class testscript : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
Debug.Log(Type.GetType("Opsive.UltimateCharacterController.Integrations.InControl.SampleBindings").ToString());
}

// Update is called once per frame
void Update()
{

}
}

results in

NullReferenceException: Object reference not set to an instance of an object
testscript.Start () (at Assets/testscript.cs:12)
 
Top