예제 #1
0
        private void OnGUI()
        {
            var localSharedData = LocalSharedData;

            EditorGUI.BeginChangeCheck();

            GUILayout.Label("Local", EditorStyles.boldLabel);
            localSharedData.value = (SharedEditorData)EditorGUILayout.ObjectField("Local Shared Data", localSharedData.value, typeof(SharedEditorData), false);
            EditorGUILayout.HelpBox("Local Shared Data asset is a Database that holds all Overmodded.UnityEditor data that then can be used the in game. " +
                                    "This asset can be shared over other editors to get access to it's records. " +
                                    "(For ex. you can get reference to character defined in another unity editor project.)", MessageType.Info, true);

            EditorGUILayout.Space();
            GUILayout.Label("External", EditorStyles.boldLabel);
            var external = SharedEditorDataManager.GetListOfExternalEditorData();

            EditorGUILayout.LabelField("Total of", external.Count + " external SharedEditorData assets.");
            foreach (var e in external)
            {
                // TODO: Draw object fields.
            }

            if (EditorGUI.EndChangeCheck())
            {
                Undo.RegisterCompleteObjectUndo(this, "SharedConfigWindow.Change");

                LocalSharedData = localSharedData;
            }
        }
예제 #2
0
        private void RefreshContent()
        {
            // Try to refresh the database!
            SharedEditorDataManager.TryRefreshDatabaseAtStart();

            _externalEditorData = SharedEditorDataManager.GetListOfExternalEditorData();
            _localEditorData    = SharedEditorDataManager.GetLocalSharedData();
        }