From 089bd697cb6cd8a75d2450f8680186dcc6e3fd50 Mon Sep 17 00:00:00 2001 From: Gregory Labute Date: Thu, 30 May 2024 08:52:42 -0400 Subject: [PATCH 1/7] Consolidate icon and handle images --- .../Editor/EditorResources/Handles.meta | 8 -- .../Handles/Dark-Selected.meta | 8 -- .../Handles/Dark-Selected/FOV.png | Bin 3041 -> 0 bytes .../Handles/Dark-Selected/FOV.png.meta | 99 ------------------ .../Handles/Dark-Selected/FarNearClip.png | Bin 2383 -> 0 bytes .../Dark-Selected/FarNearClip.png.meta | 99 ------------------ .../Handles/Dark-Selected/FollowOffset.png | Bin 2094 -> 0 bytes .../Dark-Selected/FollowOffset.png.meta | 99 ------------------ .../Dark-Selected/TrackedObjectOffset.png | Bin 5756 -> 0 bytes .../TrackedObjectOffset.png.meta | 99 ------------------ .../Editor/EditorResources/Handles/Dark.meta | 8 -- .../Handles/Light-Selected.meta | 8 -- .../Handles/Light-Selected/FOV.png | Bin 3041 -> 0 bytes .../Handles/Light-Selected/FOV.png.meta | 99 ------------------ .../Handles/Light-Selected/FarNearClip.png | Bin 2383 -> 0 bytes .../Light-Selected/FarNearClip.png.meta | 99 ------------------ .../Handles/Light-Selected/FollowOffset.png | Bin 2094 -> 0 bytes .../Light-Selected/FollowOffset.png.meta | 99 ------------------ .../Light-Selected/TrackedObjectOffset.png | Bin 5756 -> 0 bytes .../TrackedObjectOffset.png.meta | 99 ------------------ .../{Handles => Icons}/Dark/FOV.png | Bin .../{Handles => Icons}/Dark/FOV.png.meta | 0 .../{Handles => Icons}/Dark/FarNearClip.png | Bin .../Dark/FarNearClip.png.meta | 0 .../{Handles => Icons}/Dark/FollowOffset.png | Bin .../Dark/FollowOffset.png.meta | 0 .../Dark/TrackedObjectOffset.png | Bin .../Dark/TrackedObjectOffset.png.meta | 0 .../{Handles => Icons}/FreelookRigBottom.png | Bin .../FreelookRigBottom.png.meta | 0 .../{Handles => Icons}/FreelookRigMiddle.png | Bin .../FreelookRigMiddle.png.meta | 0 .../{Handles => Icons}/FreelookRigTop.png | Bin .../FreelookRigTop.png.meta | 0 .../{Handles => Icons}/Light.meta | 2 +- .../Icons/{ => Light}/CmCamera@256.png | Bin .../Icons/{ => Light}/CmCamera@256.png.meta | 0 .../Icons/{ => Light}/CmComponent@256.png | Bin .../{ => Light}/CmComponent@256.png.meta | 0 .../Icons/{ => Light}/CmExtension@256.png | Bin .../{ => Light}/CmExtension@256.png.meta | 0 .../{ => Light}/CmSplineRollTool@256.png | Bin .../{ => Light}/CmSplineRollTool@256.png.meta | 0 .../Icons/{ => Light}/CmTrack@256.png | Bin .../Icons/{ => Light}/CmTrack@256.png.meta | 0 .../{Handles => Icons}/Light/FOV.png | Bin .../{Handles => Icons}/Light/FOV.png.meta | 0 .../{Handles => Icons}/Light/FarNearClip.png | Bin .../Light/FarNearClip.png.meta | 0 .../{Handles => Icons}/Light/FollowOffset.png | Bin .../Light/FollowOffset.png.meta | 0 .../Light/TrackedObjectOffset.png | Bin .../Light/TrackedObjectOffset.png.meta | 0 .../Editors/CinemachineSplineRollEditor.cs | 19 ++-- .../Editor/Utility/CinemachineSceneTools.cs | 12 +-- .../Utility/CinemachineToolbarOverlay.cs | 5 +- 56 files changed, 16 insertions(+), 846 deletions(-) delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Handles.meta delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Handles/Dark-Selected.meta delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Handles/Dark-Selected/FOV.png delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Handles/Dark-Selected/FOV.png.meta delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Handles/Dark-Selected/FarNearClip.png delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Handles/Dark-Selected/FarNearClip.png.meta delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Handles/Dark-Selected/FollowOffset.png delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Handles/Dark-Selected/FollowOffset.png.meta delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Handles/Dark-Selected/TrackedObjectOffset.png delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Handles/Dark-Selected/TrackedObjectOffset.png.meta delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Handles/Dark.meta delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Handles/Light-Selected.meta delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Handles/Light-Selected/FOV.png delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Handles/Light-Selected/FOV.png.meta delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Handles/Light-Selected/FarNearClip.png delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Handles/Light-Selected/FarNearClip.png.meta delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Handles/Light-Selected/FollowOffset.png delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Handles/Light-Selected/FollowOffset.png.meta delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Handles/Light-Selected/TrackedObjectOffset.png delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Handles/Light-Selected/TrackedObjectOffset.png.meta rename com.unity.cinemachine/Editor/EditorResources/{Handles => Icons}/Dark/FOV.png (100%) rename com.unity.cinemachine/Editor/EditorResources/{Handles => Icons}/Dark/FOV.png.meta (100%) rename com.unity.cinemachine/Editor/EditorResources/{Handles => Icons}/Dark/FarNearClip.png (100%) rename com.unity.cinemachine/Editor/EditorResources/{Handles => Icons}/Dark/FarNearClip.png.meta (100%) rename com.unity.cinemachine/Editor/EditorResources/{Handles => Icons}/Dark/FollowOffset.png (100%) rename com.unity.cinemachine/Editor/EditorResources/{Handles => Icons}/Dark/FollowOffset.png.meta (100%) rename com.unity.cinemachine/Editor/EditorResources/{Handles => Icons}/Dark/TrackedObjectOffset.png (100%) rename com.unity.cinemachine/Editor/EditorResources/{Handles => Icons}/Dark/TrackedObjectOffset.png.meta (100%) rename com.unity.cinemachine/Editor/EditorResources/{Handles => Icons}/FreelookRigBottom.png (100%) rename com.unity.cinemachine/Editor/EditorResources/{Handles => Icons}/FreelookRigBottom.png.meta (100%) rename com.unity.cinemachine/Editor/EditorResources/{Handles => Icons}/FreelookRigMiddle.png (100%) rename com.unity.cinemachine/Editor/EditorResources/{Handles => Icons}/FreelookRigMiddle.png.meta (100%) rename com.unity.cinemachine/Editor/EditorResources/{Handles => Icons}/FreelookRigTop.png (100%) rename com.unity.cinemachine/Editor/EditorResources/{Handles => Icons}/FreelookRigTop.png.meta (100%) rename com.unity.cinemachine/Editor/EditorResources/{Handles => Icons}/Light.meta (77%) rename com.unity.cinemachine/Editor/EditorResources/Icons/{ => Light}/CmCamera@256.png (100%) rename com.unity.cinemachine/Editor/EditorResources/Icons/{ => Light}/CmCamera@256.png.meta (100%) rename com.unity.cinemachine/Editor/EditorResources/Icons/{ => Light}/CmComponent@256.png (100%) rename com.unity.cinemachine/Editor/EditorResources/Icons/{ => Light}/CmComponent@256.png.meta (100%) rename com.unity.cinemachine/Editor/EditorResources/Icons/{ => Light}/CmExtension@256.png (100%) rename com.unity.cinemachine/Editor/EditorResources/Icons/{ => Light}/CmExtension@256.png.meta (100%) rename com.unity.cinemachine/Editor/EditorResources/Icons/{ => Light}/CmSplineRollTool@256.png (100%) rename com.unity.cinemachine/Editor/EditorResources/Icons/{ => Light}/CmSplineRollTool@256.png.meta (100%) rename com.unity.cinemachine/Editor/EditorResources/Icons/{ => Light}/CmTrack@256.png (100%) rename com.unity.cinemachine/Editor/EditorResources/Icons/{ => Light}/CmTrack@256.png.meta (100%) rename com.unity.cinemachine/Editor/EditorResources/{Handles => Icons}/Light/FOV.png (100%) rename com.unity.cinemachine/Editor/EditorResources/{Handles => Icons}/Light/FOV.png.meta (100%) rename com.unity.cinemachine/Editor/EditorResources/{Handles => Icons}/Light/FarNearClip.png (100%) rename com.unity.cinemachine/Editor/EditorResources/{Handles => Icons}/Light/FarNearClip.png.meta (100%) rename com.unity.cinemachine/Editor/EditorResources/{Handles => Icons}/Light/FollowOffset.png (100%) rename com.unity.cinemachine/Editor/EditorResources/{Handles => Icons}/Light/FollowOffset.png.meta (100%) rename com.unity.cinemachine/Editor/EditorResources/{Handles => Icons}/Light/TrackedObjectOffset.png (100%) rename com.unity.cinemachine/Editor/EditorResources/{Handles => Icons}/Light/TrackedObjectOffset.png.meta (100%) diff --git a/com.unity.cinemachine/Editor/EditorResources/Handles.meta b/com.unity.cinemachine/Editor/EditorResources/Handles.meta deleted file mode 100644 index 68dfd7926..000000000 --- a/com.unity.cinemachine/Editor/EditorResources/Handles.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: fae74d622a2c6434f9c597a6bbde0140 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.cinemachine/Editor/EditorResources/Handles/Dark-Selected.meta b/com.unity.cinemachine/Editor/EditorResources/Handles/Dark-Selected.meta deleted file mode 100644 index 35121817e..000000000 --- a/com.unity.cinemachine/Editor/EditorResources/Handles/Dark-Selected.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 0e325619dfd3c438a8b622eec81fe341 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.cinemachine/Editor/EditorResources/Handles/Dark-Selected/FOV.png b/com.unity.cinemachine/Editor/EditorResources/Handles/Dark-Selected/FOV.png deleted file mode 100644 index ca34c903b8cb73e4ab94d00737a0b1fd52e815f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3041 zcmZ`*dsq@_7k>vQ90U_2ja#sa>`* ztW~lLmZoNw-H_EX%S=kr$_z?H-L`ba%_x&^-2M0a=6U9M&pGp(bI$vl^FH(Yg}*w; z+|0%d0ARjix&ImfAk2gSg2$GPyW~G$3n5|o`a}S#=T6>`@S^L`BqVW75Eoo|VmpXA z@U~^VW!TdK;<#`M0K`2j{Fj9%Lm#^D?g|gGY5FU$c1k|Sd77*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9Xfrtm5nFzJqcG}ht*U~y$M=bLi@)VH*4!FIgm~Ji!h4iKgax+Q4ou!ATu%p; zQWn}`D5e*#p%Mp#72zgj@WX9_NP25xkx&jAUHm_@H_*5qXPI?_+?6;U9(_3?VtL=@ zVnhz3pLJ45g^0XdUwYQ)?>{GP; d?)8BHE?+dI=AMJ%crA5n$j;i)>X`*K=|8?_{kQ-C diff --git a/com.unity.cinemachine/Editor/EditorResources/Handles/Dark-Selected/FarNearClip.png.meta b/com.unity.cinemachine/Editor/EditorResources/Handles/Dark-Selected/FarNearClip.png.meta deleted file mode 100644 index 0a4a6c951..000000000 --- a/com.unity.cinemachine/Editor/EditorResources/Handles/Dark-Selected/FarNearClip.png.meta +++ /dev/null @@ -1,99 +0,0 @@ -fileFormatVersion: 2 -guid: 3438c1a20bf054a9f987a531b43f0a08 -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 11 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - flipGreenChannel: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - ignoreMasterTextureLimit: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 0 - wrapV: 0 - wrapW: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - swizzle: 50462976 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - nameFileIdTable: {} - spritePackingTag: - pSDRemoveMatte: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.cinemachine/Editor/EditorResources/Handles/Dark-Selected/FollowOffset.png b/com.unity.cinemachine/Editor/EditorResources/Handles/Dark-Selected/FollowOffset.png deleted file mode 100644 index 7f1fd0dc3e35c4a37e9919a1e54d740b7281559a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2094 zcmbuAcTm$w8^`yT22w0|6d@)7tf8nN7m<>HARtN*5;2B@04hZV6ZMcDLK+3&N@&g`@ET=VvF)7CK5 z003xvxV!iO0I8M`P)DiY&ni8s!m6|Gv~vJF#Q&I3P>H$phvb}(n=`2BK#!^nM5xmt zC)MsvO+^qA0JRq$E>4t-&_th- z?Blg>qC8(0_GNs$e4#OjZn&r)&YX@p7TD@%&_E3m+x?WkxAt;Q85oKbm0&w(`Y*|5 z&9%pu6d%nee>Qy$$M>8@R@q6oxhG;*wnBeI@L=19mv4T5eBWS1quHDjoUw)-pGeB? z4lGpG)rQ8bIh1uA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emachine/Editor/EditorResources/Handles/Light-Selected/FarNearClip.png.meta deleted file mode 100644 index 3c81b99b5..000000000 --- a/com.unity.cinemachine/Editor/EditorResources/Handles/Light-Selected/FarNearClip.png.meta +++ /dev/null @@ -1,99 +0,0 @@ -fileFormatVersion: 2 -guid: 741a8111b35484dd283a7008a3a8373b -TextureImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 11 - mipmaps: - mipMapMode: 0 - enableMipMap: 1 - sRGBTexture: 1 - linearTexture: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - flipGreenChannel: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - vTOnly: 0 - ignoreMasterTextureLimit: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: 1 - aniso: 1 - mipBias: 0 - wrapU: 0 - wrapV: 0 - wrapW: 0 - nPOTScale: 1 - lightmap: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spritePixelsToUnits: 100 - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spriteGenerateFallbackPhysicsShape: 1 - alphaUsage: 1 - alphaIsTransparency: 0 - spriteTessellationDetail: -1 - textureType: 0 - textureShape: 1 - singleChannelComponent: 0 - flipbookRows: 1 - flipbookColumns: 1 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - ignorePngGamma: 0 - applyGammaDecoding: 0 - swizzle: 50462976 - platformSettings: - - serializedVersion: 3 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - forceMaximumCompressionQuality_BC6H_BC7: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - internalID: 0 - vertices: [] - indices: - edges: [] - weights: [] - secondaryTextures: [] - nameFileIdTable: {} - spritePackingTag: - pSDRemoveMatte: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/com.unity.cinemachine/Editor/EditorResources/Handles/Light-Selected/FollowOffset.png b/com.unity.cinemachine/Editor/EditorResources/Handles/Light-Selected/FollowOffset.png deleted file mode 100644 index 7f1fd0dc3e35c4a37e9919a1e54d740b7281559a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2094 zcmbuAcTm$w8^`yT22w0|6d@)7tf8nN7m<>HARtN*5;2B@04hZV6ZMcDLK+3&N@&g`@ET=VvF)7CK5 z003xvxV!iO0I8M`P)DiY&ni8s!m6|Gv~vJF#Q&I3P>H$phvb}(n=`2BK#!^nM5xmt zC)MsvO+^qA0JRq$E>4t-&_th- z?Blg>qC8(0_GNs$e4#OjZn&r)&YX@p7TD@%&_E3m+x?WkxAt;Q85oKbm0&w(`Y*|5 z&9%pu6d%nee>Qy$$M>8@R@q6oxhG;*wnBeI@L=19mv4T5eBWS1quHDjoUw)-pGeB? z4lGpG)rQ8bIh1uAh;XF_*MjlTOTq6S*$ zhi0rMEjKF1y0~uA$jHbQ+p7tidIFJqp4?wB_D=O-HuRQTxDwK3(f$}~Ed+@S<5$|tbxCAAd$cX{_H6iDCgCaZa*9p! zVMs`bS1eA)7%HSgXH$r6$+MQo&VF*84w%vvpvki{@0grV9ntrOc_9P7FbD+RQVYl) z!%`Eqm$V=V*s(?(t~NFP9_X2O{ZEWKc<-a9SkW`hC^pGllB91349`fCQA_r0QYTHI zvuhg!T(eJg2G@1?>h8P=eNYo+B!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LvUYH(9yqri#s%L_L-|DWJiA^Vz z*V{vWuqhsX`LkU!b4G9M1gp1MU|?#778A(LG9rGLq+w0OyW)XI&qZ9Q(8Go&+_XD0 z0PkpNW_Ih@>|Z~%OJPWWV_EAJgX>ta#P=2cg;NC0FK#3b>JlXgS3(AKBw-NnEiYEN zw^*xaVbacXm>xvz&?022<57#F=39mk1^Zb)0RaGeo>bOWe$MMigGow)G@0I6&0r@V!8P?ERTGuinHHy(1btgapkEG_kr);Q+iai zX8JpYg2UyiCf zeaNb?FU~7umR~)wE;swLOOCCr`e`TK|4PjQfIgyd m_IconContent; + void OnEnable() + { + m_IconContent = new GUIContent + { + image = AssetDatabase.LoadAssetAtPath($"{CinemachineSceneToolHelpers.IconPath}/CmSplineRollTool@256.png"), + text = "Roll Tool", + tooltip = "Adjust the roll data points along the spline." + }; + } bool GetTargets(out CinemachineSplineRoll splineData, out SplineContainer spline) { @@ -216,16 +225,6 @@ bool GetTargets(out CinemachineSplineRoll splineData, out SplineContainer spline return false; } - void OnEnable() - { - m_IconContent = new GUIContent - { - image = AssetDatabase.LoadAssetAtPath(CinemachineSceneToolHelpers.GetIconPath() + "CmSplineRollTool@256.png"), - text = "Roll Tool", - tooltip = "Adjust the roll data points along the spline." - }; - } - public override void OnToolGUI(EditorWindow window) { if (!GetTargets(out var splineData, out var spline)) diff --git a/com.unity.cinemachine/Editor/Utility/CinemachineSceneTools.cs b/com.unity.cinemachine/Editor/Utility/CinemachineSceneTools.cs index 2c1b36442..7179243ed 100644 --- a/com.unity.cinemachine/Editor/Utility/CinemachineSceneTools.cs +++ b/com.unity.cinemachine/Editor/Utility/CinemachineSceneTools.cs @@ -93,20 +93,18 @@ static class CinemachineSceneToolHelpers { normal = { - background = AssetDatabase.LoadAssetAtPath( - $"{CinemachineCore.kPackageRoot}/Editor/EditorResources/SceneToolsLabelBackground.png"), + background = AssetDatabase.LoadAssetAtPath($"{ResourcePath}/SceneToolsLabelBackground.png"), textColor = Handles.selectedColor, }, fontStyle = FontStyle.Bold, padding = new RectOffset(5, 0, 5, 0) }; - public static string GetIconPath() - { - var skin = EditorGUIUtility.isProSkin ? "/Dark" : ""; - return $"{CinemachineCore.kPackageRoot}/Editor/EditorResources/Icons{skin}/"; - } + static string SkinSuffix => EditorGUIUtility.isProSkin ? "Dark" : "Light"; + static string ResourcePath => $"{CinemachineCore.kPackageRoot}/Editor/EditorResources"; + public static string IconPath => $"{ResourcePath}/Icons/{SkinSuffix}"; + public static float SliderHandleDelta(Vector3 newPos, Vector3 oldPos, Vector3 forward) { var delta = newPos - oldPos; diff --git a/com.unity.cinemachine/Editor/Utility/CinemachineToolbarOverlay.cs b/com.unity.cinemachine/Editor/Utility/CinemachineToolbarOverlay.cs index d9eacae5f..6f7533c6e 100644 --- a/com.unity.cinemachine/Editor/Utility/CinemachineToolbarOverlay.cs +++ b/com.unity.cinemachine/Editor/Utility/CinemachineToolbarOverlay.cs @@ -75,10 +75,7 @@ private protected string GetIconPath() { m_State.refreshIcon = m_State.isProSkin != EditorGUIUtility.isProSkin; m_State.isProSkin = EditorGUIUtility.isProSkin; - return $"{CinemachineCore.kPackageRoot}/Editor/EditorResources/Handles/" + - (m_State.isProSkin ? - (m_State.isSelected ? "Dark-Selected" : "Dark") : - (m_State.isSelected ? "Light-Selected" : "Light")) + "/"; + return $"{CinemachineSceneToolHelpers.IconPath}/"; } struct ToolState From 58dbdf128ab953a8e713c0885d2073c268235dee Mon Sep 17 00:00:00 2001 From: Gregory Labute Date: Thu, 30 May 2024 10:19:11 -0400 Subject: [PATCH 2/7] Remove CinemachineSceneToolUtility and CinemachineTool base class --- .../Icons/FreelookRigBottom.png | Bin 1900 -> 0 bytes .../Icons/FreelookRigBottom.png.meta | 99 ------- .../Icons/FreelookRigMiddle.png | Bin 1967 -> 0 bytes .../Icons/FreelookRigMiddle.png.meta | 99 ------- .../EditorResources/Icons/FreelookRigTop.png | Bin 1939 -> 0 bytes .../Icons/FreelookRigTop.png.meta | 99 ------- .../Editor/Editors/CinemachineCameraEditor.cs | 73 +++-- .../Editor/Editors/CinemachineFollowEditor.cs | 30 +- .../Editors/CinemachineHardLookAtEditor.cs | 33 ++- .../Editors/CinemachineOrbitalFollowEditor.cs | 214 +++++++-------- .../CinemachinePositionComposerEditor.cs | 72 +++-- .../CinemachineRotationComposerEditor.cs | 34 ++- .../Editors/CinemachineSplineRollEditor.cs | 2 +- .../CinemachineThirdPersonFollowEditor.cs | 67 +++-- .../Cinemachine3rdPersonFollowEditor.cs | 91 ------- .../Obsolete/CinemachineComposerEditor.cs | 18 -- .../CinemachineFramingTransposerEditor.cs | 61 ----- .../Obsolete/CinemachineFreeLookEditor.cs | 40 --- .../Obsolete/CinemachineTransposerEditor.cs | 30 -- .../CinemachineVirtualCameraEditor.cs | 25 -- ...ools.cs => CinemachineSceneToolHelpers.cs} | 125 +-------- ...ta => CinemachineSceneToolHelpers.cs.meta} | 0 .../Utility/CinemachineToolbarOverlay.cs | 257 ------------------ .../Utility/CinemachineToolbarOverlay.cs.meta | 11 - 24 files changed, 305 insertions(+), 1175 deletions(-) delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Icons/FreelookRigBottom.png delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Icons/FreelookRigBottom.png.meta delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Icons/FreelookRigMiddle.png delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Icons/FreelookRigMiddle.png.meta delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Icons/FreelookRigTop.png delete mode 100644 com.unity.cinemachine/Editor/EditorResources/Icons/FreelookRigTop.png.meta rename com.unity.cinemachine/Editor/Utility/{CinemachineSceneTools.cs => CinemachineSceneToolHelpers.cs} (82%) rename com.unity.cinemachine/Editor/Utility/{CinemachineSceneTools.cs.meta => CinemachineSceneToolHelpers.cs.meta} (100%) delete mode 100644 com.unity.cinemachine/Editor/Utility/CinemachineToolbarOverlay.cs delete mode 100644 com.unity.cinemachine/Editor/Utility/CinemachineToolbarOverlay.cs.meta diff --git a/com.unity.cinemachine/Editor/EditorResources/Icons/FreelookRigBottom.png b/com.unity.cinemachine/Editor/EditorResources/Icons/FreelookRigBottom.png deleted file mode 100644 index b854165fa7a21d86452e8ad8f8d25ef426afc6dc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1900 zcmV-y2b1`TP)@~0drDELIAGL9O(c600d`2O+f$vv5yPMFNpIC3hhkWQ-MQIoi^|b5MRTg zhnQ227Kcucm>UBI<$2^?vs%mga4Zuvei(UI(rUH)?7koSt`M1Ef(a(Lf+J(b*49>e zdU|>u*?TzVN~O|W-}fs#bQ#BSDubR!IZu^oBWW|eyu3U@zJ=qk)9Ey8wOU&;U~D9y z^YgcE-TDdHs^kn1vvGEIwgfV~ROMw1I5;?Xc5!jBCS%6b)KvZc{rl@l<#HzhGoXU$ zzZEydb42_6{CqA+JfW0hDX#0vEE}ME(T#J<2x9293q&d4uZ1tP1MF%qrtq z9u?M)`tG5=dFx$eh+rM*vcw=45)9?Hfa5#!9_1CI^E|8a(ugC7??tD#ke%1pNR%XC zWa7XEaMUp(FY#iINYcxjoBUJLA`e!1T3f3JDEtJ!-I~z8D#D_+DKM# zxR{1+Og(|()S4Za%Gz_Z>g%1G`a*k)7>E<5%GxxcaJ^v^ZfX+t_xGvr2ALWc$J)b( z4-*}ej}fUz*xTEqySr##=Lld_8aK7`8i^!;fK?=Q`#K0%f!sBQwf7$rVyy#2;1xPs zH?L9daXf$g`0<7m1OsP+BA{VjQ)Z`@c6D}B5J>`k0Jxtm^IA~}AWBgex#}~|DFQ_$ zfaoKEVqp6LIA1I(0Yr!diUAyux>e@J+W)i&SqFRVuk^rcDL6ti0R+6V&NqrI1{%GY zz;%JG3*d{d$dIrjK+NknfMkRnXMo}k&f@|sSU|-tC2x8W_NeDie!OHV0M%vi;j!& zT#$~cgTuhmV|{H=WVyJnD5(+QTib+ zBHn_z{K8y297#&3imRqgHf?i+GZV53X|0596{OqIviT0e^jp+(eQk=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0Dl{Z8`+bfRC8B6Vq?%+qJ39^70577~ ziq>H zT!T8)88ZQPJk&{OH_X|h-ht8hYVJ$Dj8X#0yNPr5aFDhoKWxlhHIffD!kxk zQk}VkZs?NpgDYSm9MjH!Juj|;fpouN&=X}d@ Undo.undoRedoPerformed += ResetTarget; + void OnDisable() => Undo.undoRedoPerformed -= ResetTarget; public override VisualElement CreateInspectorGUI() { @@ -87,26 +75,53 @@ public override VisualElement CreateInspectorGUI() return ux; } - void OnSceneGUI() + [EditorTool("Field of View Tool", typeof(CinemachineCamera))] + class FoVTool : EditorTool { - var cmCam = Target; - if (cmCam == null) - return; + GUIContent m_IconContent; + public override GUIContent toolbarIcon => m_IconContent; + void OnEnable() + { + m_IconContent = new GUIContent + { + image = AssetDatabase.LoadAssetAtPath($"{CinemachineSceneToolHelpers.IconPath}/FOV.png"), + tooltip = "Adjust the Field of View of the Lens", + }; + } - var originalColor = Handles.color; - Handles.color = Handles.preselectionColor; - if (CinemachineSceneToolUtility.IsToolActive(typeof(FoVTool))) + public override void OnToolGUI(EditorWindow window) { - CinemachineSceneToolHelpers.FovToolHandle(cmCam, - new SerializedObject(cmCam).FindProperty(() => cmCam.Lens), - cmCam.Lens, cmCam.Lens.UseHorizontalFOV); + var vcam = target as CinemachineCamera; + if (target == null) + return; + + CinemachineSceneToolHelpers.DoFovToolHandle( + vcam, new SerializedObject(vcam).FindProperty(() => vcam.Lens), vcam.Lens, vcam.Lens.UseHorizontalFOV); + } + } + + [EditorTool("Far-Near Clip Tool", typeof(CinemachineCamera))] + class FarNearClipTool : EditorTool + { + GUIContent m_IconContent; + public override GUIContent toolbarIcon => m_IconContent; + void OnEnable() + { + m_IconContent = new GUIContent + { + image = AssetDatabase.LoadAssetAtPath($"{CinemachineSceneToolHelpers.IconPath}/FarNearClip.png"), + tooltip = "Adjust the Far/Near Clip of the Lens", + }; } - else if (CinemachineSceneToolUtility.IsToolActive(typeof(FarNearClipTool))) + + public override void OnToolGUI(EditorWindow window) { - CinemachineSceneToolHelpers.NearFarClipHandle(cmCam, - new SerializedObject(cmCam).FindProperty(() => cmCam.Lens)); + var vcam = target as CinemachineCamera; + if (target == null) + return; + + CinemachineSceneToolHelpers.DoNearFarClipHandle(vcam, new SerializedObject(vcam).FindProperty(() => vcam.Lens)); } - Handles.color = originalColor; } } } diff --git a/com.unity.cinemachine/Editor/Editors/CinemachineFollowEditor.cs b/com.unity.cinemachine/Editor/Editors/CinemachineFollowEditor.cs index 65493fc5d..531c6d67b 100644 --- a/com.unity.cinemachine/Editor/Editors/CinemachineFollowEditor.cs +++ b/com.unity.cinemachine/Editor/Editors/CinemachineFollowEditor.cs @@ -1,4 +1,6 @@ using UnityEditor; +using UnityEditor.EditorTools; +using UnityEngine; namespace Unity.Cinemachine.Editor { @@ -6,19 +8,29 @@ namespace Unity.Cinemachine.Editor [CanEditMultipleObjects] class CinemachineFollowEditor : CinemachineComponentBaseEditor { - void OnEnable() => CinemachineSceneToolUtility.RegisterTool(typeof(FollowOffsetTool)); - void OnDisable() => CinemachineSceneToolUtility.UnregisterTool(typeof(FollowOffsetTool)); - - void OnSceneGUI() + [EditorTool("Follow Offset Tool", typeof(CinemachineFollow))] + class FollowOffsetTool : EditorTool { - var follow = target as CinemachineFollow; - if (follow == null || !follow.IsValid) - return; - if (CinemachineSceneToolUtility.IsToolActive(typeof(FollowOffsetTool))) + GUIContent m_IconContent; + public override GUIContent toolbarIcon => m_IconContent; + void OnEnable() { + m_IconContent = new GUIContent + { + image = AssetDatabase.LoadAssetAtPath($"{CinemachineSceneToolHelpers.IconPath}/FollowOffset.png"), + tooltip = "Adjust the Follow Offset", + }; + } + + public override void OnToolGUI(EditorWindow window) + { + var follow = target as CinemachineFollow; + if (follow == null || !follow.IsValid) + return; + var property = new SerializedObject(follow).FindProperty(() => follow.FollowOffset); var up = follow.VirtualCamera.State.ReferenceUp; - CinemachineSceneToolHelpers.FollowOffsetTool( + CinemachineSceneToolHelpers.DoFollowOffsetTool( follow.VirtualCamera, property, follow.GetDesiredCameraPosition(up), follow.FollowTargetPosition, follow.GetReferenceOrientation(up), () => { diff --git a/com.unity.cinemachine/Editor/Editors/CinemachineHardLookAtEditor.cs b/com.unity.cinemachine/Editor/Editors/CinemachineHardLookAtEditor.cs index 82ea76a8e..5b5c3e947 100644 --- a/com.unity.cinemachine/Editor/Editors/CinemachineHardLookAtEditor.cs +++ b/com.unity.cinemachine/Editor/Editors/CinemachineHardLookAtEditor.cs @@ -1,4 +1,6 @@ using UnityEditor; +using UnityEditor.EditorTools; +using UnityEngine; namespace Unity.Cinemachine.Editor { @@ -14,8 +16,6 @@ protected virtual void OnEnable() CinemachineDebug.OnGUIHandlers += OnGuiHandler; if (CinemachineCorePrefs.ShowInGameGuides.Value) InspectorUtility.RepaintGameView(); - - CinemachineSceneToolUtility.RegisterTool(typeof(TrackedObjectOffsetTool)); } protected virtual void OnDisable() @@ -23,8 +23,6 @@ protected virtual void OnDisable() CinemachineDebug.OnGUIHandlers -= OnGuiHandler; if (CinemachineCorePrefs.ShowInGameGuides.Value) InspectorUtility.RepaintGameView(); - - CinemachineSceneToolUtility.UnregisterTool(typeof(TrackedObjectOffsetTool)); } protected virtual void OnGuiHandler(CinemachineBrain brain) @@ -52,16 +50,29 @@ protected virtual void OnGuiHandler(CinemachineBrain brain) } } - void OnSceneGUI() + [EditorTool("LookAt Offset Tool", typeof(CinemachineHardLookAt))] + class LookAtOffsetTool : EditorTool { - if (Target == null || !Target.IsValid) - return; + GUIContent m_IconContent; + public override GUIContent toolbarIcon => m_IconContent; + void OnEnable() + { + m_IconContent = new GUIContent + { + image = AssetDatabase.LoadAssetAtPath($"{CinemachineSceneToolHelpers.IconPath}/TrackedObjectOffset.png"), + tooltip = "Adjust the LookAt Offset", + }; + } - if (CinemachineSceneToolUtility.IsToolActive(typeof(TrackedObjectOffsetTool))) + public override void OnToolGUI(EditorWindow window) { - CinemachineSceneToolHelpers.TrackedObjectOffsetTool( - Target.VirtualCamera, - new SerializedObject(Target).FindProperty(() => Target.LookAtOffset), + var hardLookAt = target as CinemachineHardLookAt; + if (hardLookAt == null || !hardLookAt.IsValid) + return; + + CinemachineSceneToolHelpers.DoTrackedObjectOffsetTool( + hardLookAt.VirtualCamera, + new SerializedObject(hardLookAt).FindProperty(() => hardLookAt.LookAtOffset), CinemachineCore.Stage.Aim); } } diff --git a/com.unity.cinemachine/Editor/Editors/CinemachineOrbitalFollowEditor.cs b/com.unity.cinemachine/Editor/Editors/CinemachineOrbitalFollowEditor.cs index 719874872..edfb4b7a7 100644 --- a/com.unity.cinemachine/Editor/Editors/CinemachineOrbitalFollowEditor.cs +++ b/com.unity.cinemachine/Editor/Editors/CinemachineOrbitalFollowEditor.cs @@ -2,6 +2,7 @@ using UnityEditor; using UnityEngine.UIElements; using UnityEditor.UIElements; +using UnityEditor.EditorTools; namespace Unity.Cinemachine.Editor { @@ -11,18 +12,6 @@ class CinemachineOrbitalFollowEditor : UnityEditor.Editor { CinemachineOrbitalFollow Target => target as CinemachineOrbitalFollow; - void OnEnable() - { - CinemachineSceneToolUtility.RegisterTool(typeof(FollowOffsetTool)); - //CinemachineSceneToolUtility.RegisterTool(typeof(OrbitalFollowOrbitSelection)); - } - - void OnDisable() - { - CinemachineSceneToolUtility.UnregisterTool(typeof(FollowOffsetTool)); - //CinemachineSceneToolUtility.UnregisterTool(typeof(OrbitalFollowOrbitSelection)); - } - public override VisualElement CreateInspectorGUI() { var ux = new VisualElement(); @@ -64,28 +53,109 @@ public override VisualElement CreateInspectorGUI() return ux; } -#if false // We disable the tool settings window, because it has only one thing in it, which isn't so useful and is a bit confusing tbh - static GUIContent[] s_OrbitNames = + // TODO: ask swap's opinion on this. Do we want to always draw this or only when follow offset handle is not selected + // TODO: what color? when follow offset handle is selected, do we want to draw CameraPath. + [DrawGizmo(GizmoType.Active | GizmoType.Selected, typeof(CinemachineOrbitalFollow))] + static void DrawOrbitalGizmos(CinemachineOrbitalFollow orbital, GizmoType selectionType) { - new GUIContent("Top"), - new GUIContent("Center"), - new GUIContent("Bottom") - }; - internal static GUIContent[] orbitNames => s_OrbitNames; -#endif - bool m_UpdateCache = true; - float m_VerticalAxisCache; - - void OnSceneGUI() + var vcam = orbital.VirtualCamera; + if (vcam != null && vcam.Follow != null) + { + var color = CinemachineCore.IsLive(vcam) + ? CinemachineCorePrefs.BoundaryObjectGizmoColour.Value + : CinemachineCorePrefs.InactiveGizmoColour.Value; + var targetPos = orbital.TrackedPoint; + var orient = orbital.GetReferenceOrientation(); + var up = orient * Vector3.up; + var rotation = orbital.HorizontalAxis.Value; + orient = Quaternion.AngleAxis(rotation, up) * orient; + + switch (orbital.OrbitStyle) + { + case CinemachineOrbitalFollow.OrbitStyles.ThreeRing: + { + var scale = orbital.RadialAxis.Value; + var prevColor = Handles.color; + Handles.color = color; + Handles.DrawWireDisc( + targetPos + up * orbital.Orbits.Top.Height * scale, + up, orbital.Orbits.Top.Radius * scale); + Handles.DrawWireDisc( + targetPos + up * orbital.Orbits.Center.Height * scale, + up, orbital.Orbits.Center.Radius * scale); + Handles.DrawWireDisc( + targetPos + up * orbital.Orbits.Bottom.Height * scale, + up, orbital.Orbits.Bottom.Radius * scale); + Handles.color = prevColor; + + DrawCameraPath(targetPos, orient, scale, color, orbital); + + break; + } + case CinemachineOrbitalFollow.OrbitStyles.Sphere: + { + var fwd = targetPos - vcam.State.RawPosition; + var right = orient * Vector3.right; + up = Vector3.Cross(fwd, right); + + var prevColor = Handles.color; + Handles.color = color; + Handles.DrawWireDisc(targetPos, up, orbital.Radius); + Handles.DrawWireDisc(targetPos, right, orbital.Radius); + Handles.color = prevColor; + break; + } + } + } + + static void DrawCameraPath( + Vector3 pos, Quaternion orient, float scale, Color color, CinemachineOrbitalFollow freelook) + { + var prevMatrix = Gizmos.matrix; + Gizmos.matrix = Matrix4x4.TRS(pos, orient, scale * Vector3.one); + var prevColor = Gizmos.color; + Gizmos.color = color; + + const float stepSize = 0.1f; + var lastPos = freelook.GetCameraOffsetForNormalizedAxisValue(-1); + var max = 1 + stepSize/2; + for (float t = -1 + stepSize; t < max; t += stepSize) + { + var p = freelook.GetCameraOffsetForNormalizedAxisValue(t); + Gizmos.DrawLine(lastPos, p); + lastPos = p; + } + Gizmos.matrix = prevMatrix; + Gizmos.color = prevColor; + } + } + + + [EditorTool("Follow Offset Tool", typeof(CinemachineOrbitalFollow))] + class FollowOffsetTool : EditorTool { - var orbitalFollow = Target; - if (orbitalFollow == null || !orbitalFollow.IsValid) - return; - - var originalColor = Handles.color; - Handles.color = Handles.preselectionColor; - if (CinemachineSceneToolUtility.IsToolActive(typeof(FollowOffsetTool))) + GUIContent m_IconContent; + public override GUIContent toolbarIcon => m_IconContent; + void OnEnable() { + m_IconContent = new GUIContent + { + image = AssetDatabase.LoadAssetAtPath($"{CinemachineSceneToolHelpers.IconPath}/FollowOffset.png"), + tooltip = "Adjust the Follow Offset", + }; + } + + bool m_UpdateCache = true; + float m_VerticalAxisCache; + + public override void OnToolGUI(EditorWindow window) + { + var orbitalFollow = target as CinemachineOrbitalFollow; + if (orbitalFollow == null || !orbitalFollow.IsValid) + return; + + var originalColor = Handles.color; + Handles.color = Handles.preselectionColor; switch (orbitalFollow.OrbitStyle) { case CinemachineOrbitalFollow.OrbitStyles.Sphere: @@ -132,7 +202,7 @@ void OnSceneGUI() if (m_UpdateCache) m_VerticalAxisCache = orbitalFollow.VerticalAxis.Value; - var draggedRig = CinemachineSceneToolHelpers.ThreeOrbitRigHandle( + var draggedRig = CinemachineSceneToolHelpers.DoThreeOrbitRigHandle( orbitalFollow.VirtualCamera, orbitalFollow.GetReferenceOrientation(), new SerializedObject(orbitalFollow).FindProperty(() => orbitalFollow.Orbits), orbitalFollow.TrackedPoint); @@ -152,86 +222,8 @@ void OnSceneGUI() throw new System.ArgumentOutOfRangeException(); } } - - } - Handles.color = originalColor; - } - - // TODO: ask swap's opinion on this. Do we want to always draw this or only when follow offset handle is not selected - // TODO: what color? when follow offset handle is selected, do we want to draw CameraPath. - [DrawGizmo(GizmoType.Active | GizmoType.Selected, typeof(CinemachineOrbitalFollow))] - static void DrawOrbitalGizmos(CinemachineOrbitalFollow orbital, GizmoType selectionType) - { - var vcam = orbital.VirtualCamera; - if (vcam != null && vcam.Follow != null) - { - var color = CinemachineCore.IsLive(vcam) - ? CinemachineCorePrefs.BoundaryObjectGizmoColour.Value - : CinemachineCorePrefs.InactiveGizmoColour.Value; - var targetPos = orbital.TrackedPoint; - var orient = orbital.GetReferenceOrientation(); - var up = orient * Vector3.up; - var rotation = orbital.HorizontalAxis.Value; - orient = Quaternion.AngleAxis(rotation, up) * orient; - - switch (orbital.OrbitStyle) - { - case CinemachineOrbitalFollow.OrbitStyles.ThreeRing: - { - var scale = orbital.RadialAxis.Value; - var prevColor = Handles.color; - Handles.color = color; - Handles.DrawWireDisc( - targetPos + up * orbital.Orbits.Top.Height * scale, - up, orbital.Orbits.Top.Radius * scale); - Handles.DrawWireDisc( - targetPos + up * orbital.Orbits.Center.Height * scale, - up, orbital.Orbits.Center.Radius * scale); - Handles.DrawWireDisc( - targetPos + up * orbital.Orbits.Bottom.Height * scale, - up, orbital.Orbits.Bottom.Radius * scale); - Handles.color = prevColor; - - DrawCameraPath(targetPos, orient, scale, color, orbital); - - break; - } - case CinemachineOrbitalFollow.OrbitStyles.Sphere: - { - var fwd = targetPos - vcam.State.RawPosition; - var right = orient * Vector3.right; - up = Vector3.Cross(fwd, right); - - var prevColor = Handles.color; - Handles.color = color; - Handles.DrawWireDisc(targetPos, up, orbital.Radius); - Handles.DrawWireDisc(targetPos, right, orbital.Radius); - Handles.color = prevColor; - break; - } - } - } - } - - static void DrawCameraPath( - Vector3 pos, Quaternion orient, float scale, Color color, CinemachineOrbitalFollow freelook) - { - var prevMatrix = Gizmos.matrix; - Gizmos.matrix = Matrix4x4.TRS(pos, orient, scale * Vector3.one); - var prevColor = Gizmos.color; - Gizmos.color = color; - - const float stepSize = 0.1f; - var lastPos = freelook.GetCameraOffsetForNormalizedAxisValue(-1); - var max = 1 + stepSize/2; - for (float t = -1 + stepSize; t < max; t += stepSize) - { - var p = freelook.GetCameraOffsetForNormalizedAxisValue(t); - Gizmos.DrawLine(lastPos, p); - lastPos = p; + Handles.color = originalColor; } - Gizmos.matrix = prevMatrix; - Gizmos.color = prevColor; } } } diff --git a/com.unity.cinemachine/Editor/Editors/CinemachinePositionComposerEditor.cs b/com.unity.cinemachine/Editor/Editors/CinemachinePositionComposerEditor.cs index 3c4f63d76..069610d90 100644 --- a/com.unity.cinemachine/Editor/Editors/CinemachinePositionComposerEditor.cs +++ b/com.unity.cinemachine/Editor/Editors/CinemachinePositionComposerEditor.cs @@ -1,5 +1,6 @@ using UnityEngine; using UnityEditor; +using UnityEditor.EditorTools; namespace Unity.Cinemachine.Editor { @@ -22,9 +23,6 @@ protected virtual void OnEnable() CinemachineDebug.OnGUIHandlers += OnGuiHandler; if (CinemachineCorePrefs.ShowInGameGuides.Value) InspectorUtility.RepaintGameView(); - - CinemachineSceneToolUtility.RegisterTool(typeof(FollowOffsetTool)); - CinemachineSceneToolUtility.RegisterTool(typeof(TrackedObjectOffsetTool)); } protected virtual void OnDisable() @@ -33,9 +31,6 @@ protected virtual void OnDisable() CinemachineDebug.OnGUIHandlers -= OnGuiHandler; if (CinemachineCorePrefs.ShowInGameGuides.Value) InspectorUtility.RepaintGameView(); - - CinemachineSceneToolUtility.UnregisterTool(typeof(FollowOffsetTool)); - CinemachineSceneToolUtility.UnregisterTool(typeof(TrackedObjectOffsetTool)); } protected virtual void OnGuiHandler(CinemachineBrain brain) @@ -61,25 +56,31 @@ protected virtual void OnGuiHandler(CinemachineBrain brain) Target.TrackedPoint, brain.OutputCamera); } - void OnSceneGUI() + [EditorTool("Camera Distance Tool", typeof(CinemachinePositionComposer))] + class CameraDistanceTool : EditorTool { - if (Target == null || !Target.IsValid) - return; - - if (CinemachineSceneToolUtility.IsToolActive(typeof(TrackedObjectOffsetTool))) + GUIContent m_IconContent; + public override GUIContent toolbarIcon => m_IconContent; + void OnEnable() { - CinemachineSceneToolHelpers.TrackedObjectOffsetTool( - Target.VirtualCamera, - new SerializedObject(Target).FindProperty(() => Target.TargetOffset), - CinemachineCore.Stage.Body); + m_IconContent = new GUIContent + { + image = AssetDatabase.LoadAssetAtPath($"{CinemachineSceneToolHelpers.IconPath}/FollowOffset.png"), + tooltip = "Adjust the Camera Distance", + }; } - else if (CinemachineSceneToolUtility.IsToolActive(typeof(FollowOffsetTool))) + + public override void OnToolGUI(EditorWindow window) { - var property = new SerializedObject(Target).FindProperty(() => Target.CameraDistance); + var composer = target as CinemachinePositionComposer; + if (composer == null || !composer.IsValid) + return; + + var property = new SerializedObject(composer).FindProperty(() => composer.CameraDistance); var originalColor = Handles.color; - var camPos = Target.VcamState.RawPosition; - var targetForward = Target.VirtualCamera.State.GetFinalOrientation() * Vector3.forward; + var camPos = composer.VcamState.RawPosition; + var targetForward = composer.VirtualCamera.State.GetFinalOrientation() * Vector3.forward; EditorGUI.BeginChangeCheck(); Handles.color = CinemachineSceneToolHelpers.HelperLineDefaultColor; var cdHandleId = GUIUtility.GetControlID(FocusType.Passive); @@ -97,17 +98,44 @@ void OnSceneGUI() if (isDraggedOrHovered) { CinemachineSceneToolHelpers.DrawLabel(camPos, - property.displayName + " (" + Target.CameraDistance.ToString("F1") + ")"); + property.displayName + " (" + composer.CameraDistance.ToString("F1") + ")"); } Handles.color = isDraggedOrHovered ? Handles.selectedColor : CinemachineSceneToolHelpers.HelperLineDefaultColor; - Handles.DrawLine(camPos, Target.FollowTargetPosition + Target.TargetOffset); + Handles.DrawLine(camPos, composer.FollowTargetPosition + composer.TargetOffset); - CinemachineSceneToolHelpers.SoloOnDrag(isDragged, Target.VirtualCamera, cdHandleId); + CinemachineSceneToolHelpers.SoloOnDrag(isDragged, composer.VirtualCamera, cdHandleId); Handles.color = originalColor; } } + + [EditorTool("LookAt Offset Tool", typeof(CinemachinePositionComposer))] + class LookAtOffsetTool : EditorTool + { + GUIContent m_IconContent; + public override GUIContent toolbarIcon => m_IconContent; + void OnEnable() + { + m_IconContent = new GUIContent + { + image = AssetDatabase.LoadAssetAtPath($"{CinemachineSceneToolHelpers.IconPath}/TrackedObjectOffset.png"), + tooltip = "Adjust the LookAt Offset", + }; + } + + public override void OnToolGUI(EditorWindow window) + { + var composer = target as CinemachinePositionComposer; + if (composer == null || !composer.IsValid) + return; + + CinemachineSceneToolHelpers.DoTrackedObjectOffsetTool( + composer.VirtualCamera, + new SerializedObject(composer).FindProperty(() => composer.TargetOffset), + CinemachineCore.Stage.Body); + } + } } } diff --git a/com.unity.cinemachine/Editor/Editors/CinemachineRotationComposerEditor.cs b/com.unity.cinemachine/Editor/Editors/CinemachineRotationComposerEditor.cs index 224811198..c76ef7501 100644 --- a/com.unity.cinemachine/Editor/Editors/CinemachineRotationComposerEditor.cs +++ b/com.unity.cinemachine/Editor/Editors/CinemachineRotationComposerEditor.cs @@ -1,4 +1,6 @@ using UnityEditor; +using UnityEditor.EditorTools; +using UnityEngine; namespace Unity.Cinemachine.Editor { @@ -21,8 +23,6 @@ protected virtual void OnEnable() CinemachineDebug.OnGUIHandlers += OnGuiHandler; if (CinemachineCorePrefs.ShowInGameGuides.Value) InspectorUtility.RepaintGameView(); - - CinemachineSceneToolUtility.RegisterTool(typeof(TrackedObjectOffsetTool)); } protected virtual void OnDisable() @@ -31,8 +31,6 @@ protected virtual void OnDisable() CinemachineDebug.OnGUIHandlers -= OnGuiHandler; if (CinemachineCorePrefs.ShowInGameGuides.Value) InspectorUtility.RepaintGameView(); - - CinemachineSceneToolUtility.UnregisterTool(typeof(TrackedObjectOffsetTool)); } protected virtual void OnGuiHandler(CinemachineBrain brain) @@ -60,17 +58,29 @@ protected virtual void OnGuiHandler(CinemachineBrain brain) Target.TrackedPoint, brain.OutputCamera); } - void OnSceneGUI() + [EditorTool("LookAt Offset Tool", typeof(CinemachineRotationComposer))] + class LookAtOffsetTool : EditorTool { - var composer = Target; - if (composer == null || !composer.IsValid) - return; + GUIContent m_IconContent; + public override GUIContent toolbarIcon => m_IconContent; + void OnEnable() + { + m_IconContent = new GUIContent + { + image = AssetDatabase.LoadAssetAtPath($"{CinemachineSceneToolHelpers.IconPath}/TrackedObjectOffset.png"), + tooltip = "Adjust the LookAt Offset", + }; + } - if (CinemachineSceneToolUtility.IsToolActive(typeof(TrackedObjectOffsetTool))) + public override void OnToolGUI(EditorWindow window) { - CinemachineSceneToolHelpers.TrackedObjectOffsetTool( - Target.VirtualCamera, - new SerializedObject(Target).FindProperty(() => Target.TargetOffset), + var composer = target as CinemachineRotationComposer; + if (composer == null || !composer.IsValid) + return; + + CinemachineSceneToolHelpers.DoTrackedObjectOffsetTool( + composer.VirtualCamera, + new SerializedObject(composer).FindProperty(() => composer.TargetOffset), CinemachineCore.Stage.Aim); } } diff --git a/com.unity.cinemachine/Editor/Editors/CinemachineSplineRollEditor.cs b/com.unity.cinemachine/Editor/Editors/CinemachineSplineRollEditor.cs index 972525bca..ef10a8153 100644 --- a/com.unity.cinemachine/Editor/Editors/CinemachineSplineRollEditor.cs +++ b/com.unity.cinemachine/Editor/Editors/CinemachineSplineRollEditor.cs @@ -209,7 +209,7 @@ void OnEnable() { image = AssetDatabase.LoadAssetAtPath($"{CinemachineSceneToolHelpers.IconPath}/CmSplineRollTool@256.png"), text = "Roll Tool", - tooltip = "Adjust the roll data points along the spline." + tooltip = "Adjust the roll data points along the spline" }; } diff --git a/com.unity.cinemachine/Editor/Editors/CinemachineThirdPersonFollowEditor.cs b/com.unity.cinemachine/Editor/Editors/CinemachineThirdPersonFollowEditor.cs index 1cca99c74..8b87f5519 100644 --- a/com.unity.cinemachine/Editor/Editors/CinemachineThirdPersonFollowEditor.cs +++ b/com.unity.cinemachine/Editor/Editors/CinemachineThirdPersonFollowEditor.cs @@ -1,5 +1,6 @@ using UnityEngine; using UnityEditor; +using UnityEditor.EditorTools; namespace Unity.Cinemachine.Editor { @@ -7,13 +8,10 @@ namespace Unity.Cinemachine.Editor [CanEditMultipleObjects] class CinemachineThirdPersonFollowEditor : CinemachineComponentBaseEditor { - protected virtual void OnEnable() => CinemachineSceneToolUtility.RegisterTool(typeof(FollowOffsetTool)); - protected virtual void OnDisable() => CinemachineSceneToolUtility.UnregisterTool(typeof(FollowOffsetTool)); - [DrawGizmo(GizmoType.Active | GizmoType.Selected, typeof(CinemachineThirdPersonFollow))] static void DrawThirdPersonGizmos(CinemachineThirdPersonFollow target, GizmoType selectionType) { - if (CinemachineSceneToolUtility.IsToolActive(typeof(FollowOffsetTool))) + if (ToolManager.activeToolType == typeof(ThirdPersonFollowOffsetTool)) return; // don't draw gizmo when using handles if (target.IsValid) @@ -41,15 +39,27 @@ static void DrawThirdPersonGizmos(CinemachineThirdPersonFollow target, GizmoType Gizmos.color = originalGizmoColour; } } - - void OnSceneGUI() + + [EditorTool("Third Person Follow Offset Tool", typeof(CinemachineThirdPersonFollow))] + class ThirdPersonFollowOffsetTool : EditorTool { - var thirdPerson = target as CinemachineThirdPersonFollow; - if (thirdPerson == null || !thirdPerson.IsValid) - return; + GUIContent m_IconContent; + public override GUIContent toolbarIcon => m_IconContent; + void OnEnable() + { + m_IconContent = new GUIContent + { + image = AssetDatabase.LoadAssetAtPath($"{CinemachineSceneToolHelpers.IconPath}/FollowOffset.png"), + tooltip = "Adjust the Third Person Follow Offset", + }; + } - if (CinemachineSceneToolUtility.IsToolActive(typeof(FollowOffsetTool))) + public override void OnToolGUI(EditorWindow window) { + var thirdPerson = target as CinemachineThirdPersonFollow; + if (thirdPerson == null || !thirdPerson.IsValid) + return; + var originalColor = Handles.color; thirdPerson.GetRigPositions(out var followTargetPosition, out var shoulderPosition, @@ -84,14 +94,11 @@ void OnSceneGUI() var so = new SerializedObject(thirdPerson); var shoulderOffset = so.FindProperty(() => thirdPerson.ShoulderOffset); - shoulderOffset.vector3Value += - CinemachineSceneToolHelpers.PositionHandleDelta(heading, newShoulderPosition, shoulderPosition); + shoulderOffset.vector3Value += CinemachineSceneToolHelpers.PositionHandleDelta(heading, newShoulderPosition, shoulderPosition); var verticalArmLength = so.FindProperty(() => thirdPerson.VerticalArmLength); - verticalArmLength.floatValue += - CinemachineSceneToolHelpers.SliderHandleDelta(newArmPosition, armPosition, followUp); + verticalArmLength.floatValue += CinemachineSceneToolHelpers.SliderHandleDelta(newArmPosition, armPosition, followUp); var cameraDistance = so.FindProperty(() => thirdPerson.CameraDistance); - cameraDistance.floatValue -= - CinemachineSceneToolHelpers.SliderHandleDelta(newCamPos, camPos, targetForward); + cameraDistance.floatValue -= CinemachineSceneToolHelpers.SliderHandleDelta(newCamPos, camPos, targetForward); so.ApplyModifiedProperties(); } @@ -106,24 +113,24 @@ void OnSceneGUI() CinemachineSceneToolHelpers.SoloOnDrag(isDragged, thirdPerson.VirtualCamera, sHandleIds.xyz); Handles.color = originalColor; - } - // local function that draws label and guide lines, and returns true if a handle has been dragged - static bool IsHandleDragged - (int handleMinId, int handleMaxId, Vector3 labelPos, string text, Vector3 lineStart, Vector3 lineEnd) - { - var handleIsDragged = handleMinId <= GUIUtility.hotControl && GUIUtility.hotControl <= handleMaxId; - var handleIsDraggedOrHovered = handleIsDragged || - (handleMinId <= HandleUtility.nearestControl && HandleUtility.nearestControl <= handleMaxId); + // local function that draws label and guide lines, and returns true if a handle has been dragged + static bool IsHandleDragged + (int handleMinId, int handleMaxId, Vector3 labelPos, string text, Vector3 lineStart, Vector3 lineEnd) + { + var handleIsDragged = handleMinId <= GUIUtility.hotControl && GUIUtility.hotControl <= handleMaxId; + var handleIsDraggedOrHovered = handleIsDragged || + (handleMinId <= HandleUtility.nearestControl && HandleUtility.nearestControl <= handleMaxId); - if (handleIsDraggedOrHovered) - CinemachineSceneToolHelpers.DrawLabel(labelPos, text); + if (handleIsDraggedOrHovered) + CinemachineSceneToolHelpers.DrawLabel(labelPos, text); - Handles.color = handleIsDraggedOrHovered ? - Handles.selectedColor : CinemachineSceneToolHelpers.HelperLineDefaultColor; - Handles.DrawLine(lineStart, lineEnd, CinemachineSceneToolHelpers.LineThickness); + Handles.color = handleIsDraggedOrHovered ? + Handles.selectedColor : CinemachineSceneToolHelpers.HelperLineDefaultColor; + Handles.DrawLine(lineStart, lineEnd, CinemachineSceneToolHelpers.LineThickness); - return handleIsDragged; + return handleIsDragged; + } } } } diff --git a/com.unity.cinemachine/Editor/Obsolete/Cinemachine3rdPersonFollowEditor.cs b/com.unity.cinemachine/Editor/Obsolete/Cinemachine3rdPersonFollowEditor.cs index 9b7c9daf1..81af941d1 100644 --- a/com.unity.cinemachine/Editor/Obsolete/Cinemachine3rdPersonFollowEditor.cs +++ b/com.unity.cinemachine/Editor/Obsolete/Cinemachine3rdPersonFollowEditor.cs @@ -12,9 +12,6 @@ class Cinemachine3rdPersonFollowEditor : BaseEditor [DrawGizmo(GizmoType.Active | GizmoType.Selected, typeof(Cinemachine3rdPersonFollow))] static void Draw3rdPersonGizmos(Cinemachine3rdPersonFollow target, GizmoType selectionType) { - if (CinemachineSceneToolUtility.IsToolActive(typeof(FollowOffsetTool))) - return; // don't draw gizmo when using handles - if (target.IsValid) { var isLive = CinemachineCore.IsLive(target.VirtualCamera); @@ -41,100 +38,12 @@ static void Draw3rdPersonGizmos(Cinemachine3rdPersonFollow target, GizmoType sel } } - protected virtual void OnEnable() => CinemachineSceneToolUtility.RegisterTool(typeof(FollowOffsetTool)); - protected virtual void OnDisable() => CinemachineSceneToolUtility.UnregisterTool(typeof(FollowOffsetTool)); - public override void OnInspectorGUI() { BeginInspector(); this.IMGUI_DrawMissingCmCameraHelpBox(); DrawRemainingPropertiesInInspector(); } - - void OnSceneGUI() - { - var thirdPerson = Target; - if (thirdPerson == null || !thirdPerson.IsValid) - return; - - if (CinemachineSceneToolUtility.IsToolActive(typeof(FollowOffsetTool))) - { - var originalColor = Handles.color; - - thirdPerson.GetRigPositions(out var followTargetPosition, out var shoulderPosition, - out var armPosition); - var followTargetRotation = thirdPerson.FollowTargetRotation; - var targetForward = followTargetRotation * Vector3.forward; - var heading = Cinemachine3rdPersonFollow.GetHeading( - followTargetRotation, thirdPerson.VirtualCamera.State.ReferenceUp); - - EditorGUI.BeginChangeCheck(); - - // shoulder handle - var sHandleIds = Handles.PositionHandleIds.@default; - var newShoulderPosition = Handles.PositionHandle(sHandleIds, shoulderPosition, heading); - - Handles.color = Handles.preselectionColor; - // arm handle - var followUp = followTargetRotation * Vector3.up; - var aHandleId = GUIUtility.GetControlID(FocusType.Passive); - var newArmPosition = Handles.Slider(aHandleId, armPosition, followUp, - CinemachineSceneToolHelpers.CubeHandleCapSize(armPosition), Handles.CubeHandleCap, 0.5f); - - // cam distance handle - var camDistance = thirdPerson.CameraDistance; - var camPos = armPosition - targetForward * camDistance; - var cdHandleId = GUIUtility.GetControlID(FocusType.Passive); - var newCamPos = Handles.Slider(cdHandleId, camPos, targetForward, - CinemachineSceneToolHelpers.CubeHandleCapSize(camPos), Handles.CubeHandleCap, 0.5f); - if (EditorGUI.EndChangeCheck()) - { - // Modify via SerializedProperty for OnValidate to get called automatically, and scene repainting too - var so = new SerializedObject(thirdPerson); - - var shoulderOffset = so.FindProperty(() => thirdPerson.ShoulderOffset); - shoulderOffset.vector3Value += - CinemachineSceneToolHelpers.PositionHandleDelta(heading, newShoulderPosition, shoulderPosition); - var verticalArmLength = so.FindProperty(() => thirdPerson.VerticalArmLength); - verticalArmLength.floatValue += - CinemachineSceneToolHelpers.SliderHandleDelta(newArmPosition, armPosition, followUp); - var cameraDistance = so.FindProperty(() => thirdPerson.CameraDistance); - cameraDistance.floatValue -= - CinemachineSceneToolHelpers.SliderHandleDelta(newCamPos, camPos, targetForward); - - so.ApplyModifiedProperties(); - } - - var isDragged = IsHandleDragged(sHandleIds.x, sHandleIds.xyz, shoulderPosition, "Shoulder Offset " - + thirdPerson.ShoulderOffset.ToString("F1"), followTargetPosition, shoulderPosition); - isDragged |= IsHandleDragged(aHandleId, aHandleId, armPosition, "Vertical Arm Length (" - + thirdPerson.VerticalArmLength.ToString("F1") + ")", shoulderPosition, armPosition); - isDragged |= IsHandleDragged(cdHandleId, cdHandleId, camPos, "Camera Distance (" - + camDistance.ToString("F1") + ")", armPosition, camPos); - - CinemachineSceneToolHelpers.SoloOnDrag(isDragged, thirdPerson.VirtualCamera, sHandleIds.xyz); - - Handles.color = originalColor; - } - - // local function that draws label and guide lines, and returns true if a handle has been dragged - static bool IsHandleDragged - (int handleMinId, int handleMaxId, Vector3 labelPos, string text, Vector3 lineStart, Vector3 lineEnd) - { - var handleIsDragged = handleMinId <= GUIUtility.hotControl && GUIUtility.hotControl <= handleMaxId; - var handleIsDraggedOrHovered = handleIsDragged || - (handleMinId <= HandleUtility.nearestControl && HandleUtility.nearestControl <= handleMaxId); - - if (handleIsDraggedOrHovered) - CinemachineSceneToolHelpers.DrawLabel(labelPos, text); - - Handles.color = handleIsDraggedOrHovered ? - Handles.selectedColor : CinemachineSceneToolHelpers.HelperLineDefaultColor; - Handles.DrawLine(lineStart, lineEnd, CinemachineSceneToolHelpers.LineThickness); - - return handleIsDragged; - } - } } } #endif diff --git a/com.unity.cinemachine/Editor/Obsolete/CinemachineComposerEditor.cs b/com.unity.cinemachine/Editor/Obsolete/CinemachineComposerEditor.cs index c94917147..27a6637d3 100644 --- a/com.unity.cinemachine/Editor/Obsolete/CinemachineComposerEditor.cs +++ b/com.unity.cinemachine/Editor/Obsolete/CinemachineComposerEditor.cs @@ -21,8 +21,6 @@ protected virtual void OnEnable() CinemachineDebug.OnGUIHandlers += OnGuiHandler; if (CinemachineCorePrefs.ShowInGameGuides.Value) InspectorUtility.RepaintGameView(); - - CinemachineSceneToolUtility.RegisterTool(typeof(TrackedObjectOffsetTool)); } protected virtual void OnDisable() @@ -31,8 +29,6 @@ protected virtual void OnDisable() CinemachineDebug.OnGUIHandlers -= OnGuiHandler; if (CinemachineCorePrefs.ShowInGameGuides.Value) InspectorUtility.RepaintGameView(); - - CinemachineSceneToolUtility.UnregisterTool(typeof(TrackedObjectOffsetTool)); } public override void OnInspectorGUI() @@ -77,20 +73,6 @@ protected virtual void OnGuiHandler(CinemachineBrain brain) CmPipelineComponentInspectorUtility.OnGUI_DrawOnscreenTargetMarker( Target.TrackedPoint, brain.OutputCamera); } - - void OnSceneGUI() - { - if (Target == null || !Target.IsValid) - return; - - if (CinemachineSceneToolUtility.IsToolActive(typeof(TrackedObjectOffsetTool))) - { - CinemachineSceneToolHelpers.TrackedObjectOffsetTool( - Target.VirtualCamera, - new SerializedObject(Target).FindProperty(() => Target.m_TrackedObjectOffset), - CinemachineCore.Stage.Aim); - } - } } } #endif diff --git a/com.unity.cinemachine/Editor/Obsolete/CinemachineFramingTransposerEditor.cs b/com.unity.cinemachine/Editor/Obsolete/CinemachineFramingTransposerEditor.cs index f2d6efc53..7fa219f63 100644 --- a/com.unity.cinemachine/Editor/Obsolete/CinemachineFramingTransposerEditor.cs +++ b/com.unity.cinemachine/Editor/Obsolete/CinemachineFramingTransposerEditor.cs @@ -88,9 +88,6 @@ protected virtual void OnEnable() CinemachineDebug.OnGUIHandlers += OnGuiHandler; if (CinemachineCorePrefs.ShowInGameGuides.Value) InspectorUtility.RepaintGameView(); - - CinemachineSceneToolUtility.RegisterTool(typeof(FollowOffsetTool)); - CinemachineSceneToolUtility.RegisterTool(typeof(TrackedObjectOffsetTool)); } protected virtual void OnDisable() @@ -99,9 +96,6 @@ protected virtual void OnDisable() CinemachineDebug.OnGUIHandlers -= OnGuiHandler; if (CinemachineCorePrefs.ShowInGameGuides.Value) InspectorUtility.RepaintGameView(); - - CinemachineSceneToolUtility.UnregisterTool(typeof(FollowOffsetTool)); - CinemachineSceneToolUtility.UnregisterTool(typeof(TrackedObjectOffsetTool)); } public override void OnInspectorGUI() @@ -172,61 +166,6 @@ private static void DrawGroupComposerGizmos(CinemachineFramingTransposer target, Gizmos.matrix = m; } } - - void OnSceneGUI() - { - var framingTransposer = Target; - if (framingTransposer == null || !framingTransposer.IsValid) - { - return; - } - - if (CinemachineSceneToolUtility.IsToolActive(typeof(TrackedObjectOffsetTool))) - { - CinemachineSceneToolHelpers.TrackedObjectOffsetTool( - Target.VirtualCamera, - new SerializedObject(Target).FindProperty(() => Target.m_TrackedObjectOffset), - CinemachineCore.Stage.Body); - } - else if (CinemachineSceneToolUtility.IsToolActive(typeof(FollowOffsetTool))) - { - var originalColor = Handles.color; - var camPos = framingTransposer.VcamState.RawPosition; - var targetForward = framingTransposer.VirtualCamera.State.GetFinalOrientation() * Vector3.forward; - EditorGUI.BeginChangeCheck(); - Handles.color = CinemachineSceneToolHelpers.HelperLineDefaultColor; - var cdHandleId = GUIUtility.GetControlID(FocusType.Passive); - var newHandlePosition = Handles.Slider(cdHandleId, camPos, targetForward, - CinemachineSceneToolHelpers.CubeHandleCapSize(camPos), Handles.CubeHandleCap, 0.5f); - if (EditorGUI.EndChangeCheck()) - { - // Modify via SerializedProperty for OnValidate to get called automatically, and scene repainting too - var so = new SerializedObject(framingTransposer); - var prop = so.FindProperty(() => framingTransposer.m_CameraDistance); - prop.floatValue -= CinemachineSceneToolHelpers.SliderHandleDelta(newHandlePosition, camPos, targetForward); - so.ApplyModifiedProperties(); - } - - var cameraDistanceHandleIsDragged = GUIUtility.hotControl == cdHandleId; - var cameraDistanceHandleIsUsedOrHovered = cameraDistanceHandleIsDragged || - HandleUtility.nearestControl == cdHandleId; - if (cameraDistanceHandleIsUsedOrHovered) - { - CinemachineSceneToolHelpers.DrawLabel(camPos, - "Camera Distance (" + framingTransposer.m_CameraDistance.ToString("F1") + ")"); - } - - Handles.color = cameraDistanceHandleIsUsedOrHovered ? - Handles.selectedColor : CinemachineSceneToolHelpers.HelperLineDefaultColor; - Handles.DrawLine(camPos, - framingTransposer.FollowTarget.position + framingTransposer.m_TrackedObjectOffset); - - CinemachineSceneToolHelpers.SoloOnDrag(cameraDistanceHandleIsDragged, framingTransposer.VirtualCamera, - cdHandleId); - - Handles.color = originalColor; - } - } } } #endif diff --git a/com.unity.cinemachine/Editor/Obsolete/CinemachineFreeLookEditor.cs b/com.unity.cinemachine/Editor/Obsolete/CinemachineFreeLookEditor.cs index 61366bf70..c7e076f5c 100644 --- a/com.unity.cinemachine/Editor/Obsolete/CinemachineFreeLookEditor.cs +++ b/com.unity.cinemachine/Editor/Obsolete/CinemachineFreeLookEditor.cs @@ -34,10 +34,6 @@ protected override void OnEnable() { base.OnEnable(); Target.UpdateInputAxisProvider(); - - CinemachineSceneToolUtility.RegisterTool(typeof(FoVTool)); - CinemachineSceneToolUtility.RegisterTool(typeof(FarNearClipTool)); - CinemachineSceneToolUtility.RegisterTool(typeof(FollowOffsetTool)); } protected override void OnDisable() @@ -47,10 +43,6 @@ protected override void OnDisable() // Must destroy child editors or we get exceptions if (m_rigEditor != null) UnityEngine.Object.DestroyImmediate(m_rigEditor); - - CinemachineSceneToolUtility.UnregisterTool(typeof(FoVTool)); - CinemachineSceneToolUtility.UnregisterTool(typeof(FarNearClipTool)); - CinemachineSceneToolUtility.UnregisterTool(typeof(FollowOffsetTool)); } public override void OnInspectorGUI() @@ -125,38 +117,6 @@ void OnSceneGUI() // Forward to embedded rig editor if (m_rigEditor != null && m_RigEditorOnSceneGUI != null) m_RigEditorOnSceneGUI.Invoke(m_rigEditor, null); - - var freelook = Target; - if (freelook == null || !freelook.IsValid) - return; - - var originalColor = Handles.color; - Handles.color = Handles.preselectionColor; - if (freelook.m_CommonLens && CinemachineSceneToolUtility.IsToolActive(typeof(FoVTool))) - { - CinemachineSceneToolHelpers.FovToolHandle(freelook, - new SerializedObject(freelook).FindProperty(() => freelook.m_Lens), - freelook.m_Lens.ToLensSettings(), IsHorizontalFOVUsed()); - } - else if (freelook.m_CommonLens && CinemachineSceneToolUtility.IsToolActive(typeof(FarNearClipTool))) - { - CinemachineSceneToolHelpers.NearFarClipHandle(freelook, - new SerializedObject(freelook).FindProperty(() => freelook.m_Lens)); - } - else if (freelook.Follow != null && CinemachineSceneToolUtility.IsToolActive(typeof(FollowOffsetTool))) - { - var middleRig = freelook.GetRig(1).GetCinemachineComponent(); - if (middleRig != null) - { - var referenceFrame = middleRig.GetReferenceOrientation(freelook.State.ReferenceUp); - var draggedRig = CinemachineSceneToolHelpers.OrbitControlHandleFreelook( - freelook, referenceFrame, - new SerializedObject(freelook).FindProperty(() => freelook.m_Orbits)); - if (draggedRig >= 0) - SetSelectedRig(Target, draggedRig); - } - } - Handles.color = originalColor; } static GUIContent[] s_RigNames = diff --git a/com.unity.cinemachine/Editor/Obsolete/CinemachineTransposerEditor.cs b/com.unity.cinemachine/Editor/Obsolete/CinemachineTransposerEditor.cs index 4a2695dc4..53a1010a5 100644 --- a/com.unity.cinemachine/Editor/Obsolete/CinemachineTransposerEditor.cs +++ b/com.unity.cinemachine/Editor/Obsolete/CinemachineTransposerEditor.cs @@ -72,36 +72,6 @@ public override void OnInspectorGUI() MessageType.Warning); DrawRemainingPropertiesInInspector(); } - - protected virtual void OnEnable() - { - CinemachineSceneToolUtility.RegisterTool(typeof(FollowOffsetTool)); - } - - protected virtual void OnDisable() - { - CinemachineSceneToolUtility.UnregisterTool(typeof(FollowOffsetTool)); - } - - void OnSceneGUI() - { - var transposer = Target; - if (transposer == null || !transposer.IsValid) - return; - if (CinemachineSceneToolUtility.IsToolActive(typeof(FollowOffsetTool))) - { - var property = new SerializedObject(Target).FindProperty(() => Target.m_FollowOffset); - var up = Target.VirtualCamera.State.ReferenceUp; - CinemachineSceneToolHelpers.FollowOffsetTool( - Target.VirtualCamera, property, Target.GetTargetCameraPosition(up), - Target.FollowTargetPosition, Target.GetReferenceOrientation(up), () => - { - // Sanitize the offset - property.vector3Value = Target.EffectiveOffset; - property.serializedObject.ApplyModifiedProperties(); - }); - } - } } } #endif diff --git a/com.unity.cinemachine/Editor/Obsolete/CinemachineVirtualCameraEditor.cs b/com.unity.cinemachine/Editor/Obsolete/CinemachineVirtualCameraEditor.cs index d42bfa50b..d51f4e127 100644 --- a/com.unity.cinemachine/Editor/Obsolete/CinemachineVirtualCameraEditor.cs +++ b/com.unity.cinemachine/Editor/Obsolete/CinemachineVirtualCameraEditor.cs @@ -97,9 +97,6 @@ protected override void OnEnable() if (Target != null && Target.m_LockStageInInspector != null) foreach (var s in Target.m_LockStageInInspector) m_PipelineSet.SetStageIsLocked(s); - - CinemachineSceneToolUtility.RegisterTool(typeof(FoVTool)); - CinemachineSceneToolUtility.RegisterTool(typeof(FarNearClipTool)); } protected override void OnDisable() @@ -107,33 +104,11 @@ protected override void OnDisable() Undo.undoRedoPerformed -= ResetTargetOnUndo; m_PipelineSet.Shutdown(); base.OnDisable(); - - CinemachineSceneToolUtility.UnregisterTool(typeof(FoVTool)); - CinemachineSceneToolUtility.UnregisterTool(typeof(FarNearClipTool)); } void OnSceneGUI() { m_PipelineSet.OnSceneGUI(); // call hidden editors' OnSceneGUI - - var vcam = Target; - if (vcam == null || !vcam.IsValid || vcam.m_ExcludedPropertiesInInspector.Contains("m_Lens")) - return; - - var originalColor = Handles.color; - Handles.color = Handles.preselectionColor; - if (CinemachineSceneToolUtility.IsToolActive(typeof(FoVTool))) - { - CinemachineSceneToolHelpers.FovToolHandle(vcam, - new SerializedObject(vcam).FindProperty(() => vcam.m_Lens), - vcam.m_Lens.ToLensSettings(), IsHorizontalFOVUsed()); - } - else if (CinemachineSceneToolUtility.IsToolActive(typeof(FarNearClipTool))) - { - CinemachineSceneToolHelpers.NearFarClipHandle(vcam, - new SerializedObject(vcam).FindProperty(() => vcam.m_Lens)); - } - Handles.color = originalColor; } public override void OnInspectorGUI() diff --git a/com.unity.cinemachine/Editor/Utility/CinemachineSceneTools.cs b/com.unity.cinemachine/Editor/Utility/CinemachineSceneToolHelpers.cs similarity index 82% rename from com.unity.cinemachine/Editor/Utility/CinemachineSceneTools.cs rename to com.unity.cinemachine/Editor/Utility/CinemachineSceneToolHelpers.cs index 7179243ed..4cddb131c 100644 --- a/com.unity.cinemachine/Editor/Utility/CinemachineSceneTools.cs +++ b/com.unity.cinemachine/Editor/Utility/CinemachineSceneToolHelpers.cs @@ -1,88 +1,9 @@ using System; -using System.Collections.Generic; using UnityEditor; -using UnityEditor.EditorTools; using UnityEngine; namespace Unity.Cinemachine.Editor { - /// - /// Static class that manages Cinemachine Tools. It knows which tool is active, - /// and ensures that exclusive tools are not active at the same time. - /// The tools and editors requiring tools register/unregister themselves here. - /// - static class CinemachineSceneToolUtility - { - static Type s_ActiveExclusiveTool; - static Dictionary s_RequiredTools; - - /// - /// Checks whether tool is the currently active exclusive tool. - /// - /// Tool to check. - /// True, when the tool is the active exclusive tool. False, otherwise. - public static bool IsToolActive(Type tool) => s_ActiveExclusiveTool == tool; - - /// - /// Register your Type from the editor script's OnEnable function. - /// This way CinemachineTools will know which tools to display. - /// - /// Tool to register - public static void RegisterTool(Type tool) - { - if (s_RequiredTools.ContainsKey(tool)) - s_RequiredTools[tool]++; - else - s_RequiredTools.Add(tool, 1); - - s_TriggerToolBarRefresh = true; - } - - /// - /// Unregister your Type from the editor script's OnDisable function. - /// This way CinemachineTools will know which tools to display. - /// - /// Tool to register - public static void UnregisterTool(Type tool) - { - if (s_RequiredTools.ContainsKey(tool)) - { - --s_RequiredTools[tool]; - if (s_RequiredTools[tool] <= 0) - s_RequiredTools.Remove(tool); - } - s_TriggerToolBarRefresh = true; - } - - internal static bool IsToolRequired(Type tool) => s_RequiredTools.ContainsKey(tool); - - internal static void SetTool(bool active, Type tool) - { - if (active) - s_ActiveExclusiveTool = tool; - else - s_ActiveExclusiveTool = s_ActiveExclusiveTool == tool ? null : s_ActiveExclusiveTool; - - s_TriggerToolBarRefresh = true; - } - - static CinemachineSceneToolUtility() - { - s_RequiredTools = new Dictionary(); - EditorApplication.update += RefreshToolbar; - } - - static bool s_TriggerToolBarRefresh; - static void RefreshToolbar() - { - if (s_TriggerToolBarRefresh) - { - ToolManager.RefreshAvailableTools(); - s_TriggerToolBarRefresh = false; - } - } - } - static class CinemachineSceneToolHelpers { public const float LineThickness = 2f; @@ -136,7 +57,7 @@ public static void DrawLabel(Vector3 position, string text) static int s_ScaleSliderHash = "ScaleSliderHash".GetHashCode(); static float s_FOVAfterLastToolModification; - public static void FovToolHandle( + public static void DoFovToolHandle( CinemachineVirtualCameraBase vcam, SerializedProperty lensProperty, in LensSettings lens, bool isLensHorizontal) { @@ -210,7 +131,7 @@ public static void FovToolHandle( Handles.color = originalColor; } - public static void NearFarClipHandle(CinemachineVirtualCameraBase vcam, SerializedProperty lens) + public static void DoNearFarClipHandle(CinemachineVirtualCameraBase vcam, SerializedProperty lens) { var originalColor = Handles.color; Handles.color = Handles.preselectionColor; @@ -376,7 +297,7 @@ static void DrawPerspectiveFrustum(Matrix4x4 transform, Handles.matrix = originalMatrix; } - public static void TrackedObjectOffsetTool( + public static void DoTrackedObjectOffsetTool( CinemachineVirtualCameraBase vcam, SerializedProperty trackedObjectOffset, CinemachineCore.Stage stage) { var target = vcam.LookAt; @@ -421,7 +342,7 @@ public static void TrackedObjectOffsetTool( Handles.color = originalColor; } - public static void FollowOffsetTool( + public static void DoFollowOffsetTool( CinemachineVirtualCameraBase vcam, SerializedProperty offsetProperty, Vector3 camPos, Vector3 targetPosition, Quaternion targetRotation, Action OnChanged = null) @@ -456,47 +377,11 @@ public static void FollowOffsetTool( Handles.color = originalColor; } - -#if !CINEMACHINE_NO_CM2_SUPPORT - /// - /// Draws Orbit handles (e.g. for freelook) - /// - /// Index of the rig being edited, or -1 if none - [Obsolete] - public static int OrbitControlHandleFreelook( - CinemachineFreeLook vcam, Quaternion rotationFrame, SerializedProperty orbits) - { - var originalColor = Handles.color; - var followPos = vcam.Follow.position; - var draggedRig = -1; - var minIndex = 1; - for (var rigIndex = 0; rigIndex < orbits.arraySize; ++rigIndex) - { - var orbit = orbits.GetArrayElementAtIndex(rigIndex); - var orbitHeight = orbit.FindPropertyRelative("m_Height"); - var orbitRadius = orbit.FindPropertyRelative("m_Radius"); - - if (OrbitHandles( - orbits.serializedObject, orbitHeight, orbitRadius, - followPos, rotationFrame, - out var heightHandleId, out var radiusHandleId)) - { - draggedRig = rigIndex; - minIndex = Mathf.Min(heightHandleId, radiusHandleId); - } - } - SoloOnDrag(draggedRig != -1, vcam, minIndex); - - Handles.color = originalColor; - return draggedRig; - } -#endif - /// /// Draws Orbit handles for OrbitalFollow /// /// Index of the rig being edited, or -1 if none - public static int ThreeOrbitRigHandle( + public static int DoThreeOrbitRigHandle( CinemachineVirtualCameraBase vcam, Quaternion rotationFrame, SerializedProperty orbitSetting, Vector3 orbitCenter) { diff --git a/com.unity.cinemachine/Editor/Utility/CinemachineSceneTools.cs.meta b/com.unity.cinemachine/Editor/Utility/CinemachineSceneToolHelpers.cs.meta similarity index 100% rename from com.unity.cinemachine/Editor/Utility/CinemachineSceneTools.cs.meta rename to com.unity.cinemachine/Editor/Utility/CinemachineSceneToolHelpers.cs.meta diff --git a/com.unity.cinemachine/Editor/Utility/CinemachineToolbarOverlay.cs b/com.unity.cinemachine/Editor/Utility/CinemachineToolbarOverlay.cs deleted file mode 100644 index 6f7533c6e..000000000 --- a/com.unity.cinemachine/Editor/Utility/CinemachineToolbarOverlay.cs +++ /dev/null @@ -1,257 +0,0 @@ -using UnityEditor; -using UnityEditor.EditorTools; -using UnityEngine; - -namespace Unity.Cinemachine.Editor -{ - /// - /// This is a generic Tool class for Cinemachine tools. - /// To create a new tool, inherit from CinemachineTool and implement GetIcon(). - /// Your new tool will need to have the [EditorTool("tool-name", typeof(CinemachineVirtualCameraBase))] attribute. - /// - /// A tool will be drawn iff it has been registered using CinemachineSceneToolUtility.RegisterTool. - /// This is generally done in the OnEnable function of the editor script of the cinemachine component - /// (CinemachineVirtualCamera, CinemachineComponentBase), for which the tool was meant. - /// To unregister, call CinemachineSceneToolUtility.UnregisterTool in the same script's OnDisable function. - /// - /// To draw the handles related to the tool, you need to implement your drawing function and call it in the - /// editor script's OnSceneGUI function. An alternative for drawing handles is to override this function's - /// OnToolGUI or OnDrawHandles functions (see EditorTool or IDrawSelectedHandles docs for more information). - /// - /// To check, if a tool has been enabled/disabled in the editor script, use CinemachineSceneToolUtility.IsToolActive. - /// - abstract class CinemachineTool : EditorTool, IDrawSelectedHandles - { - GUIContent m_IconContent; - - /// Implement this to set your Tool's icon and tooltip. - /// A GUIContent with an icon set. - protected abstract GUIContent GetIcon(); - - /// This lets the editor find the icon of the tool. - public override GUIContent toolbarIcon - { - get - { - if (m_IconContent == null || m_State.refreshIcon) - { - m_IconContent = GetIcon(); - m_State.refreshIcon = false; - } - return m_IconContent; - } - } - - /// This is called when the Tool is selected in the editor. - public override void OnActivated() - { - base.OnActivated(); - CinemachineSceneToolUtility.SetTool(true, GetType()); - m_State.refreshIcon = true; - m_State.isSelected = true; - } - - /// This is called when the Tool is deselected in the editor. - public override void OnWillBeDeactivated() - { - base.OnWillBeDeactivated(); - CinemachineSceneToolUtility.SetTool(false, GetType()); - m_State.refreshIcon = true; - m_State.isSelected = false; - } - - /// This checks whether this tool should be displayed or not. - /// True, when this tool is to be drawn. False, otherwise. - public override bool IsAvailable() => CinemachineSceneToolUtility.IsToolRequired(GetType()); - - /// Implement IDrawSelectedHandles to draw gizmos for this tool even if it is not the active tool. - public void OnDrawHandles() - { - } - - /// Get the path to the tool's icon asset. - /// The path to the icon asset. - private protected string GetIconPath() - { - m_State.refreshIcon = m_State.isProSkin != EditorGUIUtility.isProSkin; - m_State.isProSkin = EditorGUIUtility.isProSkin; - return $"{CinemachineSceneToolHelpers.IconPath}/"; - } - - struct ToolState - { - public bool isSelected; - public bool isProSkin; - public bool refreshIcon; - } - ToolState m_State = new() { refreshIcon = true }; - } - - [EditorTool("Field of View Tool", typeof(CinemachineVirtualCameraBase))] - class FoVTool : CinemachineTool - { - protected override GUIContent GetIcon() => - new GUIContent - { - image = AssetDatabase.LoadAssetAtPath(GetIconPath() + "FOV.png"), - tooltip = "Field of View Tool", - }; - } - - [EditorTool("Far-Near Clip Tool", typeof(CinemachineVirtualCameraBase))] - class FarNearClipTool : CinemachineTool - { - protected override GUIContent GetIcon() => - new GUIContent - { - image = AssetDatabase.LoadAssetAtPath(GetIconPath() + "FarNearClip.png"), - tooltip = "Far/Near Clip Tool", - }; - } - - [EditorTool("Follow Offset Tool", typeof(CinemachineVirtualCameraBase))] - class FollowOffsetTool : CinemachineTool - { - protected override GUIContent GetIcon() => - new GUIContent - { - image = AssetDatabase.LoadAssetAtPath(GetIconPath() + "FollowOffset.png"), - tooltip = "Follow Offset Tool", - }; - } - - [EditorTool("Tracked Object Offset Tool", typeof(CinemachineVirtualCameraBase))] - class TrackedObjectOffsetTool : CinemachineTool - { - protected override GUIContent GetIcon() => - new GUIContent - { - image = AssetDatabase.LoadAssetAtPath(GetIconPath() + "TrackedObjectOffset.png"), - tooltip = "Tracked Object Offset Tool", - }; - } - -#if false // We disable this tool window, because it has only one thing in it, which isn't so useful and is a bit confusing tbh - /// - /// To add your custom tools (EditorToolbarElement) to the Cinemachine Tool Settings toolbar, - /// set CinemachineToolSettingsOverlay.customToolbarItems with your custom tools' IDs. - /// - /// By default, CinemachineToolSettingsOverlay.customToolbarItems is null. - /// - [Overlay(typeof(SceneView), "Cinemachine Tool Settings")] - [Icon(CinemachineCore.kPackageRoot + "/Editor/EditorResources/Icons/CmCamera@256.png")] - class CinemachineToolSettingsOverlay : Overlay, ICreateToolbar - { - static readonly string[] k_CmToolbarItems = { OrbitalFollowOrbitSelection.id }; - - /// - /// Override this method to return your visual element content. - /// By default, this draws the same visual element as the HorizontalToolbar - /// - /// VisualElement for the Panel content. - public override VisualElement CreatePanelContent() => CreateContent(Layout.HorizontalToolbar); - - /// Set this with your custom tools' IDs. - public static string[] customToolbarItems = null; - - /// The list of tools that this toolbar is going to contain. - public IEnumerable toolbarElements - { - get - { - if (customToolbarItems != null) - { - var toolbarItems = new List(k_CmToolbarItems); - toolbarItems.AddRange(customToolbarItems); - return toolbarItems; - } - - return k_CmToolbarItems; - } - } - } - - [EditorToolbarElement(id, typeof(SceneView))] - class OrbitalFollowOrbitSelection : EditorToolbarDropdown - { - public const string id = "OrbitalFollowOrbitSelection/Dropdown"; - static int s_SelectedOrbit; - Texture2D[] m_Icons; - - public OrbitalFollowOrbitSelection() - { - tooltip = "OrbitalFollow Orbit Selection"; - clicked += OrbitalFollowOrbitSelectionMenu; - EditorApplication.update += DisplayAndUpdateOrbitIfRequired; - - m_Icons = new Texture2D[] - { - AssetDatabase.LoadAssetAtPath($"{CinemachineCore.kPackageRoot}/Editor/EditorResources/Handles/FreelookRigTop.png"), - AssetDatabase.LoadAssetAtPath($"{CinemachineCore.kPackageRoot}/Editor/EditorResources/Handles/FreelookRigMiddle.png"), - AssetDatabase.LoadAssetAtPath($"{CinemachineCore.kPackageRoot}/Editor/EditorResources/Handles/FreelookRigBottom.png"), - }; - } - - ~OrbitalFollowOrbitSelection() - { - clicked -= OrbitalFollowOrbitSelectionMenu; - EditorApplication.update -= DisplayAndUpdateOrbitIfRequired; - } - - readonly Type m_OrbitalFollowSelectionType = typeof(OrbitalFollowOrbitSelection); - void DisplayAndUpdateOrbitIfRequired() - { - var active = Selection.activeObject as GameObject; - if (active != null) - { - if (active.TryGetComponent(out var orbitalFollow) - && CinemachineSceneToolUtility.IsToolRequired(m_OrbitalFollowSelectionType) - && orbitalFollow.OrbitStyle == CinemachineOrbitalFollow.OrbitStyles.ThreeRing) - { - style.display = DisplayStyle.Flex; // display menu - - var verticalAxis = orbitalFollow.VerticalAxis; - var centerToleranceRange = Mathf.Min(Mathf.Abs(verticalAxis.Range.x - verticalAxis.Center), - Mathf.Abs(verticalAxis.Range.y - verticalAxis.Center)) / 2f; - s_SelectedOrbit = (Math.Abs(verticalAxis.Value - verticalAxis.Center) < centerToleranceRange) - ? 1 - : (verticalAxis.Value > verticalAxis.Center ? 0 : 2); - - text = CinemachineOrbitalFollowEditor.orbitNames[s_SelectedOrbit].text; - icon = m_Icons[s_SelectedOrbit]; - - return; - } - } - style.display = DisplayStyle.None; // hide menu - } - - void OrbitalFollowOrbitSelectionMenu() - { - var menu = new GenericMenu(); - for (var i = 0; i < CinemachineOrbitalFollowEditor.orbitNames.Length; ++i) - { - var rigIndex = i; // need to capture index for the lambda below - menu.AddItem(CinemachineOrbitalFollowEditor.orbitNames[i], false, () => - { - s_SelectedOrbit = rigIndex; - var active = Selection.activeObject as GameObject; - if (active != null) - { - if (active.TryGetComponent(out var orbitalFollow)) - { - orbitalFollow.VerticalAxis.Value = s_SelectedOrbit switch - { - 0 => orbitalFollow.VerticalAxis.Range.y, - 2 => orbitalFollow.VerticalAxis.Range.x, - _ => orbitalFollow.VerticalAxis.Center - }; - } - } - }); - } - menu.DropDown(worldBound); - } - } -#endif -} diff --git a/com.unity.cinemachine/Editor/Utility/CinemachineToolbarOverlay.cs.meta b/com.unity.cinemachine/Editor/Utility/CinemachineToolbarOverlay.cs.meta deleted file mode 100644 index ef9e8cc5e..000000000 --- a/com.unity.cinemachine/Editor/Utility/CinemachineToolbarOverlay.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fdfe64f027e0b40ffa59a87a23ac5eeb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: From 7ff2e2c0d8ecb1e2374ce200d1fc633ce33f02ac Mon Sep 17 00:00:00 2001 From: Gregory Labute Date: Thu, 30 May 2024 10:58:33 -0400 Subject: [PATCH 3/7] Re-add deleted class as obsolete --- .../Editor/Obsolete/CinemachineTool.cs | 32 +++++++++++++++++++ .../Editor/Obsolete/CinemachineTool.cs.meta | 11 +++++++ 2 files changed, 43 insertions(+) create mode 100644 com.unity.cinemachine/Editor/Obsolete/CinemachineTool.cs create mode 100644 com.unity.cinemachine/Editor/Obsolete/CinemachineTool.cs.meta diff --git a/com.unity.cinemachine/Editor/Obsolete/CinemachineTool.cs b/com.unity.cinemachine/Editor/Obsolete/CinemachineTool.cs new file mode 100644 index 000000000..ddbe36b25 --- /dev/null +++ b/com.unity.cinemachine/Editor/Obsolete/CinemachineTool.cs @@ -0,0 +1,32 @@ +#if !CINEMACHINE_NO_CM2_SUPPORT +using UnityEngine; +using System; +using UnityEditor.EditorTools; + +namespace Unity.Cinemachine.Editor +{ + [Obsolete("This class is no longer used.")] + public abstract class CinemachineTool : EditorTool, IDrawSelectedHandles + { + /// Implement this to set your Tool's icon and tooltip. + /// A GUIContent with an icon set. + protected abstract GUIContent GetIcon(); + + /// This lets the editor find the icon of the tool. + public override GUIContent toolbarIcon => null; + + /// This is called when the Tool is selected in the editor. + public override void OnActivated() => base.OnActivated(); + + /// This is called when the Tool is deselected in the editor. + public override void OnWillBeDeactivated() => base.OnWillBeDeactivated(); + + /// Implement IDrawSelectedHandles to draw gizmos for this tool even if it is not the active tool. + public void OnDrawHandles() {} + + /// Get the path to the tool's icon asset. + /// The path to the icon asset. + private protected string GetIconPath() => string.Empty; + } +} +#endif diff --git a/com.unity.cinemachine/Editor/Obsolete/CinemachineTool.cs.meta b/com.unity.cinemachine/Editor/Obsolete/CinemachineTool.cs.meta new file mode 100644 index 000000000..575cc82f5 --- /dev/null +++ b/com.unity.cinemachine/Editor/Obsolete/CinemachineTool.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7a5cdb188f8a44c4fba093aad252e18a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From 0da4a2912e875ea13bdd870a745c49b766de95ab Mon Sep 17 00:00:00 2001 From: Antoine Charton Date: Thu, 30 May 2024 14:05:09 -0400 Subject: [PATCH 4/7] Fix install path test --- .../Tests/Editor/ScriptableObjectUtilityTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/com.unity.cinemachine/Tests/Editor/ScriptableObjectUtilityTests.cs b/com.unity.cinemachine/Tests/Editor/ScriptableObjectUtilityTests.cs index 0d8f29479..9e5428c13 100644 --- a/com.unity.cinemachine/Tests/Editor/ScriptableObjectUtilityTests.cs +++ b/com.unity.cinemachine/Tests/Editor/ScriptableObjectUtilityTests.cs @@ -10,7 +10,7 @@ public class ScriptableObjectUtilityTests public void CinemachineInstallPathIsValid() { var pathToCmLogo = Path.Combine(CinemachineCore.kPackageRoot + - "/Editor/EditorResources/Icons/CmCamera@256.png"); + "/Editor/EditorResources/Icons/Dark/CmCamera@256.png"); Assert.That(File.Exists(pathToCmLogo)); } @@ -18,7 +18,7 @@ public void CinemachineInstallPathIsValid() public void CinemachineInstallRelativePathIsValid() { var relativePathToCmLogo = Path.Combine(CinemachineCore.kPackageRoot + - "/Editor/EditorResources/Icons/CmCamera@256.png"); + "/Editor/EditorResources/Icons/Dark/CmCamera@256.png"); var pathToCmLogo = Path.GetFullPath(relativePathToCmLogo); Assert.That(File.Exists(pathToCmLogo)); } From 4656220789e47e820609d3b340f02e58b379d669 Mon Sep 17 00:00:00 2001 From: Antoine Charton Date: Thu, 30 May 2024 15:12:07 -0400 Subject: [PATCH 5/7] Fix documentation failing --- com.unity.cinemachine/Editor/Obsolete/CinemachineTool.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.cinemachine/Editor/Obsolete/CinemachineTool.cs b/com.unity.cinemachine/Editor/Obsolete/CinemachineTool.cs index ddbe36b25..8e0836419 100644 --- a/com.unity.cinemachine/Editor/Obsolete/CinemachineTool.cs +++ b/com.unity.cinemachine/Editor/Obsolete/CinemachineTool.cs @@ -11,7 +11,7 @@ public abstract class CinemachineTool : EditorTool, IDrawSelectedHandles /// Implement this to set your Tool's icon and tooltip. /// A GUIContent with an icon set. protected abstract GUIContent GetIcon(); - + /// This lets the editor find the icon of the tool. public override GUIContent toolbarIcon => null; From 10d4a61b5bc9cb8050d24421e305d1eecf328fb1 Mon Sep 17 00:00:00 2001 From: Antoine Charton Date: Thu, 30 May 2024 15:14:42 -0400 Subject: [PATCH 6/7] Fix class api doc --- com.unity.cinemachine/Editor/Obsolete/CinemachineTool.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/com.unity.cinemachine/Editor/Obsolete/CinemachineTool.cs b/com.unity.cinemachine/Editor/Obsolete/CinemachineTool.cs index 8e0836419..788f370df 100644 --- a/com.unity.cinemachine/Editor/Obsolete/CinemachineTool.cs +++ b/com.unity.cinemachine/Editor/Obsolete/CinemachineTool.cs @@ -5,6 +5,9 @@ namespace Unity.Cinemachine.Editor { + /// + /// This is a generic Tool class for Cinemachine tools. + /// [Obsolete("This class is no longer used.")] public abstract class CinemachineTool : EditorTool, IDrawSelectedHandles { From 3c04541781d13eee7aa4fb4d0e38eeb7536e5079 Mon Sep 17 00:00:00 2001 From: Gregory Labute Date: Thu, 30 May 2024 15:18:09 -0400 Subject: [PATCH 7/7] Update CinemachineTool.cs --- com.unity.cinemachine/Editor/Obsolete/CinemachineTool.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/com.unity.cinemachine/Editor/Obsolete/CinemachineTool.cs b/com.unity.cinemachine/Editor/Obsolete/CinemachineTool.cs index 788f370df..3b20850a6 100644 --- a/com.unity.cinemachine/Editor/Obsolete/CinemachineTool.cs +++ b/com.unity.cinemachine/Editor/Obsolete/CinemachineTool.cs @@ -6,7 +6,7 @@ namespace Unity.Cinemachine.Editor { /// - /// This is a generic Tool class for Cinemachine tools. + /// This was a base class for Cinemachine tools, but is not longer used. /// [Obsolete("This class is no longer used.")] public abstract class CinemachineTool : EditorTool, IDrawSelectedHandles