Search Unity

InputActionAsset disappears in ScriptableObject since 0.2.8

Discussion in 'Input System' started by Held0fTheWelt, May 18, 2019.

  1. Held0fTheWelt

    Held0fTheWelt

    Joined:
    Sep 29, 2015
    Posts:
    173
    Since 0.2.8 my InputActionAsset disappears from my ScriptableObject, which i use as a load container on before scene load.

    It's nothing more than this:
    Code (CSharp):
    1.  
    2. [CreateAssetMenu(fileName = "ControlsData", menuName = "Input/InputMasterContainer", order = 1)]
    3. public class InputControllerContainer : ScriptableObject
    4. {
    5.     [SerializeField] private InputMaster controls;
    6.     public InputMaster Controls { get { return controls; } set { controls = value; } }
    7. }
     
    Last edited: May 18, 2019
  2. Held0fTheWelt

    Held0fTheWelt

    Joined:
    Sep 29, 2015
    Posts:
    173
    I found my solution here: https://forum.unity.com/threads/new-input-system-not-serialized.667153/ and this really really throws away some decisions i had to make about on how to load my controller before game start !
    Thank you ! This is best way, possible.

    Code (CSharp):
    1.         if (controls == null)
    2.         {
    3.             controls = new InputMaster();
    4.         }