I have a character with a custom ILookSource (a clone of LocalLookSource). When I spawn the character, the ILookSource raise a "OnCharacterAttachLookSource" event and the aim ability correctly get the ILookSource (in the "OnAttachLookSource" event handler). The problem is that when i start the aim ability (I start it calling TryStartAbility method) the aim's "UpdateRotation" method is called but the ILookSource reference is null!
I logged the hash code and it seems that the aim object instance has changed: when the m_LookSource is setted by the OnAttachLookSource method the calling object has a certain hash code, when the UpdateRotation method is called the hash code is different (during all this, the hash code of the parent UltimateCharacterLocomotion object never change).
So, are the ItemAbility instantiated somewhere at runtime? What could be happening?
I logged the hash code and it seems that the aim object instance has changed: when the m_LookSource is setted by the OnAttachLookSource method the calling object has a certain hash code, when the UpdateRotation method is called the hash code is different (during all this, the hash code of the parent UltimateCharacterLocomotion object never change).
So, are the ItemAbility instantiated somewhere at runtime? What could be happening?