Unity 2018.1.6f1, AC 1.63.2
To replicate the problem:
1) Clean (2D) Project, using AC defaults
2) Use AC CharacterWizard to create a new NPC called NPCTest, with Constant ID set as "Retain in Prefab"
3) New Scene with a Path for NPCTest to follow
4) The Scene's OnStart ActionList should contain the following Actions:
> Object AddOrRemove/Add NPCTest relative to the Scene Path
> Character MoveAlongPath NPCTest MoveOnNewPath of the Scene Path
5) New AssetBased ActionList "InteractNPC_Parameterised", with parameter "NPC_Prefab" of type GameObject, with a single Action:
> Character MoveAlongPath StopMoving CharacterToMove: parameter "NPC_Prefab"
6) New AssetBased ActionList "InteractNPC", with a single Action:
> Run ActionList "InteractNPC_Parameterised", passing the NPCTest Prefab GameObject in the "NPC_Prefab" parameter
7) Amend NPCTest Hotspot UseInteractions: Use, Interaction = "Interact_NPC"
8) Run the Scene
9) Clicking on the NPCTest character will produce a NullReferenceException
Note that changing the ActionList in 5) to any other kind of Character or Object based action (such as FaceObject etc) will also produce the same NullReferenceException
Also note that during testing I discovered that parameterised Prefabs ARE handled correctly under most circumstances (which initially made me think I was mistaken in ever thinking that they weren't). However, it just so happens that my particular use case involves something very similar to the setup defined above, where the parameterised ActionList is invoked by interacting with the Hotspot on the NPC character, and it's that bit that seems to be the fly in the ointment
Comments