diff --git a/Descant-1.0.0.unitypackage.meta b/Descant-1.0.0.unitypackage.meta deleted file mode 100644 index 7138191..0000000 --- a/Descant-1.0.0.unitypackage.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 87a4733e109a8435bbf1e7e6ee9588f1 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Editor/Window/DescantActorEditor.cs b/Editor/Window/DescantActorEditor.cs index 3d18497..f7dd4c3 100644 --- a/Editor/Window/DescantActorEditor.cs +++ b/Editor/Window/DescantActorEditor.cs @@ -89,7 +89,10 @@ void ReloadGUI() /// void AddStyleSheet() { - StyleSheet styleSheet = AssetDatabase.LoadAssetAtPath("Packages/com.owmacohe.descant/Assets/DescantActorEditorStyleSheet.uss"); + StyleSheet styleSheet = (StyleSheet)EditorGUIUtility.Load("Packages/com.owmacohe.descant/Assets/DescantActorEditorStyleSheet.uss"); + if (styleSheet == null) styleSheet = (StyleSheet)EditorGUIUtility.Load("Assets/com.owmacohe.descant/Assets/DescantActorEditorStyleSheet.uss"); + if (styleSheet == null) styleSheet = (StyleSheet)EditorGUIUtility.Load("Assets/Packages/com.owmacohe.descant/Assets/DescantActorEditorStyleSheet.uss"); + rootVisualElement.styleSheets.Add(styleSheet); } diff --git a/Editor/Window/DescantEditor.cs b/Editor/Window/DescantEditor.cs index 180f412..dc087fd 100644 --- a/Editor/Window/DescantEditor.cs +++ b/Editor/Window/DescantEditor.cs @@ -101,7 +101,10 @@ void AddGraphView() /// void AddStyleSheet() { - StyleSheet styleSheet = AssetDatabase.LoadAssetAtPath("Packages/com.owmacohe.descant/Assets/DescantGraphEditorStyleSheet.uss"); + StyleSheet styleSheet = (StyleSheet)EditorGUIUtility.Load("Packages/com.owmacohe.descant/Assets/DescantGraphEditorStyleSheet.uss"); + if (styleSheet == null) styleSheet = (StyleSheet)EditorGUIUtility.Load("Assets/com.owmacohe.descant/Assets/DescantGraphEditorStyleSheet.uss"); + if (styleSheet == null) styleSheet = (StyleSheet)EditorGUIUtility.Load("Assets/Packages/com.owmacohe.descant/Assets/DescantGraphEditorStyleSheet.uss"); + rootVisualElement.styleSheets.Add(styleSheet); } @@ -190,7 +193,7 @@ void AddToolbar() } #endregion - + #region Saving and Loading /// diff --git a/Editor/Window/DescantGraphView.cs b/Editor/Window/DescantGraphView.cs index ee6e5e9..9561191 100644 --- a/Editor/Window/DescantGraphView.cs +++ b/Editor/Window/DescantGraphView.cs @@ -227,7 +227,10 @@ void AddManipulators() /// void AddStyleSheet() { - StyleSheet styleSheet = AssetDatabase.LoadAssetAtPath("Packages/com.owmacohe.descant/Assets/DescantGraphEditorStyleSheet.uss"); + StyleSheet styleSheet = (StyleSheet)EditorGUIUtility.Load("Packages/com.owmacohe.descant/Assets/DescantGraphEditorStyleSheet.uss"); + if (styleSheet == null) styleSheet = (StyleSheet)EditorGUIUtility.Load("Assets/com.owmacohe.descant/Assets/DescantGraphEditorStyleSheet.uss"); + if (styleSheet == null) styleSheet = (StyleSheet)EditorGUIUtility.Load("Assets/Packages/com.owmacohe.descant/Assets/DescantGraphEditorStyleSheet.uss"); + styleSheets.Add(styleSheet); } diff --git a/package-lock.json b/package-lock.json index 7d0fb6b..cbcf39a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "com.owmacohe.descant", - "version": "1.0.0", + "version": "1.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index ece6a73..b293494 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "com.owmacohe.descant", "displayName": "Descant", - "version": "1.0.0", + "version": "1.0.1", "description": "An enhanced and and user-friendly Unity dialogue system plugin.\n\nDescant aims to hit the sweet spot between quality UI, powerful features, and easy-to-lean functionality, while also addressing many of the game-specific consequences of the standard dialogue manager setup.\n\nPlease view the README before beginning development.", "unity": "2022.3", "unityRelease": "7f1",