From 09f327591fe34c3d427fcb9b115d61424799ddaf Mon Sep 17 00:00:00 2001 From: Adam Leung Date: Tue, 26 Apr 2022 21:16:46 -0400 Subject: [PATCH] Verified slicing works, fixed issue with wizard not setting asset as dirty (which caused asset not to be saved correctly) --- .../Player Spritesheet Slice Data.asset | 96 +++++++++---------- .../Wizards/GenerateSpriteSliceDataWizard.cs | 1 + ProjectSettings/UnityConnectSettings.asset | 67 ++++++------- 3 files changed, 84 insertions(+), 80 deletions(-) diff --git a/Assets/Centribo/Common/Examples/Realtime Sprite Swapping/Player Spritesheet Slice Data.asset b/Assets/Centribo/Common/Examples/Realtime Sprite Swapping/Player Spritesheet Slice Data.asset index 8dd4f94..aef41b8 100644 --- a/Assets/Centribo/Common/Examples/Realtime Sprite Swapping/Player Spritesheet Slice Data.asset +++ b/Assets/Centribo/Common/Examples/Realtime Sprite Swapping/Player Spritesheet Slice Data.asset @@ -14,275 +14,275 @@ MonoBehaviour: m_EditorClassIdentifier: SliceData: - OriginalSprite: {fileID: 1502261803, guid: 0aa5e4b2c85eb6846bd406f2a483ad2e, type: 3} - Rect: + SpriteRect: serializedVersion: 2 x: 9 y: 220 width: 63 height: 96 - NormalizedPivot: {x: 0.35714287, y: 0} + NormalizedPivot: {x: 0.5, y: 0.5} PixelsPerUnit: 100 Border: {x: 0, y: 0, z: 0, w: 0} MeshType: 1 - OriginalSprite: {fileID: 1736464688, guid: 0aa5e4b2c85eb6846bd406f2a483ad2e, type: 3} - Rect: + SpriteRect: serializedVersion: 2 x: 84 y: 220 width: 71 height: 101 - NormalizedPivot: {x: 0, y: 0} + NormalizedPivot: {x: 0.5, y: 0.5} PixelsPerUnit: 100 Border: {x: 0, y: 0, z: 0, w: 0} MeshType: 1 - OriginalSprite: {fileID: -2093629010, guid: 0aa5e4b2c85eb6846bd406f2a483ad2e, type: 3} - Rect: + SpriteRect: serializedVersion: 2 x: 162 y: 222 width: 78 height: 97 - NormalizedPivot: {x: 0, y: 0} + NormalizedPivot: {x: 0.5, y: 0.5} PixelsPerUnit: 100 Border: {x: 0, y: 0, z: 0, w: 0} MeshType: 1 - OriginalSprite: {fileID: 1966931817, guid: 0aa5e4b2c85eb6846bd406f2a483ad2e, type: 3} - Rect: + SpriteRect: serializedVersion: 2 x: 248 y: 220 width: 66 height: 84 - NormalizedPivot: {x: 0, y: 0} + NormalizedPivot: {x: 0.5, y: 0.5} PixelsPerUnit: 100 Border: {x: 0, y: 0, z: 0, w: 0} MeshType: 1 - OriginalSprite: {fileID: -83602619, guid: 0aa5e4b2c85eb6846bd406f2a483ad2e, type: 3} - Rect: + SpriteRect: serializedVersion: 2 x: 321 y: 223 width: 79 height: 99 - NormalizedPivot: {x: 0, y: 0} + NormalizedPivot: {x: 0.5, y: 0.5} PixelsPerUnit: 100 Border: {x: 0, y: 0, z: 0, w: 0} MeshType: 1 - OriginalSprite: {fileID: -1824770002, guid: 0aa5e4b2c85eb6846bd406f2a483ad2e, type: 3} - Rect: + SpriteRect: serializedVersion: 2 x: 410 y: 224 width: 58 height: 99 - NormalizedPivot: {x: 0, y: 0} + NormalizedPivot: {x: 0.5, y: 0.5} PixelsPerUnit: 100 Border: {x: 0, y: 0, z: 0, w: 0} MeshType: 1 - OriginalSprite: {fileID: 1605999427, guid: 0aa5e4b2c85eb6846bd406f2a483ad2e, type: 3} - Rect: + SpriteRect: serializedVersion: 2 x: 492 y: 224 width: 58 height: 99 - NormalizedPivot: {x: 0, y: 0} + NormalizedPivot: {x: 0.5, y: 0.5} PixelsPerUnit: 100 Border: {x: 0, y: 0, z: 0, w: 0} MeshType: 1 - OriginalSprite: {fileID: -1999616342, guid: 0aa5e4b2c85eb6846bd406f2a483ad2e, type: 3} - Rect: + SpriteRect: serializedVersion: 2 x: 562 y: 220 width: 76 height: 97 - NormalizedPivot: {x: 0, y: 0} + NormalizedPivot: {x: 0.5, y: 0.5} PixelsPerUnit: 100 Border: {x: 0, y: 0, z: 0, w: 0} MeshType: 1 - OriginalSprite: {fileID: 1389634300, guid: 0aa5e4b2c85eb6846bd406f2a483ad2e, type: 3} - Rect: + SpriteRect: serializedVersion: 2 x: 643 y: 220 width: 75 height: 96 - NormalizedPivot: {x: 0, y: 0} + NormalizedPivot: {x: 0.5, y: 0.5} PixelsPerUnit: 100 Border: {x: 0, y: 0, z: 0, w: 0} MeshType: 1 - OriginalSprite: {fileID: 1321375880, guid: 0aa5e4b2c85eb6846bd406f2a483ad2e, type: 3} - Rect: + SpriteRect: serializedVersion: 2 x: 3 y: 110 width: 72 height: 97 - NormalizedPivot: {x: 0.45833334, y: 0} + NormalizedPivot: {x: 0.5, y: 0.5} PixelsPerUnit: 100 Border: {x: 0, y: 0, z: 0, w: 0} MeshType: 1 - OriginalSprite: {fileID: 2086607223, guid: 0aa5e4b2c85eb6846bd406f2a483ad2e, type: 3} - Rect: + SpriteRect: serializedVersion: 2 x: 93 y: 110 width: 55 height: 98 - NormalizedPivot: {x: 0, y: 0} + NormalizedPivot: {x: 0.5, y: 0.5} PixelsPerUnit: 100 Border: {x: 0, y: 0, z: 0, w: 0} MeshType: 1 - OriginalSprite: {fileID: -1493466423, guid: 0aa5e4b2c85eb6846bd406f2a483ad2e, type: 3} - Rect: + SpriteRect: serializedVersion: 2 x: 161 y: 110 width: 77 height: 96 - NormalizedPivot: {x: 0, y: 0} + NormalizedPivot: {x: 0.5, y: 0.5} PixelsPerUnit: 100 Border: {x: 0, y: 0, z: 0, w: 0} MeshType: 1 - OriginalSprite: {fileID: -982967443, guid: 0aa5e4b2c85eb6846bd406f2a483ad2e, type: 3} - Rect: + SpriteRect: serializedVersion: 2 x: 249 y: 110 width: 52 height: 96 - NormalizedPivot: {x: 0, y: 0} + NormalizedPivot: {x: 0.5, y: 0.5} PixelsPerUnit: 100 Border: {x: 0, y: 0, z: 0, w: 0} MeshType: 1 - OriginalSprite: {fileID: -988864936, guid: 0aa5e4b2c85eb6846bd406f2a483ad2e, type: 3} - Rect: + SpriteRect: serializedVersion: 2 x: 320 y: 110 width: 69 height: 100 - NormalizedPivot: {x: 0, y: 0} + NormalizedPivot: {x: 0.5, y: 0.5} PixelsPerUnit: 100 Border: {x: 0, y: 0, z: 0, w: 0} MeshType: 1 - OriginalSprite: {fileID: -1496013227, guid: 0aa5e4b2c85eb6846bd406f2a483ad2e, type: 3} - Rect: + SpriteRect: serializedVersion: 2 x: 400 y: 110 width: 78 height: 94 - NormalizedPivot: {x: 0, y: 0} + NormalizedPivot: {x: 0.5, y: 0.5} PixelsPerUnit: 100 Border: {x: 0, y: 0, z: 0, w: 0} MeshType: 1 - OriginalSprite: {fileID: 591458100, guid: 0aa5e4b2c85eb6846bd406f2a483ad2e, type: 3} - Rect: + SpriteRect: serializedVersion: 2 x: 482 y: 110 width: 77 height: 98 - NormalizedPivot: {x: 0, y: 0} + NormalizedPivot: {x: 0.5, y: 0.5} PixelsPerUnit: 100 Border: {x: 0, y: 0, z: 0, w: 0} MeshType: 1 - OriginalSprite: {fileID: -1956271176, guid: 0aa5e4b2c85eb6846bd406f2a483ad2e, type: 3} - Rect: + SpriteRect: serializedVersion: 2 x: 560 y: 114 width: 79 height: 99 - NormalizedPivot: {x: 0, y: 0} + NormalizedPivot: {x: 0.5, y: 0.5} PixelsPerUnit: 100 Border: {x: 0, y: 0, z: 0, w: 0} MeshType: 1 - OriginalSprite: {fileID: -2066757699, guid: 0aa5e4b2c85eb6846bd406f2a483ad2e, type: 3} - Rect: + SpriteRect: serializedVersion: 2 x: 642 y: 112 width: 76 height: 102 - NormalizedPivot: {x: 0, y: 0} + NormalizedPivot: {x: 0.5, y: 0.5} PixelsPerUnit: 100 Border: {x: 0, y: 0, z: 0, w: 0} MeshType: 1 - OriginalSprite: {fileID: -808884989, guid: 0aa5e4b2c85eb6846bd406f2a483ad2e, type: 3} - Rect: + SpriteRect: serializedVersion: 2 x: 1 y: 0 width: 74 height: 96 - NormalizedPivot: {x: 0.4864865, y: 0.5} + NormalizedPivot: {x: 0.5, y: 0.5} PixelsPerUnit: 100 Border: {x: 0, y: 0, z: 0, w: 0} MeshType: 1 - OriginalSprite: {fileID: 776590238, guid: 0aa5e4b2c85eb6846bd406f2a483ad2e, type: 3} - Rect: + SpriteRect: serializedVersion: 2 x: 83 y: 0 width: 76 height: 92 - NormalizedPivot: {x: 0, y: 0.5} + NormalizedPivot: {x: 0.5, y: 0.5} PixelsPerUnit: 100 Border: {x: 0, y: 0, z: 0, w: 0} MeshType: 1 - OriginalSprite: {fileID: -85873177, guid: 0aa5e4b2c85eb6846bd406f2a483ad2e, type: 3} - Rect: + SpriteRect: serializedVersion: 2 x: 165 y: 0 width: 75 height: 108 - NormalizedPivot: {x: 0, y: 0.5} + NormalizedPivot: {x: 0.5, y: 0.5} PixelsPerUnit: 100 Border: {x: 0, y: 0, z: 0, w: 0} MeshType: 1 - OriginalSprite: {fileID: 1007309011, guid: 0aa5e4b2c85eb6846bd406f2a483ad2e, type: 3} - Rect: + SpriteRect: serializedVersion: 2 x: 250 y: 0 width: 67 height: 95 - NormalizedPivot: {x: 0, y: 0.5} + NormalizedPivot: {x: 0.5, y: 0.5} PixelsPerUnit: 100 Border: {x: 0, y: 0, z: 0, w: 0} MeshType: 1 - OriginalSprite: {fileID: -1182953427, guid: 0aa5e4b2c85eb6846bd406f2a483ad2e, type: 3} - Rect: + SpriteRect: serializedVersion: 2 x: 329 y: 0 width: 63 height: 96 - NormalizedPivot: {x: 0, y: 0.5} + NormalizedPivot: {x: 0.5, y: 0.5} PixelsPerUnit: 100 Border: {x: 0, y: 0, z: 0, w: 0} MeshType: 1 - OriginalSprite: {fileID: -1695335719, guid: 0aa5e4b2c85eb6846bd406f2a483ad2e, type: 3} - Rect: + SpriteRect: serializedVersion: 2 x: 410 y: 0 width: 60 height: 96 - NormalizedPivot: {x: 0, y: 0.5} + NormalizedPivot: {x: 0.5, y: 0.5} PixelsPerUnit: 100 Border: {x: 0, y: 0, z: 0, w: 0} MeshType: 1 diff --git a/Assets/Centribo/Common/Scripts/Editor/Wizards/GenerateSpriteSliceDataWizard.cs b/Assets/Centribo/Common/Scripts/Editor/Wizards/GenerateSpriteSliceDataWizard.cs index fd6b782..2daba2b 100644 --- a/Assets/Centribo/Common/Scripts/Editor/Wizards/GenerateSpriteSliceDataWizard.cs +++ b/Assets/Centribo/Common/Scripts/Editor/Wizards/GenerateSpriteSliceDataWizard.cs @@ -58,6 +58,7 @@ void OnWizardCreate() { break; case Mode.UpdateExistingSlideData: + EditorUtility.SetDirty(sliceDataToUpdate); sliceDataToUpdate.SliceData = sprites.GenerateSliceData(); AssetDatabase.SaveAssets(); EditorUtility.FocusProjectWindow(); diff --git a/ProjectSettings/UnityConnectSettings.asset b/ProjectSettings/UnityConnectSettings.asset index 591c0f0..6125b30 100644 --- a/ProjectSettings/UnityConnectSettings.asset +++ b/ProjectSettings/UnityConnectSettings.asset @@ -1,32 +1,35 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!310 &1 -UnityConnectSettings: - m_ObjectHideFlags: 0 - m_Enabled: 0 - m_TestMode: 0 - m_TestEventUrl: - m_TestConfigUrl: - m_TestInitMode: 0 - CrashReportingSettings: - m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes - m_Enabled: 0 - m_CaptureEditorExceptions: 1 - UnityPurchasingSettings: - m_Enabled: 0 - m_TestMode: 0 - UnityAnalyticsSettings: - m_Enabled: 0 - m_InitializeOnStartup: 1 - m_TestMode: 0 - m_TestEventUrl: - m_TestConfigUrl: - UnityAdsSettings: - m_Enabled: 0 - m_InitializeOnStartup: 1 - m_TestMode: 0 - m_EnabledPlatforms: 4294967295 - m_IosGameId: - m_AndroidGameId: - PerformanceReportingSettings: - m_Enabled: 0 +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!310 &1 +UnityConnectSettings: + m_ObjectHideFlags: 0 + serializedVersion: 1 + m_Enabled: 0 + m_TestMode: 0 + m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events + m_EventUrl: https://cdp.cloud.unity3d.com/v1/events + m_ConfigUrl: https://config.uca.cloud.unity3d.com + m_DashboardUrl: https://dashboard.unity3d.com + m_TestInitMode: 0 + CrashReportingSettings: + m_EventUrl: https://perf-events.cloud.unity3d.com + m_Enabled: 0 + m_LogBufferSize: 10 + m_CaptureEditorExceptions: 1 + UnityPurchasingSettings: + m_Enabled: 0 + m_TestMode: 0 + UnityAnalyticsSettings: + m_Enabled: 0 + m_TestMode: 0 + m_InitializeOnStartup: 1 + UnityAdsSettings: + m_Enabled: 0 + m_InitializeOnStartup: 1 + m_TestMode: 0 + m_IosGameId: + m_AndroidGameId: + m_GameIds: {} + m_GameId: + PerformanceReportingSettings: + m_Enabled: 0