Exemple #1
0
        // ReSharper disable once UnusedMember.Local
        private void OnEnable()
        {
            m_T         = (SceneCollection)target;
            m_GetTarget = new SerializedObject(m_T);
            m_SceneReferenceProperty = m_GetTarget.FindProperty("SceneAssets");
            m_Name            = m_GetTarget.FindProperty("CollectionName");
            m_TransitionScene = m_GetTarget.FindProperty("TransitionScene");

            m_List = new ReorderableListLayout(m_GetTarget, m_SceneReferenceProperty, r_DefaultSettings);
            DrawElementList();

            OnSelected();
            if (r_DefaultSettings.DisplayHeader)
            {
                OnHeader();
            }
            if (r_DefaultSettings.DisplayAddButton)
            {
                OnAdd();
            }
            if (r_DefaultSettings.DisplayRemoveButton)
            {
                OnRemove();
            }
        }
Exemple #2
0
        public override void OnEnable()
        {
            m_Collections = FindSetting((Settings x) => x.SceneCollectionSettings.SceneCollection);
            m_List        = new ReorderableListLayout(m_SettingsProperty.serializedObject, m_Collections, r_DefaultSettings);
            DrawElementList();

            OnSelected();
            if (r_DefaultSettings.DisplayHeader)
            {
                OnHeader();
            }
            if (r_DefaultSettings.DisplayAddButton)
            {
                OnAdd();
            }
            if (r_DefaultSettings.DisplayRemoveButton)
            {
                OnRemove();
            }
        }