public void OnDestroy()
        {
            for (int i = 0; i < m_InputsSettingsAssets.Count; i++)
            {
                if (m_InputsSettingsAssets[i] is InputBinder)
                {
                    SceneHook.UnregisterInputSettingObj(ownerRecorderSettingsAssetId, m_InputsSettings[i]);
                }

                UnityHelpers.Destroy(m_InputsSettingsAssets[i], true);
            }
        }
Exemple #2
0
        void ReleaseAt(int index)
        {
            if (m_InputsSettingsAssets[index] is InputBinder)
            {
                SceneHook.UnregisterInputSettingObj(m_ParentAssetId, m_InputsSettings[index]);
            }

            UnityHelpers.Destroy(m_InputsSettingsAssets[index], true);

            m_InputsSettings[index]       = null;
            m_InputsSettingsAssets[index] = null;
        }
        void ReleaseAt(int index)
        {
#if UNITY_EDITOR
            bool isBinder = m_InputsSettingsAssets[index] is InputBinder;
            if (isBinder)
            {
                SceneHook.UnregisterInputSettingObj(ownerRecorderSettingsAssetId, m_InputsSettings[index]);
            }
#endif
            UnityHelpers.Destroy(m_InputsSettingsAssets[index], true);
#if UNITY_EDITOR
            AssetDatabase.SaveAssets();
#endif

            m_InputsSettings[index]       = null;
            m_InputsSettingsAssets[index] = null;
        }