Instantiated addressable not executing Input Action

I am instantiating a prefab via Addressables that subscribes to an InputActionProperty. For example, press (X) to reload gun. While this works correctly in editor, it does not in build. I added print statements to verify that it does subscribe to the Input System. Once handed off to said system, the performed action is never invoked. Any thoughts as to why this may be happening or suggest other paths of investigation?

Issue like this I think are usually caused by assets being duplicated at build time, usually because certain assets haven’t been included in your addressables groups. EG, if your input action map assets isn’t in your addressables groups, I might imagine the InputActionProperty might point to some duplicated instance at build time.

You can use the analyze window to see where assets are getting duplicated at build: https://docs.unity3d.com/Packages/com.unity.addressables@1.21/manual/editor/tools/AnalyzeTool.html

That was it. Thanks so much.

1 Like