From 25f9c3c807671f45557314f2edcf96897944fe6e Mon Sep 17 00:00:00 2001 From: Vaclav Bily Date: Sat, 14 Oct 2023 15:58:14 +0200 Subject: [PATCH 01/21] Events.Editor - Fix namespaces --- Editor/Core/EventListenerEditorBase.cs | 2 +- Editor/Core/VoidEventListenerEditor.cs | 2 +- Editor/GameObjectListenerEditor.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Editor/Core/EventListenerEditorBase.cs b/Editor/Core/EventListenerEditorBase.cs index 643d59d..2f56711 100644 --- a/Editor/Core/EventListenerEditorBase.cs +++ b/Editor/Core/EventListenerEditorBase.cs @@ -1,7 +1,7 @@ using UnityEngine; using Xprees.Events.Listeners.Base; -namespace Xprees.Events.Packages.cz.xprees.events.Editor.Core +namespace Xprees.Events.Editor.Core { public abstract class EventListenerEditorBase : UnityEditor.Editor { diff --git a/Editor/Core/VoidEventListenerEditor.cs b/Editor/Core/VoidEventListenerEditor.cs index 05219da..3255280 100644 --- a/Editor/Core/VoidEventListenerEditor.cs +++ b/Editor/Core/VoidEventListenerEditor.cs @@ -2,7 +2,7 @@ using UnityEngine; using Xprees.Events.Listeners.Base; -namespace Xprees.Events.Editor.Packages.cz.xprees.events.Editor.Core +namespace Xprees.Events.Editor.Core { [CustomEditor(typeof(VoidEventListener))] public class VoidEventListenerEditor : UnityEditor.Editor diff --git a/Editor/GameObjectListenerEditor.cs b/Editor/GameObjectListenerEditor.cs index 8699944..2091251 100644 --- a/Editor/GameObjectListenerEditor.cs +++ b/Editor/GameObjectListenerEditor.cs @@ -1,5 +1,5 @@ using UnityEngine; -using Xprees.Events.Packages.cz.xprees.events.Editor.Core; +using Xprees.Events.Editor.Core; namespace Xprees.Events.Editor { From f868552609323bcccdedd07eb6765afce88f39be Mon Sep 17 00:00:00 2001 From: Vaclav Bily Date: Sun, 5 Nov 2023 19:18:17 +0100 Subject: [PATCH 02/21] MonoBehaviour OnValidate run only on instantiated instance (Not prefabs) --- Runtime/MonoBehaviours/Unity/GameObjectEventInvoker.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Runtime/MonoBehaviours/Unity/GameObjectEventInvoker.cs b/Runtime/MonoBehaviours/Unity/GameObjectEventInvoker.cs index e041b4d..acbdf67 100644 --- a/Runtime/MonoBehaviours/Unity/GameObjectEventInvoker.cs +++ b/Runtime/MonoBehaviours/Unity/GameObjectEventInvoker.cs @@ -18,6 +18,8 @@ public void RaiseEvent() #if UNITY_EDITOR private void OnValidate() { + // Check that the GameObject is present in the scene and not a prefab + if (gameObject.scene.rootCount == 0) return; if (gameObjectEvent == null) Debug.LogWarning($"{nameof(GameObjectEventInvoker)}: GameObjectEvent is not set", gameObject); if (target == null) Debug.LogWarning($"{nameof(GameObjectEventInvoker)}: GameObject Data is not set", gameObject); } From 487694033ad8139b91d2c11205453aaa141e1586 Mon Sep 17 00:00:00 2001 From: Vaclav Bily Date: Fri, 25 Oct 2024 18:51:22 +0200 Subject: [PATCH 03/21] Updated package.json, added github ci publish to npm --- .github/workflows/deploy.yml | 32 ++++++++++++++++++++++++++++++++ package.json | 18 ++++++++++++------ 2 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..b50c476 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,32 @@ +name: Publish to NPM registry + +on: + push: + branches: + - master + - release/* + +jobs: + publish-gpr: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + environment: Production + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - name: Version Patcher + uses: justalemon/VersionPatcher@v0.8 + with: + version: 1.0.${{ github.run_number }} + npm-files: 'package.json' + - run: npm i + - run: git config --global user.name "xprees" + - run: git config --global user.email "xprees.developer@gmail.com" + - uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_AUTH_TOKEN }} + access: public diff --git a/package.json b/package.json index 69fd9e0..b7f7b66 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,10 @@ { "name": "cz.xprees.events", - "version": "1.0.0", "displayName": "Events", - "description": "This package contains Event System based on Event Channeling through ScriptableObjects.", + "version": "1.0.0", "unity": "2021.3", - "unityRelease": "16f1", - "licensesUrl": "http://www.wtfpl.net/txt/copying/", + "description": "This package contains Event System based on Event Channeling through ScriptableObjects.", + "license": "MIT", "category": "Core", "dependencies": { "cz.xprees.core": "1.0.0", @@ -13,13 +12,20 @@ "cz.xprees.event-logging": "1.0.0" }, "keywords": [ - "events", + "Unity", + "Events", "Event System", "ScriptableObjects" ], "author": { "name": "xprees", "email": "xprees.developer@gmail.com", - "url": "https://github.com/xprees" + "url": "https://xprees.com" + }, + "bugs": { + "url": "https://github.com/xprees/unity-events/issues" + }, + "repository": { + "url": "https://github.com/xprees/unity-events" } } \ No newline at end of file From 70c3eca495a3df5b50a2b941c66e1c2e75c50867 Mon Sep 17 00:00:00 2001 From: Vaclav Bily Date: Fri, 25 Oct 2024 18:58:57 +0200 Subject: [PATCH 04/21] deploy.yml simplified --- .github/workflows/deploy.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b50c476..b615e1a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,8 +24,6 @@ jobs: version: 1.0.${{ github.run_number }} npm-files: 'package.json' - run: npm i - - run: git config --global user.name "xprees" - - run: git config --global user.email "xprees.developer@gmail.com" - uses: JS-DevTools/npm-publish@v3 with: token: ${{ secrets.NPM_AUTH_TOKEN }} From 0b024ee6cad9516a1438976fc5381ac0800b5ad2 Mon Sep 17 00:00:00 2001 From: Vaclav Bily Date: Fri, 25 Oct 2024 19:01:46 +0200 Subject: [PATCH 05/21] Remove BOM --- .gitignore | 2 +- Editor.meta | 2 +- Editor/Core.meta | 2 +- Editor/GameObjectListenerEditor.cs | 2 +- Editor/GameObjectListenerEditor.cs.meta | 2 +- Editor/cz.xprees.events.editor.asmdef.meta | 2 +- README.md | 2 +- Runtime.meta | 2 +- Runtime/Listeners.meta | 2 +- Runtime/MonoBehaviours.meta | 2 +- Runtime/ScriptableObjects.meta | 2 +- Runtime/cz.xprees.events.asmdef.meta | 2 +- package.json | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 258faf1..6556fa2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -# Exclude these folders and all it content +# Exclude these folders and all it content Library Logs Temp diff --git a/Editor.meta b/Editor.meta index e8cadd5..6423e5c 100644 --- a/Editor.meta +++ b/Editor.meta @@ -1,3 +1,3 @@ -fileFormatVersion: 2 +fileFormatVersion: 2 guid: 9de942314c2b4d0f999553ffd1fd73cc timeCreated: 1679421733 \ No newline at end of file diff --git a/Editor/Core.meta b/Editor/Core.meta index cfff08c..a44f81a 100644 --- a/Editor/Core.meta +++ b/Editor/Core.meta @@ -1,3 +1,3 @@ -fileFormatVersion: 2 +fileFormatVersion: 2 guid: efd4dcaf12fc413b854040a3a5057360 timeCreated: 1679421819 \ No newline at end of file diff --git a/Editor/GameObjectListenerEditor.cs b/Editor/GameObjectListenerEditor.cs index 2091251..a542cd9 100644 --- a/Editor/GameObjectListenerEditor.cs +++ b/Editor/GameObjectListenerEditor.cs @@ -1,4 +1,4 @@ -using UnityEngine; +using UnityEngine; using Xprees.Events.Editor.Core; namespace Xprees.Events.Editor diff --git a/Editor/GameObjectListenerEditor.cs.meta b/Editor/GameObjectListenerEditor.cs.meta index 84baa6b..e48352a 100644 --- a/Editor/GameObjectListenerEditor.cs.meta +++ b/Editor/GameObjectListenerEditor.cs.meta @@ -1,3 +1,3 @@ -fileFormatVersion: 2 +fileFormatVersion: 2 guid: 009c4781f28143fc8e021d443e4a9616 timeCreated: 1677537964 \ No newline at end of file diff --git a/Editor/cz.xprees.events.editor.asmdef.meta b/Editor/cz.xprees.events.editor.asmdef.meta index f20f6ab..2f59742 100644 --- a/Editor/cz.xprees.events.editor.asmdef.meta +++ b/Editor/cz.xprees.events.editor.asmdef.meta @@ -1,3 +1,3 @@ -fileFormatVersion: 2 +fileFormatVersion: 2 guid: b3328e0fbe2643a397e9bdbe24feabfa timeCreated: 1684880182 \ No newline at end of file diff --git a/README.md b/README.md index 82fbad8..1454aeb 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ScriptableObject Event System +# ScriptableObject Event System ## Usage diff --git a/Runtime.meta b/Runtime.meta index d7440c6..659008c 100644 --- a/Runtime.meta +++ b/Runtime.meta @@ -1,3 +1,3 @@ -fileFormatVersion: 2 +fileFormatVersion: 2 guid: f598a2434cd44383a0449aa3ab4c1bf3 timeCreated: 1673176387 \ No newline at end of file diff --git a/Runtime/Listeners.meta b/Runtime/Listeners.meta index 31bdb1f..979d7f3 100644 --- a/Runtime/Listeners.meta +++ b/Runtime/Listeners.meta @@ -1,3 +1,3 @@ -fileFormatVersion: 2 +fileFormatVersion: 2 guid: a56b3ce3264141f09de14597f9f344b1 timeCreated: 1673176419 \ No newline at end of file diff --git a/Runtime/MonoBehaviours.meta b/Runtime/MonoBehaviours.meta index fcb3e20..29a903b 100644 --- a/Runtime/MonoBehaviours.meta +++ b/Runtime/MonoBehaviours.meta @@ -1,3 +1,3 @@ -fileFormatVersion: 2 +fileFormatVersion: 2 guid: ff56831ab95348bf8e43acdbcb9387e2 timeCreated: 1678834341 \ No newline at end of file diff --git a/Runtime/ScriptableObjects.meta b/Runtime/ScriptableObjects.meta index d012d2e..de50a90 100644 --- a/Runtime/ScriptableObjects.meta +++ b/Runtime/ScriptableObjects.meta @@ -1,3 +1,3 @@ -fileFormatVersion: 2 +fileFormatVersion: 2 guid: 6249de59ac3a470a8e7f57ca4bf7da0a timeCreated: 1673176439 \ No newline at end of file diff --git a/Runtime/cz.xprees.events.asmdef.meta b/Runtime/cz.xprees.events.asmdef.meta index 1f28ea2..e2c3d68 100644 --- a/Runtime/cz.xprees.events.asmdef.meta +++ b/Runtime/cz.xprees.events.asmdef.meta @@ -1,3 +1,3 @@ -fileFormatVersion: 2 +fileFormatVersion: 2 guid: 18c15ac4829a4f5db34ce4aa0dd6e6de timeCreated: 1679513001 \ No newline at end of file diff --git a/package.json b/package.json index b7f7b66..b291d92 100644 --- a/package.json +++ b/package.json @@ -1,4 +1,4 @@ -{ +{ "name": "cz.xprees.events", "displayName": "Events", "version": "1.0.0", From 26e1d69675476dfe21900c7890a5bfc48a4ffbb1 Mon Sep 17 00:00:00 2001 From: Vaclav Bily Date: Fri, 25 Oct 2024 19:08:54 +0200 Subject: [PATCH 06/21] Updated packages deps to be major version dep --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index b291d92..3ebfaed 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,9 @@ "license": "MIT", "category": "Core", "dependencies": { - "cz.xprees.core": "1.0.0", - "cz.xprees.variables": "1.0.0", - "cz.xprees.event-logging": "1.0.0" + "cz.xprees.core": "^1.0.0", + "cz.xprees.variables": "^1.0.0", + "cz.xprees.event-logging": "^1.0.0" }, "keywords": [ "Unity", From 705311d817b9184489e7ab239ba5465a68c0789a Mon Sep 17 00:00:00 2001 From: Vaclav Bily Date: Fri, 25 Oct 2024 19:13:12 +0200 Subject: [PATCH 07/21] events - build on second branch too --- .github/workflows/deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b615e1a..7ded73c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,6 +5,7 @@ on: branches: - master - release/* + - event-logging jobs: publish-gpr: @@ -28,3 +29,4 @@ jobs: with: token: ${{ secrets.NPM_AUTH_TOKEN }} access: public + tag: ${{ github.ref_name }} From f522a54654743e48171a160377625d317b526c62 Mon Sep 17 00:00:00 2001 From: Vaclav Bily Date: Fri, 25 Oct 2024 19:21:08 +0200 Subject: [PATCH 08/21] Added ignore scripts flag to publish because in unity other packages are distributed through other registries --- .github/workflows/deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7ded73c..9e38396 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -30,3 +30,5 @@ jobs: token: ${{ secrets.NPM_AUTH_TOKEN }} access: public tag: ${{ github.ref_name }} + ignore-scripts: true + From 255e2344aec2826bdbbe444f3bca8fac394ccacf Mon Sep 17 00:00:00 2001 From: Vaclav Bily Date: Fri, 25 Oct 2024 19:23:53 +0200 Subject: [PATCH 09/21] rm run npm i --- .github/workflows/deploy.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9e38396..d687f8a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -24,7 +24,6 @@ jobs: with: version: 1.0.${{ github.run_number }} npm-files: 'package.json' - - run: npm i - uses: JS-DevTools/npm-publish@v3 with: token: ${{ secrets.NPM_AUTH_TOKEN }} From b7da823f89a23d95a292c1dba6535fe79cbd756f Mon Sep 17 00:00:00 2001 From: Vaclav Bily Date: Fri, 25 Oct 2024 19:27:17 +0200 Subject: [PATCH 10/21] Update repository urls to correct version --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 3ebfaed..772e136 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "url": "https://github.com/xprees/unity-events/issues" }, "repository": { - "url": "https://github.com/xprees/unity-events" + "type": "git", + "url": "https://github.com/xprees/unity-events.git" } } \ No newline at end of file From 6023a4a3cb74271dfb20f05c2e0ad13813d2bd40 Mon Sep 17 00:00:00 2001 From: Vaclav Bily Date: Thu, 12 Dec 2024 21:03:31 +0100 Subject: [PATCH 11/21] EventListenerEditorBase - fix not checking cast errors --- Editor/Core/EventListenerEditorBase.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Editor/Core/EventListenerEditorBase.cs b/Editor/Core/EventListenerEditorBase.cs index 2f56711..0b40739 100644 --- a/Editor/Core/EventListenerEditorBase.cs +++ b/Editor/Core/EventListenerEditorBase.cs @@ -16,7 +16,9 @@ private void DrawInvokeEventButton(bool enabled) var prevState = GUI.enabled; GUI.enabled = enabled; - var listener = (EventListenerBase) target; + var listener = target as EventListenerBase; + if (!listener) return; + if (GUILayout.Button("Invoke Event with test data")) { listener.onEventRaised?.Invoke(GetTestData()); From bc36a23232a7aae86f9be9dc829b52960264932c Mon Sep 17 00:00:00 2001 From: Vaclav Bily Date: Sat, 14 Dec 2024 15:00:52 +0100 Subject: [PATCH 12/21] Events using Naughty attributes for better editor experience --- Editor/cz.xprees.events.editor.asmdef | 4 +++- .../ScriptableObjects/Base/EventChannelBaseSO.cs | 13 +++++++++++-- .../ScriptableObjects/Base/VoidEventChannelSO.cs | 7 ++++++- Runtime/cz.xprees.events.asmdef | 4 +++- package.json | 3 ++- 5 files changed, 25 insertions(+), 6 deletions(-) diff --git a/Editor/cz.xprees.events.editor.asmdef b/Editor/cz.xprees.events.editor.asmdef index 840ec1a..a71ee4d 100644 --- a/Editor/cz.xprees.events.editor.asmdef +++ b/Editor/cz.xprees.events.editor.asmdef @@ -2,7 +2,9 @@ "name": "cz.xprees.events.editor", "rootNamespace": "Xprees.Events", "references": [ - "GUID:18c15ac4829a4f5db34ce4aa0dd6e6de" + "GUID:18c15ac4829a4f5db34ce4aa0dd6e6de", + "GUID:19bcd25207254b86a83916ac73316140", + "GUID:f88fb04354076c646a4107a491394033" ], "includePlatforms": [ "Editor" diff --git a/Runtime/ScriptableObjects/Base/EventChannelBaseSO.cs b/Runtime/ScriptableObjects/Base/EventChannelBaseSO.cs index 332840a..a7d15ca 100644 --- a/Runtime/ScriptableObjects/Base/EventChannelBaseSO.cs +++ b/Runtime/ScriptableObjects/Base/EventChannelBaseSO.cs @@ -1,4 +1,5 @@ -using UnityEngine; +using NaughtyAttributes; +using UnityEngine; using UnityEngine.Events; using Xprees.Core; using Xprees.EventLogging.ScriptableObjects; @@ -7,7 +8,6 @@ namespace Xprees.Events.ScriptableObjects.Base { - // TODO custom editor which will hide event logging if not allowed /// /// Base class for all events channels with one parameter that are used in the game. /// @@ -27,8 +27,11 @@ public void RaiseEvent(T value) [Header("Event Logging")] public bool enableEventLogging = false; + [ShowIf(nameof(enableEventLogging))] public EventLoggingEventChannel addLogEvent; + [ShowIf(nameof(enableEventLogging))] + [Label("Event Name (Required)")] [Tooltip("Required. Use unique name for each event.")] public StringReference eventName; @@ -70,8 +73,11 @@ public void RaiseEvent(T1 firstValue, T2 secondValue) [Header("Event Logging")] public bool enableEventLogging = false; + [ShowIf(nameof(enableEventLogging))] public EventLoggingEventChannel addLogEvent; + [ShowIf(nameof(enableEventLogging))] + [Label("Event Name (Required)")] [Tooltip("Required. Use unique name for each event.")] public StringReference eventName; @@ -114,8 +120,11 @@ public void RaiseEvent(T1 firstValue, T2 secondValue, T3 thirdValue) [Header("Event Logging")] public bool enableEventLogging = false; + [ShowIf(nameof(enableEventLogging))] public EventLoggingEventChannel addLogEvent; + [ShowIf(nameof(enableEventLogging))] + [Label("Event Name (Required)")] [Tooltip("Required. Use unique name for each event.")] public StringReference eventName; diff --git a/Runtime/ScriptableObjects/Base/VoidEventChannelSO.cs b/Runtime/ScriptableObjects/Base/VoidEventChannelSO.cs index 1d790d1..5d29ca1 100644 --- a/Runtime/ScriptableObjects/Base/VoidEventChannelSO.cs +++ b/Runtime/ScriptableObjects/Base/VoidEventChannelSO.cs @@ -1,4 +1,5 @@ -using UnityEngine; +using NaughtyAttributes; +using UnityEngine; using UnityEngine.Events; using Xprees.Core; using Xprees.EventLogging.ScriptableObjects; @@ -23,11 +24,15 @@ public void RaiseEvent() [Header("Event Logging")] public bool enableEventLogging = false; + [ShowIf(nameof(enableEventLogging))] public EventLoggingEventChannel addLogEvent; + [ShowIf(nameof(enableEventLogging))] + [Label("Event Name (Required)")] [Tooltip("Required. Use unique name for each event.")] public StringReference eventName; + [ShowIf(nameof(enableEventLogging))] [Tooltip("Not required. Use to add additional data to the event.")] public StringReference eventData = null; diff --git a/Runtime/cz.xprees.events.asmdef b/Runtime/cz.xprees.events.asmdef index bb9c3e3..9b6bbcd 100644 --- a/Runtime/cz.xprees.events.asmdef +++ b/Runtime/cz.xprees.events.asmdef @@ -4,7 +4,9 @@ "references": [ "GUID:999c2ca78ab34358a1222750376a501c", "GUID:2bc606c18a1a4f2cb45a7c51038804cf", - "GUID:758763dcb3bb46caad0f8486302cbadf" + "GUID:758763dcb3bb46caad0f8486302cbadf", + "GUID:359f36c9ea1441da89f5bbf1778b36d2", + "GUID:776d03a35f1b52c4a9aed9f56d7b4229" ], "includePlatforms": [], "excludePlatforms": [], diff --git a/package.json b/package.json index 772e136..69cadec 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "dependencies": { "cz.xprees.core": "^1.0.0", "cz.xprees.variables": "^1.0.0", - "cz.xprees.event-logging": "^1.0.0" + "cz.xprees.event-logging": "^1.0.0", + "com.dbrizov.naughtyattributes": "^2.1.4" }, "keywords": [ "Unity", From ed6201f2dcfc3cd0a48c001f2ea6cc67c292d6b4 Mon Sep 17 00:00:00 2001 From: Vaclav Bily Date: Sat, 14 Dec 2024 21:41:23 +0100 Subject: [PATCH 13/21] Fixed own packages versions ranges and updated to latest version --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 69cadec..438c62c 100644 --- a/package.json +++ b/package.json @@ -7,10 +7,10 @@ "license": "MIT", "category": "Core", "dependencies": { - "cz.xprees.core": "^1.0.0", - "cz.xprees.variables": "^1.0.0", - "cz.xprees.event-logging": "^1.0.0", - "com.dbrizov.naughtyattributes": "^2.1.4" + "cz.xprees.core": "1.0.31", + "cz.xprees.variables": "1.0.6", + "cz.xprees.event-logging": "1.0.4", + "com.dbrizov.naughtyattributes": "2.1.4" }, "keywords": [ "Unity", From bedffe31d0d02edbf925f60b6aa77664b827edd0 Mon Sep 17 00:00:00 2001 From: Vaclav Bily Date: Sat, 14 Dec 2024 21:59:44 +0100 Subject: [PATCH 14/21] Update packages dependencies --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 438c62c..b04c065 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,8 @@ "category": "Core", "dependencies": { "cz.xprees.core": "1.0.31", - "cz.xprees.variables": "1.0.6", - "cz.xprees.event-logging": "1.0.4", + "cz.xprees.variables": "1.0.7", + "cz.xprees.event-logging": "1.0.5", "com.dbrizov.naughtyattributes": "2.1.4" }, "keywords": [ From 5ae474ce92ea4e0d804c8a584eb8896b2535f66b Mon Sep 17 00:00:00 2001 From: Vaclav Bily Date: Tue, 24 Dec 2024 14:44:29 +0100 Subject: [PATCH 15/21] Added icons for all built in events --- Editor/Core/EventListenerEditorBase.cs | 33 ----------- Editor/Core/EventListenerEditorBase.cs.meta | 3 - Editor/Core/VoidEventListenerEditor.cs | 30 ---------- Editor/Core/VoidEventListenerEditor.cs.meta | 3 - Editor/GameObjectListenerEditor.cs | 10 ---- Editor/GameObjectListenerEditor.cs.meta | 3 - Editor/Resources.meta | 8 +++ Editor/Resources/icon_event.svg | 4 ++ Editor/Resources/icon_event.svg.meta | 55 +++++++++++++++++++ Editor/Resources/icon_event_bool.svg | 12 ++++ Editor/Resources/icon_event_bool.svg.meta | 55 +++++++++++++++++++ Editor/Resources/icon_event_float.svg | 12 ++++ Editor/Resources/icon_event_float.svg.meta | 55 +++++++++++++++++++ Editor/Resources/icon_event_game_obj.svg | 12 ++++ Editor/Resources/icon_event_game_obj.svg.meta | 55 +++++++++++++++++++ Editor/Resources/icon_event_int.svg | 12 ++++ Editor/Resources/icon_event_int.svg.meta | 55 +++++++++++++++++++ Editor/Resources/icon_event_listener.svg | 12 ++++ Editor/Resources/icon_event_listener.svg.meta | 55 +++++++++++++++++++ Editor/Resources/icon_event_sprite.svg | 12 ++++ Editor/Resources/icon_event_sprite.svg.meta | 55 +++++++++++++++++++ Editor/Resources/icon_event_str.svg | 12 ++++ Editor/Resources/icon_event_str.svg.meta | 55 +++++++++++++++++++ Editor/Resources/icon_event_transform.svg | 12 ++++ .../Resources/icon_event_transform.svg.meta | 55 +++++++++++++++++++ Editor/Resources/icon_event_vec3.svg | 12 ++++ Editor/Resources/icon_event_vec3.svg.meta | 55 +++++++++++++++++++ Runtime/Listeners/Base/VoidEventListener.cs | 4 +- .../Base/EventChannelBaseSO.cs.meta | 10 +++- .../Base/VoidEventChannelSO.cs.meta | 11 +++- .../EventLogUserEventChannelSO.cs.meta | 12 +++- .../EventLoggingEventChannel.cs.meta | 12 +++- .../Primitive/BoolEventChannelSO.cs.meta | 13 ++++- .../Primitive/FloatEventChannelSO.cs.meta | 13 ++++- .../Primitive/IntEventChannelSO.cs.meta | 10 +++- .../Primitive/StringEventChannelSO.cs.meta | 12 +++- .../Unity/GameObjectEventChannelSO.cs.meta | 12 +++- .../Unity/SpriteEventChannelSO.cs.meta | 12 +++- .../Unity/TransformEventChannelSO.cs.meta | 12 +++- .../Unity/Vector3EventChannelSO.cs.meta | 12 +++- 40 files changed, 793 insertions(+), 104 deletions(-) delete mode 100644 Editor/Core/EventListenerEditorBase.cs delete mode 100644 Editor/Core/EventListenerEditorBase.cs.meta delete mode 100644 Editor/Core/VoidEventListenerEditor.cs delete mode 100644 Editor/Core/VoidEventListenerEditor.cs.meta delete mode 100644 Editor/GameObjectListenerEditor.cs delete mode 100644 Editor/GameObjectListenerEditor.cs.meta create mode 100644 Editor/Resources.meta create mode 100644 Editor/Resources/icon_event.svg create mode 100644 Editor/Resources/icon_event.svg.meta create mode 100644 Editor/Resources/icon_event_bool.svg create mode 100644 Editor/Resources/icon_event_bool.svg.meta create mode 100644 Editor/Resources/icon_event_float.svg create mode 100644 Editor/Resources/icon_event_float.svg.meta create mode 100644 Editor/Resources/icon_event_game_obj.svg create mode 100644 Editor/Resources/icon_event_game_obj.svg.meta create mode 100644 Editor/Resources/icon_event_int.svg create mode 100644 Editor/Resources/icon_event_int.svg.meta create mode 100644 Editor/Resources/icon_event_listener.svg create mode 100644 Editor/Resources/icon_event_listener.svg.meta create mode 100644 Editor/Resources/icon_event_sprite.svg create mode 100644 Editor/Resources/icon_event_sprite.svg.meta create mode 100644 Editor/Resources/icon_event_str.svg create mode 100644 Editor/Resources/icon_event_str.svg.meta create mode 100644 Editor/Resources/icon_event_transform.svg create mode 100644 Editor/Resources/icon_event_transform.svg.meta create mode 100644 Editor/Resources/icon_event_vec3.svg create mode 100644 Editor/Resources/icon_event_vec3.svg.meta diff --git a/Editor/Core/EventListenerEditorBase.cs b/Editor/Core/EventListenerEditorBase.cs deleted file mode 100644 index 0b40739..0000000 --- a/Editor/Core/EventListenerEditorBase.cs +++ /dev/null @@ -1,33 +0,0 @@ -using UnityEngine; -using Xprees.Events.Listeners.Base; - -namespace Xprees.Events.Editor.Core -{ - public abstract class EventListenerEditorBase : UnityEditor.Editor - { - public override void OnInspectorGUI() - { - DrawDefaultInspector(); - DrawInvokeEventButton(Application.isPlaying); - } - - private void DrawInvokeEventButton(bool enabled) - { - var prevState = GUI.enabled; - GUI.enabled = enabled; - - var listener = target as EventListenerBase; - if (!listener) return; - - if (GUILayout.Button("Invoke Event with test data")) - { - listener.onEventRaised?.Invoke(GetTestData()); - } - - GUI.enabled = prevState; - } - - protected virtual T GetTestData() => default; - } - -} \ No newline at end of file diff --git a/Editor/Core/EventListenerEditorBase.cs.meta b/Editor/Core/EventListenerEditorBase.cs.meta deleted file mode 100644 index 289c7a1..0000000 --- a/Editor/Core/EventListenerEditorBase.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: d1debc73f1de41d2b8e8ca14b82d776f -timeCreated: 1669198234 \ No newline at end of file diff --git a/Editor/Core/VoidEventListenerEditor.cs b/Editor/Core/VoidEventListenerEditor.cs deleted file mode 100644 index 3255280..0000000 --- a/Editor/Core/VoidEventListenerEditor.cs +++ /dev/null @@ -1,30 +0,0 @@ -using UnityEditor; -using UnityEngine; -using Xprees.Events.Listeners.Base; - -namespace Xprees.Events.Editor.Core -{ - [CustomEditor(typeof(VoidEventListener))] - public class VoidEventListenerEditor : UnityEditor.Editor - { - public override void OnInspectorGUI() - { - DrawDefaultInspector(); - DrawInvokeEventButton(Application.isPlaying); - } - - private void DrawInvokeEventButton(bool enabled) - { - var prevState = GUI.enabled; - GUI.enabled = enabled; - - var listener = (VoidEventListener) target; - if (GUILayout.Button("Invoke Event")) - { - listener.onEventRaised?.Invoke(); - } - - GUI.enabled = prevState; - } - } -} \ No newline at end of file diff --git a/Editor/Core/VoidEventListenerEditor.cs.meta b/Editor/Core/VoidEventListenerEditor.cs.meta deleted file mode 100644 index 2a7f939..0000000 --- a/Editor/Core/VoidEventListenerEditor.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 9326841b47294345a76088c35cb57974 -timeCreated: 1669673637 \ No newline at end of file diff --git a/Editor/GameObjectListenerEditor.cs b/Editor/GameObjectListenerEditor.cs deleted file mode 100644 index a542cd9..0000000 --- a/Editor/GameObjectListenerEditor.cs +++ /dev/null @@ -1,10 +0,0 @@ -using UnityEngine; -using Xprees.Events.Editor.Core; - -namespace Xprees.Events.Editor -{ - public class GameObjectListenerEditor : EventListenerEditorBase - { - protected override GameObject GetTestData() => serializedObject.targetObject as GameObject; - } -} \ No newline at end of file diff --git a/Editor/GameObjectListenerEditor.cs.meta b/Editor/GameObjectListenerEditor.cs.meta deleted file mode 100644 index e48352a..0000000 --- a/Editor/GameObjectListenerEditor.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: 009c4781f28143fc8e021d443e4a9616 -timeCreated: 1677537964 \ No newline at end of file diff --git a/Editor/Resources.meta b/Editor/Resources.meta new file mode 100644 index 0000000..6e2604e --- /dev/null +++ b/Editor/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cc5b599776469e947becb705fab582da +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Editor/Resources/icon_event.svg b/Editor/Resources/icon_event.svg new file mode 100644 index 0000000..30f128f --- /dev/null +++ b/Editor/Resources/icon_event.svg @@ -0,0 +1,4 @@ + + + + diff --git a/Editor/Resources/icon_event.svg.meta b/Editor/Resources/icon_event.svg.meta new file mode 100644 index 0000000..836fe1c --- /dev/null +++ b/Editor/Resources/icon_event.svg.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: c3e3783a1cc6d284fa9a685a5ae76c46 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: a57477913897c46af95d590f580878bd, type: 3} + svgType: 1 + texturedSpriteMeshType: 0 + svgPixelsPerUnit: 100 + gradientResolution: 64 + alignment: 0 + customPivot: {x: 0, y: 0} + generatePhysicsShape: 0 + viewportOptions: 0 + preserveViewport: 0 + advancedMode: 0 + predefinedResolutionIndex: 1 + targetResolution: 1080 + resolutionMultiplier: 1 + stepDistance: 10 + samplingStepDistance: 100 + maxCordDeviationEnabled: 0 + maxCordDeviation: 1 + maxTangentAngleEnabled: 0 + maxTangentAngle: 5 + keepTextureAspectRatio: 1 + textureSize: 256 + textureWidth: 256 + textureHeight: 256 + wrapMode: 0 + filterMode: 1 + sampleCount: 4 + preserveSVGImageAspect: 0 + useSVGPixelsPerUnit: 0 + spriteData: + TessellationDetail: 0 + SpriteRect: + name: + originalName: + pivot: {x: 0, y: 0} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + customData: + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + spriteID: 568d56cbe9dafb7468b752a9ee127a52 + PhysicsOutlines: [] diff --git a/Editor/Resources/icon_event_bool.svg b/Editor/Resources/icon_event_bool.svg new file mode 100644 index 0000000..d9ba565 --- /dev/null +++ b/Editor/Resources/icon_event_bool.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/Editor/Resources/icon_event_bool.svg.meta b/Editor/Resources/icon_event_bool.svg.meta new file mode 100644 index 0000000..909c6b6 --- /dev/null +++ b/Editor/Resources/icon_event_bool.svg.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: be704df36165f9945b7851ebeb5cd2a3 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: a57477913897c46af95d590f580878bd, type: 3} + svgType: 1 + texturedSpriteMeshType: 0 + svgPixelsPerUnit: 100 + gradientResolution: 64 + alignment: 0 + customPivot: {x: 0, y: 0} + generatePhysicsShape: 0 + viewportOptions: 0 + preserveViewport: 0 + advancedMode: 0 + predefinedResolutionIndex: 1 + targetResolution: 1080 + resolutionMultiplier: 1 + stepDistance: 10 + samplingStepDistance: 100 + maxCordDeviationEnabled: 0 + maxCordDeviation: 1 + maxTangentAngleEnabled: 0 + maxTangentAngle: 5 + keepTextureAspectRatio: 1 + textureSize: 256 + textureWidth: 256 + textureHeight: 256 + wrapMode: 0 + filterMode: 1 + sampleCount: 4 + preserveSVGImageAspect: 0 + useSVGPixelsPerUnit: 0 + spriteData: + TessellationDetail: 0 + SpriteRect: + name: + originalName: + pivot: {x: 0, y: 0} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + customData: + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + spriteID: fabff9bf5ed3d664ab46167261be2ffa + PhysicsOutlines: [] diff --git a/Editor/Resources/icon_event_float.svg b/Editor/Resources/icon_event_float.svg new file mode 100644 index 0000000..8fb8b89 --- /dev/null +++ b/Editor/Resources/icon_event_float.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/Editor/Resources/icon_event_float.svg.meta b/Editor/Resources/icon_event_float.svg.meta new file mode 100644 index 0000000..41dd335 --- /dev/null +++ b/Editor/Resources/icon_event_float.svg.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: b9b4edc43149c8247b3db6cab3423c45 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: a57477913897c46af95d590f580878bd, type: 3} + svgType: 1 + texturedSpriteMeshType: 0 + svgPixelsPerUnit: 100 + gradientResolution: 64 + alignment: 0 + customPivot: {x: 0, y: 0} + generatePhysicsShape: 0 + viewportOptions: 0 + preserveViewport: 0 + advancedMode: 0 + predefinedResolutionIndex: 1 + targetResolution: 1080 + resolutionMultiplier: 1 + stepDistance: 10 + samplingStepDistance: 100 + maxCordDeviationEnabled: 0 + maxCordDeviation: 1 + maxTangentAngleEnabled: 0 + maxTangentAngle: 5 + keepTextureAspectRatio: 1 + textureSize: 256 + textureWidth: 256 + textureHeight: 256 + wrapMode: 0 + filterMode: 1 + sampleCount: 4 + preserveSVGImageAspect: 0 + useSVGPixelsPerUnit: 0 + spriteData: + TessellationDetail: 0 + SpriteRect: + name: + originalName: + pivot: {x: 0, y: 0} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + customData: + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + spriteID: d2226144509433e4e807da4857ee0eb6 + PhysicsOutlines: [] diff --git a/Editor/Resources/icon_event_game_obj.svg b/Editor/Resources/icon_event_game_obj.svg new file mode 100644 index 0000000..9ee85a2 --- /dev/null +++ b/Editor/Resources/icon_event_game_obj.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/Editor/Resources/icon_event_game_obj.svg.meta b/Editor/Resources/icon_event_game_obj.svg.meta new file mode 100644 index 0000000..353c3b7 --- /dev/null +++ b/Editor/Resources/icon_event_game_obj.svg.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: 50ec58d473d89c74eb2fd3a33cd52577 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: a57477913897c46af95d590f580878bd, type: 3} + svgType: 1 + texturedSpriteMeshType: 0 + svgPixelsPerUnit: 100 + gradientResolution: 64 + alignment: 0 + customPivot: {x: 0, y: 0} + generatePhysicsShape: 0 + viewportOptions: 0 + preserveViewport: 0 + advancedMode: 0 + predefinedResolutionIndex: 1 + targetResolution: 1080 + resolutionMultiplier: 1 + stepDistance: 10 + samplingStepDistance: 100 + maxCordDeviationEnabled: 0 + maxCordDeviation: 1 + maxTangentAngleEnabled: 0 + maxTangentAngle: 5 + keepTextureAspectRatio: 1 + textureSize: 256 + textureWidth: 256 + textureHeight: 256 + wrapMode: 0 + filterMode: 1 + sampleCount: 4 + preserveSVGImageAspect: 0 + useSVGPixelsPerUnit: 0 + spriteData: + TessellationDetail: 0 + SpriteRect: + name: + originalName: + pivot: {x: 0, y: 0} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + customData: + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + spriteID: 0a24ce6bf65daa04680a0a5bed6cdd12 + PhysicsOutlines: [] diff --git a/Editor/Resources/icon_event_int.svg b/Editor/Resources/icon_event_int.svg new file mode 100644 index 0000000..48b246a --- /dev/null +++ b/Editor/Resources/icon_event_int.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/Editor/Resources/icon_event_int.svg.meta b/Editor/Resources/icon_event_int.svg.meta new file mode 100644 index 0000000..e607284 --- /dev/null +++ b/Editor/Resources/icon_event_int.svg.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: 263656f541c7673479545dae48fd38f7 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: a57477913897c46af95d590f580878bd, type: 3} + svgType: 1 + texturedSpriteMeshType: 0 + svgPixelsPerUnit: 100 + gradientResolution: 64 + alignment: 0 + customPivot: {x: 0, y: 0} + generatePhysicsShape: 0 + viewportOptions: 0 + preserveViewport: 0 + advancedMode: 0 + predefinedResolutionIndex: 1 + targetResolution: 1080 + resolutionMultiplier: 1 + stepDistance: 10 + samplingStepDistance: 100 + maxCordDeviationEnabled: 0 + maxCordDeviation: 1 + maxTangentAngleEnabled: 0 + maxTangentAngle: 5 + keepTextureAspectRatio: 1 + textureSize: 256 + textureWidth: 256 + textureHeight: 256 + wrapMode: 0 + filterMode: 1 + sampleCount: 4 + preserveSVGImageAspect: 0 + useSVGPixelsPerUnit: 0 + spriteData: + TessellationDetail: 0 + SpriteRect: + name: + originalName: + pivot: {x: 0, y: 0} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + customData: + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + spriteID: 1205f66a1bdd0644c82f0c6571895b9d + PhysicsOutlines: [] diff --git a/Editor/Resources/icon_event_listener.svg b/Editor/Resources/icon_event_listener.svg new file mode 100644 index 0000000..acd2b2a --- /dev/null +++ b/Editor/Resources/icon_event_listener.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/Editor/Resources/icon_event_listener.svg.meta b/Editor/Resources/icon_event_listener.svg.meta new file mode 100644 index 0000000..2ff5d80 --- /dev/null +++ b/Editor/Resources/icon_event_listener.svg.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: dad73b21a458f8a45b45a9290d987678 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: a57477913897c46af95d590f580878bd, type: 3} + svgType: 1 + texturedSpriteMeshType: 0 + svgPixelsPerUnit: 100 + gradientResolution: 64 + alignment: 0 + customPivot: {x: 0, y: 0} + generatePhysicsShape: 0 + viewportOptions: 0 + preserveViewport: 0 + advancedMode: 0 + predefinedResolutionIndex: 1 + targetResolution: 1080 + resolutionMultiplier: 1 + stepDistance: 10 + samplingStepDistance: 100 + maxCordDeviationEnabled: 0 + maxCordDeviation: 1 + maxTangentAngleEnabled: 0 + maxTangentAngle: 5 + keepTextureAspectRatio: 1 + textureSize: 256 + textureWidth: 256 + textureHeight: 256 + wrapMode: 0 + filterMode: 1 + sampleCount: 4 + preserveSVGImageAspect: 0 + useSVGPixelsPerUnit: 0 + spriteData: + TessellationDetail: 0 + SpriteRect: + name: + originalName: + pivot: {x: 0, y: 0} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + customData: + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + spriteID: 688436e26c1bc4e4eb9be8b7e572bf0f + PhysicsOutlines: [] diff --git a/Editor/Resources/icon_event_sprite.svg b/Editor/Resources/icon_event_sprite.svg new file mode 100644 index 0000000..1a06616 --- /dev/null +++ b/Editor/Resources/icon_event_sprite.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/Editor/Resources/icon_event_sprite.svg.meta b/Editor/Resources/icon_event_sprite.svg.meta new file mode 100644 index 0000000..ee3af0b --- /dev/null +++ b/Editor/Resources/icon_event_sprite.svg.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: 91a211bd4c50a8741be734633c39ef88 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: a57477913897c46af95d590f580878bd, type: 3} + svgType: 1 + texturedSpriteMeshType: 0 + svgPixelsPerUnit: 100 + gradientResolution: 64 + alignment: 0 + customPivot: {x: 0, y: 0} + generatePhysicsShape: 0 + viewportOptions: 0 + preserveViewport: 0 + advancedMode: 0 + predefinedResolutionIndex: 1 + targetResolution: 1080 + resolutionMultiplier: 1 + stepDistance: 10 + samplingStepDistance: 100 + maxCordDeviationEnabled: 0 + maxCordDeviation: 1 + maxTangentAngleEnabled: 0 + maxTangentAngle: 5 + keepTextureAspectRatio: 1 + textureSize: 256 + textureWidth: 256 + textureHeight: 256 + wrapMode: 0 + filterMode: 1 + sampleCount: 4 + preserveSVGImageAspect: 0 + useSVGPixelsPerUnit: 0 + spriteData: + TessellationDetail: 0 + SpriteRect: + name: + originalName: + pivot: {x: 0, y: 0} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + customData: + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + spriteID: f6818e7dc3d62164384a2bf0c1108b6d + PhysicsOutlines: [] diff --git a/Editor/Resources/icon_event_str.svg b/Editor/Resources/icon_event_str.svg new file mode 100644 index 0000000..7fbee68 --- /dev/null +++ b/Editor/Resources/icon_event_str.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/Editor/Resources/icon_event_str.svg.meta b/Editor/Resources/icon_event_str.svg.meta new file mode 100644 index 0000000..712a00f --- /dev/null +++ b/Editor/Resources/icon_event_str.svg.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: 32c5ccf1ddf174747b3510048d2496d0 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: a57477913897c46af95d590f580878bd, type: 3} + svgType: 1 + texturedSpriteMeshType: 0 + svgPixelsPerUnit: 100 + gradientResolution: 64 + alignment: 0 + customPivot: {x: 0, y: 0} + generatePhysicsShape: 0 + viewportOptions: 0 + preserveViewport: 0 + advancedMode: 0 + predefinedResolutionIndex: 1 + targetResolution: 1080 + resolutionMultiplier: 1 + stepDistance: 10 + samplingStepDistance: 100 + maxCordDeviationEnabled: 0 + maxCordDeviation: 1 + maxTangentAngleEnabled: 0 + maxTangentAngle: 5 + keepTextureAspectRatio: 1 + textureSize: 256 + textureWidth: 256 + textureHeight: 256 + wrapMode: 0 + filterMode: 1 + sampleCount: 4 + preserveSVGImageAspect: 0 + useSVGPixelsPerUnit: 0 + spriteData: + TessellationDetail: 0 + SpriteRect: + name: + originalName: + pivot: {x: 0, y: 0} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + customData: + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + spriteID: ffaae813d6eb4f44ea9c1e0d4c3cbbc0 + PhysicsOutlines: [] diff --git a/Editor/Resources/icon_event_transform.svg b/Editor/Resources/icon_event_transform.svg new file mode 100644 index 0000000..1603e3b --- /dev/null +++ b/Editor/Resources/icon_event_transform.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/Editor/Resources/icon_event_transform.svg.meta b/Editor/Resources/icon_event_transform.svg.meta new file mode 100644 index 0000000..7709446 --- /dev/null +++ b/Editor/Resources/icon_event_transform.svg.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: 30316eb9ffbb6084fb8ab6c572a72315 +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: a57477913897c46af95d590f580878bd, type: 3} + svgType: 1 + texturedSpriteMeshType: 0 + svgPixelsPerUnit: 100 + gradientResolution: 64 + alignment: 0 + customPivot: {x: 0, y: 0} + generatePhysicsShape: 0 + viewportOptions: 0 + preserveViewport: 0 + advancedMode: 0 + predefinedResolutionIndex: 1 + targetResolution: 1080 + resolutionMultiplier: 1 + stepDistance: 10 + samplingStepDistance: 100 + maxCordDeviationEnabled: 0 + maxCordDeviation: 1 + maxTangentAngleEnabled: 0 + maxTangentAngle: 5 + keepTextureAspectRatio: 1 + textureSize: 256 + textureWidth: 256 + textureHeight: 256 + wrapMode: 0 + filterMode: 1 + sampleCount: 4 + preserveSVGImageAspect: 0 + useSVGPixelsPerUnit: 0 + spriteData: + TessellationDetail: 0 + SpriteRect: + name: + originalName: + pivot: {x: 0, y: 0} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + customData: + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + spriteID: 3ff29bf330561ec429d666fc830e5ece + PhysicsOutlines: [] diff --git a/Editor/Resources/icon_event_vec3.svg b/Editor/Resources/icon_event_vec3.svg new file mode 100644 index 0000000..fb086f1 --- /dev/null +++ b/Editor/Resources/icon_event_vec3.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/Editor/Resources/icon_event_vec3.svg.meta b/Editor/Resources/icon_event_vec3.svg.meta new file mode 100644 index 0000000..7e1670e --- /dev/null +++ b/Editor/Resources/icon_event_vec3.svg.meta @@ -0,0 +1,55 @@ +fileFormatVersion: 2 +guid: c223c661d5ac23c46b335294fc72fd7b +ScriptedImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 2 + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 11500000, guid: a57477913897c46af95d590f580878bd, type: 3} + svgType: 1 + texturedSpriteMeshType: 0 + svgPixelsPerUnit: 100 + gradientResolution: 64 + alignment: 0 + customPivot: {x: 0, y: 0} + generatePhysicsShape: 0 + viewportOptions: 0 + preserveViewport: 0 + advancedMode: 0 + predefinedResolutionIndex: 1 + targetResolution: 1080 + resolutionMultiplier: 1 + stepDistance: 10 + samplingStepDistance: 100 + maxCordDeviationEnabled: 0 + maxCordDeviation: 1 + maxTangentAngleEnabled: 0 + maxTangentAngle: 5 + keepTextureAspectRatio: 1 + textureSize: 256 + textureWidth: 256 + textureHeight: 256 + wrapMode: 0 + filterMode: 1 + sampleCount: 4 + preserveSVGImageAspect: 0 + useSVGPixelsPerUnit: 0 + spriteData: + TessellationDetail: 0 + SpriteRect: + name: + originalName: + pivot: {x: 0, y: 0} + alignment: 0 + border: {x: 0, y: 0, z: 0, w: 0} + customData: + rect: + serializedVersion: 2 + x: 0 + y: 0 + width: 0 + height: 0 + spriteID: 03da0b59df8b71b4ba1afc101bf847a5 + PhysicsOutlines: [] diff --git a/Runtime/Listeners/Base/VoidEventListener.cs b/Runtime/Listeners/Base/VoidEventListener.cs index 7a505cf..77a7572 100644 --- a/Runtime/Listeners/Base/VoidEventListener.cs +++ b/Runtime/Listeners/Base/VoidEventListener.cs @@ -1,4 +1,5 @@ -using UnityEngine; +using NaughtyAttributes; +using UnityEngine; using UnityEngine.Events; using Xprees.Events.ScriptableObjects.Base; @@ -24,6 +25,7 @@ private void OnDisable() voidGameEvent.onEventRaised -= Respond; } + [Button("Invoke Event", EButtonEnableMode.Playmode)] public void Respond() => onEventRaised?.Invoke(); } } \ No newline at end of file diff --git a/Runtime/ScriptableObjects/Base/EventChannelBaseSO.cs.meta b/Runtime/ScriptableObjects/Base/EventChannelBaseSO.cs.meta index 9dd7645..55cfee0 100644 --- a/Runtime/ScriptableObjects/Base/EventChannelBaseSO.cs.meta +++ b/Runtime/ScriptableObjects/Base/EventChannelBaseSO.cs.meta @@ -1,3 +1,11 @@ fileFormatVersion: 2 guid: 215f1907ed224ae2b3a21d7d80f22e43 -timeCreated: 1669147677 \ No newline at end of file +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 6192944022281365145, guid: c3e3783a1cc6d284fa9a685a5ae76c46, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/ScriptableObjects/Base/VoidEventChannelSO.cs.meta b/Runtime/ScriptableObjects/Base/VoidEventChannelSO.cs.meta index 4d60124..f49d1d4 100644 --- a/Runtime/ScriptableObjects/Base/VoidEventChannelSO.cs.meta +++ b/Runtime/ScriptableObjects/Base/VoidEventChannelSO.cs.meta @@ -1,3 +1,12 @@ fileFormatVersion: 2 guid: fefe01c32dcb48f9b0084657427ff80a -timeCreated: 1669147994 \ No newline at end of file +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: + - addLogEvent: {fileID: 11400000, guid: 5ce417186a4b3a444ae9a8b5b2ceaeaa, type: 2} + executionOrder: 0 + icon: {fileID: 6192944022281365145, guid: c3e3783a1cc6d284fa9a685a5ae76c46, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/ScriptableObjects/EventLogging/EventLogUserEventChannelSO.cs.meta b/Runtime/ScriptableObjects/EventLogging/EventLogUserEventChannelSO.cs.meta index d128ffe..c84f7b8 100644 --- a/Runtime/ScriptableObjects/EventLogging/EventLogUserEventChannelSO.cs.meta +++ b/Runtime/ScriptableObjects/EventLogging/EventLogUserEventChannelSO.cs.meta @@ -1,3 +1,11 @@ -fileFormatVersion: 2 +fileFormatVersion: 2 guid: 86af39e2c7c94bd9b425871fe890a2fd -timeCreated: 1679319874 \ No newline at end of file +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 6192944022281365145, guid: c3e3783a1cc6d284fa9a685a5ae76c46, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/ScriptableObjects/EventLogging/EventLoggingEventChannel.cs.meta b/Runtime/ScriptableObjects/EventLogging/EventLoggingEventChannel.cs.meta index 51eaa54..d7adff1 100644 --- a/Runtime/ScriptableObjects/EventLogging/EventLoggingEventChannel.cs.meta +++ b/Runtime/ScriptableObjects/EventLogging/EventLoggingEventChannel.cs.meta @@ -1,3 +1,11 @@ -fileFormatVersion: 2 +fileFormatVersion: 2 guid: 00cfab004d424404967c20ec934c3c48 -timeCreated: 1679317602 \ No newline at end of file +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 6192944022281365145, guid: c3e3783a1cc6d284fa9a685a5ae76c46, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/ScriptableObjects/Primitive/BoolEventChannelSO.cs.meta b/Runtime/ScriptableObjects/Primitive/BoolEventChannelSO.cs.meta index 73c0d63..2fb7a11 100644 --- a/Runtime/ScriptableObjects/Primitive/BoolEventChannelSO.cs.meta +++ b/Runtime/ScriptableObjects/Primitive/BoolEventChannelSO.cs.meta @@ -1,3 +1,12 @@ -fileFormatVersion: 2 +fileFormatVersion: 2 guid: f2db5e6e1c824bcdb9e11e2bf5a3eb40 -timeCreated: 1669396185 \ No newline at end of file +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: + - addLogEvent: {fileID: 11400000, guid: 5ce417186a4b3a444ae9a8b5b2ceaeaa, type: 2} + executionOrder: 0 + icon: {fileID: 6192944022281365145, guid: be704df36165f9945b7851ebeb5cd2a3, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/ScriptableObjects/Primitive/FloatEventChannelSO.cs.meta b/Runtime/ScriptableObjects/Primitive/FloatEventChannelSO.cs.meta index 6133045..6092bc8 100644 --- a/Runtime/ScriptableObjects/Primitive/FloatEventChannelSO.cs.meta +++ b/Runtime/ScriptableObjects/Primitive/FloatEventChannelSO.cs.meta @@ -1,3 +1,12 @@ -fileFormatVersion: 2 +fileFormatVersion: 2 guid: 3deb6bfde17f4eb0bd273b03046a63dd -timeCreated: 1679384672 \ No newline at end of file +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: + - addLogEvent: {fileID: 11400000, guid: 5ce417186a4b3a444ae9a8b5b2ceaeaa, type: 2} + executionOrder: 0 + icon: {fileID: 6192944022281365145, guid: b9b4edc43149c8247b3db6cab3423c45, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/ScriptableObjects/Primitive/IntEventChannelSO.cs.meta b/Runtime/ScriptableObjects/Primitive/IntEventChannelSO.cs.meta index fb649b2..c2d60f7 100644 --- a/Runtime/ScriptableObjects/Primitive/IntEventChannelSO.cs.meta +++ b/Runtime/ScriptableObjects/Primitive/IntEventChannelSO.cs.meta @@ -1,3 +1,11 @@ fileFormatVersion: 2 guid: 72bdbbdadf784cf9bb078db291e11080 -timeCreated: 1669148104 \ No newline at end of file +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 6192944022281365145, guid: 263656f541c7673479545dae48fd38f7, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/ScriptableObjects/Primitive/StringEventChannelSO.cs.meta b/Runtime/ScriptableObjects/Primitive/StringEventChannelSO.cs.meta index 0770827..65349a3 100644 --- a/Runtime/ScriptableObjects/Primitive/StringEventChannelSO.cs.meta +++ b/Runtime/ScriptableObjects/Primitive/StringEventChannelSO.cs.meta @@ -1,3 +1,11 @@ -fileFormatVersion: 2 +fileFormatVersion: 2 guid: 9f32b01a8ac94ecd8a6a79e0c0811186 -timeCreated: 1676459924 \ No newline at end of file +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 6192944022281365145, guid: 32c5ccf1ddf174747b3510048d2496d0, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/ScriptableObjects/Unity/GameObjectEventChannelSO.cs.meta b/Runtime/ScriptableObjects/Unity/GameObjectEventChannelSO.cs.meta index b051eca..118ebce 100644 --- a/Runtime/ScriptableObjects/Unity/GameObjectEventChannelSO.cs.meta +++ b/Runtime/ScriptableObjects/Unity/GameObjectEventChannelSO.cs.meta @@ -1,3 +1,11 @@ -fileFormatVersion: 2 +fileFormatVersion: 2 guid: 3fbfb28a134947e792413ab934a24ad5 -timeCreated: 1669666762 \ No newline at end of file +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 6192944022281365145, guid: 50ec58d473d89c74eb2fd3a33cd52577, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/ScriptableObjects/Unity/SpriteEventChannelSO.cs.meta b/Runtime/ScriptableObjects/Unity/SpriteEventChannelSO.cs.meta index 923c043..f54aec3 100644 --- a/Runtime/ScriptableObjects/Unity/SpriteEventChannelSO.cs.meta +++ b/Runtime/ScriptableObjects/Unity/SpriteEventChannelSO.cs.meta @@ -1,3 +1,11 @@ -fileFormatVersion: 2 +fileFormatVersion: 2 guid: f6ec713480e04f41b519850cc2c53977 -timeCreated: 1680737377 \ No newline at end of file +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 6192944022281365145, guid: 91a211bd4c50a8741be734633c39ef88, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/ScriptableObjects/Unity/TransformEventChannelSO.cs.meta b/Runtime/ScriptableObjects/Unity/TransformEventChannelSO.cs.meta index ce5d136..be7ea6b 100644 --- a/Runtime/ScriptableObjects/Unity/TransformEventChannelSO.cs.meta +++ b/Runtime/ScriptableObjects/Unity/TransformEventChannelSO.cs.meta @@ -1,3 +1,11 @@ -fileFormatVersion: 2 +fileFormatVersion: 2 guid: 3920c2ee1a0a4e098ad7209b0b65a19d -timeCreated: 1669672769 \ No newline at end of file +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 6192944022281365145, guid: 30316eb9ffbb6084fb8ab6c572a72315, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/ScriptableObjects/Unity/Vector3EventChannelSO.cs.meta b/Runtime/ScriptableObjects/Unity/Vector3EventChannelSO.cs.meta index 5b57088..99a273b 100644 --- a/Runtime/ScriptableObjects/Unity/Vector3EventChannelSO.cs.meta +++ b/Runtime/ScriptableObjects/Unity/Vector3EventChannelSO.cs.meta @@ -1,3 +1,11 @@ -fileFormatVersion: 2 +fileFormatVersion: 2 guid: 1380fdd95102436db25e3208f666ce6a -timeCreated: 1678367155 \ No newline at end of file +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 6192944022281365145, guid: c223c661d5ac23c46b335294fc72fd7b, type: 3} + userData: + assetBundleName: + assetBundleVariant: From cb524aac046aed8bdf3c26c2bba3e650d0544058 Mon Sep 17 00:00:00 2001 From: Vaclav Bily Date: Tue, 24 Dec 2024 14:53:43 +0100 Subject: [PATCH 16/21] Added icons for all built in events --- Editor/Core/EventChannelBaseEditor.cs | 11 +++++++++++ Editor/Core/EventChannelBaseEditor.cs.meta | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 Editor/Core/EventChannelBaseEditor.cs create mode 100644 Editor/Core/EventChannelBaseEditor.cs.meta diff --git a/Editor/Core/EventChannelBaseEditor.cs b/Editor/Core/EventChannelBaseEditor.cs new file mode 100644 index 0000000..c7cd9d6 --- /dev/null +++ b/Editor/Core/EventChannelBaseEditor.cs @@ -0,0 +1,11 @@ +using UnityEditor; +using Xprees.Events.ScriptableObjects.Base; + +namespace Xprees.Events.Editor.Core +{ + [CustomEditor(typeof(EventChannelBaseSO<>), true)] + public class EventChannelBaseEditor : UnityEditor.Editor + { + + } +} \ No newline at end of file diff --git a/Editor/Core/EventChannelBaseEditor.cs.meta b/Editor/Core/EventChannelBaseEditor.cs.meta new file mode 100644 index 0000000..57ed730 --- /dev/null +++ b/Editor/Core/EventChannelBaseEditor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f00b0b071fc0464c9a182d929e683cf4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From b67bf0b13c252525b0ffdcf4d6aca57ce6ade50b Mon Sep 17 00:00:00 2001 From: Vaclav Bily Date: Wed, 25 Dec 2024 16:51:26 +0100 Subject: [PATCH 17/21] Event listeners added icons --- Runtime/Listeners/Base/EventListenerBase.cs.meta | 10 +++++++++- Runtime/Listeners/Base/VoidEventListener.cs.meta | 10 +++++++++- .../Listeners/Primitive/BoolEventListener.cs.meta | 12 ++++++++++-- Runtime/Listeners/Primitive/IntEventListener.cs.meta | 10 +++++++++- .../Listeners/Primitive/StringEventListener.cs.meta | 12 ++++++++++-- .../Listeners/Unity/GameObjectEventListener.cs.meta | 12 ++++++++++-- .../Listeners/Unity/TransformEventListener.cs.meta | 12 ++++++++++-- Runtime/Listeners/Unity/Vector3EventListener.cs.meta | 12 ++++++++++-- 8 files changed, 77 insertions(+), 13 deletions(-) diff --git a/Runtime/Listeners/Base/EventListenerBase.cs.meta b/Runtime/Listeners/Base/EventListenerBase.cs.meta index c646be2..9dd3361 100644 --- a/Runtime/Listeners/Base/EventListenerBase.cs.meta +++ b/Runtime/Listeners/Base/EventListenerBase.cs.meta @@ -1,3 +1,11 @@ fileFormatVersion: 2 guid: 335cf9310d77435aa4aa74141496e80f -timeCreated: 1669148746 \ No newline at end of file +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 6192944022281365145, guid: dad73b21a458f8a45b45a9290d987678, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Listeners/Base/VoidEventListener.cs.meta b/Runtime/Listeners/Base/VoidEventListener.cs.meta index d7d407d..9e620de 100644 --- a/Runtime/Listeners/Base/VoidEventListener.cs.meta +++ b/Runtime/Listeners/Base/VoidEventListener.cs.meta @@ -1,3 +1,11 @@ fileFormatVersion: 2 guid: ac15fee6f7ff4ca0b2aeb786bd18567f -timeCreated: 1669148304 \ No newline at end of file +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 6192944022281365145, guid: dad73b21a458f8a45b45a9290d987678, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Listeners/Primitive/BoolEventListener.cs.meta b/Runtime/Listeners/Primitive/BoolEventListener.cs.meta index a045acb..655ecd1 100644 --- a/Runtime/Listeners/Primitive/BoolEventListener.cs.meta +++ b/Runtime/Listeners/Primitive/BoolEventListener.cs.meta @@ -1,3 +1,11 @@ -fileFormatVersion: 2 +fileFormatVersion: 2 guid: 59cc4f979bba4f76836ca95aa2d66a51 -timeCreated: 1669396236 \ No newline at end of file +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 6192944022281365145, guid: dad73b21a458f8a45b45a9290d987678, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Listeners/Primitive/IntEventListener.cs.meta b/Runtime/Listeners/Primitive/IntEventListener.cs.meta index a41511d..2d254b6 100644 --- a/Runtime/Listeners/Primitive/IntEventListener.cs.meta +++ b/Runtime/Listeners/Primitive/IntEventListener.cs.meta @@ -1,3 +1,11 @@ fileFormatVersion: 2 guid: 50b861516a0b41a19c5a9ab36e42db9b -timeCreated: 1669150292 \ No newline at end of file +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 6192944022281365145, guid: dad73b21a458f8a45b45a9290d987678, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Listeners/Primitive/StringEventListener.cs.meta b/Runtime/Listeners/Primitive/StringEventListener.cs.meta index 2507cd8..d8d9115 100644 --- a/Runtime/Listeners/Primitive/StringEventListener.cs.meta +++ b/Runtime/Listeners/Primitive/StringEventListener.cs.meta @@ -1,3 +1,11 @@ -fileFormatVersion: 2 +fileFormatVersion: 2 guid: 324fd21d91674aae9457152fa8d8f7e2 -timeCreated: 1676459988 \ No newline at end of file +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 6192944022281365145, guid: dad73b21a458f8a45b45a9290d987678, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Listeners/Unity/GameObjectEventListener.cs.meta b/Runtime/Listeners/Unity/GameObjectEventListener.cs.meta index 2eb8dd6..9e20e87 100644 --- a/Runtime/Listeners/Unity/GameObjectEventListener.cs.meta +++ b/Runtime/Listeners/Unity/GameObjectEventListener.cs.meta @@ -1,3 +1,11 @@ -fileFormatVersion: 2 +fileFormatVersion: 2 guid: 79b2a58b4a59462bab38d6f306d3bced -timeCreated: 1669666794 \ No newline at end of file +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 6192944022281365145, guid: dad73b21a458f8a45b45a9290d987678, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Listeners/Unity/TransformEventListener.cs.meta b/Runtime/Listeners/Unity/TransformEventListener.cs.meta index 01a505e..fac2ea2 100644 --- a/Runtime/Listeners/Unity/TransformEventListener.cs.meta +++ b/Runtime/Listeners/Unity/TransformEventListener.cs.meta @@ -1,3 +1,11 @@ -fileFormatVersion: 2 +fileFormatVersion: 2 guid: 087144a3986b442785aab4311929867d -timeCreated: 1669672798 \ No newline at end of file +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 6192944022281365145, guid: dad73b21a458f8a45b45a9290d987678, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Listeners/Unity/Vector3EventListener.cs.meta b/Runtime/Listeners/Unity/Vector3EventListener.cs.meta index 3323365..fe2ebdd 100644 --- a/Runtime/Listeners/Unity/Vector3EventListener.cs.meta +++ b/Runtime/Listeners/Unity/Vector3EventListener.cs.meta @@ -1,3 +1,11 @@ -fileFormatVersion: 2 +fileFormatVersion: 2 guid: a109c9ae9dc241ffa491e7033fb3f155 -timeCreated: 1678367408 \ No newline at end of file +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 6192944022281365145, guid: dad73b21a458f8a45b45a9290d987678, type: 3} + userData: + assetBundleName: + assetBundleVariant: From ef860d622f4e50e505a1a729b455ab1752cf18f9 Mon Sep 17 00:00:00 2001 From: Vaclav Bily Date: Wed, 26 Feb 2025 13:59:03 +0100 Subject: [PATCH 18/21] Events updated dependencies to latest version --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b04c065..ddf8f79 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,8 @@ "category": "Core", "dependencies": { "cz.xprees.core": "1.0.31", - "cz.xprees.variables": "1.0.7", - "cz.xprees.event-logging": "1.0.5", + "cz.xprees.variables": "1.0.9", + "cz.xprees.event-logging": "1.0.7", "com.dbrizov.naughtyattributes": "2.1.4" }, "keywords": [ From 34bda0196c2050eea1afb4baece754a7e2985176 Mon Sep 17 00:00:00 2001 From: Vaclav Bily Date: Thu, 17 Apr 2025 23:13:46 +0200 Subject: [PATCH 19/21] Add Utils - LifecycleEventTrigger --- Runtime/Utils.meta | 3 +++ Runtime/Utils/LifecycleEventTrigger.cs | 27 +++++++++++++++++++++ Runtime/Utils/LifecycleEventTrigger.cs.meta | 3 +++ 3 files changed, 33 insertions(+) create mode 100644 Runtime/Utils.meta create mode 100644 Runtime/Utils/LifecycleEventTrigger.cs create mode 100644 Runtime/Utils/LifecycleEventTrigger.cs.meta diff --git a/Runtime/Utils.meta b/Runtime/Utils.meta new file mode 100644 index 0000000..b2c6acc --- /dev/null +++ b/Runtime/Utils.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: dee109f7a2144a439b8da62f4ab0aeb5 +timeCreated: 1744923993 \ No newline at end of file diff --git a/Runtime/Utils/LifecycleEventTrigger.cs b/Runtime/Utils/LifecycleEventTrigger.cs new file mode 100644 index 0000000..51410dc --- /dev/null +++ b/Runtime/Utils/LifecycleEventTrigger.cs @@ -0,0 +1,27 @@ +using UnityEngine; +using Xprees.Events.ScriptableObjects.Base; + +namespace Xprees.Events.Utils +{ + public class LifecycleEventTrigger : MonoBehaviour + { + [Header("Broadcasting Events")] + public VoidEventChannelSO onAwake; + + public VoidEventChannelSO onStart; + public VoidEventChannelSO onEnable; + public VoidEventChannelSO onDisable; + public VoidEventChannelSO onDestroy; + + private void Awake() => onAwake?.RaiseEvent(); + + private void Start() => onStart?.RaiseEvent(); + + private void OnEnable() => onEnable?.RaiseEvent(); + + private void OnDisable() => onDisable?.RaiseEvent(); + + private void OnDestroy() => onDestroy?.RaiseEvent(); + + } +} \ No newline at end of file diff --git a/Runtime/Utils/LifecycleEventTrigger.cs.meta b/Runtime/Utils/LifecycleEventTrigger.cs.meta new file mode 100644 index 0000000..81e7310 --- /dev/null +++ b/Runtime/Utils/LifecycleEventTrigger.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7e3307e186544b2ab80d8855d8dd026b +timeCreated: 1744923993 \ No newline at end of file From 875cc33a7df5c6149d8396ee63ccc1bf4d95022d Mon Sep 17 00:00:00 2001 From: Vaclav Bily Date: Sat, 19 Apr 2025 13:18:34 +0200 Subject: [PATCH 20/21] Add .npmignore - exclude .github in package --- .npmignore | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .npmignore diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..42c21e8 --- /dev/null +++ b/.npmignore @@ -0,0 +1,14 @@ +# Ignore files and directories that should not be included in the npm package +.npmignore + +# IDEs +.idea +.vscode +.vs +.fleet + +# Gitlab, GitHub +.git +.gitignore +.gitlab-ci.yml +.github \ No newline at end of file From 0be0ebd79776c17d4869d5cbef6cd304c76aabfc Mon Sep 17 00:00:00 2001 From: Vaclav Bily Date: Mon, 9 Jun 2025 00:12:23 +0200 Subject: [PATCH 21/21] #else Add Event-logging functionality enabled by Scripting Symbol define XPREES_EVENT_LOGGING --- .github/workflows/deploy.yml | 2 +- LICENSE.md | 201 ++++++++++++++++++ LICENSE.md.meta | 3 + README.md | 49 +++-- .../Base/EventChannelBaseSO.cs | 24 ++- .../Base/VoidEventChannelSO.cs | 14 +- .../EventLogUserEventChannelSO.cs | 8 +- .../EventLogging/EventLoggingEventChannel.cs | 9 +- package.json | 2 +- 9 files changed, 285 insertions(+), 27 deletions(-) create mode 100644 LICENSE.md create mode 100644 LICENSE.md.meta diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d687f8a..a581171 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -28,6 +28,6 @@ jobs: with: token: ${{ secrets.NPM_AUTH_TOKEN }} access: public - tag: ${{ github.ref_name }} + tag: latest ignore-scripts: true diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..9b52423 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2025 xprees - Václav Bílý + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/LICENSE.md.meta b/LICENSE.md.meta new file mode 100644 index 0000000..46e7526 --- /dev/null +++ b/LICENSE.md.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 1f67c8823d6e4d48aecf2234b6ca9be2 +timeCreated: 1749419277 \ No newline at end of file diff --git a/README.md b/README.md index 1454aeb..ef39575 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,44 @@ -# ScriptableObject Event System +# Unity Event System based on ScriptableObjects + +[![NPM Version](https://img.shields.io/npm/v/cz.xprees.events)](https://www.npmjs.com/package/cz.xprees.events) + +This package provides a simple and powerful event system for Unity using ScriptableObject EventChannels. It allows you to create and receive events +across different parts of your game without tightly coupling components and even in multi-scene environment. ## Usage To use in Unity clone with following git url to package manager. -- Version without event-logging is in `master` branch +## Installation + +Install the package using one of the following methods: + +### Git URL + +Install in the package manager using the following Git URL + +```git +https://github.com/xprees/Unity-Events.git +``` + +### Scoped NPM Registry + +Install the package using npm scoped registry in Project Settings > Package Manager > Scoped Registries + +```json +{ + "name": "NPM - xprees", + "url": "https://registry.npmjs.org", + "scopes": [ + "cz.xprees" + ] +} +``` - ```git - https://github.com/xprees/Unity-Events.git - ``` +Then simply install the package using the Unity Package Manager using the NPM - xprees scope or by the package name `cz.xprees.events`. -- Version with event-logging is in `event-logging` branch. +## Event Logging - ```git - https://github.com/xprees/Unity-Events.git#event-logging - ``` - You will also need second package `cz.xprees.event-logging` - which is in this repository with following url. - ```git - https://github.com/xprees/Unity-Event-Logging.git - ``` \ No newline at end of file +The package will automatically enable event-logging capabilities when detects the Script Define Symbol `XPREES_EVENT_LOGGING` from +[`cz.xprees.event-logging`](https://www.npmjs.com/package/cz.xprees.event-logging) package. \ No newline at end of file diff --git a/Runtime/ScriptableObjects/Base/EventChannelBaseSO.cs b/Runtime/ScriptableObjects/Base/EventChannelBaseSO.cs index a7d15ca..5b66836 100644 --- a/Runtime/ScriptableObjects/Base/EventChannelBaseSO.cs +++ b/Runtime/ScriptableObjects/Base/EventChannelBaseSO.cs @@ -1,10 +1,12 @@ -using NaughtyAttributes; -using UnityEngine; -using UnityEngine.Events; +using UnityEngine.Events; using Xprees.Core; +#if XPREES_EVENT_LOGGING +using NaughtyAttributes; +using UnityEngine; +using Xprees.Variables.Reference.Primitive; using Xprees.EventLogging.ScriptableObjects; using Xprees.Events.ScriptableObjects.EventLogging; -using Xprees.Variables.Reference.Primitive; +#endif namespace Xprees.Events.ScriptableObjects.Base { @@ -18,12 +20,16 @@ public class EventChannelBaseSO : DescriptionBaseSO public void RaiseEvent(T value) { +#if XPREES_EVENT_LOGGING if (enableEventLogging) LogData(value); +#endif onEventRaised?.Invoke(value); } + #region Event Logging +#if XPREES_EVENT_LOGGING [Header("Event Logging")] public bool enableEventLogging = false; @@ -46,11 +52,13 @@ protected void LogData(T value) addLogEvent.RaiseEvent(eventLog); } +#endif /// Allows to override the event data provided for logging. Provide specific data for your event. protected virtual string GetEventData(T value) => null; #endregion + } /// @@ -64,12 +72,15 @@ public class EventChannelBaseSO : DescriptionBaseSO public void RaiseEvent(T1 firstValue, T2 secondValue) { +#if XPREES_EVENT_LOGGING if (enableEventLogging) LogData(firstValue, secondValue); +#endif onEventRaised?.Invoke(firstValue, secondValue); } #region Event Logging +#if XPREES_EVENT_LOGGING [Header("Event Logging")] public bool enableEventLogging = false; @@ -91,6 +102,7 @@ protected void LogData(T1 firstValue, T2 secondValue) addLogEvent.RaiseEvent(eventLog); } +#endif /// Allows to override the event data provided for logging. Provide specific data for your event. protected virtual string GetEventData(T1 firstValue, T2 secondValue) => null; @@ -111,12 +123,15 @@ public class EventChannelBaseSO : DescriptionBaseSO public void RaiseEvent(T1 firstValue, T2 secondValue, T3 thirdValue) { +#if XPREES_EVENT_LOGGING if (enableEventLogging) LogData(firstValue, secondValue, thirdValue); +#endif onEventRaised?.Invoke(firstValue, secondValue, thirdValue); } #region Event Logging +#if XPREES_EVENT_LOGGING [Header("Event Logging")] public bool enableEventLogging = false; @@ -138,6 +153,7 @@ protected void LogData(T1 firstValue, T2 secondValue, T3 thirdValue) addLogEvent.RaiseEvent(eventLog); } +#endif /// Allows to override the event data provided for logging. Provide specific data for your event. protected virtual string GetEventData(T1 firstValue, T2 secondValue, T3 thirdValue) => null; diff --git a/Runtime/ScriptableObjects/Base/VoidEventChannelSO.cs b/Runtime/ScriptableObjects/Base/VoidEventChannelSO.cs index 5d29ca1..1e69284 100644 --- a/Runtime/ScriptableObjects/Base/VoidEventChannelSO.cs +++ b/Runtime/ScriptableObjects/Base/VoidEventChannelSO.cs @@ -1,10 +1,12 @@ -using NaughtyAttributes; -using UnityEngine; +using UnityEngine; using UnityEngine.Events; using Xprees.Core; +#if XPREES_EVENT_LOGGING +using NaughtyAttributes; +using Xprees.Variables.Reference.Primitive; using Xprees.EventLogging.ScriptableObjects; using Xprees.Events.ScriptableObjects.EventLogging; -using Xprees.Variables.Reference.Primitive; +#endif namespace Xprees.Events.ScriptableObjects.Base { @@ -15,10 +17,14 @@ public class VoidEventChannelSO : DescriptionBaseSO public void RaiseEvent() { +#if XPREES_EVENT_LOGGING if (enableEventLogging) LogData(); +#endif onEventRaised?.Invoke(); } +#if XPREES_EVENT_LOGGING + #region Event Logging [Header("Event Logging")] @@ -49,5 +55,7 @@ protected void LogData() #endregion +#endif + } } \ No newline at end of file diff --git a/Runtime/ScriptableObjects/EventLogging/EventLogUserEventChannelSO.cs b/Runtime/ScriptableObjects/EventLogging/EventLogUserEventChannelSO.cs index 80b0f49..059c95c 100644 --- a/Runtime/ScriptableObjects/EventLogging/EventLogUserEventChannelSO.cs +++ b/Runtime/ScriptableObjects/EventLogging/EventLogUserEventChannelSO.cs @@ -1,11 +1,15 @@ -using UnityEngine; -using Xprees.EventLogging.Api.Model; +#if XPREES_EVENT_LOGGING +using UnityEngine; using Xprees.Events.ScriptableObjects.Base; +using Xprees.EventLogging.Api.Model; +#endif namespace Xprees.Events.ScriptableObjects.EventLogging { +#if XPREES_EVENT_LOGGING [CreateAssetMenu(menuName = "Events/EventLogging/EventLogging User Event", fileName = "EventLoggingUserEvent")] public class EventLogUserEventChannelSO : EventChannelBaseSO { } +#endif } \ No newline at end of file diff --git a/Runtime/ScriptableObjects/EventLogging/EventLoggingEventChannel.cs b/Runtime/ScriptableObjects/EventLogging/EventLoggingEventChannel.cs index 719aca1..81b80eb 100644 --- a/Runtime/ScriptableObjects/EventLogging/EventLoggingEventChannel.cs +++ b/Runtime/ScriptableObjects/EventLogging/EventLoggingEventChannel.cs @@ -1,11 +1,16 @@ -using UnityEngine; -using Xprees.EventLogging.ScriptableObjects; +#if XPREES_EVENT_LOGGING +using UnityEngine; using Xprees.Events.ScriptableObjects.Base; +using Xprees.EventLogging.ScriptableObjects; +#endif namespace Xprees.Events.ScriptableObjects.EventLogging { +#if XPREES_EVENT_LOGGING [CreateAssetMenu(menuName = "Events/EventLogging/EventLogging Event", fileName = "EventLoggingEvent")] public class EventLoggingEventChannel : EventChannelBaseSO { } + +#endif } \ No newline at end of file diff --git a/package.json b/package.json index ddf8f79..0a64ac9 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "dependencies": { "cz.xprees.core": "1.0.31", "cz.xprees.variables": "1.0.9", - "cz.xprees.event-logging": "1.0.7", + "cz.xprees.event-logging": "1.0.12", "com.dbrizov.naughtyattributes": "2.1.4" }, "keywords": [