CatttDaddy
Member
I am attempting to edit the Skycar script but when I move the script to another vehicle I get the error
"NullReferenceException: Object reference not set to an instance of an object".
When I check, the m_CharacterAnimatorMonitor it is my problem. It is located in Skycar.cs at
I need to know where this is being set and why just moving to another Copy of Skycar can not find it.
I see that "EnteredVehicle(GameObject character)"
sets it but that looks like it is only AFTER that character has entered the Vehicle. The code above runs in Update.
Why doesn't the original SkyCar.cs error out like my copy if "m_CharacterAnimatorMonitor"
isn't set until after the player has entered the vehicle?
I'm a bit confused
Any help is appreciated.
"NullReferenceException: Object reference not set to an instance of an object".
When I check, the m_CharacterAnimatorMonitor it is my problem. It is located in Skycar.cs at
Code:
/// <summary>
/// Updates the animator.
/// </summary>
public void Update()
{
m_Animator.SetFloat(m_HorizontalInputID, m_CharacterAnimatorMonitor.AbilityFloatData, 0, 0);
}
I need to know where this is being set and why just moving to another Copy of Skycar can not find it.
I see that "EnteredVehicle(GameObject character)"
sets it but that looks like it is only AFTER that character has entered the Vehicle. The code above runs in Update.
Why doesn't the original SkyCar.cs error out like my copy if "m_CharacterAnimatorMonitor"
isn't set until after the player has entered the vehicle?
I'm a bit confused
Any help is appreciated.
Last edited: