ScriptableObject and InputSystem

Hello.

I'm keep an eye on this project out of curiosity.
And i was interesed about ScriptableObject & InputSystem.

In Editor works fine, but when i build then I ran into a problem.
Input System in ScriptableObject not working for me.
I check and copy into MonoBehaviour, GameInput.IGameplayActions and attach... works fine :)

Looks for me when i build game, then ScriptableObject never called OnEnable or Awake when game RUN :)
Something I missing ?

Sorry for my English, I not good at English.

https://docs.unity3d.com/ScriptReference/ScriptableObject.html?_ga=2.40221922.1192964670.1612963238-717068479.1603393356
but not works like description :(

[Solved]
When in (my script) but like ~Protagonist in OnEnable i made _inputReader.OnEnable() (ofc made public) then start working

but Why? OnEnable should works in SO too...

Hmm, not sure how to help, when I build the game input works fine. How do you detect the error and how are you sure that OnEnable is not called in the build? I guess because it works when you do this?

[quote=“Nsuidara”, post:1, topic: 828255]
When in (my script) but like ~Protagonist in OnEnable i made _inputReader.OnEnable() (ofc made public) then start working
[/quote]

[quote=“cirocontinisio”, post:2, topic: 828255]
How do you detect the error and how are you sure that OnEnable is not called in the build?
[/quote]
I’ll try to explain.

I love your idea Input System and Scriptable Object and just implement it.

public class InputReader : ScriptableObject, GameInput.IGameplayActions

so, next create SO
so, next create Movement (MonoBehaviour)
mean, like

...
        private void OnEnable()
        {
            inputReader.OnEnable();
            inputReader.MoveEvent += OnMove;
            inputReader.JumpEvent += OnJumpInitiated;
            inputReader.JumpCanceledEvent += OnJumpCanceled;
        }
....

Version IS
6832520--794381--upload_2021-2-12_18-51-30.png

Play in editor works fine, when build - not working.
(i add console, ~ show/hide) after build key ~ not working

6832520--794375--upload_2021-2-12_18-45-34.png

only when i manualy run OnEnable

Sounds like it's not an issue related to the Input System. You need to find out why the SO is not calling OnEnable. Where is the SO? In assets? Do you use AssetBundles?