diff --git a/Assembly-CSharp-Editor.csproj b/Assembly-CSharp-Editor.csproj index e46d724b..b9d5e509 100644 --- a/Assembly-CSharp-Editor.csproj +++ b/Assembly-CSharp-Editor.csproj @@ -2,7 +2,7 @@ latest - C:\Program Files\Unity\Hub\Editor\2019.3.8f1\Editor\Data\Tools\RoslynScripts + E:\area de Trabalho\Unity\2019.3.8f1\Editor\Data\Tools\RoslynScripts unity_csc.bat @@ -48,10 +48,10 @@ - C:\Program Files\Unity\Hub\Editor\2019.3.8f1\Editor\Data\Managed/UnityEngine/UnityEngine.dll + E:\area de Trabalho\Unity\2019.3.8f1\Editor\Data\Managed/UnityEngine/UnityEngine.dll - C:\Program Files\Unity\Hub\Editor\2019.3.8f1\Editor\Data\Managed/UnityEditor.dll + E:\area de Trabalho\Unity\2019.3.8f1\Editor\Data\Managed/UnityEditor.dll @@ -64,607 +64,610 @@ - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/UnityEditor.TestRunner.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/UnityEditor.TestRunner.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/UnityEngine.TestRunner.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/UnityEngine.TestRunner.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/Unity.Timeline.Editor.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/Unity.Timeline.Editor.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/UnityEditor.CacheServer.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/UnityEditor.CacheServer.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/Unity.ScriptableBuildPipeline.Editor.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/Unity.ScriptableBuildPipeline.Editor.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/Unity.VSCode.Editor.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/Unity.VSCode.Editor.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/Unity.ResourceManager.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/Unity.ResourceManager.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/UnityEngine.UI.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/UnityEngine.UI.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/Unity.Timeline.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/Unity.Timeline.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/Unity.Addressables.Editor.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/Unity.Addressables.Editor.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/Unity.CollabProxy.Editor.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/Unity.CollabProxy.Editor.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/Unity.Rider.Editor.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/Unity.Rider.Editor.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/Unity.Addressables.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/Unity.Addressables.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/Unity.ScriptableBuildPipeline.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/Unity.ScriptableBuildPipeline.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/Unity.TextMeshPro.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/Unity.TextMeshPro.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/UnityEditor.UI.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/UnityEditor.UI.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AIModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AIModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ARModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ARModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AccessibilityModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AccessibilityModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AndroidJNIModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AndroidJNIModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AnimationModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AnimationModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AssetBundleModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AssetBundleModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AudioModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AudioModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClothModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClothModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterInputModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterInputModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.CoreModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.CoreModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.CrashReportingModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.CrashReportingModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.DSPGraphModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.DSPGraphModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.DirectorModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.DirectorModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.GameCenterModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.GameCenterModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.GridModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.GridModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.HotReloadModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.HotReloadModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.IMGUIModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.IMGUIModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ImageConversionModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ImageConversionModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.InputModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.InputModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.InputLegacyModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.InputLegacyModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.LocalizationModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.LocalizationModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.PhysicsModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.PhysicsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.Physics2DModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.Physics2DModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ProfilerModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ProfilerModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.StreamingModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.StreamingModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SubstanceModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SubstanceModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SubsystemsModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SubsystemsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TLSModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TLSModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TextCoreModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TextCoreModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TextRenderingModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TextRenderingModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TilemapModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TilemapModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UIModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UIModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UIElementsModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UIElementsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UNETModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UNETModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UmbraModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UmbraModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityConnectModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityConnectModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityTestProtocolModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityTestProtocolModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAssetBundleModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAssetBundleModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VFXModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VFXModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VRModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VRModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VehiclesModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VehiclesModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VideoModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VideoModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.WindModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.WindModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.XRModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.XRModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/UnityExtensions/Unity/UnityVR/Editor/UnityEditor.VR.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/UnityExtensions/Unity/UnityVR/Editor/UnityEditor.VR.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEditor.Graphs.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEditor.Graphs.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/PlaybackEngines/WindowsStandaloneSupport/UnityEditor.WindowsStandalone.Extensions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/PlaybackEngines/WindowsStandaloneSupport/UnityEditor.WindowsStandalone.Extensions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/PlaybackEngines/WebGLSupport/UnityEditor.WebGL.Extensions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/PlaybackEngines/WebGLSupport/UnityEditor.WebGL.Extensions.dll + + + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/PlaybackEngines/AndroidPlayer/UnityEditor.Android.Extensions.dll - E:/GIT/ZOE/ZoeAppClass/Assets/AstarPathfindingProject/Plugins/DotNetZip/Pathfinding.Ionic.Zip.Reduced.dll + E:/Zoe/teste/ZoeAppClass/Assets/AstarPathfindingProject/Plugins/DotNetZip/Pathfinding.Ionic.Zip.Reduced.dll - E:/GIT/ZOE/ZoeAppClass/Assets/Plugins/Newtonsoft.Json.dll + E:/Zoe/teste/ZoeAppClass/Assets/Plugins/Newtonsoft.Json.dll - E:/GIT/ZOE/ZoeAppClass/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.dll + E:/Zoe/teste/ZoeAppClass/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/mscorlib.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/mscorlib.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Core.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Core.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Runtime.Serialization.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Runtime.Serialization.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Xml.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Xml.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Xml.Linq.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Xml.Linq.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Numerics.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Numerics.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Numerics.Vectors.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Numerics.Vectors.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Net.Http.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Net.Http.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Microsoft.CSharp.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Microsoft.CSharp.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Data.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Data.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/Microsoft.Win32.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/Microsoft.Win32.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/netstandard.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/netstandard.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.AppContext.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.AppContext.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.Concurrent.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.Concurrent.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.NonGeneric.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.NonGeneric.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.Specialized.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.Specialized.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.Annotations.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.Annotations.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.EventBasedAsync.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.EventBasedAsync.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.TypeConverter.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.TypeConverter.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Console.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Console.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Data.Common.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Data.Common.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Contracts.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Contracts.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Debug.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Debug.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.FileVersionInfo.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.FileVersionInfo.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Process.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Process.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.StackTrace.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.StackTrace.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.TextWriterTraceListener.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.TextWriterTraceListener.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Tools.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Tools.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.TraceSource.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.TraceSource.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Drawing.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Drawing.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Dynamic.Runtime.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Dynamic.Runtime.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.Calendars.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.Calendars.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.Extensions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.Extensions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.Compression.ZipFile.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.Compression.ZipFile.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.DriveInfo.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.DriveInfo.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.Watcher.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.Watcher.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.IsolatedStorage.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.IsolatedStorage.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.MemoryMappedFiles.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.MemoryMappedFiles.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.Pipes.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.Pipes.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.UnmanagedMemoryStream.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.UnmanagedMemoryStream.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Expressions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Expressions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Parallel.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Parallel.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Queryable.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Queryable.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Http.Rtc.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Http.Rtc.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.NameResolution.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.NameResolution.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.NetworkInformation.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.NetworkInformation.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Ping.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Ping.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Requests.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Requests.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Security.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Security.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Sockets.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Sockets.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebHeaderCollection.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebHeaderCollection.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebSockets.Client.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebSockets.Client.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebSockets.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebSockets.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ObjectModel.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ObjectModel.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.ILGeneration.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.ILGeneration.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.Lightweight.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.Lightweight.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Extensions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Extensions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.Reader.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.Reader.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.ResourceManager.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.ResourceManager.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.Writer.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.Writer.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.CompilerServices.VisualC.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.CompilerServices.VisualC.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Extensions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Extensions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Handles.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Handles.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.RuntimeInformation.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.RuntimeInformation.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.WindowsRuntime.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.WindowsRuntime.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Numerics.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Numerics.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Formatters.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Formatters.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Json.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Json.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Xml.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Xml.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Claims.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Claims.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Algorithms.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Algorithms.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Csp.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Csp.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Encoding.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Encoding.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.X509Certificates.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.X509Certificates.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Principal.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Principal.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.SecureString.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.SecureString.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Duplex.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Duplex.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Http.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Http.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.NetTcp.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.NetTcp.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Security.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Security.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.Encoding.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.Encoding.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.Encoding.Extensions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.Encoding.Extensions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.RegularExpressions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.RegularExpressions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Overlapped.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Overlapped.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Tasks.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Tasks.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Tasks.Parallel.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Tasks.Parallel.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Thread.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Thread.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.ThreadPool.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.ThreadPool.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Timer.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Timer.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ValueTuple.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ValueTuple.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.ReaderWriter.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.ReaderWriter.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XDocument.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XDocument.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XmlDocument.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XmlDocument.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XmlSerializer.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XmlSerializer.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XPath.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XPath.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XPath.XDocument.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XPath.XDocument.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/UnityScript.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/UnityScript.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/UnityScript.Lang.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/UnityScript.Lang.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/Boo.Lang.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/Boo.Lang.dll diff --git a/Assembly-CSharp.csproj b/Assembly-CSharp.csproj index 9f660725..016e10b3 100644 --- a/Assembly-CSharp.csproj +++ b/Assembly-CSharp.csproj @@ -2,7 +2,7 @@ latest - C:\Program Files\Unity\Hub\Editor\2019.3.8f1\Editor\Data\Tools\RoslynScripts + E:\area de Trabalho\Unity\2019.3.8f1\Editor\Data\Tools\RoslynScripts unity_csc.bat @@ -48,10 +48,10 @@ - C:\Program Files\Unity\Hub\Editor\2019.3.8f1\Editor\Data\Managed/UnityEngine/UnityEngine.dll + E:\area de Trabalho\Unity\2019.3.8f1\Editor\Data\Managed/UnityEngine/UnityEngine.dll - C:\Program Files\Unity\Hub\Editor\2019.3.8f1\Editor\Data\Managed/UnityEditor.dll + E:\area de Trabalho\Unity\2019.3.8f1\Editor\Data\Managed/UnityEditor.dll @@ -404,586 +404,586 @@ - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/Unity.Timeline.Editor.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/Unity.Timeline.Editor.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/UnityEditor.CacheServer.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/UnityEditor.CacheServer.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/Unity.ScriptableBuildPipeline.Editor.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/Unity.ScriptableBuildPipeline.Editor.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/Unity.VSCode.Editor.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/Unity.VSCode.Editor.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/Unity.ResourceManager.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/Unity.ResourceManager.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/UnityEngine.UI.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/UnityEngine.UI.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/Unity.Timeline.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/Unity.Timeline.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/Unity.Addressables.Editor.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/Unity.Addressables.Editor.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/Unity.CollabProxy.Editor.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/Unity.CollabProxy.Editor.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/Unity.Rider.Editor.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/Unity.Rider.Editor.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/Unity.Addressables.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/Unity.Addressables.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/Unity.ScriptableBuildPipeline.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/Unity.ScriptableBuildPipeline.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/Unity.TextMeshPro.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/Unity.TextMeshPro.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/UnityEditor.UI.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/UnityEditor.UI.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AIModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AIModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ARModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ARModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AccessibilityModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AccessibilityModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AndroidJNIModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AndroidJNIModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AnimationModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AnimationModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AssetBundleModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AssetBundleModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AudioModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AudioModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClothModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClothModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterInputModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterInputModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.CoreModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.CoreModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.CrashReportingModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.CrashReportingModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.DSPGraphModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.DSPGraphModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.DirectorModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.DirectorModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.GameCenterModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.GameCenterModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.GridModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.GridModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.HotReloadModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.HotReloadModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.IMGUIModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.IMGUIModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ImageConversionModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ImageConversionModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.InputModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.InputModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.InputLegacyModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.InputLegacyModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.LocalizationModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.LocalizationModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.PhysicsModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.PhysicsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.Physics2DModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.Physics2DModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ProfilerModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ProfilerModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.StreamingModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.StreamingModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SubstanceModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SubstanceModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SubsystemsModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SubsystemsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TLSModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TLSModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TextCoreModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TextCoreModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TextRenderingModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TextRenderingModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TilemapModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TilemapModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UIModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UIModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UIElementsModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UIElementsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UNETModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UNETModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UmbraModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UmbraModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityConnectModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityConnectModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityTestProtocolModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityTestProtocolModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAssetBundleModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAssetBundleModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VFXModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VFXModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VRModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VRModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VehiclesModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VehiclesModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VideoModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VideoModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.WindModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.WindModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.XRModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.XRModule.dll - E:/GIT/ZOE/ZoeAppClass/Assets/AstarPathfindingProject/Plugins/DotNetZip/Pathfinding.Ionic.Zip.Reduced.dll + E:/Zoe/teste/ZoeAppClass/Assets/AstarPathfindingProject/Plugins/DotNetZip/Pathfinding.Ionic.Zip.Reduced.dll - E:/GIT/ZOE/ZoeAppClass/Assets/Plugins/Newtonsoft.Json.dll + E:/Zoe/teste/ZoeAppClass/Assets/Plugins/Newtonsoft.Json.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/mscorlib.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/mscorlib.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Core.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Core.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Runtime.Serialization.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Runtime.Serialization.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Xml.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Xml.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Xml.Linq.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Xml.Linq.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Numerics.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Numerics.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Numerics.Vectors.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Numerics.Vectors.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Net.Http.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Net.Http.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Microsoft.CSharp.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Microsoft.CSharp.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Data.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Data.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/Microsoft.Win32.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/Microsoft.Win32.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/netstandard.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/netstandard.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.AppContext.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.AppContext.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.Concurrent.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.Concurrent.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.NonGeneric.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.NonGeneric.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.Specialized.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.Specialized.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.Annotations.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.Annotations.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.EventBasedAsync.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.EventBasedAsync.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.TypeConverter.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.TypeConverter.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Console.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Console.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Data.Common.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Data.Common.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Contracts.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Contracts.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Debug.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Debug.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.FileVersionInfo.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.FileVersionInfo.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Process.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Process.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.StackTrace.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.StackTrace.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.TextWriterTraceListener.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.TextWriterTraceListener.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Tools.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Tools.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.TraceSource.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.TraceSource.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Drawing.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Drawing.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Dynamic.Runtime.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Dynamic.Runtime.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.Calendars.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.Calendars.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.Extensions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.Extensions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.Compression.ZipFile.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.Compression.ZipFile.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.DriveInfo.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.DriveInfo.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.Watcher.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.Watcher.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.IsolatedStorage.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.IsolatedStorage.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.MemoryMappedFiles.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.MemoryMappedFiles.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.Pipes.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.Pipes.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.UnmanagedMemoryStream.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.UnmanagedMemoryStream.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Expressions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Expressions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Parallel.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Parallel.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Queryable.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Queryable.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Http.Rtc.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Http.Rtc.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.NameResolution.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.NameResolution.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.NetworkInformation.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.NetworkInformation.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Ping.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Ping.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Requests.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Requests.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Security.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Security.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Sockets.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Sockets.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebHeaderCollection.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebHeaderCollection.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebSockets.Client.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebSockets.Client.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebSockets.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebSockets.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ObjectModel.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ObjectModel.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.ILGeneration.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.ILGeneration.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.Lightweight.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.Lightweight.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Extensions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Extensions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.Reader.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.Reader.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.ResourceManager.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.ResourceManager.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.Writer.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.Writer.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.CompilerServices.VisualC.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.CompilerServices.VisualC.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Extensions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Extensions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Handles.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Handles.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.RuntimeInformation.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.RuntimeInformation.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.WindowsRuntime.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.WindowsRuntime.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Numerics.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Numerics.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Formatters.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Formatters.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Json.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Json.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Xml.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Xml.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Claims.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Claims.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Algorithms.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Algorithms.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Csp.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Csp.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Encoding.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Encoding.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.X509Certificates.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.X509Certificates.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Principal.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Principal.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.SecureString.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.SecureString.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Duplex.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Duplex.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Http.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Http.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.NetTcp.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.NetTcp.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Security.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Security.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.Encoding.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.Encoding.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.Encoding.Extensions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.Encoding.Extensions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.RegularExpressions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.RegularExpressions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Overlapped.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Overlapped.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Tasks.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Tasks.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Tasks.Parallel.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Tasks.Parallel.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Thread.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Thread.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.ThreadPool.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.ThreadPool.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Timer.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Timer.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ValueTuple.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ValueTuple.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.ReaderWriter.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.ReaderWriter.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XDocument.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XDocument.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XmlDocument.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XmlDocument.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XmlSerializer.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XmlSerializer.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XPath.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XPath.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XPath.XDocument.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XPath.XDocument.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/UnityScript.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/UnityScript.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/UnityScript.Lang.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/UnityScript.Lang.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/Boo.Lang.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/Boo.Lang.dll diff --git a/Assets/AddressableAssetsData/Android/addressables_content_state.bin b/Assets/AddressableAssetsData/Android/addressables_content_state.bin index f9b9301b..2647273e 100644 Binary files a/Assets/AddressableAssetsData/Android/addressables_content_state.bin and b/Assets/AddressableAssetsData/Android/addressables_content_state.bin differ diff --git a/Assets/AddressableAssetsData/AssetGroups/RemoteGames.asset b/Assets/AddressableAssetsData/AssetGroups/RemoteGames.asset index 7ff6a4f8..9858ae12 100644 --- a/Assets/AddressableAssetsData/AssetGroups/RemoteGames.asset +++ b/Assets/AddressableAssetsData/AssetGroups/RemoteGames.asset @@ -245,7 +245,8 @@ MonoBehaviour: - m_GUID: 1325d9c9e4fee9f4caf1739b11a0633e m_Address: Games/M4/L6/001/Info m_ReadOnly: 0 - m_SerializedLabels: [] + m_SerializedLabels: + - games - m_GUID: 133c87c3c7f61b847aed24e0128175f7 m_Address: Games/Kids/PREFEITURA/EF/B1/L7/Game m_ReadOnly: 0 @@ -401,6 +402,11 @@ MonoBehaviour: m_ReadOnly: 0 m_SerializedLabels: - games + - m_GUID: 1f51c230298a11a439665164fec7692c + m_Address: Games/M5/L8/001/Game + m_ReadOnly: 0 + m_SerializedLabels: + - games - m_GUID: 207ac63de1d254f4d9136236fe233746 m_Address: Games/Kids/PREFEITURA/EF/B1/L1/Info m_ReadOnly: 0 @@ -676,6 +682,11 @@ MonoBehaviour: m_ReadOnly: 0 m_SerializedLabels: - games + - m_GUID: 33cc23fffe44c7744a422720e2885b15 + m_Address: Games/M5/L1/001/Game + m_ReadOnly: 0 + m_SerializedLabels: + - games - m_GUID: 33e35e5acdaddbf4bac12ae629410f17 m_Address: Games/M3/L13/004/Info m_ReadOnly: 0 @@ -981,6 +992,11 @@ MonoBehaviour: m_ReadOnly: 0 m_SerializedLabels: - games + - m_GUID: 4e4aff77acad4c340a40873ae9d94fe6 + m_Address: Games/M5/L7/001/Game + m_ReadOnly: 0 + m_SerializedLabels: + - games - m_GUID: 4f33e59f0d00b614a97d293327f7b5e9 m_Address: Games/M4/L4/001/Game m_ReadOnly: 0 @@ -1431,6 +1447,11 @@ MonoBehaviour: m_ReadOnly: 0 m_SerializedLabels: - games + - m_GUID: 7220be3592be05f42a0e3d518922e82b + m_Address: Games/M5/L5/002/Game + m_ReadOnly: 0 + m_SerializedLabels: + - games - m_GUID: 7298e87c8901be147be37803d1d1281b m_Address: Games/Lesson6/001/Game m_ReadOnly: 0 @@ -1454,7 +1475,8 @@ MonoBehaviour: - m_GUID: 74271d6c8732fb94cb60248e23f1eac8 m_Address: Games/M4/L6/001/Game m_ReadOnly: 0 - m_SerializedLabels: [] + m_SerializedLabels: + - games - m_GUID: 749e7a54ddb3756419c6bac1c0700151 m_Address: Games/M2/L10/001/Game m_ReadOnly: 0 @@ -1480,6 +1502,11 @@ MonoBehaviour: m_ReadOnly: 0 m_SerializedLabels: - games + - m_GUID: 75f0d475d24063f43a96d0bfd3ad7868 + m_Address: Games/M5/L8/002/Game + m_ReadOnly: 0 + m_SerializedLabels: + - games - m_GUID: 76c6d570fba8da343849a89dddabe932 m_Address: Games/M3/L15/005/Game m_ReadOnly: 0 diff --git a/Assets/RemoteResources/Games/M5/TESTE/001.meta b/Assets/RemoteResources/Games/M5/TESTE/001.meta deleted file mode 100644 index aaea9c8a..00000000 --- a/Assets/RemoteResources/Games/M5/TESTE/001.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c2c2fc13b5e12fa41885eec912bc4fb1 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scenes/Teste.unity b/Assets/Scenes/Teste.unity index db3870cf..4f0541d1 100644 --- a/Assets/Scenes/Teste.unity +++ b/Assets/Scenes/Teste.unity @@ -121,297 +121,3 @@ NavMeshSettings: debug: m_Flags: 0 m_NavMeshData: {fileID: 0} ---- !u!1001 &1322168687 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 0} - m_Modifications: - - target: {fileID: 1183153197497839751, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197497839751, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197497839751, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197497839751, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197528105060, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197528105060, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197528105060, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197528105060, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197541656595, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197541656595, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197541656595, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197589611976, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197589611976, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197589611976, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197589611976, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197656342392, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197656342392, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197656342392, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197656342392, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197937844454, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_LocalPosition.x - value: 34.40068 - objectReference: {fileID: 0} - - target: {fileID: 1183153197937844454, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_LocalPosition.y - value: 198.20085 - objectReference: {fileID: 0} - - target: {fileID: 1183153197937844454, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_LocalPosition.z - value: -225.97066 - objectReference: {fileID: 0} - - target: {fileID: 1183153197937844454, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197937844454, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197937844454, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197937844454, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 1183153197937844454, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_RootOrder - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197937844454, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197937844454, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197937844454, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153197937844455, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_Name - value: Game - objectReference: {fileID: 0} - - target: {fileID: 1183153198409181204, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153198409181204, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153198409181204, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153198409181204, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153198409181204, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153198409181204, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153198447002943, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153198447002943, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153198447002943, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153198447002943, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153198520103669, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153198524887307, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153198524887307, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153198524887307, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153198524887307, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153198524887307, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153199112226573, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153199112226573, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153199112226573, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153199112226573, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153199112226573, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153199112226573, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153199266324015, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153199266324015, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153199266324015, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 1183153199266324015, guid: 1f51c230298a11a439665164fec7692c, - type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 1f51c230298a11a439665164fec7692c, type: 3} diff --git a/Assets/StreamingAssets.meta b/Assets/StreamingAssets.meta deleted file mode 100644 index 01557531..00000000 --- a/Assets/StreamingAssets.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e6ee22569b8b3474e9e8479f596388cf -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/AstarPathfindingProject.csproj b/AstarPathfindingProject.csproj index dc5f81fe..2ef5dfc7 100644 --- a/AstarPathfindingProject.csproj +++ b/AstarPathfindingProject.csproj @@ -2,7 +2,7 @@ latest - C:\Program Files\Unity\Hub\Editor\2019.3.8f1\Editor\Data\Tools\RoslynScripts + E:\area de Trabalho\Unity\2019.3.8f1\Editor\Data\Tools\RoslynScripts unity_csc.bat @@ -48,10 +48,10 @@ - C:\Program Files\Unity\Hub\Editor\2019.3.8f1\Editor\Data\Managed/UnityEngine/UnityEngine.dll + E:\area de Trabalho\Unity\2019.3.8f1\Editor\Data\Managed/UnityEngine/UnityEngine.dll - C:\Program Files\Unity\Hub\Editor\2019.3.8f1\Editor\Data\Managed/UnityEditor.dll + E:\area de Trabalho\Unity\2019.3.8f1\Editor\Data\Managed/UnityEditor.dll @@ -174,550 +174,553 @@ - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/UnityEditor.UI.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/UnityEditor.UI.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/UnityEngine.UI.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/UnityEngine.UI.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AIModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AIModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ARModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ARModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AccessibilityModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AccessibilityModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AndroidJNIModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AndroidJNIModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AnimationModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AnimationModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AssetBundleModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AssetBundleModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AudioModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AudioModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClothModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClothModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterInputModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterInputModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.CoreModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.CoreModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.CrashReportingModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.CrashReportingModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.DSPGraphModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.DSPGraphModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.DirectorModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.DirectorModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.GameCenterModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.GameCenterModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.GridModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.GridModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.HotReloadModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.HotReloadModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.IMGUIModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.IMGUIModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ImageConversionModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ImageConversionModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.InputModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.InputModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.InputLegacyModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.InputLegacyModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.LocalizationModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.LocalizationModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.PhysicsModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.PhysicsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.Physics2DModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.Physics2DModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ProfilerModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ProfilerModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.StreamingModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.StreamingModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SubstanceModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SubstanceModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SubsystemsModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SubsystemsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TLSModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TLSModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TextCoreModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TextCoreModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TextRenderingModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TextRenderingModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TilemapModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TilemapModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UIModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UIModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UIElementsModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UIElementsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UNETModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UNETModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UmbraModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UmbraModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityConnectModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityConnectModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityTestProtocolModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityTestProtocolModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAssetBundleModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAssetBundleModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VFXModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VFXModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VRModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VRModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VehiclesModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VehiclesModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VideoModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VideoModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.WindModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.WindModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.XRModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.XRModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/UnityExtensions/Unity/UnityVR/Editor/UnityEditor.VR.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/UnityExtensions/Unity/UnityVR/Editor/UnityEditor.VR.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEditor.Graphs.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEditor.Graphs.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/PlaybackEngines/WindowsStandaloneSupport/UnityEditor.WindowsStandalone.Extensions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/PlaybackEngines/WindowsStandaloneSupport/UnityEditor.WindowsStandalone.Extensions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/PlaybackEngines/WebGLSupport/UnityEditor.WebGL.Extensions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/PlaybackEngines/WebGLSupport/UnityEditor.WebGL.Extensions.dll + + + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/PlaybackEngines/AndroidPlayer/UnityEditor.Android.Extensions.dll - E:/GIT/ZOE/ZoeAppClass/Assets/AstarPathfindingProject/Plugins/DotNetZip/Pathfinding.Ionic.Zip.Reduced.dll + E:/Zoe/teste/ZoeAppClass/Assets/AstarPathfindingProject/Plugins/DotNetZip/Pathfinding.Ionic.Zip.Reduced.dll - E:/GIT/ZOE/ZoeAppClass/Assets/Plugins/Newtonsoft.Json.dll + E:/Zoe/teste/ZoeAppClass/Assets/Plugins/Newtonsoft.Json.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/ref/2.0.0/netstandard.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/ref/2.0.0/netstandard.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/Microsoft.Win32.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/Microsoft.Win32.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.AppContext.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.AppContext.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Collections.Concurrent.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Collections.Concurrent.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Collections.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Collections.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Collections.NonGeneric.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Collections.NonGeneric.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Collections.Specialized.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Collections.Specialized.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.ComponentModel.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.ComponentModel.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.ComponentModel.EventBasedAsync.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.ComponentModel.EventBasedAsync.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.ComponentModel.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.ComponentModel.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.ComponentModel.TypeConverter.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.ComponentModel.TypeConverter.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Console.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Console.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Data.Common.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Data.Common.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.Contracts.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.Contracts.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.Debug.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.Debug.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.FileVersionInfo.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.FileVersionInfo.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.Process.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.Process.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.StackTrace.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.StackTrace.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.TextWriterTraceListener.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.TextWriterTraceListener.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.Tools.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.Tools.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.TraceSource.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.TraceSource.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.Tracing.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Diagnostics.Tracing.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Drawing.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Drawing.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Dynamic.Runtime.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Dynamic.Runtime.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Globalization.Calendars.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Globalization.Calendars.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Globalization.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Globalization.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Globalization.Extensions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Globalization.Extensions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.Compression.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.Compression.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.Compression.ZipFile.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.Compression.ZipFile.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.FileSystem.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.FileSystem.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.FileSystem.DriveInfo.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.FileSystem.DriveInfo.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.FileSystem.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.FileSystem.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.FileSystem.Watcher.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.FileSystem.Watcher.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.IsolatedStorage.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.IsolatedStorage.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.MemoryMappedFiles.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.MemoryMappedFiles.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.Pipes.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.Pipes.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.UnmanagedMemoryStream.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.IO.UnmanagedMemoryStream.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Linq.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Linq.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Linq.Expressions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Linq.Expressions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Linq.Parallel.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Linq.Parallel.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Linq.Queryable.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Linq.Queryable.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.Http.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.Http.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.NameResolution.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.NameResolution.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.NetworkInformation.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.NetworkInformation.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.Ping.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.Ping.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.Requests.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.Requests.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.Security.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.Security.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.Sockets.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.Sockets.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.WebHeaderCollection.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.WebHeaderCollection.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.WebSockets.Client.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.WebSockets.Client.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.WebSockets.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Net.WebSockets.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.ObjectModel.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.ObjectModel.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Reflection.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Reflection.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Reflection.Extensions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Reflection.Extensions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Reflection.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Reflection.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Resources.Reader.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Resources.Reader.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Resources.ResourceManager.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Resources.ResourceManager.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Resources.Writer.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Resources.Writer.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.CompilerServices.VisualC.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.CompilerServices.VisualC.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.Extensions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.Extensions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.Handles.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.Handles.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.InteropServices.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.InteropServices.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.InteropServices.RuntimeInformation.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.InteropServices.RuntimeInformation.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.Numerics.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.Numerics.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.Serialization.Formatters.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.Serialization.Formatters.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.Serialization.Json.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.Serialization.Json.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.Serialization.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.Serialization.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.Serialization.Xml.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Runtime.Serialization.Xml.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Security.Claims.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Security.Claims.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Security.Cryptography.Algorithms.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Security.Cryptography.Algorithms.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Security.Cryptography.Csp.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Security.Cryptography.Csp.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Security.Cryptography.Encoding.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Security.Cryptography.Encoding.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Security.Cryptography.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Security.Cryptography.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Security.Cryptography.X509Certificates.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Security.Cryptography.X509Certificates.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Security.Principal.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Security.Principal.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Security.SecureString.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Security.SecureString.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Text.Encoding.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Text.Encoding.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Text.Encoding.Extensions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Text.Encoding.Extensions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Text.RegularExpressions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Text.RegularExpressions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Threading.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Threading.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Threading.Overlapped.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Threading.Overlapped.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Threading.Tasks.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Threading.Tasks.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Threading.Tasks.Parallel.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Threading.Tasks.Parallel.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Threading.Thread.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Threading.Thread.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Threading.ThreadPool.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Threading.ThreadPool.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Threading.Timer.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Threading.Timer.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.ValueTuple.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.ValueTuple.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Xml.ReaderWriter.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Xml.ReaderWriter.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Xml.XDocument.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Xml.XDocument.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Xml.XmlDocument.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Xml.XmlDocument.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Xml.XmlSerializer.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Xml.XmlSerializer.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Xml.XPath.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Xml.XPath.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Xml.XPath.XDocument.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netstandard/System.Xml.XPath.XDocument.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/Extensions/2.0.0/System.Numerics.Vectors.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/Extensions/2.0.0/System.Numerics.Vectors.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/Extensions/2.0.0/System.Runtime.InteropServices.WindowsRuntime.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/Extensions/2.0.0/System.Runtime.InteropServices.WindowsRuntime.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/mscorlib.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/mscorlib.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.ComponentModel.Composition.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.ComponentModel.Composition.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Core.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Core.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Data.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Data.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Drawing.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Drawing.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.IO.Compression.FileSystem.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.IO.Compression.FileSystem.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Net.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Net.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Numerics.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Numerics.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Runtime.Serialization.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Runtime.Serialization.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.ServiceModel.Web.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.ServiceModel.Web.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Transactions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Transactions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Web.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Web.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Windows.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Windows.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Xml.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Xml.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Xml.Linq.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Xml.Linq.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Xml.Serialization.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/NetStandard/compat/2.0.0/shims/netfx/System.Xml.Serialization.dll diff --git a/AstarPathfindingProjectEditor.csproj b/AstarPathfindingProjectEditor.csproj index fa4a8ff8..c5aa8308 100644 --- a/AstarPathfindingProjectEditor.csproj +++ b/AstarPathfindingProjectEditor.csproj @@ -2,7 +2,7 @@ latest - C:\Program Files\Unity\Hub\Editor\2019.3.8f1\Editor\Data\Tools\RoslynScripts + E:\area de Trabalho\Unity\2019.3.8f1\Editor\Data\Tools\RoslynScripts unity_csc.bat @@ -48,10 +48,10 @@ - C:\Program Files\Unity\Hub\Editor\2019.3.8f1\Editor\Data\Managed/UnityEngine/UnityEngine.dll + E:\area de Trabalho\Unity\2019.3.8f1\Editor\Data\Managed/UnityEngine/UnityEngine.dll - C:\Program Files\Unity\Hub\Editor\2019.3.8f1\Editor\Data\Managed/UnityEditor.dll + E:\area de Trabalho\Unity\2019.3.8f1\Editor\Data\Managed/UnityEditor.dll @@ -77,568 +77,571 @@ - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/UnityEditor.UI.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/UnityEditor.UI.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/UnityEngine.UI.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/UnityEngine.UI.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/UnityEditor.TestRunner.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/UnityEditor.TestRunner.dll - E:/GIT/ZOE/ZoeAppClass/Library/ScriptAssemblies/UnityEngine.TestRunner.dll + E:/Zoe/teste/ZoeAppClass/Library/ScriptAssemblies/UnityEngine.TestRunner.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AIModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AIModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ARModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ARModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AccessibilityModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AccessibilityModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AndroidJNIModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AndroidJNIModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AnimationModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AnimationModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AssetBundleModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AssetBundleModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AudioModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AudioModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClothModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClothModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterInputModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterInputModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.CoreModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.CoreModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.CrashReportingModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.CrashReportingModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.DSPGraphModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.DSPGraphModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.DirectorModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.DirectorModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.GameCenterModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.GameCenterModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.GridModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.GridModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.HotReloadModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.HotReloadModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.IMGUIModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.IMGUIModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ImageConversionModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ImageConversionModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.InputModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.InputModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.InputLegacyModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.InputLegacyModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.LocalizationModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.LocalizationModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.PhysicsModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.PhysicsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.Physics2DModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.Physics2DModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ProfilerModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ProfilerModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.StreamingModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.StreamingModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SubstanceModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SubstanceModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SubsystemsModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.SubsystemsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TLSModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TLSModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TextCoreModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TextCoreModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TextRenderingModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TextRenderingModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TilemapModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.TilemapModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UIModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UIModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UIElementsModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UIElementsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UNETModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UNETModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UmbraModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UmbraModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityConnectModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityConnectModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityTestProtocolModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityTestProtocolModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAssetBundleModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAssetBundleModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VFXModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VFXModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VRModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VRModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VehiclesModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VehiclesModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VideoModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.VideoModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.WindModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.WindModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.XRModule.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.XRModule.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/UnityExtensions/Unity/UnityVR/Editor/UnityEditor.VR.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/UnityExtensions/Unity/UnityVR/Editor/UnityEditor.VR.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEditor.Graphs.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/Managed/UnityEditor.Graphs.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/PlaybackEngines/WindowsStandaloneSupport/UnityEditor.WindowsStandalone.Extensions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/PlaybackEngines/WindowsStandaloneSupport/UnityEditor.WindowsStandalone.Extensions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/PlaybackEngines/WebGLSupport/UnityEditor.WebGL.Extensions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/PlaybackEngines/WebGLSupport/UnityEditor.WebGL.Extensions.dll + + + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/PlaybackEngines/AndroidPlayer/UnityEditor.Android.Extensions.dll - E:/GIT/ZOE/ZoeAppClass/Assets/AstarPathfindingProject/Plugins/DotNetZip/Pathfinding.Ionic.Zip.Reduced.dll + E:/Zoe/teste/ZoeAppClass/Assets/AstarPathfindingProject/Plugins/DotNetZip/Pathfinding.Ionic.Zip.Reduced.dll - E:/GIT/ZOE/ZoeAppClass/Assets/Plugins/Newtonsoft.Json.dll + E:/Zoe/teste/ZoeAppClass/Assets/Plugins/Newtonsoft.Json.dll - E:/GIT/ZOE/ZoeAppClass/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.dll + E:/Zoe/teste/ZoeAppClass/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/mscorlib.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/mscorlib.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Core.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Core.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Runtime.Serialization.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Runtime.Serialization.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Xml.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Xml.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Xml.Linq.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Xml.Linq.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Numerics.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Numerics.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Numerics.Vectors.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Numerics.Vectors.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Net.Http.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Net.Http.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Microsoft.CSharp.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Microsoft.CSharp.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Data.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/System.Data.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/Microsoft.Win32.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/Microsoft.Win32.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/netstandard.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/netstandard.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.AppContext.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.AppContext.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.Concurrent.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.Concurrent.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.NonGeneric.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.NonGeneric.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.Specialized.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Collections.Specialized.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.Annotations.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.Annotations.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.EventBasedAsync.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.EventBasedAsync.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.TypeConverter.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ComponentModel.TypeConverter.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Console.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Console.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Data.Common.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Data.Common.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Contracts.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Contracts.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Debug.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Debug.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.FileVersionInfo.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.FileVersionInfo.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Process.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Process.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.StackTrace.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.StackTrace.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.TextWriterTraceListener.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.TextWriterTraceListener.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Tools.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.Tools.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.TraceSource.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Diagnostics.TraceSource.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Drawing.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Drawing.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Dynamic.Runtime.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Dynamic.Runtime.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.Calendars.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.Calendars.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.Extensions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Globalization.Extensions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.Compression.ZipFile.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.Compression.ZipFile.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.DriveInfo.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.DriveInfo.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.Watcher.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.FileSystem.Watcher.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.IsolatedStorage.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.IsolatedStorage.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.MemoryMappedFiles.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.MemoryMappedFiles.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.Pipes.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.Pipes.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.UnmanagedMemoryStream.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.IO.UnmanagedMemoryStream.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Expressions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Expressions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Parallel.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Parallel.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Queryable.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Linq.Queryable.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Http.Rtc.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Http.Rtc.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.NameResolution.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.NameResolution.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.NetworkInformation.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.NetworkInformation.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Ping.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Ping.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Requests.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Requests.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Security.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Security.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Sockets.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.Sockets.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebHeaderCollection.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebHeaderCollection.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebSockets.Client.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebSockets.Client.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebSockets.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Net.WebSockets.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ObjectModel.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ObjectModel.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.ILGeneration.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.ILGeneration.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.Lightweight.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Emit.Lightweight.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Extensions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Extensions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Reflection.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.Reader.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.Reader.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.ResourceManager.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.ResourceManager.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.Writer.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Resources.Writer.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.CompilerServices.VisualC.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.CompilerServices.VisualC.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Extensions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Extensions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Handles.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Handles.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.RuntimeInformation.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.RuntimeInformation.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.WindowsRuntime.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.InteropServices.WindowsRuntime.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Numerics.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Numerics.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Formatters.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Formatters.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Json.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Json.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Xml.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Runtime.Serialization.Xml.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Claims.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Claims.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Algorithms.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Algorithms.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Csp.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Csp.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Encoding.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Encoding.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.X509Certificates.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Cryptography.X509Certificates.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Principal.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.Principal.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.SecureString.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Security.SecureString.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Duplex.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Duplex.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Http.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Http.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.NetTcp.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.NetTcp.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Primitives.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Primitives.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Security.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ServiceModel.Security.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.Encoding.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.Encoding.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.Encoding.Extensions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.Encoding.Extensions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.RegularExpressions.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Text.RegularExpressions.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Overlapped.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Overlapped.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Tasks.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Tasks.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Tasks.Parallel.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Tasks.Parallel.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Thread.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Thread.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.ThreadPool.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.ThreadPool.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Timer.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Threading.Timer.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ValueTuple.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.ValueTuple.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.ReaderWriter.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.ReaderWriter.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XDocument.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XDocument.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XmlDocument.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XmlDocument.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XmlSerializer.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XmlSerializer.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XPath.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XPath.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XPath.XDocument.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/4.7.1-api/Facades/System.Xml.XPath.XDocument.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/UnityScript.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/UnityScript.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/UnityScript.Lang.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/UnityScript.Lang.dll - C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/Boo.Lang.dll + E:/area de Trabalho/Unity/2019.3.8f1/Editor/Data/MonoBleedingEdge/lib/mono/unityscript/Boo.Lang.dll diff --git a/Library/AnnotationManager b/Library/AnnotationManager deleted file mode 100644 index cb551663..00000000 Binary files a/Library/AnnotationManager and /dev/null differ diff --git a/Library/ArtifactDB b/Library/ArtifactDB deleted file mode 100644 index 15c9455c..00000000 Binary files a/Library/ArtifactDB and /dev/null differ diff --git a/Library/ArtifactDB-lock b/Library/ArtifactDB-lock deleted file mode 100644 index c0959ae4..00000000 Binary files a/Library/ArtifactDB-lock and /dev/null differ diff --git a/Library/BuildPlayer.prefs b/Library/BuildPlayer.prefs deleted file mode 100644 index e69de29b..00000000 diff --git a/Library/BuildSettings.asset b/Library/BuildSettings.asset deleted file mode 100644 index 9c20560f..00000000 Binary files a/Library/BuildSettings.asset and /dev/null differ diff --git a/Library/CurrentLayout-default.dwlt b/Library/CurrentLayout-default.dwlt deleted file mode 100644 index 29364dc4..00000000 --- a/Library/CurrentLayout-default.dwlt +++ /dev/null @@ -1,1264 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &1 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 1 - m_Script: {fileID: 12004, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_PixelRect: - serializedVersion: 2 - x: 0 - y: 43 - width: 1360 - height: 677 - m_ShowMode: 4 - m_Title: - m_RootView: {fileID: 2} - m_MinSize: {x: 875, y: 300} - m_MaxSize: {x: 10000, y: 10000} - m_Maximized: 1 ---- !u!114 &2 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 1 - m_Script: {fileID: 12008, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_Children: - - {fileID: 3} - - {fileID: 5} - - {fileID: 4} - m_Position: - serializedVersion: 2 - x: 0 - y: 0 - width: 1360 - height: 677 - m_MinSize: {x: 875, y: 300} - m_MaxSize: {x: 10000, y: 10000} ---- !u!114 &3 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 1 - m_Script: {fileID: 12011, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_Children: [] - m_Position: - serializedVersion: 2 - x: 0 - y: 0 - width: 1360 - height: 30 - m_MinSize: {x: 0, y: 0} - m_MaxSize: {x: 0, y: 0} - m_LastLoadedLayoutName: ---- !u!114 &4 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 1 - m_Script: {fileID: 12042, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_Children: [] - m_Position: - serializedVersion: 2 - x: 0 - y: 657 - width: 1360 - height: 20 - m_MinSize: {x: 0, y: 0} - m_MaxSize: {x: 0, y: 0} ---- !u!114 &5 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 1 - m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_Children: - - {fileID: 6} - - {fileID: 11} - m_Position: - serializedVersion: 2 - x: 0 - y: 30 - width: 1360 - height: 627 - m_MinSize: {x: 679, y: 492} - m_MaxSize: {x: 14002, y: 14042} - vertical: 0 - controlID: 95 ---- !u!114 &6 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 1 - m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_Children: - - {fileID: 7} - - {fileID: 10} - m_Position: - serializedVersion: 2 - x: 0 - y: 0 - width: 926 - height: 627 - m_MinSize: {x: 403, y: 492} - m_MaxSize: {x: 10001, y: 14042} - vertical: 1 - controlID: 96 ---- !u!114 &7 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 1 - m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_Children: - - {fileID: 8} - - {fileID: 9} - m_Position: - serializedVersion: 2 - x: 0 - y: 0 - width: 926 - height: 348 - m_MinSize: {x: 403, y: 221} - m_MaxSize: {x: 8003, y: 4021} - vertical: 0 - controlID: 97 ---- !u!114 &8 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 1 - m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_Children: [] - m_Position: - serializedVersion: 2 - x: 0 - y: 0 - width: 280 - height: 348 - m_MinSize: {x: 201, y: 221} - m_MaxSize: {x: 4001, y: 4021} - m_ActualView: {fileID: 13} - m_Panes: - - {fileID: 13} - m_Selected: 0 - m_LastSelected: 0 ---- !u!114 &9 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 1 - m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: GameView - m_EditorClassIdentifier: - m_Children: [] - m_Position: - serializedVersion: 2 - x: 280 - y: 0 - width: 646 - height: 348 - m_MinSize: {x: 202, y: 221} - m_MaxSize: {x: 4002, y: 4021} - m_ActualView: {fileID: 12} - m_Panes: - - {fileID: 14} - - {fileID: 12} - m_Selected: 1 - m_LastSelected: 0 ---- !u!114 &10 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 1 - m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: ProjectBrowser - m_EditorClassIdentifier: - m_Children: [] - m_Position: - serializedVersion: 2 - x: 0 - y: 348 - width: 926 - height: 279 - m_MinSize: {x: 231, y: 271} - m_MaxSize: {x: 10001, y: 10021} - m_ActualView: {fileID: 15} - m_Panes: - - {fileID: 15} - - {fileID: 16} - - {fileID: 17} - - {fileID: 18} - m_Selected: 0 - m_LastSelected: 1 ---- !u!114 &11 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 1 - m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_Children: [] - m_Position: - serializedVersion: 2 - x: 926 - y: 0 - width: 434 - height: 627 - m_MinSize: {x: 276, y: 71} - m_MaxSize: {x: 4001, y: 4021} - m_ActualView: {fileID: 19} - m_Panes: - - {fileID: 19} - m_Selected: 0 - m_LastSelected: 0 ---- !u!114 &12 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 1 - m_Script: {fileID: 12015, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_MinSize: {x: 200, y: 200} - m_MaxSize: {x: 4000, y: 4000} - m_TitleContent: - m_Text: Game - m_Image: {fileID: -2087823869225018852, guid: 0000000000000000d000000000000000, - type: 0} - m_Tooltip: - m_Pos: - serializedVersion: 2 - x: 280 - y: 73 - width: 644 - height: 327 - m_ViewDataDictionary: {fileID: 0} - m_SerializedViewsNames: [] - m_SerializedViewsValues: [] - m_PlayModeViewName: GameView - m_ShowGizmos: 0 - m_TargetDisplay: 0 - m_ClearColor: {r: 0, g: 0, b: 0, a: 0} - m_TargetSize: {x: 544, y: 306} - m_TextureFilterMode: 0 - m_TextureHideFlags: 61 - m_RenderIMGUI: 1 - m_MaximizeOnPlay: 0 - m_VSyncEnabled: 0 - m_Gizmos: 0 - m_Stats: 0 - m_SelectedSizes: 05000000000000000000000002000000000000000000000000000000000000000000000000000000 - m_ZoomArea: - m_HRangeLocked: 0 - m_VRangeLocked: 0 - hZoomLockedByDefault: 0 - vZoomLockedByDefault: 0 - m_HBaseRangeMin: -272 - m_HBaseRangeMax: 272 - m_VBaseRangeMin: -153 - m_VBaseRangeMax: 153 - m_HAllowExceedBaseRangeMin: 1 - m_HAllowExceedBaseRangeMax: 1 - m_VAllowExceedBaseRangeMin: 1 - m_VAllowExceedBaseRangeMax: 1 - m_ScaleWithWindow: 0 - m_HSlider: 0 - m_VSlider: 0 - m_IgnoreScrollWheelUntilClicked: 0 - m_EnableMouseInput: 1 - m_EnableSliderZoomHorizontal: 0 - m_EnableSliderZoomVertical: 0 - m_UniformScale: 1 - m_UpDirection: 1 - m_DrawArea: - serializedVersion: 2 - x: 0 - y: 21 - width: 644 - height: 306 - m_Scale: {x: 1, y: 1} - m_Translation: {x: 322, y: 153} - m_MarginLeft: 0 - m_MarginRight: 0 - m_MarginTop: 0 - m_MarginBottom: 0 - m_LastShownAreaInsideMargins: - serializedVersion: 2 - x: -322 - y: -153 - width: 644 - height: 306 - m_MinimalGUI: 1 - m_defaultScale: 1 - m_LastWindowPixelSize: {x: 644, y: 327} - m_ClearInEditMode: 1 - m_NoCameraWarning: 1 - m_LowResolutionForAspectRatios: 01000001000000000000 - m_XRRenderMode: 0 - m_RenderTexture: {fileID: 0} ---- !u!114 &13 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 1 - m_Script: {fileID: 12061, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_MinSize: {x: 200, y: 200} - m_MaxSize: {x: 4000, y: 4000} - m_TitleContent: - m_Text: Hierarchy - m_Image: {fileID: -590624980919486359, guid: 0000000000000000d000000000000000, - type: 0} - m_Tooltip: - m_Pos: - serializedVersion: 2 - x: 0 - y: 73 - width: 279 - height: 327 - m_ViewDataDictionary: {fileID: 0} - m_SceneHierarchy: - m_TreeViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: a8f8ffff - m_LastClickedID: -1880 - m_ExpandedIDs: a8f8ffffb6f8ffffc4f8ffffd4f9ffffdef9ffff00faffff10faffffc4faffff - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 8} - m_SearchString: - m_ExpandedScenes: [] - m_CurrenRootInstanceID: 0 - m_LockTracker: - m_IsLocked: 0 - m_CurrentSortingName: TransformSorting - m_WindowGUID: 76a43d9c9f4337c4190fa630e886bd5a ---- !u!114 &14 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 1 - m_Script: {fileID: 12013, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_MinSize: {x: 200, y: 200} - m_MaxSize: {x: 4000, y: 4000} - m_TitleContent: - m_Text: Scene - m_Image: {fileID: 2318424515335265636, guid: 0000000000000000d000000000000000, - type: 0} - m_Tooltip: - m_Pos: - serializedVersion: 2 - x: 280 - y: 73 - width: 644 - height: 327 - m_ViewDataDictionary: {fileID: 0} - m_ShowContextualTools: 0 - m_WindowGUID: ec42bcc26c780844788a69802631e662 - m_Gizmos: 1 - m_SceneIsLit: 1 - m_SceneLighting: 1 - m_2DMode: 1 - m_isRotationLocked: 0 - m_PlayAudio: 0 - m_AudioPlay: 0 - m_Position: - m_Target: {x: 0, y: 0, z: 0} - speed: 2 - m_Value: {x: 0, y: 0, z: 0} - m_RenderMode: 0 - m_CameraMode: - drawMode: 0 - name: Shaded - section: Shading Mode - m_ValidateTrueMetals: 0 - m_DoValidateTrueMetals: 0 - m_ExposureSliderValue: 0 - m_ExposureSliderMax: 10 - m_SceneViewState: - showFog: 1 - showMaterialUpdate: 0 - showSkybox: 1 - showFlares: 1 - showImageEffects: 1 - showParticleSystems: 1 - m_Grid: - xGrid: - m_Fade: - m_Target: 0 - speed: 2 - m_Value: 0 - m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4} - m_Pivot: {x: 0, y: 0, z: 0} - m_Size: {x: 0, y: 0} - yGrid: - m_Fade: - m_Target: 0 - speed: 2 - m_Value: 0 - m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4} - m_Pivot: {x: 0, y: 0, z: 0} - m_Size: {x: 0, y: 0} - zGrid: - m_Fade: - m_Target: 1 - speed: 2 - m_Value: 1 - m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4} - m_Pivot: {x: 0, y: 0, z: 0} - m_Size: {x: 1, y: 1} - m_ShowGrid: 1 - m_GridAxis: 1 - m_gridOpacity: 0.5 - m_Rotation: - m_Target: {x: 0, y: 0, z: 0, w: 1} - speed: 2 - m_Value: {x: 0, y: 0, z: 0, w: 1} - m_Size: - m_Target: 10 - speed: 2 - m_Value: 22 - m_Ortho: - m_Target: 1 - speed: 2 - m_Value: 1 - m_CameraSettings: - m_Speed: 1 - m_SpeedNormalized: 0.5 - m_SpeedMin: 0.01 - m_SpeedMax: 2 - m_EasingEnabled: 1 - m_EasingDuration: 0.4 - m_AccelerationEnabled: 1 - m_FieldOfView: 90 - m_NearClip: 0.03 - m_FarClip: 10000 - m_DynamicClip: 1 - m_OcclusionCulling: 0 - m_LastSceneViewRotation: {x: -0.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226} - m_LastSceneViewOrtho: 0 - m_ReplacementShader: {fileID: 0} - m_ReplacementString: - m_SceneVisActive: 1 - m_LastLockedObject: {fileID: 0} - m_ViewIsLockedToObject: 0 ---- !u!114 &15 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 1 - m_Script: {fileID: 12014, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_MinSize: {x: 230, y: 250} - m_MaxSize: {x: 10000, y: 10000} - m_TitleContent: - m_Text: Project - m_Image: {fileID: -7501376956915960154, guid: 0000000000000000d000000000000000, - type: 0} - m_Tooltip: - m_Pos: - serializedVersion: 2 - x: 0 - y: 421 - width: 925 - height: 258 - m_ViewDataDictionary: {fileID: 0} - m_SearchFilter: - m_NameFilter: - m_ClassNames: [] - m_AssetLabels: [] - m_AssetBundleNames: [] - m_VersionControlStates: [] - m_SoftLockControlStates: [] - m_ReferencingInstanceIDs: - m_SceneHandles: - m_ShowAllHits: 0 - m_SkipHidden: 0 - m_SearchArea: 1 - m_Folders: - - Assets/RemoteResources/Games/M5/L8/001 - m_ViewMode: 1 - m_StartGridSize: 58 - m_LastFolders: - - Assets/RemoteResources/Games/M5/L8/001 - m_LastFoldersGridSize: 58 - m_LastProjectPath: E:\GIT\ZOE\ZoeAppClass - m_LockTracker: - m_IsLocked: 0 - m_FolderTreeState: - scrollPos: {x: 0, y: 1922} - m_SelectedIDs: e04e0000 - m_LastClickedID: 20192 - m_ExpandedIDs: 00000000804500008245000086450000884500008a4500008c4500008e4500009045000000ca9a3b - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: TESTE - m_OriginalName: TESTE - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 20196 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 0 - m_IsRenamingFilename: 1 - m_ClientGUIView: {fileID: 10} - m_SearchString: - m_CreateAssetUtility: - m_EndAction: {fileID: 0} - m_InstanceID: 0 - m_Path: - m_Icon: {fileID: 0} - m_ResourceFile: - m_AssetTreeState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: 0000000080450000824500008445000086450000884500008a4500008c4500008e45000090450000 - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 1 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_CreateAssetUtility: - m_EndAction: {fileID: 0} - m_InstanceID: 0 - m_Path: - m_Icon: {fileID: 0} - m_ResourceFile: - m_ListAreaState: - m_SelectedInstanceIDs: - m_LastClickedInstanceID: 0 - m_HadKeyboardFocusLastEvent: 1 - m_ExpandedInstanceIDs: c62300004692000000c30000586100008a6100004e65000082380000d6320000ca4c00004e62000046b60000a8cf0000de60000042890000587c0000c46000006c410000987a000000000000f44100007c5e000096850000c6530000ee6700000c68000010680000bc080100605f000002410000 - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 1 - m_ClientGUIView: {fileID: 10} - m_CreateAssetUtility: - m_EndAction: {fileID: 0} - m_InstanceID: 0 - m_Path: - m_Icon: {fileID: 0} - m_ResourceFile: - m_NewAssetIndexInList: -1 - m_ScrollPosition: {x: 0, y: 0} - m_GridSize: 58 - m_SkipHiddenPackages: 0 - m_DirectoriesAreaWidth: 247 ---- !u!114 &16 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 1 - m_Script: {fileID: 12003, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_MinSize: {x: 100, y: 100} - m_MaxSize: {x: 4000, y: 4000} - m_TitleContent: - m_Text: Console - m_Image: {fileID: 111653112392082826, guid: 0000000000000000d000000000000000, - type: 0} - m_Tooltip: - m_Pos: - serializedVersion: 2 - x: 8 - y: 421 - width: 914 - height: 250 - m_ViewDataDictionary: {fileID: 0} ---- !u!114 &17 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 12071, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_MinSize: {x: 100, y: 100} - m_MaxSize: {x: 4000, y: 4000} - m_TitleContent: - m_Text: Animation - m_Image: {fileID: 1561878555887300916, guid: 0000000000000000d000000000000000, - type: 0} - m_Tooltip: - m_Pos: - serializedVersion: 2 - x: 0 - y: 641 - width: 1530 - height: 350 - m_ViewDataDictionary: {fileID: 0} - m_LockTracker: - m_IsLocked: 0 - m_LastSelectedObjectID: -5118 ---- !u!114 &18 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 12070, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_MinSize: {x: 880, y: 216} - m_MaxSize: {x: 4000, y: 4000} - m_TitleContent: - m_Text: Profiler - m_Image: {fileID: 248956144125838126, guid: 0000000000000000d000000000000000, - type: 0} - m_Tooltip: - m_Pos: - serializedVersion: 2 - x: 0 - y: 641 - width: 1366 - height: 350 - m_ViewDataDictionary: {fileID: 0} - m_VertSplit: - ID: 81 - splitterInitialOffset: 0 - currentActiveSplitter: -1 - realSizes: a4000000a5000000 - relativeSizes: - - 0.5 - - 0.5 - minSizes: 6400000064000000 - maxSizes: 0000000000000000 - lastTotalSize: 329 - splitSize: 6 - xOffset: 0 - m_Recording: 1 - m_ActiveNativePlatformSupportModule: - m_CurrentArea: 0 - m_ProfilerModules: - - id: 0 - - id: 1 - - id: 2 - - id: 3 - - id: 4 - - id: 5 - - id: 6 - - id: 7 - - id: 8 - - id: 9 - - id: 10 - - id: 11 - - id: 12 - m_ClearOnPlay: 0 - references: - version: 1 - 00000000: - type: {class: CPUProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor} - data: - m_PaneScroll: {x: 0, y: 0} - m_ViewType: 1 - m_ProfilerViewFilteringOptions: 1 - m_FrameDataHierarchyView: - m_Serialized: 0 - m_TreeViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_MultiColumnHeaderState: - m_Columns: [] - m_VisibleColumns: - m_SortedColumns: - m_ThreadIndex: 0 - m_DetailedViewType: 0 - m_DetailedViewSpliterState: - ID: 0 - splitterInitialOffset: 0 - currentActiveSplitter: 0 - realSizes: - relativeSizes: [] - minSizes: - maxSizes: - lastTotalSize: 0 - splitSize: 0 - xOffset: 0 - m_DetailedObjectsView: - m_SelectedID: 0 - m_TreeViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_MultiColumnHeaderState: - m_Columns: [] - m_VisibleColumns: - m_SortedColumns: - m_VertSplit: - ID: 0 - splitterInitialOffset: 0 - currentActiveSplitter: 0 - realSizes: - relativeSizes: [] - minSizes: - maxSizes: - lastTotalSize: 0 - splitSize: 0 - xOffset: 0 - m_DetailedCallsView: - m_SelectedID: -1 - m_VertSplit: - ID: 0 - splitterInitialOffset: 0 - currentActiveSplitter: 0 - realSizes: - relativeSizes: [] - minSizes: - maxSizes: - lastTotalSize: 0 - splitSize: 0 - xOffset: 0 - m_CalleesTreeView: - m_ViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_ViewHeaderState: - m_Columns: - - width: 150 - sortedAscending: 1 - - width: 60 - sortedAscending: 0 - - width: 60 - sortedAscending: 0 - - width: 60 - sortedAscending: 0 - - width: 60 - sortedAscending: 0 - m_VisibleColumns: 0000000001000000020000000300000004000000 - m_SortedColumns: 03000000 - m_CallersTreeView: - m_ViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_ViewHeaderState: - m_Columns: - - width: 150 - sortedAscending: 1 - - width: 60 - sortedAscending: 0 - - width: 60 - sortedAscending: 0 - - width: 60 - sortedAscending: 0 - - width: 60 - sortedAscending: 0 - m_VisibleColumns: 0000000001000000020000000300000004000000 - m_SortedColumns: 03000000 - m_ThreadName: Main Thread - 00000001: - type: {class: GPUProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor} - data: - m_PaneScroll: {x: 0, y: 0} - m_ViewType: 0 - m_ProfilerViewFilteringOptions: 1 - m_FrameDataHierarchyView: - m_Serialized: 0 - m_TreeViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_MultiColumnHeaderState: - m_Columns: [] - m_VisibleColumns: - m_SortedColumns: - m_ThreadIndex: 0 - m_DetailedViewType: 0 - m_DetailedViewSpliterState: - ID: 0 - splitterInitialOffset: 0 - currentActiveSplitter: 0 - realSizes: - relativeSizes: [] - minSizes: - maxSizes: - lastTotalSize: 0 - splitSize: 0 - xOffset: 0 - m_DetailedObjectsView: - m_SelectedID: 0 - m_TreeViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_MultiColumnHeaderState: - m_Columns: [] - m_VisibleColumns: - m_SortedColumns: - m_VertSplit: - ID: 0 - splitterInitialOffset: 0 - currentActiveSplitter: 0 - realSizes: - relativeSizes: [] - minSizes: - maxSizes: - lastTotalSize: 0 - splitSize: 0 - xOffset: 0 - m_DetailedCallsView: - m_SelectedID: -1 - m_VertSplit: - ID: 0 - splitterInitialOffset: 0 - currentActiveSplitter: 0 - realSizes: - relativeSizes: [] - minSizes: - maxSizes: - lastTotalSize: 0 - splitSize: 0 - xOffset: 0 - m_CalleesTreeView: - m_ViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_ViewHeaderState: - m_Columns: - - width: 150 - sortedAscending: 1 - - width: 60 - sortedAscending: 0 - - width: 60 - sortedAscending: 0 - - width: 60 - sortedAscending: 0 - - width: 60 - sortedAscending: 0 - m_VisibleColumns: 0000000001000000020000000300000004000000 - m_SortedColumns: 03000000 - m_CallersTreeView: - m_ViewState: - scrollPos: {x: 0, y: 0} - m_SelectedIDs: - m_LastClickedID: 0 - m_ExpandedIDs: - m_RenameOverlay: - m_UserAcceptedRename: 0 - m_Name: - m_OriginalName: - m_EditFieldRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 0 - height: 0 - m_UserData: 0 - m_IsWaitingForDelay: 0 - m_IsRenaming: 0 - m_OriginalEventType: 11 - m_IsRenamingFilename: 0 - m_ClientGUIView: {fileID: 0} - m_SearchString: - m_ViewHeaderState: - m_Columns: - - width: 150 - sortedAscending: 1 - - width: 60 - sortedAscending: 0 - - width: 60 - sortedAscending: 0 - - width: 60 - sortedAscending: 0 - - width: 60 - sortedAscending: 0 - m_VisibleColumns: 0000000001000000020000000300000004000000 - m_SortedColumns: 03000000 - m_ThreadName: Main Thread - 00000002: - type: {class: RenderingProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor} - data: - m_PaneScroll: {x: 0, y: 0} - 00000003: - type: {class: MemoryProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor} - data: - m_PaneScroll: {x: 0, y: 0} - m_ViewSplit: - ID: 0 - splitterInitialOffset: 0 - currentActiveSplitter: -1 - realSizes: 0000000000000000 - relativeSizes: - - 0.7 - - 0.3 - minSizes: c201000032000000 - maxSizes: 0000000000000000 - lastTotalSize: 0 - splitSize: 6 - xOffset: 0 - 00000004: - type: {class: AudioProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor} - data: - m_PaneScroll: {x: 0, y: 0} - m_ShowInactiveDSPChains: 0 - m_HighlightAudibleDSPChains: 1 - m_DSPGraphZoomFactor: 1 - 00000005: - type: {class: VideoProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor} - data: - m_PaneScroll: {x: 0, y: 0} - 00000006: - type: {class: PhysicsProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor} - data: - m_PaneScroll: {x: 0, y: 0} - 00000007: - type: {class: Physics2DProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor} - data: - m_PaneScroll: {x: 0, y: 0} - 00000008: - type: {class: NetworkingMessagesProfilerModule, ns: UnityEditorInternal.Profiling, - asm: UnityEditor} - data: - m_PaneScroll: {x: 0, y: 0} - 00000009: - type: {class: NetworkingOperationsProfilerModule, ns: UnityEditorInternal.Profiling, - asm: UnityEditor} - data: - m_PaneScroll: {x: 0, y: 0} - m_NetworkSplit: - ID: 0 - splitterInitialOffset: 0 - currentActiveSplitter: -1 - realSizes: 0000000000000000 - relativeSizes: - - 0.2 - - 0.8 - minSizes: 6400000064000000 - maxSizes: 0000000000000000 - lastTotalSize: 0 - splitSize: 6 - xOffset: 0 - msgNames: - - UserMessage - - ObjectDestroy - - ClientRpc - - ObjectSpawn - - Owner - - Command - - LocalPlayerTransform - - SyncEvent - - SyncVars - - SyncList - - ObjectSpawnScene - - NetworkInfo - - SpawnFinished - - ObjectHide - - CRC - - ClientAuthority - 0000000A: - type: {class: UIProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor} - data: - m_PaneScroll: {x: 0, y: 0} - 0000000B: - type: {class: UIDetailsProfilerModule, ns: UnityEditorInternal.Profiling, asm: UnityEditor} - data: - m_PaneScroll: {x: 0, y: 0} - 0000000C: - type: {class: GlobalIlluminationProfilerModule, ns: UnityEditorInternal.Profiling, - asm: UnityEditor} - data: - m_PaneScroll: {x: 0, y: 0} ---- !u!114 &19 -MonoBehaviour: - m_ObjectHideFlags: 52 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 1 - m_Script: {fileID: 12019, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_MinSize: {x: 275, y: 50} - m_MaxSize: {x: 4000, y: 4000} - m_TitleContent: - m_Text: Inspector - m_Image: {fileID: -6905738622615590433, guid: 0000000000000000d000000000000000, - type: 0} - m_Tooltip: - m_Pos: - serializedVersion: 2 - x: 926 - y: 73 - width: 433 - height: 606 - m_ViewDataDictionary: {fileID: 0} - m_OpenAddComponentMenu: 0 - m_ObjectsLockedBeforeSerialization: [] - m_InstanceIDsLockedBeforeSerialization: - m_LockTracker: - m_IsLocked: 0 - m_PreviewResizer: - m_CachedPref: -214 - m_ControlHash: -371814159 - m_PrefName: Preview_InspectorPreview - m_PreviewWindow: {fileID: 0} - m_LastInspectedObjectInstanceID: -1 - m_LastVerticalScrollValue: 0 diff --git a/Library/EditorOnlyScriptingSettings.json b/Library/EditorOnlyScriptingSettings.json deleted file mode 100644 index 8e1824c8..00000000 --- a/Library/EditorOnlyScriptingSettings.json +++ /dev/null @@ -1 +0,0 @@ -{"m_DefineSymbols":[],"m_AllowUnsafeCode":false} \ No newline at end of file diff --git a/Library/EditorSnapSettings.asset b/Library/EditorSnapSettings.asset deleted file mode 100644 index 7a90624e..00000000 --- a/Library/EditorSnapSettings.asset +++ /dev/null @@ -1,20 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!114 &1 -MonoBehaviour: - m_ObjectHideFlags: 61 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 0} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 13954, guid: 0000000000000000e000000000000000, type: 0} - m_Name: - m_EditorClassIdentifier: - m_SnapEnabled: 0 - m_SnapSettings: - m_SnapValue: {x: 0.25, y: 0.25, z: 0.25} - m_SnapMultiplier: {x: 2048, y: 2048, z: 2048} - m_Rotation: 15 - m_Scale: 1 diff --git a/Library/EditorUserBuildSettings.asset b/Library/EditorUserBuildSettings.asset deleted file mode 100644 index 30bd988f..00000000 Binary files a/Library/EditorUserBuildSettings.asset and /dev/null differ diff --git a/Library/EditorUserSettings.asset b/Library/EditorUserSettings.asset deleted file mode 100644 index 4681d1d2..00000000 --- a/Library/EditorUserSettings.asset +++ /dev/null @@ -1,19 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!162 &1 -EditorUserSettings: - m_ObjectHideFlags: 0 - serializedVersion: 4 - m_ConfigSettings: - vcSharedLogLevel: - value: 0d5e400f0650 - flags: 0 - m_VCAutomaticAdd: 1 - m_VCDebugCom: 0 - m_VCDebugCmd: 0 - m_VCDebugOut: 0 - m_SemanticMergeMode: 2 - m_VCShowFailedCheckout: 1 - m_VCOverwriteFailedCheckoutAssets: 1 - m_VCOverlayIcons: 1 - m_VCAllowAsyncUpdate: 0 diff --git a/Library/InspectorExpandedItems.asset b/Library/InspectorExpandedItems.asset deleted file mode 100644 index bcf7761f..00000000 Binary files a/Library/InspectorExpandedItems.asset and /dev/null differ diff --git a/Library/LastSceneManagerSetup.txt b/Library/LastSceneManagerSetup.txt deleted file mode 100644 index eca339de..00000000 --- a/Library/LastSceneManagerSetup.txt +++ /dev/null @@ -1,5 +0,0 @@ -sceneSetups: -- path: Assets/Scenes/Teste.unity - isLoaded: 1 - isActive: 1 - isSubScene: 0 diff --git a/Library/LibraryFormatVersion.txt b/Library/LibraryFormatVersion.txt deleted file mode 100644 index 6185f096..00000000 --- a/Library/LibraryFormatVersion.txt +++ /dev/null @@ -1,2 +0,0 @@ -unityRebuildLibraryVersion: 11 -unityForwardCompatibleVersion: 40 diff --git a/Library/MonoManager.asset b/Library/MonoManager.asset deleted file mode 100644 index 03cb11af..00000000 Binary files a/Library/MonoManager.asset and /dev/null differ diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/CHANGELOG.md b/Library/PackageCache/com.unity.addressables@1.1.10/CHANGELOG.md deleted file mode 100644 index f9bbcbbe..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/CHANGELOG.md +++ /dev/null @@ -1,389 +0,0 @@ -# Changelog -All notable changes to this package will be documented in this file. - -The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - -## [1.1.10] - 2019-08-28 - - Fix for all files showing "Missing File" in the addressables window. - - Fix for waiting on a successfully done Task - -## [1.1.9] - 2019-08-22 - - Fixed drag and drop NullRef in main addressables window. - - Fixed AudioMixer type assets getting stripped from bundles. - - Fixed issue where failed async operations weren't getting released from the async operation cache. - - Fix unloading of scenes so that the dependencies will wait for the unload operation to complete before unloading. This was causing an occasional 1-frame visual glitch during unload. - - Fixed scenario where AsyncOperation Task fails to complete when AsyncOperation has already completed. - - Fixed a missed init-log that was stuck always-logging. - - Fixed issue around assets losing dependencies when unloaded then reloaded. This would manifest most often as sprites losing their texture or prefabs losing their shader/material/texture. - - Changed checks for determining if a path is remote or not from looking for "://" to looking for starting with "http". "://" is still used to determine if the asset should be loaded via UnityWebRequest or not. - - Added Analyze Rule to show entire Asset Bundle layout - - Added progress bars and some optimizations for calculating analyze rules - - Fixed sprite sheet loading syntax LoadAssetAsync("sprite"). - - Note that this syntax requires an engine fix that is in 2019.3.0a10 and will be backported to 2019.2 and 2018.4. - -## [1.1.7] - 2019-07-30 - - Fixed chain operation percent complete calculation. - - Fixed scenario where deleting assets would also delete groups that have similar names. - - Fix in bundle caching bug surrounding bundles with '.' in their name - - Significant improvements to the manual pages - - Made the many init-logs not log unless ADDRESSABLES_LOG_ALL is defined in player settings (other logs always worked this way, init didn't). - - Prevented NullReferenceException when attempting to delete entries in the Addressables window. - - Fix for building by label (Bundle Mode = Pack Together By Label) - - Removed ability to mark editor-only assets as addressable in GUI - - Better fix to Editor types being added to the build - - Made BuiltIn Data group read-only by default. - - Fixed NullRef caused by an invalid (BuildIn Data) group being default during a build. - - Fixed path where LoadResourceLocationsAsync could still throw an exception with unknown key. Now it should not, and is a safe way to check for valid keys. - - If Key does not exist but nothing else goes wrong, it will return an empty list and Success state. - - Fixed NullRef caused when there was a deleted scene in the scenes list. - - BuildCompression for Addressables can now be driven from the default group. If necessary WebGL builds will fallback to LZ4Runtime and all other build targets will fallback to LZMA. - - Added options for bundle naming: AppendHash, NoHash, OnlyHash. - - As a temporary workaround for updating issues, we recommend setting all groups with StaticContent=true to be NoHash. This will make sure the updated catalog still refers to the correct unchanged bundle. An actual fix will be out in a few releases. - -## [1.1.5] - 2019-07-15 - - Fixed scenario where scene unload simultaneously destroys objects being instantiated in different scenes. - - Cleaned up SetDirty logic to remove excessive dirtying of assets. - -## [1.1.4-preview] - 2019-06-19 - - Fixed an issue where Editor only types were being added to the build. - -## [1.1.3-preview] - 2019-06-17 - - *BREAKING CODE CHANGES* - - ReleaseInstance will now return a bool saying if it successfully destroyed the instance. If an instance is passed in that Addressables is unaware of, this will return false (as of 0.8 and earlier, it would print a log, and still destroy the instance). It will no longer destroy unknown instances. - - Added PrimaryKey to the IResourceLocation. By default, the PrimaryKey will be the address. This allows you to use LoadResourceLocationsAsync and then map the results back to an address. - - Added ResourceType to IResourceLocation. - - This allows you to know the type of a location before loading it. - - Fixes a problem where calling Load*(key) would load all items that matched the key, then filter based on type. Now it will do the filter before loading (after looking up location matches) - - This also adds a Type input to LoadResourceLocationsAsync. null input will match all types. - - Safety check AssetReference.Asset to return null if nothing loaded. - - New rule added to Analyze window - CheckResourcesDupeDependencies - to check for dependencies between addressables and items in Resources - - Added group rearranging support to the Addressables window. - - Improved logging when doing a Prepare for Content Update. - - Added versions of DownloadDependencies to take a list of IResourceLocations or a list of keys with a MergeMode. - - Fixed scenario where Task completion wouldn't happen if operation was already in a certain state - - Made LoadResourceLocations no longer throw an exception if given unknown keys. This method is the best way to check if an address exists. - - Exposed AnalyzeRule class to support creating custom rules for Addressables analysis. - - Fixed some issues surrounding loading scenes in build scenes list via Addressables - - Removed using alias directives defined in global space. - - Proper disposal of DiagnosticEventCollector and DelayedActionManager when application closes. - - Added support for loading named sub-objects via an "address.name" pattern. So a sprite named "trees" with sub-sprites, could be loaded via LoadAssetAsync("trees.trees_0"). - - Known issue: loading IList from a Texture2D or IList from an fbx will crash the player. The workaround for now is to load items by name as mentioned just above. Engine fix for this is on its way in. - -## [0.8.6-preview] - 2019-05-14 - - Fix to make UnloadSceneAsync(SceneInstance) actually unload the scene. - -## [0.8.3-preview] - 2019-05-08 - - *BREAKING CODE CHANGES* - - Chagned all asynchronous methods to include the word Async in method name. This fits better with Unity's history and convention. They should auto upgrade without actually breaking your game. - - Moved AsyncOperationHandle inside namespace UnityEngine.ResourceManagement - - Addressable Analyze changes: - - Analyze has been moved into it's own window. - - CheckSceneDupeDependencies Analyze rule has been added. - - CheckDupeDependencies has been renamed into CheckBundleDupeDependencies. - - Analyze Rule operations for individuals or specific sets of Analyze Rules has been added via AnalyzeRule selections. - -## [0.7.4-preview] - 2019-04-19 - - Removed support for .NET 3.x as it is deprecated for Unity in general. - - Replaced IAsyncOperation with AsyncOperationHandle. - - Once the asset is no longer needed, the user can call Addressables.Release, passing in either the handle, or the result the handle provided. - - Exposed AsyncOperationBase for creating custom operations - - These operations must be started by ResourceManager.StartOperation - - Replaced IDataBuilderContext and it's inherited classes with simpler AddressablesDataBuilderInput. This class is fed into all IDataBuilder.BuildData calls. - - Fixed Nintendo Switch and PlayStation4 support. - - Simplified the IResourceProvider interface. - - Refactored build script interface. Made BuildScriptBase and the provided concrete versions easier to inherit from. - - Removed DelayedActionManager. - - Removed ISceneProvider. Users can implement custom scene loading using a custom AsyncOperationBase. - - Removed optional LRU caching of Assets and Bundles. - - Addressables Profiler now tracks all active async operations - - AssetBundles targetting StreamingAssets (by using the profile variable [UnityEngine.AddressableAssets.Addressables.BuildPath] now build to the Library instead of StreamingAssets. During the player build, these files are copied into StreamingAssets, then after the build, the copies are deleted. They are also built into platform specific folders (so building for a second platform will not overwrite data from a first build). We recommend deleting anything in Assets/StreamingAssets/aa. - - The addressables_content_state.bin is built into a platform specific folder within Assets/AddressableAssetsData/. We recommend deleting the addressables_content_state.bin in Assets/AddressableAssetsData to avoid future confusion. - - ScriptableBuildPipeline now purges stale data from its cache in the background after each build. - - Disabled Addressables automatic initialization. It will now initialize itself upon the first call into it (such as Load or Instantiate). To Initialize on startup instead of first use, call Addressables.Initialize(). - - Optimized performance around instantiation and general garbage generation. - - Added per-group bundle compression settings. - - Fixes to AssetReference drawers. - - Improved the group template system for creating better defined asset groups. - - Fixed bug in bundle caching that caused GetDownloadSize to report incorrectly - - Cleaned up Load/Release calls to make sure all releases could take either the handle returned by Load, or the handle.Result. - - Added editor-only analytics (nothing added in runtime). If you have Analytics disabled in your project nothing will be reported. Currently only run when you build addressables, it includes data such as Addressables version and Build Script name. - - Fixed null ref issue when cleaning all the data builders - - KNOWN ISSUE: there is still an occasional issue with code stripping on iOS. If you run into iOS issues, try turning stripping off for now. - -## [0.6.8-preview] - 2019-03-25 -- fixed Build For Content Update to no longer delete everything it built. - -## [0.6.7-preview] - 2019-03-07 - - Fix for iOS and Android. Symptom was NullReferenceException dring startup resulting in nothing working. Fix requires re-running Build Player Content - -## [0.6.6-preview] - 2019-03-05 - - *BREAKING CODE CHANGES* - - to ease code navigation, we have added several layers of namespace to the code. - - All Instantiate API calls (Addressables and AssetReference) have been changed to only work with GameObjects. - - any hardcoded profile path to com.unity.addressables (specifically LocalLoadPath, RemoteLoadPath, etc) should use UnityEngine.AddressableAssets.Addressables.RuntimePath instead. - For build paths, replace Assets/StreamingAssets/com.unity.addressables/[BuildTarget] with [UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget] - For load paths, replace Assets/StreamingAssets/com.unity.addressables/[BuildTarget] with {UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget] - - We have removed attribute AssetReferenceTypeRestriction as it is cleaner to enforce type via generics - - Attribute AssetReferenceLabelRestriction is renamed to AssetReferenceUILabelRestriction and must be surrounded by #if UNITY_EDITOR in your game code, to enforce it's editor-only capability - - Modifications to IResourceProvider API. - - Removed PreloadDependencies API. Instead use DownloadDependencies - - Content Update calculation has changed, this will invalide previously generated addressables_content_state.bin files. - - Some types for content update were made private as a result of the above change. - - Minimum Unity version is now 2018.3 to address a build-time bug with progressive lightmapper. - - Moved all of the Resource Manager package to be contained within Addressables (no longer a stand alone package). No code change implications. - - Change to content catalog building: - - Previous model built one catalog per group, wherever that group built it's data. - - New model builds one catalog locally, and optionally one "remote". Remote location is set on the top level AddressableAssetSettings object. - - Loading will now always check if remote has changes (if remote exists), and use local otherwise (or cached version of remote). - - LoadScene API now takes the LoadSceneParameters that were added to the engine in 2018.2 - - Exposed AddressablesBuildDataBuilderContext.BuildScriptContextConstants for use in build scripts. - - Refactored AddressablesBuildDataBuilderContext.GetValue to take default parameter. - - Fixed Scene asset path to be consistent between different play modes in the catalog data. - - Exposed the various IDataBuilder implementations as public classes. - - Exposed asset and bundle provider types for BundledAssetGroupSchema. - - Fixed several bugs when loading catalogs from other projects. - - Added provider suffix to Initialization operation and Addressables.LoadCatalogsFromRuntimeData API to better support overriding providers. - - Exposed CachedProvider options in BundledAssetGroupSchema. Each unique set of parameters will generate a separate provider. There is also an option to force a group to have its own providers. - - Added IEnumerable Keys property to IResourceLocator interface. - - Exposed InitializationOperation as public API. - - Added BuildTarget to ResourceManagerRuntimeData. This is used to check if the generated player content was built with the same build target as the player or the editor when entering play mode. - - Removed warnings generated from not finding the cached catalog hash files, which is not an error. - - Fixed bug where scenes were not unloading. - - Fixed GUI exception thrown in group inspector. - - Fixed error case where an asset (usually a bundle) was loaded multiple times as different types (object and AssetBundle). - - Fixed divide by zero bug when computing load percent of simulated asset bundles. - - AddressableAssetBuildResult.CreateResult now takes the settingsPath as a parameter to pass this to the result. - - Fix AssetReference GUI when the AssetReference is inside an array of classes, part of a SerializedObject, or private. - - Fix AssetReferenceSprite to properly support sprites (as opposed to Texture2D's). - - Fixed bug involving scenes being repeatedly added to the build scenes list. - - Removed deprecated and obsolete code. If you are upgrading from a very old version of Addressables, please update to 0.5.3-preview first. - - Removed the default MergeMode on LoadAssets calls to enforce explicit behavior. - - Added IAsyncOperation GetDownloadSize(object key) API to compute remaining data needed to load an asset - - Fixed assets being stuck in a read-only state in UI - - Unified asset moving API to clean up public interface - - Added PlayerVersion override to AddressableAssetSettings - - Ensure UI cannot show invalide assets (such as .cs files) - - Renamed Addressables.LoadAddtionalCatalogs to Addressables.LoadContentCatalog and now it takes the path of the catalog instead of the settings file - - Moved provider information from ResourceManagerRuntimeDate into ContentCatalogData - - Updating ResourceManager to be a non-static class - - Fixed bugs surrounding assets moving in or out of Resources (outside Addressables UI) - - Fixed the AssetReference dropdown to properly filter valid assets (no Resources and honoring type or label limitations). - - Fixed AssetReferences to handle assets inside folders marked as Addressable. - - Added attribute AssetReferenceUIRestriction to support user-created AssetReference restrictions (they are only enforced in UI, for dropdown and drag&drop) - - Changed addressables_content_state.bin to only build to the folder containing the AddressableAssetSettings object (Assets/AddressableAssetsData/ in most cases) - - Fixed issue where the wrong scene would sometimes be open post-build. - -## [0.5.3-preview] - 2018-12-19 - - fixed upgrade bug from 0.4.x or lower to 0.5.x or higher. During upgrade, the "Packed Mode" option was removed from play mode. Now it's back and upgrades are safe from 0.4.x or from 0.5.x to 0.5.3 - -## [0.5.2-preview] - 2018-12-14 - - *IMPORTANT CHANGE TO BUILDING* - - We have disabled automatic asset bundle building. That used to happen when you built the player, or entered play mode in "packed mode". This is no longer the case. You must now select "Build->Build Player Content" from the Addressables window, or call AddressableAssetSettings.BuildPlayerContent(). We did this because we determined that automatic building did not scale well at all for large projects. - - fixed regression loading local bundles - - Added Addressables.DownloadDependencies() interface - - fixes for Nintendo Switch support - - Fixed issues around referencing Addressables during an Awake() call - - Code refactor and naming convention fixes - - Cleaned up missing docs - - Content update now handles not having and groups marked as Static Content - - Fixed errors when browing for the addressables_content_state.bin and cancelling - - Moved addressables_content_state.bin to be generated into the addressables settings folder - - Changed some exceptions when releasing null bundles to warnings to handle the case of releasing a failed download operation - - Separated hash and crc options to allow them to be used independently in asset bundle loads. - - Use CRC in AssetBundle.LoadFromFileAsync calls if specified - - Always include AssetBundleRequestOptions for asset bundle locations - -## [0.4.8-preview] - 2018-10-22 - - Added all referenced types in asset bundles to link.xml to prevent them from being stripped in IL2CPP builds - -## [0.4.7-preview] - 2018-10-20 - - updated Scriptable Build Pipeline version in dependencies - -## [0.4.6-preview] - 2018-10-16 - - MINIMUM RECOMMENDED VERSION - 2018.2.11+ - - We have re-enabled the addressables checkbox. Versions of 2018.2 older than the .11 release will work unless you attempt to view the Animation Import Settings inspector. If you do have animations you need to inspect, use .11+. If you do not, use any official release version of 2018.2. - - refactored the way IResourceProviders are initialized in the player - serialized data is constructed at runtime to control how the providers are configured - - added readonly custom inspector for AddressableAssetEntryCollection - - AssetReference now stores the loaded asset which can be accessed via the Asset property after LoadAsset completes. ReleaseAsset has been modified to not need the asset passed in (the old version is marked obsolete] - - fixed profiler details view not updating when a mouse drag is completed - - fixed null-ref when moving Resources to Addressables when there are no Resources - - blocked moving EditorSceneList within GUI - - fixed cap on address name length - - fixed workflows of marking Resources as addressable and moving an addressable into Resources. - - fixed issue where AssetReferenceDrawer did not mark scene as dirty when changed. - - added Hosting Services feature; provides extensible framework and implementation for serving packed content to player builds from the Editor - - replaced addressables buildscript with an interface based system. IDataBuilder class is now used to define builders of specific types of data. The Addressables settings object - contains a collection of data builders and uses these to create player and play mode data. Users can implemented custom data builders to control the build process. - - replaced AssetGroupProcessors with a collection of AssetGroupSchema objects. The difference is that the schema objects only contain data and groups can have multiple schemas. The - logic for processing groups now resides in the build script and uses the schemas as data sources and filters for how to build. - - Added Initialization objects that can be created during the build to run during addressables initialization - - Implemented Caching API initialization with initialization objects - - Changed some API and tests to work with 2019.x - - fixed how AssetReference's draw when within lists, arrays, or contained classes - - Fixed the workflow of scenes moving in and out of the Editor Build Settings Scene list. - - Removed "Preview" and added "Analyze". - - The new system runs any rules it knows about. - - Currently this is one rule that is manually set up in code. Future work will have additional rules, and expose the ability to create/add user- or project-specific rules - - This process can be slow, as it runs most of a build to get accurate data. - - Within the Analyze window there is a "fix" button that allows each rule to fix any issues if the rule knows how. - - The current rule is a "check duplicate asset" rule. This looks for assets that are pulled into multiple asset bundles due to dependency calculations. The way it fixes things is to move all of those into a newly created group. - - Added option to toggle logging of all exceptions within the Resource Manager - - Refactored initialization of the addressable asset settings to prevent it getting into a bad state. - -## [0.3.5-preview] - 2018-09-05 - - implemented content update workflow. Added a dropdown to the "Build" button on main window's toolbar. - - "Build/Prepare for Content Update" will detect assets in locked bundles (bundles flagged as static, by default all local bundles). - - "Build/Build for Content Update" will build assets with a catalog that is compatible with a previously released player. - - "Build/Build Packed Data" will build in the same way entering play mode in PackedMode would. - - implemented Clean Build. "Build/Clean/*" will clear out build caches. - - cleaned up streaming assets folder better after build - - moved asset group data into separate assets in order to better support version control - - fixed bug when canceling export of entries to an AssetEntryCollection - - fixed several bugs related to caching packed bundles in play mode - - added option to build settings to control whether streaming assets is cleared after each build - - enabled CreateBuiltInShadersBundle task in build and preview - - fixed bug in AA initialization that was cuasing tests to fail when AA is not being used. - - fixed bug where toggling "send profiler events" would have no effect in some situations - - default the first 2 converted groups to have StaticContent set to true - - UI Redesign - - Moved most data settings onto actual assets. AddressableAssetSettings and AddressableAssetGroup assets. - - AddressableAssetSettings asset has "Send Profile Events", list of groups, labels, and profiles - - AddressableAssetGroup assets have all data associated with that group (such as BuildPath) - - Made "preview" be a sub-section within the Addressables window. - - The "Default" group can now be set with a right-click in the Addressables window. - - Set play mode from "Mode" dropdown on main window's toolbar. - - Moved "Hierarchical Search" option onto magnifying glass of search bar. Removed now empty settings cog button. - - fixed issue when packing groups into seperate bundles generated duplicate asset bundle names, leading to an error being thrown during build - - added support for disabling the automatic initialization of the addressables system at runtime via a script define: ADDRESSABLES_DISABLE_AUTO_INITIALIZATION - - added API to create AssetReference from AddressableAssetSettings object in order to create an entry if it does not exist. - - moving resource profiler from the ResourceManager package to the Addressables package - - fixed bug where UnloadScene operation never entered Done state or called callback. - - fixed loading of additonal catalogs. The API has changed to Addressables.LoadCatalogsFromRuntimeData. - - fixed bug in InitializationOperation where content catalogs were not found. - - changed content update workflow to browse for cachedata.bin file instead of folder - - fixed exception thrown when creating a group and using .NET 4.x - - fixed bugs surrounding a project without addressables data. - - AssetLabelReference inspector rendering - - AssetReference drag and drop - - fixed profiler details view not updating when a mouse drag is completed - - fixes surrounding the stability of interacting with the "default" group. - - Added docs for the Content Update flow. - - Adjusted UI slightly so single-clicking groups shows their inspector. - - removed not-helpful "Build/Build Packed Data" item from menu. - - fixed bug where you could no longer create groups, and group assets were not named correctly - -## [0.2.2-preview] - 2018-08-08 - - disabled asset inspector gui for addressables checkbox due to editor bug - -## [0.2.1-preview] - 2018-07-26 - - smoothed transition from 0.1.x data to 0.2.x data - - added checks for adding duplicate scenes into the EditorBuildSettings.scenes list - - fixed exception when deleting group via delete key, added confirmation to all deletions - -## [0.2.0-preview] - 2018-07-23 - - Fixed bundles being built with default compression instead of compression from settings - - Fixed bug in tracking loaded assets resulting in not being able to release them properly - - Added Key property to IAsyncOperation to allow for retrieval of key that requested the operation - - Added AssetLabelReference to provide inspector UI for selecting the string name of a label - - Fixed dragging from Resources to a group. - - Added ability to re-initialize Addressables with multiple runtime data paths. This is to support split projects. - - Clean up StreamingAssets folder after build/play mode - -## [0.1.2-preview] - 2018-06-11 - - fixed Application.streamingAssetsPath being stripped in IL2CPP platforms - -## [0.1.1-preview] - 2018-06-07 - - MIN VERSION NOW 2018.2.0b6 - - updated dependency - -## [0.1.0-preview] - 2018-06-05 - - MIN VERSION NOW 2018.2.0b6 - - added better checks for detecting modified assets in order to invalidate cache - - fixed preview window showing scenes in wrong bundle - - exclude current processor type from conversion context menu - - fixed exception when right clicking asset groups - - added support for adding extra data to resource locations - - made Addressables.ReleaseInstance destroy even non-addressable assets. - - append hash to all bundle names - - pass crc & hash to bundle provider - - clear catalog cache whenever packed mode content is rebuilt - -## [0.0.27-preview] - 2018-05-31 - - fixed ResourceManager initialization to work as the stand-alone player - -## [0.0.26-preview] - 2018-05-24 - - re-added Instantiate(AssetReference) for the sake of backwards compatability. - -## [0.0.25-preview] - 2018-05-23 - - workaround for engine bug surrounding shader build. Fix to engine is on it's way in. - -## [0.0.24-preview] - 2018-05-21 - - minor bug fix - -## [0.0.23-preview] - 2018-05-21 - - new format for content catalogs - - detects changes in project and invalidates cached runtime data and catalogs - - data is not copied into StreamingAssets folder when running fast or virtual mode - - added external AssetEntry collections for use by packages - - modifying large number of asset entries on the UI is no longer unresponsive - - added an option to search the asset list in a hierarchical fashion. Helps track down which group an asset is in. - - many small bug fixes. - -## [0.0.22-preview] - 2018-05-03 - - dependency update. - -## [0.0.21-preview] - 2018-05-03 - - fixed build-time object deletion bug. - -## [0.0.20-preview] - 2018-05-02 - - Added support for extracting Built-In Shaders to a common bundle - - Added build task for generating extra data for sprite loading edge case - - fix build related bugs introduced in 0.0.19. - -## [0.0.19-preview] - 2018-05-01 - - Complete UI rework. - - Moved all functionality to one tab - - Preview is a toggle to view in-line. - - Profiles are edied from second window (this part is somewhat placeholder pending a better setup) - - Dependency updates - - Minor cleanup to build scripts - -## [0.0.18-preview] - 2018-04-13 - - minor bug fixes - - exposed memory cache parameters to build settings, changed defaults to use LRU and timed releases to make preloading dependencies more effective - -## [0.0.17-preview] - 2018-04-13 - - added tests - - fixed bugs - - major API rewrite - - all API that deals with addresses or keys have been moved to Addressables - - LoadDependencies APIs moved to Addressables - - Async suffix removed from all Load APIs - -## [0.0.16-preview] - 2018-04-04 -- added BuildResult and callback for BuildScript -- added validation of instance to scene and scene to instance maps to help debug instances that change scenes and have not been updated -- added ResourceManager.RecordInstanceSceneChange() method to allow RM to track when an instance is moved to another scene -- moved variable expansion of location data to startup - -## [0.0.15-preview] - 2018-03-28 -- fixed scene unloading -- release all instances when a scene unloads that contains unreleased instances -- fixed overflow error in virtual mode load speeds - -## [0.0.14-preview] - 2018-03-20 -- Updated dependencies - - -## [0.0.12-preview] - 2018-03-20 -- Minor UI updates -- doc updates -- fixed bug involving caching of "all assets" -- improved error checking & logging -- minor bug fixes. - -## [0.0.8-preview] - 2018-02-08 -- Initial submission for package distribution - - diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/CHANGELOG.md.meta b/Library/PackageCache/com.unity.addressables@1.1.10/CHANGELOG.md.meta deleted file mode 100644 index 25f479f7..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/CHANGELOG.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 6f6c277bb5d2a164e8c95a7f0754c0f6 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/AddressableAssetsAnalyze.md b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/AddressableAssetsAnalyze.md deleted file mode 100644 index 769f8aa9..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/AddressableAssetsAnalyze.md +++ /dev/null @@ -1,97 +0,0 @@ -# Addressables Analyze -Analyze is a tool that gathers information on your Projects' Addressables layout. In some cases, Analyze may take appropriate actions to clean up the state of your Project. In others, Analyze is purely an informational tool that allows you to make more informed decisions about your Addressables layout. - -## Using Analyze -In the Editor, open the **Addressables window** (**Window** > **Asset Management** > **Addressable Assets**), then click the **Analyze** button in the menu to open the **Analyze window**. - -The Analyze window displays a list of Analyze rules, along with the following operations: - -* Analyze Secelcted Rules -* Fix Selected Rules -* Clear Selected Rules - -### The analyze operation -The analyze operation is the information-gathering step of the rule. Running this action on a rule or set of rules gathers data about the build, dependency maps, and more. Each rule is responsible for gathering the desired data and reporting it back as a list of `AnalyzeResult` objects. - -No action should be taken to modify any data or the state of the Project during the analyze step. Based on the data gathered in this step, the [fix](#the-fix-operation) operation may be the appropriate course of action. Some rules, however, only contain an analyze step, as no reasonably appropriate and universal action can be taken based on the information gathered. [_Check Scene to Addressable Duplicate Dependencies_](#check-scene-to-addressable-duplicate-dependencies) and [_Check Resources to Addressable Duplicate Dependencies_](#check-resources-to-addressable-duplicate-dependencies) are examples of such rules. - -Rules that are purely informational and contain no fix operation are categorized as **Unfixable Rules**. Those that do have a fix operation are categorized as **Fixable Rules**. - -### The fix operation -For **Fixable Rules**, you may choose to run the fix operation. This uses data gathered during the analyze step to perform any necessary modifications and resolve the issues. - -[_Check Duplicate Group Dependencies_](#check-duplicate-group-dependencies) is an example of a fixable rule, because there is a reasonably appropriate action that can be taken to resolve the issues detected in the analysis. - -### The clear step -This operation will remove any data gathered by the analysis and update the `TreeView` accordingly. - -## Provided Analyze rules -### Fixable rules -#### Check Duplicate Group Dependencies -This rule checks for potentially duplicated assets, by scanning all groups with `BundledAssetGroupSchemas` and projecting the asset group layout. This essentially requires triggering a full build, so this check is time-consuming and performance-intensive. - -**Issues**: Duplicated assets result from assets in different groups sharing dependencies, for example two Prefabs that share a material existing in different Addressable groups. That material (and any of its dependencies) would be pulled into both groups containing the Prefabs. To prevent this, the material must be marked as Addressable, either with one of the Prefabs, or in its own space, thereby putting the material and its dependencies in a separate Addressable group. - -**Resolution**: If this check discovers any issues, running the fix operation on this rule creates a new Addressable group in which to move all dependent assets. - -**Exceptions**: If you have an asset containing multiple objects, it is possible for different groups to only pull in portions of the asset, and not actually duplicate. An FBX with many meshes is an example of this. If one mesh is in "GroupA" and another is in "GroupB", this rule will think that the FBX is shared, and extract it into its own group if you run the fix operation. In this edge case, running the fix operation is actually harmful, as neither group would have the full FBX asset. - -Also note that duplicate assets may not always be an issue. If assets will never be requested by the same set of users (for example, region-specific assets), then duplicate dependencies may be desired, or at least inconsequential. Each Project is unique, so fixing duplicate asset dependencies should be evaluated on a case by case basis. - -### Unfixable rules -#### Check Resources to Addressable Duplicate Dependencies -This rule detects if any assets or asset dependencies are duplicated between built Addressable data and assets residing in a `Resources` folder. - -**Issues**: These duplications mean that data will be included in both the application build and the Addressables build. - -**Resolution**: This rule is unfixable, because no appropriate action exists. It is purely informational, alerting you to the redundancy. You must decide how to proceed and what action to take, if any. One example of a possible manual fix is to move the offending asset(s) out of the _Resources_ folder, and make them Addressable. - -#### Check Scene to Addressable Duplicate Dependencies -This rule detects any assets or asset dependencies that are shared between the Scenes in the Editor Scene list and Addressables. - -**Issues**: These duplications mean that data will be included in both the application build and the Addressables build. - -**Resolution**: It is purely informational, alerting you to the redundancy. You must decide how to proceed and what action to take, if any. One example of a possible manual fix is to pull the built-in Scene(s) with duplicated references out of Build Settings and make it an Addressable Scene. - -## Extending Analyze -Each unique Project may require additional Analyze rules beyond what comes pre-packaged. The Addressable Assets System allows you to create your own custom rule classes. - -### AnalyzeRule objects -Create a new child class of the `AnalyzeRule` class, overriding the following properties: - -* `CanFix` tells Analyze if the rule is deemed fixable or not. -* `ruleName` is the display name you'll see for this rule in the **Analyze window**. - -You'll also need to override the following methods, which are detailed below: - -* `List RefreshAnalysis(AddressableAssetSettings settings)` -* `void FixIssues(AddressableAssetSettings settings)` -* `void ClearAnalysis()`. - -**Note**: If your rule is designated unfixable, you don't have to override the `FixIssues` method. - -#### RefreshAnalysis -This is your analyze operation. In this method, perform any calculations you'd like and cache any data you might need for a potential fix. The return value is a `List` list. After you'd gathered your data, create a new `AnalyzeResult` for each entry in your analysis, containing the data as a string for the first parameter and a `MessageType` for the second (to optionally designate the message type as a warning or error). Return the list of objects you create. - -If you need to make child elements in the `TreeView` for a particular `AnalyzeResult` object, you can delineate the parent item and any children with `kDelimiter`. Include the delimiter between the parent and child items. - -#### FixIssues -This is your fix operation. If there is an appropriate action to take in response to the analyze step, execute it here. - -#### ClearAnalysis -This is your clear operation. Any data you cached in the analyze step can be cleaned or removed in this function. The `TreeView` will update to reflect the lack of data. - -### Adding custom rules to the GUI -A custom rule must register itself with the GUI class using `AnalyzeWindow.RegisterNewRule()`, in order to show up in the **Analyze window**. For example: - -``` -class MyRule : AnalyzeRule {} -[InitializeOnLoad] -class RegisterMyRule -{ - static RegisterMyRule() - { - AnalyzeWindow.RegisterNewRule(); - } -} -``` diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/AddressableAssetsAsyncOperationHandle.md b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/AddressableAssetsAsyncOperationHandle.md deleted file mode 100644 index 1611f5c5..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/AddressableAssetsAsyncOperationHandle.md +++ /dev/null @@ -1,70 +0,0 @@ -# Async operation handling -Several methods from the `Addressables` API return an `AsyncOperationHandle` struct. The main purpose of this handle is to allow access to the status and result of an operation. The result of the operation is valid until you call `Addressables.Release` or `Addressables.ReleaseInstance` with the operation (for more information on releasing assets, see documentation on [memory management](MemoryManagement.md). - -When the operation completes, the `AsyncOperationHandle.Status` property is either `AsyncOperationStatus.Succeeded` or `AsyncOperationStatus.Failed`. If successful, you can access the result through the `AsyncOperationHandle.Result` property. - -You can either check the operation status periodically, or register for a completed callback using the `AsyncOperationHandle.Complete` event. When you no longer need the asset provided by a returned `AsyncOperationHandle` struct, you should [release](MemoryManagement.md) it using the `Addressables.Release` method. - -### Type vs typeless handles -Most `Addressables` API methods return a generic `AsyncOperationHandle`struct, allowing type safety for the `AsyncOperationHandle.Completed` event, and for the `AsyncOperationHandle.Result` object. There is also a non-generic `AsyncOperationHandle` struct, and you can convert between the two handles as desired. - -Note that a runtime exception occurs if you attempt to cast a non-generic handle to a generic handle of an incorrect type. For example: - -``` -AsyncOperationHandle textureHandle = Addressables.LoadAssetAsync("mytexture"); - -// Convert the AsyncOperationHandle to an AsyncOperationHandle: -AsyncOperationHandle nonGenericHandle = textureHandle; - -// Convert the AsyncOperationHandle to an AsyncOperationHandle: -AsyncOperationHandle textureHandle2 = nonGenericHandle.Convert(); - -// This will throw and exception because Texture2D is required: -AsyncOperationHandle textureHandle3 = nonGenericHandle.Convert(); -``` - -### AsyncOperationHandle use case examples -Register a listener for completion events using the `AsyncOperationHandle.Completed` callback: - -``` -private void TextureHandle_Completed(AsyncOperationHandle handle) { - if (handle.Status == AsyncOperationStatus.Succeeded) { - Texture2D result = handle.Result; - // The texture is ready for use. - } -} - -void Start() { - AsyncOperationHandle textureHandle = Addressables.LoadAsset("mytexture"); - textureHandle.Completed += TextureHandle_Completed; -} -``` - -`AsyncOperationHandle` implements `IEnumerator` so it can be yielded in coroutines: - -``` -public IEnumerator Start() { - AsyncOperationHandle handle = Addressables.LoadAssetAsync("mytexture"); - yield return handle; - if (handle.Status == AsyncOperationStatus.Succeeded) { - Texture2D texture = handle.Result; - // The texture is ready for use. - // ... - // Release the asset after its use: - Addressables.Release(handle); - } -} -``` - -Addressables also supports asynchronous `await` through the `AsyncOperationHandle.Task` property: - -``` -public async Start() { - AsyncOperationHandle handle = Addressables.LoadAssetAsync("mytexture"); - await handle.Task; - // The task is complete. Be sure to check the Status is succeessful before storing the Result. -} -``` - -#### Please Note: -Loading scenes with `SceneManager.LoadSceneAsync` with `allowSceneActivation` set to false or using `Addressables.LoadSceneAsync` and passing in false for the `activateOnLoad` parameter can lead to subsequent async operations being blocked and unable to complete. Please checkout the `allowSceneActivation` documentation here: https://docs.unity3d.com/ScriptReference/AsyncOperation-allowSceneActivation.html diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/AddressableAssetsCustomOperation.md b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/AddressableAssetsCustomOperation.md deleted file mode 100644 index f3122913..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/AddressableAssetsCustomOperation.md +++ /dev/null @@ -1,16 +0,0 @@ -# Custom operations -The [`IResourceProvider`](../api/UnityEngine.ResourceManagement.ResourceProviders.IResourceProvider.html) API allows you to extend the loading process by defining locations and dependencies in a data-driven manner. - -In some cases, you might want to create a custom operation. The `IResourceProvider` API is internally built on top of these custom operations. - -### Creating custom operations -Create custom operations by deriving from the [`AsyncOperationBase`](../api/UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationBase-1.html) class and overriding the desired virtual methods. You can pass the derived operation to the `ResourceManager.StartOperation` method to start the operation and receive an `AsyncOperationHandle` struct. Operations started this way are registered with the `ResourceManager` and appear in the [Addressables Profiler](MemoryManagement.md#the-addressable-profiler). - -#### Executing the operation -The `ResourceManager` invokes the `AsyncOperationBase.Execute` method for your custom operation once the optional dependent operation completes. - -#### Completion handling -When your custom operation completes, call `AsyncOperationBase.Complete` on your custom operation object. You can call this within the `Execute` method or defer it to outside the call. Calling `AsyncOperationBase.Complete` notifies the `ResourceManager` that the operation is complete and will invoke the associated `AsyncOperationHandle.Completed` events. - -#### Terminating the operation -The `ResourceManager` invokes `AsyncOperationBase.Destroy` method for your custom operation when you release the `AsyncOperationHandle` that references it. This is where you should release any memory or resources associated with your custom operation. diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/AddressableAssetsDevelopmentCycle.md b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/AddressableAssetsDevelopmentCycle.md deleted file mode 100644 index 5c615268..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/AddressableAssetsDevelopmentCycle.md +++ /dev/null @@ -1,158 +0,0 @@ -# Addressable Assets development cycle -One of the key benefits of Addressable Assets is decoupling how you arrange, build, and load your content. Traditionally, these facets of development are heavily tied together. - -## Traditional asset management -If you arrange content in _Resources_ directories, it gets built into the base application and you must load the content using the [`Resources.Load`](https://docs.unity3d.com/ScriptReference/Resources.Load.html) method, supplying the path to the resource. To access content stored elsewhere, you would use direct references or asset bundles. If you use asset bundles, you would again load by path, tying your load and organization strategies together. If your asset bundles are remote, or have dependencies on other bundles, you have to write code to manage downloading, loading, and unloading all of your bundles. - -## Addressable Asset management -Giving an asset an address allows you to load it using that address, no matter where it is in your Project or how you built the asset. You can change an Addressable Asset’s path or filename without issue. You can also move the Addressable Asset from the _Resources_ folder, or from a local build destination, to some other build location (including remote ones), without ever changing your loading code. - -### Asset group schemas -Schemas define a set of data. You can attach schemas to asset groups in the Inspector. The set of schemas attached to a group defines how the build processes its contents. For example, when building in packed mode, groups with the `BundledAssetGroupSchema` schema attached to them act as sources for asset bundles. You can combine sets of schemas into templates that you use to define new groups. You can add schema templates via the `AddressableAssetsSettings` Inspector. - -## Build scripts -Build scripts are represented as [`ScriptableObject`](https://docs.unity3d.com/Manual/class-ScriptableObject.html) assets in the Project that implement the [`IDataBuilder`](../api/UnityEditor.AddressableAssets.Build.IDataBuilder.html) interface. Users can create their own build scripts and add them to the `AddressableAssetSettings` object through its Inspector. To apply a build script in the **Addressables window** (**Window** > **Asset Management** > **Addressables**), select **Build Script**, and choose a dropdown option. Currently, there are three scripts implemented to support the full application build, and three Play mode scripts for iterating in the Editor. - -### Play mode scripts -The Addressable Assets package has three build scripts that create Play mode data to help you accelerate app development. - -#### Fast mode -Fast mode (`BuildScriptFastMode`) allows you to run the game quickly as you work through the flow of your game. Fast mode loads assets directly through the asset database for quick iteration with no analysis or asset bundle creation. - -#### Virtual mode -Virtual mode (`BuildScriptVirtualMode`) analyzes content for layout and dependencies without creating asset bundles. Assets load from the asset database though the `ResourceManager`, as if they were loaded through bundles. To see when bundles load or unload during game play, view the asset usage in the [**Addressable Profiler window**](MemoryManagement.md#the-addressable-profiler) (**Window** > **Asset Management** > **Addressable Profiler**). - -Virtual mode helps you simulate load strategies and tweak your content groups to find the right balance for a production release. - -#### Packed Play mode -Packed Play mode (`BuildScriptPackedPlayMode`) uses asset bundles that are already built. This mode most closely matches a deployed application build, but it requires you to build the data as a separate step. If you aren't modifying assets, this mode is the fastest since it does not process any data when entering Play mode. You must either build the content for this mode in the **Addressables window** (**Window** > **Asset Management** > **Addressables**) by selecting **Build** > **Build Player Content**, or using the `AddressableAssetSettings.BuildPlayerContent()` method in your game script. - -#### Choosing the right script -To apply a Play mode script, from the **Addressables window** menu (**Window** > **Asset Management** > **Addressables**), select **Play Mode Script** and choose from the dropdown options. Each mode has its own time and place during development and deployment. The following table illustrates stages of the development cycle, in which a particular mode is useful. - -| | **Design** | **Develop** | **Build** | **Test / Play** | **Publish** | -|:---|:---|:---|:---|:---|:---| -| Fast | x | x | | In-Editor only | | -| Virtual | x | x | Asset bundle layout | In-Editor only | | -| Packed | | | Asset bundles | x | x | - -## Analysis and debugging -By default, Addressable Assets only logs warnings and errors. You can enable detailed logging by opening the **Player** settings window (**Edit** > **Project Settings** > **Player**), navigating to the **Other Settings** > **Configuration** section, and adding "`ADDRESSABLES_LOG_ALL`" to the **Scripting Define Symbols** field. - -You can also disable exceptions by unchecking the **Log Runtime Exceptions** option in the `AddressableAssetSettings` object Inspector. You can implement the [`ResourceManager.ExceptionHandler`](../api/UnityEngine.ResourceManagement.ResourceManager.html) property with your own exception handler if desired, but this should be done after Addressables finishes runtime initialization (see below). - -## Initialization objects -You can attach objects to the Addressable Assets settings and pass them to the initialization process at runtime. The `CacheInitializationSettings` object controls Unity's caching API at runtime. To create your own initialization object, create a ScriptableObject that implements the [`IObjectInitializationDataProvider`](../api/UnityEngine.ResourceManagement.Util.IObjectInitializationDataProvider.html) interface. This is the Editor component of the system responsible for creating the `ObjectInitializationData` that is serialized with the runtime data. - -## Content update workflow -Unity recommends structuring your game content into two categories: - -* **Static** content that you never expect to update. -* **Dynamic** content that you expect to update. - -In this structure, static content ships with the application (or downloads soon after install), and resides in very few large bundles. Dynamic content resides online, ideally in smaller bundles to minimize the amount of data needed for each update. One of the goals of the Addressable Assets System is to make this structure easy to work with and modify without having to change your scripts. - -However, the Addressable Assets System can also accommodate situations that require changes to the "static" content, when you don't want to publish a whole new application build. - -### How it works -Addressables uses a content catalog to map an address to each asset, specifying where and how to load it. In order to provide your app with the ability to modify that mapping, your original app must be aware of an online copy of this catalog. To set that up, enable the **Build Remote Catalog** setting on the `AddressableAssetSettings` Inspector. This ensures that a copy of the catalog gets built to and loaded from the specified paths. This load path cannot change once your app has shipped. The content update process creates a new version of the catalog (with the same file name) to overwrite the file at the previously specified load path. - -Building an application generates a unique app content version string, which identifies what content catalog each app should load. A given server can contain catalogs of multiple versions of your app without conflict. We store the data we need in the _addressables_content_state.bin_ file. This includes the version string, along with hash information for any asset that is contained in a group marked as `StaticContent`. By default, this file is located in the same folder as your _AddressableAssetSettings.asset_ file. - -The _addressables_content_state.bin_ file contains hash and dependency information for every `StaticContent` asset group in the Addressables system. All groups building to the _StreamingAssets_ folder should be marked as `StaticContent`, though large remote groups may also benefit from this designation. During the next step (preparing for content update, described below), this hash information determines if any `StaticContent` groups contain changed assets, and thus need those assets moved elsewhere. - -### Preparing for content updates -If you have modified assets in any `StaticContent` groups, you'll need to run the **Prepare For Content Update** command. This will take any modified asset out of the static groups and move them to a new group. To generate the new asset groups: - -1. Open the **Addressables window** in the Unity Editor (**Window** > **Asset Management** > **Addressable Assets**). -2. In the **Addressables window**, select **Build** on the top menu bar, then **Prepare For Content Update**. -3. In the **Build Data File** dialog that opens, select the _addressables_content_state.bin_ file (by default, this is located in the _Assets/AddressableAssetsData_ Project directory. - -This data is used to determine which assets or dependencies have been modified since the application was last built. The system moves these assets to a new group in preparation for the content update build. - -**Note**: This command will do nothing if all your changes are confined to non-static groups. - -**Important**: Before running the prepare operation, Unity recommends branching your version control system. The prepare operation rearranges your asset groups in a way suited for updating content. Branching ensures that next time you ship a new player, you can return to your preferred content arrangement. - -### Building for content updates -To build for a content update: - -1. Open the **Addressables window** in the Unity Editor (**Window** > **Asset Management** > **Addressable Assets**). -2. In the **Addressables window**, select **Build** on the top menu, then **Build For Content Update**. -3. In the **Build Data File** dialog that opens, select the build folder of an existing application build. The build folder must contain an _addressables_content_state.bin_ file. - -The build generates a content catalog, a hash file, and the asset bundles. - -The generated content catalog has the same name as the catalog in the selected application build, overwriting the old catalog and hash file. The application loads the hash file to determine if a new catalog is available. The system loads unmodified assets from existing bundles that were shipped with the application or already downloaded. - -The system uses the content version string and location information from the _addressables_content_state.bin_ file to create the asset bundles. Asset bundles that do not contain updated content are written using the same file names as those in the build selected for the update. If an asset bundle contains updated content, a new asset bundle is generated that contains the updated content, with a new file name so that it can coexist with the original. Only asset bundles with new file names must be copied to the location that hosts your content. - -The system also builds asset bundles for static content, but you do not need to upload them to the content hosting location, as no Addressables asset entries reference them. - -### Content update examples -In this example, a shipped application is aware of the following groups: - -| **`Local_Static`** | **`Remote_Static`** | **`Remote_NonStatic`** | -|:---------|:---------|:---------| -| `AssetA` | `AssetL` | `AssetX` | -| `AssetB` | `AssetM` | `AssetY` | -| `AssetC` | `AssetN` | `AssetZ` | - -As this version is live, there are players that have `Local_Static` on their devices, and potentially have either or both of the remote bundles cached locally. - -If you modify one asset from each group (`AssetA`, `AssetL`, and `AssetX`), then run **Prepare For Content Update**, the results in your local Addressable settings are now: - -| **`Local_Static`** | **`Remote_Static`** | **`Remote_NonStatic`** | **`content_update_group (non-static)`** | -|:---------|:---------|:---------|:---------| -| | | `AssetX` | `AssetA` | -| `AssetB` | `AssetM` | `AssetY` | `AssetL` | -| `AssetC` | `AssetN` | `AssetZ` | | - -Note that the prepare operation actually edits the static groups, which may seem counter intuitive. The key, however, is that the system builds the above layout, but discards the build results for any static groups. As such, you end up with the following from a player's perspective: - -| **`Local_Static`** | -|:---------| -| `AssetA` | -| `AssetB` | -| `AssetC` | - -The `Local_Static` bundle is already on player devices, which you can't change. This old version of `AssetA` is no longer referenced. Instead, it is stuck on player devices as dead data. - -| **`Remote_Static`** | -|:---------| -| `AssetL` | -| `AssetM` | -| `AssetN` | - -The `Remote_Static` bundle is unchanged. If it is not already cached on a player's device, it will download when `AssetM` or `AssetN` is requested. Like `AssetA`, this old version of `AssetL` is no longer referenced. - -| **`Remote_NonStatic`** (old) | -|:---------| -| `AssetX` | -| `AssetY` | -| `AssetZ` | - -The `Remote_NonStatic` bundle is now old. You could delete it from the server, but either way it will not be downloaded from this point forward. If cached, it will eventually leave the cache. Like `AssetA` and `AssetL`, this old version of `AssetX` is no longer referenced. - -| **`Remote_NonStatic`** (new) | -|:---------| -| `AssetX` | -| `AssetY` | -| `AssetZ` | - -The old `Remote_NonStatic` bundle is replaced with a new version, distinguished by its hash file. The modified version of `AssetX` is updated with this new bundle. - -| **`content_update_group`** | -|:---------| -| `AssetA` | -| `AssetL` | - -The `content_update_group` bundle consists of the modified assets that will be referenced moving forward. - -Here are the implications of this example: - -1. Any changed local assets remain unused on the user's device forever. -2. If the user already cached a non-static bundle, they will need to re-download the bundle, including the unchanged assets (in this instance, for example, `AssetY` and `AssetZ`). Ideally, the user has not cached the bundle, in which case they simply need to download the new `Remote_NonStatic` bundle. -3. If the user has already cached the `Static_Remote` bundle, they only need to download the updated asset (in this instance, `AssetL` via `content_update_group`). This is ideal in this case. If the user has not cached the bundle, they must download both the new `AssetL` via `content_update_group` and the now-defunct `AssetL` via the untouched `Remote_Static` bundle. Regardless of the initial cache state, at some point the user will have the defunct `AssetL` on their device, cached indefinitely despite never being accessed. - -The best setup for your remote content will depend on your specific use case. diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/AddressableAssetsGettingStarted.md b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/AddressableAssetsGettingStarted.md deleted file mode 100644 index ea2167dc..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/AddressableAssetsGettingStarted.md +++ /dev/null @@ -1,135 +0,0 @@ -# Getting started with Addressable Assets -## Installing the Addressable Assets package - -**Important**: The Addressable Asset System requires Unity version 2018.3 or later. - -To install this package, follow the instructions in the [Package Manager documentation](https://docs.unity3d.com/Packages/com.unity.package-manager-ui@1.7/manual/index.html). - -## Preparing Addressable Assets -### Marking assets as Addressable -There are two ways to mark an asset as Addressable in the Unity Editor: - -* In the object's Inspector. -* In the **Addressables window**. - -#### Using the Inspector -In your **Project window**, select the desired asset to view its Inspector. In the Inspector, click the **Address** checkbox and enter a name by which to identify the asset. - -![Marking an asset as Addressable in the Inspector window.](images/inspectorcheckbox.png) - -#### Using the Addressables window -Select **Window** > **Asset Management** > **Addressables** to open the **Addressables window**. Next, drag the desired asset from your **Project window** into one of the asset groups in the **Addressables window**. - -![Marking an asset as Addressable in the Addressables window.](images/addressableswindow.png) - -### Specifying an address -The default address for your asset is the path to the asset in your Project (for example, _Assets/images/myImage.png_). To change the asset's address from the **Addressables window**, right-click the asset and select **Rename**. - -When you first start using Addressable Assets, the system saves some edit-time and run-time data assets for your Project in the _Assets/AddressableAssetsData_ file, which should be added to your version control check-in. - -### Building your Addressable content -The Addressables Asset System needs to build your content into files that can be consumed by the running game before you build the application. This step is not automatic. You can build this content via the Editor or API: - -* To build content in the Editor, open the **Addressables window**, then select **Build** > **Build Player Content**. -* To build content using the API, use [`AddressableAssetSettings.BuildPlayerContent()`](../api/UnityEditor.AddressableAssets.Settings.AddressableAssetSettings.html#methods). - -## Using Addressable Assets -### Loading or instantiating by address -You can load or instantiate an Addressable Asset at run-time. Loading an asset loads all dependencies into memory (including the asset's bundle data if applicable), allowing you to use the asset when you need to. This does not actually put the desired asset into your scene. To add the asset to your scene you must instantiate. Using Addressables instantiation intefraces will load the asset, then immediately adds it to your Scene. - -To access an asset from your game script using a string address, declare the `UnityEngine.AddressableAssets` namespace, then call the following methods: - -``` -Addressables.LoadAssetAsync("AssetAddress"); -``` - -This loads the asset with the specified address. - -``` -Addressables.InstantiateAsync("AssetAddress"); -``` - -This instantiates the asset with the specified address into your Scene. - -**Note**: `LoadAssetAsync` and `InstantiateAsync` are asynchronous operations. You may provide a callback to work with the asset when it finishes loading (see documentation on [**Async operation handling**](AddressableAssetsAsyncOperationHandle) for more information). - -``` -using System.Collections; -using System.Collections.Generic; -using UnityEngine.AddressableAssets; -using UnityEngine; - -public class AddressablesExample : MonoBehaviour { - - GameObject myGameObject; - - ... - Addressables.LoadAssetAsync("AssetAddress").Completed += OnLoadDone; - } - - private void OnLoadDone(UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle obj) - { - // In a production environment, you should add exception handling to catch scenarios such as a null result. - myGameObject = obj.Result; - } -} -``` - -#### Sub-assets and components -Sub-assets and components are special cases for asset loading. - -* **Components**: You cannot load a GameObject's component directly as an asset. You must load or instantiate the GameObject, then retrieve the component reference from it. -* **Sub-assets**: The system supports loading sub-assets, but requires special syntax. Examples of potential sub-assets include sprites in a sprite sheet, or animation clips in an FBX file. To load them, use the following example syntax: - -`Addressables.LoadAssetAsync>("MySpriteSheetAddress");` - -### Using the AssetReference class -The `AssetReference` class provides a way to access Addressable Assets without needing to know their addresses. To access an Addressable Asset using the `AssetReference` class: - -1. Select a GameObject from your Scene hierarchy or **Project window**. -2. In the Inspector, click the **Add Component** button, then select the component type. Any serializable component can support an `AssetReference` variable (for example, a game script, ScriptableObject, or other serializable class). -3. Add a public `AssetReference` variable in the component (for example, `public AssetReference explosion;`). -4. In the Inspector, select which Addressable Asset to link to the object, by either dragging the asset from the **Project window** into the exposed `AssetReference` field, or choosing from the dropdown of previously defined Addressable Assets in your Project (shown below). - -![Referencing an Addressable Asset via script component.](images/Inspectorreferenceselection2.png) - -To load or instantiate an `AssetReference` asset, call its corresponding method. For example: - -``` -AssetRefMember.LoadAssetAsync(); -``` - -or - -``` -AssetRefMember.InstantiateAsync(pos, rot); -``` - -**Note**: As with normal Addressable Assets, `LoadAssetAsync` and `InstantiateAsync` are asynchronous operations. You may provide a callback to work with the asset when it finishes loading (see documentation on [**Async operation handling**](AddressableAssetsAsyncOperationHandle) for more information). - -## Build considerations -### Local data in StreamingAssets -The Addressable Asset System needs some files at runtime to know what to load and how to load it. Those files are generated when you build Addressables data and wind up in the _StreamingAssets_ folder, which is a special folder in Unity that includes all its files in the build. When you build Addressables content, the system stages those files in the Library. Then, when you build the application, the system copies the required files over to _StreamingAssets_, builds, and deletes them from the folder. This way, you can build data for multiple platforms while only having the relevant data included in each build. - -In addition to the Addressables-specific data, any groups that build their data for local use will also use the Library platform-specific staging location. To verify that this works, set your build path and load paths to profile variables starting with `[UnityEngine.AddressableAssets.Addressables.BuildPath]` and `{UnityEngine.AddressableAssets.Addressables.RuntimePath}` respectively. You can specify these settings in the `AddressableAssetSettings` Inspector (by default, this object is located in your Project's _Assets/AddressableAssetsData_ directory). - -### Downloading in Advance -Calling the `Addressables.DownloadDependenciesAsync()` method loads the dependencies for the address or label that you pass in. Typically, this is the asset bundle. - -The [`AsyncOperationHandle`](AddressableAssetsAsyncOperationHandle.md) struct returned by this call includes a `PercentComplete` attribute that you can use to monitor and display download progress. You can also have the app wait until the content has loaded. - -If you wish to ask the user for consent prior to download, use `Addressables.GetDownloadSize()` to return how much space is needed to download the content from a given address or label. Note that this takes into account any previously downloaded bundles that are still in Unity's asset bundle cache. - -While it can be advantageous to download assets for your app in advance, there are instances where you might choose not do so. For example: - -* If your app has a large amount of online content, and you generally expect users to only ever interact with a portion of it. -* You have an app that must be connected online to function. If all your app's content is in small bundles, you might choose to download content as needed. - -Rather than using the percent complete value to wait until the content is loaded, you can use the preload functionality to show that the download has started, then continue on. This implementation would require a loading or waiting screen to handle instances where the asset has not finished loading by the time it's needed. - -### Building for multiple platforms -The Addressable Asset System generates asset bundles containing your Addressable Assets when building application content. Asset bundles are platform-dependant, and thus must be rebuilt for every unique platform you intend to support. - -By default, when building Addressables app data, data for your given platform is stored in platform-specific subdirectories of the Addressables build path(s). The runtime path accounts for these platform folders, and points to the applicable app data. - -**Note**: If you use the Addressables `BuildScriptPackedPlayMode` script in the Editor Play mode, Addressables will attempt to load data for your current active build target. As such, issues may arise if your current build target data isn't compatible with your current Editor platform. For more information, see documentation on [Play mode scripts](AddressableAssetsDevelopmentCycle.md#play-mode-scripts). diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/AddressableAssetsHostingServices.md b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/AddressableAssetsHostingServices.md deleted file mode 100644 index 1dad454b..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/AddressableAssetsHostingServices.md +++ /dev/null @@ -1,89 +0,0 @@ -# Asset Hosting Services -## Overview -Hosting Services provide an integrated facility for using Addressable Assets configuration data to serve packed content to local or network-connected application builds from within the Unity Editor. Hosting Services are designed to improve iteration velocity when testing packed content, and can also be used to serve content to connected clients on local and remote networks. - -### Packed mode testing and iteration -Moving from Editor Play mode testing to platform application build testing introduces complexities and time costs to the development process. Hosting Services provide extensible Editor-embedded content delivery services that map directly to your Addressables group configuration. Using a custom Addressables profile, you can quickly configure your application to load all content from the Unity Editor itself. This includes builds deployed to mobile devices, or any other platform, that have network access to your development system. - -### Turn-key content server -You can deploy Asset Hosting Services into a server environment by running in batch mode (headless) to host content for both intranet- and internet-facing Unity application clients. - -## Setup -This article details the initial setup of Asset Hosting Services for your Project. While the setup guide focuses on Editor workflows, you can use the API to configure Hosting Services by setting the `HostingServicesManager` property of the [`AddressableAssetSettings`](../api/UnityEditor.AddressableAssets.Settings.AddressableAssetSettings.html) class. - -### Configuring a new Hosting Service -Use the **Hosting window** to add, configure, and enable new Hosting Services. In the Editor, select **Window** > **Asset Management** > **Hosting Services**, or click the **Hosting** button from the **Addressables window** menu to access the **Hosting window**. - -![The Hosting window.](images/HostingServicesWindow_1.png) - -To add a new Hosting Service, click the **Add Service** button. - -![Adding a new Hosting Service.](images/HostingServicesAddService_1.png) - -In the **Add Service** dialog that appears, you can select a predefined service type or define a custom service type. To use a predefined service type, choose from the **Service Type** drop-down options. Use the **Descriptive Name** field enter a name for the service. - -**Note**: For more information on implementing custom hosting service types, see the section on [custom services](#custom-services). - -The newly added service appears in the **Hosting Services** section of the **Hosting window**, and defaults to the disabled state. To initiate the service, click the **Enable Service** button. - -![The updated Hosting window after adding a service.](images/HostingServicesWindow_2.png) - -The HTTP Hosting Service automatically assigns a port number when it starts. The port number is saved and reused between Unity sessions. To choose a different port, either assign a specific port number in the **Port** field, or use the **Reset** button to randomly assign a different port. - -**Note**: If you reset the port number, you must execute a full application build to generate and embed the correct URL. - -The HTTP Hosting Service is now enabled and ready to serve content from the directory specified in the `BuildPath` of each asset group. - -### Profile setup -When working with Hosting Services during development, Unity recommends creating a profile that configures all asset groups to load content from the Hosting Service using a directory or directories created specifically for that purpose. - -In the **Addressables window** menu (**Window** > **Asset Management** > **Addressable Assets**), select **Profiles** > **Inspect Profile Settings**. You can also access these settings via the `AddressableAssetSettings` Inspector. - -Next, create a new profile. In the following example, the new profile is called "Editor Hosted". - -![Creating a service profile.](images/HostingServicesProfiles_1.png) - -Modify the loading path fields to instead load from the Hosting Service. `HttpHostingService` is a URL that uses the local IP address and the port assigned to the service. From the **Hosting window**, you can use the profile variables named `PrivateIpAddress` and `HostingServicePort` to construct the url (for example, `http://[PrivateIpAddress]:[HostingServicePort]`). - -Additionally, you should modify all build path variables to point to a common directory outside of the Project's _Assets_ folder. - -![Configuring the service's profile.](images/HostingServicesProfiles_2.png) - -Verify that each group is configured correctly. Ensure that the `BuildPath` and `LoadPath` paths are set to their respective profile keys that are modified for use with Hosting Services. In this example, you can see how the profile variables in the `LoadPath` are expanded to build a correct base URL for loading from Hosted Services. - -![Inspecting the service's load paths.](images/HostingServicesGroups_1.png) - -Finally, select the new profile from the **Addressables window**, create a build, and deploy to the target device. The Unity Editor now serves all load requests from the application through the `HttpHostingService` service. You can now make additions and changes to content without redeployment. Rebuild the Addressable content, and relaunch the already deployed application to refresh the content. - -![Selecting a Hosting Service profile.](images/HostingServicesProfiles_3.png) - -### Batch mode -You can also use Hosting Services to serve content from the Unity Editor running in batch mode. To do so, launch Unity from the command line with the following options: - -``` --batchMode -executeMethod UnityEditor.AddressableAssets.HostingServicesManager.BatchMode -``` - -This loads the Hosting Services configuration from the default `AddressableAssetSettings` object, and starts all configured services. - -To use an alternative `AddressableAssetSettings` configuration, create your own static method entry point, to call through the `UnityEditor.AddressableAssets.HostingServicesManager.BatchMode(AddressableAssetSettings settings)` overload. - - -## Custom Services -Hosting Services are designed to be extensible, allowing you to implement your own custom logic for serving content-loading requests from the Addressable Assets System. For example: - -* Support a custom [`IResourceProvider`](../api/UnityEngine.ResourceManagement.ResourceProviders.IResourceProvider.html) that uses a non-HTTP protocol for downloading content. -* Manage an external process for serving content that matches your production CDN solution (such as an Apache HTTP server). - -### Implementing a custom service -The `HostingServicesManager` can manage any class that implements an `IHostingService` interface (for more details on method parameters and return values, see the [API documentation](../api/UnityEditor.AddressableAssets.IHostingService.html). - -To create a new custom service: - -1. Follow the steps outlined in the [configuring a new Hosting Service](#configuring-a-new-hosting-service) section above to access the **Add Service** dialog. -2. Select **Custom**, then drag and drop the applicable script into the field, or select it from the object picker. The dialog validates that the selected script implements the `IHostingService` interface. -3. To finish adding the service, click the **Add** button. - -Moving forward, your custom service will appear in the **Service Type** drop-down options. - -![Adding a custom Asset Hosting Service.](images/HostingServicesAddService_2.png) diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/AddressableAssetsMigrationGuide.md b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/AddressableAssetsMigrationGuide.md deleted file mode 100644 index dea54701..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/AddressableAssetsMigrationGuide.md +++ /dev/null @@ -1,25 +0,0 @@ -# Upgrading to the Addressables system -This article details how to modify your existing Project to take advantage of Addressable Assets. There are three traditional methods for referencing assets: - -* **[Direct References](#the-direct-reference-method)**: Add assets directly into components or Scenes, which the application loads automatically. -* **[Resource Folders](#the-resource-folders-method)**: Add assets to your _Resource_ folder and load them by filename. -* **[Asset Bundles](#the-asset-bundles-method)**: Add assets to asset bundles, then load them with their dependencies by file path. - -### The direct reference method -To migrate from this approach, follow these steps: - -1. Replace your direct references to objects with asset references (for example, `public GameObject directRefMember;` becomes `public AssetReference AssetRefMember;`). -2. Drag assets onto the appropriate component’s Inspector, as you would for a direct reference. -3. If you'd like to load an asset based on an object rather than a string name, instantiate it directly from the `AssetReference` object you created in your setup (for example, `AssetRefMember.LoadAssetAsync();` or `AssetRefMember.InstantiateAsync(pos, rot);`). - -**Note**: The Addressable Asset System loads assets asynchronously. When you update your direct references to asset references, you must also update your code to operate asynchronously. - -### The Resource folders method -When you mark an asset in a _Resources_ folder as Addressable, the system automatically moves the asset from the _Resources_ folder to a new folder in your Project named _Resources_moved_. The default address for a moved asset is the old path, omitting the folder name. For example, your loading code might change from `Resources.LoadAsync("desert/tank.prefab");` to `Addressables.LoadAssetAsync("desert/tank.prefab");`. - -### The asset bundles method -When you open the **Addressables window**, Unity offers to convert all asset bundles into Addressable Asset groups. This is the easiest way to migrate your code. - -If you choose to convert your Assets manually, click the **Ignore** button. Then, either use the direct reference or resource folder methods previously described. - -The default path for the address of an asset is its file path. If you use the path as the asset's address, you'd load the asset in the same manner as you would load from a bundle. The Addressable Asset System handles the loading of the bundle and all its dependencies. diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/AddressableAssetsOverview.md b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/AddressableAssetsOverview.md deleted file mode 100644 index c2096a4f..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/AddressableAssetsOverview.md +++ /dev/null @@ -1,19 +0,0 @@ -# Addressable Assets Overview -The Addressable Assets System consists of two packages: - -* Addressable Assets package (primary package) -* Scriptable Build Pipeline package (dependency) - -When you install the Addressable Assets package, the Scriptable Build Pipeline package installs at the same time. - -## Concepts -The following concepts are referenced throughout this documentation: - -* **Address**: An asset's location identifier for easy runtime retrieval. -* **`AddressableAssetData` directory**: Stores your Addressable Asset metadata in your Project’s _Assets_ directory. -* **Asset group**: A set of Addressable Assets available for build-time processing. -* **Asset group schema**: Defines a set of data that you can assign to a group and use during the build. -* **`AssetReference`**: An object that operates like a direct reference, but with deferred initialization. The `AssetReference` object stores the GUID as an Addressable that you can load on demand. -* **Asynchronous loading**: Allows the location of the asset and its dependencies to change throughout the course of your development without changing the game code. Asynchronous loading is foundational to the Addressable Asset System. -* **Build script**: Runs asset group processors to package assets, and provides the mapping between addresses and _Resource_ locations for the Resource Manager. -* **Label**: Provides an additional Addressable Asset identifier for runtime loading of similar items (for example, `Addressables.DownloadDependenciesAsync("spaceHazards");`). diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/MemoryManagement.md b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/MemoryManagement.md deleted file mode 100644 index df873a3a..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/MemoryManagement.md +++ /dev/null @@ -1,49 +0,0 @@ -# Memory management -## Mirroring load and unload -When working with Addressable Assets, the primary way to ensure proper memory management is to mirror your load and unload calls correctly. How you do so depends on your asset types and load methods. In all cases, however, the release method can either take the loaded asset, or an operation handle returned by the load. For example, during Scene creation (described below) the load returns a `AsyncOperationHandle`, which you can release via this returned handle, or by keeping up with the `handle.Result` (in this case, a `SceneInstance`). - -### Asset loading -To load an asset, use `Addressables.LoadAssetAsync` or `Addressables.LoadAssetsAsync`. - -This loads the asset into memory without instantiating it. Every time the load call executes, it adds one to the ref-count for each asset loaded. If you call `LoadAssetAsync` three times with the same address, you will get three different instances of an [`AsyncOperationHandle`](../api/UnityEngine.ResourceManagement.AsyncOperations.AsyncOperationHandle.html) struct back, all referencing the same underlying operation. That operation has a ref-count of three for the corresponding asset. If the load succeeds, the resulting `AsyncOperationHandle` struct contains the asset in the `.Result` property. You can use the loaded asset to instantiate using Unity's built-in instantiation methods, which does not increment the Addressables ref-count. - -To unload the asset, use the `Addressables.Release` method, which decrements the ref-count. When a given asset's ref-count is zero, that asset is ready to be unloaded, and decrements the ref-count of any dependencies. - -**Note**: The asset may or may not be unloaded immediately, contingent on existing dependencies. For more information, read the section on [when memory is cleared](#when-is-memory-cleared-). - -### Scene loading -To load a Scene, use `Addressables.LoadSceneAsync`. You can use this method to load a Scene in `Single` mode, which closes all open Scenes, or in `Additive` mode (for more information, see documentation on [Scene mode loading](https://docs.unity3d.com/ScriptReference/SceneManagement.LoadSceneMode.html). - -To unload a Scene, use `Addressables.UnloadSceneAsync`, or open a new Scene in `Single` mode. You can open a new Scene by either using the Addressables interface, or using the `SceneManager.LoadScene` or `SceneManager.LoadSceneAsync` methods. Opening a new Scene closes the current one, properly decrementing the ref-count. - -### GameObject instantiation -To load and instantiate a GameObject asset, use `Addressables.InstantiateAsync`. This instantiates the Prefab located by the specified `location` parameter. The Addressables system will load the Prefab and its dependencies, incrementing the ref-count of all associated assets. - -Calling `InstantiateAsync` three times on the same address results in all dependent assets having a ref-count of three. Unlike calling `LoadAssetAsync` three times, however, each `InstantiateAsync` call returns an `AsyncOperationHandle` pointing to a unique operation. This is because the result of each `InstantiateAsync` is a unique instance. Another distinction between `InstantiateAsync` and other load calls is the optional `trackHandle` parameter. When set to `false`, you must keep the `AsyncOperationHandle` to use while releasing your instance. This is more efficient, but requires more development effort. - -To destroy an instantiated gameObject, use `Addressables.ReleaseInstance`, or close the Scene that contains the instantiated object. This Scene can have been loaded (and thus closed) in `Additive` or `Single` mode. This Scene can also have been loaded using either the `Addressables` or `SceneManagement` API. As noted above, if you set `trackHandle` to `false`, you can only call `Addressables.ReleaseInstance` with the handle, not with the actual GameObject. - -**Note**: If you call `Addressables.ReleaseInstance` on an instance that was not created using the `Addressables` API, or was created with `trackHandle==false`, the system detects that and returns `false` to indicate that the method was unable to release the specified instance. The instance will not be destroyed in this case. - -`Addressables.InstantiateAsync` has some associated overhead, so if you need to instantiate the same objects hundreds of times per frame, consider loading via the `Addressables` API, then instantiating through other methods. In this case, you would call `Addressables.LoadAssetAsync`, then save the result and call `GameObject.Instantiate()` for that result. This allows flexibility to call `Instantiate` in a synchronous way. The downside is that the Addressables system has no knowledge of how many instances you created, which can lead to memory issues if not properly managed. For example, a Prefab referencing a texture would no longer have a valid loaded texture to reference, causing rendering issues (or worse). These sorts of problems can be hard to track down as you may not immediately trigger the memory unload (see section on [clearing memory](#when-is-memory-cleared-), below). - -## The Addressable Profiler -Use the **Addressable Profiler window** to monitor the ref-counts of all Addressables system operations. To access the window in the Editor, select **Window** > **Asset Management** > **Addressable Profiler**. - -**Important**: In order to view data in the profiler, you must enable the **Send Profiler Events** setting in your `AddressableAssetSettings` object's Inspector. - -The following information is available in the profiler: - -* A white vertical line indicates the frame in which a load request occurred. -* A blue background indicates that an asset is currently loaded. -* The green part of the graph indicates an asset's current ref-count. - -## When is memory cleared? -An asset no longer being referenced (indicated by the end of a blue section in the profiler) does not necessarily mean that asset was unloaded. A common applicable scenario involves multiple assets in an asset bundle. For example: - -* You have three assets (`tree`, `tank`, and `cow`) in an asset bundle (`stuff`). -* When `tree` loads, the profiler displays a single ref-count for `tree`, and one for `stuff`. -* Later, when `tank` loads, the profiler displays a single ref-count for both `tree` and `tank`, and two ref-counts for the `stuff` bundle. -* If you release `tree`, it's ref-count becomes zero, and the blue bar goes away. - -In this example, the `tree` asset is not actually unloaded at this point. You can load an asset bundle, or its partial contents, but you cannot partially unload an asset bundle. No asset in `stuff` will unload until the bundle itself is completely unloaded. The exception to this rule is the engine interface [`Resources.UnloadUnusedAssets`](https://docs.unity3d.com/ScriptReference/Resources.UnloadUnusedAssets.html). Executing this method in the above scenario will cause `tree` to unload. Because the Addressables system cannot be aware of these events, the profiler graph only reflects the Addressables ref-counts (not exactly what memory holds). Note that if you choose to use `Resources.UnloadUnusedAssets`, it is a very slow operation, and should only be called on a screen that won't show any hitches (such as a loading screen). diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/TableOfContents.md b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/TableOfContents.md deleted file mode 100644 index b6c862fc..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/TableOfContents.md +++ /dev/null @@ -1,10 +0,0 @@ -* [Addressable Asset System](index) - * [Addressable Assets overview](AddressableAssetsOverview) - * [Getting started](AddressableAssetsGettingStarted) - * [Development cycle](AddressableAssetsDevelopmentCycle) - * [Hosting Services](AddressableAssetsHostingServices) - * [Memory Management](MemoryManagement) - * [Async Operation Handle](AddressableAssetsAsyncOperationHandle) - * [Custom Operations](AddressableAssetsCustomOperation) - * [Analyze](AddressableAssetsAnalyze) - * [Migration Guide](AddressableAssetsMigrationGuide) diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesAddService_1.png b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesAddService_1.png deleted file mode 100644 index 103c9c4f..00000000 Binary files a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesAddService_1.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesAddService_1.png.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesAddService_1.png.meta deleted file mode 100644 index 331b9744..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesAddService_1.png.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: b855c9273a2924ca2a7fc7c5bf2565af -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 7 - 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 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - 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 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesAddService_2.png b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesAddService_2.png deleted file mode 100644 index 18068680..00000000 Binary files a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesAddService_2.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesAddService_2.png.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesAddService_2.png.meta deleted file mode 100644 index 9dc78af0..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesAddService_2.png.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: 731ce7caea6b14c3b8dfc649b60ae3ae -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 7 - 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 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - 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 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesGroups_1.png b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesGroups_1.png deleted file mode 100644 index ea61768b..00000000 Binary files a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesGroups_1.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesGroups_1.png.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesGroups_1.png.meta deleted file mode 100644 index cd9fa9c0..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesGroups_1.png.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: d2bec5581eef4450b82c1d520db604c2 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 7 - 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 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - 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 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesProfiles_1.png b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesProfiles_1.png deleted file mode 100644 index f9cc0769..00000000 Binary files a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesProfiles_1.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesProfiles_1.png.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesProfiles_1.png.meta deleted file mode 100644 index 26d9ab66..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesProfiles_1.png.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: 3b8f63e518f1a4c14b7e22f025f885d6 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 7 - 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 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - 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 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesProfiles_2.png b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesProfiles_2.png deleted file mode 100644 index 2b3e85aa..00000000 Binary files a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesProfiles_2.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesProfiles_2.png.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesProfiles_2.png.meta deleted file mode 100644 index 86a64047..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesProfiles_2.png.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: 127a942f897824ff0884e74f97f45844 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 7 - 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 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - 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 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesProfiles_3.png b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesProfiles_3.png deleted file mode 100644 index 20dd6962..00000000 Binary files a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesProfiles_3.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesProfiles_3.png.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesProfiles_3.png.meta deleted file mode 100644 index e14479b2..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesProfiles_3.png.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: 503decdf700ec4d5787e72a5c5497e98 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 7 - 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 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - 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 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesWindow_1.png b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesWindow_1.png deleted file mode 100644 index bd976f04..00000000 Binary files a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesWindow_1.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesWindow_1.png.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesWindow_1.png.meta deleted file mode 100644 index eab36834..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesWindow_1.png.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: 2bcb5ba40e59e4d2a8d6a7b651994d0c -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 7 - 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 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - 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 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesWindow_2.png b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesWindow_2.png deleted file mode 100644 index cc554692..00000000 Binary files a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesWindow_2.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesWindow_2.png.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesWindow_2.png.meta deleted file mode 100644 index bfbba7c0..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/HostingServicesWindow_2.png.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: d67c623d370194e6e98435d1c7dc15b2 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 7 - 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 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - 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 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/Inspectorreferenceselection1.png b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/Inspectorreferenceselection1.png deleted file mode 100644 index ac4fb3b1..00000000 Binary files a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/Inspectorreferenceselection1.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/Inspectorreferenceselection1.png.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/Inspectorreferenceselection1.png.meta deleted file mode 100644 index dddda276..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/Inspectorreferenceselection1.png.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: f8c497f554ad9d04eaee231687cda3e9 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 7 - 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 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - 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 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/Inspectorreferenceselection2.png b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/Inspectorreferenceselection2.png deleted file mode 100644 index 15ec3bda..00000000 Binary files a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/Inspectorreferenceselection2.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/Inspectorreferenceselection2.png.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/Inspectorreferenceselection2.png.meta deleted file mode 100644 index 7786b655..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/Inspectorreferenceselection2.png.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: a0fc7478c4d38894faae2afc1de98109 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 7 - 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 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - 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 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/addressableswindow.png b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/addressableswindow.png deleted file mode 100644 index 2dc3f410..00000000 Binary files a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/addressableswindow.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/addressableswindow.png.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/addressableswindow.png.meta deleted file mode 100644 index d8f78eee..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/addressableswindow.png.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: 3ec505066001b944a8f3dc4ad7d6cc7c -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 7 - 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 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - 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 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/inspectorcheckbox.png b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/inspectorcheckbox.png deleted file mode 100644 index 1eb98f97..00000000 Binary files a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/inspectorcheckbox.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/inspectorcheckbox.png.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/inspectorcheckbox.png.meta deleted file mode 100644 index 8270753c..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/images/inspectorcheckbox.png.meta +++ /dev/null @@ -1,88 +0,0 @@ -fileFormatVersion: 2 -guid: b6311971a725d264e8842e523a1651b5 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 7 - 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 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - 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 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 0 - pSDShowRemoveMatteOption: 0 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/index.md b/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/index.md deleted file mode 100644 index d935dceb..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Documentation~/index.md +++ /dev/null @@ -1,22 +0,0 @@ -# Unity Addressable Asset System - -The Addressable Asset System provides an easy way to load assets by “address”. It handles asset management overhead by simplifying content pack creation and deployment. - -The Addressable Asset System uses asynchronous loading to support loading from any location with any collection of dependencies. Whether you use direct references, traditional asset bundles, or _Resource_ folders for asset management, Addressable Assets provide a simpler way to make your game more dynamic. - -## What is an asset? -An asset is content that you use to create your game or app. Common examples of assets include Prefabs, textures, materials, audio clips, and animations. - -## What is an Addressable Asset? -Making an asset "Addressable" allows you to use that asset's unique address to call it from anywhere. Whether that asset resides in the local application or on a content delivery network, the Addressable Asset System locates and returns it. You can load a single Addressable Asset via its address, or load many Addressable Assets using a custom group label that you define. - -## Why use Addressable Assets? -Traditional means of structuring game assets make it challenging to efficiently load content. Addressables shorten your iteration cycles, allowing you to devote more time to designing, coding, and testing your application. - -* **Iteration time**: Referring to content by its address is extremely efficient. Optimizations to the content no longer require changes to your code. -* **Dependency management**: The system returns all dependencies of the requested content, so that all meshes, shaders, animations, and so forth load before returning the content to you. -* **Memory management**: The system unloads assets as well as loading them, counting references automatically and providing a robust profiler to help you spot potential memory problems. -* **Content packing**: Because the system maps and understands complex dependency chains, it allows for efficient packing of bundles, even when moving or renaming assets. You can easily prepare assets for both local and remote deployment, to support downloadable content and reduced application size. - -## What about my existing game? -The Addressable Asset System provides a [migration path](AddressableAssetsMigrationGuide.md) for upgrading, whether you use direct references, _Resource_ folders, or asset bundles. diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor.meta deleted file mode 100644 index 465782bb..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: b38733bdad235b34b993286370a11791 -folderAsset: yes -timeCreated: 1498750562 -licenseType: Pro -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/AddressableAssetSettingsDefaultObject.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/AddressableAssetSettingsDefaultObject.cs deleted file mode 100644 index eea0a978..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/AddressableAssetSettingsDefaultObject.cs +++ /dev/null @@ -1,174 +0,0 @@ -using System; -using UnityEditor; -using UnityEditor.AddressableAssets.Settings; -using UnityEngine; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets -{ - /// - /// Class used to get and set the default Addressable Asset settings object. - /// - public class AddressableAssetSettingsDefaultObject : ScriptableObject - { - /// - /// Default name for the addressable assets settings - /// - public const string kDefaultConfigAssetName = "AddressableAssetSettings"; - /// - /// The default folder for the serialized version of this class. - /// - public const string kDefaultConfigFolder = "Assets/AddressableAssetsData"; - /// - /// The name of the default config object - /// - public const string kDefaultConfigObjectName = "com.unity.addressableassets"; - - /// - /// Default path for addressable asset settings assets. - /// - public static string DefaultAssetPath - { - get - { - return kDefaultConfigFolder + "/" + kDefaultConfigAssetName + ".asset"; - } - } - - [FormerlySerializedAs("m_addressableAssetSettingsGuid")] - [SerializeField] - internal string m_AddressableAssetSettingsGuid; - bool m_LoadingSettingsObject = false; - - internal AddressableAssetSettings LoadSettingsObject() - { - //prevent re-entrant stack overflow - if (m_LoadingSettingsObject) - { - Debug.LogWarning("Detected stack overflow when accessing AddressableAssetSettingsDefaultObject.Settings object."); - return null; - } - if (string.IsNullOrEmpty(m_AddressableAssetSettingsGuid)) - { - Debug.LogError("Invalid guid for default AddressableAssetSettings object."); - return null; - } - var path = AssetDatabase.GUIDToAssetPath(m_AddressableAssetSettingsGuid); - if (string.IsNullOrEmpty(path)) - { - Debug.LogErrorFormat("Unable to determine path for default AddressableAssetSettings object with guid {0}.", m_AddressableAssetSettingsGuid); - return null; - } - m_LoadingSettingsObject = true; - var settings = AssetDatabase.LoadAssetAtPath(path); - if (settings != null) - AddressablesAssetPostProcessor.OnPostProcess = settings.OnPostprocessAllAssets; - m_LoadingSettingsObject = false; - return settings; - } - - void SetSettingsObject(AddressableAssetSettings settings) - { - if (settings == null) - { - m_AddressableAssetSettingsGuid = null; - return; - } - var path = AssetDatabase.GetAssetPath(settings); - if (string.IsNullOrEmpty(path)) - { - Debug.LogErrorFormat("Unable to determine path for default AddressableAssetSettings object with guid {0}.", m_AddressableAssetSettingsGuid); - return; - } - AddressablesAssetPostProcessor.OnPostProcess = settings.OnPostprocessAllAssets; - m_AddressableAssetSettingsGuid = AssetDatabase.AssetPathToGUID(path); - } - - static AddressableAssetSettings s_DefaultSettingsObject; - - /// - /// Used to determine if a default settings asset exists. - /// - public static bool SettingsExists - { - get - { - AddressableAssetSettingsDefaultObject so; - if (EditorBuildSettings.TryGetConfigObject(kDefaultConfigObjectName, out so)) - return !string.IsNullOrEmpty(AssetDatabase.GUIDToAssetPath(so.m_AddressableAssetSettingsGuid)); - return false; - } - } - - /// - /// Gets the default addressable asset settings object. This will return null during editor startup if EditorApplication.isUpdating or EditorApplication.isCompiling are true. - /// - public static AddressableAssetSettings Settings - { - get - { - if (s_DefaultSettingsObject == null && !EditorApplication.isUpdating && !EditorApplication.isCompiling) - { - AddressableAssetSettingsDefaultObject so; - if (EditorBuildSettings.TryGetConfigObject(kDefaultConfigObjectName, out so)) - { - s_DefaultSettingsObject = so.LoadSettingsObject(); - } - else - { - //legacy support, try to get the old config object and then remove it - if (EditorBuildSettings.TryGetConfigObject(kDefaultConfigAssetName, out s_DefaultSettingsObject)) - { - EditorBuildSettings.RemoveConfigObject(kDefaultConfigAssetName); - so = CreateInstance(); - so.SetSettingsObject(s_DefaultSettingsObject); - AssetDatabase.CreateAsset(so, kDefaultConfigFolder + "/DefaultObject.asset"); - EditorUtility.SetDirty(so); - AssetDatabase.SaveAssets(); - EditorBuildSettings.AddConfigObject(kDefaultConfigObjectName, so, true); - } - } - } - return s_DefaultSettingsObject; - } - set - { - if (value != null) - { - var path = AssetDatabase.GetAssetPath(value); - if (string.IsNullOrEmpty(path)) - { - Debug.LogErrorFormat("AddressableAssetSettings object must be saved to an asset before it can be set as the default."); - return; - } - } - - s_DefaultSettingsObject = value; - AddressableAssetSettingsDefaultObject so; - if (!EditorBuildSettings.TryGetConfigObject(kDefaultConfigObjectName, out so)) - { - so = CreateInstance(); - AssetDatabase.CreateAsset(so, kDefaultConfigFolder + "/DefaultObject.asset"); - AssetDatabase.SaveAssets(); - EditorBuildSettings.AddConfigObject(kDefaultConfigObjectName, so, true); - } - so.SetSettingsObject(s_DefaultSettingsObject); - EditorUtility.SetDirty(so); - AssetDatabase.SaveAssets(); - } - } - - /// - /// Gets the settings object with the option to create a new one if it does not exist. - /// - /// If true and no settings object exists, a new one will be created using the default config folder and asset name. - /// The default settings object. - public static AddressableAssetSettings GetSettings(bool create) - { - if (Settings == null && create) - Settings = AddressableAssetSettings.Create(kDefaultConfigFolder, kDefaultConfigAssetName, true, true); - return Settings; - } - - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/AddressableAssetSettingsDefaultObject.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/AddressableAssetSettingsDefaultObject.cs.meta deleted file mode 100644 index 5151bf0f..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/AddressableAssetSettingsDefaultObject.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3a189bb168d8d90478a09ea08c2f3d72 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build.meta deleted file mode 100644 index 34a0be74..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: e449fe7932420f940adb4c9b75596bd2 -folderAsset: yes -timeCreated: 1504023214 -licenseType: Pro -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressableAnalytics.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressableAnalytics.cs deleted file mode 100644 index 526fedb3..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressableAnalytics.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using UnityEditor.AddressableAssets.Settings; -using UnityEngine.Analytics; - -namespace UnityEditor.AddressableAssets -{ - internal static class AddressableAnalytics - { - private const string VendorKey = "unity.addressables"; - private const string EventName = "addressables"; - private static bool _eventRegistered = false; - - [Serializable] - private struct AnalyticsData - { - public string BuildScriptName; - public int NumberOfAddressableAssets; - }; - - internal static void Report(AddressableAssetSettings currentSettings) - { - //The event shouldn't be able to report if this is disabled but if we know we're not going to report - //Lets early out and not waste time gathering all the data - if (!UnityEngine.Analytics.Analytics.enabled) - return; - - ReportImpl(currentSettings); - } - - private static void ReportImpl(AddressableAssetSettings currentSettings) - { - if (!_eventRegistered) - { - //If the event isn't registered, attempt to register it. If unsuccessful, return. - if (!RegisterEvent()) - return; - } - - //Gather how many addressable assets we have - int numberOfAddressableAssets = 0; - foreach (var group in currentSettings.groups) - numberOfAddressableAssets += group.entries.Count; - - AnalyticsData data = new AnalyticsData() - { - BuildScriptName = currentSettings.ActivePlayerDataBuilder.Name, - NumberOfAddressableAssets = numberOfAddressableAssets, - }; - - //Report - EditorAnalytics.SendEventWithLimit(EventName, data); - } - - //Returns true if registering the event was successful - private static bool RegisterEvent() - { - AnalyticsResult registerEvent = EditorAnalytics.RegisterEventWithLimit(EventName, 100, 100, VendorKey); - if (registerEvent == AnalyticsResult.Ok) - _eventRegistered = true; - - return _eventRegistered; - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressableAnalytics.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressableAnalytics.cs.meta deleted file mode 100644 index 15318af7..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressableAnalytics.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3a6ea556a4c75be4a88f236f22eec817 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressablesBuildScriptHooks.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressablesBuildScriptHooks.cs deleted file mode 100644 index 744f7c05..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressablesBuildScriptHooks.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.IO; -using UnityEditor.AddressableAssets; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.Build; -using UnityEditor.Build.Reporting; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Build -{ - /// - /// Entry point to set callbacks for builds. - /// - public static class BuildScript - { - /// - /// Global delegate for handling the result of AddressableAssets builds. This will get called for player builds and when entering play mode. - /// - public static Action buildCompleted; - } - - static class AddressablesBuildScriptHooks - { - [InitializeOnLoadMethod] - static void Init() - { - EditorApplication.playModeStateChanged += OnEditorPlayModeChanged; - } - - static void OnEditorPlayModeChanged(PlayModeStateChange state) - { - if (state == PlayModeStateChange.ExitingEditMode) - { - var settings = AddressableAssetSettingsDefaultObject.Settings; - if (settings == null) - return; - if (settings.ActivePlayModeDataBuilder == null) - { - var err = "Active play mode build script is null."; - Debug.LogError(err); - - if (BuildScript.buildCompleted != null) - { - var result = AddressableAssetBuildResult.CreateResult(null, 0, err); - BuildScript.buildCompleted(result); - } - return; - } - - if (!settings.ActivePlayModeDataBuilder.CanBuildData()) - { - var err = string.Format("Active build script {0} cannot build AddressablesPlayModeBuildResult.", settings.ActivePlayModeDataBuilder); - Debug.LogError(err); - if (BuildScript.buildCompleted != null) - { - - var result = AddressableAssetBuildResult.CreateResult(null, 0, err); - BuildScript.buildCompleted(result); - } - - return; - } - - var res = settings.ActivePlayModeDataBuilder.BuildData(new AddressablesDataBuilderInput(settings)); - if (!string.IsNullOrEmpty(res.Error)) - { - Debug.LogError(res.Error); - EditorApplication.isPlaying = false; - } - else - { - if (BuildScript.buildCompleted != null) - BuildScript.buildCompleted(res); - settings.DataBuilderCompleted(settings.ActivePlayModeDataBuilder, res); - } - } - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressablesBuildScriptHooks.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressablesBuildScriptHooks.cs.meta deleted file mode 100644 index f877f7af..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressablesBuildScriptHooks.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0a15f049c10fa744ca827575ffac1c0d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressablesDataBuilderInput.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressablesDataBuilderInput.cs deleted file mode 100644 index 2480426f..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressablesDataBuilderInput.cs +++ /dev/null @@ -1,107 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.AddressableAssets.Settings; -using UnityEngine; -using UnityEngine.AddressableAssets; - -namespace UnityEditor.AddressableAssets.Build -{ - /// - /// Data builder context object for Addressables. - /// - public class AddressablesDataBuilderInput - { - - /// - /// The main addressables settings object. - /// - public AddressableAssetSettings AddressableSettings { get; private set; } - - /// - /// Build target group. - /// - public BuildTargetGroup TargetGroup { get; private set; } - - /// - /// Build target. - /// - public BuildTarget Target { get; private set; } - - /// - /// Player build version. - /// - public string PlayerVersion { get; private set; } - - /// - /// Bool to signify if profiler events should be broadcast. - /// - public bool ProfilerEventsEnabled { get; private set; } - - /// - /// Registry of files created during the build - /// - public FileRegistry Registry { get; private set; } - - //used only by tests to inject custom info into build... - internal string PathFormat = string.Empty; - - /// - /// The name of the default Runtime Settings file. - /// - public string RuntimeSettingsFilename = "settings.json"; - - /// - /// The name of the default Runtime Catalog file. - /// - public string RuntimeCatalogFilename = "catalog.json"; - - - /// - /// Creates a default context object with values taken from the AddressableAssetSettings parameter. - /// - /// The settings object to pull values from. - public AddressablesDataBuilderInput(AddressableAssetSettings settings) - { - string version = string.Empty; - if (settings == null) - { - Debug.LogError("Attempting to set up AddressablesDataBuilderInput with null settings."); - } - else - version = settings.PlayerBuildVersion; - - SetAllValues(settings, - BuildPipeline.GetBuildTargetGroup(EditorUserBuildSettings.activeBuildTarget), - EditorUserBuildSettings.activeBuildTarget, - version); - } - - /// - /// Creates a default context object with values taken from the AddressableAssetSettings parameter. - /// - /// The settings object to pull values from. - /// The player build version. - public AddressablesDataBuilderInput(AddressableAssetSettings settings, string playerBuildVersion) - { - if (settings == null) - { - Debug.LogError("Attempting to set up AddressablesDataBuilderInput with null settings."); - } - SetAllValues(settings, - BuildPipeline.GetBuildTargetGroup(EditorUserBuildSettings.activeBuildTarget), - EditorUserBuildSettings.activeBuildTarget, - playerBuildVersion); - } - - void SetAllValues(AddressableAssetSettings settings, BuildTargetGroup buildTargetGroup, BuildTarget buildTarget, string playerBuildVersion) - { - AddressableSettings = settings; - - TargetGroup = buildTargetGroup; - Target = buildTarget; - PlayerVersion = playerBuildVersion; - ProfilerEventsEnabled = ProjectConfigData.postProfilerEvents; - Registry = new FileRegistry(); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressablesDataBuilderInput.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressablesDataBuilderInput.cs.meta deleted file mode 100644 index 20e7fe0f..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressablesDataBuilderInput.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 69d3f19413a88324199b41186cf34b9f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressablesDataBuilders.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressablesDataBuilders.cs deleted file mode 100644 index a314b689..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressablesDataBuilders.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Build -{ - - /// - /// Contains information about the status of the build. - /// - public class AddressableAssetBuildResult : IDataBuilderResult - { - /// - /// Duration of build, in seconds. - /// - public double Duration { get; set; } - /// - /// The number of addressable assets contained in the build. - /// - public int LocationCount { get; set; } - /// - /// Error that caused the build to fail. - /// - public string Error { get; set; } - /// - /// Path of runtime settings file - /// - public string OutputPath { get; set; } - /// - /// Registry of files created during the build - /// - public FileRegistry FileRegistry { get; set; } - - /// - /// Helper method to create the desired result of a data builder. This should always be used to create the build result - /// with additional details added as needed. The Result.Duration should always be set at the end of the build - /// script in the non-error scenario. - /// - /// Path to the settings.json file (name may not always match that exactly) generated by this build - /// Number of locations created by this build - /// Error string if there were problems with the build. Defaults to empty - /// The actual build result created - /// - public static TResult CreateResult(string settingsPath, int locCount, string err = "") where TResult : IDataBuilderResult - { - var opResult = Activator.CreateInstance(); - opResult.OutputPath = settingsPath; - opResult.Duration = 0; - opResult.Error = err; - return opResult; - } - } - - /// - /// Build result for entering play mode in the editor. - /// - [Serializable] - public class AddressablesPlayModeBuildResult : AddressableAssetBuildResult - { - } - - /// - /// Build result for building the player. - /// - public class AddressablesPlayerBuildResult : AddressableAssetBuildResult - { - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressablesDataBuilders.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressablesDataBuilders.cs.meta deleted file mode 100644 index ae171e4a..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressablesDataBuilders.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1912c97b524efd244bc0647b18230c7e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressablesPlayerBuildProcessor.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressablesPlayerBuildProcessor.cs deleted file mode 100644 index 62391023..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressablesPlayerBuildProcessor.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.IO; -using UnityEditor.Build; -using UnityEditor.Build.Reporting; -using UnityEngine; -using UnityEngine.AddressableAssets; - -public class AddressablesPlayerBuildProcessor : IPreprocessBuildWithReport, IPostprocessBuildWithReport -{ - public int callbackOrder - { - get { return 1; } - } - - public void OnPostprocessBuild(BuildReport report) - { - string addressablesStreamingAssets = - Application.streamingAssetsPath + "/" + Addressables.StreamingAssetsSubFolder; - if (Directory.Exists(Addressables.PlayerBuildDataPath)) - { - Debug.Log(string.Format("Deleting Addressables data from {0}.", Addressables.PlayerBuildDataPath)); - Directory.Delete(Addressables.PlayerBuildDataPath, true); - } - - //Will delete the directory only if it's empty - DirectoryUtility.DeleteDirectory(addressablesStreamingAssets); - } - - public void OnPreprocessBuild(BuildReport report) - { - if (Directory.Exists(Addressables.BuildPath)) - { - Debug.Log(string.Format( - "Copying Addressables data from {0} to {1}. These copies will be deleted at the end of the build.", - Addressables.BuildPath, Addressables.PlayerBuildDataPath)); - - DirectoryUtility.DirectoryCopy(Addressables.BuildPath, Addressables.PlayerBuildDataPath, true); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressablesPlayerBuildProcessor.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressablesPlayerBuildProcessor.cs.meta deleted file mode 100644 index 7d5c0311..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AddressablesPlayerBuildProcessor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 834e2bdb5fd1336429e26ec5bcbb77f7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules.meta deleted file mode 100644 index 84bbc4a8..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 85d34cd37047d904e847f7f5e2b1bd25 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/AnalyzeResultData.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/AnalyzeResultData.cs deleted file mode 100644 index c3556121..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/AnalyzeResultData.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Build.AnalyzeRules -{ - [Serializable] - public class AnalyzeResultData : ScriptableObject, ISerializationCallbackReceiver - { - [Serializable] - private class RuleToResults - { - [SerializeField] public string RuleName; - [SerializeField] public List Results; - - public RuleToResults(string ruleName, List results) - { - RuleName = ruleName; - Results = results; - } - } - - [SerializeField] private List m_RuleToResults = new List(); - - internal Dictionary> Data = - new Dictionary>(); - - public void OnAfterDeserialize() - { - for (int i = 0; i < m_RuleToResults.Count; i++) - Data.Add(m_RuleToResults[i].RuleName, m_RuleToResults[i].Results); - } - - public void OnBeforeSerialize() - { - m_RuleToResults.Clear(); - - foreach (var key in Data.Keys) - m_RuleToResults.Add(new RuleToResults(key, Data[key])); - } - - internal void Clear(AnalyzeRule rule) - { - Clear(rule.ruleName); - } - - internal void Clear(string ruleName) - { - if (Data.ContainsKey(ruleName)) - Data[ruleName].Clear(); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/AnalyzeResultData.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/AnalyzeResultData.cs.meta deleted file mode 100644 index 0b487535..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/AnalyzeResultData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: abc77607c2a62ef48b8f7dec55cc6d91 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/AnalyzeRule.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/AnalyzeRule.cs deleted file mode 100644 index 032edbd9..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/AnalyzeRule.cs +++ /dev/null @@ -1,106 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.AddressableAssets.Settings; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Build.AnalyzeRules -{ - /// - /// Base class for creating rules to analyze Addressables data. Use AnalyzeWindow.RegisterNewRule() to register - /// a rule with the GUI window. - /// - [Serializable] - public class AnalyzeRule - { - /// - /// True if this rule can fix itself. If child class sets this to true, class must override FixIssues - /// - public virtual bool CanFix { get; set; } - - [SerializeField] - internal List m_Results = new List(); - - [NonSerialized] - protected AnalyzeResult noErrors = new AnalyzeResult{resultName = "No issues found"}; - - /// - /// Delimiter character used in analyze rule string names. This is used when a rule result needs to display - /// as a tree view hierarchy. A rule result of A:B:C will end up in the tree view with: - /// - A - /// --- B - /// ----- C - /// - public const char kDelimiter = ':'; - - /// - /// Result data returned by rules. - /// - [Serializable] - public class AnalyzeResult - { - [SerializeField] - string m_ResultName; - - /// - /// Name of result data. This name uses AnalyzeRule.kDelimiter to signify breaks in the tree display. - /// - public string resultName - { - get { return m_ResultName; } - set { m_ResultName = value; } - } - - [SerializeField] - MessageType m_Severity = MessageType.None; - /// - /// Severity of rule result - /// - public MessageType severity - { - get { return m_Severity; } - set { m_Severity = value; } - } - } - - /// - /// Display name for rule - /// - public virtual string ruleName - { - get { return GetType().ToString(); } - } - - /// - /// This method runs the actual analysis for the rule. - /// - /// The settings object to analyze - /// A list of resulting information (warnings, errors, or info) - public virtual List RefreshAnalysis(AddressableAssetSettings settings) - { - return new List(); - } - - /// - /// Fixing method to be run on results of the RefreshAnalysis. If CanFix returns true, this method must be - /// overriden. It is recommended that RefreshAnalysis caches any data that will be needed to fix. Fix should - /// not rerun RefreshAnalysis before fixing. - /// - /// The settings object to analyze - public virtual void FixIssues(AddressableAssetSettings settings) - { - throw new NotImplementedException("FixIssues not implemented for class: '" + GetType() + "'."); - } - - /// - /// Clears out the analysis results. When overriding, use to clear rule-specific data as well. - /// - public virtual void ClearAnalysis() - { - m_Results.Clear(); - } - - internal virtual void Revert() - { - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/AnalyzeRule.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/AnalyzeRule.cs.meta deleted file mode 100644 index 800351db..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/AnalyzeRule.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cfe8ad6aa7980734a89a782fcc937045 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/BuildBundleLayout.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/BuildBundleLayout.cs deleted file mode 100644 index 7a87fb50..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/BuildBundleLayout.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEditor.AddressableAssets.GUI; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.Build.Pipeline; -using UnityEditor.SceneManagement; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Build.AnalyzeRules -{ - class BuildBundleLayout : BundleRuleBase - { - public override bool CanFix { get{return false;} } - public override string ruleName { get {return "Build Bundle Layout";}} - - public override List RefreshAnalysis(AddressableAssetSettings settings) - { - ClearAnalysis(); - - if (!EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo()) - { - Debug.LogError("Cannot run Analyze with unsaved scenes"); - m_Results.Add(new AnalyzeResult {resultName = ruleName + "Cannot run Analyze with unsaved scenes"}); - return m_Results; - } - - CalculateInputDefinitions(settings); - RefreshBuild(GetBuildContext(settings)); - - m_Results = (from bundleBuild in m_AllBundleInputDefs - let bundleName = bundleBuild.assetBundleName - from asset in bundleBuild.assetNames - select new AnalyzeResult { resultName = bundleName + kDelimiter + "Explicit" + kDelimiter + asset }).ToList(); - - m_Results.AddRange((from fileToBundle in m_ExtractData.WriteData.FileToBundle - from guid in GetImplicitGuidsForBundle(fileToBundle.Key) - let bundleName = fileToBundle.Value - let assetPath = AssetDatabase.GUIDToAssetPath(guid.ToString()) - where AddressableAssetUtility.IsPathValidForEntry(assetPath) - select new AnalyzeResult { resultName = bundleName + kDelimiter + "Implicit" + kDelimiter + assetPath }).ToList()); - - if (m_Results.Count == 0) - m_Results.Add(noErrors); - - return m_Results; - } - - [InitializeOnLoad] - class RegisterBuildBundleLayout - { - static RegisterBuildBundleLayout() - { - AnalyzeWindow.RegisterNewRule(); - } - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/BuildBundleLayout.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/BuildBundleLayout.cs.meta deleted file mode 100644 index fe01836d..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/BuildBundleLayout.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d314656232cf1b24a9d7e6470f8f72eb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/BundleRuleBase.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/BundleRuleBase.cs deleted file mode 100644 index dcee45bc..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/BundleRuleBase.cs +++ /dev/null @@ -1,269 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using UnityEditor.AddressableAssets.Build.BuildPipelineTasks; -using UnityEditor.AddressableAssets.Build.DataBuilders; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.AddressableAssets.Settings.GroupSchemas; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Tasks; -using UnityEditor.SceneManagement; -using UnityEngine; -using UnityEngine.AddressableAssets.Initialization; -using UnityEngine.AddressableAssets.ResourceLocators; - -namespace UnityEditor.AddressableAssets.Build.AnalyzeRules -{ - class BundleRuleBase : AnalyzeRule - { - [NonSerialized] - internal List m_AddressableAssets = new List(); - [NonSerialized] - internal Dictionary> m_ResourcesToDependencies = new Dictionary>(); - [NonSerialized] - internal readonly List m_Locations = new List(); - [NonSerialized] - internal readonly List m_AllBundleInputDefs = new List(); - [NonSerialized] - internal readonly Dictionary m_BundleToAssetGroup = new Dictionary(); - [NonSerialized] - internal ExtractDataTask m_ExtractData = new ExtractDataTask(); - - internal IList RuntimeDataBuildTasks(string builtinShaderBundleName) - { - var buildTasks = new List(); - - // Setup - buildTasks.Add(new SwitchToBuildPlatform()); - buildTasks.Add(new RebuildSpriteAtlasCache()); - - // Player Scripts - buildTasks.Add(new BuildPlayerScripts()); - - // Dependency - buildTasks.Add(new CalculateSceneDependencyData()); - buildTasks.Add(new CalculateAssetDependencyData()); - buildTasks.Add(new StripUnusedSpriteSources()); - buildTasks.Add(new CreateBuiltInShadersBundle(builtinShaderBundleName)); - - // Packing - buildTasks.Add(new GenerateBundlePacking()); - buildTasks.Add(new UpdateBundleObjectLayout()); - - buildTasks.Add(new GenerateBundleCommands()); - buildTasks.Add(new GenerateSubAssetPathMaps()); - buildTasks.Add(new GenerateBundleMaps()); - - return buildTasks; - } - - internal AddressableAssetsBuildContext GetBuildContext(AddressableAssetSettings settings) - { - ResourceManagerRuntimeData runtimeData = new ResourceManagerRuntimeData(); - runtimeData.LogResourceManagerExceptions = settings.buildSettings.LogResourceManagerExceptions; - - var aaContext = new AddressableAssetsBuildContext - { - settings = settings, - runtimeData = runtimeData, - bundleToAssetGroup = m_BundleToAssetGroup, - locations = m_Locations - }; - return aaContext; - } - protected bool IsValidPath(string path) - { - return AddressableAssetUtility.IsPathValidForEntry(path) && - !path.ToLower().Contains("/resources/") && - !path.ToLower().StartsWith("resources/"); - } - - internal ReturnCode RefreshBuild(AddressableAssetsBuildContext buildContext) - { - var settings = buildContext.settings; - var context = new AddressablesDataBuilderInput(settings); - - var buildTarget = context.Target; - var buildTargetGroup = context.TargetGroup; - var buildParams = new AddressableAssetsBundleBuildParameters(settings, m_BundleToAssetGroup, buildTarget, - buildTargetGroup, settings.buildSettings.bundleBuildPath); - var builtinShaderBundleName = - settings.DefaultGroup.Name.ToLower().Replace(" ", "").Replace('\\', '/').Replace("//", "/") + - "_unitybuiltinshaders.bundle"; - var buildTasks = RuntimeDataBuildTasks(builtinShaderBundleName); - buildTasks.Add(m_ExtractData); - - IBundleBuildResults buildResults; - var exitCode = ContentPipeline.BuildAssetBundles(buildParams, new BundleBuildContent(m_AllBundleInputDefs), - out buildResults, buildTasks, buildContext); - GenerateLocationListsTask.Run(buildContext, m_ExtractData.WriteData); - return exitCode; - } - - internal List GetAllBundleDependencies() - { - var explicitGuids = m_ExtractData.WriteData.AssetToFiles.Keys; - var implicitGuids = GetImplicitGuidToFilesMap().Keys; - var allBundleGuids = explicitGuids.Union(implicitGuids); - - return allBundleGuids.ToList(); - } - - internal void IntersectResourcesDepedenciesWithBundleDependencies(List bundleDependencyGuids) - { - foreach (var key in m_ResourcesToDependencies.Keys) - { - var bundleDependencies = bundleDependencyGuids.Intersect(m_ResourcesToDependencies[key]).ToList(); - - m_ResourcesToDependencies[key].Clear(); - m_ResourcesToDependencies[key].AddRange(bundleDependencies); - } - } - - internal virtual void BuiltInResourcesToDependenciesMap(string[] resourcePaths) - { - foreach (string path in resourcePaths) - { - string[] dependencies = AssetDatabase.GetDependencies(path); - - if (!m_ResourcesToDependencies.ContainsKey(path)) - m_ResourcesToDependencies.Add(path, new List()); - - m_ResourcesToDependencies[path].AddRange(from dependency in dependencies - select new GUID(AssetDatabase.AssetPathToGUID(dependency))); - } - } - - internal void CalculateInputDefinitions(AddressableAssetSettings settings) - { - foreach (AddressableAssetGroup group in settings.groups) - { - if (group.HasSchema()) - { - var schema = group.GetSchema(); - List bundleInputDefinitions = new List(); - BuildScriptPackedMode.PrepGroupBundlePacking(group, bundleInputDefinitions, m_Locations, - schema.BundleMode); - - for (int i = 0; i < bundleInputDefinitions.Count; i++) - { - if (m_BundleToAssetGroup.ContainsKey(bundleInputDefinitions[i].assetBundleName)) - bundleInputDefinitions[i] = CreateUniqueBundle(bundleInputDefinitions[i]); - - m_BundleToAssetGroup.Add(bundleInputDefinitions[i].assetBundleName, schema.Group.Guid); - } - - m_AllBundleInputDefs.AddRange(bundleInputDefinitions); - } - } - } - - internal AssetBundleBuild CreateUniqueBundle(AssetBundleBuild bid) - { - int count = 1; - var newName = bid.assetBundleName; - while (m_BundleToAssetGroup.ContainsKey(newName) && count < 1000) - newName = bid.assetBundleName.Replace(".bundle", string.Format("{0}.bundle", count++)); - return new AssetBundleBuild - { - assetBundleName = newName, addressableNames = bid.addressableNames, - assetBundleVariant = bid.assetBundleVariant, assetNames = bid.assetNames - }; - } - - internal List GetImplicitGuidsForBundle(string fileName) - { - List guids = (from id in m_ExtractData.WriteData.FileToObjects[fileName] - where !m_ExtractData.WriteData.AssetToFiles.Keys.Contains(id.guid) - select id.guid).ToList(); - return guids; - } - - internal Dictionary> GetImplicitGuidToFilesMap() - { - Dictionary> implicitGuids = new Dictionary>(); - IEnumerable> validImplicitGuids = - from fileToObject in m_ExtractData.WriteData.FileToObjects - from objectId in fileToObject.Value - where !m_ExtractData.WriteData.AssetToFiles.Keys.Contains(objectId.guid) - select new KeyValuePair(objectId, fileToObject.Key); - - //Build our Dictionary from our list of valid implicit guids (guids not already in explicit guids) - foreach (var objectIdToFile in validImplicitGuids) - { - if (!implicitGuids.ContainsKey(objectIdToFile.Key.guid)) - implicitGuids.Add(objectIdToFile.Key.guid, new List()); - implicitGuids[objectIdToFile.Key.guid].Add(objectIdToFile.Value); - } - - return implicitGuids; - } - - internal List CalculateBuiltInResourceDependenciesToBundleDependecies(AddressableAssetSettings settings, string[] builtInResourcesPaths) - { - List results = new List(); - - if (!EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo()) - { - Debug.LogError("Cannot run Analyze with unsaved scenes"); - results.Add(new AnalyzeResult{resultName = ruleName + "Cannot run Analyze with unsaved scenes"}); - return results; - } - - m_AddressableAssets = (from aaGroup in settings.groups - from entry in aaGroup.entries - select new GUID(entry.guid)).ToList(); - - - BuiltInResourcesToDependenciesMap(builtInResourcesPaths); - CalculateInputDefinitions(settings); - - var context = GetBuildContext(settings); - ReturnCode exitCode = RefreshBuild(context); - if (exitCode < ReturnCode.Success) - { - Debug.LogError("Analyze build failed. " + exitCode); - results.Add(new AnalyzeResult{resultName = ruleName + "Analyze build failed. " + exitCode}); - return results; - } - - IntersectResourcesDepedenciesWithBundleDependencies(GetAllBundleDependencies()); - - results = (from resource in m_ResourcesToDependencies.Keys - from dependency in m_ResourcesToDependencies[resource] - where m_ExtractData.WriteData.AssetToFiles.ContainsKey(dependency) - - let assetPath = AssetDatabase.GUIDToAssetPath(dependency.ToString()) - let files = m_ExtractData.WriteData.AssetToFiles[dependency] - - from file in files - where m_ExtractData.WriteData.FileToBundle.ContainsKey(file) - let bundle = m_ExtractData.WriteData.FileToBundle[file] - - select new AnalyzeResult{resultName = - resource + kDelimiter + - bundle + kDelimiter + - assetPath, - severity = MessageType.Warning}).ToList(); - - if (results.Count == 0) - results.Add(new AnalyzeResult{resultName = ruleName + " - No issues found."}); - - return results; - } - - public override void ClearAnalysis() - { - m_Locations.Clear(); - m_AddressableAssets.Clear(); - m_AllBundleInputDefs.Clear(); - m_BundleToAssetGroup.Clear(); - m_ResourcesToDependencies.Clear(); - m_ExtractData = new ExtractDataTask(); - - base.ClearAnalysis(); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/BundleRuleBase.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/BundleRuleBase.cs.meta deleted file mode 100644 index ba9f3c0c..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/BundleRuleBase.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8aae9ccc172d3fd48a20726e5c902489 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/CheckBundleDupeDependencies.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/CheckBundleDupeDependencies.cs deleted file mode 100644 index 2e2afde2..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/CheckBundleDupeDependencies.cs +++ /dev/null @@ -1,176 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using UnityEditor.AddressableAssets.Build.DataBuilders; -using UnityEditor.AddressableAssets.GUI; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.AddressableAssets.Settings.GroupSchemas; -using UnityEditor.Build.Pipeline; -using UnityEditor.SceneManagement; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Build.AnalyzeRules -{ - class CheckBundleDupeDependencies : BundleRuleBase - { - internal struct CheckDupeResult - { - public AddressableAssetGroup Group; - public List DuplicatedFiles; - public string AssetPath; - public GUID DuplicatedGroupGuid; - } - - public override bool CanFix - { - get { return true; } - } - - public override string ruleName - { get { return "Check Duplicate Bundle Dependencies"; } } - - [NonSerialized] - internal readonly Dictionary>> m_AllIssues = new Dictionary>>(); - [SerializeField] - internal HashSet m_ImplicitAssets; - - public override List RefreshAnalysis(AddressableAssetSettings settings) - { - ClearAnalysis(); - return CheckForDuplicateDependencies(settings); - } - - List CheckForDuplicateDependencies(AddressableAssetSettings settings) - { - - if (!EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo()) - { - Debug.LogError("Cannot run Analyze with unsaved scenes"); - m_Results.Add(new AnalyzeResult{resultName = ruleName + "Cannot run Analyze with unsaved scenes"}); - return m_Results; - } - - CalculateInputDefinitions(settings); - - if (m_AllBundleInputDefs.Count > 0) - { - var context = GetBuildContext(settings); - ReturnCode exitCode = RefreshBuild(context); - if (exitCode < ReturnCode.Success) - { - Debug.LogError("Analyze build failed. " + exitCode); - m_Results.Add(new AnalyzeResult{resultName = ruleName + "Analyze build failed. " + exitCode}); - return m_Results; - } - - var implicitGuids = GetImplicitGuidToFilesMap(); - var checkDupeResults = CalculateDuplicates(implicitGuids, context); - BuildImplicitDuplicatedAssetsSet(checkDupeResults); - - m_Results = (from issueGroup in m_AllIssues - from bundle in issueGroup.Value - from item in bundle.Value - select new AnalyzeResult {resultName = ruleName + kDelimiter + - issueGroup.Key + kDelimiter + - bundle.Key + kDelimiter + - item, severity = MessageType.Warning}).ToList(); - } - - if (m_Results.Count == 0) - m_Results.Add(noErrors); - - return m_Results; - } - - internal IEnumerable CalculateDuplicates(Dictionary> implicitGuids, AddressableAssetsBuildContext aaContext) - { - //Get all guids that have more than one bundle referencing them - IEnumerable>> validGuids = - from dupeGuid in implicitGuids - where dupeGuid.Value.Count > 1 - where IsValidPath(AssetDatabase.GUIDToAssetPath(dupeGuid.Key.ToString())) - select dupeGuid; - - return - from guidToFile in validGuids - from file in guidToFile.Value - - //Get the files that belong to those guids - let fileToBundle = m_ExtractData.WriteData.FileToBundle[file] - - //Get the bundles that belong to those files - let bundleToGroup = aaContext.bundleToAssetGroup[fileToBundle] - - //Get the asset groups that belong to those bundles - let selectedGroup = aaContext.settings.FindGroup(findGroup => findGroup.Guid == bundleToGroup) - - select new CheckDupeResult - { - Group = selectedGroup, - DuplicatedFiles = guidToFile.Value, - AssetPath = AssetDatabase.GUIDToAssetPath(guidToFile.Key.ToString()), - DuplicatedGroupGuid = guidToFile.Key - }; - } - - internal void BuildImplicitDuplicatedAssetsSet(IEnumerable checkDupeResults) - { - m_ImplicitAssets = new HashSet(); - foreach (var checkDupeResult in checkDupeResults) - { - Dictionary> groupData; - if (!m_AllIssues.TryGetValue(checkDupeResult.Group.Name, out groupData)) - { - groupData = new Dictionary>(); - m_AllIssues.Add(checkDupeResult.Group.Name, groupData); - } - - foreach (string file in checkDupeResult.DuplicatedFiles) - { - List assets; - if (!groupData.TryGetValue(m_ExtractData.WriteData.FileToBundle[file], out assets)) - { - assets = new List(); - groupData.Add(m_ExtractData.WriteData.FileToBundle[file], assets); - } - - assets.Add(checkDupeResult.AssetPath); - } - - m_ImplicitAssets.Add(checkDupeResult.DuplicatedGroupGuid); - } - } - - public override void FixIssues(AddressableAssetSettings settings) - { - if (m_ImplicitAssets == null) - CheckForDuplicateDependencies(settings); - - if (m_ImplicitAssets.Count == 0) - return; - - var group = settings.CreateGroup("Duplicate Asset Isolation", false, false, false, null, typeof(BundledAssetGroupSchema), typeof(ContentUpdateGroupSchema)); - group.GetSchema().StaticContent = true; - - foreach (var asset in m_ImplicitAssets) - settings.CreateOrMoveEntry(asset.ToString(), group, false, false); - } - - public override void ClearAnalysis() - { - m_AllIssues.Clear(); - m_ImplicitAssets = null; - base.ClearAnalysis(); - } - } - - - [InitializeOnLoad] - class RegisterCheckBundleDupeDependencies - { - static RegisterCheckBundleDupeDependencies() - { - AnalyzeWindow.RegisterNewRule(); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/CheckBundleDupeDependencies.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/CheckBundleDupeDependencies.cs.meta deleted file mode 100644 index 7c16bdfe..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/CheckBundleDupeDependencies.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 327933a391986b441b4355cdd9257400 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/CheckResourcesDupeDependencies.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/CheckResourcesDupeDependencies.cs deleted file mode 100644 index 5c608ec5..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/CheckResourcesDupeDependencies.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using UnityEditor.AddressableAssets.GUI; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.Build.Pipeline; -using UnityEditor.SceneManagement; -using UnityEngine; - - -namespace UnityEditor.AddressableAssets.Build.AnalyzeRules -{ - class CheckResourcesDupeDependencies : BundleRuleBase - { - public override bool CanFix - { - get { return false; } - } - - public override string ruleName - { - get { return "Check Resources to Addressable Duplicate Dependencies"; } - } - - public override List RefreshAnalysis(AddressableAssetSettings settings) - { - ClearAnalysis(); - - string[] resourceDirectory = Directory.GetDirectories("Assets", "Resources", SearchOption.AllDirectories); - List resourcePaths = new List(); - foreach (string directory in resourceDirectory) - resourcePaths.AddRange(Directory.GetFiles(directory, "*", SearchOption.AllDirectories)); - - - return CalculateBuiltInResourceDependenciesToBundleDependecies(settings, resourcePaths.ToArray()); - } - - public override void FixIssues(AddressableAssetSettings settings) - { - //Do nothing. There's nothing to fix. - } - } - - - - [InitializeOnLoad] - class RegisterCheckResourcesDupeDependencies - { - static RegisterCheckResourcesDupeDependencies() - { - AnalyzeWindow.RegisterNewRule(); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/CheckResourcesDupeDependencies.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/CheckResourcesDupeDependencies.cs.meta deleted file mode 100644 index 2864c532..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/CheckResourcesDupeDependencies.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 555da02c9c624644c9695f325ea6a22c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/CheckSceneDupeDependencies.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/CheckSceneDupeDependencies.cs deleted file mode 100644 index 5faa8500..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/CheckSceneDupeDependencies.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using UnityEditor.AddressableAssets.GUI; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.Build.Pipeline; -using UnityEditor.SceneManagement; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Build.AnalyzeRules -{ - class CheckSceneDupeDependencies : BundleRuleBase - { - public override bool CanFix - { - get { return false; } - } - - public override string ruleName - { - get { return "Check Scene to Addressable Duplicate Dependencies"; } - } - - public override List RefreshAnalysis(AddressableAssetSettings settings) - { - ClearAnalysis(); - - string[] scenePaths = (from editorScene in EditorBuildSettings.scenes - select editorScene.path).ToArray(); - - return CalculateBuiltInResourceDependenciesToBundleDependecies(settings, scenePaths); - } - - public override void FixIssues(AddressableAssetSettings settings) - { - //Do nothing. There's nothing to fix. - } - } - - [InitializeOnLoad] - class RegisterCheckSceneDupeDependencies - { - static RegisterCheckSceneDupeDependencies() - { - AnalyzeWindow.RegisterNewRule(); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/CheckSceneDupeDependencies.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/CheckSceneDupeDependencies.cs.meta deleted file mode 100644 index 4414d215..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/AnalyzeRules/CheckSceneDupeDependencies.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bd1bea4352ab4fb49a0d15da275cd26d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/BuildPipelineTasks.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/BuildPipelineTasks.meta deleted file mode 100644 index c6c7c322..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/BuildPipelineTasks.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 2e63e5dd2cdcb394984e15b78da0a927 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/BuildPipelineTasks/ExtractDataTask.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/BuildPipelineTasks/ExtractDataTask.cs deleted file mode 100644 index 73b85bce..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/BuildPipelineTasks/ExtractDataTask.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using UnityEditor.Build.Pipeline; -using UnityEditor.Build.Pipeline.Injector; -using UnityEditor.Build.Pipeline.Interfaces; - -namespace UnityEditor.AddressableAssets.Build.BuildPipelineTasks -{ - /// - /// The BuildTask used to extract write data from the build. - /// - public class ExtractDataTask : IBuildTask - { - /// - /// The ExtractDataTask version. - /// - public int Version { get { return 1; } } - - /// - /// Get the injected dependency data of the task. - /// - public IDependencyData DependencyData { get { return m_DependencyData; } } - - /// - /// Get the injected write data of the task. - /// - public IBundleWriteData WriteData { get { return m_WriteData; } } - - /// - /// Get the injected build cache of the task. - /// - public IBuildCache BuildCache { get { return m_BuildCache; } } - -#pragma warning disable 649 - [InjectContext(ContextUsage.In)] - IDependencyData m_DependencyData; - - [InjectContext(ContextUsage.In)] - IBundleWriteData m_WriteData; - - [InjectContext(ContextUsage.In)] - IBuildCache m_BuildCache; -#pragma warning restore 649 - - /// - /// Runs the ExtractDataTask. The data for this task is all injected context so no operations are performed in the Run step. - /// - /// Success. - public ReturnCode Run() - { - return ReturnCode.Success; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/BuildPipelineTasks/ExtractDataTask.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/BuildPipelineTasks/ExtractDataTask.cs.meta deleted file mode 100644 index 93bdf4ba..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/BuildPipelineTasks/ExtractDataTask.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9dafe60ff4149624880b04d0cea88719 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/BuildPipelineTasks/GenerateLocationListsTask.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/BuildPipelineTasks/GenerateLocationListsTask.cs deleted file mode 100644 index 1ce605f6..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/BuildPipelineTasks/GenerateLocationListsTask.cs +++ /dev/null @@ -1,153 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.AddressableAssets.Build.DataBuilders; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.AddressableAssets.Settings.GroupSchemas; -using UnityEditor.Build.Pipeline; -using UnityEditor.Build.Pipeline.Injector; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEngine; -using UnityEngine.AddressableAssets; -using UnityEngine.AddressableAssets.ResourceLocators; -using UnityEngine.ResourceManagement; -using UnityEngine.ResourceManagement.ResourceProviders; - -namespace UnityEditor.AddressableAssets.Build.BuildPipelineTasks -{ - /// - /// The BuildTask used to create location lists for Addressable assets. - /// - public class GenerateLocationListsTask : IBuildTask - { - const int k_Version = 1; - - /// - /// The GenerateLocationListsTask version. - /// - public int Version { get { return k_Version; } } - -#pragma warning disable 649 - [InjectContext(ContextUsage.In)] - IAddressableAssetsBuildContext m_AaBuildContext; - - [InjectContext] - IBundleWriteData m_WriteData; -#pragma warning restore 649 - - /// - /// Runs the build task with the injected context. - /// - /// The success or failure ReturnCode - public ReturnCode Run() - { - return Run(m_AaBuildContext, m_WriteData); - } - - /// - /// Runs the build task with a give context and write data. - /// - /// The addressables build context. - /// The write data used to generate the location lists. - /// The success or failure ReturnCode - public static ReturnCode Run(IAddressableAssetsBuildContext aaBuildContext, IBundleWriteData writeData) - { - var aaContext = aaBuildContext as AddressableAssetsBuildContext; - if (aaContext == null) - return ReturnCode.Error; - var aaSettings = aaContext.settings; - var locations = aaContext.locations; - var bundleToAssetGroup = aaContext.bundleToAssetGroup; - var bundleToAssets = new Dictionary>(); - var dependencySetForBundle = new Dictionary>(); - foreach (var k in writeData.AssetToFiles) - { - List assetList; - var bundle = writeData.FileToBundle[k.Value[0]]; - if (!bundleToAssets.TryGetValue(bundle, out assetList)) - bundleToAssets.Add(bundle, assetList = new List()); - HashSet bundleDeps; - if (!dependencySetForBundle.TryGetValue(bundle, out bundleDeps)) - dependencySetForBundle.Add(bundle, bundleDeps = new HashSet()); - for (int i = 0; i < k.Value.Count; i++) - bundleDeps.Add(writeData.FileToBundle[k.Value[i]]); - foreach (var file in k.Value) - { - var fileBundle = writeData.FileToBundle[file]; - if (!bundleToAssets.ContainsKey(fileBundle)) - bundleToAssets.Add(fileBundle, new List()); - } - - assetList.Add(k.Key); - } - var assetGroupToBundle = (aaContext.assetGroupToBundles = new Dictionary>()); - foreach (var kvp in bundleToAssets) - { - AddressableAssetGroup assetGroup = aaSettings.DefaultGroup; - string groupGuid; - if (bundleToAssetGroup.TryGetValue(kvp.Key, out groupGuid)) - assetGroup = aaSettings.FindGroup(g => g.Guid == groupGuid); - - List bundles; - if (!assetGroupToBundle.TryGetValue(assetGroup, out bundles)) - assetGroupToBundle.Add(assetGroup, bundles = new List()); - bundles.Add(kvp.Key); - HashSet bundleDeps = null; - dependencySetForBundle.TryGetValue(kvp.Key, out bundleDeps); - CreateResourceLocationData(assetGroup, kvp.Key, GetLoadPath(assetGroup, kvp.Key), GetBundleProviderName(assetGroup), GetAssetProviderName(assetGroup), kvp.Value, bundleDeps, locations); - } - - return ReturnCode.Success; - } - - static string GetBundleProviderName(AddressableAssetGroup group) - { - return group.GetSchema().GetBundleCachedProviderId(); - } - - static string GetAssetProviderName(AddressableAssetGroup group) - { - return group.GetSchema().GetAssetCachedProviderId(); - } - - static string GetLoadPath(AddressableAssetGroup group, string name) - { - var bagSchema = group.GetSchema(); - if (bagSchema == null || bagSchema.LoadPath == null) - { - Debug.LogError("Unable to determine load path for " + name + ". Check that your default group is not '" + AddressableAssetSettings.PlayerDataGroupName + "'"); - return string.Empty; - } - var loadPath = bagSchema.LoadPath.GetValue(group.Settings) + "/" + name; - if(!string.IsNullOrEmpty(bagSchema.UrlSuffix)) - loadPath += bagSchema.UrlSuffix; - return loadPath; - } - - internal static void CreateResourceLocationData( - AddressableAssetGroup assetGroup, - string bundleName, - string bundleInternalId, - string bundleProvider, - string assetProvider, - List assetsInBundle, - HashSet bundleDependencies, - List locations) - { - locations.Add(new ContentCatalogDataEntry(typeof(IAssetBundleResource), bundleInternalId, bundleProvider, new object[] { bundleName })); - - var assets = new List(); - assetGroup.GatherAllAssets(assets, true, true); - var guidToEntry = new Dictionary(); - foreach (var a in assets) - guidToEntry.Add(a.guid, a); - foreach (var a in assetsInBundle) - { - AddressableAssetEntry entry; - if (!guidToEntry.TryGetValue(a.ToString(), out entry)) - continue; - entry.CreateCatalogEntries(locations, true, assetProvider, bundleDependencies, null); - } - } - } - -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/BuildPipelineTasks/GenerateLocationListsTask.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/BuildPipelineTasks/GenerateLocationListsTask.cs.meta deleted file mode 100644 index 4ed43f20..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/BuildPipelineTasks/GenerateLocationListsTask.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b19f99025db4a1e44a095aa3f1284c54 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/BuildUtility.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/BuildUtility.cs deleted file mode 100644 index 8a99fd68..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/BuildUtility.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using UnityEditor.AddressableAssets.Settings.GroupSchemas; -using UnityEditor.Compilation; - -namespace UnityEditor.AddressableAssets.Build -{ - internal class BuildUtility - { - static HashSet s_EditorAssemblies = null; - static HashSet editorAssemblies - { - get - { - if (s_EditorAssemblies == null) - { - s_EditorAssemblies = new HashSet(); - foreach (var assembly in CompilationPipeline.GetAssemblies()) - { - if ((assembly.flags & AssemblyFlags.EditorAssembly) != 0) - s_EditorAssemblies.Add(assembly.name); - } - } - - return s_EditorAssemblies; - } - } - public static bool IsEditorAssembly(System.Reflection.Assembly assembly) - { - var splitName = assembly.FullName.Split(','); - return splitName.Length > 0 && editorAssemblies.Contains(splitName[0]); - } - - public static string GetNameWithHashNaming(BundledAssetGroupSchema.BundleNamingStyle schemaBundleNaming, string hash, string sourceBundleName) - { - string result = sourceBundleName; - switch (schemaBundleNaming) - { - case BundledAssetGroupSchema.BundleNamingStyle.AppendHash: - result = sourceBundleName.Replace(".bundle", "_" + hash + ".bundle"); - break; - case BundledAssetGroupSchema.BundleNamingStyle.NoHash: - break; - case BundledAssetGroupSchema.BundleNamingStyle.OnlyHash: - string fileName = Path.GetFileNameWithoutExtension(sourceBundleName); - if(!string.IsNullOrEmpty(fileName)) - result = sourceBundleName.Replace(fileName, hash); - break; - } - - return result; - - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/BuildUtility.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/BuildUtility.cs.meta deleted file mode 100644 index 74a28fd1..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/BuildUtility.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: befd95e3f3af5eb49bf7c53d00cb4d44 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/ContentUpdateScript.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/ContentUpdateScript.cs deleted file mode 100644 index 4fed0527..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/ContentUpdateScript.cs +++ /dev/null @@ -1,437 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.Serialization.Formatters.Binary; -using System.Text; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.AddressableAssets.Settings.GroupSchemas; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEngine; -using UnityEngine.AddressableAssets; - -namespace UnityEditor.AddressableAssets.Build -{ - [Serializable] - struct AssetState : IEquatable - { - public GUID guid; - public Hash128 hash; - - public bool Equals(AssetState other) - { - return guid == other.guid && hash == other.hash; - } - } - - [Serializable] - class CachedAssetState : IEquatable - { - public AssetState asset; - public AssetState[] dependencies; - - public bool Equals(CachedAssetState other) - { - bool result = other != null && asset.Equals(other.asset); - result &= dependencies != null && other.dependencies != null; - result &= dependencies.Length == other.dependencies.Length; - var index = 0; - while (result && index < dependencies.Length) - { - result &= dependencies[index].Equals(other.dependencies[index]); - index++; - } - return result; - } - } - - - /// - /// Data stored with each build that is used to generated content updates. - /// - [Serializable] - class AddressablesContentState - { - /// - /// The version that the player was built with. This is usually set to AddressableAssetSettings.PlayerBuildVersion. - /// - [SerializeField] - public string playerVersion; - - /// - /// The version of the unity editor used to build the player. - /// - [SerializeField] - public string editorVersion; - - /// - /// Dependency information for all assets in the build that have been marked StaticContent. - /// - [SerializeField] - public CachedAssetState[] cachedInfos; - - /// - /// The path of a remote catalog. This is the only place the player knows to look for an updated catalog. - /// - [SerializeField] - public string remoteCatalogLoadPath; - } - - /// - /// Contains methods used for the content update workflow. - /// - public static class ContentUpdateScript - { - static bool GetAssetState(GUID asset, out AssetState assetState) - { - assetState = new AssetState(); - if (asset.Empty()) - return false; - - var path = AssetDatabase.GUIDToAssetPath(asset.ToString()); - if (string.IsNullOrEmpty(path)) - return false; - - var hash = AssetDatabase.GetAssetDependencyHash(path); - if (!hash.isValid) - return false; - - assetState.guid = asset; - assetState.hash = hash; - return true; - } - - static bool GetCachedAssetStateForData(GUID asset, IEnumerable dependencies, out CachedAssetState cachedAssetState) - { - cachedAssetState = null; - - AssetState assetState; - if (!GetAssetState(asset, out assetState)) - return false; - - var visited = new HashSet(); - visited.Add(asset); - var dependencyStates = new List(); - foreach (var dependency in dependencies) - { - if (!visited.Add(dependency)) - continue; - - AssetState dependencyState; - if (!GetAssetState(dependency, out dependencyState)) - continue; - dependencyStates.Add(dependencyState); - } - - cachedAssetState = new CachedAssetState(); - cachedAssetState.asset = assetState; - cachedAssetState.dependencies = dependencyStates.ToArray(); - return true; - } - - static bool HasAssetOrDependencyChanged(CachedAssetState cachedInfo) - { - CachedAssetState newCachedInfo; - if (!GetCachedAssetStateForData(cachedInfo.asset.guid, cachedInfo.dependencies.Select(x => x.guid), out newCachedInfo)) - return true; - return !cachedInfo.Equals(newCachedInfo); - } - - /// - /// Save the content update information for a set of AddressableAssetEntry objects. - /// - /// File to write content stat info to. If file already exists, it will be deleted before the new file is created. - /// The entries to save. - /// The raw dependency information generated from the build. - /// The player version to save. This is usually set to AddressableAssetSettings.PlayerBuildVersion. - /// The server path (if any) that contains an updateable content catalog. If this is empty, updates cannot occur. - /// True if the file is saved, false otherwise. - public static bool SaveContentState(string path, List entries, IDependencyData dependencyData, string playerVersion, string remoteCatalogPath) - { - try - { - IList cachedInfos = new List(); - foreach (var assetData in dependencyData.AssetInfo) - { - CachedAssetState cachedAssetState; - if (GetCachedAssetStateForData(assetData.Key, assetData.Value.referencedObjects.Select(x => x.guid), out cachedAssetState)) - cachedInfos.Add(cachedAssetState); - } - foreach (var sceneData in dependencyData.SceneInfo) - { - CachedAssetState cachedAssetState; - if (GetCachedAssetStateForData(sceneData.Key, sceneData.Value.referencedObjects.Select(x => x.guid), out cachedAssetState)) - cachedInfos.Add(cachedAssetState); - } - - var cacheData = new AddressablesContentState - { - cachedInfos = cachedInfos.ToArray(), - playerVersion = playerVersion, - editorVersion = Application.unityVersion, - remoteCatalogLoadPath = remoteCatalogPath - }; - var formatter = new BinaryFormatter(); - if (File.Exists(path)) - File.Delete(path); - var dir = Path.GetDirectoryName(path); - if (!string.IsNullOrEmpty(dir) && !Directory.Exists(dir)) - Directory.CreateDirectory(dir); - var stream = new FileStream(path, FileMode.CreateNew, FileAccess.Write); - formatter.Serialize(stream, cacheData); - stream.Flush(); - stream.Close(); - stream.Dispose(); - return true; - } - catch (Exception e) - { - Debug.LogException(e); - return false; - } - } - - /// - /// Gets the path of the cache data from a selected build. - /// - /// If true, the user is allowed to browse for a specific file. - /// - public static string GetContentStateDataPath(bool browse) - { - var assetPath = AddressableAssetSettingsDefaultObject.kDefaultConfigFolder; - if (AddressableAssetSettingsDefaultObject.Settings != null) - assetPath = AddressableAssetSettingsDefaultObject.Settings.ConfigFolder; - assetPath = Path.Combine(assetPath, PlatformMappingService.GetPlatform().ToString()); - - if (browse) - { - if (string.IsNullOrEmpty(assetPath)) - assetPath = Application.dataPath; - - assetPath = EditorUtility.OpenFilePanel("Build Data File", Path.GetDirectoryName(assetPath), "bin"); - - if (string.IsNullOrEmpty(assetPath)) - return null; - - return assetPath; - } - - Directory.CreateDirectory(assetPath); - var path = Path.Combine(assetPath, "addressables_content_state.bin"); - return path; - } - - /// - /// Loads cache data from a specific location - /// - /// - /// - internal static AddressablesContentState LoadContentState(string contentStateDataPath) - { - if (string.IsNullOrEmpty(contentStateDataPath)) - { - Debug.LogErrorFormat("Unable to load cache data from {0}.", contentStateDataPath); - return null; - } - var stream = new FileStream(contentStateDataPath, FileMode.Open, FileAccess.Read); - var formatter = new BinaryFormatter(); - var cacheData = formatter.Deserialize(stream) as AddressablesContentState; - if (cacheData == null) - { - Addressables.LogError("Invalid hash data file. This file is usually named addressables_content_state.bin and is saved in the same folder as your source AddressableAssetsSettings.asset file."); - return null; - } - return cacheData; - } - - static bool s_StreamingAssetsExists; - static string kStreamingAssetsPath = "Assets/StreamingAssets"; - - internal static void Cleanup(bool deleteStreamingAssetsFolderIfEmpty) - { - if (Directory.Exists(Addressables.BuildPath)) - { - Directory.Delete(Addressables.BuildPath, true); - if (File.Exists(Addressables.BuildPath + ".meta")) - File.Delete(Addressables.BuildPath + ".meta"); - } - if (deleteStreamingAssetsFolderIfEmpty) - { - if (Directory.Exists(kStreamingAssetsPath)) - { - var files = Directory.GetFiles(kStreamingAssetsPath); - if (files.Length == 0) - { - Directory.Delete(kStreamingAssetsPath); - if (File.Exists(kStreamingAssetsPath + ".meta")) - File.Delete(kStreamingAssetsPath + ".meta"); - - } - } - } - } - - /// - /// Builds player content using the player content version from a specified cache file. - /// - /// The settings object to use for the build. - /// The path of the cache data to use. - /// The build operation. - public static AddressablesPlayerBuildResult BuildContentUpdate(AddressableAssetSettings settings, string contentStateDataPath) - { - var cacheData = LoadContentState(contentStateDataPath); - - if (!IsCacheDataValid(settings, cacheData)) - return null; - - s_StreamingAssetsExists = Directory.Exists("Assets/StreamingAssets"); - var context = new AddressablesDataBuilderInput(settings, cacheData.playerVersion); - - Cleanup(!s_StreamingAssetsExists); - - SceneManagerState.Record(); - var result = settings.ActivePlayerDataBuilder.BuildData(context); - if (!string.IsNullOrEmpty(result.Error)) - Debug.LogError(result.Error); - SceneManagerState.Restore(); - return result; - } - - internal static bool IsCacheDataValid(AddressableAssetSettings settings, AddressablesContentState cacheData) - { - if (cacheData == null) - return false; - - if (cacheData.editorVersion != Application.unityVersion) - Addressables.LogWarningFormat("Building content update with Unity editor version `{0}`, data was created with version `{1}`. This may result in incompatible data.", Application.unityVersion, cacheData.editorVersion); - - if (string.IsNullOrEmpty(cacheData.remoteCatalogLoadPath)) - { - Addressables.LogError("Previous build had 'Build Remote Catalog' disabled. You cannot update a player that has no remote catalog specified"); - return false; - } - if (!settings.BuildRemoteCatalog) - { - Addressables.LogError("Current settings have 'Build Remote Catalog' disabled. You cannot update a player that has no remote catalog to look to."); - return false; - } - - if (cacheData.remoteCatalogLoadPath != settings.RemoteCatalogLoadPath.GetValue(settings)) - { - Addressables.LogErrorFormat("Current 'Remote Catalog Load Path' does not match load path of original player. Player will only know to look up catalog at original location. Original: {0} Current: {1}", cacheData.remoteCatalogLoadPath, settings.RemoteCatalogLoadPath.GetValue(settings)); - return false; - } - - return true; - } - /// - /// Get all modified addressable asset entries in groups that have BundledAssetGroupSchema and ContentUpdateGroupSchema with static content enabled. - /// - /// Addressable asset settings. - /// The cache data path. - /// A list of all modified entries (list is empty if there are none); null if failed to load cache data. - //temporarily switched back to internal for 1.1.x releases. Will be public in 1.2+ - //public static List GatherModifiedEntries(AddressableAssetSettings settings, string cacheDataPath) - internal static List GatherModifiedEntries(AddressableAssetSettings settings, string cacheDataPath) - { - var cacheData = LoadContentState(cacheDataPath); - if (cacheData == null) - { - return null; - } - - List noBundledAssetGroupSchema = new List(); - List noStaticContent = new List(); - - var allEntries = new List(); - settings.GetAllAssets(allEntries, g => - { - - if (!g.HasSchema()) - { - noBundledAssetGroupSchema.Add(g.Name); - return false; - } - - if (!g.HasSchema()) - { - noStaticContent.Add(g.Name); - return false; - } - - if (!g.GetSchema().StaticContent) - { - noStaticContent.Add(g.Name); - return false; - } - - return true; - }); - - StringBuilder builder = new StringBuilder(); - builder.AppendFormat("Skipping Prepare for Content Update on {0} group(s):\n\n", - noBundledAssetGroupSchema.Count + noStaticContent.Count); - - - AddInvalidGroupsToLogMessage(builder, noBundledAssetGroupSchema, "Group Did Not Contain BundledAssetGroupSchema"); - AddInvalidGroupsToLogMessage(builder, noStaticContent, "Static Content Not Enabled In Schemas"); - - Debug.Log(builder.ToString()); - - var entryToCacheInfo = new Dictionary(); - foreach (var cacheInfo in cacheData.cachedInfos) - if (cacheInfo != null) - entryToCacheInfo[cacheInfo.asset.guid.ToString()] = cacheInfo; - var modifiedEntries = new List(); - foreach (var entry in allEntries) - { - CachedAssetState cachedInfo; - if (!entryToCacheInfo.TryGetValue(entry.guid, out cachedInfo) || HasAssetOrDependencyChanged(cachedInfo)) - modifiedEntries.Add(entry); - } - return modifiedEntries; - } - - private static void AddInvalidGroupsToLogMessage(StringBuilder builder, List invalidGroupList, - string headerMessage) - { - if (invalidGroupList.Count > 0) - { - builder.AppendFormat("{0} ({1} groups):\n", headerMessage, invalidGroupList.Count); - int maxList = 15; - for (int i = 0; i < invalidGroupList.Count; i++) - { - if (i > maxList) - { - builder.AppendLine("..."); - break; - } - - builder.AppendLine("-" + invalidGroupList[i]); - } - - builder.AppendLine(""); - } - } - - /// - /// Create a new AddressableAssetGroup with the items and mark it as remote. - /// - /// The settings object. - /// The items to move. - /// The name of the new group. - public static void CreateContentUpdateGroup(AddressableAssetSettings settings, List items, string groupName) - { - var contentGroup = settings.CreateGroup(settings.FindUniqueGroupName(groupName), false, false, true, null); - var schema = contentGroup.AddSchema(); - schema.BuildPath.SetVariableByName(settings, AddressableAssetSettings.kRemoteBuildPath); - schema.LoadPath.SetVariableByName(settings, AddressableAssetSettings.kRemoteLoadPath); - schema.BundleMode = BundledAssetGroupSchema.BundlePackingMode.PackTogether; - contentGroup.AddSchema().StaticContent = false; - settings.MoveEntries(items, contentGroup); - } - - } - - -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/ContentUpdateScript.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/ContentUpdateScript.cs.meta deleted file mode 100644 index a0923c67..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/ContentUpdateScript.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 36e2ba320a6ae3e4596bd1fe59b4fe21 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilderInterfaces.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilderInterfaces.cs deleted file mode 100644 index 73747ac3..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilderInterfaces.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Build -{ - /// - /// The result of IDataBuilder.Build. - /// - public interface IDataBuilderResult - { - /// - /// Duration of the build in seconds. - /// - double Duration { get; set; } - /// - /// Error string, if any. If Succeeded is true, this may be null. - /// - string Error { get; set; } - /// - /// Path of runtime settings file - /// - string OutputPath { get; set; } - /// - /// Registry of files created during the build - /// - FileRegistry FileRegistry { get; set; } - } - - /// - /// Builds objects of type IDataBuilderResult. - /// - public interface IDataBuilder - { - /// - /// The name of the builder, used for GUI. - /// - string Name { get; } - /// - /// Can this builder build the type of data requested. - /// - /// The data type. - /// True if the build can build it. - bool CanBuildData() where T : IDataBuilderResult; - /// - /// Build the data of a specific type. - /// - /// The data type. - /// The builderInput used to build the data. - /// The built data. - TResult BuildData(AddressablesDataBuilderInput builderInput) where TResult : IDataBuilderResult; - - /// - /// Clears all cached data. - /// - void ClearCachedData(); - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilderInterfaces.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilderInterfaces.cs.meta deleted file mode 100644 index fb3eee7c..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilderInterfaces.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 732aa8bf67ed2de438b3f2f56850c43e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders.meta deleted file mode 100644 index 210106d8..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 5064f4f2812f9e741be2105c6c338f98 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/AddressableAssetsBuildContext.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/AddressableAssetsBuildContext.cs deleted file mode 100644 index dd9abca4..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/AddressableAssetsBuildContext.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Collections.Generic; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEngine.AddressableAssets.Initialization; -using UnityEngine.AddressableAssets.ResourceLocators; - -namespace UnityEditor.AddressableAssets.Build.DataBuilders -{ - - /// - /// Interface for any Addressables specific context objects to be used in the Scriptable Build Pipeline context store - /// - public interface IAddressableAssetsBuildContext : IContextObject { } - - /// - /// Simple context object for passing data through SBP, between different sections of Addressables code. - /// - public class AddressableAssetsBuildContext : IAddressableAssetsBuildContext - { - public AddressableAssetSettings settings; - public ResourceManagerRuntimeData runtimeData; - public List locations; - public Dictionary bundleToAssetGroup; - public Dictionary> assetGroupToBundles; - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/AddressableAssetsBuildContext.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/AddressableAssetsBuildContext.cs.meta deleted file mode 100644 index 549d1da0..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/AddressableAssetsBuildContext.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bdd672a655042ae4fa4c3f8c8d8853a6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/AddressableAssetsBundleBuildParameters.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/AddressableAssetsBundleBuildParameters.cs deleted file mode 100644 index 9f8d8332..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/AddressableAssetsBundleBuildParameters.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System.Collections.Generic; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.AddressableAssets.Settings.GroupSchemas; -using UnityEditor.Build.Pipeline; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Build.DataBuilders -{ - /// - /// Custom bundle parameter container that provides custom compression settings per bundle. - /// - public class AddressableAssetsBundleBuildParameters : BundleBuildParameters - { - Dictionary m_bundleToAssetGroup; - AddressableAssetSettings m_settings; - /// - /// Create a AddressableAssetsBundleBuildParameters with data needed to determine the correct compression per bundle. - /// - /// The AddressableAssetSettings object to use for retrieving groups. - /// Mapping of bundle identifier to guid of asset groups. - /// The build target. This is used by the BundleBuildParameters base class. - /// The build target group. This is used by the BundleBuildParameters base class. - /// The path for the output folder. This is used by the BundleBuildParameters base class. - public AddressableAssetsBundleBuildParameters(AddressableAssetSettings aaSettings, Dictionary bundleToAssetGroup, BuildTarget target, BuildTargetGroup group, string outputFolder) : base(target, group, outputFolder) - { - UseCache = true; - m_settings = aaSettings; - m_bundleToAssetGroup = bundleToAssetGroup; - - //If default group has BundledAssetGroupSchema use the compression there otherwise check if the target is webgl or not and try set the compression accordingly - if(m_settings.DefaultGroup.HasSchema()) - BundleCompression = ConverBundleCompressiontToBuildCompression(m_settings.DefaultGroup.GetSchema().Compression); - else - BundleCompression = target == BuildTarget.WebGL ? BuildCompression.LZ4Runtime : BuildCompression.LZMA; - } - - private BuildCompression ConverBundleCompressiontToBuildCompression( - BundledAssetGroupSchema.BundleCompressionMode compressionMode) - { - BuildCompression compresion = BuildCompression.LZMA; - switch (compressionMode) - { - case BundledAssetGroupSchema.BundleCompressionMode.LZMA: - break; - case BundledAssetGroupSchema.BundleCompressionMode.LZ4: - compresion = BuildCompression.LZ4; - break; - case BundledAssetGroupSchema.BundleCompressionMode.Uncompressed: - compresion = BuildCompression.Uncompressed; - break; - } - - return compresion; - } - - /// - /// Get the compressions settings for the specified asset bundle. - /// - /// The identifier of the asset bundle. - /// The compression setting for the asset group. If the group is not found, the default compression is used. - public override BuildCompression GetCompressionForIdentifier(string identifier) - { - string groupGuid; - if (m_bundleToAssetGroup.TryGetValue(identifier, out groupGuid)) - { - var group = m_settings.FindGroup(g => g.Guid == groupGuid); - if (group != null) - { - var abSchema = group.GetSchema(); - if (abSchema != null) - return abSchema.GetBuildCompressionForBundle(identifier); - else - Debug.LogWarningFormat("Bundle group {0} does not have BundledAssetGroupSchema.", group.name); - } - else - { - Debug.LogWarningFormat("Unable to find group with guid {0}", groupGuid); - } - } - return base.GetCompressionForIdentifier(identifier); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/AddressableAssetsBundleBuildParameters.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/AddressableAssetsBundleBuildParameters.cs.meta deleted file mode 100644 index 769373ff..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/AddressableAssetsBundleBuildParameters.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e4e9f0f7eaff4094990720ec2b944faf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptBase.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptBase.cs deleted file mode 100644 index 4f032b1d..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptBase.cs +++ /dev/null @@ -1,212 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.AddressableAssets.Settings.GroupSchemas; -using UnityEngine; -using UnityEngine.AddressableAssets.ResourceLocators; -using UnityEngine.ResourceManagement.ResourceProviders; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets.Build.DataBuilders -{ - /// - /// Base class for build script assets - /// - public class BuildScriptBase : ScriptableObject, IDataBuilder - { - /// - /// The type of instance provider to create for the Addressables system. - /// - [FormerlySerializedAs("m_InstanceProviderType")] - [SerializedTypeRestrictionAttribute(type = typeof(IInstanceProvider))] - public SerializedType instanceProviderType = new SerializedType() { Value = typeof(InstanceProvider) }; - /// - /// The type of scene provider to create for the addressables system. - /// - [FormerlySerializedAs("m_SceneProviderType")] - [SerializedTypeRestrictionAttribute(type = typeof(ISceneProvider))] - public SerializedType sceneProviderType = new SerializedType() { Value = typeof(SceneProvider) }; - - /// - /// The descriptive name used in the UI. - /// - public virtual string Name - { - get - { - return "Undefined"; - } - } - - /// - /// Build the specified data with the provided builderInput. This is the public entry point. - /// Child class overrides should use - /// - /// The type of data to build. - /// The builderInput object used in the build. - /// The build data result. - public TResult BuildData(AddressablesDataBuilderInput builderInput) where TResult : IDataBuilderResult - { - if (!CanBuildData()) - { - var message = "Data builder " + Name + " cannot build requested type: " + typeof(TResult); - Debug.LogError(message); - return AddressableAssetBuildResult.CreateResult(null, 0, message); - } - - // Append the file registry to the results - var result = BuildDataImplementation(builderInput); - if (result != null) - result.FileRegistry = builderInput.Registry; - - return result; - } - - /// - /// The implementation of . That is the public entry point, - /// this is the home for child class overrides. - /// - /// The builderInput object used in the build - /// The type of data to build - /// The build data result - protected virtual TResult BuildDataImplementation(AddressablesDataBuilderInput builderInput) where TResult : IDataBuilderResult - { - return default(TResult); - } - - /// - /// Loops over each group, after doing some data checking. - /// - /// The Addressables builderInput object to base the group processing on - /// An error string if there were any problems processing the groups - protected virtual string ProcessAllGroups(AddressableAssetsBuildContext aaContext) - { - if (aaContext == null || - aaContext.settings == null || - aaContext.settings.groups == null) - { - return "No groups found to process in build script " + Name; - } - //intentionally for not foreach so groups can be added mid-loop. - for(int index = 0; index < aaContext.settings.groups.Count; index++) - { - AddressableAssetGroup assetGroup = aaContext.settings.groups[index]; - var errorString = ProcessGroup(assetGroup, aaContext); - if(!string.IsNullOrEmpty(errorString)) - return errorString; - } - - return string.Empty; - } - - /// - /// Build processing of an individual group. - /// - /// The group to process - /// The Addressables builderInput object to base the group processing on - /// An error string if there were any problems processing the groups - protected virtual string ProcessGroup(AddressableAssetGroup assetGroup, AddressableAssetsBuildContext aaContext) - { - return string.Empty; - } - - /// - /// Used to determine if this builder is capable of building a specific type of data. - /// - /// The type of data needed to be built. - /// True if this builder can build this data. - public virtual bool CanBuildData() where T : IDataBuilderResult - { - return false; - } - - /// - /// Utility method for creating locations from player data. - /// - /// The group to extract the locations from. - /// The list of created locations to fill in. - /// True if any legacy locations were created. This is used by the build scripts to determine if a legacy provider is needed. - protected bool CreateLocationsForPlayerData(PlayerDataGroupSchema playerDataSchema, AddressableAssetGroup assetGroup, List locations) - { - bool needsLegacyProvider = false; - if (playerDataSchema != null && (playerDataSchema.IncludeBuildSettingsScenes || playerDataSchema.IncludeResourcesFolders)) - { - var entries = new List(); - assetGroup.GatherAllAssets(entries, true, true); - foreach (var a in entries) - { - if (!playerDataSchema.IncludeBuildSettingsScenes && a.IsInSceneList) - continue; - if (!playerDataSchema.IncludeResourcesFolders && a.IsInResources) - continue; - a.CreateCatalogEntries(locations, false, a.IsScene ? "" : typeof(LegacyResourcesProvider).FullName, null, null); - if (!a.IsScene) - needsLegacyProvider = true; - } - } - return needsLegacyProvider; - } - - /// - /// Utility method for deleting files. - /// - /// The file path to delete. - protected static void DeleteFile(string path) - { - try - { - if (File.Exists(path)) - File.Delete(path); - } - catch (Exception ex) - { - Debug.LogException(ex); - } - } - - /// - /// Utility method to write a file. The directory will be created if it does not exist. - /// - /// The path of the file to write. - /// The content of the file. - /// The file registry used to track all produced artifacts. - /// True if the file was written. - protected static bool WriteFile(string path, string content, FileRegistry registry) - { - try - { - registry.AddFile(path); - var dir = Path.GetDirectoryName(path); - if (!string.IsNullOrEmpty(dir) && !Directory.Exists(dir)) - Directory.CreateDirectory(dir); - File.WriteAllText(path, content); - return true; - } - catch (Exception ex) - { - Debug.LogException(ex); - registry.RemoveFile(path); - return false; - } - - } - - /// - /// Used to clean up any cached data created by this builder. - /// - public virtual void ClearCachedData() - { - - } - - /// - /// Checks to see if the data is built for the given builder. - /// - public virtual bool IsDataBuilt() - { - return false; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptBase.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptBase.cs.meta deleted file mode 100644 index 09e133b8..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptBase.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8559dec58f92398448ea2ea83fd63c3e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptFastMode.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptFastMode.cs deleted file mode 100644 index fcb6e12b..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptFastMode.cs +++ /dev/null @@ -1,149 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.AddressableAssets.Settings.GroupSchemas; -using UnityEngine; -using UnityEngine.AddressableAssets; -using UnityEngine.AddressableAssets.Initialization; -using UnityEngine.AddressableAssets.ResourceLocators; -using UnityEngine.AddressableAssets.ResourceProviders; -using UnityEngine.ResourceManagement.ResourceProviders; -using UnityEngine.ResourceManagement.Util; - -namespace UnityEditor.AddressableAssets.Build.DataBuilders -{ - /// - /// Build script used for fast iteration in the editor. - /// - [CreateAssetMenu(fileName = "BuildScriptFast.asset", menuName = "Addressable Assets/Data Builders/Fast Mode")] - public class BuildScriptFastMode : BuildScriptBase - { - /// - public override string Name - { - get - { - return "Fast Mode"; - } - } - - /// - public override bool CanBuildData() - { - return typeof(T).IsAssignableFrom(typeof(AddressablesPlayModeBuildResult)); - } - - /// - public override void ClearCachedData() - { - DeleteFile(string.Format(PathFormat, "", "catalog")); - DeleteFile(string.Format(PathFormat, "", "settings")); - } - - /// - public override bool IsDataBuilt() - { - var catalogPath = string.Format(PathFormat, "", "catalog"); - var settingsPath = string.Format(PathFormat, "", "settings"); - return File.Exists(catalogPath) && - File.Exists(settingsPath); - } - - private string m_PathFormatStore; - private string PathFormat - { - get - { - if(string.IsNullOrEmpty(m_PathFormatStore)) - m_PathFormatStore = "{0}Library/com.unity.addressables/{1}_BuildScriptFastMode.json"; - return m_PathFormatStore; - } - set { m_PathFormatStore = value; } - } - bool m_NeedsLegacyProvider = false; - - /// - protected override TResult BuildDataImplementation(AddressablesDataBuilderInput context) - { - TResult result = default(TResult); - - var timer = new Stopwatch(); - timer.Start(); - var aaSettings = context.AddressableSettings; - PathFormat = context.PathFormat; - - //create runtime data - var aaContext = new AddressableAssetsBuildContext - { - settings = aaSettings, - runtimeData = new ResourceManagerRuntimeData(), - bundleToAssetGroup = null, - locations = new List() - }; - aaContext.runtimeData.BuildTarget = context.Target.ToString(); - aaContext.runtimeData.LogResourceManagerExceptions = aaSettings.buildSettings.LogResourceManagerExceptions; - aaContext.runtimeData.ProfileEvents = ProjectConfigData.postProfilerEvents; - aaContext.runtimeData.CatalogLocations.Add(new ResourceLocationData(new[] { ResourceManagerRuntimeData.kCatalogAddress }, string.Format(PathFormat, "file://{UnityEngine.Application.dataPath}/../", "catalog"), typeof(ContentCatalogProvider), typeof(ContentCatalogData))); - - var errorString = ProcessAllGroups(aaContext); - if(!string.IsNullOrEmpty(errorString)) - result = AddressableAssetBuildResult.CreateResult(null, 0, errorString); - - if (result == null) - { - foreach (var io in aaSettings.InitializationObjects) - { - if (io is IObjectInitializationDataProvider) - aaContext.runtimeData.InitializationObjects.Add((io as IObjectInitializationDataProvider).CreateObjectInitializationData()); - } - - var settingsPath = string.Format(PathFormat, "", "settings"); - WriteFile(settingsPath, JsonUtility.ToJson(aaContext.runtimeData), context.Registry); - - //save catalog - var catalogData = new ContentCatalogData(aaContext.locations); - if (m_NeedsLegacyProvider) - catalogData.ResourceProviderData.Add(ObjectInitializationData.CreateSerializedInitializationData(typeof(LegacyResourcesProvider))); - catalogData.ResourceProviderData.Add(ObjectInitializationData.CreateSerializedInitializationData()); - catalogData.InstanceProviderData = ObjectInitializationData.CreateSerializedInitializationData(instanceProviderType.Value); - catalogData.SceneProviderData = ObjectInitializationData.CreateSerializedInitializationData(sceneProviderType.Value); - WriteFile(string.Format(PathFormat, "", "catalog"), JsonUtility.ToJson(catalogData), context.Registry); - - - //inform runtime of the init data path - var runtimeSettingsPath = string.Format(PathFormat, "file://{UnityEngine.Application.dataPath}/../", "settings"); - PlayerPrefs.SetString(Addressables.kAddressablesRuntimeDataPath, runtimeSettingsPath); - result = AddressableAssetBuildResult.CreateResult(settingsPath, aaContext.locations.Count); - } - - if(result != null) - result.Duration = timer.Elapsed.TotalSeconds; - - return result; - } - - /// - protected override string ProcessGroup(AddressableAssetGroup assetGroup, AddressableAssetsBuildContext aaContext) - { - var errorString = string.Empty; - PlayerDataGroupSchema playerSchema = assetGroup.GetSchema(); - if (playerSchema != null) - { - m_NeedsLegacyProvider = CreateLocationsForPlayerData(playerSchema, assetGroup, aaContext.locations); - return errorString; - } - - var allEntries = new List(); - foreach (var a in assetGroup.entries) - a.GatherAllAssets(allEntries, true, true); - - var providerType = typeof(AssetDatabaseProvider).FullName; - foreach (var a in allEntries) - a.CreateCatalogEntries(aaContext.locations, false, providerType, null, null); - - return errorString; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptFastMode.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptFastMode.cs.meta deleted file mode 100644 index 99c976b9..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptFastMode.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 88d21199f5d473f4db36845f2318f180 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptPackedMode.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptPackedMode.cs deleted file mode 100644 index c8a089ad..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptPackedMode.cs +++ /dev/null @@ -1,605 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Text; -using UnityEditor.AddressableAssets.Build.BuildPipelineTasks; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.AddressableAssets.Settings.GroupSchemas; -using UnityEditor.Build.Pipeline; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Tasks; -using UnityEditor.Build.Pipeline.Utilities; -using UnityEditor.SceneManagement; -using UnityEngine; -using UnityEngine.AddressableAssets; -using UnityEngine.AddressableAssets.Initialization; -using UnityEngine.AddressableAssets.ResourceLocators; -using UnityEngine.AddressableAssets.ResourceProviders; -using UnityEngine.ResourceManagement.ResourceProviders; -using UnityEngine.ResourceManagement.Util; - -namespace UnityEditor.AddressableAssets.Build.DataBuilders -{ - using Debug = UnityEngine.Debug; - - /// - /// Build scripts used for player builds and running with bundles in the editor. - /// - [CreateAssetMenu(fileName = "BuildScriptPacked.asset", menuName = "Addressable Assets/Data Builders/Packed Mode")] - public class BuildScriptPackedMode : BuildScriptBase - { - /// - public override string Name - { - get - { - return "Packed Mode"; - } - } - - List m_ResourceProviderData; - List m_AllBundleInputDefs; - HashSet m_CreatedProviderIds; - LinkXmlGenerator m_Linker; - - /// - public override bool CanBuildData() - { - return typeof(T).IsAssignableFrom(typeof(AddressablesPlayerBuildResult)); - } - - /// - protected override TResult BuildDataImplementation(AddressablesDataBuilderInput builderInput) - { - TResult result = default(TResult); - - var timer = new Stopwatch(); - timer.Start(); - var aaSettings = builderInput.AddressableSettings; - - var locations = new List(); - m_AllBundleInputDefs = new List(); - var bundleToAssetGroup = new Dictionary(); - var runtimeData = new ResourceManagerRuntimeData(); - runtimeData.CertificateHandlerType = aaSettings.CertificateHandlerType; - runtimeData.BuildTarget = builderInput.Target.ToString(); - runtimeData.ProfileEvents = builderInput.ProfilerEventsEnabled; - runtimeData.LogResourceManagerExceptions = aaSettings.buildSettings.LogResourceManagerExceptions; - m_Linker = new LinkXmlGenerator(); - m_Linker.SetTypeConversion(typeof(UnityEditor.Animations.AnimatorController), typeof(RuntimeAnimatorController)); - m_Linker.AddTypes(runtimeData.CertificateHandlerType); - - m_ResourceProviderData = new List(); - var aaContext = new AddressableAssetsBuildContext - { - settings = aaSettings, - runtimeData = runtimeData, - bundleToAssetGroup = bundleToAssetGroup, - locations = locations - }; - - m_CreatedProviderIds = new HashSet(); - var errorString = ProcessAllGroups(aaContext); - if(!string.IsNullOrEmpty(errorString)) - result = AddressableAssetBuildResult.CreateResult(null, 0, errorString); - - if (result == null) - { - result = DoBuild(builderInput, aaContext); - } - - if(result != null) - result.Duration = timer.Elapsed.TotalSeconds; - - return result; - } - - /// - /// The method that does the actual building after all the groups have been processed. - /// - /// The generic builderInput of the - /// - /// - /// - protected virtual TResult DoBuild(AddressablesDataBuilderInput builderInput, AddressableAssetsBuildContext aaContext) where TResult : IDataBuilderResult - { - ExtractDataTask extractData = new ExtractDataTask(); - - var playerBuildVersion = builderInput.PlayerVersion; - if (m_AllBundleInputDefs.Count > 0) - { - if (!EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo()) - return AddressableAssetBuildResult.CreateResult(null, 0, "Unsaved scenes"); - - var buildTarget = builderInput.Target; - var buildTargetGroup = builderInput.TargetGroup; - - var buildParams = new AddressableAssetsBundleBuildParameters( - aaContext.settings, - aaContext.bundleToAssetGroup, - buildTarget, - buildTargetGroup, - aaContext.settings.buildSettings.bundleBuildPath); - - var builtinShaderBundleName = aaContext.settings.DefaultGroup.Name.ToLower().Replace(" ", "").Replace('\\', '/').Replace("//", "/") + "_unitybuiltinshaders.bundle"; - var buildTasks = RuntimeDataBuildTasks(builtinShaderBundleName); - buildTasks.Add(extractData); - - string aaPath = aaContext.settings.AssetPath; - IBundleBuildResults results; - var exitCode = ContentPipeline.BuildAssetBundles(buildParams, new BundleBuildContent(m_AllBundleInputDefs), out results, buildTasks, aaContext); - - if (exitCode < ReturnCode.Success) - return AddressableAssetBuildResult.CreateResult(null, 0, "SBP Error" + exitCode); - if (aaContext.settings == null && !string.IsNullOrEmpty(aaPath)) - aaContext.settings = AssetDatabase.LoadAssetAtPath(aaPath); - - GenerateLocationListsTask.Run(aaContext, extractData.WriteData); - - foreach (var assetGroup in aaContext.settings.groups) - { - List bundles; - if (aaContext.assetGroupToBundles.TryGetValue(assetGroup, out bundles)) - PostProcessBundles(assetGroup, bundles, results, extractData.WriteData, aaContext.runtimeData, aaContext.locations, builderInput.Registry); - } - foreach (var r in results.WriteResults) - m_Linker.AddTypes(r.Value.includedTypes); - } - - //save catalog - var contentCatalog = new ContentCatalogData(aaContext.locations); - contentCatalog.ResourceProviderData.AddRange(m_ResourceProviderData); - contentCatalog.InstanceProviderData = ObjectInitializationData.CreateSerializedInitializationData(instanceProviderType.Value); - contentCatalog.SceneProviderData = ObjectInitializationData.CreateSerializedInitializationData(sceneProviderType.Value); - CreateCatalog(aaContext.settings, contentCatalog, aaContext.runtimeData.CatalogLocations, playerBuildVersion, builderInput.RuntimeCatalogFilename, builderInput.Registry); - m_Linker.AddTypes(instanceProviderType.Value); - - foreach (var io in aaContext.settings.InitializationObjects) - { - var provider = io as IObjectInitializationDataProvider; - if (provider != null) - { - var id = provider.CreateObjectInitializationData(); - aaContext.runtimeData.InitializationObjects.Add(id); - m_Linker.AddTypes(id.ObjectType.Value); - m_Linker.AddTypes(id.GetRuntimeTypes()); - } - } - m_Linker.AddTypes(typeof(Addressables)); - m_Linker.Save(Addressables.BuildPath + "/link.xml"); - var settingsPath = Addressables.BuildPath + "/" + builderInput.RuntimeSettingsFilename; - WriteFile(settingsPath, JsonUtility.ToJson(aaContext.runtimeData), builderInput.Registry); - - var opResult = AddressableAssetBuildResult.CreateResult(settingsPath, aaContext.locations.Count); - //save content update data if building for the player - var allEntries = new List(); - aaContext.settings.GetAllAssets(allEntries, g => g.HasSchema() && g.GetSchema().StaticContent); - var tempPath = Path.GetDirectoryName(Application.dataPath) + "/Library/com.unity.addressables/StreamingAssetsCopy/" + PlatformMappingService.GetPlatform() + "/addressables_content_state.bin"; - - var remoteCatalogLoadPath = aaContext.settings.BuildRemoteCatalog ? aaContext.settings.RemoteCatalogLoadPath.GetValue(aaContext.settings) : string.Empty; - if (extractData.BuildCache != null && ContentUpdateScript.SaveContentState(tempPath, allEntries, extractData.DependencyData, playerBuildVersion, remoteCatalogLoadPath)) - { - try - { - File.Copy(tempPath, ContentUpdateScript.GetContentStateDataPath(false), true); - } - catch (Exception e) - { - Debug.LogException(e); - } - } - - return opResult; - } - - /// - protected override string ProcessGroup(AddressableAssetGroup assetGroup, AddressableAssetsBuildContext aaContext) - { - foreach (var schema in assetGroup.Schemas) - { - var errorString = ProcessGroupSchema(schema, assetGroup, aaContext); - if(!string.IsNullOrEmpty(errorString)) - return errorString; - } - - return string.Empty; - } - - /// - /// Called per group per schema to evaluate that schema. This can be an easy entry point for implementing the - /// build aspects surrounding a custom schema. Note, you should not rely on schemas getting called in a specific - /// order. - /// - /// The schema to process - /// The group this schema was pulled from - /// The general Addressables build builderInput - /// - protected virtual string ProcessGroupSchema(AddressableAssetGroupSchema schema, AddressableAssetGroup assetGroup, AddressableAssetsBuildContext aaContext) - { - var playerDataSchema = schema as PlayerDataGroupSchema; - if (playerDataSchema != null) - return ProcessPlayerDataSchema(playerDataSchema, assetGroup, aaContext); - var bundledAssetSchema = schema as BundledAssetGroupSchema; - if (bundledAssetSchema != null) - return ProcessBundledAssetSchema(bundledAssetSchema, assetGroup, aaContext); - return string.Empty; - } - - string ProcessPlayerDataSchema( - PlayerDataGroupSchema schema, - AddressableAssetGroup assetGroup, - AddressableAssetsBuildContext aaContext) - { - if (CreateLocationsForPlayerData(schema, assetGroup, aaContext.locations)) - { - if (!m_CreatedProviderIds.Contains(typeof(LegacyResourcesProvider).Name)) - { - m_CreatedProviderIds.Add(typeof(LegacyResourcesProvider).Name); - m_ResourceProviderData.Add(ObjectInitializationData.CreateSerializedInitializationData(typeof(LegacyResourcesProvider))); - m_Linker.AddTypes(typeof(LegacyResourcesProvider)); - } - } - - return string.Empty; - } - - /// - /// The processing of the bundled asset schema. This is where the bundle(s) for a given group are actually setup. - /// - /// The BundledAssetGroupSchema to process - /// The group this schema was pulled from - /// The general Addressables build builderInput - /// The error string, if any. - protected virtual string ProcessBundledAssetSchema( - BundledAssetGroupSchema schema, - AddressableAssetGroup assetGroup, - AddressableAssetsBuildContext aaContext) - { - if (schema == null || !schema.IncludeInBuild) - return string.Empty; - - var errorStr = ErrorCheckBundleSettings(schema,assetGroup, aaContext.settings); - if (!string.IsNullOrEmpty(errorStr)) - return errorStr; - - var bundledProviderId = schema.GetBundleCachedProviderId(); - var assetProviderId = schema.GetAssetCachedProviderId(); - if (!m_CreatedProviderIds.Contains(bundledProviderId)) - { - m_CreatedProviderIds.Add(bundledProviderId); - - var bundleProviderType = schema.AssetBundleProviderType.Value; - m_Linker.AddTypes(bundleProviderType); - - var bundleProviderData = ObjectInitializationData.CreateSerializedInitializationData(bundleProviderType, bundledProviderId); - m_Linker.AddTypes(bundleProviderData.GetRuntimeTypes()); - m_ResourceProviderData.Add(bundleProviderData); - - } - - if (!m_CreatedProviderIds.Contains(assetProviderId)) - { - m_CreatedProviderIds.Add(assetProviderId); - var assetProviderType = schema.BundledAssetProviderType.Value; - m_Linker.AddTypes(assetProviderType); - - var assetProviderData = ObjectInitializationData.CreateSerializedInitializationData(assetProviderType, assetProviderId); - m_ResourceProviderData.Add(assetProviderData); - m_Linker.AddTypes(assetProviderData.GetRuntimeTypes()); - - } - - var bundleInputDefs = new List(); - PrepGroupBundlePacking(assetGroup, bundleInputDefs, aaContext.locations, schema.BundleMode); - for (int i = 0; i < bundleInputDefs.Count; i++) - { - if (aaContext.bundleToAssetGroup.ContainsKey(bundleInputDefs[i].assetBundleName)) - { - var bid = bundleInputDefs[i]; - int count = 1; - var newName = bid.assetBundleName; - while (aaContext.bundleToAssetGroup.ContainsKey(newName) && count < 1000) - newName = bid.assetBundleName.Replace(".bundle", string.Format("{0}.bundle", count++)); - bundleInputDefs[i] = new AssetBundleBuild { assetBundleName = newName, addressableNames = bid.addressableNames, assetBundleVariant = bid.assetBundleVariant, assetNames = bid.assetNames }; - } - - aaContext.bundleToAssetGroup.Add(bundleInputDefs[i].assetBundleName, assetGroup.Guid); - } - m_AllBundleInputDefs.AddRange(bundleInputDefs); - return string.Empty; - } - - internal static string ErrorCheckBundleSettings(BundledAssetGroupSchema schema, AddressableAssetGroup assetGroup, AddressableAssetSettings settings) - { - var message = string.Empty; - - var buildPath = settings.profileSettings.GetValueById(settings.activeProfileId, schema.BuildPath.Id); - var loadPath = settings.profileSettings.GetValueById(settings.activeProfileId, schema.LoadPath.Id); - - var buildLocal = buildPath.Contains("[UnityEngine.AddressableAssets.Addressables.BuildPath]"); - var loadLocal = loadPath.Contains("{UnityEngine.AddressableAssets.Addressables.RuntimePath}"); - - if (buildLocal && !loadLocal) - { - message = "BuildPath for group '" + assetGroup.Name + "' is set to the dynamic-lookup version of StreamingAssets, but LoadPath is not. \n"; - } - else if (!buildLocal && loadLocal) - { - message = "LoadPath for group " + assetGroup.Name + " is set to the dynamic-lookup version of StreamingAssets, but BuildPath is not. These paths must both use the dynamic-lookup, or both not use it. \n"; - } - - if (!string.IsNullOrEmpty(message)) - { - message += "BuildPath: '" + buildPath + "'\n"; - message += "LoadPath: '" + loadPath + "'"; - } - - return message; - } - - internal static void PrepGroupBundlePacking(AddressableAssetGroup assetGroup, List bundleInputDefs, List locationData, BundledAssetGroupSchema.BundlePackingMode packingMode) - { - if (packingMode == BundledAssetGroupSchema.BundlePackingMode.PackTogether) - { - var allEntries = new List(); - foreach (var a in assetGroup.entries) - a.GatherAllAssets(allEntries, true, true); - GenerateBuildInputDefinitions(allEntries, bundleInputDefs, assetGroup.Name, "all"); - } - else - { - if (packingMode == BundledAssetGroupSchema.BundlePackingMode.PackSeparately) - { - foreach (var a in assetGroup.entries) - { - var allEntries = new List(); - a.GatherAllAssets(allEntries, true, true); - GenerateBuildInputDefinitions(allEntries, bundleInputDefs, assetGroup.Name, a.address); - } - } - else - { - var labelTable = new Dictionary>(); - foreach (var a in assetGroup.entries) - { - var sb = new StringBuilder(); - foreach (var l in a.labels) - sb.Append(l); - var key = sb.ToString(); - List entries; - if (!labelTable.TryGetValue(key, out entries)) - labelTable.Add(key, entries = new List()); - entries.Add(a); - } - - foreach (var entryGroup in labelTable) - { - var allEntries = new List(); - foreach (var a in entryGroup.Value) - a.GatherAllAssets(allEntries, true, true); - GenerateBuildInputDefinitions(allEntries, bundleInputDefs, assetGroup.Name, entryGroup.Key); - } - } - } - } - - static void GenerateBuildInputDefinitions(List allEntries, List buildInputDefs, string groupName, string address) - { - var scenes = new List(); - var assets = new List(); - foreach (var e in allEntries) - { - if (e.AssetPath.EndsWith(".unity")) - scenes.Add(e); - else - assets.Add(e); - } - if (assets.Count > 0) - buildInputDefs.Add(GenerateBuildInputDefinition(assets, groupName + "_assets_" + address + ".bundle")); - if (scenes.Count > 0) - buildInputDefs.Add(GenerateBuildInputDefinition(scenes, groupName + "_scenes_" + address + ".bundle")); - } - - static AssetBundleBuild GenerateBuildInputDefinition(List assets, string name) - { - var assetsInputDef = new AssetBundleBuild(); - assetsInputDef.assetBundleName = name.ToLower().Replace(" ", "").Replace('\\', '/').Replace("//", "/"); - var assetIds = new List(assets.Count); - foreach (var a in assets) - { - assetIds.Add(a.AssetPath); - } - assetsInputDef.assetNames = assetIds.ToArray(); - assetsInputDef.addressableNames = new string[0]; - return assetsInputDef; - } - - static void CreateCatalog(AddressableAssetSettings aaSettings, ContentCatalogData contentCatalog, List locations, string playerVersion, string localCatalogFilename, FileRegistry registry) - { - - var localBuildPath = Addressables.BuildPath + "/" + localCatalogFilename; - var localLoadPath = "{UnityEngine.AddressableAssets.Addressables.RuntimePath}/" + localCatalogFilename; - - var jsonText = JsonUtility.ToJson(contentCatalog); - WriteFile(localBuildPath, jsonText, registry); - - string[] dependencyHashes = null; - if (aaSettings.BuildRemoteCatalog) - { - var contentHash = HashingMethods.Calculate(jsonText).ToString(); - - var versionedFileName = aaSettings.profileSettings.EvaluateString(aaSettings.activeProfileId, "/catalog_" + playerVersion); - var remoteBuildFolder = aaSettings.RemoteCatalogBuildPath.GetValue(aaSettings); - var remoteLoadFolder = aaSettings.RemoteCatalogLoadPath.GetValue(aaSettings); - - if (string.IsNullOrEmpty(remoteBuildFolder) || - string.IsNullOrEmpty(remoteLoadFolder) || - remoteBuildFolder == AddressableAssetProfileSettings.undefinedEntryValue || - remoteLoadFolder == AddressableAssetProfileSettings.undefinedEntryValue) - { - Addressables.LogWarning("Remote Build and/or Load paths are not set on the main AddressableAssetSettings asset, but 'Build Remote Catalog' is true. Cannot create remote catalog. In the inspector for any group, double click the 'Addressable Asset Settings' object to begin inspecting it. '" + remoteBuildFolder + "', '" + remoteLoadFolder + "'"); - } - else - { - var remoteJsonBuildPath = remoteBuildFolder + versionedFileName + ".json"; - var remoteHashBuildPath = remoteBuildFolder + versionedFileName + ".hash"; - - WriteFile(remoteJsonBuildPath, jsonText, registry); - WriteFile(remoteHashBuildPath, contentHash, registry); - - dependencyHashes = new string[((int)ContentCatalogProvider.DependencyHashIndex.Count)]; - dependencyHashes[(int)ContentCatalogProvider.DependencyHashIndex.Remote] = ResourceManagerRuntimeData.kCatalogAddress + "RemoteHash"; - dependencyHashes[(int)ContentCatalogProvider.DependencyHashIndex.Cache] = ResourceManagerRuntimeData.kCatalogAddress + "CacheHash"; - - var remoteHashLoadPath = remoteLoadFolder + versionedFileName + ".hash"; - locations.Add(new ResourceLocationData( - new[] { dependencyHashes[(int)ContentCatalogProvider.DependencyHashIndex.Remote] }, - remoteHashLoadPath, - typeof(TextDataProvider), typeof(string))); - - var cacheLoadPath = "{UnityEngine.Application.persistentDataPath}/com.unity.addressables" + versionedFileName + ".hash"; - locations.Add(new ResourceLocationData( - new[] { dependencyHashes[(int)ContentCatalogProvider.DependencyHashIndex.Cache] }, - cacheLoadPath, - typeof(TextDataProvider), typeof(string))); - } - } - - locations.Add(new ResourceLocationData( - new []{ ResourceManagerRuntimeData.kCatalogAddress }, - localLoadPath, - typeof(ContentCatalogProvider), - typeof(ContentCatalogData), - dependencyHashes)); - } - - - static IList RuntimeDataBuildTasks(string builtinShaderBundleName) - { - var buildTasks = new List(); - - // Setup - buildTasks.Add(new SwitchToBuildPlatform()); - buildTasks.Add(new RebuildSpriteAtlasCache()); - - // Player Scripts - buildTasks.Add(new BuildPlayerScripts()); - - // Dependency - buildTasks.Add(new CalculateSceneDependencyData()); - buildTasks.Add(new CalculateAssetDependencyData()); - buildTasks.Add(new StripUnusedSpriteSources()); - buildTasks.Add(new CreateBuiltInShadersBundle(builtinShaderBundleName)); - - // Packing - buildTasks.Add(new GenerateBundlePacking()); - buildTasks.Add(new UpdateBundleObjectLayout()); - - buildTasks.Add(new GenerateBundleCommands()); - buildTasks.Add(new GenerateSubAssetPathMaps()); - buildTasks.Add(new GenerateBundleMaps()); - - // Writing - buildTasks.Add(new WriteSerializedFiles()); - buildTasks.Add(new ArchiveAndCompressBundles()); - // buildTasks.Add(new PostProcessBundlesTask()); - - return buildTasks; - } - - static bool IsInternalIdLocal(string path) - { - return path.StartsWith("{UnityEngine.AddressableAssets.Addressables.RuntimePath}"); - } - - static void PostProcessBundles(AddressableAssetGroup assetGroup, List bundles, IBundleBuildResults buildResult, IWriteData writeData, ResourceManagerRuntimeData runtimeData, List locations, FileRegistry registry) - { - var schema = assetGroup.GetSchema(); - if (schema == null) - return; - - var path = schema.BuildPath.GetValue(assetGroup.Settings); - if (string.IsNullOrEmpty(path)) - return; - - foreach (var originalBundleName in bundles) - { - var newBundleName = originalBundleName; - var info = buildResult.BundleInfos[newBundleName]; - ContentCatalogDataEntry dataEntry = locations.First(s => newBundleName == (string)s.Keys[0]); - if (dataEntry != null) - { - var requestOptions = new AssetBundleRequestOptions - { - Crc = schema.UseAssetBundleCrc ? info.Crc : 0, - Hash = schema.UseAssetBundleCache ? info.Hash.ToString() : "", - ChunkedTransfer = schema.ChunkedTransfer, - RedirectLimit = schema.RedirectLimit, - RetryCount = schema.RetryCount, - Timeout = schema.Timeout, - BundleName = Path.GetFileName(info.FileName), - BundleSize = GetFileSize(info.FileName) - }; - dataEntry.Data = requestOptions; - - dataEntry.InternalId = BuildUtility.GetNameWithHashNaming(schema.BundleNaming, info.Hash.ToString(), dataEntry.InternalId); - newBundleName = BuildUtility.GetNameWithHashNaming(schema.BundleNaming, info.Hash.ToString(), newBundleName); - } - else - { - Debug.LogWarningFormat("Unable to find ContentCatalogDataEntry for bundle {0}.", newBundleName); - } - - var targetPath = Path.Combine(path, newBundleName); - if (!Directory.Exists(Path.GetDirectoryName(targetPath))) - Directory.CreateDirectory(Path.GetDirectoryName(targetPath)); - File.Copy(Path.Combine(assetGroup.Settings.buildSettings.bundleBuildPath, originalBundleName), targetPath, true); - registry.AddFile(targetPath); - } - } - - private static long GetFileSize(string fileName) - { - try - { - return new FileInfo(fileName).Length; - } - catch (Exception e) - { - Debug.LogException(e); - return 0; - } - } - - /// - public override void ClearCachedData() - { - if (Directory.Exists(Addressables.BuildPath)) - { - try - { - var catalogPath = Addressables.BuildPath + "/catalog.json"; - var settingsPath = Addressables.BuildPath + "/settings.json"; - DeleteFile(catalogPath); - DeleteFile(settingsPath); - Directory.Delete(Addressables.BuildPath, true); - } - catch (Exception e) - { - Debug.LogException(e); - } - } - } - - /// - public override bool IsDataBuilt() - { - var catalogPath = Addressables.BuildPath + "/catalog.json"; - var settingsPath = Addressables.BuildPath + "/settings.json"; - return File.Exists(catalogPath) && - File.Exists(settingsPath); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptPackedMode.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptPackedMode.cs.meta deleted file mode 100644 index e21795b3..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptPackedMode.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3e2e0ffa088c91d41a086d0b8cb16bdc -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptPackedPlayMode.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptPackedPlayMode.cs deleted file mode 100644 index 80ad787a..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptPackedPlayMode.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using System.IO; -using UnityEngine; -using UnityEngine.AddressableAssets; -using UnityEngine.AddressableAssets.Initialization; - -namespace UnityEditor.AddressableAssets.Build.DataBuilders -{ - /// - /// Uses data built by BuildScriptPacked class. This script just sets up the correct variables and runs. - /// - [CreateAssetMenu(fileName = "BuildScriptPackedPlayMode.asset", menuName = "Addressable Assets/Data Builders/Packed Play Mode")] - public class BuildScriptPackedPlayMode : BuildScriptBase - { - /// - public override string Name - { - get - { - return "Packed Play Mode"; - } - } - - private bool m_DataBuilt; - - public override void ClearCachedData() - { - m_DataBuilt = false; - } - - /// - public override bool IsDataBuilt() - { - return m_DataBuilt; - } - - /// - public override bool CanBuildData() - { - return typeof(T).IsAssignableFrom(typeof(AddressablesPlayModeBuildResult)); - } - - /// - protected override TResult BuildDataImplementation(AddressablesDataBuilderInput builderInput) - { - var timer = new System.Diagnostics.Stopwatch(); - timer.Start(); - var settingsPath = Addressables.BuildPath + "/settings.json"; - if (!File.Exists(settingsPath)) - { - IDataBuilderResult resE = new AddressablesPlayModeBuildResult() { Error = "Player content must be built before entering play mode with packed data. This can be done from the Addressable Assets window in the Build->Build Player Content menu command." }; - return (TResult)resE; - } - var rtd = JsonUtility.FromJson(File.ReadAllText(settingsPath)); - if (rtd == null) - { - IDataBuilderResult resE = new AddressablesPlayModeBuildResult() { Error = string.Format("Unable to load initialization data from path {0}. This can be done from the Addressable Assets window in the Build->Build Player Content menu command.", settingsPath) }; - return (TResult)resE; - } - - BuildTarget dataBuildTarget = BuildTarget.NoTarget; - if (!Enum.TryParse(rtd.BuildTarget, out dataBuildTarget)) - Debug.LogWarningFormat("Unable to parse build target from initialization data: '{0}'.", rtd.BuildTarget); - - if (BuildPipeline.GetBuildTargetGroup(dataBuildTarget) != BuildTargetGroup.Standalone) - Debug.LogWarningFormat("Asset bundles built with build target {0} may not be compatible with running in the Editor.", dataBuildTarget); - - //TODO: detect if the data that does exist is out of date.. - var runtimeSettingsPath = "{UnityEngine.AddressableAssets.Addressables.RuntimePath}/settings.json"; - PlayerPrefs.SetString(Addressables.kAddressablesRuntimeDataPath, runtimeSettingsPath); - IDataBuilderResult res = new AddressablesPlayModeBuildResult() { OutputPath = settingsPath, Duration = timer.Elapsed.TotalSeconds }; - m_DataBuilt = true; - return (TResult)res; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptPackedPlayMode.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptPackedPlayMode.cs.meta deleted file mode 100644 index 2367ec44..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptPackedPlayMode.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ad8c280d42ee0ed41a27db23b43dd2bf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptVirtualMode.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptVirtualMode.cs deleted file mode 100644 index 4bfccc89..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptVirtualMode.cs +++ /dev/null @@ -1,441 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.AddressableAssets.Build.BuildPipelineTasks; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.AddressableAssets.Settings.GroupSchemas; -using UnityEditor.Build.Pipeline; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Tasks; -using UnityEditor.SceneManagement; -using UnityEngine; -using UnityEngine.AddressableAssets; -using UnityEngine.AddressableAssets.Initialization; -using UnityEngine.AddressableAssets.ResourceLocators; -using UnityEngine.AddressableAssets.ResourceProviders; -using UnityEngine.ResourceManagement.ResourceProviders; -using UnityEngine.ResourceManagement.ResourceProviders.Simulation; -using UnityEngine.ResourceManagement.Util; -using System.IO; -using System.Linq; -using System.Text; - -namespace UnityEditor.AddressableAssets.Build.DataBuilders -{ - /// - /// Build script for creating virtual asset bundle dat for running in the editor. - /// - [CreateAssetMenu(fileName = "BuildScriptVirtual.asset", menuName = "Addressable Assets/Data Builders/Virtual Mode")] - public class BuildScriptVirtualMode : BuildScriptBase - { - /// - public override string Name - { - get { return "Virtual Mode"; } - } - - /// - public override bool CanBuildData() - { - return typeof(T).IsAssignableFrom(typeof(AddressablesPlayModeBuildResult)); - } - - /// - public override void ClearCachedData() - { - DeleteFile(string.Format(m_PathFormat, "", "catalog")); - DeleteFile(string.Format(m_PathFormat, "", "settings")); - } - - /// - public override bool IsDataBuilt() - { - var catalogPath = string.Format(m_PathFormat, "", "catalog"); - var settingsPath = string.Format(m_PathFormat, "", "settings"); - return File.Exists(catalogPath) && - File.Exists(settingsPath); - } - - private string m_pathFormatStore; - private string m_PathFormat - { - get - { - if (string.IsNullOrEmpty(m_pathFormatStore)) - m_pathFormatStore = "{0}Library/com.unity.addressables/{1}_BuildScriptVirtualMode.json"; - return m_pathFormatStore; - } - set { m_pathFormatStore = value; } - } - - List m_ResourceProviderData; - List m_AllBundleInputDefinitions; - Dictionary m_CreatedProviderIds; - - /// - protected override TResult BuildDataImplementation(AddressablesDataBuilderInput builderInput) - { - TResult result = default(TResult); - - var timer = new System.Diagnostics.Stopwatch(); - timer.Start(); - var aaSettings = builderInput.AddressableSettings; - - m_PathFormat = builderInput.PathFormat; - - - - //gather entries - var aaContext = new AddressableAssetsBuildContext - { - settings = aaSettings, - runtimeData = new ResourceManagerRuntimeData(), - bundleToAssetGroup = new Dictionary(), - locations = new List() - }; - m_AllBundleInputDefinitions = new List(); - aaContext.runtimeData.BuildTarget = builderInput.Target.ToString(); - aaContext.runtimeData.ProfileEvents = ProjectConfigData.postProfilerEvents; - aaContext.runtimeData.LogResourceManagerExceptions = aaSettings.buildSettings.LogResourceManagerExceptions; - aaContext.runtimeData.ProfileEvents = ProjectConfigData.postProfilerEvents; - aaContext.runtimeData.CatalogLocations.Add(new ResourceLocationData( - new[] { ResourceManagerRuntimeData.kCatalogAddress }, - string.Format(m_PathFormat, "file://{UnityEngine.Application.dataPath}/../", "catalog"), - typeof(ContentCatalogProvider), typeof(ContentCatalogData))); - - - m_CreatedProviderIds = new Dictionary(); - m_ResourceProviderData = new List(); - - var errorString = ProcessAllGroups(aaContext); - if(!string.IsNullOrEmpty(errorString)) - result = AddressableAssetBuildResult.CreateResult(null, 0, errorString); - - if (result == null) - { - result = DoBuild(builderInput, aaSettings, aaContext); - } - - if(result != null) - result.Duration = timer.Elapsed.TotalSeconds; - return result; - - } - - TResult DoBuild(AddressablesDataBuilderInput builderInput, AddressableAssetSettings aaSettings, AddressableAssetsBuildContext aaContext) where TResult : IDataBuilderResult - { - if (m_AllBundleInputDefinitions.Count > 0) - { - if (!EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo()) - return AddressableAssetBuildResult.CreateResult(null, 0, "Unsaved scenes"); - - var buildTarget = builderInput.Target; - var buildTargetGroup = builderInput.TargetGroup; - var buildParams = new AddressableAssetsBundleBuildParameters(aaSettings, aaContext.bundleToAssetGroup, buildTarget, buildTargetGroup, aaSettings.buildSettings.bundleBuildPath); - var builtinShaderBundleName = aaSettings.DefaultGroup.Name.ToLower().Replace(" ", "").Replace('\\', '/').Replace("//", "/") + "_unitybuiltinshaders.bundle"; - var buildTasks = RuntimeDataBuildTasks(aaSettings.buildSettings.compileScriptsInVirtualMode, builtinShaderBundleName); - ExtractDataTask extractData = new ExtractDataTask(); - buildTasks.Add(extractData); - - string aaPath = aaSettings.AssetPath; - IBundleBuildResults results; - var exitCode = ContentPipeline.BuildAssetBundles(buildParams, new BundleBuildContent(m_AllBundleInputDefinitions), out results, buildTasks, aaContext); - - if (exitCode < ReturnCode.Success) - return AddressableAssetBuildResult.CreateResult(null, 0, "SBP Error" + exitCode); - if (aaSettings == null && !string.IsNullOrEmpty(aaPath)) - aaContext.settings = aaSettings = AssetDatabase.LoadAssetAtPath(aaPath); - - GenerateLocationListsTask.Run(aaContext, extractData.WriteData); - } - - var bundledAssets = new Dictionary>(); - foreach (var loc in aaContext.locations) - { - if (loc.Dependencies != null && loc.Dependencies.Count > 0) - { - for (int i = 0; i < loc.Dependencies.Count; i++) - { - var dep = loc.Dependencies[i]; - List assetsInBundle; - if (!bundledAssets.TryGetValue(dep, out assetsInBundle)) - bundledAssets.Add(dep, assetsInBundle = new List()); - if (i == 0 && !assetsInBundle.Contains(loc.InternalId)) //only add the asset to the first bundle... - assetsInBundle.Add(loc.InternalId); - } - } - } - foreach (var bd in bundledAssets) - { - AddressableAssetGroup group = aaSettings.DefaultGroup; - string groupGuid; - if (aaContext.bundleToAssetGroup.TryGetValue(bd.Key as string, out groupGuid)) - group = aaSettings.FindGroup(g => g.Guid == groupGuid); - - var schema = group.GetSchema(); - if (schema != null) - { - var bundleLocData = aaContext.locations.First(s => s.Keys[0] == bd.Key); - var isLocalBundle = IsInternalIdLocal(bundleLocData.InternalId); - uint crc = (uint)UnityEngine.Random.Range(0, int.MaxValue); - var hash = Guid.NewGuid().ToString(); - - bundleLocData.InternalId = BuildUtility.GetNameWithHashNaming(schema.BundleNaming, hash, bundleLocData.InternalId); - - - var virtualBundleName = AddressablesRuntimeProperties.EvaluateString(bundleLocData.InternalId); - var bundleData = new VirtualAssetBundle(virtualBundleName, isLocalBundle, crc, hash); - - long dataSize = 0; - long headerSize = 0; - foreach (var a in bd.Value) - { - var size = ComputeSize(a); - bundleData.Assets.Add(new VirtualAssetBundleEntry(a, size)); - dataSize += size; - headerSize += a.Length * 5; //assume 5x path length overhead size per item, probably much less - } - if (bd.Value.Count == 0) - { - dataSize = 100 * 1024; - headerSize = 1024; - } - bundleData.SetSize(dataSize, headerSize); - - - var requestOptions = new VirtualAssetBundleRequestOptions - { - Crc = schema.UseAssetBundleCrc ? crc : 0, - Hash = schema.UseAssetBundleCache ? hash : "", - ChunkedTransfer = schema.ChunkedTransfer, - RedirectLimit = schema.RedirectLimit, - RetryCount = schema.RetryCount, - Timeout = schema.Timeout, - BundleName = Path.GetFileName(bundleLocData.InternalId), - BundleSize = dataSize + headerSize - }; - bundleLocData.Data = requestOptions; - - var bundleProviderId = schema.GetBundleCachedProviderId(); - var virtualBundleRuntimeData = m_CreatedProviderIds[bundleProviderId]; - virtualBundleRuntimeData.AssetBundles.Add(bundleData); - } - } - foreach (var kvp in m_CreatedProviderIds) - { - if (kvp.Value != null) - { - var bundleProviderData = ObjectInitializationData.CreateSerializedInitializationData(kvp.Key, kvp.Value); - m_ResourceProviderData.Add(bundleProviderData); - } - } - - var contentCatalog = new ContentCatalogData(aaContext.locations); - contentCatalog.ResourceProviderData.AddRange(m_ResourceProviderData); - contentCatalog.InstanceProviderData = ObjectInitializationData.CreateSerializedInitializationData(instanceProviderType.Value); - contentCatalog.SceneProviderData = ObjectInitializationData.CreateSerializedInitializationData(sceneProviderType.Value); - //save catalog - WriteFile(string.Format(m_PathFormat, "", "catalog"), JsonUtility.ToJson(contentCatalog), builderInput.Registry); - - - foreach (var io in aaSettings.InitializationObjects) - { - if (io is IObjectInitializationDataProvider) - aaContext.runtimeData.InitializationObjects.Add((io as IObjectInitializationDataProvider).CreateObjectInitializationData()); - } - - var settingsPath = string.Format(m_PathFormat, "", "settings"); - WriteFile(settingsPath, JsonUtility.ToJson(aaContext.runtimeData), builderInput.Registry); - - //inform runtime of the init data path - var runtimeSettingsPath = string.Format(m_PathFormat, "file://{UnityEngine.Application.dataPath}/../", "settings"); - PlayerPrefs.SetString(Addressables.kAddressablesRuntimeDataPath, runtimeSettingsPath); - var result = AddressableAssetBuildResult.CreateResult(settingsPath, aaContext.locations.Count); - return result; - } - - - /// - protected override string ProcessGroup(AddressableAssetGroup assetGroup, AddressableAssetsBuildContext aaContext) - { - var errorString = string.Empty; - PlayerDataGroupSchema playerSchema = assetGroup.GetSchema(); - if (playerSchema != null) - { - if (CreateLocationsForPlayerData(playerSchema, assetGroup, aaContext.locations)) - { - if (!m_CreatedProviderIds.ContainsKey(typeof(LegacyResourcesProvider).Name)) - { - m_CreatedProviderIds.Add(typeof(LegacyResourcesProvider).Name, null); - m_ResourceProviderData.Add(ObjectInitializationData.CreateSerializedInitializationData(typeof(LegacyResourcesProvider))); - } - } - return errorString; - } - - var schema = assetGroup.GetSchema(); - if (schema == null) - return errorString; - - var bundledProviderId = schema.GetBundleCachedProviderId(); - var assetProviderId = schema.GetAssetCachedProviderId(); - if (!m_CreatedProviderIds.ContainsKey(bundledProviderId)) - { - //TODO: pull from schema instead of ProjectConfigData - var virtualBundleRuntimeData = new VirtualAssetBundleRuntimeData(ProjectConfigData.localLoadSpeed, ProjectConfigData.remoteLoadSpeed); - //save virtual runtime data to collect assets into virtual bundles - m_CreatedProviderIds.Add(bundledProviderId, virtualBundleRuntimeData); - } - - if (!m_CreatedProviderIds.ContainsKey(assetProviderId)) - { - m_CreatedProviderIds.Add(assetProviderId, null); - - var assetProviderData = ObjectInitializationData.CreateSerializedInitializationData(assetProviderId); - m_ResourceProviderData.Add(assetProviderData); - } - - - var bundleInputDefs = new List(); - PrepGroupBundlePacking(assetGroup, bundleInputDefs, schema.BundleMode); - for (int i = 0; i < bundleInputDefs.Count; i++) - { - if (aaContext.bundleToAssetGroup.ContainsKey(bundleInputDefs[i].assetBundleName)) - { - var bid = bundleInputDefs[i]; - int count = 1; - var newName = bid.assetBundleName; - while (aaContext.bundleToAssetGroup.ContainsKey(newName) && count < 1000) - newName = bid.assetBundleName.Replace(".bundle", string.Format("{0}.bundle", count++)); - bundleInputDefs[i] = new AssetBundleBuild { assetBundleName = newName, addressableNames = bid.addressableNames, assetBundleVariant = bid.assetBundleVariant, assetNames = bid.assetNames }; - } - - aaContext.bundleToAssetGroup.Add(bundleInputDefs[i].assetBundleName, assetGroup.Guid); - } - - m_AllBundleInputDefinitions.AddRange(bundleInputDefs); - - return errorString; - } - - static bool IsInternalIdLocal(string path) - { - return path.StartsWith("{UnityEngine.AddressableAssets.Addressables.RuntimePath}"); - } - static long ComputeSize(string a) - { - var guid = AssetDatabase.AssetPathToGUID(a); - if (string.IsNullOrEmpty(guid) || guid.Length < 2) - return 1024; - var path = string.Format("Library/metadata/{0}{1}/{2}", guid[0], guid[1], guid); - if (!File.Exists(path)) - return 1024; - return new FileInfo(path).Length; - } - - static void PrepGroupBundlePacking(AddressableAssetGroup assetGroup, List bundleInputDefs, BundledAssetGroupSchema.BundlePackingMode packingMode) - { - if (packingMode == BundledAssetGroupSchema.BundlePackingMode.PackTogether) - { - var allEntries = new List(); - foreach (var a in assetGroup.entries) - a.GatherAllAssets(allEntries, true, true); - GenerateBuildInputDefinitions(allEntries, bundleInputDefs, assetGroup.Name, "all"); - } - else - { - if (packingMode == BundledAssetGroupSchema.BundlePackingMode.PackSeparately) - { - foreach (var a in assetGroup.entries) - { - var allEntries = new List(); - a.GatherAllAssets(allEntries, true, true); - GenerateBuildInputDefinitions(allEntries, bundleInputDefs, assetGroup.Name, a.address); - } - } - else - { - var labelTable = new Dictionary>(); - foreach (var a in assetGroup.entries) - { - var sb = new StringBuilder(); - foreach (var l in a.labels) - sb.Append(l); - var key = sb.ToString(); - List entries; - if (!labelTable.TryGetValue(key, out entries)) - labelTable.Add(key, entries = new List()); - entries.Add(a); - } - - foreach (var entryGroup in labelTable) - { - foreach (var a in entryGroup.Value) - { - var allEntries = new List(); - a.GatherAllAssets(allEntries, true, true); - GenerateBuildInputDefinitions(allEntries, bundleInputDefs, assetGroup.Name, entryGroup.Key); - } - } - - } - } - } - - static void GenerateBuildInputDefinitions(List allEntries, List buildInputDefs, string groupName, string address) - { - var scenes = new List(); - var assets = new List(); - foreach (var e in allEntries) - { - if (e.IsScene) - scenes.Add(e); - else - assets.Add(e); - } - - if (assets.Count > 0) - buildInputDefs.Add(GenerateBuildInputDefinition(assets, groupName + "_assets_" + address + ".bundle")); - if (scenes.Count > 0) - buildInputDefs.Add(GenerateBuildInputDefinition(scenes, groupName + "_scenes_" + address + ".bundle")); - } - - static AssetBundleBuild GenerateBuildInputDefinition(List assets, string name) - { - var assetsInputDef = new AssetBundleBuild(); - assetsInputDef.assetBundleName = name.ToLower().Replace(" ", "").Replace('\\', '/').Replace("//", "/"); - var assetIds = new List(assets.Count); - foreach (var a in assets) - { - assetIds.Add(a.GetAssetLoadPath(true)); - } - - assetsInputDef.assetNames = assetIds.ToArray(); - assetsInputDef.addressableNames = new string[0]; - return assetsInputDef; - } - - static IList RuntimeDataBuildTasks(bool compileScripts, string builtinShaderBundleName) - { - var buildTasks = new List(); - - // Setup - buildTasks.Add(new SwitchToBuildPlatform()); - buildTasks.Add(new RebuildSpriteAtlasCache()); - - // Player Scripts - if (compileScripts) - buildTasks.Add(new BuildPlayerScripts()); - - // Dependency - buildTasks.Add(new PreviewSceneDependencyData()); - buildTasks.Add(new CalculateAssetDependencyData()); - buildTasks.Add(new StripUnusedSpriteSources()); - buildTasks.Add(new CreateBuiltInShadersBundle(builtinShaderBundleName)); - - // Packing - buildTasks.Add(new GenerateBundlePacking()); - buildTasks.Add(new UpdateBundleObjectLayout()); - return buildTasks; - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptVirtualMode.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptVirtualMode.cs.meta deleted file mode 100644 index adc1c53b..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DataBuilders/BuildScriptVirtualMode.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bb0e4994b34add1409fd8ccaf4a82de5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DirectoryUtility.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DirectoryUtility.cs deleted file mode 100644 index 99a21a78..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DirectoryUtility.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.IO; -using UnityEngine; - -internal static class DirectoryUtility -{ - internal static void DeleteDirectory(string directoryPath, bool onlyIfEmpty = true, bool recursiveDelete = true) - { - if (!Directory.Exists(directoryPath)) - return; - - if (!onlyIfEmpty || (onlyIfEmpty && Directory.GetFiles(directoryPath).Length == 0 && Directory.GetDirectories(directoryPath).Length == 0)) - Directory.Delete(directoryPath, recursiveDelete); - } - - internal static void DirectoryCopy(string sourceDirName, string destDirName, bool copySubDirs) - { - // Get the subdirectories for the specified directory. - DirectoryInfo dir = new DirectoryInfo(sourceDirName); - - if (!dir.Exists) - { - throw new DirectoryNotFoundException( - "Source directory does not exist or could not be found: " - + sourceDirName); - } - - DirectoryInfo[] dirs = dir.GetDirectories(); - // If the destination directory doesn't exist, create it. - if (!Directory.Exists(destDirName)) - Directory.CreateDirectory(destDirName); - - // Get the files in the directory and copy them to the new location. - FileInfo[] files = dir.GetFiles(); - foreach (FileInfo file in files) - { - string temppath = Path.Combine(destDirName, file.Name); - file.CopyTo(temppath, true); - } - - // If copying subdirectories, copy them and their contents to new location. - if (copySubDirs) - { - foreach (DirectoryInfo subdir in dirs) - { - string temppath = Path.Combine(destDirName, subdir.Name); - DirectoryCopy(subdir.FullName, temppath, true); - } - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DirectoryUtility.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DirectoryUtility.cs.meta deleted file mode 100644 index 012530d3..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/DirectoryUtility.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f8683601388ff6b4bb7d1f1a52ee6108 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/FileRegistry.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/FileRegistry.cs deleted file mode 100644 index 874a758e..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/FileRegistry.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Collections.Generic; - -namespace UnityEditor.AddressableAssets.Build -{ - public class FileRegistry - { - private readonly HashSet m_FilePaths; - - public FileRegistry() - { - m_FilePaths = new HashSet(); - } - - public IEnumerable GetFilePaths() - { - return new HashSet(m_FilePaths); - } - - public void AddFile(string path) - { - m_FilePaths.Add(path); - } - - public void RemoveFile(string path) - { - m_FilePaths.Remove(path); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/FileRegistry.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/FileRegistry.cs.meta deleted file mode 100644 index f60aa387..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/FileRegistry.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 776e8b00aee724f69a02402947a3967f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/LinkXMLGenerator.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/LinkXMLGenerator.cs deleted file mode 100644 index 34289974..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/LinkXMLGenerator.cs +++ /dev/null @@ -1,114 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Xml; - -namespace UnityEditor.AddressableAssets.Build -{ - /// - /// This can be used to create a LinkXml for your build. This will ensure that the desired runtime types are packed into the build. - /// - public class LinkXmlGenerator - { - Dictionary m_TypeConversion = new Dictionary(); - HashSet m_Types = new HashSet(); - - /// - /// Add runtime type to the LinkXml Generator. - /// - /// The desired runtime types. - public void AddTypes(params Type[] types) - { - if (types == null) - return; - foreach (var t in types) - AddTypeInternal(t); - } - - /// - /// Add runtime type to the LinkXml Generator. - /// - /// The desired runtime types. - public void AddTypes(IEnumerable types) - { - if (types == null) - return; - foreach (var t in types) - AddTypeInternal(t); - } - - private void AddTypeInternal(Type t) - { - if (t == null) - return; - - Type convertedType; - if (m_TypeConversion.TryGetValue(t, out convertedType)) - m_Types.Add(convertedType); - else - m_Types.Add(t); - } - - /// - /// Setup runtime type conversion - /// - /// Convert from type. - /// Convert to type. - public void SetTypeConversion(Type a, Type b) - { - m_TypeConversion[a] = b; - } - - /// - /// Save the LinkXml to the specified path. - /// - /// The path to save the linker xml file. - public void Save(string path) - { - var assemblyMap = new Dictionary> (); - foreach (var t in m_Types) - { - var a = t.Assembly; - List types; - if (!assemblyMap.TryGetValue(a, out types)) - assemblyMap.Add(a, types = new List()); - types.Add(t); - } - XmlDocument doc = new XmlDocument(); - var linker = doc.AppendChild(doc.CreateElement("linker")); - foreach (var k in assemblyMap) - { - var assembly = linker.AppendChild(doc.CreateElement("assembly")); - var attr = doc.CreateAttribute("fullname"); - attr.Value = k.Key.FullName; - if (assembly.Attributes != null) - { - assembly.Attributes.Append(attr); - - //TODO - this is a temporary fix to deal with iOS stripping. - if (k.Key.FullName.Contains("Addressables") || k.Key.FullName.Contains("ResourceManager")) - { - var preserveAssembly = doc.CreateAttribute("preserve"); - preserveAssembly.Value = "all"; - assembly.Attributes.Append(preserveAssembly); - } - - foreach (var t in k.Value) - { - var typeEl = assembly.AppendChild(doc.CreateElement("type")); - var tattr = doc.CreateAttribute("fullname"); - tattr.Value = t.FullName; - if (typeEl.Attributes != null) - { - typeEl.Attributes.Append(tattr); - var pattr = doc.CreateAttribute("preserve"); - pattr.Value = "all"; - typeEl.Attributes.Append(pattr); - } - } - } - } - doc.Save(path); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/LinkXMLGenerator.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/LinkXMLGenerator.cs.meta deleted file mode 100644 index 536e719e..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/LinkXMLGenerator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c7613ad25e9a1794eb580050f86f4889 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/SceneManagerState.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/SceneManagerState.cs deleted file mode 100644 index 67a4452b..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/SceneManagerState.cs +++ /dev/null @@ -1,152 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.SceneManagement; -using UnityEngine; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets.Build -{ - /// - /// Serializable object that can be used to save and restore the state of the editor scene manager. - /// - [Serializable] - public class SceneManagerState - { - [Serializable] - internal class SceneState - { - [FormerlySerializedAs("m_isActive")] - [SerializeField] - internal bool isActive; - [FormerlySerializedAs("m_isLoaded")] - [SerializeField] - internal bool isLoaded; - [FormerlySerializedAs("m_path")] - [SerializeField] - internal string path; - - internal SceneState() { } - internal SceneState(SceneSetup s) - { - isActive = s.isActive; - isLoaded = s.isLoaded; - path = s.path; - } - - internal SceneSetup ToSceneSetup() - { - var ss = new SceneSetup(); - ss.isActive = isActive; - ss.isLoaded = isLoaded; - ss.path = path; - return ss; - } - } - - [Serializable] - internal class EbsSceneState - { - [FormerlySerializedAs("m_guid")] - [SerializeField] - internal string guid; - [FormerlySerializedAs("m_enabled")] - [SerializeField] - internal bool enabled; - internal EbsSceneState() { } - internal EbsSceneState(EditorBuildSettingsScene s) { guid = s.guid.ToString(); enabled = s.enabled; } - internal EditorBuildSettingsScene GetBuildSettingsScene() { return new EditorBuildSettingsScene(new GUID(guid), enabled); } - } - - [SerializeField] - internal SceneState[] openSceneState; - [SerializeField] - internal EbsSceneState[] editorBuildSettingsSceneState; - - static SceneManagerState Create(SceneSetup[] scenes) - { - var scenesList = new List(); - var state = new SceneManagerState(); - foreach (var s in scenes) - scenesList.Add(new SceneState(s)); - state.openSceneState = scenesList.ToArray(); - var edbss = new List(); - foreach (var s in BuiltinSceneCache.scenes) - edbss.Add(new EbsSceneState(s)); - state.editorBuildSettingsSceneState = edbss.ToArray(); - return state; - } - - internal SceneSetup[] GetSceneSetups() - { - var setups = new List(); - foreach (var s in openSceneState) - setups.Add(s.ToSceneSetup()); - return setups.ToArray(); - } - - EditorBuildSettingsScene[] GetEditorBuildSettingScenes() - { - var scenes = new List(); - foreach (var s in editorBuildSettingsSceneState) - scenes.Add(s.GetBuildSettingsScene()); - return scenes.ToArray(); - } - - const string k_DefaultPath = "Library/com.unity.addressables/SceneManagerState.json"; - /// - /// Record the state of the EditorSceneManager and save to a JSON file. - /// - /// The path to save the recorded state. - public static void Record(string path = k_DefaultPath) - { - try - { - var dir = Path.GetDirectoryName(path); - if (!string.IsNullOrEmpty(dir) && !Directory.Exists(dir)) - Directory.CreateDirectory(dir); - File.WriteAllText(path, JsonUtility.ToJson(Create(EditorSceneManager.GetSceneManagerSetup()))); - } - catch (Exception ex) - { - Debug.LogException(ex); - } - } - - /// - /// Adds a set of scenes to the scene list for use in editor play mode. - /// - /// The scenes to add to the editor scenes list. - public static void AddScenesForPlayMode(List playModeScenes) - { - if (playModeScenes != null) - { - List newScenesList = new List(); - newScenesList.AddRange(BuiltinSceneCache.scenes); - newScenesList.AddRange(playModeScenes); - BuiltinSceneCache.scenes = newScenesList.ToArray(); - } - } - - /// - /// Restore the state of the EditorSceneManager. - /// - /// The path to load the state data from. This file is generated by calling SceneManagerState.Record. - /// If true, the recorded active scenes are restored. EditorBuildSettings.scenes are always restored. - public static void Restore(string path = k_DefaultPath, bool restoreSceneManagerSetup = false) - { - try - { - var state = JsonUtility.FromJson(File.ReadAllText(path)); - if(restoreSceneManagerSetup) - EditorSceneManager.RestoreSceneManagerSetup(state.GetSceneSetups()); - BuiltinSceneCache.scenes = state.GetEditorBuildSettingScenes(); - } - catch (Exception ex) - { - Debug.LogException(ex); - } - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/SceneManagerState.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/SceneManagerState.cs.meta deleted file mode 100644 index 26f8d19d..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Build/SceneManagerState.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e32f647f6eec5dd458031b2ccab2880b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics.meta deleted file mode 100644 index fb190b63..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 892cf81d30f8a6d47a38990bd18b822e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data.meta deleted file mode 100644 index 4245a85f..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 32e54ebfc1aeee146849c3fcaba75c46 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataPlayerSession.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataPlayerSession.cs deleted file mode 100644 index c7537756..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataPlayerSession.cs +++ /dev/null @@ -1,186 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine.ResourceManagement; -using UnityEngine.ResourceManagement.Diagnostics; -using UnityEngine.ResourceManagement.Util; - -namespace UnityEditor.AddressableAssets.Diagnostics.Data -{ - [Serializable] - class EventDataPlayerSession - { - EventDataSet m_RootStreamEntry = new EventDataSet(0, null, null, -1); - string m_EventName; - int m_PlayerId; - bool m_IsActive; - int m_LatestFrame; - int m_StartFrame; - int m_FrameCount = 300; - Dictionary> m_FrameEvents = new Dictionary>(); - - public EventDataSet RootStreamEntry { get { return m_RootStreamEntry; } } - public string EventName { get { return m_EventName; } } - public int PlayerId { get { return m_PlayerId; } } - public bool IsActive { get { return m_IsActive; } set { m_IsActive = value; } } - public int LatestFrame { get { return m_LatestFrame; } } - public int StartFrame { get { return m_StartFrame; } } - public int FrameCount { get { return m_FrameCount; } } - - - public EventDataPlayerSession() { } - public EventDataPlayerSession(string eventName, int playerId) - { - m_EventName = eventName; - m_PlayerId = playerId; - m_IsActive = true; - } - - internal void Clear() - { - RootStreamEntry.Clear(); - m_FrameEvents.Clear(); - lastFrameWithEvents = -1; - lastInstantiationCountValue = 0; - m_eventCountDataSet = null; - m_instantitationCountDataSet = null; - m_dataSets.Clear(); - m_objectToParents.Clear(); - } - - internal List GetFrameEvents(int frame) - { - List frameEvents; - if (m_FrameEvents.TryGetValue(frame, out frameEvents)) - return frameEvents; - return null; - } - - - Dictionary m_dataSets = new Dictionary(); - Dictionary> m_objectToParents = new Dictionary>(); - int lastInstantiationCountFrame = -1; - int lastInstantiationCountValue = 0; - - int lastFrameWithEvents = -1; - EventDataSet m_eventCountDataSet; - EventDataSet m_instantitationCountDataSet; - internal void AddSample(DiagnosticEvent evt, bool recordEvent, ref bool entryCreated) - { - m_LatestFrame = evt.Frame; - m_StartFrame = m_LatestFrame - m_FrameCount; - - if (recordEvent && !evt.DisplayName.StartsWith("Instance")) - { - List frameEvents; - if (!m_FrameEvents.TryGetValue(evt.Frame, out frameEvents)) - { - if (lastFrameWithEvents >= 0) - { - if (m_eventCountDataSet == null) - { - m_eventCountDataSet = new EventDataSet(0, "EventCount", "Event Counts", EventDataSet.kEventCountSortOrder); - RootStreamEntry.AddChild(m_eventCountDataSet); - } - m_eventCountDataSet.AddSample(0, lastFrameWithEvents, m_FrameEvents[lastFrameWithEvents].Count); - } - lastFrameWithEvents = evt.Frame; - m_FrameEvents.Add(evt.Frame, frameEvents = new List()); - } - frameEvents.Add(evt); - } - - if (evt.DisplayName.StartsWith("Instance")) - { - if (evt.Stream == (int)ResourceManager.DiagnosticEventType.AsyncOperationCreate) - { - if (evt.Frame != lastInstantiationCountFrame) - { - if (lastInstantiationCountFrame >= 0 && lastInstantiationCountValue > 0) - { - if (m_instantitationCountDataSet == null) - { - m_instantitationCountDataSet = new EventDataSet(1, "InstantiationCount", "Instantiation Counts", EventDataSet.kInstanceCountSortOrder); - RootStreamEntry.AddChild(m_instantitationCountDataSet); - } - m_instantitationCountDataSet.AddSample(0, lastInstantiationCountFrame, lastInstantiationCountValue); - } - lastInstantiationCountFrame = evt.Frame; - lastInstantiationCountValue = 0; - } - lastInstantiationCountValue++; - } - return; - } - - //if creation event, create a data set and update all dependecies - if (!m_dataSets.ContainsKey(evt.ObjectId)) - { - var ds = new EventDataSet(evt); - m_dataSets.Add(evt.ObjectId, ds); - if (evt.Dependencies != null) - { - foreach (var d in evt.Dependencies) - { - EventDataSet depDS; - if (m_dataSets.TryGetValue(d, out depDS)) - { - ds.AddChild(depDS); - HashSet depParents = null; - if (!m_objectToParents.TryGetValue(d, out depParents)) - { - RootStreamEntry.RemoveChild(d); - m_objectToParents.Add(d, depParents = new HashSet()); - } - depParents.Add(evt.ObjectId); - } - } - } - if (!m_objectToParents.ContainsKey(evt.ObjectId)) - RootStreamEntry.AddChild(ds); - } - - - EventDataSet data = null; - if (m_dataSets.TryGetValue(evt.ObjectId, out data)) - { - data.AddSample(evt.Stream, evt.Frame, evt.Value); - } - - if (evt.Stream == (int)ResourceManager.DiagnosticEventType.AsyncOperationDestroy) - { - if (evt.Dependencies != null) - { - foreach (var d in evt.Dependencies) - { - HashSet depParents = null; - if (m_objectToParents.TryGetValue(d, out depParents)) - { - depParents.Remove(evt.ObjectId); - if (depParents.Count == 0) - { - m_objectToParents.Remove(d); - RootStreamEntry.AddChild(m_dataSets[d]); - } - } - } - } - m_dataSets.Remove(evt.ObjectId); - - HashSet parents = null; - if (m_objectToParents.TryGetValue(evt.ObjectId, out parents)) - { - foreach (var p in parents) - { - EventDataSet pp; - if (m_dataSets.TryGetValue(p, out pp)) - pp.RemoveChild(evt.ObjectId); - } - } - else - { - RootStreamEntry.RemoveChild(evt.ObjectId); - } - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataPlayerSession.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataPlayerSession.cs.meta deleted file mode 100644 index df05d606..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataPlayerSession.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 019dda5fbf4d3854eb49b455c17c0de6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataPlayerSessionCollection.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataPlayerSessionCollection.cs deleted file mode 100644 index 09487a03..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataPlayerSessionCollection.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine.ResourceManagement.Diagnostics; - -namespace UnityEditor.AddressableAssets.Diagnostics.Data -{ - [Serializable] - class EventDataPlayerSessionCollection - { - List m_PlayerSessions = new List(); - Func m_OnRecordEvent; - - public EventDataPlayerSessionCollection(Func onRecordEvent) - { - m_OnRecordEvent = onRecordEvent; - } - - bool RecordEvent(DiagnosticEvent e) - { - if (m_OnRecordEvent != null) - return m_OnRecordEvent(e); - return false; - } - - public bool ProcessEvent(DiagnosticEvent diagnosticEvent, int sessionId) - { - var session = GetPlayerSession(sessionId, true); - bool entryCreated = false; - session.AddSample(diagnosticEvent, RecordEvent(diagnosticEvent), ref entryCreated); - return entryCreated; - } - - public EventDataPlayerSession GetSessionByIndex(int index) - { - if (m_PlayerSessions.Count == 0 || m_PlayerSessions.Count <= index) - return null; - - return m_PlayerSessions[index]; - } - public EventDataPlayerSession GetPlayerSession(int playerId, bool create) - { - foreach (var c in m_PlayerSessions) - if (c.PlayerId == playerId) - return c; - if (create) - { - var c = new EventDataPlayerSession("Player " + playerId, playerId); - m_PlayerSessions.Add(c); - return c; - } - return null; - } - - public string[] GetConnectionNames() - { - string[] names = new string[m_PlayerSessions.Count];// + 1]; - for (int i = 0; i < m_PlayerSessions.Count; i++) - names[i] = m_PlayerSessions[i].EventName; - return names; - } - - public void AddSession(string name, int id) - { - m_PlayerSessions.Add(new EventDataPlayerSession(name, id)); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataPlayerSessionCollection.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataPlayerSessionCollection.cs.meta deleted file mode 100644 index 36e19149..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataPlayerSessionCollection.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d12d000d99808e140bb7ec633895cf09 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataSample.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataSample.cs deleted file mode 100644 index 9a73ab7f..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataSample.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; - -namespace UnityEditor.AddressableAssets.Diagnostics.Data -{ - [Serializable] - struct EventDataSample - { - int m_Frame; - int m_Data; - internal int frame { get { return m_Frame; } } - internal int data { get { return m_Data; } } - - internal EventDataSample(int frame, int value) - { - m_Frame = frame; - m_Data = value; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataSample.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataSample.cs.meta deleted file mode 100644 index b6af3a41..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataSample.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 25714517fd8c0f048b3a5d95c94233a7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataSet.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataSet.cs deleted file mode 100644 index 4173bdf0..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataSet.cs +++ /dev/null @@ -1,132 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.ResourceManagement.Diagnostics; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets.Diagnostics.Data -{ - [Serializable] - class EventDataSet - { - internal const int kFPSSortOrder = -100; - internal const int kMonoHeapSortOrder = -99; - internal const int kEventCountSortOrder = -98; - internal const int kInstanceCountSortOrder = -97; - - [SerializeField] - List m_Streams = new List(); - int m_FirstSampleFrame = int.MaxValue; - int m_ObjectId; - string m_DisplayName; - string m_Graph; - int m_SortOrder = 0; - public int ObjectId { get { return m_ObjectId; } } - public string DisplayName { get { return m_DisplayName; } set { m_DisplayName = value; } } - public string Graph { get { return m_Graph; } } - public IEnumerable Children { get { return m_Children.Values; } } - internal bool HasChildren { get { return m_Children != null && m_Children.Count > 0; } } - internal int FirstSampleFrame { get { return m_FirstSampleFrame; } } - Dictionary m_Children; - internal EventDataSet() { } - internal EventDataSet(int id, string graph, string displayName, int sortOrder) - { - m_SortOrder = sortOrder; - m_ObjectId = id; - m_Graph = graph; - m_DisplayName = displayName; - } - internal EventDataSet(DiagnosticEvent evt) - { - Init(evt); - } - internal void Init(DiagnosticEvent evt) - { - m_ObjectId = evt.ObjectId; - m_DisplayName = evt.DisplayName; - m_Graph = evt.Graph; - if (m_DisplayName == "MonoHeap") - m_SortOrder = kMonoHeapSortOrder; - else if (m_DisplayName == "FPS") - m_SortOrder = kFPSSortOrder; - } - - internal bool HasDataAfterFrame(int frame) - { - foreach (var s in m_Streams) - if (s != null && s.HasDataAfterFrame(frame)) - return true; - if (m_Children != null) - { - foreach (var c in m_Children) - if (c.Value.HasDataAfterFrame(frame)) - return true; - } - return false; - } - - internal int CompareTo(EventDataSet other) - { - var x = m_SortOrder < 0 ? m_SortOrder : FirstSampleFrame; - var y = other.m_SortOrder < 0 ? other.m_SortOrder : other.FirstSampleFrame; - return x - y; - } - - internal void AddSample(int stream, int frame, int val) - { - if (frame < m_FirstSampleFrame) - m_FirstSampleFrame = frame; - while (stream >= m_Streams.Count) - m_Streams.Add(null); - if (m_Streams[stream] == null) - m_Streams[stream] = new EventDataSetStream(); - m_Streams[stream].AddSample(frame, val); - } - - internal void AddChild(EventDataSet eventDataSet) - { - if (m_Children == null) - m_Children = new Dictionary(); - m_Children.Add(eventDataSet.ObjectId, eventDataSet); - } - - internal void RemoveChild(int d) - { - m_Children.Remove(d); - if (m_Children.Count == 0) - m_Children = null; - } - - internal int GetStreamValue(int s, int frame) - { - var stream = GetStream(s); - if (stream == null) - return 0; - return stream.GetValue(frame); - } - - internal EventDataSetStream GetStream(int s) - { - if (s >= m_Streams.Count) - return null; - return m_Streams[s]; - } - - internal int GetStreamMaxValue(int s) - { - var stream = GetStream(s); - if (stream == null) - return 0; - - return stream.maxValue; - } - - internal void Clear() - { - m_FirstSampleFrame = int.MaxValue; - m_Children = null; - m_Streams.Clear(); - } - } - -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataSet.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataSet.cs.meta deleted file mode 100644 index 537b581a..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataSet.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5cc79dcfe4c99ee4c8baf9bf0e5c8a40 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataStream.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataStream.cs deleted file mode 100644 index 53faacca..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataStream.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace UnityEditor.AddressableAssets.Diagnostics.Data -{ - [Serializable] - class EventDataSetStream - { - internal int maxValue; - internal List samples = new List(); - internal void AddSample(int frame, int val) - { - if (val > maxValue) - maxValue = val; - if (samples.Count > 0 && samples[samples.Count - 1].frame == frame) - samples[samples.Count - 1] = new EventDataSample(frame, val); - else - samples.Add(new EventDataSample(frame, val)); - } - - internal int GetValue(int f) - { - if (samples.Count == 0 || f < samples[0].frame) - return 0; - if (f >= samples[samples.Count - 1].frame) - return samples[samples.Count - 1].data; - for (int i = 1; i < samples.Count; i++) - { - if (samples[i].frame > f) - return samples[i - 1].data; - } - return samples[0].data; - } - - internal bool HasDataAfterFrame(int frame) - { - if (samples.Count == 0) - return false; - EventDataSample lastSample = samples[samples.Count - 1]; - return lastSample.frame > frame || lastSample.data > 0; - } - } - -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataStream.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataStream.cs.meta deleted file mode 100644 index 29dd4fda..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/Data/EventDataStream.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 54000781df714fc4da1e646cae7e534f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI.meta deleted file mode 100644 index 74451a88..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 6559e9563688d0040a7f2ba6e247bf90 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/EventGraphListView.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/EventGraphListView.cs deleted file mode 100644 index 84829135..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/EventGraphListView.cs +++ /dev/null @@ -1,248 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.AddressableAssets.Diagnostics.Data; -using UnityEditor.AddressableAssets.Diagnostics.GUI.Graph; -using UnityEditor.IMGUI.Controls; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Diagnostics.GUI -{ - class EventGraphListView : TreeView - { - class DataStreamEntry : TreeViewItem - { - public GUIContent Content { get; private set; } - public EventDataSet Entry { get; private set; } - public DataStreamEntry(EventDataSet dataSet, int depth) : base(dataSet.ObjectId, depth, dataSet.DisplayName) - { - Entry = dataSet; - Content = new GUIContent(dataSet.DisplayName); - } - } - Dictionary m_MaximizedState = new Dictionary(); - Func m_FilterFunc; - IComparer m_DataSetComparer; - Material m_GraphMaterial; - Dictionary m_GraphDefinitions = new Dictionary(); - GUIContent m_PlusGUIContent = new GUIContent("+", "Expand"); - GUIContent m_MinusGUIContent = new GUIContent("-", "Collapse"); - Func m_GetRootDataSetAction; - - float m_LastReloadTime; - int m_InspectFrame = -1; - internal int visibleStartTime { get; private set; } - internal int visibleDuration { get; private set; } - - public Rect GraphRect - { - get - { - return new Rect(treeViewRect.x + (multiColumnHeader.state.columns[1].width + multiColumnHeader.state.columns[0].width), treeViewRect.y, - multiColumnHeader.state.columns[2].width, treeViewRect.height); - } - } - - internal EventGraphListView(Func dsFunc, TreeViewState tvs, MultiColumnHeaderState mchs, Func filter, IComparer dsComparer) : base(tvs, new MultiColumnHeader(mchs)) - { - m_GetRootDataSetAction = dsFunc; - showBorder = true; - visibleStartTime = 0; - visibleDuration = 300; - m_DataSetComparer = dsComparer; - m_FilterFunc = filter; - columnIndexForTreeFoldouts = 1; - } - - protected override TreeViewItem BuildRoot() - { - var rootDS = m_GetRootDataSetAction(); - if (rootDS == null) - return new TreeViewItem(); - return AddItems(new DataStreamEntry(rootDS, -1)); - } - - DataStreamEntry AddItems(DataStreamEntry root) - { - root.children = new List(); - if (!root.Entry.HasChildren) - return root; - - List entries = new List(); - foreach (var e in root.Entry.Children) - { - if (!e.HasDataAfterFrame(visibleStartTime)) - continue; - if (m_FilterFunc(e.Graph)) - entries.Add(e); - } - - if (m_DataSetComparer != null) - entries.Sort(m_DataSetComparer); - - foreach (var e in entries) - { - var dse = new DataStreamEntry(e, root.depth + 1); - root.AddChild(dse); - AddItems(dse); - } - - return root; - } - - protected override float GetCustomRowHeight(int row, TreeViewItem item) - { - if (item == null) - return 0; - return IsItemMaximized(item.id) ? 100 : base.GetCustomRowHeight(row, item); - } - - public void DrawGraphs(Rect rect, EventDataPlayerSession data, int inspectFrame) - { - EditorGUI.DrawRect(GraphRect, GraphColors.WindowBackground); - if (data != null) - { - m_InspectFrame = inspectFrame; - if (Event.current.type == EventType.Repaint) - multiColumnHeader.state.columns[2].width = rect.width - (multiColumnHeader.state.columns[1].width + multiColumnHeader.state.columns[0].width + 20); - - visibleDuration = Mathf.Max(300, (int)(multiColumnHeader.state.columns[2].width)); - if (data.IsActive) - visibleStartTime = data.LatestFrame - visibleDuration; - if (Time.unscaledTime - m_LastReloadTime > 1 && (EditorApplication.isPlaying || data.PlayerId != 0)) - { - Reload(); - m_LastReloadTime = Time.unscaledTime; - } - } - base.OnGUI(rect); - } - - - bool IsItemMaximized(int id) - { - bool expanded; - m_MaximizedState.TryGetValue(id, out expanded); - return expanded; - } - - void ToggleItemMaximize(int id) - { - bool expanded = IsItemMaximized(id); - m_MaximizedState[id] = !expanded; - Reload(); - m_LastReloadTime = Time.unscaledTime; - } - - protected override void RowGUI(RowGUIArgs args) - { - for (int i = 0; i < args.GetNumVisibleColumns(); ++i) - CellGUI(args.GetCellRect(i), args.item as DataStreamEntry, args.GetColumn(i)); - } - - void CellGUI(Rect cellRect, DataStreamEntry item, int column) - { - switch (column) - { - case 0: - { - var maximized = IsItemMaximized(item.id); - if (UnityEngine.GUI.Button(cellRect, maximized ? m_MinusGUIContent : m_PlusGUIContent, EditorStyles.toolbarButton)) - { - if (!IsSelected(item.id)) - { - m_MaximizedState[item.id] = !maximized; - } - else - { - foreach (var i in GetSelection()) - m_MaximizedState[i] = !maximized; - } - Reload(); - m_LastReloadTime = Time.unscaledTime; - } - } - break; - case 1: - { - cellRect.xMin += (GetContentIndent(item) + extraSpaceBeforeIconAndLabel); - EditorGUI.LabelField(cellRect, item.Content); - } - break; - case 2: - DrawGraph(item.Entry, cellRect, visibleStartTime, visibleDuration, IsItemMaximized(item.id)); - break; - } - } - - protected override void DoubleClickedItem(int id) - { - ToggleItemMaximize(id); - base.DoubleClickedItem(id); - } - - public void DefineGraph(string name, int maxValueStream, params IGraphLayer[] layers) - { - m_GraphDefinitions.Add(name, new GraphDefinition(maxValueStream, layers)); - } - - void DrawGraph(EventDataSet dataSet, Rect rect, int startTime, int duration, bool expanded) - { - if (Event.current.type != EventType.Repaint) - return; - - rect = new Rect(rect.x + 1, rect.y + 1, rect.width - 2, rect.height - 2); - GraphDefinition gd; - if (!m_GraphDefinitions.TryGetValue(dataSet.Graph, out gd)) - return; - - if (m_GraphMaterial == null) - { - // best material options are "Unlit/Color" or "UI/Default". - // Unlit/Color is more efficient, but does not support alpha - // UI/Default does support alpha - m_GraphMaterial = new Material(Shader.Find("Unlit/Color")); - } - - int maxValue = gd.GetMaxValue(dataSet); - - foreach (var l in gd.layers) - l.Draw(dataSet, rect, startTime, duration, m_InspectFrame, expanded, m_GraphMaterial, maxValue); - } - - public static MultiColumnHeaderState CreateDefaultHeaderState() - { - var columns = new[] - { - new MultiColumnHeaderState.Column(), - new MultiColumnHeaderState.Column(), - new MultiColumnHeaderState.Column() - }; - - columns[0].headerContent = new GUIContent("", "Expand"); - columns[0].minWidth = 24; - columns[0].width = 24; - columns[0].maxWidth = 24; - columns[0].headerTextAlignment = TextAlignment.Center; - columns[0].canSort = false; - columns[0].autoResize = false; - - columns[1].headerContent = new GUIContent("Assets", ""); - columns[1].minWidth = 100; - columns[1].width = 250; - columns[1].maxWidth = 5000; - columns[1].headerTextAlignment = TextAlignment.Left; - columns[1].canSort = false; - columns[1].autoResize = false; - - columns[2].headerContent = new GUIContent("", ""); - columns[2].minWidth = 100; - columns[2].width = 1000; - columns[2].maxWidth = 10000; - columns[2].headerTextAlignment = TextAlignment.Left; - columns[2].canSort = false; - columns[2].autoResize = false; - - return new MultiColumnHeaderState(columns); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/EventGraphListView.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/EventGraphListView.cs.meta deleted file mode 100644 index bc9ae6a2..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/EventGraphListView.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 058b74f9ad5dc0e489456e842029fb0b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/EventListView.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/EventListView.cs deleted file mode 100644 index d4abeb2c..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/EventListView.cs +++ /dev/null @@ -1,116 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.IMGUI.Controls; -using UnityEngine; -using UnityEngine.ResourceManagement.Diagnostics; - -namespace UnityEditor.AddressableAssets.Diagnostics.GUI -{ - class EventListView : TreeView - { - class EventTreeViewItem : TreeViewItem - { - public DiagnosticEvent entry; - public EventTreeViewItem(DiagnosticEvent e) : base(e.ObjectId + e.Stream, 0) - { - entry = e; - } - } - List m_Events; - Action m_OnColumnGUI; - Func m_OnFilterEvent; - public DiagnosticEvent selectedEvent { get; private set; } - - public EventListView(TreeViewState tvs, MultiColumnHeaderState mchs, Action onColumn, Func filter) : base(tvs, new MultiColumnHeader(mchs)) - { - m_OnColumnGUI = onColumn; - m_OnFilterEvent = filter; - showBorder = true; - showAlternatingRowBackgrounds = true; - } - - protected override void SelectionChanged(IList selectedIds) - { - selectedEvent = default(DiagnosticEvent); - if (selectedIds != null && selectedIds.Count > 0) - { - var item = FindItem(selectedIds[0], rootItem) as EventTreeViewItem; - if (item != null) - selectedEvent = item.entry; - } - } - - protected override bool CanMultiSelect(TreeViewItem item) - { - return false; - } - - public void SetEvents(List e) - { - selectedEvent = default(DiagnosticEvent); - m_Events = e; - Reload(); - } - - protected override TreeViewItem BuildRoot() - { - TreeViewItem root = new TreeViewItem(-1, -1); - root.children = new List(); - if (m_Events != null) - { - foreach (var e in m_Events) - { - if (m_OnFilterEvent(e)) - root.AddChild(new EventTreeViewItem(e)); - } - } - return root; - } - - protected override IList BuildRows(TreeViewItem root) - { - var rows = base.BuildRows(root); - return rows; - } - - protected override void RowGUI(RowGUIArgs args) - { - for (int i = 0; i < args.GetNumVisibleColumns(); ++i) - CellGUI(args.GetCellRect(i), args.item as EventTreeViewItem, args.GetColumn(i)); - } - - void CellGUI(Rect cellRect, EventTreeViewItem item, int column) - { - CenterRectUsingSingleLineHeight(ref cellRect); - m_OnColumnGUI(cellRect, item.entry, column); - } - - protected override bool CanBeParent(TreeViewItem item) - { - return false; - } - - public static MultiColumnHeaderState CreateDefaultMultiColumnHeaderState(List dataColumns, List sizes) - { - if (dataColumns == null || sizes == null || dataColumns.Count != sizes.Count) - throw new ArgumentException("Column name and size lists are not the same size"); - var columns = new List(); - for (int i = 0; i < dataColumns.Count; i++) - AddColumn(columns, dataColumns[i], dataColumns[i], sizes[i]); - return new MultiColumnHeaderState(columns.ToArray()); - } - - static void AddColumn(List columns, string name, string tt, float size) - { - MultiColumnHeaderState.Column col = new MultiColumnHeaderState.Column(); - col.headerContent = new GUIContent(name, tt); - col.minWidth = size * .5f; - col.width = size; - col.maxWidth = size * 4; - col.headerTextAlignment = TextAlignment.Left; - col.canSort = false; - col.autoResize = false; - columns.Add(col); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/EventListView.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/EventListView.cs.meta deleted file mode 100644 index e10ca58d..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/EventListView.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 842157613adc2a74e91ad9ee1391ca27 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/EventViewerWindow.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/EventViewerWindow.cs deleted file mode 100644 index d6d53845..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/EventViewerWindow.cs +++ /dev/null @@ -1,524 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.AddressableAssets.Diagnostics.Data; -using UnityEditor.AddressableAssets.Diagnostics.GUI.Graph; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.IMGUI.Controls; -using UnityEngine; -using UnityEngine.ResourceManagement.Diagnostics; -using UnityEngine.Serialization; -using UnityEditor.Networking.PlayerConnection; -using UnityEngine.Networking.PlayerConnection; - -namespace UnityEditor.AddressableAssets.Diagnostics.GUI -{ - class EventViewerWindow : EditorWindow, IComparer - { - EventDataPlayerSessionCollection m_EventData; - GUIContent m_PrevFrameIcon; - GUIContent m_NextFrameIcon; - int m_PlayerSessionIndex; - int m_InspectFrame; - bool m_Record = true; - int m_EventListFrame = -1; - VerticalSplitter m_VerticalSplitter = new VerticalSplitter(); - HorizontalSplitter m_HorizontalSplitter = new HorizontalSplitter(); - float m_LastEventListUpdate; - bool m_DraggingInspectLine; - int m_LatestFrame; - - TreeViewState m_EventListTreeViewState; - MultiColumnHeaderState m_EventListMchs; - EventListView m_EventList; - - TreeViewState m_GraphListTreeViewState; - MultiColumnHeaderState m_GraphListMchs; - EventGraphListView m_GraphList; - - EventDataPlayerSession activeSession { get { return m_EventData == null ? null : m_EventData.GetSessionByIndex(m_PlayerSessionIndex); } } - protected virtual bool ShowEventDetailPanel { get { return false; } } - protected virtual bool ShowEventPanel { get { return false; } } - - void OnEnable() - { - EditorConnection.instance.Initialize(); - EditorConnection.instance.Register(DiagnosticEventCollector.PlayerConnectionGuid, OnPlayerConnectionMessage); - EditorConnection.instance.RegisterConnection(OnPlayerConnection); - EditorConnection.instance.RegisterDisconnection(OnPlayerDisconnection); - - m_LastEventListUpdate = 0; - m_PrevFrameIcon = EditorGUIUtility.IconContent("Profiler.PrevFrame", "|Go one frame backwards"); - m_NextFrameIcon = EditorGUIUtility.IconContent("Profiler.NextFrame", "|Go one frame forwards"); - EditorApplication.playModeStateChanged += OnEditorPlayModeChanged; - RegisterEventHandler(true); - if (m_EventData == null) - m_EventData = new EventDataPlayerSessionCollection(OnRecordEvent); - m_EventData.GetPlayerSession(0, true).IsActive = true; - } - - void OnDisable() - { - EditorConnection.instance.Unregister(DiagnosticEventCollector.PlayerConnectionGuid, OnPlayerConnectionMessage); - RegisterEventHandler(false); - EditorApplication.playModeStateChanged -= OnEditorPlayModeChanged; - } - - void OnPlayerConnection(int id) - { - if (m_EventData == null) - m_EventData = new EventDataPlayerSessionCollection(OnRecordEvent); - m_EventData.GetPlayerSession(id, true).IsActive = true; - } - - void OnPlayerDisconnection(int id) - { - if (m_EventData == null) - return; - var playerSession = m_EventData.GetPlayerSession(id, false); - if (playerSession != null) - playerSession.IsActive = false; - } - - void OnPlayerConnectionMessage(MessageEventArgs args) - { - var evt = DiagnosticEvent.Deserialize(args.data); - OnEvent(evt, args.playerId); - } - - void RegisterEventHandler(bool reg) - { - DiagnosticEventCollector.RegisterEventHandler(OnEditorPlayModeEvent, reg, false); - } - - void OnEditorPlayModeEvent(DiagnosticEvent evt) - { - if (m_EventData == null) - m_EventData = new EventDataPlayerSessionCollection(OnRecordEvent); - if (m_EventData.GetPlayerSession(0, false) == null) - m_EventData.AddSession("Editor", m_PlayerSessionIndex = 0); - OnEvent(evt, 0); - } - - public void OnEvent(DiagnosticEvent diagnosticEvent, int session) - { - if (m_EventData == null) - m_EventData = new EventDataPlayerSessionCollection(OnRecordEvent); - - var entryCreated = m_EventData.ProcessEvent(diagnosticEvent, session); - OnEventProcessed(diagnosticEvent, entryCreated); - } - - - public int Compare(EventDataSet x, EventDataSet y) - { - return x.CompareTo(y); - } - - protected virtual bool CanHandleEvent(string graph) - { - if (graph.Contains("Count")) - return true; - return OnCanHandleEvent(graph); - } - - protected virtual bool OnCanHandleEvent(string graph) { return true; } - - void OnEditorPlayModeChanged(PlayModeStateChange state) - { - if (state == PlayModeStateChange.EnteredPlayMode) - { - m_EventData = new EventDataPlayerSessionCollection(OnRecordEvent); - m_EventData.GetPlayerSession(0, true).IsActive = true; - - m_LastEventListUpdate = 0; - m_InspectFrame = -1; - m_LatestFrame = -1; - m_PlayerSessionIndex = 0; - RegisterEventHandler(true); - } - else if (state == PlayModeStateChange.EnteredEditMode) - { - RegisterEventHandler(false); - } - } - - protected virtual bool OnDisplayEvent(DiagnosticEvent diagnosticEvent) - { - var sel = m_GraphList.GetSelection(); - if (sel == null || sel.Count == 0) - return true; - foreach (var s in sel) - { -// m_GraphList.Fi - } - - return true; - } - - protected virtual bool OnRecordEvent(DiagnosticEvent diagnosticEvent) - { - return false; - } - - int m_lastRepaintedFrame = -1; - void OnEventProcessed(DiagnosticEvent diagnosticEvent, bool entryCreated) - { - if (!CanHandleEvent(diagnosticEvent.Graph)) - return; - - bool moveInspectFrame = m_LatestFrame < 0 || m_InspectFrame == m_LatestFrame; - m_LatestFrame = diagnosticEvent.Frame; - if (entryCreated) - { - if (m_GraphList != null) - m_GraphList.Reload(); - } - - if (moveInspectFrame) - SetInspectFrame(m_LatestFrame); - - if (diagnosticEvent.Frame != m_lastRepaintedFrame) - { - Repaint(); - m_lastRepaintedFrame = diagnosticEvent.Frame; - } - } - - void SetInspectFrame(int frame) - { - m_InspectFrame = frame; - if (m_InspectFrame > m_LatestFrame) - m_InspectFrame = m_LatestFrame; - if (m_InspectFrame < 0) - m_InspectFrame = 0; - - if(m_EventList != null) - m_EventList.SetEvents(activeSession == null ? null : activeSession.GetFrameEvents(m_InspectFrame)); - m_LastEventListUpdate = Time.unscaledTime; - m_EventListFrame = m_InspectFrame; - } - - void OnGUI() - { - if (activeSession == null) - return; - InitializeGui(); - - //this prevent arrow key events from reaching the treeview, so navigation via keys is disabled - if (Event.current.type == EventType.KeyDown) - { - if (Event.current.keyCode == KeyCode.RightArrow) - { - SetInspectFrame(m_InspectFrame + 1); - return; - } - if (Event.current.keyCode == KeyCode.LeftArrow) - { - SetInspectFrame(m_InspectFrame - 1); - return; - } - } - - DrawToolBar(activeSession); - - var r = EditorGUILayout.GetControlRect(); - Rect contentRect = new Rect(r.x, r.y, r.width, position.height - (r.y + r.x)); - var graphRect = m_GraphList.GraphRect; - if (ShowEventPanel) - { - Rect top, bot; - bool resizingVer = m_VerticalSplitter.OnGUI(contentRect, out top, out bot); - - ProcessInspectFrame(graphRect); - - m_GraphList.DrawGraphs(top, activeSession, m_InspectFrame); - - DrawInspectFrame(graphRect); - - bool resizingHor = false; - if (ShowEventDetailPanel) - { - Rect left, right; - resizingHor = m_HorizontalSplitter.OnGUI(bot, out left, out right); - m_EventList.OnGUI(left); - OnDrawEventDetail(right, m_EventList.selectedEvent); - } - else - { - m_EventList.OnGUI(bot); - } - if (resizingVer || resizingHor) - Repaint(); - } - else - { - ProcessInspectFrame(graphRect); - m_GraphList.DrawGraphs(contentRect, activeSession, m_InspectFrame); - DrawInspectFrame(graphRect); - } - } - - protected virtual void OnDrawEventDetail(Rect right, DiagnosticEvent selectedEvent) - { - } - - void OnInspectorUpdate() - { - Repaint(); - } - - void ProcessInspectFrame(Rect graphRect) - { - if (Event.current.type == EventType.MouseDown && graphRect.Contains(Event.current.mousePosition)) - { - if (EditorApplication.isPlaying) - EditorApplication.isPaused = true; - m_DraggingInspectLine = true; - SetInspectFrame(m_InspectFrame); - } - - if (m_DraggingInspectLine && (Event.current.type == EventType.MouseDrag || Event.current.type == EventType.Repaint)) - SetInspectFrame(m_GraphList.visibleStartTime + (int)GraphUtility.PixelToValue(Event.current.mousePosition.x, graphRect.xMin, graphRect.xMax, m_GraphList.visibleDuration)); - if (Event.current.type == EventType.MouseUp) - { - m_DraggingInspectLine = false; - SetInspectFrame(m_InspectFrame); - } - } - - void DrawInspectFrame(Rect graphPanelRect) - { - if (m_InspectFrame != m_LatestFrame) - { - var ix = graphPanelRect.xMin + GraphUtility.ValueToPixel(m_InspectFrame, m_GraphList.visibleStartTime, m_GraphList.visibleStartTime + m_GraphList.visibleDuration, graphPanelRect.width); - EditorGUI.DrawRect(new Rect(ix - 1, graphPanelRect.yMin, 3, graphPanelRect.height), Color.white * .8f); - } - } - - void DrawToolBar(EventDataPlayerSession session) - { - EditorGUILayout.BeginHorizontal(EditorStyles.toolbar); - GUILayout.FlexibleSpace(); - m_Record = GUILayout.Toggle(m_Record, "Record", EditorStyles.toolbarButton, GUILayout.ExpandWidth(false)); - - if (GUILayout.Button("Clear", EditorStyles.toolbarButton)) - { - RegisterEventHandler(false); - session.Clear(); - if (m_GraphList != null) - m_GraphList.Reload(); - RegisterEventHandler(true); - } - - /* - if (GUILayout.Button("Load", EditorStyles.toolbarButton)) - EditorUtility.DisplayDialog("Feature not implemented", "Saving and loading profile data is not yet supported", "Close"); - if (GUILayout.Button("Save", EditorStyles.toolbarButton)) - EditorUtility.DisplayDialog("Feature not implemented", "Saving and loading profile data is not yet supported", "Close"); - */ - - GUILayout.FlexibleSpace(); - GUILayout.Label(m_InspectFrame == m_LatestFrame ? "Frame: " : "Frame: " + m_InspectFrame + "/" + m_LatestFrame, EditorStyles.miniLabel); - - using (new EditorGUI.DisabledScope(m_InspectFrame <= 0)) - if (GUILayout.Button(m_PrevFrameIcon, EditorStyles.toolbarButton)) - SetInspectFrame(m_InspectFrame - 1); - - - using (new EditorGUI.DisabledScope(m_InspectFrame >= m_LatestFrame)) - if (GUILayout.Button(m_NextFrameIcon, EditorStyles.toolbarButton)) - SetInspectFrame(m_InspectFrame + 1); - - - if (GUILayout.Button("Current", EditorStyles.toolbarButton, GUILayout.ExpandWidth(false))) - SetInspectFrame(m_LatestFrame); - - GUILayout.EndHorizontal(); - } - - protected virtual void OnGetColumns(List columnNames, List columnSizes) - { - if (columnNames == null || columnSizes == null) - return; - columnNames.Add("Event"); columnSizes.Add(50); - columnNames.Add("Id"); columnSizes.Add(200); - // columnNames.Add("Data"); columnSizes.Add(400); - } - - protected virtual bool OnDrawColumnCell(Rect cellRect, DiagnosticEvent diagnosticEvent, int column) - { - return false; - } - - protected virtual void DrawColumnCell(Rect cellRect, DiagnosticEvent diagnosticEvent, int column) - { - if (!OnDrawColumnCell(cellRect, diagnosticEvent, column)) - { - switch (column) - { - case 0: EditorGUI.LabelField(cellRect, diagnosticEvent.Stream.ToString()); break; - case 1: EditorGUI.LabelField(cellRect, diagnosticEvent.DisplayName); break; -// case 2: EditorGUI.LabelField(cellRect, diagnosticEvent. == null ? "null" : diagnosticEvent.Data.ToString()); break; - } - } - } - - void InitializeGui() - { - if (m_GraphList == null) - { - if (m_GraphListTreeViewState == null) - m_GraphListTreeViewState = new TreeViewState(); - - var headerState = EventGraphListView.CreateDefaultHeaderState(); - if (MultiColumnHeaderState.CanOverwriteSerializedFields(m_GraphListMchs, headerState)) - MultiColumnHeaderState.OverwriteSerializedFields(m_GraphListMchs, headerState); - - m_GraphListMchs = headerState; - m_GraphList = new EventGraphListView(()=> { return activeSession == null ? null : activeSession.RootStreamEntry; }, m_GraphListTreeViewState, m_GraphListMchs, CanHandleEvent, this); - InitializeGraphView(m_GraphList); - m_GraphList.Reload(); - } - - if (m_EventList == null) - { - if (m_EventListTreeViewState == null) - m_EventListTreeViewState = new TreeViewState(); - - var columns = new List(); - var sizes = new List(); - OnGetColumns(columns, sizes); - var headerState = EventListView.CreateDefaultMultiColumnHeaderState(columns, sizes); - if (MultiColumnHeaderState.CanOverwriteSerializedFields(m_EventListMchs, headerState)) - MultiColumnHeaderState.OverwriteSerializedFields(m_EventListMchs, headerState); - - m_EventListMchs = headerState; - m_EventList = new EventListView(m_EventListTreeViewState, m_EventListMchs, DrawColumnCell, OnDisplayEvent); - m_EventList.Reload(); - } - - if (m_EventListFrame != m_InspectFrame && m_InspectFrame != m_LatestFrame && !m_DraggingInspectLine && Time.unscaledTime - m_LastEventListUpdate > .25f) - { - if(activeSession != null) - m_EventList.SetEvents(activeSession.GetFrameEvents(m_InspectFrame)); - m_LastEventListUpdate = Time.unscaledTime; - m_EventListFrame = m_InspectFrame; - } - - if (m_GraphListMchs != null && m_GraphListMchs.columns.Length > 2) - { - string warningText = string.Empty; - if (!ProjectConfigData.postProfilerEvents) - warningText = "Warning: Profile events must be enabled in your Addressable Asset settings to view profile data"; - m_GraphListMchs.columns[2].headerContent.text = warningText; - } - } - - void InitializeGraphView(EventGraphListView graphView) - { - graphView.DefineGraph("EventCount", 0, new GraphLayerVertValueLine(0, "Events", "Event count per frame", Color.green)); - graphView.DefineGraph("FrameCount", 1, new GraphLayerBarChartMesh(1, "FPS", "Current Frame Rate", Color.blue), - new GraphLayerLabel(1, "FPS", "Current Frame Rate", Color.white, GraphColors.LabelGraphLabelBackground, v => string.Format("{0} FPS", v))); - graphView.DefineGraph("MemoryCount", 2, new GraphLayerBarChartMesh(2, "MonoHeap", "Current Mono Heap Size", Color.green * .75f), - new GraphLayerLabel(2, "MonoHeap", "Current Mono Heap Size", Color.white, GraphColors.LabelGraphLabelBackground, v => string.Format("{0:0.0}MB", (v/1024f)))); - - OnInitializeGraphView(graphView); - } - - protected virtual void OnInitializeGraphView(EventGraphListView graphView) { } - } - - [Serializable] - class VerticalSplitter - { - [NonSerialized] - Rect m_Rect = new Rect(0, 0, 0, 3); - public Rect SplitterRect { get { return m_Rect; } } - [FormerlySerializedAs("m_currentPercent")] - [SerializeField] - float m_CurrentPercent; - - bool m_Resizing; - float m_MinPercent; - float m_MaxPercent; - public VerticalSplitter(float percent = .8f, float minPer = .2f, float maxPer = .9f) - { - m_CurrentPercent = percent; - m_MinPercent = minPer; - m_MaxPercent = maxPer; - } - - public bool OnGUI(Rect content, out Rect top, out Rect bot) - { - m_Rect.x = content.x; - m_Rect.y = (int)(content.y + content.height * m_CurrentPercent); - m_Rect.width = content.width; - - EditorGUIUtility.AddCursorRect(m_Rect, MouseCursor.ResizeVertical); - if (Event.current.type == EventType.MouseDown && m_Rect.Contains(Event.current.mousePosition)) - m_Resizing = true; - - if (m_Resizing) - { - EditorGUIUtility.AddCursorRect(content, MouseCursor.ResizeVertical); - - var mousePosInRect = Event.current.mousePosition.y - content.y; - m_CurrentPercent = Mathf.Clamp(mousePosInRect / content.height, m_MinPercent, m_MaxPercent); - m_Rect.y = Mathf.Min((int)(content.y + content.height * m_CurrentPercent), content.yMax - m_Rect.height); - if (Event.current.type == EventType.MouseUp) - m_Resizing = false; - } - - top = new Rect(content.x, content.y, content.width, m_Rect.yMin - content.yMin); - bot = new Rect(content.x, m_Rect.yMax, content.width, content.yMax - m_Rect.yMax); - return m_Resizing; - } - } - - [Serializable] - class HorizontalSplitter - { - [NonSerialized] - Rect m_Rect = new Rect(0, 0, 3, 0); - public Rect SplitterRect { get { return m_Rect; } } - [FormerlySerializedAs("m_currentPercent")] - [SerializeField] - float m_CurrentPercent; - - bool m_Resizing; - float m_MinPercent; - float m_MaxPercent; - public HorizontalSplitter(float percent = .8f, float minPer = .2f, float maxPer = .9f) - { - m_CurrentPercent = percent; - m_MinPercent = minPer; - m_MaxPercent = maxPer; - } - - public bool OnGUI(Rect content, out Rect left, out Rect right) - { - m_Rect.y = content.y; - m_Rect.x = (int)(content.x + content.width * m_CurrentPercent); - m_Rect.height = content.height; - - EditorGUIUtility.AddCursorRect(m_Rect, MouseCursor.ResizeHorizontal); - if (Event.current.type == EventType.MouseDown && m_Rect.Contains(Event.current.mousePosition)) - m_Resizing = true; - - if (m_Resizing) - { - EditorGUIUtility.AddCursorRect(content, MouseCursor.ResizeHorizontal); - - var mousePosInRect = Event.current.mousePosition.x - content.x; - m_CurrentPercent = Mathf.Clamp(mousePosInRect / content.width, m_MinPercent, m_MaxPercent); - m_Rect.x = Mathf.Min((int)(content.x + content.width * m_CurrentPercent), content.xMax - m_Rect.width); - if (Event.current.type == EventType.MouseUp) - m_Resizing = false; - } - - left = new Rect(content.x, content.y, m_Rect.xMin, content.height); - right = new Rect(m_Rect.xMax, content.y, content.width - m_Rect.xMax, content.height); - return m_Resizing; - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/EventViewerWindow.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/EventViewerWindow.cs.meta deleted file mode 100644 index c3115937..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/EventViewerWindow.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 62d523cfe47d64e43a6d72011ad4a7ca -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph.meta deleted file mode 100644 index 3072a98d..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 50b98fe2646355b489bf89043179e554 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphDefinition.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphDefinition.cs deleted file mode 100644 index 231b2dba..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphDefinition.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using UnityEditor.AddressableAssets.Diagnostics.Data; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Diagnostics.GUI.Graph -{ - class GraphDefinition - { - int m_MaxValueStream; - internal IGraphLayer[] layers; - internal GraphDefinition(int maxValueStream, IGraphLayer[] l) - { - layers = l; - m_MaxValueStream = maxValueStream; - } - - internal int GetMaxValue(EventDataSet e) - { - var stream = e.GetStream(m_MaxValueStream); - return stream == null ? 1 : Mathf.Max(10, (stream.maxValue / 10 + 1) * 10); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphDefinition.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphDefinition.cs.meta deleted file mode 100644 index e32d6cd8..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphDefinition.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 65b714b6377cb9c45a6edbc16f1f3092 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerBackground.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerBackground.cs deleted file mode 100644 index 7b207123..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerBackground.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using UnityEditor.AddressableAssets.Diagnostics.Data; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Diagnostics.GUI.Graph -{ - class GraphLayerBackgroundGraph : GraphLayerBase - { - bool IsContinuationOfSegment(int prevData, int nextData) - { - return (prevData == 0 != (nextData == 0)); - } - - Color m_LoadColor; - int m_LoadStatusStream; - internal GraphLayerBackgroundGraph(int refCountStream, Color refBgColor, int loadStatusStream, Color loadStatusColor, string name, string desc) : base(refCountStream, name, desc, refBgColor) { m_LoadColor = loadStatusColor; m_LoadStatusStream = loadStatusStream; } - public override void Draw(EventDataSet dataSet, Rect rect, int startFrame, int frameCount, int inspectFrame, bool expanded, Material material, int maxValue) - { - if (dataSet == null) - return; - - int endFrame = startFrame + frameCount; - - EventDataSetStream refStream = dataSet.GetStream(Stream); - if (refStream != null) - { - foreach (GraphUtility.Segment s in GraphUtility.IterateSegments(refStream, startFrame, endFrame, IsContinuationOfSegment)) - { - if (s.data != 0) - { - float x = rect.xMin + GraphUtility.ValueToPixel(s.frameStart, startFrame, endFrame, rect.width); - float w = (rect.xMin + GraphUtility.ValueToPixel(s.frameEnd, startFrame, endFrame, rect.width)) - x; - EditorGUI.DrawRect(new Rect(x, rect.yMin, w, rect.height), GraphColor); - } - } - } - - EventDataSetStream loadStream = dataSet.GetStream(m_LoadStatusStream); - if (loadStream != null) - { - foreach (GraphUtility.Segment s in GraphUtility.IterateSegments(loadStream, startFrame, endFrame, IsContinuationOfSegment)) - { - if (s.data == 0) - { - float x = rect.xMin + GraphUtility.ValueToPixel(s.frameStart, startFrame, endFrame, rect.width); - float w = (rect.xMin + GraphUtility.ValueToPixel(s.frameEnd, startFrame, endFrame, rect.width)) - x; - EditorGUI.DrawRect(new Rect(x, rect.yMin, w, rect.height), m_LoadColor); - } - } - } - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerBackground.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerBackground.cs.meta deleted file mode 100644 index 3982c0f7..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerBackground.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 569f15755d5d88e48a93ae6b28dd62f8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerBarChart.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerBarChart.cs deleted file mode 100644 index 890bab5e..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerBarChart.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.AddressableAssets.Diagnostics.Data; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Diagnostics.GUI.Graph -{ - class GraphLayerBarChartMesh : GraphLayerBase - { - Mesh m_Mesh; - List m_Verts = new List(); - List m_Indices = new List(); - - Rect m_Bounds; - Vector2 m_GridSize; - - public GraphLayerBarChartMesh(int stream, string name, string description, Color color) : base(stream, name, description, color) { } - - void AddQuadToMesh(float left, float right, float bot, float top) - { - float xLeft = m_Bounds.xMin + left * m_GridSize.x; - float xRight = m_Bounds.xMin + right * m_GridSize.x; - float yBot = m_Bounds.yMax - bot * m_GridSize.y; - float yTop = m_Bounds.yMax - top * m_GridSize.y; - - int start = m_Verts.Count; - m_Verts.Add(new Vector3(xLeft, yBot, 0)); - m_Verts.Add(new Vector3(xLeft, yTop, 0)); - m_Verts.Add(new Vector3(xRight, yTop, 0)); - m_Verts.Add(new Vector3(xRight, yBot, 0)); - - m_Indices.Add(start); - m_Indices.Add(start + 1); - m_Indices.Add(start + 2); - - m_Indices.Add(start); - m_Indices.Add(start + 2); - m_Indices.Add(start + 3); - } - - public override void Draw(EventDataSet dataSet, Rect rect, int startFrame, int frameCount, int inspectFrame, bool expanded, Material material, int maxValue) - { - if (dataSet == null || material == null) - return; - - var stream = dataSet.GetStream(Stream); - if (stream != null && stream.samples.Count > 0) - { - material.color = GraphColor; - - if (m_Mesh == null) - m_Mesh = new Mesh(); - m_Verts.Clear(); - m_Indices.Clear(); - var endTime = startFrame + frameCount; - - m_Bounds = new Rect(rect); - m_GridSize.x = m_Bounds.width / frameCount; - m_GridSize.y = m_Bounds.height / maxValue; - - int previousFrameNumber = endTime; - int currentFrame = endTime; - - for (int i = stream.samples.Count - 1; i >= 0 && currentFrame > startFrame; --i) - { - currentFrame = stream.samples[i].frame; - var frame = Mathf.Max(currentFrame, startFrame); - if (stream.samples[i].data > 0) - { - AddQuadToMesh(frame - startFrame, previousFrameNumber - startFrame, 0, stream.samples[i].data); - } - previousFrameNumber = frame; - } - - if (m_Verts.Count > 0) - { - m_Mesh.Clear(true); - m_Mesh.SetVertices(m_Verts); - m_Mesh.triangles = m_Indices.ToArray(); - material.SetPass(0); - Graphics.DrawMeshNow(m_Mesh, Vector3.zero, Quaternion.identity); - } - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerBarChart.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerBarChart.cs.meta deleted file mode 100644 index 9f756a68..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerBarChart.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b8b70aff15e9f9640ac1126bbb4f1b75 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerBase.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerBase.cs deleted file mode 100644 index 4f4c29cc..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerBase.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using UnityEditor.AddressableAssets.Diagnostics.Data; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Diagnostics.GUI.Graph -{ - class GraphLayerBase : IGraphLayer - { - string m_LayerName; - string m_Description; - Color m_Color; - public int Stream { get; private set; } - - public GraphLayerBase(int stream, string name, string description, Color color) - { - Stream = stream; - m_LayerName = name; - m_Description = description; - m_Color = color; - } - - public Color GraphColor { get { return m_Color; } } - - public string LayerName { get { return m_LayerName; } } - - public string Description { get { return m_Description; } } - - public virtual void Draw(EventDataSet dataSet, Rect rect, int startFrame, int frameCount, int inspectFrame, bool expanded, Material material, int maxValue) - { - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerBase.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerBase.cs.meta deleted file mode 100644 index 51a15641..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerBase.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7b099b49d522d1541bbf6ba655430a02 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerEventMarker.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerEventMarker.cs deleted file mode 100644 index 43bb7095..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerEventMarker.cs +++ /dev/null @@ -1,104 +0,0 @@ -using System; -using UnityEditor.AddressableAssets.Diagnostics.Data; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Diagnostics.GUI.Graph -{ - class GraphLayerEventMarker : GraphLayerBase - { - Color m_EndColor; - internal GraphLayerEventMarker(int stream, string name, string desc, Color startColor, Color endColor) : base(stream, name, desc, startColor) { m_EndColor = endColor; } - public override void Draw(EventDataSet dataSet, Rect rect, int startFrame, int frameCount, int inspectFrame, bool expanded, Material material, int maxValue) - { - if (dataSet == null) - return; - - var endTime = startFrame + frameCount; - var stream = dataSet.GetStream(Stream); - if (stream != null) - { - for (int i = stream.samples.Count - 1; i >= 0; --i) - { - var frame = stream.samples[i].frame; - if (frame < startFrame) - break; - EditorGUI.DrawRect(new Rect(rect.xMin + GraphUtility.ValueToPixel(frame, startFrame, endTime, rect.width), rect.yMin, 2, rect.height), stream.samples[i].data == 0 ? m_EndColor : GraphColor); - } - } - } - } - - class GraphLayerVertValueLine : GraphLayerBase - { - internal GraphLayerVertValueLine(int stream, string name, string desc, Color color) : base(stream, name, desc, color) { } - public override void Draw(EventDataSet dataSet, Rect rect, int startFrame, int frameCount, int inspectFrame, bool expanded, Material material, int maxValue) - { - if (dataSet == null) - return; - - var endTime = startFrame + frameCount; - var stream = dataSet.GetStream(Stream); - if (stream != null) - { - for (int i = stream.samples.Count - 1; i >= 0; --i) - { - var frame = stream.samples[i].frame; - if (frame < startFrame) - break; - float pixelVal = GraphUtility.ValueToPixel(stream.samples[i].data, 0, maxValue, rect.height); - EditorGUI.DrawRect(new Rect(rect.xMin + GraphUtility.ValueToPixel(frame, startFrame, endTime, rect.width) - 1, rect.yMax - pixelVal, 2, pixelVal), GraphColor); - } - } - } - } - - //internal class GraphLayerVertValueLineRects : GraphLayerBase, System.IDisposable - //{ - // UnityEngine.Collections.NativeArray rects = new UnityEngine.Collections.NativeArray(1000, UnityEngine.Collections.Allocator.Persistent); - // public GraphLayerVertValueLineRects(int stream, string name, string desc, Color color) : base(stream, name, desc, color) { } - - // public void Dispose() - // { - // rects.Dispose(); - // } - - // public override void Draw(EventDataCollection.PlayerSession.DataSet e, Rect r, int startFrame, int frameCount, int inspectFrame, bool expanded, Material mat, int maxValue) - // { - // var stream = e.GetStream(m_stream); - // if (stream != null) - // { - // var da = new Graphics.DrawRectArgs(); - // da.rect.width = 2; - // da.color = m_color; - // var endTime = startFrame + frameCount; - // int rectCount = 0; - // float xMin = r.xMin - 1; - // float yMax = r.yMax; - // int rectLength = rects.Length; - // float oneOverRangeTimesPixelsX = (1f / (endTime - startFrame)) * r.width; - // float oneOverRangeTimesPixelsY = (1f / maxValue) * r.height; - - // for (int i = stream.samples.Count - 1; i >= 0; --i) - // { - // var sample = stream.samples[i]; - // var frame = sample.frame; - // var val = sample.value; - // if (frame < startFrame) - // break; - // float pixelVal = val * oneOverRangeTimesPixelsY; - // da.rect.x = xMin + (frame - startFrame) * oneOverRangeTimesPixelsX; - // da.rect.y = yMax - pixelVal; - // da.rect.height = pixelVal; - // rects[rectCount++] = da; - // if (rectCount >= rectLength) - // { - // Graphics.DrawRects(rects, 0, rectCount, mat); - // rectCount = 0; - // } - // } - // if (rectCount > 0) - // Graphics.DrawRects(rects, 0, rectCount, mat); - // } - // } - //} -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerEventMarker.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerEventMarker.cs.meta deleted file mode 100644 index 0eb1cab1..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerEventMarker.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0931d4af80159344eb7e15928166dafd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerLabel.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerLabel.cs deleted file mode 100644 index 45372579..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerLabel.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using UnityEditor.AddressableAssets.Diagnostics.Data; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Diagnostics.GUI.Graph -{ - class GraphLayerLabel : GraphLayerBase - { - Func m_LabelFunc; - Color m_BgColor; - internal GraphLayerLabel(int stream, string name, string desc, Color color, Color bgColor, Func func) : base(stream, name, desc, color) { m_LabelFunc = func; m_BgColor = bgColor; } - public override void Draw(EventDataSet dataSet, Rect rect, int startFrame, int frameCount, int inspectFrame, bool expanded, Material material, int maxValue) - { - if (dataSet == null) - return; - - var endTime = startFrame + frameCount; - var stream = dataSet.GetStream(Stream); - if (stream != null) - { - var prevCol = UnityEngine.GUI.color; - UnityEngine.GUI.color = GraphColor; - if (expanded) - { - var text = new GUIContent(maxValue.ToString()); - var size = UnityEngine.GUI.skin.label.CalcSize(text); - var labelRect = new Rect(rect.xMin + 2, rect.yMin, size.x, size.y); - EditorGUI.LabelField(labelRect, text); - labelRect = new Rect(rect.xMax - size.x, rect.yMin, size.x, size.y); - EditorGUI.LabelField(labelRect, text); - } - - if (inspectFrame != endTime) - { - var val = stream.GetValue(inspectFrame); - if (val > 0) - { - var text = new GUIContent(m_LabelFunc(val)); - var size = UnityEngine.GUI.skin.label.CalcSize(text); - var x = GraphUtility.ValueToPixel(inspectFrame, startFrame, endTime, rect.width); - float pixelVal = GraphUtility.ValueToPixel(val, 0, maxValue, rect.height); - var labelRect = new Rect(rect.xMin + x + 5, Mathf.Max(rect.yMin, rect.yMax - (pixelVal + size.y)), size.x, size.y); - UnityEngine.GUI.DrawTexture(labelRect, EditorGUIUtility.whiteTexture, ScaleMode.StretchToFill, true, 0, m_BgColor, 50, 5); - EditorGUI.LabelField(labelRect, text, UnityEngine.GUI.skin.label); - } - } - UnityEngine.GUI.color = prevCol; - } - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerLabel.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerLabel.cs.meta deleted file mode 100644 index 709fe698..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphLayerLabel.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a454ac03434eaf04d8b96dacae95e830 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphUtility.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphUtility.cs deleted file mode 100644 index 8fd746a9..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphUtility.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.AddressableAssets.Diagnostics.Data; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Diagnostics.GUI.Graph -{ - static internal class GraphUtility - { - public static float ValueToPixel(float value, float min, float max, float pixelRange) - { - return Mathf.Clamp01((value - min) / (max - min)) * pixelRange; - } - - public static float ValueToPixelUnclamped(float value, float min, float max, float pixelRange) - { - return ((value - min) / (max - min)) * pixelRange; - } - - public static float PixelToValue(float pixel, float min, float max, float valueRange) - { - return Mathf.Clamp01((pixel - min) / (max - min)) * valueRange; - } - - internal struct Segment - { - public int frameStart; - public int frameEnd; - public int data; - } - - public delegate bool IsContinuationOfSegmentDelegate(int prevData, int newData); - - internal static IEnumerable IterateSegments(EventDataSetStream stream, int minFrame, int maxFrame, IsContinuationOfSegmentDelegate segmentCallback) - { - if (stream.samples.Count > 0) - { - // find last visible event. This can be the event that is right before the minFrame - int segStartIdx; - for (segStartIdx = stream.samples.Count - 1; segStartIdx > 0; segStartIdx--) - if (stream.samples[segStartIdx].frame < minFrame) - break; - - int curIdx = segStartIdx + 1; - - for (; curIdx < stream.samples.Count; curIdx++) - { - // keep iterating samples until the callback tells us this should be reported as a new segment - if (segmentCallback(stream.samples[segStartIdx].data, stream.samples[curIdx].data)) - { - Segment segment; - segment.frameStart = Math.Max(stream.samples[segStartIdx].frame, minFrame); - segment.frameEnd = stream.samples[curIdx].frame; - segment.data = stream.samples[segStartIdx].data; - yield return segment; - // start working on a new segment from the current location - segStartIdx = curIdx; - } - } - - // close off the last segment all the way to the end of the maxFrame - Segment lastSegment; - lastSegment.frameStart = Math.Max(stream.samples[segStartIdx].frame, minFrame); - lastSegment.frameEnd = maxFrame; - lastSegment.data = stream.samples[segStartIdx].data; - yield return lastSegment; - } - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphUtility.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphUtility.cs.meta deleted file mode 100644 index 865e2fae..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/GraphUtility.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c66ef31a34be3df45acc8590fd614dcb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/IGraphLayer.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/IGraphLayer.cs deleted file mode 100644 index 9fb8fbde..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/IGraphLayer.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using UnityEditor.AddressableAssets.Diagnostics.Data; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Diagnostics.GUI.Graph -{ - interface IGraphLayer - { - string LayerName { get; } - string Description { get; } - Color GraphColor { get; } - void Draw(EventDataSet dataSet, Rect rect, int startFrame, int frameCount, int inspectFrame, bool expanded, Material material, int maxValue); - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/IGraphLayer.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/IGraphLayer.cs.meta deleted file mode 100644 index b04966aa..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/Graph/IGraphLayer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 213cbfa5464d56d468883a57132a0582 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/GraphColors.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/GraphColors.cs deleted file mode 100644 index 889e4605..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/GraphColors.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Diagnostics.GUI -{ - static class GraphColors - { - static Color s_KWindowBackground = new Color(0.63f, 0.63f, 0.63f, 1.0f); - static Color s_KLabelGraphLabelBackground = new Color(0.75f, 0.75f, 0.75f, 0.75f); - - static Color s_KWindowBackgroundPro = new Color(0.15f, 0.15f, 0.15f, 1.0f); - static Color s_KLabelGraphLabelBackgroundPro = new Color(0, 0, 0, .75f); - - internal static Color WindowBackground { get { return EditorGUIUtility.isProSkin ? s_KWindowBackgroundPro : s_KWindowBackground; } } - internal static Color LabelGraphLabelBackground { get { return EditorGUIUtility.isProSkin ? s_KLabelGraphLabelBackgroundPro : s_KLabelGraphLabelBackground; } } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/GraphColors.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/GraphColors.cs.meta deleted file mode 100644 index 160a9a87..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/GUI/GraphColors.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a5ead37e5b8764940b99748a48ed48a6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/ResourceManagerCacheWindow.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/ResourceManagerCacheWindow.cs deleted file mode 100644 index 00b1f629..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/ResourceManagerCacheWindow.cs +++ /dev/null @@ -1,146 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using UnityEditor.AddressableAssets.Diagnostics.GUI; -using UnityEditor.AddressableAssets.Diagnostics.GUI.Graph; -using UnityEngine.AddressableAssets; -using UnityEngine; -using UnityEngine.ResourceManagement.Diagnostics; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.ResourceManagement; -using UnityEditor.IMGUI.Controls; - -namespace UnityEditor.AddressableAssets.Diagnostics -{ - /* - * ResourceManager specific implementation of an EventViewerWindow - */ - class ResourceManagerCacheWindow : EditorWindow - { - // [MenuItem("Window/Asset Management/Resource Manager Cache", priority = 2051)] - static void ShowWindow() - { - var window = GetWindow(); - window.titleContent = new GUIContent("Resource Manager Cache", "Resource Manager Cache"); - window.Show(); - } - - class CacheDataTree : TreeView - { - ResourceManagerCacheWindow m_Window; - static int Compare(TreeViewItem a, TreeViewItem b) - { - return ((EventTreeViewItem)b).m_state.ReferenceCount - ((EventTreeViewItem)a).m_state.ReferenceCount; - } - - class EventTreeViewItem : TreeViewItem - { - internal OperationState m_state; - public EventTreeViewItem(Dictionary states, OperationState e, int depth) : base(e.ObjectId, depth, string.Format("{0}\t{1}", e.ReferenceCount, e.DisplayName)) - { - m_state = e; - if (e.Dependencies != null && e.Dependencies.Length > 0) - { - children = new List(e.Dependencies.Length); - foreach (var d in e.Dependencies) - AddChild(new EventTreeViewItem(states, states[d], depth + 1)); - children.Sort(Compare); - } - } - } - public CacheDataTree(ResourceManagerCacheWindow rmcw, TreeViewState tvs) : base(tvs) - { - m_Window = rmcw; - } - - protected override TreeViewItem BuildRoot() - { - TreeViewItem root = new TreeViewItem(-1, -1); - root.children = new List(m_Window.m_OpStates.Count); - foreach (var l in m_Window.m_OpStates) - root.AddChild(new EventTreeViewItem(m_Window.m_OpStates, l.Value, 0)); - root.children.Sort(Compare); - return root; - } - } - - void OnEnable() - { - if (m_EventListTreeViewState == null) - m_EventListTreeViewState = new TreeViewState(); - m_OpStates = new Dictionary(); - m_cacheTree = new CacheDataTree(this, m_EventListTreeViewState); - m_cacheTree.Reload(); - EditorApplication.playModeStateChanged += OnEditorPlayModeChanged; - DiagnosticEventCollector.RegisterEventHandler(OnEvent, true, false); - } - - private void OnDisable() - { - DiagnosticEventCollector.RegisterEventHandler(OnEvent, false, false); - EditorApplication.playModeStateChanged -= OnEditorPlayModeChanged; - } - - class OperationState - { - public int ObjectId; - public string DisplayName; - public int ReferenceCount; - public int[] Dependencies; - } - - Dictionary m_OpStates = new Dictionary(); - int m_lastRepaintedFrame =-1; - public void OnEvent(DiagnosticEvent evt) - { - var hash = evt.ObjectId; - if (evt.Stream == (int)ResourceManager.DiagnosticEventType.AsyncOperationDestroy) - { - m_OpStates.Remove(hash); - m_cacheTree.Reload(); - Repaint(); - return; - } - - - OperationState op; - if (!m_OpStates.TryGetValue(hash, out op)) - { - if (evt.Stream != (int)ResourceManager.DiagnosticEventType.AsyncOperationCreate) - { - Debug.LogWarningFormat("Unable to find op info for id {0} - {1}, stream={2}", hash, evt.DisplayName, evt.Stream); - } - m_OpStates.Add(hash, op = new OperationState() { ObjectId = evt.ObjectId, DisplayName = evt.DisplayName, Dependencies = evt.Dependencies, ReferenceCount = 0 }); - } - - if (evt.Stream == (int)ResourceManager.DiagnosticEventType.AsyncOperationReferenceCount) - op.ReferenceCount = evt.Value; - - - if (evt.Frame != m_lastRepaintedFrame) - { - m_lastRepaintedFrame = evt.Frame; - m_cacheTree.Reload(); - Repaint(); - } - } - - void OnEditorPlayModeChanged(PlayModeStateChange state) - { - if (state == PlayModeStateChange.EnteredPlayMode) - DiagnosticEventCollector.RegisterEventHandler(OnEvent, true, false); - else if (state == PlayModeStateChange.EnteredEditMode) - DiagnosticEventCollector.RegisterEventHandler(OnEvent, false, false); - } - - TreeViewState m_EventListTreeViewState; - CacheDataTree m_cacheTree; - - private void OnGUI() - { - var r = EditorGUILayout.GetControlRect(); - Rect contentRect = new Rect(r.x, r.y, r.width, position.height - (r.y + r.x)); - m_cacheTree.OnGUI(contentRect); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/ResourceManagerCacheWindow.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/ResourceManagerCacheWindow.cs.meta deleted file mode 100644 index 3dd5054e..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/ResourceManagerCacheWindow.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3db256bbb74b81f4b9c9b3495ab97e6b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/ResourceProfilerWindow.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/ResourceProfilerWindow.cs deleted file mode 100644 index b49ceaeb..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/ResourceProfilerWindow.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using UnityEditor.AddressableAssets.Diagnostics.GUI; -using UnityEditor.AddressableAssets.Diagnostics.GUI.Graph; -using UnityEngine; -using UnityEngine.AddressableAssets.Utility; -using UnityEngine.ResourceManagement; -using UnityEngine.ResourceManagement.Diagnostics; -using UnityEngine.ResourceManagement.Util; - -namespace UnityEditor.AddressableAssets.Diagnostics -{ - /* - * ResourceManager specific implementation of an EventViewerWindow - */ - class ResourceProfilerWindow : EventViewerWindow - { - [MenuItem("Window/Asset Management/Addressable Profiler", priority = 2051)] - static void ShowWindow() - { - var window = GetWindow(); - window.titleContent = new GUIContent("Addressable Profiler", "Addressable Profiler"); - window.Show(); - } - - protected override bool ShowEventDetailPanel { get { return false; } } - protected override bool ShowEventPanel { get { return true; } } - - protected static string GetDataStreamName(int stream) - { - return ((ResourceManager.DiagnosticEventType)stream).ToString(); - } - - protected override bool OnCanHandleEvent(string graph) - { - return graph == "ResourceManager"; - } - - protected override bool OnRecordEvent(DiagnosticEvent evt) - { - if (evt.Graph == "ResourceManager") - { - switch ((ResourceManager.DiagnosticEventType)evt.Stream) - { - case ResourceManager.DiagnosticEventType.AsyncOperationCreate: - case ResourceManager.DiagnosticEventType.AsyncOperationDestroy: - case ResourceManager.DiagnosticEventType.AsyncOperationComplete: - case ResourceManager.DiagnosticEventType.AsyncOperationFail: - return true; - } - } - return base.OnRecordEvent(evt); - } - - protected override void OnDrawEventDetail(Rect rect, DiagnosticEvent evt) - { - } - - protected override void OnGetColumns(List columnNames, List columnSizes) - { - if (columnNames == null || columnSizes == null) - return; - columnNames.AddRange(new[] { "Event", "Key"}); - columnSizes.AddRange(new float[] { 150, 400 }); - } - - protected override bool OnDrawColumnCell(Rect cellRect, DiagnosticEvent evt, int column) - { - switch (column) - { - case 0: EditorGUI.LabelField(cellRect, ((ResourceManager.DiagnosticEventType)evt.Stream).ToString()); break; - case 1: EditorGUI.LabelField(cellRect, evt.DisplayName); break; - } - - return true; - } - - protected override void OnInitializeGraphView(EventGraphListView graphView) - { - if (graphView == null) - return; - - Color labelBgColor = GraphColors.LabelGraphLabelBackground; - - Color refCountBgColor = new Color(53 / 255f, 136 / 255f, 167 / 255f, 1); - Color loadingBgColor = Color.Lerp(refCountBgColor, GraphColors.WindowBackground, 0.5f); - - graphView.DefineGraph("ResourceManager", (int)ResourceManager.DiagnosticEventType.AsyncOperationReferenceCount, - new GraphLayerBackgroundGraph((int)ResourceManager.DiagnosticEventType.AsyncOperationReferenceCount, refCountBgColor, (int)ResourceManager.DiagnosticEventType.AsyncOperationPercentComplete, loadingBgColor, "LoadPercent", "Loaded"), - new GraphLayerBarChartMesh((int)ResourceManager.DiagnosticEventType.AsyncOperationReferenceCount, "RefCount", "Reference Count", new Color(123 / 255f, 158 / 255f, 6 / 255f, 1)), - new GraphLayerEventMarker((int)ResourceManager.DiagnosticEventType.AsyncOperationCreate, "", "", Color.grey, Color.grey), - new GraphLayerEventMarker((int)ResourceManager.DiagnosticEventType.AsyncOperationComplete, "", "", Color.white, Color.white), - new GraphLayerEventMarker((int)ResourceManager.DiagnosticEventType.AsyncOperationDestroy, "", "", Color.black, Color.black), - new GraphLayerEventMarker((int)ResourceManager.DiagnosticEventType.AsyncOperationFail, "", "", Color.red, Color.red), - new GraphLayerLabel((int)ResourceManager.DiagnosticEventType.AsyncOperationReferenceCount, "RefCount", "Reference Count", new Color(123 / 255f, 158 / 255f, 6 / 255f, 1), labelBgColor, v => v.ToString()) - ); - - graphView.DefineGraph("InstantiationCount", 0, new GraphLayerVertValueLine(0, "Instantiation Count", "Instantiation Count", Color.green)); - - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/ResourceProfilerWindow.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/ResourceProfilerWindow.cs.meta deleted file mode 100644 index 61306a2b..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Diagnostics/ResourceProfilerWindow.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 77af4245676cdae4e90c350b07b947d0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI.meta deleted file mode 100644 index b2512e3f..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: a2c37bb888dfcc1449822d8dd13555cb -folderAsset: yes -timeCreated: 1505333196 -licenseType: Pro -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetEntryCollectionEditor.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetEntryCollectionEditor.cs deleted file mode 100644 index 9621e55a..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetEntryCollectionEditor.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using UnityEditor.AddressableAssets.Settings; -using UnityEditorInternal; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.GUI -{ - [CustomEditor(typeof(AddressableAssetEntryCollection))] - class AddressableAssetEntryCollectionEditor : Editor - { - AddressableAssetEntryCollection m_Collection; - ReorderableList m_EntriesList; - - void OnEnable() - { - m_Collection = target as AddressableAssetEntryCollection; - if (m_Collection != null) - { - m_EntriesList = new ReorderableList(m_Collection.Entries, typeof(AddressableAssetEntry), false, true, false, false); - m_EntriesList.drawElementCallback = DrawEntry; - m_EntriesList.drawHeaderCallback = DrawHeader; - } - } - - void DrawHeader(Rect rect) - { - UnityEngine.GUI.Label(rect, "Asset Entries"); - } - - void DrawEntry(Rect rect, int index, bool isActive, bool isFocused) - { - UnityEngine.GUI.Label(rect, m_Collection.Entries[index].address); - } - - public override void OnInspectorGUI() - { - serializedObject.Update(); - m_EntriesList.DoLayoutList(); - serializedObject.ApplyModifiedProperties(); - } - - - } - -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetEntryCollectionEditor.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetEntryCollectionEditor.cs.meta deleted file mode 100644 index 5d1ace21..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetEntryCollectionEditor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d30a4104a18db1f42a5da276c7db34fe -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetGroupInspector.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetGroupInspector.cs deleted file mode 100644 index a5e7ba7d..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetGroupInspector.cs +++ /dev/null @@ -1,160 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.AddressableAssets.Settings; -using UnityEngine; - -// ReSharper disable DelegateSubtraction - -namespace UnityEditor.AddressableAssets.GUI -{ - [CustomEditor(typeof(AddressableAssetGroup))] - class AddressableAssetGroupInspector : Editor - { - AddressableAssetGroup m_GroupTarget; - List m_SchemaTypes; - bool[] m_FoldoutState; - - void OnEnable() - { - m_GroupTarget = target as AddressableAssetGroup; - if (m_GroupTarget != null) - { - m_GroupTarget.Settings.OnModification += OnSettingsModification; - m_SchemaTypes = AddressableAssetUtility.GetTypes(); - m_FoldoutState = new bool[m_GroupTarget.Schemas.Count]; - } - - for (int i = 0; i < m_FoldoutState.Length; i++) - m_FoldoutState[i] = true; - } - - void OnDisable() - { - if (m_GroupTarget != null) - m_GroupTarget.Settings.OnModification -= OnSettingsModification; - } - - void OnSettingsModification(AddressableAssetSettings settings, AddressableAssetSettings.ModificationEvent evnt, object o) - { - switch (evnt) - { - case AddressableAssetSettings.ModificationEvent.GroupAdded: - case AddressableAssetSettings.ModificationEvent.GroupRemoved: - case AddressableAssetSettings.ModificationEvent.GroupRenamed: - case AddressableAssetSettings.ModificationEvent.BatchModification: - case AddressableAssetSettings.ModificationEvent.ActiveProfileSet: - case AddressableAssetSettings.ModificationEvent.GroupSchemaAdded: - case AddressableAssetSettings.ModificationEvent.GroupSchemaModified: - case AddressableAssetSettings.ModificationEvent.GroupSchemaRemoved: - Repaint(); - break; - } - } - - - public override void OnInspectorGUI() - { - try - { - serializedObject.Update(); - using (new EditorGUI.DisabledScope(true)) - { - EditorGUILayout.ObjectField("Addressable Asset Settings", m_GroupTarget.Settings, typeof(AddressableAssetSettings), false); - var prof = m_GroupTarget.Settings.profileSettings.GetProfile(m_GroupTarget.Settings.activeProfileId); - EditorGUILayout.TextField("Current Profile", prof.profileName); - } - - if (m_FoldoutState == null || m_FoldoutState.Length != m_GroupTarget.Schemas.Count) - m_FoldoutState = new bool[m_GroupTarget.Schemas.Count]; - - for (int i = 0; i < m_GroupTarget.Schemas.Count; i++) - { - var schema = m_GroupTarget.Schemas[i]; - EditorGUILayout.BeginHorizontal(); - m_FoldoutState[i] = EditorGUILayout.Foldout(m_FoldoutState[i], schema.GetType().Name); - if (!m_GroupTarget.ReadOnly) - { - if (GUILayout.Button("X", GUILayout.Width(40))) - { - if (EditorUtility.DisplayDialog("Delete selected schema?", "Are you sure you want to delete the selected schema?\n\nYou cannot undo this action.", "Yes", "No")) - { - m_GroupTarget.RemoveSchema(schema.GetType()); - var newFoldoutstate = new bool[m_GroupTarget.Schemas.Count]; - for (int j = 0; j < newFoldoutstate.Length; j++) - { - if (j < i) - newFoldoutstate[j] = m_FoldoutState[i]; - else - newFoldoutstate[j] = m_FoldoutState[i + 1]; - } - - m_FoldoutState = newFoldoutstate; - EditorGUILayout.EndHorizontal(); - break; - } - } - } - - EditorGUILayout.EndHorizontal(); - if (m_FoldoutState[i]) - { - try - { - EditorGUI.indentLevel++; - schema.OnGUI(); - EditorGUI.indentLevel--; - } - catch (Exception se) - { - Debug.LogException(se); - } - } - } - - - - EditorGUILayout.LabelField("", UnityEngine.GUI.skin.horizontalSlider); - EditorGUILayout.BeginHorizontal(); - GUILayout.FlexibleSpace(); - if (!m_GroupTarget.ReadOnly) - { - if (EditorGUILayout.DropdownButton(new GUIContent("Add Schema", "Add new schema to this group."), FocusType.Keyboard)) - { - var menu = new GenericMenu(); - for (int i = 0; i < m_SchemaTypes.Count; i++) - { - var type = m_SchemaTypes[i]; - menu.AddItem(new GUIContent(type.Name, ""), false, OnAddSchema, type); - } - - menu.ShowAsContext(); - } - } - - EditorGUILayout.EndHorizontal(); - - serializedObject.ApplyModifiedProperties(); - } - catch (UnityEngine.ExitGUIException ) - { - throw; - } - catch (Exception e) - { - Debug.LogException(e); - } - } - - void OnAddSchema(object context) - { - m_GroupTarget.AddSchema(context as Type); - var newFoldoutState = new bool[m_GroupTarget.Schemas.Count]; - for (int i = 0; i < m_FoldoutState.Length; i++) - newFoldoutState[i] = m_FoldoutState[i]; - m_FoldoutState = newFoldoutState; - m_FoldoutState[m_FoldoutState.Length - 1] = true; - } - - } - -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetGroupInspector.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetGroupInspector.cs.meta deleted file mode 100644 index 611a41d5..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetGroupInspector.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: be36d66973700384fbeb7fc898581fbb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetGroupTemplateInspector.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetGroupTemplateInspector.cs deleted file mode 100644 index 473af7e9..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetGroupTemplateInspector.cs +++ /dev/null @@ -1,125 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.AddressableAssets.Settings; -using UnityEngine; - -// ReSharper disable DelegateSubtraction - -namespace UnityEditor.AddressableAssets.GUI -{ - [CustomEditor(typeof(AddressableAssetGroupTemplate))] - class AddressableAssetGroupTemplateInspector : Editor - { - List m_SchemaTypes; - bool[] m_FoldoutState; - - AddressableAssetGroupTemplate m_AddressableAssetGroupTarget; - - void OnEnable() - { - m_AddressableAssetGroupTarget = target as AddressableAssetGroupTemplate; - - if (m_AddressableAssetGroupTarget != null) - { - m_SchemaTypes = AddressableAssetUtility.GetTypes(); - m_FoldoutState = new bool[m_AddressableAssetGroupTarget.SchemaObjects.Count]; - } - - for (int i = 0; i < m_FoldoutState.Length; i++) - m_FoldoutState[i] = true; - } - - public override void OnInspectorGUI() - { - try - { - serializedObject.Update(); - - EditorGUILayout.LabelField( "Group Template Description" ); - m_AddressableAssetGroupTarget.Description = EditorGUILayout.TextArea( m_AddressableAssetGroupTarget.Description ); - EditorGUILayout.LabelField("", UnityEngine.GUI.skin.horizontalSlider); - - int objectCount = m_AddressableAssetGroupTarget.SchemaObjects.Count; - if (m_FoldoutState == null || m_FoldoutState.Length != objectCount) - m_FoldoutState = new bool[objectCount]; - - for (int i = 0; i < objectCount; i++) - { - EditorGUILayout.BeginHorizontal(); - m_FoldoutState[i] = EditorGUILayout.Foldout(m_FoldoutState[i], m_AddressableAssetGroupTarget.SchemaObjects[i].GetType().Name); - - if (GUILayout.Button("X", GUILayout.Width(40))) - { - if (EditorUtility.DisplayDialog("Delete selected schema?", "Are you sure you want to delete the selected schema?\n\nYou cannot undo this action.", "Yes", "No")) - { - if( m_AddressableAssetGroupTarget.RemoveSchema( i ) ) - { - var newFoldoutstate = new bool[objectCount-1]; - for( int j = 0; j < newFoldoutstate.Length; j++ ) - { - if( j < i ) - newFoldoutstate[j] = m_FoldoutState[i]; - else - newFoldoutstate[j] = m_FoldoutState[i + 1]; - } - - m_FoldoutState = newFoldoutstate; - EditorGUILayout.EndHorizontal(); - } - break; - } - } - - EditorGUILayout.EndHorizontal(); - - if (m_FoldoutState[i]) - { - m_AddressableAssetGroupTarget.SchemaObjects[i].OnGUI(); - } - } - - EditorGUILayout.LabelField("", UnityEngine.GUI.skin.horizontalSlider); - EditorGUILayout.BeginHorizontal(); - GUILayout.FlexibleSpace(); - - if (EditorGUILayout.DropdownButton(new GUIContent("Add Schema", "Add new schema to this group."), FocusType.Keyboard)) - { - var menu = new GenericMenu(); - for (int i = 0; i < m_SchemaTypes.Count; i++) - { - var type = m_SchemaTypes[i]; - menu.AddItem(new GUIContent(type.Name, ""), false, OnAddSchema, type); - } - - menu.ShowAsContext(); - } - - EditorGUILayout.EndHorizontal(); - - serializedObject.ApplyModifiedProperties(); - } - catch (UnityEngine.ExitGUIException ) - { - throw; - } - catch (Exception e) - { - Debug.LogException(e); - } - } - - void OnAddSchema(object context) - { - if( !m_AddressableAssetGroupTarget.AddSchema( context as Type ) ) - return; - - var newFoldoutState = new bool[m_AddressableAssetGroupTarget.SchemaObjects.Count]; - for (int i = 0; i < m_FoldoutState.Length; i++) - newFoldoutState[i] = m_FoldoutState[i]; - m_FoldoutState = newFoldoutState; - m_FoldoutState[m_FoldoutState.Length - 1] = true; - } - - } - -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetGroupTemplateInspector.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetGroupTemplateInspector.cs.meta deleted file mode 100644 index 223062a1..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetGroupTemplateInspector.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2b2e14ba7b808458585452ae88c62b95 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetSettingsInspector.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetSettingsInspector.cs deleted file mode 100644 index 887b2e1b..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetSettingsInspector.cs +++ /dev/null @@ -1,460 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.AddressableAssets.Build; -using UnityEditor.AddressableAssets.Settings; -using UnityEditorInternal; -using UnityEngine; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets.GUI -{ - [CustomEditor(typeof(AddressableAssetSettings))] - class AddressableAssetSettingsInspector : Editor - { - AddressableAssetSettings m_AasTarget; - - [FormerlySerializedAs("m_generalFoldout")] - [SerializeField] - bool m_GeneralFoldout = true; - [FormerlySerializedAs("m_groupFoldout")] - [SerializeField] - bool m_GroupFoldout = true; - [FormerlySerializedAs("m_profilesFoldout")] - [SerializeField] - bool m_ProfilesFoldout = true; - [FormerlySerializedAs("m_labelsFoldout")] - [SerializeField] - bool m_LabelsFoldout = true; - [FormerlySerializedAs("m_dataBuildersFoldout")] - [SerializeField] - bool m_DataBuildersFoldout = true; - [SerializeField] - bool m_GroupTemplateObjectsFoldout = true; - [FormerlySerializedAs("m_initObjectsFoldout")] - [SerializeField] - bool m_InitObjectsFoldout = true; - - [FormerlySerializedAs("m_profileEntriesRL")] - [SerializeField] - ReorderableList m_ProfileEntriesRl; - [FormerlySerializedAs("m_labelNamesRL")] - [SerializeField] - ReorderableList m_LabelNamesRl; - [FormerlySerializedAs("m_dataBuildersRL")] - [SerializeField] - ReorderableList m_DataBuildersRl; - [SerializeField] - ReorderableList m_GroupTemplateObjectsRl; - [FormerlySerializedAs("m_initObjectsRL")] - [SerializeField] - ReorderableList m_InitObjectsRl; - - [FormerlySerializedAs("m_currentProfileIndex")] - [SerializeField] - int m_CurrentProfileIndex = -1; - - void OnEnable() - { - m_AasTarget = target as AddressableAssetSettings; - if (m_AasTarget == null) - return; - - var names = m_AasTarget.profileSettings.profileEntryNames; - m_ProfileEntriesRl = new ReorderableList(names, typeof(AddressableAssetProfileSettings.ProfileIdData), true, true, true, true); - m_ProfileEntriesRl.drawElementCallback = DrawProfileEntriesCallback; - m_ProfileEntriesRl.drawHeaderCallback = DrawProfileEntriesHeader; - m_ProfileEntriesRl.onAddCallback = OnAddProfileEntry; - m_ProfileEntriesRl.onRemoveCallback = OnRemoveProfileEntry; - - var labels = m_AasTarget.labelTable.labelNames; - m_LabelNamesRl = new ReorderableList(labels, typeof(string), true, true, true, true); - m_LabelNamesRl.drawElementCallback = DrawLabelNamesCallback; - m_LabelNamesRl.drawHeaderCallback = DrawLabelNamesHeader; - m_LabelNamesRl.onAddDropdownCallback = OnAddLabel; - m_LabelNamesRl.onRemoveCallback = OnRemoveLabel; - - m_DataBuildersRl = new ReorderableList(m_AasTarget.DataBuilders, typeof(ScriptableObject), true, true, true, true); - m_DataBuildersRl.drawElementCallback = DrawDataBuilderCallback; - m_DataBuildersRl.drawHeaderCallback = DrawDataBuilderHeader; - m_DataBuildersRl.onAddDropdownCallback = OnAddDataBuilder; - m_DataBuildersRl.onRemoveCallback = OnRemoveDataBuilder; - - m_GroupTemplateObjectsRl = new ReorderableList(m_AasTarget.GroupTemplateObjects, typeof(ScriptableObject), true, true, true, true); - m_GroupTemplateObjectsRl.drawElementCallback = DrawGroupTemplateObjectCallback; - m_GroupTemplateObjectsRl.drawHeaderCallback = DrawGroupTemplateObjectHeader; - m_GroupTemplateObjectsRl.onAddDropdownCallback = OnAddGroupTemplateObject; - m_GroupTemplateObjectsRl.onRemoveCallback = OnRemoveGroupTemplateObject; - - m_InitObjectsRl = new ReorderableList(m_AasTarget.InitializationObjects, typeof(ScriptableObject), true, true, true, true); - m_InitObjectsRl.drawElementCallback = DrawInitializationObjectCallback; - m_InitObjectsRl.drawHeaderCallback = DrawInitializationObjectHeader; - m_InitObjectsRl.onAddDropdownCallback = OnAddInitializationObject; - m_InitObjectsRl.onRemoveCallback = OnRemoveInitializationObject; - } - - GUIContent m_SendProfilerEvents = - new GUIContent("Send Profiler Events", - "Turning this on enables the use of the Addressables Profiler window."); - GUIContent m_LogRuntimeExceptions = - new GUIContent("Log Runtime Exceptions", - "Addressables does not throw exceptions at run time when there are loading issues, instead it adds to the error state of the IAsyncOperation. With this flag enabled, exceptions will also be logged."); - GUIContent m_OverridePlayerVersion = - new GUIContent("Player Version Override", "If set, this will be used as the player version instead of one based off of a time stamp."); - GUIContent m_BuildRemoteCatalog = - new GUIContent("Build Remote Catalog", "If set, this will create a copy of the content catalog for storage on a remote server. This catalog can be overwritten later for content updates."); - GUIContent m_RemoteCatBuildPath = - new GUIContent("Remote Catalog Build Path", "The path for a remote content catalog."); - GUIContent m_RemoteCatLoadPath = - new GUIContent("Remote Catalog Load Path", "The path to load a remote content catalog."); - GUIContent m_CertificateHandlerType = - new GUIContent("Custom certificate handler", "The class to use for custom certificate handling. This type must inherit from UnityEngine.Networking.CertificateHandler."); - - public override void OnInspectorGUI() - { - serializedObject.Update(); - - m_GeneralFoldout = EditorGUILayout.Foldout(m_GeneralFoldout, "General"); - if (m_GeneralFoldout) - { - ProjectConfigData.postProfilerEvents = EditorGUILayout.Toggle(m_SendProfilerEvents, ProjectConfigData.postProfilerEvents); - m_AasTarget.buildSettings.LogResourceManagerExceptions = EditorGUILayout.Toggle(m_LogRuntimeExceptions, m_AasTarget.buildSettings.LogResourceManagerExceptions); - m_AasTarget.OverridePlayerVersion = EditorGUILayout.TextField(m_OverridePlayerVersion, m_AasTarget.OverridePlayerVersion); - EditorGUILayout.PropertyField(serializedObject.FindProperty("m_CertificateHandlerType"), m_CertificateHandlerType); - - m_AasTarget.BuildRemoteCatalog = EditorGUILayout.Toggle(m_BuildRemoteCatalog, m_AasTarget.BuildRemoteCatalog); - if ( (m_AasTarget.RemoteCatalogBuildPath != null && m_AasTarget.RemoteCatalogLoadPath != null) // these will never actually be null, as the accessor initializes them. - && (m_AasTarget.BuildRemoteCatalog)) - { - EditorGUILayout.PropertyField(serializedObject.FindProperty("m_RemoteCatalogBuildPath"), m_RemoteCatBuildPath); - EditorGUILayout.PropertyField(serializedObject.FindProperty("m_RemoteCatalogLoadPath"), m_RemoteCatLoadPath); - } - - } - GUILayout.Space(6); - m_GroupFoldout = EditorGUILayout.Foldout(m_GroupFoldout, "Groups"); - if (m_GroupFoldout) - { - EditorGUILayout.HelpBox("Group data is modified on the group asset, and the groups list is altered from the Addressables window. The list below is presented for ease of finding group assets, not for direct editing.", MessageType.None); - using (new EditorGUI.DisabledScope(true)) - { - EditorGUI.indentLevel++; - for (int i = 0; i < m_AasTarget.groups.Count; i++) - { - var newObject = EditorGUILayout.ObjectField(m_AasTarget.groups[i], typeof(AddressableAssetGroup), false); - if (newObject != m_AasTarget.groups[i] && newObject is AddressableAssetGroup) - { - m_AasTarget.groups[i] = newObject as AddressableAssetGroup; - } - } - EditorGUI.indentLevel--; - } - } - - GUILayout.Space(6); - m_ProfilesFoldout = EditorGUILayout.Foldout(m_ProfilesFoldout, "Profiles"); - if (m_ProfilesFoldout) - { - if (m_AasTarget.profileSettings.profiles.Count > 0) - { - if (m_CurrentProfileIndex < 0 || m_CurrentProfileIndex >= m_AasTarget.profileSettings.profiles.Count) - m_CurrentProfileIndex = 0; - var profileNames = m_AasTarget.profileSettings.GetAllProfileNames(); - m_CurrentProfileIndex = EditorGUILayout.Popup("Profile To Edit", m_CurrentProfileIndex, profileNames.ToArray()); - - EditorGUI.indentLevel++; - bool doAdd; - bool doRemove; - bool cannotEdit = m_CurrentProfileIndex==0;// profileNames[m_CurrentProfileIndex] == AddressableAssetProfileSettings.k_RootProfileName; - using (new EditorGUI.DisabledScope(cannotEdit)) - { - var newName = EditorGUILayout.DelayedTextField("Profile Name", profileNames[m_CurrentProfileIndex]); - if (newName != profileNames[m_CurrentProfileIndex]) - { - if (!profileNames.Contains(newName)) - { - var profile = m_AasTarget.profileSettings.profiles[m_CurrentProfileIndex]; - profile.profileName = newName; - m_AasTarget.SetDirty(AddressableAssetSettings.ModificationEvent.ProfileModified, profile.id, true, true); - } - } - } - EditorGUILayout.BeginHorizontal(); - GUILayout.FlexibleSpace(); - doAdd = GUILayout.Button("+"); - using (new EditorGUI.DisabledScope(cannotEdit)) - { - - doRemove = GUILayout.Button("-"); - - } - EditorGUILayout.EndHorizontal(); - - EditorGUI.indentLevel--; - var rect = GUILayoutUtility.GetRect(0, m_ProfileEntriesRl.GetHeight()); - rect.width -= 20; - rect.x += 20; - m_ProfileEntriesRl.DoList(rect); - - if (doAdd) - { - var uniqueProfileName = m_AasTarget.profileSettings.GetUniqueProfileName("New Profile"); - if (!string.IsNullOrEmpty(uniqueProfileName)) - m_AasTarget.profileSettings.AddProfile(uniqueProfileName, string.Empty); - m_CurrentProfileIndex = m_AasTarget.profileSettings.profiles.Count - 1; - } - else if (doRemove) - { - var prof = m_AasTarget.profileSettings.profiles[m_CurrentProfileIndex]; - if (prof != null) - { - m_AasTarget.profileSettings.RemoveProfile(prof.id); - } - } - } - else - { - EditorGUILayout.LabelField("No valid profiles found"); - } - - } - GUILayout.Space(6); - m_LabelsFoldout = EditorGUILayout.Foldout(m_LabelsFoldout, "Labels"); - if (m_LabelsFoldout) - m_LabelNamesRl.DoLayoutList(); - - GUILayout.Space(6); - m_DataBuildersFoldout = EditorGUILayout.Foldout(m_DataBuildersFoldout, "Data Builders"); - if (m_DataBuildersFoldout) - m_DataBuildersRl.DoLayoutList(); - - GUILayout.Space(6); - m_GroupTemplateObjectsFoldout = EditorGUILayout.Foldout(m_GroupTemplateObjectsFoldout, "Assets Group Templates"); - if (m_GroupTemplateObjectsFoldout) - m_GroupTemplateObjectsRl.DoLayoutList(); - - GUILayout.Space(6); - m_InitObjectsFoldout = EditorGUILayout.Foldout(m_InitObjectsFoldout, "Initialization Objects"); - if (m_InitObjectsFoldout) - m_InitObjectsRl.DoLayoutList(); - - - serializedObject.ApplyModifiedProperties(); - } - - void DrawProfileEntriesHeader(Rect rect) - { - EditorGUI.LabelField(rect, "Profile Entries"); - } - - void DrawProfileEntriesCallback(Rect rect, int index, bool isActive, bool isFocused) - { - float halfW = rect.width * 0.4f; - var currentEntry = m_AasTarget.profileSettings.profileEntryNames[index]; - var newName = EditorGUI.DelayedTextField(new Rect(rect.x, rect.y, halfW, rect.height), currentEntry.ProfileName); - if (newName != currentEntry.ProfileName) - currentEntry.SetName(newName, m_AasTarget.profileSettings); - - var currProfile = m_AasTarget.profileSettings.profiles[m_CurrentProfileIndex]; - var oldValue = m_AasTarget.profileSettings.GetValueById(currProfile.id, currentEntry.Id); - var newValue = EditorGUI.TextField(new Rect(rect.x + halfW, rect.y, rect.width - halfW, rect.height), oldValue); - if (oldValue != newValue) - { - m_AasTarget.profileSettings.SetValue(currProfile.id, currentEntry.ProfileName, newValue); - } - } - - void OnAddProfileEntry(ReorderableList list) - { - var uniqueProfileEntryName = m_AasTarget.profileSettings.GetUniqueProfileEntryName("New Entry"); - if (!string.IsNullOrEmpty(uniqueProfileEntryName)) - m_AasTarget.profileSettings.CreateValue(uniqueProfileEntryName, ""); - } - - void OnRemoveProfileEntry(ReorderableList list) - { - if (list.index >= 0 && list.index < m_AasTarget.profileSettings.profileEntryNames.Count) - { - var entry = m_AasTarget.profileSettings.profileEntryNames[list.index]; - if (entry != null) - m_AasTarget.profileSettings.RemoveValue(entry.Id); - } - } - - void DrawLabelNamesHeader(Rect rect) - { - EditorGUI.LabelField(rect, "Labels"); - } - - void DrawLabelNamesCallback(Rect rect, int index, bool isActive, bool isFocused) - { - var oldName = m_AasTarget.labelTable.labelNames[index]; - EditorGUI.LabelField(rect, oldName); - - } - - void OnRemoveLabel(ReorderableList list) - { - m_AasTarget.RemoveLabel(m_AasTarget.labelTable.labelNames[list.index]); - } - - void OnAddLabel(Rect buttonRect, ReorderableList list) - { - buttonRect.x -= 400; - buttonRect.y -= 13; - - PopupWindow.Show(buttonRect, new LabelNamePopup(m_LabelNamesRl.elementHeight, m_AasTarget)); - } - - class LabelNamePopup : PopupWindowContent - { - internal float rowHeight; - internal string name; - internal bool needsFocus = true; - internal AddressableAssetSettings settings; - - public LabelNamePopup(float rowHeight, AddressableAssetSettings settings) - { - this.rowHeight = rowHeight; - this.settings = settings; - name = this.settings.labelTable.GetUniqueLabelName("New Label"); - } - - public override Vector2 GetWindowSize() - { - return new Vector2(400, rowHeight * 3); - } - - public override void OnGUI(Rect windowRect) - { - GUILayout.Space(5); - Event evt = Event.current; - bool hitEnter = evt.type == EventType.KeyDown && (evt.keyCode == KeyCode.Return || evt.keyCode == KeyCode.KeypadEnter); - UnityEngine.GUI.SetNextControlName("LabelName"); - name = EditorGUILayout.TextField("New Tag EventName", name); - if (needsFocus) - { - needsFocus = false; - EditorGUI.FocusTextInControl("LabelName"); - } - - UnityEngine.GUI.enabled = name.Length != 0; - if (GUILayout.Button("Save") || hitEnter) - { - if (string.IsNullOrEmpty(name)) - Debug.LogError("Cannot add empty label to Addressables label list"); - else if (name != settings.labelTable.GetUniqueLabelName(name)) - Debug.LogError("Label name '" + name + "' is already in the labels list."); - else - settings.AddLabel(name); - - editorWindow.Close(); - } - } - } - - void DrawDataBuilderHeader(Rect rect) - { - EditorGUI.LabelField(rect, "Data Builders"); - } - - void DrawDataBuilderCallback(Rect rect, int index, bool isActive, bool isFocused) - { - var so = m_AasTarget.DataBuilders[index]; - var builder = so as IDataBuilder; - var label = builder == null ? "" : builder.Name; - var nb = EditorGUI.ObjectField(rect, label, so, typeof(ScriptableObject), false) as ScriptableObject; - if (nb != so) - m_AasTarget.SetDataBuilderAtIndex(index, nb as IDataBuilder); - } - - void OnRemoveDataBuilder(ReorderableList list) - { - m_AasTarget.RemoveDataBuilder(list.index); - } - - void OnAddDataBuilder(Rect buttonRect, ReorderableList list) - { - var assetPath = EditorUtility.OpenFilePanelWithFilters("Data Builder", "Assets", new[] {"Data Builder", "asset" }); - if (string.IsNullOrEmpty(assetPath)) - return; - var builder = AssetDatabase.LoadAssetAtPath(assetPath.Substring(assetPath.IndexOf("Assets/"))); - if (!typeof(IDataBuilder).IsAssignableFrom(builder.GetType())) - { - Debug.LogWarningFormat("Asset at {0} does not implement the IDataBuilder interface.", assetPath); - return; - } - m_AasTarget.AddDataBuilder(builder as IDataBuilder); - } - - void DrawGroupTemplateObjectHeader(Rect rect) - { - EditorGUI.LabelField(rect, "Assets Group Templates"); - } - - void DrawGroupTemplateObjectCallback(Rect rect, int index, bool isActive, bool isFocused) - { - var so = m_AasTarget.GroupTemplateObjects[index]; - var groupTObj = so as IGroupTemplate; - var label = groupTObj == null ? "" : groupTObj.Name; - var nb = EditorGUI.ObjectField(rect, label, so, typeof(ScriptableObject), false) as ScriptableObject; - if (nb != so) - m_AasTarget.SetGroupTemplateObjectAtIndex(index, nb as IGroupTemplate); - } - - void OnRemoveGroupTemplateObject(ReorderableList list) - { - m_AasTarget.RemoveGroupTemplateObject(list.index); - } - - void OnAddGroupTemplateObject(Rect buttonRect, ReorderableList list) - { - var assetPath = EditorUtility.OpenFilePanelWithFilters("Assets Group Templates", "Assets", new[] { "Group Template Object", "asset" }); - if (string.IsNullOrEmpty(assetPath)) - return; - var templateObj = AssetDatabase.LoadAssetAtPath(assetPath.Substring(assetPath.IndexOf("Assets/"))); - if (!typeof(IGroupTemplate).IsAssignableFrom(templateObj.GetType())) - { - Debug.LogWarningFormat("Asset at {0} does not implement the IGroupTemplate interface.", assetPath); - return; - } - m_AasTarget.AddGroupTemplateObject(templateObj as IGroupTemplate); - } - - void DrawInitializationObjectHeader(Rect rect) - { - EditorGUI.LabelField(rect, "Initialization Objects"); - } - - void DrawInitializationObjectCallback(Rect rect, int index, bool isActive, bool isFocused) - { - var so = m_AasTarget.InitializationObjects[index]; - var initObj = so as IObjectInitializationDataProvider; - var label = initObj == null ? "" : initObj.Name; - var nb = EditorGUI.ObjectField(rect, label, so, typeof(ScriptableObject), false) as ScriptableObject; - if (nb != so) - m_AasTarget.SetInitializationObjectAtIndex(index, nb as IObjectInitializationDataProvider); - } - - void OnRemoveInitializationObject(ReorderableList list) - { - m_AasTarget.RemoveInitializationObject(list.index); - } - - void OnAddInitializationObject(Rect buttonRect, ReorderableList list) - { - var assetPath = EditorUtility.OpenFilePanelWithFilters("Initialization Object", "Assets", new[] { "Initialization Object", "asset" }); - if (string.IsNullOrEmpty(assetPath)) - return; - var initObj = AssetDatabase.LoadAssetAtPath(assetPath.Substring(assetPath.IndexOf("Assets/"))); - if (!typeof(IObjectInitializationDataProvider).IsAssignableFrom(initObj.GetType())) - { - Debug.LogWarningFormat("Asset at {0} does not implement the IObjectInitializationDataProvider interface.", assetPath); - return; - } - m_AasTarget.AddInitializationObject(initObj as IObjectInitializationDataProvider); - } - - } - -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetSettingsInspector.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetSettingsInspector.cs.meta deleted file mode 100644 index af8a6bf8..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetSettingsInspector.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3b68615e65d03ce49becfd9eb02f7fa2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs deleted file mode 100644 index a11871c8..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs +++ /dev/null @@ -1,391 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using UnityEditor.AddressableAssets; -using UnityEditor.AddressableAssets.Build; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.Build.Pipeline.Utilities; -using UnityEditor.IMGUI.Controls; -using UnityEngine; -using UnityEngine.AddressableAssets; -using UnityEngine.Serialization; - -// ReSharper disable DelegateSubtraction - -namespace UnityEditor.AddressableAssets.GUI -{ - [Serializable] - class AddressableAssetsSettingsGroupEditor - { - [FormerlySerializedAs("treeState")] - [SerializeField] - TreeViewState m_TreeState; - [FormerlySerializedAs("mchs")] - [SerializeField] - MultiColumnHeaderState m_Mchs; - AddressableAssetEntryTreeView m_EntryTree; - - public AddressableAssetsWindow window; - - SearchField m_SearchField; - const int k_SearchHeight = 20; - internal AddressableAssetSettings settings { get { return AddressableAssetSettingsDefaultObject.Settings; } } - - bool m_ResizingVerticalSplitter; - Rect m_VerticalSplitterRect = new Rect(0, 0, 10, k_SplitterWidth); - [SerializeField] - float m_VerticalSplitterPercent; - const int k_SplitterWidth = 3; - - public AddressableAssetsSettingsGroupEditor(AddressableAssetsWindow w) - { - window = w; - m_VerticalSplitterPercent = 0.8f; - OnEnable(); - } - - void OnSettingsModification(AddressableAssetSettings s, AddressableAssetSettings.ModificationEvent e, object o) - { - if (m_EntryTree == null) - return; - - switch (e) - { - case AddressableAssetSettings.ModificationEvent.GroupAdded: - case AddressableAssetSettings.ModificationEvent.GroupRemoved: - case AddressableAssetSettings.ModificationEvent.EntryAdded: - case AddressableAssetSettings.ModificationEvent.EntryMoved: - case AddressableAssetSettings.ModificationEvent.EntryRemoved: - case AddressableAssetSettings.ModificationEvent.GroupRenamed: - case AddressableAssetSettings.ModificationEvent.EntryModified: - case AddressableAssetSettings.ModificationEvent.BatchModification: - m_EntryTree.Reload(); - if (window != null) - window.Repaint(); - break; - } - } - - GUIStyle GetStyle(string styleName) - { - GUIStyle s = UnityEngine.GUI.skin.FindStyle(styleName); - if (s == null) - s = EditorGUIUtility.GetBuiltinSkin(EditorSkin.Inspector).FindStyle(styleName); - if (s == null) - { - Addressables.LogError("Missing built-in guistyle " + styleName); - s = new GUIStyle(); - } - return s; - } - - [NonSerialized] - List m_SearchStyles; - [NonSerialized] - GUIStyle m_ButtonStyle; - [NonSerialized] - Texture2D m_CogIcon; - - void TopToolbar(Rect toolbarPos) - { - if (m_SearchStyles == null) - { - m_SearchStyles = new List(); - m_SearchStyles.Add(GetStyle("ToolbarSeachTextFieldPopup")); //GetStyle("ToolbarSeachTextField"); - m_SearchStyles.Add(GetStyle("ToolbarSeachCancelButton")); - m_SearchStyles.Add(GetStyle("ToolbarSeachCancelButtonEmpty")); - } - if (m_ButtonStyle == null) - m_ButtonStyle = GetStyle("ToolbarButton"); - if (m_CogIcon == null) - m_CogIcon = EditorGUIUtility.FindTexture("_Popup"); - - - GUILayout.BeginArea(new Rect(0, 0, toolbarPos.width, k_SearchHeight)); - - GUILayout.BeginHorizontal(EditorStyles.toolbar); - { - float spaceBetween = 4f; - - CreateDropdown(); - GUILayout.Space(8); - - if (GUILayout.Button("Hosting", m_ButtonStyle)) - EditorWindow.GetWindow().Show(settings); - - { - GUILayout.Space(8); - var guiMode = new GUIContent("Play Mode Script"); - Rect rMode = GUILayoutUtility.GetRect(guiMode, EditorStyles.toolbarDropDown); - if (EditorGUI.DropdownButton(rMode, guiMode, FocusType.Passive, EditorStyles.toolbarDropDown)) - { - var menu = new GenericMenu(); - for (int i = 0; i < settings.DataBuilders.Count; i++) - { - var m = settings.GetDataBuilder(i); - if (m.CanBuildData()) - menu.AddItem(new GUIContent(m.Name), i == settings.ActivePlayModeDataBuilderIndex, OnSetActivePlayModeScript, i); - } - menu.DropDown(rMode); - } - } - { - GUILayout.Space(8); - var guiMode = new GUIContent("Build Script"); - Rect rMode = GUILayoutUtility.GetRect(guiMode, EditorStyles.toolbarDropDown); - if (EditorGUI.DropdownButton(rMode, guiMode, FocusType.Passive, EditorStyles.toolbarDropDown)) - { - var menu = new GenericMenu(); - for (int i = 0; i < settings.DataBuilders.Count; i++) - { - var m = settings.GetDataBuilder(i); - if(m.CanBuildData()) - menu.AddItem(new GUIContent(m.Name), i == settings.ActivePlayerDataBuilderIndex, OnSetActiveBuildScript, i); - } - menu.DropDown(rMode); - } - } - - - if (GUILayout.Button("Analyze", m_ButtonStyle)) - AnalyzeWindow.ShowWindow(); - - var guiBuild = new GUIContent("Build"); - Rect rBuild = GUILayoutUtility.GetRect(guiBuild, EditorStyles.toolbarDropDown); - if (EditorGUI.DropdownButton(rBuild, guiBuild, FocusType.Passive, EditorStyles.toolbarDropDown)) - { - //GUIUtility.hotControl = 0; - var menu = new GenericMenu(); - menu.AddItem(new GUIContent("Build Player Content"), false, OnBuildPlayerData); - menu.AddItem(new GUIContent("Clean/All"), false, OnCleanAll); - menu.AddItem(new GUIContent("Clean/Data Builders/All"), false, OnCleanAddressables, null); - for (int i = 0; i < settings.DataBuilders.Count; i++) - { - var m = settings.GetDataBuilder(i); - menu.AddItem(new GUIContent("Clean/Data Builders/" + m.Name), false, OnCleanAddressables, m); - } - menu.AddItem(new GUIContent("Clean/Build Pipeline Cache"), false, OnCleanSBP); - menu.AddItem(new GUIContent("Prepare For Content Update"), false, OnPrepareUpdate); - menu.AddItem(new GUIContent("Build For Content Update"), false, OnUpdateBuild); - menu.DropDown(rBuild); - } - - - GUILayout.FlexibleSpace(); - - GUILayout.Space(spaceBetween * 2f); - - Rect searchRect = GUILayoutUtility.GetRect(0, toolbarPos.width * 0.6f, 16f, 16f, m_SearchStyles[0], GUILayout.MinWidth(65), GUILayout.MaxWidth(300)); - Rect popupPosition = searchRect; - popupPosition.width = 20; - - if (Event.current.type == EventType.MouseDown && popupPosition.Contains(Event.current.mousePosition)) - { - var menu = new GenericMenu(); - menu.AddItem(new GUIContent("Hierarchical Search"), ProjectConfigData.hierarchicalSearch, OnHierSearchClick); - menu.DropDown(popupPosition); - } - else - { - var baseSearch = ProjectConfigData.hierarchicalSearch ? m_EntryTree.customSearchString : m_EntryTree.searchString; - var searchString = m_SearchField.OnGUI(searchRect, baseSearch, m_SearchStyles[0], m_SearchStyles[1], m_SearchStyles[2]); - if (baseSearch != searchString) - { - if (ProjectConfigData.hierarchicalSearch) - { - m_EntryTree.customSearchString = searchString; - Reload(); - } - else - { - m_EntryTree.searchString = searchString; - } - } - } - } - GUILayout.EndHorizontal(); - GUILayout.EndArea(); - } - - void OnCleanAll() - { - OnCleanAddressables(null); - OnCleanSBP(); - } - - void OnCleanAddressables(object builder) - { - AddressableAssetSettings.CleanPlayerContent(builder as IDataBuilder); - } - - void OnCleanSBP() - { - BuildCache.PurgeCache(true); - } - - void OnPrepareUpdate() - { - var path = ContentUpdateScript.GetContentStateDataPath(true); - if (string.IsNullOrEmpty(path)) - Debug.LogWarning("No path specified for Content State Data file."); - else if (!File.Exists(path)) - Debug.LogWarningFormat("No Content State Data file exists at path: {0}"); - else - ContentUpdatePreviewWindow.PrepareForContentUpdate(AddressableAssetSettingsDefaultObject.Settings, path); - } - - void OnBuildPlayerData() - { - AddressableAssetSettings.BuildPlayerContent(); - } - - void OnUpdateBuild() - { - var path = ContentUpdateScript.GetContentStateDataPath(true); - if(!string.IsNullOrEmpty(path)) - ContentUpdateScript.BuildContentUpdate(AddressableAssetSettingsDefaultObject.Settings, path); - } - - void OnSetActiveBuildScript(object context) - { - AddressableAssetSettingsDefaultObject.Settings.ActivePlayerDataBuilderIndex = (int)context; - } - void OnSetActivePlayModeScript(object context) - { - AddressableAssetSettingsDefaultObject.Settings.ActivePlayModeDataBuilderIndex = (int)context; - } - - void OnHierSearchClick() - { - ProjectConfigData.hierarchicalSearch = !ProjectConfigData.hierarchicalSearch; - m_EntryTree.ClearSearch(); - } - void CreateDropdown() - { - var activeProfileName = settings.profileSettings.GetProfileName(settings.activeProfileId); - if (string.IsNullOrEmpty(activeProfileName)) - { - settings.activeProfileId = null; //this will reset it to default. - activeProfileName = settings.profileSettings.GetProfileName(settings.activeProfileId); - } - var profileButton = new GUIContent("Profile: " + activeProfileName); - - Rect r = GUILayoutUtility.GetRect(profileButton, m_ButtonStyle, GUILayout.Width(115f)); - if (EditorGUI.DropdownButton(r, profileButton, FocusType.Passive, EditorStyles.toolbarDropDown)) - { - //GUIUtility.hotControl = 0; - var menu = new GenericMenu(); - - var nameList = settings.profileSettings.GetAllProfileNames(); - - foreach (var name in nameList) - { - menu.AddItem(new GUIContent(name), name == activeProfileName, SetActiveProfile, name); - } - menu.AddSeparator(string.Empty); - menu.AddItem(new GUIContent("Inspect Profile Settings"), false, GoToSettingsAsset); - menu.DropDown(r); - } - } - - void SetActiveProfile(object context) - { - var n = context as string; - AddressableAssetSettingsDefaultObject.Settings.activeProfileId = AddressableAssetSettingsDefaultObject.Settings.profileSettings.GetProfileId(n); - } - - void GoToSettingsAsset() - { - EditorGUIUtility.PingObject(AddressableAssetSettingsDefaultObject.Settings); - Selection.activeObject = AddressableAssetSettingsDefaultObject.Settings; - } - - bool m_ModificationRegistered; - public void OnEnable() - { - if (AddressableAssetSettingsDefaultObject.Settings == null) - return; - AddressableAssetSettingsDefaultObject.Settings.OnModification += OnSettingsModification; - m_ModificationRegistered = true; - } - - public void OnDisable() - { - if (AddressableAssetSettingsDefaultObject.Settings == null) - return; - AddressableAssetSettingsDefaultObject.Settings.OnModification -= OnSettingsModification; - m_ModificationRegistered = false; - } - - public bool OnGUI(Rect pos) - { - if (settings == null) - return false; - - if (!m_ModificationRegistered) - { - m_ModificationRegistered = true; - settings.OnModification -= OnSettingsModification; //just in case... - settings.OnModification += OnSettingsModification; - } - - - - if (m_EntryTree == null) - { - if (m_TreeState == null) - m_TreeState = new TreeViewState(); - - var headerState = AddressableAssetEntryTreeView.CreateDefaultMultiColumnHeaderState(); - if (MultiColumnHeaderState.CanOverwriteSerializedFields(m_Mchs, headerState)) - MultiColumnHeaderState.OverwriteSerializedFields(m_Mchs, headerState); - m_Mchs = headerState; - - m_SearchField = new SearchField(); - m_EntryTree = new AddressableAssetEntryTreeView(m_TreeState, m_Mchs, this); - m_EntryTree.Reload(); - } - - HandleVerticalResize(pos); - var inRectY = pos.height; - var searchRect = new Rect(pos.xMin, pos.yMin, pos.width, k_SearchHeight); - var treeRect = new Rect(pos.xMin, pos.yMin + k_SearchHeight, pos.width, inRectY - k_SearchHeight); - - TopToolbar(searchRect); - m_EntryTree.OnGUI(treeRect); - return m_ResizingVerticalSplitter; - } - - public void Reload() - { - if (m_EntryTree != null) - m_EntryTree.Reload(); - } - - void HandleVerticalResize(Rect position) - { - m_VerticalSplitterRect.y = (int)(position.yMin + position.height * m_VerticalSplitterPercent); - m_VerticalSplitterRect.width = position.width; - m_VerticalSplitterRect.height = k_SplitterWidth; - - - EditorGUIUtility.AddCursorRect(m_VerticalSplitterRect, MouseCursor.ResizeVertical); - if (Event.current.type == EventType.MouseDown && m_VerticalSplitterRect.Contains(Event.current.mousePosition)) - m_ResizingVerticalSplitter = true; - - if (m_ResizingVerticalSplitter) - { - var mousePosInRect = Event.current.mousePosition.y - position.yMin; - m_VerticalSplitterPercent = Mathf.Clamp(mousePosInRect / position.height, 0.20f, 0.90f); - m_VerticalSplitterRect.y = (int)(position.height * m_VerticalSplitterPercent + position.yMin); - - if (Event.current.type == EventType.MouseUp) - { - m_ResizingVerticalSplitter = false; - } - } - else - m_VerticalSplitterPercent = Mathf.Clamp(m_VerticalSplitterPercent, 0.20f, 0.90f); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs.meta deleted file mode 100644 index 96af2989..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetsSettingsGroupEditor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c8e7a7789891dd440b809c2cfab69ccc -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetsSettingsGroupTreeView.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetsSettingsGroupTreeView.cs deleted file mode 100644 index b079aa5f..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetsSettingsGroupTreeView.cs +++ /dev/null @@ -1,1244 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.IMGUI.Controls; -using UnityEngine; -using UnityEngine.Assertions; -using UnityEngine.AddressableAssets; - -namespace UnityEditor.AddressableAssets.GUI -{ - using Object = UnityEngine.Object; - - class AddressableAssetEntryTreeView : TreeView - { - AddressableAssetsSettingsGroupEditor m_Editor; - internal string customSearchString = string.Empty; - - enum ColumnId - { - Id, - Type, - Path, - Labels - } - ColumnId[] m_SortOptions = - { - ColumnId.Id, - ColumnId.Type, - ColumnId.Path, - ColumnId.Labels - }; - public AddressableAssetEntryTreeView(TreeViewState state, MultiColumnHeaderState mchs, AddressableAssetsSettingsGroupEditor ed) : base(state, new MultiColumnHeader(mchs)) - { - showBorder = true; - m_Editor = ed; - columnIndexForTreeFoldouts = 0; - multiColumnHeader.sortingChanged += OnSortingChanged; - - BuiltinSceneCache.sceneListChanged += OnScenesChanged; - } - - void OnScenesChanged() - { - Reload(); - } - - void OnSortingChanged(MultiColumnHeader mch) - { - SortChildren(rootItem); - Reload(); - } - protected override void SelectionChanged(IList selectedIds) - { - base.SelectionChanged(selectedIds); - - if (selectedIds.Count == 1) - { - var item = FindItemInVisibleRows(selectedIds[0]); - if (item != null && item.group != null) - { - Selection.activeObject = item.group; - } - } - - } - - protected override TreeViewItem BuildRoot() - { - var root = new TreeViewItem(-1, -1); - foreach (var group in m_Editor.settings.groups) - AddGroupChildrenBuild(group, root); - - return root; - } - - protected override IList BuildRows(TreeViewItem root) - { - SortChildren(root); - var rows = base.BuildRows(root); - if (!string.IsNullOrEmpty(customSearchString)) - { - var z = rows.Where(s => DoesItemMatchSearch(s, customSearchString)).ToList(); - return z; - } - return rows; - } - - internal void ClearSearch() - { - customSearchString = string.Empty; - searchString = string.Empty; - } - - void SortChildren(TreeViewItem root) - { - if (!root.hasChildren) - return; - foreach (var child in root.children) - { - if (child != null) - SortHierarchical(child.children); - } - } - - void SortHierarchical(List children) - { - if (children == null) - return; - - var sortedColumns = multiColumnHeader.state.sortedColumns; - if (sortedColumns.Length == 0) - return; - - List kids = new List(); - foreach (var c in children) - { - var child = c as AssetEntryTreeViewItem; - if (child != null && child.entry != null) - kids.Add(child); - } - - ColumnId col = m_SortOptions[sortedColumns[0]]; - bool ascending = multiColumnHeader.IsSortedAscending(sortedColumns[0]); - - IEnumerable orderedKids = kids; - switch (col) - { - case ColumnId.Type: - break; - case ColumnId.Path: - orderedKids = kids.Order(l => l.entry.AssetPath, ascending); - break; - case ColumnId.Labels: - orderedKids = OrderByLabels(kids, ascending); - break; - default: - orderedKids = kids.Order(l => l.displayName, ascending); - break; - } - - children.Clear(); - foreach (var o in orderedKids) - children.Add(o); - - - foreach (var child in children) - { - if (child != null) - SortHierarchical(child.children); - } - - } - - IEnumerable OrderByLabels(List kids, bool ascending) - { - var emptyHalf = new List(); - var namedHalf = new List(); - foreach (var k in kids) - { - if (k.entry == null || k.entry.labels == null || k.entry.labels.Count < 1) - emptyHalf.Add(k); - else - namedHalf.Add(k); - } - var orderedKids = namedHalf.Order(l => m_Editor.settings.labelTable.GetString(l.entry.labels, 200), ascending); - - List result = new List(); - if (ascending) - { - result.AddRange(emptyHalf); - result.AddRange(orderedKids); - } - else - { - result.AddRange(orderedKids); - result.AddRange(emptyHalf); - } - - return result; - } - protected override bool DoesItemMatchSearch(TreeViewItem item, string search) - { - if (item == null) - return false; - var aeItem = item as AssetEntryTreeViewItem; - if (ProjectConfigData.hierarchicalSearch) - { - //does this item match? - if (DoesAeItemMatchSearch(aeItem, search)) - return true; - - //else check if children match. - if (item.children != null) - { - foreach (var c in item.children) - { - if (DoesItemMatchSearch(c, search)) - return true; - } - } - - //nope. - return false; - } - - return DoesAeItemMatchSearch(aeItem, search); - //SortSearchResult(result); - } - - protected bool DoesAeItemMatchSearch(AssetEntryTreeViewItem aeItem, string search) - { - if (aeItem == null || aeItem.entry == null) - return false; - - //check if item matches. - if (aeItem.displayName.IndexOf(search, StringComparison.OrdinalIgnoreCase) >= 0) - return true; - - if (aeItem.entry.AssetPath.IndexOf(search, StringComparison.OrdinalIgnoreCase) >= 0) - return true; - if (m_Editor.settings.labelTable.GetString(aeItem.entry.labels, 200).IndexOf(search, StringComparison.OrdinalIgnoreCase) >= 0) - return true; - - return false; - } - - void AddGroupChildrenBuild(AddressableAssetGroup group, TreeViewItem root) - { - var groupItem = new AssetEntryTreeViewItem(group, 0); - root.AddChild(groupItem); - if (group.entries.Count > 0) - { - - foreach (var entry in group.entries) - { - AddAndRecurseEntriesBuild(entry, groupItem, 1); - } - } - } - - void AddAndRecurseEntriesBuild(AddressableAssetEntry entry, AssetEntryTreeViewItem parent, int depth) - { - var item = new AssetEntryTreeViewItem(entry, depth); - parent.AddChild(item); - var subAssets = new List(); - entry.GatherAllAssets(subAssets, false, false); - if (subAssets.Count > 0) - { - foreach (var e in subAssets) - { - AddAndRecurseEntriesBuild(e, item, depth + 1); - } - } - } - - public override void OnGUI(Rect rect) - { - base.OnGUI(rect); - - //TODO - this occasionally causes a "hot control" issue. - if (Event.current.type == EventType.MouseDown && - Event.current.button == 0 && - rect.Contains(Event.current.mousePosition)) - { - SetSelection(new int[0], TreeViewSelectionOptions.FireSelectionChanged); - } - } - - protected override void BeforeRowsGUI() - { - base.BeforeRowsGUI(); - - if (Event.current.type == EventType.Repaint) - { - var rows = GetRows(); - if (rows.Count > 0) - { - int first; - int last; - GetFirstAndLastVisibleRows(out first, out last); - for (int rowId = first; rowId <= last; rowId++) - { - var aeI = rows[rowId] as AssetEntryTreeViewItem; - if (aeI != null && aeI.entry != null) - { - DefaultStyles.backgroundEven.Draw(GetRowRect(rowId), false, false, false, false); - } - } - } - } - } - - GUIStyle m_LabelStyle; - protected override void RowGUI(RowGUIArgs args) - { - if (m_LabelStyle == null) - { - m_LabelStyle = new GUIStyle("PR Label"); - if (m_LabelStyle == null) - m_LabelStyle = UnityEngine.GUI.skin.GetStyle("Label"); - } - - var item = args.item as AssetEntryTreeViewItem; - if (item == null) - { - base.RowGUI(args); - } - else if (item.group != null) - { - if (item.isRenaming && !args.isRenaming) - item.isRenaming = false; - using (new EditorGUI.DisabledScope(item.group.ReadOnly)) - { - base.RowGUI(args); - } - } - else if (item.entry != null && !args.isRenaming) - { - using (new EditorGUI.DisabledScope(item.entry.ReadOnly)) - { - for (int i = 0; i < args.GetNumVisibleColumns(); ++i) - { - CellGUI(args.GetCellRect(i), item, args.GetColumn(i), ref args); - } - } - } - } - - void CellGUI(Rect cellRect, AssetEntryTreeViewItem item, int column, ref RowGUIArgs args) - { - CenterRectUsingSingleLineHeight(ref cellRect); - - switch ((ColumnId)column) - { - case ColumnId.Id: - { - // The rect is assumed indented and sized after the content when pinging - float indent = GetContentIndent(item) + extraSpaceBeforeIconAndLabel; - cellRect.xMin += indent; - - if (Event.current.type == EventType.Repaint) - m_LabelStyle.Draw(cellRect, item.entry.address, false, false, args.selected, args.focused); - } - break; - case ColumnId.Path: - if (Event.current.type == EventType.Repaint) - { - var path = item.entry.AssetPath; - if (string.IsNullOrEmpty(path)) - path = "Missing File"; - m_LabelStyle.Draw(cellRect, path, false, false, args.selected, args.focused); - } - break; - case ColumnId.Type: - if (item.assetIcon != null) - UnityEngine.GUI.DrawTexture(cellRect, item.assetIcon, ScaleMode.ScaleToFit, true); - break; - case ColumnId.Labels: - if (EditorGUI.DropdownButton(cellRect, new GUIContent(m_Editor.settings.labelTable.GetString(item.entry.labels, cellRect.width)), FocusType.Passive)) - { - var selection = GetItemsForContext(args.item.id); - Dictionary labelCounts = new Dictionary(); - List entries = new List(); - var newSelection = new List(); - foreach (var s in selection) - { - var aeItem = FindItem(s, rootItem) as AssetEntryTreeViewItem; - if (aeItem == null || aeItem.entry == null) - continue; - - entries.Add(aeItem.entry); - newSelection.Add(s); - foreach (var label in aeItem.entry.labels) - { - int count; - labelCounts.TryGetValue(label, out count); - count++; - labelCounts[label] = count; - } - } - SetSelection(newSelection); - PopupWindow.Show(cellRect, new LabelMaskPopupContent(m_Editor.settings, entries, labelCounts)); - } - break; - - } - } - - IList GetItemsForContext(int row) - { - var selection = GetSelection(); - if (selection.Contains(row)) - return selection; - - selection = new List(); - selection.Add(row); - return selection; - } - - public static MultiColumnHeaderState CreateDefaultMultiColumnHeaderState() - { - return new MultiColumnHeaderState(GetColumns()); - } - - static MultiColumnHeaderState.Column[] GetColumns() - { - var retVal = new[] { - new MultiColumnHeaderState.Column(), - new MultiColumnHeaderState.Column(), - new MultiColumnHeaderState.Column(), - new MultiColumnHeaderState.Column() - //new MultiColumnHeaderState.Column(), - }; - - int counter = 0; - - retVal[counter].headerContent = new GUIContent("Asset Address", "Address used to load asset at runtime"); - retVal[counter].minWidth = 100; - retVal[counter].width = 260; - retVal[counter].maxWidth = 10000; - retVal[counter].headerTextAlignment = TextAlignment.Left; - retVal[counter].canSort = true; - retVal[counter].autoResize = true; - counter++; - - retVal[counter].headerContent = new GUIContent(EditorGUIUtility.FindTexture("FilterByType"), "Asset type"); - retVal[counter].minWidth = 20; - retVal[counter].width = 20; - retVal[counter].maxWidth = 20; - retVal[counter].headerTextAlignment = TextAlignment.Left; - retVal[counter].canSort = false; - retVal[counter].autoResize = true; - counter++; - - retVal[counter].headerContent = new GUIContent("Path", "Current Path of asset"); - retVal[counter].minWidth = 100; - retVal[counter].width = 150; - retVal[counter].maxWidth = 10000; - retVal[counter].headerTextAlignment = TextAlignment.Left; - retVal[counter].canSort = true; - retVal[counter].autoResize = true; - counter++; - - retVal[counter].headerContent = new GUIContent("Labels", "Assets can have multiple labels"); - retVal[counter].minWidth = 20; - retVal[counter].width = 160; - retVal[counter].maxWidth = 1000; - retVal[counter].headerTextAlignment = TextAlignment.Left; - retVal[counter].canSort = true; - retVal[counter].autoResize = true; - - return retVal; - } - - protected bool CheckForRename(TreeViewItem item, bool isActualRename) - { - bool result = false; - var assetItem = item as AssetEntryTreeViewItem; - if (assetItem != null) - { - if (assetItem.group != null) - result = !assetItem.group.ReadOnly; - else if (assetItem.entry != null) - result = !assetItem.entry.ReadOnly; - if (isActualRename) - assetItem.isRenaming = result; - } - return result; - } - protected override bool CanRename(TreeViewItem item) - { - return CheckForRename(item, true); - } - - AssetEntryTreeViewItem FindItemInVisibleRows(int id) - { - var rows = GetRows(); - foreach (var r in rows) - { - if (r.id == id) - { - return r as AssetEntryTreeViewItem; - } - } - return null; - } - - protected override void RenameEnded(RenameEndedArgs args) - { - var item = FindItemInVisibleRows(args.itemID); - if (item != null) - { - item.isRenaming = false; - } - - if (args.originalName == args.newName) - return; - - if (item != null) - { - if (item.entry != null) - { - item.entry.address = args.newName; - } - else if (item.group != null) - { - if (m_Editor.settings.IsNotUniqueGroupName(args.newName)) - { - args.acceptedRename = false; - Addressables.LogWarning("There is already a group named '" + args.newName + "'. Cannot rename this group to match"); - } - else - item.group.Name = args.newName; - } - Reload(); - } - } - - protected override void DoubleClickedItem(int id) - { - var item = FindItemInVisibleRows(id); - if (item != null) - { - - Object o = null; - if (item.entry != null) - o = AssetDatabase.LoadAssetAtPath(item.entry.AssetPath); - else if (item.group != null) - o = item.group; - - if (o != null) - { - EditorGUIUtility.PingObject(o); - Selection.activeObject = o; - } - } - } - - bool m_ContextOnItem; - protected override void ContextClicked() - { - if (m_ContextOnItem) - { - m_ContextOnItem = false; - return; - } - - GenericMenu menu = new GenericMenu(); - PopulateGeneralContextMenu(ref menu); - menu.ShowAsContext(); - } - - void PopulateGeneralContextMenu(ref GenericMenu menu) - { - foreach( var templateObject in m_Editor.settings.GroupTemplateObjects ) - { - Assert.IsNotNull( templateObject ); - menu.AddItem( new GUIContent( "Create New Group/" + templateObject.name ), false, CreateNewGroup, templateObject ); - } - var bundleList = AssetDatabase.GetAllAssetBundleNames(); - if (bundleList != null && bundleList.Length > 0) - menu.AddItem(new GUIContent("Convert Legacy Bundles"), false, m_Editor.window.OfferToConvert); - } - - protected override void ContextClickedItem(int id) - { - List selectedNodes = new List(); - foreach (var nodeId in GetSelection()) - { - var item = FindItemInVisibleRows(nodeId); //TODO - this probably makes off-screen but selected items not get added to list. - if (item != null) - selectedNodes.Add(item); - } - if (selectedNodes.Count == 0) - return; - - m_ContextOnItem = true; - - bool isGroup = false; - bool isEntry = false; - bool hasReadOnly = false; - int resourceCount = 0; - bool isResourcesHeader = false; - foreach (var item in selectedNodes) - { - if (item.group != null) - { - hasReadOnly |= item.group.ReadOnly; - isGroup = true; - } - else if (item.entry != null) - { - if (item.entry.AssetPath == AddressableAssetEntry.ResourcesPath) - { - if (selectedNodes.Count > 1) - return; - isResourcesHeader = true; - } - else if (item.entry.AssetPath == AddressableAssetEntry.EditorSceneListPath) - { - return; - } - hasReadOnly |= item.entry.ReadOnly; - isEntry = true; - resourceCount += item.entry.IsInResources ? 1 : 0; - } - } - if (isEntry && isGroup) - return; - - GenericMenu menu = new GenericMenu(); - if (isResourcesHeader) - { - foreach (var g in m_Editor.settings.groups) - { - if (!g.ReadOnly) - menu.AddItem(new GUIContent("Move ALL Resources to group/" + g.Name), false, MoveAllResourcesToGroup, g); - } - } - else if (!hasReadOnly) - { - if (isGroup) - { - var group = selectedNodes.First().group; - if (!group.IsDefaultGroup()) - menu.AddItem(new GUIContent("Remove Group(s)"), false, RemoveGroup, selectedNodes); - - if (selectedNodes.Count == 1) - { - if (!group.IsDefaultGroup() && group.CanBeSetAsDefault()) - menu.AddItem(new GUIContent("Set as Default"), false, SetGroupAsDefault, selectedNodes); - menu.AddItem(new GUIContent("Inspect Group Settings"), false, GoToGroupAsset, selectedNodes); - } - } - if (isEntry) - { - foreach (var g in m_Editor.settings.groups) - { - if (!g.ReadOnly) - menu.AddItem(new GUIContent("Move entries to group/" + g.Name), false, MoveEntriesToGroup, g); - } - - var commonPrefix = FindCommonPrefix(selectedNodes); - if (!string.IsNullOrEmpty(commonPrefix)) - { - var groups = new HashSet(); - foreach (var n in selectedNodes) - groups.Add(n.entry.parentGroup); - foreach(var g in groups) - menu.AddItem(new GUIContent("Move entries to new group/" + commonPrefix + " (use " + g.Name + " settings)"), false, MoveEntriesToNewGroup, new KeyValuePair(commonPrefix, g)); - } - - menu.AddItem(new GUIContent("Remove Entry(s)"), false, RemoveEntry, selectedNodes); - menu.AddItem(new GUIContent("Simplify Entry Names"), false, SimplifyAddresses, selectedNodes); - menu.AddItem(new GUIContent("Export Entries..."), false, CreateExternalEntryCollection, selectedNodes); - - } - } - else - { - if (isEntry) - { - if (resourceCount == selectedNodes.Count) - { - foreach (var g in m_Editor.settings.groups) - { - if (!g.ReadOnly) - menu.AddItem(new GUIContent("Move entries to group/" + g.Name), false, MoveResourcesToGroup, g); - } - } - else if (resourceCount == 0) - { - foreach (var g in m_Editor.settings.groups) - { - if (!g.ReadOnly) - menu.AddItem(new GUIContent("Move entries to group/" + g.Name), false, MoveEntriesToGroup, g); - } - } - } - } - - if (selectedNodes.Count == 1) - { - if (CheckForRename(selectedNodes.First(), false)) - menu.AddItem(new GUIContent("Rename"), false, RenameItem, selectedNodes); - } - - - PopulateGeneralContextMenu(ref menu); - - menu.ShowAsContext(); - } - - string FindCommonPrefix(List selectedNodes) - { - var names = new List(); - foreach (var n in selectedNodes) - names.Add(n.displayName.Replace('/', '-')); - bool same = true; - int index = 0; - while (same) - { - if (index >= names[0].Length) - { - break; - } - char c = names[0][index]; - foreach (var n in names) - { - if (index >= n.Length || n[index] != c) - { - same = false; - break; - } - } - index++; - } - if (index < 1) - return null; - var prefix = names[0].Substring(0, index); - return prefix.Trim(' ', '-'); - } - - void GoToGroupAsset(object context) - { - List selectedNodes = context as List; - if (selectedNodes == null || selectedNodes.Count == 0) - return; - var group = selectedNodes.First().group; - if (group == null) - return; - EditorGUIUtility.PingObject(group); - Selection.activeObject = group; - } - - void CreateExternalEntryCollection(object context) - { - var path = EditorUtility.SaveFilePanel("Create Entry Collection", "Assets", "AddressableEntryCollection", "asset"); - List selectedNodes = context as List; - - if (!string.IsNullOrEmpty(path) && selectedNodes != null) - { - var col = ScriptableObject.CreateInstance(); - foreach (var item in selectedNodes) - { - item.entry.ReadOnly = true; - item.entry.IsSubAsset = true; - col.Entries.Add(item.entry); - m_Editor.settings.RemoveAssetEntry(item.entry.guid, false); - } - path = path.Substring(path.ToLower().IndexOf("assets/")); - AssetDatabase.CreateAsset(col, path); - AssetDatabase.Refresh(); - var guid = AssetDatabase.AssetPathToGUID(path); - m_Editor.settings.CreateOrMoveEntry(guid, m_Editor.settings.DefaultGroup); - } - } - - void MoveAllResourcesToGroup(object context) - { - var targetGroup = context as AddressableAssetGroup; - var firstId = GetSelection().First(); - var item = FindItemInVisibleRows(firstId); - if (item != null && item.children != null) - { - SafeMoveResourcesToGroup(targetGroup, item.children.ConvertAll(instance => (AssetEntryTreeViewItem)instance)); - } - else - Debug.LogWarning("No Resources found to move"); - } - - void MoveResourcesToGroup(object context) - { - var targetGroup = context as AddressableAssetGroup; - var itemList = new List(); - foreach (var nodeId in GetSelection()) - { - var item = FindItemInVisibleRows(nodeId); - if (item != null) - itemList.Add(item); - } - - SafeMoveResourcesToGroup(targetGroup, itemList); - } - - bool SafeMoveResourcesToGroup(AddressableAssetGroup targetGroup, List itemList) - { - var guids = new List(); - var paths = new List(); - foreach (AssetEntryTreeViewItem child in itemList) - { - if (child != null) - { - guids.Add(child.entry.guid); - paths.Add(child.entry.AssetPath); - } - } - return AddressableAssetUtility.SafeMoveResourcesToGroup(m_Editor.settings, targetGroup, paths, guids); - } - - void MoveEntriesToNewGroup(object context) - { - var k = (KeyValuePair)context; - var g = m_Editor.settings.CreateGroup(k.Key, false, false, true, k.Value.Schemas); - MoveEntriesToGroup(g); - } - - void MoveEntriesToGroup(object context) - { - var targetGroup = context as AddressableAssetGroup; - var entries = new List(); - foreach (var nodeId in GetSelection()) - { - var item = FindItemInVisibleRows(nodeId); - if (item != null) - entries.Add(item.entry); - } - if (entries.Count > 0) - m_Editor.settings.MoveEntries(entries, targetGroup); - } - - protected void CreateNewGroup(object context) - { - var groupTemplate = context as AddressableAssetGroupTemplate; - if (groupTemplate != null) - { - AddressableAssetGroup newGroup = m_Editor.settings.CreateGroup( groupTemplate.Name, false, false, true, null, groupTemplate.GetTypes() ); - groupTemplate.ApplyToAddressableAssetGroup( newGroup ); - } - else - { - m_Editor.settings.CreateGroup("", false, false, false, null); - } - } - - void SetGroupAsDefault(object context) - { - List selectedNodes = context as List; - if (selectedNodes == null || selectedNodes.Count == 0) - return; - var group = selectedNodes.First().group; - if (group == null) - return; - m_Editor.settings.DefaultGroup = group; - Reload(); - } - - protected void RemoveGroup(object context) - { - if (EditorUtility.DisplayDialog("Delete selected groups?", "Are you sure you want to delete the selected groups?\n\nYou cannot undo this action.", "Yes", "No")) - { - List selectedNodes = context as List; - if (selectedNodes == null || selectedNodes.Count < 1) - return; - var groups = new List(); - foreach (var item in selectedNodes) - { - m_Editor.settings.RemoveGroupInternal(item.group, true, false); - groups.Add(item.group); - } - m_Editor.settings.SetDirty(AddressableAssetSettings.ModificationEvent.GroupRemoved, groups, true, true); - } - } - - protected void SimplifyAddresses(object context) - { - List selectedNodes = context as List; - if (selectedNodes == null || selectedNodes.Count < 1) - return; - var entries = new List(); - HashSet modifiedGroups = new HashSet(); - foreach (var item in selectedNodes) - { - item.entry.SetAddress(Path.GetFileNameWithoutExtension(item.entry.address), false); - entries.Add(item.entry); - modifiedGroups.Add(item.entry.parentGroup); - } - foreach (var g in modifiedGroups) - g.SetDirty(AddressableAssetSettings.ModificationEvent.EntryModified, entries, false, true); - m_Editor.settings.SetDirty(AddressableAssetSettings.ModificationEvent.EntryModified, entries, true, false); - } - - protected void RemoveEntry(object context) - { - if (EditorUtility.DisplayDialog("Delete selected entries?", "Are you sure you want to delete the selected entries?\n\nYou cannot undo this action.", "Yes", "No")) - { - List selectedNodes = context as List; - if (selectedNodes == null || selectedNodes.Count < 1) - return; - var entries = new List(); - HashSet modifiedGroups = new HashSet(); - foreach (var item in selectedNodes) - { - if (item.entry != null) - { - entries.Add(item.entry); - modifiedGroups.Add(item.entry.parentGroup); - m_Editor.settings.RemoveAssetEntry(item.entry.guid, false); - } - } - foreach (var g in modifiedGroups) - g.SetDirty(AddressableAssetSettings.ModificationEvent.EntryModified, entries, false, true); - m_Editor.settings.SetDirty(AddressableAssetSettings.ModificationEvent.EntryRemoved, entries, true, false); - } - } - - protected void RenameItem(object context) - { - List selectedNodes = context as List; - if (selectedNodes != null && selectedNodes.Count >= 1) - { - var item = selectedNodes.First(); - if (CanRename(item)) - BeginRename(item); - } - } - - protected override bool CanBeParent(TreeViewItem item) - { - var aeItem = item as AssetEntryTreeViewItem; - if (aeItem != null && aeItem.group != null) - return true; - - return false; - } - - protected override void KeyEvent() - { - if (Event.current.type == EventType.KeyUp && Event.current.keyCode == KeyCode.Delete && GetSelection().Count > 0) - { - List selectedNodes = new List(); - bool allGroups = true; - bool allEntries = true; - foreach (var nodeId in GetSelection()) - { - var item = FindItemInVisibleRows(nodeId); - if (item != null) - { - selectedNodes.Add(item); - if (item.entry == null) - allEntries = false; - else - allGroups = false; - } - } - if (allEntries) - RemoveEntry(selectedNodes); - if (allGroups) - RemoveGroup(selectedNodes); - } - } - - protected override bool CanStartDrag(CanStartDragArgs args) - { - int resourcesCount = 0; - foreach (var id in args.draggedItemIDs) - { - var item = FindItemInVisibleRows(id); - if (item != null) - { - if (item.entry != null) - { - //can't drag the root "EditorSceneList" entry - if (item.entry.guid == AddressableAssetEntry.EditorSceneListName) - return false; - - //can't drag the root "Resources" entry - if (item.entry.guid == AddressableAssetEntry.ResourcesName) - return false; - - //if we're dragging resources, we should _only_ drag resources. - if (item.entry.IsInResources) - resourcesCount++; - } - } - } - if ((resourcesCount > 0) && (resourcesCount < args.draggedItemIDs.Count)) - return false; - - return true; - } - - protected override void SetupDragAndDrop(SetupDragAndDropArgs args) - { - DragAndDrop.PrepareStartDrag(); - - var selectedNodes = new List(); - foreach (var id in args.draggedItemIDs) - { - var item = FindItemInVisibleRows(id); - selectedNodes.Add(item); - } - DragAndDrop.paths = null; - DragAndDrop.objectReferences = new Object[] { }; - DragAndDrop.SetGenericData("AssetEntryTreeViewItem", selectedNodes); - DragAndDrop.visualMode = DragAndDropVisualMode.Copy; - DragAndDrop.StartDrag("AssetBundleTree"); - } - - protected override DragAndDropVisualMode HandleDragAndDrop(DragAndDropArgs args) - { - DragAndDropVisualMode visualMode = DragAndDropVisualMode.None; - - var target = args.parentItem as AssetEntryTreeViewItem; - - if (target != null && target.entry != null && target.entry.ReadOnly) - return DragAndDropVisualMode.Rejected; - - if (DragAndDrop.paths != null && DragAndDrop.paths.Length > 0) - { - visualMode = HandleDragAndDropPaths(target, args); - } - else - { - visualMode = HandleDragAndDropItems(target, args); - } - - return visualMode; - } - - DragAndDropVisualMode HandleDragAndDropItems(AssetEntryTreeViewItem target, DragAndDropArgs args) - { - DragAndDropVisualMode visualMode = DragAndDropVisualMode.None; - - var draggedNodes = DragAndDrop.GetGenericData("AssetEntryTreeViewItem") as List; - if (draggedNodes != null && draggedNodes.Count > 0) - { - visualMode = DragAndDropVisualMode.Copy; - bool isDraggingGroup = draggedNodes.First().parent == rootItem; - bool dropParentIsRoot = args.parentItem == rootItem || args.parentItem == null; - - if (isDraggingGroup && !dropParentIsRoot || !isDraggingGroup && dropParentIsRoot) - visualMode = DragAndDropVisualMode.Rejected; - - if (args.performDrop) - { - if (args.parentItem == null || args.parentItem == rootItem && visualMode != DragAndDropVisualMode.Rejected) - { - AddressableAssetGroup group = draggedNodes.First().@group; - int index = m_Editor.settings.groups.FindIndex(g => g == group); - if (index < args.insertAtIndex) - args.insertAtIndex--; - - m_Editor.settings.groups.RemoveAt(index); - - if(args.insertAtIndex < 0 || args.insertAtIndex > m_Editor.settings.groups.Count) - m_Editor.settings.groups.Insert(m_Editor.settings.groups.Count, group); - else - m_Editor.settings.groups.Insert(args.insertAtIndex, group); - - m_Editor.settings.SetDirty(AddressableAssetSettings.ModificationEvent.GroupMoved, m_Editor.settings.groups, true, true); - Reload(); - } - else - { - AddressableAssetGroup parent = null; - if (target.group != null) - parent = target.group; - else if (target.entry != null) - parent = target.entry.parentGroup; - - if (parent != null) - { - if (draggedNodes.First().entry.IsInResources) - { - SafeMoveResourcesToGroup(parent, draggedNodes); - } - else - { - var entries = new List(); - var modifiedGroups = new HashSet(); - foreach (var node in draggedNodes) - { - var e = m_Editor.settings.CreateOrMoveEntry(node.entry.guid, parent, false, false); - entries.Add(e); - modifiedGroups.Add(e.parentGroup); - } - foreach (var g in modifiedGroups) - g.SetDirty(AddressableAssetSettings.ModificationEvent.EntryMoved, entries, false, true); - m_Editor.settings.SetDirty(AddressableAssetSettings.ModificationEvent.EntryMoved, entries, true, false); - } - } - } - } - } - - return visualMode; - } - - DragAndDropVisualMode HandleDragAndDropPaths(AssetEntryTreeViewItem target, DragAndDropArgs args) - { - DragAndDropVisualMode visualMode = DragAndDropVisualMode.None; - - if (target == null) - return DragAndDropVisualMode.Rejected; - - if (!AddressableAssetUtility.IsPathValidForEntry(DragAndDrop.paths[0])) - visualMode = DragAndDropVisualMode.Rejected; - else - visualMode = DragAndDropVisualMode.Copy; - - if (args.performDrop && visualMode != DragAndDropVisualMode.Rejected) - { - AddressableAssetGroup parent = null; - bool targetIsGroup = false; - if (target.group != null) - { - parent = target.group; - targetIsGroup = true; - } - else if (target.entry != null) - parent = target.entry.parentGroup; - - if (parent != null) - { - var resourcePaths = new List(); - var nonResourcePaths = new List(); - foreach (var p in DragAndDrop.paths) - { - if (AddressableAssetUtility.IsInResources(p)) - resourcePaths.Add(p); - else - nonResourcePaths.Add(p); - } - bool canMarkNonResources = true; - if (resourcePaths.Count > 0) - { - canMarkNonResources = AddressableAssetUtility.SafeMoveResourcesToGroup(m_Editor.settings, parent, resourcePaths); - } - if (canMarkNonResources) - { - var entries = new List(); - var modifiedGroups = new HashSet(); - foreach (var p in nonResourcePaths) - { - var e = m_Editor.settings.CreateOrMoveEntry(AssetDatabase.AssetPathToGUID(p), parent, false, false); - entries.Add(e); - modifiedGroups.Add(e.parentGroup); - } - foreach (var g in modifiedGroups) - g.SetDirty(AddressableAssetSettings.ModificationEvent.EntryMoved, entries, false, true); - m_Editor.settings.SetDirty(AddressableAssetSettings.ModificationEvent.EntryMoved, entries, true, false); - - if (targetIsGroup) - { - SetExpanded(target.id, true); - } - } - } - } - - return visualMode; - } - } - - class AssetEntryTreeViewItem : TreeViewItem - { - public AddressableAssetEntry entry; - public AddressableAssetGroup group; - public Texture2D assetIcon; - public bool isRenaming; - - public AssetEntryTreeViewItem(AddressableAssetEntry e, int d) : base((e.address + e.guid).GetHashCode(), d, e.address) - { - entry = e; - group = null; - assetIcon = AssetDatabase.GetCachedIcon(e.AssetPath) as Texture2D; - isRenaming = false; - } - - public AssetEntryTreeViewItem(AddressableAssetGroup g, int d) : base(g.Guid.GetHashCode(), d, g.Name) - { - entry = null; - group = g; - assetIcon = null; - isRenaming = false; - } - - public override string displayName - { - get - { - if (!isRenaming && group != null && group.Default) - return base.displayName + " (Default)"; - return base.displayName; - } - - set - { - base.displayName = value; - } - } - } - - - //TODO - ideally need to get rid of this - static class MyExtensionMethods - { - public static IOrderedEnumerable Order(this IEnumerable source, Func selector, bool ascending) - { - if (ascending) - { - return source.OrderBy(selector); - } - - return source.OrderByDescending(selector); - } - - public static IOrderedEnumerable ThenBy(this IOrderedEnumerable source, Func selector, bool ascending) - { - if (ascending) - { - return source.ThenBy(selector); - } - - return source.ThenByDescending(selector); - } - - internal static void DrawOutline(Rect rect, float size) - { - Color color = new Color(0.6f, 0.6f, 0.6f, 1.333f); - if (EditorGUIUtility.isProSkin) - { - color.r = 0.12f; - color.g = 0.12f; - color.b = 0.12f; - } - - if (Event.current.type != EventType.Repaint) - return; - - Color orgColor = UnityEngine.GUI.color; - UnityEngine.GUI.color = UnityEngine.GUI.color * color; - UnityEngine.GUI.DrawTexture(new Rect(rect.x, rect.y, rect.width, size), EditorGUIUtility.whiteTexture); - UnityEngine.GUI.DrawTexture(new Rect(rect.x, rect.yMax - size, rect.width, size), EditorGUIUtility.whiteTexture); - UnityEngine.GUI.DrawTexture(new Rect(rect.x, rect.y + 1, size, rect.height - 2 * size), EditorGUIUtility.whiteTexture); - UnityEngine.GUI.DrawTexture(new Rect(rect.xMax - size, rect.y + 1, size, rect.height - 2 * size), EditorGUIUtility.whiteTexture); - - UnityEngine.GUI.color = orgColor; - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetsSettingsGroupTreeView.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetsSettingsGroupTreeView.cs.meta deleted file mode 100644 index 778bf346..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetsSettingsGroupTreeView.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5102485b735d4d0439d6da999841b9c8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetsSettingsLabelMaskPopup.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetsSettingsLabelMaskPopup.cs deleted file mode 100644 index e1c90ce6..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetsSettingsLabelMaskPopup.cs +++ /dev/null @@ -1,104 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.AddressableAssets.Settings; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.GUI -{ - class LabelMaskPopupContent : PopupWindowContent - { - AddressableAssetSettings m_Settings; - List m_Entries; - Dictionary m_LabelCount; - - GUIStyle m_ToggleMixed; - - - int m_LastItemCount = -1; - Vector2 m_Rect; - public LabelMaskPopupContent(AddressableAssetSettings settings, List e, Dictionary count) - { - m_Settings = settings; - m_Entries = e; - m_LabelCount = count; - } - - public override Vector2 GetWindowSize() - { - var labelTable = m_Settings.labelTable; - if (m_LastItemCount != labelTable.labelNames.Count) - { - int maxLen = 0; - string maxStr = ""; - for (int i = 0; i < labelTable.labelNames.Count; i++) - { - var len = labelTable.labelNames[i].Length; - if (len > maxLen) - { - maxLen = len; - maxStr = labelTable.labelNames[i]; - } - } - float minWidth, maxWidth; - var content = new GUIContent(maxStr); - UnityEngine.GUI.skin.toggle.CalcMinMaxWidth(content, out minWidth, out maxWidth); - var height = UnityEngine.GUI.skin.toggle.CalcHeight(content, maxWidth) + 3.5f; - m_Rect = new Vector2(Mathf.Clamp(maxWidth + 40, 60, 600), Mathf.Clamp(labelTable.labelNames.Count * height, 30, 150)); - m_LastItemCount = labelTable.labelNames.Count; - } - return m_Rect; - } - - void SetLabelForEntries(string label, bool value) - { - m_Settings.SetLabelValueForEntries(m_Entries, label, value); - m_LabelCount[label] = value ? m_Entries.Count : 0; - } - - Vector2 m_ScrollPosition; - public override void OnGUI(Rect rect) - { - if (m_Entries.Count == 0) - return; - - - var labelTable = m_Settings.labelTable; - - GUILayout.BeginArea(new Rect(rect.xMin + 3, rect.yMin + 3, rect.width - 6, rect.height - 6)); - m_ScrollPosition = GUILayout.BeginScrollView(m_ScrollPosition); - - //string toRemove = null; - foreach (var labelName in labelTable.labelNames) - { - EditorGUILayout.BeginHorizontal(); - - bool newState; - int count; - if (m_LabelCount == null) - count = m_Entries[0].labels.Contains(labelName) ? m_Entries.Count : 0; - else - m_LabelCount.TryGetValue(labelName, out count); - - bool oldState = count == m_Entries.Count; - if (count == 0 || count == m_Entries.Count) - { - newState = GUILayout.Toggle(oldState, new GUIContent(labelName), GUILayout.ExpandWidth(false)); - } - else - { - if (m_ToggleMixed == null) - m_ToggleMixed = new GUIStyle("ToggleMixed"); - newState = GUILayout.Toggle(oldState, new GUIContent(labelName), m_ToggleMixed, GUILayout.ExpandWidth(false)); - } - if (oldState != newState) - { - SetLabelForEntries(labelName, newState); - } - - EditorGUILayout.EndHorizontal(); - } - GUILayout.EndScrollView(); - GUILayout.EndArea(); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetsSettingsLabelMaskPopup.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetsSettingsLabelMaskPopup.cs.meta deleted file mode 100644 index 86370dbb..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetsSettingsLabelMaskPopup.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f498126c527f05c4f9202c95abf8ba3d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetsWindow.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetsWindow.cs deleted file mode 100644 index 152f08a9..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetsWindow.cs +++ /dev/null @@ -1,140 +0,0 @@ -using System; -using UnityEditor.AddressableAssets; -using UnityEditor.AddressableAssets.Settings; -using UnityEngine; -using UnityEngine.AddressableAssets; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets.GUI -{ - class AddressableAssetsWindow : EditorWindow - { - [FormerlySerializedAs("m_groupEditor")] - [SerializeField] - AddressableAssetsSettingsGroupEditor m_GroupEditor; - - [FormerlySerializedAs("m_ignoreLegacyBundles")] - [SerializeField] - bool m_IgnoreLegacyBundles; - - [MenuItem("Window/Asset Management/Addressables", priority = 2050)] - static void Init() - { - var window = GetWindow(); - window.titleContent = new GUIContent("Addressables"); - window.Show(); - } - public static Vector2 GetWindowPosition() - { - var window = GetWindow(); - return new Vector2(window.position.x, window.position.y); - } - - public void OnEnable() - { - if (!m_IgnoreLegacyBundles) - { - var bundleList = AssetDatabase.GetAllAssetBundleNames(); - if (bundleList != null && bundleList.Length > 0) - OfferToConvert(); - } - if (m_GroupEditor != null) - m_GroupEditor.OnEnable(); - } - - public void OnDisable() - { - if (m_GroupEditor != null) - m_GroupEditor.OnDisable(); - } - - internal void OfferToConvert() - { - var bundleList = AssetDatabase.GetAllAssetBundleNames(); - if (EditorUtility.DisplayDialog("Legacy Bundles Detected", "We have detected the use of legacy bundles in this project. Would you like to auto-convert those into Addressables? \nThis will take each asset bundle you have defined (we have detected " + bundleList.Length + " bundles), create an Addressables group with a matching name, then move all assets from those bundles into corresponding groups. This will remove the asset bundle assignment from all assets, and remove all asset bundle definitions from this project. This cannot be undone.", "Convert", "Ignore")) - { - AddressableAssetUtility.ConvertAssetBundlesToAddressables(); - } - else - m_IgnoreLegacyBundles = true; - } - - public void OnGUI() - { - if (AddressableAssetSettingsDefaultObject.Settings == null) - { - GUILayout.Space(50); - if (GUILayout.Button("Create Addressables Settings")) - { - m_GroupEditor = null; - AddressableAssetSettingsDefaultObject.Settings = AddressableAssetSettings.Create(AddressableAssetSettingsDefaultObject.kDefaultConfigFolder, AddressableAssetSettingsDefaultObject.kDefaultConfigAssetName, true, true); - } - if (GUILayout.Button("Import Addressables Settings")) - { - m_GroupEditor = null; - var path = EditorUtility.OpenFilePanel("Addressables Settings Object", AddressableAssetSettingsDefaultObject.kDefaultConfigFolder, "asset"); - if (!string.IsNullOrEmpty(path)) - { - var i = path.ToLower().IndexOf("/assets/"); - if (i > 0) - { - path = path.Substring(i + 1); - Addressables.LogFormat("Loading Addressables Settings from {0}", path); - var obj = AssetDatabase.LoadAssetAtPath(path); - if (obj != null) - AddressableAssetSettingsDefaultObject.Settings = obj; - else - Debug.LogWarning("Unable to load asset settings from: " - + path - + "\nPlease ensure the location included in the project directory." - ); - } - } - } - GUILayout.Space(20); - GUILayout.BeginHorizontal(); - GUILayout.Space(50); - UnityEngine.GUI.skin.label.wordWrap = true; - GUILayout.Label("Click the \"Create\" or \"Import\" button above or simply drag an asset into this window to start using Addressables. Once you begin, the Addressables system will save some assets to your project to keep up with its data"); - GUILayout.Space(50); - GUILayout.EndHorizontal(); - switch (Event.current.type) - { - case EventType.DragPerform: - DragAndDrop.visualMode = DragAndDropVisualMode.Copy; - foreach (var path in DragAndDrop.paths) - { - if (AddressableAssetUtility.IsPathValidForEntry(path)) - { - var guid = AssetDatabase.AssetPathToGUID(path); - if (!string.IsNullOrEmpty(guid)) - { - if (AddressableAssetSettingsDefaultObject.Settings == null) - AddressableAssetSettingsDefaultObject.Settings = AddressableAssetSettings.Create(AddressableAssetSettingsDefaultObject.kDefaultConfigFolder, AddressableAssetSettingsDefaultObject.kDefaultConfigAssetName, true, true); - Undo.RecordObject(AddressableAssetSettingsDefaultObject.Settings, "AddressableAssetSettings"); - AddressableAssetSettingsDefaultObject.Settings.CreateOrMoveEntry(guid, AddressableAssetSettingsDefaultObject.Settings.DefaultGroup); - } - } - } - break; - case EventType.DragUpdated: - case EventType.DragExited: - DragAndDrop.visualMode = DragAndDropVisualMode.Copy; - break; - } - } - else - { - Rect contentRect = new Rect(0, 0, position.width, position.height); - - if (m_GroupEditor == null) - { - m_GroupEditor = new AddressableAssetsSettingsGroupEditor(this); - m_GroupEditor.OnEnable(); - } - if (m_GroupEditor.OnGUI(contentRect)) - Repaint(); - } - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetsWindow.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetsWindow.cs.meta deleted file mode 100644 index 1554e836..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AddressableAssetsWindow.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e98b4a8982e76bc4d86c10db25cd7193 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AnalyzeRuleGUI.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AnalyzeRuleGUI.cs deleted file mode 100644 index 6635d9ef..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AnalyzeRuleGUI.cs +++ /dev/null @@ -1,123 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using UnityEditor.AddressableAssets.Build.AnalyzeRules; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.IMGUI.Controls; -using UnityEngine; -using UnityEngine.AddressableAssets; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets.GUI -{ - using TreeViewItem = UnityEditor.IMGUI.Controls.TreeViewItem; - - [Serializable] - class AnalyzeRuleGUI - { - [SerializeField] - private TreeViewState m_TreeState; - - AssetSettingsAnalyzeTreeView m_Tree; - - static List s_Rules = new List(); - internal static List Rules - { - get { return s_Rules; } - } - - internal AddressableAssetSettings Settings { get { return AddressableAssetSettingsDefaultObject.Settings; } } - - private const float k_ButtonHeight = 24f; - - internal string AnalyzeRuleDataFolder - { - get { return AddressableAssetSettingsDefaultObject.kDefaultConfigFolder + "/AnalyzeData"; } - } - - internal string AnalyzeRuleDataName - { - get { return "AnalyzeRuleData.asset"; } - } - - internal string AnalyzeRuleDataPath - { - get { return AnalyzeRuleDataFolder +"/"+ AnalyzeRuleDataName; } - } - - [SerializeField] private AnalyzeResultData m_Data; - internal AnalyzeResultData AnalyzeData - { - get - { - if (m_Data == null) - { - if (!Directory.Exists(AnalyzeRuleDataFolder)) - Directory.CreateDirectory(AnalyzeRuleDataFolder); - - if (!File.Exists(AnalyzeRuleDataPath)) - { - AssetDatabase.CreateAsset(ScriptableObject.CreateInstance(typeof(AnalyzeResultData)), - AnalyzeRuleDataPath); - } - - m_Data = AssetDatabase.LoadAssetAtPath(AnalyzeRuleDataPath); - - foreach (var rule in s_Rules) - { - if (!m_Data.Data.ContainsKey(rule.ruleName)) - m_Data.Data.Add(rule.ruleName, new List()); - } - } - - return m_Data; - } - } - - internal void OnGUI(Rect rect) - { - if (m_Tree == null) - { - if(m_TreeState == null) - m_TreeState = new TreeViewState(); - - m_Tree = new AssetSettingsAnalyzeTreeView(m_TreeState, this); - m_Tree.Reload(); - } - - var treeRect = new Rect(rect.xMin, rect.yMin + k_ButtonHeight, rect.width, rect.height - k_ButtonHeight); - m_Tree.OnGUI(treeRect); - - var buttonRect = new Rect(rect.xMin, rect.yMin, rect.width, rect.height); - - GUILayout.BeginArea(buttonRect); - GUILayout.BeginHorizontal(); - EditorGUI.BeginDisabledGroup(!m_Tree.SelectionContainsRuleContainer); - if (GUILayout.Button("Analyze Selected Rules")) - { - EditorApplication.delayCall += () => m_Tree.RunAllSelectedRules(); - } - - if (GUILayout.Button("Clear Selected Rules")) - { - EditorApplication.delayCall += () => m_Tree.ClearAllSelectedRules(); - } - - EditorGUI.BeginDisabledGroup(!m_Tree.SelectionContainsFixableRule || !m_Tree.SelectionContainsErrors); - if (GUILayout.Button("Fix Selected Rules")) - { - EditorApplication.delayCall += () => m_Tree.FixAllSelectedRules(); - } - EditorGUI.EndDisabledGroup(); - GUILayout.EndHorizontal(); - GUILayout.EndArea(); - - //TODO - //if (GUILayout.Button("Revert Selected")) - //{ - // m_Tree.RevertAllActiveRules(); - //} - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AnalyzeRuleGUI.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AnalyzeRuleGUI.cs.meta deleted file mode 100644 index 40e7567c..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AnalyzeRuleGUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3c6632daa352f6846a162383f7a00fe7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AnalyzeWindow.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AnalyzeWindow.cs deleted file mode 100644 index 9b689b5a..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AnalyzeWindow.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEditor.AddressableAssets.Build.AnalyzeRules; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.IMGUI.Controls; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.GUI -{ - /// - /// Window used to execute AnalyzeRule sets. - /// - public class AnalyzeWindow : EditorWindow - { - private static AnalyzeWindow s_Instance = null; - private static AnalyzeWindow instance - { - get - { - if (s_Instance == null) - s_Instance = GetWindow(false, "Analyze", false); - return s_Instance; - } - } - - private AddressableAssetSettings m_Settings; - - [SerializeField] - private AnalyzeRuleGUI m_AnalyzeEditor; - - private Rect displayAreaRect - { - get - { - return new Rect(0, 0, position.width, position.height); - } - } - - [MenuItem("Window/Asset Management/Addressables Analyze", priority = 2052)] - internal static void ShowWindow() - { - AddressableAssetSettings settings = AddressableAssetSettingsDefaultObject.Settings; - if (settings == null) - { - Debug.LogError("Unable to load Addressable Asset Settings default object."); - return; - } - - instance.titleContent = new GUIContent("Analyze"); - instance.Show(); - } - - void OnEnable() - { - if(m_AnalyzeEditor == null) - m_AnalyzeEditor = new AnalyzeRuleGUI(); - - } - - void OnGUI() - { - GUILayout.BeginArea(displayAreaRect); - m_AnalyzeEditor.OnGUI(displayAreaRect); - GUILayout.EndArea(); - } - /// - /// Method used to register any custom AnalyzeRules with the window. The recommended pattern is to create - /// your rules like so: - /// class MyRule : AnalyzeRule {} - /// [InitializeOnLoad] - /// class RegisterMyRule - /// { - /// static RegisterMyRule() - /// { - /// AnalyzeWindow.RegisterNewRule(); - /// } - /// } - /// - public static void RegisterNewRule() where TRule : AnalyzeRule, new() - { - foreach (var rule in AnalyzeRuleGUI.Rules) - { - if (rule.GetType().IsAssignableFrom(typeof(TRule))) - return; - } - AnalyzeRuleGUI.Rules.Add(new TRule()); - } - - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AnalyzeWindow.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AnalyzeWindow.cs.meta deleted file mode 100644 index b540fb86..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AnalyzeWindow.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e51f1aa10d814ff4a85c671e5120de6f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetInspectorGUI.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetInspectorGUI.cs deleted file mode 100644 index b02ce3e7..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetInspectorGUI.cs +++ /dev/null @@ -1,138 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.AddressableAssets; -using UnityEditor.AddressableAssets.Build; -using UnityEditor.AddressableAssets.Settings; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.GUI -{ - using Object = UnityEngine.Object; - - [InitializeOnLoad] - static class AddressableAssetInspectorGUI - { - static GUIStyle s_ToggleMixed; - static GUIContent s_AddressableAssetToggleText; - - static AddressableAssetInspectorGUI() - { - s_ToggleMixed = null; - s_AddressableAssetToggleText = new GUIContent("Addressable", "Check this to mark this asset as an Addressable Asset, which includes it in the bundled data and makes it loadable via script by its address."); - Editor.finishedDefaultHeaderGUI += OnPostHeaderGUI; - } - - static void SetAaEntry(AddressableAssetSettings aaSettings, Object[] targets, bool create) - { - - if (create && aaSettings.DefaultGroup.ReadOnly) - { - Debug.LogError("Current default group is ReadOnly. Cannot add addressable assets to it"); - return; - } - - Undo.RecordObject(aaSettings, "AddressableAssetSettings"); - string path; - var guid = string.Empty; - //if (create || EditorUtility.DisplayDialog("Remove Addressable Asset Entries", "Do you want to remove Addressable Asset entries for " + targets.Length + " items?", "Yes", "Cancel")) - { - var entriesAdded = new List(); - var modifiedGroups = new HashSet(); - - Type mainAssetType; - foreach (var t in targets) - { - if (AddressableAssetUtility.GetPathAndGUIDFromTarget(t, out path, ref guid, out mainAssetType)) - { - if (create) - { - if (AddressableAssetUtility.IsInResources(path)) - AddressableAssetUtility.SafeMoveResourcesToGroup(aaSettings, aaSettings.DefaultGroup, new List { path }); - else - { - var e = aaSettings.CreateOrMoveEntry(guid, aaSettings.DefaultGroup, false, false); - entriesAdded.Add(e); - modifiedGroups.Add(e.parentGroup); - } - } - else - aaSettings.RemoveAssetEntry(guid); - } - } - - if (create) - { - foreach (var g in modifiedGroups) - g.SetDirty(AddressableAssetSettings.ModificationEvent.EntryMoved, entriesAdded, false, true); - aaSettings.SetDirty(AddressableAssetSettings.ModificationEvent.EntryMoved, entriesAdded, true, false); - } - } - } - - static void OnPostHeaderGUI(Editor editor) - { - var aaSettings = AddressableAssetSettingsDefaultObject.Settings; - var guid = string.Empty; - AddressableAssetEntry entry = null; - - if (editor.targets.Length > 0) - { - int addressableCount = 0; - bool foundValidAsset = false; - foreach (var t in editor.targets) - { - string path; - Type mainAssetType; - if (AddressableAssetUtility.GetPathAndGUIDFromTarget(t, out path, ref guid, out mainAssetType) && - path.ToLower().Contains("assets") && - mainAssetType != null && - !BuildUtility.IsEditorAssembly(mainAssetType.Assembly)) - { - foundValidAsset = true; - - if (aaSettings != null) - { - entry = aaSettings.FindAssetEntry(guid); - if (entry != null && !entry.IsSubAsset) - { - addressableCount++; - } - } - } - } - - - if (!foundValidAsset) - return; - - if (addressableCount == 0) - { - if (GUILayout.Toggle(false, s_AddressableAssetToggleText, GUILayout.ExpandWidth(false))) - SetAaEntry(AddressableAssetSettingsDefaultObject.GetSettings(true), editor.targets, true); - } - else if (addressableCount == editor.targets.Length) - { - GUILayout.BeginHorizontal(); - if (!GUILayout.Toggle(true, s_AddressableAssetToggleText, GUILayout.ExpandWidth(false))) - SetAaEntry(aaSettings, editor.targets, false); - - if (editor.targets.Length == 1 && entry != null) - { - entry.address = EditorGUILayout.DelayedTextField(entry.address, GUILayout.ExpandWidth(true)); - } - GUILayout.EndHorizontal(); - } - else - { - GUILayout.BeginHorizontal(); - if (s_ToggleMixed == null) - s_ToggleMixed = new GUIStyle("ToggleMixed"); - if (GUILayout.Toggle(false, s_AddressableAssetToggleText, s_ToggleMixed, GUILayout.ExpandWidth(false))) - SetAaEntry(AddressableAssetSettingsDefaultObject.GetSettings(true), editor.targets, true); - EditorGUILayout.LabelField(addressableCount + " out of " + editor.targets.Length + " assets are addressable."); - GUILayout.EndHorizontal(); - } - } - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetInspectorGUI.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetInspectorGUI.cs.meta deleted file mode 100644 index 940a95df..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetInspectorGUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9ec0ed3a7d1ee3c4e808cd29000a5b70 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetLabelReferenceDrawer.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetLabelReferenceDrawer.cs deleted file mode 100644 index faad1ed7..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetLabelReferenceDrawer.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using UnityEditor.AddressableAssets; -using UnityEditor.AddressableAssets.Settings; -using UnityEngine; -using UnityEngine.AddressableAssets; - -namespace UnityEditor.AddressableAssets.GUI -{ - [CustomPropertyDrawer(typeof(AssetLabelReference), true)] - class AssetLabelReferenceDrawer : PropertyDrawer - { - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) - { - EditorGUI.BeginProperty(position, label, property); - - var currentLabel = property.FindPropertyRelative("m_LabelString"); - var smallPos = EditorGUI.PrefixLabel(position, label); - if (AddressableAssetSettingsDefaultObject.Settings == null) - { - using (new EditorGUI.DisabledScope(true)) - EditorGUI.LabelField(smallPos, new GUIContent(currentLabel.stringValue)); - } - else - { - var labelList = AddressableAssetSettingsDefaultObject.Settings.labelTable.labelNames.ToArray(); - var currIndex = Array.IndexOf(labelList, currentLabel.stringValue); - var newIndex = EditorGUI.Popup(smallPos, currIndex, labelList); - if (newIndex != currIndex) - { - currentLabel.stringValue = labelList[newIndex]; - } - } - EditorGUI.EndProperty(); - } - - } - -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetLabelReferenceDrawer.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetLabelReferenceDrawer.cs.meta deleted file mode 100644 index 5dd52184..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetLabelReferenceDrawer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2caf4b90ea25a724b8db4ffb88123a60 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetPublishEditor.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetPublishEditor.cs deleted file mode 100644 index b763e638..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetPublishEditor.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using UnityEngine; -using UnityEngine.AddressableAssets; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets.GUI -{ - [Serializable] - class AssetPublishEditor - { - [FormerlySerializedAs("scrollPosition")] - [SerializeField] - Vector2 m_ScrollPosition; - - [FormerlySerializedAs("fullBuildFoldout")] - [SerializeField] - bool m_FullBuildFoldout = true; - [FormerlySerializedAs("updateFoldout")] - [SerializeField] - bool m_UpdateFoldout = true; - [FormerlySerializedAs("snapshotPath")] - [SerializeField] - string m_SnapshotPath = "/Snapshots/ABuildSnapshot"; - - public bool OnGUI(Rect pos) - { - GUILayout.BeginArea(pos); - m_ScrollPosition = EditorGUILayout.BeginScrollView(m_ScrollPosition, false, false, GUILayout.MaxWidth(pos.width)); - - GUILayout.Space(20); - GUILayout.Label(" NOT YET FUNCTIONAL "); - GUILayout.Space(10); - - m_FullBuildFoldout = EditorGUILayout.Foldout(m_FullBuildFoldout, "Full Build"); - if (m_FullBuildFoldout) - { - EditorGUI.indentLevel++; - EditorGUILayout.HelpBox(new GUIContent("This section will create a rebuild of all content packs as well as the core player build. A snapshot of this build must be saved in order to do updates to it later.")); - GUILayout.BeginHorizontal(); - GUILayout.FlexibleSpace(); - if (GUILayout.Button("Build and Save Snapshot")) - { - Addressables.Log("we aren't actually building yet."); - } - GUILayout.EndHorizontal(); - EditorGUI.indentLevel--; - } - - GUILayout.Space(20); - - m_UpdateFoldout = EditorGUILayout.Foldout(m_UpdateFoldout, "Update Build"); - if (m_UpdateFoldout) - { - EditorGUI.indentLevel++; - EditorGUILayout.HelpBox(new GUIContent("This section will not create a core player build, and it will only create the new bundles needed when compared to a given snapshot.")); - GUILayout.BeginHorizontal(); - m_SnapshotPath = EditorGUILayout.TextField(new GUIContent("Reference Snapshot"), m_SnapshotPath); - GUILayout.Space(10); - if (GUILayout.Button("Browse")) - { - Addressables.Log("we aren't actually browsing yet."); - } - GUILayout.EndHorizontal(); - GUILayout.BeginHorizontal(); - GUILayout.FlexibleSpace(); - if (GUILayout.Button("Create Updated Packs")) - { - Addressables.Log("we aren't actually updating yet."); - } - GUILayout.EndHorizontal(); - EditorGUI.indentLevel--; - - } - - - EditorGUILayout.EndScrollView(); - GUILayout.EndArea(); - return false; - } - - internal void OnEnable() - { - - } - - internal void OnDisable() - { - - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetPublishEditor.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetPublishEditor.cs.meta deleted file mode 100644 index 76a146b1..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetPublishEditor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 28fb0900b6e316143988322b6f94201a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetReferenceDrawer.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetReferenceDrawer.cs deleted file mode 100644 index 7359ab2b..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetReferenceDrawer.cs +++ /dev/null @@ -1,736 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Net; -using System.Reflection; -using System.Text; -using UnityEditor.AddressableAssets; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.IMGUI.Controls; -using UnityEditor.SceneManagement; -using UnityEngine; -using UnityEngine.AddressableAssets; - -namespace UnityEditor.AddressableAssets.GUI -{ - using Object = UnityEngine.Object; - - [CustomPropertyDrawer(typeof(AssetReference), true)] - class AssetReferenceDrawer : PropertyDrawer - { - public string newGuid; - public string newGuidPropertyPath; - string m_AssetName; - internal Rect smallPos; - internal const string noAssetString = "None (AddressableAsset)"; - AssetReference m_AssetRefObject; - - List m_Restrictions = null; - - /// - /// Validates that the referenced asset allowable for this asset reference. - /// - /// The path to the asset in question. - /// Whether the referenced asset is valid. - public bool ValidateAsset(string path) - { - if (m_AssetRefObject != null && m_AssetRefObject.ValidateAsset(path)) - { - foreach (var restriction in m_Restrictions) - { - if (!restriction.ValidateAsset(path)) - return false; - } - return true; - } - - return false; - } - - bool SetEditorAssetWithUndo(SerializedProperty property, Object target) - { - bool success = false; - if(m_AssetRefObject != null) - { - if (m_AssetRefObject.editorAsset == target) - { - //In the event we are setting the reference to null (intentional if we want to set the reference to "None (Addressable Asset)") - //we need to clear the reference cleanly to make sure we're not holding onto an old guid of a potentially deleted/missing file. - if (target == null) - m_AssetRefObject.SetEditorAsset(null); - - return true; - } - - Undo.RecordObject(property.serializedObject.targetObject, "Assign Asset Reference"); - success = m_AssetRefObject.SetEditorAsset(target); - if (success) - { - EditorUtility.SetDirty(property.serializedObject.targetObject); - - var comp = property.serializedObject.targetObject as Component; - if (comp != null && comp.gameObject != null && comp.gameObject.activeInHierarchy) - EditorSceneManager.MarkSceneDirty(comp.gameObject.scene); - } - } - - return success; - } - - bool SetObject(SerializedProperty property, Object obj, out string guid) - { - guid = null; - try - { - if (m_AssetRefObject == null) - return false; - if (obj == null) - { - return SetEditorAssetWithUndo(property, null); - } - - long lfid; - if (AssetDatabase.TryGetGUIDAndLocalFileIdentifier(obj, out guid, out lfid)) - return SetEditorAssetWithUndo(property, obj); - } - catch (Exception e) - { - Debug.LogException(e); - } - return false; - } - - - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) - { - if (property == null || label == null) - { - Debug.LogError("Error rendering drawer for AssetReference property."); - return; - } - string labelText = label.text; - m_AssetRefObject = property.GetActualObjectForSerializedProperty(fieldInfo, ref labelText); - label.text = labelText; - if (m_AssetRefObject == null) - { - return; - } - - EditorGUI.BeginProperty(position, label, property); - - GatherFilters(property); - string guid = m_AssetRefObject.RuntimeKey.ToString(); - var aaSettings = AddressableAssetSettingsDefaultObject.Settings; - - var checkToForceAddressable = string.Empty; - if (!string.IsNullOrEmpty(newGuid) && newGuidPropertyPath == property.propertyPath) - { - if (newGuid == noAssetString) - { - SetObject(property, null, out guid); - newGuid = string.Empty; - } - else - { - if (SetObject(property, AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(newGuid)), out guid)) - { - checkToForceAddressable = newGuid; - } - newGuid = string.Empty; - } - } - - bool isNotAddressable = false; - m_AssetName = noAssetString; - Texture2D icon = null; - if (aaSettings != null && !string.IsNullOrEmpty(guid)) - { - var entry = aaSettings.FindAssetEntry(guid); - if (entry != null) - { - m_AssetName = entry.address; - icon = AssetDatabase.GetCachedIcon(entry.AssetPath) as Texture2D; - } - else - { - var path = AssetDatabase.GUIDToAssetPath(guid); - if (!string.IsNullOrEmpty(path)) - { - var dir = Path.GetDirectoryName(path); - bool foundAddr = false; - while (!string.IsNullOrEmpty(dir)) - { - var dirEntry = aaSettings.FindAssetEntry(AssetDatabase.AssetPathToGUID(dir)); - if (dirEntry != null) - { - foundAddr = true; - m_AssetName = dirEntry.address + path.Remove(0, dir.Length); - break; - } - dir = Path.GetDirectoryName(dir); - } - - if (!foundAddr) - { - m_AssetName = path; - if (!string.IsNullOrEmpty(checkToForceAddressable)) - { - var newEntry = aaSettings.CreateOrMoveEntry(guid, aaSettings.DefaultGroup); - Addressables.LogFormat("Created AddressableAsset {0} in group {1}.", newEntry.address, aaSettings.DefaultGroup.Name); - } - else - { - if (!File.Exists(path)) - { - m_AssetName = "Missing File!"; - } - else - isNotAddressable = true; - } - } - icon = AssetDatabase.GetCachedIcon(path) as Texture2D; - } - else - { - m_AssetName = "Missing File!"; - } - - } - } - - smallPos = EditorGUI.PrefixLabel(position, label); - var nameToUse = m_AssetName; - if (isNotAddressable) - nameToUse = "Not Addressable - " + nameToUse; - - if (EditorGUI.DropdownButton(smallPos, new GUIContent(nameToUse, icon, m_AssetName), FocusType.Keyboard)) - { - newGuidPropertyPath = property.propertyPath; - var nonAddressedOption = isNotAddressable ? m_AssetName : string.Empty; - PopupWindow.Show(smallPos, new AssetReferencePopup(this, guid, nonAddressedOption)); - } - - - //During the drag, doing a light check on asset validity. The in-depth check happens during a drop, and should include a log if it fails. - var rejectedDrag = false; - if (Event.current.type == EventType.DragUpdated && position.Contains(Event.current.mousePosition)) - { - if (aaSettings == null) - rejectedDrag = true; - else - { - var aaEntries = DragAndDrop.GetGenericData("AssetEntryTreeViewItem") as List; - if (aaEntries != null) - { - if (aaEntries.Count != 1) - rejectedDrag = true; - else - { - if (aaEntries[0] != null && - aaEntries[0].entry != null && - aaEntries[0].entry.IsInResources) - rejectedDrag = true; - } - } - else - { - if (DragAndDrop.paths.Length != 1) - { - rejectedDrag = true; - } - } - - } - DragAndDrop.visualMode = rejectedDrag ? DragAndDropVisualMode.Rejected : DragAndDropVisualMode.Copy; - } - - if (!rejectedDrag && Event.current.type == EventType.DragPerform && position.Contains(Event.current.mousePosition)) - { - var aaEntries = DragAndDrop.GetGenericData("AssetEntryTreeViewItem") as List; - if (aaEntries != null) - { - if (aaEntries.Count == 1) - { - var item = aaEntries[0]; - if (item.entry != null) - { - if (item.entry.IsInResources) - Addressables.LogWarning("Cannot use an AssetReference on an asset in Resources. Move asset out of Resources first."); - else - SetObject(property, AssetDatabase.LoadAssetAtPath(item.entry.AssetPath), out guid); - } - } - } - else - { - if (DragAndDrop.paths != null && DragAndDrop.paths.Length == 1) - { - var path = DragAndDrop.paths[0]; - if (AddressableAssetUtility.IsInResources(path)) - Addressables.LogWarning("Cannot use an AssetReference on an asset in Resources. Move asset out of Resources first. "); - else if(!AddressableAssetUtility.IsPathValidForEntry(path)) - Addressables.LogWarning("Dragged asset is not valid as an Asset Reference. " + path); - else - { - Object obj; - if (DragAndDrop.objectReferences != null && DragAndDrop.objectReferences.Length == 1) - obj = DragAndDrop.objectReferences[0]; - else - obj = AssetDatabase.LoadAssetAtPath(path); - - if (SetObject(property, obj, out guid)) - { - aaSettings = AddressableAssetSettingsDefaultObject.GetSettings(true); - var entry = aaSettings.FindAssetEntry(guid); - if (entry == null && !string.IsNullOrEmpty(guid)) - { - aaSettings.CreateOrMoveEntry(guid, aaSettings.DefaultGroup); - newGuid = guid; - } - } - } - } - } - } - - EditorGUI.EndProperty(); - } - - void GatherFilters(SerializedProperty property) - { - if (m_Restrictions != null) - return; - - m_Restrictions = new List(); - var o = property.serializedObject.targetObject; - if (o != null) - { - var t = o.GetType(); - - string propertyName = property.name; - int i = property.propertyPath.IndexOf('.'); - if (i > 0) - propertyName = property.propertyPath.Substring(0, i); - var f = t.GetField(propertyName); - if (f != null) - { - var a = f.GetCustomAttributes(false); - foreach (var attr in a) - { - var uiRestriction = attr as AssetReferenceUIRestriction; - if(uiRestriction != null) - m_Restrictions.Add(uiRestriction); - } - } - } - } - - } - - class AssetReferencePopup : PopupWindowContent - { - AssetReferenceTreeView m_Tree; - TreeViewState m_TreeState; - bool m_ShouldClose; - - void ForceClose() - { - m_ShouldClose = true; - } - - string m_CurrentName = string.Empty; - AssetReferenceDrawer m_Drawer; - string m_GUID; - string m_NonAddressedAsset; - - SearchField m_SearchField; - - internal AssetReferencePopup(AssetReferenceDrawer drawer, string guid, string nonAddressedAsset) - { - m_Drawer = drawer; - m_GUID = guid; - m_NonAddressedAsset = nonAddressedAsset; - m_SearchField = new SearchField(); - m_ShouldClose = false; - } - - public override void OnOpen() - { - m_SearchField.SetFocus(); - base.OnOpen(); - } - - public override Vector2 GetWindowSize() - { - Vector2 result = base.GetWindowSize(); - result.x = m_Drawer.smallPos.width; - return result; - } - - public override void OnGUI(Rect rect) - { - int border = 4; - int topPadding = 12; - int searchHeight = 20; - var searchRect = new Rect(border, topPadding, rect.width - border * 2, searchHeight); - var remainTop = topPadding + searchHeight + border; - var remainingRect = new Rect(border, topPadding + searchHeight + border, rect.width - border * 2, rect.height - remainTop - border); - m_CurrentName = m_SearchField.OnGUI(searchRect, m_CurrentName); - - if (m_Tree == null) - { - if (m_TreeState == null) - m_TreeState = new TreeViewState(); - m_Tree = new AssetReferenceTreeView(m_TreeState, m_Drawer, this, m_GUID, m_NonAddressedAsset); - m_Tree.Reload(); - } - - m_Tree.searchString = m_CurrentName; - m_Tree.OnGUI(remainingRect); - - if (m_ShouldClose) - { - GUIUtility.hotControl = 0; - editorWindow.Close(); - } - } - - sealed class AssetRefTreeViewItem : TreeViewItem - { - public string guid; - - public AssetRefTreeViewItem(int id, int depth, string displayName, string g, string path) - : base(id, depth, displayName) - { - guid = g; - icon = AssetDatabase.GetCachedIcon(path) as Texture2D; - } - } - - class AssetReferenceTreeView : TreeView - { - AssetReferenceDrawer m_Drawer; - AssetReferencePopup m_Popup; - string m_GUID; - string m_NonAddressedAsset; - Texture2D m_WarningIcon; - - public AssetReferenceTreeView(TreeViewState state, AssetReferenceDrawer drawer, AssetReferencePopup popup, string guid, string nonAddressedAsset) - : base(state) - { - m_Drawer = drawer; - m_Popup = popup; - showBorder = true; - showAlternatingRowBackgrounds = true; - m_GUID = guid; - m_NonAddressedAsset = nonAddressedAsset; - m_WarningIcon = EditorGUIUtility.FindTexture("console.warnicon"); - } - - protected override bool CanMultiSelect(TreeViewItem item) - { - return false; - } - - protected override void SelectionChanged(IList selectedIds) - { - if (selectedIds != null && selectedIds.Count == 1) - { - var assetRefItem = FindItem(selectedIds[0], rootItem) as AssetRefTreeViewItem; - if (assetRefItem != null && !string.IsNullOrEmpty(assetRefItem.guid)) - { - m_Drawer.newGuid = assetRefItem.guid; - } - else - { - m_Drawer.newGuid = AssetReferenceDrawer.noAssetString; - } - - m_Popup.ForceClose(); - } - } - - protected override IList BuildRows(TreeViewItem root) - { - if (string.IsNullOrEmpty(searchString)) - { - return base.BuildRows(root); - } - - List rows = new List(); - - foreach (var child in rootItem.children) - { - if (child.displayName.IndexOf(searchString, StringComparison.OrdinalIgnoreCase) >= 0) - rows.Add(child); - } - - return rows; - } - - protected override TreeViewItem BuildRoot() - { - var root = new TreeViewItem(-1, -1); - - var aaSettings = AddressableAssetSettingsDefaultObject.Settings; - if (aaSettings == null) - { - var message = "Use 'Window->Addressable Assets' to initialize."; - root.AddChild(new AssetRefTreeViewItem(message.GetHashCode(), 0, message, string.Empty, string.Empty)); - } - else - { - if (!string.IsNullOrEmpty(m_NonAddressedAsset)) - { - var item = new AssetRefTreeViewItem(m_NonAddressedAsset.GetHashCode(), 0, "Make Addressable - " + m_NonAddressedAsset, m_GUID, string.Empty); - item.icon = m_WarningIcon; - root.AddChild(item); - } - root.AddChild(new AssetRefTreeViewItem(AssetReferenceDrawer.noAssetString.GetHashCode(), 0, AssetReferenceDrawer.noAssetString, string.Empty, string.Empty)); - var allAssets = new List(); - aaSettings.GetAllAssets(allAssets); - foreach (var entry in allAssets) - { - if (!AddressableAssetUtility.IsInResources(entry.AssetPath) && - m_Drawer.ValidateAsset(entry.AssetPath)) - { - var child = new AssetRefTreeViewItem(entry.address.GetHashCode(), 0, entry.address, entry.guid, entry.AssetPath); - root.AddChild(child); - } - } - } - - return root; - } - } - } - - public static class SerializedPropertyExtensions - { - public static T GetActualObjectForSerializedProperty(this SerializedProperty property, FieldInfo field, ref string label) - { - try - { - if (property == null || field == null) - return default(T); - var serializedObject = property.serializedObject; - if (serializedObject == null) - { - return default(T); - } - - var targetObject = serializedObject.targetObject; - - if (property.depth > 0) - { - var slicedName = property.propertyPath.Split('.').ToList(); - List arrayCounts = new List(); - for (int index = 0; index < slicedName.Count; index++) - { - arrayCounts.Add(-1); - var currName = slicedName[index]; - if (currName.EndsWith("]")) - { - var arraySlice = currName.Split('[', ']'); - if (arraySlice.Length >= 2) - { - arrayCounts[index - 2] = Convert.ToInt32(arraySlice[1]); - slicedName[index] = string.Empty; - slicedName[index - 1] = string.Empty; - } - } - } - - while (string.IsNullOrEmpty(slicedName.Last())) - { - int i = slicedName.Count - 1; - slicedName.RemoveAt(i); - arrayCounts.RemoveAt(i); - } - - if (property.propertyPath.EndsWith("]")) - { - var slice = property.propertyPath.Split('[', ']'); - if (slice.Length >= 2) - label= "Element " + slice[slice.Length - 2]; - } - else - { - label = slicedName.Last(); - } - - return DescendHierarchy(targetObject, slicedName, arrayCounts, 0); - } - - var obj = field.GetValue(targetObject); - return (T)obj; - } - catch - { - return default(T); - } - } - - static T DescendHierarchy(object targetObject, List splitName, List splitCounts, int depth) - { - if (depth >= splitName.Count) - return default(T); - - var currName = splitName[depth]; - - if (string.IsNullOrEmpty(currName)) - return DescendHierarchy(targetObject, splitName, splitCounts, depth + 1); - - int arrayIndex = splitCounts[depth]; - - var newField = targetObject.GetType().GetField(currName, BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); - - if (newField == null) - { - Type baseType = targetObject.GetType().BaseType; - while (baseType != null && newField == null) - { - newField = baseType.GetField(currName, - BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); - baseType = baseType.BaseType; - } - } - - var newObj = newField.GetValue(targetObject); - if (depth == splitName.Count - 1) - { - T actualObject = default(T); - if (arrayIndex >= 0) - { - if (newObj.GetType().IsArray && ((System.Array)newObj).Length > arrayIndex) - actualObject = (T)((System.Array)newObj).GetValue(arrayIndex); - - var newObjList = newObj as IList; - if (newObjList != null && newObjList.Count > arrayIndex) - { - actualObject = (T)newObjList[arrayIndex]; - - //if (actualObject == null) - // actualObject = new T(); - } - } - else - { - actualObject = (T)newObj; - } - - return actualObject; - } - else if (arrayIndex >= 0) - { - if (newObj is IList) - { - IList list = (IList)newObj; - newObj = list[arrayIndex]; - } - else if (newObj is System.Array) - { - System.Array a = (System.Array)newObj; - newObj = a.GetValue(arrayIndex); - } - } - - return DescendHierarchy(newObj, splitName, splitCounts, depth + 1); - } - } - - - - - /// - /// Used to restrict an AssetReference field or property to only allow items wil specific labels. This is only enforced through the UI. - /// - [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = true)] - public class AssetReferenceUIRestriction : Attribute - { - /// - /// Validates that the referenced asset allowable for this asset reference. - /// - /// The Object to validate. - /// Whether the referenced asset is valid. - public virtual bool ValidateAsset(Object obj) - { - return true; - } - - /// - /// Validates that the referenced asset allowable for this asset reference. - /// - /// The path to the asset in question. - /// Whether the referenced asset is valid. - public virtual bool ValidateAsset(string path) - { - return true; - } - } - - /// - /// Used to restrict an AssetReference field or property to only allow items wil specific labels. This is only enforced through the UI. - /// - [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false)] - public sealed class AssetReferenceUILabelRestriction : AssetReferenceUIRestriction - { - string[] m_AllowedLabels; - string m_CachedToString; - - /// - /// Construct a new AssetReferenceLabelAttribute. - /// - /// The labels allowed for the attributed AssetReference. - public AssetReferenceUILabelRestriction(params string[] allowedLabels) - { - m_AllowedLabels = allowedLabels; - } - /// - public override string ToString() - { - if (m_CachedToString == null) - { - StringBuilder sb = new StringBuilder(); - bool first = true; - foreach (var t in m_AllowedLabels) - { - if (!first) - sb.Append(','); - first = false; - sb.Append(t); - } - m_CachedToString = sb.ToString(); - } - return m_CachedToString; - } - - /// - public override bool ValidateAsset(Object obj) - { - var path = AssetDatabase.GetAssetOrScenePath(obj); - return ValidateAsset(path); - } - - /// - public override bool ValidateAsset(string path) - { - if (AddressableAssetSettingsDefaultObject.Settings == null) - return false; - - var guid = AssetDatabase.AssetPathToGUID(path); - var entry = AddressableAssetSettingsDefaultObject.Settings.FindAssetEntry(guid); - if (entry != null) - { - foreach (var label in m_AllowedLabels) - { - if (entry.labels.Contains(label)) - return true; - } - } - return false; - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetReferenceDrawer.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetReferenceDrawer.cs.meta deleted file mode 100644 index 19de0afb..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetReferenceDrawer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7f6d95a065ad1d84fa0d05a15c369e81 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetSettingsAnalyzeTreeView.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetSettingsAnalyzeTreeView.cs deleted file mode 100644 index b915aad3..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetSettingsAnalyzeTreeView.cs +++ /dev/null @@ -1,459 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEditor; -using UnityEditor.AddressableAssets.Build.AnalyzeRules; -using UnityEditor.AddressableAssets.GUI; -using UnityEditor.IMGUI.Controls; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.GUI -{ - class AssetSettingsAnalyzeTreeView : TreeView - { - AnalyzeRuleGUI m_AnalyzeSetting; - private AnalyzeResultData resultData; - private int m_CurrentDepth; - - internal AssetSettingsAnalyzeTreeView(TreeViewState state, AnalyzeRuleGUI analyzeSetting) - : base(state) - { - m_AnalyzeSetting = analyzeSetting; - resultData = m_AnalyzeSetting.AnalyzeData; - showAlternatingRowBackgrounds = true; - showBorder = true; - - Reload(); - } - - private List GatherAllInheritRuleContainers(TreeViewItem baseContainer) - { - List retValue = new List(); - if (!baseContainer.hasChildren) - return new List(); - - foreach (var child in baseContainer.children) - { - if (child is AnalyzeRuleContainerTreeViewItem) - { - retValue.AddRange(GatherAllInheritRuleContainers(child as AnalyzeRuleContainerTreeViewItem)); - retValue.Add(child as AnalyzeRuleContainerTreeViewItem); - } - } - - return retValue; - } - - private void PerformActionForEntireRuleSelection(Action action) - { - List activeSelection = (from id in GetSelection() - let selection = FindItem(id, rootItem) - where selection is AnalyzeRuleContainerTreeViewItem - select selection as AnalyzeRuleContainerTreeViewItem).ToList(); - - List inheritSelection = new List(); - foreach (var selected in activeSelection) - inheritSelection.AddRange(GatherAllInheritRuleContainers(selected)); - - List entireSelection = activeSelection.Union(inheritSelection).ToList(); - - foreach (AnalyzeRuleContainerTreeViewItem ruleContainer in entireSelection) - { - if (ruleContainer.analyzeRule != null) - { - action(ruleContainer); - } - } - } - - public void RunAllSelectedRules() - { - PerformActionForEntireRuleSelection((ruleContainer) => - { - if (resultData.Data.ContainsKey(ruleContainer.analyzeRule.ruleName)) - { - var results = ruleContainer.analyzeRule.RefreshAnalysis(m_AnalyzeSetting.Settings); - resultData.Data[ruleContainer.analyzeRule.ruleName] = results; - - BuildResults(ruleContainer, resultData.Data[ruleContainer.analyzeRule.ruleName]); - Reload(); - UpdateSelections(GetSelection()); - } - }); - } - - public void FixAllSelectedRules() - { - PerformActionForEntireRuleSelection((ruleContainer) => - { - if (resultData.Data.ContainsKey(ruleContainer.analyzeRule.ruleName)) - { - ruleContainer.analyzeRule.FixIssues(m_AnalyzeSetting.Settings); - - var results = ruleContainer.analyzeRule.RefreshAnalysis(m_AnalyzeSetting.Settings); - resultData.Data[ruleContainer.analyzeRule.ruleName] = results; - - BuildResults(ruleContainer, resultData.Data[ruleContainer.analyzeRule.ruleName]); - Reload(); - UpdateSelections(GetSelection()); - } - - }); - } - - public void ClearAllSelectedRules() - { - PerformActionForEntireRuleSelection((ruleContainer) => - { - if (resultData.Data.ContainsKey(ruleContainer.analyzeRule.ruleName)) - { - ruleContainer.analyzeRule.ClearAnalysis(); - resultData.Data[ruleContainer.analyzeRule.ruleName].Clear(); - BuildResults(ruleContainer, resultData.Data[ruleContainer.analyzeRule.ruleName]); - Reload(); - UpdateSelections(GetSelection()); - } - }); - } - - public void RevertAllSelectedRules() - { - //TODO - } - - public bool SelectionContainsFixableRule { get; private set; } - public bool SelectionContainsRuleContainer { get; private set; } - - public bool SelectionContainsErrors { get; private set; } - - protected override void SelectionChanged(IList selectedIds) - { - UpdateSelections(selectedIds); - } - - void UpdateSelections(IList selectedIds) - { - var allSelectedRuleContainers = (from id in selectedIds - let ruleContainer = FindItem(id, rootItem) as AnalyzeRuleContainerTreeViewItem - where ruleContainer != null - select ruleContainer); - - List allRuleContainers = new List(); - foreach (var ruleContainer in allSelectedRuleContainers) - { - allRuleContainers.AddRange(GatherAllInheritRuleContainers(ruleContainer)); - allRuleContainers.Add(ruleContainer); - } - - allRuleContainers = allRuleContainers.Distinct().ToList(); - - SelectionContainsErrors = (from container in allRuleContainers - from child in container.children - where child is AnalyzeResultsTreeViewItem && (child as AnalyzeResultsTreeViewItem).IsError - select child).Any(); - - SelectionContainsRuleContainer = allRuleContainers.Any(); - - SelectionContainsFixableRule = (from container in allRuleContainers - where container.analyzeRule.CanFix - select container).Any(); - } - - protected override void ContextClicked() - { - if (SelectionContainsRuleContainer) - { - GenericMenu menu = new GenericMenu(); - menu.AddItem(new GUIContent("Run Analyze Rule"), false, RunAllSelectedRules); - menu.AddItem(new GUIContent("Clear Analyze Results"), false, ClearAllSelectedRules); - - if (SelectionContainsFixableRule && SelectionContainsErrors) - menu.AddItem(new GUIContent("Fix Analyze Rule"), false, FixAllSelectedRules); - else - menu.AddDisabledItem(new GUIContent("Fix Analyze Rule")); - - //TODO - //menu.AddItem(new GUIContent("Revert Analyze Rule"), false, RevertAllSelectedRules); - - menu.ShowAsContext(); - Repaint(); - } - } - - protected override TreeViewItem BuildRoot() - { - m_CurrentDepth = 0; - var root = new TreeViewItem(-1, -1); - root.children = new List(); - - string baseName = "Analyze Rules"; - string fixableRules = "Fixable Rules"; - string unfixableRules = "Unfixable Rules"; - - AnalyzeRuleContainerTreeViewItem baseViewItem = new AnalyzeRuleContainerTreeViewItem(baseName.GetHashCode(), m_CurrentDepth, baseName); - baseViewItem.children = new List(); - baseViewItem.analyzeRule.CanFix = true; - - root.AddChild(baseViewItem); - - m_CurrentDepth++; - - var fixable = new AnalyzeRuleContainerTreeViewItem(fixableRules.GetHashCode(), m_CurrentDepth, fixableRules); - var unfixable = new AnalyzeRuleContainerTreeViewItem(unfixableRules.GetHashCode(), m_CurrentDepth, unfixableRules); - - fixable.analyzeRule.CanFix = true; - unfixable.analyzeRule.CanFix = false; - - baseViewItem.AddChild(fixable); - baseViewItem.AddChild(unfixable); - - m_CurrentDepth++; - - for (int i = 0; i < AnalyzeRuleGUI.Rules.Count; i++) - { - AnalyzeRuleContainerTreeViewItem ruleContainer = new AnalyzeRuleContainerTreeViewItem( - AnalyzeRuleGUI.Rules[i].ruleName.GetHashCode(), m_CurrentDepth, AnalyzeRuleGUI.Rules[i]); - - if(ruleContainer.analyzeRule.CanFix) - fixable.AddChild(ruleContainer); - else - unfixable.AddChild(ruleContainer); - - } - - m_CurrentDepth++; - - int index = 0; - var ruleContainers = GatherAllInheritRuleContainers(baseViewItem); - foreach (var ruleContainer in ruleContainers) - { - - if (ruleContainer != null && resultData.Data.ContainsKey(ruleContainer.analyzeRule.ruleName)) - { - EditorUtility.DisplayProgressBar("Calculating Results for " + ruleContainer.displayName, "", (index / ruleContainers.Count) % 100); - BuildResults(ruleContainer, resultData.Data[ruleContainer.analyzeRule.ruleName]); - } - - index++; - } - - EditorUtility.ClearProgressBar(); - return root; - } - - private readonly Dictionary hashToTreeViewItems = new Dictionary(); - void BuildResults(TreeViewItem root, List ruleResults) - { - hashToTreeViewItems.Clear(); - LinkedList treeViewItems = new LinkedList(); - - hashToTreeViewItems.Add(root.id, root); - float index = 0; - - - //preprocess nodes - foreach (var result in ruleResults) - { - var resPath = result.resultName.Split(AnalyzeRule.kDelimiter); - string name = string.Empty; - - for (int i = 0; i < resPath.Length; i++) - { - int parentHash = name.GetHashCode(); - if (string.IsNullOrEmpty(name)) - parentHash = root.id; - name += resPath[i]; - int hash = name.GetHashCode(); - - if (hash == root.id) - treeViewItems.AddLast(root); - else - { - AnalyzeResultsTreeViewItem item = new AnalyzeResultsTreeViewItem(hash, i + m_CurrentDepth, resPath[i], parentHash, result.severity); - item.children = new List(); - treeViewItems.AddLast(item); - } - } - - index++; - } - - //create dictionary - foreach (var item in treeViewItems) - { - if (item != null) - { - if (!hashToTreeViewItems.ContainsKey(item.id)) - hashToTreeViewItems.Add(item.id, item); - } - } - - //Build results tree - index = 0; - foreach (var hash in hashToTreeViewItems.Keys) - { - EditorUtility.DisplayProgressBar("Building Results Tree.", hashToTreeViewItems[hash].displayName, (index / hashToTreeViewItems.Keys.Count) % 100); - - TreeViewItem item; - if (hashToTreeViewItems.TryGetValue(hash, out item)) - { - if ((item as AnalyzeResultsTreeViewItem) != null && hashToTreeViewItems.ContainsKey((item as AnalyzeResultsTreeViewItem).parentHash)) - { - var parent = hashToTreeViewItems[(item as AnalyzeResultsTreeViewItem).parentHash]; - - if (parent.id != item.id) - parent.AddChild(item); - } - } - - index++; - } - - EditorUtility.ClearProgressBar(); - - List allTreeViewItems = new List(); - allTreeViewItems.Add(root); - allTreeViewItems.AddRange(root.children); - - foreach (var node in allTreeViewItems) - (node as AnalyzeTreeViewItemBase)?.AddIssueCountToName(); - - EditorUtility.SetDirty(m_AnalyzeSetting.AnalyzeData); - } - - protected override void RowGUI(RowGUIArgs args) - { - var item = args.item as AnalyzeResultsTreeViewItem; - if (item != null && item.severity != MessageType.None) - { - Texture2D icon = null; - switch (item.severity) - { - case MessageType.Info: - icon = GetInfoIcon(); - break; - case MessageType.Warning: - icon = GetWarningIcon(); - break; - case MessageType.Error: - icon = GetErrorIcon(); - break; - } - - UnityEngine.GUI.Label( - new Rect(args.rowRect.x + baseIndent, args.rowRect.y, args.rowRect.width - baseIndent, - args.rowRect.height), new GUIContent(icon, string.Empty)); - } - - base.RowGUI(args); - } - - Texture2D m_ErrorIcon; - Texture2D m_WarningIcon; - Texture2D m_InfoIcon; - - Texture2D GetErrorIcon() - { - if (m_ErrorIcon == null) - FindMessageIcons(); - return m_ErrorIcon; - } - - Texture2D GetWarningIcon() - { - if (m_WarningIcon == null) - FindMessageIcons(); - return m_WarningIcon; - } - - Texture2D GetInfoIcon() - { - if (m_InfoIcon == null) - FindMessageIcons(); - return m_InfoIcon; - } - - void FindMessageIcons() - { - m_ErrorIcon = EditorGUIUtility.FindTexture("console.errorIcon"); - m_WarningIcon = EditorGUIUtility.FindTexture("console.warnicon"); - m_InfoIcon = EditorGUIUtility.FindTexture("console.infoIcon"); - } - } - - class AnalyzeTreeViewItemBase : TreeViewItem - { - private string baseDisplayName; - private string currentDisplayName; - - public override string displayName - { - get { return currentDisplayName; } - set { baseDisplayName = value; } - - } - - public AnalyzeTreeViewItemBase(int id, int depth, string displayName) : base(id, depth, - displayName) - { - currentDisplayName = baseDisplayName = displayName; - } - - public int AddIssueCountToName() - { - int issueCount = 0; - if (children != null) - { - foreach (var child in children) - { - var analyzeNode = child as AnalyzeResultsTreeViewItem; - if (analyzeNode != null) - issueCount += analyzeNode.AddIssueCountToName(); - } - } - - if (issueCount == 0) - return 1; - - currentDisplayName = baseDisplayName + " (" + issueCount + ")"; - return issueCount; - } - } - - class AnalyzeResultsTreeViewItem : AnalyzeTreeViewItemBase - { - public MessageType severity { get; set; } - public int parentHash { get; set; } - - public bool IsError - { - get { return !displayName.Contains("No issues found"); } - } - - public AnalyzeResultsTreeViewItem(int id, int depth, string displayName, int parent, MessageType type) : base(id, depth, - displayName) - { - severity = type; - parentHash = parent; - } - - } - - class AnalyzeRuleContainerTreeViewItem : AnalyzeTreeViewItemBase - { - internal AnalyzeRule analyzeRule; - - public AnalyzeRuleContainerTreeViewItem(int id, int depth, AnalyzeRule rule) : base(id, depth, rule.ruleName) - { - analyzeRule = rule; - children = new List(); - } - - public AnalyzeRuleContainerTreeViewItem(int id, int depth, string displayName) : base(id, depth, displayName) - { - analyzeRule = new AnalyzeRule(); - children = new List(); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetSettingsAnalyzeTreeView.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetSettingsAnalyzeTreeView.cs.meta deleted file mode 100644 index f2c47f36..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/AssetSettingsAnalyzeTreeView.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: de7854a5f7ef2054dbf92514bee6d796 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/BuildProfileSettingsEditor.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/BuildProfileSettingsEditor.cs deleted file mode 100644 index 0744315e..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/BuildProfileSettingsEditor.cs +++ /dev/null @@ -1,118 +0,0 @@ -using System; -using UnityEditor.AddressableAssets.Settings; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.GUI -{ - class ProfilesEditor - { - public static string ValueGUILayout(AddressableAssetSettings settings, string label, string currentId) - { - string result = currentId; - if (settings == null) - return result; - - var displayNames = settings.profileSettings.GetVariableNames(); - AddressableAssetProfileSettings.ProfileIdData data = settings.profileSettings.GetProfileDataById(currentId); - bool custom = data == null; - - int currentIndex = displayNames.Count; - string toolTip = string.Empty; - if (!custom) - { - currentIndex = displayNames.IndexOf(data.ProfileName); - toolTip = data.Evaluate(settings.profileSettings, settings.activeProfileId); - } - displayNames.Add(AddressableAssetProfileSettings.customEntryString); - - - var content = new GUIContent(label, toolTip); - EditorGUILayout.BeginHorizontal(); - var newIndex = EditorGUILayout.Popup(content, currentIndex, displayNames.ToArray()); - if (newIndex != currentIndex) - { - if (displayNames[newIndex] == AddressableAssetProfileSettings.customEntryString) - { - custom = true; - result = AddressableAssetProfileSettings.undefinedEntryValue; - } - else - { - data = settings.profileSettings.GetProfileDataByName(displayNames[newIndex]); - if (data != null) - result = data.Id; - } - } - EditorGUILayout.EndHorizontal(); - EditorGUI.indentLevel += 1; - if (custom) - result = EditorGUILayout.TextField(result); - else if (!string.IsNullOrEmpty(toolTip)) - EditorGUILayout.HelpBox(toolTip, MessageType.None); - EditorGUI.indentLevel -= 1; - return result; - } - - public static float CalcGUIHeight(AddressableAssetSettings settings, string label, string currentId) - { - var labelContent = new GUIContent(label); - var size = EditorStyles.popup.CalcSize(labelContent); - var height = size.y + EditorGUIUtility.standardVerticalSpacing; - AddressableAssetProfileSettings.ProfileIdData data = settings.profileSettings.GetProfileDataById(currentId); - if (data != null) - { - var val = data.Evaluate(settings.profileSettings, settings.activeProfileId); - var h = EditorStyles.helpBox.CalcHeight(new GUIContent(val), EditorGUIUtility.currentViewWidth - 20); - return height + h; - } - return height + EditorStyles.textField.CalcHeight(new GUIContent(currentId), EditorGUIUtility.currentViewWidth - 20); - } - - public static string ValueGUI(Rect rect, AddressableAssetSettings settings, string label, string currentId) - { - string result = currentId; - if (settings == null) - return result; - - var displayNames = settings.profileSettings.GetVariableNames(); - AddressableAssetProfileSettings.ProfileIdData data = settings.profileSettings.GetProfileDataById(currentId); - bool custom = data == null; - - int currentIndex = displayNames.Count; - string toolTip = string.Empty; - if (!custom) - { - currentIndex = displayNames.IndexOf(data.ProfileName); - toolTip = data.Evaluate(settings.profileSettings, settings.activeProfileId); - } - displayNames.Add(AddressableAssetProfileSettings.customEntryString); - - var labelContent = new GUIContent(label); - var size = EditorStyles.popup.CalcSize(labelContent); - var topRect = new Rect(rect.x, rect.y, rect.width, size.y); - - var newIndex = EditorGUI.Popup(topRect, label, currentIndex, displayNames.ToArray()); - if (newIndex != currentIndex) - { - if (displayNames[newIndex] == AddressableAssetProfileSettings.customEntryString) - { - custom = true; - result = AddressableAssetProfileSettings.undefinedEntryValue; - } - else - { - data = settings.profileSettings.GetProfileDataByName(displayNames[newIndex]); - if (data != null) - result = data.Id; - } - } - var bottomRect = new Rect(rect.x + 10, rect.y + size.y + EditorGUIUtility.standardVerticalSpacing, rect.width - 20, rect.height - (size.y + EditorGUIUtility.standardVerticalSpacing)); - if (custom) - result = EditorGUI.TextField(bottomRect, result); - else if (!string.IsNullOrEmpty(toolTip)) - EditorGUI.HelpBox(bottomRect, toolTip, MessageType.None); - return result; - } - - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/BuildProfileSettingsEditor.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/BuildProfileSettingsEditor.cs.meta deleted file mode 100644 index 35d824fa..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/BuildProfileSettingsEditor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d6c922e734ba25649a6af8e03e27a324 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/CacheInitializationDataDrawer.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/CacheInitializationDataDrawer.cs deleted file mode 100644 index 4f7dd203..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/CacheInitializationDataDrawer.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System; -using UnityEngine; -using UnityEngine.AddressableAssets.Initialization; - -namespace UnityEditor.AddressableAssets.GUI -{ - [CustomPropertyDrawer(typeof(CacheInitializationData), true)] - class CacheInitializationDataDrawer : PropertyDrawer - { - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) - { - var s = EditorStyles.label.CalcSize(label); - EditorGUI.BeginProperty(position, label, property); - var r = new Rect(position.x, position.y, position.width, s.y); - - { - var prop = property.FindPropertyRelative("m_CompressionEnabled"); - prop.boolValue = EditorGUI.Toggle(r, new GUIContent("Compress Bundles", "Bundles are recompressed into LZ4 format to optimize load times."), prop.boolValue); - r.y += s.y + EditorGUIUtility.standardVerticalSpacing; - } - - - { - var prop = property.FindPropertyRelative("m_CacheDirectoryOverride"); - prop.stringValue = EditorGUI.TextField(r, new GUIContent("Cache Directory Override", "Specify custom directory for cache. Leave blank for default."), prop.stringValue); - r.y += s.y + EditorGUIUtility.standardVerticalSpacing; - } - - { - var prop = property.FindPropertyRelative("m_ExpirationDelay"); - prop.intValue = EditorGUI.IntSlider(r, new GUIContent("Expiration Delay (in seconds)", "Controls how long items are left in the cache before deleting."), prop.intValue, 0, 12960000); - r.y += s.y + EditorGUIUtility.standardVerticalSpacing; - var ts = new TimeSpan(0, 0, prop.intValue ); - EditorGUI.LabelField(new Rect(r.x + 16, r.y, r.width - 16, r.height), new GUIContent(NicifyTimeSpan(ts))); - - r.y += s.y + EditorGUIUtility.standardVerticalSpacing; - } - - { - var limProp = property.FindPropertyRelative("m_LimitCacheSize"); - limProp.boolValue = EditorGUI.ToggleLeft(r, new GUIContent("Limit Cache Size"), limProp.boolValue); - if (limProp.boolValue) - { - var prop = property.FindPropertyRelative("m_MaximumCacheSize"); - if (prop.longValue == long.MaxValue) - prop.longValue = (1024 * 1024 * 1024);//default to 1GB - - r.y += s.y + EditorGUIUtility.standardVerticalSpacing; - var mb = (prop.longValue / (1024 * 1024)); - var val = EditorGUI.LongField(new Rect(r.x + 16, r.y, r.width - 16, r.height), new GUIContent("Maximum Cache Size (in MB)", "Controls how large the cache can get before deleting."), mb); - if (val != mb) - prop.longValue = val * (1024 * 1024); - } - } - EditorGUI.EndProperty(); - } - - string NicifyTimeSpan(TimeSpan ts) - { - if (ts.Days >= 1) - return string.Format("{0} days, {1} hours, {2} minutes, {3} seconds.", ts.Days, ts.Hours, ts.Minutes, ts.Seconds); - if (ts.Hours >= 1) - return string.Format("{0} hours, {1} minutes, {2} seconds.", ts.Hours, ts.Minutes, ts.Seconds); - if (ts.Minutes >= 1) - return string.Format("{0} minutes, {1} seconds.", ts.Minutes, ts.Seconds); - return string.Format("{0} seconds.", ts.Seconds); - } - - public override float GetPropertyHeight(SerializedProperty property, GUIContent label) - { - var s = EditorStyles.label.CalcSize(label); - return s.y * 5 + EditorGUIUtility.standardVerticalSpacing * 4; - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/CacheInitializationDataDrawer.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/CacheInitializationDataDrawer.cs.meta deleted file mode 100644 index ac5903bd..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/CacheInitializationDataDrawer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2f6c3fe4244bf1b4eb6ff845821aa417 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/ContentUpdatePreviewWindow.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/ContentUpdatePreviewWindow.cs deleted file mode 100644 index f1d191d9..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/ContentUpdatePreviewWindow.cs +++ /dev/null @@ -1,223 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.AddressableAssets.Build; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.IMGUI.Controls; -using UnityEngine; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets.GUI -{ - class ContentUpdatePreviewWindow : EditorWindow - { - /// - /// Opens ContentUpdatePreviewWindow. - /// - /// - /// - /// True if successful; false if otherwise (failed to get modified entries). - public static bool PrepareForContentUpdate(AddressableAssetSettings settings, string buildPath) - { - var modifiedEntries = ContentUpdateScript.GatherModifiedEntries(settings, buildPath); - if (modifiedEntries == null) - return false; - var previewWindow = GetWindow(); - previewWindow.Show(settings, modifiedEntries); - return true; - } - - void OnEnable() - { - titleContent = new GUIContent("Content Update Preview"); - } - - - class ContentUpdateTreeView : TreeView - { - class Item : TreeViewItem - { - internal AddressableAssetEntry entry; - internal bool enabled; - public Item(AddressableAssetEntry entry) : base(entry.guid.GetHashCode()) - { - this.entry = entry; - enabled = true; - } - } - - ContentUpdatePreviewWindow m_Preview; - public ContentUpdateTreeView(ContentUpdatePreviewWindow preview, TreeViewState state, MultiColumnHeaderState mchs) : base(state, new MultiColumnHeader(mchs)) - { - m_Preview = preview; - } - - internal List GetEnabledEntries() - { - var result = new List(); - foreach (var i in GetRows()) - { - var item = i as Item; - if (item != null) - { - if (item.enabled) - result.Add(item.entry); - } - } - return result; - } - - protected override TreeViewItem BuildRoot() - { - var root = new TreeViewItem(-1, -1); - root.children = new List(); - foreach (var k in m_Preview.m_Entries) - root.AddChild(new Item(k)); - - return root; - } - - protected override void RowGUI(RowGUIArgs args) - { - var item = args.item as Item; - if (item == null) - { - base.RowGUI(args); - return; - } - for (int i = 0; i < args.GetNumVisibleColumns(); ++i) - { - CellGUI(args.GetCellRect(i), item, args.GetColumn(i)); - } - } - - void CellGUI(Rect cellRect, Item item, int column) - { - if (column == 0) - { - item.enabled = EditorGUI.Toggle(cellRect, item.enabled); - } - else if (column == 1) - { - EditorGUI.LabelField(cellRect, item.entry.address); - } - else if (column == 2) - { - EditorGUI.LabelField(cellRect, item.entry.AssetPath); - } - else if(column == 3) - { - EditorGUI.LabelField(cellRect, item.entry.parentGroup.Name); - } - } - - internal static MultiColumnHeaderState CreateDefaultMultiColumnHeaderState() - { - var retVal = new MultiColumnHeaderState.Column[4]; - retVal[0] = new MultiColumnHeaderState.Column(); - retVal[0].headerContent = new GUIContent("Include", "Include change in Update"); - retVal[0].minWidth = 50; - retVal[0].width = 50; - retVal[0].maxWidth = 50; - retVal[0].headerTextAlignment = TextAlignment.Left; - retVal[0].canSort = true; - retVal[0].autoResize = true; - - retVal[1] = new MultiColumnHeaderState.Column(); - retVal[1].headerContent = new GUIContent("Address", "Data Value"); - retVal[1].minWidth = 300; - retVal[1].width = 300; - retVal[1].maxWidth = 1000; - retVal[1].headerTextAlignment = TextAlignment.Left; - retVal[1].canSort = true; - retVal[1].autoResize = true; - - retVal[2] = new MultiColumnHeaderState.Column(); - retVal[2].headerContent = new GUIContent("Path", "Asset Path"); - retVal[2].minWidth = 300; - retVal[2].width = 300; - retVal[2].maxWidth = 1000; - retVal[2].headerTextAlignment = TextAlignment.Left; - retVal[2].canSort = true; - retVal[2].autoResize = true; - - retVal[3] = new MultiColumnHeaderState.Column(); - retVal[3].headerContent = new GUIContent("Modified Group", "The modified Addressable group"); - retVal[3].minWidth = 300; - retVal[3].width = 300; - retVal[3].maxWidth = 1000; - retVal[3].headerTextAlignment = TextAlignment.Left; - retVal[3].canSort = true; - retVal[3].autoResize = true; - - return new MultiColumnHeaderState(retVal); - } - } - - AddressableAssetSettings m_Settings; - List m_Entries; - Vector2 m_ScrollPosition; - ContentUpdateTreeView m_Tree; - [FormerlySerializedAs("treeState")] - [SerializeField] - TreeViewState m_TreeState; - [FormerlySerializedAs("mchs")] - [SerializeField] - MultiColumnHeaderState m_Mchs; - - public void Show(AddressableAssetSettings settings, List entries) - { - m_Settings = settings; - m_Entries = entries; - Show(); - } - - public void OnGUI() - { - if (m_Entries == null) - return; - Rect contentRect = new Rect(0, 0, position.width, position.height - 50); - - if (m_Tree == null) - { - if (m_TreeState == null) - m_TreeState = new TreeViewState(); - - var headerState = ContentUpdateTreeView.CreateDefaultMultiColumnHeaderState(); - if (MultiColumnHeaderState.CanOverwriteSerializedFields(m_Mchs, headerState)) - MultiColumnHeaderState.OverwriteSerializedFields(m_Mchs, headerState); - m_Mchs = headerState; - - m_Tree = new ContentUpdateTreeView(this, m_TreeState, m_Mchs); - m_Tree.Reload(); - } - - if (m_Entries.Count == 0) - { - GUILayout.BeginArea(contentRect); - GUILayout.BeginVertical(); - - GUILayout.Label("No Addressable groups with a BundledAssetGroupSchema and ContentUpdateGroupSchema (with StaticContent enabled) appear to have been modified."); - - GUILayout.EndVertical(); - GUILayout.EndArea(); - } - else - m_Tree.OnGUI(contentRect); - - GUILayout.BeginArea(new Rect(0, position.height - 50, position.width, 50)); - GUILayout.BeginHorizontal(); - if (GUILayout.Button("Cancel")) - Close(); - using (new EditorGUI.DisabledScope(m_Tree.GetEnabledEntries().Count == 0)) - { - if (GUILayout.Button("Apply Changes")) - { - ContentUpdateScript.CreateContentUpdateGroup(m_Settings, m_Tree.GetEnabledEntries(), "Content Update"); - Close(); - } - } - GUILayout.EndHorizontal(); - GUILayout.EndArea(); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/ContentUpdatePreviewWindow.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/ContentUpdatePreviewWindow.cs.meta deleted file mode 100644 index 7f102126..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/ContentUpdatePreviewWindow.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d5db91ce60c3e4e44907fbbadd68e6f4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/HostingServicesAddServiceWindow.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/HostingServicesAddServiceWindow.cs deleted file mode 100644 index 0d2a32e1..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/HostingServicesAddServiceWindow.cs +++ /dev/null @@ -1,129 +0,0 @@ -using System; -using UnityEditor.AddressableAssets.HostingServices; -using UnityEditor.AddressableAssets.Settings; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.GUI -{ - class HostingServicesAddServiceWindow : EditorWindow - { - MonoScript m_Script; - string m_HostingName; - bool m_UseCustomScript; - AddressableAssetSettings m_Settings; - Type[] m_ServiceTypes; - string[] m_ServiceTypeNames; - int m_ServiceTypeIndex; - - /// - /// Initialize the dialog for the given - /// - /// - public void Initialize(AddressableAssetSettings settings) - { - m_Settings = settings; - m_HostingName = string.Format("My Hosting Service {0}", m_Settings.HostingServicesManager.NextInstanceId); - PopulateServiceTypes(); - } - - void PopulateServiceTypes() - { - if (m_Settings == null) return; - m_ServiceTypes = m_Settings.HostingServicesManager.RegisteredServiceTypes; - m_ServiceTypeNames = new string[m_ServiceTypes.Length]; - for (var i = 0; i < m_ServiceTypes.Length; i++) - m_ServiceTypeNames[i] = m_ServiceTypes[i].Name; - } - - void OnGUI() - { - if (m_Settings == null) return; - var toggleState = !m_UseCustomScript; - - EditorGUILayout.BeginHorizontal(); - { - toggleState = GUILayout.Toggle(toggleState, " Service Type", "Radio"); - m_UseCustomScript = !toggleState; - - using (new EditorGUI.DisabledScope(m_UseCustomScript)) - m_ServiceTypeIndex = EditorGUILayout.Popup(m_ServiceTypeIndex, m_ServiceTypeNames); - } - EditorGUILayout.EndHorizontal(); - - toggleState = m_UseCustomScript; - toggleState = GUILayout.Toggle(toggleState, " Custom", "Radio"); - m_UseCustomScript = toggleState; - - if (m_UseCustomScript) - { - EditorGUILayout.HelpBox("Select a script that implements the IHostingService interface.", MessageType.Info); - var script = - EditorGUILayout.ObjectField("Hosting Service Script", m_Script, typeof(MonoScript), false) as MonoScript; - - if (script != m_Script && script != null) - { - var scriptType = script.GetClass(); - if (scriptType == null) - { - EditorUtility.DisplayDialog("Error", "Unable to find a valid type from the specified script.", "Ok"); - m_Script = null; - } - else if (scriptType.IsAbstract) - { - EditorUtility.DisplayDialog("Error", "Script cannot be an Abstract class", "Ok"); - m_Script = null; - } - else if (!typeof(IHostingService).IsAssignableFrom(scriptType)) - { - EditorUtility.DisplayDialog("Error", "Selected script does not implement the IHostingService interface", "Ok"); - m_Script = null; - } - else - { - m_Script = script; - } - } - } - - m_HostingName = EditorGUILayout.TextField("Descriptive EventName", m_HostingName); - - EditorGUILayout.BeginHorizontal(); - { - GUILayout.FlexibleSpace(); - - if (GUILayout.Button("Cancel", GUILayout.MaxWidth(75f))) - { - Close(); - FocusWindowIfItsOpen(); - } - - var okDisabled = string.IsNullOrEmpty(m_HostingName) || (m_UseCustomScript && m_Script == null); - using (new EditorGUI.DisabledGroupScope(okDisabled)) - { - if (GUILayout.Button("Add", GUILayout.MaxWidth(75f))) - { - try - { - var t = m_UseCustomScript && m_Script != null - ? m_Script.GetClass() - : m_ServiceTypes[m_ServiceTypeIndex]; - - m_Settings.HostingServicesManager.AddHostingService(t, m_HostingName); - } - finally - { - Close(); - FocusWindowIfItsOpen(); - } - } - } - } - EditorGUILayout.EndHorizontal(); - } - - void OnEnable() - { - PopulateServiceTypes(); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/HostingServicesAddServiceWindow.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/HostingServicesAddServiceWindow.cs.meta deleted file mode 100644 index 4906f2db..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/HostingServicesAddServiceWindow.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a0b38e81794b245a7a71fc9c19242c85 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/HostingServicesProfileVarsTreeView.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/HostingServicesProfileVarsTreeView.cs deleted file mode 100644 index e96520ae..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/HostingServicesProfileVarsTreeView.cs +++ /dev/null @@ -1,144 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.IMGUI.Controls; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.GUI -{ - class HostingServicesProfileVarsTreeView : TreeView - { - class ProfileVarItem : TreeViewItem - { - public string Key { get; private set; } - public string Value { get; set; } - - public ProfileVarItem(string key, string value) - { - Key = key; - Value = value; - } - } - - protected override void ContextClickedItem(int id) - { - var item = FindItem(id, rootItem) as ProfileVarItem; - if (item == null) return; - - var menu = new GenericMenu(); - menu.AddItem(new GUIContent("Copy Key"), false, () => EditorGUIUtility.systemCopyBuffer = string.Format("[{0}]", item.Key)); - menu.AddItem(new GUIContent("Copy Value"), false, () => EditorGUIUtility.systemCopyBuffer = item.Value); - menu.ShowAsContext(); - } - - public static MultiColumnHeader CreateHeader() - { - var columns = new[] - { - new MultiColumnHeaderState.Column - { - headerContent = new GUIContent("Profile Variable"), - headerTextAlignment = TextAlignment.Left, - sortedAscending = true, - sortingArrowAlignment = TextAlignment.Right, - width = 180, - minWidth = 60, - autoResize = true - }, - new MultiColumnHeaderState.Column - { - headerContent = new GUIContent("Value"), - headerTextAlignment = TextAlignment.Left, - sortedAscending = true, - sortingArrowAlignment = TextAlignment.Right, - width = 180, - minWidth = 60, - autoResize = true - } - }; - - var header = new MultiColumnHeader(new MultiColumnHeaderState(columns)) - { - height = 20f - }; - - return header; - } - - readonly Dictionary m_ItemMap; - - public float RowHeight - { - get { return rowHeight; } - } - - public HostingServicesProfileVarsTreeView(TreeViewState state, MultiColumnHeader multiColumnHeader) : base(state, multiColumnHeader) - { - showBorder = true; - showAlternatingRowBackgrounds = true; - m_ItemMap = new Dictionary(); - Reload(); - } - - public void ClearItems() - { - m_ItemMap.Clear(); - } - - public void AddOrUpdateItem(string key, string value) - { - if (m_ItemMap.ContainsKey(key)) - { - if (m_ItemMap[key].Value == value) - return; - - m_ItemMap[key].Value = value; - Reload(); - return; - } - - var item = new ProfileVarItem(key, value) {id = m_ItemMap.Count}; - m_ItemMap.Add(key, item); - Reload(); - } - - protected override TreeViewItem BuildRoot() - { - var root = new TreeViewItem(-1, -1) {children = new List()}; - foreach (var item in m_ItemMap.Values) - root.AddChild(item); - - return root; - } - - protected override void RowGUI(RowGUIArgs args) - { - for (var i = 0; i < args.GetNumVisibleColumns(); ++i) - { - CellGui(ref args, i); - } - } - - void CellGui(ref RowGUIArgs args, int i) - { - var cellRect = args.GetCellRect(i); - CenterRectUsingSingleLineHeight(ref cellRect); - var item = args.item as ProfileVarItem; - if (item == null) return; - - switch (args.GetColumn(i)) - { - case 0: - EditorGUI.LabelField(cellRect, item.Key); - break; - case 1: - EditorGUI.LabelField(cellRect, item.Value); - break; - } - } - - protected override bool CanMultiSelect(TreeViewItem item) - { - return false; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/HostingServicesProfileVarsTreeView.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/HostingServicesProfileVarsTreeView.cs.meta deleted file mode 100644 index c27acd67..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/HostingServicesProfileVarsTreeView.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8616508a31d0c47989ed4cdef04c5f7f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/HostingServicesWindow.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/HostingServicesWindow.cs deleted file mode 100644 index 560d522d..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/HostingServicesWindow.cs +++ /dev/null @@ -1,305 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.AddressableAssets; -using UnityEditor.AddressableAssets.HostingServices; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.IMGUI.Controls; -using UnityEngine; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets.GUI -{ - using Object = UnityEngine.Object; - - /// - /// Configuration GUI for - /// - public class HostingServicesWindow : EditorWindow, ISerializationCallbackReceiver, ILogHandler - { - const float k_DefaultSplitterRatio = 0.67f; - const int k_SplitterHeight = 15; - - [FormerlySerializedAs("m_logText")] - [SerializeField] - string m_LogText; - [FormerlySerializedAs("m_logScrollPos")] - [SerializeField] - Vector2 m_LogScrollPos; - [FormerlySerializedAs("m_servicesScrollPos")] - [SerializeField] - Vector2 m_ServicesScrollPos; - [FormerlySerializedAs("m_profileVarsFoldout")] - [SerializeField] - bool m_ProfileVarsFoldout = true; - [FormerlySerializedAs("m_servicesFoldout")] - [SerializeField] - bool m_ServicesFoldout = true; - [FormerlySerializedAs("m_splitterRatio")] - [SerializeField] - float m_SplitterRatio = k_DefaultSplitterRatio; - [FormerlySerializedAs("m_settings")] - [SerializeField] - AddressableAssetSettings m_Settings; - - ILogger m_Logger; - bool m_NewLogContent; - bool m_IsResizingSplitter; - - readonly Dictionary m_ProfileVarTables = - new Dictionary(); - - readonly List m_RemovalQueue = new List(); - HostingServicesProfileVarsTreeView m_GlobalProfileVarTable; - - /// - /// Show the , initialized with the given - /// - /// - public void Show(AddressableAssetSettings settings) - { - Initialize(settings); - Show(); - } - - void Initialize(AddressableAssetSettings settings) - { - if (m_Settings == null) - m_Settings = settings; - - m_Settings.HostingServicesManager.Logger = m_Logger; - } - - [MenuItem("Window/Asset Management/Hosting Services", priority = 2052)] - static void InitializeWithDefaultSettings() - { - var defaultSettings = AddressableAssetSettingsDefaultObject.Settings; - if (defaultSettings == null) - { - EditorUtility.DisplayDialog("Error", "Could not load default Addressable Asset settings.", "Ok"); - return; - } - - GetWindow().Show(defaultSettings); - } - - void Awake() - { - titleContent = new GUIContent("Hosting"); - m_Logger = new Logger(this); - } - - void OnGUI() - { - if (m_Settings == null) return; - - if (m_IsResizingSplitter) - m_SplitterRatio = Mathf.Clamp((Event.current.mousePosition.y - k_SplitterHeight / 2f) / position.height, 0.2f, 0.9f); - - var itemRect = new Rect(0, 0, position.width, position.height * m_SplitterRatio); - var splitterRect = new Rect(0, itemRect.height, position.width, k_SplitterHeight); - var logRect = new Rect(0, itemRect.height + k_SplitterHeight, position.width, - position.height - itemRect.height - k_SplitterHeight); - - EditorGUI.LabelField(splitterRect, string.Empty, UnityEngine.GUI.skin.horizontalSlider); - EditorGUIUtility.AddCursorRect(splitterRect, MouseCursor.ResizeVertical); - if (Event.current.type == EventType.MouseDown && splitterRect.Contains(Event.current.mousePosition)) - m_IsResizingSplitter = true; - else if (Event.current.type == EventType.MouseUp) - m_IsResizingSplitter = false; - - GUILayout.BeginArea(itemRect); - { - EditorGUILayout.Space(); - - m_ProfileVarsFoldout = EditorGUILayout.Foldout(m_ProfileVarsFoldout, "Global Profile Variables"); - if (m_ProfileVarsFoldout) - DrawGlobalProfileVarsArea(); - - EditorGUILayout.Space(); - - m_ServicesFoldout = EditorGUILayout.Foldout(m_ServicesFoldout, "Hosting Services"); - if (m_ServicesFoldout) - DrawServicesArea(); - } - GUILayout.EndArea(); - - GUILayout.BeginArea(logRect); - { - DrawLogArea(logRect); - } - GUILayout.EndArea(); - - if (m_IsResizingSplitter) - Repaint(); - } - - void DrawGlobalProfileVarsArea() - { - var manager = m_Settings.HostingServicesManager; - DrawProfileVarTable(this, manager.GlobalProfileVariables); - - GUILayout.BeginHorizontal(); - { - GUILayout.FlexibleSpace(); - if (GUILayout.Button("Refresh", GUILayout.MaxWidth(125f))) - manager.RefreshGlobalProfileVariables(); - } - GUILayout.EndHorizontal(); - } - - void DrawServicesArea() - { - var manager = m_Settings.HostingServicesManager; - m_ServicesScrollPos = EditorGUILayout.BeginScrollView(m_ServicesScrollPos); - var svcList = manager.HostingServices; - - if (m_RemovalQueue.Count > 0) - { - foreach (var svc in m_RemovalQueue) - manager.RemoveHostingService(svc); - - m_RemovalQueue.Clear(); - } - - var i = 0; - foreach (var svc in svcList) - { - if (i > 0) EditorGUILayout.Space(); - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - DrawServiceElement(svc); - EditorGUILayout.EndVertical(); - i++; - } - - GUILayout.BeginHorizontal(); - { - if (svcList.Count == 0) - { - EditorGUILayout.Space(); - EditorGUILayout.LabelField("No Hosting Services configured."); - } - - GUILayout.FlexibleSpace(); - if (GUILayout.Button("Add Service...", GUILayout.MaxWidth(125f))) - { - GetWindow(true, "Add Service").Initialize(m_Settings); - } - } - GUILayout.EndHorizontal(); - - GUILayout.EndScrollView(); - } - - void DrawServiceElement(IHostingService svc) - { - EditorGUILayout.BeginHorizontal(); - { - svc.DescriptiveName = EditorGUILayout.DelayedTextField("Service EventName", svc.DescriptiveName); - - var newIsServiceEnabled = GUILayout.Toggle(svc.IsHostingServiceRunning, "Enable Service", "Button", GUILayout.MaxWidth(150f)); - - if (GUILayout.Button("Remove...", GUILayout.MaxWidth(75f))) - { - if (EditorUtility.DisplayDialog("Remove Service", "Are you sure?", "Ok", "Cancel")) - m_RemovalQueue.Add(svc); - } - else if (newIsServiceEnabled != svc.IsHostingServiceRunning) - { - if (newIsServiceEnabled) - svc.StartHostingService(); - else - svc.StopHostingService(); - } - } - EditorGUILayout.EndHorizontal(); - - var typeAndId = string.Format("{0} ({1})", svc.GetType().Name, svc.InstanceId.ToString()); - EditorGUILayout.LabelField("Service Type (ID)", typeAndId, GUILayout.MinWidth(225f)); - - EditorGUILayout.Space(); - - using (new EditorGUI.DisabledGroupScope(!svc.IsHostingServiceRunning)) - { - // Allow service to provide additional GUI configuration elements - svc.OnGUI(); - - EditorGUILayout.Space(); - - DrawProfileVarTable(svc, svc.ProfileVariables); - } - } - - void DrawLogArea(Rect rect) - { - if (m_NewLogContent) - { - var height = UnityEngine.GUI.skin.GetStyle("Label").CalcHeight(new GUIContent(m_LogText), rect.width); - m_LogScrollPos = new Vector2(0f, height); - m_NewLogContent = false; - } - - m_LogScrollPos = EditorGUILayout.BeginScrollView(m_LogScrollPos); - GUILayout.Label(m_LogText); - EditorGUILayout.EndScrollView(); - } - - void DrawProfileVarTable(object tableKey, IEnumerable> data) - { - HostingServicesProfileVarsTreeView table; - if (!m_ProfileVarTables.TryGetValue(tableKey, out table)) - { - table = new HostingServicesProfileVarsTreeView(new TreeViewState(), - HostingServicesProfileVarsTreeView.CreateHeader()); - m_ProfileVarTables[tableKey] = table; - } - - var rowHeight = table.RowHeight; - var tableHeight = table.multiColumnHeader.height + rowHeight; // header + 1 extra line - - table.ClearItems(); - foreach (var kvp in data) - { - table.AddOrUpdateItem(kvp.Key, kvp.Value); - tableHeight += rowHeight; - } - - table.OnGUI(EditorGUILayout.GetControlRect(false, tableHeight)); - } - - /// - public void LogFormat(LogType logType, Object context, string format, params object[] args) - { - IHostingService svc = null; - - if (args.Length > 0) - svc = args[args.Length - 1] as IHostingService; - - if (svc != null) - { - m_LogText += string.Format("[{0}] ", svc.DescriptiveName) + string.Format(format, args) + "\n"; - m_NewLogContent = true; - } - - Debug.unityLogger.LogFormat(logType, context, format, args); - } - - /// - public void LogException(Exception exception, Object context) - { - Debug.unityLogger.LogException(exception, context); - } - - /// - public void OnBeforeSerialize() - { - // No implementation - } - - /// - public void OnAfterDeserialize() - { - m_Logger = new Logger(this); - Initialize(m_Settings); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/HostingServicesWindow.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/HostingServicesWindow.cs.meta deleted file mode 100644 index d0d64a2f..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/HostingServicesWindow.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9834b3849844b497cbdd2afdd4701e4a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/ProfileValueReferenceDrawer.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/ProfileValueReferenceDrawer.cs deleted file mode 100644 index b70e79d2..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/ProfileValueReferenceDrawer.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using UnityEditor.AddressableAssets; -using UnityEditor.AddressableAssets.Settings; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.GUI -{ - [CustomPropertyDrawer(typeof(ProfileValueReference), true)] - class ProfileValueReferenceDrawer : PropertyDrawer - { - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) - { - var settings = AddressableAssetSettingsDefaultObject.Settings; - if (settings == null) - return; - EditorGUI.BeginProperty(position, label, property); - var idProp = property.FindPropertyRelative("m_Id"); - - idProp.stringValue = ProfilesEditor.ValueGUI(position, settings, label.text, idProp.stringValue); - - EditorGUI.EndProperty(); - } - - public override float GetPropertyHeight(SerializedProperty property, GUIContent label) - { - var settings = AddressableAssetSettingsDefaultObject.Settings; - if (settings == null) - return 0; - var idProp = property.FindPropertyRelative("m_Id"); - return ProfilesEditor.CalcGUIHeight(settings, label.text, idProp.stringValue); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/ProfileValueReferenceDrawer.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/ProfileValueReferenceDrawer.cs.meta deleted file mode 100644 index 852de22f..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/ProfileValueReferenceDrawer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b29514f1c114d144094eebc93ad52783 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/SerializedTypeDrawer.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/SerializedTypeDrawer.cs deleted file mode 100644 index 4111121e..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/SerializedTypeDrawer.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Reflection; -using UnityEditor.AddressableAssets.Settings; -using UnityEngine; -using UnityEngine.ResourceManagement.Util; - -namespace UnityEditor.AddressableAssets.GUI -{ - [CustomPropertyDrawer(typeof(SerializedType), true)] - internal class SerializedTypeDrawer : PropertyDrawer - { - List m_Types; - FieldInfo m_SerializedFieldInfo; - SerializedProperty m_Property; - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) - { - label.text = ObjectNames.NicifyVariableName(property.propertyPath); - m_Property = property; - if (m_SerializedFieldInfo == null) - m_SerializedFieldInfo = GetFieldInfo(property); - if (m_Types == null) - m_Types = GetTypes(m_SerializedFieldInfo); - - EditorGUI.BeginProperty(position, label, property); - var smallPos = EditorGUI.PrefixLabel(position, label); - var st = (SerializedType)m_SerializedFieldInfo.GetValue(property.serializedObject.targetObject); - if (EditorGUI.DropdownButton(smallPos, new GUIContent(st.ToString()), FocusType.Keyboard)) - { - var menu = new GenericMenu(); - menu.AddItem(new GUIContent("", "Clear the type."), false, OnSetType, null); - for (int i = 0; i < m_Types.Count; i++) - { - var type = m_Types[i]; - menu.AddItem(new GUIContent(type.Name, ""), false, OnSetType, type); - } - menu.ShowAsContext(); - } - - EditorGUI.EndProperty(); - } - - void OnSetType(object context) - { - Undo.RecordObject(m_Property.serializedObject.targetObject, "Set Serialized Type"); - var type = context as Type; - m_SerializedFieldInfo.SetValue(m_Property.serializedObject.targetObject, new SerializedType { Value = type }); - EditorUtility.SetDirty(m_Property.serializedObject.targetObject); - } - - static FieldInfo GetFieldInfo(SerializedProperty property) - { - var o = property.serializedObject.targetObject; - var t = o.GetType(); - string propertyName = property.name; - int i = property.propertyPath.IndexOf('.'); - if (i > 0) - propertyName = property.propertyPath.Substring(0, i); - return t.GetField(propertyName, BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance); - } - - static List GetTypes(FieldInfo fieldInfo) - { - var attrs = fieldInfo.GetCustomAttributes(typeof(SerializedTypeRestrictionAttribute), false); - if (attrs.Length == 0 || !(attrs[0] is SerializedTypeRestrictionAttribute)) - return null; - return AddressableAssetUtility.GetTypes((attrs[0] as SerializedTypeRestrictionAttribute).type); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/SerializedTypeDrawer.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/SerializedTypeDrawer.cs.meta deleted file mode 100644 index 4f885c6c..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/GUI/SerializedTypeDrawer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bc7120d80c21d014885f3e7a4d4217cb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices.meta deleted file mode 100644 index e6f91f3b..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 05d506d6f1d0c4b66aa64cd1402fba70 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/BaseHostingService.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/BaseHostingService.cs deleted file mode 100644 index 16e843d5..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/BaseHostingService.cs +++ /dev/null @@ -1,149 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.AddressableAssets.Settings; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.HostingServices -{ - /// - /// Base class for hosting services. - /// - public abstract class BaseHostingService : IHostingService - { - const string k_HostingServiceContentRootKey = "ContentRoot"; - const string k_IsHostingServiceRunningKey = "IsEnabled"; - const string k_DescriptiveNameKey = "DescriptiveName"; - const string k_InstanceIdKey = "InstanceId"; - - /// - /// List of content roots for hosting service. - /// - public abstract List HostingServiceContentRoots { get; } - /// - /// Dictionary of profile variables defined by the hosting service. - /// - public abstract Dictionary ProfileVariables { get; } - /// - /// Gets the current running status of the hosting service. - /// - public abstract bool IsHostingServiceRunning { get; } - /// - /// Starts the hosting service. - /// - public abstract void StartHostingService(); - /// - /// Stops the hosting service. - /// - public abstract void StopHostingService(); - /// - /// Render the hosting service GUI. - /// - public abstract void OnGUI(); - - ILogger m_Logger = Debug.unityLogger; - - /// - /// Get and set the logger for the hosting service. - /// - public ILogger Logger - { - get { return m_Logger; } - set { m_Logger = value ?? Debug.unityLogger; } - } - - /// - /// Decodes a profile variable lookup ID based on string key - /// - /// the key to look up - /// The variable lookup ID. - protected virtual string DisambiguateProfileVar(string key) - { - return string.Format("{0}.ID_{1}", key, InstanceId); - } - - /// - public virtual string DescriptiveName { get; set; } - - /// - public virtual int InstanceId { get; set; } - - /// - public virtual string EvaluateProfileString(string key) - { - string retVal; - ProfileVariables.TryGetValue(key, out retVal); - return retVal; - } - - /// - public virtual void OnBeforeSerialize(KeyDataStore dataStore) - { - dataStore.SetData(k_HostingServiceContentRootKey, string.Join(";", HostingServiceContentRoots.ToArray())); - dataStore.SetData(k_IsHostingServiceRunningKey, IsHostingServiceRunning); - dataStore.SetData(k_DescriptiveNameKey, DescriptiveName); - dataStore.SetData(k_InstanceIdKey, InstanceId); - } - - /// - public virtual void OnAfterDeserialize(KeyDataStore dataStore) - { - var contentRoots = dataStore.GetData(k_HostingServiceContentRootKey, string.Empty); - HostingServiceContentRoots.AddRange(contentRoots.Split(';')); - - if (dataStore.GetData(k_IsHostingServiceRunningKey, false)) - StartHostingService(); - - DescriptiveName = dataStore.GetDataString(k_DescriptiveNameKey, string.Empty); - InstanceId = dataStore.GetData(k_InstanceIdKey, -1); - } - - static T[] ArrayPush(T[] arr, T val) - { - var newArr = new T[arr.Length + 1]; - Array.Copy(arr, newArr, arr.Length); - newArr[newArr.Length - 1] = val; - return newArr; - } - - /// - /// Logs a formatted message to the Logger specifically on this service. - /// - /// Severity of the log - /// The base string - /// The parameters to be formatted into the base string - protected void LogFormat(LogType logType, string format, object[] args) - { - Logger.LogFormat(logType, format, ArrayPush(args, this)); - } - - /// - /// Logs an info severity formatted message to the Logger specifically on this service. - /// - /// The base string - /// The parameters to be formatted into the base string - protected void Log(string format, params object[] args) - { - LogFormat(LogType.Log, format, args); - } - - /// - /// Logs an warning severity formatted message to the Logger specifically on this service. - /// - /// The base string - /// The parameters to be formatted into the base string - protected void LogWarning(string format, params object[] args) - { - LogFormat(LogType.Warning, format, args); - } - - /// - /// Logs an error severity formatted message to the Logger specifically on this service. - /// - /// The base string - /// The parameters to be formatted into the base string - protected void LogError(string format, params object[] args) - { - LogFormat(LogType.Error, format, args); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/BaseHostingService.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/BaseHostingService.cs.meta deleted file mode 100644 index f5e5ff13..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/BaseHostingService.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 504a37785439743bba6a7259d90d6652 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/HostingServicesManager.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/HostingServicesManager.cs deleted file mode 100644 index 7337c4e0..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/HostingServicesManager.cs +++ /dev/null @@ -1,454 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net.NetworkInformation; -using System.Net.Sockets; -using UnityEditor.AddressableAssets; -using UnityEditor.AddressableAssets.Settings; -using UnityEngine; -using UnityEngine.Serialization; - -// ReSharper disable DelegateSubtraction - -namespace UnityEditor.AddressableAssets.HostingServices -{ - /// - /// Manages the hosting services. - /// - [Serializable] - public class HostingServicesManager : ISerializationCallbackReceiver - { - internal const string KPrivateIpAddressKey = "PrivateIpAddress"; - - [Serializable] - class HostingServiceInfo - { - [SerializeField] - internal string classRef; - [SerializeField] - internal KeyDataStore dataStore; - } - - [FormerlySerializedAs("m_hostingServiceInfos")] - [SerializeField] - List m_HostingServiceInfos; - [FormerlySerializedAs("m_settings")] - [SerializeField] - AddressableAssetSettings m_Settings; - [FormerlySerializedAs("m_nextInstanceId")] - [SerializeField] - int m_NextInstanceId; - [FormerlySerializedAs("m_registeredServiceTypeRefs")] - [SerializeField] - List m_RegisteredServiceTypeRefs; - - readonly Type[] m_BuiltinServiceTypes = - { - typeof(HttpHostingService) - }; - - Dictionary m_HostingServiceInfoMap; - ILogger m_Logger; - List m_RegisteredServiceTypes; - - /// - /// Direct logging output of all managed services - /// - public ILogger Logger - { - get { return m_Logger; } - set - { - m_Logger = value ?? Debug.unityLogger; - foreach (var svc in HostingServices) - svc.Logger = m_Logger; - } - } - - /// - /// Static method for use in starting up the HostingServicesManager in batch mode. - /// - /// - public static void BatchMode(AddressableAssetSettings settings) - { - - if (settings == null) - { - Debug.LogError("Could not load Addressable Assets settings - aborting."); - return; - } - - var manager = settings.HostingServicesManager; - if (manager == null) - { - Debug.LogError("Could not load HostingServicesManager - aborting."); - return; - } - - manager.StartAllServices(); - } - - /// - /// Static method for use in starting up the HostingServicesManager in batch mode. This method - /// without parameters will find and use the default object. - /// - public static void BatchMode() - { - BatchMode(AddressableAssetSettingsDefaultObject.Settings); - } - - /// - /// Key/Value pairs valid for profile variable substitution - /// - public Dictionary GlobalProfileVariables { get; private set; } - - /// - /// Indicates whether or not this HostingServiceManager is initialized - /// - public bool IsInitialized - { - get { return m_Settings != null; } - } - - /// - /// Return an enumerable list of all configured objects - /// - public ICollection HostingServices - { - get { return m_HostingServiceInfoMap.Keys; } - } - - /// - /// Get an array of all types that have been used by the manager, or are known - /// built-in types available for use. - /// - /// - public Type[] RegisteredServiceTypes - { - get - { - if (m_RegisteredServiceTypes.Count == 0) - m_RegisteredServiceTypes.AddRange(m_BuiltinServiceTypes); - - return m_RegisteredServiceTypes.ToArray(); - } - } - - /// - /// The id value that will be assigned to the next add to the manager. - /// - public int NextInstanceId - { - get { return m_NextInstanceId; } - } - - /// - /// Create a new - /// - public HostingServicesManager() - { - GlobalProfileVariables = new Dictionary(); - m_HostingServiceInfoMap = new Dictionary(); - m_RegisteredServiceTypes = new List(); - m_Logger = Debug.unityLogger; - } - - /// - /// Initialize manager with the given object. - /// - /// - public void Initialize(AddressableAssetSettings settings) - { - if (IsInitialized) return; - m_Settings = settings; - RefreshGlobalProfileVariables(); - } - - /// - /// Calls on all managed instances - /// where is true - /// - public void StopAllServices() - { - foreach (var svc in HostingServices) - { - try - { - if (svc.IsHostingServiceRunning) - svc.StopHostingService(); - } - catch (Exception e) - { - m_Logger.LogFormat(LogType.Error, e.Message); - } - } - } - - /// - /// Calls on all managed instances - /// where is false - /// - public void StartAllServices() - { - foreach (var svc in HostingServices) - { - try - { - if (!svc.IsHostingServiceRunning) - svc.StartHostingService(); - } - catch (Exception e) - { - m_Logger.LogFormat(LogType.Error, e.Message); - } - } - } - - /// - /// Add a new hosting service instance of the given type. The must implement the - /// interface, or an is thrown. - /// - /// A object for the service. Must implement - /// A descriptive name for the new service instance. - /// - public IHostingService AddHostingService(Type serviceType, string name) - { - var svc = Activator.CreateInstance(serviceType) as IHostingService; - if (svc == null) - throw new ArgumentException("Provided type does not implement IHostingService", "serviceType"); - - if (!m_RegisteredServiceTypes.Contains(serviceType)) - m_RegisteredServiceTypes.Add(serviceType); - - var info = new HostingServiceInfo - { - classRef = TypeToClassRef(serviceType), - dataStore = new KeyDataStore() - }; - - svc.Logger = m_Logger; - svc.DescriptiveName = name; - svc.InstanceId = m_NextInstanceId; - svc.HostingServiceContentRoots.AddRange(GetAllContentRoots()); - m_Settings.profileSettings.RegisterProfileStringEvaluationFunc(svc.EvaluateProfileString); - - m_HostingServiceInfoMap.Add(svc, info); - m_Settings.SetDirty(AddressableAssetSettings.ModificationEvent.HostingServicesManagerModified, this, true, true); - - m_NextInstanceId++; - return svc; - } - - /// - /// Stops the given , unregisters callbacks, and removes it from management. This - /// function does nothing if the service is not being managed by this - /// - /// - public void RemoveHostingService(IHostingService svc) - { - if (!m_HostingServiceInfoMap.ContainsKey(svc)) - return; - - svc.StopHostingService(); - m_Settings.profileSettings.UnregisterProfileStringEvaluationFunc(svc.EvaluateProfileString); - m_HostingServiceInfoMap.Remove(svc); - m_Settings.SetDirty(AddressableAssetSettings.ModificationEvent.HostingServicesManagerModified, this, true, true); - } - - /// - /// Should be called by parent instance OnEnable method - /// - public void OnEnable() - { - Debug.Assert(IsInitialized); - - m_Settings.OnModification -= OnSettingsModification; - m_Settings.OnModification += OnSettingsModification; - m_Settings.profileSettings.RegisterProfileStringEvaluationFunc(EvaluateGlobalProfileVariableKey); - foreach (var svc in HostingServices) - { - svc.Logger = m_Logger; - m_Settings.profileSettings.RegisterProfileStringEvaluationFunc(svc.EvaluateProfileString); - } - - RefreshGlobalProfileVariables(); - } - - /// - /// Should be called by parent instance OnDisable method - /// - public void OnDisable() - { - Debug.Assert(IsInitialized); - - // ReSharper disable once DelegateSubtraction - m_Settings.OnModification -= OnSettingsModification; - m_Settings.profileSettings.UnregisterProfileStringEvaluationFunc(EvaluateGlobalProfileVariableKey); - foreach (var svc in HostingServices) - { - svc.Logger = null; - m_Settings.profileSettings.UnregisterProfileStringEvaluationFunc(svc.EvaluateProfileString); - } - } - - /// - /// Ensure object is ready for serialization, and calls methods - /// on all managed instances - /// - public void OnBeforeSerialize() - { - m_HostingServiceInfos = new List(); - foreach (var svc in HostingServices) - { - var info = m_HostingServiceInfoMap[svc]; - m_HostingServiceInfos.Add(info); - svc.OnBeforeSerialize(info.dataStore); - } - - m_RegisteredServiceTypeRefs = new List(); - foreach (var type in m_RegisteredServiceTypes) - m_RegisteredServiceTypeRefs.Add(TypeToClassRef(type)); - } - - /// - /// Ensure object is ready for serialization, and calls methods - /// on all managed instances - /// - public void OnAfterDeserialize() - { - m_HostingServiceInfoMap = new Dictionary(); - foreach (var svcInfo in m_HostingServiceInfos) - { - var classRef = svcInfo.classRef; - //handle change to namespace that happened just before Addressables 1.0.0. Can remove once upgrades from 0.5.x are no longer expected - if (classRef.Contains("UnityEditor.AddressableAssets.HttpHostingService")) - classRef = classRef.Replace("UnityEditor.AddressableAssets.HttpHostingService", "UnityEditor.AddressableAssets.HostingServices.HttpHostingService"); - - var svc = CreateHostingServiceInstance(classRef); - if (svc == null) continue; - svc.OnAfterDeserialize(svcInfo.dataStore); - m_HostingServiceInfoMap.Add(svc, svcInfo); - } - - m_RegisteredServiceTypes = new List(); - foreach (var typeRef in m_RegisteredServiceTypeRefs) - { - var type = Type.GetType(typeRef, false); - if (type == null) continue; - m_RegisteredServiceTypes.Add(type); - } - } - - /// - /// Refresh values in the global profile variables table. - /// - public void RefreshGlobalProfileVariables() - { - var vars = GlobalProfileVariables; - vars.Clear(); - - var ipAddressList = NetworkInterface.GetAllNetworkInterfaces() - .Where(n => n.NetworkInterfaceType != NetworkInterfaceType.Loopback) - .SelectMany(n => n.GetIPProperties().UnicastAddresses) - .Where(a => a.Address.AddressFamily == AddressFamily.InterNetwork) - .Select(a => a.Address).ToArray(); - - if (ipAddressList.Length > 0) - { - vars.Add(KPrivateIpAddressKey, ipAddressList[0].ToString()); - - if (ipAddressList.Length > 1) - { - for (var i = 1; i < ipAddressList.Length; i++) - vars.Add(KPrivateIpAddressKey + "_" + i, ipAddressList[i].ToString()); - } - } - } - - // Internal for unit tests - internal string EvaluateGlobalProfileVariableKey(string key) - { - string retVal; - GlobalProfileVariables.TryGetValue(key, out retVal); - return retVal; - } - - void OnSettingsModification(AddressableAssetSettings s, AddressableAssetSettings.ModificationEvent evt, object obj) - { - switch (evt) - { - case AddressableAssetSettings.ModificationEvent.GroupAdded: - case AddressableAssetSettings.ModificationEvent.GroupRemoved: - case AddressableAssetSettings.ModificationEvent.GroupSchemaAdded: - case AddressableAssetSettings.ModificationEvent.GroupSchemaRemoved: - case AddressableAssetSettings.ModificationEvent.GroupSchemaModified: - case AddressableAssetSettings.ModificationEvent.ActiveProfileSet: - case AddressableAssetSettings.ModificationEvent.BuildSettingsChanged: - case AddressableAssetSettings.ModificationEvent.BatchModification: - ConfigureAllHostingServices(); - break; - } - } - - void ConfigureAllHostingServices() - { - var contentRoots = GetAllContentRoots(); - - foreach (var svc in HostingServices) - { - svc.HostingServiceContentRoots.Clear(); - svc.HostingServiceContentRoots.AddRange(contentRoots); - } - } - - string[] GetAllContentRoots() - { - Debug.Assert(IsInitialized); - - var contentRoots = new List(); - foreach (var group in m_Settings.groups) - { - foreach (var schema in group.Schemas) - { - var configProvider = schema as IHostingServiceConfigurationProvider; - if (configProvider != null) - { - var groupRoot = configProvider.HostingServicesContentRoot; - if (groupRoot != null && !contentRoots.Contains(groupRoot)) - contentRoots.Add(groupRoot); - } - } - } - - return contentRoots.ToArray(); - } - - IHostingService CreateHostingServiceInstance(string classRef) - { - try - { - var objType = Type.GetType(classRef, true); - var svc = (IHostingService) Activator.CreateInstance(objType); - return svc; - } - catch (Exception e) - { - m_Logger.LogFormat(LogType.Error, "Could not create IHostingService from class ref '{0}'", classRef); - m_Logger.LogFormat(LogType.Error, e.Message); - } - - return null; - } - - static string TypeToClassRef(Type t) - { - return string.Format("{0}, {1}", t.FullName, t.Assembly.GetName().Name); - } - - // For unit tests - internal AddressableAssetSettings Settings - { - get { return m_Settings; } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/HostingServicesManager.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/HostingServicesManager.cs.meta deleted file mode 100644 index 86e1f917..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/HostingServicesManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 66a7a5932b5cd4dceb8261d66734b440 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/HttpHostingService.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/HttpHostingService.cs deleted file mode 100644 index 3541db85..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/HttpHostingService.cs +++ /dev/null @@ -1,327 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Net; -using System.Net.Sockets; -using UnityEditor.AddressableAssets.Settings; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.HostingServices -{ - // ReSharper disable once ClassWithVirtualMembersNeverInherited.Global - /// - /// HTTP implemenation of hosting service. - /// - public class HttpHostingService : BaseHostingService - { - /// - /// Enum helper for standard Http result codes - /// - protected enum ResultCode - { - Ok = 200, - NotFound = 404 - } - - const string k_HostingServicePortKey = "HostingServicePort"; - const int k_FileReadBufferSize = 64 * 1024; - - static readonly IPEndPoint k_DefaultLoopbackEndpoint = new IPEndPoint(IPAddress.Loopback, 0); - int m_ServicePort; - readonly List m_ContentRoots; - readonly Dictionary m_ProfileVariables; - - // ReSharper disable once MemberCanBePrivate.Global - /// - /// The actual Http listener used by this service - /// - protected HttpListener MyHttpListener { get; set; } - - /// - /// The port number on which the service is listening - /// - // ReSharper disable once MemberCanBePrivate.Global - public int HostingServicePort - { - get - { - return m_ServicePort; - } - protected set - { - if (value > 0 && IsPortAvailable(value)) - m_ServicePort = value; - } - } - - /// - public override bool IsHostingServiceRunning - { - get { return MyHttpListener != null && MyHttpListener.IsListening; } - } - - /// - public override List HostingServiceContentRoots - { - get { return m_ContentRoots; } - } - - /// - public override Dictionary ProfileVariables - { - get - { - m_ProfileVariables[k_HostingServicePortKey] = HostingServicePort.ToString(); - m_ProfileVariables[DisambiguateProfileVar(k_HostingServicePortKey)] = HostingServicePort.ToString(); - return m_ProfileVariables; - } - } - - /// - /// Create a new - /// - public HttpHostingService() - { - m_ProfileVariables = new Dictionary(); - m_ContentRoots = new List(); - MyHttpListener = new HttpListener(); - } - - /// - public override void StartHostingService() - { - if (IsHostingServiceRunning) - return; - - if (HostingServicePort <= 0) - { - HostingServicePort = GetAvailablePort(); - } - else if (!IsPortAvailable(HostingServicePort)) - { - LogError("Port {0} is in use, cannot start service!", HostingServicePort); - return; - } - - if (HostingServiceContentRoots.Count == 0) - { - throw new Exception( - "ContentRoot is not configured; cannot start service. This can usually be fixed by modifying the BuildPath for any new groups and/or building content."); - } - - ConfigureHttpListener(); - MyHttpListener.Start(); - MyHttpListener.BeginGetContext(HandleRequest, null); - Log("Started. Listening on port {0}", HostingServicePort); - } - - /// - public override void StopHostingService() - { - if (!IsHostingServiceRunning) return; - Log("Stopping"); - MyHttpListener.Stop(); - } - - /// - public override void OnGUI() - { - EditorGUILayout.BeginHorizontal(); - { - var newPort = EditorGUILayout.DelayedIntField("Port", HostingServicePort); - if (newPort != HostingServicePort) - { - if (IsPortAvailable(newPort)) - ResetListenPort(newPort); - else - LogError("Cannot listen on port {0}; port is in use", newPort); - } - - if (GUILayout.Button("Reset", GUILayout.MaxWidth(150))) - ResetListenPort(); - - //GUILayout.Space(rect.width / 2f); - } - EditorGUILayout.EndHorizontal(); - } - - /// - public override void OnBeforeSerialize(KeyDataStore dataStore) - { - dataStore.SetData(k_HostingServicePortKey, HostingServicePort); - base.OnBeforeSerialize(dataStore); - } - - /// - public override void OnAfterDeserialize(KeyDataStore dataStore) - { - HostingServicePort = dataStore.GetData(k_HostingServicePortKey, 0); - base.OnAfterDeserialize(dataStore); - } - - /// - /// Listen on a new port then next time the server starts. If the server is already running, it will be stopped - /// and restarted automatically. - /// - /// Specify a port to listen on. Default is 0 to choose any open port - // ReSharper disable once MemberCanBePrivate.Global - public void ResetListenPort(int port = 0) - { - var isRunning = IsHostingServiceRunning; - StopHostingService(); - HostingServicePort = port; - - if (isRunning) - StartHostingService(); - } - - /// - /// Handles any configuration necessary for before listening for connections. - /// - protected virtual void ConfigureHttpListener() - { - try - { - MyHttpListener.Prefixes.Clear(); - MyHttpListener.Prefixes.Add("http://+:" + HostingServicePort + "/"); - } - catch (Exception e) - { - Debug.LogException(e); - } - } - - /// - /// Asynchronous callback to handle a client connection request on . This method is - /// recursive in that it will call itself immediately after receiving a new incoming request to listen for the - /// next connection. - /// - /// Asynchronous result from previous request. Pass null to listen for an initial request - /// thrown when the request result code is unknown - protected virtual void HandleRequest(IAsyncResult ar) - { - if (!IsHostingServiceRunning) - return; - - var c = MyHttpListener.EndGetContext(ar); - MyHttpListener.BeginGetContext(HandleRequest, null); - - var relativePath = c.Request.RawUrl.Substring(1); - - var fullPath = FindFileInContentRoots(relativePath); - var result = fullPath != null ? ResultCode.Ok : ResultCode.NotFound; - var info = fullPath != null ? new FileInfo(fullPath) : null; - var size = info != null ? info.Length.ToString() : "-"; - var remoteAddress = c.Request.RemoteEndPoint != null ? c.Request.RemoteEndPoint.Address : null; - var timestamp = DateTime.Now.ToString("o"); - - Log("{0} - - [{1}] \"{2}\" {3} {4}", remoteAddress, timestamp, fullPath, (int) result, size); - - switch (result) - { - case ResultCode.Ok: - ReturnFile(c, fullPath); - break; - case ResultCode.NotFound: - Return404(c); - break; - default: - throw new ArgumentOutOfRangeException(); - } - } - - /// - /// Searches for the given relative path within the configured content root directores. - /// - /// - /// The full system path to the file if found, or null if file could not be found - protected virtual string FindFileInContentRoots(string relativePath) - { - foreach (var root in HostingServiceContentRoots) - { - var fullPath = Path.Combine(root, relativePath); - if (File.Exists(fullPath)) - return fullPath; - } - - return null; - } - - /// - /// Sends a file to the connected HTTP client - /// - /// - /// - /// - protected virtual void ReturnFile(HttpListenerContext context, string filePath, int readBufferSize = k_FileReadBufferSize) - { - context.Response.ContentType = "application/octet-stream"; - - var buffer = new byte[readBufferSize]; - using (var fs = File.OpenRead(filePath)) - { - context.Response.ContentLength64 = fs.Length; - int read; - while ((read = fs.Read(buffer, 0, buffer.Length)) > 0) - context.Response.OutputStream.Write(buffer, 0, read); - } - - context.Response.OutputStream.Close(); - } - - /// - /// Sets the status code to 404 on the given object - /// - /// - protected virtual void Return404(HttpListenerContext context) - { - context.Response.StatusCode = 404; - context.Response.Close(); - } - - /// - /// Tests to see if the given port # is already in use - /// - /// port number to test - /// true if there is not a listener on the port - protected static bool IsPortAvailable(int port) - { - try - { - if (port <= 0) - return false; - - using (var client = new TcpClient()) - { - var result = client.BeginConnect(IPAddress.Loopback, port, null, null); - var success = result.AsyncWaitHandle.WaitOne(TimeSpan.FromMilliseconds(500)); - if (!success) - return true; - - client.EndConnect(result); - } - } - catch - { - return true; - } - - return false; - } - - /// - /// Find an open network listen port on the local system - /// - /// a system assigned port, or 0 if none are available - protected static int GetAvailablePort() - { - using (var socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, 0)) - { - socket.Bind(k_DefaultLoopbackEndpoint); - - var endPoint = socket.LocalEndPoint as IPEndPoint; - return endPoint != null ? endPoint.Port : 0; - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/HttpHostingService.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/HttpHostingService.cs.meta deleted file mode 100644 index 0268ba03..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/HttpHostingService.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fe5d67dc3f01349a8ae810148424c3b8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/IHostingService.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/IHostingService.cs deleted file mode 100644 index 8e163564..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/IHostingService.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.AddressableAssets.Settings; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.HostingServices -{ - /// - /// implementations serve Addressable content from the Unity Editor to players running - /// locally or on devices with network access to the Editor. - /// - public interface IHostingService - { - /// - /// Get the list of root directories being served by this hosting service - /// - List HostingServiceContentRoots { get; } - - /// - /// Get a map of all profile variables and their current values - /// - Dictionary ProfileVariables { get; } - - /// - /// Get a boolean that indicates if this hosting service is running - /// - bool IsHostingServiceRunning { get; } - - /// - /// Start the hosting service - /// - void StartHostingService(); - - /// - /// Stop the hosting service - /// - void StopHostingService(); - - /// - /// Called by the HostingServicesManager before a domain reload, giving the hosting service - /// an opportunity to persist state information. - /// - /// A key/value pair data store for use in persisting state information - void OnBeforeSerialize(KeyDataStore dataStore); - - /// - /// Called immediatley following a domain reload by the HostingServicesManager, for restoring state information - /// after the service is recreated. - /// - /// A key/value pair data store for use in restoring state information - void OnAfterDeserialize(KeyDataStore dataStore); - - /// - /// Expand special variables from Addressable profiles - /// - /// Key name to match - /// replacement string value for key, or null if no match - string EvaluateProfileString(string key); - - /// - /// The ILogger instance to use for debug log output - /// - ILogger Logger { get; set; } - - /// - /// Draw configuration GUI elements - /// - // ReSharper disable once InconsistentNaming - void OnGUI(); - - /// - /// Set by the HostingServicesManager, primarily used to disambiguate multiple instances of the same service - /// in the GUI. - /// - string DescriptiveName { get; set; } - - /// - /// uniquely identifies this service within the scope of the HostingServicesManager - /// - int InstanceId { get; set; } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/IHostingService.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/IHostingService.cs.meta deleted file mode 100644 index 715d58d2..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/IHostingService.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f6fc6153494d34438861807b8e2ded93 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/IHostingServiceConfigurationProvider.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/IHostingServiceConfigurationProvider.cs deleted file mode 100644 index c7d3d316..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/IHostingServiceConfigurationProvider.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using UnityEditor.AddressableAssets.Settings; - -namespace UnityEditor.AddressableAssets.HostingServices -{ - /// - /// Interface for providing configuration data for implementations - /// - public interface IHostingServiceConfigurationProvider - { - /// - /// Returns the Hosting Service content root path for the given - /// - string HostingServicesContentRoot { get; } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/IHostingServiceConfigurationProvider.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/IHostingServiceConfigurationProvider.cs.meta deleted file mode 100644 index 755d093a..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/HostingServices/IHostingServiceConfigurationProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9d5c72ca5a9734f80b3a76cdb4232e21 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Icons.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Icons.meta deleted file mode 100644 index 890d836d..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Icons.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 6c01fbe0a29ffc54fa5adeef1d9c2c24 -folderAsset: yes -timeCreated: 1506531863 -licenseType: Pro -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Icons/AddressableAssetsIconY1756Basic.png b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Icons/AddressableAssetsIconY1756Basic.png deleted file mode 100644 index de1091a6..00000000 Binary files a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Icons/AddressableAssetsIconY1756Basic.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Icons/AddressableAssetsIconY1756Basic.png.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Icons/AddressableAssetsIconY1756Basic.png.meta deleted file mode 100644 index e1072d35..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Icons/AddressableAssetsIconY1756Basic.png.meta +++ /dev/null @@ -1,86 +0,0 @@ -fileFormatVersion: 2 -guid: c33b04c403c19614395e83e691d3170a -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 6 - 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 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - 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 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Icons/AddressableAssetsIconY1756Scene.png b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Icons/AddressableAssetsIconY1756Scene.png deleted file mode 100644 index 26cecc9c..00000000 Binary files a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Icons/AddressableAssetsIconY1756Scene.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Icons/AddressableAssetsIconY1756Scene.png.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Icons/AddressableAssetsIconY1756Scene.png.meta deleted file mode 100644 index 1f2abfad..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Icons/AddressableAssetsIconY1756Scene.png.meta +++ /dev/null @@ -1,86 +0,0 @@ -fileFormatVersion: 2 -guid: 988ed84773d02644cbc268043bbd8864 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 6 - 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 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: 1 - maxTextureSize: 2048 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: -1 - mipBias: -100 - wrapU: -1 - wrapV: -1 - wrapW: -1 - 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 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 2048 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 1 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings.meta deleted file mode 100644 index eaf49505..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 06515ccb4c8b3e446bcf0d6fce5e9cd1 -folderAsset: yes -timeCreated: 1505333179 -licenseType: Pro -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetBuildSettings.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetBuildSettings.cs deleted file mode 100644 index 00a37cb7..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetBuildSettings.cs +++ /dev/null @@ -1,110 +0,0 @@ -using System; -using System.IO; -using System.Runtime.Serialization.Formatters.Binary; -using UnityEngine; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets.Settings -{ -#if UNITY_2018_3_OR_NEWER - using BuildCompression = UnityEngine.BuildCompression; -#else - using BuildCompression = UnityEditor.Build.Content.BuildCompression; -#endif - - /// - /// Build settings for addressables. - /// - [Serializable] - public class AddressableAssetBuildSettings - { - /// - /// Controls whether to compile scripts when running in virtual mode. When disabled, build times are faster but the simulated bundle contents may not be accurate due to including editor code. - /// - public bool compileScriptsInVirtualMode - { - get { return m_CompileScriptsInVirtualMode; } - set - { - m_CompileScriptsInVirtualMode = value; - SetDirty(); - } - } - [FormerlySerializedAs("m_compileScriptsInVirtualMode")] - [SerializeField] - bool m_CompileScriptsInVirtualMode; - - /// - /// Controls whether to remove temporary files after each build. When disabled, build times in packed mode are faster, but may not reflect all changes in assets. - /// - public bool cleanupStreamingAssetsAfterBuilds - { - get { return m_CleanupStreamingAssetsAfterBuilds; } - set - { - m_CleanupStreamingAssetsAfterBuilds = value; - SetDirty(); - } - } - [FormerlySerializedAs("m_cleanupStreamingAssetsAfterBuilds")] - [SerializeField] - bool m_CleanupStreamingAssetsAfterBuilds = true; - - [FormerlySerializedAs("m_logResourceManagerExceptions")] - [SerializeField] - bool m_LogResourceManagerExceptions = true; - /// - /// When enabled, the Addressables.ResourceManager.ExceptionHandler is set to (op, ex) => Debug.LogException(ex); - /// - public bool LogResourceManagerExceptions - { - get { return m_LogResourceManagerExceptions; } - set - { - if (m_LogResourceManagerExceptions != value) - { - m_LogResourceManagerExceptions = value; - SetDirty(); - } - } - } - - /// - /// //Specifies where to build asset bundles, this is usually a temporary folder (or a folder in the project). Bundles are copied out of this location to their final destination. - /// - public string bundleBuildPath - { - get { return m_BundleBuildPath; } - set - { - m_BundleBuildPath = value; - SetDirty(); - } - } - - [FormerlySerializedAs("m_bundleBuildPath")] - [SerializeField] - string m_BundleBuildPath = "Temp/com.unity.addressables/AssetBundles"; - - internal void SerializeForHash(BinaryFormatter formatter, Stream stream) - { - } - - [NonSerialized] - AddressableAssetSettings m_Settings; - void SetDirty() - { - if (m_Settings != null) - m_Settings.SetDirty(AddressableAssetSettings.ModificationEvent.BuildSettingsChanged, this, true, false); - } - internal void OnAfterDeserialize(AddressableAssetSettings settings) - { - m_Settings = settings; - } - - internal void Validate(AddressableAssetSettings addressableAssetSettings) - { - - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetBuildSettings.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetBuildSettings.cs.meta deleted file mode 100644 index d65d1e59..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetBuildSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0cbdebf3ba7c84c42a15f1cb8c47c14e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetEntry.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetEntry.cs deleted file mode 100644 index a9464554..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetEntry.cs +++ /dev/null @@ -1,537 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Runtime.Serialization.Formatters.Binary; -using UnityEditor.AddressableAssets.Build; -using UnityEngine; -using UnityEngine.AddressableAssets.ResourceLocators; -using UnityEngine.ResourceManagement.ResourceProviders; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets.Settings -{ - /// - /// Contains data for an addressable asset entry. - /// - [Serializable] - public class AddressableAssetEntry : ISerializationCallbackReceiver - { - internal const string EditorSceneListName = "EditorSceneList"; - internal const string EditorSceneListPath = "Scenes In Build"; - - internal const string ResourcesName = "Resources"; - internal const string ResourcesPath = "*/Resources/"; - - [FormerlySerializedAs("m_guid")] - [SerializeField] - string m_GUID; - [FormerlySerializedAs("m_address")] - [SerializeField] - string m_Address; - [FormerlySerializedAs("m_readOnly")] - [SerializeField] - bool m_ReadOnly; - - [FormerlySerializedAs("m_serializedLabels")] - [SerializeField] - List m_SerializedLabels; - HashSet m_Labels = new HashSet(); - - internal virtual bool HasSettings() { return false; } - - - [NonSerialized] - AddressableAssetGroup m_ParentGroup; - /// - /// The asset group that this entry belongs to. An entry can only belong to a single group at a time. - /// - public AddressableAssetGroup parentGroup - { - get { return m_ParentGroup; } - set { m_ParentGroup = value; } - } - - /// - /// The asset guid. - /// - public string guid { get { return m_GUID; } } - - /// - /// The address of the entry. This is treated as the primary key in the ResourceManager system. - /// - public string address - { - get - { - return m_Address; - } - set - { - SetAddress(value); - } - } - - /// - /// Set the address of the entry. - /// - /// The address. - /// Post modification event. - public void SetAddress(string addr, bool postEvent = true) - { - if (m_Address != addr) - { - m_Address = addr; - if (string.IsNullOrEmpty(m_Address)) - m_Address = AssetPath; - SetDirty(AddressableAssetSettings.ModificationEvent.EntryModified, this, postEvent); - } - } - - /// - /// Read only state of the entry. - /// - public bool ReadOnly - { - get - { - return m_ReadOnly; - } - set - { - if (m_ReadOnly != value) - { - m_ReadOnly = value; - SetDirty(AddressableAssetSettings.ModificationEvent.EntryModified, this, true); - } - } - } - - /// - /// Is the asset in a resource folder. - /// - public bool IsInResources { get; set; } - /// - /// Is scene in scene list. - /// - public bool IsInSceneList { get; set; } - /// - /// Is a sub asset. For example an asset in an addressable folder. - /// - public bool IsSubAsset { get; set; } - bool m_CheckedIsScene; - bool m_IsScene; - /// - /// Is this entry for a scene. - /// - public bool IsScene - { - get - { - if (!m_CheckedIsScene) - { - m_CheckedIsScene = true; - m_IsScene = AssetPath.EndsWith(".unity"); - } - return m_IsScene; - } - - } - /// - /// The set of labels for this entry. There is no inherent limit to the number of labels. - /// - public HashSet labels { get { return m_Labels; } } - - Type m_mainAssetType = null; - internal Type MainAssetType - { - get - { - if (m_mainAssetType == null) - { - m_mainAssetType = AssetDatabase.GetMainAssetTypeAtPath(AssetPath); - if (m_mainAssetType == null) - return typeof(object); // do not cache a bad type lookup. - } - return m_mainAssetType; - } - } - - /// - /// Set or unset a label on this entry. - /// - /// The label name. - /// Setting to true will add the label, false will remove it. - /// When enable is true, setting force to true will force the label to exist on the parent AddressableAssetSettings object if it does not already. - /// Post modification event. - /// - public bool SetLabel(string label, bool enable, bool force=false, bool postEvent = true) - { - if (enable) - { - if(force) - parentGroup.Settings.AddLabel(label, postEvent); - if (m_Labels.Add(label)) - { - SetDirty(AddressableAssetSettings.ModificationEvent.EntryModified, this, postEvent); - return true; - } - } - else - { - if (m_Labels.Remove(label)) - { - SetDirty(AddressableAssetSettings.ModificationEvent.EntryModified, this, postEvent); - return true; - } - } - return false; - } - - /// - /// Creates a list of keys that can be used to load this entry. - /// - /// The list of keys. This will contain the address, the guid as a Hash128 if valid, all assigned labels, and the scene index if applicable. - public List CreateKeyList() - { - var keys = new List(); - //the address must be the first key - keys.Add(address); - if (!string.IsNullOrEmpty(guid)) - keys.Add(guid); - if (IsScene && IsInSceneList) - { - int index = BuiltinSceneCache.GetSceneIndex(new GUID(guid)); - if (index != -1) - keys.Add(index); - } - - if (labels != null) - { - foreach (var l in labels) - keys.Add(l); - } - return keys; - } - - internal AddressableAssetEntry(string guid, string address, AddressableAssetGroup parent, bool readOnly) - { - m_GUID = guid; - m_Address = address; - m_ReadOnly = readOnly; - parentGroup = parent; - IsInResources = false; - IsInSceneList = false; - } - - internal void SerializeForHash(BinaryFormatter formatter, Stream stream) - { - formatter.Serialize(stream, m_GUID); - formatter.Serialize(stream, m_Address); - formatter.Serialize(stream, m_ReadOnly); - formatter.Serialize(stream, m_Labels.Count); - foreach (var t in m_Labels) - formatter.Serialize(stream, t); - - formatter.Serialize(stream, IsInResources); - formatter.Serialize(stream, IsInSceneList); - formatter.Serialize(stream, IsSubAsset); - } - - - internal void SetDirty(AddressableAssetSettings.ModificationEvent e, object o, bool postEvent) - { - if (parentGroup != null) - parentGroup.SetDirty(e, o, postEvent, true); - } - - internal string m_cachedAssetPath = null; - /// - /// The path of the asset. - /// - public string AssetPath - { - get - { - if (string.IsNullOrEmpty(m_cachedAssetPath)) - { - if (string.IsNullOrEmpty(guid)) - m_cachedAssetPath = string.Empty; - else if (guid == EditorSceneListName) - m_cachedAssetPath = EditorSceneListPath; - else if (guid == ResourcesName) - m_cachedAssetPath = ResourcesPath; - else - m_cachedAssetPath = AssetDatabase.GUIDToAssetPath(guid); - } - return m_cachedAssetPath; - } - } - - /// - /// The asset load path. This is used to determine the internal id of resource locations. - /// - /// True if the asset will be contained in an asset bundle. - /// Return the runtime path that should be used to load this entry. - public string GetAssetLoadPath(bool isBundled) - { - if (!IsScene) - { - if (IsInResources) - return GetResourcesPath(AssetPath); - else - return AssetPath; - } - else - { - if (isBundled) - return AssetPath; - var path = AssetPath; - int i = path.LastIndexOf(".unity"); - if (i > 0) - path = path.Substring(0, i); - i = path.ToLower().IndexOf("assets/"); - if (i == 0) - path = path.Substring("assets/".Length); - return path; - } - - } - - static string GetResourcesPath(string path) - { - path = path.Replace('\\', '/'); - int ri = path.ToLower().LastIndexOf("/resources/"); - if (ri >= 0) - path = path.Substring(ri + "/resources/".Length); - int i = path.LastIndexOf('.'); - if (i > 0) - path = path.Substring(0, i); - return path; - } - - public void GatherAllAssets(List assets, bool includeSelf, bool recurseAll, Func entryFilter = null) - { - var settings = parentGroup.Settings; - - if (guid == EditorSceneListName) - { - foreach (var s in BuiltinSceneCache.scenes) - { - if (s.enabled) - { - var entry = settings.CreateSubEntryIfUnique(s.guid.ToString(), Path.GetFileNameWithoutExtension(s.path), this); - if (entry != null) //TODO - it's probably really bad if this is ever null. need some error detection - { - entry.IsInSceneList = true; - entry.m_Labels = m_Labels; - if (entryFilter == null || entryFilter(entry)) - assets.Add(entry); - } - } - } - } - else if (guid == ResourcesName) - { - foreach (var resourcesDir in Directory.GetDirectories("Assets", "Resources", SearchOption.AllDirectories)) - { - foreach (var file in Directory.GetFiles(resourcesDir, "*.*", recurseAll ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly)) - { - if (AddressableAssetUtility.IsPathValidForEntry(file)) - { - var g = AssetDatabase.AssetPathToGUID(file); - var addr = GetResourcesPath(file); - var entry = settings.CreateSubEntryIfUnique(g, addr, this); - if (entry != null) //TODO - it's probably really bad if this is ever null. need some error detection - { - entry.IsInResources = true; - entry.m_Labels = m_Labels; - if (entryFilter == null || entryFilter(entry)) - assets.Add(entry); - } - } - } - if (!recurseAll) - { - foreach (var folder in Directory.GetDirectories(resourcesDir)) - { - if (AssetDatabase.IsValidFolder(folder)) - { - var entry = settings.CreateSubEntryIfUnique(AssetDatabase.AssetPathToGUID(folder), GetResourcesPath(folder), this); - if (entry != null) //TODO - it's probably really bad if this is ever null. need some error detection - { - entry.IsInResources = true; - entry.m_Labels = m_Labels; - if (entryFilter == null || entryFilter(entry)) - assets.Add(entry); - } - } - } - } - } - } - else - { - var path = AssetPath; - if (string.IsNullOrEmpty(path)) - return; - - if (AssetDatabase.IsValidFolder(path)) - { - foreach (var fi in Directory.GetFiles(path, "*.*", recurseAll ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly)) - { - var file = fi.Replace('\\', '/'); - if (AddressableAssetUtility.IsPathValidForEntry(file)) - { - var subGuid = AssetDatabase.AssetPathToGUID(file); - if (!BuiltinSceneCache.Contains(new GUID(subGuid))) - { - var entry = settings.CreateSubEntryIfUnique(subGuid, address + GetRelativePath(file, path), this); - if (entry != null) - { - entry.IsInResources = IsInResources; //if this is a sub-folder of Resources, copy it on down - entry.m_Labels = m_Labels; - if (entryFilter == null || entryFilter(entry)) - assets.Add(entry); - } - } - } - } - if (!recurseAll) - { - foreach (var fo in Directory.GetDirectories(path, "*.*", SearchOption.TopDirectoryOnly)) - { - var folder = fo.Replace('\\', '/'); - if (AssetDatabase.IsValidFolder(folder)) - { - var entry = settings.CreateSubEntryIfUnique(AssetDatabase.AssetPathToGUID(folder), address + GetRelativePath(folder, path), this); - if (entry != null) - { - entry.IsInResources = IsInResources; //if this is a sub-folder of Resources, copy it on down - entry.m_Labels = m_Labels; - if (entryFilter == null || entryFilter(entry)) - assets.Add(entry); - } - } - } - } - } - else - { - if (MainAssetType == typeof(AddressableAssetEntryCollection)) - { - var col = AssetDatabase.LoadAssetAtPath(AssetPath); - if (col != null) - { - foreach (var e in col.Entries) - { - var entry = settings.CreateSubEntryIfUnique(e.guid, e.address, this); - if (entry != null) - { - entry.IsInResources = e.IsInResources; - foreach (var l in e.labels) - entry.SetLabel(l, true, false); - foreach (var l in m_Labels) - entry.SetLabel(l, true, false); - if (entryFilter == null || entryFilter(entry)) - assets.Add(entry); - } - } - } - } - else - { - if (includeSelf) - if (entryFilter == null || entryFilter(this)) - assets.Add(this); - } - } - } - } - - string GetRelativePath(string file, string path) - { - return file.Substring(path.Length); - } - - /// - /// Implementation of ISerializationCallbackReceiver. Converts data to serializable form before serialization. - /// - public void OnBeforeSerialize() - { - m_SerializedLabels = new List(); - foreach (var t in m_Labels) - m_SerializedLabels.Add(t); - } - - /// - /// Implementation of ISerializationCallbackReceiver. Converts data from serializable form after deserialization. - /// - public void OnAfterDeserialize() - { - m_Labels = new HashSet(); - foreach (var s in m_SerializedLabels) - m_Labels.Add(s); - m_SerializedLabels = null; - } - - public void CreateCatalogEntries(List entries, bool isBundled, string providerType, IEnumerable deps, object extraData) - { - var assetPath = GetAssetLoadPath(isBundled); - var keyList = CreateKeyList(); - var mainType = MainAssetType; - - if (mainType == typeof(SceneAsset)) - mainType = typeof(SceneInstance); - - if (!CheckForEditorAssembly(ref mainType, assetPath, !IsInResources)) - return; - - HashSet typesSeen = new HashSet(); - typesSeen.Add(mainType); - var objs = AssetDatabase.LoadAllAssetRepresentationsAtPath(AssetPath); - for (int i = 0; i < objs.Length; i++) - { - var o = objs[i]; - var t = o.GetType(); - var internalId = string.Format("{0}[{1}]", assetPath, o.name); - if (!CheckForEditorAssembly(ref t, internalId, false)) - continue; - var namedAddress = string.Format("{0}.{1}", address, o.name); - entries.Add(new ContentCatalogDataEntry(t, internalId, providerType, new object[] { namedAddress }, deps, extraData)); - - if (!typesSeen.Contains(t)) - { - entries.Add(new ContentCatalogDataEntry(t, assetPath, providerType, keyList, deps, extraData)); - typesSeen.Add(t); - } - } - - entries.Add(new ContentCatalogDataEntry(mainType, assetPath, providerType, keyList, deps, extraData)); - } - - static bool CheckForEditorAssembly(ref Type t, string internalId, bool warnIfStripped) - { - - if (t == null) - return false; - if (t.Assembly.IsDefined(typeof(AssemblyIsEditorAssembly), true) || BuildUtility.IsEditorAssembly(t.Assembly)) - { - if (t == typeof(UnityEditor.Animations.AnimatorController)) - { - t = typeof(RuntimeAnimatorController); - return true; - } - if (t.FullName == "UnityEditor.Audio.AudioMixerController") - { - t = typeof(UnityEngine.Audio.AudioMixer); - return true; - } - if(warnIfStripped) - Debug.LogWarningFormat("Type {0} is in editor assembly {1}. Asset location with internal id {2} will be stripped.", t.Name, t.Assembly.FullName, internalId); - return false; - } - - return true; - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetEntry.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetEntry.cs.meta deleted file mode 100644 index d594560a..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetEntry.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6b4a4e229baaa2544a4d681cc0dc5dea -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetEntryCollection.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetEntryCollection.cs deleted file mode 100644 index 0dc58609..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetEntryCollection.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets.Settings -{ - /// - /// Contains a list of AddressableAssetEntries that can be included in the settings. The purpose of this class is to provide a way of combining entries from external sources such as packages into your project settings. - /// - public class AddressableAssetEntryCollection : ScriptableObject - { - [FormerlySerializedAs("m_serializeEntries")] - [SerializeField] - List m_SerializeEntries = new List(); - /// - /// The collection of entries. - /// - public List Entries { get { return m_SerializeEntries; } } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetEntryCollection.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetEntryCollection.cs.meta deleted file mode 100644 index 84c64f5d..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetEntryCollection.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 948f5bac7ffcefe4e8dbcf04b503e79b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroup.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroup.cs deleted file mode 100644 index 971b3101..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroup.cs +++ /dev/null @@ -1,516 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.Serialization.Formatters.Binary; -using UnityEditor.AddressableAssets; -using UnityEditor.AddressableAssets.Settings.GroupSchemas; -using UnityEngine; -using UnityEngine.AddressableAssets; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets.Settings -{ - /// - /// Contains the collection of asset entries associated with this group. - /// - [Serializable] - public class AddressableAssetGroup : ScriptableObject, IComparer, ISerializationCallbackReceiver - { - [FormerlySerializedAs("m_name")] - [SerializeField] - string m_GroupName; - [FormerlySerializedAs("m_data")] - [SerializeField] - KeyDataStore m_Data; - [FormerlySerializedAs("m_guid")] - [SerializeField] - string m_GUID; - [FormerlySerializedAs("m_serializeEntries")] - [SerializeField] - List m_SerializeEntries = new List(); - [FormerlySerializedAs("m_readOnly")] - [SerializeField] - internal bool m_ReadOnly; - [FormerlySerializedAs("m_settings")] - [SerializeField] - AddressableAssetSettings m_Settings; - [FormerlySerializedAs("m_schemaSet")] - [SerializeField] - AddressableAssetGroupSchemaSet m_SchemaSet = new AddressableAssetGroupSchemaSet(); - - Dictionary m_EntryMap = new Dictionary(); - - /// - /// The group name. - /// - public virtual string Name - { - get - { - if (string.IsNullOrEmpty(m_GroupName)) - m_GroupName = Guid; - - return m_GroupName; - } - set - { - m_GroupName = value; - m_GroupName = m_GroupName.Replace('/', '-'); - m_GroupName = m_GroupName.Replace('\\', '-'); - if(m_GroupName != value) - Debug.Log("Group names cannot include '\\' or '/'. Replacing with '-'. " + m_GroupName); - if (m_GroupName != name) - { - string guid; - long localId; - if (AssetDatabase.TryGetGUIDAndLocalFileIdentifier(this, out guid, out localId)) - { - var path = AssetDatabase.GUIDToAssetPath(guid); - if (!string.IsNullOrEmpty(path)) - { - var newPath = path.Replace(name, m_GroupName); - if (path != newPath) - { - var setPath = AssetDatabase.MoveAsset(path, newPath); - if (!string.IsNullOrEmpty(setPath)) - { - //unable to rename group due to invalid file name - Debug.LogError("Rename of Group failed. " + setPath); - } - m_GroupName = name; - - } - } - } - else - { - //this isn't a valid asset, which means it wasn't persisted, so just set the object name to the desired display name. - name = m_GroupName; - } - SetDirty(AddressableAssetSettings.ModificationEvent.GroupRenamed, this, true, true); - } - } - } - /// - /// The group GUID. - /// - public virtual string Guid - { - get - { - if (string.IsNullOrEmpty(m_GUID)) - m_GUID = GUID.Generate().ToString(); - return m_GUID; - } - } - - /// - /// List of schemas for this group. - /// - public List Schemas { get { return m_SchemaSet.Schemas; } } - - /// - /// Get the types of added schema for this group. - /// - public List SchemaTypes { get { return m_SchemaSet.Types; } } - - string GetSchemaAssetPath(Type type) - { - return Settings.IsPersisted ? (Settings.GroupSchemaFolder + "/" + m_GUID + "_" + type.Name + ".asset") : string.Empty; - } - - /// - /// Adds a copy of the provided schema object. - /// - /// The schema to add. A copy will be made and saved in a folder relative to the main Addressables settings asset. - /// Determines if this method call will post an event to the internal addressables event system - /// The created schema object. - public AddressableAssetGroupSchema AddSchema(AddressableAssetGroupSchema schema, bool postEvent = true) - { - var added = m_SchemaSet.AddSchema(schema, GetSchemaAssetPath); - if (added != null) - { - added.Group = this; - SetDirty(AddressableAssetSettings.ModificationEvent.GroupSchemaAdded, this, postEvent, true); - } - return added; - } - - /// - /// Creates and adds a schema of a given type to this group. The schema asset will be created in the GroupSchemas directory relative to the settings asset. - /// - /// The schema type. This type must not already be added. - /// Determines if this method call will post an event to the internal addressables event system - /// The created schema object. - public AddressableAssetGroupSchema AddSchema(Type type, bool postEvent = true) - { - var added = m_SchemaSet.AddSchema(type, GetSchemaAssetPath); - if (added != null) - { - added.Group = this; - SetDirty(AddressableAssetSettings.ModificationEvent.GroupSchemaAdded, this, postEvent, true); - } - return added; - } - - /// - /// Creates and adds a schema of a given type to this group. - /// - /// Determines if this method call will post an event to the internal addressables event system - /// The schema type. This type must not already be added. - /// The created schema object. - public TSchema AddSchema(bool postEvent = true) where TSchema : AddressableAssetGroupSchema - { - return AddSchema(typeof(TSchema), postEvent) as TSchema; - } - - /// - /// Remove a given schema from this group. - /// - /// The schema type. - /// Determines if this method call will post an event to the internal addressables event system - /// True if the schema was found and removed, false otherwise. - public bool RemoveSchema(Type type, bool postEvent = true) - { - if (!m_SchemaSet.RemoveSchema(type)) - return false; - - SetDirty(AddressableAssetSettings.ModificationEvent.GroupSchemaRemoved, this, postEvent, true); - return true; - } - - /// - /// Remove a given schema from this group. - /// - /// Determines if this method call will post an event to the internal addressables event system - /// The schema type. - /// True if the schema was found and removed, false otherwise. - public bool RemoveSchema(bool postEvent = true) - { - return RemoveSchema(typeof(TSchema), postEvent); - } - - /// - /// Gets an added schema of the specified type. - /// - /// The schema type. - /// The schema if found, otherwise null. - public TSchema GetSchema() where TSchema : AddressableAssetGroupSchema - { - return GetSchema(typeof(TSchema)) as TSchema; - } - - /// - /// Gets an added schema of the specified type. - /// - /// The schema type. - /// The schema if found, otherwise null. - public AddressableAssetGroupSchema GetSchema(Type type) - { - return m_SchemaSet.GetSchema(type); - } - - /// - /// Checks if the group contains a schema of a given type. - /// - /// The schema type. - /// True if the schema type or subclass has been added to this group. - public bool HasSchema() - { - return HasSchema(typeof(TSchema)); - } - - /// - /// Removes all schemas and optionally deletes the assets associated with them. - /// - /// If true, the schema assets will also be deleted. - /// Determines if this method call will post an event to the internal addressables event system - public void ClearSchemas(bool deleteAssets, bool postEvent = true) - { - m_SchemaSet.ClearSchemas(deleteAssets); - SetDirty(AddressableAssetSettings.ModificationEvent.GroupRemoved, this, postEvent, true); - } - - /// - /// Checks if the group contains a schema of a given type. - /// - /// The schema type. - /// True if the schema type or subclass has been added to this group. - public bool HasSchema(Type type) - { - return GetSchema(type) != null; - } - - /// - /// Is this group read only. This is normally false. Built in resources (resource folders and the scene list) are put into a special read only group. - /// - public virtual bool ReadOnly - { - get { return m_ReadOnly; } - } - - /// - /// The AddressableAssetSettings that this group belongs to. - /// - public AddressableAssetSettings Settings - { - get - { - if (m_Settings == null) - m_Settings = AddressableAssetSettingsDefaultObject.Settings; - - return m_Settings; - } - } - - /// - /// The collection of asset entries. - /// - public virtual ICollection entries - { - get - { - return m_EntryMap.Values; - } - } - - /// - /// Is the default group. - /// - public virtual bool Default - { - get { return Guid == Settings.DefaultGroup.Guid; } - } - - /// - public virtual int Compare(AddressableAssetEntry x, AddressableAssetEntry y) - { - if (x == null && y == null) - return 0; - if (x == null) - return -1; - if (y == null) - return 1; - return x.guid.CompareTo(y.guid); - } - - internal void SerializeForHash(BinaryFormatter formatter, Stream stream) - { - formatter.Serialize(stream, m_GroupName); - formatter.Serialize(stream, m_GUID); - formatter.Serialize(stream, entries.Count); - foreach (var e in entries) - e.SerializeForHash(formatter, stream); - formatter.Serialize(stream, m_ReadOnly); - //TODO: serialize group data - } - - /// - /// Converts data to serializable format. - /// - public void OnBeforeSerialize() - { - m_SerializeEntries.Clear(); - foreach (var e in entries) - m_SerializeEntries.Add(e); - - m_SerializeEntries.Sort(this); - } - - /// - /// Converts data from serializable format. - /// - public void OnAfterDeserialize() - { - ResetEntryMap(); - m_SerializeEntries.Clear(); - } - - internal void ResetEntryMap() - { - m_EntryMap.Clear(); - foreach (var e in m_SerializeEntries) - { - try - { - e.parentGroup = this; - e.IsSubAsset = false; - m_EntryMap.Add(e.guid, e); - } - catch (Exception ex) - { - Addressables.Log(e.address); - Debug.LogException(ex); - } - } - - } - - void OnEnable() - { - Validate(); - } - - internal void Validate() - { - - bool allValid = false; - while (!allValid) - { - allValid = true; - for (int i = 0; i < m_SchemaSet.Schemas.Count; i++) - { - if (m_SchemaSet.Schemas[i] == null) - { - m_SchemaSet.Schemas.RemoveAt(i); - allValid = false; - break; - } - if(m_SchemaSet.Schemas[i].Group == null) - m_SchemaSet.Schemas[i].Group = this; - } - } - - var editorList = GetAssetEntry(AddressableAssetEntry.EditorSceneListName); - if (editorList != null) - { - if (m_GroupName == null) - m_GroupName = AddressableAssetSettings.PlayerDataGroupName; - if (m_Data != null) - { - if(!HasSchema()) - AddSchema(); - m_Data = null; - } - } - else if(Settings != null) - { - if (m_GroupName == null) - m_GroupName = Settings.FindUniqueGroupName("Packed Content Group"); - m_Data = null; - } - } - - internal void DedupeEnteries() - { - List removeEntries = new List(); - foreach (AddressableAssetEntry e in m_EntryMap.Values) - { - AddressableAssetEntry lookedUpEntry = m_Settings.FindAssetEntry(e.guid); - if (lookedUpEntry.parentGroup != this) - { - Debug.LogWarning( e.address - + " is already a member of group " - + lookedUpEntry.parentGroup - + " but group " - + m_GroupName - + " contained a reference to it. Removing referece."); - removeEntries.Add(e); - } - } - if(removeEntries.Count > 0) - RemoveAssetEntries(removeEntries); - } - - internal void Initialize(AddressableAssetSettings settings, string groupName, string guid, bool readOnly) - { - m_Settings = settings; - m_GroupName = groupName; - m_ReadOnly = readOnly; - m_GUID = guid; - } - - /// - /// Gathers all asset entries. Each explicit entry may contain multiple sub entries. For example, addressable folders create entries for each asset contained within. - /// - /// The generated list of entries. For simple entries, this will contain just the entry itself if specified. - /// Determines if the entry should be contained in the result list or just sub entries. - /// Determines if full recursion should be done when gathering entries. - /// Optional predicate to run against each entry, only returning those that pass. A null filter will return all entries - public virtual void GatherAllAssets(List results, bool includeSelf, bool recurseAll, Func entryFilter = null) - { - foreach (var e in entries) - if(entryFilter == null || entryFilter(e)) - e.GatherAllAssets(results, includeSelf, recurseAll, entryFilter); - } - - internal void AddAssetEntry(AddressableAssetEntry e, bool postEvent = true) - { - e.IsSubAsset = false; - e.parentGroup = this; - m_EntryMap[e.guid] = e; - SetDirty(AddressableAssetSettings.ModificationEvent.EntryAdded, e, postEvent, true); - } - - /// - /// Get an entry via the asset guid. - /// - /// The asset guid. - /// - public virtual AddressableAssetEntry GetAssetEntry(string guid) - { - if (m_EntryMap.ContainsKey(guid)) - return m_EntryMap[guid]; - return null; - } - - /// - /// Marks the object as modified. - /// - /// The event type that is changed. - /// The object data that corresponds to the event. - /// If true, the event is propagated to callbacks. - /// If true, the group asset will be marked as dirty. - public void SetDirty(AddressableAssetSettings.ModificationEvent modificationEvent, object eventData, bool postEvent, bool groupModified = false) - { - if (Settings != null) - { - if (groupModified && Settings.IsPersisted && this != null) - EditorUtility.SetDirty(this); - Settings.SetDirty(modificationEvent, eventData, postEvent, false); - } - } - - /// - /// Remove an entry. - /// - /// The entry to remove. - /// If true, post the event to callbacks. - public void RemoveAssetEntry(AddressableAssetEntry entry, bool postEvent = true) - { - m_EntryMap.Remove(entry.guid); - entry.parentGroup = null; - SetDirty(AddressableAssetSettings.ModificationEvent.EntryRemoved, entry, postEvent, true); - } - - internal void RemoveAssetEntries(IEnumerable removeEntries, bool postEvent = true) - { - foreach (AddressableAssetEntry entry in removeEntries) - { - m_EntryMap.Remove(entry.guid); - entry.parentGroup = null; - } - if(removeEntries.Count() > 0) - SetDirty(AddressableAssetSettings.ModificationEvent.EntryRemoved, removeEntries.ToArray(), postEvent, true); - } - - /// - /// Check to see if a group is the Default Group. - /// - /// - public bool IsDefaultGroup() - { - return Guid == m_Settings.DefaultGroup.Guid; - } - - /// - /// Check if a group has the appropriate schemas and attributes that the Default Group requires. - /// - /// - public bool CanBeSetAsDefault() - { - return !m_ReadOnly; - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroup.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroup.cs.meta deleted file mode 100644 index 9607037f..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroup.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bbb281ee3bf0b054c82ac2347e9e782c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupSchema.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupSchema.cs deleted file mode 100644 index 3d65bbb3..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupSchema.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using System.Reflection; -using UnityEngine; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets.Settings -{ - /// - /// Contains data for AddressableAssetGroups. - /// - public class AddressableAssetGroupSchema : ScriptableObject - { - [FormerlySerializedAs("m_group")] - [HideInInspector] - [SerializeField] - AddressableAssetGroup m_Group; - - /// - /// Get the group that the schema belongs to. - /// - public AddressableAssetGroup Group - { - get - { - return m_Group; - } - internal set - { - m_Group = value; - if(m_Group != null) - OnSetGroup(m_Group); - } - } - - /// - /// Override this method to perform post creation initialization. - /// - /// The group that the schema is added to. - protected virtual void OnSetGroup(AddressableAssetGroup group) - { - - } - - /// - /// Used to display the GUI of the schema. - /// - public virtual void OnGUI() - { - var type = GetType(); - var so = new SerializedObject(this); - var p = so.GetIterator(); - p.Next(true); - while (p.Next(false)) - { - var prop = type.GetField(p.name, BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly); - if(prop != null) - EditorGUILayout.PropertyField(p, true); - } - so.ApplyModifiedProperties(); - } - - /// - /// Used to notify the addressables settings that data has been modified. This must be called by subclasses to ensure proper cache invalidation. - /// - /// Determines if this method call will post an event to the internal addressables event system - protected void SetDirty(bool postEvent) - { - if (m_Group != null) - { - if (m_Group.Settings != null && m_Group.Settings.IsPersisted) - EditorUtility.SetDirty(this); - if (m_Group != null) - m_Group.SetDirty(AddressableAssetSettings.ModificationEvent.GroupSchemaModified, this, postEvent, false); - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupSchema.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupSchema.cs.meta deleted file mode 100644 index 0ad9fc2f..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupSchema.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ef7207c080a54574b9bfc095d91595aa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupSchemaSet.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupSchemaSet.cs deleted file mode 100644 index 4da297c2..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupSchemaSet.cs +++ /dev/null @@ -1,209 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using UnityEngine; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets.Settings -{ - using Object = UnityEngine.Object; - - /// - /// Collection of AddressableAssetGroupSchema objects - /// - [Serializable] - public class AddressableAssetGroupSchemaSet - { - [FormerlySerializedAs("m_schemas")] - [SerializeField] - List m_Schemas = new List(); - - /// - /// List of schemas for this group. - /// - public List Schemas { get { return m_Schemas; } } - /// - /// Get the list of schema types. - /// - public List Types - { - get - { - var types = new List(m_Schemas.Count); - foreach (var s in m_Schemas) - types.Add(s.GetType()); - return types; - } - } - - /// - /// Adds a copy of the provided schema object. - /// - /// The schema to copy. - /// A function that returns the path where this method can save the schema asset. Set to null to not create an in-project asset. - /// The created schema object. - public AddressableAssetGroupSchema AddSchema(AddressableAssetGroupSchema schema, Func pathFunc) - { - if (schema == null) - { - Debug.LogWarning("Cannot add null Schema object."); - return null; - } - var type = schema.GetType(); - - if (GetSchema(type) != null) - { - Debug.LogWarningFormat("Cannot add multiple schemas of the same type: {0}.", type.FullName); - return null; - } - - if (pathFunc == null) - { - m_Schemas.Add(schema); - return schema; - } - - var assetName = pathFunc(type); - if (File.Exists(assetName)) - { - Debug.LogWarningFormat("Schema asset already exists at path {0}, relinking.", assetName); - var existingSchema = AssetDatabase.LoadAssetAtPath(assetName, type) as AddressableAssetGroupSchema; - m_Schemas.Add(existingSchema); - return existingSchema; - } - - var newSchema = Object.Instantiate(schema); - if (!string.IsNullOrEmpty(assetName)) - { - var dir = Path.GetDirectoryName(assetName); - if (!string.IsNullOrEmpty(dir) && !Directory.Exists(dir)) - Directory.CreateDirectory(dir); - AssetDatabase.CreateAsset(newSchema, assetName); - } - - m_Schemas.Add(newSchema); - return newSchema; - } - - /// - /// Creates and adds a schema of a given type to this group. The schema asset will be created in the GroupSchemas directory relative to the settings asset. - /// - /// The schema type. This type must not already be added. - /// A function that returns the path where this method can save the schema asset. Set to null to not create an in-project asset. - /// The created schema object. - public AddressableAssetGroupSchema AddSchema(Type type, Func pathFunc) - { - if (type == null) - { - Debug.LogWarning("Cannot add null Schema type."); - return null; - } - - if (!typeof(AddressableAssetGroupSchema).IsAssignableFrom(type)) - { - Debug.LogWarningFormat("Invalid Schema type {0}. Schemas must inherit from AddressableAssetGroupSchema.", type.FullName); - return null; - } - - var existing = GetSchema(type); - if (existing != null) - { - Debug.LogWarningFormat("Cannot add multiple schemas of the same type: {0}.", existing.GetType().FullName); - return existing; - } - - var assetName = pathFunc(type); - if (File.Exists(assetName)) - { - Debug.LogWarningFormat("Schema asset already exists at path {0}, relinking.", assetName); - var existingSchema = AssetDatabase.LoadAssetAtPath(assetName, type) as AddressableAssetGroupSchema; - m_Schemas.Add(existingSchema); - return existingSchema; - } - - var schema = ScriptableObject.CreateInstance(type) as AddressableAssetGroupSchema; - if (!string.IsNullOrEmpty(assetName)) - { - var dir = Path.GetDirectoryName(assetName); - if (!string.IsNullOrEmpty(dir) && !Directory.Exists(dir)) - Directory.CreateDirectory(dir); - AssetDatabase.CreateAsset(schema, assetName); - } - - m_Schemas.Add(schema); - return schema; - } - - /// - /// Remove a given schema from this group. - /// - /// The schema type. - /// True if the schema was found and removed, false otherwise. - public bool RemoveSchema(Type type) - { - for (int i = 0; i < m_Schemas.Count; i++) - { - var s = m_Schemas[i]; - if (s.GetType() == type) - { - m_Schemas.RemoveAt(i); - string guid; - long lfid; - if (AssetDatabase.TryGetGUIDAndLocalFileIdentifier(s, out guid, out lfid)) - AssetDatabase.DeleteAsset(AssetDatabase.GUIDToAssetPath(guid)); - return true; - } - } - return false; - } - - /// - /// Gets an added schema of the specified type. - /// - /// The schema type. - /// The schema if found, otherwise null. - public AddressableAssetGroupSchema GetSchema(Type type) - { - if (type == null) - { - Debug.LogWarning("Cannot get schema with null type."); - return null; - } - - if (!typeof(AddressableAssetGroupSchema).IsAssignableFrom(type)) - { - Debug.LogWarningFormat("Invalid Schema type {0}. Schemas must inherit from AddressableAssetGroupSchema.", type.FullName); - return null; - } - - foreach (var s in m_Schemas) - if (type == s.GetType()) - return s; - return null; - } - - /// - /// Removes all schemas and optionally deletes the assets associated with them. - /// - /// If true, the schema assets will also be deleted. - public void ClearSchemas(bool deleteAssets) - { - if (deleteAssets) - { - for (int i = 0; i < m_Schemas.Count; i++) - { - var s = m_Schemas[i]; - string guid; - long lfid; - if (AssetDatabase.TryGetGUIDAndLocalFileIdentifier(s, out guid, out lfid)) - { - var path = AssetDatabase.GUIDToAssetPath(guid); - if (File.Exists(path)) - AssetDatabase.DeleteAsset(path); - } - } - } - m_Schemas.Clear(); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupSchemaSet.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupSchemaSet.cs.meta deleted file mode 100644 index 81d0c18d..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupSchemaSet.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2fa9998af31eaba4d86afdc900c345ec -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupSchemaTemplate.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupSchemaTemplate.cs deleted file mode 100644 index da6b5e9f..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupSchemaTemplate.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Reflection; -using UnityEngine; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets.Settings -{ - // TODO: OBSELETE: This is replaced with AddressableAssetGroupTemplate, this is needed to update existing setups to new Preset method - /// - /// Contains a set of schemas used by the GUI to create predefined asset groups. - /// - [Serializable] - public class AddressableAssetGroupSchemaTemplate - { - [FormerlySerializedAs("m_displayName")] - [SerializeField] - string m_DisplayName; - [FormerlySerializedAs("m_description")] - [SerializeField] - string m_Description; - [FormerlySerializedAs("m_schemaTypes")] - [SerializeField] - List m_SchemaTypes; - - /// - /// The display name of the template. - /// - public string DisplayName - { - get { return m_DisplayName; } - } - - /// - /// the description of the template. - /// - public string Description - { - get { return m_Description; } - } - - /// - /// The types of schemas in this template. - /// - /// The array of schema types. - public Type[] GetTypes() - { - var types = new Type[m_SchemaTypes.Count]; - for (int i = 0; i < types.Length; i++) - types[i] = m_SchemaTypes[i].Value; - return types; - } - - /// - /// Creates a template with the specified name, descriptionm and schema types. - /// - /// The name of the template. - /// The template description. - /// The schema types for the template. - /// The newly created schema template. - public static AddressableAssetGroupSchemaTemplate Create(string name, string descr, params Type[] types) - { - var st = new AddressableAssetGroupSchemaTemplate { m_DisplayName = name, m_Description = descr }; - st.m_SchemaTypes = new List(types.Length); - for (int i = 0; i < types.Length; i++) - st.m_SchemaTypes.Add(new SerializedType { Value = types[i] }); - return st; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupSchemaTemplate.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupSchemaTemplate.cs.meta deleted file mode 100644 index 7c378a77..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupSchemaTemplate.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b5aaf4e4b41e6a447935d02bf76b2aa3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupTemplate.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupTemplate.cs deleted file mode 100644 index ecb31efd..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupTemplate.cs +++ /dev/null @@ -1,217 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.Presets; -using UnityEngine; -using UnityEngine.Assertions; - -namespace UnityEditor.AddressableAssets.Settings -{ - [CreateAssetMenu(fileName = "AddressableAssetGroupTemplate.asset", menuName = "Addressable Assets/Groups/New Group Template")] - public class AddressableAssetGroupTemplate : ScriptableObject, IGroupTemplate - { - [SerializeField] - private List m_SchemaObjects = new List(); - [SerializeField] - private string m_Description; - [SerializeField] - private AddressableAssetSettings m_Settings; - - private AddressableAssetSettings Settings - { - get - { - if (m_Settings == null) - m_Settings = AddressableAssetSettingsDefaultObject.Settings; - - return m_Settings; - } - } - - /// - /// Returns a list of Preset objects for AddressableAssetGroupSchema associated with this template - /// - internal List SchemaPresetObjects - { - get - { - List m_SchemaPresetObjects = new List(m_SchemaObjects.Count); - foreach( AddressableAssetGroupSchema schemaObject in m_SchemaObjects ) - m_SchemaPresetObjects.Add( new Preset( schemaObject ) ); - return m_SchemaPresetObjects; - } - } - - /// - /// Returns the list of Preset objects of AddressableAssetGroupSchema associated with this template - /// - public List SchemaObjects - { - get { return m_SchemaObjects; } - } - - /// - /// The name of the AddressableAssetGroupTemplate - /// - public string Name - { - get { return name; } - } - - /// - /// The description of the AddressableAssetGroupTemplate - /// - public string Description - { - get { return m_Description; } - set { m_Description = value; } - } - - /// - /// Gets the types of the AddressableAssetGroupSchema associated with this template - /// - /// AddressableAssetGroupSchema types for schema on this template - public Type[] GetTypes() - { - var types = new Type[m_SchemaObjects.Count]; - for (int i = 0; i < types.Length; i++) - types[i] = m_SchemaObjects[i].GetType(); - return types; - } - - /// - /// Applies schema values for the group to the schema values found in the template - /// - /// The AddressableAssetGroup to apply the schema settings to - public void ApplyToAddressableAssetGroup( AddressableAssetGroup group ) - { - foreach( AddressableAssetGroupSchema schema in group.Schemas ) - { - List presets = SchemaPresetObjects; - foreach( Preset p in presets ) - { - Assert.IsNotNull( p ); - if( p.CanBeAppliedTo( schema ) ) - { - p.ApplyTo( schema ); - schema.Group = group; - } - } - } - } - - /// - /// Adds the AddressableAssetGroupSchema of type to the template. - /// - /// The Type for the AddressableAssetGroupSchema to add to this template. - /// If true, the event is propagated to callbacks. - /// If true, the type was added successfully. - public bool AddSchema(Type type, bool postEvent = true) - { - if (type == null) - { - Debug.LogWarning("Cannot remove schema with null type."); - return false; - } - if (!typeof(AddressableAssetGroupSchema).IsAssignableFrom(type)) - { - Debug.LogWarningFormat("Invalid Schema type {0}. Schemas must inherit from AddressableAssetGroupSchema.", type.FullName); - return false; - } - - foreach (AddressableAssetGroupSchema schemaObject in m_SchemaObjects) - { - if (schemaObject.GetType() == type) - { - Debug.LogError("Scheme already exists"); - return false; - } - } - - AddressableAssetGroupSchema schemaInstance = (AddressableAssetGroupSchema)CreateInstance(type); - if (schemaInstance != null) - { - schemaInstance.name = type.Name; - try - { - schemaInstance.hideFlags |= HideFlags.HideInHierarchy; - AssetDatabase.AddObjectToAsset(schemaInstance, this); - } - catch (Exception e) - { - Console.WriteLine(e); - throw; - } - m_SchemaObjects.Add(schemaInstance); - - SetDirty(AddressableAssetSettings.ModificationEvent.GroupTemplateSchemaAdded, this, postEvent); - AssetDatabase.SaveAssets(); - } - - return schemaInstance != null; - } - - /// - /// Removes the AddressableAssetGroupSchema of the type from the template. - /// - /// The type of AddressableAssetGroupSchema to be removed. - /// If true, the event is propagated to callbacks. - /// If true, the type was removed successfully. - public bool RemoveSchema( Type type, bool postEvent = true) - { - if (type == null) - { - Debug.LogWarning("Cannot remove schema with null type."); - return false; - } - if (!typeof(AddressableAssetGroupSchema).IsAssignableFrom(type)) - { - Debug.LogWarningFormat("Invalid Schema type {0}. Schemas must inherit from AddressableAssetGroupSchema.", type.FullName); - return false; - } - - for( int i = 0; i < m_SchemaObjects.Count; ++i ) - { - if( m_SchemaObjects[i].GetType() == type ) - return RemoveSchema(i, postEvent); - } - - return false; - } - - /// - /// Removes the Schema at the given index. - /// - /// The index of the object to be removed. - /// If true, the event is propagated to callbacks. - /// If true, the type was removed successfully. - internal bool RemoveSchema( int index, bool postEvent = true) - { - if( index == -1 ) - return false; - - AssetDatabase.RemoveObjectFromAsset( m_SchemaObjects[index] ); - DestroyImmediate( m_SchemaObjects[index] ); - m_SchemaObjects.RemoveAt( index ); - - SetDirty(AddressableAssetSettings.ModificationEvent.GroupTemplateSchemaRemoved, this, postEvent); - AssetDatabase.SaveAssets(); - return true; - } - - /// - /// Marks the object as modified. - /// - /// The event type that is changed. - /// The object data that corresponds to the event. - /// If true, the event is propagated to callbacks. - public void SetDirty(AddressableAssetSettings.ModificationEvent modificationEvent, object eventData, bool postEvent) - { - if (Settings != null) - { - if (Settings.IsPersisted && this != null) - EditorUtility.SetDirty(this); - Settings.SetDirty(modificationEvent, eventData, postEvent, false); - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupTemplate.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupTemplate.cs.meta deleted file mode 100644 index 9a1a4d54..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupTemplate.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1a3c5d64ac83548c09dd1678b9f6f1cd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupTemplateInterface.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupTemplateInterface.cs deleted file mode 100644 index a68aed2e..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupTemplateInterface.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace UnityEditor.AddressableAssets.Settings -{ - public interface IGroupTemplate - { - /// - /// The name of the group, used for the menu and newly created group name. - /// - string Name { get; } - - /// - /// Description of the Template, to be used as a tooltip - /// - string Description { get; } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupTemplateInterface.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupTemplateInterface.cs.meta deleted file mode 100644 index 5d57f94e..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetGroupTemplateInterface.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5ad5fa919de6248649b4c095f3809802 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetPostProcessor.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetPostProcessor.cs deleted file mode 100644 index 9dfea6e6..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetPostProcessor.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.AddressableAssets; - -namespace UnityEditor.AddressableAssets.Settings -{ - class AddressablesAssetPostProcessor : AssetPostprocessor - { - struct ImportSet - { - public string[] importedAssets; - public string[] deletedAssets; - public string[] movedAssets; - public string[] movedFromAssetPaths; - } - - static List s_Buffer; - static Action s_Handler; - public static Action OnPostProcess - { - get - { - return s_Handler; - } - set - { - s_Handler = value; - if (s_Handler != null && s_Buffer != null) - { - foreach (var b in s_Buffer) - s_Handler(b.importedAssets, b.deletedAssets, b.movedAssets, b.movedFromAssetPaths); - s_Buffer = null; - } - } - } - static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) - { - - if (s_Handler != null) - { - s_Handler(importedAssets, deletedAssets, movedAssets, movedFromAssetPaths); - } - else - { - //only buffer imports if they will be consumed by the settings object - if (AddressableAssetSettingsDefaultObject.SettingsExists) - { - if (s_Buffer == null) - s_Buffer = new List(); - s_Buffer.Add(new ImportSet { importedAssets = importedAssets, deletedAssets = deletedAssets, movedAssets = movedAssets, movedFromAssetPaths = movedFromAssetPaths }); - } - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetPostProcessor.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetPostProcessor.cs.meta deleted file mode 100644 index 0e72f6dd..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetPostProcessor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f88726da597753f45b7ea82733006421 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetProfileSettings.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetProfileSettings.cs deleted file mode 100644 index 32d800b4..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetProfileSettings.cs +++ /dev/null @@ -1,702 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; -using UnityEngine.AddressableAssets; -using UnityEngine.AddressableAssets.Initialization; -using UnityEngine.Serialization; - -// ReSharper disable DelegateSubtraction - -namespace UnityEditor.AddressableAssets.Settings -{ - /// - /// Contains user defined variables to control build parameters. - /// - [Serializable] - public class AddressableAssetProfileSettings - { - internal delegate string ProfileStringEvaluationDelegate(string key); - - [NonSerialized] - internal ProfileStringEvaluationDelegate onProfileStringEvaluation; - - internal void RegisterProfileStringEvaluationFunc(ProfileStringEvaluationDelegate f) - { - onProfileStringEvaluation -= f; - onProfileStringEvaluation += f; - } - - internal void UnregisterProfileStringEvaluationFunc(ProfileStringEvaluationDelegate f) - { - onProfileStringEvaluation -= f; - } - - [Serializable] - internal class BuildProfile - { - [Serializable] - internal class ProfileEntry - { - [FormerlySerializedAs("m_id")] - [SerializeField] - string m_Id; - public string id - { - get { return m_Id; } - set { m_Id = value; } - } - [FormerlySerializedAs("m_value")] - [SerializeField] - string m_Value; - public string value - { - get { return m_Value; } - set { m_Value = value; } - } - internal ProfileEntry() { } - internal ProfileEntry(string id, string v) - { - m_Id = id; - m_Value = v; - } - internal ProfileEntry(ProfileEntry copy) - { - m_Id = copy.m_Id; - m_Value = copy.m_Value; - } - } - [NonSerialized] - AddressableAssetProfileSettings m_ProfileParent; - - [FormerlySerializedAs("m_inheritedParent")] - [SerializeField] - string m_InheritedParent; - - public string inheritedParent - { - get { return m_InheritedParent; } - set { m_InheritedParent = value; } - } - [FormerlySerializedAs("m_id")] - [SerializeField] - string m_Id; - internal string id - { - get { return m_Id; } - set { m_Id = value; } - } - [FormerlySerializedAs("m_profileName")] - [SerializeField] - string m_ProfileName; - internal string profileName - { - get { return m_ProfileName; } - set { m_ProfileName = value; } - } - [FormerlySerializedAs("m_values")] - [SerializeField] - List m_Values = new List(); - internal List values - { - get { return m_Values; } - set { m_Values = value; } - } - - internal BuildProfile(string name, BuildProfile copyFrom, AddressableAssetProfileSettings ps) - { - m_InheritedParent = null; - id = GUID.Generate().ToString(); - profileName = name; - values.Clear(); - m_ProfileParent = ps; - - if (copyFrom != null) - { - foreach (var v in copyFrom.values) - values.Add(new ProfileEntry(v)); - m_InheritedParent = copyFrom.m_InheritedParent; - } - } - internal void OnAfterDeserialize(AddressableAssetProfileSettings ps) - { - m_ProfileParent = ps; - } - - int IndexOfVarId(string variableId) - { - if (string.IsNullOrEmpty(variableId)) - return -1; - - for (int i = 0; i < values.Count; i++) - if (values[i].id == variableId) - return i; - return -1; - } - - int IndexOfVarName(string name) - { - if (m_ProfileParent == null) - return -1; - - var currId = m_ProfileParent.GetVariableId(name); - if (string.IsNullOrEmpty(currId)) - return -1; - - for (int i = 0; i < values.Count; i++) - if (values[i].id == currId) - return i; - return -1; - } - - internal string GetValueById(string variableId) - { - var i = IndexOfVarId(variableId); - if (i >= 0) - return values[i].value; - - - if (m_ProfileParent == null) - return null; - - return m_ProfileParent.GetValueById(m_InheritedParent, variableId); - } - - internal void SetValueById(string variableId, string val) - { - var i = IndexOfVarId(variableId); - if (i >= 0) - values[i].value = val; - } - - internal void ReplaceVariableValueSubString(string searchStr, string replacementStr) - { - foreach (var v in values) - v.value = v.value.Replace(searchStr, replacementStr); - } - - - internal bool IsValueInheritedByName(string variableName) - { - return IndexOfVarName(variableName) >= 0; - } - - internal bool IsValueInheritedById(string variableId) - { - return IndexOfVarId(variableId) >= 0; - } - } - - internal void OnAfterDeserialize(AddressableAssetSettings settings) - { - m_Settings = settings; - foreach (var prof in m_Profiles) - { - prof.OnAfterDeserialize(this); - } - } - - [NonSerialized] - AddressableAssetSettings m_Settings; - [FormerlySerializedAs("m_profiles")] - [SerializeField] - List m_Profiles = new List(); - internal List profiles { get { return m_Profiles; } } - - [Serializable] - internal class ProfileIdData - { - [FormerlySerializedAs("m_id")] - [SerializeField] - string m_Id; - internal string Id { get { return m_Id; } } - - [FormerlySerializedAs("m_name")] - [SerializeField] - string m_Name; - internal string ProfileName - { - get { return m_Name; } - } - internal void SetName(string newName, AddressableAssetProfileSettings ps) - { - if (!ps.ValidateNewVariableName(newName)) - return; - - var currRefStr = "[" + m_Name + "]"; - var newRefStr = "[" + newName + "]"; - - m_Name = newName; - - foreach (var p in ps.profiles) - p.ReplaceVariableValueSubString(currRefStr, newRefStr); - } - - [FormerlySerializedAs("m_inlineUsage")] - [SerializeField] - bool m_InlineUsage; - internal bool InlineUsage { get { return m_InlineUsage; } } - internal ProfileIdData() { } - internal ProfileIdData(string entryId, string entryName, bool inline = false) - { - m_Id = entryId; - m_Name = entryName; - m_InlineUsage = inline; - } - internal string Evaluate(AddressableAssetProfileSettings ps, string profileId) - { - if (InlineUsage) - return ps.EvaluateString(profileId, Id); - - return Evaluate(ps, profileId, Id); - } - internal static string Evaluate(AddressableAssetProfileSettings ps, string profileId, string idString) - { - string baseValue = ps.GetValueById(profileId, idString); - return ps.EvaluateString(profileId, baseValue); - } - } - [FormerlySerializedAs("m_profileEntryNames")] - [SerializeField] - List m_ProfileEntryNames = new List(); - [FormerlySerializedAs("m_profileVersion")] - [SerializeField] - int m_ProfileVersion; - const int k_CurrentProfileVersion = 1; - internal List profileEntryNames - { - get - { - if (m_ProfileVersion < k_CurrentProfileVersion) - { - m_ProfileVersion = k_CurrentProfileVersion; - //migration cleanup from old way of doing "custom" values... - var removeId = string.Empty; - foreach (var idPair in m_ProfileEntryNames) - { - if (idPair.ProfileName == customEntryString) - { - removeId = idPair.Id; - break; - } - } - if (!string.IsNullOrEmpty(removeId)) - RemoveValue(removeId); - } - - - return m_ProfileEntryNames; - } - } - - public const string customEntryString = ""; - public const string undefinedEntryValue = ""; - - internal ProfileIdData GetProfileDataById(string id) - { - foreach (var data in profileEntryNames) - { - if (id == data.Id) - return data; - } - return null; - } - - internal ProfileIdData GetProfileDataByName(string name) - { - foreach (var data in profileEntryNames) - { - if (name == data.ProfileName) - return data; - } - return null; - } - - /// - /// Clears out the list of profiles, then creates a new default one. - /// - /// Returns the ID of the newly created default profile. - public string Reset() - { - m_Profiles = new List(); - return CreateDefaultProfile(); - } - /// - /// Evaluate a string given a profile id. - /// - /// The profile id to use for evaluation. - /// The string to evaluate. Any tokens surrounded by '[' and ']' will be replaced with matching variables. - /// The evaluated string. - public string EvaluateString(string profileId, string varString) - { - Func getVal = s => - { - var v = GetValueByName(profileId, s); - if (string.IsNullOrEmpty(v)) - { - if (onProfileStringEvaluation != null) - { - foreach (var i in onProfileStringEvaluation.GetInvocationList()) - { - var del = (ProfileStringEvaluationDelegate)i; - v = del(s); - if (!string.IsNullOrEmpty(v)) - return v; - } - } - v = AddressablesRuntimeProperties.EvaluateProperty(s); - } - - return v; - }; - - return AddressablesRuntimeProperties.EvaluateString(varString, '[', ']', getVal); - } - - internal void Validate(AddressableAssetSettings addressableAssetSettings) - { - CreateDefaultProfile(); - } - - const string k_RootProfileName = "Default"; - internal string CreateDefaultProfile() - { - if (!ValidateProfiles()) - { - m_ProfileEntryNames.Clear(); - m_Profiles.Clear(); - - AddProfile(k_RootProfileName, null); - CreateValue("BuildTarget", "[UnityEditor.EditorUserBuildSettings.activeBuildTarget]"); - CreateValue(AddressableAssetSettings.kLocalBuildPath, "[UnityEngine.AddressableAssets.Addressables.BuildPath]/[BuildTarget]"); - CreateValue(AddressableAssetSettings.kLocalLoadPath, "{UnityEngine.AddressableAssets.Addressables.RuntimePath}/[BuildTarget]"); - CreateValue(AddressableAssetSettings.kRemoteBuildPath, "ServerData/[BuildTarget]"); - CreateValue(AddressableAssetSettings.kRemoteLoadPath, "http://localhost/[BuildTarget]"); - } - return GetDefaultProfileId(); - } - - string GetDefaultProfileId() - { - var def = GetDefaultProfile(); - if (def != null) - return def.id; - return null; - } - - BuildProfile GetDefaultProfile() - { - BuildProfile profile = null; - if (m_Profiles.Count > 0) - profile = m_Profiles[0]; - return profile; - } - - bool ValidateProfiles() - { - if (m_Profiles.Count == 0) - return false; - - var root = m_Profiles[0]; - if (root == null || root.values == null) - return false; - - foreach (var i in profileEntryNames) - if (string.IsNullOrEmpty(i.Id) || string.IsNullOrEmpty(i.ProfileName)) - return false; - - var rootValueCount = root.values.Count; - for (int index = 1; index < m_Profiles.Count; index++) - { - var profile = m_Profiles[index]; - - if (profile == null || string.IsNullOrEmpty(profile.profileName)) - return false; - - if (profile.values == null || profile.values.Count != rootValueCount) - return false; - - for (int i = 0; i < rootValueCount; i++) - { - if (root.values[i].id != profile.values[i].id) - return false; - } - } - - return true; - } - - /// - /// Get all available variable names - /// - /// The variable names, sorted alphabetically. - public List GetVariableNames() - { - HashSet names = new HashSet(); - foreach (var entry in profileEntryNames) - names.Add(entry.ProfileName); - var list = names.ToList(); - list.Sort(); - return list; - } - - /// - /// Get all profile names. - /// - /// The list of profile names. - public List GetAllProfileNames() - { - CreateDefaultProfile(); - List result = new List(); - foreach (var p in m_Profiles) - result.Add(p.profileName); - return result; - - } - - /// - /// Get a profile's display name. - /// - /// The profile id. - /// The display name of the profile. Returns empty string if not found. - public string GetProfileName(string profileId) - { - foreach (var p in m_Profiles) - { - if (p.id == profileId) - return p.profileName; - } - return ""; - } - - /// - /// Get the id of a given display name. - /// - /// The profile name. - /// The id of the profile. Returns empty string if not found. - public string GetProfileId(string profileName) - { - foreach (var p in m_Profiles) - { - if (p.profileName == profileName) - return p.id; - } - return ""; - } - - /// - /// Gets the set of all profile ids. - /// - /// The set of profile ids. - public HashSet GetAllVariableIds() - { - HashSet ids = new HashSet(); - foreach (var v in profileEntryNames) - ids.Add(v.Id); - return ids; - } - - /// - /// Marks the object as modified. - /// - /// The event type that is changed. - /// The object data that corresponds to the event. - /// If true, the event is propagated to callbacks. - public void SetDirty(AddressableAssetSettings.ModificationEvent modificationEvent, object eventData, bool postEvent) - { - if (m_Settings != null) - m_Settings.SetDirty(modificationEvent, eventData, postEvent, true); - } - - internal bool ValidateNewVariableName(string name) - { - foreach (var idPair in profileEntryNames) - if (idPair.ProfileName == name) - return false; - return !string.IsNullOrEmpty(name) && !name.Any(c => { return c == '[' || c == ']' || c == '{' || c == '}'; }); - } - - /// - /// Adds a new profile. - /// - /// The name of the new profile. - /// The id of the profile to copy values from. - /// The id of the created profile. - public string AddProfile(string name, string copyFromId) - { - var existingProfile = GetProfileByName(name); - if (existingProfile != null) - return existingProfile.id; - var copyRoot = GetProfile(copyFromId); - if (copyRoot == null && m_Profiles.Count > 0) - copyRoot = GetDefaultProfile(); - var prof = new BuildProfile(name, copyRoot, this); - m_Profiles.Add(prof); - SetDirty(AddressableAssetSettings.ModificationEvent.ProfileAdded, prof, true); - return prof.id; - } - - /// - /// Removes a profile. - /// - /// The id of the profile to remove. - public void RemoveProfile(string profileId) - { - m_Profiles.RemoveAll(p => p.id == profileId); - m_Profiles.ForEach(p => { if (p.inheritedParent == profileId) p.inheritedParent = null; }); - SetDirty(AddressableAssetSettings.ModificationEvent.ProfileRemoved, profileId, true); - } - - BuildProfile GetProfileByName(string profileName) - { - return m_Profiles.Find(p => p.profileName == profileName); - } - - internal string GetUniqueProfileName(string name) - { - var newName = name; - int counter = 1; - while (counter < 100) - { - if (GetProfileByName(newName) == null) - return newName; - newName = name + counter; - counter++; - } - return string.Empty; - } - - - internal BuildProfile GetProfile(string profileId) - { - return m_Profiles.Find(p => p.id == profileId); - } - - string GetVariableId(string variableName) - { - foreach (var idPair in profileEntryNames) - { - if (idPair.ProfileName == variableName) - return idPair.Id; - } - return null; - } - - /// - /// Set the value of a variable for a specified profile. - /// - /// The profile id. - /// The property name. - /// The value to set the property. - public void SetValue(string profileId, string variableName, string val) - { - var profile = GetProfile(profileId); - if (profile == null) - { - Addressables.LogError("setting variable " + variableName + " failed because profile " + profileId + " does not exist."); - return; - } - - var id = GetVariableId(variableName); - if (string.IsNullOrEmpty(id)) - { - Addressables.LogError("setting variable " + variableName + " failed because variable does not yet exist. Call CreateValue() first."); - return; - } - - profile.SetValueById(id, val); - SetDirty(AddressableAssetSettings.ModificationEvent.ProfileModified, profile, true); - } - - internal string GetUniqueProfileEntryName(string name) - { - var newName = name; - int counter = 1; - while (counter < 100) - { - if (string.IsNullOrEmpty(GetVariableId(newName))) - return newName; - newName = name + counter; - counter++; - } - return string.Empty; - } - - /// - /// Create a new profile property. - /// - /// The name of the property. - /// The default value. - /// The if of the created variable. - public string CreateValue(string variableName, string defaultValue) - { - return CreateValue(variableName, defaultValue, false); - } - - internal string CreateValue(string variableName, string defaultValue, bool inline) - { - if (m_Profiles.Count == 0) - { - Addressables.LogError("Attempting to add a profile variable in Addressables, but there are no profiles yet."); - } - - var id = GetVariableId(variableName); - if (string.IsNullOrEmpty(id)) - { - id = GUID.Generate().ToString(); - profileEntryNames.Add(new ProfileIdData(id, variableName, inline)); - - foreach (var pro in m_Profiles) - { - pro.values.Add(new BuildProfile.ProfileEntry(id, defaultValue)); - } - } - return id; - } - - /// - /// Remove a profile property. - /// - /// The id of the property. - public void RemoveValue(string variableId) - { - foreach (var pro in m_Profiles) - { - pro.values.RemoveAll(x => x.id == variableId); - } - m_ProfileEntryNames.RemoveAll(x => x.Id == variableId); - } - - /// - /// Get the value of a property. - /// - /// The profile id. - /// The property id. - /// - public string GetValueById(string profileId, string varId) - { - BuildProfile profile = GetProfile(profileId); - return profile == null ? varId : profile.GetValueById(varId); - } - - /// - /// Get the value of a property by name. - /// - /// The profile id. - /// The variable name. - /// - public string GetValueByName(string profileId, string varName) - { - return GetValueById(profileId, GetVariableId(varName)); - } - - - internal bool IsValueInheritedById(string profileId, string variableId) - { - var p = GetProfile(profileId); - if (p == null) - return false; - return p.IsValueInheritedById(variableId); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetProfileSettings.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetProfileSettings.cs.meta deleted file mode 100644 index b2b90a72..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetProfileSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c49e24ebadbf2c64cb350d3f62c0ad14 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetSettings.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetSettings.cs deleted file mode 100644 index b879b228..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetSettings.cs +++ /dev/null @@ -1,1649 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Runtime.CompilerServices; -using System.Runtime.Serialization.Formatters.Binary; -using UnityEditor.AddressableAssets.Build; -using UnityEditor.AddressableAssets.Build.DataBuilders; -using UnityEditor.AddressableAssets.HostingServices; -using UnityEditor.AddressableAssets.Settings.GroupSchemas; -using UnityEditor.Build.Pipeline.Utilities; -using UnityEngine; -using UnityEngine.AddressableAssets; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.Serialization; - -[assembly: InternalsVisibleTo("Unity.Addressables.Editor.Tests")] -[assembly: InternalsVisibleTo("Unity.Addressables.Tests")] - -namespace UnityEditor.AddressableAssets.Settings -{ - using Object = UnityEngine.Object; - - /// - /// Contains editor data for the addressables system. - /// - public class AddressableAssetSettings : ScriptableObject - { - [InitializeOnLoadMethod] - static void RegisterWithAssetPostProcessor() - { - //if the Library folder has been deleted, this will be null and it will have to be set on the first access of the settings object - if (AddressableAssetSettingsDefaultObject.Settings != null) - AddressablesAssetPostProcessor.OnPostProcess = AddressableAssetSettingsDefaultObject.Settings.OnPostprocessAllAssets; - } - /// - /// Default name of a newly created group. - /// - public const string kNewGroupName = "New Group"; - /// - /// Default name of local build path. - /// - public const string kLocalBuildPath = "LocalBuildPath"; - /// - /// Default name of local load path. - /// - public const string kLocalLoadPath = "LocalLoadPath"; - /// - /// Default name of remote build path. - /// - public const string kRemoteBuildPath = "RemoteBuildPath"; - /// - /// Default name of remote load path. - /// - public const string kRemoteLoadPath = "RemoteLoadPath"; - - /// - /// Enumeration of different event types that are generated. - /// - public enum ModificationEvent - { - GroupAdded, - GroupRemoved, - GroupRenamed, - GroupSchemaAdded, - GroupSchemaRemoved, - GroupSchemaModified, - GroupTemplateAdded, - GroupTemplateRemoved, - GroupTemplateSchemaAdded, - GroupTemplateSchemaRemoved, - EntryCreated, - EntryAdded, - EntryMoved, - EntryRemoved, - LabelAdded, - LabelRemoved, - ProfileAdded, - ProfileRemoved, - ProfileModified, - ActiveProfileSet, - EntryModified, - BuildSettingsChanged, - ActiveBuildScriptChanged, - DataBuilderAdded, - DataBuilderRemoved, - InitializationObjectAdded, - InitializationObjectRemoved, - ActivePlayModeScriptChanged, - BatchModification, // <-- posted object will be null. - HostingServicesManagerModified, - GroupMoved, - CertificateHandlerChanged - } - - /// - /// The path of the settings asset. - /// - public string AssetPath - { - get - { - string guid; - long localId; - if (!AssetDatabase.TryGetGUIDAndLocalFileIdentifier(this, out guid, out localId)) - return AddressableAssetSettingsDefaultObject.DefaultAssetPath; - var assetPath = AssetDatabase.GUIDToAssetPath(guid); - if (string.IsNullOrEmpty(assetPath)) - return AddressableAssetSettingsDefaultObject.DefaultAssetPath; - return assetPath; - } - } - - /// - /// The folder of the settings asset. - /// - public string ConfigFolder - { - get - { - return Path.GetDirectoryName(AssetPath); - } - } - - /// - /// The folder for the group assets. - /// - public string GroupFolder - { - get - { - return ConfigFolder + "/AssetGroups"; - } - } - /// - /// The folder for the script assets. - /// - public string DataBuilderFolder - { - get - { - return ConfigFolder + "/DataBuilders"; - } - } - /// - /// The folder for the asset group schema assets. - /// - public string GroupSchemaFolder - { - get - { - return GroupFolder + "/Schemas"; - } - } - - /// - /// The default folder for the group template assets. - /// - public string GroupTemplateFolder - { - get - { - return ConfigFolder + "/AssetGroupTemplates"; - } - } - - /// - /// Event for handling settings changes. The object passed depends on the event type. - /// - public Action OnModification { get; set; } - - /// - /// Event for handling settings changes on all instances of AddressableAssetSettings. The object passed depends on the event type. - /// - public static event Action OnModificationGlobal; - - /// - /// Event for handling the result of a DataBuilder.Build call. - /// - public Action OnDataBuilderComplete { get; set; } - - [FormerlySerializedAs("m_defaultGroup")] - [SerializeField] - string m_DefaultGroup; - [FormerlySerializedAs("m_cachedHash")] - [SerializeField] - Hash128 m_CachedHash; - - bool m_IsTemporary; - /// - /// Returns whether this settings object is persisted to an asset. - /// - public bool IsPersisted { get { return !m_IsTemporary; } } - - [SerializeField] - bool m_BuildRemoteCatalog = false; - - /// - /// Determine if a remote catalog should be built-for and loaded-by the app. - /// - public bool BuildRemoteCatalog - { - get { return m_BuildRemoteCatalog; } - set { m_BuildRemoteCatalog = value; } - } - - [SerializeField] - ProfileValueReference m_RemoteCatalogBuildPath; - /// - /// The path to place a copy of the content catalog for online retrieval. To do any content updates - /// to an existing built app, there must be a remote catalog. Overwriting the catalog is how the app - /// gets informed of the updated content. - /// - public ProfileValueReference RemoteCatalogBuildPath - { - get - { - if (m_RemoteCatalogBuildPath.Id == null) - { - m_RemoteCatalogBuildPath = new ProfileValueReference(); - m_RemoteCatalogBuildPath.SetVariableByName(this, kRemoteBuildPath); - } - return m_RemoteCatalogBuildPath; - } - set { m_RemoteCatalogBuildPath = value; } - } - - [SerializeField] - ProfileValueReference m_RemoteCatalogLoadPath; - /// - /// The path to load the remote content catalog from. This is the location the app will check to - /// look for updated catalogs, which is the only indication the app has for updated content. - /// - public ProfileValueReference RemoteCatalogLoadPath - { - get - { - if (m_RemoteCatalogLoadPath.Id == null) - { - m_RemoteCatalogLoadPath = new ProfileValueReference(); - m_RemoteCatalogLoadPath.SetVariableByName(this, kRemoteLoadPath); - } - return m_RemoteCatalogLoadPath; - } - set { m_RemoteCatalogLoadPath = value; } - } - - - /// - /// Hash of the current settings. This value is recomputed if anything changes. - /// - public Hash128 currentHash - { - get - { - if (m_CachedHash.isValid) - return m_CachedHash; - var stream = new MemoryStream(); - var formatter = new BinaryFormatter(); - m_BuildSettings.SerializeForHash(formatter, stream); - formatter.Serialize(stream, activeProfileId); - formatter.Serialize(stream, m_LabelTable); - formatter.Serialize(stream, m_ProfileSettings); - formatter.Serialize(stream, m_GroupAssets.Count); - foreach (var g in m_GroupAssets) - g.SerializeForHash(formatter, stream); - return (m_CachedHash = HashingMethods.Calculate(stream).ToHash128()); - } - } - - internal void DataBuilderCompleted(IDataBuilder builder, IDataBuilderResult result) - { - if (OnDataBuilderComplete != null) - OnDataBuilderComplete(this, builder, result); - } - - /// - /// Create an AssetReference object. If the asset is not already addressable, it will be added. - /// - /// The guid of the asset reference. - /// Returns the newly created AssetReference. - public AssetReference CreateAssetReference(string guid) - { - CreateOrMoveEntry(guid, DefaultGroup); - return new AssetReference(guid); - } - [SerializeField] - string m_overridePlayerVersion = ""; - /// - /// Allows for overriding the player version used to generated catalog names. - /// - public string OverridePlayerVersion - { - get { return m_overridePlayerVersion; } - set { m_overridePlayerVersion = value; } - } - /// - /// The version of the player build. This is implemented as a timestamp int UTC of the form string.Format("{0:D4}.{1:D2}.{2:D2}.{3:D2}.{4:D2}.{5:D2}", now.Year, now.Month, now.Day, now.Hour, now.Minute, now.Second). - /// - public string PlayerBuildVersion - { - get - { - if (!string.IsNullOrEmpty(m_overridePlayerVersion)) - return profileSettings.EvaluateString(activeProfileId, m_overridePlayerVersion); - var now = DateTime.UtcNow; - return string.Format("{0:D4}.{1:D2}.{2:D2}.{3:D2}.{4:D2}.{5:D2}", now.Year, now.Month, now.Day, now.Hour, now.Minute, now.Second); - } - } - - [FormerlySerializedAs("m_groupAssets")] - [SerializeField] - List m_GroupAssets = new List(); - /// - /// List of asset groups. - /// - public List groups { get { return m_GroupAssets; } } - - [FormerlySerializedAs("m_buildSettings")] - [SerializeField] - AddressableAssetBuildSettings m_BuildSettings = new AddressableAssetBuildSettings(); - /// - /// Build settings object. - /// - public AddressableAssetBuildSettings buildSettings { get { return m_BuildSettings; } } - - [FormerlySerializedAs("m_profileSettings")] - [SerializeField] - AddressableAssetProfileSettings m_ProfileSettings = new AddressableAssetProfileSettings(); - /// - /// Profile settings object. - /// - public AddressableAssetProfileSettings profileSettings { get { return m_ProfileSettings; } } - - [FormerlySerializedAs("m_labelTable")] - [SerializeField] - LabelTable m_LabelTable = new LabelTable(); - /// - /// LabelTable object. - /// - internal LabelTable labelTable { get { return m_LabelTable; } } - [FormerlySerializedAs("m_schemaTemplates")] - [SerializeField] - List m_SchemaTemplates = new List(); - - /// - /// Remove the schema at the specified index. - /// - /// The index to remove at. - /// Indicates if an even should be posted to the Addressables event system for this change. - /// True if the schema was removed. - public bool RemoveSchemaTemplate(int index, bool postEvent = true) - { - if (index < 0 || index >= m_SchemaTemplates.Count) - { - Debug.LogWarningFormat("Invalid index for schema template: {0}.", index); - return false; - } - var s = m_SchemaTemplates[index]; - m_SchemaTemplates.RemoveAt(index); - SetDirty(ModificationEvent.GroupSchemaRemoved, s, postEvent, true); - return true; - } - - [SerializeField] - List m_GroupTemplateObjects = new List(); - - /// - /// List of ScriptableObjects that implement the IGroupTemplate interface for providing new templates. - /// For use in the AddressableAssetsWindow to display new groups to create - /// - public List GroupTemplateObjects - { - get { return m_GroupTemplateObjects; } - } - - /// - /// Get the IGroupTemplate at the specified index. - /// - /// The index of the template object. - /// The AddressableAssetGroupTemplate object at the specified index. - public IGroupTemplate GetGroupTemplateObject(int index) - { - if (m_GroupTemplateObjects.Count == 0) - return null; - if (index < 0 || index >= m_GroupTemplateObjects.Count) - { - Debug.LogWarningFormat("Invalid index for group template: {0}.", index); - return null; - } - return m_GroupTemplateObjects[Mathf.Clamp(index, 0, m_GroupTemplateObjects.Count)] as IGroupTemplate; - } - - /// - /// Adds a AddressableAssetsGroupTemplate object. - /// - /// The AddressableAssetGroupTemplate object to add. - /// Indicates if an even should be posted to the Addressables event system for this change. - /// True if the initialization object was added. - public bool AddGroupTemplateObject(IGroupTemplate templateObject, bool postEvent = true) - { - if (templateObject == null) - { - Debug.LogWarning("Cannot add null IGroupTemplate"); - return false; - } - var so = templateObject as ScriptableObject; - if (so == null) - { - Debug.LogWarning("Group Template objects must inherit from ScriptableObject."); - return false; - } - - m_GroupTemplateObjects.Add(so); - SetDirty(ModificationEvent.GroupTemplateAdded, so, postEvent, true); - return true; - } - - /// - /// Remove the AddressableAssetGroupTemplate object at the specified index. - /// - /// The index to remove. - /// Indicates if an event should be posted to the Addressables event system for this change. - /// True if the initialization object was removed. - public bool RemoveGroupTemplateObject(int index, bool postEvent = true) - { - if (m_GroupTemplateObjects.Count <= index) - return false; - var so = m_GroupTemplateObjects[index]; - m_GroupTemplateObjects.RemoveAt(index); - SetDirty(ModificationEvent.GroupTemplateRemoved, so, postEvent, true); - return true; - } - - /// - /// Sets the initialization object at the specified index. - /// - /// The index to set the initialization object. - /// The initialization object to set. This must be a valid scriptable object that implements the IInitializationObject interface. - /// Indicates if an even should be posted to the Addressables event system for this change. - /// True if the initialization object was set, false otherwise. - public bool SetGroupTemplateObjectAtIndex(int index, IGroupTemplate initObject, bool postEvent = true) - { - if (m_GroupTemplateObjects.Count <= index) - return false; - if (initObject == null) - { - Debug.LogWarning("Cannot add null IGroupTemplate"); - return false; - } - var so = initObject as ScriptableObject; - if (so == null) - { - Debug.LogWarning("AddressableAssetGroupTemplate objects must inherit from ScriptableObject."); - return false; - } - - m_GroupTemplateObjects[index] = so; - SetDirty(ModificationEvent.GroupTemplateAdded, so, postEvent, true); - return true; - } - - - [FormerlySerializedAs("m_initializationObjects")] - [SerializeField] - List m_InitializationObjects = new List(); - /// - /// List of ScriptableObjects that implement the IObjectInitializationDataProvider interface for providing runtime initialization. - /// - public List InitializationObjects - { - get { return m_InitializationObjects; } - } - - /// - /// Get the IObjectInitializationDataProvider at a specifc index. - /// - /// The index of the initialization object. - /// The initialization object at the specified index. - public IObjectInitializationDataProvider GetInitializationObject(int index) - { - if (m_InitializationObjects.Count == 0) - return null; - if (index < 0 || index >= m_InitializationObjects.Count) - { - Debug.LogWarningFormat("Invalid index for data builder: {0}.", index); - return null; - } - return m_InitializationObjects[Mathf.Clamp(index, 0, m_InitializationObjects.Count)] as IObjectInitializationDataProvider; - } - - /// - /// Adds an initialization object. - /// - /// The initialization object to add. - /// Indicates if an even should be posted to the Addressables event system for this change. - /// True if the initialization object was added. - public bool AddInitializationObject(IObjectInitializationDataProvider initObject, bool postEvent = true) - { - if (initObject == null) - { - Debug.LogWarning("Cannot add null IObjectInitializationDataProvider"); - return false; - } - var so = initObject as ScriptableObject; - if (so == null) - { - Debug.LogWarning("Initialization objects must inherit from ScriptableObject."); - return false; - } - - m_InitializationObjects.Add(so); - SetDirty(ModificationEvent.InitializationObjectAdded, so, postEvent, true); - return true; - } - - /// - /// Remove the initialization object at the specified index. - /// - /// The index to remove. - /// Indicates if an even should be posted to the Addressables event system for this change. - /// True if the initialization object was removed. - public bool RemoveInitializationObject(int index, bool postEvent = true) - { - if (m_InitializationObjects.Count <= index) - return false; - var so = m_InitializationObjects[index]; - m_InitializationObjects.RemoveAt(index); - SetDirty(ModificationEvent.InitializationObjectRemoved, so, postEvent, true); - return true; - } - - /// - /// Sets the initialization object at the specified index. - /// - /// The index to set the initialization object. - /// The initialization object to set. This must be a valid scriptable object that implements the IInitializationObject interface. - /// Indicates if an even should be posted to the Addressables event system for this change. - /// True if the initialization object was set, false otherwise. - public bool SetInitializationObjectAtIndex(int index, IObjectInitializationDataProvider initObject, bool postEvent = true) - { - if (m_InitializationObjects.Count <= index) - return false; - if (initObject == null) - { - Debug.LogWarning("Cannot add null IObjectInitializationDataProvider"); - return false; - } - var so = initObject as ScriptableObject; - if (so == null) - { - Debug.LogWarning("Initialization objects must inherit from ScriptableObject."); - return false; - } - - m_InitializationObjects[index] = so; - SetDirty(ModificationEvent.InitializationObjectAdded, so, postEvent, true); - return true; - } - - - [SerializeField] - [SerializedTypeRestriction(type = typeof(UnityEngine.Networking.CertificateHandler))] - SerializedType m_CertificateHandlerType; - - /// - /// The type of CertificateHandler to use for this provider. - /// - public Type CertificateHandlerType - { - get - { - return m_CertificateHandlerType.Value; - } - set - { - m_CertificateHandlerType.Value = value; - SetDirty(ModificationEvent.CertificateHandlerChanged, value, true, true); - } - } - - [FormerlySerializedAs("m_activePlayerDataBuilderIndex")] - [SerializeField] - int m_ActivePlayerDataBuilderIndex = 3; - [FormerlySerializedAs("m_dataBuilders")] - [SerializeField] - List m_DataBuilders = new List(); - /// - /// List of ScriptableObjects that implement the IDataBuilder interface. These are used to create data for editor play mode and for player builds. - /// - public List DataBuilders { get { return m_DataBuilders; } } - /// - /// Get The data builder at a specifc index. - /// - /// The index of the builder. - /// The data builder at the specified index. - public IDataBuilder GetDataBuilder(int index) - { - if (m_DataBuilders.Count == 0) - return null; - if (index < 0 || index >= m_DataBuilders.Count) - { - Debug.LogWarningFormat("Invalid index for data builder: {0}.", index); - return null; - } - return m_DataBuilders[Mathf.Clamp(index, 0, m_DataBuilders.Count)] as IDataBuilder; - } - - /// - /// Adds a data builder. - /// - /// The data builder to add. - /// Indicates if an even should be posted to the Addressables event system for this change. - /// True if the data builder was added. - public bool AddDataBuilder(IDataBuilder builder, bool postEvent = true) - { - if (builder == null) - { - Debug.LogWarning("Cannot add null IDataBuilder"); - return false; - } - var so = builder as ScriptableObject; - if (so == null) - { - Debug.LogWarning("Data builders must inherit from ScriptableObject."); - return false; - } - - m_DataBuilders.Add(so); - SetDirty(ModificationEvent.DataBuilderAdded, so, postEvent, true); - return true; - } - - /// - /// Remove the data builder at the sprcified index. - /// - /// The index to remove. - /// Indicates if an even should be posted to the Addressables event system for this change. - /// True if the builder was removed. - public bool RemoveDataBuilder(int index, bool postEvent = true) - { - if (m_DataBuilders.Count <= index) - return false; - var so = m_DataBuilders[index]; - m_DataBuilders.RemoveAt(index); - SetDirty(ModificationEvent.DataBuilderRemoved, so, postEvent, true); - return true; - } - - /// - /// Sets the data builder at the specified index. - /// - /// The index to set the builder. - /// The builder to set. This must be a valid scriptable object that implements the IDataBuilder interface. - /// Indicates if an even should be posted to the Addressables event system for this change. - /// True if the builder was set, false otherwise. - public bool SetDataBuilderAtIndex(int index, IDataBuilder builder, bool postEvent = true) - { - if (m_DataBuilders.Count <= index) - return false; - if (builder == null) - { - Debug.LogWarning("Cannot add null IDataBuilder"); - return false; - } - var so = builder as ScriptableObject; - if (so == null) - { - Debug.LogWarning("Data builders must inherit from ScriptableObject."); - return false; - } - - m_DataBuilders[index] = so; - SetDirty(ModificationEvent.DataBuilderAdded, so, postEvent, true); - return true; - } - - /// - /// Get the active data builder for player data. - /// - public IDataBuilder ActivePlayerDataBuilder - { - get - { - return GetDataBuilder(m_ActivePlayerDataBuilderIndex); - } - } - - /// - /// Get the active data builder for editor play mode data. - /// - public IDataBuilder ActivePlayModeDataBuilder - { - get - { - return GetDataBuilder(ProjectConfigData.activePlayModeIndex); - } - } - - /// - /// Get the index of the active player data builder. - /// - public int ActivePlayerDataBuilderIndex - { - get - { - return m_ActivePlayerDataBuilderIndex; - } - set - { - m_ActivePlayerDataBuilderIndex = value; - SetDirty(ModificationEvent.ActiveBuildScriptChanged, ActivePlayerDataBuilder, true, true); - } - } - - /// - /// Get the index of the active play mode data builder. - /// - public int ActivePlayModeDataBuilderIndex - { - get - { - return ProjectConfigData.activePlayModeIndex; - } - set - { - ProjectConfigData.activePlayModeIndex = value; - SetDirty(ModificationEvent.ActivePlayModeScriptChanged, ActivePlayModeDataBuilder, true, false); - } - } - - - /// - /// Add a new label. - /// - /// The label name. - /// Send modification event. - public void AddLabel(string label, bool postEvent = true) - { - m_LabelTable.AddLabelName(label); - SetDirty(ModificationEvent.LabelAdded, label, postEvent, true); - } - - /// - /// Remove a label by name. - /// - /// The label name. - /// Send modification event. - public void RemoveLabel(string label, bool postEvent = true) - { - m_LabelTable.RemoveLabelName(label); - SetDirty(ModificationEvent.LabelRemoved, label, postEvent, true); - } - - [FormerlySerializedAs("m_activeProfileId")] - [SerializeField] - string m_ActiveProfileId; - /// - /// The active profile id. - /// - public string activeProfileId - { - get - { - if (string.IsNullOrEmpty(m_ActiveProfileId)) - m_ActiveProfileId = m_ProfileSettings.CreateDefaultProfile(); - return m_ActiveProfileId; - } - set - { - var oldVal = m_ActiveProfileId; - m_ActiveProfileId = value; - - if (oldVal != value) - { - SetDirty(ModificationEvent.ActiveProfileSet, value, true, true); - } - } - } - - [FormerlySerializedAs("m_hostingServicesManager")] - [SerializeField] - HostingServicesManager m_HostingServicesManager; - /// - /// Get the HostingServicesManager object. - /// - public HostingServicesManager HostingServicesManager - { - get - { - if (m_HostingServicesManager == null) - m_HostingServicesManager = new HostingServicesManager(); - - if (!m_HostingServicesManager.IsInitialized) - m_HostingServicesManager.Initialize(this); - - return m_HostingServicesManager; - } - - // For unit tests - internal set { m_HostingServicesManager = value; } - } - - /// - /// Gets all asset entries from all groups. - /// - /// The list of asset entries. - /// A method to filter groups. Groups will be processed if filter is null, or it returns TRUE - /// A method to filter entries. Entries will be processed if filter is null, or it returns TRUE - public void GetAllAssets(List assets, Func groupFilter = null, Func entryFilter = null) - { - foreach (var g in groups) - if (groupFilter == null || groupFilter(g)) - g.GatherAllAssets(assets, true, true, entryFilter); - } - - /// - /// Remove an asset entry. - /// - /// The guid of the asset. - /// Send modifcation event. - /// True if the entry was found and removed. - public bool RemoveAssetEntry(string guid, bool postEvent = true) - { - var entry = FindAssetEntry(guid); - if (entry != null) - { - if (entry.parentGroup != null) - entry.parentGroup.RemoveAssetEntry(entry, postEvent); - SetDirty(ModificationEvent.EntryRemoved, entry, postEvent, false); - return true; - } - return false; - } - - void OnEnable() - { - profileSettings.OnAfterDeserialize(this); - buildSettings.OnAfterDeserialize(this); - Validate(); - HostingServicesManager.OnEnable(); - } - - void OnDisable() - { - HostingServicesManager.OnDisable(); - } - - private string m_DefaultGroupTemplateName = "Packed Assets"; - void Validate() - { - // Begin update any SchemaTemplate to GroupTemplateObjects - if (m_SchemaTemplates != null && m_SchemaTemplates.Count > 0) - { - for (int i = m_SchemaTemplates.Count - 1; i >= 0; --i) - { - string assetPath = GroupTemplateFolder + "/" + m_SchemaTemplates[i].DisplayName + ".asset"; - if (File.Exists(assetPath)) - { - if(LoadGroupTemplateObject(this, assetPath)) - m_SchemaTemplates.RemoveAt(i); - } - else - { - if (CreateAndAddGroupTemplate(m_SchemaTemplates[i].DisplayName, - m_SchemaTemplates[i].Description, m_SchemaTemplates[i].GetTypes())) - m_SchemaTemplates.RemoveAt(i); - } - } - m_SchemaTemplates = null; - } - if (m_GroupTemplateObjects.Count == 0) - CreateDefaultGroupTemplate(this); - // End update of SchemaTemplate to GroupTemplates - - if (m_BuildSettings == null) - m_BuildSettings = new AddressableAssetBuildSettings(); - if (m_ProfileSettings == null) - m_ProfileSettings = new AddressableAssetProfileSettings(); - if (m_LabelTable == null) - m_LabelTable = new LabelTable(); - if (string.IsNullOrEmpty(m_ActiveProfileId)) - m_ActiveProfileId = m_ProfileSettings.CreateDefaultProfile(); - if (m_DataBuilders == null || m_DataBuilders.Count == 0) - { - m_DataBuilders = new List(); - m_DataBuilders.Add(CreateScriptAsset()); - m_DataBuilders.Add(CreateScriptAsset()); - m_DataBuilders.Add(CreateScriptAsset()); - m_DataBuilders.Add(CreateScriptAsset()); - } - - if (ActivePlayerDataBuilder != null && !ActivePlayerDataBuilder.CanBuildData()) - ActivePlayerDataBuilderIndex = m_DataBuilders.IndexOf(m_DataBuilders.Find(s => s.GetType() == typeof(BuildScriptPackedMode))); - if (ActivePlayModeDataBuilder != null && !ActivePlayModeDataBuilder.CanBuildData()) - ActivePlayModeDataBuilderIndex = m_DataBuilders.IndexOf(m_DataBuilders.Find(s => s.GetType() == typeof(BuildScriptFastMode))); - - profileSettings.Validate(this); - buildSettings.Validate(this); - } - - T CreateScriptAsset() where T : ScriptableObject - { - var script = CreateInstance(); - if (!Directory.Exists(DataBuilderFolder)) - Directory.CreateDirectory(DataBuilderFolder); - var path = DataBuilderFolder + "/" + typeof(T).Name + ".asset"; - if (!File.Exists(path)) - AssetDatabase.CreateAsset(script, path); - return AssetDatabase.LoadAssetAtPath(path); - } - - internal const string PlayerDataGroupName = "Built In Data"; - internal const string DefaultLocalGroupName = "Default Local Group"; - - /// - /// Create a new AddressableAssetSettings object. - /// - /// The folder to store the settings object. - /// The name of the settings object. - /// If true, create groups for player data and local packed content. - /// If true, assets are created. - /// - public static AddressableAssetSettings Create(string configFolder, string configName, bool createDefaultGroups, bool isPersisted) - { - AddressableAssetSettings aa; - var path = configFolder + "/" + configName + ".asset"; - aa = isPersisted ? AssetDatabase.LoadAssetAtPath(path) : null; - if (aa == null) - { - aa = CreateInstance(); - aa.m_IsTemporary = !isPersisted; - aa.activeProfileId = aa.profileSettings.Reset(); - aa.name = configName; - - if (isPersisted) - { - Directory.CreateDirectory(configFolder); - AssetDatabase.CreateAsset(aa, path); - } - - if (createDefaultGroups) - { - CreateBuiltInData(aa); - CreateDefaultGroup(aa); - } - - if (isPersisted) - AssetDatabase.SaveAssets(); - } - return aa; - } - - /// - /// Creates a new AddressableAssetGroupTemplate Object with the set of schema types with default settings for use in the editor GUI. - /// - /// The display name of the template. - /// Description text use with the template. - /// The schema types for the template. - /// True if the template was added, false otherwise. - public bool CreateAndAddGroupTemplate(string displayName, string description, params Type[] types) - { - string assetPath = GroupTemplateFolder + "/" + displayName + ".asset"; - - if (!CanCreateGroupTemplate(displayName, assetPath, types)) - return false; - - if (!Directory.Exists(GroupTemplateFolder)) - Directory.CreateDirectory(GroupTemplateFolder); - - AddressableAssetGroupTemplate newAssetGroupTemplate = ScriptableObject.CreateInstance(); - newAssetGroupTemplate.Description = description; - - AssetDatabase.CreateAsset(newAssetGroupTemplate, assetPath); - AssetDatabase.SaveAssets(); - - AddGroupTemplateObject(newAssetGroupTemplate); - - foreach (Type type in types) - newAssetGroupTemplate.AddSchema(type); - - - - return true; - } - - private bool CanCreateGroupTemplate(string displayName, string assetPath, Type[] types) - { - if (string.IsNullOrEmpty(displayName)) - { - Debug.LogWarningFormat("CreateAndAddGroupTemplate - Group template must have a valid name."); - return false; - } - if (types.Length == 0) - { - Debug.LogWarningFormat("CreateAndAddGroupTemplate - Group template {0} must contain at least 1 schema type.", displayName); - return false; - } - bool typesAreValid = true; - for (int i = 0; i < types.Length; i++) - { - var t = types[i]; - if (t == null) - { - Debug.LogWarningFormat("CreateAndAddGroupTemplate - Group template {0} schema type at index {1} is null.", displayName, i); - typesAreValid = false; - } - else if (!typeof(AddressableAssetGroupSchema).IsAssignableFrom(t)) - { - Debug.LogWarningFormat("CreateAndAddGroupTemplate - Group template {0} schema type at index {1} must inherit from AddressableAssetGroupSchema. Specified type was {2}.", displayName, i, t.FullName); - typesAreValid = false; - } - } - if (!typesAreValid) - { - Debug.LogWarningFormat("CreateAndAddGroupTemplate - Group template {0} must contains at least 1 invalid schema type.", displayName); - return false; - } - - if (File.Exists(assetPath)) - { - Debug.LogWarningFormat("CreateAndAddGroupTemplate - Group template {0} already exists at location {1}.", displayName, assetPath); - return false; - } - - return true; - } - - - /// - /// Find asset group by functor. - /// - /// The functor to call on each group. The first group that evaluates to true is returned. - /// The group found or null. - public AddressableAssetGroup FindGroup(Func func) - { - return groups.Find(g => func(g)); - } - - - /// - /// Find asset group by name. - /// - /// The name of the group. - /// The group found or null. - public AddressableAssetGroup FindGroup(string groupName) - { - return FindGroup(g => g.Name == groupName); - } - - /// - /// The default group. This group is used when marking assets as addressable via the inspector. - /// - public AddressableAssetGroup DefaultGroup - { - get - { - AddressableAssetGroup group = null; - if (string.IsNullOrEmpty(m_DefaultGroup)) - group = groups.Find(s => s.CanBeSetAsDefault()); - else - { - group = groups.Find(s => s.Guid == m_DefaultGroup); - if (group == null || !group.CanBeSetAsDefault()) - { - group = groups.Find(s => s.CanBeSetAsDefault()); - if (group != null) - m_DefaultGroup = group.Guid; - } - } - - if (group == null) - { - Addressables.LogWarning("A valid default group could not be found. One will be created."); - group = CreateDefaultGroup(this); - } - - return group; - } - set - { - if (value == null) - Addressables.LogError("Unable to set null as the Default Group. Default Groups must not be ReadOnly."); - - else if (!value.CanBeSetAsDefault()) - Addressables.LogError("Unable to set " + value.Name + " as the Default Group. Default Groups must not be ReadOnly."); - else - m_DefaultGroup = value.Guid; - } - } - - private static AddressableAssetGroup CreateBuiltInData(AddressableAssetSettings aa) - { - var playerData = aa.CreateGroup(PlayerDataGroupName, false, true, false, null, typeof(PlayerDataGroupSchema)); - var resourceEntry = aa.CreateOrMoveEntry(AddressableAssetEntry.ResourcesName, playerData); - resourceEntry.IsInResources = true; - aa.CreateOrMoveEntry(AddressableAssetEntry.EditorSceneListName, playerData); - return playerData; - } - - private static AddressableAssetGroup CreateDefaultGroup(AddressableAssetSettings aa) - { - var localGroup = aa.CreateGroup(DefaultLocalGroupName, true, false, false, null, typeof(ContentUpdateGroupSchema), typeof(BundledAssetGroupSchema)); - var schema = localGroup.GetSchema(); - schema.BuildPath.SetVariableByName(aa, kLocalBuildPath); - schema.LoadPath.SetVariableByName(aa, kLocalLoadPath); - schema.BundleMode = BundledAssetGroupSchema.BundlePackingMode.PackTogether; - aa.m_DefaultGroup = localGroup.Guid; - return localGroup; - } - - private static bool CreateDefaultGroupTemplate( AddressableAssetSettings aa) - { - string assetPath = aa.GroupTemplateFolder + "/" + aa.m_DefaultGroupTemplateName + ".asset"; - - if (File.Exists(assetPath)) - return LoadGroupTemplateObject(aa, assetPath); - - return aa.CreateAndAddGroupTemplate(aa.m_DefaultGroupTemplateName, "Pack assets into asset bundles.", typeof(BundledAssetGroupSchema), typeof(ContentUpdateGroupSchema)); - } - - private static bool LoadGroupTemplateObject(AddressableAssetSettings aa, string assetPath) - { - return aa.AddGroupTemplateObject(AssetDatabase.LoadAssetAtPath(assetPath, typeof(ScriptableObject)) as IGroupTemplate); - } - - AddressableAssetEntry CreateEntry(string guid, string address, AddressableAssetGroup parent, bool readOnly, bool postEvent = true) - { - var entry = new AddressableAssetEntry(guid, address, parent, readOnly); - if (!readOnly) - SetDirty(ModificationEvent.EntryCreated, entry, postEvent, true); - return entry; - } - - /// - /// Marks the object as modified. - /// - /// The event type that is changed. - /// The object data that corresponds to the event. - /// If true, the event is propagated to callbacks. - /// If true, the settings asset will be marked as dirty. - public void SetDirty(ModificationEvent modificationEvent, object eventData, bool postEvent, bool settingsModified = false) - { - if (modificationEvent == ModificationEvent.ProfileRemoved && eventData as string == activeProfileId) - activeProfileId = null; - if (this != null) - { - if (postEvent) - { - if (OnModificationGlobal != null) - OnModificationGlobal(this, modificationEvent, eventData); - if (OnModification != null) - OnModification(this, modificationEvent, eventData); - } - - if (settingsModified && IsPersisted) - EditorUtility.SetDirty(this); - } - - m_CachedHash = default(Hash128); - } - - /// - /// Find and asset entry by guid. - /// - /// The asset guid. - /// The found entry or null. - public AddressableAssetEntry FindAssetEntry(string guid) - { - foreach (var g in groups) - { - var e = g.GetAssetEntry(guid); - if (e != null) - return e; - } - return null; - } - - internal void MoveAssetsFromResources(Dictionary guidToNewPath, AddressableAssetGroup targetParent) - { - if (guidToNewPath == null) - return; - var entries = new List(); - AssetDatabase.StartAssetEditing(); - foreach (var item in guidToNewPath) - { - - var dirInfo = new FileInfo(item.Value).Directory; - if (dirInfo != null && !dirInfo.Exists) - { - dirInfo.Create(); - AssetDatabase.StopAssetEditing(); - AssetDatabase.Refresh(); - AssetDatabase.StartAssetEditing(); - } - - var oldPath = AssetDatabase.GUIDToAssetPath(item.Key); - var errorStr = AssetDatabase.MoveAsset(oldPath, item.Value); - if (!string.IsNullOrEmpty(errorStr)) - { - Addressables.LogError("Error moving asset: " + errorStr); - } - else - { - AddressableAssetEntry e = FindAssetEntry(item.Key); - if (e != null) - e.IsInResources = false; - - var newEntry = CreateOrMoveEntry(item.Key, targetParent, false, false); - var index = oldPath.ToLower().LastIndexOf("resources/"); - if (index >= 0) - { - var newAddress = Path.GetFileNameWithoutExtension(oldPath.Substring(index + 10)); - if (!string.IsNullOrEmpty(newAddress)) - { - newEntry.address = newAddress; - } - } - entries.Add(newEntry); - } - - } - AssetDatabase.StopAssetEditing(); - AssetDatabase.Refresh(); - SetDirty(ModificationEvent.EntryMoved, entries, true, true); - } - - /// - /// Move an existing entry to a group. - /// - /// The entries to move. - /// The group to add the entries to. - /// Should the entries be read only. - /// Send modification event. - /// - public void MoveEntries(List entries, AddressableAssetGroup targetParent, bool readOnly = false, bool postEvent = true) - { - if (entries != null) - { - foreach (var entry in entries) - { - MoveEntry(entry, targetParent, readOnly, false); - } - - SetDirty(ModificationEvent.EntryMoved, entries, postEvent, false); - } - } - - /// - /// Move an existing entry to a group. - /// - /// The entry to move. - /// The group to add the entry to. - /// Should the entry be read only. - /// Send modification event. - /// - public void MoveEntry(AddressableAssetEntry entry, AddressableAssetGroup targetParent, bool readOnly = false, bool postEvent = true) - { - if (targetParent == null || entry == null) - return; - - entry.ReadOnly = readOnly; - - if (entry.parentGroup != null && entry.parentGroup != targetParent) - entry.parentGroup.RemoveAssetEntry(entry, postEvent); - - targetParent.AddAssetEntry(entry, postEvent); - } - - /// - /// Create a new entry, or if one exists in a different group, move it into the new group. - /// - /// The asset guid. - /// The group to add the entry to. - /// Is the new entry read only. - /// Send modification event. - /// - public AddressableAssetEntry CreateOrMoveEntry(string guid, AddressableAssetGroup targetParent, bool readOnly = false, bool postEvent = true) - { - if (targetParent == null || string.IsNullOrEmpty(guid)) - return null; - - AddressableAssetEntry entry = FindAssetEntry(guid); - if (entry != null) //move entry to where it should go... - { - MoveEntry(entry, targetParent, readOnly, postEvent); - } - else //create entry - { - var path = AssetDatabase.GUIDToAssetPath(guid); - if (AddressableAssetUtility.IsPathValidForEntry(path)) - { - entry = CreateEntry(guid, path, targetParent, readOnly, postEvent); - } - else - { - entry = CreateEntry(guid, guid, targetParent, true, postEvent); - } - - targetParent.AddAssetEntry(entry, postEvent); - } - - return entry; - } - - internal AddressableAssetEntry CreateSubEntryIfUnique(string guid, string address, AddressableAssetEntry parentEntry) - { - if (string.IsNullOrEmpty(guid)) - return null; - - var entry = FindAssetEntry(guid); - if (entry == null) - { - entry = CreateEntry(guid, address, parentEntry.parentGroup, true); - entry.IsSubAsset = true; - return entry; - } - - //if the sub-entry already exists update it's info. This mainly covers the case of dragging folders around. - if (entry.IsSubAsset) - { - entry.parentGroup = parentEntry.parentGroup; - entry.IsInResources = parentEntry.IsInResources; - entry.address = address; - entry.ReadOnly = true; - return entry; - } - return null; - } - - /// - /// Create a new asset group. - /// - /// The group name. - /// Set the new group as the default group. - /// Is the new group read only. - /// Post modification event. - /// Schema set to copy from. - /// Types of schemas to add. - /// The newly created group. - public AddressableAssetGroup CreateGroup(string groupName, bool setAsDefaultGroup, bool readOnly, bool postEvent, List schemasToCopy, params Type[] types) - { - if (string.IsNullOrEmpty(groupName)) - groupName = kNewGroupName; - string validName = FindUniqueGroupName(groupName); - var group = CreateInstance(); - group.Initialize(this, validName, GUID.Generate().ToString(), readOnly); - - if (IsPersisted) - { - if (!Directory.Exists(GroupFolder)) - Directory.CreateDirectory(GroupFolder); - AssetDatabase.CreateAsset(group, GroupFolder + "/" + group.Name + ".asset"); - } - if (schemasToCopy != null) - { - foreach (var s in schemasToCopy) - group.AddSchema(s, false); - } - foreach (var t in types) - group.AddSchema(t); - - groups.Add(group); - - if (setAsDefaultGroup) - DefaultGroup = group; - SetDirty(ModificationEvent.GroupAdded, group, postEvent, true); - return group; - } - - internal string FindUniqueGroupName(string potentialName) - { - var cleanedName = potentialName.Replace('/', '-'); - cleanedName = cleanedName.Replace('\\', '-'); - if (cleanedName != potentialName) - Addressables.Log("Group names cannot include '\\' or '/'. Replacing with '-'. " + cleanedName); - var validName = cleanedName; - int index = 1; - bool foundExisting = true; - while (foundExisting) - { - if (index > 1000) - { - Addressables.LogError("Unable to create valid name for new Addressable Assets group."); - return cleanedName; - } - foundExisting = IsNotUniqueGroupName(validName); - if (foundExisting) - { - validName = cleanedName + index; - index++; - } - } - - return validName; - } - - internal bool IsNotUniqueGroupName(string groupName) - { - bool foundExisting = false; - foreach (var g in groups) - { - if (g.Name == groupName) - { - foundExisting = true; - break; - } - } - return foundExisting; - } - - /// - /// Remove an asset group. - /// - /// - public void RemoveGroup(AddressableAssetGroup g) - { - RemoveGroupInternal(g, true, true); - } - - internal void RemoveGroupInternal(AddressableAssetGroup g, bool deleteAsset, bool postEvent) - { - g.ClearSchemas(true); - groups.Remove(g); - SetDirty(ModificationEvent.GroupRemoved, g, postEvent, true); - if (deleteAsset) - { - string guidOfGroup; - long localId; - if (AssetDatabase.TryGetGUIDAndLocalFileIdentifier(g, out guidOfGroup, out localId)) - { - var groupPath = AssetDatabase.GUIDToAssetPath(guidOfGroup); - if (!string.IsNullOrEmpty(groupPath)) - AssetDatabase.DeleteAsset(groupPath); - } - } - } - - - internal void SetLabelValueForEntries(List entries, string label, bool value, bool postEvent = true) - { - if (value) - AddLabel(label); - - foreach (var e in entries) - e.SetLabel(label, value, false); - - SetDirty(ModificationEvent.EntryModified, entries, postEvent, true); - } - - internal void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) - { - var aa = this; - bool modified = false; - foreach (string str in importedAssets) - { - var assetType = AssetDatabase.GetMainAssetTypeAtPath(str); - - if (typeof(AddressableAssetGroup).IsAssignableFrom(assetType)) - { - AddressableAssetGroup group = aa.FindGroup(Path.GetFileNameWithoutExtension(str)); - if (group != null) - group.DedupeEnteries(); - } - - if (typeof(AddressableAssetEntryCollection).IsAssignableFrom(assetType)) - { - aa.CreateOrMoveEntry(AssetDatabase.AssetPathToGUID(str), aa.DefaultGroup); - modified = true; - } - var guid = AssetDatabase.AssetPathToGUID(str); - if (aa.FindAssetEntry(guid) != null) - modified = true; - - if (AddressableAssetUtility.IsInResources(str)) - modified = true; - } - - if (deletedAssets.Length > 0) - { - // if any directly referenced assets were deleted while Unity was closed, the path isn't useful, so Remove(null) is our only option - // this can lead to orphaned schema files. - if (groups.Remove(null) || - DataBuilders.Remove(null) || - GroupTemplateObjects.Remove(null) || - InitializationObjects.Remove(null)) - { - modified = true; - } - - } - - foreach (string str in deletedAssets) - { - if (AddressableAssetUtility.IsInResources(str)) - modified = true; - else - { - if (CheckForGroupDataDeletion(str)) - { - modified = true; - continue; - } - - var guidOfDeletedAsset = AssetDatabase.AssetPathToGUID(str); - if (aa.RemoveAssetEntry(guidOfDeletedAsset)) - { - modified = true; - } - } - } - for (int i = 0; i < movedAssets.Length; i++) - { - var str = movedAssets[i]; - var assetType = AssetDatabase.GetMainAssetTypeAtPath(str); - if (typeof(AddressableAssetGroup).IsAssignableFrom(assetType)) - { - var oldGroupName = Path.GetFileNameWithoutExtension(movedFromAssetPaths[i]); - var group = aa.FindGroup(oldGroupName); - if (group != null) - { - var newGroupName = Path.GetFileNameWithoutExtension(str); - group.Name = newGroupName; - } - } - else - { - var guid = AssetDatabase.AssetPathToGUID(str); - bool isAlreadyAddressable = aa.FindAssetEntry(guid) != null; - bool startedInResources = AddressableAssetUtility.IsInResources(movedFromAssetPaths[i]); - bool endedInResources = AddressableAssetUtility.IsInResources(str); - bool inEditorSceneList = BuiltinSceneCache.Contains(new GUID(guid)); - - //move to Resources - if (isAlreadyAddressable && endedInResources) - { - var fileName = Path.GetFileNameWithoutExtension(str); - Addressables.Log("You have moved addressable asset " + fileName + " into a Resources directory. It has been unmarked as addressable, but can still be loaded via the Addressables API via its Resources path."); - aa.RemoveAssetEntry(guid, false); - } - else if(inEditorSceneList) - BuiltinSceneCache.ClearState(); - - //any addressables move or resources move (even resources to within resources) needs to refresh the UI. - modified = isAlreadyAddressable || startedInResources || endedInResources || inEditorSceneList; - } - } - - if (modified) - aa.SetDirty(ModificationEvent.BatchModification, null, true, true); - } - - internal bool CheckForGroupDataDeletion(string str) - { - bool modified = false; - AddressableAssetGroup groupToDelete = null; - bool deleteGroup = false; - foreach (var group in groups) - { - if (AssetDatabase.GUIDToAssetPath(group.Guid) == str) - { - groupToDelete = group; - deleteGroup = true; - break; - } - - if (group.Schemas.Remove(null)) - modified = true; - } - - if (deleteGroup) - { - RemoveGroupInternal(groupToDelete, false, true); - modified = true; - } - - return modified; - } - - /// - /// Runs the active player data build script to create runtime data. - /// - public static void BuildPlayerContent() - { - var settings = AddressableAssetSettingsDefaultObject.Settings; - if (settings == null) - { - Debug.LogError("Addressable Asset Settings does not exist."); - return; - } - settings.BuildPlayerContentImpl(); - } - - internal void BuildPlayerContentImpl() - { - if (Directory.Exists(Addressables.BuildPath)) - { - try - { - Directory.Delete(Addressables.BuildPath, true); - } - catch (Exception e) - { - Debug.LogException(e); - } - } - - var buildContext = new AddressablesDataBuilderInput(this); - var result = ActivePlayerDataBuilder.BuildData(buildContext); - if (!string.IsNullOrEmpty(result.Error)) - Debug.LogError(result.Error); - AddressableAnalytics.Report(this); - if (BuildScript.buildCompleted != null) - BuildScript.buildCompleted(result); - AssetDatabase.Refresh(); - } - - /// - /// Deletes all created runtime data for the active player data builder. - /// - /// The builder to call ClearCachedData on. If null, all builders will be cleaned - public static void CleanPlayerContent(IDataBuilder builder = null) - { - var settings = AddressableAssetSettingsDefaultObject.Settings; - if (settings == null) - { - Debug.LogError("Addressable Asset Settings does not exist."); - return; - } - settings.CleanPlayerContentImpl(builder); - } - - internal void CleanPlayerContentImpl(IDataBuilder builder = null) - { - if (builder != null) - { - builder.ClearCachedData(); - } - else - { - for (int i = 0; i < DataBuilders.Count; i++) - { - var m = GetDataBuilder(i); - m.ClearCachedData(); - } - } - AssetDatabase.Refresh(); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetSettings.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetSettings.cs.meta deleted file mode 100644 index bedd9e5e..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 468a46d0ae32c3544b7d98094e6448a9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetUtility.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetUtility.cs deleted file mode 100644 index 4e2324c0..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetUtility.cs +++ /dev/null @@ -1,201 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using UnityEditor.AddressableAssets; -using UnityEditor.AddressableAssets.Settings.GroupSchemas; -using UnityEditor.Build.Utilities; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Settings -{ - using Object = UnityEngine.Object; - - static class AddressableAssetUtility - { - internal static bool IsInResources(string path) - { - return path.Replace('\\', '/').ToLower().Contains("/resources/"); - } - internal static bool GetPathAndGUIDFromTarget(Object t, out string path, ref string guid, out Type mainAssetType) - { - mainAssetType = null; - path = AssetDatabase.GetAssetOrScenePath(t); - if (!IsPathValidForEntry(path)) - return false; - guid = AssetDatabase.AssetPathToGUID(path); - if (string.IsNullOrEmpty(guid)) - return false; - mainAssetType = AssetDatabase.GetMainAssetTypeAtPath(path); - if (mainAssetType != t.GetType() && !typeof(AssetImporter).IsAssignableFrom(t.GetType())) - return false; - return true; - } - - internal static bool IsPathValidForEntry(string path) - { - if (string.IsNullOrEmpty(path)) - return false; - path = path.ToLower(); - if (path == CommonStrings.UnityEditorResourcePath || - path == CommonStrings.UnityDefaultResourcePath || - path == CommonStrings.UnityBuiltInExtraPath) - return false; - var ext = Path.GetExtension(path); - if (ext == ".cs" || ext == ".js" || ext == ".boo" || ext == ".exe" || ext == ".dll") - return false; - var t = AssetDatabase.GetMainAssetTypeAtPath(path); - if (t == typeof(AddressableAssetSettings)) - return false; - return true; - } - - internal static void ConvertAssetBundlesToAddressables() - { - AssetDatabase.RemoveUnusedAssetBundleNames(); - var bundleList = AssetDatabase.GetAllAssetBundleNames(); - - float fullCount = bundleList.Length; - int currCount = 0; - - var settings = AddressableAssetSettingsDefaultObject.GetSettings(true); - foreach (var bundle in bundleList) - { - if (EditorUtility.DisplayCancelableProgressBar("Converting Legacy Asset Bundles", bundle, currCount / fullCount)) - break; - - currCount++; - var group = settings.CreateGroup(bundle, false, false, false, null); - var schema = group.AddSchema(); - schema.BuildPath.SetVariableByName(settings, AddressableAssetSettings.kLocalBuildPath); - schema.LoadPath.SetVariableByName(settings, AddressableAssetSettings.kLocalLoadPath); - schema.BundleMode = BundledAssetGroupSchema.BundlePackingMode.PackTogether; - group.AddSchema().StaticContent = true; - - var assetList = AssetDatabase.GetAssetPathsFromAssetBundle(bundle); - - foreach (var asset in assetList) - { - var guid = AssetDatabase.AssetPathToGUID(asset); - settings.CreateOrMoveEntry(guid, group, false, false); - var imp = AssetImporter.GetAtPath(asset); - if (imp != null) - imp.SetAssetBundleNameAndVariant(string.Empty, string.Empty); - } - } - - if(fullCount > 0) - settings.SetDirty(AddressableAssetSettings.ModificationEvent.BatchModification, null, true, true); - EditorUtility.ClearProgressBar(); - AssetDatabase.RemoveUnusedAssetBundleNames(); - } - - /// - /// Get all types that can be assigned to type T - /// - /// The class type to use as the base class or interface for all found types. - /// A list of types that are assignable to type T. The results are cached. - public static List GetTypes() - { - return TypeManager.Types; - } - - /// - /// Get all types that can be assigned to type rootType. - /// - /// The class type to use as the base class or interface for all found types. - /// A list of types that are assignable to type T. The results are not cached. - public static List GetTypes(Type rootType) - { - return TypeManager.GetManagerTypes(rootType); - } - - class TypeManager - { - public static List GetManagerTypes(Type rootType) - { - var types = new List(); - try - { - foreach (var a in AppDomain.CurrentDomain.GetAssemblies()) - { - if (a.IsDynamic) - continue; - foreach (var t in a.ExportedTypes) - { - if (t != rootType && rootType.IsAssignableFrom(t) && !t.IsAbstract) - types.Add(t); - } - } - } - catch (Exception) - { - // ignored - } - - return types; - } - } - - class TypeManager : TypeManager - { - // ReSharper disable once StaticMemberInGenericType - static List s_Types; - public static List Types - { - get - { - if (s_Types == null) - s_Types = GetManagerTypes(typeof(T)); - - return s_Types; - } - } - } - - internal static bool SafeMoveResourcesToGroup(AddressableAssetSettings settings, AddressableAssetGroup targetGroup, List paths) - { - var guids = new List(); - foreach (var p in paths) - { - guids.Add(AssetDatabase.AssetPathToGUID(p)); - } - return SafeMoveResourcesToGroup(settings, targetGroup, paths, guids); - } - internal static bool SafeMoveResourcesToGroup(AddressableAssetSettings settings, AddressableAssetGroup targetGroup, List paths, List guids) - { - if (guids == null || guids.Count == 0 || paths == null || guids.Count != paths.Count) - { - Debug.LogWarning("No valid Resources found to move"); - return false; - } - - if (targetGroup == null) - { - Debug.LogWarning("No valid group to move Resources to"); - return false; - } - - Dictionary guidToNewPath = new Dictionary(); - - var message = "Any assets in Resources that you wish to mark as Addressable must be moved within the project. We will move the files to:\n\n"; - for (int i = 0; i < guids.Count; i++) - { - var newName = paths[i].Replace("\\", "/"); - newName = newName.Replace("Resources", "Resources_moved"); - newName = newName.Replace("resources", "resources_moved"); - if (newName == paths[i]) - continue; - - guidToNewPath.Add(guids[i], newName); - message += newName + "\n"; - } - message += "\nAre you sure you want to proceed?"; - if (EditorUtility.DisplayDialog("Move From Resources", message, "Yes", "No")) - { - settings.MoveAssetsFromResources(guidToNewPath, targetGroup); - return true; - } - return false; - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetUtility.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetUtility.cs.meta deleted file mode 100644 index 736016db..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableAssetUtility.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: caa347671b900804bb0624c39d5404f5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableScenesManager.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableScenesManager.cs deleted file mode 100644 index f607e4f0..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableScenesManager.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.AddressableAssets; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Settings -{ - static class AddressableScenesManager - { - static public void InitializeGlobalState() - { - BuiltinSceneCache.sceneListChanged += OnScenesChanged; - AddressableAssetSettings.OnModificationGlobal += OnSettingsChanged; - } - - static public void ShutdownGlobalState() - { - AddressableAssetSettings.OnModificationGlobal -= OnSettingsChanged; - BuiltinSceneCache.sceneListChanged -= OnScenesChanged; - } - - internal static void OnSettingsChanged(AddressableAssetSettings settings, AddressableAssetSettings.ModificationEvent evt, object obj) - { - switch (evt) - { - case AddressableAssetSettings.ModificationEvent.EntryCreated: - case AddressableAssetSettings.ModificationEvent.EntryAdded: - case AddressableAssetSettings.ModificationEvent.EntryMoved: - case AddressableAssetSettings.ModificationEvent.EntryModified: - var entries = obj as List; - if (entries == null) - { - entries = new List(); - entries.Add(obj as AddressableAssetEntry); - } - CheckForScenesInBuildList(entries); - break; - } - } - - static void OnScenesChanged() - { - //ignore the play mode changes... - if (EditorApplication.isPlayingOrWillChangePlaymode) - return; - - var settings = AddressableAssetSettingsDefaultObject.Settings; - if (settings == null) - return; - - foreach (var scene in BuiltinSceneCache.scenes) - { - if (scene.enabled) - { - var entry = settings.FindAssetEntry(scene.guid.ToString()); - if (entry != null) - { - Debug.LogWarning("An addressable scene was added to the build scenes list and can thus no longer be addressable. " + scene.path); - settings.RemoveAssetEntry(scene.guid.ToString()); - } - } - } - } - - static void CheckForScenesInBuildList(IList entries) - { - if (entries == null) - return; - - EditorBuildSettingsScene[] scenes = BuiltinSceneCache.scenes; - bool changed = false; - foreach (var entry in entries) - { - if (entry == null) - continue; - - for (int index = 0; index < scenes.Length; index++) - { - var scene = scenes[index]; - if (scene.enabled && entry.AssetPath == scene.path) - { - Debug.LogWarning("A scene from the EditorBuildScenes list has been marked as addressable. It has thus been disabled in the build scenes list. " + scene.path); - scenes[index].enabled = false; - changed = true; - } - } - } - if (changed) - BuiltinSceneCache.scenes = scenes; - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableScenesManager.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableScenesManager.cs.meta deleted file mode 100644 index c02a4d08..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/AddressableScenesManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 63e950f5b8d524d43b391e54d52f9ac0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/BuiltinSceneCache.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/BuiltinSceneCache.cs deleted file mode 100644 index 11617fb9..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/BuiltinSceneCache.cs +++ /dev/null @@ -1,106 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEditor; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Settings -{ - internal static class BuiltinSceneCache - { - internal static EditorBuildSettingsScene[] m_Scenes; - static Dictionary s_GUIDSceneIndexLookup; - static bool s_IsListening; - public static event Action sceneListChanged; - - internal static void ClearState() - { - InvalidateCache(); - if(s_IsListening) - { - EditorBuildSettings.sceneListChanged -= EditorBuildSettings_sceneListChanged; - s_IsListening = false; - } - } - - public static EditorBuildSettingsScene[] scenes - { - get - { - if (m_Scenes == null) - { - if (!s_IsListening) - { - s_IsListening = true; - EditorBuildSettings.sceneListChanged += EditorBuildSettings_sceneListChanged; - } - InvalidateCache(); - m_Scenes = EditorBuildSettings.scenes; - } - return m_Scenes; - } - set - { - EditorBuildSettings.scenes = value; - } - } - - public static Dictionary GUIDSceneIndexLookup - { - get - { - if(s_GUIDSceneIndexLookup == null) - { - EditorBuildSettingsScene[] localScenes = scenes; - s_GUIDSceneIndexLookup = new Dictionary(); - int enabledIndex = 0; - for (int i = 0; i < scenes.Length; i++) - { - if(localScenes[i] != null && localScenes[i].enabled) - s_GUIDSceneIndexLookup[localScenes[i].guid] = enabledIndex++; - } - } - return s_GUIDSceneIndexLookup; - } - } - - private static void InvalidateCache() - { - m_Scenes = null; - s_GUIDSceneIndexLookup = null; - } - - public static int GetSceneIndex(GUID guid) - { - int index = -1; - return GUIDSceneIndexLookup.TryGetValue(guid, out index) ? index : -1; - } - - public static bool Contains(GUID guid) - { - return GUIDSceneIndexLookup.ContainsKey(guid); - } - - public static bool GetSceneFromGUID(GUID guid, out EditorBuildSettingsScene outScene) - { - int index = GetSceneIndex(guid); - if (index == -1) - { - outScene = null; - return false; - } - outScene = scenes[index]; - return true; - } - - private static void EditorBuildSettings_sceneListChanged() - { - InvalidateCache(); - if(sceneListChanged != null) - sceneListChanged(); - } - - } - - -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/BuiltinSceneCache.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/BuiltinSceneCache.cs.meta deleted file mode 100644 index 540e8900..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/BuiltinSceneCache.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a8e45712f43ff0645b809f8a5c1ba37e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/CacheInitializationSettings.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/CacheInitializationSettings.cs deleted file mode 100644 index 4e058db5..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/CacheInitializationSettings.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; -using UnityEngine; -using UnityEngine.AddressableAssets.Initialization; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets.Settings -{ - /// - /// Asset container for CacheInitializationData. - /// - [CreateAssetMenu(fileName = "CacheInitializationSettings.asset", menuName = "Addressable Assets/Initialization/Cache Initialization Settings")] - public class CacheInitializationSettings : ScriptableObject, IObjectInitializationDataProvider - { - [FormerlySerializedAs("m_data")] - [SerializeField] - CacheInitializationData m_Data = new CacheInitializationData(); - /// - /// Display name used in GUI for this object. - /// - public string Name { get { return "Asset Bundle Cache Settings"; } } - /// - /// The cache initialization data that will be serialized and applied during Addressables initialization. - /// - public CacheInitializationData Data - { - get - { - return m_Data; - } - set - { - m_Data = value; - } - } - - /// - /// Create initialization data to be serialized into the Addressables runtime data. - /// - /// The serialized data for the initialization class and the data. - public ObjectInitializationData CreateObjectInitializationData() - { - return ObjectInitializationData.CreateSerializedInitializationData(typeof(CacheInitialization).Name, m_Data); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/CacheInitializationSettings.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/CacheInitializationSettings.cs.meta deleted file mode 100644 index 25f9f642..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/CacheInitializationSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b44c2db511ef19949950f4b3b93a6e53 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GlobalInitialization.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GlobalInitialization.cs deleted file mode 100644 index 73baf691..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GlobalInitialization.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Settings -{ - [InitializeOnLoad] - static class GlobalInitialization - { - static bool m_IsInitialized = false; - - static GlobalInitialization() - { - InitializeGlobalState(); - } - - public static void InitializeGlobalState() - { - if (!m_IsInitialized) - { - AddressableScenesManager.InitializeGlobalState(); - m_IsInitialized = true; - } - } - - // This only gets called by testing code that wants to do isolated testing without active Addressables global hooks - public static void ShutdownGlobalState() - { - if (m_IsInitialized) - { - AddressableScenesManager.ShutdownGlobalState(); - m_IsInitialized = false; - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GlobalInitialization.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GlobalInitialization.cs.meta deleted file mode 100644 index b0cf5ddb..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GlobalInitialization.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3f9489010bc9cdc458c23db402d6b3fa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GroupSchemas.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GroupSchemas.meta deleted file mode 100644 index 76fa2e03..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GroupSchemas.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b842ab94dae39f3459a2159fb7ef9b73 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GroupSchemas/BundledAssetGroupSchema.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GroupSchemas/BundledAssetGroupSchema.cs deleted file mode 100644 index 2c83be3a..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GroupSchemas/BundledAssetGroupSchema.cs +++ /dev/null @@ -1,338 +0,0 @@ -using System; -using UnityEditor.AddressableAssets.HostingServices; -using UnityEngine; -using UnityEngine.ResourceManagement.ResourceProviders; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets.Settings.GroupSchemas -{ - /// - /// Schema used for bundled asset groups. - /// - [CreateAssetMenu(fileName = "BundledAssetGroupSchema.asset", menuName = "Addressable Assets/Group Schemas/Bundled Assets")] - public class BundledAssetGroupSchema : AddressableAssetGroupSchema, IHostingServiceConfigurationProvider, ISerializationCallbackReceiver - { - /// - /// Defines how bundles are created. - /// - public enum BundlePackingMode - { - /// - /// Pack all entries into as few bundles as possible (Scenes are put into separate bundles). - /// - PackTogether, - /// - /// Create a bundle per entry. This is useful if each entry is a folder as all sub entries will go to the same bundle. - /// - PackSeparately, - /// - /// Creates a bundle per unique set of labels - /// - PackTogetherByLabel - } - - /// - /// Compression mode for bundles in this group. - /// - public enum BundleCompressionMode - { - Uncompressed, - LZ4, - LZMA - } - - /// - /// Build compression. - /// - public BundleCompressionMode Compression - { - get { return m_Compression; } - set { m_Compression = value; } - } - - [SerializeField] - BundleCompressionMode m_Compression = BundleCompressionMode.LZ4; - - /// - /// Gets the build compression settings for bundles in this group. - /// - /// The build compression. - public virtual BuildCompression GetBuildCompressionForBundle(string bundleId) - { - //Unfortunately the BuildCompression struct is not serializable (nor is it settable), therefore this enum needs to be used to return the static members.... - switch (m_Compression) - { - case BundleCompressionMode.Uncompressed: return BuildCompression.Uncompressed; - case BundleCompressionMode.LZ4: return BuildCompression.LZ4; - case BundleCompressionMode.LZMA: return BuildCompression.LZMA; - } - return default(BuildCompression); - } - - [FormerlySerializedAs("m_includeInBuild")] - [SerializeField] - [Tooltip("If true, the assets in this group will be included in the build of bundles.")] - bool m_IncludeInBuild = true; - /// - /// If true, the assets in this group will be included in the build of bundles. - /// - public bool IncludeInBuild - { - get { return m_IncludeInBuild; } - set - { - m_IncludeInBuild = value; - SetDirty(true); - } - } - [SerializeField] - [SerializedTypeRestriction(type = typeof(IResourceProvider))] - [Tooltip("The provider type to use for loading assets from bundles.")] - SerializedType m_BundledAssetProviderType; - /// - /// The provider type to use for loading assets from bundles. - /// - public SerializedType BundledAssetProviderType { get { return m_BundledAssetProviderType; } } - - [SerializeField] - [Tooltip("If true, the bundle and asset provider for assets in this group will get unique provider ids and will only provide for assets in this group.")] - bool m_ForceUniqueProvider = false; - /// - /// If true, the bundle and asset provider for assets in this group will get unique provider ids and will only provide for assets in this group. - /// - public bool ForceUniqueProvider - { - get { return m_ForceUniqueProvider; } - set - { - m_ForceUniqueProvider = value; - SetDirty(true); - } - } - - [FormerlySerializedAs("m_useAssetBundleCache")] - [SerializeField] - [Tooltip("If true, the Hash value of the asset bundle is used to determine if a bundle can be loaded from the local cache instead of downloaded. (Only applies to remote asset bundles)")] - bool m_UseAssetBundleCache = true; - /// - /// If true, the CRC and Hash values of the asset bundle are used to determine if a bundle can be loaded from the local cache instead of downloaded. - /// - public bool UseAssetBundleCache - { - get { return m_UseAssetBundleCache; } - set - { - m_UseAssetBundleCache = value; - SetDirty(true); - } - } - - [SerializeField] - [Tooltip("If true, the CRC (Cyclic Redundancy Check) of the asset bundle is used to check the integrity. This can be used for both local and remote bundles.")] - bool m_UseAssetBundleCrc = true; - /// - /// If true, the CRC and Hash values of the asset bundle are used to determine if a bundle can be loaded from the local cache instead of downloaded. - /// - public bool UseAssetBundleCrc - { - get { return m_UseAssetBundleCrc; } - set - { - m_UseAssetBundleCrc = value; - SetDirty(true); - } - } - - [FormerlySerializedAs("m_timeout")] - [SerializeField] - [Tooltip("Sets UnityWebRequest to attempt to abort after the number of seconds in timeout have passed. (Only applies to remote asset bundles)")] - int m_Timeout; - /// - /// Sets UnityWebRequest to attempt to abort after the number of seconds in timeout have passed. - /// - public int Timeout { get { return m_Timeout; } set { m_Timeout = value; } } - [FormerlySerializedAs("m_chunkedTransfer")] - [SerializeField] - [Tooltip("Deprecated in 2019.3+. Indicates whether the UnityWebRequest system should employ the HTTP/1.1 chunked-transfer encoding method. (Only applies to remote asset bundles)")] - bool m_ChunkedTransfer; - /// - /// Indicates whether the UnityWebRequest system should employ the HTTP/1.1 chunked-transfer encoding method. - /// - public bool ChunkedTransfer { get { return m_ChunkedTransfer; } set { m_ChunkedTransfer = value; } } - [FormerlySerializedAs("m_redirectLimit")] - [SerializeField] - [Tooltip("Indicates the number of redirects which this UnityWebRequest will follow before halting with a “Redirect Limit Exceeded” system error. (Only applies to remote asset bundles)")] - int m_RedirectLimit = -1; - /// - /// Indicates the number of redirects which this UnityWebRequest will follow before halting with a “Redirect Limit Exceeded” system error. - /// - public int RedirectLimit { get { return m_RedirectLimit; } set { m_RedirectLimit = value; } } - [FormerlySerializedAs("m_retryCount")] - [SerializeField] - [Tooltip("Indicates the number of times the request will be retried.")] - int m_RetryCount; - /// - /// Indicates the number of times the request will be retried. - /// - public int RetryCount { get { return m_RetryCount; } set { m_RetryCount = value; } } - - [FormerlySerializedAs("m_buildPath")] - [SerializeField] - [Tooltip("The path to copy asset bundles to.")] - ProfileValueReference m_BuildPath = new ProfileValueReference(); - /// - /// The path to copy asset bundles to. - /// - public ProfileValueReference BuildPath - { - get { return m_BuildPath; } - } - - [FormerlySerializedAs("m_loadPath")] - [SerializeField] - [Tooltip("The path to load bundles from.")] - ProfileValueReference m_LoadPath = new ProfileValueReference(); - /// - /// The path to load bundles from. - /// - public ProfileValueReference LoadPath - { - get { return m_LoadPath; } - } - - //placeholder for UrlSuffix support... - internal string UrlSuffix - { - get { return string.Empty; } - } - - [FormerlySerializedAs("m_bundleMode")] - [SerializeField] - [Tooltip("Controls how bundles are packed. If set to PackTogether, a single asset bundle will be created for the entire group, with the exception of scenes, which are packed separately. If set to PackSeparately, an asset bundle will be created for each top level entry in the group.")] - BundlePackingMode m_BundleMode = BundlePackingMode.PackTogether; - /// - /// Controls how bundles are packed. If set to PackTogether, a single asset bundle will be created for the entire group, with the exception of scenes, which are packed separately. If set to PackSeparately, an asset bundle will be created for each top level entry in the group. - /// - public BundlePackingMode BundleMode - { - get { return m_BundleMode; } - set - { - m_BundleMode = value; - SetDirty(true); - } - } - - /// - public string HostingServicesContentRoot - { - get - { - return BuildPath.GetValue(Group.Settings); - } - } - - [FormerlySerializedAs("m_assetBundleProviderType")] - [SerializeField] - [SerializedTypeRestriction(type = typeof(IResourceProvider))] - [Tooltip("The provider type to use for loading asset bundles.")] - SerializedType m_AssetBundleProviderType; - /// - /// The provider type to use for loading asset bundles. - /// - public SerializedType AssetBundleProviderType { get { return m_AssetBundleProviderType; } } - - /// - /// Set default values taken from the assigned group. - /// - /// The group this schema has been added to. - protected override void OnSetGroup(AddressableAssetGroup group) - { - //this can happen during the load of the addressables asset - if (group.Settings != null) - { - if (BuildPath == null || string.IsNullOrEmpty(BuildPath.GetValue(group.Settings))) - { - m_BuildPath = new ProfileValueReference(); - BuildPath.SetVariableByName(group.Settings, AddressableAssetSettings.kLocalBuildPath); - } - - if (LoadPath == null || string.IsNullOrEmpty(LoadPath.GetValue(group.Settings))) - { - m_LoadPath = new ProfileValueReference(); - LoadPath.SetVariableByName(group.Settings, AddressableAssetSettings.kLocalLoadPath); - } - } - - if (m_AssetBundleProviderType.Value == null) - m_AssetBundleProviderType.Value = typeof(AssetBundleProvider); - if (m_BundledAssetProviderType.Value == null) - m_BundledAssetProviderType.Value = typeof(BundledAssetProvider); - } - - /// - /// Impementation of ISerializationCallbackReceiver, does nothing. - /// - public void OnBeforeSerialize() - { - - } - - /// - /// Impementation of ISerializationCallbackReceiver, used to set callbacks for ProfileValueReference changes. - /// - public void OnAfterDeserialize() - { - BuildPath.OnValueChanged += s=> SetDirty(true); - LoadPath.OnValueChanged += s => SetDirty(true); - if (m_AssetBundleProviderType.Value == null) - m_AssetBundleProviderType.Value = typeof(AssetBundleProvider); - if (m_BundledAssetProviderType.Value == null) - m_BundledAssetProviderType.Value = typeof(BundledAssetProvider); - - } - - /// - /// Returns the id of the asset provider needed to load from this group. - /// - /// The id of the cached provider needed for this group. - public string GetAssetCachedProviderId() - { - return ForceUniqueProvider ? string.Format("{0}_{1}", BundledAssetProviderType.Value.FullName, Group.Guid) : BundledAssetProviderType.Value.FullName; - } - - /// - /// Returns the id of the bundle provider needed to load from this group. - /// - /// The id of the cached provider needed for this group. - public string GetBundleCachedProviderId() - { - return ForceUniqueProvider ? string.Format("{0}_{1}", AssetBundleProviderType.Value.FullName, Group.Guid) : AssetBundleProviderType.Value.FullName; - } - - - //the next several items are temporarily internal so as to not modify API. - - internal enum BundleNamingStyle - { - AppendHash, - NoHash, - OnlyHash - } - - [SerializeField] - BundleNamingStyle m_BundleNaming; - /// - /// (to be made public in later releases) Naming style to use for generated AssetBundle(s). - /// - internal BundleNamingStyle BundleNaming - { - get { return m_BundleNaming; } - set { m_BundleNaming = value; } - } - - - - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GroupSchemas/BundledAssetGroupSchema.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GroupSchemas/BundledAssetGroupSchema.cs.meta deleted file mode 100644 index d789f26f..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GroupSchemas/BundledAssetGroupSchema.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e5d17a21594effb4e9591490b009e7aa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GroupSchemas/ContentUpdateGroupSchema.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GroupSchemas/ContentUpdateGroupSchema.cs deleted file mode 100644 index b4ee9f68..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GroupSchemas/ContentUpdateGroupSchema.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using UnityEngine; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets.Settings.GroupSchemas -{ - /// - /// Schema for content updates. - /// - [CreateAssetMenu(fileName = "ContentUpdateGroupSchema.asset", menuName = "Addressable Assets/Group Schemas/Content Update")] - public class ContentUpdateGroupSchema : AddressableAssetGroupSchema - { - [FormerlySerializedAs("m_staticContent")] - [SerializeField] - bool m_StaticContent; - /// - /// Is the group static. This property is used in determining which assets need to be moved to a new remote group during the content update process. - /// - public bool StaticContent - { - get { return m_StaticContent; } - set - { - m_StaticContent = value; - SetDirty(true); - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GroupSchemas/ContentUpdateGroupSchema.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GroupSchemas/ContentUpdateGroupSchema.cs.meta deleted file mode 100644 index 67b39d89..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GroupSchemas/ContentUpdateGroupSchema.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5834b5087d578d24c926ce20cd31e6d6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GroupSchemas/PlayerDataGroupSchema.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GroupSchemas/PlayerDataGroupSchema.cs deleted file mode 100644 index 5e63bb85..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GroupSchemas/PlayerDataGroupSchema.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using UnityEngine; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets.Settings.GroupSchemas -{ - /// - /// Schema for the player data asset group - /// - [CreateAssetMenu(fileName = "PlayerDataGroupSchema.asset", menuName = "Addressable Assets/Group Schemas/Player Data")] - public class PlayerDataGroupSchema : AddressableAssetGroupSchema - { - [FormerlySerializedAs("m_includeResourcesFolders")] - [SerializeField] - bool m_IncludeResourcesFolders = true; - /// - /// If enabled, all assets in resources folders will have addresses generated during the build. - /// - public bool IncludeResourcesFolders - { - get - { - return m_IncludeResourcesFolders; - } - set - { - m_IncludeResourcesFolders = value; - SetDirty(true); - } - } - [FormerlySerializedAs("m_includeBuildSettingsScenes")] - [SerializeField] - bool m_IncludeBuildSettingsScenes = true; - /// - /// If enabled, all scenes in the editor build settings will have addresses generated during the build. - /// - public bool IncludeBuildSettingsScenes - { - get - { - return m_IncludeBuildSettingsScenes; - } - set - { - m_IncludeBuildSettingsScenes = value; - SetDirty(true); - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GroupSchemas/PlayerDataGroupSchema.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GroupSchemas/PlayerDataGroupSchema.cs.meta deleted file mode 100644 index a4872728..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/GroupSchemas/PlayerDataGroupSchema.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b1487f5d688e4f94f828f879d599dbdc -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/KeyDataStore.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/KeyDataStore.cs deleted file mode 100644 index be85d8c8..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/KeyDataStore.cs +++ /dev/null @@ -1,269 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Reflection; -using UnityEditor.AddressableAssets.GUI; -using UnityEngine; -using UnityEngine.AddressableAssets; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets.Settings -{ - /// - /// Contains serialized data in a generic serializable container. - /// - [Serializable] - public class KeyDataStore : ISerializationCallbackReceiver - { - [Serializable] - internal struct Entry - { - [FormerlySerializedAs("m_assemblyName")] - [SerializeField] string m_AssemblyName; - internal string AssemblyName { get { return m_AssemblyName; } set { m_AssemblyName = value; } } - [FormerlySerializedAs("m_className")] - [SerializeField] string m_ClassName; - internal string ClassName { get { return m_ClassName; } set { m_ClassName = value; } } - [FormerlySerializedAs("m_data")] - [SerializeField] string m_Data; - internal string Data { get { return m_Data; } set { m_Data = value; } } - [FormerlySerializedAs("m_key")] - [SerializeField] string m_Key; - internal string Key { get { return m_Key; } set { m_Key = value; } } - - /// - public override string ToString() - { - return Data; - } - } - - internal void Reset() - { - m_SerializedData = null; - m_EntryMap = new Dictionary(); - } - - [FormerlySerializedAs("m_serializedData")] - [SerializeField] - List m_SerializedData; - Dictionary m_EntryMap = new Dictionary(); - /// - /// Delegate that is invoked when data is modified. - /// - public Action OnSetData { get; set; } - - /// - /// Implementation of ISerializationCallbackReceiver interface, used to convert data to a serializable form. - /// - public void OnBeforeSerialize() - { - m_SerializedData = new List(m_EntryMap.Count); - foreach (var k in m_EntryMap) - m_SerializedData.Add(CreateEntry(k.Key, k.Value)); - } - - Entry CreateEntry(string key, object value) - { - var entry = new Entry(); - entry.Key = key; - var objType = value.GetType(); - entry.AssemblyName = objType.Assembly.FullName; - entry.ClassName = objType.FullName; - try - { - if (objType == typeof(string)) - { - entry.Data = value as string; - } - else if (objType.IsEnum) - { - entry.Data = value.ToString(); - } - else - { - var parseMethod = objType.GetMethod("Parse", BindingFlags.Static | BindingFlags.Public, null, CallingConventions.Any, new[] { typeof(string) }, null); - if (parseMethod == null || parseMethod.ReturnType != objType) - entry.Data = JsonUtility.ToJson(value); - else - entry.Data = value.ToString(); - } - } - catch (Exception ex) - { - Addressables.LogWarningFormat("KeyDataStore unable to serizalize entry {0} with value {1}, exception: {2}", key, value, ex); - } - return entry; - } - - object CreateObject(Entry e) - { - try - { - var assembly = Assembly.Load(e.AssemblyName); - var objType = assembly.GetType(e.ClassName); - if (objType == typeof(string)) - return e.Data; - if (objType.IsEnum) - return Enum.Parse(objType, e.Data); - var parseMethod = objType.GetMethod("Parse", BindingFlags.Static | BindingFlags.Public, null, CallingConventions.Any, new[] { typeof(string) }, null); - if (parseMethod == null || parseMethod.ReturnType != objType) - return JsonUtility.FromJson(e.Data, objType); - return parseMethod.Invoke(null, new object[] { e.Data }); - } - catch (Exception ex) - { - Addressables.LogWarningFormat("KeyDataStore unable to deserizalize entry {0} from assembly {1} of type {2}, exception: {3}", e.Key, e.AssemblyName, e.ClassName, ex); - return null; - } - } - - /// - /// Implementation of ISerializationCallbackReceiver interface, used to convert data from its serializable form. - /// - public void OnAfterDeserialize() - { - m_EntryMap = new Dictionary(m_SerializedData.Count); - foreach (var e in m_SerializedData) - m_EntryMap.Add(e.Key, CreateObject(e)); - m_SerializedData = null; - } - - /// - /// The collection of keys stored. - /// - public IEnumerable Keys { get { return m_EntryMap.Keys; } } - - /// - /// Set the value of a specified key. - /// - /// The key. - /// The data to store. Supported types are strings, POD types, objects that have a static method named 'Parse' that convert a string to an object, and object that are serializable via JSONUtilty. - public void SetData(string key, object data) - { - var isNew = m_EntryMap.ContainsKey(key); - m_EntryMap[key] = data; - if (OnSetData != null) - OnSetData(key, data, isNew); - } - - /// - /// Set data for a specified key from a string. - /// - /// The data key. - /// The data string value. - public void SetDataFromString(string key, string data) - { - var existingType = GetDataType(key); - if (existingType == null) - SetData(key, data); - else - SetData(key, CreateObject(new Entry { AssemblyName = existingType.Assembly.FullName, ClassName = existingType.FullName, Data = data, Key = key })); - } - - internal Type GetDataType(string key) - { - object val; - if (m_EntryMap.TryGetValue(key, out val)) - return val.GetType(); - return null; - - } - - internal string GetDataString(string key, string defaultValue) - { - object val; - if (m_EntryMap.TryGetValue(key, out val)) - return CreateEntry(key, val).ToString(); - return defaultValue; - } - - /// - /// Get data via a specified key. - /// - /// The data type. - /// The key. - /// The default value to return if the data is not found. - /// Optional parameter to control whether to add the default value if the data is not found. - /// - public T GetData(string key, T defaultValue, bool addDefault = false) - { - try - { - object val; - if (m_EntryMap.TryGetValue(key, out val)) - return (T)val; - } - catch (Exception) - { - // ignored - } - - if (addDefault) - SetData(key, defaultValue); - return defaultValue; - } - - internal void OnGUI(AddressableAssetGroup parent) - { - List keys = new List(Keys); //copy key list to avoid dictionary errors. - foreach (var key in keys) - { - var itemType = m_EntryMap[key].GetType(); - if (itemType == typeof(string)) - { - string currValue = m_EntryMap[key].ToString(); - var newValue = ProfilesEditor.ValueGUILayout(parent.Settings, key, currValue); - if (newValue != currValue) - { - SetDataFromString(key, newValue); - } - } - else - { - EditorGUILayout.BeginHorizontal(); - EditorGUILayout.PrefixLabel(key); - //do custom UI for type... - if (itemType.IsEnum) - { - var currValue = m_EntryMap[key] as Enum; - var newValue = EditorGUILayout.EnumPopup(currValue); - if (currValue == null || !currValue.Equals(newValue)) - { - SetData(key, newValue); - } - } - else if (itemType.IsPrimitive) - { - var currValue = m_EntryMap[key]; - if (itemType == typeof(bool)) - { - var newValue = EditorGUILayout.Toggle((bool)currValue); - if (newValue != (bool)currValue) - SetData(key, newValue); - } - else if (itemType == typeof(int)) - { - var newValue = EditorGUILayout.IntField((int)currValue); - if (newValue != (int)currValue) - SetData(key, newValue); - } - else if (itemType == typeof(float)) - { - var newValue = EditorGUILayout.FloatField((float)currValue); - if (newValue != (float)currValue) - SetData(key, newValue); - } - else - { - var newValue = EditorGUILayout.DelayedTextField(currValue.ToString()); - if (newValue != currValue.ToString()) - SetDataFromString(key, newValue); - } - } - EditorGUILayout.EndHorizontal(); - } - } - } - - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/KeyDataStore.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/KeyDataStore.cs.meta deleted file mode 100644 index 01f823f4..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/KeyDataStore.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3a3b28cc6d2f5b444af3331b13911334 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/LabelTable.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/LabelTable.cs deleted file mode 100644 index a5a30850..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/LabelTable.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using UnityEngine; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets.Settings -{ - [Serializable] - class LabelTable - { - [FormerlySerializedAs("m_labelNames")] - [SerializeField] - List m_LabelNames = new List(new[] { "default" }); - - internal List labelNames { get { return m_LabelNames; } } - const int k_KNameCountCap = 3; - - internal void AddLabelName(string name) - { - if(!m_LabelNames.Contains(name)) - { - m_LabelNames.Add(name); - } - } - - internal string GetUniqueLabelName(string name) - { - var newName = name; - int counter = 1; - while (counter < 100) - { - if (!m_LabelNames.Contains(newName)) - return newName; - newName = name + counter; - counter++; - } - return string.Empty; - } - - internal bool RemoveLabelName(string name) - { - return m_LabelNames.Remove(name); - } - - internal string GetString(HashSet val, float width) //TODO - use width to add the "..." in the right place. - { - StringBuilder sb = new StringBuilder(); - int counter = 0; - foreach (var v in m_LabelNames) - { - if (val.Contains(v)) - { - if (counter >= k_KNameCountCap) - { - sb.Append("..."); - break; - } - - if (counter > 0) - sb.Append(", "); - sb.Append(v); - counter++; - } - } - return sb.ToString(); - } - - internal long GetMask(HashSet maskSet) - { - if (maskSet.Count == 0) - return 0; - long one = 1; - long val = 0; - for (int i = 0; i < m_LabelNames.Count; i++) - if (maskSet.Contains(m_LabelNames[i])) - val |= one << i; - return val; - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/LabelTable.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/LabelTable.cs.meta deleted file mode 100644 index c6d81624..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/LabelTable.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b9df82cea39d69a4a9e27b9eb6103717 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/ProfileValueReference.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/ProfileValueReference.cs deleted file mode 100644 index 264582ea..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/ProfileValueReference.cs +++ /dev/null @@ -1,146 +0,0 @@ -using System; -using UnityEngine; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets.Settings -{ - /// - /// Used to store references to profile variables. This class is intended to be used for fields in user scripts, specifically ones that subclass AddressableAssetGroupSchema. - /// - [Serializable] - public class ProfileValueReference - { - [FormerlySerializedAs("m_id")] - [SerializeField] - string m_Id; - - /// - /// This delegate will be invoked when the reference profile id changes. This will NOT be invoked when the actual profile value itself changes. - /// - public Action OnValueChanged; - - /// - /// Get the profile variable id. - /// - public string Id - { - get { return m_Id; } - internal set { m_Id = value; } - } - - /// - /// Evaluate the profile value using the provided settings object. - /// - /// The settings object to evaluate with. The activeProfileId will be used. - /// The evaluated string stored in the referenced profile variable. - public string GetValue(AddressableAssetSettings settings) - { - if (settings == null) - { - Debug.LogWarning("ProfileValueReference: AddressableAssetSettings object is null."); - return null; - } - return GetValue(settings.profileSettings, settings.activeProfileId); - } - - /// - /// Evaluate the profile value using the provided profile settings object and a profile id. - /// - /// The profile settings object. - /// The profile id. - /// The evaluated string stored in the referenced profile variable. - public string GetValue(AddressableAssetProfileSettings profileSettings, string profileId) - { - if (profileSettings == null) - { - Debug.LogWarning("ProfileValueReference: AddressableAssetProfileSettings object is null."); - return null; - } - if (string.IsNullOrEmpty(profileId)) - { - Debug.LogWarning("ProfileValueReference: GetValue called with invalid profileId."); - return null; - } - return profileSettings.EvaluateString(profileId, profileSettings.GetValueById(profileId, m_Id)); - } - - /// - /// Get the profile variable name that is referenced. - /// - /// The settings object. - /// The name of the profile variable name. - public string GetName(AddressableAssetSettings settings) - { - if (settings == null) - { - Debug.LogWarning("ProfileValueReference: GetName() - AddressableAssetSettings object is null."); - return null; - } - var pid = settings.profileSettings.GetProfileDataById(m_Id); - if(pid == null) - Debug.LogWarningFormat("ProfileValueReference: GetName() - Unable to find variable id {0} in settings object.", m_Id); - - return pid == null ? string.Empty : pid.ProfileName; - } - - /// - /// Set the profile variable id using the id of the variable. - /// - /// The settings object. - /// The id of the profile variable to set. - /// True if the profile data is found and set, false otherwise. - public bool SetVariableById(AddressableAssetSettings settings, string id) - { - if (settings == null) - { - Debug.LogWarning("ProfileValueReference: SetVariableById() - AddressableAssetSettings object is null."); - return false; - } - if (string.IsNullOrEmpty(id)) - { - Debug.LogWarning("ProfileValueReference: SetVariableById() - invalid parameter id."); - return false; - } - if (settings.profileSettings.GetProfileDataById(id) == null) - { - Debug.LogWarningFormat("ProfileValueReference: SetVariableById() - Unable to find variable id {0} in settings object.", id); - return false; - } - m_Id = id; - if (OnValueChanged != null) - OnValueChanged(this); - return true; - } - - /// - /// Set the profile variable id using the name of the variable. - /// - /// The settings object. - /// The name of the profile variable to set. - /// True if the profile data is found and set, false otherwise. - public bool SetVariableByName(AddressableAssetSettings settings, string name) - { - if (settings == null) - { - Debug.LogWarning("ProfileValueReference: SetVariableByName() - AddressableAssetSettings object is null."); - return false; - } - if (string.IsNullOrEmpty(name)) - { - Debug.LogWarning("ProfileValueReference: SetVariableByName() - invalid parameter name."); - return false; - } - - var idData = settings.profileSettings.GetProfileDataByName(name); - if (idData == null) - { - Debug.LogWarningFormat("ProfileValueReference: SetVariableByName() - Unable to find variable name {0} in settings object.", name); - return false; - } - m_Id = idData.Id; - if (OnValueChanged != null) - OnValueChanged(this); - return true; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/ProfileValueReference.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/ProfileValueReference.cs.meta deleted file mode 100644 index d07c57a1..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/ProfileValueReference.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 46f31ab199825eb488ad8f2a8f6d1a4c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/ProjectConfigData.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/ProjectConfigData.cs deleted file mode 100644 index ede74ea1..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/ProjectConfigData.cs +++ /dev/null @@ -1,166 +0,0 @@ -using System; -using System.IO; -using System.Runtime.Serialization.Formatters.Binary; -using UnityEngine; -using UnityEngine.AddressableAssets; -using UnityEngine.Serialization; - -namespace UnityEditor.AddressableAssets.Settings -{ - class ProjectConfigData - { - [Serializable] - class ConfigSaveData - { - [FormerlySerializedAs("m_postProfilerEvents")] - [SerializeField] - internal bool postProfilerEventsInternal; - [FormerlySerializedAs("m_localLoadSpeed")] - [SerializeField] - internal long localLoadSpeedInternal = 1024 * 1024 * 10; - [FormerlySerializedAs("m_remoteLoadSpeed")] - [SerializeField] - internal long remoteLoadSpeedInternal = 1024 * 1024 * 1; - [FormerlySerializedAs("m_hierarchicalSearch")] - [SerializeField] - internal bool hierarchicalSearchInternal; - [SerializeField] - internal int activePlayModeIndex = 0; - } - - static ConfigSaveData s_Data; - - public static int activePlayModeIndex - { - get - { - ValidateData(); - return s_Data.activePlayModeIndex; - } - set - { - ValidateData(); - s_Data.activePlayModeIndex = value; - SaveData(); - } - } - - public static bool postProfilerEvents - { - get - { - ValidateData(); - return s_Data.postProfilerEventsInternal; - } - set - { - ValidateData(); - s_Data.postProfilerEventsInternal = value; - SaveData(); - } - } - public static long localLoadSpeed - { - get - { - ValidateData(); - return s_Data.localLoadSpeedInternal; - } - set - { - ValidateData(); - s_Data.localLoadSpeedInternal = value; - SaveData(); - } - } - public static long remoteLoadSpeed - { - get - { - ValidateData(); - return s_Data.remoteLoadSpeedInternal; - } - set - { - ValidateData(); - s_Data.remoteLoadSpeedInternal = value; - SaveData(); - } - } - public static bool hierarchicalSearch - { - get - { - ValidateData(); - return s_Data.hierarchicalSearchInternal; - } - set - { - ValidateData(); - s_Data.hierarchicalSearchInternal = value; - SaveData(); - } - } - - internal static void SerializeForHash(Stream stream) - { - ValidateData(); - BinaryFormatter formatter = new BinaryFormatter(); - formatter.Serialize(stream, s_Data); - } - - static void ValidateData() - { - if (s_Data == null) - { - var dataPath = Path.GetFullPath("."); - dataPath = dataPath.Replace("\\", "/"); - dataPath += "/Library/AddressablesConfig.dat"; - - if (File.Exists(dataPath)) - { - BinaryFormatter bf = new BinaryFormatter(); - try - { - using (FileStream file = new FileStream(dataPath, FileMode.Open, FileAccess.Read)) - { - var data = bf.Deserialize(file) as ConfigSaveData; - if (data != null) - { - s_Data = data; - } - } - } - catch - { - //if the current class doesn't match what's in the file, Deserialize will throw. since this data is non-critical, we just wipe it - Addressables.LogWarning("Error reading Addressable Asset project config (play mode, etc.). Resetting to default."); - File.Delete(dataPath); - } - } - - //check if some step failed. - if (s_Data == null) - { - s_Data = new ConfigSaveData(); - } - } - } - - static void SaveData() - { - if (s_Data == null) - return; - - var dataPath = Path.GetFullPath("."); - dataPath = dataPath.Replace("\\", "/"); - dataPath += "/Library/AddressablesConfig.dat"; - - BinaryFormatter bf = new BinaryFormatter(); - FileStream file = File.Create(dataPath); - - bf.Serialize(file, s_Data); - file.Close(); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/ProjectConfigData.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/ProjectConfigData.cs.meta deleted file mode 100644 index 1df5cd8d..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Settings/ProjectConfigData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4533d6b9f915a16429e5a3143d2f7a1b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Unity.Addressables.Editor.asmdef b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Unity.Addressables.Editor.asmdef deleted file mode 100644 index 39128759..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Unity.Addressables.Editor.asmdef +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "Unity.Addressables.Editor", - "references": [ - "Unity.Addressables", - "Unity.ResourceManager", - "Unity.ScriptableBuildPipeline.Editor", - "Unity.ScriptableBuildPipeline" - ], - "optionalUnityReferences": [], - "includePlatforms": [ - "Editor" - ], - "excludePlatforms": [], - "allowUnsafeCode": false -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Unity.Addressables.Editor.asmdef.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Unity.Addressables.Editor.asmdef.meta deleted file mode 100644 index 8ae876e8..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Editor/Unity.Addressables.Editor.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 69448af7b92c7f342b298e06a37122aa -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime.meta deleted file mode 100644 index 23e6fa96..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 5d21fe059b6ed81429427b236f320d24 -folderAsset: yes -timeCreated: 1498750562 -licenseType: Pro -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Addressables.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Addressables.cs deleted file mode 100644 index cf3817a5..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Addressables.cs +++ /dev/null @@ -1,841 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Runtime.CompilerServices; -using System.Runtime.Serialization; -using UnityEngine.AddressableAssets.ResourceLocators; -using UnityEngine.ResourceManagement; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.ResourceProviders; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.SceneManagement; - -[assembly: InternalsVisibleTo("Unity.Addressables.Tests")] - -namespace UnityEngine.AddressableAssets -{ - /// - /// Exception to encapsulate invalid key errors. - /// - public class InvalidKeyException : Exception - { - /// - /// The key used to generate the exception. - /// - public object Key { get; private set; } - /// - /// Construct a new InvalidKeyException. - /// - /// The key that caused the exception. - public InvalidKeyException(object key) - { - Key = key; - } - - /// - public InvalidKeyException() { } - /// - public InvalidKeyException(string message) : base(message) { } - /// - public InvalidKeyException(string message, Exception innerException) : base(message, innerException) { } - /// - protected InvalidKeyException(SerializationInfo message, StreamingContext context) : base(message, context) { } - /// - public override string Message - { - get - { - return base.Message + ", Key=" + Key; - } - } - } - - /// - /// Entry point for Addressable API, this provides a simpler interface than using ResourceManager directly as it assumes string address type. - /// - public static class Addressables - { - static AddressablesImpl m_Addressables = new AddressablesImpl(new LRUCacheAllocationStrategy(1000, 1000, 100, 10)); - internal static IInstanceProvider InstanceProvider; - public static ResourceManager ResourceManager { get { return m_Addressables.ResourceManager; } } - internal static AddressablesImpl Instance { get { return m_Addressables; } } - - /// - /// Used to resolve a string using addressables config values - /// - public static string ResolveInternalId(string id) - { - return m_Addressables.ResolveInternalId(id); - } - - /// - /// Enumerates the supported modes of merging the results of requests. - /// If keys (A, B) mapped to results ([1,2,4],[3,4,5])... - /// - UseFirst (or None) takes the results from the first key - /// -- [1,2,4] - /// - Union takes results of each key and collects items that matched any key. - /// -- [1,2,3,4,5] - /// - Intersection takes results of each key, and collects items that matched every key. - /// -- [4] - /// - public enum MergeMode - { - None = 0, - UseFirst = 0, - Union, - Intersection - } - - /// - /// The name of the PlayerPrefs value used to set the path to load the addressables runtime data file. - /// - public const string kAddressablesRuntimeDataPath = "AddressablesRuntimeDataPath"; - const string k_AddressablesLogConditional = "ADDRESSABLES_LOG_ALL"; - - /// - /// The subfolder used by the Addressables system for its initialization data. - /// - public static string StreamingAssetsSubFolder { get { return m_Addressables.StreamingAssetsSubFolder; } } - - /// - /// The path used by the Addressables system for its initialization data. - /// - public static string BuildPath { get { return m_Addressables.BuildPath; } } - - /// - /// The path that addressables player data gets copied to during a player build. - /// - public static string PlayerBuildDataPath { get { return m_Addressables.PlayerBuildDataPath; } } - - /// - /// The path used by the Addressables system to load initialization data. - /// - public static string RuntimePath { get { return m_Addressables.RuntimePath; } } - - - /// - /// Gets the list of configured objects. Resource Locators are used to find objects from user-defined typed keys. - /// - /// The resource locators list. - public static IList ResourceLocators { get { return m_Addressables.ResourceLocators; } } - - /// - /// Debug.Log wrapper method that is contional on the ADDRESSABLES_LOG_ALL symbol definition. This can be set in the Player preferences in the 'Scripting Define Symbols'. - /// - /// The msg to log - [Conditional(k_AddressablesLogConditional)] - public static void Log(string msg) - { - m_Addressables.Log(msg); - } - - /// - /// Debug.LogFormat wrapper method that is contional on the ADDRESSABLES_LOG_ALL symbol definition. This can be set in the Player preferences in the 'Scripting Define Symbols'. - /// - /// The string with format tags. - /// The args used to fill in the format tags. - [Conditional(k_AddressablesLogConditional)] - public static void LogFormat(string format, params object[] args) - { - m_Addressables.LogFormat(format, args); - } - - /// - /// Debug.LogWarning wrapper method. - /// - /// The msg to log - public static void LogWarning(string msg) - { - m_Addressables.LogWarning(msg); - } - - /// - /// Debug.LogWarningFormat wrapper method. - /// - /// The string with format tags. - /// The args used to fill in the format tags. - public static void LogWarningFormat(string format, params object[] args) - { - m_Addressables.LogWarningFormat(format, args); - } - - /// - /// Debug.LogError wrapper method. - /// - /// The msg to log - public static void LogError(string msg) - { - m_Addressables.LogError(msg); - } - - /// - /// Debug.LogException wrapper method. - /// - /// The msg to log - public static void LogException(AsyncOperationHandle op, Exception ex) - { - m_Addressables.LogException(op, ex); - } - - /// - /// Debug.LogErrorFormat wrapper method. - /// - /// The string with format tags. - /// The args used to fill in the format tags. - public static void LogErrorFormat(string format, params object[] args) - { - m_Addressables.LogErrorFormat(format, args); - } - /// - /// Initialize Addressables system. Addressables will be initialized on the first API call if this is not called explicitly. - /// - /// The operation handle for the request. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> InitializeAsync(*)", true)] - [Obsolete] - public static AsyncOperationHandle Initialize() - { - return InitializeAsync(); - } - - /// - /// Initialize Addressables system. Addressables will be initialized on the first API call if this is not called explicitly. - /// - /// The operation handle for the request. - public static AsyncOperationHandle InitializeAsync() - { - return m_Addressables.InitializeAsync(); - } - - /// - /// Additively load catalogs from runtime data. The settings are not used. - /// - /// The path to the runtime data. - /// This value, if not null or empty, will be appended to all provider ids loaded from this data. - /// The operation handle for the request. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> LoadContentCatalogAsync(*)", true)] - [Obsolete] - public static AsyncOperationHandle LoadContentCatalog(string catalogPath, string providerSuffix = null) - { - return LoadContentCatalogAsync(catalogPath, providerSuffix); - } - - /// - /// Additively load catalogs from runtime data. The settings are not used. - /// - /// The path to the runtime data. - /// This value, if not null or empty, will be appended to all provider ids loaded from this data. - /// The operation handle for the request. - public static AsyncOperationHandle LoadContentCatalogAsync(string catalogPath, string providerSuffix = null) - { - return m_Addressables.LoadContentCatalogAsync(catalogPath, providerSuffix); - } - - /// - /// Initialization operation. You can register a callback with this if you need to run code after Addressables is ready. Any requests made before this operaton completes will automatically cahin to its result. - /// - public static AsyncOperationHandle InitializationOperation - { - get - { - return m_Addressables.InitializationOperation; - } - } - - /// - /// Load a single asset - /// - /// The location of the asset. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> LoadAssetAsync(*)", true)] - [Obsolete] - public static AsyncOperationHandle LoadAsset(IResourceLocation location) - { - return LoadAssetAsync(location); - } - - /// - /// Load a single asset - /// - /// The key of the location of the asset. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> LoadAssetAsync(*)", true)] - [Obsolete] - public static AsyncOperationHandle LoadAsset(object key) - { - return LoadAssetAsync(key); - } - - - /// - /// Load a single asset - /// - /// The location of the asset. - public static AsyncOperationHandle LoadAssetAsync(IResourceLocation location) - { - return m_Addressables.LoadAssetAsync(location); - } - - /// - /// Load a single asset - /// - /// The key of the location of the asset. - public static AsyncOperationHandle LoadAssetAsync(object key) - { - return m_Addressables.LoadAssetAsync(key); - } - - /// - /// Loads the resource locations specified by the keys. - /// The method will always return success, with a valid IList of results. If nothing matches keys, IList will be empty - /// - /// The set of keys to use. - /// The mode for merging the results of the found locations. - /// The operation handle for the request. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> LoadResourceLocationsAsync(*)", true)] - [Obsolete] - public static AsyncOperationHandle> LoadResourceLocations(IList keys, MergeMode mode, Type type = null) - { - return LoadResourceLocationsAsync(keys, mode, type); - } - - /// - /// Loads the resource locations specified by the keys. - /// The method will always return success, with a valid IList of results. If nothing matches keys, IList will be empty - /// - /// The set of keys to use. - /// The mode for merging the results of the found locations. - /// The operation handle for the request. - public static AsyncOperationHandle> LoadResourceLocationsAsync(IList keys, MergeMode mode, Type type = null) - { - return m_Addressables.LoadResourceLocationsAsync(keys, mode, type); - } - - /// - /// Request the locations for a given key. - /// The method will always return success, with a valid IList of results. If nothing matches key, IList will be empty - /// - /// The key for the locations. - /// The operation handle for the request. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> LoadResourceLocationsAsync(*)", true)] - [Obsolete] - public static AsyncOperationHandle> LoadResourceLocations(object key, Type type = null) - { - return LoadResourceLocationsAsync(key, type); - } - - /// - /// Request the locations for a given key. - /// The method will always return success, with a valid IList of results. If nothing matches key, IList will be empty - /// - /// The key for the locations. - /// The operation handle for the request. - public static AsyncOperationHandle> LoadResourceLocationsAsync(object key, Type type = null) - { - return m_Addressables.LoadResourceLocationsAsync(key, type); - } - - /// - /// Load multiple assets - /// - /// The locations of the assets. - /// Callback Action that is called per load operation. - /// The operation handle for the request. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> LoadAssetsAsync(*)", true)] - [Obsolete] - public static AsyncOperationHandle> LoadAssets(IList locations, Action callback) - { - return LoadAssetsAsync(locations, callback); - } - - /// - /// Load multiple assets - /// - /// The locations of the assets. - /// Callback Action that is called per load operation. - /// The operation handle for the request. - public static AsyncOperationHandle> LoadAssetsAsync(IList locations, Action callback) - { - return m_Addressables.LoadAssetsAsync(locations, callback); - } - - /// - /// Load mutliple assets - /// - /// List of keys for the locations. - /// Callback Action that is called per load operation. - /// Method for merging the results of key matches. See for specifics - /// The operation handle for the request. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> LoadAssetsAsync(*)", true)] - [Obsolete] - public static AsyncOperationHandle> LoadAssets(IList keys, Action callback, MergeMode mode) - { - return LoadAssetsAsync(keys, callback, mode); - } - - /// - /// Load mutliple assets - /// - /// List of keys for the locations. - /// Callback Action that is called per load operation. - /// Method for merging the results of key matches. See for specifics - /// The operation handle for the request. - public static AsyncOperationHandle> LoadAssetsAsync(IList keys, Action callback, MergeMode mode) - { - return m_Addressables.LoadAssetsAsync(keys, callback, mode); - } - - /// - /// Load mutliple assets - /// - /// Key for the locations. - /// Callback Action that is called per load operation. - /// The operation handle for the request. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> LoadAssetsAsync(*)", true)] - [Obsolete] - public static AsyncOperationHandle> LoadAssets(object key, Action callback) - { - return LoadAssetsAsync(key, callback); - } - - /// - /// Load mutliple assets - /// - /// Key for the locations. - /// Callback Action that is called per load operation. - /// The operation handle for the request. - public static AsyncOperationHandle> LoadAssetsAsync(object key, Action callback) - { - return m_Addressables.LoadAssetsAsync(key, callback); - } - - /// - /// Release asset. - /// - /// The type of the object being released - /// The asset to release. - public static void Release(TObject obj) - { - m_Addressables.Release(obj); - } - - /// - /// Release the operation and its associated resources. - /// - /// The type of the AsyncOperationHandle being released - /// The operation handle to release. - public static void Release(AsyncOperationHandle handle) - { - m_Addressables.Release(handle); - } - - /// - /// Release the operation and its associated resources. - /// - /// The operation handle to release. - public static void Release(AsyncOperationHandle handle) - { - m_Addressables.Release(handle); - } - - /// - /// Releases and destroys an object that was created via Addressables.InstantiateAsync. - /// - /// The GameObject instance to be released and destroyed. - /// Returns true if the instance was successfully released. - public static bool ReleaseInstance(GameObject instance) - { - return m_Addressables.ReleaseInstance(instance); - } - - /// - /// Releases and destroys an object that was created via Addressables.InstantiateAsync. - /// - /// The handle to the game object to destroy, that was returned by InstantiateAsync. - /// Returns true if the instance was successfully released. - public static bool ReleaseInstance(AsyncOperationHandle handle) - { - m_Addressables.Release(handle); - return true; - } - - /// - /// Releases and destroys an object that was created via Addressables.InstantiateAsync. - /// - /// The handle to the game object to destroy, that was returned by InstantiateAsync. - /// Returns true if the instance was successfully released. - public static bool ReleaseInstance(AsyncOperationHandle handle) - { - m_Addressables.Release(handle); - return true; - } - - /// - /// Determines the required download size, dependencies included, for the specified . - /// Cached assets require no download and thus their download size will be 0. The Result of the operation - /// is the download size in bytes. - /// - /// The operation handle for the request. - /// The key of the asset(s) to get the download size of. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> GetDownloadSizeAsync(*)", true)] - [Obsolete] - public static AsyncOperationHandle GetDownloadSize(object key) - { - return GetDownloadSizeAsync(key); - } - - /// - /// Determines the required download size, dependencies included, for the specified . - /// Cached assets require no download and thus their download size will be 0. The Result of the operation - /// is the download size in bytes. - /// - /// The operation handle for the request. - /// The key of the asset(s) to get the download size of. - public static AsyncOperationHandle GetDownloadSizeAsync(object key) - { - return m_Addressables.GetDownloadSizeAsync(key); - } - - /// - /// Downloads dependencies of assets marked with the specified label or address. - /// - /// The key of the asset(s) to load dependencies for. - /// The AsyncOperationHandle for the dependency load. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> DownloadDependenciesAsync(*)", true)] - [Obsolete] - public static AsyncOperationHandle DownloadDependencies(object key) - { - return DownloadDependenciesAsync(key); - } - - /// - /// Downloads dependencies of assets marked with the specified label or address. - /// - /// The key of the asset(s) to load dependencies for. - /// The AsyncOperationHandle for the dependency load. - public static AsyncOperationHandle DownloadDependenciesAsync(object key) - { - return m_Addressables.DownloadDependenciesAsync(key); - } - - /// - /// Downloads dependencies of assets at given locations. - /// - /// The locations of the assets. - /// The AsyncOperationHandle for the dependency load. - public static AsyncOperationHandle DownloadDependenciesAsync(IList locations) - { - return m_Addressables.DownloadDependenciesAsync(locations); - } - - /// - /// Downloads dependencies of assets marked with the specified labels or addresses. - /// - /// List of keys for the locations. - /// Method for merging the results of key matches. See for specifics - /// The AsyncOperationHandle for the dependency load. - public static AsyncOperationHandle DownloadDependenciesAsync(IList keys, MergeMode mode) - { - return m_Addressables.DownloadDependenciesAsync(keys, mode); - } - - /// - /// Instantiate a single object. Note that the dependency loading is done asynchronously, but generally the actual instantiate is synchronous. - /// - /// The location of the Object to instantiate. - /// Parent transform for instantiated object. - /// Option to retain world space when instantiated with a parent. - /// If true, Addressables will track this request to allow it to be released via the result object. - /// The operation handle for the request. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> InstantiateAsync(*)", true)] - [Obsolete] - public static AsyncOperationHandle Instantiate(IResourceLocation location, Transform parent = null, bool instantiateInWorldSpace = false, bool trackHandle = true) - { - return InstantiateAsync(location, new InstantiationParameters(parent, instantiateInWorldSpace), trackHandle); - } - - /// - /// Instantiate a single object. Note that the dependency loading is done asynchronously, but generally the actual instantiate is synchronous. - /// - /// The location of the Object to instantiate. - /// The position of the instantiated object. - /// The rotation of the instantiated object. - /// Parent transform for instantiated object. - /// If true, Addressables will track this request to allow it to be released via the result object. - /// The operation handle for the request. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> InstantiateAsync(*)", true)] - [Obsolete] - public static AsyncOperationHandle Instantiate(IResourceLocation location, Vector3 position, Quaternion rotation, Transform parent = null, bool trackHandle = true) - { - return InstantiateAsync(location, position, rotation, parent, trackHandle); - } - - /// - /// Instantiate a single object. Note that the dependency loading is done asynchronously, but generally the actual instantiate is synchronous. - /// - /// The key of the location of the Object to instantiate. - /// Parent transform for instantiated object. - /// Option to retain world space when instantiated with a parent. - /// If true, Addressables will track this request to allow it to be released via the result object. - /// The operation handle for the request. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> InstantiateAsync(*)", true)] - [Obsolete] - public static AsyncOperationHandle Instantiate(object key, Transform parent = null, bool instantiateInWorldSpace = false, bool trackHandle = true) - { - return InstantiateAsync(key, parent, instantiateInWorldSpace, trackHandle); - } - - /// - /// Instantiate a single object. Note that the dependency loading is done asynchronously, but generally the actual instantiate is synchronous. - /// - /// The key of the location of the Object to instantiate. - /// The position of the instantiated object. - /// The rotation of the instantiated object. - /// Parent transform for instantiated object. - /// If true, Addressables will track this request to allow it to be released via the result object. - /// The operation handle for the request. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> InstantiateAsync(*)", true)] - [Obsolete] - public static AsyncOperationHandle Instantiate(object key, Vector3 position, Quaternion rotation, Transform parent = null, bool trackHandle = true) - { - return InstantiateAsync(key, position, rotation, parent, trackHandle); - } - - - /// - /// Instantiate a single object. Note that the dependency loading is done asynchronously, but generally the actual instantiate is synchronous. - /// - /// The key of the location of the Object to instantiate. - /// Parameters for instantiation. - /// If true, Addressables will track this request to allow it to be released via the result object. - /// The operation handle for the request. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> InstantiateAsync(*)", true)] - [Obsolete] - public static AsyncOperationHandle Instantiate(object key, InstantiationParameters instantiateParameters, bool trackHandle = true) - { - return InstantiateAsync(key, instantiateParameters, trackHandle); - } - - /// - /// Instantiate a single object. Note that the dependency loading is done asynchronously, but generally the actual instantiate is synchronous. - /// - /// The location of the Object to instantiate. - /// Parameters for instantiation. - /// If true, Addressables will track this request to allow it to be released via the result object. - /// The operation handle for the request. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> InstantiateAsync(*)", true)] - [Obsolete] - public static AsyncOperationHandle Instantiate(IResourceLocation location, InstantiationParameters instantiateParameters, bool trackHandle = true) - { - return InstantiateAsync(location, instantiateParameters, trackHandle); - } - - /// - /// Instantiate a single object. Note that the dependency loading is done asynchronously, but generally the actual instantiate is synchronous. - /// - /// The location of the Object to instantiate. - /// Parent transform for instantiated object. - /// Option to retain world space when instantiated with a parent. - /// If true, Addressables will track this request to allow it to be released via the result object. - /// The operation handle for the request. - public static AsyncOperationHandle InstantiateAsync(IResourceLocation location, Transform parent = null, bool instantiateInWorldSpace = false, bool trackHandle = true) - { - return m_Addressables.InstantiateAsync(location, new InstantiationParameters(parent, instantiateInWorldSpace), trackHandle); - } - - /// - /// Instantiate a single object. Note that the dependency loading is done asynchronously, but generally the actual instantiate is synchronous. - /// - /// The location of the Object to instantiate. - /// The position of the instantiated object. - /// The rotation of the instantiated object. - /// Parent transform for instantiated object. - /// If true, Addressables will track this request to allow it to be released via the result object. - /// The operation handle for the request. - public static AsyncOperationHandle InstantiateAsync(IResourceLocation location, Vector3 position, Quaternion rotation, Transform parent = null, bool trackHandle = true) - { - return m_Addressables.InstantiateAsync(location, position, rotation, parent, trackHandle); - } - - /// - /// Instantiate a single object. Note that the dependency loading is done asynchronously, but generally the actual instantiate is synchronous. - /// - /// The key of the location of the Object to instantiate. - /// Parent transform for instantiated object. - /// Option to retain world space when instantiated with a parent. - /// If true, Addressables will track this request to allow it to be released via the result object. - /// The operation handle for the request. - public static AsyncOperationHandle InstantiateAsync(object key, Transform parent = null, bool instantiateInWorldSpace = false, bool trackHandle = true) - { - return m_Addressables.InstantiateAsync(key, parent, instantiateInWorldSpace, trackHandle); - } - - /// - /// Instantiate a single object. Note that the dependency loading is done asynchronously, but generally the actual instantiate is synchronous. - /// - /// The key of the location of the Object to instantiate. - /// The position of the instantiated object. - /// The rotation of the instantiated object. - /// Parent transform for instantiated object. - /// If true, Addressables will track this request to allow it to be released via the result object. - /// The operation handle for the request. - public static AsyncOperationHandle InstantiateAsync(object key, Vector3 position, Quaternion rotation, Transform parent = null, bool trackHandle = true) - { - return m_Addressables.InstantiateAsync(key, position, rotation, parent, trackHandle); - } - - - /// - /// Instantiate a single object. Note that the dependency loading is done asynchronously, but generally the actual instantiate is synchronous. - /// - /// The key of the location of the Object to instantiate. - /// Parameters for instantiation. - /// If true, Addressables will track this request to allow it to be released via the result object. - /// The operation handle for the request. - public static AsyncOperationHandle InstantiateAsync(object key, InstantiationParameters instantiateParameters, bool trackHandle = true) - { - return m_Addressables.InstantiateAsync(key, instantiateParameters, trackHandle); - } - - /// - /// Instantiate a single object. Note that the dependency loading is done asynchronously, but generally the actual instantiate is synchronous. - /// - /// The location of the Object to instantiate. - /// Parameters for instantiation. - /// If true, Addressables will track this request to allow it to be released via the result object. - /// The operation handle for the request. - public static AsyncOperationHandle InstantiateAsync(IResourceLocation location, InstantiationParameters instantiateParameters, bool trackHandle = true) - { - return m_Addressables.InstantiateAsync(location, instantiateParameters, trackHandle); - } - - /// - /// Load scene. - /// - /// The key of the location of the scene to load. - /// Scene load mode. - /// If false, the scene will load but not activate (for background loading). The SceneInstance returned has an Activate() method that can be called to do this at a later point. - /// Async operation priority for scene loading. - /// The operation handle for the request. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> LoadSceneAsync(*)", true)] - [Obsolete] - public static AsyncOperationHandle LoadScene(object key, LoadSceneMode loadMode = LoadSceneMode.Single, bool activateOnLoad = true, int priority = 100) - { - return LoadSceneAsync(key, loadMode, activateOnLoad, priority); - } - - /// - /// Load scene. - /// - /// The location of the scene to load. - /// Scene load mode. - /// If false, the scene will load but not activate (for background loading). The SceneInstance returned has an Activate() method that can be called to do this at a later point. - /// Async operation priority for scene loading. - /// The operation handle for the request. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> LoadSceneAsync(*)", true)] - [Obsolete] - public static AsyncOperationHandle LoadScene(IResourceLocation location, LoadSceneMode loadMode = LoadSceneMode.Single, bool activateOnLoad = true, int priority = 100) - { - return LoadSceneAsync(location, loadMode, activateOnLoad, priority); - } - - /// - /// Load scene. - /// - /// The key of the location of the scene to load. - /// Scene load mode. - /// If false, the scene will load but not activate (for background loading). The SceneInstance returned has an Activate() method that can be called to do this at a later point. - /// Async operation priority for scene loading. - /// The operation handle for the request. - public static AsyncOperationHandle LoadSceneAsync(object key, LoadSceneMode loadMode = LoadSceneMode.Single, bool activateOnLoad = true, int priority = 100) - { - return m_Addressables.LoadSceneAsync(key, loadMode, activateOnLoad, priority); - } - - /// - /// Load scene. - /// - /// The location of the scene to load. - /// Scene load mode. - /// If false, the scene will load but not activate (for background loading). The SceneInstance returned has an Activate() method that can be called to do this at a later point. - /// Async operation priority for scene loading. - /// The operation handle for the request. - public static AsyncOperationHandle LoadSceneAsync(IResourceLocation location, LoadSceneMode loadMode = LoadSceneMode.Single, bool activateOnLoad = true, int priority = 100) - { - return m_Addressables.LoadSceneAsync(location, loadMode, activateOnLoad, priority); - } - - - /// - /// Release scene - /// - /// The SceneInstance to release. - /// If true, the handle will be released automatically when complete. - /// The operation handle for the request. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> UnloadSceneAsync(*)", true)] - [Obsolete] - public static AsyncOperationHandle UnloadScene(SceneInstance scene, bool autoReleaseHandle = true) - { - return UnloadSceneAsync(scene, autoReleaseHandle); - } - - /// - /// Release scene - /// - /// The handle returned by LoadSceneAsync for the scene to release. - /// If true, the handle will be released automatically when complete. - /// The operation handle for the request. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> UnloadSceneAsync(*)", true)] - [Obsolete] - public static AsyncOperationHandle UnloadScene(AsyncOperationHandle handle, bool autoReleaseHandle = true) - { - return UnloadSceneAsync(handle, autoReleaseHandle); - } - - /// - /// Release scene - /// - /// The handle returned by LoadSceneAsync for the scene to release. - /// If true, the handle will be released automatically when complete. - /// The operation handle for the request. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> UnloadSceneAsync(*)", true)] - [Obsolete] - public static AsyncOperationHandle UnloadScene(AsyncOperationHandle handle, bool autoReleaseHandle = true) - { - return UnloadSceneAsync(handle, autoReleaseHandle); - } - - /// - /// Release scene - /// - /// The SceneInstance to release. - /// If true, the handle will be released automatically when complete. - /// The operation handle for the request. - public static AsyncOperationHandle UnloadSceneAsync(SceneInstance scene, bool autoReleaseHandle = true) - { - return m_Addressables.UnloadSceneAsync(scene, autoReleaseHandle); - } - - /// - /// Release scene - /// - /// The handle returned by LoadSceneAsync for the scene to release. - /// If true, the handle will be released automatically when complete. - /// The operation handle for the request. - public static AsyncOperationHandle UnloadSceneAsync(AsyncOperationHandle handle, bool autoReleaseHandle = true) - { - return m_Addressables.UnloadSceneAsync(handle, autoReleaseHandle); - } - - /// - /// Release scene - /// - /// The handle returned by LoadSceneAsync for the scene to release. - /// If true, the handle will be released automatically when complete. - /// The operation handle for the request. - public static AsyncOperationHandle UnloadSceneAsync(AsyncOperationHandle handle, bool autoReleaseHandle = true) - { - return m_Addressables.UnloadSceneAsync(handle, autoReleaseHandle); - } - } - -} - diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Addressables.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Addressables.cs.meta deleted file mode 100644 index fcf989bc..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Addressables.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ae38715d198830145a8bf7fa7adf9ee1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/AddressablesImpl.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/AddressablesImpl.cs deleted file mode 100644 index ea13100f..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/AddressablesImpl.cs +++ /dev/null @@ -1,758 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Runtime.CompilerServices; -using UnityEngine.AddressableAssets.Initialization; -using UnityEngine.AddressableAssets.ResourceLocators; -using UnityEngine.ResourceManagement; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.ResourceProviders; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.SceneManagement; - -#if UNITY_EDITOR -[assembly: InternalsVisibleTo("Unity.Addressables.Editor.Tests")] -#endif -[assembly: InternalsVisibleTo("Unity.Addressables.Tests")] -namespace UnityEngine.AddressableAssets -{ - - internal class AddressablesImpl - { - ResourceManager m_ResourceManager; - IInstanceProvider m_InstanceProvider; - public IInstanceProvider InstanceProvider - { - get - { - return m_InstanceProvider; - } - set - { - m_InstanceProvider = value; - var rec = m_InstanceProvider as IUpdateReceiver; - if (rec != null) - m_ResourceManager.AddUpdateReceiver(rec); - } - } - public ISceneProvider SceneProvider; - public ResourceManager ResourceManager - { - get - { - if (m_ResourceManager == null) - m_ResourceManager = new ResourceManager(new DefaultAllocationStrategy()); - return m_ResourceManager; - } - } - - List m_ResourceLocators = new List(); - AsyncOperationHandle m_InitializationOperation; - - Action m_OnHandleCompleteAction; - Action> m_OnSceneHandleCompleteAction; - Action m_OnHandleDestroyedAction; - Dictionary m_resultToHandle = new Dictionary(); - HashSet> m_SceneInstances = new HashSet>(); - - internal int SceneOperationCount { get { return m_SceneInstances.Count; } } - internal int TrackedHandleCount { get { return m_resultToHandle.Count; } } - - - public AddressablesImpl(IAllocationStrategy alloc) - { - m_ResourceManager = new ResourceManager(alloc); - SceneManager.sceneUnloaded += OnSceneUnloaded; - } - - private void OnSceneUnloaded(Scene scene) - { - foreach (var s in m_SceneInstances) - { - if (!s.IsValid()) - { - m_SceneInstances.Remove(s); - break; - } - if (s.Result.Scene == scene) - { - m_SceneInstances.Remove(s); - m_resultToHandle.Remove(s.Result); - m_ResourceManager.ReleaseScene(SceneProvider, s); - break; - } - } - m_ResourceManager.CleanupSceneInstances(scene); - } - - public string StreamingAssetsSubFolder - { - get - { - return "aa"; - } - } - - public string BuildPath - { - get { return "Library/com.unity.addressables/StreamingAssetsCopy/" + StreamingAssetsSubFolder + "/" + PlatformMappingService.GetPlatform(); } - } - - public string PlayerBuildDataPath - { - get - { - return Application.streamingAssetsPath + "/" + StreamingAssetsSubFolder + "/" + - PlatformMappingService.GetPlatform(); - } - } - - public string RuntimePath - { - get - { -#if UNITY_EDITOR - return BuildPath; -#else - return PlayerBuildDataPath; -#endif - } - } - - public void Log(string msg) - { - Debug.Log(msg); - } - - public void LogFormat(string format, params object[] args) - { - Debug.LogFormat(format, args); - } - - public void LogWarning(string msg) - { - Debug.LogWarning(msg); - } - - public void LogWarningFormat(string format, params object[] args) - { - Debug.LogWarningFormat(format, args); - } - - public void LogError(string msg) - { - Debug.LogError(msg); - } - - public void LogException(AsyncOperationHandle op, Exception ex) - { - Debug.LogErrorFormat("{0} encountered in operation {1}: {2}", ex.GetType().Name, op.DebugName, ex.Message); - } - - public void LogErrorFormat(string format, params object[] args) - { - Debug.LogErrorFormat(format, args); - } - - public string ResolveInternalId(string id) - { - var path = AddressablesRuntimeProperties.EvaluateString(id); -#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN || UNITY_XBOXONE - if (path.Length >= 260 && path.StartsWith(Application.dataPath)) - path = path.Substring(Application.dataPath.Length + 1); -#endif - return path; - } - - public IList ResourceLocators - { - get - { - return m_ResourceLocators; - } - } - - internal bool GetResourceLocations(object key, Type type, out IList locations) - { - key = EvaluateKey(key); - - locations = null; - HashSet current = null; - foreach (var l in m_ResourceLocators) - { - IList locs; - if (l.Locate(key, type, out locs)) - { - if (locations == null) - { - //simple, common case, no allocations - locations = locs; - } - else - { - //less common, need to merge... - if (current == null) - { - current = new HashSet(); - foreach (var loc in locations) - current.Add(loc); - } - - current.UnionWith(locs); - } - } - } - - if (current == null) - return locations != null; - - locations = new List(current); - return true; - } - - internal bool GetResourceLocations(IEnumerable keys, Type type, Addressables.MergeMode merge, out IList locations) - { - locations = null; - HashSet current = null; - foreach (var key in keys) - { - IList locs; - if (GetResourceLocations(key, type, out locs)) - { - if (locations == null) - { - locations = locs; - if (merge == Addressables.MergeMode.UseFirst) - return true; - } - else - { - if (current == null) - { - current = new HashSet(); - foreach (var loc in locations) - current.Add(loc); - } - - if (merge == Addressables.MergeMode.Intersection) - current.IntersectWith(locs); - else if (merge == Addressables.MergeMode.Union) - current.UnionWith(locs); - } - } - else - { - //if entries for a key are not found, the intersection is empty - if (merge == Addressables.MergeMode.Intersection) - { - locations = null; - return false; - } - } - } - - if (current == null) - return locations != null; - if (current.Count == 0) - { - locations = null; - return false; - } - locations = new List(current); - return true; - } - - public AsyncOperationHandle InitializeAsync(string runtimeDataPath, string providerSuffix = null) - { - //these need to be referenced in order to prevent stripping on IL2CPP platforms. - if (string.IsNullOrEmpty(Application.streamingAssetsPath)) - Debug.LogWarning("Application.streamingAssetsPath has been stripped!"); -#if !UNITY_SWITCH - if (string.IsNullOrEmpty(Application.persistentDataPath)) - Debug.LogWarning("Application.persistentDataPath has been stripped!"); -#endif - if (string.IsNullOrEmpty(runtimeDataPath)) - return ResourceManager.CreateCompletedOperation(null, string.Format("Invalid Key: {0}", runtimeDataPath)); - - m_OnHandleCompleteAction = OnHandleCompleted; - m_OnSceneHandleCompleteAction = OnSceneHandleCompleted; - m_OnHandleDestroyedAction = OnHandleDestroyed; - m_InitializationOperation = Initialization.InitializationOperation.CreateInitializationOperation(this, runtimeDataPath, providerSuffix); - m_InitializationOperation.Completed += (x) => ResourceManager.ExceptionHandler = LogException; - - return m_InitializationOperation; - } - - public AsyncOperationHandle InitializeAsync() - { - if (!m_InitializationOperation.IsValid()) - return InitializeAsync(ResolveInternalId(PlayerPrefs.GetString(Addressables.kAddressablesRuntimeDataPath, RuntimePath + "/settings.json"))); - return m_InitializationOperation; - } - - public AsyncOperationHandle LoadContentCatalogAsync(string catalogPath, string providerSuffix = null) - { - var catalogLoc = new ResourceLocationBase(catalogPath, catalogPath, typeof(JsonAssetProvider).FullName, typeof(IResourceLocator)); - if (!InitializationOperation.IsDone) - return ResourceManager.CreateChainOperation(InitializationOperation, op => LoadContentCatalogAsync(catalogPath, providerSuffix)); - return Initialization.InitializationOperation.LoadContentCatalog(this, catalogLoc, providerSuffix); - } - - public AsyncOperationHandle InitializationOperation - { - get - { - if (!m_InitializationOperation.IsValid()) - InitializeAsync(); - return m_InitializationOperation; - } - } - AsyncOperationHandle TrackHandle(AsyncOperationHandle handle) - { - handle.Completed += m_OnSceneHandleCompleteAction; - return handle; - } - - AsyncOperationHandle TrackHandle(AsyncOperationHandle handle) - { - handle.CompletedTypeless += m_OnHandleCompleteAction; - return handle; - } - - AsyncOperationHandle TrackHandle(AsyncOperationHandle handle) - { - handle.Completed += m_OnHandleCompleteAction; - return handle; - } - internal void ClearTrackHandles() - { - m_resultToHandle.Clear(); - } - - public AsyncOperationHandle LoadAssetAsync(IResourceLocation location) - { - return TrackHandle(ResourceManager.ProvideResource(location)); - } - - AsyncOperationHandle LoadAssetWithChain(object key) - { - return ResourceManager.CreateChainOperation(InitializationOperation, op => LoadAssetAsync(key)); - } - - public AsyncOperationHandle LoadAssetAsync(object key) - { - if (!InitializationOperation.IsDone) - return LoadAssetWithChain(key); - - key = EvaluateKey(key); - - IList locs; - var t = typeof(TObject); - if (t.IsArray) - t = t.GetElementType(); - else if (t.IsGenericType && typeof(IList<>) == t.GetGenericTypeDefinition()) - t = t.GetGenericArguments()[0]; - for (int i = 0; i < m_ResourceLocators.Count; i++) - { - if (m_ResourceLocators[i].Locate(key, t, out locs)) - { - foreach (var loc in locs) - { - var provider = ResourceManager.GetResourceProvider(typeof(TObject), loc); - if (provider != null) - return TrackHandle(ResourceManager.ProvideResource(loc)); - } - } - } - return ResourceManager.CreateCompletedOperation(default(TObject), new InvalidKeyException(key).Message); - } - - class LoadResourceLocationKeyOp : AsyncOperationBase> - { - object m_Key; - IList m_locations; - AddressablesImpl m_Addressables; - Type m_ResourceType; - protected override string DebugName { get { return m_Key.ToString(); } } - - public void Init(AddressablesImpl aa, Type t, object key) - { - m_Key = key; - m_ResourceType = t; - m_Addressables = aa; - } - protected override void Execute() - { - m_Addressables.GetResourceLocations(m_Key, m_ResourceType, out m_locations); - if (m_locations == null) - m_locations = new List(); - Complete(m_locations, true, string.Empty); - } - } - - class LoadResourceLocationKeysOp : AsyncOperationBase> - { - IList m_Key; - Addressables.MergeMode m_MergeMode; - IList m_locations; - AddressablesImpl m_Addressables; - Type m_ResourceType; - - protected override string DebugName { get { return "LoadResourceLocationKeysOp"; } } - public void Init(AddressablesImpl aa, Type t, IList key, Addressables.MergeMode mergeMode) - { - m_Key = key; - m_ResourceType = t; - m_MergeMode = mergeMode; - m_Addressables = aa; - } - protected override void Execute() - { - m_Addressables.GetResourceLocations(m_Key, m_ResourceType, m_MergeMode, out m_locations); - if (m_locations == null) - m_locations = new List(); - Complete(m_locations, true, string.Empty); - } - } - - public AsyncOperationHandle> LoadResourceLocationsAsync(IList keys, Addressables.MergeMode mode, Type type = null) - { - var op = new LoadResourceLocationKeysOp(); - op.Init(this, type, keys, mode); - return TrackHandle(ResourceManager.StartOperation(op, InitializationOperation)); - } - - public AsyncOperationHandle> LoadResourceLocationsAsync(object key, Type type = null) - { - var op = new LoadResourceLocationKeyOp(); - op.Init(this, type, key); - return TrackHandle(ResourceManager.StartOperation(op, InitializationOperation)); - } - - public AsyncOperationHandle> LoadAssetsAsync(IList locations, Action callback) - { - return TrackHandle(ResourceManager.ProvideResources(locations, callback)); - } - - AsyncOperationHandle> LoadAssetsWithChain(IList keys, Action callback, Addressables.MergeMode mode) - { - return ResourceManager.CreateChainOperation(InitializationOperation, op => LoadAssetsAsync(keys, callback, mode)); - } - - public AsyncOperationHandle> LoadAssetsAsync(IList keys, Action callback, Addressables.MergeMode mode) - { - if (!InitializationOperation.IsDone) - return LoadAssetsWithChain(keys, callback, mode); - - IList locations; - if (!GetResourceLocations(keys, typeof(TObject), mode, out locations)) - return ResourceManager.CreateCompletedOperation>(null, new InvalidKeyException(keys).Message); - - return LoadAssetsAsync(locations, callback); - } - - AsyncOperationHandle> LoadAssetsWithChain(object key, Action callback) - { - return ResourceManager.CreateChainOperation(InitializationOperation, op2 => LoadAssetsAsync(key, callback)); - } - - public AsyncOperationHandle> LoadAssetsAsync(object key, Action callback) - { - if (!InitializationOperation.IsDone) - return LoadAssetsWithChain(key, callback); - - IList locations; - if (!GetResourceLocations(key, typeof(TObject), out locations)) - return ResourceManager.CreateCompletedOperation>(null, new InvalidKeyException(key).Message); - - return LoadAssetsAsync(locations, callback); - } - - void OnHandleDestroyed(AsyncOperationHandle handle) - { - if (handle.Status == AsyncOperationStatus.Succeeded) - { - m_resultToHandle.Remove(handle.Result); - } - } - - void OnSceneHandleCompleted(AsyncOperationHandle handle) - { - if (handle.Status == AsyncOperationStatus.Succeeded) - { - m_SceneInstances.Add(handle); - if (!m_resultToHandle.ContainsKey(handle.Result)) - { - handle.Destroyed += m_OnHandleDestroyedAction; - m_resultToHandle.Add(handle.Result, handle); - } - } - } - - void OnHandleCompleted(AsyncOperationHandle handle) - { - if (handle.Status == AsyncOperationStatus.Succeeded) - { - if (!m_resultToHandle.ContainsKey(handle.Result)) - { - handle.Destroyed += m_OnHandleDestroyedAction; - m_resultToHandle.Add(handle.Result, handle); - } - } - } - - public void Release(TObject obj) - { - if (obj == null) - { - LogWarning("Addressables.Release() - trying to release null object."); - return; - } - - AsyncOperationHandle handle; - if (m_resultToHandle.TryGetValue(obj, out handle)) - Release(handle); - else - { - LogError("Addressables.Release was called on an object that Addressables was not previously aware of. Thus nothing is being released"); - } - } - - public void Release(AsyncOperationHandle handle) - { - m_ResourceManager.Release(handle); - } - - public void Release(AsyncOperationHandle handle) - { - m_ResourceManager.Release(handle); - } - - AsyncOperationHandle GetDownloadSizeWithChain(object key) - { - return ResourceManager.CreateChainOperation(InitializationOperation, op => GetDownloadSizeAsync(key)); - } - public AsyncOperationHandle GetDownloadSizeAsync(object key) - { - if (!InitializationOperation.IsDone) - return GetDownloadSizeWithChain(key); - - IList locations; - if (typeof(IList).IsAssignableFrom(key.GetType())) - locations = key as IList; - else if (typeof(IResourceLocation).IsAssignableFrom(key.GetType())) - { - locations = new List(1); - locations.Add(key as IResourceLocation); - } - else - { - if (!GetResourceLocations(key, typeof(object), out locations)) - return ResourceManager.CreateCompletedOperation(0, new InvalidKeyException(key).Message); - } - - var locHash = new HashSet(); - foreach (var loc in locations) - { - if (loc.HasDependencies) - { - foreach (var dep in loc.Dependencies) - locHash.Add(dep); - } - } - - long size = 0; - foreach (var d in locHash) - { - var sizeData = d.Data as ILocationSizeData; - if (sizeData != null) - size += sizeData.ComputeSize(d); - } - return ResourceManager.CreateCompletedOperation(size, string.Empty); - } - - public AsyncOperationHandle DownloadDependenciesAsync(object key) - { - if (!InitializationOperation.IsDone) - return ResourceManager.CreateChainOperation>(InitializationOperation, op => DownloadDependenciesAsync(key).Convert>()); - - IList locations; - if (!GetResourceLocations(key, typeof(object), out locations)) - return ResourceManager.CreateCompletedOperation>(null, new InvalidKeyException(key).Message); - - - var locHash = new HashSet(); - foreach (var loc in locations) - { - if (loc.HasDependencies) - { - foreach (var dep in loc.Dependencies) - locHash.Add(dep); - } - } - return LoadAssetsAsync(new List(locHash), null); - } - - - public AsyncOperationHandle DownloadDependenciesAsync(IList locations) - { - if (!InitializationOperation.IsDone) - return ResourceManager.CreateChainOperation>(InitializationOperation, op => DownloadDependenciesAsync(locations).Convert>()); - - var locHash = new HashSet(); - foreach (var loc in locations) - { - if (loc.HasDependencies) - { - foreach (var dep in loc.Dependencies) - locHash.Add(dep); - } - } - return LoadAssetsAsync(new List(locHash), null); - } - - - public AsyncOperationHandle DownloadDependenciesAsync(IList keys, Addressables.MergeMode mode) - { - if (!InitializationOperation.IsDone) - return ResourceManager.CreateChainOperation>(InitializationOperation, op => DownloadDependenciesAsync(keys, mode).Convert>()); - - IList locations; - if (!GetResourceLocations(keys, typeof(object), mode, out locations)) - return ResourceManager.CreateCompletedOperation>(null, new InvalidKeyException(keys).Message); - - - var locHash = new HashSet(); - foreach (var loc in locations) - { - if (loc.HasDependencies) - { - foreach (var dep in loc.Dependencies) - locHash.Add(dep); - } - } - return LoadAssetsAsync(new List(locHash), null); - } - - public AsyncOperationHandle InstantiateAsync(IResourceLocation location, Transform parent = null, bool instantiateInWorldSpace = false, bool trackHandle = true) - { - return InstantiateAsync(location, new InstantiationParameters(parent, instantiateInWorldSpace), trackHandle); - } - public AsyncOperationHandle InstantiateAsync(IResourceLocation location, Vector3 position, Quaternion rotation, Transform parent = null, bool trackHandle = true) - { - return InstantiateAsync(location, new InstantiationParameters(position, rotation, parent), trackHandle); - } - public AsyncOperationHandle InstantiateAsync(object key, Transform parent = null, bool instantiateInWorldSpace = false, bool trackHandle = true) - { - return InstantiateAsync(key, new InstantiationParameters(parent, instantiateInWorldSpace), trackHandle); - } - - public AsyncOperationHandle InstantiateAsync(object key, Vector3 position, Quaternion rotation, Transform parent = null, bool trackHandle = true) - { - return InstantiateAsync(key, new InstantiationParameters(position, rotation, parent), trackHandle); - } - - AsyncOperationHandle InstantiateWithChain(object key, InstantiationParameters instantiateParameters, bool trackHandle = true) - { - return ResourceManager.CreateChainOperation(InitializationOperation, op => InstantiateAsync(key, instantiateParameters, trackHandle)); - } - - public AsyncOperationHandle InstantiateAsync(object key, InstantiationParameters instantiateParameters, bool trackHandle = true) - { - if (!InitializationOperation.IsDone) - return InstantiateWithChain(key, instantiateParameters, trackHandle); - - key = EvaluateKey(key); - IList locs; - for (int i = 0; i < m_ResourceLocators.Count; i++) - { - if (m_ResourceLocators[i].Locate(key, typeof(GameObject), out locs)) - return InstantiateAsync(locs[0], instantiateParameters, trackHandle); - } - return ResourceManager.CreateCompletedOperation(null, new InvalidKeyException(key).Message); - } - - public AsyncOperationHandle InstantiateAsync(IResourceLocation location, InstantiationParameters instantiateParameters, bool trackHandle = true) - { - var opHandle = ResourceManager.ProvideInstance(InstanceProvider, location, instantiateParameters); - if (!trackHandle) - return opHandle; - opHandle.CompletedTypeless += m_OnHandleCompleteAction; - return opHandle; - } - - public bool ReleaseInstance(GameObject instance) - { - if (instance == null) - { - LogWarning("Addressables.ReleaseInstance() - trying to release null object."); - return false; - } - - AsyncOperationHandle handle; - if (m_resultToHandle.TryGetValue(instance, out handle)) - Release(handle); - else - return false; - - return true; - } - - - AsyncOperationHandle LoadSceneWithChain(object key, LoadSceneMode loadMode = LoadSceneMode.Single, bool activateOnLoad = true, int priority = 100) - { - return ResourceManager.CreateChainOperation(InitializationOperation, op => LoadSceneAsync(key, loadMode, activateOnLoad, priority)); - } - - public AsyncOperationHandle LoadSceneAsync(object key, LoadSceneMode loadMode = LoadSceneMode.Single, bool activateOnLoad = true, int priority = 100) - { - if (!InitializationOperation.IsDone) - return LoadSceneWithChain(key, loadMode, activateOnLoad, priority); - - IList locations; - if (!GetResourceLocations(key, typeof(SceneInstance), out locations)) - return ResourceManager.CreateCompletedOperation(default(SceneInstance), new InvalidKeyException(key).Message); - - return LoadSceneAsync(locations[0], loadMode, activateOnLoad, priority); - } - - public AsyncOperationHandle LoadSceneAsync(IResourceLocation location, LoadSceneMode loadMode = LoadSceneMode.Single, bool activateOnLoad = true, int priority = 100) - { - return TrackHandle(ResourceManager.ProvideScene(SceneProvider, location, loadMode, activateOnLoad, priority)); - } - - public AsyncOperationHandle UnloadSceneAsync(SceneInstance scene, bool autoReleaseHandle = true) - { - AsyncOperationHandle handle; - if (!m_resultToHandle.TryGetValue(scene, out handle)) - { - var msg = string.Format("Addressables.UnloadSceneAsync() - Cannot find handle for scene {0}", scene); - LogWarning(msg); - return ResourceManager.CreateCompletedOperation(scene, msg); - } - - return UnloadSceneAsync(handle, autoReleaseHandle); - } - - public AsyncOperationHandle UnloadSceneAsync(AsyncOperationHandle handle, bool autoReleaseHandle = true) - { - return UnloadSceneAsync(handle.Convert(), autoReleaseHandle); - } - - public AsyncOperationHandle UnloadSceneAsync(AsyncOperationHandle handle, bool autoReleaseHandle = true) - { - var relOp = ResourceManager.ReleaseScene(SceneProvider, handle); - if (autoReleaseHandle) - relOp.Completed += op => Release(op); - return relOp; - } - - private object EvaluateKey(object obj) - { - if (obj is IKeyEvaluator) - return (obj as IKeyEvaluator).RuntimeKey; - return obj; - } - } -} - diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/AddressablesImpl.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/AddressablesImpl.cs.meta deleted file mode 100644 index d2a6ec17..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/AddressablesImpl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7b6713137edb6b2439d3ff26eb990180 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/AssetLabelReference.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/AssetLabelReference.cs deleted file mode 100644 index c44b10e2..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/AssetLabelReference.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using UnityEngine.Serialization; - -namespace UnityEngine.AddressableAssets -{ - /// - /// Reference to an asset label. This class can be used in scripts as a field and will use a CustomPropertyDrawer to provide a DropDown UI of available labels. - /// - [Serializable] - public class AssetLabelReference : IKeyEvaluator - { - [FormerlySerializedAs("m_labelString")] - [SerializeField] - string m_LabelString; - /// - /// The label string. - /// - public string labelString - { - get { return m_LabelString; } - set { m_LabelString = value; } - } - /// - /// The runtime key used for indexing values in the Addressables system. - /// - public object RuntimeKey - { - get - { - if (labelString == null) - labelString = string.Empty; - return labelString; - } - } - - /// - public bool RuntimeKeyIsValid() - { - return !string.IsNullOrEmpty(RuntimeKey.ToString()); - } - - /// - /// Get the hash code of this object. - /// - /// The hash code of the label string. - public override int GetHashCode() - { - return labelString.GetHashCode(); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/AssetLabelReference.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/AssetLabelReference.cs.meta deleted file mode 100644 index f5ae067f..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/AssetLabelReference.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7dc6ecd1c26fdf7479e71472994d72db -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/AssetReference.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/AssetReference.cs deleted file mode 100644 index e0080bfa..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/AssetReference.cs +++ /dev/null @@ -1,397 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using UnityEditor; -using UnityEngine.AddressableAssets.ResourceLocators; -using UnityEngine.ResourceManagement; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.ResourceProviders; -using UnityEngine.Serialization; - -namespace UnityEngine.AddressableAssets -{ - /// - /// Generic version of AssetReference class. This should not be used directly as CustomPropertyDrawers do not support generic types. Instead use the concrete derived classes such as AssetReferenceGameObject. - /// - /// - public class AssetReferenceT : AssetReference - { - - /// - /// Construct a new AssetReference object. - /// - /// The guid of the asset. - public AssetReferenceT(string guid) : base(guid) - { - } - - /// - /// Load the referenced asset as type TObject. - /// - /// The load operation. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> LoadAssetAsync(*)", true)] - [Obsolete] - public AsyncOperationHandle LoadAsset() - { - return LoadAssetAsync(); - } - - /// - /// Load the referenced asset as type TObject. - /// - /// The load operation. - public AsyncOperationHandle LoadAssetAsync() - { - return LoadAssetAsync(); - } - - /// - public override bool ValidateAsset(Object obj) - { - var type = obj.GetType(); - return typeof(TObject).IsAssignableFrom(type); - } - - /// - public override bool ValidateAsset(string path) - { -#if UNITY_EDITOR - var type = AssetDatabase.GetMainAssetTypeAtPath(path); - return typeof(TObject).IsAssignableFrom(type); -#else - return false; -#endif - } - - } - - /// - /// GameObject only asset reference. - /// - [Serializable] - public class AssetReferenceGameObject : AssetReferenceT - { - public AssetReferenceGameObject(string guid) : base(guid) { } - } - /// - /// Texture only asset reference. - /// - [Serializable] - public class AssetReferenceTexture : AssetReferenceT - { - public AssetReferenceTexture(string guid) : base(guid) { } - } - /// - /// Texture2D only asset reference. - /// - [Serializable] - public class AssetReferenceTexture2D : AssetReferenceT - { - public AssetReferenceTexture2D(string guid) : base(guid) { } - } - /// - /// Texture3D only asset reference - /// - [Serializable] - public class AssetReferenceTexture3D : AssetReferenceT - { - public AssetReferenceTexture3D(string guid) : base(guid) { } - } - - /// - /// Sprite only asset reference. - /// - [Serializable] - public class AssetReferenceSprite : AssetReferenceT - { - public AssetReferenceSprite(string guid) : base(guid) { } - - /// - public override bool ValidateAsset(string path) - { -#if UNITY_EDITOR - var type = AssetDatabase.GetMainAssetTypeAtPath(path); - bool isTexture = typeof(Texture2D).IsAssignableFrom(type); - if (isTexture) - { - var importer = AssetImporter.GetAtPath(path) as TextureImporter; - return (importer != null) && (importer.spriteImportMode != SpriteImportMode.None); - } -#endif - return false; - } - } - - /// - /// Reference to an addressable asset. This can be used in script to provide fields that can be easily set in the editor and loaded dynamically at runtime. - /// To determine if the reference is set, use RuntimeKeyIsValid(). - /// - [Serializable] - public class AssetReference : IKeyEvaluator - { - [FormerlySerializedAs("m_assetGUID")] - [SerializeField] - string m_AssetGUID = ""; - AsyncOperationHandle m_Operation; - /// - /// The actual key used to request the asset at runtime. RuntimeKeyIsValid() can be used to determine if this reference was set. - /// - public object RuntimeKey - { - get - { - if (m_AssetGUID == null) - m_AssetGUID = string.Empty; - return m_AssetGUID; - } - } - - /// - /// Construct a new AssetReference object. - /// - public AssetReference() - { - } - - /// - /// Construct a new AssetReference object. - /// - /// The guid of the asset. - public AssetReference(string guid) - { - m_AssetGUID = guid; - } - - /// - /// The loaded asset. This value is only set after the AsyncOperationHandle returned from LoadAssetAsync completes. It will not be set if only InstantiateAsync is called. It will be set to null if release is called. - /// - public Object Asset - { - get - { - if (!m_Operation.IsValid()) - return null; - - return m_Operation.Result as Object; - } - } - -#if UNITY_EDITOR - Object m_CachedAsset; -#endif - /// - /// String representation of asset reference. - /// - /// The asset guid as a string. - public override string ToString() - { -#if UNITY_EDITOR - return "[" + m_AssetGUID + "]" + m_CachedAsset; -#else - return "[" + m_AssetGUID + "]"; -#endif - } - - /// - /// Load the referenced asset as type TObject. - /// - /// The object type. - /// The load operation. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> LoadAssetAsync(*)", true)] - [Obsolete] - public AsyncOperationHandle LoadAsset() - { - return LoadAssetAsync(); - } - - /// - /// Loads the reference as a scene. - /// - /// The operation handle for the scene load. - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> LoadSceneAsync(*)", true)] - [Obsolete] - public AsyncOperationHandle LoadScene() - { - return LoadSceneAsync(); - } - /// - /// InstantiateAsync the referenced asset as type TObject. - /// - /// Position of the instantiated object. - /// Rotation of the instantiated object. - /// The parent of the instantiated object. - /// - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> InstantiateAsync(*)", true)] - [Obsolete] - public AsyncOperationHandle Instantiate(Vector3 position, Quaternion rotation, Transform parent = null) - { - return InstantiateAsync(position, rotation, parent); - } - - /// - /// InstantiateAsync the referenced asset as type TObject. - /// - /// The object type. - /// The parent of the instantiated object. - /// Option to retain world space when instantiated with a parent. - /// - //[Obsolete("We have added Async to the name of all asycn methods (UnityUpgradable) -> InstantiateAsync(*)", true)] - [Obsolete] - public AsyncOperationHandle Instantiate(Transform parent = null, bool instantiateInWorldSpace = false) - { - return InstantiateAsync(parent, instantiateInWorldSpace); - } - - /// - /// Load the referenced asset as type TObject. - /// - /// The object type. - /// The load operation. - public AsyncOperationHandle LoadAssetAsync() - { - AsyncOperationHandle result = Addressables.LoadAssetAsync(RuntimeKey); - m_Operation = result; - return result; - } - - /// - /// Loads the reference as a scene. - /// - /// The operation handle for the scene load. - public AsyncOperationHandle LoadSceneAsync() - { - var result = Addressables.LoadSceneAsync(RuntimeKey); - m_Operation = result; - return result; - } - /// - /// InstantiateAsync the referenced asset as type TObject. - /// - /// Position of the instantiated object. - /// Rotation of the instantiated object. - /// The parent of the instantiated object. - /// - public AsyncOperationHandle InstantiateAsync(Vector3 position, Quaternion rotation, Transform parent = null) - { - return Addressables.InstantiateAsync(RuntimeKey, position, rotation, parent, true); - } - - /// - /// InstantiateAsync the referenced asset as type TObject. - /// - /// The object type. - /// The parent of the instantiated object. - /// Option to retain world space when instantiated with a parent. - /// - public AsyncOperationHandle InstantiateAsync(Transform parent = null, bool instantiateInWorldSpace = false) - { - return Addressables.InstantiateAsync(RuntimeKey, parent, instantiateInWorldSpace, true); - } - - /// - public bool RuntimeKeyIsValid() - { - Guid result; - return Guid.TryParse(RuntimeKey.ToString(), out result); - } - - /// - /// Release the internal operation handle. - /// - public void ReleaseAsset() - { - if (!m_Operation.IsValid()) - { - Debug.LogWarning("Cannot release a null or unloaded asset."); - return; - } - Addressables.Release(m_Operation); - m_Operation = default(AsyncOperationHandle); - } - - - /// - /// Release an instantiated object. - /// - /// The object to release. - public void ReleaseInstance(GameObject obj) - { - Addressables.ReleaseInstance(obj); - } - - /// - /// Validates that the referenced asset allowable for this asset reference. - /// - /// The Object to validate. - /// Whether the referenced asset is valid. - public virtual bool ValidateAsset(Object obj) - { - return true; - } - - /// - /// Validates that the referenced asset allowable for this asset reference. - /// - /// The path to the asset in question. - /// Whether the referenced asset is valid. - public virtual bool ValidateAsset(string path) - { - return true; - } - -#if UNITY_EDITOR - - /// - /// Used by the editor to represent the asset referenced. - /// - public Object editorAsset - { - get - { - if (m_CachedAsset != null || string.IsNullOrEmpty(m_AssetGUID)) - return m_CachedAsset; - var assetPath = AssetDatabase.GUIDToAssetPath(m_AssetGUID); - var mainType = AssetDatabase.GetMainAssetTypeAtPath(assetPath); - return (m_CachedAsset = AssetDatabase.LoadAssetAtPath(assetPath, mainType)); - } - } - /// - /// Sets the asset on the AssetReference. Only valid in the editor, this sets both the editorAsset attribute, - /// and the internal asset GUID, which drives the RuntimeKey attribute. - /// Object to reference - /// - public bool SetEditorAsset(Object value) - { - if(value == null) - { - m_CachedAsset = null; - m_AssetGUID = string.Empty; - return true; - } - - if (m_CachedAsset != value) - { - var path = AssetDatabase.GetAssetOrScenePath(value); - if (string.IsNullOrEmpty(path)) - { - Addressables.LogWarningFormat("Invalid object for AssetReference {0}.", value); - return false; - } - if (!ValidateAsset(path)) - { - Addressables.LogWarningFormat("Invalid asset for AssetReference path = '{0}'.", path); - return false; - } - else - { - m_AssetGUID = AssetDatabase.AssetPathToGUID(path); - m_CachedAsset = value; - } - } - - return true; - } -#endif - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/AssetReference.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/AssetReference.cs.meta deleted file mode 100644 index 49bf83f5..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/AssetReference.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 5ad0e35b994160844b457bd2836737b2 -timeCreated: 1505840855 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/IKeyEvaluator.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/IKeyEvaluator.cs deleted file mode 100644 index fe665fb2..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/IKeyEvaluator.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace UnityEngine.AddressableAssets -{ - /// - /// Interface for providing a key. This allows for objects passed into the Addressables system to provied a key instead of being used directly. - /// - public interface IKeyEvaluator - { - /// - /// The runtime key to use. - /// - object RuntimeKey { get; } - - /// - /// Checks if the current RuntimeKey is valid. - /// - /// Whether the RuntimeKey is valid or not. - bool RuntimeKeyIsValid(); - } -} - diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/IKeyEvaluator.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/IKeyEvaluator.cs.meta deleted file mode 100644 index 3d5f8200..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/IKeyEvaluator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f3f18a7841f7dca47bee246dcd538b31 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization.meta deleted file mode 100644 index d751ce88..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b571e819498e94243aaab6be45486255 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization/AddressablesRuntimeProperties.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization/AddressablesRuntimeProperties.cs deleted file mode 100644 index c483e655..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization/AddressablesRuntimeProperties.cs +++ /dev/null @@ -1,134 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Reflection; - -namespace UnityEngine.AddressableAssets.Initialization -{ - /// - /// Supports the evaluation of embedded runtime variables in addressables locations - /// - public static class AddressablesRuntimeProperties - { -#if !UNITY_EDITOR && UNITY_WSA_10_0 && ENABLE_DOTNET - static Assembly[] GetAssemblies() - { - //Not supported on UWP platforms - return new Assembly[0]; - } -#else - static Assembly[] GetAssemblies() - { - return AppDomain.CurrentDomain.GetAssemblies(); - } -#endif - - static Dictionary s_CachedValues = new Dictionary(); - - /// - /// Predefine a runtime property. - /// - /// The property name. - /// The property value. - public static void SetPropertyValue(string name, string val) - { - s_CachedValues.Add(name, val); - } - - /// - /// Evaluates a named property using cached values and static public fields and properties. Be aware that a field or property may be stripped if not referenced anywhere else. - /// - /// The property name. - /// The value of the property. If not found, the name is returned. - public static string EvaluateProperty(string name) - { - Debug.Assert(s_CachedValues != null, "ResourceManagerConfig.GetGlobalVar - s_cachedValues == null."); - - if (string.IsNullOrEmpty(name)) - return string.Empty; - - string cachedValue; - if (s_CachedValues.TryGetValue(name, out cachedValue)) - return cachedValue; - - int i = name.LastIndexOf('.'); - if (i < 0) - return name; - - var className = name.Substring(0, i); - var propName = name.Substring(i + 1); - foreach (var a in GetAssemblies()) - { - Type t = a.GetType(className, false, false); - if (t == null) - continue; - try - { - var pi = t.GetProperty(propName, BindingFlags.Static | BindingFlags.FlattenHierarchy | BindingFlags.Public); - if (pi != null) - { - var v = pi.GetValue(null, null); - if (v != null) - { - s_CachedValues.Add(name, v.ToString()); - return v.ToString(); - } - } - var fi = t.GetField(propName, BindingFlags.Static | BindingFlags.FlattenHierarchy | BindingFlags.Public); - if (fi != null) - { - var v = fi.GetValue(null); - if (v != null) - { - s_CachedValues.Add(name, v.ToString()); - return v.ToString(); - } - } - } - catch (Exception) - { - // ignored - } - } - return name; - } - - /// - /// Evaluates all tokens deliminated by '{' and '}' in a string and evaluates them with the EvaluateProperty method. - /// - /// The input string. - /// The evaluated string after resolving all tokens. - public static string EvaluateString(string input) - { - return EvaluateString(input, '{', '}', EvaluateProperty); - } - - /// - /// Evaluates all tokens deliminated by the specified delimiters in a string and evaluates them with the supplied method. - /// - /// The string to evaluate. - /// The start token delimiter. - /// The end token delimiter. - /// Func that has a single string parameter and returns a string. - /// The evaluated string. - public static string EvaluateString(string inputString, char startDelimiter, char endDelimiter, Func varFunc) - { - if (string.IsNullOrEmpty(inputString)) - return string.Empty; - - while (true) - { - int i = inputString.IndexOf(startDelimiter); - if (i < 0) - return inputString; - int e = inputString.IndexOf(endDelimiter, i); - if (e < i) - return inputString; - var token = inputString.Substring(i + 1, e - i - 1); - var tokenVal = varFunc == null ? string.Empty : varFunc(token); - inputString = inputString.Substring(0, i) + tokenVal + inputString.Substring(e + 1); - } - } - - - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization/AddressablesRuntimeProperties.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization/AddressablesRuntimeProperties.cs.meta deleted file mode 100644 index a1aa944a..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization/AddressablesRuntimeProperties.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2dd2619d56bf0674e930cbfd1f598197 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization/CacheInitialization.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization/CacheInitialization.cs deleted file mode 100644 index 5c506229..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization/CacheInitialization.cs +++ /dev/null @@ -1,106 +0,0 @@ -using System; -using System.IO; -using UnityEngine.ResourceManagement; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.Serialization; - -namespace UnityEngine.AddressableAssets.Initialization -{ - /// - /// IInitializableObject that sets up the Caching system. - /// - [Serializable] - public class CacheInitialization : IInitializableObject - { - /// - /// Sets properties of the Caching system. - /// - /// The id of thei object. - /// The JSON serialized CacheInitializationData object. - /// True if the initialization succeeded. - public bool Initialize(string id, string dataStr) - { -#if !UNITY_SWITCH && !UNITY_PS4 - var data = JsonUtility.FromJson(dataStr); - if (data != null) - { - Caching.compressionEnabled = data.CompressionEnabled; - var activeCache = Caching.currentCacheForWriting; - if (!string.IsNullOrEmpty(data.CacheDirectoryOverride)) - { - var dir = Addressables.ResolveInternalId(data.CacheDirectoryOverride); - if (!Directory.Exists(dir)) - Directory.CreateDirectory(dir); - - activeCache = Caching.GetCacheByPath(dir); - if(!activeCache.valid) - activeCache = Caching.AddCache(dir); - - Caching.currentCacheForWriting = activeCache; - } - if (data.LimitCacheSize) - activeCache.maximumAvailableStorageSpace = data.MaximumCacheSize; - else - activeCache.maximumAvailableStorageSpace = long.MaxValue; - - activeCache.expirationDelay = data.ExpirationDelay; - } -#endif //!UNITY_SWITCH && !UNITY_PS4 - return true; - } - -#if !UNITY_SWITCH && !UNITY_PS4 - /// - /// The root path of the cache. - /// - public static string RootPath { get { return Path.GetDirectoryName(Caching.defaultCache.path); } } -#endif //!UNITY_SWITCH && !UNITY_PS4 - } - - /// - /// Contains settings for the Caching system. - /// - [Serializable] - public class CacheInitializationData - { - [FormerlySerializedAs("m_compressionEnabled")] - [SerializeField] - bool m_CompressionEnabled = true; - /// - /// Enable recompression of asset bundles into LZ4 format as they are saved to the cache. This sets the Caching.compressionEnabled value. - /// - public bool CompressionEnabled { get { return m_CompressionEnabled; } set { m_CompressionEnabled = value; } } - - [FormerlySerializedAs("m_cacheDirectoryOverride")] - [SerializeField] - string m_CacheDirectoryOverride = ""; - /// - /// If not null or empty a new cache is created using Caching.AddCache and it is set active by assigning it to Caching.currentCacheForWriting. - /// - public string CacheDirectoryOverride { get { return m_CacheDirectoryOverride; } set { m_CacheDirectoryOverride = value; } } - - [FormerlySerializedAs("m_expirationDelay")] - [SerializeField] - int m_ExpirationDelay = 12960000; //this value taken from the docs and is 150 days - /// - /// Controls how long bundles are kept in the cache. This value is applied to Caching.currentCacheForWriting.expirationDelay. The value is in seconds and has a limit of 12960000 (150 days). - /// - public int ExpirationDelay { get { return m_ExpirationDelay; } set { m_ExpirationDelay = value; } } - - [FormerlySerializedAs("m_limitCacheSize")] - [SerializeField] - bool m_LimitCacheSize; - /// - /// If true, the maximum cache size will be set to MaximumCacheSize. - /// - public bool LimitCacheSize { get { return m_LimitCacheSize; } set { m_LimitCacheSize = value; } } - - [FormerlySerializedAs("m_maximumCacheSize")] - [SerializeField] - long m_MaximumCacheSize = long.MaxValue; - /// - /// The maximum size of the cache in bytes. This value is applied to Caching.currentCacheForWriting.maximumAvailableStorageSpace. This will only be set if LimitCacheSize is true. - /// - public long MaximumCacheSize { get { return m_MaximumCacheSize; } set { m_MaximumCacheSize = value; } } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization/CacheInitialization.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization/CacheInitialization.cs.meta deleted file mode 100644 index b7ea9b9a..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization/CacheInitialization.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 43224c404bd343b44a2ecd99237e285c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization/InitializationOperation.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization/InitializationOperation.cs deleted file mode 100644 index f2893b89..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization/InitializationOperation.cs +++ /dev/null @@ -1,228 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine.AddressableAssets.ResourceLocators; -using UnityEngine.AddressableAssets.ResourceProviders; -using UnityEngine.AddressableAssets.Utility; -using UnityEngine.Networking; -using UnityEngine.ResourceManagement; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.Diagnostics; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.ResourceProviders; -using UnityEngine.ResourceManagement.Util; - -namespace UnityEngine.AddressableAssets.Initialization -{ - internal class InitializationOperation : AsyncOperationBase - { - AsyncOperationHandle m_rtdOp; - string m_ProviderSuffix; - IResourceLocator m_Result; - AddressablesImpl m_Addressables; - - public InitializationOperation(AddressablesImpl aa) - { - m_Addressables = aa; - } - - internal static AsyncOperationHandle CreateInitializationOperation(AddressablesImpl aa, string playerSettingsLocation, string providerSuffix) - { - new ResourceManagerDiagnostics(aa.ResourceManager); - var jp = new JsonAssetProvider(); - jp.IgnoreFailures = true; - aa.ResourceManager.ResourceProviders.Add(jp); - var tdp = new TextDataProvider(); - tdp.IgnoreFailures = true; - aa.ResourceManager.ResourceProviders.Add(tdp); - aa.ResourceManager.ResourceProviders.Add(new ContentCatalogProvider(aa.ResourceManager)); - - var runtimeDataLocation = new ResourceLocationBase("RuntimeData", playerSettingsLocation, typeof(JsonAssetProvider).FullName, typeof(ResourceManagerRuntimeData)); - - var initOp = new InitializationOperation(aa); - initOp.m_rtdOp = aa.ResourceManager.ProvideResource(runtimeDataLocation); - initOp.m_ProviderSuffix = providerSuffix; - return aa.ResourceManager.StartOperation(initOp, initOp.m_rtdOp); - } - - protected override void Execute() - { - Addressables.LogFormat("Addressables - runtime data operation completed with status = {0}, result = {1}.", m_rtdOp.Status, m_rtdOp.Result); - if (m_rtdOp.Result == null) - { - Addressables.LogWarningFormat("Addressables - Unable to load runtime data at location {0}.", m_rtdOp); - Complete(m_Result, false, string.Format("Addressables - Unable to load runtime data at location {0}.", m_rtdOp)); - return; - } - var rtd = m_rtdOp.Result; - m_Addressables.Release(m_rtdOp); - if(rtd.CertificateHandlerType != null) - m_Addressables.ResourceManager.CertificateHandlerInstance = Activator.CreateInstance(rtd.CertificateHandlerType) as CertificateHandler; - -#if UNITY_EDITOR - if (UnityEditor.EditorUserBuildSettings.activeBuildTarget.ToString() != rtd.BuildTarget) - Addressables.LogErrorFormat("Addressables - runtime data was built with a different build target. Expected {0}, but data was built with {1}. Certain assets may not load correctly including shaders. You can rebuild player content via the Addressable Assets window.", UnityEditor.EditorUserBuildSettings.activeBuildTarget, rtd.BuildTarget); -#endif - if (!rtd.LogResourceManagerExceptions) - ResourceManager.ExceptionHandler = null; - - if (!rtd.ProfileEvents) - m_Addressables.ResourceManager.ClearDiagnosticsCallback(); - - // DiagnosticEventCollector.ResourceManagerProfilerEventsEnabled = rtd.ProfileEvents; - Addressables.Log("Addressables - loading initialization objects."); - foreach (var i in rtd.InitializationObjects) - { - if (i.ObjectType.Value == null) - { - Addressables.LogFormat("Invalid initialization object type {0}.", i.ObjectType); - continue; - } - try - { - var o = i.CreateInstance(); - Addressables.LogFormat("Initialization object {0} created instance {1}.", i, o); - } - catch (Exception ex) - { - Addressables.LogErrorFormat("Exception thrown during initialization of object {0}: {1}", i, ex.ToString()); - } - } - - var locMap = new ResourceLocationMap(rtd.CatalogLocations); - m_Addressables.ResourceLocators.Add(locMap); - IList catalogs; - if (!locMap.Locate(ResourceManagerRuntimeData.kCatalogAddress, typeof(ContentCatalogData), out catalogs)) - { - Addressables.LogWarningFormat("Addressables - Unable to find any catalog locations in the runtime data."); - m_Addressables.ResourceLocators.Remove(locMap); - Complete(m_Result, false, "Addressables - Unable to find any catalog locations in the runtime data."); - } - else - { - Addressables.LogFormat("Addressables - loading content catalogs, {0} found.", catalogs.Count); - LoadContentCatalogInternal(catalogs, 0, locMap); - } - } - - - static void LoadProvider(AddressablesImpl addressables, ObjectInitializationData providerData, string providerSuffix) - { - //don't add providers that have the same id... - var indexOfExistingProvider = -1; - var newProviderId = string.IsNullOrEmpty(providerSuffix) ? providerData.Id : (providerData.Id + providerSuffix); - for (int i = 0; i < addressables.ResourceManager.ResourceProviders.Count; i++) - { - var rp = addressables.ResourceManager.ResourceProviders[i]; - if (rp.ProviderId == newProviderId) - { - indexOfExistingProvider = i; - break; - } - } - - //if not re-initializing, just use the old provider - if (indexOfExistingProvider >= 0 && string.IsNullOrEmpty(providerSuffix)) - return; - - var provider = providerData.CreateInstance(newProviderId); - if (provider != null) - { - if (indexOfExistingProvider < 0 || !string.IsNullOrEmpty(providerSuffix)) - { - Addressables.LogFormat("Addressables - added provider {0} with id {1}.", provider, provider.ProviderId); - addressables.ResourceManager.ResourceProviders.Add(provider); - } - else - { - Addressables.LogFormat("Addressables - replacing provider {0} at index {1}.", provider, indexOfExistingProvider); - addressables.ResourceManager.ResourceProviders[indexOfExistingProvider] = provider; - } - } - else - { - Addressables.LogWarningFormat("Addressables - Unable to load resource provider from {0}.", providerData); - } - - } - - static AsyncOperationHandle OnCatalogDataLoaded(AddressablesImpl addressables, AsyncOperationHandle op, string providerSuffix) - { - var data = op.Result; - if (data == null) - { - return addressables.ResourceManager.CreateCompletedOperation(null, new Exception("Failed to load content catalog.").Message); - } - else - { - if (data.ResourceProviderData != null) - foreach (var providerData in data.ResourceProviderData) - LoadProvider(addressables, providerData, providerSuffix); - if (addressables.InstanceProvider == null) - { - var prov = data.InstanceProviderData.CreateInstance(); - if (prov != null) - addressables.InstanceProvider = prov; - } - if (addressables.SceneProvider == null) - { - var prov = data.SceneProviderData.CreateInstance(); - if (prov != null) - addressables.SceneProvider = prov; - } - - ResourceLocationMap locMap = data.CreateLocator(providerSuffix); - - addressables.ResourceLocators.Add(locMap); - return addressables.ResourceManager.CreateCompletedOperation(locMap, string.Empty); - } - } - public static AsyncOperationHandle LoadContentCatalog(AddressablesImpl addressables, IResourceLocation loc, string providerSuffix) - { - var loadOp = addressables.LoadAssetAsync(loc); - var chainOp = addressables.ResourceManager.CreateChainOperation(loadOp, res => OnCatalogDataLoaded(addressables, res, providerSuffix)); - addressables.Release(loadOp); - return chainOp; - } - - public AsyncOperationHandle LoadContentCatalog(IResourceLocation loc, string providerSuffix) - { - var loadOp = m_Addressables.LoadAssetAsync(loc); - var chainOp = m_Addressables.ResourceManager.CreateChainOperation(loadOp, res => OnCatalogDataLoaded(m_Addressables, res, providerSuffix)); - m_Addressables.Release(loadOp); - return chainOp; - } - - //Attempts to load each catalog in order, stopping at first success. - void LoadContentCatalogInternal(IList catalogs, int index, ResourceLocationMap locMap) - { - Addressables.LogFormat("Addressables - loading content catalog from {0}.", catalogs[index].InternalId); - LoadContentCatalog(catalogs[index], m_ProviderSuffix).Completed += op => - { - if (op.Result != null) - { - m_Addressables.ResourceLocators.Remove(locMap); - m_Result = op.Result; - Complete(m_Result, true, string.Empty); - m_Addressables.Release(op); - Addressables.Log("Addressables - initialization complete."); - } - else - { - Addressables.LogFormat("Addressables - failed to load content catalog from {0}.", op); - if (index + 1 >= catalogs.Count) - { - Addressables.LogWarningFormat("Addressables - initialization failed.", op); - m_Addressables.ResourceLocators.Remove(locMap); - Complete(m_Result, false, op.OperationException != null ? op.OperationException.Message : "LoadContentCatalogInternal"); - m_Addressables.Release(op); - } - else - { - LoadContentCatalogInternal(catalogs, index + 1, locMap); - m_Addressables.Release(op); - } - } - }; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization/InitializationOperation.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization/InitializationOperation.cs.meta deleted file mode 100644 index 2d3c7141..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization/InitializationOperation.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f7db1cf7b24f9784a8c53aaaa271654d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization/ResourceManagerRuntimeData.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization/ResourceManagerRuntimeData.cs deleted file mode 100644 index 5ff9c0f8..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization/ResourceManagerRuntimeData.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine.AddressableAssets.ResourceLocators; -using UnityEngine.Networking; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.Serialization; - -namespace UnityEngine.AddressableAssets.Initialization -{ - /// - /// Runtime data that is used to initialize the Addressables system. - /// - [Serializable] - public class ResourceManagerRuntimeData - { - /// - /// Address of the contained catalogs. - /// - public const string kCatalogAddress = "AddressablesMainContentCatalog"; - - [SerializeField] - string m_buildTarget; - /// - /// The name of the build target that this data was prepared for. - /// - public string BuildTarget { get { return m_buildTarget; } set { m_buildTarget = value; } } - - [FormerlySerializedAs("m_settingsHash")] - [SerializeField] - string m_SettingsHash; - /// - /// The hash of the settings that generated this runtime data. - /// - public string SettingsHash { get { return m_SettingsHash; } set { m_SettingsHash = value; } } - [FormerlySerializedAs("m_catalogLocations")] - [SerializeField] - List m_CatalogLocations = new List(); - /// - /// List of catalog locations to download in order (try remote first, then local) - /// - public List CatalogLocations { get { return m_CatalogLocations; } } - [FormerlySerializedAs("m_profileEvents")] - [SerializeField] - bool m_ProfileEvents; - /// - /// Flag to control whether the ResourceManager sends profiler events. - /// - public bool ProfileEvents { get { return m_ProfileEvents; } set { m_ProfileEvents = value; } } - - [FormerlySerializedAs("m_logResourceManagerExceptions")] - [SerializeField] - bool m_LogResourceManagerExceptions = true; - /// - /// When enabled, the Addressables.ResourceManager.ExceptionHandler is set to (op, ex) => Debug.LogException(ex); - /// - public bool LogResourceManagerExceptions { get { return m_LogResourceManagerExceptions; } set { m_LogResourceManagerExceptions = value; } } - - [FormerlySerializedAs("m_extraInitializationData")] - [SerializeField] - List m_ExtraInitializationData = new List(); - /// - /// The list of initialization data. These objects will get deserialized and initialized during the Addressables initialization process. This happens after resource providers have been set up but before any catalogs are loaded. - /// - public List InitializationObjects { get { return m_ExtraInitializationData; } } - - [SerializeField] - SerializedType m_CertificateHandlerType; - - /// - /// The type of CertificateHandler to use for this provider. - /// - public Type CertificateHandlerType - { - get - { - return m_CertificateHandlerType.Value; - } - set - { - m_CertificateHandlerType.Value = value; - } - } - - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization/ResourceManagerRuntimeData.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization/ResourceManagerRuntimeData.cs.meta deleted file mode 100644 index 2c0fd90e..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Initialization/ResourceManagerRuntimeData.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 81e994b90fc45fb46963bcce32bf4969 -timeCreated: 1499885054 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators.meta deleted file mode 100644 index 55fca2db..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7fb84c109abae6048a38652a447fb108 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/ContentCatalogData.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/ContentCatalogData.cs deleted file mode 100644 index c2315186..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/ContentCatalogData.cs +++ /dev/null @@ -1,714 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using UnityEngine.AddressableAssets.Utility; -using UnityEngine.ResourceManagement; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.Serialization; - -namespace UnityEngine.AddressableAssets.ResourceLocators -{ - /// - /// Contains serializable data for an IResourceLocation - /// - public class ContentCatalogDataEntry - { - /// - /// Internl id. - /// - public string InternalId { get; set; } - /// - /// IResourceProvider identifier. - /// - public string Provider { get; private set; } - /// - /// Keys for this location. - /// - public List Keys { get; private set; } - /// - /// Dependency keys. - /// - public List Dependencies { get; private set; } - /// - /// Serializable data for the provider. - /// - public object Data { get; set; } - - /// - /// The type of the resource for th location. - /// - public Type ResourceType { get; private set; } - - /// - /// Construct a new ContentCatalogEntry. - /// - /// The internal id. - /// The provider id. - /// The collection of keys that can be used to retrieve this entry. - /// Optional collection of keys for dependencies. - /// Optional additional data to be passed to the provider. For example, AssetBundleProviders use this for cache and crc data. - public ContentCatalogDataEntry(Type type, string internalId, string provider, IEnumerable keys, IEnumerable dependencies = null, object extraData = null) - { - InternalId = internalId; - Provider = provider; - ResourceType = type; - Keys = new List(keys); - Dependencies = dependencies == null ? new List() : new List(dependencies); - Data = extraData; - } - - internal int ComputeDependencyHash() - { - if (Dependencies == null) - return 0; - int hash = 0; - foreach (var d in Dependencies) - hash = hash * 31 + d.GetHashCode(); - return hash; - } - } - - /// - /// Container for ContentCatalogEntries. - /// - [Serializable] - public class ContentCatalogData - { - [SerializeField] - ObjectInitializationData m_InstanceProviderData; - /// - /// Data for the Addressables.ResourceManager.InstanceProvider initialization; - /// - public ObjectInitializationData InstanceProviderData - { - get - { - return m_InstanceProviderData; - } - set - { - m_InstanceProviderData = value; - } - } - [SerializeField] - ObjectInitializationData m_SceneProviderData; - /// - /// Data for the Addressables.ResourceManager.InstanceProvider initialization; - /// - public ObjectInitializationData SceneProviderData - { - get - { - return m_SceneProviderData; - } - set - { - m_SceneProviderData = value; - } - } - [SerializeField] - List m_ResourceProviderData = new List(); - /// - /// The list of resource provider data. Each entry will add an IResourceProvider to the Addressables.ResourceManager.ResourceProviders list. - /// - public List ResourceProviderData { get { return m_ResourceProviderData; } } - - [FormerlySerializedAs("m_providerIds")] - [SerializeField] - string[] m_ProviderIds = null; - [FormerlySerializedAs("m_internalIds")] - [SerializeField] - string[] m_InternalIds = null; - [FormerlySerializedAs("m_keyDataString")] - [SerializeField] - string m_KeyDataString = null; - [FormerlySerializedAs("m_bucketDataString")] - [SerializeField] - string m_BucketDataString = null; - [FormerlySerializedAs("m_entryDataString")] - [SerializeField] - string m_EntryDataString = null; - - const int k_ByteSize = 4; - const int k_EntryDataItemPerEntry = 7; - - [FormerlySerializedAs("m_extraDataString")] - [SerializeField] - string m_ExtraDataString = null; - - [SerializeField] - string[] m_Keys = null; - - [SerializeField] - SerializedType[] m_resourceTypes = null; - - struct Bucket - { - public int dataOffset; - public int[] entries; - } - - class CompactLocation : IResourceLocation - { - ResourceLocationMap m_Locator; - string m_InternalId; - string m_ProviderId; - object m_Dependency; - object m_Data; - int m_HashCode; - int m_DependencyHashCode; - string m_PrimaryKey; - Type m_Type; - public string InternalId { get { return m_InternalId; } } - public string ProviderId { get { return m_ProviderId; } } - public IList Dependencies - { - get - { - if (m_Dependency == null) - return null; - IList results; - m_Locator.Locate(m_Dependency, typeof(object), out results); - return results; - } - } - public bool HasDependencies { get { return m_Dependency != null; } } - - public int DependencyHashCode { get { return m_DependencyHashCode; } } - - public object Data { get { return m_Data; } } - - public string PrimaryKey - { - get { return m_PrimaryKey; } - set { m_PrimaryKey = value; } - } - - public Type ResourceType { get { return m_Type; } } - - public override string ToString() - { - return m_InternalId; - } - - public int Hash(Type t) - { - var hash = m_HashCode * 31 + t.GetHashCode(); - return hash; - } - - public CompactLocation(ResourceLocationMap locator, string internalId, string providerId, object dependencyKey, object data, int depHash, string primaryKey, Type type) - { - m_Locator = locator; - m_InternalId = internalId; - m_ProviderId = providerId; - m_Dependency = dependencyKey; - m_Data = data; - m_HashCode = internalId.GetHashCode() * 31 + providerId.GetHashCode(); - m_DependencyHashCode = depHash; - m_PrimaryKey = primaryKey; - m_Type = type == null ? typeof(object) : type; - } - } - - /// - /// Create IResourceLocator object - /// - /// If specified, this value will be appeneded to all provider ids. This is used when loading additional catalogs that need to have unique providers. - /// ResourceLocationMap, which implements the IResourceLocator interface. - public ResourceLocationMap CreateLocator(string providerSuffix = null) - { - var bucketData = Convert.FromBase64String(m_BucketDataString); - int bucketCount = BitConverter.ToInt32(bucketData, 0); - var buckets = new Bucket[bucketCount]; - int bi = 4; - for (int i = 0; i < bucketCount; i++) - { - var index = SerializationUtilities.ReadInt32FromByteArray(bucketData, bi); - bi += 4; - var entryCount = SerializationUtilities.ReadInt32FromByteArray(bucketData, bi); - bi += 4; - var entryArray = new int[entryCount]; - for (int c = 0; c < entryCount; c++) - { - entryArray[c] = SerializationUtilities.ReadInt32FromByteArray(bucketData, bi); - bi += 4; - } - buckets[i] = new Bucket { entries = entryArray, dataOffset = index }; - } - if (!string.IsNullOrEmpty(providerSuffix)) - { - for (int i = 0; i < m_ProviderIds.Length; i++) - { - if (!m_ProviderIds[i].EndsWith(providerSuffix)) - m_ProviderIds[i] = m_ProviderIds[i] + providerSuffix; - } - } - var extraData = Convert.FromBase64String(m_ExtraDataString); - var keyData = Convert.FromBase64String(m_KeyDataString); - var keyCount = BitConverter.ToInt32(keyData, 0); - var keys = new object[keyCount]; - for (int i = 0; i < buckets.Length; i++) - keys[i] = SerializationUtilities.ReadObjectFromByteArray(keyData, buckets[i].dataOffset); - - var locator = new ResourceLocationMap(buckets.Length); - - var entryData = Convert.FromBase64String(m_EntryDataString); - int count = SerializationUtilities.ReadInt32FromByteArray(entryData, 0); - List locations = new List(count); - for (int i = 0; i < count; i++) - { - var index = k_ByteSize + i * k_ByteSize * k_EntryDataItemPerEntry; - var internalId = SerializationUtilities.ReadInt32FromByteArray(entryData, index); - index += k_ByteSize; - var providerIndex = SerializationUtilities.ReadInt32FromByteArray(entryData, index); - index += k_ByteSize; - var dependency = SerializationUtilities.ReadInt32FromByteArray(entryData, index); - index += k_ByteSize; - var depHash = SerializationUtilities.ReadInt32FromByteArray(entryData, index); - index += k_ByteSize; - var dataIndex = SerializationUtilities.ReadInt32FromByteArray(entryData, index); - index += k_ByteSize; - var primaryKey = SerializationUtilities.ReadInt32FromByteArray(entryData, index); - index += k_ByteSize; - var resourceType = SerializationUtilities.ReadInt32FromByteArray(entryData, index); - object data = dataIndex < 0 ? null : SerializationUtilities.ReadObjectFromByteArray(extraData, dataIndex); - locations.Add(new CompactLocation(locator, Addressables.ResolveInternalId(m_InternalIds[internalId]), - m_ProviderIds[providerIndex], dependency < 0 ? null : keys[dependency], data, depHash, m_Keys[primaryKey], m_resourceTypes[resourceType].Value)); - } - - for (int i = 0; i < buckets.Length; i++) - { - var bucket = buckets[i]; - var key = keys[i]; - var locs = new List(bucket.entries.Length); - foreach (var index in bucket.entries) - locs.Add(locations[index]); - locator.Add(key, locs); - } - return locator; - } - - /// - /// Create a new ContentCatalogData object without any data. - /// - public ContentCatalogData() - { - } - - -#if UNITY_EDITOR - /// - /// Create a new ContentCatalogData object with the specified entries. - /// - /// The data entries. - public ContentCatalogData(IList entries) - { - SetData(entries); - } - - class KeyIndexer - { - public List values; - public Dictionary map; - public KeyIndexer(IEnumerable keyCollection, int capacity) - { - values = new List(capacity); - map = new Dictionary(capacity); - if (keyCollection != null) - Add(keyCollection); - } - - public void Add(IEnumerable keyCollection) - { - bool isNew = false; - foreach (var key in keyCollection) - Add(key, ref isNew); - } - - public void Add(T key, ref bool isNew) - { - int index; - if (!map.TryGetValue(key, out index)) - { - isNew = true; - map.Add(key, values.Count); - values.Add(key); - } - } - } - - class KeyIndexer - { - public List values; - public Dictionary map; - - public KeyIndexer(IEnumerable keyCollection, Func func, int capacity) - { - values = new List(capacity); - map = new Dictionary(capacity); - if (keyCollection != null) - Add(keyCollection, func); - } - - void Add(IEnumerable keyCollection, Func func) - { - foreach (var key in keyCollection) - Add(key, func(key)); - } - - public void Add(TKey key, TVal val) - { - int index; - if (!map.TryGetValue(key, out index)) - { - map.Add(key, values.Count); - values.Add(val); - } - } - - public TVal this[TKey key] { get { return values[map[key]]; } } - } - - /// - /// Set the data before serialization - /// - /// The list of - public void SetData(IList data) - { - if (data == null) - return; - var providers = new KeyIndexer(data.Select(s => s.Provider), 10); - var internalIds = new KeyIndexer(data.Select(s => s.InternalId), data.Count); - var keys = new KeyIndexer(data.SelectMany(s => s.Keys), data.Count * 3); - var types = new KeyIndexer(data.Select(s => s.ResourceType), 50); - - keys.Add(data.SelectMany(s => s.Dependencies)); - var keyIndexToEntries = new KeyIndexer, object>(keys.values, s => new List(), keys.values.Count); - var entryToIndex = new Dictionary(data.Count); - var extraDataList = new List(); - var entryIndexToExtraDataIndex = new Dictionary(); - - int extraDataIndex = 0; - //create buckets of key to data entry - for (int i = 0; i < data.Count; i++) - { - var e = data[i]; - int extraDataOffset = -1; - if (e.Data != null) - { - var len = SerializationUtilities.WriteObjectToByteList(e.Data, extraDataList); - if (len > 0) - { - extraDataOffset = extraDataIndex; - extraDataIndex += len; - } - } - entryIndexToExtraDataIndex.Add(i, extraDataOffset); - entryToIndex.Add(e, i); - foreach (var k in e.Keys) - keyIndexToEntries[k].Add(e); - } - m_ExtraDataString = Convert.ToBase64String(extraDataList.ToArray()); - - //create extra entries for dependency sets - int originalEntryCount = data.Count; - for (int i = 0; i < originalEntryCount; i++) - { - var entry = data[i]; - if (entry.Dependencies == null || entry.Dependencies.Count < 2) - continue; - - //seed and and factor values taken from https://stackoverflow.com/questions/1646807/quick-and-simple-hash-code-combinations - int hashCode = 1009; - foreach (var dep in entry.Dependencies) - hashCode = hashCode * 9176 + dep.GetHashCode(); - bool isNew = false; - keys.Add(hashCode, ref isNew); - if (isNew) - { - //if this combination of dependecies is new, add a new entry and add its key to all contained entries - var deps = entry.Dependencies.Select(d => keyIndexToEntries[d][0]).ToList(); - keyIndexToEntries.Add(hashCode, deps); - foreach (var dep in deps) - dep.Keys.Add(hashCode); - } - - //reset the dependency list to only contain the key of the new set - entry.Dependencies.Clear(); - entry.Dependencies.Add(hashCode); - } - - //serialize internal ids and providers - m_InternalIds = internalIds.values.ToArray(); - m_ProviderIds = providers.values.ToArray(); - m_resourceTypes = types.values.Select(t => new SerializedType() { Value = t }).ToArray(); - m_Keys = keys.values.Where(x => x != null) - .Select(x => x.ToString()) - .ToArray(); - - - //serialize entries - { - var entryData = new byte[data.Count * k_ByteSize * k_EntryDataItemPerEntry + k_ByteSize]; - var entryDataOffset = SerializationUtilities.WriteInt32ToByteArray(entryData, data.Count, 0); - for (int i = 0; i < data.Count; i++) - { - var e = data[i]; - entryDataOffset = SerializationUtilities.WriteInt32ToByteArray(entryData, internalIds.map[e.InternalId], entryDataOffset); - entryDataOffset = SerializationUtilities.WriteInt32ToByteArray(entryData, providers.map[e.Provider], entryDataOffset); - entryDataOffset = SerializationUtilities.WriteInt32ToByteArray(entryData, e.Dependencies.Count == 0 ? -1 : keyIndexToEntries.map[e.Dependencies[0]], entryDataOffset); - entryDataOffset = SerializationUtilities.WriteInt32ToByteArray(entryData, e.ComputeDependencyHash(), entryDataOffset); - entryDataOffset = SerializationUtilities.WriteInt32ToByteArray(entryData, entryIndexToExtraDataIndex[i], entryDataOffset); - entryDataOffset = SerializationUtilities.WriteInt32ToByteArray(entryData, keys.map[e.Keys.First()], entryDataOffset); - entryDataOffset = SerializationUtilities.WriteInt32ToByteArray(entryData, types.map[e.ResourceType], entryDataOffset); - } - m_EntryDataString = Convert.ToBase64String(entryData); - } - - //serialize keys and mappings - { - var entryCount = keyIndexToEntries.values.Aggregate(0, (a, s) => a += s.Count); - var bucketData = new byte[4 + keys.values.Count * 8 + entryCount * 4]; - var keyData = new List(keys.values.Count * 10); - keyData.AddRange(BitConverter.GetBytes(keys.values.Count)); - int keyDataOffset = 4; - int bucketDataOffset = SerializationUtilities.WriteInt32ToByteArray(bucketData, keys.values.Count, 0); - for (int i = 0; i < keys.values.Count; i++) - { - var key = keys.values[i]; - bucketDataOffset = SerializationUtilities.WriteInt32ToByteArray(bucketData, keyDataOffset, bucketDataOffset); - keyDataOffset += SerializationUtilities.WriteObjectToByteList(key, keyData); - var entries = keyIndexToEntries[key]; - bucketDataOffset = SerializationUtilities.WriteInt32ToByteArray(bucketData, entries.Count, bucketDataOffset); - foreach (var e in entries) - bucketDataOffset = SerializationUtilities.WriteInt32ToByteArray(bucketData, entryToIndex[e], bucketDataOffset); - } - m_BucketDataString = Convert.ToBase64String(bucketData); - m_KeyDataString = Convert.ToBase64String(keyData.ToArray()); - } - } - - -#if REFERENCE_IMPLEMENTATION - public void SetDataOld(List locations, List labels) - { - var tmpEntries = new List(locations.Count); - var providers = new List(10); - var providerIndices = new Dictionary(10); - var countEstimate = locations.Count * 2 + labels.Count; - var internalIdToEntryIndex = new Dictionary(countEstimate); - var internalIdList = new List(countEstimate); - List keys = new List(countEstimate); - - var keyToIndex = new Dictionary(countEstimate); - var tmpBuckets = new Dictionary>(countEstimate); - - for (int i = 0; i < locations.Count; i++) - { - var rld = locations[i]; - int providerIndex = 0; - if (!providerIndices.TryGetValue(rld.m_provider, out providerIndex)) - { - providerIndices.Add(rld.m_provider, providerIndex = providers.Count); - providers.Add(rld.m_provider); - } - - int internalIdIndex = 0; - if (!internalIdToEntryIndex.TryGetValue(rld.m_internalId, out internalIdIndex)) - { - internalIdToEntryIndex.Add(rld.m_internalId, internalIdIndex = internalIdList.Count); - internalIdList.Add(rld.m_internalId); - } - - var e = new Entry() { internalId = internalIdIndex, providerIndex = (byte)providerIndex, dependency = -1 }; - if (rld.m_type == ResourceLocationData.LocationType.Int) - AddToBucket(tmpBuckets, keyToIndex, keys, int.Parse(rld.m_address), tmpEntries.Count, 1); - else if (rld.m_type == ResourceLocationData.LocationType.String) - AddToBucket(tmpBuckets, keyToIndex, keys, rld.m_address, tmpEntries.Count, 1); - if (!string.IsNullOrEmpty(rld.m_guid)) - AddToBucket(tmpBuckets, keyToIndex, keys, Hash128.Parse(rld.m_guid), tmpEntries.Count, 1); - if (rld.m_labelMask != 0) - { - for (int t = 0; t < labels.Count; t++) - { - if ((rld.m_labelMask & (1 << t)) != 0) - AddToBucket(tmpBuckets, keyToIndex, keys, labels[t], tmpEntries.Count, 100); - } - } - - tmpEntries.Add(e); - } - - for (int i = 0; i < locations.Count; i++) - { - var rld = locations[i]; - int dependency = -1; - if (rld.m_dependencies != null && rld.m_dependencies.Length > 0) - { - if (rld.m_dependencies.Length == 1) - { - dependency = keyToIndex[rld.m_dependencies[0]]; - } - else - { - System.Text.StringBuilder sb = new System.Text.StringBuilder(); - foreach (var d in rld.m_dependencies) - sb.Append(d); - var key = sb.ToString().GetHashCode(); - int keyIndex = -1; - foreach (var d in rld.m_dependencies) - { - var ki = keyToIndex[d]; - var depBucket = tmpBuckets[ki]; - keyIndex = AddToBucket(tmpBuckets, keyToIndex, keys, key, depBucket[0], 10); - } - dependency = keyIndex; - } - var e = tmpEntries[i]; - e.dependency = dependency; - tmpEntries[i] = e; - } - } - - m_internalIds = internalIdList.ToArray(); - m_providerIds = providers.ToArray(); - var entryData = new byte[tmpEntries.Count * 4 * 3 + 4]; - var offset = Serialize(entryData, tmpEntries.Count, 0); - for (int i = 0; i < tmpEntries.Count; i++) - { - var e = tmpEntries[i]; - offset = Serialize(entryData, e.internalId, offset); - offset = Serialize(entryData, e.providerIndex, offset); - offset = Serialize(entryData, e.dependency, offset); - } - m_entryDataString = Convert.ToBase64String(entryData); - - int bucketEntryCount = 0; - var bucketList = new List(keys.Count); - for (int i = 0; i < keys.Count; i++) - { - var bucketIndex = keyToIndex[keys[i]]; - List entries = tmpBuckets[bucketIndex]; - bucketList.Add(new Bucket() { entries = entries.ToArray() }); - bucketEntryCount += entries.Count; - } - - var keyData = new List(bucketList.Count * 10); - keyData.AddRange(BitConverter.GetBytes(bucketList.Count)); - int dataOffset = 4; - for (int i = 0; i < bucketList.Count; i++) - { - var bucket = bucketList[i]; - bucket.dataOffset = dataOffset; - bucketList[i] = bucket; - var key = keys[i]; - var kt = key.GetType(); - if (kt == typeof(string)) - { - string str = key as string; - byte[] tmp = System.Text.Encoding.Unicode.GetBytes(str); - byte[] tmp2 = System.Text.Encoding.ASCII.GetBytes(str); - if (System.Text.Encoding.Unicode.GetString(tmp) == System.Text.Encoding.ASCII.GetString(tmp2)) - { - keyData.Add((byte)KeyType.ASCIIString); - keyData.AddRange(tmp2); - dataOffset += tmp2.Length + 1; - } - else - { - keyData.Add((byte)KeyType.UnicodeString); - keyData.AddRange(tmp); - dataOffset += tmp.Length + 1; - } - } - else if (kt == typeof(UInt32)) - { - byte[] tmp = BitConverter.GetBytes((UInt32)key); - keyData.Add((byte)KeyType.UInt32); - keyData.AddRange(tmp); - dataOffset += tmp.Length + 1; - } - else if (kt == typeof(UInt16)) - { - byte[] tmp = BitConverter.GetBytes((UInt16)key); - keyData.Add((byte)KeyType.UInt16); - keyData.AddRange(tmp); - dataOffset += tmp.Length + 1; - } - else if (kt == typeof(Int32)) - { - byte[] tmp = BitConverter.GetBytes((Int32)key); - keyData.Add((byte)KeyType.Int32); - keyData.AddRange(tmp); - dataOffset += tmp.Length + 1; - } - else if (kt == typeof(int)) - { - byte[] tmp = BitConverter.GetBytes((UInt32)key); - keyData.Add((byte)KeyType.UInt32); - keyData.AddRange(tmp); - dataOffset += tmp.Length + 1; - } - else if (kt == typeof(Hash128)) - { - var guid = (Hash128)key; - byte[] tmp = System.Text.Encoding.ASCII.GetBytes(guid.ToString()); - keyData.Add((byte)KeyType.Hash128); - keyData.AddRange(tmp); - dataOffset += tmp.Length + 1; - } - } - m_keyDataString = Convert.ToBase64String(keyData.ToArray()); - - var bucketData = new byte[4 + bucketList.Count * 8 + bucketEntryCount * 4]; - offset = Serialize(bucketData, bucketList.Count, 0); - for (int i = 0; i < bucketList.Count; i++) - { - offset = Serialize(bucketData, bucketList[i].dataOffset, offset); - offset = Serialize(bucketData, bucketList[i].entries.Length, offset); - foreach (var e in bucketList[i].entries) - offset = Serialize(bucketData, e, offset); - } - m_bucketDataString = Convert.ToBase64String(bucketData); - -#if SERIALIZE_CATALOG_AS_BINARY - //TODO: investigate saving catalog as binary - roughly 20% size decrease, still needs a provider implementation - var stream = new System.IO.MemoryStream(); - var bw = new System.IO.BinaryWriter(stream); - foreach (var i in m_internalIds) - bw.Write(i); - foreach (var p in m_providerIds) - bw.Write(p); - bw.Write(entryData); - bw.Write(keyData.ToArray()); - bw.Write(bucketData); - bw.Flush(); - bw.Close(); - stream.Flush(); - System.IO.File.WriteAllBytes("Library/catalog_binary.bytes", stream.ToArray()); - System.IO.File.WriteAllText("Library/catalog_binary.txt", Convert.ToBase64String(stream.ToArray())); - stream.Close(); -#endif - } - - private int AddToBucket(Dictionary> buckets, Dictionary keyToIndex, List keys, object key, int index, int sizeHint) - { - int keyIndex = -1; - if (!keyToIndex.TryGetValue(key, out keyIndex)) - { - keyToIndex.Add(key, keyIndex = keys.Count); - keys.Add(key); - } - - List bucket; - if (!buckets.TryGetValue(keyIndex, out bucket)) - buckets.Add(keyIndex, bucket = new List(sizeHint)); - bucket.Add(index); - return keyIndex; - } -#endif -#endif - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/ContentCatalogData.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/ContentCatalogData.cs.meta deleted file mode 100644 index 9be932e6..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/ContentCatalogData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d415d633eb1c9d44c854bac7bdc6d17f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/IResourceLocator.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/IResourceLocator.cs deleted file mode 100644 index 8340d89f..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/IResourceLocator.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine.ResourceManagement.ResourceLocations; - -namespace UnityEngine.AddressableAssets.ResourceLocators -{ - /// - /// Interface used by the Addressables system to find th locations of a given key. - /// - public interface IResourceLocator - { - /// - /// The keys defined by this locator. - /// - IEnumerable Keys { get; } - /// - /// Retrieve the locations from a specified key. - /// - /// The key to use. - /// The resulting set of locations for the key. - /// True if any locations were found with the specified key. - bool Locate(object key, Type type, out IList locations); - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/IResourceLocator.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/IResourceLocator.cs.meta deleted file mode 100644 index 1e6162e4..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/IResourceLocator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e0d9d70fb62e8164d98b6567cf268d5c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/LegacyResourcesLocator.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/LegacyResourcesLocator.cs deleted file mode 100644 index d9ea2fb7..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/LegacyResourcesLocator.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.ResourceProviders; - -namespace UnityEngine.AddressableAssets.ResourceLocators -{ - /// - /// Simple locator that acts as a passthrough for assets loaded from resources directories. - /// - public class LegacyResourcesLocator : IResourceLocator - { - /// - /// The key is converted to a string and used as the internal id of the location added to the locations parameter. - /// - /// The key of the location. This should be a string with the resources path of the asset. - /// The list of locations. This will have at most one item. - /// True if the key is a string object and a location was created, false otherwise. - public bool Locate(object key, Type type, out IList locations) - { - locations = null; - var strKey = key as string; - if (strKey == null) - return false; - locations = new List(); - locations.Add(new ResourceLocationBase("LegacyResourceLocation", strKey, typeof(LegacyResourcesProvider).FullName, typeof(UnityEngine.Object))); - return true; - } - - /// - /// The keys available in this locator. - /// - public IEnumerable Keys - { - get - { - return null; - } - } - - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/LegacyResourcesLocator.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/LegacyResourcesLocator.cs.meta deleted file mode 100644 index 2837a546..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/LegacyResourcesLocator.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 6f5f2eb71e71b446dae10e69b8a38b2c -timeCreated: 1504834356 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/ResourceLocationData.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/ResourceLocationData.cs deleted file mode 100644 index d9389c65..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/ResourceLocationData.cs +++ /dev/null @@ -1,68 +0,0 @@ -using System; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.Serialization; - -namespace UnityEngine.AddressableAssets.ResourceLocators -{ - /// - /// Serializable location data. This is used for the locations of the content catalogs. - /// - [Serializable] - public class ResourceLocationData - { - [FormerlySerializedAs("m_keys")] - [SerializeField] - string[] m_Keys; - /// - /// The collection of keys for this location. - /// - public string[] Keys { get { return m_Keys; } } - - [FormerlySerializedAs("m_internalId")] - [SerializeField] - string m_InternalId; - /// - /// The internal id. - /// - public string InternalId { get { return m_InternalId; } } - - [FormerlySerializedAs("m_provider")] - [SerializeField] - string m_Provider; - /// - /// The provider id. - /// - public string Provider { get { return m_Provider; } } - - [FormerlySerializedAs("m_dependencies")] - [SerializeField] - string[] m_Dependencies; - /// - /// The collection of dependencies for this location. - /// - public string[] Dependencies { get { return m_Dependencies; } } - - [SerializeField] - SerializedType m_ResourceType; - /// - /// The type of the resource for th location. - /// - public Type ResourceType { get { return m_ResourceType.Value; } } - - /// - /// Construct a new ResourceLocationData object. - /// - /// Array of keys for the location. This must contain at least one item. - /// The internal id. - /// The provider id. - /// Optional array of dependencies. - public ResourceLocationData(string[] keys, string id, Type provider, Type t, string[] dependencies = null) - { - m_Keys = keys; - m_InternalId = id; - m_Provider = provider == null ? "" : provider.FullName; - m_Dependencies = dependencies == null ? new string[0] : dependencies; - m_ResourceType = new SerializedType() { Value = t }; - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/ResourceLocationData.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/ResourceLocationData.cs.meta deleted file mode 100644 index e527e449..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/ResourceLocationData.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: f409833c61db2b9428d2f2bcf4dbb0a1 -timeCreated: 1506572728 -licenseType: Free -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/ResourceLocationMap.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/ResourceLocationMap.cs deleted file mode 100644 index 1fb0a596..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/ResourceLocationMap.cs +++ /dev/null @@ -1,158 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine.ResourceManagement; -using UnityEngine.ResourceManagement.ResourceLocations; - -namespace UnityEngine.AddressableAssets.ResourceLocators -{ - /// - /// Simple implementation of an IResourceLocator - /// - public class ResourceLocationMap : IResourceLocator - { - /// - /// Construct a new ResourceLocationMap object. - /// - /// The expected number of items. - public ResourceLocationMap(int capacity = 0) - { - Locations = new Dictionary>(capacity == 0 ? 100 : capacity); - } - - /// - /// Construct a new ResourceLocationMap object with a list of locations. - /// - /// The list of locations to initialize with. - public ResourceLocationMap(IList locations) - { - if (locations == null) - return; - Locations = new Dictionary>(locations.Count * 2); - var locMap = new Dictionary(); - var dataMap = new Dictionary(); - //create and collect locations - for (int i = 0; i < locations.Count; i++) - { - var rlData = locations[i]; - if (rlData.Keys == null || rlData.Keys.Length < 1) - { - Addressables.LogErrorFormat("Address with id '{0}' does not have any valid keys, skipping...", rlData.InternalId); - continue; - } - if (locMap.ContainsKey(rlData.Keys[0])) - { - Addressables.LogErrorFormat("Duplicate address '{0}' with id '{1}' found, skipping...", rlData.Keys[0], rlData.InternalId); - continue; - } - var loc = new ResourceLocationBase(rlData.Keys[0], Addressables.ResolveInternalId(rlData.InternalId), rlData.Provider, rlData.ResourceType); - locMap.Add(rlData.Keys[0], loc); - dataMap.Add(rlData.Keys[0], rlData); - } - - //fix up dependencies between them - foreach (var kvp in locMap) - { - var data = dataMap[kvp.Key]; - if (data.Dependencies != null) - { - foreach (var d in data.Dependencies) - kvp.Value.Dependencies.Add(locMap[d]); - kvp.Value.ComputeDependencyHash(); - } - } - foreach (KeyValuePair kvp in locMap) - { - ResourceLocationData rlData = dataMap[kvp.Key]; - foreach (var k in rlData.Keys) - Add(k, kvp.Value); - } - } - - - /// - /// The mapping of key to location lists. - /// - public Dictionary> Locations { get; private set; } - - /// - /// The keys available in this locator. - /// - public IEnumerable Keys - { - get - { - return Locations.Keys; - } - } - - /// - /// Locate all of the locations that match the given key. - /// - /// The key used to locate the locations. - /// The list of found locations. This list is shared so it should not be modified. - /// - public bool Locate(object key, Type type, out IList locations) - { - IList locs = null; - if (!Locations.TryGetValue(key, out locs)) - { - locations = null; - return false; - } - - if (type == null) - { - locations = locs; - return true; - } - - var validTypeCount = 0; - foreach (var l in locs) - if (type.IsAssignableFrom(l.ResourceType)) - validTypeCount++; - - if (validTypeCount == 0) - { - locations = null; - return false; - } - - if (validTypeCount == locs.Count) - { - locations = locs; - return true; - } - - locations = new List(); - foreach (var l in locs) - { - if (type.IsAssignableFrom(l.ResourceType)) - locations.Add(l); - } - return true; - } - - /// - /// Add a new location. - /// - /// The key to reference the location. - /// The location to add. - public void Add(object key, IResourceLocation location) - { - IList locations; - if (!Locations.TryGetValue(key, out locations)) - Locations.Add(key, locations = new List()); - locations.Add(location); - } - - /// - /// Add a list of locations. - /// - /// The key to reference the locations with. - /// The list of locations to store at the given key. - public void Add(object key, IList locations) - { - Locations.Add(key, locations); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/ResourceLocationMap.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/ResourceLocationMap.cs.meta deleted file mode 100644 index 5ad6b193..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceLocators/ResourceLocationMap.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 902a23aa7fb810b4c90bd35c50e66fde -timeCreated: 1500663969 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager.meta deleted file mode 100644 index 812193b4..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 6468a66b467b3f440929865a8ad85665 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations.meta deleted file mode 100644 index 5adba0f9..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 61189accf2e8d427e8a15c5ccd4db00b -folderAsset: yes -timeCreated: 1503086217 -licenseType: Pro -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/AsyncOperationBase.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/AsyncOperationBase.cs deleted file mode 100644 index 583b86b5..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/AsyncOperationBase.cs +++ /dev/null @@ -1,457 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Threading.Tasks; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.Util; - -// ReSharper disable DelegateSubtraction - -namespace UnityEngine.ResourceManagement.AsyncOperations -{ - internal interface ICachable - { - int Hash { get; set; } - } - - internal interface IAsyncOperation - { - object GetResultAsObject(); - Type ResultType { get; } - int Version { get; } - string DebugName { get; } - void DecrementReferenceCount(); - void IncrementReferenceCount(); - int ReferenceCount { get; } - float PercentComplete { get; } - AsyncOperationStatus Status { get; } - - Exception OperationException { get; } - bool IsDone { get; } - Action OnDestroy { set; } - void GetDependencies(List deps); - - event Action CompletedTypeless; - event Action Destroyed; - - void InvokeCompletionEvent(); - System.Threading.Tasks.Task Task { get; } - void Start(ResourceManager rm, AsyncOperationHandle dependency, DelegateList updateCallbacks); - - AsyncOperationHandle Handle { get; } - - } - - /// - /// base class for implemented AsyncOperations, implements the needed interfaces and consolidates redundant code - /// - public abstract class AsyncOperationBase : IAsyncOperation - { - /// - /// This will be called by the resource manager after all dependent operation complete. This method should not be called manually. - /// A custom operation should override this method and begin work when it is called. - /// - protected abstract void Execute(); - - /// - /// This will be called by the resource manager when the reference count of the operation reaches zero. This method should not be called manually. - /// A custom operation should override this method and release any held resources - /// - protected virtual void Destroy() { } - - /// - /// A custom operation should override this method to return the progress of the operation. - /// - /// Progress of the operation. Value should be between 0.0f and 1.0f - protected virtual float Progress { get { return 0; } } - - /// - /// A custom operation should override this method to provide a debug friendly name for the operation. - /// - protected virtual string DebugName { get { return this.ToString(); } } - - /// - /// A custom operation should override this method to provide a list of AsyncOperationHandles that it depends on. - /// - /// The list that should be populated with dependent AsyncOperationHandles. - protected virtual void GetDependencies(List dependencies) { } - - internal TObject Result { get { return m_Result; } } - int m_referenceCount = 1; - AsyncOperationStatus m_Status; - Exception m_Error; - ResourceManager m_RM; - TObject m_Result; - private int m_Version; - internal int Version { get { return m_Version; } } - - DelegateList m_CompletedAction; - DelegateList m_DestroyedAction; - DelegateList> m_CompletedActionT; - Action m_OnDestroyAction; - internal Action OnDestroy { set { m_OnDestroyAction = value; } } - internal int ReferenceCount { get { return m_referenceCount; } } - Action m_dependencyCompleteAction; - - protected AsyncOperationBase() - { - m_UpdateCallback = UpdateCallback; - m_dependencyCompleteAction = o => InvokeExecute(); - } - - internal static string ShortenPath(string p, bool keepExtension) - { - var slashIndex = p.LastIndexOf('/'); - if (slashIndex > 0) - p = p.Substring(slashIndex + 1); - if (!keepExtension) - { - slashIndex = p.LastIndexOf('.'); - if (slashIndex > 0) - p = p.Substring(0, slashIndex); - } - return p; - } - - internal void IncrementReferenceCount() - { - if (m_referenceCount == 0) - throw new Exception(string.Format("Cannot increment reference count on operation {0} because it has already been destroyed", this)); - - m_referenceCount++; - m_RM.PostDiagnosticEvent(new AsyncOperationHandle(this), ResourceManager.DiagnosticEventType.AsyncOperationReferenceCount, m_referenceCount); - } - - internal void DecrementReferenceCount() - { - if (m_referenceCount <= 0) - throw new Exception(string.Format("Cannot decrement reference count for operation {0} because it is already 0", this)); - - m_referenceCount--; - m_RM.PostDiagnosticEvent(new AsyncOperationHandle(this), ResourceManager.DiagnosticEventType.AsyncOperationReferenceCount, m_referenceCount); - - if (m_referenceCount == 0) - { - m_RM.PostDiagnosticEvent(new AsyncOperationHandle(this), ResourceManager.DiagnosticEventType.AsyncOperationDestroy); - - Destroy(); - if (m_DestroyedAction != null) - { - m_DestroyedAction.Invoke(new AsyncOperationHandle(this)); - m_DestroyedAction.Clear(); - } - - if (m_OnDestroyAction != null) - { - m_OnDestroyAction(this); - m_OnDestroyAction = null; - } - - m_Result = default(TObject); - m_referenceCount = 1; - m_Status = AsyncOperationStatus.None; - m_Error = null; - m_Version++; - m_RM = null; - } - } - - System.Threading.EventWaitHandle m_waitHandle; - internal System.Threading.WaitHandle WaitHandle - { - get - { - if (m_waitHandle == null) - m_waitHandle = new System.Threading.EventWaitHandle(false, System.Threading.EventResetMode.ManualReset); - m_waitHandle.Reset(); - return m_waitHandle; - } - } - - internal System.Threading.Tasks.Task Task - { - get - { - if (Status == AsyncOperationStatus.Failed) - { - return System.Threading.Tasks.Task.FromResult(default(TObject)); - } - if (Status == AsyncOperationStatus.Succeeded) - { - return System.Threading.Tasks.Task.FromResult(Result); - } - - var handle = WaitHandle; - return System.Threading.Tasks.Task.Factory.StartNew(o => - { - var asyncOperation = o as AsyncOperationBase; - if (asyncOperation == null) - return default(TObject); - handle.WaitOne(); - return asyncOperation.Result; - }, this); - } - } - - System.Threading.Tasks.Task IAsyncOperation.Task - { - get - { - return Task as System.Threading.Tasks.Task; - } - } - - /// - public override string ToString() - { - var instId = ""; - var or = m_Result as Object; - if (or != null) - instId = "(" + or.GetInstanceID() + ")"; - return string.Format("{0}, result='{1}', status='{2}'", base.ToString(), (or + instId), m_Status); - } - - bool m_InDeferredCallbackQueue; - void RegisterForDeferredCallbackEvent(bool incrementReferenceCount = true) - { - if (IsDone && !m_InDeferredCallbackQueue) - { - m_InDeferredCallbackQueue = true; - m_RM.RegisterForDeferredCallback(this, incrementReferenceCount); - } - } - - internal event Action> Completed - { - add - { - if (m_CompletedActionT == null) - m_CompletedActionT = DelegateList>.CreateWithGlobalCache(); - m_CompletedActionT.Add(value); - RegisterForDeferredCallbackEvent(); - } - remove - { - m_CompletedActionT.Remove(value); - } - } - - internal event Action Destroyed - { - add - { - if (m_DestroyedAction == null) - m_DestroyedAction = DelegateList.CreateWithGlobalCache(); - m_DestroyedAction.Add(value); - } - remove - { - m_DestroyedAction.Remove(value); - } - } - - internal event Action CompletedTypeless - { - add - { - if (m_CompletedAction == null) - m_CompletedAction = DelegateList.CreateWithGlobalCache(); - m_CompletedAction.Add(value); - RegisterForDeferredCallbackEvent(); - } - remove - { - m_CompletedAction.Remove(value); - } - } - - /// - internal AsyncOperationStatus Status { get { return m_Status; } } - /// - internal Exception OperationException - { - get { return m_Error; } - private set - { - m_Error = value; - if (m_Error != null && ResourceManager.ExceptionHandler != null) - ResourceManager.ExceptionHandler(new AsyncOperationHandle(this), value); - } - } - internal bool MoveNext() { return !IsDone; } - internal void Reset() { } - internal object Current { get { return null; } } // should throw exception? - internal bool IsDone { get { return Status == AsyncOperationStatus.Failed || Status == AsyncOperationStatus.Succeeded; } } - internal float PercentComplete - { - get - { - if (m_Status == AsyncOperationStatus.None) - { - try - { - return Progress; - } - catch - { - return 0.0f; - } - } - return 1.0f; - } - } - - internal void InvokeCompletionEvent() - { - if (m_CompletedAction != null) - { - m_CompletedAction.Invoke(new AsyncOperationHandle(this)); - m_CompletedAction.Clear(); - } - - if (m_CompletedActionT != null) - { - m_CompletedActionT.Invoke(new AsyncOperationHandle(this)); - m_CompletedActionT.Clear(); - } - if (m_waitHandle != null) - m_waitHandle.Set(); - - m_InDeferredCallbackQueue = false; - } - - internal AsyncOperationHandle Handle { get { return new AsyncOperationHandle(this); } } - - DelegateList m_UpdateCallbacks; - Action m_UpdateCallback; - - //bool m_IsExecuting; - - private void UpdateCallback(float unscaledDeltaTime) - { - IUpdateReceiver updateOp = this as IUpdateReceiver; - updateOp.Update(unscaledDeltaTime); - } - - /// - /// Complete the operation and invoke events. - /// - /// The result object for the operation. - /// True if successful. - /// The error message if the operation has failed. - public void Complete(TObject result, bool success, string errorMsg) - { - IUpdateReceiver upOp = this as IUpdateReceiver; - if (m_UpdateCallbacks != null && upOp != null) - m_UpdateCallbacks.Remove(m_UpdateCallback); - - m_Result = result; - m_Status = success ? AsyncOperationStatus.Succeeded : AsyncOperationStatus.Failed; - - m_RM.PostDiagnosticEvent(new AsyncOperationHandle(this), ResourceManager.DiagnosticEventType.AsyncOperationPercentComplete, 1); - m_RM.PostDiagnosticEvent(new AsyncOperationHandle(this), ResourceManager.DiagnosticEventType.AsyncOperationComplete); - - if (m_Status == AsyncOperationStatus.Failed) - { - if (string.IsNullOrEmpty(errorMsg)) - errorMsg = "Unknown error in AsyncOperation"; - m_RM.PostDiagnosticEvent(new AsyncOperationHandle(this), ResourceManager.DiagnosticEventType.AsyncOperationFail, 0, errorMsg); - - OperationException = new Exception(errorMsg); - - ICachable cachedOperation = this as ICachable; - if (cachedOperation != null) - m_RM.RemoveOperationFromCache(cachedOperation.Hash); - - RegisterForDeferredCallbackEvent(false); - } - else - { - InvokeCompletionEvent(); - DecrementReferenceCount(); - } - } - - - internal void Start(ResourceManager rm, AsyncOperationHandle dependency, DelegateList updateCallbacks) - { - m_RM = rm; - m_RM.PostDiagnosticEvent(new AsyncOperationHandle(this), ResourceManager.DiagnosticEventType.AsyncOperationCreate); - m_RM.PostDiagnosticEvent(new AsyncOperationHandle(this), ResourceManager.DiagnosticEventType.AsyncOperationPercentComplete, 0); - IncrementReferenceCount(); // keep a reference until the operation completes - m_UpdateCallbacks = updateCallbacks; - if (dependency.IsValid() && !dependency.IsDone) - dependency.Completed += m_dependencyCompleteAction; - else - InvokeExecute(); - } - - private void InvokeExecute() - { - // m_IsExecuting = true; - Execute(); - IUpdateReceiver upOp = this as IUpdateReceiver; - if (upOp != null) - m_UpdateCallbacks.Add(m_UpdateCallback); - - // m_IsExecuting = false; - } - - event Action IAsyncOperation.CompletedTypeless - { - add { CompletedTypeless += value; } - remove { CompletedTypeless -= value; } - } - - event Action IAsyncOperation.Destroyed - { - add - { - Destroyed += value; - } - - remove - { - Destroyed -= value; - } - } - - int IAsyncOperation.Version { get { return Version; } } - - int IAsyncOperation.ReferenceCount { get { return ReferenceCount; } } - - float IAsyncOperation.PercentComplete { get { return PercentComplete; } } - - AsyncOperationStatus IAsyncOperation.Status { get { return Status; } } - - Exception IAsyncOperation.OperationException { get { return OperationException; } } - - bool IAsyncOperation.IsDone { get { return IsDone; } } - - AsyncOperationHandle IAsyncOperation.Handle { get { return Handle; } } - - Action IAsyncOperation.OnDestroy { set { OnDestroy = value; } } - - string IAsyncOperation.DebugName { get { return DebugName; } } - - - object IAsyncOperation.GetResultAsObject() - { - return m_Result; - } - - Type IAsyncOperation.ResultType { get { return typeof(TObject); } } - void IAsyncOperation.GetDependencies(List deps) { GetDependencies(deps); } - - void IAsyncOperation.DecrementReferenceCount() { DecrementReferenceCount(); } - - void IAsyncOperation.IncrementReferenceCount() { IncrementReferenceCount(); } - - void IAsyncOperation.InvokeCompletionEvent() { InvokeCompletionEvent(); } - - void IAsyncOperation.Start(ResourceManager rm, AsyncOperationHandle dependency, DelegateList updateCallbacks) - { - Start(rm, dependency, updateCallbacks); - } - - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/AsyncOperationBase.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/AsyncOperationBase.cs.meta deleted file mode 100644 index 53269fe8..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/AsyncOperationBase.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: f9fa130dc1a674f38a215c4f52e2b420 -timeCreated: 1503083765 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/AsyncOperationHandle.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/AsyncOperationHandle.cs deleted file mode 100644 index 5e29f5d5..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/AsyncOperationHandle.cs +++ /dev/null @@ -1,379 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace UnityEngine.ResourceManagement.AsyncOperations -{ - /// - /// Handle for internal operations. This allows for reference counting and checking for valid references. - /// - /// The object type of the underlying operation. - public struct AsyncOperationHandle : IEnumerator, IEquatable> - { - /// - /// Get hash code of this struct. - /// - /// - public override int GetHashCode() - { - return m_InternalOp == null ? 0 : m_InternalOp.GetHashCode() * 17 + m_Version; - } - - /// - /// Provide equality for this struct. - /// - /// The operation to compare to. - /// - public bool Equals(AsyncOperationHandle other) - { - return m_Version == other.m_Version && m_InternalOp == other.m_InternalOp; - } - - /// - /// Return a Task object to wait on when using async await. - /// - public System.Threading.Tasks.Task Task - { - get { return InternalOp.Task; } - } - - /// - /// Debug name of the operation. - /// - public string DebugName - { - get - { - if (!IsValid()) - return "InvalidHandle"; - return ((IAsyncOperation)InternalOp).DebugName; - } - } - - /// - /// Check if the handle references an internal operation. - /// - /// True if valid. - public bool IsValid() - { - return m_InternalOp != null && m_InternalOp.Version == m_Version; - } - - /// - /// Release the handle. If the internal operation reference count reaches 0, the resource will be released. - /// - internal void Release() - { - InternalOp.DecrementReferenceCount(); - m_InternalOp = null; - } - - /// - /// Acquire a new handle to the internal operation. This will increment the reference count, therefore the returned handle must also be released. - /// - /// A new handle to the operation. This handle must also be released. - internal AsyncOperationHandle Acquire() - { - InternalOp.IncrementReferenceCount(); - return this; - } - - /// - /// The current reference count of the internal operation. - /// - internal int ReferenceCount - { - get { return InternalOp.ReferenceCount; } - } - - /// - /// The progress of the internal operation. - /// - public float PercentComplete - { - get { return InternalOp.PercentComplete; } - } - - /// - /// The status of the internal operation. - /// - public AsyncOperationStatus Status - { - get { return InternalOp.Status; } - } - - /// - /// Completion event for the internal operation. If this is assigned on a completed operation, the callback is deferred until the LateUpdate of the current frame. - /// - public event Action> Completed - { - add { InternalOp.Completed += value; } - remove { InternalOp.Completed -= value; } - } - - /// - /// Completion event for non-typed callback handlers. If this is assigned on a completed operation, the callback is deferred until the LateUpdate of the current frame. - /// - public event Action CompletedTypeless - { - add { InternalOp.CompletedTypeless += value; } - remove { InternalOp.CompletedTypeless -= value; } - } - - /// - /// Event for handling the destruction of the operation. - /// - public event Action Destroyed - { - add { InternalOp.Destroyed += value; } - remove { InternalOp.Destroyed -= value; } - } - - /// - /// The exception for a failed operation. This will be null unless Status is failed. - /// - public Exception OperationException - { - get { return InternalOp.OperationException; } - } - - /// - /// The result object of the operations. - /// - public TObject Result - { - get { return InternalOp.Result; } - } - - /// - /// True if the operation is complete. - /// - public bool IsDone - { - get { return !IsValid() || InternalOp.IsDone; } - } - - /// - /// Conversion between typed and non typed handles. - /// - /// - static public implicit operator AsyncOperationHandle(AsyncOperationHandle obj) - { - return new AsyncOperationHandle(obj.m_InternalOp); - } - - private AsyncOperationBase m_InternalOp; - private int m_Version; - - internal AsyncOperationHandle(AsyncOperationBase op) - { - m_InternalOp = op; - m_Version = m_InternalOp.Version; - } - - internal AsyncOperationHandle(IAsyncOperation op) - { - m_InternalOp = (AsyncOperationBase)op; - m_Version = m_InternalOp.Version; - } - - AsyncOperationBase InternalOp - { - get - { - if (m_InternalOp == null || m_InternalOp.Version != m_Version) - throw new Exception("Attempting to use an invalid operation handle"); - return m_InternalOp; - } - } - - - bool IEnumerator.MoveNext() - { - return !IsDone; - } - - void IEnumerator.Reset() { } - - object IEnumerator.Current - { - get { return Result; } - } - - - } - - /// - /// Non typed operation handle. This allows for reference counting and checking for valid references. - /// - public struct AsyncOperationHandle : IEnumerator - { - internal IAsyncOperation m_InternalOp; - private int m_Version; - - internal AsyncOperationHandle(IAsyncOperation op) - { - m_InternalOp = op; - m_Version = op != null ? op.Version : 0; - } - - /// - /// Check if the internal operation is not null and has the same version of this handle. - /// - /// True if valid. - public bool IsValid() - { - return m_InternalOp != null && m_InternalOp.Version == m_Version; - } - - /// - /// Debug name of the operation. - /// - public string DebugName - { - get - { - if (!IsValid()) - return "InvalidHandle"; - return InternalOp.DebugName; - } - } - - - /// - /// Get dependency operations. - /// - /// - public void GetDependencies(List deps) - { - InternalOp.GetDependencies(deps); - } - - IAsyncOperation InternalOp - { - get - { - if (m_InternalOp == null || m_InternalOp.Version != m_Version) - throw new Exception("Attempting to use an invalid operation handle"); - - return m_InternalOp; - } - } - - /// - /// Converts handle to be typed. This does not increment the reference count. - /// - /// The type of the handle. - /// A new handle that is typed. - public AsyncOperationHandle Convert() - { - return new AsyncOperationHandle(InternalOp); - } - - /// - /// Release the handle. If the internal operation reference count reaches 0, the resource will be released. - /// - internal void Release() - { - InternalOp.DecrementReferenceCount(); - m_InternalOp = null; - } - - /// - /// Acquire a new handle to the internal operation. This will increment the reference count, therefore the returned handle must also be released. - /// - /// A new handle to the operation. This handle must also be released. - internal AsyncOperationHandle Acquire() - { - InternalOp.IncrementReferenceCount(); - return this; - } - - /// - /// The current reference count of the internal operation. - /// - internal int ReferenceCount - { - get { return InternalOp.ReferenceCount; } - } - - /// - /// Return a Task object to wait on when using async await. - /// - public System.Threading.Tasks.Task Task - { - get { return InternalOp.Task; } - } - - /// - /// The progress of the internal operation. - /// - public float PercentComplete - { - get { return InternalOp.PercentComplete; } - } - - /// - /// The status of the internal operation. - /// - public AsyncOperationStatus Status - { - get { return InternalOp.Status; } - } - - /// - /// Completion event for the internal operation. If this is assigned on a completed operation, the callback is deferred until the LateUpdate of the current frame. - /// - public event Action Completed - { - add { InternalOp.CompletedTypeless += value; } - remove { InternalOp.CompletedTypeless -= value; } - } - - /// - /// Event for handling the destruction of the operation. - /// - public event Action Destroyed - { - add { InternalOp.Destroyed += value; } - remove { InternalOp.Destroyed -= value; } - } - - /// - /// The exception for a failed operation. This will be null unless Status is failed. - /// - public Exception OperationException - { - get { return InternalOp.OperationException; } - } - - /// - /// The result object of the operations. - /// - public object Result - { - get { return InternalOp.GetResultAsObject(); } - } - - bool IEnumerator.MoveNext() - { - return !IsDone; - } - - void IEnumerator.Reset() { } - - object IEnumerator.Current - { - get { return Result; } - } - - /// - /// True if the operation is complete. - /// - public bool IsDone - { - get { return !IsValid() || InternalOp.IsDone; } - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/AsyncOperationHandle.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/AsyncOperationHandle.cs.meta deleted file mode 100644 index f5572632..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/AsyncOperationHandle.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c3b0971a8e5dab44a959bfe453348846 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/ChainOperation.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/ChainOperation.cs deleted file mode 100644 index 76aaa1c0..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/ChainOperation.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.Util; - -namespace UnityEngine.ResourceManagement -{ - class ChainOperation : AsyncOperationBase - { - AsyncOperationHandle m_DepOp; - AsyncOperationHandle m_WrappedOp; - Func, AsyncOperationHandle> m_Callback; - Action> m_CachedOnWrappedCompleted; - public ChainOperation() - { - m_CachedOnWrappedCompleted = OnWrappedCompleted; - } - protected override string DebugName { get { return string.Format("{2} - Chain<{0},{1}>", typeof(TObject).Name, typeof(TObjectDependency).Name, m_DepOp.DebugName); } } - - protected override void GetDependencies(List deps) - { - deps.Add(m_DepOp); - } - - public void Init(AsyncOperationHandle dependentOp, Func, AsyncOperationHandle> callback) - { - m_DepOp = dependentOp; - m_DepOp.Acquire(); - m_Callback = callback; - } - - protected override void Execute() - { - m_WrappedOp = m_Callback(m_DepOp); - m_WrappedOp.Completed += m_CachedOnWrappedCompleted; - m_Callback = null; - } - - private void OnWrappedCompleted(AsyncOperationHandle x) - { - string errorMsg = string.Empty; - if (x.Status == AsyncOperationStatus.Failed) - errorMsg = string.Format("ChainOperation of Type: {0} failed because dependent operation failed\n{1}", typeof(TObject), x.OperationException != null ? x.OperationException.Message : string.Empty); - Complete(m_WrappedOp.Result, x.Status == AsyncOperationStatus.Succeeded, errorMsg); - } - - protected override void Destroy() - { - m_WrappedOp.Release(); - m_DepOp.Release(); - } - - protected override float Progress => m_DepOp.PercentComplete; - } - - class ChainOperationTypelessDepedency : AsyncOperationBase - { - AsyncOperationHandle m_DepOp; - AsyncOperationHandle m_WrappedOp; - Func> m_Callback; - Action> m_CachedOnWrappedCompleted; - public ChainOperationTypelessDepedency() - { - m_CachedOnWrappedCompleted = OnWrappedCompleted; - } - protected override string DebugName { get { return string.Format("{1} - Chain<{0}>", typeof(TObject).Name, m_DepOp.DebugName); } } - - protected override void GetDependencies(List deps) - { - deps.Add(m_DepOp); - } - - public void Init(AsyncOperationHandle dependentOp, Func> callback) - { - m_DepOp = dependentOp; - m_DepOp.Acquire(); - m_Callback = callback; - } - - protected override void Execute() - { - m_WrappedOp = m_Callback(m_DepOp); - m_WrappedOp.Completed += m_CachedOnWrappedCompleted; - m_Callback = null; - } - - private void OnWrappedCompleted(AsyncOperationHandle x) - { - string errorMsg = string.Empty; - if (x.Status == AsyncOperationStatus.Failed) - errorMsg = string.Format("ChainOperation of Type: {0} failed because dependent operation failed\n{1}", typeof(TObject), x.OperationException != null ? x.OperationException.Message : string.Empty); - Complete(m_WrappedOp.Result, x.Status == AsyncOperationStatus.Succeeded, errorMsg); - } - - protected override void Destroy() - { - m_WrappedOp.Release(); - m_DepOp.Release(); - } - - protected override float Progress => m_DepOp.PercentComplete; - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/ChainOperation.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/ChainOperation.cs.meta deleted file mode 100644 index 7d48602a..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/ChainOperation.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4d148220e8d54054e851e5c220feea5f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/GroupOperation.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/GroupOperation.cs deleted file mode 100644 index 37f0ac79..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/GroupOperation.cs +++ /dev/null @@ -1,105 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.ResourceProviders; -using UnityEngine.ResourceManagement.Util; - -namespace UnityEngine.ResourceManagement.AsyncOperations -{ - - class GroupOperation : AsyncOperationBase>, ICachable - { - List m_Result; - Action m_InternalOnComplete; - int m_LoadedCount; - public GroupOperation() - { - m_InternalOnComplete = OnOperationCompleted; - m_Result = new List(); - } - - int ICachable.Hash { get; set; } - - internal IList GetDependentOps() - { - return m_Result; - } - - protected override void GetDependencies(List deps) - { - deps.AddRange(m_Result); - } - - protected override string DebugName { get { return "Dependencies"; } } - - protected override void Execute() - { - m_LoadedCount = 0; - for (int i = 0; i < m_Result.Count; i++) - { - if (m_Result[i].IsDone) - m_LoadedCount++; - else - m_Result[i].Completed += m_InternalOnComplete; - } - CompleteIfDependenciesComplete(); - } - - private void CompleteIfDependenciesComplete() - { - if (m_LoadedCount == m_Result.Count) - { - bool success = true; - string errorMsg = string.Empty; - for (int i = 0; i < m_Result.Count; i++) - { - if (m_Result[i].Status != AsyncOperationStatus.Succeeded) - { - success = false; - errorMsg = m_Result[i].OperationException != null ? m_Result[i].OperationException.Message : string.Empty; - break; - } - } - Complete(m_Result, success, errorMsg); - } - } - - protected override void Destroy() - { - for (int i = 0; i < m_Result.Count; i++) - m_Result[i].Release(); - m_Result.Clear(); - } - - protected override float Progress - { - get - { - List allDependentOperations = new List(); - allDependentOperations.AddRange(m_Result); - - foreach(var handle in m_Result) - handle.GetDependencies(allDependentOperations); - - if (m_Result.Count < 1) - return 1f; - float total = 0; - for (int i = 0; i < allDependentOperations.Count; i++) - total += allDependentOperations[i].PercentComplete; - return total / allDependentOperations.Count; - } - } - - - public void Init(List operations) - { - m_Result = new List(operations); - } - - void OnOperationCompleted(AsyncOperationHandle op) - { - m_LoadedCount++; - CompleteIfDependenciesComplete(); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/GroupOperation.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/GroupOperation.cs.meta deleted file mode 100644 index 8125be1a..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/GroupOperation.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f5fa1c5d453431041ab1e49b72e569e2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/IAsyncOperation.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/IAsyncOperation.cs deleted file mode 100644 index 3781fba9..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/IAsyncOperation.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine.ResourceManagement.ResourceLocations; - -namespace UnityEngine.ResourceManagement.AsyncOperations -{ - /// - /// Status values for IAsyncOperations - /// - public enum AsyncOperationStatus - { - None, - Succeeded, - Failed - } - -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/IAsyncOperation.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/IAsyncOperation.cs.meta deleted file mode 100644 index 9df3be5c..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/IAsyncOperation.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 5c8ade5b4e928b24a97622354da23b6e -timeCreated: 1490235302 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/ProviderOperation.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/ProviderOperation.cs deleted file mode 100644 index 08cf3d47..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/ProviderOperation.cs +++ /dev/null @@ -1,188 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.ResourceProviders; -using UnityEngine.ResourceManagement.Util; - -namespace UnityEngine.ResourceManagement.AsyncOperations -{ - internal interface IGenericProviderOperation - { - void Init(ResourceManager rm, IResourceProvider provider, IResourceLocation location, AsyncOperationHandle> depOp); - int ProvideHandleVersion { get; } - IResourceLocation Location { get; } - int DependencyCount { get; } - void GetDependencies(IList dstList); - TDepObject GetDependency(int index); - void SetProgressCallback(Func callback); - void ProviderCompleted(T result, bool status, Exception e); - Type RequestedType { get; } - } - - internal class ProviderOperation : AsyncOperationBase, IGenericProviderOperation, ICachable - { - private Action m_CompletionCallback; - private Action> m_GetDepCallback; - private Func m_GetProgressCallback; - private IResourceProvider m_Provider; - private AsyncOperationHandle> m_DepOp; - private IResourceLocation m_Location; - private int m_ProvideHandleVersion; - private TObject m_Result; - private bool m_NeedsRelease; - int ICachable.Hash { get; set; } - private ResourceManager m_ResourceManager; - - public int ProvideHandleVersion { get { return m_ProvideHandleVersion; } } - public IResourceLocation Location { get { return m_Location; } } - - public ProviderOperation() - { - } - - protected override void GetDependencies(List deps) - { - if(m_DepOp.IsValid()) - deps.Add(m_DepOp); - } - - protected override string DebugName - { - get - { - return string.Format("Resource<{0}>({1})", typeof(TObject).Name, m_Location == null ? "Invalid" : ShortenPath(m_Location.InternalId, true)); - } - } - - internal const string kInvalidHandleMsg = "The ProvideHandle is invalid. After the handle has been completed, it can no longer be used"; - - public void GetDependencies(IList dstList) - { - dstList.Clear(); - - if (!m_DepOp.IsValid()) - return; - - if (m_DepOp.Result == null) - return; - - for (int i = 0; i < m_DepOp.Result.Count; i++) - dstList.Add(m_DepOp.Result[i].Result); - } - - public Type RequestedType { get { return typeof(TObject); } } - - public int DependencyCount { - get { - return (!m_DepOp.IsValid() || m_DepOp.Result == null) ? 0 : m_DepOp.Result.Count; - } - } - - public TDepObject GetDependency(int index) - { - if (!m_DepOp.IsValid() || m_DepOp.Result == null) - throw new Exception("Cannot get dependency because no dependencies were available"); - - return (TDepObject)(m_DepOp.Result[index].Result); - } - - public void SetProgressCallback(Func callback) - { - m_GetProgressCallback = callback; - } - - public void ProviderCompleted(T result, bool status, Exception e) - { - m_ProvideHandleVersion++; - m_GetProgressCallback = null; - - m_NeedsRelease = status; - - ProviderOperation top = this as ProviderOperation; - if (top != null) - { - top.m_Result = result; - } - else if (result == null && !typeof(TObject).IsValueType) - { - m_Result = (TObject)(object)null; - } - else if(result != null && typeof(TObject).IsAssignableFrom(result.GetType())) - { - m_Result = (TObject)(object)result; - } - else - { - string errorMsg = string.Format("Provider of type {0} with id {1} has provided a result of type {2} which cannot be converted to requested type {3}. The operation will be marked as failed.", m_Provider.GetType().ToString(), m_Provider.ProviderId, typeof(T), typeof(TObject)); - Complete(m_Result, false, errorMsg); - throw new Exception(errorMsg); - } - - Complete(m_Result, status, e != null ? e.Message : string.Empty); - } - protected override float Progress - { - get - { - if (m_GetProgressCallback == null) - return 0.0f; - try - { - List allDependantOperations = new List() { m_DepOp }; - - float total = m_GetProgressCallback(); - foreach (var handle in m_DepOp.Result) - handle.GetDependencies(allDependantOperations); - - foreach (var handle in allDependantOperations) - total += handle.PercentComplete; - - return total / (DependencyCount + 1); - } - catch - { - return 0.0f; - } - } - } - - protected override void Execute() - { - Debug.Assert(m_DepOp.IsDone); - - if (m_DepOp.IsValid() && m_DepOp.Status == AsyncOperationStatus.Failed && (m_Provider.BehaviourFlags & ProviderBehaviourFlags.CanProvideWithFailedDependencies) == 0) - { - ProviderCompleted(default(TObject), false, new Exception("Dependency Exception", m_DepOp.OperationException)); - } - else - { - try - { - m_Provider.Provide(new ProvideHandle(m_ResourceManager, this)); - } - catch (Exception e) - { - ProviderCompleted(default(TObject), false, e); - } - } - } - - public void Init(ResourceManager rm, IResourceProvider provider, IResourceLocation location, AsyncOperationHandle> depOp) - { - m_ResourceManager = rm; - m_DepOp = depOp; - if (m_DepOp.IsValid()) - m_DepOp.Acquire(); - m_Provider = provider; - m_Location = location; - } - - protected override void Destroy() - { - if (m_NeedsRelease) - m_Provider.Release(m_Location, m_Result); - if (m_DepOp.IsValid()) - m_DepOp.Release(); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/ProviderOperation.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/ProviderOperation.cs.meta deleted file mode 100644 index f79f65cc..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/AsyncOperations/ProviderOperation.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b28e4f74756c9e3418600f517d56e9f2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Diagnostics.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Diagnostics.meta deleted file mode 100644 index 88d9f30b..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Diagnostics.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: ba3ec7deec18d144e848686e9d4e18bf -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Diagnostics/DiagnosticEvent.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Diagnostics/DiagnosticEvent.cs deleted file mode 100644 index f85bd412..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Diagnostics/DiagnosticEvent.cs +++ /dev/null @@ -1,102 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using UnityEngine.Serialization; - -namespace UnityEngine.ResourceManagement.Diagnostics -{ - /// - /// Diagnostic event data. - /// - [Serializable] - public struct DiagnosticEvent - { - [SerializeField] - string m_Graph; //id of graph definition to use - [SerializeField] - int[] m_Dependencies; //used to nest datagraphs - [SerializeField] - int m_ObjectId; //id of a set of data streams - [SerializeField] - string m_DisplayName; - [SerializeField] - int m_Stream; //data stream - [SerializeField] - int m_Frame; //frame of the event - [SerializeField] - int m_Value; //data value of event - - /// - /// Gets the graph id that this event is intended for - /// - /// The graph Id - public string Graph { get { return m_Graph; } } - /// - /// Unique object identifier for this event - /// - public int ObjectId { get { return m_ObjectId; } } - /// - /// Display name for event - /// - public string DisplayName { get { return m_DisplayName; } } - /// - /// Array of object identifiers that are dependencies for this event - /// - public int[] Dependencies { get { return m_Dependencies; } } - /// - /// The stream id for the event. Each graph may display multiple streams of data for the same event Id - /// - /// Stream Id - public int Stream { get { return m_Stream; } } - /// - /// The frame that the event occurred - /// - /// Frame number - public int Frame { get { return m_Frame; } } - /// - /// The value of the event. This value depends on the event type - /// - /// Event value - public int Value { get { return m_Value; } } - - /// - /// DiagnosticEvent constructor - /// - /// Graph id. - /// Event name. - /// Event id. - /// Stream index. - /// Frame number. - /// Event value. - /// Array of dependency event ids. - public DiagnosticEvent(string graph, string name, int id, int stream, int frame, int value, int[] deps) - { - m_Graph = graph; - m_DisplayName = name; - m_ObjectId = id; - m_Stream = stream; - m_Frame = frame; - m_Value = value; - m_Dependencies = deps; - } - - /// - /// Serializes the event into JSON and then encodes with System.Text.Encoding.ASCII.GetBytes - /// - /// Byte array containing serialized version of the event - internal byte[] Serialize() - { - return Encoding.ASCII.GetBytes(JsonUtility.ToJson(this)); - } - - /// - /// Deserializes event from a byte array created by the method - /// - /// Deserialized DiagnosticEvent struct - /// Serialized data - public static DiagnosticEvent Deserialize(byte[] data) - { - return JsonUtility.FromJson(Encoding.ASCII.GetString(data)); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Diagnostics/DiagnosticEvent.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Diagnostics/DiagnosticEvent.cs.meta deleted file mode 100644 index 0976b1cb..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Diagnostics/DiagnosticEvent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8262b6bbc428e3147b18b7f7f4527359 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Diagnostics/DiagnosticEventCollector.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Diagnostics/DiagnosticEventCollector.cs deleted file mode 100644 index 22238e9a..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Diagnostics/DiagnosticEventCollector.cs +++ /dev/null @@ -1,177 +0,0 @@ -using System; -using System.Collections.Generic; -// ReSharper disable DelegateSubtraction - -#if UNITY_EDITOR -using UnityEditor; -using UnityEditor.Networking.PlayerConnection; -#endif - -using UnityEngine.Networking.PlayerConnection; -using UnityEngine.ResourceManagement.Util; - -namespace UnityEngine.ResourceManagement.Diagnostics -{ - /// - /// Collects ResourceManager events and passed them on the registered event handlers. In editor play mode, events are passed directly to the ResourceManager profiler window. - /// In player builds, events are sent to the editor via the EditorConnection API. - /// - public class DiagnosticEventCollector : MonoBehaviour - { - static Guid s_editorConnectionGuid; - - Dictionary m_CreatedEvents = new Dictionary(); - List k_UnhandledEvents = new List(); - - DelegateList s_EventHandlers = DelegateList.CreateWithGlobalCache(); - static DiagnosticEventCollector s_Collector; - /// - /// Retrieves the global event collector. A new one is created if needed. - /// - /// The event collector global instance. - public static DiagnosticEventCollector FindOrCreateGlobalInstance() - { - if (s_Collector == null) - { - var go = new GameObject("EventCollector", typeof(DiagnosticEventCollector)); - s_Collector = go.GetComponent(); - go.hideFlags = HideFlags.DontSave;// HideFlags.HideAndDontSave; - } - return s_Collector; - } - - /// - /// The guid used for the PlayerConnect messaging system. - /// - public static Guid PlayerConnectionGuid - { - get - { - if(s_editorConnectionGuid == Guid.Empty) - s_editorConnectionGuid = new Guid(1, 2, 3, new byte[] { 20, 1, 32, 32, 4, 9, 6, 44 }); - return s_editorConnectionGuid; - } - } - - /// - /// Register for diagnostic events. If there is no collector, this will fail and return false. - /// - /// The handler method action. - /// Register or unregister. - /// If true, the event collector will be created if needed. - /// True if registered, false if not. - public static bool RegisterEventHandler(Action handler, bool register, bool create) - { - var ec = s_Collector; - if (ec == null && create && register) - ec = FindOrCreateGlobalInstance(); - if (ec == null) - return false; - if (register) - ec.RegisterEventHandler(handler); - else - ec.UnregisterEventHandler(handler); - return register; - } - - void RegisterEventHandler(Action handler) - { - Debug.Assert(k_UnhandledEvents != null, "DiagnosticEventCollector.RegisterEventHandler - s_unhandledEvents == null."); - if (handler == null) - throw new ArgumentNullException("handler"); - s_EventHandlers.Add(handler); - foreach (var c in m_CreatedEvents) - handler(c.Value); - foreach (var e in k_UnhandledEvents) - handler(e); - k_UnhandledEvents.Clear(); - } - - /// - /// Unregister event hander - /// - /// Method or delegate that will handle the events - public void UnregisterEventHandler(Action handler) - { - if (handler == null) - throw new ArgumentNullException("handler"); - s_EventHandlers.Remove(handler); - } - - /// - /// Send a event to all registered handlers - /// - /// The event to send - public void PostEvent(DiagnosticEvent diagnosticEvent) - { - if (diagnosticEvent.Stream == (int)ResourceManager.DiagnosticEventType.AsyncOperationCreate && !m_CreatedEvents.ContainsKey(diagnosticEvent.ObjectId)) - m_CreatedEvents.Add(diagnosticEvent.ObjectId, diagnosticEvent); - else if (diagnosticEvent.Stream == (int)ResourceManager.DiagnosticEventType.AsyncOperationDestroy) - m_CreatedEvents.Remove(diagnosticEvent.ObjectId); - - Debug.Assert(k_UnhandledEvents != null, "DiagnosticEventCollector.PostEvent - s_unhandledEvents == null."); - - if (s_EventHandlers.Count > 0) - s_EventHandlers.Invoke(diagnosticEvent); - else - k_UnhandledEvents.Add(diagnosticEvent); - } - - void Awake() - { - DontDestroyOnLoad(gameObject); -#if !UNITY_EDITOR - RegisterEventHandler((DiagnosticEvent diagnosticEvent) => {PlayerConnection.instance.Send(DiagnosticEventCollector.PlayerConnectionGuid, diagnosticEvent.Serialize()); }); -#endif - } - - float m_lastTickSent = 0; - int m_lastFrame = 0; - float fpsAvg = 30; - void Update() - { - if (s_EventHandlers.Count > 0) - { - var elapsed = Time.realtimeSinceStartup - m_lastTickSent; - if (elapsed > .25f) - { - var fps = (Time.frameCount - m_lastFrame) / elapsed; - m_lastFrame = Time.frameCount; - fpsAvg = (fpsAvg + fps) * .5f; - m_lastTickSent = Time.realtimeSinceStartup; - int heapKB = (int)(Profiling.Profiler.GetMonoUsedSizeLong() / 1024); - PostEvent(new DiagnosticEvent("FrameCount", "FPS", 2, 1, Time.frameCount, (int)fpsAvg, null)); - PostEvent(new DiagnosticEvent("MemoryCount", "MonoHeap", 3, 2, Time.frameCount, heapKB, null)); - } - } - } - - private void OnApplicationQuit() - { - if(s_Collector != null) - Destroy(s_Collector.gameObject); - } - -#if UNITY_EDITOR - [InitializeOnLoad] - public static class PlayStateNotifier - { - static PlayStateNotifier() - { - EditorApplication.playModeStateChanged += ModeChanged; - } - - static void ModeChanged(PlayModeStateChange state) - { - - if (state == PlayModeStateChange.ExitingPlayMode) - { - if(s_Collector != null) - DestroyImmediate(s_Collector.gameObject); - } - } - } -#endif - - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Diagnostics/DiagnosticEventCollector.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Diagnostics/DiagnosticEventCollector.cs.meta deleted file mode 100644 index fd6e73b9..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Diagnostics/DiagnosticEventCollector.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 09b260528be79b74ab75d43b23001eab -timeCreated: 1509377634 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceLocations.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceLocations.meta deleted file mode 100644 index 47435017..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceLocations.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 2c38782eb8fd84ba1b42d3abaf4717a8 -folderAsset: yes -timeCreated: 1503087283 -licenseType: Pro -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceLocations/ILocationSizeData.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceLocations/ILocationSizeData.cs deleted file mode 100644 index 32603bff..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceLocations/ILocationSizeData.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -namespace UnityEngine.ResourceManagement.ResourceLocations -{ - /// - /// Interface for computing size of loading a location. - /// - public interface ILocationSizeData - { - /// - /// Compute the numder of bytes need to download for the specified location. - /// - /// The location to compute the size for. - /// The size in bytes of the data needed to be downloaded. - long ComputeSize(IResourceLocation loc); - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceLocations/ILocationSizeData.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceLocations/ILocationSizeData.cs.meta deleted file mode 100644 index 3e2c24f7..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceLocations/ILocationSizeData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4f2308a41f0f71948bf45196f5b2d8ef -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceLocations/IResourceLocation.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceLocations/IResourceLocation.cs deleted file mode 100644 index fde9bd40..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceLocations/IResourceLocation.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace UnityEngine.ResourceManagement.ResourceLocations -{ - /// - /// Contains enough information to load an asset (what/where/how/dependencies) - /// - public interface IResourceLocation - { - /// - /// Internal name used by the provider to load this location - /// - /// The identifier. - string InternalId { get; } - - /// - /// Matches the provider used to provide/load this location - /// - /// The provider id. - string ProviderId { get; } - - /// - /// Gets the dependencies to other IResourceLocations - /// - /// The dependencies. - IList Dependencies { get; } - - /// - /// The hash of this location combined with the specified type. - /// - /// The type of the result. - /// The combined hash of the location and the type. - int Hash(Type resultType); - - /// - /// The precomputed hash code of the dependencies. - /// - int DependencyHashCode { get; } - - /// - /// Gets the dependencies to other IResourceLocations - /// - /// The dependencies. - bool HasDependencies { get; } - - /// - /// Gets any data object associated with this locations - /// - /// The object. - object Data { get; } - - /// - /// Primary address for this location. - /// - string PrimaryKey { get; } - - /// - /// The type of the resource for th location. - /// - Type ResourceType { get; } - - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceLocations/IResourceLocation.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceLocations/IResourceLocation.cs.meta deleted file mode 100644 index 957d4ad3..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceLocations/IResourceLocation.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 3e78249b603b049aa9dfd59ec52d2f30 -timeCreated: 1503083765 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceLocations/ResourceLocationBase.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceLocations/ResourceLocationBase.cs deleted file mode 100644 index 01d46c65..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceLocations/ResourceLocationBase.cs +++ /dev/null @@ -1,110 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace UnityEngine.ResourceManagement.ResourceLocations -{ - /// - /// Basic implementation of IResourceLocation - /// - public class ResourceLocationBase : IResourceLocation - { - string m_Name; - string m_Id; - string m_ProviderId; - object m_Data; - int m_DependencyHashCode; - int m_HashCode; - Type m_Type; - List m_Dependencies; - string m_PrimaryKey; - - /// - /// Internal id. - /// - public string InternalId { get { return m_Id; } } - /// - /// Provider Id. This is usually set to the FullName property of the type of the provider class. - /// - public string ProviderId { get { return m_ProviderId; } } - /// - /// List of dependencies that must be loaded before this location. This value may be null. - /// - public IList Dependencies { get { return m_Dependencies; } } - /// - /// Convenience method to see if there are any dependencies. - /// - public bool HasDependencies { get { return m_Dependencies != null && m_Dependencies.Count > 0; } } - /// - /// Data that is intended for the provider. Objects can be serialized during the build process to be used by the provider. An example of usage is cache usage data for AssetBundleProvider. - /// - public object Data { get { return m_Data; } set { m_Data = value; } } - - public string PrimaryKey - { - get { return m_PrimaryKey; } - set { m_PrimaryKey = value; } - } - - /// - /// Precomputed hash code of dependencies. - /// - public int DependencyHashCode { get { return m_DependencyHashCode; } } - - /// - /// The type of the resource for th location. - /// - public Type ResourceType { get { return m_Type; } } - - /// - /// Compute the hash of this location for the specified type. - /// - /// The type to hash with. - /// The combined hash code of the location and type. - public int Hash(Type t) - { - var hash = m_HashCode * 31 + t.GetHashCode(); - return hash; - } - - /// - /// Returns the name of the location. This is usally set to the primary key of the location, or its "address". - /// - /// - public override string ToString() - { - return m_Name; - } - - /// - /// Construct a new ResourceLocationBase. - /// - /// The name of the location. This is usually set to the primary key, or "address" of the location. - /// The internal id of the location. This is used by the IResourceProvider to identify the object to provide. For example this may contain the file path or url of an asset. - /// The provider id. This is set to the FullName of the type of the provder class. - /// Locations for the dependencies of this location. - public ResourceLocationBase(string name, string id, string providerId, Type t, params IResourceLocation[] dependencies) - { - if (string.IsNullOrEmpty(id)) - throw new ArgumentNullException(id); - if (string.IsNullOrEmpty(providerId)) - throw new ArgumentNullException(providerId); - m_HashCode = (name.GetHashCode() * 31 + id.GetHashCode()) * 31 + providerId.GetHashCode(); - m_Name = name; - m_Id = id; - m_ProviderId = providerId; - m_Dependencies = new List(dependencies); - m_Type = t; - ComputeDependencyHash(); - } - /// - /// Compute the dependency hash for this location - /// - public void ComputeDependencyHash() // TODO: dependency hash is no longer just objects - { - m_DependencyHashCode = m_Dependencies.Count > 0 ? 17 : 0; - foreach (var d in m_Dependencies) - m_DependencyHashCode = m_DependencyHashCode * 31 + d.Hash(typeof(object)); - } - } - -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceLocations/ResourceLocationBase.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceLocations/ResourceLocationBase.cs.meta deleted file mode 100644 index e2c288c5..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceLocations/ResourceLocationBase.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 9fb0f68aa5e81c448815f0b79325a30f -timeCreated: 1504897908 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceManager.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceManager.cs deleted file mode 100644 index aac5701b..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceManager.cs +++ /dev/null @@ -1,706 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Runtime.CompilerServices; -using UnityEngine.Networking; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.Diagnostics; -using UnityEngine.ResourceManagement.Exceptions; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.ResourceProviders; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.SceneManagement; - -[assembly: InternalsVisibleTo("Unity.ResourceManager.Tests")] -[assembly: InternalsVisibleTo("Unity.Addressables.Tests")] - -namespace UnityEngine.ResourceManagement -{ - /// - /// Entry point for ResourceManager API - /// - public class ResourceManager : IDisposable - { - /// - /// Event types that will be sent by the ResourceManager - /// - public enum DiagnosticEventType - { - EventCount, - FrameRate, - HeapSize, - AsyncOperationFail, - AsyncOperationCreate, - AsyncOperationPercentComplete, - AsyncOperationComplete, - AsyncOperationReferenceCount, - AsyncOperationDestroy, - } - - /// - /// Global exception handler. This will be called whenever an IAsyncOperation.OperationException is set to a non-null value. - /// - public static Action ExceptionHandler { get; set; } - - internal bool CallbackHooksEnabled = true; // tests might need to disable the callback hooks to manually pump updating - private MonoBehaviourCallbackHooks m_CallbackHooks; - - ListWithEvents m_ResourceProviders = new ListWithEvents(); - IAllocationStrategy m_allocator; - - // list of all the providers in s_ResourceProviders that implement IUpdateReceiver - ListWithEvents m_UpdateReceivers = new ListWithEvents(); - List m_UpdateReceiversToRemove = null; - bool m_UpdatingReceivers = false; - internal int OperationCacheCount { get { return m_AssetOperationCache.Count; } } - internal int InstanceOperationCount { get { return m_TrackedInstanceOperations.Count; } } - //cache of type + providerId to IResourceProviders for faster lookup - Dictionary m_providerMap = new Dictionary(); - Dictionary m_AssetOperationCache = new Dictionary(); - HashSet m_TrackedInstanceOperations = new HashSet(); - DelegateList m_UpdateCallbacks = DelegateList.CreateWithGlobalCache(); - List m_DeferredCompleteCallbacks = new List(); - - - Action m_diagnosticsHandler; - Action m_ReleaseOpNonCached; - Action m_ReleaseOpCached; - Action m_ReleaseInstanceOp; - static int s_GroupOperationTypeHash = typeof(GroupOperation).GetHashCode(); - static int s_InstanceOperationTypeHash = typeof(InstanceOperation).GetHashCode(); - - /// - /// Add an update reveiver. - /// - /// The object to add. The Update method will be called until the object is removed. - public void AddUpdateReceiver(IUpdateReceiver receiver) - { - if (receiver == null) - return; - m_UpdateReceivers.Add(receiver); - } - - /// - /// Remove update receiver. - /// - /// The object to remove. - public void RemoveUpdateReciever(IUpdateReceiver receiver) - { - if (receiver == null) - return; - - if (m_UpdatingReceivers) - { - if (m_UpdateReceiversToRemove == null) - m_UpdateReceiversToRemove = new List(); - m_UpdateReceiversToRemove.Add(receiver); - } - else - { - m_UpdateReceivers.Remove(receiver); - } - } - - /// - /// The allocation strategy object. - /// - public IAllocationStrategy Allocator { get { return m_allocator; } set { m_allocator = value; } } - /// - /// Gets the list of configured objects. Resource Providers handle load and release operations for objects. - /// - /// The resource providers list. - public IList ResourceProviders { get { return m_ResourceProviders; } } - /// - /// The CertificateHandler instance object. - /// - public CertificateHandler CertificateHandlerInstance { get; set; } - - /// - /// Constructor for the resource manager. - /// - /// The allocation strategy to use. - public ResourceManager(IAllocationStrategy alloc = null) - { - m_ReleaseOpNonCached = OnOperationDestroyNonCached; - m_ReleaseOpCached = OnOperationDestroyCached; - m_ReleaseInstanceOp = OnInstanceOperationDestroy; - m_allocator = alloc == null ? new LRUCacheAllocationStrategy(1000, 1000, 100, 10) : alloc; - m_ResourceProviders.OnElementAdded += OnObjectAdded; - m_ResourceProviders.OnElementRemoved += OnObjectRemoved; - m_UpdateReceivers.OnElementAdded += x => RegisterForCallbacks(); - } - - private void OnObjectAdded(object obj) - { - IUpdateReceiver updateReceiver = obj as IUpdateReceiver; - if (updateReceiver != null) - AddUpdateReceiver(updateReceiver); - } - - private void OnObjectRemoved(object obj) - { - IUpdateReceiver updateReceiver = obj as IUpdateReceiver; - if (updateReceiver != null) - RemoveUpdateReciever(updateReceiver); - } - - private void RegisterForCallbacks() - { - if (CallbackHooksEnabled && m_CallbackHooks == null) - { - m_CallbackHooks = new GameObject("ResourceManagerCallbacks", typeof(MonoBehaviourCallbackHooks)).GetComponent(); - m_CallbackHooks.OnUpdateDelegate += Update; - } - } - - /// - /// Clears out the diagnostics callback handler. - /// - public void ClearDiagnosticsCallback() - { - m_diagnosticsHandler = null; - } - - /// - /// Register a handler for diagnostic events. - /// - /// The event handler function. - public void RegisterDiagnosticCallback(Action func) - { - m_diagnosticsHandler = func; - } - - internal void PostDiagnosticEvent(AsyncOperationHandle op, ResourceManager.DiagnosticEventType type, int eventValue = 0, object context = null) - { - if (m_diagnosticsHandler == null) - return; - m_diagnosticsHandler(op, type, eventValue, context); - } - - /// - /// Gets the appropriate for the given and . - /// - /// The resource provider. Or null if an appropriate provider cannot be found - /// The resource location. - /// The desired object type to be loaded from the provider. - public IResourceProvider GetResourceProvider(Type t, IResourceLocation location) - { - if (location != null) - { - IResourceProvider prov = null; - var hash = location.ProviderId.GetHashCode() * 31 + (t == null ? 0: t.GetHashCode()); - if (!m_providerMap.TryGetValue(hash, out prov)) - { - for (int i = 0; i < ResourceProviders.Count; i++) - { - var p = ResourceProviders[i]; - if (p.ProviderId.Equals(location.ProviderId, StringComparison.Ordinal) && (t == null || p.CanProvide(t, location))) - { - m_providerMap.Add(hash, prov = p); - break; - } - } - } - return prov; - } - return null; - } - - Type GetDefaultTypeForLocation(IResourceLocation loc) - { - var provider = GetResourceProvider(null, loc); - if (provider == null) - return typeof(object); - Type t = provider.GetDefaultType(loc); - return t != null ? t : typeof(object); - } - - private int CalculateLocationsHash(IList locations, Type t=null) - { - if (locations == null || locations.Count == 0) - return 0; - int hash = 17; - foreach (var loc in locations) - { - Type t2 = t != null ? t : GetDefaultTypeForLocation(loc); - hash = hash * 31 + loc.Hash(t2); - } - return hash; - } - - /// - /// Load the at the specified . - /// - /// An async operation. - /// Location to load. - /// Object type to load. - private AsyncOperationHandle ProvideResource(IResourceLocation location, Type desiredType = null) - { - if (location == null) - throw new ArgumentNullException("location"); - IResourceProvider provider = null; - if (desiredType == null) - { - provider = GetResourceProvider(desiredType, location); - if (provider == null) - return CreateCompletedOperation(null, new UnknownResourceProviderException(location).Message); - desiredType = provider.GetDefaultType(location); - } - - IAsyncOperation op; - int hash = location.Hash(desiredType); - if (m_AssetOperationCache.TryGetValue(hash, out op)) - { - op.IncrementReferenceCount(); - return new AsyncOperationHandle(op); - } - - Type provType; - if (!m_ProviderOperationTypeCache.TryGetValue(desiredType, out provType)) - m_ProviderOperationTypeCache.Add(desiredType, provType = typeof(ProviderOperation<>).MakeGenericType(new Type[] { desiredType })); - op = CreateOperation(provType, provType.GetHashCode(), hash, m_ReleaseOpCached); - - // Calculate the hash of the dependencies - int depHash = location.DependencyHashCode; - var depOp = location.HasDependencies ? ProvideResourceGroupCached(location.Dependencies, depHash, null, null) : default(AsyncOperationHandle>); - if(provider == null) - provider = GetResourceProvider(desiredType, location); - - ((IGenericProviderOperation)op).Init(this, provider, location, depOp); - - var handle = StartOperation(op, depOp); - - if (depOp.IsValid()) - depOp.Release(); - - return handle; - } - Dictionary m_ProviderOperationTypeCache = new Dictionary(); - - /// - /// Load the at the specified . - /// - /// An async operation. - /// Location to load. - /// Object type to load. - public AsyncOperationHandle ProvideResource(IResourceLocation location) - { - AsyncOperationHandle handle = ProvideResource(location, typeof(TObject)); - return handle.Convert(); - } - - /// - /// Registers an operation with the ResourceManager. The operation will be executed when the completes. - /// This should only be used when creating custom operations. - /// - /// The AsyncOperationHandle used to access the result and status of the operation. - /// The custom AsyncOperationBase object - /// Execution of the operation will not occur until this handle completes. A default handle can be passed if no dependency is required. - /// Object type associated with this operation. - public AsyncOperationHandle StartOperation(AsyncOperationBase operation, AsyncOperationHandle dependency) - { - operation.Start(this, dependency, m_UpdateCallbacks); - return operation.Handle; - } - - internal AsyncOperationHandle StartOperation(IAsyncOperation operation, AsyncOperationHandle dependency) - { - operation.Start(this, dependency, m_UpdateCallbacks); - return operation.Handle; - } - - class CompletedOperation : AsyncOperationBase - { - TObject m_Result; - bool m_Success; - string m_ErrorMsg; - public CompletedOperation() { } - public void Init(TObject result, bool success, string errorMsg) - { - m_Result = result; - m_Success = success; - m_ErrorMsg = errorMsg; - } - protected override void Execute() - { - Complete(m_Result, m_Success, m_ErrorMsg); - } - } - - void OnInstanceOperationDestroy(IAsyncOperation o) - { - m_TrackedInstanceOperations.Remove(o as InstanceOperation); - Allocator.Release(o.GetType().GetHashCode(), o); - } - - void OnOperationDestroyNonCached(IAsyncOperation o) - { - Allocator.Release(o.GetType().GetHashCode(), o); - } - - void OnOperationDestroyCached(IAsyncOperation o) - { - Allocator.Release(o.GetType().GetHashCode(), o); - var cachable = o as ICachable; - if (cachable != null) - RemoveOperationFromCache(cachable.Hash); - } - - internal T CreateOperation(Type actualType, int typeHash, int operationHash, Action onDestroyAction) where T : IAsyncOperation - { - if (operationHash == 0) - { - var op = (T)Allocator.New(actualType, typeHash); - op.OnDestroy = onDestroyAction; - return op; - } - else - { - var op = (T)Allocator.New(actualType, typeHash); - op.OnDestroy = onDestroyAction; - var cachable = op as ICachable; - if (cachable != null) - cachable.Hash = operationHash; - AddOperationToCache(operationHash, op); - return op; - } - } - - internal void AddOperationToCache(int hash, IAsyncOperation operation) - { - if(!IsOperationCached(hash)) - m_AssetOperationCache.Add(hash, operation); - } - - internal bool RemoveOperationFromCache(int hash) - { - if (!IsOperationCached(hash)) - return true; - - return m_AssetOperationCache.Remove(hash); - } - - internal bool IsOperationCached(int hash) - { - return m_AssetOperationCache.ContainsKey(hash); - } - - internal int CachedOperationCount() - { - return m_AssetOperationCache.Count; - } - - /// - /// Creates an operation that has already completed with a specified result and error message./>. - /// - /// The result that the operation will provide. - /// The error message if the operation should be in the failed state. Otherwise null or empty string. - /// Object type. - public AsyncOperationHandle CreateCompletedOperation(TObject result, string errorMsg) - { - var cop = CreateOperation>(typeof(CompletedOperation), typeof(CompletedOperation).GetHashCode(), 0, null); - cop.Init(result, string.IsNullOrEmpty(errorMsg), errorMsg); - return StartOperation(cop, default(AsyncOperationHandle)); - } - - /// - /// Release the operation associated with the specified handle - /// - /// The handle to release. - public void Release(AsyncOperationHandle handle) - { - handle.Release(); - } - /// - /// Increment reference count of operation handle. - /// - /// The handle to the resource to increment the reference count for. - public void Acquire(AsyncOperationHandle handle) - { - handle.Acquire(); - } - - private GroupOperation AcquireGroupOpFromCache(int hash) - { - IAsyncOperation opGeneric; - if (m_AssetOperationCache.TryGetValue(hash, out opGeneric)) - { - opGeneric.IncrementReferenceCount(); - return (GroupOperation)opGeneric; - } - return null; - } - - internal AsyncOperationHandle> ProvideResourceGroupCached(IList locations, int groupHash, Type desiredType, Action callback) - { - GroupOperation op = AcquireGroupOpFromCache(groupHash); - AsyncOperationHandle> handle; - if (op == null) - { - op = CreateOperation(typeof(GroupOperation), s_GroupOperationTypeHash, groupHash, m_ReleaseOpCached); - var ops = new List(locations.Count); - foreach (var loc in locations) - ops.Add(ProvideResource(loc, desiredType)); - - op.Init(ops); - - handle = StartOperation(op, default(AsyncOperationHandle)); - } - else - { - handle = op.Handle; - } - - if (callback != null) - { - var depOps = op.GetDependentOps(); - for (int i = 0; i < depOps.Count; i++) - { - depOps[i].Completed += callback; - } - } - - return handle; - } - - /// - /// Asynchronously load all objects in the given collection of . - /// - /// An async operation that will complete when all individual async load operations are complete. - /// locations to load. - /// This callback will be invoked once for each object that is loaded. - /// Object type to load. - public AsyncOperationHandle> ProvideResources(IList locations, Action callback=null) - { - if (locations == null) - return CreateCompletedOperation>(null, "Null Location"); - - Action callbackGeneric = null; - if(callback != null) - { - callbackGeneric = (x) => callback((TObject)(x.Result)); - } - var typelessHandle = ProvideResourceGroupCached(locations, CalculateLocationsHash(locations, typeof(TObject)), typeof(TObject), callbackGeneric); - var chainOp = CreateChainOperation(typelessHandle, (x) => - { - if(x.Status != AsyncOperationStatus.Succeeded) - return CreateCompletedOperation>(null, x.OperationException != null ? x.OperationException.Message : "ProvidResources failed"); - - var list = new List(); - foreach(var r in x.Result) - list.Add(r.Convert().Result); - return CreateCompletedOperation>(list, string.Empty); - }); - // chain operation holds the dependency - typelessHandle.Release(); - return chainOp; - } - - /// - /// Create a chain operation to handle dependencies. - /// - /// The type of operation handle to return. - /// The type of the dependency operation. - /// The dependency operation. - /// The callback method that will create the dependent operation from the dependency operation. - /// The operation handle. - public AsyncOperationHandle CreateChainOperation(AsyncOperationHandle dependentOp, Func, AsyncOperationHandle> callback) - { - var op = CreateOperation>(typeof(ChainOperation), typeof(ChainOperation).GetHashCode(), 0, null); - op.Init(dependentOp, callback); - return StartOperation(op, dependentOp); - } - /// - /// Create a chain operation to handle dependencies. - /// - /// The type of operation handle to return. - /// The dependency operation. - /// The callback method that will create the dependent operation from the dependency operation. - /// The operation handle. - public AsyncOperationHandle CreateChainOperation(AsyncOperationHandle dependentOp, Func> callback) - { - var cOp = new ChainOperationTypelessDepedency(); - cOp.Init(dependentOp, callback); - return StartOperation(cOp, dependentOp); - } - class InstanceOperation : AsyncOperationBase - { - AsyncOperationHandle m_dependency; - InstantiationParameters m_instantiationParams; - IInstanceProvider m_instanceProvider; - GameObject m_instance; - ResourceManager m_RM; - Scene m_scene; - - public void Init(ResourceManager rm, IInstanceProvider instanceProvider, InstantiationParameters instantiationParams, AsyncOperationHandle dependency) - { - m_RM = rm; - m_dependency = dependency; - m_instanceProvider = instanceProvider; - m_instantiationParams = instantiationParams; - } - - protected override void GetDependencies(List deps) - { - deps.Add(m_dependency); - } - protected override string DebugName - { - get - { - if (m_instanceProvider == null) - return "Instance"; - return string.Format("Instance<{0}>({1}", m_instanceProvider.GetType().Name, m_dependency.IsValid() ? m_dependency.DebugName : "Invalid"); - } - } - - public Scene InstanceScene() => m_scene; - - protected override void Destroy() - { - m_instanceProvider.ReleaseInstance(m_RM, m_instance); - } - - protected override void Execute() - { - Exception e = m_dependency.OperationException; - if (m_dependency.Status == AsyncOperationStatus.Succeeded) - { - m_instance = m_instanceProvider.ProvideInstance(m_RM, m_dependency, m_instantiationParams); - if(m_instance != null) - m_scene = m_instance.scene; - Complete(m_instance, true, null); - } - else - { - Complete(m_instance, false, string.Format("Dependency operation failed with {0}.", e)); - } - } - - } - - - /// - /// Load a scene at a specificed resource location. - /// - /// The scene provider instance. - /// The location of the scene. - /// The load mode for the scene. - /// If false, the scene will be loaded in the background and not activated when complete. - /// The priority for the load operation. - /// Async operation handle that will complete when the scene is loaded. If activateOnLoad is false, then Activate() will need to be called on the SceneInstance returned. - public AsyncOperationHandle ProvideScene(ISceneProvider sceneProvider, IResourceLocation location, LoadSceneMode loadMode, bool activateOnLoad, int priority) - { - if (sceneProvider == null) - throw new NullReferenceException("sceneProvider is null"); - - return sceneProvider.ProvideScene(this, location, loadMode, activateOnLoad, priority); - } - - /// - /// Release a scene. - /// - /// The scene provider. - /// The operation handle used to load the scene. - /// An operation handle for the unload. - public AsyncOperationHandle ReleaseScene(ISceneProvider sceneProvider, AsyncOperationHandle sceneLoadHandle) - { - if (sceneProvider == null) - throw new NullReferenceException("sceneProvider is null"); - // if (sceneLoadHandle.ReferenceCount == 0) - // return CreateCompletedOperation(default(SceneInstance), ""); - return sceneProvider.ReleaseScene(this, sceneLoadHandle); - } - - /// - /// Asynchronouslly instantiate a prefab (GameObject) at the specified . - /// - /// Async operation that will complete when the prefab is instantiated. - /// An implementation of IInstanceProvider that will be used to instantiate and destroy the GameObject. - /// Location of the prefab. - /// A struct containing the parameters to pass the the Instantiation call. - public AsyncOperationHandle ProvideInstance(IInstanceProvider provider, IResourceLocation location, InstantiationParameters instantiateParameters) - { - if (provider == null) - throw new NullReferenceException("provider is null. Assign a valid IInstanceProvider object before using."); - - if (location == null) - throw new ArgumentNullException("location"); - - var depOp = ProvideResource(location); - var baseOp = CreateOperation(typeof(InstanceOperation), s_InstanceOperationTypeHash, 0, m_ReleaseInstanceOp); - baseOp.Init(this, provider, instantiateParameters, depOp); - m_TrackedInstanceOperations.Add(baseOp); - return StartOperation(baseOp, depOp); - } - - /// - /// Cleans up ref counting on any instances that were in a newly closed scene. - /// - /// The scene that was closed - public void CleanupSceneInstances(Scene scene) - { - List handlesToRelease = null; - foreach (var h in m_TrackedInstanceOperations) - { - if (h.Result == null && scene == h.InstanceScene()) - { - if (handlesToRelease == null) - handlesToRelease = new List(); - handlesToRelease.Add(h); - } - } - if (handlesToRelease != null) - { - foreach (var h in handlesToRelease) - { - m_TrackedInstanceOperations.Remove(h); - h.DecrementReferenceCount(); - } - } - } - - private void ExecuteDeferredCallbacks() - { - for (int i = 0; i < m_DeferredCompleteCallbacks.Count; i++) - { - m_DeferredCompleteCallbacks[i].InvokeCompletionEvent(); - m_DeferredCompleteCallbacks[i].DecrementReferenceCount(); - } - m_DeferredCompleteCallbacks.Clear(); - } - - internal void RegisterForDeferredCallback(IAsyncOperation op, bool incrementRefCount = true) - { - if(incrementRefCount) - op.IncrementReferenceCount(); - m_DeferredCompleteCallbacks.Add(op); - RegisterForCallbacks(); - } - - internal void Update(float unscaledDeltaTime) - { - m_UpdateCallbacks.Invoke(unscaledDeltaTime); - m_UpdatingReceivers = true; - for (int i = 0; i < m_UpdateReceivers.Count; i++ ) - m_UpdateReceivers[i].Update(unscaledDeltaTime); - m_UpdatingReceivers = false; - if (m_UpdateReceiversToRemove != null) - { - foreach (var r in m_UpdateReceiversToRemove) - m_UpdateReceivers.Remove(r); - m_UpdateReceiversToRemove = null; - } - ExecuteDeferredCallbacks(); - } - - /// - /// Disposes internal resources used by the resource manager - /// - public void Dispose() - { - if (m_CallbackHooks != null) - GameObject.Destroy(m_CallbackHooks.gameObject); - m_CallbackHooks = null; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceManager.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceManager.cs.meta deleted file mode 100644 index c8a689bd..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceManager.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 48d49afb756d3456da9e2b0b66b2221d -timeCreated: 1508958551 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders.meta deleted file mode 100644 index 2eeea98a..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 6a6004f87009b4fad9ad9582dc0c7016 -folderAsset: yes -timeCreated: 1503084977 -licenseType: Pro -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/AssetBundleProvider.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/AssetBundleProvider.cs deleted file mode 100644 index c122fb6a..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/AssetBundleProvider.cs +++ /dev/null @@ -1,289 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using UnityEngine.Networking; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.Serialization; - -namespace UnityEngine.ResourceManagement.ResourceProviders -{ - /// - /// Wrapper for asset bundles. - /// - public interface IAssetBundleResource - { - AssetBundle GetAssetBundle(); - - } - - /// - /// Contains cache information to be used by the AssetBundleProvider - /// - [Serializable] - public class AssetBundleRequestOptions : ILocationSizeData - { - [FormerlySerializedAs("m_hash")] - [SerializeField] - string m_Hash = ""; - /// - /// Hash value of the asset bundle. - /// - public string Hash { get { return m_Hash; } set { m_Hash = value; } } - [FormerlySerializedAs("m_crc")] - [SerializeField] - uint m_Crc; - /// - /// CRC value of the bundle. - /// - public uint Crc { get { return m_Crc; } set { m_Crc = value; } } - [FormerlySerializedAs("m_timeout")] - [SerializeField] - int m_Timeout; - /// - /// Sets UnityWebRequest to attempt to abort after the number of seconds in timeout have passed. - /// - public int Timeout { get { return m_Timeout; } set { m_Timeout = value; } } - [FormerlySerializedAs("m_chunkedTransfer")] - [SerializeField] - bool m_ChunkedTransfer; - /// - /// Indicates whether the UnityWebRequest system should employ the HTTP/1.1 chunked-transfer encoding method. - /// - public bool ChunkedTransfer { get { return m_ChunkedTransfer; } set { m_ChunkedTransfer = value; } } - [FormerlySerializedAs("m_redirectLimit")] - [SerializeField] - int m_RedirectLimit = -1; - /// - /// Indicates the number of redirects which this UnityWebRequest will follow before halting with a “Redirect Limit Exceeded” system error. - /// - public int RedirectLimit { get { return m_RedirectLimit; } set { m_RedirectLimit = value; } } - [FormerlySerializedAs("m_retryCount")] - [SerializeField] - int m_RetryCount; - /// - /// Indicates the number of times the request will be retried. - /// - public int RetryCount { get { return m_RetryCount; } set { m_RetryCount = value; } } - - [SerializeField] - string m_BundleName = null; - /// - /// The name of the original bundle. This does not contain the appended hash. - /// - public string BundleName { get { return m_BundleName; } set { m_BundleName = value; } } - - [SerializeField] - long m_BundleSize; - /// - /// The size of the bundle, in bytes. - /// - public long BundleSize { get { return m_BundleSize; } set { m_BundleSize = value; } } - /// - /// Computes the amount of data needed to be downloaded for this bundle. - /// - /// The location of the bundle. - /// The size in bytes of the bundle that is needed to be downloaded. If the local cache contains the bundle or it is a local bundle, 0 will be returned. - public virtual long ComputeSize(IResourceLocation loc) - { - if (!ResourceManagerConfig.IsPathRemote(loc.InternalId)) - return 0; - var locHash = Hash128.Parse(Hash); -#if !UNITY_SWITCH && !UNITY_PS4 - var bundleName = Path.GetFileNameWithoutExtension(loc.InternalId); - if (locHash.isValid) //If we have a hash, ensure that our desired version is cached. - { - if (Caching.IsVersionCached(new CachedAssetBundle(bundleName, locHash))) - return 0; - return BundleSize; - } - else //If we don't have a hash, any cached version will do. - { - List versions = new List(); - Caching.GetCachedVersions(bundleName, versions); - if (versions.Count > 0) - return 0; - } -#endif //!UNITY_SWITCH && !UNITY_PS4 - return BundleSize; - } - } - - class AssetBundleResource : IAssetBundleResource - { - AssetBundle m_AssetBundle; - DownloadHandlerAssetBundle m_downloadHandler; - AsyncOperation m_RequestOperation; - ProvideHandle m_ProvideHandle; - AssetBundleRequestOptions m_Options; - int m_Retries; - - UnityWebRequest CreateWebRequest(IResourceLocation loc) - { - if (m_Options == null) - return UnityWebRequestAssetBundle.GetAssetBundle(loc.InternalId); - - var webRequest = !string.IsNullOrEmpty(m_Options.Hash) ? - UnityWebRequestAssetBundle.GetAssetBundle(loc.InternalId, Hash128.Parse(m_Options.Hash), m_Options.Crc) : - UnityWebRequestAssetBundle.GetAssetBundle(loc.InternalId, m_Options.Crc); - - if (m_Options.Timeout > 0) - webRequest.timeout = m_Options.Timeout; - if (m_Options.RedirectLimit > 0) - webRequest.redirectLimit = m_Options.RedirectLimit; - #if !UNITY_2019_3_OR_NEWER - webRequest.chunkedTransfer = m_Options.ChunkedTransfer; - #endif - if (m_ProvideHandle.ResourceManager.CertificateHandlerInstance != null) - { - webRequest.certificateHandler = m_ProvideHandle.ResourceManager.CertificateHandlerInstance; - webRequest.disposeCertificateHandlerOnDispose = false; - } - return webRequest; - } - - float PercentComplete() { return m_RequestOperation != null ? m_RequestOperation.progress : 0.0f; } - - /// - /// Get the asset bundle object managed by this resource. This call may force the bundle to load if not already loaded. - /// - /// The asset bundle. - public AssetBundle GetAssetBundle() - { - if (m_AssetBundle == null && m_downloadHandler != null) - { - m_AssetBundle = m_downloadHandler.assetBundle; - m_downloadHandler.Dispose(); - m_downloadHandler = null; - } - return m_AssetBundle; - } - - internal void Start(ProvideHandle provideHandle) - { - m_Retries = 0; - m_AssetBundle = null; - m_downloadHandler = null; - m_ProvideHandle = provideHandle; - m_Options = m_ProvideHandle.Location.Data as AssetBundleRequestOptions; - m_RequestOperation = null; - BeginOperation(); - provideHandle.SetProgressCallback(PercentComplete); - } - - private void BeginOperation() - { - string path = m_ProvideHandle.Location.InternalId; - if (File.Exists(path)) - { - m_RequestOperation = AssetBundle.LoadFromFileAsync(path, m_Options == null ? 0 : m_Options.Crc); - m_RequestOperation.completed += LocalRequestOperationCompleted; - } - else if (ResourceManagerConfig.ShouldPathUseWebRequest(path)) - { - var req = CreateWebRequest(m_ProvideHandle.Location); - req.disposeDownloadHandlerOnDispose = false; - m_RequestOperation = req.SendWebRequest(); - m_RequestOperation.completed += WebRequestOperationCompleted; - } - else - { - m_RequestOperation = null; - m_ProvideHandle.Complete(null, false, new Exception(string.Format("Invalid path in AssetBundleProvider: '{0}'.", path))); - } - } - - private void LocalRequestOperationCompleted(AsyncOperation op) - { - m_AssetBundle = (op as AssetBundleCreateRequest).assetBundle; - m_ProvideHandle.Complete(this, m_AssetBundle != null, null); - } - - private void WebRequestOperationCompleted(AsyncOperation op) - { - UnityWebRequestAsyncOperation remoteReq = op as UnityWebRequestAsyncOperation; - var webReq = remoteReq.webRequest; - if (string.IsNullOrEmpty(webReq.error)) - { - m_downloadHandler = webReq.downloadHandler as DownloadHandlerAssetBundle; - m_ProvideHandle.Complete(this, true, null); - } - else - { - m_downloadHandler = webReq.downloadHandler as DownloadHandlerAssetBundle; - m_downloadHandler.Dispose(); - m_downloadHandler = null; - if (m_Retries++ < m_Options.RetryCount) - { - Debug.LogFormat("Web request {0} failed with error '{1}', retrying ({2}/{3})...", webReq.url, webReq.error, m_Retries, m_Options.RetryCount); - BeginOperation(); - } - else - { - var exception = new Exception(string.Format("RemoteAssetBundleProvider unable to load from url {0}, result='{1}'.", webReq.url, webReq.error)); - m_ProvideHandle.Complete(null, false, exception); - } - } - webReq.Dispose(); - } - /// - /// Unloads all resources associated with this asset bundle. - /// - public void Unload() - { - if (m_AssetBundle != null) - { - m_AssetBundle.Unload(true); - m_AssetBundle = null; - } - if (m_downloadHandler != null) - { - m_downloadHandler.Dispose(); - m_downloadHandler = null; - } - m_RequestOperation = null; - } - } - /// - /// IResourceProvider for asset bundles. Loads bundles via UnityWebRequestAssetBundle API if the internalId starts with "http". If not, it will load the bundle via AssetBundle.LoadFromFileAsync. - /// - public class AssetBundleProvider : ResourceProviderBase - { - /// - public override void Provide(ProvideHandle providerInterface) - { - new AssetBundleResource().Start(providerInterface); - } - /// - public override Type GetDefaultType(IResourceLocation location) - { - return typeof(IAssetBundleResource); - } - - /// - /// Releases the asset bundle via AssetBundle.Unload(true). - /// - /// - /// - /// - public override void Release(IResourceLocation location, object asset) - { - if (location == null) - throw new ArgumentNullException("location"); - if (asset == null) - { - Debug.LogWarningFormat("Releasing null asset bundle from location {0}. This is an indication that the bundle failed to load.", location); - return; - } - var bundle = asset as AssetBundleResource; - if (bundle != null) - { - bundle.Unload(); - return; - } - return; - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/AssetBundleProvider.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/AssetBundleProvider.cs.meta deleted file mode 100644 index 3ae55aff..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/AssetBundleProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 86a4f4dd6530757418ab820c2c781436 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/AssetDatabaseProvider.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/AssetDatabaseProvider.cs deleted file mode 100644 index 72556d9d..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/AssetDatabaseProvider.cs +++ /dev/null @@ -1,109 +0,0 @@ -#if UNITY_EDITOR -using System; -using System.Collections.Generic; -using UnityEditor; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.Util; - -namespace UnityEngine.ResourceManagement.ResourceProviders -{ - /// - /// Provides assets loaded via the AssetDatabase API. This provider is only available in the editor and is used for fast iteration or to simulate asset bundles when in play mode. - /// - public class AssetDatabaseProvider : ResourceProviderBase - { - float m_LoadDelay = .1f; - - /// - /// Default constructor. - /// - public AssetDatabaseProvider() { } - - /// - /// Constructor that allows for a sepcified delay for all requests. - /// - /// Time in seconds for each delay call. - public AssetDatabaseProvider(float delay = .25f) - { - m_LoadDelay = delay; - } - - class InternalOp - { - ProvideHandle m_ProvideHandle; - public void Start(ProvideHandle provideHandle, float loadDelay) - { - m_ProvideHandle = provideHandle; - if (loadDelay < 0) - LoadImmediate(); - else - DelayedActionManager.AddAction((Action)LoadImmediate, loadDelay); - } - - void LoadImmediate() - { - string assetPath = m_ProvideHandle.Location == null ? string.Empty : m_ProvideHandle.Location.InternalId; - - object result = null; - if (m_ProvideHandle.Type.IsArray) - result = ResourceManagerConfig.CreateArrayResult(m_ProvideHandle.Type, AssetDatabase.LoadAllAssetRepresentationsAtPath(assetPath)); - else if (m_ProvideHandle.Type.IsGenericType && typeof(IList<>) == m_ProvideHandle.Type.GetGenericTypeDefinition()) - result = ResourceManagerConfig.CreateListResult(m_ProvideHandle.Type, AssetDatabase.LoadAllAssetRepresentationsAtPath(assetPath)); - else - { - var i = assetPath.LastIndexOf('['); - if (i > 0) - { - var i2 = assetPath.LastIndexOf(']'); - if (i2 < i) - { - m_ProvideHandle.Complete(result, false, new Exception(string.Format("Invalid index format in internal id {0}", assetPath))); - } - else - { - var subObjectName = assetPath.Substring(i + 1, i2 - (i + 1)); - assetPath = assetPath.Substring(0, i); - var objs = AssetDatabase.LoadAllAssetRepresentationsAtPath(assetPath); - foreach (var o in objs) - { - if (o.name == subObjectName) - { - if (m_ProvideHandle.Type.IsAssignableFrom(o.GetType())) - { - result = o; - break; - } - } - } - } - } - else - { - var obj = AssetDatabase.LoadAssetAtPath(assetPath, m_ProvideHandle.Location.ResourceType); - result = obj != null && m_ProvideHandle.Type.IsAssignableFrom(obj.GetType()) ? obj : null; - } - } - m_ProvideHandle.Complete(result, result != null, null); - } - } - - - /// - public override bool CanProvide(Type t, IResourceLocation location) - { - if (t.IsArray) - t = t.GetElementType(); - else if (t.IsGenericType && typeof(IList<>) == t.GetGenericTypeDefinition()) - t = t.GetGenericArguments()[0]; - - return t == typeof(object) || typeof(Object).IsAssignableFrom(t); - } - - public override void Provide(ProvideHandle provideHandle) - { - new InternalOp().Start(provideHandle, m_LoadDelay); - } - } -} -#endif diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/AssetDatabaseProvider.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/AssetDatabaseProvider.cs.meta deleted file mode 100644 index bc75e598..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/AssetDatabaseProvider.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: f0364baebb057874782f9bd6e4dcfa78 -timeCreated: 1502505318 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/BundledAssetProvider.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/BundledAssetProvider.cs deleted file mode 100644 index c1787a58..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/BundledAssetProvider.cs +++ /dev/null @@ -1,138 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine.Networking; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.Util; - -namespace UnityEngine.ResourceManagement.ResourceProviders -{ - /// - /// Provides assets stored in an asset bundle. - /// - public class BundledAssetProvider : ResourceProviderBase - { - internal class InternalOp - { - AssetBundleRequest m_RequestOperation; - ProvideHandle m_ProvideHandle; - string subObjectName = null; - internal static AssetBundle LoadBundleFromDependecies(IList results) - { - if (results == null || results.Count == 0) - return null; - - AssetBundle bundle = null; - bool firstBundleWrapper = true; - for (int i = 0; i < results.Count; i++) - { - var abWrapper = results[i] as IAssetBundleResource; - if (abWrapper != null) - { - //only use the first asset bundle, even if it is invalid - var b = abWrapper.GetAssetBundle(); - if (firstBundleWrapper) - bundle = b; - firstBundleWrapper = false; - } - } - return bundle; - } - - public void Start(ProvideHandle provideHandle) - { - subObjectName = null; - m_ProvideHandle = provideHandle; - m_RequestOperation = null; - List deps = new List(); // TODO: garbage. need to pass actual count and reuse the list - m_ProvideHandle.GetDependencies(deps); - AssetBundle bundle = LoadBundleFromDependecies(deps); - if (bundle == null) - { - m_ProvideHandle.Complete(null, false, new Exception("Unable to load dependent bundle from location " + m_ProvideHandle.Location)); - } - else - { - var assetPath = m_ProvideHandle.Location.InternalId; - if (m_ProvideHandle.Type.IsArray) - m_RequestOperation = bundle.LoadAssetWithSubAssetsAsync(assetPath, m_ProvideHandle.Type.GetElementType()); - else if (m_ProvideHandle.Type.IsGenericType && typeof(IList<>) == m_ProvideHandle.Type.GetGenericTypeDefinition()) - m_RequestOperation = bundle.LoadAssetWithSubAssetsAsync(assetPath, m_ProvideHandle.Type.GetGenericArguments()[0]); - else - { - var i = assetPath.LastIndexOf('['); - if (i > 0) - { - var i2 = assetPath.LastIndexOf(']'); - if (i2 < i) - { - m_ProvideHandle.Complete(null, false, new Exception(string.Format("Invalid index format in internal id {0}", assetPath))); - } - else - { - subObjectName = assetPath.Substring(i + 1, i2 - (i + 1)); - assetPath = assetPath.Substring(0, i); - m_RequestOperation = bundle.LoadAssetWithSubAssetsAsync(assetPath, m_ProvideHandle.Type); - } - } - else - { - m_RequestOperation = bundle.LoadAssetAsync(assetPath, m_ProvideHandle.Type); - } - } - m_RequestOperation.completed += ActionComplete; - provideHandle.SetProgressCallback(ProgressCallback); - } - } - - private void ActionComplete(AsyncOperation obj) - { - object result = null; - if (m_RequestOperation != null) - { - if (m_ProvideHandle.Type.IsArray) - { - result = ResourceManagerConfig.CreateArrayResult(m_ProvideHandle.Type, m_RequestOperation.allAssets); - } - else if (m_ProvideHandle.Type.IsGenericType && typeof(IList<>) == m_ProvideHandle.Type.GetGenericTypeDefinition()) - { - result = ResourceManagerConfig.CreateListResult(m_ProvideHandle.Type, m_RequestOperation.allAssets); - } - else - { - if (string.IsNullOrEmpty(subObjectName)) - { - result = (m_RequestOperation.asset != null && m_ProvideHandle.Type.IsAssignableFrom(m_RequestOperation.asset.GetType())) ? m_RequestOperation.asset : null; - } - else - { - if (m_RequestOperation.allAssets != null) - { - foreach (var o in m_RequestOperation.allAssets) - { - if (o.name == subObjectName) - { - if (m_ProvideHandle.Type.IsAssignableFrom(o.GetType())) - { - result = o; - break; - } - } - } - } - } - } - } - m_ProvideHandle.Complete(result, result != null, null); - } - - public float ProgressCallback() { return m_RequestOperation != null ? m_RequestOperation.progress : 0.0f; } - } - - /// - public override void Provide(ProvideHandle provideHandle) - { - new InternalOp().Start(provideHandle); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/BundledAssetProvider.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/BundledAssetProvider.cs.meta deleted file mode 100644 index f5b693b2..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/BundledAssetProvider.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: a286e4526d8a69d4cb47c5d75f5acc83 -timeCreated: 1491321970 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/IInstanceProvider.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/IInstanceProvider.cs deleted file mode 100644 index d011504e..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/IInstanceProvider.cs +++ /dev/null @@ -1,112 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.ResourceLocations; - -namespace UnityEngine.ResourceManagement.ResourceProviders -{ - /// - /// Class that contains properties to apply to instantiated objects. - /// - public struct InstantiationParameters - { - Vector3 m_Position; - Quaternion m_Rotation; - Transform m_Parent; - bool m_InstantiateInWorldPosition; - bool m_SetPositionRotation; - - /// - /// Position in world space to instantiate object. - /// - public Vector3 Position { get { return m_Position; } } - /// - /// Rotation in world space to instantiate object. - /// - public Quaternion Rotation { get { return m_Rotation; } } - /// - /// Transform to set as the parent of the instantiated object. - /// - public Transform Parent { get { return m_Parent; } } - /// - /// When setting the parent Transform, this sets whether to preserve instance transform relative to world space or relative to the parent. - /// - public bool InstantiateInWorldPosition { get { return m_InstantiateInWorldPosition; } } - /// - /// Flag to tell the IInstanceProvider whether to set the position and rotation on new instances. - /// - public bool SetPositionRotation { get { return m_SetPositionRotation; } } - /// - /// Create a new InstantationParameters class that will set the parent transform and use the prefab transform. - /// Transform to set as the parent of the instantiated object. - /// Flag to tell the IInstanceProvider whether to set the position and rotation on new instances. - /// - public InstantiationParameters(Transform parent, bool instantiateInWorldSpace) - { - m_Position = Vector3.zero; - m_Rotation = Quaternion.identity; - m_Parent = parent; - m_InstantiateInWorldPosition = instantiateInWorldSpace; - m_SetPositionRotation = false; - } - /// - /// Create a new InstantationParameters class that will set the position, rotation, and Transform parent of the instance. - /// Position relative to the parent to set on the instance. - /// Rotation relative to the parent to set on the instance. - /// Transform to set as the parent of the instantiated object. - /// - public InstantiationParameters(Vector3 position, Quaternion rotation, Transform parent) - { - m_Position = position; - m_Rotation = rotation; - m_Parent = parent; - m_InstantiateInWorldPosition = false; - m_SetPositionRotation = true; - } - - /// - /// Instantiate an object with the parameters of this object. - /// Object to instantiate. - /// Instantiated object. - /// Object type. This type must be of type UnityEngine.Object. - /// - public TObject Instantiate(TObject source) where TObject : Object - { - TObject result; - if (m_Parent == null) - { - if (m_SetPositionRotation) - result = Object.Instantiate(source, m_Position, m_Rotation); - else - result = Object.Instantiate(source); - } - else - { - if (m_SetPositionRotation) - result = Object.Instantiate(source, m_Position, m_Rotation, m_Parent); - else - result = Object.Instantiate(source, m_Parent, m_InstantiateInWorldPosition); - } - return result; - } - } - - /// - /// Interface that provides instances of objects. This is used in ResourceManager.Instantiate* calls. - /// - public interface IInstanceProvider - { - /// - /// Provide an instance of the gameobject contained in the prefabHandle. - /// - /// The operation handle for the prefab to instantiate. - /// The parameters to use for instantation. - /// The instantiated object. - GameObject ProvideInstance(ResourceManager resourceManager, AsyncOperationHandle prefabHandle, InstantiationParameters instantiateParameters); - /// - /// Release an instance. - /// - /// The instance to release. - void ReleaseInstance(ResourceManager resourceManager, GameObject instance); - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/IInstanceProvider.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/IInstanceProvider.cs.meta deleted file mode 100644 index 72ac9ba3..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/IInstanceProvider.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: f72ac6a7a32304f2baf84ce520e0a2b6 -timeCreated: 1504176125 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/IResourceProvider.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/IResourceProvider.cs deleted file mode 100644 index 4a0c81e9..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/IResourceProvider.cs +++ /dev/null @@ -1,157 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.SceneManagement; - -namespace UnityEngine.ResourceManagement.ResourceProviders -{ - /// - /// Flags for resource providers. - /// - public enum ProviderBehaviourFlags - { - None = 0, - CanProvideWithFailedDependencies = 1 - } - - /// - /// Container for all data need by providers to fulfill requests. - /// - public struct ProvideHandle - { - int m_Version; - IGenericProviderOperation m_InternalOp; - ResourceManager m_ResourceManager; - internal ProvideHandle(ResourceManager rm, IGenericProviderOperation op) - { - m_ResourceManager = rm; - m_InternalOp = op; - m_Version = op.ProvideHandleVersion; - } - - IGenericProviderOperation InternalOp - { - get - { - if (m_InternalOp.ProvideHandleVersion != m_Version) - { - throw new Exception(ProviderOperation.kInvalidHandleMsg); - } - return m_InternalOp; - } - } - - /// - /// The ResourceManager used to create the operation. - /// - public ResourceManager ResourceManager - { - get - { - return m_ResourceManager; - } - } - - /// - /// The requested object type. - /// - public Type Type { get { return InternalOp.RequestedType; } } - - /// - /// The location for the request. - /// - public IResourceLocation Location { get { return InternalOp.Location; } } - - /// - /// Number of dependencies. - /// - public int DependencyCount { get { return InternalOp.DependencyCount; } } - - /// - /// Get a specific dependency object. - /// - /// The dependency type. - /// The index of the dependency. - /// The dependency object. - public TDepObject GetDependency(int index) { return InternalOp.GetDependency(index); } - - /// - /// Get the depedency objects. - /// - /// The list of dependecies to fill in. - public void GetDependencies(IList list) - { - InternalOp.GetDependencies(list); - } - - /// - /// Set the func for handling progress requests. - /// - /// The callback function. - public void SetProgressCallback(Func callback) - { - InternalOp.SetProgressCallback(callback); - } - - /// - /// Called to complete the operation. - /// - /// The type of object requested. - /// The result object. - /// True if the operation was successful, false otherwise. - /// The exception if the operation failed. - public void Complete(T result, bool status, Exception exception) - { - InternalOp.ProviderCompleted(result, status, exception); - } - } - - - /// - /// Resoure Providers handle loading (Provide) and unloading (Release) of objects - /// - public interface IResourceProvider - { - /// - /// Unique identifier for this provider, used by Resource Locations to find a suitable Provider - /// - /// The provider identifier. - string ProviderId { get; } - - /// - /// The default type of object that this provider can provide. - /// - /// The location that can be used to determine the type. - /// The type of object that can be provided. - Type GetDefaultType(IResourceLocation location); - - /// - /// Determine if this provider can provide the specified object type from the specified location. - /// - /// The type of object. - /// The resource location of the object. - /// True if this provider can create the specified object. - bool CanProvide(Type type, IResourceLocation location); - - /// - /// Tells the provide that it needs to provide a resource and report the results through the passed provideHandle. When this is called, all dependencies have completed and are available through the provideHandle. - /// - /// A handle used to update the operation. - void Provide(ProvideHandle provideHandle); - - /// - /// Release and/or unload the given resource location and asset - /// - /// true, if release was successful. false otherwise. - /// Location to release. - /// Asset to unload. - void Release(IResourceLocation location, object asset); - - /// - /// Custom flags for the provider. - /// - ProviderBehaviourFlags BehaviourFlags { get; } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/IResourceProvider.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/IResourceProvider.cs.meta deleted file mode 100644 index f116605a..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/IResourceProvider.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: d136ebd2e9594408296041252ad6d2a9 -timeCreated: 1503083765 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/ISceneProvider.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/ISceneProvider.cs deleted file mode 100644 index ee7035d8..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/ISceneProvider.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine.ResourceManagement; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.SceneManagement; - -namespace UnityEngine.ResourceManagement.ResourceProviders -{ - /// - /// Wrapper for scenes. This is used to allow access to the AsyncOperation and delayed activation. - /// - public struct SceneInstance - { - Scene m_Scene; - internal AsyncOperation m_Operation; - /// - /// The scene instance. - /// - public Scene Scene { get { return m_Scene; } internal set { m_Scene = value; } } - /// - /// Activate the scene via the AsyncOperation. - /// - public void Activate() - { - m_Operation.allowSceneActivation = true; - } - - /// - public override int GetHashCode() - { - return Scene.GetHashCode(); - } - - public override bool Equals(object obj) - { - if (!(obj is SceneInstance)) - return false; - return Scene.Equals(((SceneInstance)obj).Scene); - } - } - - /// - /// Interface for scene providers. - /// - public interface ISceneProvider - { - /// - /// Load a scene at a specified resource location. - /// - /// The resource manager to use for loading dependencies. - /// The location of the scene. - /// Load mode for the scene. - /// If true, the scene is activated as soon as it finished loading. Otherwise it needs to be activated via the returned SceneInstance object. - /// The loading priority for the load. - /// An operation handle for the loading of the scene. The scene is wrapped in a SceneInstance object to support delayed activation. - AsyncOperationHandle ProvideScene(ResourceManager resourceManager, IResourceLocation location, LoadSceneMode loadMode, bool activateOnLoad, int priority); - /// - /// Release a scene. - /// - /// The resource manager to use for loading dependencies. - /// The operation handle used to load the scene. - /// An operation handle for the unload. - AsyncOperationHandle ReleaseScene(ResourceManager resourceManager, AsyncOperationHandle sceneLoadHandle); - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/ISceneProvider.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/ISceneProvider.cs.meta deleted file mode 100644 index d977a106..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/ISceneProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e135f99d5c3f044e4aba84ddbed0d30b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/IUpdateReceiver.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/IUpdateReceiver.cs deleted file mode 100644 index ca3219f3..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/IUpdateReceiver.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace UnityEngine.ResourceManagement -{ - /// - /// Providers that implement this interface will received Update calls from the ResourceManager each frame - /// - public interface IUpdateReceiver - { - /// - /// This will be called once per frame by the ResourceManager - /// - /// The unscaled delta time since the last invocation of this function - void Update(float unscaledDeltaTime); - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/IUpdateReceiver.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/IUpdateReceiver.cs.meta deleted file mode 100644 index 97bf369d..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/IUpdateReceiver.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9c5f681e19be9ae4c845e9227f9b755a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/InstanceProvider.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/InstanceProvider.cs deleted file mode 100644 index c916a311..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/InstanceProvider.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.SceneManagement; - -namespace UnityEngine.ResourceManagement.ResourceProviders -{ - /// - /// Basic implementation of IInstanceProvider. - /// - public class InstanceProvider : IInstanceProvider - { - Dictionary> m_InstanceObjectToPrefabHandle = new Dictionary>(); - - /// - public GameObject ProvideInstance(ResourceManager resourceManager, AsyncOperationHandle prefabHandle, InstantiationParameters instantiateParameters) - { - GameObject result = instantiateParameters.Instantiate(prefabHandle.Result); - m_InstanceObjectToPrefabHandle.Add(result, prefabHandle); - return result; - } - - /// - public void ReleaseInstance(ResourceManager resourceManager, GameObject instance) - { - AsyncOperationHandle resource; - if (!m_InstanceObjectToPrefabHandle.TryGetValue(instance, out resource)) - { - Debug.LogWarningFormat("Releasing unknown GameObject {0} to InstanceProvider.", instance); - } - else - { - resourceManager.Release(resource); - m_InstanceObjectToPrefabHandle.Remove(instance); - } - - if (instance != null) - { - if (Application.isPlaying) - Object.Destroy(instance); - else - Object.DestroyImmediate(instance); - } - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/InstanceProvider.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/InstanceProvider.cs.meta deleted file mode 100644 index 537a9a5c..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/InstanceProvider.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 80a4732d85a576b4da4c5492957b9189 -timeCreated: 1491321970 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/JSONAssetProvider.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/JSONAssetProvider.cs deleted file mode 100644 index 90c572f1..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/JSONAssetProvider.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; - -namespace UnityEngine.ResourceManagement.ResourceProviders -{ - /// - /// Converts JSON serialized text into the requested object. - /// - public class JsonAssetProvider : TextDataProvider - { - /// - /// Converts raw text into requested object type via JSONUtility.FromJson. - /// - /// The text to convert. - /// Converted object - public override object Convert(Type type, string text) - { - try - { - return JsonUtility.FromJson(text, type); - } - catch (Exception e) - { - if (!IgnoreFailures) - Debug.LogException(e); - - return null; - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/JSONAssetProvider.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/JSONAssetProvider.cs.meta deleted file mode 100644 index fa935a29..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/JSONAssetProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 22e49408c617c404480396d74c837024 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/LegacyResourcesProvider.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/LegacyResourcesProvider.cs deleted file mode 100644 index 63dab971..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/LegacyResourcesProvider.cs +++ /dev/null @@ -1,104 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.Util; - -namespace UnityEngine.ResourceManagement.ResourceProviders -{ - /// - /// Provides assets loaded via Resources.LoadAsync API. - /// - public class LegacyResourcesProvider : ResourceProviderBase - { - internal class InternalOp - { - AsyncOperation m_RequestOperation; - ProvideHandle m_PI; - - public void Start(ProvideHandle provideHandle) - { - m_PI = provideHandle; - - m_RequestOperation = Resources.LoadAsync(m_PI.Location.InternalId); - m_RequestOperation.completed += AsyncOperationCompleted; - provideHandle.SetProgressCallback(PercentComplete); - } - - private void AsyncOperationCompleted(AsyncOperation op) - { - var request = op as ResourceRequest; - object result = request != null ? request.asset : null; - result = result != null && m_PI.Type.IsAssignableFrom(result.GetType()) ? result : null; - m_PI.Complete(result, result != null, null); - } - - public float PercentComplete() { return m_RequestOperation != null ? m_RequestOperation.progress : 0.0f; } - } - - public override void Provide(ProvideHandle pi) - { - Type t = pi.Type; - bool isList = t.IsGenericType && typeof(IList<>) == t.GetGenericTypeDefinition(); - - if (t.IsArray || isList) - { - object result = null; - if (t.IsArray) - result = ResourceManagerConfig.CreateArrayResult(t, Resources.LoadAll(pi.Location.InternalId, t.GetElementType())); - else - result = ResourceManagerConfig.CreateListResult(t, Resources.LoadAll(pi.Location.InternalId, t.GetGenericArguments()[0])); - - pi.Complete(result, result != null, null); - } - else - { - string assetPath = pi.Location.InternalId; - var i = assetPath.LastIndexOf('['); - if (i > 0) - { - var i2 = assetPath.LastIndexOf(']'); - if (i2 < i) - { - pi.Complete(null, false, new Exception(string.Format("Invalid index format in internal id {0}", assetPath))); - } - else - { - var subObjectName = assetPath.Substring(i + 1, i2 - (i + 1)); - assetPath = assetPath.Substring(0, i); - var objs = Resources.LoadAll(assetPath, pi.Type); - object result = null; - foreach (var o in objs) - { - if (o.name == subObjectName) - { - if (pi.Type.IsAssignableFrom(o.GetType())) - { - result = o; - break; - } - } - } - pi.Complete(result, result != null, null); - } - } - else - { - new InternalOp().Start(pi); - } - } - } - - /// - public override void Release(IResourceLocation location, object asset) - { - if (location == null) - throw new ArgumentNullException("location"); - var obj = asset as Object; - //GameObjects cannot be resleased via Object.Destroy because they are considered an asset - //but they can't be unloaded via Resources.UnloadAsset since they are NOT an asset? - if (obj != null && !(obj is GameObject)) - Resources.UnloadAsset(obj); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/LegacyResourcesProvider.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/LegacyResourcesProvider.cs.meta deleted file mode 100644 index 46cdc034..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/LegacyResourcesProvider.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: c6cb8c4cac7a64d109ab5f65c0f85aca -timeCreated: 1504834357 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/ResourceProviderBase.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/ResourceProviderBase.cs deleted file mode 100644 index f593909d..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/ResourceProviderBase.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.Util; - -namespace UnityEngine.ResourceManagement.ResourceProviders -{ - /// - /// Base class for IResourceProvider. - /// - public abstract class ResourceProviderBase : IResourceProvider, IInitializableObject - { - protected string m_ProviderId; - protected ProviderBehaviourFlags m_BehaviourFlags = ProviderBehaviourFlags.None; - - /// - public virtual string ProviderId - { - get - { - if(string.IsNullOrEmpty(m_ProviderId)) - m_ProviderId = GetType().FullName; - - return m_ProviderId; - } - } - - /// - public virtual bool Initialize(string id, string data) - { - m_ProviderId = id; - return !string.IsNullOrEmpty(m_ProviderId); - } - - /// - public virtual bool CanProvide(Type t, IResourceLocation location) - { - return GetDefaultType(location).IsAssignableFrom(t); - } - - /// - public override string ToString() - { - return ProviderId; - } - - /// - /// Release the specified object that was created from the specified location. - /// - /// The location of the object - /// The object to release. - /// - public virtual void Release(IResourceLocation location, object obj) - { - } - - /// - /// Get the default type of object that this provider can provide. - /// - /// - /// - public virtual Type GetDefaultType(IResourceLocation location) - { - return typeof(object); - } - - /// - /// Provide the object specified in the provideHandle. - /// - /// Contains all data needed to provide the requested object. - public abstract void Provide(ProvideHandle provideHandle); - - ProviderBehaviourFlags IResourceProvider.BehaviourFlags { get { return m_BehaviourFlags; } } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/ResourceProviderBase.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/ResourceProviderBase.cs.meta deleted file mode 100644 index b543403f..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/ResourceProviderBase.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 353e24853179e47bf9ebb9de6c42e428 -timeCreated: 1503084871 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/SceneProvider.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/SceneProvider.cs deleted file mode 100644 index ef467463..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/SceneProvider.cs +++ /dev/null @@ -1,180 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine.ResourceManagement; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.SceneManagement; - -namespace UnityEngine.ResourceManagement.ResourceProviders -{ - /// - /// Implementation if ISceneProvider - /// - public class SceneProvider : ISceneProvider - { - class SceneOp : AsyncOperationBase, IUpdateReceiver - { - bool m_ActivateOnLoad; - SceneInstance m_Inst; - IResourceLocation m_Location; - LoadSceneMode m_LoadMode; - int m_Priority; - private AsyncOperationHandle> m_DepOp; - ResourceManager m_ResourceManager; - public SceneOp(ResourceManager rm) - { - m_ResourceManager = rm; - } - public void Init(IResourceLocation location, LoadSceneMode loadMode, bool activateOnLoad, int priority, AsyncOperationHandle> depOp) - { - m_DepOp = depOp; - if (m_DepOp.IsValid()) - m_DepOp.Acquire(); - - m_Location = location; - m_LoadMode = loadMode; - m_ActivateOnLoad = activateOnLoad; - m_Priority = priority; - } - - protected override void GetDependencies(List deps) - { - if (m_DepOp.IsValid()) - deps.Add(m_DepOp); - } - protected override string DebugName { get { return string.Format("Scene({0})", m_Location == null ? "Invalid" : ShortenPath(m_Location.InternalId, false)); } } - - protected override void Execute() - { - var loadingFromBundle = false; - if (m_DepOp.IsValid()) - { - foreach (var d in m_DepOp.Result) - { - var abResource = d.Result as IAssetBundleResource; - if (abResource != null && abResource.GetAssetBundle() != null) - loadingFromBundle = true; - } - } - m_Inst = InternalLoadScene(m_Location, loadingFromBundle, m_LoadMode, m_ActivateOnLoad, m_Priority); - ((IUpdateReceiver)this).Update(0.0f); - } - - internal SceneInstance InternalLoadScene(IResourceLocation location, bool loadingFromBundle, LoadSceneMode loadMode, bool activateOnLoad, int priority) - { - var op = InternalLoad(location.InternalId, loadingFromBundle, loadMode); - op.allowSceneActivation = activateOnLoad; - op.priority = priority; - return new SceneInstance() { m_Operation = op, Scene = SceneManager.GetSceneAt(SceneManager.sceneCount - 1) }; - } - - AsyncOperation InternalLoad(string path, bool loadingFromBundle, LoadSceneMode mode) - { -#if !UNITY_EDITOR - return SceneManager.LoadSceneAsync(path, new LoadSceneParameters() { loadSceneMode = mode }); -#else - if (loadingFromBundle) - return SceneManager.LoadSceneAsync(path, new LoadSceneParameters() { loadSceneMode = mode }); - else - { - if (path.ToLower().LastIndexOf("assets/") == -1) - path = "Assets/" + path; - if (path.LastIndexOf(".unity") == -1) - path += ".unity"; - - return UnityEditor.SceneManagement.EditorSceneManager.LoadSceneAsyncInPlayMode(path, new LoadSceneParameters() { loadSceneMode = mode }); - } -#endif - } - - protected override void Destroy() - { - //the scene will be unloaded via the UnloadSceneOp as it waits correctlyf or the unload to complete before releasing the load op - if (m_DepOp.IsValid()) - m_DepOp.Release(); - base.Destroy(); - } - - protected override float Progress - { - get - { - return (m_Inst.m_Operation.progress + m_DepOp.PercentComplete) / 2; - } - } - - void IUpdateReceiver.Update(float unscaledDeltaTime) - { - if (m_Inst.m_Operation.isDone || (!m_ActivateOnLoad && m_Inst.m_Operation.progress == .9f)) - Complete(m_Inst, true, null); - } - } - - class UnloadSceneOp : AsyncOperationBase - { - SceneInstance m_Instance; - AsyncOperationHandle m_sceneLoadHandle; - public void Init(AsyncOperationHandle sceneLoadHandle) - { - if (sceneLoadHandle.ReferenceCount > 0) - { - m_sceneLoadHandle = sceneLoadHandle; - m_Instance = m_sceneLoadHandle.Result; - } - } - protected override void Execute() - { - if (m_sceneLoadHandle.IsValid()) - { - var unloadOp = SceneManager.UnloadSceneAsync(m_sceneLoadHandle.Result.Scene); - if (unloadOp == null) - UnloadSceneCompleted(null); - else - unloadOp.completed += UnloadSceneCompleted; - } - else - Complete(m_Instance, true, ""); - } - - private void UnloadSceneCompleted(AsyncOperation obj) - { - if (m_sceneLoadHandle.IsValid()) - m_sceneLoadHandle.Release(); - Complete(m_Instance, true, ""); - } - - protected override float Progress - { - get { return m_sceneLoadHandle.PercentComplete; } - } - - } - - /// - public AsyncOperationHandle ProvideScene(ResourceManager resourceManager, IResourceLocation location, LoadSceneMode loadMode, bool activateOnLoad, int priority) - { - AsyncOperationHandle> depOp = default(AsyncOperationHandle>); - if (location.HasDependencies) - depOp = resourceManager.ProvideResourceGroupCached(location.Dependencies, location.DependencyHashCode, typeof(IAssetBundleResource), null); - - SceneOp op = new SceneOp(resourceManager); - op.Init(location, loadMode, activateOnLoad, priority, depOp); - - var handle = resourceManager.StartOperation(op, depOp); - - if (depOp.IsValid()) - depOp.Release(); - - return handle; - } - - /// - public AsyncOperationHandle ReleaseScene(ResourceManager resourceManager, AsyncOperationHandle sceneLoadHandle) - { - var unloadOp = new UnloadSceneOp(); - unloadOp.Init(sceneLoadHandle); - return resourceManager.StartOperation(unloadOp, sceneLoadHandle); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/SceneProvider.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/SceneProvider.cs.meta deleted file mode 100644 index 16881c77..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/SceneProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 722d9658f4892ba47a7a9db5fdf152d6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation.meta deleted file mode 100644 index e53eee37..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: a1eb7ad3cb0ad104b9cf9b6018e9d578 -folderAsset: yes -timeCreated: 1498526414 -licenseType: Pro -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation/VirtualAssetBundle.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation/VirtualAssetBundle.cs deleted file mode 100644 index ce5521dd..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation/VirtualAssetBundle.cs +++ /dev/null @@ -1,515 +0,0 @@ -#if UNITY_EDITOR -using System; -using System.Collections.Generic; -using UnityEditor; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.Exceptions; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.Serialization; - -namespace UnityEngine.ResourceManagement.ResourceProviders.Simulation -{ - class VBAsyncOperation - { - - } - - class VBAsyncOperation : VBAsyncOperation - { - protected TObject m_Result; - protected AsyncOperationStatus m_Status; - protected Exception m_Error; - protected object m_Context; - - DelegateList> m_CompletedAction; - Action> m_OnDestroyAction; - - public override string ToString() - { - var instId = ""; - var or = m_Result as Object; - if (or != null) - instId = "(" + or.GetInstanceID() + ")"; - return string.Format("{0}, result='{1}', status='{2}', location={3}.", base.ToString(), (m_Result + instId), m_Status, m_Context); - } - - public event Action> Completed - { - add - { - if (IsDone) - { - DelayedActionManager.AddAction(value, 0, this); - } - else - { - if (m_CompletedAction == null) - m_CompletedAction = DelegateList>.CreateWithGlobalCache(); - m_CompletedAction.Add(value); - } - } - - remove - { - m_CompletedAction.Remove(value); - } - } - - public AsyncOperationStatus Status { get { return m_Status; } protected set { m_Status = value; } } - /// - public Exception OperationException - { - get { return m_Error; } - protected set - { - m_Error = value; - if (m_Error != null && ResourceManager.ExceptionHandler != null) - ResourceManager.ExceptionHandler(new AsyncOperationHandle(null), value); - } - } - public TObject Result { get { return m_Result; } } - public virtual bool IsDone { get { return Status == AsyncOperationStatus.Failed || Status == AsyncOperationStatus.Succeeded; } } - /// - public virtual float PercentComplete { get { return IsDone ? 1f : 0f; } } - /// - public object Context { get { return m_Context; } set { m_Context = value; } } - - public void InvokeCompletionEvent() - { - if (m_CompletedAction != null) - { - m_CompletedAction.Invoke(this); - m_CompletedAction.Clear(); - } - } - - public virtual void SetResult(TObject result) - { - m_Result = result; - m_Status = (m_Result == null) ? AsyncOperationStatus.Failed : AsyncOperationStatus.Succeeded; - } - - public VBAsyncOperation StartCompleted(object context, object key, TObject val, Exception error = null) - { - Context = context; - OperationException = error; - m_Result = val; - m_Status = (m_Result == null) ? AsyncOperationStatus.Failed : AsyncOperationStatus.Succeeded; - DelayedActionManager.AddAction((Action)InvokeCompletionEvent); - return this; - } - } - - - /// - /// Contains data needed to simulate a bundled asset - /// - [Serializable] - public class VirtualAssetBundleEntry - { - [FormerlySerializedAs("m_name")] - [SerializeField] - string m_Name; - /// - /// The name of the asset. - /// - public string Name { get { return m_Name; } } - [FormerlySerializedAs("m_size")] - [SerializeField] - long m_Size; - /// - /// The file size of the asset, in bytes. - /// - public long Size { get { return m_Size; } } - - /// - /// Construct a new VirtualAssetBundleEntry - /// - public VirtualAssetBundleEntry() { } - /// - /// Construct a new VirtualAssetBundleEntry - /// - /// The name of the asset. - /// The size of the asset, in bytes. - public VirtualAssetBundleEntry(string name, long size) - { - m_Name = name; - m_Size = size; - } - } - - /// - /// Contains data need to simulate an asset bundle. - /// - [Serializable] - public class VirtualAssetBundle : ISerializationCallbackReceiver, IAssetBundleResource - { - [FormerlySerializedAs("m_name")] - [SerializeField] - string m_Name; - [FormerlySerializedAs("m_isLocal")] - [SerializeField] - bool m_IsLocal; - [FormerlySerializedAs("m_dataSize")] - [SerializeField] - long m_DataSize; - [FormerlySerializedAs("m_headerSize")] - [SerializeField] - long m_HeaderSize; - [FormerlySerializedAs("m_latency")] - [SerializeField] - float m_Latency; - [SerializeField] - uint m_Crc; - [SerializeField] - string m_Hash; - - [FormerlySerializedAs("m_serializedAssets")] - [SerializeField] - List m_SerializedAssets = new List(); - - long m_HeaderBytesLoaded; - long m_DataBytesLoaded; - - LoadAssetBundleOp m_BundleLoadOperation; - List m_AssetLoadOperations = new List(); - Dictionary m_AssetMap; - /// - /// The name of the bundle. - /// - public string Name { get { return m_Name; } } - /// - /// The assets contained in the bundle. - /// - public List Assets { get { return m_SerializedAssets; } } - - /// - /// Construct a new VirtualAssetBundle object. - /// - public VirtualAssetBundle() - { - } - - /// - /// The percent of data that has been loaded. - /// - public float PercentComplete - { - get - { - if (m_HeaderSize + m_DataSize <= 0) - return 1; - - return (float)(m_HeaderBytesLoaded + m_DataBytesLoaded) / (m_HeaderSize + m_DataSize); - } - } - /// - /// Construct a new VirtualAssetBundle - /// - /// The name of the bundle. - /// Is the bundle local or remote. This is used to determine which bandwidth value to use when simulating loading. - public VirtualAssetBundle(string name, bool local, uint crc, string hash) - { - m_Latency = .1f; - m_Name = name; - m_IsLocal = local; - m_HeaderBytesLoaded = 0; - m_DataBytesLoaded = 0; - m_Crc = crc; - m_Hash = hash; - } - - /// - /// Set the size of the bundle. - /// - /// The size of the data. - /// The size of the header. - public void SetSize(long dataSize, long headerSize) - { - m_HeaderSize = headerSize; - m_DataSize = dataSize; - } - - /// - /// Not used - /// - public void OnBeforeSerialize() - { - } - - /// - /// Load serialized data into runtime structures. - /// - public void OnAfterDeserialize() - { - m_AssetMap = new Dictionary(); - foreach (var a in m_SerializedAssets) - m_AssetMap.Add(a.Name, a); - } - - class LoadAssetBundleOp : VBAsyncOperation - { - VirtualAssetBundle m_Bundle; - float m_TimeInLoadingState; - bool m_crcHashValidated; - public LoadAssetBundleOp(IResourceLocation location, VirtualAssetBundle bundle) - { - Context = location; - m_Bundle = bundle; - m_TimeInLoadingState = 0.0f; - } - - public override float PercentComplete - { - get - { - if (IsDone) - return 1f; - return m_Bundle.PercentComplete; - } - } - - public void Update(long localBandwidth, long remoteBandwidth, float unscaledDeltaTime) - { - - if (!m_crcHashValidated) - { - var location = Context as IResourceLocation; - var reqOptions = location.Data as AssetBundleRequestOptions; - if (reqOptions != null) - { - if (reqOptions.Crc != 0 && m_Bundle.m_Crc != reqOptions.Crc) - { - var err = string.Format("Error while downloading Asset Bundle: CRC Mismatch. Provided {0}, calculated {1} from data. Will not load Asset Bundle.", reqOptions.Crc, m_Bundle.m_Crc); - SetResult(null); - OperationException = new Exception(err); - InvokeCompletionEvent(); - } - if (!m_Bundle.m_IsLocal) - { - if (!string.IsNullOrEmpty(reqOptions.Hash)) - { - if (string.IsNullOrEmpty(m_Bundle.m_Hash) || m_Bundle.m_Hash != reqOptions.Hash) - { - Debug.LogWarningFormat("Mismatched hash in bundle {0}.", m_Bundle.Name); - } - //TODO: implement virtual cache that would persist between runs. - //if(vCache.hashBundle(m_Bundle.Name, reqOptions.Hash)) - // m_m_Bundle.IsLocal = true; - } - } - } - m_crcHashValidated = true; - } - - m_TimeInLoadingState += unscaledDeltaTime; - if (m_TimeInLoadingState > m_Bundle.m_Latency) - { - long localBytes = (long)Math.Ceiling(unscaledDeltaTime * localBandwidth); - long remoteBytes = (long)Math.Ceiling(unscaledDeltaTime * remoteBandwidth); - - if (m_Bundle.LoadData(localBytes, remoteBytes)) - { - SetResult(m_Bundle); - InvokeCompletionEvent(); - } - } - } - } - - bool LoadData(long localBytes, long remoteBytes) - { - if (m_IsLocal) - { - m_HeaderBytesLoaded += localBytes; - return m_HeaderBytesLoaded >= m_HeaderSize; - } - - m_DataBytesLoaded += remoteBytes; - if (m_DataBytesLoaded >= m_DataSize) - { - m_IsLocal = true; - m_HeaderBytesLoaded = 0; - } - return false; - } - - internal bool Unload() - { - if (m_BundleLoadOperation == null) - Debug.LogWarningFormat("Simulated assetbundle {0} is already unloaded.", m_Name); - m_HeaderBytesLoaded = 0; - m_BundleLoadOperation = null; - return true; - } - - internal VBAsyncOperation StartLoad(IResourceLocation location) - { - if (m_BundleLoadOperation != null) - { - if (m_BundleLoadOperation.IsDone) - Debug.LogWarningFormat("Simulated assetbundle {0} is already loaded.", m_Name); - else - Debug.LogWarningFormat("Simulated assetbundle {0} is already loading.", m_Name); - return m_BundleLoadOperation; - } - m_HeaderBytesLoaded = 0; - return (m_BundleLoadOperation = new LoadAssetBundleOp(location, this)); - } - - /// - /// Load an asset via its location. The asset will actually be loaded via the AssetDatabase API. - /// - /// - /// - /// - internal VBAsyncOperation LoadAssetAsync(Type type, IResourceLocation location) - { - if (location == null) - throw new ArgumentException("IResourceLocation location cannot be null."); - if (m_BundleLoadOperation == null) - return new VBAsyncOperation().StartCompleted(location, location, null, new ResourceManagerException("LoadAssetAsync called on unloaded bundle " + m_Name)); - - if (!m_BundleLoadOperation.IsDone) - return new VBAsyncOperation().StartCompleted(location, location, null, new ResourceManagerException("LoadAssetAsync called on loading bundle " + m_Name)); - - VirtualAssetBundleEntry assetInfo; - if (!m_AssetMap.TryGetValue(location.InternalId, out assetInfo)) - return new VBAsyncOperation().StartCompleted(location, location, null, new ResourceManagerException(string.Format("Unable to load asset {0} from simulated bundle {1}.", location.InternalId, Name))); - - var op = new LoadAssetOp(location, assetInfo, type); - m_AssetLoadOperations.Add(op); - return op; - } - - internal void CountBandwidthUsage(ref long localCount, ref long remoteCount) - { - if (m_BundleLoadOperation != null && m_BundleLoadOperation.IsDone) - { - localCount += m_AssetLoadOperations.Count; - return; - } - - if (m_IsLocal) - localCount++; - else - remoteCount++; - } - - interface IVirtualLoadable - { - bool Load(long localBandwidth, long remoteBandwidth); - } - - // TODO: This is only needed internally. We can change this to not derive off of AsyncOperationBase and simplify the code - class LoadAssetOp : VBAsyncOperation, IVirtualLoadable - { - long m_BytesLoaded; - float m_LastUpdateTime; - VirtualAssetBundleEntry m_AssetInfo; - Type provHandleType; - public LoadAssetOp(IResourceLocation location, VirtualAssetBundleEntry assetInfo, Type t) - { - provHandleType = t; - Context = location; - m_AssetInfo = assetInfo; - m_LastUpdateTime = Time.realtimeSinceStartup; - } - - public override float PercentComplete { get { return Mathf.Clamp01(m_BytesLoaded / (float)m_AssetInfo.Size); } } - public bool Load(long localBandwidth, long remoteBandwidth) - { - if (Time.unscaledTime > m_LastUpdateTime) - { - m_BytesLoaded += (long)Math.Ceiling((Time.unscaledTime - m_LastUpdateTime) * localBandwidth); - m_LastUpdateTime = Time.unscaledDeltaTime; - } - if (m_BytesLoaded < m_AssetInfo.Size) - return true; - if (!(Context is IResourceLocation)) - return false; - var location = Context as IResourceLocation; - var assetPath = location.InternalId; - object result = null; - - - if (provHandleType.IsArray) - result = ResourceManagerConfig.CreateArrayResult(provHandleType, AssetDatabase.LoadAllAssetRepresentationsAtPath(assetPath)); - else if (provHandleType.IsGenericType && typeof(IList<>) == provHandleType.GetGenericTypeDefinition()) - result = ResourceManagerConfig.CreateListResult(provHandleType, AssetDatabase.LoadAllAssetRepresentationsAtPath(assetPath)); - else - { - var i = assetPath.LastIndexOf('['); - if (i > 0) - { - var i2 = assetPath.LastIndexOf(']'); - if (i2 < i) - { - Debug.LogErrorFormat("Invalid index format in internal id {0}", assetPath); - } - else - { - - var subObjectName = assetPath.Substring(i + 1, i2 - (i + 1)); - assetPath = assetPath.Substring(0, i); - var objs = AssetDatabase.LoadAllAssetRepresentationsAtPath(assetPath); - foreach (var o in objs) - { - if (o.name == subObjectName) - { - if (provHandleType.IsAssignableFrom(o.GetType())) - { - result = o; - break; - } - } - } - } - } - else - { - var obj = AssetDatabase.LoadAssetAtPath(assetPath, location.ResourceType); - result = obj != null && provHandleType.IsAssignableFrom(obj.GetType()) ? obj : null; - } - } - SetResult(result); - InvokeCompletionEvent(); - return false; - } - } - - //return true until complete - internal bool UpdateAsyncOperations(long localBandwidth, long remoteBandwidth, float unscaledDeltaTime) - { - if (m_BundleLoadOperation == null) - return false; - - if (!m_BundleLoadOperation.IsDone) - { - m_BundleLoadOperation.Update(localBandwidth, remoteBandwidth, unscaledDeltaTime); - return true; - } - - foreach (var o in m_AssetLoadOperations) - { - if (!o.Load(localBandwidth, remoteBandwidth)) - { - m_AssetLoadOperations.Remove(o); - break; - } - } - return m_AssetLoadOperations.Count > 0; - } - - /// - /// Implementation of IAssetBundleResource API - /// - /// Always returns null. - public AssetBundle GetAssetBundle() - { - return null; - } - } -} -#endif diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation/VirtualAssetBundle.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation/VirtualAssetBundle.cs.meta deleted file mode 100644 index 0717ba5f..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation/VirtualAssetBundle.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 3d9b4067bd3135d46a8f5e265bee07cb -timeCreated: 1498587435 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation/VirtualAssetBundleProvider.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation/VirtualAssetBundleProvider.cs deleted file mode 100644 index 839932a4..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation/VirtualAssetBundleProvider.cs +++ /dev/null @@ -1,182 +0,0 @@ -#if UNITY_EDITOR -using System; -using System.Collections.Generic; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.Exceptions; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.Util; - -namespace UnityEngine.ResourceManagement.ResourceProviders.Simulation -{ - /// - /// Simulates the loading behavior of an asset bundle. Internally it uses the AssetDatabase API. This provider will only work in the editor. - /// - public class VirtualAssetBundleProvider : ResourceProviderBase, IUpdateReceiver - { - VirtualAssetBundleRuntimeData m_BundleData; - - private VirtualAssetBundleProvider() - { - m_ProviderId = typeof(AssetBundleProvider).FullName; - } - - /// - public override Type GetDefaultType(IResourceLocation location) - { - return typeof(IAssetBundleResource); - } - - /// - /// Construct a new VirtualAssetBundleProvider object; - /// Contains information on virtual bundle layout - /// - public VirtualAssetBundleProvider(VirtualAssetBundleRuntimeData data) - { - InitializeInternal(typeof(AssetBundleProvider).FullName, data); - } - - private bool InitializeInternal(string providerId, VirtualAssetBundleRuntimeData data) - { - m_ProviderId = providerId; - m_BundleData = data; - foreach (var b in m_BundleData.AssetBundles) - m_AllBundles.Add(b.Name, b); - return !string.IsNullOrEmpty(m_ProviderId); - } - - /// - /// Initilization data is passed when when constructed from serialized data - /// - /// The provider id - /// The data string, this is assumed to be the virtual bundle data path - /// true if the data is as expected - public override bool Initialize(string id, string data) - { - VirtualAssetBundleRuntimeData bundleData = JsonUtility.FromJson(data); - return InitializeInternal(id, bundleData); - } - - class InternalOp - { - VBAsyncOperation m_RequestOperation; - VirtualAssetBundleProvider m_Provider; - ProvideHandle m_PI; - - public float GetPercentComplete() - { - return m_RequestOperation != null ? m_RequestOperation.PercentComplete : 0.0f; - } - - public void Start(ProvideHandle provideHandle, VirtualAssetBundleProvider provider) - { - provideHandle.SetProgressCallback(GetPercentComplete); - m_Provider = provider; - m_PI = provideHandle; - - m_RequestOperation = m_Provider.LoadAsync(m_PI.Location); - m_RequestOperation.Completed += bundleOp => - { - object result = (bundleOp.Result != null && m_PI.Type.IsAssignableFrom(bundleOp.Result.GetType())) ? bundleOp.Result : null; - m_PI.Complete(result, (result != null && bundleOp.OperationException == null), bundleOp.OperationException); - }; - } - } - - public override void Provide(ProvideHandle provideHandle) - { - new InternalOp().Start(provideHandle, this); - } - - /// - public override void Release(IResourceLocation location, object asset) - { - if (location == null) - throw new ArgumentNullException("location"); - if (asset == null) - { - Debug.LogWarningFormat("Releasing null asset bundle from location {0}. This is an indication that the bundle failed to load.", location); - return; - } - Unload(location); - } - - bool m_UpdatingActiveBundles; - Dictionary m_PendingOperations = new Dictionary(); - - Dictionary m_AllBundles = new Dictionary(); - Dictionary m_ActiveBundles = new Dictionary(); - - internal bool Unload(IResourceLocation location) - { - if (location == null) - throw new ArgumentException("IResourceLocation location cannot be null."); - - VirtualAssetBundle bundle; - if (!m_AllBundles.TryGetValue(location.InternalId, out bundle)) - { - Debug.LogWarningFormat("Unable to unload virtual bundle {0}.", location); - return false; - } - if (m_UpdatingActiveBundles) - m_PendingOperations.Add(location.InternalId, null); - else - m_ActiveBundles.Remove(location.InternalId); - return bundle.Unload(); - } - - internal VBAsyncOperation LoadAsync(IResourceLocation location) - { - if (location == null) - throw new ArgumentException("IResourceLocation location cannot be null."); - VirtualAssetBundle bundle; - if (!m_AllBundles.TryGetValue(location.InternalId, out bundle)) - return new VBAsyncOperation().StartCompleted(location, location, default(VirtualAssetBundle), new ResourceManagerException(string.Format("Unable to unload virtual bundle {0}.", location))); - - try - { - if (m_UpdatingActiveBundles) - m_PendingOperations.Add(location.InternalId, bundle); - else - m_ActiveBundles.Add(location.InternalId, bundle); - } - catch (Exception ex) - { - Debug.LogException(ex); - } - return bundle.StartLoad(location); - } - - internal void Update(float unscaledDeltaTime) - { - long localCount = 0; - long remoteCount = 0; - foreach (VirtualAssetBundle bundle in m_ActiveBundles.Values) - bundle.CountBandwidthUsage(ref localCount, ref remoteCount); - - long localBw = localCount > 1 ? (m_BundleData.LocalLoadSpeed / localCount) : m_BundleData.LocalLoadSpeed; - long remoteBw = remoteCount > 1 ? (m_BundleData.RemoteLoadSpeed / remoteCount) : m_BundleData.RemoteLoadSpeed; - m_UpdatingActiveBundles = true; - foreach (VirtualAssetBundle bundle in m_ActiveBundles.Values) - bundle.UpdateAsyncOperations(localBw, remoteBw, unscaledDeltaTime); - m_UpdatingActiveBundles = false; - if (m_PendingOperations.Count > 0) - { - foreach (var o in m_PendingOperations) - { - if (o.Value == null) - m_ActiveBundles.Remove(o.Key); - else - m_ActiveBundles.Add(o.Key, o.Value); - } - m_PendingOperations.Clear(); - } - } - - void IUpdateReceiver.Update(float unscaledDeltaTime) - { - Update(unscaledDeltaTime); - } - - } -} -#endif diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation/VirtualAssetBundleProvider.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation/VirtualAssetBundleProvider.cs.meta deleted file mode 100644 index fce4346d..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation/VirtualAssetBundleProvider.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 0619aca0c5e2b4dc38311d8bdc157e99 -timeCreated: 1504209361 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation/VirtualAssetBundleRuntimeData.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation/VirtualAssetBundleRuntimeData.cs deleted file mode 100644 index bb8190b8..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation/VirtualAssetBundleRuntimeData.cs +++ /dev/null @@ -1,53 +0,0 @@ -#if UNITY_EDITOR -using System; -using System.Collections.Generic; -using System.IO; -using UnityEngine.Serialization; - -namespace UnityEngine.ResourceManagement.ResourceProviders.Simulation -{ - /// - /// Serialized data containing the asset bundle layout. - /// - [Serializable] - public class VirtualAssetBundleRuntimeData - { - [FormerlySerializedAs("m_simulatedAssetBundles")] - [SerializeField] - List m_SimulatedAssetBundles = new List(); - [FormerlySerializedAs("m_remoteLoadSpeed")] - [SerializeField] - long m_RemoteLoadSpeed = 1024 * 100; - [FormerlySerializedAs("m_localLoadSpeed")] - [SerializeField] - long m_LocalLoadSpeed = 1024 * 1024 * 10; - /// - /// The list of asset bundles to simulate. - /// - public List AssetBundles { get { return m_SimulatedAssetBundles; } } - /// - /// Bandwidth value (in bytes per second) to simulate loading from a remote location. - /// - public long RemoteLoadSpeed { get { return m_RemoteLoadSpeed; } } - /// - /// Bandwidth value (in bytes per second) to simulate loading from a local location. - /// - public long LocalLoadSpeed { get { return m_LocalLoadSpeed; } } - - /// - /// Construct a new VirtualAssetBundleRuntimeData object. - /// - public VirtualAssetBundleRuntimeData() { } - /// - /// Construct a new VirtualAssetBundleRuntimeData object. - /// - /// Bandwidth value (in bytes per second) to simulate loading from a local location. - /// Bandwidth value (in bytes per second) to simulate loading from a remote location. - public VirtualAssetBundleRuntimeData(long localSpeed, long remoteSpeed) - { - m_LocalLoadSpeed = localSpeed; - m_RemoteLoadSpeed = remoteSpeed; - } - } -} -#endif \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation/VirtualAssetBundleRuntimeData.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation/VirtualAssetBundleRuntimeData.cs.meta deleted file mode 100644 index f237ee25..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation/VirtualAssetBundleRuntimeData.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: b9d68e463588743e48c547b980d041f7 -timeCreated: 1504807697 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation/VirtualBundledAssetProvider.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation/VirtualBundledAssetProvider.cs deleted file mode 100644 index ced6d4d9..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation/VirtualBundledAssetProvider.cs +++ /dev/null @@ -1,105 +0,0 @@ -#if UNITY_EDITOR -using System; -using System.Collections.Generic; -using System.IO; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.Util; - -namespace UnityEngine.ResourceManagement.ResourceProviders.Simulation -{ - /// - /// Custom version of AssetBundleRequestOptions used to compute needed download size while bypassing the cache. In the future a virtual cache may be implemented. - /// - [Serializable] - public class VirtualAssetBundleRequestOptions : AssetBundleRequestOptions - { - /// - /// Computes the amount of data needed to be downloaded for this bundle. - /// - /// The location of the bundle. - /// The size in bytes of the bundle that is needed to be downloaded. If the local cache contains the bundle or it is a local bundle, 0 will be returned. - public override long ComputeSize(IResourceLocation loc) - { - if (!ResourceManagerConfig.IsPathRemote(loc.InternalId)) - { -// Debug.LogFormat("Location {0} is local, ignoring size", loc); - return 0; - } - var locHash = Hash128.Parse(Hash); - if (!locHash.isValid) - { - // Debug.LogFormat("Location {0} has invalid hash, using size of {1}", loc, BundleSize); - return BundleSize; - } -#if !UNITY_SWITCH && !UNITY_PS4 - var bundleName = Path.GetFileNameWithoutExtension(loc.InternalId); - if (locHash.isValid) //If we have a hash, ensure that our desired version is cached. - { - if (Caching.IsVersionCached(bundleName, locHash)) - return 0; - return BundleSize; - } - else //If we don't have a hash, any cached version will do. - { - List versions = new List(); - Caching.GetCachedVersions(bundleName, versions); - if (versions.Count > 0) - return 0; - } -#endif //!UNITY_SWITCH && !UNITY_PS4 - return BundleSize; - } - } - - /// - /// Provides assets from virtual asset bundles. Actual loads are done through the AssetDatabase API. - /// - public class VirtualBundledAssetProvider : ResourceProviderBase - { - /// - /// Default copnstructor. - /// - public VirtualBundledAssetProvider() - { - m_ProviderId = typeof(BundledAssetProvider).FullName; - } - - class InternalOp - { - VBAsyncOperation m_RequestOperation; - ProvideHandle m_PI; - - public void Start(ProvideHandle provideHandle, VirtualAssetBundle bundle) - { - m_PI = provideHandle; - m_RequestOperation = bundle.LoadAssetAsync(m_PI.Type, m_PI.Location); - m_RequestOperation.Completed += RequestOperation_Completed; - } - - private void RequestOperation_Completed(VBAsyncOperation obj) - { - bool success = (obj.Result != null && m_PI.Type.IsAssignableFrom(obj.Result.GetType())) && obj.OperationException == null; - m_PI.Complete(obj.Result, success, obj.OperationException); - } - - public float GetPercentComplete() { return m_RequestOperation != null ? m_RequestOperation.PercentComplete : 0.0f; } - } - - public override void Provide(ProvideHandle provideHandle) - { - List deps = new List(); // TODO: garbage. need to pass actual count and reuse the list - provideHandle.GetDependencies(deps); - VirtualAssetBundle bundle = deps[0] as VirtualAssetBundle; - if (bundle == null) - { - provideHandle.Complete(null, false, null); - } - else - { - new InternalOp().Start(provideHandle, bundle); - } - } - } -} -#endif diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation/VirtualBundledAssetProvider.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation/VirtualBundledAssetProvider.cs.meta deleted file mode 100644 index f36460ca..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/Simulation/VirtualBundledAssetProvider.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 6e4b11d3ae39f459483b122f50af55ee -timeCreated: 1504647703 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/TextDataProvider.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/TextDataProvider.cs deleted file mode 100644 index 5dc6073e..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/TextDataProvider.cs +++ /dev/null @@ -1,107 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using UnityEngine.Networking; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.Util; - -namespace UnityEngine.ResourceManagement.ResourceProviders -{ - /// - /// Provides raw text from a local or remote URL. - /// - public class TextDataProvider : ResourceProviderBase - { - /// - /// Controls whether errors are logged - this is disabled when trying to load from the local cache since failures are expected - /// - public bool IgnoreFailures { get; set; } - - class InternalOp - { - TextDataProvider m_Provider; - UnityWebRequestAsyncOperation m_RequestOperation; - bool m_IgnoreFailures; - ProvideHandle m_PI; - - private float GetPercentComplete() { return m_RequestOperation != null ? m_RequestOperation.progress : 0.0f; } - - public void Start(ProvideHandle provideHandle, TextDataProvider rawProvider, bool ignoreFailures) - { - m_PI = provideHandle; - provideHandle.SetProgressCallback(GetPercentComplete); - m_Provider = rawProvider; - m_IgnoreFailures = ignoreFailures; - var path = m_PI.Location.InternalId; - if (File.Exists(path)) - { -#if NET_4_6 - if(path.Length >= 260) - path = @"\\?\" + path; -#endif - var text = File.ReadAllText(path); - object result = m_Provider.Convert(m_PI.Type, text); - m_PI.Complete(result, result != null, null); - } - else if (ResourceManagerConfig.ShouldPathUseWebRequest(path)) - { - m_RequestOperation = new UnityWebRequest(path, UnityWebRequest.kHttpVerbGET, new DownloadHandlerBuffer(), null).SendWebRequest(); - m_RequestOperation.completed += RequestOperation_completed; - } - else - { - Exception exception = null; - //Don't log errors when loading from the persistentDataPath since these files are expected to not exist until created - if (!m_IgnoreFailures) - { - exception = new Exception(string.Format("Invalid path in RawDataProvider: '{0}'.", path)); - } - m_PI.Complete(null, false, exception); - } - } - - private void RequestOperation_completed(AsyncOperation op) - { - var webOp = op as UnityWebRequestAsyncOperation; - object result = null; - Exception exception = null; - if (webOp != null) - { - var webReq = webOp.webRequest; - if (string.IsNullOrEmpty(webReq.error)) - result = m_Provider.Convert(m_PI.Type, webReq.downloadHandler.text); - else - exception = new Exception(string.Format("RawDataProvider unable to load from url {0}, result='{1}'.", webReq.url, webReq.error)); - } - else - { - exception = new Exception("RawDataProvider unable to load from unknown url."); - } - if (m_IgnoreFailures) - exception = null; - m_PI.Complete(result, result != null, exception); - } - } - - /// - /// Method to convert the text into the object type requested. Usually the text contains a JSON formatted serialized object. - /// - /// The object type to convert the text to. - /// The text to be converted. - /// The converted object. - public virtual object Convert(Type type, string text) { return text; } - - /// - /// Provides raw text data from the location. - /// - /// Object type. - /// Location of the data to load. - /// Depency operation. - /// Operation to load the raw data. - public override void Provide(ProvideHandle provideHandle) - { - new InternalOp().Start(provideHandle, this, IgnoreFailures); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/TextDataProvider.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/TextDataProvider.cs.meta deleted file mode 100644 index 7adff420..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/ResourceProviders/TextDataProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 15f7962ec30713a4992a23b060cdf71c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Unity.ResourceManager.asmdef b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Unity.ResourceManager.asmdef deleted file mode 100644 index 93d3aa17..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Unity.ResourceManager.asmdef +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name": "Unity.ResourceManager" -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Unity.ResourceManager.asmdef.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Unity.ResourceManager.asmdef.meta deleted file mode 100644 index 8e66384e..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Unity.ResourceManager.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 84651a3751eca9349aac36a66bba901b -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util.meta deleted file mode 100644 index 4368bbc6..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 974a84a8c55ad4a0187379f800b8fe09 -folderAsset: yes -timeCreated: 1503347094 -licenseType: Pro -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/DelayedActionManager.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/DelayedActionManager.cs deleted file mode 100644 index 56c084e4..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/DelayedActionManager.cs +++ /dev/null @@ -1,228 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Runtime.CompilerServices; -using UnityEditor; - -[assembly: InternalsVisibleTo("Unity.Addressables.Editor.Tests")] - -namespace UnityEngine.ResourceManagement.Util -{ - internal class DelayedActionManager : MonoBehaviour - { - - struct DelegateInfo - { - static int s_Id; - int m_Id; - Delegate m_Delegate; - float m_InvocationTime; - object[] m_Target; - public DelegateInfo(Delegate d, float invocationTime, params object[] p) - { - m_Delegate = d; - m_Id = s_Id++; - m_Target = p; - m_InvocationTime = invocationTime; - } - - public float InvocationTime { get { return m_InvocationTime; } } - public override string ToString() - { - if (m_Delegate == null || m_Delegate.Method.DeclaringType == null) - return "Null m_delegate for " + m_Id; - var n = m_Id + " (target=" + m_Delegate.Target + ") " + m_Delegate.Method.DeclaringType.Name + "." + m_Delegate.Method.Name + "("; - var sep = ""; - foreach (var o in m_Target) - { - n += sep + o; - sep = ", "; - } - return n + ") @" + m_InvocationTime; - } - - public void Invoke() - { - try - { - m_Delegate.DynamicInvoke(m_Target); - } - catch (Exception e) - { - Debug.LogErrorFormat("Exception thrown in DynamicInvoke: {0} {1}", e, this); - } - } - } - List[] m_Actions = { new List(), new List() }; - LinkedList m_DelayedActions = new LinkedList(); - Stack> m_NodeCache = new Stack>(10); - int m_CollectionIndex; - static DelayedActionManager s_Instance; - bool m_DestroyOnCompletion; - LinkedListNode GetNode(ref DelegateInfo del) - { - if (m_NodeCache.Count > 0) - { - var node = m_NodeCache.Pop(); - node.Value = del; - return node; - } - return new LinkedListNode(del); - } - public static void Clear() - { - if (s_Instance != null) - s_Instance.DestroyWhenComplete(); - s_Instance = null; - } - - void DestroyWhenComplete() - { - m_DestroyOnCompletion = true; - } - - public static void AddAction(Delegate action, float delay = 0, params object[] parameters) - { - if (s_Instance == null) - { - s_Instance = new GameObject("DelayedActionManager", typeof(DelayedActionManager)).GetComponent(); - s_Instance.gameObject.hideFlags = HideFlags.HideAndDontSave; -#if UNITY_EDITOR - if (!Application.isPlaying) - { -// Debug.Log("DelayedActionManager called outside of play mode, registering with EditorApplication.update."); - EditorApplication.update += s_Instance.LateUpdate; - } -#endif - } - s_Instance.AddActionInternal(action, delay, parameters); - } - - void AddActionInternal(Delegate action, float delay, params object[] parameters) - { - var del = new DelegateInfo(action, Time.unscaledTime + delay, parameters); - if (delay > 0) - { - if (m_DelayedActions.Count == 0) - { - m_DelayedActions.AddFirst(GetNode(ref del)); - } - else - { - - var n = m_DelayedActions.Last; - while (n != null && n.Value.InvocationTime > del.InvocationTime) - n = n.Previous; - if (n == null) - m_DelayedActions.AddFirst(GetNode(ref del)); - else - m_DelayedActions.AddBefore(n, GetNode(ref del)); - } - } - else - m_Actions[m_CollectionIndex].Add(del); - } - - void Awake() - { - gameObject.hideFlags = HideFlags.HideAndDontSave; - DontDestroyOnLoad(gameObject); - } - - public static bool IsActive - { - get - { - if (s_Instance == null) - return false; - if (s_Instance.m_DelayedActions.Count > 0) - return true; - for (int i = 0; i < s_Instance.m_Actions.Length; i++) - if (s_Instance.m_Actions[i].Count > 0) - return true; - return false; - } - } - - public static bool Wait(float timeout = 0, float timeAdvanceAmount = 0) - { - if (!IsActive) - return true; - - var timer = new Stopwatch(); - timer.Start(); - var t = Time.unscaledTime; - do - { - s_Instance.InternalLateUpdate(t); - if(timeAdvanceAmount >= 0) - t += timeAdvanceAmount; - else - t = Time.unscaledTime; - - } while (IsActive && (timeout <= 0 || timer.Elapsed.TotalSeconds < timeout)); - return !IsActive; - } - - void LateUpdate() - { - InternalLateUpdate(Time.unscaledTime); - } - - void InternalLateUpdate(float t) - { - int iterationCount = 0; - while (m_DelayedActions.Count > 0 && m_DelayedActions.First.Value.InvocationTime <= t) - { - m_Actions[m_CollectionIndex].Add(m_DelayedActions.First.Value); - m_NodeCache.Push(m_DelayedActions.First); - m_DelayedActions.RemoveFirst(); - } - - do - { - int invokeIndex = m_CollectionIndex; - m_CollectionIndex = (m_CollectionIndex + 1) % 2; - var list = m_Actions[invokeIndex]; - if (list.Count > 0) - { - for (int i = 0; i < list.Count; i++) - list[i].Invoke(); - list.Clear(); - } - iterationCount++; - Debug.Assert(iterationCount < 100); - } while (m_Actions[m_CollectionIndex].Count > 0); - - if (m_DestroyOnCompletion && !IsActive) - Destroy(gameObject); - } - - private void OnApplicationQuit() - { - if(s_Instance != null) - Destroy(s_Instance.gameObject); - } - -#if UNITY_EDITOR - [InitializeOnLoad] - public static class PlayStateNotifier - { - static PlayStateNotifier() - { - EditorApplication.playModeStateChanged += ModeChanged; - } - - static void ModeChanged(PlayModeStateChange state) - { - if (state == PlayModeStateChange.ExitingPlayMode) - { - if(s_Instance != null) - DestroyImmediate(s_Instance.gameObject); - } - } - } -#endif - } - -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/DelayedActionManager.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/DelayedActionManager.cs.meta deleted file mode 100644 index e61a9165..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/DelayedActionManager.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: caa3431363af216479bf77b9d16e8c72 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/DelegateList.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/DelegateList.cs deleted file mode 100644 index 3a522010..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/DelegateList.cs +++ /dev/null @@ -1,110 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine.ResourceManagement.Util; - -internal class DelegateList -{ - Func, LinkedListNode>> m_acquireFunc; - Action>> m_releaseFunc; - LinkedList> m_callbacks; - bool m_invoking = false; - public DelegateList(Func, LinkedListNode>> acquireFunc, Action>> releaseFunc) - { - if (acquireFunc == null) - throw new ArgumentNullException("acquireFunc"); - if (releaseFunc == null) - throw new ArgumentNullException("releaseFunc"); - m_acquireFunc = acquireFunc; - m_releaseFunc = releaseFunc; - } - - public int Count { get { return m_callbacks == null ? 0 : m_callbacks.Count; } } - - public void Add(Action action) - { - var node = m_acquireFunc(action); - if (m_callbacks == null) - m_callbacks = new LinkedList>(); - m_callbacks.AddLast(node); - } - - public void Remove(Action action) - { - if (m_callbacks == null) - return; - - var node = m_callbacks.First; - while (node != null) - { - if (node.Value == action) - { - if (m_invoking) - { - node.Value = null; - } - else - { - m_callbacks.Remove(node); - m_releaseFunc(node); - } - return; - } - node = node.Next; - } - } - - public void Invoke(T res) - { - if (m_callbacks == null) - return; - - m_invoking = true; - var node = m_callbacks.First; - while (node != null) - { - if (node.Value != null) - { - try - { - node.Value(res); - } - catch (Exception ex) - { - UnityEngine.Debug.LogException(ex); - } - } - node = node.Next; - } - m_invoking = false; - var r = m_callbacks.First; - while (r != null) - { - var next = r.Next; - if (r.Value == null) - { - m_callbacks.Remove(r); - m_releaseFunc(r); - } - r = next; - } - } - - public void Clear() - { - if (m_callbacks == null) - return; - var node = m_callbacks.First; - while (node != null) - { - var next = node.Next; - m_callbacks.Remove(node); - m_releaseFunc(node); - node = next; - } - } - - public static DelegateList CreateWithGlobalCache() - { - return new DelegateList(GlobalLinkedListNodeCache>.Acquire, GlobalLinkedListNodeCache>.Release); - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/DelegateList.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/DelegateList.cs.meta deleted file mode 100644 index f5ee32bb..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/DelegateList.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a6ea1740a8df96b44bd23845119733cf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/Exceptions.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/Exceptions.cs deleted file mode 100644 index 4b2c8f8e..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/Exceptions.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System; -using System.Runtime.Serialization; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.ResourceProviders; - -namespace UnityEngine.ResourceManagement.Exceptions -{ - /// - /// Base class for all ResourceManager related exceptions. - /// - public class ResourceManagerException : Exception - { - /// - /// Construct a new ResourceManagerException. - /// - public ResourceManagerException() { } - /// - /// Construct a new ResourceManagerException. - /// - /// Message to describe the exception. - public ResourceManagerException(string message) : base(message) { } - /// - /// Construct a new ResourceManagerException. - /// - /// Message to describe the exception. - /// Inner exception that caused this exception. - public ResourceManagerException(string message, Exception innerException) : base(message, innerException) { } - /// - /// Construct a new ResourceManagerException. - /// - /// Message to describe the exception. - /// Context related to the exception. - protected ResourceManagerException(SerializationInfo message, StreamingContext context) : base(message, context) { } - } - /// - /// Exception returned when the IResourceProvider is not found for a location. - /// - public class UnknownResourceProviderException : ResourceManagerException - { - /// - /// The location that contains the provider id that was not found. - /// - public IResourceLocation Location { get; private set; } - /// - /// Construct a new UnknownResourceProviderException - /// - /// The location that caused the exception to be created. - public UnknownResourceProviderException(IResourceLocation location) - { - Location = location; - } - /// - /// Construct a new UnknownResourceProviderException - /// - public UnknownResourceProviderException() { } - /// - /// Construct a new UnknownResourceProviderException - /// - /// Message to describe the exception. - public UnknownResourceProviderException(string message) : base(message) { } - /// - /// Construct a new UnknownResourceProviderException - /// - /// Message to describe the exception. - /// Inner exception that caused this exception. - public UnknownResourceProviderException(string message, Exception innerException) : base(message, innerException) { } - /// - /// Construct a new UnknownResourceProviderException - /// - /// Message to describe the exception. - /// Context related to the exception. - protected UnknownResourceProviderException(SerializationInfo message, StreamingContext context) : base(message, context) { } - - /// - /// Returns a string describing this exception - /// - public override string Message - { - get - { - return base.Message + ", ProviderId=" + Location.ProviderId + ", Location=" + Location; - } - } - /// - /// Returns string representation of exception. - /// - /// String representation of exception. - public override string ToString() - { - return Message; - } - - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/Exceptions.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/Exceptions.cs.meta deleted file mode 100644 index 16b1d075..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/Exceptions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ba5033d0e43aacc4aa1fe4bed1f637e6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/ListWithEvents.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/ListWithEvents.cs deleted file mode 100644 index 2f5e780b..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/ListWithEvents.cs +++ /dev/null @@ -1,101 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -internal class ListWithEvents : IList -{ - private List m_List = new List(); - - - public event Action OnElementAdded; - public event Action OnElementRemoved; - - private void InvokeAdded(T element) - { - if (OnElementAdded != null) - OnElementAdded(element); - } - - private void InvokeRemoved(T element) - { - if (OnElementRemoved != null) - OnElementRemoved(element); - } - - - public T this[int index] - { - get { return m_List[index]; } - set - { - T oldElement = m_List[index]; - m_List[index] = value; - InvokeRemoved(oldElement); - InvokeAdded(value); - } - } - - public int Count { get { return m_List.Count; } } - - public bool IsReadOnly { get { return ((IList)m_List).IsReadOnly; } } - - public void Add(T item) - { - m_List.Add(item); - InvokeAdded(item); - } - - public void Clear() - { - foreach (T obj in m_List) - InvokeRemoved(obj); - m_List.Clear(); - } - - public bool Contains(T item) - { - return m_List.Contains(item); - } - - public void CopyTo(T[] array, int arrayIndex) - { - m_List.CopyTo(array, arrayIndex); - } - - public IEnumerator GetEnumerator() - { - return m_List.GetEnumerator(); - } - - public int IndexOf(T item) - { - return m_List.IndexOf(item); - } - - public void Insert(int index, T item) - { - m_List.Insert(index, item); - InvokeAdded(item); - } - - public bool Remove(T item) - { - bool ret = m_List.Remove(item); - if (ret) - InvokeRemoved(item); - return ret; - } - - public void RemoveAt(int index) - { - T item = m_List[index]; - m_List.RemoveAt(index); - InvokeRemoved(item); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return ((IEnumerable)m_List).GetEnumerator(); - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/ListWithEvents.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/ListWithEvents.cs.meta deleted file mode 100644 index c354d67d..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/ListWithEvents.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 84f724d4704815c4e96da7a3308f0be7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/MonoBehaviourCallbackHooks.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/MonoBehaviourCallbackHooks.cs deleted file mode 100644 index d6e7a5d8..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/MonoBehaviourCallbackHooks.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -internal class MonoBehaviourCallbackHooks : MonoBehaviour -{ - public event Action OnUpdateDelegate; - - void Awake() - { - DontDestroyOnLoad(gameObject); - } - - // Update is called once per frame - void Update() - { - if (OnUpdateDelegate != null) - OnUpdateDelegate(Time.unscaledDeltaTime); - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/MonoBehaviourCallbackHooks.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/MonoBehaviourCallbackHooks.cs.meta deleted file mode 100644 index ea5b1220..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/MonoBehaviourCallbackHooks.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c3a73b848f18b6b498c76e82b2551f0d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/ResourceManagerConfig.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/ResourceManagerConfig.cs deleted file mode 100644 index 05a52f26..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/ResourceManagerConfig.cs +++ /dev/null @@ -1,476 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using UnityEngine.Serialization; - -namespace UnityEngine.ResourceManagement.Util -{ - /// - /// Interface for objects that support post construction initialization via an id and byte array. - /// - public interface IInitializableObject - { - /// - /// Initialize a constructed object. - /// - /// The id of the object. - /// Serialized data for the object. - /// The result of the initialization. - bool Initialize(string id, string data); - } - - - /// - /// Interface for objects that can create object initialization data. - /// - public interface IObjectInitializationDataProvider - { - /// - /// The name used in the GUI for this provider - /// - string Name { get; } - /// - /// Construct initialization data for runtime. - /// - /// Init data that will be deserialized at runtime. - ObjectInitializationData CreateObjectInitializationData(); - } - - /// - /// Allocation strategy for managing heap allocations - /// - public interface IAllocationStrategy - { - /// - /// Create a new object of type t. - /// - /// The type to return. - /// The hash code of the type. - /// The new object. - object New(Type type, int typeHash); - /// - /// Release an object. - /// - /// The object to release. - void Release(int typeHash, object obj); - } - /// - /// Default allocator that relies in garbace collection - /// - public class DefaultAllocationStrategy : IAllocationStrategy - { - /// - public object New(Type type, int typeHash) - { - return Activator.CreateInstance(type); - } - /// - public void Release(int typeHash, object obj) - { - - } - } - - /// - /// Allocation strategy that uses internal pools of objects to avoid allocations that can trigger GC calls. - /// - public class LRUCacheAllocationStrategy : IAllocationStrategy - { - int m_poolMaxSize; - int m_poolInitialCapacity; - int m_poolCacheMaxSize; - List> m_poolCache = new List>(); - Dictionary> m_cache = new Dictionary>(); - /// - /// Create a new LRUAllocationStrategy objct. - /// - /// The max size of each pool. - /// The initial capacity to create each pool list with. - /// The max size of the internal pool cache. - /// The initial number of pools to create. - public LRUCacheAllocationStrategy(int poolMaxSize, int poolCapacity, int poolCacheMaxSize, int initialPoolCacheCapacity) - { - m_poolMaxSize = poolMaxSize; - m_poolInitialCapacity = poolCapacity; - m_poolCacheMaxSize = poolCacheMaxSize; - for (int i = 0; i < initialPoolCacheCapacity; i++) - m_poolCache.Add(new List(m_poolInitialCapacity)); - } - - List GetPool() - { - int count = m_poolCache.Count; - if (count == 0) - return new List(m_poolInitialCapacity); - var pool = m_poolCache[count - 1]; - m_poolCache.RemoveAt(count - 1); - return pool; - } - - void ReleasePool(List pool) - { - if (m_poolCache.Count < m_poolCacheMaxSize) - m_poolCache.Add(pool); - } - - /// - public object New(Type type, int typeHash) - { - List pool; - if (m_cache.TryGetValue(typeHash, out pool)) - { - var count = pool.Count; - var v = pool[count - 1]; - pool.RemoveAt(count - 1); - if (count == 1) - { - m_cache.Remove(typeHash); - ReleasePool(pool); - } - return v; - } - return Activator.CreateInstance(type); - } - - /// - public void Release(int typeHash, object obj) - { - List pool; - if (!m_cache.TryGetValue(typeHash, out pool)) - m_cache.Add(typeHash, pool = GetPool()); - if (pool.Count < m_poolMaxSize) - pool.Add(obj); - } - } - - /// - /// Attribute for restricting which types can be assigned to a SerializedType - /// - public class SerializedTypeRestrictionAttribute : Attribute - { - /// - /// The type to restrict a serialized type to. - /// - public Type type; - } - - /// - /// Cache for nodes of LinkedLists. This can be used to eliminate GC allocations. - /// - /// The type of node. - public class LinkedListNodeCache - { - int m_NodesCreated = 0; - LinkedList m_NodeCache; - /// - /// Creates or returns a LinkedListNode of the requested type and set the value. - /// - /// The value to set to returned node to. - /// A LinkedListNode with the value set to val. - public LinkedListNode Acquire(T val) - { - if (m_NodeCache != null) - { - var n = m_NodeCache.First; - if (n != null) - { - m_NodeCache.RemoveFirst(); - n.Value = val; - return n; - } - } - m_NodesCreated++; - return new LinkedListNode(val); - } - - /// - /// Release the linked list node for later use. - /// - /// - public void Release(LinkedListNode node) - { - if (m_NodeCache == null) - m_NodeCache = new LinkedList(); - - node.Value = default(T); - m_NodeCache.AddLast(node); - } - internal int CreatedNodeCount { get { return m_NodesCreated; } } - internal int CachedNodeCount { get { return m_NodeCache == null ? 0 : m_NodeCache.Count; } } - } - - internal static class GlobalLinkedListNodeCache - { - static LinkedListNodeCache m_globalCache; - public static LinkedListNode Acquire(T val) - { - if (m_globalCache == null) - m_globalCache = new LinkedListNodeCache(); - return m_globalCache.Acquire(val); - } - public static void Release(LinkedListNode node) - { - if (m_globalCache == null) - m_globalCache = new LinkedListNodeCache(); - m_globalCache.Release(node); - } - } - - /// - /// Wrapper for serializing types for runtime. - /// - [Serializable] - public struct SerializedType - { - [FormerlySerializedAs("m_assemblyName")] - [SerializeField] - string m_AssemblyName; - /// - /// The assembly name of the type. - /// - public string AssemblyName { get { return m_AssemblyName; } } - - [FormerlySerializedAs("m_className")] - [SerializeField] - string m_ClassName; - /// - /// The name of the type. - /// - public string ClassName { get { return m_ClassName; } } - - Type m_CachedType; - - /// - public override string ToString() - { - return Value == null ? "" : Value.Name; - } - - /// - /// Get and set the serialized type. - /// - public Type Value - { - get - { - try - { - if (string.IsNullOrEmpty(m_AssemblyName) || string.IsNullOrEmpty(m_ClassName)) - return null; - - if (m_CachedType == null) - { - var assembly = Assembly.Load(m_AssemblyName); - if (assembly != null) - m_CachedType = assembly.GetType(m_ClassName); - } - return m_CachedType; - } - catch (Exception ex) - { - //file not found is most likely an editor only type, we can ignore error. - if(ex.GetType() != typeof(FileNotFoundException)) - Debug.LogException(ex); - return null; - } - } - set - { - if (value != null) - { - m_AssemblyName = value.Assembly.FullName; - m_ClassName = value.FullName; - } - else - { - m_AssemblyName = m_ClassName = null; - } - } - } - } - - /// - /// Contains data used to construct and initialize objects at runtime. - /// - [Serializable] - public struct ObjectInitializationData - { -#pragma warning disable 0649 - [FormerlySerializedAs("m_id")] - [SerializeField] - string m_Id; - /// - /// The object id. - /// - public string Id { get { return m_Id; } } - - [FormerlySerializedAs("m_objectType")] - [SerializeField] - SerializedType m_ObjectType; - /// - /// The object type that will be created. - /// - public SerializedType ObjectType { get { return m_ObjectType; } } - - [FormerlySerializedAs("m_data")] - [SerializeField] - string m_Data; - /// - /// String representation of the data that will be passed to the IInitializableObject.Initialize method of the created object. This is usually a JSON string of the serialized data object. - /// - public string Data { get { return m_Data; } } -#pragma warning restore 0649 - - /// - public override string ToString() - { - return string.Format("ObjectInitializationData: id={0}, type={1}", m_Id, m_ObjectType); - } - - /// - /// Create an instance of the defined object. Initialize will be called on it with the id and data if it implements the IInitializableObject interface. - /// - /// Optional id to assign to the created object. This only applies to objects that inherit from IInitializableObject. - /// Constructed object. This object will already be initialized with its serialized data and id. - public TObject CreateInstance(string idOverride = null) - { - try - { - var objType = m_ObjectType.Value; - if (objType == null) - return default(TObject); - var obj = Activator.CreateInstance(objType, true); - var serObj = obj as IInitializableObject; - if (serObj != null) - { - if (!serObj.Initialize(idOverride == null ? m_Id : idOverride, m_Data)) - return default(TObject); - } - return (TObject)obj; - } - catch (Exception ex) - { - Debug.LogException(ex); - return default(TObject); - } - } - -#if UNITY_EDITOR - Type[] m_RuntimeTypes; - /// - /// Construct a serialized data for the object. - /// - /// The type of object to create. - /// The object id. - /// The serializable object that will be saved into the Data string via the JSONUtility.ToJson method. - /// Contains data used to construct and initialize an object at runtime. - public static ObjectInitializationData CreateSerializedInitializationData(Type objectType, string id = null, object dataObject = null) - { - return new ObjectInitializationData - { - m_ObjectType = new SerializedType { Value = objectType }, - m_Id = string.IsNullOrEmpty(id) ? objectType.FullName : id, - m_Data = dataObject == null ? null : JsonUtility.ToJson(dataObject), - m_RuntimeTypes = dataObject == null ? null : new[] { dataObject.GetType() } - }; - } - - /// - /// Construct a serialized data for the object. - /// - /// The type of object to create. - /// The ID for the object - /// The serializable object that will be saved into the Data string via the JSONUtility.ToJson method. - /// Contains data used to construct and initialize an object at runtime. - public static ObjectInitializationData CreateSerializedInitializationData(string id = null, object dataObject = null) - { - return CreateSerializedInitializationData(typeof(T), id, dataObject); - } - - /// - /// Get the set of runtime types need to deserialized this object. This is used to ensure that types are not stripped from player builds. - /// - /// - public Type[] GetRuntimeTypes() - { - return m_RuntimeTypes; - } -#endif - } - - static class ResourceManagerConfig - { - internal static bool IsPathRemote(string path) - { - return path != null && path.StartsWith("http"); - } - - internal static bool ShouldPathUseWebRequest(string path) - { - return path != null && path.Contains("://"); - } - - public static Array CreateArrayResult(Type type, Object[] allAssets) - { - var elementType = type.GetElementType(); - if (elementType == null) - return null; - int length = 0; - foreach (var asset in allAssets) - { - if (asset.GetType() == elementType) - length++; - } - var array = Array.CreateInstance(elementType, length); - int index = 0; - - foreach (var asset in allAssets) - { - if(elementType.IsAssignableFrom(asset.GetType())) - array.SetValue(asset, index++); - } - - return array; - } - - public static TObject CreateArrayResult(Object[] allAssets) where TObject : class - { - return CreateArrayResult(typeof(TObject), allAssets) as TObject; - } - - public static IList CreateListResult(Type type, Object[] allAssets) - { - var genArgs = type.GetGenericArguments(); - var listType = typeof(List<>).MakeGenericType(genArgs); - var list = Activator.CreateInstance(listType) as IList; - var elementType = genArgs[0]; - if (list == null) - return null; - foreach (var a in allAssets) - { - if(elementType.IsAssignableFrom(a.GetType())) - list.Add(a); - } - return list; - } - - public static TObject CreateListResult(Object[] allAssets) - { - return (TObject)CreateListResult(typeof(TObject), allAssets); - } - - public static bool IsInstance() - { - var tA = typeof(T1); - var tB = typeof(T2); -#if !UNITY_EDITOR && UNITY_WSA_10_0 && ENABLE_DOTNET - return tB.GetTypeInfo().IsAssignableFrom(tA.GetTypeInfo()); -#else - return tB.IsAssignableFrom(tA); -#endif - } - - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/ResourceManagerConfig.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/ResourceManagerConfig.cs.meta deleted file mode 100644 index 244337fd..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceManager/Util/ResourceManagerConfig.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c8cf226ae39e82446b1bb827024f582c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceProviders.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceProviders.meta deleted file mode 100644 index 1f0932b3..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceProviders.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 849c79b81fe9b7d4dafd66c2b0335be7 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceProviders/ContentCatalogProvider.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceProviders/ContentCatalogProvider.cs deleted file mode 100644 index a8b21404..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceProviders/ContentCatalogProvider.cs +++ /dev/null @@ -1,126 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using UnityEngine.AddressableAssets.ResourceLocators; -using UnityEngine.ResourceManagement; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.ResourceProviders; -using UnityEngine.ResourceManagement.Util; - -namespace UnityEngine.AddressableAssets.ResourceProviders -{ - /// - /// Provider for content catalogs. This provider makes use of a hash file to determine if a newer version of the catalog needs to be downloaded. - /// - public class ContentCatalogProvider : ResourceProviderBase - { - /// - /// An enum used to specify which entry in the catalog dependencies should hold each hash item. - /// The Remote should point to the hash on the server. The Cache should point to the - /// local cache copy of the remote data. - /// - public enum DependencyHashIndex - { - Remote = 0, - Cache, - Count - } - ResourceManager m_RM; - /// - /// Constructor for this provider. - /// - /// The resource manager to use. - public ContentCatalogProvider(ResourceManager resourceManagerInstance ) - { - m_RM = resourceManagerInstance; - m_BehaviourFlags = ProviderBehaviourFlags.CanProvideWithFailedDependencies; - } - internal class InternalOp - { - // int m_StartFrame; - string m_LocalDataPath; - string m_HashValue; - ProvideHandle m_ProviderInterface; - ResourceManager m_RM; - - public void Start(ProvideHandle providerInterface, ResourceManager rm) - { - m_RM = rm; - m_ProviderInterface = providerInterface; - m_LocalDataPath = null; - m_HashValue = null; - // m_StartFrame = Time.frameCount; - List deps = new List(); // TODO: garbage. need to pass actual count and reuse the list - m_ProviderInterface.GetDependencies(deps); - string idToLoad = DetermineIdToLoad(m_ProviderInterface.Location, deps); - - Addressables.LogFormat("Addressables - Using content catalog from {0}.", idToLoad); - rm.ProvideResource(new ResourceLocationBase(idToLoad, idToLoad, typeof(JsonAssetProvider).FullName, typeof(ContentCatalogData))).Completed += OnCatalogLoaded; - } - - internal string DetermineIdToLoad(IResourceLocation location, IList dependencyObjects) - { - //default to load actual local source catalog - string idToLoad = location.InternalId; - if (dependencyObjects != null && - location.Dependencies != null && - dependencyObjects.Count == (int)DependencyHashIndex.Count && - location.Dependencies.Count == (int)DependencyHashIndex.Count) - { - var remoteHash = dependencyObjects[(int)DependencyHashIndex.Remote] as string; - var cachedHash = dependencyObjects[(int)DependencyHashIndex.Cache] as string; - Addressables.LogFormat("Addressables - ContentCatalogProvider CachedHash = {0}, RemoteHash = {1}.", cachedHash, remoteHash); - - if (string.IsNullOrEmpty(remoteHash)) //offline - { - if (!string.IsNullOrEmpty(cachedHash)) //cache exists - idToLoad = location.Dependencies[(int)DependencyHashIndex.Cache].InternalId.Replace(".hash", ".json"); - } - else //online - { - if (remoteHash == cachedHash) //cache of remote is good - { - idToLoad = location.Dependencies[(int)DependencyHashIndex.Cache].InternalId.Replace(".hash", ".json"); - } - else //remote is different than cache, or no cache - { - idToLoad = location.Dependencies[(int)DependencyHashIndex.Remote].InternalId.Replace(".hash", ".json"); - m_LocalDataPath = location.Dependencies[(int)DependencyHashIndex.Cache].InternalId.Replace(".hash", ".json"); - m_HashValue = remoteHash; - } - } - } - - return idToLoad; - } - - void OnCatalogLoaded(AsyncOperationHandle op) - { - var ccd = op.Result; - m_RM.Release(op); - Addressables.LogFormat("Addressables - Content catalog load result = {0}.", ccd); - - // ResourceManagerEventCollector.PostEvent(ResourceManagerEventCollector.EventType.LoadAsyncCompletion, m_ProviderInterface.Location, Time.frameCount - m_StartFrame); - m_ProviderInterface.Complete(ccd, ccd != null, null); - if (ccd != null && !string.IsNullOrEmpty(m_HashValue) && !string.IsNullOrEmpty(m_LocalDataPath)) - { - var dir = Path.GetDirectoryName(m_LocalDataPath); - if (!string.IsNullOrEmpty(dir) && !Directory.Exists(dir)) - Directory.CreateDirectory(dir); - var localCachePath = m_LocalDataPath; - Addressables.LogFormat("Addressables - Saving cached content catalog to {0}.", localCachePath); - File.WriteAllText(localCachePath, JsonUtility.ToJson(ccd)); - File.WriteAllText(localCachePath.Replace(".json", ".hash"), m_HashValue); - } - } - } - - /// - public override void Provide(ProvideHandle providerInterface) - { - new InternalOp().Start(providerInterface, m_RM); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceProviders/ContentCatalogProvider.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceProviders/ContentCatalogProvider.cs.meta deleted file mode 100644 index 102989bd..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/ResourceProviders/ContentCatalogProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 10fd20f634856da4a8adcac07d018d68 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Services.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Services.meta deleted file mode 100644 index 61f1722d..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Services.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 71c9532ec33dc0b4dbe723ee65d372a1 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Services/PlatformMappingService.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Services/PlatformMappingService.cs deleted file mode 100644 index 9e16ba78..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Services/PlatformMappingService.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Runtime.CompilerServices; -using UnityEngine; - -#if UNITY_EDITOR -using UnityEditor; -#endif - -namespace UnityEngine.AddressableAssets -{ - public enum AddressablesPlatform - { - Unknown, - Windows, - OSX, - Linux, - PS4, - Switch, - XboxOne, - WebGL, - iOS, - Android - } - - public class PlatformMappingService - { -#if UNITY_EDITOR - private static readonly Dictionary s_BuildTargetMapping = - new Dictionary() - { - {BuildTarget.XboxOne, AddressablesPlatform.XboxOne}, - {BuildTarget.Switch, AddressablesPlatform.Switch}, - {BuildTarget.PS4, AddressablesPlatform.PS4}, - {BuildTarget.iOS, AddressablesPlatform.iOS}, - {BuildTarget.Android, AddressablesPlatform.Android}, - {BuildTarget.WebGL, AddressablesPlatform.WebGL}, - {BuildTarget.StandaloneWindows, AddressablesPlatform.Windows}, - {BuildTarget.StandaloneWindows64, AddressablesPlatform.Windows}, - {BuildTarget.StandaloneOSX, AddressablesPlatform.OSX}, - {BuildTarget.StandaloneLinux64, AddressablesPlatform.Linux}, -#if !UNITY_2019_2_OR_NEWER - {BuildTarget.StandaloneLinux, AddressablesPlatform.Linux}, - {BuildTarget.StandaloneLinuxUniversal, AddressablesPlatform.Linux} -#endif - }; -#endif - private static readonly Dictionary s_RuntimeTargetMapping = - new Dictionary() - { - {RuntimePlatform.XboxOne, AddressablesPlatform.XboxOne}, - {RuntimePlatform.Switch, AddressablesPlatform.Switch}, - {RuntimePlatform.PS4, AddressablesPlatform.PS4}, - {RuntimePlatform.IPhonePlayer, AddressablesPlatform.iOS}, - {RuntimePlatform.Android, AddressablesPlatform.Android}, - {RuntimePlatform.WebGLPlayer, AddressablesPlatform.WebGL}, - {RuntimePlatform.WindowsPlayer, AddressablesPlatform.Windows}, - {RuntimePlatform.OSXPlayer, AddressablesPlatform.OSX}, - {RuntimePlatform.LinuxPlayer, AddressablesPlatform.Linux}, - {RuntimePlatform.WindowsEditor, AddressablesPlatform.Windows}, - {RuntimePlatform.OSXEditor, AddressablesPlatform.OSX}, - {RuntimePlatform.LinuxEditor, AddressablesPlatform.Linux}, - }; - -#if UNITY_EDITOR - internal static AddressablesPlatform GetAddressablesPlatformInternal(BuildTarget target) - { - if (s_BuildTargetMapping.ContainsKey(target)) - return s_BuildTargetMapping[target]; - return AddressablesPlatform.Unknown; - } -#endif - internal static AddressablesPlatform GetAddressablesPlatformInternal(RuntimePlatform platform) - { - if (s_RuntimeTargetMapping.ContainsKey(platform)) - return s_RuntimeTargetMapping[platform]; - return AddressablesPlatform.Unknown; - } - - public static AddressablesPlatform GetPlatform() - { - -#if UNITY_EDITOR - return GetAddressablesPlatformInternal(EditorUserBuildSettings.activeBuildTarget); -#else - return GetAddressablesPlatformInternal(Application.platform); -#endif - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Services/PlatformMappingService.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Services/PlatformMappingService.cs.meta deleted file mode 100644 index fe0edcee..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Services/PlatformMappingService.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4f7b9efa5835d6249b3b62a7cb09877d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Unity.Addressables.asmdef b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Unity.Addressables.asmdef deleted file mode 100644 index bbd8b516..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Unity.Addressables.asmdef +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Unity.Addressables", - "references": [ - "Unity.ResourceManager" - ], - "optionalUnityReferences": [], - "includePlatforms": [], - "excludePlatforms": [], - "allowUnsafeCode": false, - "overrideReferences": false, - "precompiledReferences": [], - "autoReferenced": true, - "defineConstraints": [] -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Unity.Addressables.asmdef.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Unity.Addressables.asmdef.meta deleted file mode 100644 index 73558bfa..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Unity.Addressables.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 9e24947de15b9834991c9d8411ea37cf -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Utility.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Utility.meta deleted file mode 100644 index 4fd714cd..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Utility.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1c2a5303f46dbdc449288a5ca3566942 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Utility/ResourceManagerEventCollector.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Utility/ResourceManagerEventCollector.cs deleted file mode 100644 index 396ff608..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Utility/ResourceManagerEventCollector.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; -using UnityEngine.ResourceManagement; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.Diagnostics; -using UnityEngine.ResourceManagement.ResourceLocations; - -namespace UnityEngine.AddressableAssets.Utility -{ - internal class DiagnosticInfo - { - public string DisplayName; - public int ObjectId; - public int[] Dependencies; - public DiagnosticEvent CreateEvent(string category, ResourceManager.DiagnosticEventType eventType, int frame, int val) - { - return new DiagnosticEvent(category, DisplayName, ObjectId, (int)eventType, frame, val, Dependencies); - } - } - - internal class ResourceManagerDiagnostics - { - - DiagnosticEventCollector m_eventCollector; - - /// - /// This class is responsible for passing events from the resource manager to the event collector, - /// - /// - public ResourceManagerDiagnostics(ResourceManager resourceManager) - { - resourceManager.RegisterDiagnosticCallback(OnResourceManagerDiagnosticEvent); - m_eventCollector = DiagnosticEventCollector.FindOrCreateGlobalInstance(); - } - Dictionary m_cachedDiagnosticInfo = new Dictionary(); - List m_dependencyBuffer = new List(); - - void OnResourceManagerDiagnosticEvent(AsyncOperationHandle op, ResourceManager.DiagnosticEventType type, int eventValue, object context) - { - var hashCode = op.GetHashCode(); - DiagnosticInfo diagInfo = null; - - if (type == ResourceManager.DiagnosticEventType.AsyncOperationDestroy) - { - if (m_cachedDiagnosticInfo.TryGetValue(hashCode, out diagInfo)) - m_cachedDiagnosticInfo.Remove(hashCode); - } - else - { - if (!m_cachedDiagnosticInfo.TryGetValue(hashCode, out diagInfo)) - { - m_dependencyBuffer.Clear(); - op.GetDependencies(m_dependencyBuffer); - var depIds = new int[m_dependencyBuffer.Count]; - for (int i = 0; i < depIds.Length; i++) - depIds[i] = m_dependencyBuffer[i].GetHashCode(); - m_cachedDiagnosticInfo.Add(hashCode, diagInfo = new DiagnosticInfo() { ObjectId = hashCode, DisplayName = op.DebugName, Dependencies = depIds}); - } - } - - m_eventCollector.PostEvent(diagInfo.CreateEvent("ResourceManager", type, Time.frameCount, eventValue)); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Utility/ResourceManagerEventCollector.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Utility/ResourceManagerEventCollector.cs.meta deleted file mode 100644 index fb9869b0..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Utility/ResourceManagerEventCollector.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 0cc816be7de984cd8ba3ef6b19370a30 -timeCreated: 1503489504 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Utility/SerializationUtilities.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Utility/SerializationUtilities.cs deleted file mode 100644 index 59f59114..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Utility/SerializationUtilities.cs +++ /dev/null @@ -1,208 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Reflection; -using System.Text; -using UnityEngine; - -namespace UnityEngine.AddressableAssets.Utility -{ - static class SerializationUtilities - { - internal enum ObjectType - { - AsciiString, - UnicodeString, - UInt16, - UInt32, - Int32, - Hash128, - Type, - JsonObject - } - - internal static int ReadInt32FromByteArray(byte[] data, int offset) - { - return data[offset] | (data[offset + 1] << 8) | (data[offset + 2] << 16) | (data[offset + 3] << 24); - } - - internal static int WriteInt32ToByteArray(byte[] data, int val, int offset) - { - data[offset] = (byte)(val & 0xFF); - data[offset + 1] = (byte)((val >> 8) & 0xFF); - data[offset + 2] = (byte)((val >> 16) & 0xFF); - data[offset + 3] = (byte)((val >> 24) & 0xFF); - return offset + 4; - } - - /// - /// Deserializes an object from an array at a specified index. Supported types are ASCIIString, UnicodeString, UInt16, UInt32, Int32, Hash128, JsonObject - /// - /// The array of bytes for the object. The first byte is the ObjectType. The rest depends on the type. - /// The index of the first byte of the data. - /// The deserialized object. - internal static object ReadObjectFromByteArray(byte[] keyData, int dataIndex) - { - try - { - ObjectType keyType = (ObjectType)keyData[dataIndex]; - dataIndex++; - switch (keyType) - { - case ObjectType.UnicodeString: - { - var dataLength = BitConverter.ToInt32(keyData, dataIndex); - return Encoding.Unicode.GetString(keyData, dataIndex + 4, dataLength); - } - case ObjectType.AsciiString: - { - var dataLength = BitConverter.ToInt32(keyData, dataIndex); - return Encoding.ASCII.GetString(keyData, dataIndex + 4, dataLength); - } - case ObjectType.UInt16: return BitConverter.ToUInt16(keyData, dataIndex); - case ObjectType.UInt32: return BitConverter.ToUInt32(keyData, dataIndex); - case ObjectType.Int32: return BitConverter.ToInt32(keyData, dataIndex); - case ObjectType.Hash128: return Hash128.Parse(Encoding.ASCII.GetString(keyData, dataIndex + 1, keyData[dataIndex])); - case ObjectType.Type: return Type.GetTypeFromCLSID(new Guid(Encoding.ASCII.GetString(keyData, dataIndex + 1, keyData[dataIndex]))); - case ObjectType.JsonObject: - { - int assemblyNameLength = keyData[dataIndex]; - dataIndex++; - string assemblyName = Encoding.ASCII.GetString(keyData, dataIndex, assemblyNameLength); - dataIndex += assemblyNameLength; - - int classNameLength = keyData[dataIndex]; - dataIndex++; - string className = Encoding.ASCII.GetString(keyData, dataIndex, classNameLength); - dataIndex += classNameLength; - int jsonLength = BitConverter.ToInt32(keyData, dataIndex); - dataIndex += 4; - string jsonText = Encoding.Unicode.GetString(keyData, dataIndex, jsonLength); - var assembly = Assembly.Load(assemblyName); - var t = assembly.GetType(className); - return JsonUtility.FromJson(jsonText, t); - } - } - } - catch (Exception ex) - { - Debug.LogException(ex); - } - return null; - } - - /// - /// Write an object to a byte array - /// - /// The object to write. - /// The list of bytes to write to. - /// The number of bytes written. - internal static int WriteObjectToByteList(object obj, List buffer) - { - var objectType = obj.GetType(); - if (objectType == typeof(string)) - { - string str = obj as string; - if (str == null) - str = string.Empty; - byte[] tmp = Encoding.Unicode.GetBytes(str); - byte[] tmp2 = Encoding.ASCII.GetBytes(str); - if (Encoding.Unicode.GetString(tmp) == Encoding.ASCII.GetString(tmp2)) - { - buffer.Add((byte)ObjectType.AsciiString); - buffer.AddRange(BitConverter.GetBytes(tmp2.Length)); - buffer.AddRange(tmp2); - return tmp2.Length + 5; - } - - buffer.Add((byte)ObjectType.UnicodeString); - buffer.AddRange(BitConverter.GetBytes(tmp.Length)); - buffer.AddRange(tmp); - return tmp.Length + 5; - } - - if (objectType == typeof(UInt32)) - { - byte[] tmp = BitConverter.GetBytes((UInt32)obj); - buffer.Add((byte)ObjectType.UInt32); - buffer.AddRange(tmp); - return tmp.Length + 1; - } - - if (objectType == typeof(UInt16)) - { - byte[] tmp = BitConverter.GetBytes((UInt16)obj); - buffer.Add((byte)ObjectType.UInt16); - buffer.AddRange(tmp); - return tmp.Length + 1; - } - - if (objectType == typeof(Int32)) - { - byte[] tmp = BitConverter.GetBytes((Int32)obj); - buffer.Add((byte)ObjectType.Int32); - buffer.AddRange(tmp); - return tmp.Length + 1; - } - - if (objectType == typeof(int)) - { - byte[] tmp = BitConverter.GetBytes((UInt32)obj); - buffer.Add((byte)ObjectType.UInt32); - buffer.AddRange(tmp); - return tmp.Length + 1; - } - - if (objectType == typeof(Hash128)) - { - var guid = (Hash128)obj; - byte[] tmp = Encoding.ASCII.GetBytes(guid.ToString()); - buffer.Add((byte)ObjectType.Hash128); - buffer.Add((byte)tmp.Length); - buffer.AddRange(tmp); - return tmp.Length + 2; - } - - if (objectType == typeof(Type)) - { - byte[] tmp = objectType.GUID.ToByteArray(); - buffer.Add((byte)ObjectType.Type); - buffer.Add((byte)tmp.Length); - buffer.AddRange(tmp); - return tmp.Length + 2; - } - - var attrs = objectType.GetCustomAttributes(typeof(SerializableAttribute), true); - if (attrs.Length == 0) - return 0; - int length = 0; - buffer.Add((byte)ObjectType.JsonObject); - length++; - - //write assembly name - byte[] tmpAssemblyName = Encoding.ASCII.GetBytes(objectType.Assembly.FullName); - buffer.Add((byte)tmpAssemblyName.Length); - length++; - buffer.AddRange(tmpAssemblyName); - length += tmpAssemblyName.Length; - - //write class name - var objName = objectType.FullName; - if (objName == null) - objName = string.Empty; - byte[] tmpClassName = Encoding.ASCII.GetBytes(objName); - buffer.Add((byte)tmpClassName.Length); - length++; - buffer.AddRange(tmpClassName); - length += tmpClassName.Length; - - //write json data - byte[] tmpJson = Encoding.Unicode.GetBytes(JsonUtility.ToJson(obj)); - buffer.AddRange(BitConverter.GetBytes(tmpJson.Length)); - length += 4; - buffer.AddRange(tmpJson); - length += tmpJson.Length; - return length; - } - - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Utility/SerializationUtilities.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Utility/SerializationUtilities.cs.meta deleted file mode 100644 index 0955ccae..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Runtime/Utility/SerializationUtilities.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a210a02d6f3e52247a958bb97f5850a7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests.meta deleted file mode 100644 index ead887c2..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 9ac2e436791026547b840f87f876f4e7 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor.meta deleted file mode 100644 index 6efe7fd1..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1e5d24b68e180f14bb0e8fb153332817 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetReferenceTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetReferenceTests.cs deleted file mode 100644 index 0c4d2273..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetReferenceTests.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using NUnit.Framework; -using UnityEngine.AddressableAssets; - -namespace UnityEditor.AddressableAssets.Tests -{ - public class AddressableAssetReferenceTests : AddressableAssetTestBase - { -#if UNITY_2019_1_OR_NEWER - [Test] - public void VerifySetEditorAsset_DoesNotMakeRefAssetDirty() - { - //Setup - AssetReference reference = new AssetReference(); - string path =AssetDatabase.GUIDToAssetPath (m_AssetGUID.ToString()); - GameObject o = AssetDatabase.LoadAssetAtPath(path, typeof(GameObject)) as GameObject; - - //Test - Assert.IsFalse(EditorUtility.IsDirty(reference.editorAsset)); // IsDirty(Object o) only available in 2019.1 or newer - reference.SetEditorAsset(o); - Assert.IsFalse(EditorUtility.IsDirty(reference.editorAsset)); - } -#endif - } -} - \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetReferenceTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetReferenceTests.cs.meta deleted file mode 100644 index 6e58fb50..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetReferenceTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8ea72f96947844c99a3bf31644980db9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetSettingsTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetSettingsTests.cs deleted file mode 100644 index 724b8f0b..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetSettingsTests.cs +++ /dev/null @@ -1,144 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using NUnit.Framework; -using UnityEditor.AddressableAssets.Build; -using UnityEditor.AddressableAssets.Build.DataBuilders; -using UnityEditor.AddressableAssets.Settings; -using UnityEngine; -using UnityEngine.AddressableAssets; - -namespace UnityEditor.AddressableAssets.Tests -{ - public class AddressableAssetSettingsTests : AddressableAssetTestBase - { - [Test] - public void HasDefaultInitialGroups() - { - Assert.IsNotNull(Settings.FindGroup(AddressableAssetSettings.PlayerDataGroupName)); - Assert.IsNotNull(Settings.FindGroup(AddressableAssetSettings.DefaultLocalGroupName)); - } - - [Test] - public void AddRemovelabel() - { - const string labelName = "Newlabel"; - Settings.AddLabel(labelName); - Assert.Contains(labelName, Settings.labelTable.labelNames); - Settings.RemoveLabel(labelName); - Assert.False(Settings.labelTable.labelNames.Contains(labelName)); - } - - [Test] - public void AddRemoveGroup() - { - const string groupName = "NewGroup"; - var group = Settings.CreateGroup(groupName, false, false, false, null); - Assert.IsNotNull(group); - Settings.RemoveGroup(group); - Assert.IsNull(Settings.FindGroup(groupName)); - } - - [Test] - public void CreateNewEntry() - { - var group = Settings.CreateGroup("NewGroupForCreateOrMoveEntryTest", false, false, false, null); - Assert.IsNotNull(group); - var entry = Settings.CreateOrMoveEntry(m_AssetGUID, group); - Assert.IsNotNull(entry); - Assert.AreSame(group, entry.parentGroup); - var localDataGroup = Settings.FindGroup(AddressableAssetSettings.DefaultLocalGroupName); - Assert.IsNotNull(localDataGroup); - entry = Settings.CreateOrMoveEntry(m_AssetGUID, localDataGroup); - Assert.IsNotNull(entry); - Assert.AreNotSame(group, entry.parentGroup); - Assert.AreSame(localDataGroup, entry.parentGroup); - Settings.RemoveGroup(group); - localDataGroup.RemoveAssetEntry(entry); - } - - [Test] - public void FindAssetEntry() - { - var localDataGroup = Settings.FindGroup(AddressableAssetSettings.DefaultLocalGroupName); - Assert.IsNotNull(localDataGroup); - var entry = Settings.CreateOrMoveEntry(m_AssetGUID, localDataGroup); - var foundEntry = Settings.FindAssetEntry(m_AssetGUID); - Assert.AreSame(entry, foundEntry); - } - - [Test] - public void AddressablesClearCachedData_DoesNotThrowError() - { - //individual clean paths - foreach (ScriptableObject so in Settings.DataBuilders) - { - BuildScriptBase db = so as BuildScriptBase; - Assert.DoesNotThrow(() => Settings.CleanPlayerContentImpl(db)); - } - - //Clean all path - Assert.DoesNotThrow(() => Settings.CleanPlayerContentImpl()); - - //Cleanup - Settings.BuildPlayerContentImpl(); - } - - [Test] - public void AddressablesCleanCachedData_ClearsData() - { - //Setup - Settings.BuildPlayerContentImpl(); - - //Check after each clean that the data is not built - foreach (ScriptableObject so in Settings.DataBuilders) - { - BuildScriptBase db = so as BuildScriptBase; - Settings.CleanPlayerContentImpl(db); - Assert.IsFalse(db.IsDataBuilt()); - } - } - - [Test] - public void AddressablesCleanAllCachedData_ClearsAllData() - { - //Setup - Settings.BuildPlayerContentImpl(); - - //Clean ALL data builders - Settings.CleanPlayerContentImpl(); - - //Check none have data built - foreach (ScriptableObject so in Settings.DataBuilders) - { - BuildScriptBase db = so as BuildScriptBase; - Assert.IsFalse(db.IsDataBuilt()); - } - } - - [Test] - public void DeletingAsset_DoesNotDeleteGroupWithSimilarName() - { - //Setup - const string groupName = "NewAsset"; - const string assetPath = k_TestConfigFolder + "/" + groupName; - - var mat = new Material(Shader.Find("Unlit/Color")); - AssetDatabase.CreateAsset(mat, assetPath); - - var group = Settings.CreateGroup(groupName, false, false, false, null); - Assert.IsNotNull(group); - - //Test - AssetDatabase.DeleteAsset(assetPath); - - //Assert - Settings.CheckForGroupDataDeletion(groupName); - Assert.IsNotNull(Settings.FindGroup(groupName)); - - //Clean up - Settings.RemoveGroup(group); - Assert.IsNull(Settings.FindGroup(groupName)); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetSettingsTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetSettingsTests.cs.meta deleted file mode 100644 index f82287c0..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetSettingsTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3a04deffd16d96345b57337ce2b4d075 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetTestBase.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetTestBase.cs deleted file mode 100644 index 334549fc..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetTestBase.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; -using System.IO; -using NUnit.Framework; -using UnityEditor.AddressableAssets.Settings; -using UnityEngine; -using UnityEngine.TestTools; - -namespace UnityEditor.AddressableAssets.Tests -{ - public abstract class AddressableAssetTestBase - { - protected const string k_TestConfigName = "AddressableAssetSettings.Tests"; - protected const string k_TestConfigFolder = "Assets/AddressableAssetsData_AddressableAssetSettingsTests"; - - private AddressableAssetSettings m_Settings; - - protected AddressableAssetSettings Settings - { - get - { - if (m_Settings == null) - m_Settings = AddressableAssetSettings.Create(k_TestConfigFolder, k_TestConfigName, true, PersistSettings); - return m_Settings; - } - } - protected string m_AssetGUID; - protected virtual bool PersistSettings { get { return true; } } - [OneTimeSetUp] - public void Init() - { - //TODO: Remove when NSImage warning issue on bokken is fixed - Application.logMessageReceived += CheckLogForWarning; - - if (Directory.Exists(k_TestConfigFolder)) - AssetDatabase.DeleteAsset(k_TestConfigFolder); - if (!Directory.Exists(k_TestConfigFolder)) - { - Directory.CreateDirectory(k_TestConfigFolder); - AssetDatabase.Refresh(); - } - - Settings.labelTable.labelNames.Clear(); - GameObject testObject = new GameObject("TestObject"); -#if UNITY_2018_3_OR_NEWER - PrefabUtility.SaveAsPrefabAsset(testObject, k_TestConfigFolder + "/test.prefab"); -#else - PrefabUtility.CreatePrefab(k_TestConfigFolder + "/test.prefab", testObject); -#endif - m_AssetGUID = AssetDatabase.AssetPathToGUID(k_TestConfigFolder + "/test.prefab"); - OnInit(); - - //TODO: Remove when NSImage warning issue on bokken is fixed - //Removing here in the event we didn't recieve any messages during the setup, we can respond appropriately to - //logs in the tests. - Application.logMessageReceived -= CheckLogForWarning; - if (resetFailingMessages) - LogAssert.ignoreFailingMessages = false; - } - - private bool resetFailingMessages = false; - //TODO: Remove when NSImage warning issue on bokken is fixed - private void CheckLogForWarning(string condition, string stackTrace, LogType type) - { - LogAssert.ignoreFailingMessages = true; - resetFailingMessages = true; - } - - protected virtual void OnInit() { } - - [OneTimeTearDown] - public void Cleanup() - { - OnCleanup(); - if (Directory.Exists(k_TestConfigFolder)) - AssetDatabase.DeleteAsset(k_TestConfigFolder); - EditorBuildSettings.RemoveConfigObject(k_TestConfigName); - } - - protected virtual void OnCleanup() - { - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetTestBase.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetTestBase.cs.meta deleted file mode 100644 index 1be5a552..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetTestBase.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f9508f7aaece47b45a0d499d7c67a777 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetUtilityTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetUtilityTests.cs deleted file mode 100644 index 4460c8ec..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetUtilityTests.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using NUnit.Framework; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.Build.Utilities; - -namespace UnityEditor.AddressableAssets.Tests -{ - public class AddressableAssetUtilityTests - { - [Test] - public void IsInResourcesProperlyHandlesCase() - { - Assert.IsTrue(AddressableAssetUtility.IsInResources("/rEsOurces/")); - Assert.IsTrue(AddressableAssetUtility.IsInResources("/resources/")); - Assert.IsTrue(AddressableAssetUtility.IsInResources("/RESOURCES/")); - } - [Test] - public void IsInResourcesHandlesExtraPathing() - { - Assert.IsTrue(AddressableAssetUtility.IsInResources("path/path/resources/path")); - Assert.IsTrue(AddressableAssetUtility.IsInResources("path/path/resources/")); - Assert.IsTrue(AddressableAssetUtility.IsInResources("/resources/path")); - } - - [Test] - public void IsInResourcesHandlesResourcesInWrongContext() - { - Assert.IsFalse(AddressableAssetUtility.IsInResources("resources/")); - Assert.IsFalse(AddressableAssetUtility.IsInResources("/resources")); - Assert.IsFalse(AddressableAssetUtility.IsInResources("path/resourcesOther/path")); - Assert.IsFalse(AddressableAssetUtility.IsInResources("/path/res/ources/path")); - } - [Test] - public void IsPathValidBlocksCommonStrings() - { - Assert.IsFalse(AddressableAssetUtility.IsPathValidForEntry(string.Empty)); - Assert.IsFalse(AddressableAssetUtility.IsPathValidForEntry(CommonStrings.UnityEditorResourcePath)); - Assert.IsFalse(AddressableAssetUtility.IsPathValidForEntry(CommonStrings.UnityDefaultResourcePath)); - Assert.IsFalse(AddressableAssetUtility.IsPathValidForEntry(CommonStrings.UnityBuiltInExtraPath)); - } - [Test] - public void IsPathValidBlocksBadExtensions() - { - Assert.IsFalse(AddressableAssetUtility.IsPathValidForEntry("file.cs")); - Assert.IsFalse(AddressableAssetUtility.IsPathValidForEntry("file.js")); - Assert.IsFalse(AddressableAssetUtility.IsPathValidForEntry("file.boo")); - Assert.IsFalse(AddressableAssetUtility.IsPathValidForEntry("file.exe")); - Assert.IsFalse(AddressableAssetUtility.IsPathValidForEntry("file.dll")); - } - [Test] - public void IsPathValidAllowsBasicTypes() - { - Assert.IsTrue(AddressableAssetUtility.IsPathValidForEntry("file.asset")); - Assert.IsTrue(AddressableAssetUtility.IsPathValidForEntry("file.png")); - Assert.IsTrue(AddressableAssetUtility.IsPathValidForEntry("file.bin")); - Assert.IsTrue(AddressableAssetUtility.IsPathValidForEntry("file.txt")); - Assert.IsTrue(AddressableAssetUtility.IsPathValidForEntry("file.prefab")); - Assert.IsTrue(AddressableAssetUtility.IsPathValidForEntry("file.mat")); - Assert.IsTrue(AddressableAssetUtility.IsPathValidForEntry("file.wav")); - Assert.IsTrue(AddressableAssetUtility.IsPathValidForEntry("file.jpg")); - Assert.IsTrue(AddressableAssetUtility.IsPathValidForEntry("file.avi")); - Assert.IsTrue(AddressableAssetUtility.IsPathValidForEntry("file.controller")); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetUtilityTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetUtilityTests.cs.meta deleted file mode 100644 index 7932f105..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetUtilityTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ea375d4d72197e143ba4ebfe5d21ed7c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetsBundleBuildParametersTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetsBundleBuildParametersTests.cs deleted file mode 100644 index 57bd2577..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetsBundleBuildParametersTests.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Reflection; -using NUnit.Framework; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.AddressableAssets.Settings.GroupSchemas; -using UnityEngine; -using UnityEngine.TestTools; -using UnityEditor.AddressableAssets.Build.DataBuilders; - - -namespace UnityEditor.AddressableAssets.Tests -{ - public class AddressableAssetsBundleBuildParametersTests : AddressableAssetTestBase - { - protected override bool PersistSettings { get { return false; } } - - static IEnumerable GetValues(Type t) - { - List enumerations = new List(); - foreach (FieldInfo fieldInfo in t.GetFields(BindingFlags.Static | BindingFlags.Public)) - enumerations.Add((Enum)fieldInfo.GetValue(null)); - return enumerations; - } - - [Test] - public void WhenCompressionSetForGroups_GetCompressionForIdentifier_ReturnsExpectedCompression() - { - var bundleToAssetGroup = new Dictionary(); - var expectedValues = new BuildCompression[] { BuildCompression.Uncompressed, BuildCompression.LZ4, BuildCompression.LZMA, BuildCompression.UncompressedRuntime, BuildCompression.LZ4Runtime}; - var bundleNames = new List(); - - foreach (var en in GetValues(typeof(BundledAssetGroupSchema.BundleCompressionMode))) - { - var g = Settings.CreateGroup(en.ToString(), true, false, false, null, typeof(BundledAssetGroupSchema)); - g.GetSchema().Compression = (BundledAssetGroupSchema.BundleCompressionMode)en; - var bName = "bundle_" + en; - bundleToAssetGroup.Add(bName, g.Guid); - bundleNames.Add(bName); - } - var testParams = new AddressableAssetsBundleBuildParameters(Settings, bundleToAssetGroup, BuildTarget.StandaloneWindows64, BuildTargetGroup.Standalone, "Unused"); - - for(int i = 0; i < bundleNames.Count; i++) - { - var comp = testParams.GetCompressionForIdentifier(bundleNames[i]); - Assert.AreEqual(expectedValues[i].blockSize, comp.blockSize); - Assert.AreEqual(expectedValues[i].compression, comp.compression); - Assert.AreEqual(expectedValues[i].level, comp.level); - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetsBundleBuildParametersTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetsBundleBuildParametersTests.cs.meta deleted file mode 100644 index c65917d8..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AddressableAssetsBundleBuildParametersTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bb04252b53f48b349a901615af6a84fe -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AnalyzeRules.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AnalyzeRules.meta deleted file mode 100644 index b2cfd162..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AnalyzeRules.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: cf99c4b78a1e287498efd1df562f6347 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AnalyzeRules/CheckBundleDupeDependencyTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AnalyzeRules/CheckBundleDupeDependencyTests.cs deleted file mode 100644 index a4798159..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AnalyzeRules/CheckBundleDupeDependencyTests.cs +++ /dev/null @@ -1,277 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading; -using NUnit.Framework; -using UnityEditor.AddressableAssets.Build; -using UnityEditor.AddressableAssets.Build.AnalyzeRules; -using UnityEditor.AddressableAssets.Build.DataBuilders; -using UnityEditor.AddressableAssets.GUI; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.AddressableAssets.Settings.GroupSchemas; -using UnityEditor.Build.Pipeline; -using UnityEngine; -using UnityEngine.AddressableAssets.Initialization; - -namespace UnityEditor.AddressableAssets.Tests.AnalyzeRules -{ - class CheckBundleDupeDependencyTests : AddressableAssetTestBase - { - const string k_CheckDupePrefabA = k_TestConfigFolder + "/checkDupe_prefabA.prefab"; - const string k_CheckDupePrefabB = k_TestConfigFolder + "/checkDupe_prefabB.prefab"; - const string k_CheckDupeMyMaterial = k_TestConfigFolder + "/checkDupe_myMaterial.mat"; - - protected override void OnInit() - { - base.OnInit(); - - GameObject prefabA = new GameObject("PrefabA"); - GameObject prefabB = new GameObject("PrefabB"); - var meshA = prefabA.AddComponent(); - var meshB = prefabB.AddComponent(); - - - var mat = new Material(Shader.Find("Unlit/Color")); - AssetDatabase.CreateAsset(mat, k_CheckDupeMyMaterial); - meshA.sharedMaterial = mat; - meshB.sharedMaterial = mat; - -#if UNITY_2018_3_OR_NEWER - PrefabUtility.SaveAsPrefabAsset(prefabA, k_CheckDupePrefabA); - PrefabUtility.SaveAsPrefabAsset(prefabB, k_CheckDupePrefabB); -#else - PrefabUtility.CreatePrefab(k_CheckDupePrefabA, prefabA); - PrefabUtility.CreatePrefab(k_CheckDupePrefabB, prefabB); -#endif - AssetDatabase.Refresh(); - } - - private AddressableAssetsBuildContext GetAddressableAssetsBuildContext(CheckBundleDupeDependencies rule) - { - ResourceManagerRuntimeData runtimeData = new ResourceManagerRuntimeData(); - runtimeData.LogResourceManagerExceptions = Settings.buildSettings.LogResourceManagerExceptions; - var aaContext = new AddressableAssetsBuildContext - { - settings = Settings, - runtimeData = runtimeData, - bundleToAssetGroup = rule.m_BundleToAssetGroup, - locations = rule.m_Locations - }; - return aaContext; - } - - [Test] - public void CheckDupeCanFixIssues() - { - var duplicateGroups = Settings.groups.Where(group => group.Name.Contains("Duplicate Asset Isolation")); - foreach (AddressableAssetGroup group in duplicateGroups) - Settings.groups.Remove(group); - - var group1 = Settings.CreateGroup("CheckDupeDepencency1", false, false, false, null, typeof(BundledAssetGroupSchema)); - var group2 = Settings.CreateGroup("CheckDupeDepencency2", false, false, false, null, typeof(BundledAssetGroupSchema)); - - Settings.CreateOrMoveEntry(AssetDatabase.AssetPathToGUID(k_CheckDupePrefabA), group1, false, false); - Settings.CreateOrMoveEntry(AssetDatabase.AssetPathToGUID(k_CheckDupePrefabB), group2, false, false); - - var matGuid = AssetDatabase.AssetPathToGUID(k_CheckDupeMyMaterial); - Assert.IsNull(group1.GetAssetEntry(matGuid)); - Assert.IsNull(group2.GetAssetEntry(matGuid)); - - var groupCount = Settings.groups.Count; - - var rule = new CheckBundleDupeDependencies(); - rule.FixIssues(Settings); - - Assert.AreEqual(groupCount+1, Settings.groups.Count); - - var dupeGroup = Settings.FindGroup("Duplicate Asset Isolation"); - Assert.IsNotNull(dupeGroup); - Assert.IsNotNull(dupeGroup.GetAssetEntry(matGuid)); - } - - [Test] - public void CheckDupeNoIssuesIfValid() - { - var group1 = Settings.CreateGroup("CheckDupeDepencency1", false, false, false, null, typeof(BundledAssetGroupSchema)); - var group2 = Settings.CreateGroup("CheckDupeDepencency2", false, false, false, null, typeof(BundledAssetGroupSchema)); - - Settings.CreateOrMoveEntry(AssetDatabase.AssetPathToGUID(k_CheckDupePrefabA), group1, false, false); - Settings.CreateOrMoveEntry(AssetDatabase.AssetPathToGUID(k_CheckDupePrefabB), group2, false, false); - Settings.CreateOrMoveEntry(AssetDatabase.AssetPathToGUID(k_CheckDupeMyMaterial), group2, false, false); - - var groupCount = Settings.groups.Count; - - var rule = new CheckBundleDupeDependencies(); - rule.FixIssues(Settings); - - Assert.AreEqual(groupCount, Settings.groups.Count); - } - - [Test] - public void UniqueAssetBundleBuild_IsCreatedWithCorrectData() - { - string bundleName = "myBundleName.bundle"; - string assetGroup = "assetGroup"; - - var rule = new CheckBundleDupeDependencies(); - rule.m_BundleToAssetGroup.Add(bundleName, assetGroup); - - AssetBundleBuild build = new AssetBundleBuild { assetBundleName = bundleName }; - - for (int i = 1; i < 500; i++) - { - AssetBundleBuild uniqueBundle = rule.CreateUniqueBundle(build); - Assert.AreEqual(string.Format("myBundleName{0}.bundle", i), uniqueBundle.assetBundleName); - rule.m_BundleToAssetGroup.Add(uniqueBundle.assetBundleName, assetGroup); - } - } - - [Test] - public void RefreshBuild_ReturnsSuccess() - { - var rule = new CheckBundleDupeDependencies(); - AddressableAssetsBuildContext context = GetAddressableAssetsBuildContext(rule); - Assert.AreEqual(ReturnCode.Success, rule.RefreshBuild(context)); - } - - [Test] - public void BuildImplicitDuplicatedAssetsSet_BuildCorrectImplicitAssets() - { - //Setup - var group1 = Settings.CreateGroup("CheckDupeDepencency1", false, false, false, null, typeof(BundledAssetGroupSchema)); - var group2 = Settings.CreateGroup("CheckDupeDepencency2", false, false, false, null, typeof(BundledAssetGroupSchema)); - - Settings.CreateOrMoveEntry(AssetDatabase.AssetPathToGUID(k_CheckDupePrefabA), group1, false, false); - Settings.CreateOrMoveEntry(AssetDatabase.AssetPathToGUID(k_CheckDupePrefabB), group2, false, false); - - GUID matGuid; - var matGuidString = AssetDatabase.AssetPathToGUID(k_CheckDupeMyMaterial); - GUID.TryParse(matGuidString, out matGuid); - - var rule = new CheckBundleDupeDependencies(); - var buildContext = rule.GetBuildContext(Settings); - - rule.CalculateInputDefinitions(Settings); - rule.RefreshBuild(buildContext); - - var implicitGuids = rule.GetImplicitGuidToFilesMap(); - var results = rule.CalculateDuplicates(implicitGuids, buildContext); - - //Test - rule.BuildImplicitDuplicatedAssetsSet(results); - - //Assert - Assert.AreEqual(1, rule.m_ImplicitAssets.Count); - Assert.IsTrue(rule.m_ImplicitAssets.Contains(matGuid)); - } - - [Test] - public void CalculateInputDefinitions_CalculatesAllInputDefintions() - { - //Setup - var group1 = Settings.CreateGroup("CheckDupeDepencency1", false, false, false, null, typeof(BundledAssetGroupSchema)); - var group2 = Settings.CreateGroup("CheckDupeDepencency2", false, false, false, null, typeof(BundledAssetGroupSchema)); - - Settings.CreateOrMoveEntry(AssetDatabase.AssetPathToGUID(k_CheckDupePrefabA), group1, false, false); - Settings.CreateOrMoveEntry(AssetDatabase.AssetPathToGUID(k_CheckDupePrefabB), group2, false, false); - - GUID matGuid; - var matGuidString = AssetDatabase.AssetPathToGUID(k_CheckDupeMyMaterial); - GUID.TryParse(matGuidString, out matGuid); - - var rule = new CheckBundleDupeDependencies(); - - //Test - rule.CalculateInputDefinitions(Settings); - - //Assert - Assert.AreEqual(2, rule.m_AllBundleInputDefs.Count); - } - - [Test] - public void CalculateDuplicates_ReturnsCorrectCheckDupeResultList() - { - //Setup - var group1 = Settings.CreateGroup("CheckDupeDepencency1", false, false, false, null, typeof(BundledAssetGroupSchema)); - var group2 = Settings.CreateGroup("CheckDupeDepencency2", false, false, false, null, typeof(BundledAssetGroupSchema)); - - Settings.CreateOrMoveEntry(AssetDatabase.AssetPathToGUID(k_CheckDupePrefabA), group1, false, false); - Settings.CreateOrMoveEntry(AssetDatabase.AssetPathToGUID(k_CheckDupePrefabB), group2, false, false); - - GUID matGuid; - var matGuidString = AssetDatabase.AssetPathToGUID(k_CheckDupeMyMaterial); - GUID.TryParse(matGuidString, out matGuid); - - var rule = new CheckBundleDupeDependencies(); - - var buildContext = rule.GetBuildContext(Settings); - rule.CalculateInputDefinitions(Settings); - rule.RefreshBuild(buildContext); - var implicitGuids = rule.GetImplicitGuidToFilesMap(); - - //Test - var dupeResults = rule.CalculateDuplicates(implicitGuids, buildContext).ToList(); - - //Assert - Assert.AreEqual(2, dupeResults.Count); - - Assert.AreEqual(group1.Name, dupeResults[0].Group.Name); - Assert.AreEqual(2, dupeResults[0].DuplicatedFiles.Count); - Assert.AreEqual(k_CheckDupeMyMaterial, dupeResults[0].AssetPath); - - Assert.AreEqual(group2.Name, dupeResults[1].Group.Name); - Assert.AreEqual(2, dupeResults[1].DuplicatedFiles.Count); - Assert.AreEqual(k_CheckDupeMyMaterial, dupeResults[1].AssetPath); - } - - [Test] - public void DupeGroupHasContentUpdateSchema() - { - //Setup - var group1 = Settings.CreateGroup("CheckDupeDepencency1", false, false, false, null, typeof(BundledAssetGroupSchema)); - var group2 = Settings.CreateGroup("CheckDupeDepencency2", false, false, false, null, typeof(BundledAssetGroupSchema)); - - Settings.CreateOrMoveEntry(AssetDatabase.AssetPathToGUID(k_CheckDupePrefabA), group1, false, false); - Settings.CreateOrMoveEntry(AssetDatabase.AssetPathToGUID(k_CheckDupePrefabB), group2, false, false); - - var rule = new CheckBundleDupeDependencies(); - - //Test - rule.FixIssues(Settings); - AddressableAssetGroup group = Settings.FindGroup("Duplicate Asset Isolation"); - - //Assert - Assert.IsNotNull(group); - Assert.IsTrue(group.HasSchema()); - Assert.IsTrue(group.GetSchema().StaticContent); - - //Cleanup - Settings.RemoveGroup(group); - } - -#if CI_TESTRUNNER_PROJECT - [Test] - public void GatherModifiedEntriesOnDupeGroup_DoesNotThrow() - { - //Setup - var group1 = Settings.CreateGroup("CheckDupeDepencency1", false, false, false, null, typeof(BundledAssetGroupSchema)); - var group2 = Settings.CreateGroup("CheckDupeDepencency2", false, false, false, null, typeof(BundledAssetGroupSchema)); - - Settings.CreateOrMoveEntry(AssetDatabase.AssetPathToGUID(k_CheckDupePrefabA), group1, false, false); - Settings.CreateOrMoveEntry(AssetDatabase.AssetPathToGUID(k_CheckDupePrefabB), group2, false, false); - - var rule = new CheckBundleDupeDependencies(); - - //Test - rule.FixIssues(Settings); - - var path = "Assets/addressables_content_state.bin"; - Assert.DoesNotThrow(() => - { - ContentUpdateScript.GatherModifiedEntries(Settings, path); - }); - } -#endif - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AnalyzeRules/CheckBundleDupeDependencyTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AnalyzeRules/CheckBundleDupeDependencyTests.cs.meta deleted file mode 100644 index 66935928..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AnalyzeRules/CheckBundleDupeDependencyTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6719223fb1e7d804091db79ce4200b50 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AnalyzeRules/CheckResourcesDupeDependenciesTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AnalyzeRules/CheckResourcesDupeDependenciesTests.cs deleted file mode 100644 index b5578384..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AnalyzeRules/CheckResourcesDupeDependenciesTests.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.IO; -using NUnit.Framework; -using UnityEditor.AddressableAssets.Build.AnalyzeRules; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Tests.AnalyzeRules -{ - public class CheckResourcesDupeDependenciesTests : AddressableAssetTestBase - { - const string k_CheckDupePrefabA = k_TestConfigFolder + "/checkDupe_prefabA.prefab"; - const string k_CheckDupePrefabB = k_TestConfigFolder + "/checkDupe_prefabB.prefab"; - const string k_CheckDupeMyMaterial = k_TestConfigFolder + "/checkDupe_myMaterial.mat"; - const string k_PrefabWithMaterialPath = k_TestConfigFolder + "/checkDupe_prefabWithMaterial.prefab"; - - protected override void OnInit() - { - base.OnInit(); - - GameObject prefabA = new GameObject("PrefabA"); - GameObject prefabB = new GameObject("PrefabB"); - GameObject prefabWithMaterial = new GameObject("PrefabWithMaterial"); - var meshA = prefabA.AddComponent(); - var meshB = prefabB.AddComponent(); - - var mat = new Material(Shader.Find("Unlit/Color")); - AssetDatabase.CreateAsset(mat, k_CheckDupeMyMaterial); - meshA.sharedMaterial = mat; - meshB.sharedMaterial = mat; - - var meshPrefabWithMaterial = prefabWithMaterial.AddComponent(); - meshPrefabWithMaterial.material = AssetDatabase.LoadAssetAtPath(k_CheckDupeMyMaterial); - - PrefabUtility.SaveAsPrefabAsset(prefabA, k_CheckDupePrefabA); - PrefabUtility.SaveAsPrefabAsset(prefabB, k_CheckDupePrefabB); - PrefabUtility.SaveAsPrefabAsset(prefabWithMaterial, k_PrefabWithMaterialPath); - AssetDatabase.Refresh(); - } - - [Test] - public void CheckResourcesDupe_ResourcesDependenciesMatchWithExplicitBundleDependencies() - { - var rule = new CheckResourcesDupeDependencies(); - rule.BuiltInResourcesToDependenciesMap(new string[] { k_CheckDupePrefabA}); - rule.IntersectResourcesDepedenciesWithBundleDependencies(new List() - { - new GUID(AssetDatabase.AssetPathToGUID(k_CheckDupePrefabA)) - - }); - - Assert.IsTrue(rule.m_ResourcesToDependencies.ContainsKey(k_CheckDupePrefabA)); - Assert.AreEqual(1, rule.m_ResourcesToDependencies[k_CheckDupePrefabA].Count); - Assert.AreEqual(AssetDatabase.AssetPathToGUID(k_CheckDupePrefabA), rule.m_ResourcesToDependencies[k_CheckDupePrefabA][0].ToString()); - } - - [Test] - public void CheckResourcesDupe_ResourcesDependenciesMatchWithImplicitBundleDependencies() - { - var rule = new CheckResourcesDupeDependencies(); - rule.BuiltInResourcesToDependenciesMap(new string[] { k_PrefabWithMaterialPath }); - rule.IntersectResourcesDepedenciesWithBundleDependencies(new List() - { - new GUID(AssetDatabase.AssetPathToGUID(k_CheckDupeMyMaterial)) - - }); - - Assert.IsTrue(rule.m_ResourcesToDependencies.ContainsKey(k_PrefabWithMaterialPath)); - Assert.AreEqual(1, rule.m_ResourcesToDependencies[k_PrefabWithMaterialPath].Count); - Assert.AreEqual(AssetDatabase.AssetPathToGUID(k_CheckDupeMyMaterial), rule.m_ResourcesToDependencies[k_PrefabWithMaterialPath][0].ToString()); - } - - [Test] - public void CheckResourcesDupe_AllResourcesDependenciesAreReturned() - { - var rule = new CheckResourcesDupeDependencies(); - rule.BuiltInResourcesToDependenciesMap(new string[] { k_PrefabWithMaterialPath, k_CheckDupePrefabA }); - rule.IntersectResourcesDepedenciesWithBundleDependencies(new List() - { - new GUID(AssetDatabase.AssetPathToGUID(k_CheckDupeMyMaterial)), - new GUID(AssetDatabase.AssetPathToGUID(k_CheckDupePrefabA)) - - }); - - Assert.IsTrue(rule.m_ResourcesToDependencies[k_PrefabWithMaterialPath].Contains(new GUID(AssetDatabase.AssetPathToGUID(k_CheckDupeMyMaterial)))); - - Assert.IsTrue(rule.m_ResourcesToDependencies[k_CheckDupePrefabA].Contains(new GUID(AssetDatabase.AssetPathToGUID(k_CheckDupeMyMaterial)))); - Assert.IsTrue(rule.m_ResourcesToDependencies[k_CheckDupePrefabA].Contains(new GUID(AssetDatabase.AssetPathToGUID(k_CheckDupePrefabA)))); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AnalyzeRules/CheckResourcesDupeDependenciesTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AnalyzeRules/CheckResourcesDupeDependenciesTests.cs.meta deleted file mode 100644 index fbc5fde3..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AnalyzeRules/CheckResourcesDupeDependenciesTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d370242d9a79ba64cb55333c896bfdb0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AnalyzeRules/CheckSceneDupeDependenciesTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AnalyzeRules/CheckSceneDupeDependenciesTests.cs deleted file mode 100644 index ad48c65f..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AnalyzeRules/CheckSceneDupeDependenciesTests.cs +++ /dev/null @@ -1,119 +0,0 @@ -using System.Collections.Generic; -using NUnit.Framework; -using UnityEditor.AddressableAssets.Build.AnalyzeRules; -using UnityEditor.AddressableAssets.Build.DataBuilders; -using UnityEditor.AddressableAssets.Settings.GroupSchemas; -using UnityEditor.SceneManagement; -using UnityEditor.VersionControl; -using UnityEngine; -using UnityEngine.AddressableAssets.Initialization; -using UnityEngine.SceneManagement; - -namespace UnityEditor.AddressableAssets.Tests.AnalyzeRules -{ - public class CheckSceneDupeDependenciesTests : AddressableAssetTestBase - { - const string k_CheckDupePrefabA = k_TestConfigFolder + "/checkDupe_prefabA.prefab"; - const string k_CheckDupePrefabB = k_TestConfigFolder + "/checkDupe_prefabB.prefab"; - const string k_CheckDupeMyMaterial = k_TestConfigFolder + "/checkDupe_myMaterial.mat"; - const string k_ScenePath = k_TestConfigFolder + "/dupeSceneTest.unity"; - const string k_PrefabWithMaterialPath = k_TestConfigFolder + "/checkDupe_prefabWithMaterial.prefab"; - - protected override void OnInit() - { - base.OnInit(); - - GameObject prefabA = new GameObject("PrefabA"); - GameObject prefabB = new GameObject("PrefabB"); - GameObject prefabWithMaterial = new GameObject("PrefabWithMaterial"); - var meshA = prefabA.AddComponent(); - var meshB = prefabB.AddComponent(); - - var mat = new Material(Shader.Find("Unlit/Color")); - AssetDatabase.CreateAsset(mat, k_CheckDupeMyMaterial); - meshA.sharedMaterial = mat; - meshB.sharedMaterial = mat; - - var meshPrefabWithMaterial = prefabWithMaterial.AddComponent(); - meshPrefabWithMaterial.material = AssetDatabase.LoadAssetAtPath(k_CheckDupeMyMaterial); - -#if UNITY_2018_3_OR_NEWER - PrefabUtility.SaveAsPrefabAsset(prefabA, k_CheckDupePrefabA); - PrefabUtility.SaveAsPrefabAsset(prefabB, k_CheckDupePrefabB); - PrefabUtility.SaveAsPrefabAsset(prefabWithMaterial, k_PrefabWithMaterialPath); -#else - PrefabUtility.CreatePrefab(k_CheckDupePrefabA, prefabA); - PrefabUtility.CreatePrefab(k_CheckDupePrefabB, prefabB); - PrefabUtility.CreatePrefab(k_PrefabWithMaterialPath, prefabWithMaterial); -#endif - AssetDatabase.Refresh(); - } - - [Test] - public void CheckSceneDupe_SceneDependenciesMatchWithExplicitBundleDependencies() - { - Scene scene = EditorSceneManager.NewScene(NewSceneSetup.EmptyScene); - GameObject go = AssetDatabase.LoadAssetAtPath(k_CheckDupePrefabA); - PrefabUtility.InstantiatePrefab(go, scene); - EditorSceneManager.SaveScene(scene, k_ScenePath); - - var rule = new CheckSceneDupeDependencies(); - - EditorBuildSettingsScene editorScene = new EditorBuildSettingsScene(k_ScenePath, true); - rule.BuiltInResourcesToDependenciesMap(new string[]{ editorScene.path }); - rule.IntersectResourcesDepedenciesWithBundleDependencies(new List() { new GUID(AssetDatabase.AssetPathToGUID(k_CheckDupePrefabA)) }); - - Assert.IsTrue(rule.m_ResourcesToDependencies.ContainsKey(editorScene.path)); - Assert.AreEqual(1, rule.m_ResourcesToDependencies[editorScene.path].Count); - Assert.AreEqual(AssetDatabase.AssetPathToGUID(k_CheckDupePrefabA), rule.m_ResourcesToDependencies[editorScene.path][0].ToString()); - - //Cleanup - EditorSceneManager.NewScene(NewSceneSetup.EmptyScene); - } - - [Test] - public void CheckSceneDupe_SceneDependenciesMatchWithImplicitBundleDependencies() - { - Scene scene = EditorSceneManager.NewScene(NewSceneSetup.EmptyScene); - PrefabUtility.InstantiatePrefab(AssetDatabase.LoadAssetAtPath(k_PrefabWithMaterialPath), scene); - EditorSceneManager.SaveScene(scene, k_ScenePath); - - var rule = new CheckSceneDupeDependencies(); - - EditorBuildSettingsScene editorScene = new EditorBuildSettingsScene(k_ScenePath, true); - rule.BuiltInResourcesToDependenciesMap(new string[] { editorScene.path }); - rule.IntersectResourcesDepedenciesWithBundleDependencies(new List() { new GUID(AssetDatabase.AssetPathToGUID(k_CheckDupeMyMaterial)) }); - - Assert.IsTrue(rule.m_ResourcesToDependencies.ContainsKey(editorScene.path)); - Assert.AreEqual(1, rule.m_ResourcesToDependencies[editorScene.path].Count); - Assert.AreEqual(AssetDatabase.AssetPathToGUID(k_CheckDupeMyMaterial), rule.m_ResourcesToDependencies[editorScene.path][0].ToString()); - - //Cleanup - EditorSceneManager.NewScene(NewSceneSetup.EmptyScene); - } - - [Test] - public void CheckSceneDupe_AllSceneToBundleDependenciesAreReturned() - { - Scene scene = EditorSceneManager.NewScene(NewSceneSetup.EmptyScene); - PrefabUtility.InstantiatePrefab(AssetDatabase.LoadAssetAtPath(k_PrefabWithMaterialPath), scene); - EditorSceneManager.SaveScene(scene, k_ScenePath); - - var rule = new CheckSceneDupeDependencies(); - - EditorBuildSettingsScene editorScene = new EditorBuildSettingsScene(k_ScenePath, true); - rule.BuiltInResourcesToDependenciesMap(new string[] { editorScene.path }); - rule.IntersectResourcesDepedenciesWithBundleDependencies(new List() { - new GUID(AssetDatabase.AssetPathToGUID(k_CheckDupeMyMaterial)), - new GUID(AssetDatabase.AssetPathToGUID(k_PrefabWithMaterialPath)) }); - - Assert.IsTrue(rule.m_ResourcesToDependencies.ContainsKey(editorScene.path)); - Assert.AreEqual(2, rule.m_ResourcesToDependencies[editorScene.path].Count); - Assert.IsTrue(rule.m_ResourcesToDependencies[editorScene.path].Contains(new GUID(AssetDatabase.AssetPathToGUID(k_CheckDupeMyMaterial)))); - Assert.IsTrue(rule.m_ResourcesToDependencies[editorScene.path].Contains(new GUID(AssetDatabase.AssetPathToGUID(k_PrefabWithMaterialPath)))); - - //Cleanup - EditorSceneManager.NewScene(NewSceneSetup.EmptyScene); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AnalyzeRules/CheckSceneDupeDependenciesTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AnalyzeRules/CheckSceneDupeDependenciesTests.cs.meta deleted file mode 100644 index 4769ec52..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AnalyzeRules/CheckSceneDupeDependenciesTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e054c3274b8fb154c876b5be5db09359 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AssetGroupTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AssetGroupTests.cs deleted file mode 100644 index 1321785f..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AssetGroupTests.cs +++ /dev/null @@ -1,156 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Reflection; -using NUnit.Framework; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.AddressableAssets.Settings.GroupSchemas; -using UnityEngine; -using UnityEngine.TestTools; - -namespace UnityEditor.AddressableAssets.Tests -{ - public class AssetGroupTests : AddressableAssetTestBase - { - [Test] - public void AddRemoveEntry() - { - var group = Settings.FindGroup(AddressableAssetSettings.DefaultLocalGroupName); - Assert.IsNotNull(group); - var entry = new AddressableAssetEntry(m_AssetGUID, "test", group, false); - group.AddAssetEntry(entry); - Assert.IsNotNull(group.GetAssetEntry(m_AssetGUID)); - group.RemoveAssetEntry(entry); - Assert.IsNull(group.GetAssetEntry(m_AssetGUID)); - } - - [Test] - public void RenameSlashesBecomeDashes() - { - var group = Settings.FindGroup(AddressableAssetSettings.DefaultLocalGroupName); - var oldName = group.Name; - group.Name = "folder/name"; - Assert.AreEqual("folder-name", group.Name); - group.Name = oldName; - } - [Test] - public void RenameInvalidCharactersFails() - { - var group = Settings.FindGroup(AddressableAssetSettings.DefaultLocalGroupName); - var oldName = group.Name; - string badName = "*#?@>!@*@(#"; - LogAssert.Expect(LogType.Error, "Rename of Group failed. Invalid file name: '" + badName + ".asset'"); - group.Name = badName; - Assert.AreEqual(oldName, group.Name); - } - - [Test] - public void DedupeEntries_WhenGroupsHaveOverlappingAssetEntries_RemovesEntries() - { - const string guid = "0000"; - const string address = "not/a/real/address"; - AddressableAssetGroup group1 = Settings.CreateGroup("group1", false, false, true, null, new Type[] { }); - AddressableAssetGroup group2 = Settings.CreateGroup("group2", false, false, true, null, new Type[] { }); - - //We're making 2 identical enteries. This is to simulate each group having it's own copy of an AA Entry that references the same object. - //If we use the same object the call to AddAssetEntry won't give us the state we're looking for. - AddressableAssetEntry entry = new AddressableAssetEntry(guid, address, group1, false); - AddressableAssetEntry entry2 = new AddressableAssetEntry(guid, address, group2, false); - - group1.AddAssetEntry(entry); - group2.AddAssetEntry(entry2); - - //Ensuring our setup is correct - Assert.IsNotNull(group1.GetAssetEntry(guid)); - Assert.IsNotNull(group2.GetAssetEntry(guid)); - - group1.DedupeEnteries(); //We setup our entry with group1 so it should retain its reference - group2.DedupeEnteries(); //The entry was added to group2 afterwards and should lose its reference - - Assert.IsNotNull(group1.GetAssetEntry(guid)); - Assert.IsNull(group2.GetAssetEntry(guid)); - - //Cleanup - Settings.RemoveGroup(group1); - Settings.RemoveGroup(group2); - } - - [Test] - public void RemoveEntries_InvokesModificationNotification() - { - AddressableAssetGroup group1 = Settings.CreateGroup("group1", false, false, true, null, new Type[] { }); - - List entries = new List(); - for (int i = 0; i < 10; i++) - group1.AddAssetEntry(new AddressableAssetEntry("000" + i.ToString(), "unknown" + i.ToString(), group1, false)); - - - List callbackEntries = new List(); - Action callback = (x, y, z) => callbackEntries.AddRange((AddressableAssetEntry[])z); - AddressableAssetSettings.OnModificationGlobal += callback; - - group1.RemoveAssetEntries(entries.ToArray()); - - for (int i = 0; i < entries.Count; i++) - Assert.AreEqual(entries[i], callbackEntries[i]); - - //Cleanup - AddressableAssetSettings.OnModificationGlobal -= callback; - Settings.RemoveGroup(group1); - } - - [Test] - public void CannotSetInvalidGroupAsDefault() - { - AddressableAssetGroup group1 = Settings.CreateGroup("group1", false, true, true, null, new Type[] { }); - LogAssert.Expect(LogType.Error, "Unable to set " + group1.Name + " as the Default Group. Default Groups must not be ReadOnly."); - Settings.DefaultGroup = group1; - Assert.AreNotEqual(Settings.DefaultGroup, group1); - - //Cleanup - Settings.RemoveGroup(group1); - } - - [Test] - public void DefaultGroupContainsCorrectProperties() - { - Assert.IsFalse(Settings.DefaultGroup.ReadOnly); - } - - [Test] - public void DefaultGroupChangesToValidDefaultGroup() - { - LogAssert.ignoreFailingMessages = true; - AddressableAssetGroup oldDefault = Settings.DefaultGroup; - oldDefault.m_ReadOnly = true; - AddressableAssetGroup newDefault = Settings.DefaultGroup; - - Assert.AreNotEqual(oldDefault, newDefault); - Assert.IsFalse(Settings.DefaultGroup.ReadOnly); - - //Cleanup - oldDefault.AddSchema(); - Settings.DefaultGroup = oldDefault; - } - - [Test] - public void PreventNullDefaultGroup() - { - LogAssert.Expect(LogType.Error, "Unable to set null as the Default Group. Default Groups must not be ReadOnly."); - Settings.DefaultGroup = null; - Assert.IsNotNull(Settings.DefaultGroup); - } - - [Test] - public void ValidGroupsCanBeSetAsDefault() - { - AddressableAssetGroup oldDefault = Settings.DefaultGroup; - AddressableAssetGroup group1 = Settings.CreateGroup("group1", false, false, true, null, new Type[] { typeof(BundledAssetGroupSchema) }); - Settings.DefaultGroup = group1; - Assert.AreEqual(group1, Settings.DefaultGroup); - - //Cleanup - Settings.DefaultGroup = oldDefault; - Settings.RemoveGroup(group1); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AssetGroupTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AssetGroupTests.cs.meta deleted file mode 100644 index 228f1b82..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/AssetGroupTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3b8b37f5037b1e945af5621a67f45bc0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build.meta deleted file mode 100644 index 24e2fad0..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 142f7d4eae11d5b41a02b71169f6b854 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptFastTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptFastTests.cs deleted file mode 100644 index b606d497..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptFastTests.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using NUnit.Framework; -using UnityEditor.AddressableAssets.Build; -using UnityEditor.AddressableAssets.Build.DataBuilders; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Tests -{ - public class BuildScriptFastTests : AddressableAssetTestBase - { - [Test] - public void FastModeScript_CannotBuildPlayerContent() - { - var buildScript = ScriptableObject.CreateInstance(); - - Assert.IsFalse(buildScript.CanBuildData()); - - Assert.IsTrue(buildScript.CanBuildData()); - Assert.IsTrue(buildScript.CanBuildData()); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptFastTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptFastTests.cs.meta deleted file mode 100644 index 85f00d15..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptFastTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f1a1c0162fa02cb42ae827251833e0bb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptPackedPlayTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptPackedPlayTests.cs deleted file mode 100644 index 34314804..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptPackedPlayTests.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using NUnit.Framework; -using UnityEditor.AddressableAssets.Build; -using UnityEditor.AddressableAssets.Build.DataBuilders; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Tests -{ - public class BuildScriptPackedPlayTests : AddressableAssetTestBase - { - [Test] - public void PackedPlayModeScript_CannotBuildPlayerContent() - { - var buildScript = ScriptableObject.CreateInstance(); - - Assert.IsFalse(buildScript.CanBuildData()); - - Assert.IsTrue(buildScript.CanBuildData()); - Assert.IsTrue(buildScript.CanBuildData()); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptPackedPlayTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptPackedPlayTests.cs.meta deleted file mode 100644 index 5adcf386..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptPackedPlayTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 49c2c229315d04249b13bbf17069f486 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptPackedTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptPackedTests.cs deleted file mode 100644 index a549dbe3..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptPackedTests.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Text.RegularExpressions; -using NUnit.Framework; -using UnityEditor.AddressableAssets.Build; -using UnityEditor.AddressableAssets.Build.DataBuilders; -using UnityEditor.AddressableAssets.Settings.GroupSchemas; -using UnityEngine; -using UnityEngine.TestTools; - -namespace UnityEditor.AddressableAssets.Tests -{ - public class BuildScriptPackedTests : AddressableAssetTestBase - { - [Test] - public void PackedModeScript_CannotBuildPlayContent() - { - var buildScript = ScriptableObject.CreateInstance(); - - Assert.IsFalse(buildScript.CanBuildData()); - - Assert.IsTrue(buildScript.CanBuildData()); - Assert.IsTrue(buildScript.CanBuildData()); - } - - [Test] - public void ErrorCheckBundleSettings_FindsNoProblemsInDefaultScema() - { - var group = Settings.CreateGroup("PackedTest", false, false, false, null, typeof(BundledAssetGroupSchema)); - var schema = group.GetSchema(); - - var errorStr = BuildScriptPackedMode.ErrorCheckBundleSettings(schema, group, Settings); - LogAssert.NoUnexpectedReceived(); - Assert.IsTrue(string.IsNullOrEmpty(errorStr)); - } - - [Test] - public void ErrorCheckBundleSettings_WarnsOfMismatchedBuildPath() - { - var group = Settings.CreateGroup("PackedTest", false, false, false, null, typeof(BundledAssetGroupSchema)); - var schema = group.GetSchema(); - schema.BuildPath.Id = "BadPath"; - - var errorStr = BuildScriptPackedMode.ErrorCheckBundleSettings(schema, group, Settings); - LogAssert.NoUnexpectedReceived(); - Assert.IsTrue(errorStr.Contains("is set to the dynamic-lookup version of StreamingAssets, but BuildPath is not.")); - } - - [Test] - public void ErrorCheckBundleSettings_WarnsOfMismatchedLoadPath() - { - var group = Settings.CreateGroup("PackedTest", false, false, false, null, typeof(BundledAssetGroupSchema)); - var schema = group.GetSchema(); - schema.LoadPath.Id = "BadPath"; - - var errorStr = BuildScriptPackedMode.ErrorCheckBundleSettings(schema, group, Settings); - LogAssert.NoUnexpectedReceived(); - Assert.IsTrue(errorStr.Contains("is set to the dynamic-lookup version of StreamingAssets, but LoadPath is not.")); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptPackedTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptPackedTests.cs.meta deleted file mode 100644 index 1de4acf4..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptPackedTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1f2eff97e91ec624b8d35cecfb1ccf38 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptTests.cs deleted file mode 100644 index 067c1119..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptTests.cs +++ /dev/null @@ -1,148 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.RegularExpressions; -using NUnit.Framework; -using UnityEditor.AddressableAssets.Build; -using UnityEditor.AddressableAssets.Build.DataBuilders; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.AddressableAssets.Settings.GroupSchemas; -using UnityEngine; -using UnityEngine.TestTools; - -namespace UnityEditor.AddressableAssets.Tests -{ - public class BuildScriptTests : AddressableAssetTestBase - { - [Test] - public void ClearCachedData_CleansStreamingAssetFolder() - { - var context = new AddressablesDataBuilderInput(Settings); - - int builderCount = 0; - for (int i = 0; i < Settings.DataBuilders.Count; i++) - { - - var builder = Settings.DataBuilders[i] as IDataBuilder; - if (builder.CanBuildData()) - { - builderCount++; - var existingFiles = new HashSet(); - if (System.IO.Directory.Exists("Assets/StreamingAssets")) - { - foreach (var f in System.IO.Directory.GetFiles("Assets/StreamingAssets")) - existingFiles.Add(f); - } - builder.BuildData(context); - builder.ClearCachedData(); - if (System.IO.Directory.Exists("Assets/StreamingAssets")) - { - foreach (var f in System.IO.Directory.GetFiles("Assets/StreamingAssets")) - Assert.IsTrue(existingFiles.Contains(f), string.Format("Data Builder {0} did not clean up file {1}", builder.Name, f)); - } - } - } - Assert.IsTrue(builderCount > 0); - - } - - [Test] - public void BuildCompleteCallbackGetsCalled() - { - LogAssert.ignoreFailingMessages = true; - AddressableAssetSettings oldSettings = AddressableAssetSettingsDefaultObject.Settings; - AddressableAssetSettingsDefaultObject.Settings = Settings; - - bool callbackCalled = false; - BuildScript.buildCompleted += (result) => - { - callbackCalled = true; - }; - AddressableAssetSettings.BuildPlayerContent(); - Assert.IsTrue(callbackCalled); - - if (oldSettings != null) - AddressableAssetSettingsDefaultObject.Settings = oldSettings; - AddressableAssetSettings.BuildPlayerContent(); - LogAssert.ignoreFailingMessages = false; - } - - [Test] - public void BuildScriptBase_FailsCanBuildData() - { - var buildScript = ScriptableObject.CreateInstance(); - Assert.IsFalse(buildScript.CanBuildData()); - Assert.IsFalse(buildScript.CanBuildData()); - Assert.IsFalse(buildScript.CanBuildData()); - Assert.IsFalse(buildScript.CanBuildData()); - } - - class BuildScriptTestClass : BuildScriptBase - { - public override string Name - { - get - { - return "Test Script"; - } - } - - public override bool CanBuildData() - { - return typeof(T).IsAssignableFrom(typeof(AddressablesPlayModeBuildResult)); - } - - protected override TResult BuildDataImplementation(AddressablesDataBuilderInput builderInput) - { - Debug.LogError("Inside BuildDataInternal for test script!"); - return base.BuildDataImplementation(builderInput); - } - } - - [Test] - public void BuildScript_DoesNotBuildWrongDataType() - { - var context = new AddressablesDataBuilderInput(Settings); - - var baseScript = ScriptableObject.CreateInstance(); - baseScript.BuildData(context); - LogAssert.Expect(LogType.Error, new Regex("Data builder Test Script cannot build requested type.*")); - - baseScript.BuildData(context); - LogAssert.Expect(LogType.Error, "Inside BuildDataInternal for test script!"); - - } - - [Test] - public void GetNameWithHashNaming_ReturnsNoChangeIfNoHash() - { - string source = "x/y.bundle"; - string hash = "123abc"; - string expected = "x/y.bundle"; - - var actual = BuildUtility.GetNameWithHashNaming(BundledAssetGroupSchema.BundleNamingStyle.NoHash, hash, source); - - Assert.AreEqual(expected, actual); - } - [Test] - public void GetNameWithHashNaming_CanAppendHash() - { - string source = "x/y.bundle"; - string hash = "123abc"; - string expected = "x/y_123abc.bundle"; - - var actual = BuildUtility.GetNameWithHashNaming(BundledAssetGroupSchema.BundleNamingStyle.AppendHash, hash, source); - - Assert.AreEqual(expected, actual);} - [Test] - public void GetNameWithHashNaming_CanReplaceFileNameWithHash() - { - string source = "x/y.bundle"; - string hash = "123abc"; - string expected = "x/123abc.bundle"; - - var actual = BuildUtility.GetNameWithHashNaming(BundledAssetGroupSchema.BundleNamingStyle.OnlyHash, hash, source); - - Assert.AreEqual(expected, actual);} - - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptTests.cs.meta deleted file mode 100644 index 08e8f1ea..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e3e97670d537e784e9f104552b533056 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptVirtualTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptVirtualTests.cs deleted file mode 100644 index 1eedabe7..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptVirtualTests.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using NUnit.Framework; -using UnityEditor.AddressableAssets.Build; -using UnityEditor.AddressableAssets.Build.DataBuilders; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Tests -{ - public class BuildScriptVirtualTests : AddressableAssetTestBase - { - [Test] - public void VirtualModeScript_CannotBuildPlayerContent() - { - var buildScript = ScriptableObject.CreateInstance(); - - Assert.IsFalse(buildScript.CanBuildData()); - - Assert.IsTrue(buildScript.CanBuildData()); - Assert.IsTrue(buildScript.CanBuildData()); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptVirtualTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptVirtualTests.cs.meta deleted file mode 100644 index 97378fc2..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/BuildScriptVirtualTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b644b787231a1784ab6bbb39217a63b9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/DataBuilderInputTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/DataBuilderInputTests.cs deleted file mode 100644 index 7131dbe3..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/DataBuilderInputTests.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using NUnit.Framework; -using UnityEditor.AddressableAssets.Build; -using UnityEditor.AddressableAssets.Settings; -using UnityEngine; -using UnityEngine.TestTools; - -namespace UnityEditor.AddressableAssets.Tests -{ - public class DataBuilderInputTests : AddressableAssetTestBase - { - [Test] - public void BuildInput_FailsWithNullSettings() - { - var input = new AddressablesDataBuilderInput(null); - LogAssert.Expect(LogType.Error, "Attempting to set up AddressablesDataBuilderInput with null settings."); - Assert.AreEqual(string.Empty, input.PlayerVersion); - input = new AddressablesDataBuilderInput(null, "123"); - LogAssert.Expect(LogType.Error, "Attempting to set up AddressablesDataBuilderInput with null settings."); - Assert.AreEqual("123", input.PlayerVersion); - } - - [Test] - public void BuildInput_CreatesProperBuildData() - { - var input = new AddressablesDataBuilderInput(Settings); - Assert.AreEqual(EditorUserBuildSettings.activeBuildTarget, input.Target); - Assert.AreEqual(BuildPipeline.GetBuildTargetGroup(EditorUserBuildSettings.activeBuildTarget), input.TargetGroup); - Assert.AreEqual(Settings.PlayerBuildVersion, input.PlayerVersion); - - - input = new AddressablesDataBuilderInput(Settings, "1234"); - Assert.AreEqual(EditorUserBuildSettings.activeBuildTarget, input.Target); - Assert.AreEqual(BuildPipeline.GetBuildTargetGroup(EditorUserBuildSettings.activeBuildTarget), input.TargetGroup); - Assert.AreEqual("1234", input.PlayerVersion); - } - - [Test] - public void BuildInput_ReadsProfilerEventState() - { - var oldState = ProjectConfigData.postProfilerEvents; - ProjectConfigData.postProfilerEvents = true; - var input = new AddressablesDataBuilderInput(Settings); - Assert.AreEqual(true, input.ProfilerEventsEnabled); - - ProjectConfigData.postProfilerEvents = false; - input = new AddressablesDataBuilderInput(Settings); - Assert.AreEqual(false, input.ProfilerEventsEnabled); - - - ProjectConfigData.postProfilerEvents = oldState; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/DataBuilderInputTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/DataBuilderInputTests.cs.meta deleted file mode 100644 index 1b80baf6..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Build/DataBuilderInputTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1575d1c3656610c40ad50c15e8f5855a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/BuiltinSceneCacheTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/BuiltinSceneCacheTests.cs deleted file mode 100644 index 224f7af8..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/BuiltinSceneCacheTests.cs +++ /dev/null @@ -1,107 +0,0 @@ -using NUnit.Framework; -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using UnityEditor.SceneManagement; -using UnityEngine; -using UnityEngine.SceneManagement; - -namespace UnityEditor.AddressableAssets.Settings.Tests -{ - public class BuiltinSceneCacheTests - { - const string kTestScenePath = "Assets/TestScenes"; - const int kTestSceneCount = 3; - private EditorBuildSettingsScene []m_OldScenes; - private GUID[] m_TestGUIDs; - - private static string GetTestScenePath(int index) - { - return string.Format("{0}/myscene{1}.unity", kTestScenePath, index); - } - - [OneTimeSetUp] - public void OneTimeSetUp() - { - // Since this system is a global. We need to shutdown global state - GlobalInitialization.ShutdownGlobalState(); - - // Create folder for test scenes - Directory.CreateDirectory("Assets/TestScenes"); - m_OldScenes = EditorBuildSettings.scenes; - Scene scene = EditorSceneManager.NewScene(NewSceneSetup.EmptyScene); - for (int i = 0; i < kTestSceneCount; i++) - EditorSceneManager.SaveScene(scene, GetTestScenePath(i), true); - - AssetDatabase.Refresh(); - - m_TestGUIDs = new GUID[kTestSceneCount]; - for (int i = 0; i < kTestSceneCount; i++) - m_TestGUIDs[i] = new GUID(AssetDatabase.AssetPathToGUID(GetTestScenePath(i))); - } - - [OneTimeTearDown] - public void OneTimeTearDown() - { - EditorBuildSettings.scenes = m_OldScenes; - Directory.Delete(kTestScenePath, true); - GlobalInitialization.InitializeGlobalState(); - } - - private void SetupBuildScenes() - { - EditorBuildSettingsScene[] scenes = new EditorBuildSettingsScene[2]; - scenes[0] = new EditorBuildSettingsScene(GetTestScenePath(0), true); - scenes[1] = new EditorBuildSettingsScene(GetTestScenePath(1), true); - EditorBuildSettings.scenes = scenes; - } - - [SetUp] - public void Setup() - { - SetupBuildScenes(); - BuiltinSceneCache.ClearState(); - } - - [Test] - public void CanAccessSceneData() - { - Assert.AreEqual(m_TestGUIDs[0], BuiltinSceneCache.scenes[0].guid); - Assert.AreEqual(m_TestGUIDs[1], BuiltinSceneCache.scenes[1].guid); - } - - [Test] - public void WhenScenesChange_CallbackInvoked() - { - int[] called = new int[] { 0 }; - Action callback = () => called[0]++; - EditorBuildSettingsScene[] scenes = BuiltinSceneCache.scenes; - scenes[0].enabled = !scenes[0].enabled; - BuiltinSceneCache.sceneListChanged += callback; - BuiltinSceneCache.scenes = scenes; - Assert.AreEqual(1, called[0]); - - // Set Directly through API - scenes[0].enabled = !scenes[0].enabled; - EditorBuildSettings.scenes = scenes; - Assert.AreEqual(2, called[0]); - } - - [Test] - public void WhenSceneOrderChanges_GetSceneIndexCacheUpdates() - { - Assert.AreEqual(0, BuiltinSceneCache.GetSceneIndex(m_TestGUIDs[0])); - Assert.AreEqual(1, BuiltinSceneCache.GetSceneIndex(m_TestGUIDs[1])); - - // Insert new scene - List list = new List(BuiltinSceneCache.scenes); - list.Insert(0, new EditorBuildSettingsScene(m_TestGUIDs[2], true)); - BuiltinSceneCache.scenes = list.ToArray(); - - Assert.AreEqual(1, BuiltinSceneCache.GetSceneIndex(m_TestGUIDs[0])); - Assert.AreEqual(2, BuiltinSceneCache.GetSceneIndex(m_TestGUIDs[1])); - Assert.AreEqual(0, BuiltinSceneCache.GetSceneIndex(m_TestGUIDs[2])); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/BuiltinSceneCacheTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/BuiltinSceneCacheTests.cs.meta deleted file mode 100644 index 9374789a..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/BuiltinSceneCacheTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bbc66e9c19bb4284686b4dbce7530ccf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ContentCatalogTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ContentCatalogTests.cs deleted file mode 100644 index 549b99d0..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ContentCatalogTests.cs +++ /dev/null @@ -1,186 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using System.Text; -using NUnit.Framework; -using UnityEngine; -using UnityEngine.AddressableAssets.ResourceLocators; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.ResourceProviders; - -namespace UnityEditor.AddressableAssets.Tests -{ - using Debug = UnityEngine.Debug; - using Random = UnityEngine.Random; - - public class ContentCatalogTests - { - List m_Keys; - List m_Providers; - - [Serializable] - public class SerializableKey - { - public int index; - public string path; - } - - [OneTimeSetUp] - public void Init() - { - m_Keys = new List(); - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < 1000; i++) - { - var r = Random.Range(0, 100); - if (r < 20) - { - int len = Random.Range(1, 5); - for (int j = 0; j < len; j++) - sb.Append(GUID.Generate().ToString()); - m_Keys.Add(sb.ToString()); - sb.Length = 0; - } - else if (r < 40) - { - m_Keys.Add((ushort)(i * 13)); - } - else if (r < 50) - { - m_Keys.Add(i * 13); - } - else if (r < 60) - { - m_Keys.Add((uint)(i * 13)); - } - else if (r < 80) - { - m_Keys.Add(new SerializableKey { index = i, path = GUID.Generate().ToString() }); - } - else - { - m_Keys.Add(Hash128.Parse(GUID.Generate().ToString())); - } - } - m_Providers = new List(); - m_Providers.Add(typeof(BundledAssetProvider)); - m_Providers.Add(typeof(AssetBundleProvider)); - m_Providers.Add(typeof(AssetDatabaseProvider)); - m_Providers.Add(typeof(LegacyResourcesProvider)); - m_Providers.Add(typeof(JsonAssetProvider)); - m_Providers.Add(typeof(TextDataProvider)); - m_Providers.Add(typeof(TextDataProvider)); - } - - List GetRandomSubset(List keys, int count) - { - if (keys.Count == 0 || count == 0) - return new List(); - var entryKeys = new HashSet(); - for (int k = 0; k < count; k++) - entryKeys.Add(keys[Random.Range(0, keys.Count)]); - return entryKeys.ToList(); - } - - [Serializable] - public class EvenData - { - public int index; - public string path; - } - - [Serializable] - public class OddData - { - public int index; - public string path; - } - - [Test] - public void AssetBundleRequestOptionsTest() - { - var options = new AssetBundleRequestOptions - { - ChunkedTransfer = true, - Crc = 123, - Hash = new Hash128(1, 2, 3, 4).ToString(), - RedirectLimit = 4, - RetryCount = 7, - Timeout = 12 - }; - var dataEntry = new ContentCatalogDataEntry(typeof(ContentCatalogData), "internalId", "provider", new object[] { 1 }, null, options); - var entries = new List(); - entries.Add(dataEntry); - var ccData = new ContentCatalogData(entries); - var locator = ccData.CreateLocator(); - IList locations; - if (!locator.Locate(1, typeof(object), out locations)) - Assert.Fail("Unable to locate resource location"); - var loc = locations[0]; - var locOptions = loc.Data as AssetBundleRequestOptions; - Assert.IsNotNull(locOptions); - Assert.AreEqual(locOptions.ChunkedTransfer, options.ChunkedTransfer); - Assert.AreEqual(locOptions.Crc, options.Crc); - Assert.AreEqual(locOptions.Hash, options.Hash); - Assert.AreEqual(locOptions.RedirectLimit, options.RedirectLimit); - Assert.AreEqual(locOptions.RetryCount, options.RetryCount); - Assert.AreEqual(locOptions.Timeout, options.Timeout); - } - - [Test] - public void VerifySerialization() - { - var sw = Stopwatch.StartNew(); - sw.Start(); - var catalog = new ContentCatalogData(); - var entries = new List(); - var availableKeys = new List(); - - for (int i = 0; i < 1000; i++) - { - var internalId = "Assets/TestPath/" + GUID.Generate() + ".asset"; - var eKeys = GetRandomSubset(m_Keys, Random.Range(1, 5)); - object data; - if (i % 2 == 0) - data = new EvenData { index = i, path = internalId }; - else - data = new OddData { index = i, path = internalId }; - - var e = new ContentCatalogDataEntry(typeof(ContentCatalogData), internalId, m_Providers[Random.Range(0, m_Providers.Count)].FullName, eKeys, GetRandomSubset(availableKeys, Random.Range(0, 1)), data); - availableKeys.Add(eKeys[0]); - entries.Add(e); - } - - catalog.SetData(entries); - sw.Stop(); - var t = sw.Elapsed.TotalMilliseconds; - sw.Reset(); - sw.Start(); - var locMap = catalog.CreateLocator(); - sw.Stop(); - Debug.LogFormat("Create: {0}ms, Load: {1}ms", t, sw.Elapsed.TotalMilliseconds); - - foreach (var k in locMap.Locations) - { - foreach (var loc in k.Value) - { - var entry = entries.Find(e => e.InternalId == loc.InternalId); - Assert.AreEqual(entry.Provider, loc.ProviderId); - - var deps = loc.Dependencies; - if (deps != null) - { - foreach (var ed in entry.Dependencies) - { - IList depList; - Assert.IsTrue(locMap.Locate(ed, typeof(object), out depList)); - for (int i = 0; i < depList.Count; i++) - Assert.AreEqual(depList[i].InternalId, deps[i].InternalId); - } - } - } - } - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ContentCatalogTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ContentCatalogTests.cs.meta deleted file mode 100644 index 1f8376b0..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ContentCatalogTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d65991d4bb3d75541bf06688c370ff05 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ContentUpdateTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ContentUpdateTests.cs deleted file mode 100644 index a2c25815..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ContentUpdateTests.cs +++ /dev/null @@ -1,167 +0,0 @@ -using System; -using System.IO; -using System.Text.RegularExpressions; -using NUnit.Framework; -using UnityEditor.AddressableAssets.Build; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.AddressableAssets.Settings.GroupSchemas; -using UnityEngine; -using UnityEngine.AddressableAssets; -using UnityEngine.TestTools; - -namespace UnityEditor.AddressableAssets.Tests -{ - public class ContentUpdateTests : AddressableAssetTestBase - { - protected override bool PersistSettings { get { return true; } } - - [Test] - public void CanCreateContentStateData() - { - var group = Settings.CreateGroup("LocalStuff", false, false, false, null); - var schema = group.AddSchema(); - schema.BuildPath.SetVariableByName(Settings, AddressableAssetSettings.kLocalBuildPath); - schema.LoadPath.SetVariableByName(Settings, AddressableAssetSettings.kLocalLoadPath); - schema.BundleMode = BundledAssetGroupSchema.BundlePackingMode.PackTogether; - group.AddSchema().StaticContent = true; - - Settings.CreateOrMoveEntry(m_AssetGUID, group); - var context = new AddressablesDataBuilderInput(Settings); - - var op = Settings.ActivePlayerDataBuilder.BuildData(context); - - Assert.IsTrue(string.IsNullOrEmpty(op.Error), op.Error); - var tempPath = Path.GetDirectoryName(Application.dataPath) + "/Library/com.unity.addressables/StreamingAssetsCopy/" + PlatformMappingService.GetPlatform() + "/addressables_content_state.bin"; - var cacheData = ContentUpdateScript.LoadContentState(tempPath); - Assert.NotNull(cacheData); - } - - [Test] - public void PrepareContentUpdate() - { - var group = Settings.CreateGroup("LocalStuff2", false, false, false, null); - var schema = group.AddSchema(); - schema.BuildPath.SetVariableByName(Settings, AddressableAssetSettings.kLocalBuildPath); - schema.LoadPath.SetVariableByName(Settings, AddressableAssetSettings.kLocalLoadPath); - schema.BundleMode = BundledAssetGroupSchema.BundlePackingMode.PackTogether; - group.AddSchema().StaticContent = true; - - var entry = Settings.CreateOrMoveEntry(m_AssetGUID, group); - entry.address = "test"; - - var context = new AddressablesDataBuilderInput(Settings); - - Settings.ActivePlayerDataBuilder.BuildData(context); - - var path = AssetDatabase.GUIDToAssetPath(m_AssetGUID); - var obj = AssetDatabase.LoadAssetAtPath(path); - obj.GetComponent().SetPositionAndRotation(new Vector3(10, 10, 10), Quaternion.identity); -#if UNITY_2018_3_OR_NEWER - PrefabUtility.SavePrefabAsset(obj); -#else - EditorUtility.SetDirty(obj); -#endif - AssetDatabase.SaveAssets(); - var tempPath = Path.GetDirectoryName(Application.dataPath) + "/Library/com.unity.addressables/StreamingAssetsCopy/" + PlatformMappingService.GetPlatform() + "/addressables_content_state.bin"; - var modifiedEntries = ContentUpdateScript.GatherModifiedEntries(Settings, tempPath); - Assert.IsNotNull(modifiedEntries); - Assert.GreaterOrEqual(modifiedEntries.Count, 1); - ContentUpdateScript.CreateContentUpdateGroup(Settings, modifiedEntries, "Content Update"); - var contentGroup = Settings.FindGroup("Content Update"); - Assert.IsNotNull(contentGroup); - var movedEntry = contentGroup.GetAssetEntry(m_AssetGUID); - Assert.AreSame(movedEntry, entry); - } - - [Test] - public void BuildContentUpdate() - { - var group = Settings.CreateGroup("LocalStuff3", false, false, false, null); - Settings.BuildRemoteCatalog = true; - Settings.RemoteCatalogBuildPath = new ProfileValueReference(); - Settings.RemoteCatalogBuildPath.SetVariableByName(Settings, AddressableAssetSettings.kRemoteBuildPath); - Settings.RemoteCatalogLoadPath = new ProfileValueReference(); - Settings.RemoteCatalogLoadPath.SetVariableByName(Settings, AddressableAssetSettings.kRemoteLoadPath); - var schema = group.AddSchema(); - schema.BuildPath.SetVariableByName(Settings, AddressableAssetSettings.kLocalBuildPath); - schema.LoadPath.SetVariableByName(Settings, AddressableAssetSettings.kLocalLoadPath); - schema.BundleMode = BundledAssetGroupSchema.BundlePackingMode.PackTogether; - group.AddSchema().StaticContent = true; - Settings.CreateOrMoveEntry(m_AssetGUID, group); - var context = new AddressablesDataBuilderInput(Settings); - - var op = Settings.ActivePlayerDataBuilder.BuildData(context); - - Assert.IsTrue(string.IsNullOrEmpty(op.Error), op.Error); - var tempPath = Path.GetDirectoryName(Application.dataPath) + "/Library/com.unity.addressables/StreamingAssetsCopy/" + PlatformMappingService.GetPlatform() + "/addressables_content_state.bin"; - var buildOp = ContentUpdateScript.BuildContentUpdate(Settings, tempPath); - Assert.IsNotNull(buildOp); - Assert.IsTrue(string.IsNullOrEmpty(buildOp.Error)); - } - - [Test] - public void IsCacheDataValid_WhenNoPreviousRemoteCatalogPath_ReturnsFalseWithError() - { - AddressablesContentState cacheData = new AddressablesContentState(); - cacheData.editorVersion = Application.unityVersion; - Assert.IsFalse(ContentUpdateScript.IsCacheDataValid(Settings, cacheData)); - LogAssert.Expect(LogType.Error, new Regex("Previous build had 'Build Remote Catalog' disabled.*")); - } - - [Test] - public void IsCacheDataValid_WhenRemoteCatalogDisabled_ReturnsFalseWithError() - { - AddressablesContentState cacheData = new AddressablesContentState(); - cacheData.editorVersion = Application.unityVersion; - cacheData.remoteCatalogLoadPath = "somePath"; - var oldSetting = Settings.BuildRemoteCatalog; - Settings.BuildRemoteCatalog = false; - Assert.IsFalse(ContentUpdateScript.IsCacheDataValid(Settings, cacheData)); - LogAssert.Expect(LogType.Error, new Regex("Current settings have 'Build Remote Catalog' disabled.*")); - Settings.BuildRemoteCatalog = oldSetting; - } - - [Test] - public void IsCacheDataValid_WhenMismatchedCatalogPaths_ReturnsFalseWithError() - { - AddressablesContentState cacheData = new AddressablesContentState(); - cacheData.editorVersion = Application.unityVersion; - cacheData.remoteCatalogLoadPath = "somePath"; - var oldSetting = Settings.BuildRemoteCatalog; - Settings.BuildRemoteCatalog = true; - Assert.IsFalse(ContentUpdateScript.IsCacheDataValid(Settings, cacheData)); - LogAssert.Expect(LogType.Error, new Regex("Current 'Remote Catalog Load Path' does not match load path of original player.*")); - Settings.BuildRemoteCatalog = oldSetting; - } - - [Test] - public void IsCacheDataValid_WhenMismatchedEditorVersions_LogsWarning() - { - AddressablesContentState cacheData = new AddressablesContentState(); - cacheData.editorVersion = "invalid"; - Assert.IsFalse(ContentUpdateScript.IsCacheDataValid(Settings, cacheData)); - LogAssert.Expect(LogType.Warning, new Regex(".*with version `" + cacheData.editorVersion + "`.*")); - LogAssert.Expect(LogType.Error, new Regex("Previous.*")); - } - - [Test] - public void BuildContentUpdate_DoesNotDeleteBuiltData() - { - var group = Settings.CreateGroup("LocalStuff3", false, false, false, null); - var schema = group.AddSchema(); - schema.BuildPath.SetVariableByName(Settings, AddressableAssetSettings.kLocalBuildPath); - schema.LoadPath.SetVariableByName(Settings, AddressableAssetSettings.kLocalLoadPath); - schema.BundleMode = BundledAssetGroupSchema.BundlePackingMode.PackTogether; - group.AddSchema().StaticContent = true; - Settings.CreateOrMoveEntry(m_AssetGUID, group); - var context = new AddressablesDataBuilderInput(Settings); - - var op = Settings.ActivePlayerDataBuilder.BuildData(context); - - Assert.IsTrue(string.IsNullOrEmpty(op.Error), op.Error); - var tempPath = Path.GetDirectoryName(Application.dataPath) + "/Library/com.unity.addressables/StreamingAssetsCopy/" + PlatformMappingService.GetPlatform() + "/addressables_content_state.bin"; - ContentUpdateScript.BuildContentUpdate(Settings, tempPath); - Assert.IsTrue(Directory.Exists(Addressables.BuildPath)); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ContentUpdateTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ContentUpdateTests.cs.meta deleted file mode 100644 index c9c348f2..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ContentUpdateTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3c09a39d41a474a4a886225f2513ed5e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/CustomTestSchema.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/CustomTestSchema.cs deleted file mode 100644 index cc14e929..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/CustomTestSchema.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using UnityEditor.AddressableAssets.Settings; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Tests -{ - class CustomTestSchema : AddressableAssetGroupSchema - { - public string customField = null; - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/CustomTestSchema.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/CustomTestSchema.cs.meta deleted file mode 100644 index 401b843f..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/CustomTestSchema.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 632c145638f685b4883fbd81884e496a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/CustomTestSchemaSubClass.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/CustomTestSchemaSubClass.cs deleted file mode 100644 index 5cd246aa..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/CustomTestSchemaSubClass.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Tests -{ - class CustomTestSchemaSubClass : CustomTestSchema - { - public string customField2 = null; - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/CustomTestSchemaSubClass.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/CustomTestSchemaSubClass.cs.meta deleted file mode 100644 index 2d2a4f57..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/CustomTestSchemaSubClass.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2c53f1cace3a81a4bbe8280d05abda4e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Diagnostics.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Diagnostics.meta deleted file mode 100644 index 1786f186..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Diagnostics.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3ee6f25a9e02fee4197773346feb1015 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Diagnostics/SegmentIteration.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Diagnostics/SegmentIteration.cs deleted file mode 100644 index 234577b1..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Diagnostics/SegmentIteration.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using System.Linq; -using NUnit.Framework; -using UnityEditor.AddressableAssets.Diagnostics.Data; -using UnityEditor.AddressableAssets.Diagnostics.GUI.Graph; - -namespace UnityEditor.AddressableAssets.Tests.Diagnostics -{ - public class SegmentIterationTests - { - static bool IsContinuationOfSegment(int prevData, int newData) - { - return prevData != newData; - } - - [Test] - public void EmptyStream_ReturnsNoSegments() - { - Assert.AreEqual(0, GraphUtility.IterateSegments(new EventDataSetStream(), 0, 100, null).Count()); - } - - [Test] - public void FirstSampleBeforeStartFrame_IsFirstSegmentAndCropped() - { - EventDataSetStream stream = new EventDataSetStream(); - stream.AddSample(0, 99); - GraphUtility.Segment[] segs = GraphUtility.IterateSegments(stream, 25, 100, IsContinuationOfSegment).ToArray(); - Assert.AreEqual(1, segs.Length); - Assert.AreEqual(25, segs[0].frameStart); - Assert.AreEqual(100, segs[0].frameEnd); - Assert.AreEqual(99, segs[0].data); - } - - [Test] - public void LastSampleBeforeLastEndFrame_LastSegmentSpansToEndOfFrame() - { - EventDataSetStream stream = new EventDataSetStream(); - stream.AddSample(50, 99); - GraphUtility.Segment[] segs = GraphUtility.IterateSegments(stream, 0, 100, IsContinuationOfSegment).ToArray(); - Assert.AreEqual(1, segs.Length); - Assert.AreEqual(50, segs[0].frameStart); - Assert.AreEqual(100, segs[0].frameEnd); - Assert.AreEqual(99, segs[0].data); - } - - void AddAlternativeSegments(EventDataSetStream stream, int data1, int data2, int startFrame, int frameIncrement, int count) - { - for (int i = 0; i < count; i++) - { - int sample = (i % 2) == 0 ? data1 : data2; - stream.AddSample(startFrame + i * frameIncrement, sample); - } - } - - [Test] - public void MultipleSamples_SegmentPerSample() - { - EventDataSetStream stream = new EventDataSetStream(); - const int kSampleCount = 20; - const int kFrameIncrement = 100; - AddAlternativeSegments(stream, -99, 99, 0, kFrameIncrement, kSampleCount); - GraphUtility.Segment[] segs = GraphUtility.IterateSegments(stream, 0, kSampleCount * kFrameIncrement, IsContinuationOfSegment).ToArray(); - Assert.AreEqual(kSampleCount, segs.Length); - for(int i = 0; i < segs.Length; i++) - { - Assert.AreEqual(segs[i].data, (i % 2 == 0) ? -99 : 99); - Assert.AreEqual(segs[i].frameStart, i * kFrameIncrement); - Assert.AreEqual(segs[i].frameEnd, (i+1) * kFrameIncrement); - } - } - - [Test] - public void SegmentBeforeStartFrame_IsIgnored() - { - EventDataSetStream stream = new EventDataSetStream(); - stream.AddSample(0, 99); - stream.AddSample(50, 0); - GraphUtility.Segment[] segs = GraphUtility.IterateSegments(stream, 100, 200, IsContinuationOfSegment).ToArray(); - Assert.AreEqual(1, segs.Length); - Assert.AreEqual(0, segs[0].data); - Assert.AreEqual(100, segs[0].frameStart); - Assert.AreEqual(200, segs[0].frameEnd); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Diagnostics/SegmentIteration.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Diagnostics/SegmentIteration.cs.meta deleted file mode 100644 index 4bd9f043..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Diagnostics/SegmentIteration.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e49dad816ceeeb94386b907d5f361a0d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/EditorPlatformMappingServiceTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/EditorPlatformMappingServiceTests.cs deleted file mode 100644 index 8734d5cb..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/EditorPlatformMappingServiceTests.cs +++ /dev/null @@ -1,25 +0,0 @@ -using NUnit.Framework; -using UnityEditor; -using UnityEngine.AddressableAssets; - -public class EditorPlatformMappingServiceTests -{ - [TestCase(BuildTarget.XboxOne, AddressablesPlatform.XboxOne)] - [TestCase(BuildTarget.Switch, AddressablesPlatform.Switch)] - [TestCase(BuildTarget.PS4, AddressablesPlatform.PS4)] - [TestCase(BuildTarget.iOS, AddressablesPlatform.iOS)] - [TestCase(BuildTarget.Android, AddressablesPlatform.Android)] - [TestCase(BuildTarget.WebGL, AddressablesPlatform.WebGL)] - [TestCase(BuildTarget.StandaloneWindows64, AddressablesPlatform.Windows)] - [TestCase(BuildTarget.StandaloneWindows, AddressablesPlatform.Windows)] - [TestCase(BuildTarget.StandaloneOSX, AddressablesPlatform.OSX)] - [TestCase(BuildTarget.StandaloneLinux64, AddressablesPlatform.Linux)] -#if !UNITY_2019_2_OR_NEWER - [TestCase(BuildTarget.StandaloneLinux, AddressablesPlatform.Linux)] - [TestCase(BuildTarget.StandaloneLinuxUniversal, AddressablesPlatform.Linux)] -#endif - public void EditorPlatformMappingService_EqualsDesiredAddressablesPlatform(BuildTarget platform, AddressablesPlatform desiredPlatform) - { - Assert.AreEqual(PlatformMappingService.GetAddressablesPlatformInternal(platform), desiredPlatform); - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/EditorPlatformMappingServiceTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/EditorPlatformMappingServiceTests.cs.meta deleted file mode 100644 index bc12eb3e..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/EditorPlatformMappingServiceTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 95d66b6da395d7142abdc96d603e7eb0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/GroupSchemaTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/GroupSchemaTests.cs deleted file mode 100644 index 89585e9b..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/GroupSchemaTests.cs +++ /dev/null @@ -1,128 +0,0 @@ -using System; -using NUnit.Framework; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Tests -{ - public class GroupSchemaTests : AddressableAssetTestBase - { - CustomTestSchema m_TestSchemaObject; - CustomTestSchemaSubClass m_TestSchemaObjectSubClass; - protected override bool PersistSettings { get { return true; } } - protected override void OnInit() - { - m_TestSchemaObject = ScriptableObject.CreateInstance(); - AssetDatabase.CreateAsset(m_TestSchemaObject, k_TestConfigFolder + "/testSchemaObject.asset"); - m_TestSchemaObjectSubClass = ScriptableObject.CreateInstance(); - AssetDatabase.CreateAsset(m_TestSchemaObjectSubClass, k_TestConfigFolder + "/testSchemaObjectSubClass.asset"); - } - - [Test] - public void CanAddSchemaWithSavedAsset() - { - var group = Settings.CreateGroup("TestGroup", false, false, false, null); - var newSchema = group.AddSchema(m_TestSchemaObject); - Assert.IsNotNull(newSchema); - Assert.AreNotEqual(newSchema, m_TestSchemaObject); - Assert.IsTrue(group.HasSchema(m_TestSchemaObject.GetType())); - Assert.IsTrue(group.RemoveSchema(m_TestSchemaObject.GetType())); - } - - [Test] - public void CanAddSchemaWithSavedAssetGeneric() - { - var group = Settings.CreateGroup("TestGroup", false, false, false, null); - var newSchema = group.AddSchema(m_TestSchemaObject); - Assert.IsNotNull(newSchema); - Assert.AreNotEqual(newSchema, m_TestSchemaObject); - Assert.IsTrue(group.HasSchema()); - Assert.IsTrue(group.RemoveSchema()); - } - - [Test] - public void CanAddSchemaWithNonSavedAsset() - { - var group = Settings.CreateGroup("TestGroup", false, false, false, null); - var templateSchema = ScriptableObject.CreateInstance(); - var newSchema = group.AddSchema(templateSchema); - Assert.IsNotNull(newSchema); - Assert.AreNotEqual(newSchema, templateSchema); - Assert.IsTrue(group.HasSchema(templateSchema.GetType())); - Assert.IsTrue(group.RemoveSchema(templateSchema.GetType())); - } - - [Test] - public void CanAddAndRemoveSchemaObjectByType() - { - var group = Settings.CreateGroup("TestGroup", false, false, false, null); - var s = group.AddSchema(typeof(CustomTestSchema)); - Assert.IsNotNull(s); - string guid; - long lfid; - Assert.IsTrue(AssetDatabase.TryGetGUIDAndLocalFileIdentifier(s, out guid, out lfid)); - var path = AssetDatabase.GUIDToAssetPath(guid); - FileAssert.Exists(path); - Assert.IsTrue(group.RemoveSchema(typeof(CustomTestSchema))); - FileAssert.DoesNotExist(path); - } - - [Test] - public void CanAddAndRemoveSchemaObjectByGenericType() - { - var group = Settings.CreateGroup("TestGroup", false, false, false, null); - var s = group.AddSchema(); - Assert.IsNotNull(s); - string guid; - long lfid; - Assert.IsTrue(AssetDatabase.TryGetGUIDAndLocalFileIdentifier(s, out guid, out lfid)); - var path = AssetDatabase.GUIDToAssetPath(guid); - FileAssert.Exists(path); - Assert.IsTrue(group.RemoveSchema()); - FileAssert.DoesNotExist(path); - } - - [Test] - public void CanCheckSchemaObjectByGenericType() - { - var group = Settings.CreateGroup("TestGroup", false, false, false, null); - Assert.IsNotNull(group.AddSchema()); - Assert.IsTrue(group.HasSchema()); - Assert.IsTrue(group.RemoveSchema()); - } - - [Test] - public void CanCheckSchemaObjectAsSubclass() - { - var group = Settings.CreateGroup("TestGroup", false, false, false, null); - Assert.IsNotNull(group.AddSchema()); - Assert.IsFalse(group.HasSchema()); - Assert.IsTrue(group.HasSchema()); - Assert.IsFalse(group.RemoveSchema()); - Assert.IsTrue(group.RemoveSchema()); - } - - [Test] - public void CanCheckSchemaObjectAsBaseclass() - { - var group = Settings.CreateGroup("TestGroup", false, false, false, null); - Assert.IsNotNull(group.AddSchema()); - Assert.IsTrue(group.HasSchema()); - Assert.IsFalse(group.HasSchema()); - Assert.IsTrue(group.RemoveSchema()); - Assert.IsFalse(group.RemoveSchema()); - } - - [Test] - public void CanNotAddDuplicateSchemaObjects() - { - var group = Settings.CreateGroup("TestGroup", false, false, false, null); - var added = group.AddSchema(); - Assert.IsNotNull(added); - Assert.AreEqual(added, group.AddSchema()); - Assert.IsNotNull(group.AddSchema()); - Assert.IsTrue(group.RemoveSchema()); - Assert.IsTrue(group.RemoveSchema()); - } - } - -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/GroupSchemaTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/GroupSchemaTests.cs.meta deleted file mode 100644 index dfe023b8..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/GroupSchemaTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6927363d65dcda940b12e68308e980bc -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices.meta deleted file mode 100644 index f48261ca..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 78ea1f78528ed4814b06b8621fd908eb -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/AbstractTestHostingService.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/AbstractTestHostingService.cs deleted file mode 100644 index e654e9ef..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/AbstractTestHostingService.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.AddressableAssets.HostingServices; -using UnityEditor.AddressableAssets.Settings; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Tests.HostingServices -{ - public abstract class AbstractTestHostingService : IHostingService - { - public string DescriptiveName { get; set; } - public int InstanceId { get; set; } - public List HostingServiceContentRoots { get; protected set; } - public Dictionary ProfileVariables { get; protected set; } - public bool IsHostingServiceRunning { get; protected set; } - - public ILogger Logger { get; set; } - - protected AbstractTestHostingService() - { - HostingServiceContentRoots = new List(); - ProfileVariables = new Dictionary(); - } - - public virtual void StartHostingService() - { - } - - public virtual void StopHostingService() - { - } - - public virtual void OnBeforeSerialize(KeyDataStore dataStore) - { - } - - public virtual void OnAfterDeserialize(KeyDataStore dataStore) - { - } - - public string EvaluateProfileString(string key) - { - return null; - } - - public virtual void OnGUI() - { - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/AbstractTestHostingService.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/AbstractTestHostingService.cs.meta deleted file mode 100644 index eaac380d..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/AbstractTestHostingService.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 322ae10a4b62a437c901e1f23093ac3a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/HostingServiceInterfaceTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/HostingServiceInterfaceTests.cs deleted file mode 100644 index 3cf54c4e..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/HostingServiceInterfaceTests.cs +++ /dev/null @@ -1,177 +0,0 @@ -using System; -using System.IO; -using NUnit.Framework; -using UnityEditor.AddressableAssets.HostingServices; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.AddressableAssets.Settings.GroupSchemas; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Tests.HostingServices -{ - [TestFixtureSource("HostingServices")] - public class HostingServiceInterfaceTests - { - protected const string k_TestConfigName = "AddressableAssetSettings.HostingServiceInterfaceTests"; - protected const string k_TestConfigFolder = "Assets/AddressableAssetsData_HostingServiceInterfaceTests"; - - // ReSharper disable once UnusedMember.Local - static IHostingService[] HostingServices - { - get - { - return new[] - { - new HttpHostingService() as IHostingService - }; - } - } - - readonly IHostingService m_Service; - - public HostingServiceInterfaceTests(IHostingService svc) - { - m_Service = svc; - } - - [OneTimeTearDown] - public void Cleanup() - { - if (Directory.Exists(k_TestConfigFolder)) - AssetDatabase.DeleteAsset(k_TestConfigFolder); - EditorBuildSettings.RemoveConfigObject(k_TestConfigName); - } - - IHostingService GetManagedService(out AddressableAssetSettings settings) - { - var m = new HostingServicesManager(); - settings = AddressableAssetSettings.Create(k_TestConfigFolder, k_TestConfigName, false, false); - settings.HostingServicesManager = m; - var group = settings.CreateGroup("testGroup", false, false, false, null); - group.AddSchema(); - settings.groups.Add(group); - m.Initialize(settings); - return m.AddHostingService(m_Service.GetType(), "test"); - } - - // HostingServiceContentRoots - - [Test] - public void HostingServiceContentRootsShould_ReturnListOfContentRoots() - { - AddressableAssetSettings s; - var svc = GetManagedService(out s); - Assert.IsNotEmpty(s.groups); - Assert.IsNotEmpty(svc.HostingServiceContentRoots); - var schema = s.groups[0].GetSchema(); - Assert.Contains(schema.HostingServicesContentRoot, svc.HostingServiceContentRoots); - } - - // ProfileVariables - - [Test] - public void ProfileVariablesShould_ReturnProfileVariableKeyValuePairs() - { - var vars = m_Service.ProfileVariables; - Assert.IsNotEmpty(vars); - } - - // IsHostingServiceRunning, StartHostingService, and StopHostingService - - [Test] - public void IsHostingServiceRunning_StartHostingService_StopHostingService() - { - AddressableAssetSettings s; - var svc = GetManagedService(out s); - Assert.IsFalse(svc.IsHostingServiceRunning); - svc.StartHostingService(); - Assert.IsTrue(svc.IsHostingServiceRunning); - svc.StopHostingService(); - Assert.IsFalse(svc.IsHostingServiceRunning); - } - - // OnBeforeSerialize - - [Test] - public void OnBeforeSerializeShould_PersistExpectedDataToKeyDataStore() - { - var data = new KeyDataStore(); - m_Service.DescriptiveName = "Testing 123"; - m_Service.InstanceId = 123; - m_Service.HostingServiceContentRoots.Clear(); - m_Service.HostingServiceContentRoots.AddRange(new[] {"/test123", "/test456"}); - m_Service.OnBeforeSerialize(data); - Assert.AreEqual("Testing 123", data.GetData("DescriptiveName", string.Empty)); - Assert.AreEqual(123, data.GetData("InstanceId", 0)); - Assert.AreEqual("/test123;/test456", data.GetData("ContentRoot", string.Empty)); - } - - // OnAfterDeserialize - - [Test] - public void OnAfterDeserializeShould_RestoreExpectedDataFromKeyDataStore() - { - var data = new KeyDataStore(); - data.SetData("DescriptiveName", "Testing 123"); - data.SetData("InstanceId", 123); - data.SetData("ContentRoot", "/test123;/test456"); - m_Service.OnAfterDeserialize(data); - Assert.AreEqual("Testing 123", m_Service.DescriptiveName); - Assert.AreEqual(123, m_Service.InstanceId); - Assert.Contains("/test123", m_Service.HostingServiceContentRoots); - Assert.Contains("/test456", m_Service.HostingServiceContentRoots); - } - - // EvaluateProfileString - - [Test] - public void EvaluateProfileStringShould_CorrectlyReplaceKeyValues() - { - var vars = m_Service.ProfileVariables; - vars.Add("foo", "bar"); - var val = m_Service.EvaluateProfileString("foo"); - Assert.AreEqual("bar", val); - } - - [Test] - public void EvaluateProfileStringShould_ReturnNullForNonMatchingKey() - { - var val = m_Service.EvaluateProfileString("foo2"); - Assert.IsNull(val); - } - - // RegisterLogger - - [Test] - public void LoggerShould_UseTheProvidedLogger() - { - var l = new Logger(Debug.unityLogger.logHandler); - m_Service.Logger = l; - Assert.AreEqual(l, m_Service.Logger); - } - - [Test] - public void RegisterLoggerShould_UseTheDebugUnityLoggerWhenParamIsNull() - { - m_Service.Logger = null; - Assert.AreEqual(Debug.unityLogger, m_Service.Logger); - } - - // DescriptiveName - - [Test] - public void DescriptiveNameShould_AllowGetAndSetOfDescriptiveName() - { - m_Service.DescriptiveName = "test"; - Assert.AreEqual("test", m_Service.DescriptiveName); - } - - // InstanceId - - [Test] - public void InstanceIdShould_AllowGetAndSetOfInstanceId() - { - m_Service.InstanceId = 999; - Assert.AreEqual(999, m_Service.InstanceId); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/HostingServiceInterfaceTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/HostingServiceInterfaceTests.cs.meta deleted file mode 100644 index e25426db..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/HostingServiceInterfaceTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b599dbeafb09d4db69110c404ab9552f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/HostingServicesManagerTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/HostingServicesManagerTests.cs deleted file mode 100644 index 9938a645..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/HostingServicesManagerTests.cs +++ /dev/null @@ -1,500 +0,0 @@ -using System; -using System.IO; -using System.Linq; -using System.Threading; -using NUnit.Framework; -using UnityEditor.AddressableAssets.HostingServices; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.AddressableAssets.Settings.GroupSchemas; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Tests.HostingServices -{ - public class HostingServicesManagerTests - { - const string k_TestConfigName = "AddressableAssetSettings.HostingServicesManagerTests"; - const string k_TestConfigFolder = "Assets/AddressableAssetsData_HostingServicesManagerTests"; - - HostingServicesManager m_Manager; - AddressableAssetSettings m_Settings; - - [SetUp] - public void Setup() - { - m_Manager = new HostingServicesManager(); - m_Settings = AddressableAssetSettings.Create(k_TestConfigFolder, k_TestConfigName, false, false); - m_Settings.HostingServicesManager = m_Manager; - var group = m_Settings.CreateGroup("testGroup", false, false, false, null); - group.AddSchema(); - m_Settings.groups.Add(group); - } - - [TearDown] - public void TearDown() - { - var services = m_Manager.HostingServices.ToArray(); - foreach (var svc in services) - { - svc.StopHostingService(); - m_Manager.RemoveHostingService(svc); - } - if (Directory.Exists(k_TestConfigFolder)) - AssetDatabase.DeleteAsset(k_TestConfigFolder); - EditorBuildSettings.RemoveConfigObject(k_TestConfigName); - } - - // GlobalProfileVariables - - [Test] - public void GlobalProfileVariablesShould_ReturnDictionaryOfKeyValuePairs() - { - var vars = m_Manager.GlobalProfileVariables; - Assert.NotNull(vars); - } - - [Test] - public void GlobalProfileVariablesShould_ContainPrivateIpAddressKey() - { - m_Manager.Initialize(m_Settings); - var vars = m_Manager.GlobalProfileVariables; - Assert.NotNull(vars); - const string key = HostingServicesManager.KPrivateIpAddressKey; - Assert.Contains(key, vars.Keys); - Assert.NotNull(vars[key]); - } - - // IsInitialized - - [Test] - public void IsInitializedShould_BecomeTrueAfterInitializeCall() - { - Assert.IsFalse(m_Manager.IsInitialized); - m_Manager.Initialize(m_Settings); - Assert.IsTrue(m_Manager.IsInitialized); - } - - // HostingServices - - [Test] - public void HostingServicesShould_ReturnListOfManagedServices() - { - m_Manager.Initialize(m_Settings); - Assert.NotNull(m_Manager.HostingServices); - Assert.IsEmpty(m_Manager.HostingServices); - var svc = m_Manager.AddHostingService(typeof(TestHostingService), "test"); - Assert.IsTrue(m_Manager.HostingServices.Contains(svc)); - } - - // RegisteredServiceTypes - - [Test] - public void RegisteredServiceTypesShould_AlwaysContainBuiltinServiceTypes() - { - Assert.NotNull(m_Manager.RegisteredServiceTypes); - Assert.Contains(typeof(HttpHostingService), m_Manager.RegisteredServiceTypes); - } - - [Test] - public void RegisteredServiceTypesShould_NotContainDuplicates() - { - m_Manager.Initialize(m_Settings); - m_Manager.AddHostingService(typeof(TestHostingService), "test1"); - m_Manager.AddHostingService(typeof(TestHostingService), "test2"); - Assert.IsTrue(m_Manager.RegisteredServiceTypes.Length == 1); - } - - // NextInstanceId - - [Test] - public void NextInstanceIdShould_IncrementAfterServiceIsAdded() - { - m_Manager.Initialize(m_Settings); - Assert.IsTrue(m_Manager.NextInstanceId == 0); - m_Manager.AddHostingService(typeof(TestHostingService), "test1"); - Assert.IsTrue(m_Manager.NextInstanceId == 1); - } - - // Initialize - - [Test] - public void InitializeShould_AssignTheGivenSettingsObject() - { - Assert.Null(m_Manager.Settings); - m_Manager.Initialize(m_Settings); - Assert.IsTrue(m_Manager.IsInitialized); - Assert.NotNull(m_Manager.Settings); - Assert.AreSame(m_Manager.Settings, m_Settings); - } - - [Test] - public void InitializeShould_SetGlobalProfileVariables() - { - Assert.IsTrue(m_Manager.GlobalProfileVariables.Count == 0); - m_Manager.Initialize(m_Settings); - Assert.IsTrue(m_Manager.IsInitialized); - Assert.IsTrue(m_Manager.GlobalProfileVariables.Count > 0); - } - - [Test] - public void InitializeShould_OnlyInitializeOnce() - { - var so = ScriptableObject.CreateInstance(); - m_Manager.Initialize(m_Settings); - Assert.IsTrue(m_Manager.IsInitialized); - m_Manager.Initialize(so); - Assert.AreSame(m_Manager.Settings, m_Settings); - Assert.AreNotSame(m_Manager.Settings, so); - } - - // StopAllService - - [Test] - public void StopAllServicesShould_StopAllRunningServices() - { - m_Manager.Initialize(m_Settings); - var svc = m_Manager.AddHostingService(typeof(TestHostingService), "test"); - svc.HostingServiceContentRoots.Add("/"); - Assert.IsFalse(svc.IsHostingServiceRunning); - svc.StartHostingService(); - Assert.IsTrue(svc.IsHostingServiceRunning); - m_Manager.StopAllServices(); - Assert.IsFalse(svc.IsHostingServiceRunning); - } - - // StartAllServices - - [Test] - public void StartAllServicesShould_StartAllStoppedServices() - { - m_Manager.Initialize(m_Settings); - var svc = m_Manager.AddHostingService(typeof(TestHostingService), "test"); - svc.HostingServiceContentRoots.Add("/"); - Assert.IsFalse(svc.IsHostingServiceRunning); - m_Manager.StartAllServices(); - Assert.IsTrue(svc.IsHostingServiceRunning); - } - - // AddHostingService - - [Test] - public void AddHostingServiceShould_ThrowIfTypeDoesNotImplementInterface() - { - Assert.Throws(() => { m_Manager.AddHostingService(typeof(object), "test"); }); - } - - [Test] - public void AddHostingServiceShould_ThrowIfTypeIsAbstract() - { - Assert.Throws(() => - { - m_Manager.AddHostingService(typeof(AbstractTestHostingService), "test"); - }); - } - - [Test] - public void AddHostingServiceShould_AddTypeToRegisteredServiceTypes() - { - m_Manager.Initialize(m_Settings); - Assert.NotNull(m_Manager.RegisteredServiceTypes); - m_Manager.AddHostingService(typeof(TestHostingService), "test"); - Assert.Contains(typeof(TestHostingService), m_Manager.RegisteredServiceTypes); - } - - [Test] - public void AddHostingServiceShould_RegisterLoggerForService() - { - m_Manager.Initialize(m_Settings); - m_Manager.AddHostingService(typeof(TestHostingService), "test"); - } - - [Test] - public void AddHostingServiceShould_SetDescriptiveNameOnService() - { - m_Manager.Initialize(m_Settings); - var svc = m_Manager.AddHostingService(typeof(TestHostingService), "test"); - Assert.AreEqual(svc.DescriptiveName, "test"); - } - - [Test] - public void AddHostingServiceShould_SetNextInstanceIdOnService() - { - m_Manager.Initialize(m_Settings); - m_Manager.AddHostingService(typeof(TestHostingService), "test"); - m_Manager.AddHostingService(typeof(TestHostingService), "test"); - var id = m_Manager.NextInstanceId; - var svc = m_Manager.AddHostingService(typeof(TestHostingService), "test"); - Assert.AreEqual(id, svc.InstanceId); - } - - [Test] - public void AddHostingServiceShould_SetContentRootsOnService() - { - m_Manager.Initialize(m_Settings); - var svc = m_Manager.AddHostingService(typeof(TestHostingService), "test"); - Assert.IsNotEmpty(svc.HostingServiceContentRoots); - } - - [Test] - public void AddHostingServiceShould_PostModificationEventToSettings() - { - var wait = new ManualResetEvent(false); - - m_Settings.OnModification = null; - m_Settings.OnModification += (s, evt, obj) => - { - if (evt == AddressableAssetSettings.ModificationEvent.HostingServicesManagerModified) - wait.Set(); - }; - - m_Manager.Initialize(m_Settings); - m_Manager.AddHostingService(typeof(TestHostingService), "test"); - Assert.IsTrue(wait.WaitOne(100)); - } - - [Test] - public void AddHostingServiceShould_ReturnServiceInstance() - { - m_Manager.Initialize(m_Settings); - var svc = m_Manager.AddHostingService(typeof(TestHostingService), "test"); - Assert.NotNull(svc); - } - - [Test] - public void AddHostingServiceShould_RegisterStringEvalFuncs() - { - m_Manager.Initialize(m_Settings); - var svc = m_Manager.AddHostingService(typeof(TestHostingService), "test"); - Assert.IsTrue(ProfileStringEvalDelegateIsRegistered(m_Settings, svc)); - } - - // RemoveHostingService - - [Test] - public void RemoveHostingServiceShould_StopRunningService() - { - m_Manager.Initialize(m_Settings); - var svc = m_Manager.AddHostingService(typeof(TestHostingService), "test"); - Assert.IsFalse(svc.IsHostingServiceRunning); - svc.StartHostingService(); - Assert.IsTrue(svc.IsHostingServiceRunning); - m_Manager.RemoveHostingService(svc); - Assert.IsFalse(svc.IsHostingServiceRunning); - } - - [Test] - public void RemoveHostingServiceShould_UnregisterStringEvalFuncs() - { - m_Manager.Initialize(m_Settings); - var svc = m_Manager.AddHostingService(typeof(TestHostingService), "test"); - Assert.IsTrue(ProfileStringEvalDelegateIsRegistered(m_Settings, svc)); - m_Manager.RemoveHostingService(svc); - Assert.IsFalse(ProfileStringEvalDelegateIsRegistered(m_Settings, svc)); - } - - [Test] - public void RemoveHostingServiceShould_PostModificationEventToSettings() - { - var wait = new ManualResetEvent(false); - - m_Settings.OnModification = null; - m_Settings.OnModification += (s, evt, obj) => - { - if (evt == AddressableAssetSettings.ModificationEvent.HostingServicesManagerModified) - wait.Set(); - }; - - m_Manager.Initialize(m_Settings); - var svc = m_Manager.AddHostingService(typeof(TestHostingService), "test"); - m_Manager.RemoveHostingService(svc); - Assert.IsTrue(wait.WaitOne(100)); - } - - // OnEnable - - [Test] - public void OnEnableShould_RegisterForSettingsModificationEvents() - { - var len = m_Settings.OnModification.GetInvocationList().Length; - m_Manager.Initialize(m_Settings); - m_Manager.OnEnable(); - Assert.Greater(m_Settings.OnModification.GetInvocationList().Length, len); - } - - [Test] - public void OnEnableShould_RegisterProfileStringEvalFuncsForServices() - { - m_Manager.Initialize(m_Settings); - var svc = m_Manager.AddHostingService(typeof(TestHostingService), "test"); - m_Settings.profileSettings.onProfileStringEvaluation = null; - m_Manager.OnEnable(); - Assert.IsTrue(ProfileStringEvalDelegateIsRegistered(m_Settings, svc)); - } - - [Test] - public void OnEnableShould_RegisterLoggerWithServices() - { - m_Manager.Initialize(m_Settings); - var svc = m_Manager.AddHostingService(typeof(TestHostingService), "test") as TestHostingService; - Assert.NotNull(svc); - svc.Logger = null; - Assert.Null(svc.Logger); - m_Manager.OnEnable(); - Assert.NotNull(svc.Logger); - } - - [Test] - public void OnEnableShould_RegisterProfileStringEvalFuncForManager() - { - m_Manager.Initialize(m_Settings); - m_Manager.OnEnable(); - Assert.IsTrue(ProfileStringEvalDelegateIsRegistered(m_Settings, m_Manager)); - } - - [Test] - public void OnEnableShould_RefreshGlobalProfileVariables() - { - m_Manager.Initialize(m_Settings); - m_Manager.GlobalProfileVariables.Clear(); - m_Manager.OnEnable(); - Assert.GreaterOrEqual(m_Manager.GlobalProfileVariables.Count, 1); - } - - // OnDisable - - [Test] - public void OnDisableShould_DeRegisterForSettingsModificationEvents() - { - var len = m_Settings.OnModification.GetInvocationList().Length; - m_Manager.Initialize(m_Settings); - m_Manager.OnEnable(); - m_Manager.OnEnable(); - m_Manager.OnEnable(); - Assert.Greater(m_Settings.OnModification.GetInvocationList().Length, len); - m_Manager.OnDisable(); - Assert.AreEqual(len, m_Settings.OnModification.GetInvocationList().Length); - } - - [Test] - public void OnEnableShould_UnregisterProfileStringEvalFuncForManager() - { - m_Manager.Initialize(m_Settings); - m_Manager.OnEnable(); - Assert.IsTrue(ProfileStringEvalDelegateIsRegistered(m_Settings, m_Manager)); - m_Manager.OnDisable(); - Assert.IsFalse(ProfileStringEvalDelegateIsRegistered(m_Settings, m_Manager)); - } - - [Test] - public void OnDisableShould_RegisterNullLoggerForServices() - { - m_Manager.Initialize(m_Settings); - var svc = m_Manager.AddHostingService(typeof(TestHostingService), "test") as TestHostingService; - Assert.IsNotNull(svc); - m_Manager.Initialize(m_Settings); - m_Manager.OnEnable(); - Assert.IsNotNull(svc.Logger); - m_Manager.OnDisable(); - Assert.IsNull(svc.Logger); - } - - [Test] - public void OnDisableShould_DeRegisterProfileStringEvalFuncsForServices() - { - m_Manager.Initialize(m_Settings); - var svc = m_Manager.AddHostingService(typeof(TestHostingService), "test") as TestHostingService; - Assert.IsNotNull(svc); - m_Manager.Initialize(m_Settings); - m_Manager.OnEnable(); - Assert.IsTrue(ProfileStringEvalDelegateIsRegistered(m_Settings, svc)); - m_Manager.OnDisable(); - Assert.IsFalse(ProfileStringEvalDelegateIsRegistered(m_Settings, svc)); - } - - // RegisterLogger - - [Test] - public void LoggerShould_SetLoggerForManagerAndManagedServices() - { - m_Manager.Initialize(m_Settings); - var svc = m_Manager.AddHostingService(typeof(TestHostingService), "test") as TestHostingService; - Assert.IsNotNull(svc); - m_Manager.Initialize(m_Settings); - var logger = new Logger(Debug.unityLogger.logHandler); - Assert.AreNotEqual(logger, svc.Logger); - Assert.AreNotEqual(logger, m_Manager.Logger); - m_Manager.Logger = logger; - Assert.AreEqual(logger, svc.Logger); - Assert.AreEqual(logger, m_Manager.Logger); - } - - [Test] - public void LoggerShould_SetDebugUnityLoggerIfNull() - { - m_Manager.Initialize(m_Settings); - var svc = m_Manager.AddHostingService(typeof(TestHostingService), "test") as TestHostingService; - Assert.IsNotNull(svc); - m_Manager.Initialize(m_Settings); - var logger = new Logger(Debug.unityLogger.logHandler); - m_Manager.Logger = logger; - Assert.AreNotEqual(Debug.unityLogger, svc.Logger); - Assert.AreNotEqual(Debug.unityLogger, m_Manager.Logger); - m_Manager.Logger = null; - Assert.AreEqual(Debug.unityLogger, svc.Logger); - Assert.AreEqual(Debug.unityLogger, m_Manager.Logger); - } - - // RefreshGLobalProfileVariables - - [Test] - public void RefreshGlobalProfileVariablesShould_AddOrUpdatePrivateIpAddressVar() - { - m_Manager.GlobalProfileVariables.Clear(); - Assert.IsEmpty(m_Manager.GlobalProfileVariables); - m_Manager.RefreshGlobalProfileVariables(); - Assert.IsNotEmpty(m_Manager.GlobalProfileVariables); - } - - [Test] - public void RefreshGlobalProfileVariablesShould_RemoveUnknownVars() - { - m_Manager.GlobalProfileVariables.Add("test", "test"); - Assert.IsTrue(m_Manager.GlobalProfileVariables.ContainsKey("test")); - m_Manager.RefreshGlobalProfileVariables(); - Assert.IsFalse(m_Manager.GlobalProfileVariables.ContainsKey("test")); - } - - // BatchMode - - [Test] - public void BatchModeShould_InitializeManagerWithDefaultSettings() - { - Assert.IsFalse(m_Manager.IsInitialized); - HostingServicesManager.BatchMode(m_Settings); - Assert.IsTrue(m_Manager.IsInitialized); - } - - [Test] - public void BatchModeShould_StartAllServices() - { - m_Manager.Initialize(m_Settings); - var svc = m_Manager.AddHostingService(typeof(TestHostingService), "test"); - Assert.IsFalse(svc.IsHostingServiceRunning); - HostingServicesManager.BatchMode(m_Settings); - Assert.IsTrue(svc.IsHostingServiceRunning); - } - - static bool ProfileStringEvalDelegateIsRegistered(AddressableAssetSettings s, IHostingService svc) - { - var del = new AddressableAssetProfileSettings.ProfileStringEvaluationDelegate(svc.EvaluateProfileString); - var list = s.profileSettings.onProfileStringEvaluation.GetInvocationList(); - return list.Contains(del); - } - - static bool ProfileStringEvalDelegateIsRegistered(AddressableAssetSettings s, HostingServicesManager m) - { - var del = new AddressableAssetProfileSettings.ProfileStringEvaluationDelegate(m.EvaluateGlobalProfileVariableKey); - var list = s.profileSettings.onProfileStringEvaluation.GetInvocationList(); - return list.Contains(del); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/HostingServicesManagerTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/HostingServicesManagerTests.cs.meta deleted file mode 100644 index 3e4675d0..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/HostingServicesManagerTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f8b45d496263c4f4da1cdd5c22c51cc8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/HttpHostingServiceTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/HttpHostingServiceTests.cs deleted file mode 100644 index 95c9dcaf..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/HttpHostingServiceTests.cs +++ /dev/null @@ -1,183 +0,0 @@ -using System; -using System.IO; -using System.Net; -using NUnit.Framework; -using UnityEditor.AddressableAssets.HostingServices; -using UnityEditor.AddressableAssets.Settings; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Tests.HostingServices -{ - using Random = System.Random; - - public class HttpHostingServiceTests - { - class MyWebClient : WebClient - { - protected override WebRequest GetWebRequest(Uri uri) - { - var w = base.GetWebRequest(uri); - Debug.Assert(w != null); - w.Timeout = 2000; - return w; - } - } - - HttpHostingService m_Service; - string m_ContentRoot; - readonly WebClient m_Client; - - public HttpHostingServiceTests() - { - m_Client = new MyWebClient(); - } - - static byte[] GetRandomBytes(int size) - { - var rand = new Random(); - var buf = new byte[size]; - rand.NextBytes(buf); - return buf; - } - - [OneTimeSetUp] - public void SetUp() - { - m_Service = new HttpHostingService(); - var dirName = Path.GetRandomFileName(); - m_ContentRoot = Path.Combine(Path.GetTempPath(), dirName); - Assert.IsNotEmpty(m_ContentRoot); - Directory.CreateDirectory(m_ContentRoot); - m_Service.HostingServiceContentRoots.Add(m_ContentRoot); - } - - [OneTimeTearDown] - public void TearDown() - { - m_Service.StopHostingService(); - - if (!string.IsNullOrEmpty(m_ContentRoot) && Directory.Exists(m_ContentRoot)) - Directory.Delete(m_ContentRoot, true); - } - - [Test] - public void ShouldServeRequestedFiles() - { - var fileNames = new[] - { - Path.GetRandomFileName(), - Path.Combine("subdir", Path.GetRandomFileName()), - Path.Combine("subdir1", Path.Combine("subdir2", Path.GetRandomFileName())) - }; - - foreach (var fileName in fileNames) - { - var filePath = Path.Combine(m_ContentRoot, fileName); - var bytes = GetRandomBytes(1024); - Directory.CreateDirectory(Path.GetDirectoryName(filePath)); - File.WriteAllBytes(filePath, bytes); - m_Service.StartHostingService(); - Assert.IsTrue(m_Service.IsHostingServiceRunning); - var url = string.Format("http://127.0.0.1:{0}/{1}", m_Service.HostingServicePort, fileName); - try - { - var data = m_Client.DownloadData(url); - Assert.AreEqual(data.Length, bytes.Length); - for (var i = 0; i < data.Length; i++) - if (bytes[i] != data[i]) - Assert.Fail("Data does not match {0} != {1}", bytes[i], data[i]); - } - catch (Exception e) - { - Assert.Fail(e.Message); - } - } - } - - [Test] - public void ShouldRespondWithStatus404IfFileDoesNotExist() - { - m_Service.StartHostingService(); - Assert.IsTrue(m_Service.IsHostingServiceRunning); - var url = string.Format("http://127.0.0.1:{0}/{1}", m_Service.HostingServicePort, "foo"); - try - { - m_Client.DownloadData(url); - } - catch (WebException e) - { - var response = (HttpWebResponse) e.Response; - Assert.AreEqual(response.StatusCode, HttpStatusCode.NotFound); - } - catch (Exception) - { - Assert.Fail(); - } - } - - // StartHostingService - - [Test] - public void StartHostingServiceShould_AssignPortIfUnassigned() - { - m_Service.StartHostingService(); - Assert.Greater(m_Service.HostingServicePort, 0); - } - - // OnBeforeSerialize - - [Test] - public void OnBeforeSerializeShould_PersistExpectedDataToKeyDataStore() - { - m_Service.StartHostingService(); - var port = m_Service.HostingServicePort; - var data = new KeyDataStore(); - m_Service.OnBeforeSerialize(data); - Assert.AreEqual(port, data.GetData("HostingServicePort", 0)); - } - - // OnAfterDeserialize - - [Test] - public void OnAfterDeserializeShould_RestoreExpectedDataFromKeyDataStore() - { - var data = new KeyDataStore(); - data.SetData("HostingServicePort", 1234); - m_Service.OnAfterDeserialize(data); - Assert.AreEqual(1234, m_Service.HostingServicePort); - } - - // ResetListenPort - - [Test] - public void ResetListenPortShould_AssignTheGivenPort() - { - m_Service.ResetListenPort(1234); - Assert.AreEqual(1234, m_Service.HostingServicePort); - } - - [Test] - public void ResetListenPortShould_AssignRandomPortIfZero() - { - m_Service.ResetListenPort(); - m_Service.StartHostingService(); - Assert.Greater(m_Service.HostingServicePort, 0); - } - - [Test] - public void ResetListenPortShouldNot_StartServiceIfItIsNotRunning() - { - m_Service.StopHostingService(); - m_Service.ResetListenPort(); - Assert.IsFalse(m_Service.IsHostingServiceRunning); - } - - [Test] - public void ResetListenPortShould_RestartServiceIfRunning() - { - m_Service.StartHostingService(); - m_Service.ResetListenPort(); - Assert.IsTrue(m_Service.IsHostingServiceRunning); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/HttpHostingServiceTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/HttpHostingServiceTests.cs.meta deleted file mode 100644 index 2d24d649..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/HttpHostingServiceTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c03bc07c7a3d844849931ab6ebeb4adf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/TestHostingService.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/TestHostingService.cs deleted file mode 100644 index eb2c23db..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/TestHostingService.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; - -namespace UnityEditor.AddressableAssets.Tests.HostingServices -{ - class TestHostingService : AbstractTestHostingService - { - public TestHostingService() - { - HostingServiceContentRoots = new List(); - ProfileVariables = new Dictionary(); - } - - public override void StartHostingService() - { - IsHostingServiceRunning = true; - } - - public override void StopHostingService() - { - IsHostingServiceRunning = false; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/TestHostingService.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/TestHostingService.cs.meta deleted file mode 100644 index 9bdf3098..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/HostingServices/TestHostingService.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4adbd11117ba14195be497c6ee4bbe8f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/KeyDataStoreTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/KeyDataStoreTests.cs deleted file mode 100644 index 2ab406a0..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/KeyDataStoreTests.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using System.Collections.Generic; -using NUnit.Framework; -using UnityEditor.AddressableAssets.Settings; - -namespace UnityEditor.AddressableAssets.Tests -{ - public class KeyDataStoreTests - { - - [Serializable] - class CustomTestClass1 - { - public string name; - public int intValue; - public float floatValue; - } - - [Serializable] - class CustomTestClass2 - { - public string name; - public int intValue; - public float floatValue; - public CustomTestClass1 objectValue; - public List listValue; - } - - public void Serialize(T val) - { - var store = new KeyDataStore(); - store.SetData("key", val); - store.OnBeforeSerialize(); - store.OnAfterDeserialize(); - var v = store.GetData("key", default(T)); - Assert.AreEqual(val, v); - } - - enum TestEnumX - { - EnumValue1, - EnumValue2 - } - - [Test] - public void SerializePodType() - { - Serialize(5); - Serialize("test string"); - Serialize(5.2324f); - Serialize(5.3); - Serialize((byte)4); - Serialize((uint)4); - Serialize(2345235L); - Serialize(true); - Serialize(TestEnumX.EnumValue1); - Serialize(TestEnumX.EnumValue2); - } - - [Test] - public void SerializeComplexType() - { - var store = new KeyDataStore(); - var obj = new CustomTestClass2 { floatValue = 3.14f, intValue = 7, name = "test object", objectValue = new CustomTestClass1 { name = "sub object", intValue = 14, floatValue = .99999f } }; - obj.listValue = new List { new CustomTestClass1 { name = "list item 1", intValue = 33, floatValue = .234534f } }; - store.SetData("obj", obj); - store.OnBeforeSerialize(); - store.OnAfterDeserialize(); - var v = store.GetData("obj", null); - Assert.AreEqual(obj.name, v.name); - Assert.AreEqual(obj.intValue, v.intValue); - Assert.AreEqual(obj.floatValue, v.floatValue); - Assert.AreEqual(v.objectValue.name, obj.objectValue.name); - Assert.AreEqual(v.objectValue.intValue, obj.objectValue.intValue); - Assert.AreEqual(v.objectValue.floatValue, obj.objectValue.floatValue); - Assert.AreEqual(v.listValue[0].name, obj.listValue[0].name); - Assert.AreEqual(v.listValue[0].intValue, obj.listValue[0].intValue); - Assert.AreEqual(v.listValue[0].floatValue, obj.listValue[0].floatValue); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/KeyDataStoreTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/KeyDataStoreTests.cs.meta deleted file mode 100644 index b8ef79ef..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/KeyDataStoreTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6b6231f2625ddce4e99b07635ce1d101 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/PlatformSwitchingTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/PlatformSwitchingTests.cs deleted file mode 100644 index 62a46145..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/PlatformSwitchingTests.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.IO; -using NUnit.Framework; -using UnityEditor; -using UnityEditor.AddressableAssets.Build; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.AddressableAssets.Tests; -using UnityEditor.Build.Pipeline; -using UnityEngine; -using UnityEngine.AddressableAssets; -using UnityEngine.TestTools; - -public class PlatformSwitchingTests : AddressableAssetTestBase -{ - [TestCase(BuildTarget.Switch)] - [TestCase(BuildTarget.PS4)] - public void WhenBuildingForPlatform_BuildFilesAreGenerated(BuildTarget target) - { - if (!BuildPipeline.IsBuildTargetSupported(BuildPipeline.GetBuildTargetGroup(target), target)) - Assert.Ignore(); - else - { - Init(); - - string buildPath = "Assets/WhenBuildingForPlatform_BuildFilesAreGenerated"; - string savedBuildPath = Settings.buildSettings.bundleBuildPath; - - Settings.CreateOrMoveEntry(m_AssetGUID, Settings.DefaultGroup, false, false); - Settings.buildSettings.bundleBuildPath = buildPath; - - BuildTarget backupTarget = EditorUserBuildSettings.activeBuildTarget; - BuildTargetGroup backupTargetGroup = BuildPipeline.GetBuildTargetGroup(backupTarget); - EditorUserBuildSettings.SwitchActiveBuildTarget(BuildPipeline.GetBuildTargetGroup(target), target); - - AddressableAssetBuildResult result = null; - BuildScript.buildCompleted += r => result = r; - - Assert.DoesNotThrow(() => { Settings.BuildPlayerContentImpl(); }); - Assert.IsTrue(string.IsNullOrEmpty(result.Error)); - Assert.IsTrue(Directory.Exists(Settings.buildSettings.bundleBuildPath)); - Assert.IsTrue(Directory.GetFiles(buildPath).Length > 0); - - //Cleanup - AssetDatabase.DeleteAsset(buildPath); - Settings.buildSettings.bundleBuildPath = savedBuildPath; - EditorUserBuildSettings.SwitchActiveBuildTarget(backupTargetGroup, backupTarget); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/PlatformSwitchingTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/PlatformSwitchingTests.cs.meta deleted file mode 100644 index bc646196..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/PlatformSwitchingTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 492ebfb05b7e20241ac97cead451673d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ProfileSettingsTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ProfileSettingsTests.cs deleted file mode 100644 index 05cb7f9b..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ProfileSettingsTests.cs +++ /dev/null @@ -1,193 +0,0 @@ -using System; -using NUnit.Framework; -using UnityEditor.AddressableAssets.Settings; - -namespace UnityEditor.AddressableAssets.Tests -{ - public class ProfileSettingsTests : AddressableAssetTestBase - { - [Test] - public void AddRemoveProfile() - { - //Arrange - Assert.IsNotNull(Settings.profileSettings); - Settings.activeProfileId = null; - var mainId = Settings.profileSettings.Reset(); - - //Act - var secondId = Settings.profileSettings.AddProfile("TestProfile", mainId); - - //Assert - bool foundIt = false; - foreach (var prof in Settings.profileSettings.profiles) - { - if (prof.profileName == "TestProfile") - foundIt = true; - } - Assert.IsTrue(foundIt); - Assert.IsNotEmpty(secondId); - - //Act again - Settings.profileSettings.RemoveProfile(secondId); - - //Assert again - foundIt = false; - foreach (var prof in Settings.profileSettings.profiles) - { - if (prof.profileName == "TestProfile") - foundIt = true; - } - Assert.IsFalse(foundIt); - } - - [Test] - public void CreateValuePropogtesValue() - { - //Arrange - Assert.IsNotNull(Settings.profileSettings); - Settings.activeProfileId = null; - var mainId = Settings.profileSettings.Reset(); - var secondId = Settings.profileSettings.AddProfile("TestProfile", mainId); - - //Act - string path = "/Assets/Important"; - Settings.profileSettings.CreateValue("SomePath", path); - - //Assert - Assert.AreEqual(path, Settings.profileSettings.GetValueByName(mainId, "SomePath")); - Assert.AreEqual(path, Settings.profileSettings.GetValueByName(secondId, "SomePath")); - } - [Test] - public void SetValueOnlySetsDesiredProfile() - { - //Arrange - Assert.IsNotNull(Settings.profileSettings); - Settings.activeProfileId = null; - var mainId = Settings.profileSettings.Reset(); - string originalPath = "/Assets/Important"; - Settings.profileSettings.CreateValue("SomePath", originalPath); - var secondId = Settings.profileSettings.AddProfile("TestProfile", mainId); - - //Act - string newPath = "/Assets/LessImportant"; - Settings.profileSettings.SetValue(secondId, "SomePath", newPath); - - //Assert - Assert.AreEqual(originalPath, Settings.profileSettings.GetValueByName(mainId, "SomePath")); - Assert.AreEqual(newPath, Settings.profileSettings.GetValueByName(secondId, "SomePath")); - } - [Test] - public void CanGetValueById() - { - //Arrange - Assert.IsNotNull(Settings.profileSettings); - Settings.activeProfileId = null; - var mainId = Settings.profileSettings.Reset(); - string originalPath = "/Assets/Important"; - Settings.profileSettings.CreateValue("SomePath", originalPath); - - //Act - string varId = null; - foreach (var variable in Settings.profileSettings.profileEntryNames) - { - if (variable.ProfileName == "SomePath") - { - varId = variable.Id; - break; - } - } - - //Assert - Assert.AreEqual(originalPath, Settings.profileSettings.GetValueById(mainId, varId)); - } - [Test] - public void EvaluatingUnknownIdReturnsIdAsResult() - { - //Arrange - Assert.IsNotNull(Settings.profileSettings); - Settings.activeProfileId = null; - Settings.profileSettings.Reset(); - - //Act - string badIdName = "BadIdName"; - - - //Assert - Assert.AreEqual(badIdName, AddressableAssetProfileSettings.ProfileIdData.Evaluate(Settings.profileSettings, Settings.activeProfileId, badIdName)); - - } - [Test] - public void MissingVariablesArePassThrough() - { - //Arrange - Assert.IsNotNull(Settings.profileSettings); - Settings.activeProfileId = null; - - //Act - Settings.profileSettings.Reset(); - - //Assert - Assert.AreEqual("VariableNotThere", Settings.profileSettings.GetValueById("invalid key", "VariableNotThere")); - } - [Test] - public void CanRenameEntry() - { - //Arrange - Assert.IsNotNull(Settings.profileSettings); - Settings.activeProfileId = null; - Settings.profileSettings.Reset(); - string entryName = "SomeName"; - string newName = "NewerName"; - string originalPath = "/Assets/Important"; - Settings.profileSettings.CreateValue(entryName, originalPath); - - AddressableAssetProfileSettings.ProfileIdData currEntry = null; - foreach(var entry in Settings.profileSettings.profileEntryNames) - { - if(entry.ProfileName == entryName) - { - currEntry = entry; - break; - } - } - - //Act - Assert.NotNull(currEntry); - currEntry.SetName(newName, Settings.profileSettings); - - //Assert - Assert.AreEqual(currEntry.ProfileName, newName); - } - [Test] - public void CannotRenameEntryToDuplicateName() - { - //Arrange - Assert.IsNotNull(Settings.profileSettings); - Settings.activeProfileId = null; - Settings.profileSettings.Reset(); - string entryName = "SomeName"; - string newName = "NewerName"; - string originalPath = "/Assets/Important"; - Settings.profileSettings.CreateValue(entryName, originalPath); - Settings.profileSettings.CreateValue(newName, originalPath); - - AddressableAssetProfileSettings.ProfileIdData currEntry = null; - foreach (var entry in Settings.profileSettings.profileEntryNames) - { - if (entry.ProfileName == entryName) - { - currEntry = entry; - break; - } - } - - //Act - Assert.NotNull(currEntry); - currEntry.SetName(newName, Settings.profileSettings); - - //Assert - Assert.AreNotEqual(currEntry.ProfileName, newName); - } - - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ProfileSettingsTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ProfileSettingsTests.cs.meta deleted file mode 100644 index 3e731a6d..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ProfileSettingsTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 722c9cb137e6ef0458798b9a9e0d1204 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ProfileValueReferenceTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ProfileValueReferenceTests.cs deleted file mode 100644 index d38031ee..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ProfileValueReferenceTests.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using NUnit.Framework; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.AddressableAssets.Settings.GroupSchemas; - -namespace UnityEditor.AddressableAssets.Tests -{ - public class ProfileValueReferenceTests : AddressableAssetTestBase - { - [Test] - public void IsValueValid() - { - var group = Settings.FindGroup(AddressableAssetSettings.DefaultLocalGroupName); - Assert.IsNotNull(group); - var schema = group.GetSchema(); - Assert.IsNotNull(schema); - var pid = Settings.profileSettings.GetProfileDataById(schema.BuildPath.Id); - Assert.IsNotNull(pid); - var varVal = Settings.profileSettings.GetValueById(Settings.activeProfileId, pid.Id); - Assert.IsNotNull(varVal); - var evalVal = Settings.profileSettings.EvaluateString(Settings.activeProfileId, varVal); - var val = schema.BuildPath.GetValue(Settings); - Assert.AreEqual(evalVal, val); - } - - [Test] - public void CanSetValueByName() - { - var group = Settings.FindGroup(AddressableAssetSettings.DefaultLocalGroupName); - Assert.IsNotNull(group); - var schema = group.GetSchema(); - Assert.IsNotNull(schema); - bool callbackInvoked = false; - schema.BuildPath.OnValueChanged += s => callbackInvoked = true; - schema.BuildPath.SetVariableByName(Settings, AddressableAssetSettings.kLocalLoadPath); - Assert.IsTrue(callbackInvoked); - Assert.AreEqual(schema.BuildPath.Id, Settings.profileSettings.GetProfileDataByName(AddressableAssetSettings.kLocalLoadPath).Id); - } - - [Test] - public void CanSetValueById() - { - var group = Settings.FindGroup(AddressableAssetSettings.DefaultLocalGroupName); - Assert.IsNotNull(group); - var schema = group.GetSchema(); - Assert.IsNotNull(schema); - schema.BuildPath.SetVariableById(Settings, Settings.profileSettings.GetProfileDataByName(AddressableAssetSettings.kLocalLoadPath).Id); - Assert.AreEqual(schema.BuildPath.Id, Settings.profileSettings.GetProfileDataByName(AddressableAssetSettings.kLocalLoadPath).Id); - } - - [Test] - public void CallbackInvokedWhenValueChanged() - { - var group = Settings.FindGroup(AddressableAssetSettings.DefaultLocalGroupName); - Assert.IsNotNull(group); - var schema = group.GetSchema(); - Assert.IsNotNull(schema); - bool callbackInvoked = false; - schema.BuildPath.OnValueChanged += s => callbackInvoked = true; - schema.BuildPath.SetVariableByName(Settings, AddressableAssetSettings.kLocalLoadPath); - Assert.IsTrue(callbackInvoked); - } - - [Test] - public void CallbackNotInvokedWhenValueNotChanged() - { - var group = Settings.FindGroup(AddressableAssetSettings.DefaultLocalGroupName); - Assert.IsNotNull(group); - var schema = group.GetSchema(); - Assert.IsNotNull(schema); - bool callbackInvoked = false; - schema.BuildPath.OnValueChanged += s => callbackInvoked = true; - schema.BuildPath.SetVariableById(Settings, "invalid id"); - Assert.IsFalse(callbackInvoked); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ProfileValueReferenceTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ProfileValueReferenceTests.cs.meta deleted file mode 100644 index b5edbd43..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ProfileValueReferenceTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5b9c8582a5e831f4788aca482a4c95d3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ResourceCleanupTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ResourceCleanupTests.cs deleted file mode 100644 index 2400f73a..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ResourceCleanupTests.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using NUnit.Framework; -using UnityEngine; -using UnityEngine.ResourceManagement.Diagnostics; -using UnityEngine.ResourceManagement.Util; - -namespace UnityEditor.AddressableAssets.Tests -{ - using Object = UnityEngine.Object; - - public class ResourceCleanupTests : AddressableAssetTestBase - { - int CountResourcesByName(string name) - { - int count = 0; - Object[] objects = Resources.FindObjectsOfTypeAll(typeof(GameObject)); - foreach (Object o in objects) - { - if (o.name.Equals(name)) ++count; - } - return count; - } - - [Test] - public void CleanupEventCollector() - { - EditorApplication.isPlaying = true; - DiagnosticEventCollector.FindOrCreateGlobalInstance(); - EditorApplication.isPlaying = false; - - Assert.AreEqual(0, CountResourcesByName("EventCollector")); - } - - [Test] - public void CleanupDelayedActionManager() - { - EditorApplication.isPlaying = true; - DelayedActionManager.AddAction(new Action(() => {})); - EditorApplication.isPlaying = false; - - Assert.AreEqual(0, CountResourcesByName("DelayedActionManager")); - - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ResourceCleanupTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ResourceCleanupTests.cs.meta deleted file mode 100644 index c0d893fd..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/ResourceCleanupTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 44a6309b482db49b0a5aa08e393f503c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Unity.Addressables.Editor.Tests.asmdef b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Unity.Addressables.Editor.Tests.asmdef deleted file mode 100644 index 281aa32e..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Unity.Addressables.Editor.Tests.asmdef +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "Unity.Addressables.Editor.Tests", - "references": [ - "Unity.Addressables.Editor", - "Unity.Addressables", - "Unity.ResourceManager", - "Unity.ScriptableBuildPipeline.Editor" - ], - "optionalUnityReferences": [ - "TestAssemblies" - ], - "includePlatforms": [ - "Editor" - ], - "excludePlatforms": [], - "allowUnsafeCode": false -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Unity.Addressables.Editor.Tests.asmdef.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Unity.Addressables.Editor.Tests.asmdef.meta deleted file mode 100644 index 911ddf21..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Editor/Unity.Addressables.Editor.Tests.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: f0c774e7dbab37641808f75bcc438e4a -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime.meta deleted file mode 100644 index e8e3a159..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 61fc287de507f6d44a8d9a6ea2f944df -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/AddressablesIntegrationTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/AddressablesIntegrationTests.cs deleted file mode 100644 index 93950ff2..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/AddressablesIntegrationTests.cs +++ /dev/null @@ -1,203 +0,0 @@ -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.AddressableAssets; -using UnityEngine.ResourceManagement; -using UnityEditor; -using UnityEngine.TestTools; -using NUnit.Framework; -using System.Collections; -using System; -using System.Linq; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.ResourceManagement.ResourceProviders; -using UnityEngine.ResourceManagement.AsyncOperations; - -namespace AddressableAssetsIntegrationTests -{ - internal abstract partial class AddressablesIntegrationTests : IPrebuildSetup - { - internal protected AddressablesImpl m_Addressables; - Dictionary m_KeysHashSet = new Dictionary(); - List m_PrefabKeysList = new List(); - List m_SceneKeysList = new List(); - - Action m_PrevHandler; - - protected const string k_TestConfigName = "AddressableAssetSettings.Tests"; - protected const string k_TestConfigFolder = "Assets/AddressableAssetsData_AddressableAssetSettingsTests"; - -#if UNITY_EDITOR - private UnityEditor.AddressableAssets.Settings.AddressableAssetSettings m_Settings; - protected UnityEditor.AddressableAssets.Settings.AddressableAssetSettings Settings - { - get - { - if (m_Settings == null) - m_Settings = - UnityEditor.AddressableAssets.Settings.AddressableAssetSettings.Create(k_TestConfigFolder, k_TestConfigName, true, true); - return m_Settings; - } - } -#endif - protected abstract string TypeName { get; } - protected virtual string PathFormat { get { return "Assets/{0}_AssetsToDelete_{1}"; } } - - protected virtual string GetRuntimePath(string testType, string suffix) { return string.Format("{0}Library/com.unity.addressables/settings_{1}_TEST_{2}.json", "file://{UnityEngine.Application.dataPath}/../", testType, suffix); } - protected virtual string GetCatalogPath(string testType, string suffix) { return string.Format("{0}Library/com.unity.addressables/catalog_{1}_TEST_{2}.json", "file://{UnityEngine.Application.dataPath}/../", testType, suffix); } - protected virtual ILocationSizeData CreateLocationSizeData(string name, long size, uint crc, string hash) { return null; } - - private object AssetReferenceObjectKey { get { return m_PrefabKeysList.FirstOrDefault(s => s.ToString().Contains("AssetReferenceBehavior")); }} - - public virtual void Setup() - { - AddressablesTestUtility.Setup(TypeName, PathFormat, "BASE"); - } - - [OneTimeTearDown] - public virtual void DeleteTempFiles() - { - ResourceManager.ExceptionHandler = m_PrevHandler; - AddressablesTestUtility.TearDown(TypeName, PathFormat, "BASE"); - } - int m_StartingOpCount; - int m_StartingTrackedHandleCount; - int m_StartingInstanceCount; - int m_StartingSceneCount; - [TearDown] - public void TearDown() - { - Assert.AreEqual(m_StartingOpCount, m_Addressables.ResourceManager.OperationCacheCount); - Assert.AreEqual(m_StartingTrackedHandleCount, m_Addressables.TrackedHandleCount); - Assert.AreEqual(m_StartingInstanceCount, m_Addressables.ResourceManager.InstanceOperationCount); - Assert.AreEqual(m_StartingSceneCount, m_Addressables.SceneOperationCount); - } - - //we must wait for Addressables initialization to complete since we are clearing out all of its data for the tests. - public bool initializationComplete; - string currentInitType = null; - IEnumerator Init() - { - if (!initializationComplete || TypeName != currentInitType) - { - if (m_Addressables == null) - m_Addressables = new AddressablesImpl(new LRUCacheAllocationStrategy(1000, 1000, 100, 10)); - - if (TypeName != currentInitType) - { - currentInitType = TypeName; - - var runtimeSettingsPath = m_Addressables.RuntimePath + "/settingsBASE.json"; -#if UNITY_EDITOR - - runtimeSettingsPath = GetRuntimePath(currentInitType, "BASE"); -#endif - runtimeSettingsPath = m_Addressables.ResolveInternalId(runtimeSettingsPath); - Debug.LogFormat("Initializing from path {0}", runtimeSettingsPath); - yield return m_Addressables.InitializeAsync(runtimeSettingsPath, "BASE"); - - foreach (var locator in m_Addressables.ResourceLocators) - { - if (locator.Keys == null) - continue; - - foreach (var key in locator.Keys) - { - IList locs; - if (locator.Locate(key, typeof(object), out locs)) - { - var isPrefab = locs.All(s => s.InternalId.EndsWith(".prefab")); - if (!m_KeysHashSet.ContainsKey(key)) - { - if (isPrefab) - m_PrefabKeysList.Add(key); - m_KeysHashSet.Add(key, locs.Count); - } - else - { - m_KeysHashSet[key] = m_KeysHashSet[key] + locs.Count; - } - - var isScene = locs.All(s => s.ResourceType == typeof(SceneInstance)); - if (isScene) - m_SceneKeysList.Add(key); - - } - } - } - initializationComplete = true; - - m_PrevHandler = ResourceManager.ExceptionHandler; - ResourceManager.ExceptionHandler = null; - } - } - m_Addressables.ResourceManager.ClearDiagnosticsCallback(); - m_StartingOpCount = m_Addressables.ResourceManager.OperationCacheCount; - m_StartingTrackedHandleCount = m_Addressables.TrackedHandleCount; - m_StartingInstanceCount = m_Addressables.ResourceManager.InstanceOperationCount; - m_StartingSceneCount = m_Addressables.SceneOperationCount; - } - } -#if UNITY_EDITOR - class AddressablesIntegrationTestsFastMode : AddressablesIntegrationTests - { - protected override string TypeName { get { return "BuildScriptFastMode"; } } - } - - class AddressablesIntegrationTestsVirtualMode : AddressablesIntegrationTests - { - protected override string TypeName { get { return "BuildScriptVirtualMode"; } } - protected override ILocationSizeData CreateLocationSizeData(string name, long size, uint crc, string hash) - { - return new UnityEngine.ResourceManagement.ResourceProviders.Simulation.VirtualAssetBundleRequestOptions() - { - BundleName = name, - BundleSize = size, - Crc = crc, - Hash = hash - }; - } - - } - - - class AddressablesIntegrationTestsPackedPlayMode : AddressablesIntegrationTests - { - protected override string TypeName { get { return "BuildScriptPackedPlayMode"; } } - protected override string GetRuntimePath(string testType, string suffix) { return "{UnityEngine.AddressableAssets.Addressables.RuntimePath}/settings" + suffix + ".json"; } - protected override string GetCatalogPath(string testType, string suffix) { return "{UnityEngine.AddressableAssets.Addressables.RuntimePath}/catalog" + suffix + ".json"; } - - public override void Setup() - { - AddressablesTestUtility.Setup("BuildScriptPackedMode", PathFormat, "BASE"); - AddressablesTestUtility.Setup(TypeName, PathFormat, "BASE"); - } - public override void DeleteTempFiles() - { - AddressablesTestUtility.TearDown("BuildScriptPackedMode", PathFormat, "BASE"); - AddressablesTestUtility.TearDown(TypeName, PathFormat, "BASE"); - } - } - -#endif - - class AddressablesIntegrationPlayer : AddressablesIntegrationTests - { - protected override string TypeName { get { return "BuildScriptPackedMode"; } } - protected override string GetRuntimePath(string testType, string suffix) { return "{UnityEngine.AddressableAssets.Addressables.RuntimePath}/settings" + suffix + ".json"; } - protected override string GetCatalogPath(string testType, string suffix) { return "{UnityEngine.AddressableAssets.Addressables.RuntimePath}/catalog" + suffix + ".json"; } - - protected override ILocationSizeData CreateLocationSizeData(string name, long size, uint crc, string hash) - { - return new AssetBundleRequestOptions() - { - BundleName = name, - BundleSize =size, - Crc = crc, - Hash = hash - }; - } - - } - -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/AddressablesIntegrationTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/AddressablesIntegrationTests.cs.meta deleted file mode 100644 index d4ffefae..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/AddressablesIntegrationTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3f0645bd0f9b0ea46a9bec32c403ab9e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/AddressablesIntegrationTestsImpl.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/AddressablesIntegrationTestsImpl.cs deleted file mode 100644 index 6e576e9a..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/AddressablesIntegrationTestsImpl.cs +++ /dev/null @@ -1,785 +0,0 @@ -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.AddressableAssets; -using UnityEngine.ResourceManagement; -using UnityEngine.TestTools; -using NUnit.Framework; -using System.Collections; -using System.IO; -using UnityEngine.SceneManagement; -using UnityEngine.AddressableAssets.Initialization; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.ResourceProviders; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.AddressableAssets.ResourceLocators; -using UnityEngine.ResourceManagement.AsyncOperations; -using System.Text.RegularExpressions; -using System.Diagnostics; -using System.Text; -using UnityEngine.U2D; - -namespace AddressableAssetsIntegrationTests -{ - internal abstract partial class AddressablesIntegrationTests : IPrebuildSetup - { - [UnityTest] - public IEnumerator AsyncCache_IsCleaned_OnFailedOperation() - { - yield return Init(); - - var op = m_Addressables.LoadAssetAsync("notARealKey"); - op.Completed += handle => - { - Assert.AreEqual(0, m_Addressables.ResourceManager.CachedOperationCount()); - }; - - yield return op; - } - - [UnityTest] - public IEnumerator LoadResourceLocations_InvalidKeyDoesNotThrow() - { - //Setup - yield return Init(); - - //Test - Assert.DoesNotThrow( () => - { - m_Addressables.LoadResourceLocationsAsync("noSuchLabel", typeof(object)); - }); - } - - [UnityTest] - public IEnumerator LoadResourceLocations_ValidKeyDoesNotThrow() - { - //Setup - yield return Init(); - - //Test - Assert.DoesNotThrow( () => - { - m_Addressables.LoadResourceLocationsAsync(AddressablesTestUtility.GetPrefabLabel("BASE"), typeof(GameObject)); - }); - } - - [UnityTest] - public IEnumerator LoadAsset_InvalidKeyThrowsInvalidKeyException() - { - //Setup - yield return Init(); - - //Test - AsyncOperationHandle handle = default(AsyncOperationHandle); - handle = m_Addressables.LoadAssetAsync("noSuchLabel"); - Assert.AreEqual("Exception of type 'UnityEngine.AddressableAssets.InvalidKeyException' was thrown., Key=noSuchLabel", handle.OperationException.Message); - yield return handle; - - //Cleanup - handle.Release(); - } - -#if UNITY_2019_3_OR_NEWER - [UnityTest] - public IEnumerator CanLoadTextureAsSprite() - { - //Setup - yield return Init(); - - var op = m_Addressables.LoadAssetAsync("sprite"); - yield return op; - Assert.IsNotNull(op.Result); - Assert.AreEqual(typeof(Sprite), op.Result.GetType()); - op.Release(); - } - - [UnityTest] - public IEnumerator CanLoadSpriteByName() - { - //Setup - yield return Init(); - - var op = m_Addressables.LoadAssetAsync("sprite.botright"); - yield return op; - Assert.IsNotNull(op.Result); - Assert.AreEqual(typeof(Sprite), op.Result.GetType()); - Assert.AreEqual("botright", op.Result.name); - op.Release(); - - var op2 = m_Addressables.LoadAssetAsync("sprite.topleft"); - yield return op2; - Assert.IsNotNull(op2.Result); - Assert.AreEqual(typeof(Sprite), op2.Result.GetType()); - Assert.AreEqual("topleft", op2.Result.name); - op2.Release(); - } - - [UnityTest] - public IEnumerator CanLoadAllSpritesAsArray() - { - //Setup - yield return Init(); - - var op = m_Addressables.LoadAssetAsync("sprite"); - yield return op; - Assert.IsNotNull(op.Result); - Assert.AreEqual(typeof(Sprite[]), op.Result.GetType()); - Assert.AreEqual(2, op.Result.Length); - op.Release(); - } - - [UnityTest] - public IEnumerator CanLoadAllSpritesAsList() - { - //Setup - yield return Init(); - - var op = m_Addressables.LoadAssetAsync>("sprite"); - yield return op; - Assert.IsNotNull(op.Result); - Assert.IsTrue(typeof(IList).IsAssignableFrom(op.Result.GetType())); - Assert.AreEqual(2, op.Result.Count); - op.Release(); - } - - - [UnityTest] - public IEnumerator CanLoadTextureAsTexture() - { - //Setup - yield return Init(); - - var op = m_Addressables.LoadAssetAsync("sprite"); - yield return op; - Assert.IsNotNull(op.Result); - Assert.AreEqual(typeof(Texture2D), op.Result.GetType()); - op.Release(); - } -#endif - - [UnityTest] - public IEnumerator LoadAsset_ValidKeyDoesNotThrow() - { - //Setup - yield return Init(); - - //Test - AsyncOperationHandle handle = default(AsyncOperationHandle); - Assert.DoesNotThrow( () => - { - handle = m_Addressables.LoadAssetAsync(AddressablesTestUtility.GetPrefabLabel("BASE")); - }); - yield return handle; - - //Cleanup - handle.Release(); - } - - [UnityTest] - public IEnumerator VerifyChainOpPercentCompleteCalculation() - { - //Setup - yield return Init(); - AsyncOperationHandle op = m_Addressables.LoadAssetAsync(AddressablesTestUtility.GetPrefabLabel("BASE")); - - //Test - while (op.PercentComplete < 1) - { - Assert.False(op.IsDone); - yield return null; - } - Assert.True(op.PercentComplete == 1 && op.IsDone); - yield return op; - - //Cleanup - op.Release(); - } - - [UnityTest] - public IEnumerator VerifyProfileVariableEvaluation() - { - yield return Init(); - Assert.AreEqual(string.Format("{0}", m_Addressables.RuntimePath), AddressablesRuntimeProperties.EvaluateString("{UnityEngine.AddressableAssets.Addressables.RuntimePath}")); - } - - [UnityTest] - public IEnumerator VerifyDownloadSize() - { - yield return Init(); - long expectedSize = 0; - var locMap = new ResourceLocationMap(); - - var bundleLoc1 = new ResourceLocationBase("sizeTestBundle1", "http://nowhere.com/mybundle1.bundle", typeof(AssetBundleProvider).FullName, typeof(object)); - var sizeData1 = (bundleLoc1.Data = CreateLocationSizeData("sizeTestBundle1", 1000, 123, "hashstring1")) as ILocationSizeData; - if (sizeData1 != null) - expectedSize += sizeData1.ComputeSize(bundleLoc1); - - var bundleLoc2 = new ResourceLocationBase("sizeTestBundle2", "http://nowhere.com/mybundle2.bundle", typeof(AssetBundleProvider).FullName, typeof(object)); - var sizeData2 = (bundleLoc2.Data = CreateLocationSizeData("sizeTestBundle2", 500, 123, "hashstring2")) as ILocationSizeData; - if (sizeData2 != null) - expectedSize += sizeData2.ComputeSize(bundleLoc2); - - var assetLoc = new ResourceLocationBase("sizeTestAsset", "myASset.asset", typeof(BundledAssetProvider).FullName, typeof(object), bundleLoc1, bundleLoc2); - - locMap.Add("sizeTestBundle1", bundleLoc1); - locMap.Add("sizeTestBundle2", bundleLoc2); - locMap.Add("sizeTestAsset", assetLoc); - m_Addressables.ResourceLocators.Add(locMap); - - var dOp = m_Addressables.GetDownloadSizeAsync("sizeTestAsset"); - yield return dOp; - Assert.AreEqual(expectedSize, dOp.Result); - dOp.Release(); - } - - [UnityTest] - public IEnumerator GetDownloadSize_CalculatesCachedBundles() - { -#if ENABLE_CACHING - yield return Init(); - long expectedSize = 0; - long bundleSize1 = 1000; - long bundleSize2 = 500; - var locMap = new ResourceLocationMap(); - - Caching.ClearCache(); - //Simulating a cached bundle - string fakeCachePath = CreateFakeCachedBundle("GetDownloadSize_CalculatesCachedBundlesBundle1", "be38e35d2177c282d5d6a2e54a803aab"); - - var bundleLoc1 = new ResourceLocationBase("sizeTestBundle1", "http://nowhere.com/GetDownloadSize_CalculatesCachedBundlesBundle1.bundle", - typeof(AssetBundleProvider).FullName, typeof(object)); - var sizeData1 = - (bundleLoc1.Data = CreateLocationSizeData("cachedSizeTestBundle1", bundleSize1, 123, - "be38e35d2177c282d5d6a2e54a803aab")) as ILocationSizeData; - if (sizeData1 != null) - expectedSize += sizeData1.ComputeSize(bundleLoc1); - - var bundleLoc2 = new ResourceLocationBase("cachedSizeTestBundle2", "http://nowhere.com/GetDownloadSize_CalculatesCachedBundlesBundle2.bundle", - typeof(AssetBundleProvider).FullName, typeof(object)); - var sizeData2 = - (bundleLoc2.Data = CreateLocationSizeData("cachedSizeTestBundle2", bundleSize2, 123, - "d9fe965a6b253fb9dbd3e1cb08b7d66f")) as ILocationSizeData; - if (sizeData2 != null) - expectedSize += sizeData2.ComputeSize(bundleLoc2); - - var assetLoc = new ResourceLocationBase("cachedSizeTestAsset", "myASset.asset", - typeof(BundledAssetProvider).FullName, typeof(object), bundleLoc1, bundleLoc2); - - locMap.Add("cachedSizeTestBundle1", bundleLoc1); - locMap.Add("cachedSizeTestBundle2", bundleLoc2); - locMap.Add("cachedSizeTestAsset", assetLoc); - m_Addressables.ResourceLocators.Add(locMap); - - var dOp = m_Addressables.GetDownloadSizeAsync("cachedSizeTestAsset"); - yield return dOp; - Assert.IsTrue((bundleSize1 + bundleSize2) > dOp.Result); - Assert.AreEqual(expectedSize, dOp.Result); - dOp.Release(); - - Directory.Delete(fakeCachePath, true); -#else - Assert.Ignore(); - yield break; -#endif - } - - [UnityTest] - public IEnumerator GetResourceLocationsWithCorrectKeyAndWrongTypeReturnsEmptyResult() - { - yield return Init(); - AsyncOperationHandle> op = m_Addressables.LoadResourceLocationsAsync("prefabs_evenBASE", typeof(Texture2D)); - yield return op; - Assert.AreEqual(AsyncOperationStatus.Succeeded, op.Status); - Assert.IsNotNull(op.Result); - Assert.AreEqual(op.Result.Count, 0); - op.Release(); - } - - [UnityTest] - public IEnumerator CanGetResourceLocationsWithSingleKey() - { - yield return Init(); - int loadCount = 0; - int loadedCount = 0; - var ops = new List>>(); - foreach (var k in m_KeysHashSet) - { - loadCount++; - AsyncOperationHandle> op = m_Addressables.LoadResourceLocationsAsync(k.Key, typeof(object)); - ops.Add(op); - op.Completed += op2 => - { - loadedCount++; - Assert.IsNotNull(op2.Result); - Assert.AreEqual(k.Value, op2.Result.Count); - }; - - } - foreach(var op in ops) - { - yield return op; - op.Release(); - } - } - [UnityTest] - public IEnumerator GetResourceLocationsMergeModesFailsWithNoKeys([Values(Addressables.MergeMode.UseFirst, Addressables.MergeMode.Intersection, Addressables.MergeMode.Union)]Addressables.MergeMode mode) - { - yield return Init(); - - IList results; - var ret = m_Addressables.GetResourceLocations(new object[] { }, typeof(GameObject), mode, out results); - Assert.IsFalse(ret); - Assert.IsNull(results); - } - - [UnityTest] - public IEnumerator GetResourceLocationsMergeModesSucceedsWithSingleKey([Values(Addressables.MergeMode.UseFirst, Addressables.MergeMode.Intersection, Addressables.MergeMode.Union)]Addressables.MergeMode mode) - { - yield return Init(); - - IList results; - var ret = m_Addressables.GetResourceLocations(new object[] { "prefabs_evenBASE" }, typeof(GameObject), mode, out results); - Assert.IsTrue(ret); - Assert.NotNull(results); - Assert.GreaterOrEqual(results.Count, 1); - } - - [UnityTest] - public IEnumerator GetResourceLocationsMergeModeUnionSucceedsWithValidKeys() - { - yield return Init(); - - IList results; - var ret = m_Addressables.GetResourceLocations(new object[] { "prefabs_evenBASE" }, typeof(GameObject), Addressables.MergeMode.Intersection, out results); - Assert.IsTrue(ret); - Assert.NotNull(results); - Assert.GreaterOrEqual(results.Count, 1); - var evenCount = results.Count; - - ret = m_Addressables.GetResourceLocations(new object[] { "prefabs_oddBASE" }, typeof(GameObject), Addressables.MergeMode.Intersection, out results); - Assert.IsTrue(ret); - Assert.NotNull(results); - Assert.GreaterOrEqual(results.Count, 1); - var oddCount = results.Count; - - ret = m_Addressables.GetResourceLocations(new object[] { "prefabs_evenBASE", "prefabs_oddBASE" }, typeof(GameObject), Addressables.MergeMode.Union, out results); - Assert.IsTrue(ret); - Assert.NotNull(results); - Assert.GreaterOrEqual(results.Count, 1); - Assert.AreEqual(oddCount + evenCount, results.Count); - } - - [UnityTest] - public IEnumerator GetResourceLocationsMergeModeUnionSucceedsWithInvalidKeys() - { - yield return Init(); - - IList results; - var ret = m_Addressables.GetResourceLocations(new object[] { "prefabs_evenBASE" }, typeof(GameObject), Addressables.MergeMode.Intersection, out results); - Assert.IsTrue(ret); - Assert.NotNull(results); - Assert.GreaterOrEqual(results.Count, 1); - var evenCount = results.Count; - - ret = m_Addressables.GetResourceLocations(new object[] { "prefabs_oddBASE" }, typeof(GameObject), Addressables.MergeMode.Intersection, out results); - Assert.IsTrue(ret); - Assert.NotNull(results); - Assert.GreaterOrEqual(results.Count, 1); - var oddCount = results.Count; - - ret = m_Addressables.GetResourceLocations(new object[] { "prefabs_evenBASE", "prefabs_oddBASE", "INVALIDKEY" }, typeof(GameObject), Addressables.MergeMode.Union, out results); - Assert.IsTrue(ret); - Assert.NotNull(results); - Assert.GreaterOrEqual(results.Count, 1); - Assert.AreEqual(oddCount + evenCount, results.Count); - } - - - - [UnityTest] - public IEnumerator GetResourceLocationsMergeModeIntersectionFailsIfNoResultsDueToIntersection() - { - yield return Init(); - - IList results; - var ret = m_Addressables.GetResourceLocations(new object[] { "prefabs_evenBASE" }, typeof(GameObject), Addressables.MergeMode.Intersection, out results); - Assert.IsTrue(ret); - Assert.NotNull(results); - Assert.GreaterOrEqual(results.Count, 1); - - ret = m_Addressables.GetResourceLocations(new object[] { "prefabs_oddBASE" }, typeof(GameObject), Addressables.MergeMode.Intersection, out results); - Assert.IsTrue(ret); - Assert.NotNull(results); - Assert.GreaterOrEqual(results.Count, 1); - - ret = m_Addressables.GetResourceLocations(new object[] { "prefabs_evenBASE", "prefabs_oddBASE" }, typeof(GameObject), Addressables.MergeMode.Intersection, out results); - Assert.IsFalse(ret); - Assert.IsNull(results); - } - - - [UnityTest] - public IEnumerator GetResourceLocationsMergeModeIntersectionFailsIfNoResultsDueToInvalidKey() - { - yield return Init(); - - IList results; - var ret = m_Addressables.GetResourceLocations(new object[] { "prefabs_evenBASE" }, typeof(GameObject), Addressables.MergeMode.Intersection, out results); - Assert.IsTrue(ret); - Assert.NotNull(results); - Assert.GreaterOrEqual(results.Count, 1); - - ret = m_Addressables.GetResourceLocations(new object[] { "prefabs_oddBASE" }, typeof(GameObject), Addressables.MergeMode.Intersection, out results); - Assert.IsTrue(ret); - Assert.NotNull(results); - Assert.GreaterOrEqual(results.Count, 1); - - ret = m_Addressables.GetResourceLocations(new object[] { "prefabs_evenBASE", "prefabs_oddBASE", "INVALIDKEY" }, typeof(GameObject), Addressables.MergeMode.Intersection, out results); - Assert.IsFalse(ret); - Assert.IsNull(results); - - ret = m_Addressables.GetResourceLocations(new object[] { "prefabs_evenBASE", "INVALIDKEY" }, typeof(GameObject), Addressables.MergeMode.Intersection, out results); - Assert.IsFalse(ret); - Assert.IsNull(results); - - ret = m_Addressables.GetResourceLocations(new object[] { "INVALIDKEY" }, typeof(GameObject), Addressables.MergeMode.Intersection, out results); - Assert.IsFalse(ret); - Assert.IsNull(results); - } - - [UnityTest] - public IEnumerator WhenLoadWithInvalidKey_ReturnedOpIsFailed() - { - yield return Init(); - List keys = new List() { "INVALID1", "INVALID2" }; - AsyncOperationHandle> gop = m_Addressables.LoadAssetsAsync(keys, null, Addressables.MergeMode.Intersection); - while (!gop.IsDone) - yield return null; - Assert.IsTrue(gop.IsDone); - Assert.AreEqual(AsyncOperationStatus.Failed, gop.Status); - m_Addressables.Release(gop); - } - - - [UnityTest] - public IEnumerator CanLoadAssetsWithMultipleKeysMerged() - { - yield return Init(); - List keys = new List() { AddressablesTestUtility.GetPrefabLabel("BASE"), AddressablesTestUtility.GetPrefabUniqueLabel("BASE", 0) }; - AsyncOperationHandle> gop = m_Addressables.LoadAssetsAsync(keys, null, Addressables.MergeMode.Intersection); - while (!gop.IsDone) - yield return null; - Assert.IsTrue(gop.IsDone); - Assert.AreEqual(AsyncOperationStatus.Succeeded, gop.Status); - Assert.NotNull(gop.Result); - Assert.AreEqual(1, gop.Result.Count); - Assert.AreEqual(AsyncOperationStatus.Succeeded, gop.Status); - m_Addressables.Release(gop); - } - - [UnityTest] - public IEnumerator Release_WhenObjectIsUnknown_LogsErrorAndDoesNotDestroy() - { - yield return Init(); - GameObject go = Object.Instantiate(GameObject.CreatePrimitive(PrimitiveType.Cube)); - go.name = "TestCube"; - - m_Addressables.Release(go); - LogAssert.Expect(LogType.Error, new Regex("Addressables.Release was called on.*")); - yield return null; - - GameObject foundObj = GameObject.Find("TestCube"); - Assert.IsNotNull(foundObj); - Object.Destroy(foundObj); - } - - [UnityTest] - public IEnumerator ReleaseInstance_WhenObjectIsUnknown_LogsErrorAndDestroys() - { - yield return Init(); - GameObject go = Object.Instantiate(GameObject.CreatePrimitive(PrimitiveType.Cube)); - go.name = "TestCube"; - - Assert.IsFalse(m_Addressables.ReleaseInstance(go)); - } - - [UnityTest] - public IEnumerator LoadAsset_WhenEntryExists_ReturnsAsset() - { - yield return Init(); - string label = AddressablesTestUtility.GetPrefabUniqueLabel("BASE", 0); - AsyncOperationHandle op = m_Addressables.LoadAssetAsync(label); - yield return op; - Assert.AreEqual(AsyncOperationStatus.Succeeded, op.Status); - Assert.IsTrue(op.Result != null); - op.Release(); - } - - [UnityTest] - public IEnumerator LoadAssetWithWrongType_WhenEntryExists_Fails() - { - yield return Init(); - string label = AddressablesTestUtility.GetPrefabUniqueLabel("BASE", 0); - AsyncOperationHandle op = m_Addressables.LoadAssetAsync(label); - yield return op; - Assert.AreEqual(AsyncOperationStatus.Failed, op.Status); - Assert.IsNull(op.Result); - op.Release(); - } - - [UnityTest] - public IEnumerator LoadAsset_WhenEntryDoesNotExist_OperationFails() - { - yield return Init(); - AsyncOperationHandle op = m_Addressables.LoadAssetAsync("unknownlabel"); - yield return op; - Assert.AreEqual(AsyncOperationStatus.Failed, op.Status); - Assert.IsTrue(op.Result == null); - op.Release(); - } - - [UnityTest] - public IEnumerator LoadAsset_CanReleaseThroughAddressablesInCallback([Values(true, false)]bool addressableRelease) - { - yield return Init(); - var op = m_Addressables.LoadAssetAsync(m_PrefabKeysList[0]); - op.Completed += x => - { - Assert.IsNotNull(x.Result); - if (addressableRelease) - m_Addressables.Release(x.Result); - else - op.Release(); - }; - yield return op; - } - - [UnityTest] - public IEnumerator LoadAsset_WhenPrefabLoadedAsMultipleTypes_ResultIsEqual() - { - yield return Init(); - - string label = AddressablesTestUtility.GetPrefabUniqueLabel("BASE", 0); - AsyncOperationHandle op1 = m_Addressables.LoadAssetAsync(label); - AsyncOperationHandle op2 = m_Addressables.LoadAssetAsync(label); - yield return op1; - yield return op2; - Assert.AreEqual(op1.Result, op2.Result); - Assert.AreEqual(AsyncOperationStatus.Succeeded, op1.Status); - Assert.AreEqual(AsyncOperationStatus.Succeeded, op2.Status); - op1.Release(); - op2.Release(); - } - - [UnityTest] - public IEnumerator LoadAssets_InvokesCallbackPerAsset() - { - yield return Init(); - string label = AddressablesTestUtility.GetPrefabLabel("BASE"); - HashSet ops = new HashSet(); - var gop = m_Addressables.LoadAssetsAsync(label, x => { ops.Add(x); }); - yield return gop; - Assert.AreEqual(AddressablesTestUtility.kPrefabCount, ops.Count); - for (int i = 0; i < ops.Count; i++) - Assert.IsTrue(ops.Contains(gop.Result[i])); - gop.Release(); - } - - - // TODO: this doesn't actually check that something was downloaded. It is more: can load dependencies. - // We really need to address the downloading feature - [UnityTest] - public IEnumerator DownloadDependnecies_CanDownloadDependencies() - { - yield return Init(); - string label = AddressablesTestUtility.GetPrefabLabel("BASE"); - AsyncOperationHandle op = m_Addressables.DownloadDependenciesAsync(label); - yield return op; - op.Release(); - } - - [UnityTest] - public IEnumerator StressInstantiation() - { - yield return Init(); - - // TODO: move this safety check to test fixture base - var objs = SceneManager.GetActiveScene().GetRootGameObjects(); - foreach (var r in objs) - Assert.False(r.name.EndsWith("(Clone)"), "All instances from previous test were not cleaned up"); - - var ops = new List>(); - for (int i = 0; i < 50; i++) - { - var key = m_PrefabKeysList[i % m_PrefabKeysList.Count]; - ops.Add(m_Addressables.InstantiateAsync(key)); - } - - foreach(AsyncOperationHandle op in ops) - yield return op; - - foreach (AsyncOperationHandle op in ops) - m_Addressables.ReleaseInstance(op.Result); - - yield return null; - - objs = SceneManager.GetActiveScene().GetRootGameObjects(); - foreach (var r in objs) - Assert.False(r.name.EndsWith("(Clone)"), "All instances from this test were not cleaned up"); - } - - [UnityTest] - public IEnumerator CanUnloadAssetReference_WithAddressables() - { - yield return Init(); - - AsyncOperationHandle handle = m_Addressables.InstantiateAsync(AssetReferenceObjectKey); - yield return handle; - Assert.IsNotNull(handle.Result as GameObject); - AssetReferenceTestBehavior behavior = - (handle.Result as GameObject).GetComponent(); - AsyncOperationHandle assetRefHandle = m_Addressables.InstantiateAsync(behavior.Reference); - yield return assetRefHandle; - Assert.IsNotNull(assetRefHandle.Result); - - string name = assetRefHandle.Result.name; - Assert.IsNotNull(GameObject.Find(name)); - - m_Addressables.ReleaseInstance(assetRefHandle.Result); - yield return null; - Assert.IsNull(GameObject.Find(name)); - - handle.Release(); - } - - [UnityTest] - public IEnumerator RuntimeKeyIsValid_ReturnsTrueForValidKeys() - { - yield return Init(); - - AsyncOperationHandle handle = m_Addressables.InstantiateAsync(AssetReferenceObjectKey); - yield return handle; - Assert.IsNotNull(handle.Result as GameObject); - AssetReferenceTestBehavior behavior = - (handle.Result as GameObject).GetComponent(); - - Assert.IsTrue((behavior.Reference as IKeyEvaluator).RuntimeKeyIsValid()); - Assert.IsTrue((behavior.LabelReference as IKeyEvaluator).RuntimeKeyIsValid()); - - handle.Release(); - } - - [UnityTest] - public IEnumerator RuntimeKeyIsValid_ReturnsFalseForInValidKeys() - { - yield return Init(); - - AsyncOperationHandle handle = m_Addressables.InstantiateAsync(AssetReferenceObjectKey); - yield return handle; - Assert.IsNotNull(handle.Result as GameObject); - AssetReferenceTestBehavior behavior = - (handle.Result as GameObject).GetComponent(); - - Assert.IsFalse((behavior.InValidAssetReference as IKeyEvaluator).RuntimeKeyIsValid()); - Assert.IsFalse((behavior.InvalidLabelReference as IKeyEvaluator).RuntimeKeyIsValid()); - - handle.Release(); - } - - string CreateFakeCachedBundle(string bundleName, string hash) - { - string fakeCachePath = string.Format("{0}/{1}/{2}", Caching.defaultCache.path, bundleName, hash); - Directory.CreateDirectory(fakeCachePath); - var dataFile = File.Create(Path.Combine(fakeCachePath, "__data")); - var infoFile = File.Create(Path.Combine(fakeCachePath, "__info")); - - byte[] info = new UTF8Encoding(true).GetBytes( -@"-1 -1554740658 -1 -__data"); - infoFile.Write(info, 0, info.Length); - - dataFile.Dispose(); - infoFile.Dispose(); - - return fakeCachePath; - } -#if ENABLE_SCENE_TESTS - [UnityTest] - public IEnumerator CanLoadSceneAdditively() - { - yield return Init(); - var op = m_Addressables.LoadSceneAsync(m_SceneKeysList[0], LoadSceneMode.Additive); - yield return op; - Assert.AreEqual(AsyncOperationStatus.Succeeded, op.Status); - var unloadOp = m_Addressables.UnloadSceneAsync(op); - yield return unloadOp; - } - - [UnityTest] - public IEnumerator WhenSceneUnloaded_InstanitatedObjectsAreCleanedUp() - { - yield return Init(); - var op = m_Addressables.LoadSceneAsync(m_SceneKeysList[0], LoadSceneMode.Additive); - yield return op; - - Assert.AreEqual(AsyncOperationStatus.Succeeded, op.Status); - SceneManager.SetActiveScene(op.Result.Scene); - var instOp = m_Addressables.InstantiateAsync(m_PrefabKeysList[0]); - yield return instOp; - - var unloadOp = m_Addressables.UnloadSceneAsync(op); - yield return unloadOp; - } - - [UnityTest] - public IEnumerator WhenSceneUnloadedNotUsingAddressables_InstanitatedObjectsAreCleanedUp() - { - yield return Init(); - var op = m_Addressables.LoadSceneAsync(m_SceneKeysList[0], LoadSceneMode.Additive); - yield return op; - - Assert.AreEqual(AsyncOperationStatus.Succeeded, op.Status); - SceneManager.SetActiveScene(op.Result.Scene); - var instOp = m_Addressables.InstantiateAsync(m_PrefabKeysList[0]); - yield return instOp; - var unloadOp = SceneManager.UnloadSceneAsync(op.Result.Scene); - while (!unloadOp.isDone) - yield return null; - } - - [UnityTest] - public IEnumerator WhenSceneUnloaded_InstantiatedObjectsInOtherScenesAreNotCleanedUp() - { - //Setup - yield return Init(); - - var op = m_Addressables.LoadSceneAsync(m_SceneKeysList[0], LoadSceneMode.Additive); - yield return op; - Assert.AreEqual(AsyncOperationStatus.Succeeded, op.Status); - - var activeScene = m_Addressables.LoadSceneAsync(m_SceneKeysList[1], LoadSceneMode.Additive); - yield return activeScene; - SceneManager.SetActiveScene(activeScene.Result.Scene); - Assert.AreEqual(AsyncOperationStatus.Succeeded, activeScene.Status); - - //Test - AsyncOperationHandle inst = default(AsyncOperationHandle); - var unloadOp = m_Addressables.UnloadSceneAsync(op); - unloadOp.Completed += i => - { - inst = m_Addressables.InstantiateAsync(m_PrefabKeysList[0]); - }; - yield return unloadOp; - yield return inst; - Assert.AreEqual(AsyncOperationStatus.Succeeded, inst.Status); - - Assert.NotNull(GameObject.Find(inst.Result.name)); - - //Cleanup - var unloadActiveScene = m_Addressables.UnloadSceneAsync(activeScene); - yield return unloadActiveScene; - } -#endif - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/AddressablesIntegrationTestsImpl.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/AddressablesIntegrationTestsImpl.cs.meta deleted file mode 100644 index 89edfe60..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/AddressablesIntegrationTestsImpl.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bf5e6ef0e57ead045be2e03ae1ec38b0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/AddressablesTestUtilities.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/AddressablesTestUtilities.cs deleted file mode 100644 index 412c7e12..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/AddressablesTestUtilities.cs +++ /dev/null @@ -1,170 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using UnityEngine; -using UnityEngine.ResourceManagement; -using UnityEngine.AddressableAssets; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.ResourceManagement.ResourceProviders; -using UnityEngine.ResourceManagement.AsyncOperations; - -#if UNITY_EDITOR -using UnityEditor; -using UnityEditor.AddressableAssets.Settings; -using UnityEditor.AddressableAssets.Build; -using UnityEditor.SceneManagement; -using UnityEditor.AddressableAssets.Settings.GroupSchemas; -#endif - -static class AddressablesTestUtility -{ - - static public void Reset(AddressablesImpl aa) - { - aa.ResourceLocators.Clear(); - aa.ResourceManager.ResourceProviders.Clear(); - aa.InstanceProvider = null; - } - - static public void TearDown(string testType, string pathFormat, string suffix) - { -#if UNITY_EDITOR - Reset(Addressables.Instance); - var RootFolder = string.Format(pathFormat, testType, suffix); - AssetDatabase.DeleteAsset(RootFolder); -#endif - } - - static public string GetPrefabLabel(string suffix) { return "prefabs" + suffix; } - static public string GetPrefabAlternatingLabel(string suffix, int index) { return string.Format("prefabs_{0}{1}", ((index % 2) == 0) ? "even" : "odd", suffix); } - static public string GetPrefabUniqueLabel(string suffix, int index) { return string.Format("prefab_{0}{1}", index, suffix); } - public const int kPrefabCount = 10; - public const int kSceneCount = 3; - - static public void Setup(string testType, string pathFormat, string suffix) - { - try - { -#if UNITY_EDITOR - var activeScenePath = EditorSceneManager.GetActiveScene().path; - var RootFolder = string.Format(pathFormat, testType, suffix); - - Directory.CreateDirectory(RootFolder); - - var settings = AddressableAssetSettings.Create(RootFolder + "/Settings", "AddressableAssetSettings.Tests", false, true); - var group = settings.FindGroup("TestStuff" + suffix); - if (group == null) - group = settings.CreateGroup("TestStuff" + suffix, true, false, false, null, typeof(BundledAssetGroupSchema)); - settings.DefaultGroup = group; - AssetDatabase.StartAssetEditing(); - for (int i = 0; i < kPrefabCount; i++) - { - var guid = CreateAsset(RootFolder + "/test" + i + suffix + ".prefab", "testPrefab" + i); - var entry = settings.CreateOrMoveEntry(guid, group, false, false); - entry.address = Path.GetFileNameWithoutExtension(entry.AssetPath); - - entry.SetLabel(GetPrefabLabel(suffix), true, false); - entry.SetLabel(GetPrefabAlternatingLabel(suffix, i), true, false); - entry.SetLabel(GetPrefabUniqueLabel(suffix, i), true, false); - } - -#if ENABLE_SCENE_TESTS - for (int i = 0; i < kSceneCount; i++) - { - var scene = EditorSceneManager.NewScene(NewSceneSetup.DefaultGameObjects, NewSceneMode.Single); - EditorSceneManager.SaveScene(scene, RootFolder + "/test_scene" + i + suffix + ".unity"); - var guid = AssetDatabase.AssetPathToGUID(scene.path); - var entry = settings.CreateOrMoveEntry(guid, group, false, false); - entry.address = Path.GetFileNameWithoutExtension(entry.AssetPath); - } -#endif - string assetRefGuid = CreateAsset(RootFolder + "/testIsReference.prefab", "IsReference"); - GameObject go = new GameObject("AssetReferenceBehavior"); - AssetReferenceTestBehavior aRefTestBehavior = go.AddComponent(); - aRefTestBehavior.Reference = settings.CreateAssetReference(assetRefGuid); - aRefTestBehavior.LabelReference = new AssetLabelReference() - { - labelString = settings.labelTable.labelNames[0] - }; - - string hasBehaviorPath = RootFolder + "/AssetReferenceBehavior.prefab"; - PrefabUtility.SaveAsPrefabAsset(go, hasBehaviorPath); - settings.CreateOrMoveEntry(AssetDatabase.AssetPathToGUID(hasBehaviorPath), group, false, false); - AssetDatabase.StopAssetEditing(); - AssetDatabase.SaveAssets(); - AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate); - - - var texture = new Texture2D(32, 32); - var data = ImageConversion.EncodeToPNG(texture); - UnityEngine.Object.DestroyImmediate(texture); - AssetDatabase.GenerateUniqueAssetPath(RootFolder); - var origPath = "Assets/" + GUID.Generate() + ".png"; - var spritePath = RootFolder + "sprite.png"; - File.WriteAllBytes(spritePath, data); - AssetDatabase.ImportAsset(origPath, ImportAssetOptions.ForceSynchronousImport | ImportAssetOptions.ForceUpdate); - AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate | ImportAssetOptions.ForceSynchronousImport); - AssetDatabase.MoveAsset(origPath, spritePath); - AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate | ImportAssetOptions.ForceSynchronousImport); - AssetDatabase.ImportAsset(spritePath, ImportAssetOptions.ForceSynchronousImport | ImportAssetOptions.ForceUpdate); - - var spriteGuid = AssetDatabase.AssetPathToGUID(spritePath); - var importer = AssetImporter.GetAtPath(spritePath) as TextureImporter; - importer.textureType = TextureImporterType.Sprite; - importer.spriteImportMode = SpriteImportMode.Multiple; - importer.spritesheet = new SpriteMetaData[] { new SpriteMetaData() { name = "topleft", pivot = Vector2.zero, rect = new Rect(0,0,16,16) }, - new SpriteMetaData() { name = "botright", pivot = Vector2.zero, rect = new Rect(16,16,16,16) }}; - importer.SaveAndReimport(); - AssetDatabase.ImportAsset(spritePath, ImportAssetOptions.ForceSynchronousImport | ImportAssetOptions.ForceUpdate); - AssetDatabase.Refresh(ImportAssetOptions.ForceUpdate | ImportAssetOptions.ForceSynchronousImport); - - var spriteEntry = settings.CreateOrMoveEntry(AssetDatabase.AssetPathToGUID(spritePath), group, false, false); - spriteEntry.address = "sprite"; - - - RunBuilder(settings, testType, suffix); - -#if ENABLE_SCENE_TESTS - EditorSceneManager.OpenScene(activeScenePath, OpenSceneMode.Single); -#endif - -#endif - } - catch (Exception e) - { - Debug.LogException(e); - } - } - -#if UNITY_EDITOR - static string CreateAsset(string assetPath, string objectName) - { - GameObject go = GameObject.CreatePrimitive(PrimitiveType.Cube); - go.name = objectName; - //this is to ensure that bundles are different for every run. - go.transform.localPosition = UnityEngine.Random.onUnitSphere; - - PrefabUtility.SaveAsPrefabAsset(go, assetPath); - UnityEngine.Object.DestroyImmediate(go, false); - return AssetDatabase.AssetPathToGUID(assetPath); - } - - - static void RunBuilder(AddressableAssetSettings settings, string testType, string suffix) - { - var buildContext = new AddressablesDataBuilderInput(settings); - buildContext.RuntimeSettingsFilename = "settings" + suffix + ".json"; - buildContext.RuntimeCatalogFilename = "catalog" + suffix + ".json"; - - foreach (var db in settings.DataBuilders) - { - var b = db as IDataBuilder; - if (b.GetType().Name != testType) - continue; - buildContext.PathFormat = "{0}Library/com.unity.addressables/{1}_" + testType + "_TEST_" + suffix + ".json"; - b.BuildData(buildContext); - } - } -#endif - } diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/AddressablesTestUtilities.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/AddressablesTestUtilities.cs.meta deleted file mode 100644 index 4bb9ae0e..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/AddressablesTestUtilities.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 58d7919bd300ea94c8bc969913548cd8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/AssetReferenceTestBehavior.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/AssetReferenceTestBehavior.cs deleted file mode 100644 index 20431317..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/AssetReferenceTestBehavior.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.AddressableAssets; - -public class AssetReferenceTestBehavior : MonoBehaviour -{ - public AssetReference Reference; - public AssetReference InValidAssetReference; - - public AssetLabelReference LabelReference; - public AssetLabelReference InvalidLabelReference; -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/AssetReferenceTestBehavior.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/AssetReferenceTestBehavior.cs.meta deleted file mode 100644 index 97fb46c1..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/AssetReferenceTestBehavior.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bfa3710e9aeaad547bae8719bd664926 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager.meta deleted file mode 100644 index a26dd067..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 0c2eb630b3a204847b868607a539fb4c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/Operations.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/Operations.meta deleted file mode 100644 index 72abbd92..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/Operations.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 6a7f04e028569f74e86bd76972ff7b2a -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/Operations/BaseOperationBehaviorTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/Operations/BaseOperationBehaviorTests.cs deleted file mode 100644 index a7787ac1..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/Operations/BaseOperationBehaviorTests.cs +++ /dev/null @@ -1,133 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using NUnit.Framework; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.ResourceProviders; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.TestTools; -using System.Linq; -using UnityEngine.TestTools.Constraints; - -namespace UnityEngine.ResourceManagement.Tests -{ - public class BaseOperationBehaviorTests - { - Action m_PrevHandler; - ResourceManager m_RM; - - [OneTimeSetUp] - public void OneTimeSetup() - { - m_PrevHandler = ResourceManager.ExceptionHandler; - ResourceManager.ExceptionHandler = null; - } - - [OneTimeTearDown] - public void OneTimeTeardown() - { - ResourceManager.ExceptionHandler = m_PrevHandler; - } - - [SetUp] - public void Setup() - { - m_RM = new ResourceManager(); - m_RM.CallbackHooksEnabled = false; // default for tests. disabled callback hooks. we will call update manually - } - - [TearDown] - public void TearDown() - { - Assert.Zero(m_RM.OperationCacheCount); - m_RM.Dispose(); - } - - [Test] - public void WhenReferenceCountReachesZero_DestroyCallbackInvoked() - { - var op = m_RM.CreateCompletedOperation(1, string.Empty); - int resultInDestroyCallback = 0; - op.Destroyed += (x) => resultInDestroyCallback = x.Convert().Result; - op.Release(); - Assert.AreEqual(1, resultInDestroyCallback); - } - - [Test] - public void WhileCompletedCallbackIsDeferredOnCompletedOperation_ReferenceCountIsHeld() - { - var op = m_RM.CreateCompletedOperation(1, string.Empty); - int refCount = op.ReferenceCount; - bool completedCalled = false; - op.Completed += (x) => completedCalled = true; // callback is deferred to next update - Assert.AreEqual(refCount + 1, op.ReferenceCount); - m_RM.Update(0.0f); - Assert.AreEqual(refCount, op.ReferenceCount); - Assert.AreEqual(true, completedCalled); - op.Release(); - } - - [Test] - public void WhenInDestroyCallback_IncrementAndDecrementReferenceCount_Throws() - { - var op = m_RM.CreateCompletedOperation(1, string.Empty); - int resultInDestroyCallback = 0; - Exception onInc = null; - Exception onDec = null; - op.Destroyed += (x) => - { - try { x.Acquire(); } - catch (Exception e) { onInc = e; } - try { x.Release(); } - catch (Exception e) { onDec = e; } - resultInDestroyCallback = x.Convert().Result; - }; - op.Release(); - Assert.NotNull(onInc); - Assert.NotNull(onDec); - } - - class MockOperation : AsyncOperationBase - { - public Action ExecuteCallback = () => { }; - protected override void Execute() - { - ExecuteCallback(); - } - } - - [Test] - public void WhenOperationHasDependency_ExecuteNotCalledUntilDependencyCompletes() - { - var op1 = new MockOperation(); - var op2 = new MockOperation(); - var handle1 = m_RM.StartOperation(op1, default(AsyncOperationHandle)); - op2.ExecuteCallback = () => { op2.Complete(0, true, string.Empty); }; - var handle2 = m_RM.StartOperation(op2, handle1); - m_RM.Update(0.0f); - Assert.AreEqual(false, handle2.IsDone); - op1.Complete(0, true, null); - Assert.AreEqual(true, handle2.IsDone); - handle1.Release(); - handle2.Release(); - } - - // TODO: - // public void WhenOperationHasDependency_AndDependencyFails_DependentOpStillExecutes() - - // Bad derived class behavior - // public void CustomOperation_WhenCompleteCalledBeforeStartOperation_ThrowsOperationDoesNotComplete - // public void CustomOperation_WhenCompleteCalledMultipleTimes_Throws - // public void CustomOperation_WhenProgressCallbackThrowsException_ErrorLoggedAndHandleReturnsZero - // public void CustomOperation_WhenDestroyThrowsException_ErrorLogged - // public void CustomOperation_WhenExecuteThrows_ErrorLoggedAndOperationSetAsFailed - - // TEST: Per operation update behavior - - // public void AsyncOperationHandle_WhenReleaseOnInvalidHandle_Throws - // public void AsyncOperationHandle_WhenConvertToIncompatibleHandleType_Throws - // - - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/Operations/BaseOperationBehaviorTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/Operations/BaseOperationBehaviorTests.cs.meta deleted file mode 100644 index 2f89b676..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/Operations/BaseOperationBehaviorTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4f6ca99e013fe6c49bb6b98f8ec1897b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/Operations/ProviderOperationTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/Operations/ProviderOperationTests.cs deleted file mode 100644 index ea653215..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/Operations/ProviderOperationTests.cs +++ /dev/null @@ -1,410 +0,0 @@ -using NUnit.Framework; -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.ResourceProviders; -using UnityEngine.ResourceManagement.Util; - -namespace UnityEngine.ResourceManagement.Tests -{ - public class ProviderOperationTests - { - MockProvider m_Provider; - MockProvider m_Provider2; - Action m_PrevHandler; - ResourceManager m_RM; - - [OneTimeSetUp] - public void OneTimeSetup() - { - m_PrevHandler = ResourceManager.ExceptionHandler; - ResourceManager.ExceptionHandler = null; - } - - [OneTimeTearDown] - public void OneTimeTeardown() - { - ResourceManager.ExceptionHandler = m_PrevHandler; - } - - private void ProvideBasicCallback(ProvideHandle provideHandle) - { - provideHandle.Complete(provideHandle.Location.InternalId, true, null); - } - - [SetUp] - public void Setup() - { - m_RM = new ResourceManager(); - m_RM.CallbackHooksEnabled = false; - - m_Provider = new MockProvider(); - m_Provider.ProvideCallback = ProvideBasicCallback; - m_Provider2 = new MockProvider(); - m_Provider2._ProviderId = "MockId2"; - m_Provider2.ProvideCallback = ProvideBasicCallback; - - m_RM.ResourceProviders.Add(m_Provider); - m_RM.ResourceProviders.Add(m_Provider2); - } - - [TearDown] - public void TearDown() - { - m_RM.ResourceProviders.Remove(m_Provider); - m_RM.ResourceProviders.Remove(m_Provider2); - Assert.Zero(m_RM.OperationCacheCount); - m_RM.Dispose(); - m_RM = null; - } - - [Test] - public void WhenDependency_ProvideCalledAfterDependencyFinishes() - { - ProvideHandle provideHandle = default(ProvideHandle); - m_Provider2.ProvideCallback = x => { provideHandle = x; }; - ResourceLocationBase depLoc = new ResourceLocationBase("dep", "dep", m_Provider2.ProviderId, typeof(object)); - ResourceLocationBase loc = new ResourceLocationBase("1", "1", m_Provider.ProviderId, typeof(object), depLoc); - var op = m_RM.ProvideResource(loc); - m_RM.Update(0.0f); - Assert.False(op.IsDone); - provideHandle.Complete(2, true, null); - m_RM.Update(0.0f); - Assert.True(op.IsDone); - op.Release(); - } - - [Test] - public void OnDestroyed_DepOpReleasedAndProviderReleased() - { - ResourceLocationBase depLoc = new ResourceLocationBase("dep", "dep", m_Provider2.ProviderId, typeof(object)); - ResourceLocationBase loc = new ResourceLocationBase("1", "1", m_Provider.ProviderId, typeof(object), depLoc); - ResourceLocationBase loc2 = new ResourceLocationBase("2", "2", m_Provider.ProviderId, typeof(object), depLoc); - var op1 = m_RM.ProvideResource(loc); - m_RM.Update(0.0f); - Assert.AreEqual(1, m_Provider2.ProvideLog.Count); - var op2 = m_RM.ProvideResource(loc2); - m_RM.Update(0.0f); - Assert.AreEqual(1, m_Provider2.ProvideLog.Count); - - Assert.AreEqual(2, m_Provider.ProvideLog.Count); - Assert.AreEqual(AsyncOperationStatus.Succeeded, op1.Status); - Assert.AreEqual(AsyncOperationStatus.Succeeded, op2.Status); - - // decrement the first op. the second op should still be holding the dependency - op1.Release(); - Assert.AreEqual(0, m_Provider2.ReleaseLog.Count); - - // decrement the second op. the dependency should now have been released - op2.Release(); - Assert.AreEqual(1, m_Provider2.ReleaseLog.Count); - - Assert.AreEqual(2, m_Provider.ReleaseLog.Count); - Assert.AreEqual(1, m_Provider2.ReleaseLog.Count); - } - - [Test] - public void WhenDependentOpFails_ProvideIsNotCalled() - { - ResourceLocationBase depLoc = new ResourceLocationBase("dep", "dep", "unknown provider", typeof(object)); - ResourceLocationBase loc = new ResourceLocationBase("1", "1", m_Provider.ProviderId, typeof(object), depLoc); - var op = m_RM.ProvideResource(loc); - m_RM.Update(0.0f); - Assert.AreEqual(AsyncOperationStatus.Failed, op.Status); - op.Release(); - Assert.AreEqual(0, m_Provider.ProvideLog.Count); - Assert.AreEqual(0, m_Provider.ReleaseLog.Count); - } - - [Test] - public void WhenDependentOpFails_AndProviderSupportsFailedDependencies_OperationContinues() - { - m_Provider._BehaviourFlags = ProviderBehaviourFlags.CanProvideWithFailedDependencies; - ResourceLocationBase depLoc = new ResourceLocationBase("dep", "dep", "unknown provider", typeof(object)); - ResourceLocationBase loc = new ResourceLocationBase("1", "1", m_Provider.ProviderId, typeof(object), depLoc); - var op = m_RM.ProvideResource(loc); - m_RM.Update(0.0f); - Assert.AreEqual(AsyncOperationStatus.Succeeded, op.Status); - Assert.AreEqual("1", op.Result); - op.Release(); - Assert.AreEqual(1, m_Provider.ProvideLog.Count); - Assert.AreEqual(1, m_Provider.ReleaseLog.Count); - } - - [Test] - public void WhenProviderCompletesInsideProvideCall_CallbackIsNotDeferred() - { - ResourceLocationBase depLoc = new ResourceLocationBase("dep", "dep", m_Provider2.ProviderId, typeof(object)); - ResourceLocationBase loc = new ResourceLocationBase("1", "1", m_Provider.ProviderId, typeof(object), depLoc); - ProvideHandle depHandle = new ProvideHandle(); - m_Provider2.ProvideCallback = (x) => { depHandle = x; }; - var op = m_RM.ProvideResource(loc); - - bool callbackCalled = false; - Assert.AreEqual(AsyncOperationStatus.None, op.Status); - op.Completed += x => callbackCalled = true; - - // mark dependency complete - depHandle.Complete(1, true, null); - Assert.IsTrue(callbackCalled); - - op.Release(); - } - - [Test] - public void WhenProviderCompletesOutsideProvideCall_CallbackIsImmediate() - { - ResourceLocationBase loc = new ResourceLocationBase("1", "1", m_Provider.ProviderId, typeof(object)); - ProvideHandle depHandle = new ProvideHandle(); - m_Provider.ProvideCallback = (x) => { depHandle = x; }; - var op = m_RM.ProvideResource(loc); - - bool callbackCalled = false; - Assert.AreEqual(AsyncOperationStatus.None, op.Status); - op.Completed += x => callbackCalled = true; - - // mark dependency complete - Assert.IsFalse(callbackCalled); - depHandle.Complete(1, true, null); - Assert.IsTrue(callbackCalled); - op.Release(); - } - - [Test] - public void UsingProviderHandleWithInvalidVersion_ThrowsException() - { - ResourceLocationBase loc = new ResourceLocationBase("1", "1", m_Provider.ProviderId, typeof(object)); - ProvideHandle handle = new ProvideHandle(); - m_Provider.ProvideCallback = (x) => { handle = x; }; - var op = m_RM.ProvideResource(loc); - handle.Complete(null, true, null); - Assert.Catch(() => handle.Complete(null, true, null), ProviderOperation.kInvalidHandleMsg); - Assert.Catch(() => handle.GetDependencies(new List()), ProviderOperation.kInvalidHandleMsg); - op.Release(); - } - - [Test] - public void GetDependency_InsertsDependenciesIntoList() - { - List deps = new List(); - ResourceLocationBase depLoc = new ResourceLocationBase("dep1", "dep1", m_Provider2.ProviderId, typeof(object)); - ResourceLocationBase depLoc2 = new ResourceLocationBase("dep2", "dep2", m_Provider2.ProviderId, typeof(object)); - ResourceLocationBase loc = new ResourceLocationBase("1", "1", m_Provider.ProviderId, typeof(object), depLoc, depLoc2); - m_Provider.ProvideCallback = (handle) => { handle.GetDependencies(deps); handle.Complete(0, true, null); }; - var op = m_RM.ProvideResource(loc); - m_RM.Update(0.0f); - - Assert.AreEqual(AsyncOperationStatus.Succeeded, op.Status); - Assert.AreEqual(deps[0], "dep1"); - Assert.AreEqual(deps[1], "dep2"); - op.Release(); - } - - class Type1 { } - class Type2 { } - - [Test] - public void WhenProviderCallsComplete_AndTypeIsIncorrect_Throws() - { - ResourceLocationBase loc = new ResourceLocationBase("1", "1", m_Provider.ProviderId, typeof(object)); - Exception testException = null; - m_Provider.ProvideCallback = (x) => - { - try - { - x.Complete(new Type2(), true, null); - } - catch(Exception e) - { - testException = e; - } - }; - var op = m_RM.ProvideResource(loc); - m_RM.Update(0.0f); - Assert.IsNotNull(testException); - Assert.AreEqual(AsyncOperationStatus.Failed, op.Status); - Assert.IsNull(op.Result); - Assert.IsTrue(op.OperationException.Message.Contains("Provider of type")); - op.Release(); - } - - [Test] - public void WhenProviderThrowsExceptionOnProvide_OperationFails() - { - ResourceLocationBase loc = new ResourceLocationBase("1", "1", m_Provider.ProviderId, typeof(object)); - m_Provider.ProvideCallback = (x) => { throw new Exception("I have failed"); }; - var op = m_RM.ProvideResource(loc); - m_RM.Update(0.0f); - - Assert.AreEqual(AsyncOperationStatus.Failed, op.Status); - op.Release(); - } - - [Test] - public void WhenProviderThrowsExceptionInProgressCallback_ProgressReturnsZero() - { - ResourceLocationBase loc = new ResourceLocationBase("1", "1", m_Provider.ProviderId, typeof(object)); - ProvideHandle handle = new ProvideHandle(); - bool didThrow = false; - m_Provider.ProvideCallback = (x) => - { - handle = x; - handle.SetProgressCallback(() => { didThrow = true; throw new Exception("I have failed"); }); - }; - var op = m_RM.ProvideResource(loc); - Assert.AreEqual(0.0f, op.PercentComplete); - Assert.True(didThrow); - handle.Complete(null, true, null); - op.Release(); - } - - public void ProvideWithoutSpecifiedType_UsesDefaultProviderType() - { - ResourceLocationBase depLoc = new ResourceLocationBase("dep", "dep", m_Provider2.ProviderId, typeof(object)); - ResourceLocationBase loc = new ResourceLocationBase("1", "1", m_Provider.ProviderId, typeof(object), depLoc); - ProvideHandle handle = default(ProvideHandle); - m_Provider2.ProvideCallback = (x) => { handle = x; }; - m_Provider2.DefaultType = typeof(Type2); - var op = m_RM.ProvideResource(loc); - - Assert.AreEqual(typeof(Type2), handle.Type); - handle.Complete(new Type2(), true, null); - op.Release(); - } - - void ProviderCompleteTypeTest(TResultType result, string exceptionMessage) - { - ResourceLocationBase loc = new ResourceLocationBase("1", "1", m_Provider.ProviderId, typeof(object)); - ProvideHandle handle = default(ProvideHandle); - m_Provider.ProvideCallback = (x) => - { - handle = x; - }; - var op = m_RM.ProvideResource(loc); - - if (string.IsNullOrEmpty(exceptionMessage)) - { - handle.Complete(result, true, null); - } - else - { - // TODO: assert contents of exception - Assert.Catch(() => handle.Complete(result, true, null)); - } - - Assert.True(op.IsDone); - op.Release(); - } - class Type3 : Type2 { } - - [Test] - public void ProvideHandle_CompleteWithExactType_Succeeds() - { - ProviderCompleteTypeTest(new Type2(), null); - } - - [Test] - public void ProvideHandle_CompleteWithDerivedTypeAsResult_Succeeds() - { - ProviderCompleteTypeTest(new Type3(), null); - } - - [Test] - public void ProvideHandle_CompleteWithBaseTypeAsResult_Succeeds() - { - ProviderCompleteTypeTest(new Type3(), null); - } - - [Test] - public void ProvideHandle_CompleteWithNullForReferencedType_Succeeds() - { - ProviderCompleteTypeTest(null, null); - } - - [Test] - public void ProvideHandle_CompleteWithNonAssignableType_Throws() - { - ProviderCompleteTypeTest(new Type1(), "Failed"); - } - - - [Test] - public void ProvideResource_WhenDependencyFailsToLoad_AndProviderCannotLoadWithFailedDependencies_ProvideNotCalled() - { - m_Provider.ProvideCallback = (pi) => { throw new Exception("This Should Not Have Been Called"); }; - m_RM.ResourceProviders.Add(m_Provider); - ResourceLocationBase locDep = new ResourceLocationBase("depasset", "depasset", "unkonwn", typeof(object)); - ResourceLocationBase locRoot = new ResourceLocationBase("rootasset", "rootasset", m_Provider.ProviderId, typeof(object), locDep); - AsyncOperationHandle op = m_RM.ProvideResource(locRoot); - m_RM.Update(0.0f); - Assert.AreEqual(AsyncOperationStatus.Failed, op.Status); - op.Release(); - } - - [Test] - public void ProvideResource_WhenDependencyFailsToLoad_AndProviderCanLoadWithFailedDependencies_ProviderStillProvides() - { - - m_Provider._BehaviourFlags = ProviderBehaviourFlags.CanProvideWithFailedDependencies; - m_Provider.ProvideCallback = (pi) => - { - pi.Complete(5, true, null); - }; - m_RM.ResourceProviders.Add(m_Provider); - ResourceLocationBase locDep = new ResourceLocationBase("depasset", "depasset", "unkonwn", typeof(object)); - ResourceLocationBase locRoot = new ResourceLocationBase("rootasset", "rootasset", m_Provider.ProviderId, typeof(object), locDep); - AsyncOperationHandle op = m_RM.ProvideResource(locRoot); - m_RM.Update(0.0f); - Assert.AreEqual(AsyncOperationStatus.Succeeded, op.Status); - Assert.AreEqual(5, op.Result); - op.Release(); - } - - [Test] - public void ProvideResources_CanLoadAndUnloadMultipleResources() - { - - m_Provider.ProvideCallback = (pi) => - { - pi.Complete(int.Parse(pi.Location.InternalId), true, null); - }; - m_RM.ResourceProviders.Add(m_Provider); - var locations = new List() { - new ResourceLocationBase("0", "0", m_Provider.ProviderId, typeof(object)), - new ResourceLocationBase("1", "1", m_Provider.ProviderId, typeof(object)), - }; - AsyncOperationHandle> op = m_RM.ProvideResources(locations); - m_RM.Update(0.0f); - for (int i = 0; i < locations.Count; i++) - { - Assert.AreEqual((int)op.Result[i], i); - } - op.Release(); - } - - [Test] - public void ProvideResource_CanLoadNestedDepdendencies() - { - m_Provider._BehaviourFlags = ProviderBehaviourFlags.CanProvideWithFailedDependencies; - List loadOrder = new List(); - m_Provider.ProvideCallback = (pi) => - { - loadOrder.Add(pi.Location); - pi.Complete(0, true, null); - }; - IResourceLocation i3 = new ResourceLocationBase("3", "3", m_Provider.ProviderId, typeof(object)); - IResourceLocation i2 = new ResourceLocationBase("2", "2", m_Provider.ProviderId, typeof(object), i3); - IResourceLocation i1 = new ResourceLocationBase("1", "1", m_Provider.ProviderId, typeof(object), i2); - var op = m_RM.ProvideResource(i1); - m_RM.Update(0.0f); - Assert.AreEqual(5, m_RM.OperationCacheCount); - Assert.AreSame(i3, loadOrder[0]); - Assert.AreSame(i2, loadOrder[1]); - Assert.AreSame(i1, loadOrder[2]); - op.Release(); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/Operations/ProviderOperationTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/Operations/ProviderOperationTests.cs.meta deleted file mode 100644 index 6ef7111b..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/Operations/ProviderOperationTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d07c590681843734482b565ad928be3e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerBaseTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerBaseTests.cs deleted file mode 100644 index 20599136..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerBaseTests.cs +++ /dev/null @@ -1,192 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Threading.Tasks; -using NUnit.Framework; -using UnityEditor; -using UnityEngine; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.ResourceProviders; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.SceneManagement; -using UnityEngine.TestTools; - -namespace UnityEngine.ResourceManagement.Tests -{ - public abstract class ResourceManagerBaseTests - { - const int kAssetCount = 25; - protected string RootFolder { get { return string.Format("Assets/{0}_AssetsToDelete", GetType().Name); } } - List m_Locations = new List(); - protected virtual string AssetPathPrefix { get { return ""; } } - - protected abstract IResourceLocation[] SetupLocations(KeyValuePair [] assets); - string GetAssetPath(int i) - { - return RootFolder + "/" + AssetPathPrefix + "asset" + i + ".prefab"; - } - - protected ResourceManager m_ResourceManager; - - - [OneTimeTearDown] - public void Cleanup() - { - m_ResourceManager.Dispose(); -#if UNITY_EDITOR - AssetDatabase.DeleteAsset(RootFolder); -#endif - } - - [OneTimeSetUp] - public void OneTimeSetup() - { - m_ResourceManager = new ResourceManager(); -#if UNITY_EDITOR - AssetDatabase.StartAssetEditing(); - for (int i = 0; i < kAssetCount; i++) - { - GameObject go = GameObject.CreatePrimitive(PrimitiveType.Cube); - go.name = "asset" + i; - var assetPath = GetAssetPath(i); - if (!Directory.Exists(Path.GetDirectoryName(assetPath))) - Directory.CreateDirectory(Path.GetDirectoryName(assetPath)); - -#if UNITY_2018_3_OR_NEWER - PrefabUtility.SaveAsPrefabAsset(go, assetPath); -#else - PrefabUtility.CreatePrefab(assetPath, go); -#endif - Object.DestroyImmediate(go, false); - } - - AssetDatabase.StopAssetEditing(); -#endif - - var assetList = new List>(); - for (int i = 0; i < kAssetCount; i++) - assetList.Add(new KeyValuePair("asset" + i, GetAssetPath(i))); - - m_Locations.AddRange(SetupLocations(assetList.ToArray())); - } - - [SetUp] - public void SetUp() - { - Assert.Zero(m_ResourceManager.OperationCacheCount); - } - - [TearDown] - public void TearDown() - { - Assert.Zero(m_ResourceManager.OperationCacheCount); - } - - [UnityTest] - public IEnumerator CanProvideWithCallback() - { - GameObject[] goResult = new GameObject[] { null }; - bool []wasCallbackCalled = new bool[] { false }; - var op = m_ResourceManager.ProvideResource(m_Locations[0]); - op.Completed += (x) => { wasCallbackCalled[0] = true; goResult[0] = x.Result; }; - yield return op; - Assert.IsTrue(wasCallbackCalled[0]); - op.Release(); - } - - private void Op_Completed(AsyncOperationHandle obj) - { - throw new NotImplementedException(); - } - - [UnityTest] - public IEnumerator CanProvideWithYield() - { - var op = m_ResourceManager.ProvideResource(m_Locations[0]); - yield return op; - Assert.IsNotNull(op.Result); - op.Release(); - } - - [UnityTest] - public IEnumerator CanProvideMultipleResources() - { - AsyncOperationHandle> op = m_ResourceManager.ProvideResources(m_Locations); - yield return op; - Assert.AreEqual(op.Result.Count, m_Locations.Count); - op.Release(); - } - - class AsyncComponent : MonoBehaviour - { - public ResourceManager resourceManager; - public IResourceLocation location; - public GameObject result; - public bool done = false; - public AsyncOperationHandle operation; - async void Start() - { - operation = resourceManager.ProvideResource(location); - await operation.Task; - result = operation.Result; - done = true; - } - } - - - [UnityTest] - public IEnumerator AsyncOperationHandle_Await_BlocksUntilCompletion() - { - var go = new GameObject("test", typeof(AsyncComponent)); - var comp = go.GetComponent(); - comp.resourceManager = m_ResourceManager; - comp.location = m_Locations[0]; - while(!comp.done) - yield return null; - Assert.IsNotNull(comp.result); - comp.operation.Release(); - GameObject.Destroy(go); - } - - class AsyncAwaitMultipleComponent : MonoBehaviour - { - public ResourceManager resourceManager; - public IResourceLocation location; - public GameObject result; - public bool done = false; - public AsyncOperationHandle operation; - async void Start() - { - operation = resourceManager.ProvideResource(location); - await operation.Task; - result = operation.Result; - await operation.Task; - await operation.Task; - done = true; - } - } - - [UnityTest] - public IEnumerator WhenAsyncOperationIsDone_TaskIsCompleted() - { - // Setup - var go = new GameObject("test", typeof(AsyncAwaitMultipleComponent)); - var comp = go.GetComponent(); - comp.resourceManager = m_ResourceManager; - comp.location = m_Locations[0]; - - // Test - while (!comp.done) - yield return null; - Assert.IsNotNull(comp.result); - Assert.True(comp.operation.PercentComplete == 1 && comp.operation.IsDone); - Assert.True(comp.operation.Task.IsCompleted); - - // Cleanup - comp.operation.Release(); - GameObject.Destroy(go); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerBaseTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerBaseTests.cs.meta deleted file mode 100644 index dd2e5a7a..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerBaseTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: de4318cbbab37fa40bc08ac8c2f51a9b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerFastModeTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerFastModeTests.cs deleted file mode 100644 index 7bb76b36..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerFastModeTests.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.ResourceProviders; - -#if UNITY_EDITOR -namespace UnityEngine.ResourceManagement.Tests -{ - public class ResourceManagerFastModeTests : ResourceManagerBaseTests - { - protected override IResourceLocation[] SetupLocations(KeyValuePair[] assets) - { - IResourceLocation[] locs = new IResourceLocation[assets.Length]; - for (int i = 0; i < locs.Length; i++) - locs[i] = CreateLocationForAsset(assets[i].Key, assets[i].Value); - m_ResourceManager.ResourceProviders.Add(new AssetDatabaseProvider()); - return locs; - } - IResourceLocation CreateLocationForAsset(string name, string path) - { - return new ResourceLocationBase(name, path, typeof(AssetDatabaseProvider).FullName, typeof(UnityEngine.Object)); - } - } -} -#endif diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerFastModeTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerFastModeTests.cs.meta deleted file mode 100644 index 9c40d396..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerFastModeTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f6d71bdd364b36340962d0eb7f11980c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerLegacyModeTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerLegacyModeTests.cs deleted file mode 100644 index 98e9c40e..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerLegacyModeTests.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.ResourceProviders; -using System.IO; - - -#if UNITY_EDITOR -namespace UnityEngine.ResourceManagement.Tests -{ - public class ResourceManagerTestsLegacy : ResourceManagerBaseTests - { - protected override string AssetPathPrefix { get { return "Resources/"; } } - protected IResourceLocation CreateLocationForAsset(string name, string path) - { - return new ResourceLocationBase(name, Path.GetFileNameWithoutExtension(path), typeof(LegacyResourcesProvider).FullName, typeof(UnityEngine.Object)); - } - - protected override IResourceLocation[] SetupLocations(KeyValuePair[] assets) - { - IResourceLocation[] locs = new IResourceLocation[assets.Length]; - for (int i = 0; i < locs.Length; i++) - locs[i] = CreateLocationForAsset(assets[i].Key, assets[i].Value); - m_ResourceManager.ResourceProviders.Add(new LegacyResourcesProvider()); - return locs; - } - } -} -#endif diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerLegacyModeTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerLegacyModeTests.cs.meta deleted file mode 100644 index 71ce9758..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerLegacyModeTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a6e1ac52851690b48bdf019059b98207 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerPackedModeTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerPackedModeTests.cs deleted file mode 100644 index ce9eddbd..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerPackedModeTests.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System; - -namespace UnityEngine.ResourceManagement.Tests { - public class ResourceManagerPackedModeTests - { - //TODO: implement tests that create bundles - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerPackedModeTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerPackedModeTests.cs.meta deleted file mode 100644 index e8056b1c..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerPackedModeTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bf2de0e8cc0a18b4d8887aad8e168377 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerTests.cs deleted file mode 100644 index 5b6446b5..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerTests.cs +++ /dev/null @@ -1,264 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using NUnit.Framework; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.ResourceProviders; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.TestTools; -using System.Linq; -using UnityEngine.TestTools.Constraints; - -namespace UnityEngine.ResourceManagement.Tests -{ - public class ResourceManagerTests - { - Action m_PrevHandler; - - [OneTimeSetUp] - public void OneTimeSetup() - { - m_PrevHandler = ResourceManager.ExceptionHandler; - ResourceManager.ExceptionHandler = null; - } - - [OneTimeTearDown] - public void OneTimeTeardown() - { - ResourceManager.ExceptionHandler = m_PrevHandler; - } - - ResourceManager m_ResourceManager; - [SetUp] - public void Setup() - { - m_ResourceManager = new ResourceManager(); - m_ResourceManager.CallbackHooksEnabled = false; // default for tests. disabled callback hooks. we will call update manually - } - - [TearDown] - public void TearDown() - { - Assert.Zero(m_ResourceManager.OperationCacheCount); - m_ResourceManager.Dispose(); - } - - class TestUpdateReceiver : IUpdateReceiver - { - public bool invoked = false; - public void Update(float unscaledDeltaTime) - { - invoked = true; - } - } - - [Test] - public void WhenIUpdateReceiverAdded_CallbackIsInvoked() - { - var ur = new TestUpdateReceiver(); - m_ResourceManager.AddUpdateReceiver(ur); - m_ResourceManager.Update(0); - Assert.IsTrue(ur.invoked); - m_ResourceManager.RemoveUpdateReciever(ur); - ur.invoked = false; - m_ResourceManager.Update(0); - Assert.IsFalse(ur.invoked); - } - - class TestUpdateReceiverThatRemovesSelfDuringUpdate : IUpdateReceiver - { - public ResourceManager rm; - public bool removeSelf; - public int updateCount = 0; - public void Update(float unscaledDeltaTime) - { - updateCount++; - if (removeSelf) - rm.RemoveUpdateReciever(this); - } - } - - [Test] - public void WhenIUpdateReceiverRemovesSelfDuringCallback_ListIsMaintained() - { - var ur1 = new TestUpdateReceiverThatRemovesSelfDuringUpdate() { rm = m_ResourceManager, removeSelf = false }; - var ur2 = new TestUpdateReceiverThatRemovesSelfDuringUpdate() { rm = m_ResourceManager, removeSelf = true }; - var ur3 = new TestUpdateReceiverThatRemovesSelfDuringUpdate() { rm = m_ResourceManager, removeSelf = false }; - m_ResourceManager.AddUpdateReceiver(ur1); - m_ResourceManager.AddUpdateReceiver(ur2); - m_ResourceManager.AddUpdateReceiver(ur3); - m_ResourceManager.Update(0); - Assert.AreEqual(1, ur1.updateCount); - Assert.AreEqual(1, ur2.updateCount); - Assert.AreEqual(1, ur3.updateCount); - m_ResourceManager.Update(0); - Assert.AreEqual(2, ur1.updateCount); - Assert.AreEqual(1, ur2.updateCount); - Assert.AreEqual(2, ur3.updateCount); - m_ResourceManager.RemoveUpdateReciever(ur1); - m_ResourceManager.RemoveUpdateReciever(ur3); - } - - class IntOperation : AsyncOperationBase - { - string msg = "msg"; - protected override void Execute() - { - Complete(0, true, msg); - } - } - - [Test] - public void WhenOperationReturnsValueType_NoGCAllocs() - { - var op = new IntOperation(); - Assert.That(() => - { - var handle = m_ResourceManager.StartOperation(op, default); - handle.Release(); - }, TestTools.Constraints.Is.Not.AllocatingGCMemory(), "GC Allocation detected"); - } - - [Test] - public void WhenProviderImplementsIReceiverUpdate_UpdateIsCalledWhileInProviderList() - { - MockProvider provider = new MockProvider(); - m_ResourceManager.ResourceProviders.Add(provider); - m_ResourceManager.Update(0.0f); - Assert.AreEqual(1, provider.UpdateCount); - - // Update isn't called after removing provider - m_ResourceManager.ResourceProviders.Remove(provider); - m_ResourceManager.Update(0.0f); - Assert.AreEqual(1, provider.UpdateCount); - } - - [UnityTest] - public IEnumerator WhenResourceManagerCallbackHooksAreEnabled_ResourceManagerUpdatesProvidersAndCleansUp() - { - int beforeGOCount = GameObject.FindObjectsOfType().Length; - MockProvider provider = new MockProvider(); - m_ResourceManager.CallbackHooksEnabled = true; - m_ResourceManager.ResourceProviders.Add(provider); - yield return null; - Assert.AreEqual(1, provider.UpdateCount); - Assert.AreEqual(beforeGOCount+1, GameObject.FindObjectsOfType().Length); - m_ResourceManager.Dispose(); - yield return null; - Assert.AreEqual(beforeGOCount, GameObject.FindObjectsOfType().Length); - } - - - class MockInstanceProvider : IInstanceProvider - { - public Func, InstantiationParameters, GameObject> ProvideInstanceCallback; - public Action ReleaseInstanceCallback; - public GameObject ProvideInstance(ResourceManager rm, AsyncOperationHandle prefabHandle, InstantiationParameters instantiateParameters) - { - return ProvideInstanceCallback(rm, prefabHandle, instantiateParameters); - } - - public void ReleaseInstance(ResourceManager rm, GameObject instance) - { - ReleaseInstanceCallback(rm, instance); - } - } - - class GameObjectProvider : IResourceProvider - { - public string ProviderId { get { return "GOPRovider"; } } - - public ProviderBehaviourFlags BehaviourFlags { get { return ProviderBehaviourFlags.None; } } - - public bool CanProvide(Type t, IResourceLocation location) - { - return t == typeof(GameObject); - } - - public Type GetDefaultType(IResourceLocation location) - { - return typeof(GameObject); - } - - public bool Initialize(string id, string data) { return true; } - - public void Provide(ProvideHandle provideHandle) - { - var result = new GameObject(provideHandle.Location.InternalId); - provideHandle.Complete(result, true, null); - } - - public void Release(IResourceLocation location, object asset) - { - GameObject.Destroy((GameObject)asset); - } - } - - - [Test] - public void ReleaseInstance_BeforeDependencyCompletes_InstantiatesAndReleasesAfterDependencyCompletes() - { - var prefabProv = new MockProvider(); - ProvideHandle[] provHandle = new ProvideHandle[1]; - prefabProv.ProvideCallback = h => provHandle[0] = h; - m_ResourceManager.ResourceProviders.Add(prefabProv); - - ResourceLocationBase locDep = new ResourceLocationBase("prefab", "prefab1", prefabProv.ProviderId, typeof(UnityEngine.GameObject)); - var iProvider = new MockInstanceProvider(); - bool provideCalled = false; - bool releaseCalled = false; - iProvider.ProvideInstanceCallback = (rm, prefabHandle, iParam) => - { - provideCalled = true; - prefabHandle.Release(); - return null; - }; - iProvider.ReleaseInstanceCallback = (rm, go) => - { - releaseCalled = true; - }; - var instHandle = m_ResourceManager.ProvideInstance(iProvider, locDep, default(InstantiationParameters)); - Assert.IsFalse(instHandle.IsDone); - m_ResourceManager.Release(instHandle); - Assert.IsTrue(instHandle.IsValid()); - Assert.IsFalse(provideCalled); - Assert.IsFalse(releaseCalled); - provHandle[0].Complete(null, true, null); - Assert.IsTrue(provideCalled); - Assert.IsTrue(releaseCalled); - } - - - // TODO: - // To test: release via operation, - // Edge cases: game object fails to load, callback throws exception, Release called on handle before operation completes - // - [Test] - public void ProvideInstance_CanProvide() - { - m_ResourceManager.ResourceProviders.Add(new GameObjectProvider()); - ResourceLocationBase locDep = new ResourceLocationBase("prefab", "prefab1", "GOPRovider", typeof(UnityEngine.GameObject)); - - MockInstanceProvider iProvider = new MockInstanceProvider(); - InstantiationParameters instantiationParameters = new InstantiationParameters(null, true); - AsyncOperationHandle []refResource = new AsyncOperationHandle[1]; - iProvider.ProvideInstanceCallback = (rm, prefabHandle, iParam) => - { - refResource[0] = prefabHandle; - Assert.AreEqual("prefab1", prefabHandle.Result.name); - return new GameObject("instance1"); - }; - iProvider.ReleaseInstanceCallback = (rm, go) => { rm.Release(refResource[0]); GameObject.Destroy(go); }; - - AsyncOperationHandle obj = m_ResourceManager.ProvideInstance(iProvider, locDep, instantiationParameters); - m_ResourceManager.Update(0.0f); - Assert.AreEqual(AsyncOperationStatus.Succeeded, obj.Status); - Assert.AreEqual("instance1", obj.Result.name); - Assert.AreEqual(1, m_ResourceManager.OperationCacheCount); - obj.Release(); - } - - - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerTests.cs.meta deleted file mode 100644 index 449cd54f..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: aaa68dbe5d4e2b24281d446a29c84c78 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerUtilityTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerUtilityTests.cs deleted file mode 100644 index 29dfaa6e..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerUtilityTests.cs +++ /dev/null @@ -1,194 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using NUnit.Framework; -using UnityEngine.ResourceManagement.Util; -using UnityEngine.TestTools; -using UnityEngine.TestTools.Constraints; - -namespace UnityEngine.ResourceManagement.Tests -{ - public class DelayedActionManagerTests - { - - class DamTest - { - public bool methodInvoked; - public int frameInvoked; - public float timeInvoked; - public void Method() - { - frameInvoked = Time.frameCount; - timeInvoked = Time.unscaledTime; - methodInvoked = true; - } - - public void MethodWithParams(int p1, string p2, bool p3, float p4) - { - Assert.AreEqual(p1, 5); - Assert.AreEqual(p2, "testValue"); - Assert.AreEqual(p3, true); - Assert.AreEqual(p4, 3.14f); - } - - } - - [UnityTest] - public IEnumerator DelayedActionManagerInvokeSameFrame() - { - var testObj = new DamTest(); - int frameCalled = Time.frameCount; - DelayedActionManager.AddAction((Action)testObj.Method); - yield return null; - Assert.AreEqual(frameCalled, testObj.frameInvoked); - } - - [UnityTest] - public IEnumerator DelayedActionManagerInvokeDelayed() - { - var testObj = new DamTest(); - float timeCalled = Time.unscaledTime; - DelayedActionManager.AddAction((Action)testObj.Method, 2); - while(!testObj.methodInvoked) - yield return null; - //make sure delay was at least 1 second (to account for test slowness) - Assert.Greater(testObj.timeInvoked, timeCalled + 1); - } - - [UnityTest] - public IEnumerator DelayedActionManagerInvokeWithParameters() - { - var testObj = new DamTest(); - DelayedActionManager.AddAction((Action)testObj.MethodWithParams, 0, 5, "testValue", true, 3.14f); - yield return null; - } - } - - public class LinkedListNodeCacheTests - { - LinkedListNodeCache CreateCache(int count) - { - var cache = new LinkedListNodeCache(); - var temp = new List>(); - for (int i = 0; i < count; i++) - temp.Add(cache.Acquire(default(T))); - Assert.AreEqual(count, cache.CreatedNodeCount); - foreach (var t in temp) - cache.Release(t); - Assert.AreEqual(count, cache.CachedNodeCount); - return cache; - } - - void PopulateCache_AddRemove() - { - var cache = CreateCache(1); - Assert.That(() => - { - cache.Release(cache.Acquire(default(T))); - }, TestTools.Constraints.Is.Not.AllocatingGCMemory(), "GC Allocation detected"); - Assert.AreEqual(1, cache.CreatedNodeCount); - Assert.AreEqual(1, cache.CachedNodeCount); - } - - [Test] - public void WhenRefTypeAndCacheNotEmpty_AddRemove_DoesNotAlloc() - { - PopulateCache_AddRemove(); - } - - [Test] - public void WhenValueTypeAndCacheNotEmpty_AddRemove_DoesNotAlloc() - { - PopulateCache_AddRemove(); - } - - [Test] - public void Release_ResetsValue() - { - var cache = new LinkedListNodeCache(); - var node = cache.Acquire(null); - Assert.IsNull(node.Value); - node.Value = "TestString"; - cache.Release(node); - Assert.IsNull(node.Value); - } - } - - public class DelegateListTests - { - [Test] - public void WhenDelegateRemoved_DelegateIsNotInvoked() - { - var cache = new LinkedListNodeCache>(); - var delList = new DelegateList(cache.Acquire, cache.Release); - bool called = false; - Action del = s => { called = true; }; - delList.Add(del); - delList.Remove(del); - delList.Invoke(null); - Assert.IsFalse(called); - Assert.AreEqual(cache.CreatedNodeCount, cache.CreatedNodeCount); - } - - [Test] - public void WhenAddInsideInvoke_NewDelegatesAreCalled() - { - bool addedDelegateCalled = false; - var delList = CreateDelegateList(); - delList.Add(s => delList.Add(s2 => addedDelegateCalled = true)); - delList.Invoke(null); - Assert.IsTrue(addedDelegateCalled); - } - - [Test] - public void WhenCleared_DelegateIsNotInvoked() - { - var delList = CreateDelegateList(); - int invocationCount = 0; - delList.Add(s => invocationCount++); - delList.Clear(); - delList.Invoke(null); - Assert.AreEqual(0, invocationCount); - } - - [Test] - public void DuringInvoke_CanRemoveNextDelegate() - { - var delList = CreateDelegateList(); - bool del1Called = false; - Action del1 = s => { del1Called = true; }; - Action del2 = s => delList.Remove(del1); - delList.Add(del2); - delList.Add(del1); - delList.Invoke(null); - Assert.IsFalse(del1Called); - } - - DelegateList CreateDelegateList() - { - var cache = new LinkedListNodeCache>(); - return new DelegateList(cache.Acquire, cache.Release); - } - void InvokeAllocTest(T p) - { - var delList = CreateDelegateList(); - delList.Add(s => { }); - Assert.That(() => - { - delList.Invoke(p); - }, TestTools.Constraints.Is.Not.AllocatingGCMemory(), "GC Allocation detected"); - } - - [Test] - public void DelegateNoGCWithRefType() - { - InvokeAllocTest(null); - } - - [Test] - public void DelegateNoGCWithValueType() - { - InvokeAllocTest(0); - } - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerUtilityTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerUtilityTests.cs.meta deleted file mode 100644 index 438136bf..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerUtilityTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 89f8257facdc8e04fbf8eefd512ee6a9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerVirtualModeTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerVirtualModeTests.cs deleted file mode 100644 index 576abc55..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerVirtualModeTests.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor; -using UnityEngine; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.ResourceProviders; - -#if UNITY_EDITOR -using UnityEngine.ResourceManagement.ResourceProviders.Simulation; -#endif - -#if UNITY_EDITOR -namespace UnityEngine.ResourceManagement.Tests -{ - public class ResourceManagerVirtualModeTests : ResourceManagerBaseTests - { - VirtualAssetBundleRuntimeData virtualBundleData = null; - List sharedBundleLocations = null; - Dictionary bundleMap = null; - const int kBundleCount = 10; - - protected override IResourceLocation[] SetupLocations(KeyValuePair[] assets) - { - Random.InitState(0); - virtualBundleData = new VirtualAssetBundleRuntimeData(); - sharedBundleLocations = new List(); - bundleMap = new Dictionary(); - for (int i = 0; i < kBundleCount; i++) - { - var bundleName = "shared" + i; - var b = new VirtualAssetBundle("shared" + i, i % 2 == 0, 0, ""); - virtualBundleData.AssetBundles.Add(b); - bundleMap.Add(b.Name, b); - sharedBundleLocations.Add(new ResourceLocationBase(bundleName, bundleName, typeof(AssetBundleProvider).FullName, typeof(IAssetBundleResource))); - } - - IResourceLocation []locs = new IResourceLocation[assets.Length]; - for(int i = 0; i < locs.Length;i++) - locs[i] = CreateLocationForAsset(assets[i].Key, assets[i].Value); - - foreach (var b in virtualBundleData.AssetBundles) - { - b.SetSize(2048, 1024); - b.OnAfterDeserialize(); - } - m_ResourceManager.ResourceProviders.Insert(0, new VirtualAssetBundleProvider(virtualBundleData)); - m_ResourceManager.ResourceProviders.Insert(0, new VirtualBundledAssetProvider()); - return locs; - } - - - protected IResourceLocation CreateLocationForAsset(string name, string path) - { - int sharedBundleIndex = 0; - Random.Range(0, sharedBundleLocations.Count-3); - IResourceLocation bundle = sharedBundleLocations[sharedBundleIndex]; - VirtualAssetBundle vBundle = bundleMap[bundle.InternalId]; - vBundle.Assets.Add(new VirtualAssetBundleEntry(path, Random.Range(1024, 1024 * 1024))); - IResourceLocation dep1Location = sharedBundleLocations[sharedBundleIndex+1]; - IResourceLocation dep2Location = sharedBundleLocations[sharedBundleIndex+2]; - return new ResourceLocationBase(name, path, typeof(BundledAssetProvider).FullName, typeof(object), bundle, dep1Location, dep2Location); - } - } -} -#endif - diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerVirtualModeTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerVirtualModeTests.cs.meta deleted file mode 100644 index 8cb7081b..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/ResourceManagerVirtualModeTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4c30a288c553aa7488774857f37eee83 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/TestUtil.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/TestUtil.meta deleted file mode 100644 index b9f35be0..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/TestUtil.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3e098a01716164d41a666ccd8d2c1cf5 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/TestUtil/MockProvider.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/TestUtil/MockProvider.cs deleted file mode 100644 index 8a22d8d4..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/TestUtil/MockProvider.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.ResourceProviders; - -namespace UnityEngine.ResourceManagement.Tests -{ - class MockProvider : IResourceProvider, IUpdateReceiver - { - public string _ProviderId = "MockProvider"; - public ProviderBehaviourFlags _BehaviourFlags = ProviderBehaviourFlags.None; - public List> ReleaseLog = new List>(); - public List ProvideLog = new List(); - - public int UpdateCount = 0; - - public string ProviderId { get { return _ProviderId; } } - - public ProviderBehaviourFlags BehaviourFlags { get { return _BehaviourFlags; } } - - public Action ProvideCallback; - public Type DefaultType = typeof(object); - - public Func CanProvideCallback = (x, y) => true; - - public void Update(float unscaledDeltaTime) - { - UpdateCount++; - } - - public void Release(IResourceLocation location, object asset) - { - ReleaseLog.Add(new KeyValuePair(location, asset)); - } - - public void Provide(ProvideHandle provideHandle) - { - ProvideLog.Add(provideHandle.Location); - if (ProvideCallback != null && (ProvideCallback as Action) != null) - { - ProvideCallback(provideHandle); - return; - } - throw new NotImplementedException(); - } - - public Type GetDefaultType(IResourceLocation location) - { - return DefaultType; - } - - public bool CanProvide(Type t, IResourceLocation location) - { - return CanProvideCallback(t, location); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/TestUtil/MockProvider.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/TestUtil/MockProvider.cs.meta deleted file mode 100644 index d66a8a82..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/TestUtil/MockProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: df92c48909f708647b98ae363e7618d8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/Unity.ResourceManager.Tests.asmdef b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/Unity.ResourceManager.Tests.asmdef deleted file mode 100644 index 7c132020..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/Unity.ResourceManager.Tests.asmdef +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "Unity.ResourceManager.Tests", - "references": [ - "Unity.ResourceManager" - ], - "optionalUnityReferences": [ - "TestAssemblies" - ] -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/Unity.ResourceManager.Tests.asmdef.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/Unity.ResourceManager.Tests.asmdef.meta deleted file mode 100644 index 49142936..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/Unity.ResourceManager.Tests.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: b1d1d33334b51724b9bc4457a3ebd9ee -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/VirtualAssetBundleProviderTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/VirtualAssetBundleProviderTests.cs deleted file mode 100644 index 5170bb52..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/VirtualAssetBundleProviderTests.cs +++ /dev/null @@ -1,139 +0,0 @@ -using NUnit.Framework; -using System; -using System.Collections.Generic; -using UnityEditor; -using UnityEngine; -using System.Linq; -using UnityEngine.ResourceManagement.AsyncOperations; -using UnityEngine.ResourceManagement.ResourceLocations; -using UnityEngine.ResourceManagement.ResourceProviders; -using UnityEngine.TestTools; -using System.Collections; - -#if UNITY_EDITOR -using UnityEngine.ResourceManagement.ResourceProviders.Simulation; -#endif - -#if UNITY_EDITOR -namespace UnityEngine.ResourceManagement.Tests -{ - [TestFixture] - public class VirtualAssetBundleProviderTests - { - Action m_PrevHandler; - [OneTimeSetUp] - public void OneTimeSetup() - { - m_PrevHandler = ResourceManager.ExceptionHandler; - ResourceManager.ExceptionHandler = null; - } - - [OneTimeTearDown] - public void OneTimeTeardown() - { - ResourceManager.ExceptionHandler = m_PrevHandler; - } - - private ResourceLocationBase AddNewBundle(VirtualAssetBundleRuntimeData data, string bundleName, bool local, int dataSize, int headerSize) - { - VirtualAssetBundle bundle = new VirtualAssetBundle(bundleName, local, 0, ""); - bundle.SetSize(dataSize, headerSize); - data.AssetBundles.Add(bundle); - ResourceLocationBase bundleLocation = new ResourceLocationBase(bundleName, bundleName, typeof(AssetBundleProvider).FullName, typeof(IAssetBundleResource)); - bundle.SetSize(dataSize, headerSize); - return bundleLocation; - } - - private List CreateBundleSet(VirtualAssetBundleRuntimeData data, int count, bool local, int dataSize, int headerSize) - { - List locations = new List(); - for (int i = 0; i < count; i++) - locations.Add(AddNewBundle(data, "bundle" + i.ToString(), local, dataSize, headerSize)); - return locations; - } - - [Test] - public void WhenMultipleBundlesLoading_BandwidthIsAmortizedAcrossAllBundles([Values(true, false)]bool localBundles) - { - const int kBundleCount = 4; - const int kLocalBW = 800; - const int kRemoteBW = 2000; - const int kHeaderSize = 2000; - const int kDataSize = 4000; - const float kTimeSlize = 0.5f; - - int kUpdatesForRemoteDownload = (int)Math.Ceiling((((kDataSize * kBundleCount) / kRemoteBW) / kTimeSlize)); - int kUpdatesLocalLoad = (int)Math.Ceiling((((kHeaderSize * kBundleCount) / kLocalBW) / kTimeSlize)); - - ResourceManager rm = new ResourceManager(); - rm.CallbackHooksEnabled = false; - - VirtualAssetBundleRuntimeData data = new VirtualAssetBundleRuntimeData(kLocalBW, kRemoteBW); - List locations = CreateBundleSet(data, kBundleCount, localBundles, kDataSize, kHeaderSize); - VirtualAssetBundleProvider provider = new VirtualAssetBundleProvider(data); - rm.ResourceProviders.Add(provider); - var ops = new List>(); - foreach(IResourceLocation loc in locations ) - ops.Add(rm.ProvideResource(loc)); - - - int totalUpdatesNeeded = kUpdatesLocalLoad + (localBundles ? 0 : kUpdatesForRemoteDownload); - for (int i = 0; i < totalUpdatesNeeded; i++) - { - foreach(AsyncOperationHandle op in ops) - { - Assert.IsFalse(op.IsDone); - Assert.Less(op.PercentComplete, 1.0f); - } - provider.Update(kTimeSlize); - } - - foreach(var op in ops) - { - Assert.IsTrue(op.IsDone); - Assert.AreEqual(1.0f, op.PercentComplete); - Assert.AreEqual(AsyncOperationStatus.Succeeded, op.Status); - op.Release(); - } - - Assert.Zero(rm.OperationCacheCount); - rm.Dispose(); - } - - [UnityTest] - public IEnumerator WhenLoadingUnknownBundle_OperationFailsWithMessage() - { - ResourceManager rm = new ResourceManager(); - rm.CallbackHooksEnabled = false; - - VirtualAssetBundleRuntimeData data = new VirtualAssetBundleRuntimeData(); - VirtualAssetBundleProvider provider = new VirtualAssetBundleProvider(data); - rm.ResourceProviders.Add(provider); - ResourceLocationBase unknownLocation = new ResourceLocationBase("unknown", "unknown", typeof(AssetBundleProvider).FullName, typeof(IAssetBundleResource)); - var op = rm.ProvideResource(unknownLocation); - // wait for delayed action manager. - // TODO: refactor delayed action manager so we can pump it instead of waiting a frame - yield return null; - Assert.AreEqual(AsyncOperationStatus.Failed, op.Status); - StringAssert.Contains("Unable to unload virtual bundle", op.OperationException.Message); - op.Release(); - - Assert.Zero(rm.OperationCacheCount); - rm.Dispose(); - } - - [Test] - public void WhenInBundleLoadCompleteCallback_CanLoadAnotherBundle() - { - // TODO - } - - [Test] - public void WhenInBundleLoadCompleteCallback_CanUnloadAnotherBundle() - { - // TODO - } - } -} -#endif - diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/VirtualAssetBundleProviderTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/VirtualAssetBundleProviderTests.cs.meta deleted file mode 100644 index 33e661a4..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceManager/VirtualAssetBundleProviderTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5e17c64e4d2cf1742879de399aad96bb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceProviders.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceProviders.meta deleted file mode 100644 index e10f7fd2..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceProviders.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 962906719cf3dae4f8b815dcc25b22b5 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceProviders/ContentCatalogProviderTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceProviders/ContentCatalogProviderTests.cs deleted file mode 100644 index b4b48a5a..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceProviders/ContentCatalogProviderTests.cs +++ /dev/null @@ -1,109 +0,0 @@ -using NUnit.Framework; -using System.Collections.Generic; -using UnityEngine.ResourceManagement.ResourceLocations; - -namespace UnityEngine.AddressableAssets.ResourceProviders.Tests -{ - [TestFixture] - public class ContentCatalogProviderTests - { - const string k_LocationName = "TestLocation"; - const string k_LocationId = "TestLocationID"; - const string k_CacheLocationId = "CacheLocationID"; - const string k_RemoteLocationId = "RemoteLocationID"; - - ResourceLocationBase m_SimpleLocation = new ResourceLocationBase(k_LocationName, k_LocationId, typeof(ContentCatalogProvider).FullName, typeof(object)); - - [Test] - public void DetermineIdToLoad_IfNoDependencies_ReturnsMainId() - { - var contentCatalogOp = new ContentCatalogProvider.InternalOp(); - - var loadedId = contentCatalogOp.DetermineIdToLoad(m_SimpleLocation, null); - - Assert.AreEqual(k_LocationId, loadedId); - } - - [Test] - public void DetermineIdToLoad_IfTooFewDependencies_ReturnsMainId() - { - var contentCatalogOp = new ContentCatalogProvider.InternalOp(); - - var loadedId = contentCatalogOp.DetermineIdToLoad(m_SimpleLocation, new List{1}); - - Assert.AreEqual(k_LocationId, loadedId); - } - [Test] - public void DetermineIdToLoad_IfTooManyDependencies_ReturnsMainId() - { - var contentCatalogOp = new ContentCatalogProvider.InternalOp(); - - var loadedId = contentCatalogOp.DetermineIdToLoad(m_SimpleLocation, new List{1,2,3}); - - Assert.AreEqual(k_LocationId, loadedId); - } - - [Test] - public void DetermineIdToLoad_IfOfflineAndNoCache_ReturnsMainId() - { - var contentCatalogOp = new ContentCatalogProvider.InternalOp(); - - var loadedId = contentCatalogOp.DetermineIdToLoad(m_SimpleLocation, new List{string.Empty, string.Empty}); - - Assert.AreEqual(k_LocationId, loadedId); - } - - [Test] - public void DetermineIdToLoad_IfOfflineAndHasCache_ReturnsCacheId() - { - var contentCatalogOp = new ContentCatalogProvider.InternalOp(); - - IResourceLocation[] dependencies = new IResourceLocation[(int)ContentCatalogProvider.DependencyHashIndex.Count]; - - dependencies[(int)ContentCatalogProvider.DependencyHashIndex.Remote] = new ResourceLocationBase(string.Empty, k_RemoteLocationId, typeof(ContentCatalogProvider).FullName, typeof(object)); - dependencies[(int)ContentCatalogProvider.DependencyHashIndex.Cache] = new ResourceLocationBase(string.Empty, k_CacheLocationId, typeof(ContentCatalogProvider).FullName, typeof(object)); - - var location = new ResourceLocationBase(k_LocationName, k_LocationId, typeof(ContentCatalogProvider).FullName, typeof(object), dependencies); - var loadedId = contentCatalogOp.DetermineIdToLoad(location, new List{string.Empty, "hash"}); - - Assert.AreEqual(k_CacheLocationId, loadedId); - } - - [Test] - public void DetermineIdToLoad_IfOnlineMatchesCache_ReturnsCacheId() - { - - var contentCatalogOp = new ContentCatalogProvider.InternalOp(); - - IResourceLocation[] dependencies = new IResourceLocation[(int)ContentCatalogProvider.DependencyHashIndex.Count]; - - dependencies[(int)ContentCatalogProvider.DependencyHashIndex.Remote] = new ResourceLocationBase(string.Empty, k_RemoteLocationId, typeof(ContentCatalogProvider).FullName, typeof(object)); - dependencies[(int)ContentCatalogProvider.DependencyHashIndex.Cache] = new ResourceLocationBase(string.Empty, k_CacheLocationId, typeof(ContentCatalogProvider).FullName, typeof(object)); - - var location = new ResourceLocationBase(k_LocationName, k_LocationId, typeof(ContentCatalogProvider).FullName, typeof(object), dependencies); - var loadedId = contentCatalogOp.DetermineIdToLoad(location, new List{"hash", "hash"}); - - Assert.AreEqual(k_CacheLocationId, loadedId); - } - - [Test] - public void DetermineIdToLoad_IfOnlineMismatchesCache_ReturnsRemoteId() - { - var contentCatalogOp = new ContentCatalogProvider.InternalOp(); - - IResourceLocation[] dependencies = new IResourceLocation[(int)ContentCatalogProvider.DependencyHashIndex.Count]; - - dependencies[(int)ContentCatalogProvider.DependencyHashIndex.Remote] = new ResourceLocationBase(string.Empty, k_RemoteLocationId, typeof(ContentCatalogProvider).FullName, typeof(object)); - dependencies[(int)ContentCatalogProvider.DependencyHashIndex.Cache] = new ResourceLocationBase(string.Empty, k_CacheLocationId, typeof(ContentCatalogProvider).FullName, typeof(object)); - - var location = new ResourceLocationBase(k_LocationName, k_LocationId, typeof(ContentCatalogProvider).FullName, typeof(object), dependencies); - - - var loadedId = contentCatalogOp.DetermineIdToLoad(location, new List{"newHash", "hash"}); - Assert.AreEqual(k_RemoteLocationId, loadedId); - - loadedId = contentCatalogOp.DetermineIdToLoad(location, new List{"newHash", string.Empty}); - Assert.AreEqual(k_RemoteLocationId, loadedId); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceProviders/ContentCatalogProviderTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceProviders/ContentCatalogProviderTests.cs.meta deleted file mode 100644 index 2ec43f2e..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/ResourceProviders/ContentCatalogProviderTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 832363b0cc1d7e44dbd8750e91343bd1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/RuntimePlatformMappingServiceTests.cs b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/RuntimePlatformMappingServiceTests.cs deleted file mode 100644 index 557f7e52..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/RuntimePlatformMappingServiceTests.cs +++ /dev/null @@ -1,20 +0,0 @@ -using NUnit.Framework; -using UnityEngine; -using UnityEngine.AddressableAssets; - -public class RuntimePlatformMappingServiceTests -{ - [TestCase(RuntimePlatform.XboxOne, AddressablesPlatform.XboxOne)] - [TestCase(RuntimePlatform.Switch, AddressablesPlatform.Switch)] - [TestCase(RuntimePlatform.PS4, AddressablesPlatform.PS4)] - [TestCase(RuntimePlatform.IPhonePlayer, AddressablesPlatform.iOS)] - [TestCase(RuntimePlatform.Android, AddressablesPlatform.Android)] - [TestCase(RuntimePlatform.WebGLPlayer, AddressablesPlatform.WebGL)] - [TestCase(RuntimePlatform.WindowsPlayer, AddressablesPlatform.Windows)] - [TestCase(RuntimePlatform.OSXPlayer, AddressablesPlatform.OSX)] - [TestCase(RuntimePlatform.LinuxPlayer, AddressablesPlatform.Linux)] - public void RuntimePlatformMappingService_EqualsDesiredAddressablesPlatform(RuntimePlatform platform, AddressablesPlatform desiredPlatform) - { - Assert.AreEqual(PlatformMappingService.GetAddressablesPlatformInternal(platform), desiredPlatform); - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/RuntimePlatformMappingServiceTests.cs.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/RuntimePlatformMappingServiceTests.cs.meta deleted file mode 100644 index 08e011a6..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/RuntimePlatformMappingServiceTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0ea2465c600278f4db3fdb6b76ee06a9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/Unity.Addressables.Runtime.Tests.asmdef b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/Unity.Addressables.Runtime.Tests.asmdef deleted file mode 100644 index 50682af1..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/Unity.Addressables.Runtime.Tests.asmdef +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Unity.Addressables.Tests", - "references": [ - "Unity.Addressables", - "Unity.ResourceManager", - "Unity.Addressables.Editor" - ], - "optionalUnityReferences": [ - "TestAssemblies" - ], - "includePlatforms": [], - "excludePlatforms": [], - "allowUnsafeCode": false -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/Unity.Addressables.Runtime.Tests.asmdef.meta b/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/Unity.Addressables.Runtime.Tests.asmdef.meta deleted file mode 100644 index 694c79ab..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/Tests/Runtime/Unity.Addressables.Runtime.Tests.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 536993f12b814234a8f1d38fa0a1f35c -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/license.md b/Library/PackageCache/com.unity.addressables@1.1.10/license.md deleted file mode 100644 index 14f3e1c8..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/license.md +++ /dev/null @@ -1,5 +0,0 @@ -Addressables copyright © 2019 Unity Technologies ApS - -Licensed under the Unity Companion License for Unity-dependent projects--see [Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License). - -Unless expressly provided otherwise, the Software under this license is made available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. Please review the license for details on these and other terms and conditions. \ No newline at end of file diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/license.md.meta b/Library/PackageCache/com.unity.addressables@1.1.10/license.md.meta deleted file mode 100644 index ccd417c4..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/license.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 89eb4003a9db2ee46a7a8549160bf68a -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/package.json b/Library/PackageCache/com.unity.addressables@1.1.10/package.json deleted file mode 100644 index 1fe49d52..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "com.unity.addressables", - "displayName": "Addressables", - "version": "1.1.10", - "unity": "2018.3", - "description": "The Addressable Asset System allows the developer to ask for an asset via its address. Once an asset (e.g. a prefab) is marked \"addressable\", it generates an address which can be called from anywhere. Wherever the asset resides (local or remote), the system will locate it and its dependencies, then return it.\n\nUse 'Window->Asset Management->Addressables' to begin working with the system.\n\nAddressables use asynchronous loading to support loading from any location with any collection of dependencies. Whether you have been using direct references, traditional asset bundles, or Resource folders, addressables provide a simpler way to make your game more dynamic. Addressables simultaneously opens up the world of asset bundles while managing all the complexity.", - "keywords": [ - "asset", - "resources", - "bundle", - "bundles", - "assetbundles" - ], - "category": "", - "dependencies": { - "com.unity.scriptablebuildpipeline": "1.5.2" - }, - "repository": { - "type": "git", - "url": "git@github.cds.internal.unity3d.com:unity/Addressables.git", - "revision": "feeab367b101a12d5a04960d0d9b20b267c5726d" - } -} diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/package.json.meta b/Library/PackageCache/com.unity.addressables@1.1.10/package.json.meta deleted file mode 100644 index c071e272..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/package.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: c499a2a91e3095b4c8e10d8f7de9bbb5 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/readme.md b/Library/PackageCache/com.unity.addressables@1.1.10/readme.md deleted file mode 100644 index 8a44c9be..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/readme.md +++ /dev/null @@ -1 +0,0 @@ -Addressable Assets info placeholder diff --git a/Library/PackageCache/com.unity.addressables@1.1.10/readme.md.meta b/Library/PackageCache/com.unity.addressables@1.1.10/readme.md.meta deleted file mode 100644 index 5ce55777..00000000 --- a/Library/PackageCache/com.unity.addressables@1.1.10/readme.md.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: b5654879e399f0a42abf0e92a05b1eaf -timeCreated: 1498750562 -licenseType: Pro -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/.npmignore b/Library/PackageCache/com.unity.collab-proxy@1.2.16/.npmignore deleted file mode 100644 index 1586aea7..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ - -automation/** -utr_output/** -.Editor/** -.yamato/** -*.zip* \ No newline at end of file diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/CHANGELOG.md b/Library/PackageCache/com.unity.collab-proxy@1.2.16/CHANGELOG.md deleted file mode 100644 index 3c6c85d5..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/CHANGELOG.md +++ /dev/null @@ -1,31 +0,0 @@ -# Changelog -All notable changes to this package will be documented in this file. - -The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - -## [1.2.16] - 2019-02-11 -Update stylesheet to pass USS validation - -## [1.2.15] - 2018-11-16 -Added support for non-experimental UIElements. - -## [1.2.11] - 2018-09-04 -Made some performance improvements to reduce impact on ReloadAssemblies. - -## [1.2.9] - 2018-08-13 -Test issues for the Collab History Window are now fixed. - -## [1.2.7] - 2018-08-07 -Toolbar drop-down will no longer show up when package is uninstalled. - -## [1.2.6] - 2018-06-15 -Fixed an issue where Collab's History window wouldn't load properly. - -## [1.2.5] - 2018-05-21 -This is the first release of *Unity Package CollabProxy*. - -### Added -- Collab history and toolbar windows -- Collab view and presenter classes -- Collab Editor tests for view and presenter diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/CHANGELOG.md.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/CHANGELOG.md.meta deleted file mode 100644 index 38274a69..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/CHANGELOG.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 782c49e6e68074dc7ba12c95537825ce -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/DEPENDENCIES.md b/Library/PackageCache/com.unity.collab-proxy@1.2.16/DEPENDENCIES.md deleted file mode 100644 index 57808d56..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/DEPENDENCIES.md +++ /dev/null @@ -1,9 +0,0 @@ - - - - Unity.CollabProxy.Dependencies - 1.1.0-experimental - Rohit Garg - Dependencies for the CollabProxy package - - diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/DEPENDENCIES.md.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/DEPENDENCIES.md.meta deleted file mode 100644 index 24e45c2f..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/DEPENDENCIES.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 470530e667ad4475786b28fa3187ce95 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Documentation~/collab-proxy.md b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Documentation~/collab-proxy.md deleted file mode 100644 index c1800d6a..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Documentation~/collab-proxy.md +++ /dev/null @@ -1,5 +0,0 @@ -# About Unity Collaborate - -Collaborate is a simple way for teams to save, share, and sync their Unity project. - -Please refer to the online documentation [here.](https://docs.unity3d.com/Manual/UnityCollaborate.html) \ No newline at end of file diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor.meta deleted file mode 100644 index b54ca871..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d31e5d760880a4e52a3a75322481d0d2 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/AssemblyInfo.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/AssemblyInfo.cs deleted file mode 100644 index d7266b63..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/AssemblyInfo.cs +++ /dev/null @@ -1,4 +0,0 @@ -using System.Runtime.CompilerServices; -using UnityEngine; - -[assembly: InternalsVisibleTo("Unity.CollabProxy.EditorTests")] diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/AssemblyInfo.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/AssemblyInfo.cs.meta deleted file mode 100644 index e384b318..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/AssemblyInfo.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d4ef26aa386b44923b61c9c4b505a67c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab.meta deleted file mode 100644 index 694fc4ea..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c18cb9388313e4287ad5895ee735c47d -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Bootstrap.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Bootstrap.cs deleted file mode 100644 index 029ce1c7..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Bootstrap.cs +++ /dev/null @@ -1,24 +0,0 @@ -using UnityEditor; -using UnityEditor.Collaboration; -using UnityEngine; - -namespace CollabProxy.UI -{ - [InitializeOnLoad] - public class Bootstrap - { - private const float kCollabToolbarButtonWidth = 78.0f; - - static Bootstrap() - { - Collab.ShowHistoryWindow = CollabHistoryWindow.ShowHistoryWindow; - Collab.ShowToolbarAtPosition = CollabToolbarWindow.ShowCenteredAtPosition; - Collab.IsToolbarVisible = CollabToolbarWindow.IsVisible; - Collab.CloseToolbar = CollabToolbarWindow.CloseToolbar; - Toolbar.AddSubToolbar(new CollabToolbarButton - { - Width = kCollabToolbarButtonWidth - }); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Bootstrap.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Bootstrap.cs.meta deleted file mode 100644 index 641d54b7..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Bootstrap.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8aa8171e088f94069bbd1978a053f7dd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/CollabAnalytics.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/CollabAnalytics.cs deleted file mode 100644 index c7f90aa1..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/CollabAnalytics.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; - -namespace UnityEditor.Collaboration -{ - internal static class CollabAnalytics - { - [Serializable] - private struct CollabUserActionAnalyticsEvent - { - public string category; - public string action; - } - - public static void SendUserAction(string category, string action) - { - EditorAnalytics.SendCollabUserAction(new CollabUserActionAnalyticsEvent() { category = category, action = action }); - } - - public static readonly string historyCategoryString = "History"; - }; -} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/CollabAnalytics.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/CollabAnalytics.cs.meta deleted file mode 100644 index 2f46e9bc..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/CollabAnalytics.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f944311c8fff2479fa3ba741f6039fc8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/CollabHistoryWindow.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/CollabHistoryWindow.cs deleted file mode 100644 index b855bce3..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/CollabHistoryWindow.cs +++ /dev/null @@ -1,330 +0,0 @@ -using System; -using System.Linq; -using System.Collections.Generic; -using UnityEditor.Collaboration; - -#if UNITY_2019_1_OR_NEWER -using UnityEditor.UIElements; -using UnityEngine.UIElements; -#else -using UnityEditor.Experimental.UIElements; -using UnityEngine.Experimental.UIElements; -using UnityEngine.Experimental.UIElements.StyleEnums; -#endif - -using UnityEngine; -using UnityEditor.Connect; - -namespace UnityEditor -{ - internal class CollabHistoryWindow : EditorWindow, ICollabHistoryWindow - { -#if UNITY_2019_1_OR_NEWER - private const string ResourcesPath = "Packages/com.unity.collab-proxy/Editor/Resources/Styles/"; -#else - private const string ResourcesPath = "StyleSheets/"; -#endif - - - const string kWindowTitle = "Collab History"; - const string kServiceUrl = "developer.cloud.unity3d.com"; - - [MenuItem("Window/Asset Management/Collab History", false, 1)] - public static void ShowHistoryWindow() - { - EditorWindow.GetWindow(kWindowTitle); - } - - [MenuItem("Window/Asset Management/Collab History", true)] - public static bool ValidateShowHistoryWindow() - { - return Collab.instance.IsCollabEnabledForCurrentProject(); - } - - CollabHistoryPresenter m_Presenter; - Dictionary m_Views; - List m_HistoryItems = new List(); - HistoryState m_State; - VisualElement m_Container; - PagedListView m_Pager; - ScrollView m_HistoryView; - int m_ItemsPerPage = 5; - string m_InProgressRev; - bool m_RevisionActionsEnabled; - - public CollabHistoryWindow() - { - minSize = new Vector2(275, 50); - } - - public void OnEnable() - { - SetupGUI(); - name = "CollabHistory"; - - if (m_Presenter == null) - { - m_Presenter = new CollabHistoryPresenter(this, new CollabHistoryItemFactory(), new RevisionsService(Collab.instance, UnityConnect.instance)); - } - m_Presenter.OnWindowEnabled(); - } - - public void OnDisable() - { - m_Presenter.OnWindowDisabled(); - } - - public bool revisionActionsEnabled - { - get { return m_RevisionActionsEnabled; } - set - { - if (m_RevisionActionsEnabled == value) - return; - - m_RevisionActionsEnabled = value; - foreach (var historyItem in m_HistoryItems) - { - historyItem.RevisionActionsEnabled = value; - } - } - } - - private void AddStyleSheetPath(VisualElement root, string path) - { -#if UNITY_2019_1_OR_NEWER - root.styleSheets.Add(EditorGUIUtility.Load(path) as StyleSheet); -#else - root.AddStyleSheetPath(path); -#endif - } - - - public void SetupGUI() - { -#if UNITY_2019_1_OR_NEWER - var root = this.rootVisualElement; -#else - var root = this.GetRootVisualContainer(); -#endif - AddStyleSheetPath(root, ResourcesPath + "CollabHistoryCommon.uss"); - if (EditorGUIUtility.isProSkin) - { - AddStyleSheetPath(root, ResourcesPath + "CollabHistoryDark.uss"); - } - else - { - AddStyleSheetPath(root, ResourcesPath + "CollabHistoryLight.uss"); - } - - m_Container = new VisualElement(); - m_Container.StretchToParentSize(); - root.Add(m_Container); - - m_Pager = new PagedListView() - { - name = "PagedElement", - pageSize = m_ItemsPerPage - }; - - var errorView = new StatusView() - { - message = "An Error Occurred", - icon = EditorGUIUtility.LoadIconRequired("Collab.Warning") as Texture, - }; - - var noInternetView = new StatusView() - { - message = "No Internet Connection", - icon = EditorGUIUtility.LoadIconRequired("Collab.NoInternet") as Texture, - }; - - var maintenanceView = new StatusView() - { - message = "Maintenance", - }; - - var loginView = new StatusView() - { - message = "Sign in to access Collaborate", - buttonText = "Sign in...", - callback = SignInClick, - }; - - var noSeatView = new StatusView() - { - message = "Ask your project owner for access to Unity Teams", - buttonText = "Learn More", - callback = NoSeatClick, - }; - - var waitingView = new StatusView() - { - message = "Updating...", - }; - - m_HistoryView = new ScrollView() { name = "HistoryContainer", showHorizontal = false}; - m_HistoryView.contentContainer.StretchToParentWidth(); - m_HistoryView.Add(m_Pager); - - m_Views = new Dictionary() - { - {HistoryState.Error, errorView}, - {HistoryState.Offline, noInternetView}, - {HistoryState.Maintenance, maintenanceView}, - {HistoryState.LoggedOut, loginView}, - {HistoryState.NoSeat, noSeatView}, - {HistoryState.Waiting, waitingView}, - {HistoryState.Ready, m_HistoryView} - }; - } - - public void UpdateState(HistoryState state, bool force) - { - if (state == m_State && !force) - return; - - m_State = state; - switch (state) - { - case HistoryState.Ready: - UpdateHistoryView(m_Pager); - break; - case HistoryState.Disabled: - Close(); - return; - } - - m_Container.Clear(); - m_Container.Add(m_Views[m_State]); - } - - public void UpdateRevisions(IEnumerable datas, string tip, int totalRevisions, int currentPage) - { - var elements = new List(); - var isFullDateObtained = false; // Has everything from this date been obtained? - m_HistoryItems.Clear(); - - if (datas != null) - { - DateTime currentDate = DateTime.MinValue; - foreach (var data in datas) - { - if (data.timeStamp.Date != currentDate.Date) - { - elements.Add(new CollabHistoryRevisionLine(data.timeStamp, isFullDateObtained)); - currentDate = data.timeStamp; - } - - var item = new CollabHistoryItem(data); - m_HistoryItems.Add(item); - - var container = new VisualElement(); - container.style.flexDirection = FlexDirection.Row; - if (data.current) - { - isFullDateObtained = true; - container.AddToClassList("currentRevision"); - container.AddToClassList("obtainedRevision"); - } - else if (data.obtained) - { - container.AddToClassList("obtainedRevision"); - } - else - { - container.AddToClassList("absentRevision"); - } - // If we use the index as-is, the latest commit will become #1, but we want it to be last - container.Add(new CollabHistoryRevisionLine(data.index)); - container.Add(item); - elements.Add(container); - } - } - - m_HistoryView.scrollOffset = new Vector2(0, 0); - m_Pager.totalItems = totalRevisions; - m_Pager.curPage = currentPage; - m_Pager.items = elements; - } - - public string inProgressRevision - { - get { return m_InProgressRev; } - set - { - m_InProgressRev = value; - foreach (var historyItem in m_HistoryItems) - { - historyItem.SetInProgressStatus(value); - } - } - } - - public int itemsPerPage - { - set - { - if (m_ItemsPerPage == value) - return; - m_Pager.pageSize = m_ItemsPerPage; - } - } - - public PageChangeAction OnPageChangeAction - { - set { m_Pager.OnPageChanged = value; } - } - - public RevisionAction OnGoBackAction - { - set { CollabHistoryItem.s_OnGoBack = value; } - } - - public RevisionAction OnUpdateAction - { - set { CollabHistoryItem.s_OnUpdate = value; } - } - - public RevisionAction OnRestoreAction - { - set { CollabHistoryItem.s_OnRestore = value; } - } - - public ShowBuildAction OnShowBuildAction - { - set { CollabHistoryItem.s_OnShowBuild = value; } - } - - public Action OnShowServicesAction - { - set { CollabHistoryItem.s_OnShowServices = value; } - } - - void UpdateHistoryView(VisualElement history) - { - } - - void NoSeatClick() - { - var connection = UnityConnect.instance; - var env = connection.GetEnvironment(); - // Map environment to url - prod is special - if (env == "production") - env = ""; - else - env += "-"; - - var url = "https://" + env + kServiceUrl - + "/orgs/" + connection.GetOrganizationId() - + "/projects/" + connection.GetProjectName() - + "/unity-teams/"; - Application.OpenURL(url); - } - - void SignInClick() - { - UnityConnect.instance.ShowLogin(); - } - } -} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/CollabHistoryWindow.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/CollabHistoryWindow.cs.meta deleted file mode 100644 index 74358d40..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/CollabHistoryWindow.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fed9dda667cab45d398d06402bba03f4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/CollabToolbarButton.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/CollabToolbarButton.cs deleted file mode 100644 index eebe4aca..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/CollabToolbarButton.cs +++ /dev/null @@ -1,297 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using UnityEditor.Collaboration; -using UnityEditor.Connect; -using UnityEditor.Web; -using UnityEngine; - -namespace UnityEditor -{ - internal class CollabToolbarButton : SubToolbar, IDisposable - { - // Must match s_CollabIcon array - enum CollabToolbarState - { - NeedToEnableCollab, - UpToDate, - Conflict, - OperationError, - ServerHasChanges, - FilesToPush, - InProgress, - Disabled, - Offline - } - - private class CollabToolbarContent - { - readonly string m_iconName; - readonly string m_toolTip; - readonly CollabToolbarState m_state; - - static Dictionary m_CollabIcons; - - public CollabToolbarState RegisteredForState - { - get { return m_state; } - } - - public GUIContent GuiContent - { - get - { - if (m_CollabIcons == null) - { - m_CollabIcons = new Dictionary(); - } - - if (!m_CollabIcons.ContainsKey(this)) - { - m_CollabIcons.Add(this, EditorGUIUtility.TrTextContentWithIcon("Collab", m_toolTip, m_iconName)); - } - - return m_CollabIcons[this]; - } - } - - public CollabToolbarContent(CollabToolbarState state, string iconName, string toolTip) - { - m_state = state; - m_iconName = iconName; - m_toolTip = toolTip; - } - } - - CollabToolbarContent[] m_toolbarContents; - CollabToolbarState m_CollabToolbarState = CollabToolbarState.UpToDate; - const float kCollabButtonWidth = 78.0f; - ButtonWithAnimatedIconRotation m_CollabButton; - string m_DynamicTooltip; - static bool m_ShowCollabTooltip = false; - - private GUIContent currentCollabContent - { - get - { - CollabToolbarContent toolbarContent = - m_toolbarContents.FirstOrDefault(c => c.RegisteredForState.Equals(m_CollabToolbarState)); - GUIContent content = new GUIContent(toolbarContent == null? m_toolbarContents.First().GuiContent : toolbarContent.GuiContent); - if (!m_ShowCollabTooltip) - { - content.tooltip = null; - } - else if (m_DynamicTooltip != "") - { - content.tooltip = m_DynamicTooltip; - } - - if (Collab.instance.AreTestsRunning()) - { - content.text = "CTF"; - } - - return content; - } - } - - public CollabToolbarButton() - { - m_toolbarContents = new[] - { - new CollabToolbarContent(CollabToolbarState.NeedToEnableCollab, "CollabNew", " You need to enable collab."), - new CollabToolbarContent(CollabToolbarState.UpToDate, "Collab", " You are up to date."), - new CollabToolbarContent(CollabToolbarState.Conflict, "CollabConflict", " Please fix your conflicts prior to publishing."), - new CollabToolbarContent(CollabToolbarState.OperationError, "CollabError", " Last operation failed. Please retry later."), - new CollabToolbarContent(CollabToolbarState.ServerHasChanges, "CollabPull", " Please update, there are server changes."), - new CollabToolbarContent(CollabToolbarState.FilesToPush, "CollabPush", " You have files to publish."), - new CollabToolbarContent(CollabToolbarState.InProgress, "CollabProgress", " Operation in progress."), - new CollabToolbarContent(CollabToolbarState.Disabled, "CollabNew", " Collab is disabled."), - new CollabToolbarContent(CollabToolbarState.Offline, "CollabNew", " Please check your network connection.") - }; - - Collab.instance.StateChanged += OnCollabStateChanged; - UnityConnect.instance.StateChanged += OnUnityConnectStateChanged; - UnityConnect.instance.UserStateChanged += OnUnityConnectUserStateChanged; - } - - void OnUnityConnectUserStateChanged(UserInfo state) - { - UpdateCollabToolbarState(); - } - - void OnUnityConnectStateChanged(ConnectInfo state) - { - UpdateCollabToolbarState(); - } - - public override void OnGUI(Rect rect) - { - DoCollabDropDown(rect); - } - - Rect GUIToScreenRect(Rect guiRect) - { - Vector2 screenPoint = GUIUtility.GUIToScreenPoint(new Vector2(guiRect.x, guiRect.y)); - guiRect.x = screenPoint.x; - guiRect.y = screenPoint.y; - return guiRect; - } - - void ShowPopup(Rect rect) - { - // window should be centered on the button - ReserveRight(kCollabButtonWidth / 2, ref rect); - ReserveBottom(5, ref rect); - // calculate screen rect before saving assets since it might open the AssetSaveDialog window - var screenRect = GUIToScreenRect(rect); - // save all the assets - AssetDatabase.SaveAssets(); - if (Collab.ShowToolbarAtPosition != null && Collab.ShowToolbarAtPosition(screenRect)) - { - GUIUtility.ExitGUI(); - } - } - - void DoCollabDropDown(Rect rect) - { - UpdateCollabToolbarState(); - GUIStyle collabButtonStyle = "OffsetDropDown"; - bool showPopup = Toolbar.requestShowCollabToolbar; - Toolbar.requestShowCollabToolbar = false; - - bool enable = !EditorApplication.isPlaying; - - using (new EditorGUI.DisabledScope(!enable)) - { - bool animate = m_CollabToolbarState == CollabToolbarState.InProgress; - - EditorGUIUtility.SetIconSize(new Vector2(12, 12)); - if (GetCollabButton().OnGUI(rect, currentCollabContent, animate, collabButtonStyle)) - { - showPopup = true; - } - EditorGUIUtility.SetIconSize(Vector2.zero); - } - - if (m_CollabToolbarState == CollabToolbarState.Disabled) - return; - - if (showPopup) - { - ShowPopup(rect); - } - } - - public void OnCollabStateChanged(CollabInfo info) - { - UpdateCollabToolbarState(); - } - - public void UpdateCollabToolbarState() - { - var currentCollabState = CollabToolbarState.UpToDate; - bool networkAvailable = UnityConnect.instance.connectInfo.online && UnityConnect.instance.connectInfo.loggedIn; - m_DynamicTooltip = ""; - - if (UnityConnect.instance.isDisableCollabWindow) - { - currentCollabState = CollabToolbarState.Disabled; - } - else if (networkAvailable) - { - Collab collab = Collab.instance; - CollabInfo currentInfo = collab.collabInfo; - UnityErrorInfo errInfo; - bool error = false; - if (collab.GetError((UnityConnect.UnityErrorFilter.ByContext | UnityConnect.UnityErrorFilter.ByChild), out errInfo)) - { - error = (errInfo.priority <= (int)UnityConnect.UnityErrorPriority.Error); - m_DynamicTooltip = errInfo.shortMsg; - } - - if (!currentInfo.ready) - { - currentCollabState = CollabToolbarState.InProgress; - } - else if (error) - { - currentCollabState = CollabToolbarState.OperationError; - } - else if (currentInfo.inProgress) - { - currentCollabState = CollabToolbarState.InProgress; - } - else - { - bool collabEnable = Collab.instance.IsCollabEnabledForCurrentProject(); - - if (UnityConnect.instance.projectInfo.projectBound == false || !collabEnable) - { - currentCollabState = CollabToolbarState.NeedToEnableCollab; - } - else if (currentInfo.update) - { - currentCollabState = CollabToolbarState.ServerHasChanges; - } - else if (currentInfo.conflict) - { - currentCollabState = CollabToolbarState.Conflict; - } - else if (currentInfo.publish) - { - currentCollabState = CollabToolbarState.FilesToPush; - } - } - } - else - { - currentCollabState = CollabToolbarState.Offline; - } - - if (Collab.IsToolbarVisible != null) - { - if (currentCollabState != m_CollabToolbarState || - Collab.IsToolbarVisible() == m_ShowCollabTooltip) - { - m_CollabToolbarState = currentCollabState; - m_ShowCollabTooltip = !Collab.IsToolbarVisible(); - Toolbar.RepaintToolbar(); - } - } - } - - void ReserveRight(float width, ref Rect pos) - { - pos.x += width; - } - - void ReserveBottom(float height, ref Rect pos) - { - pos.y += height; - } - - ButtonWithAnimatedIconRotation GetCollabButton() - { - if (m_CollabButton == null) - { - const int repaintsPerSecond = 20; - const float animSpeed = 500f; - const bool mouseDownButton = true; - m_CollabButton = new ButtonWithAnimatedIconRotation(() => (float)EditorApplication.timeSinceStartup * animSpeed, Toolbar.RepaintToolbar, repaintsPerSecond, mouseDownButton); - } - - return m_CollabButton; - } - - public void Dispose() - { - Collab.instance.StateChanged -= OnCollabStateChanged; - UnityConnect.instance.StateChanged -= OnUnityConnectStateChanged; - UnityConnect.instance.UserStateChanged -= OnUnityConnectUserStateChanged; - - if (m_CollabButton != null) - m_CollabButton.Clear(); - } - } -} // namespace \ No newline at end of file diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/CollabToolbarButton.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/CollabToolbarButton.cs.meta deleted file mode 100644 index 949d8db9..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/CollabToolbarButton.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 882f1a4147a284f028899b9c018e63eb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/CollabToolbarWindow.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/CollabToolbarWindow.cs deleted file mode 100644 index 27938750..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/CollabToolbarWindow.cs +++ /dev/null @@ -1,137 +0,0 @@ -using UnityEngine; -using UnityEditor.Collaboration; -using UnityEditor.Web; -using UnityEditor.Connect; - -namespace UnityEditor -{ - [InitializeOnLoad] - internal class WebViewStatic : ScriptableSingleton - { - [SerializeField] - WebView m_WebView; - - static public WebView GetWebView() - { - return instance.m_WebView; - } - - static public void SetWebView(WebView webView) - { - instance.m_WebView = webView; - } - } - - [InitializeOnLoad] - internal class CollabToolbarWindow : WebViewEditorStaticWindow, IHasCustomMenu - { - internal override WebView webView - { - get {return WebViewStatic.GetWebView(); } - set {WebViewStatic.SetWebView(value); } - } - - private const string kWindowName = "Unity Collab Toolbar"; - - private static long s_LastClosedTime; - private static CollabToolbarWindow s_CollabToolbarWindow; - - public static bool s_ToolbarIsVisible = false; - - const int kWindowWidth = 320; - const int kWindowHeight = 350; - - public static void CloseToolbar() - { - foreach (CollabToolbarWindow window in Resources.FindObjectsOfTypeAll()) - window.Close(); - } - - [MenuItem("Window/Asset Management/Collab Toolbar", false /*IsValidateFunction*/, 2, true /* IsInternalMenu */)] - public static CollabToolbarWindow ShowToolbarWindow() - { - //Create a new window if it does not exist - if (s_CollabToolbarWindow == null) - { - s_CollabToolbarWindow = GetWindow(false, kWindowName) as CollabToolbarWindow; - } - - return s_CollabToolbarWindow; - } - - [MenuItem("Window/Asset Management/Collab Toolbar", true /*IsValidateFunction*/)] - public static bool ValidateShowToolbarWindow() - { - return true; - } - - public static bool IsVisible() - { - return s_ToolbarIsVisible; - } - - public static bool ShowCenteredAtPosition(Rect buttonRect) - { - buttonRect.x -= kWindowWidth / 2; - // We could not use realtimeSinceStartUp since it is set to 0 when entering/exitting playmode, we assume an increasing time when comparing time. - long nowMilliSeconds = System.DateTime.Now.Ticks / System.TimeSpan.TicksPerMillisecond; - bool justClosed = nowMilliSeconds < s_LastClosedTime + 50; - if (!justClosed) - { - // Method may have been triggered programmatically, without a user event to consume. - if (Event.current.type != EventType.Layout) - { - Event.current.Use(); - } - if (s_CollabToolbarWindow == null) - s_CollabToolbarWindow = CreateInstance() as CollabToolbarWindow; - var windowSize = new Vector2(kWindowWidth, kWindowHeight); - s_CollabToolbarWindow.initialOpenUrl = "file:///" + EditorApplication.userJavascriptPackagesPath + "unityeditor-collab-toolbar/dist/index.html"; - s_CollabToolbarWindow.Init(); - s_CollabToolbarWindow.ShowAsDropDown(buttonRect, windowSize); - s_CollabToolbarWindow.OnFocus(); - return true; - } - return false; - } - - // Receives HTML title - public void OnReceiveTitle(string title) - { - titleContent.text = title; - } - - public new void OnInitScripting() - { - base.OnInitScripting(); - } - - public override void OnEnable() - { - minSize = new Vector2(kWindowWidth, kWindowHeight); - maxSize = new Vector2(kWindowWidth, kWindowHeight); - initialOpenUrl = "file:///" + EditorApplication.userJavascriptPackagesPath + "unityeditor-collab-toolbar/dist/index.html"; - base.OnEnable(); - s_ToolbarIsVisible = true; - } - - internal new void OnDisable() - { - s_LastClosedTime = System.DateTime.Now.Ticks / System.TimeSpan.TicksPerMillisecond; - if (s_CollabToolbarWindow) - { - s_ToolbarIsVisible = false; - NotifyVisibility(s_ToolbarIsVisible); - } - s_CollabToolbarWindow = null; - - base.OnDisable(); - } - - public new void OnDestroy() - { - OnLostFocus(); - base.OnDestroy(); - } - } -} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/CollabToolbarWindow.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/CollabToolbarWindow.cs.meta deleted file mode 100644 index b08bf2aa..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/CollabToolbarWindow.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6f516f1ec21a54a59a92bf99db2d9535 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Presenters.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Presenters.meta deleted file mode 100644 index 91331532..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Presenters.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d437fe60bb34f45728664a5d930c1635 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Presenters/CollabHistoryPresenter.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Presenters/CollabHistoryPresenter.cs deleted file mode 100644 index 91d500be..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Presenters/CollabHistoryPresenter.cs +++ /dev/null @@ -1,228 +0,0 @@ -using System.Collections.Generic; -using UnityEditor.Connect; -using UnityEditor.Web; - -namespace UnityEditor.Collaboration -{ - internal class CollabHistoryPresenter - { - public const int ItemsPerPage = 5; - ICollabHistoryWindow m_Window; - ICollabHistoryItemFactory m_Factory; - IRevisionsService m_Service; - ConnectInfo m_ConnectState; - CollabInfo m_CollabState; - bool m_IsCollabError; - int m_TotalRevisions; - int m_CurrentPage; - int m_RequestedPage; - bool m_FetchInProgress; - - BuildAccess m_BuildAccess; - string m_ProgressRevision; - public bool BuildServiceEnabled {get; set; } - - public CollabHistoryPresenter(ICollabHistoryWindow window, ICollabHistoryItemFactory factory, IRevisionsService service) - { - m_Window = window; - m_Factory = factory; - m_Service = service; - m_CurrentPage = 0; - m_BuildAccess = new BuildAccess(); - m_Service.FetchRevisionsCallback += OnFetchRevisions; - } - - public void OnWindowEnabled() - { - UnityConnect.instance.StateChanged += OnConnectStateChanged; - Collab.instance.StateChanged += OnCollabStateChanged; - Collab.instance.RevisionUpdated += OnCollabRevisionUpdated; - Collab.instance.JobsCompleted += OnCollabJobsCompleted; - Collab.instance.ErrorOccurred += OnCollabError; - Collab.instance.ErrorCleared += OnCollabErrorCleared; - EditorApplication.playModeStateChanged += OnPlayModeStateChanged; - m_ConnectState = UnityConnect.instance.GetConnectInfo(); - m_CollabState = Collab.instance.GetCollabInfo(); - - m_Window.revisionActionsEnabled = !EditorApplication.isPlayingOrWillChangePlaymode; - - // Setup window callbacks - m_Window.OnPageChangeAction = OnUpdatePage; - m_Window.OnUpdateAction = OnUpdate; - m_Window.OnRestoreAction = OnRestore; - m_Window.OnGoBackAction = OnGoBack; - m_Window.OnShowBuildAction = ShowBuildForCommit; - m_Window.OnShowServicesAction = ShowServicePage; - m_Window.itemsPerPage = ItemsPerPage; - - // Initialize data - UpdateBuildServiceStatus(); - var state = RecalculateState(); - // Only try to load the page if we're ready - if (state == HistoryState.Ready) - OnUpdatePage(m_CurrentPage); - m_Window.UpdateState(state, true); - } - - public void OnWindowDisabled() - { - UnityConnect.instance.StateChanged -= OnConnectStateChanged; - Collab.instance.StateChanged -= OnCollabStateChanged; - Collab.instance.RevisionUpdated -= OnCollabRevisionUpdated; - Collab.instance.JobsCompleted -= OnCollabJobsCompleted; - EditorApplication.playModeStateChanged -= OnPlayModeStateChanged; - } - - private void OnConnectStateChanged(ConnectInfo state) - { - m_ConnectState = state; - - m_Window.UpdateState(RecalculateState(), false); - } - - private void OnCollabStateChanged(CollabInfo state) - { - // Sometimes a collab state change will trigger even though everything is the same - if (m_CollabState.Equals(state)) - return; - - if (m_CollabState.tip != state.tip) - OnUpdatePage(m_CurrentPage); - - m_CollabState = state; - m_Window.UpdateState(RecalculateState(), false); - if (state.inProgress) - { - m_Window.inProgressRevision = m_ProgressRevision; - } - else - { - m_Window.inProgressRevision = null; - } - } - - private void OnCollabRevisionUpdated(CollabInfo state) - { - OnUpdatePage(m_CurrentPage); - } - - private void OnCollabJobsCompleted(CollabInfo state) - { - m_ProgressRevision = null; - } - - private void OnCollabError() - { - m_IsCollabError = true; - m_Window.UpdateState(RecalculateState(), false); - } - - private void OnCollabErrorCleared() - { - m_IsCollabError = false; - m_FetchInProgress = true; - m_Service.GetRevisions(m_CurrentPage * ItemsPerPage, ItemsPerPage); - m_Window.UpdateState(RecalculateState(), false); - } - - private void OnPlayModeStateChanged(PlayModeStateChange stateChange) - { - // If entering play mode, disable - if (stateChange == PlayModeStateChange.ExitingEditMode || - stateChange == PlayModeStateChange.EnteredPlayMode) - { - m_Window.revisionActionsEnabled = false; - } - // If exiting play mode, enable! - else if (stateChange == PlayModeStateChange.EnteredEditMode || - stateChange == PlayModeStateChange.ExitingPlayMode) - { - m_Window.revisionActionsEnabled = true; - } - } - - private HistoryState RecalculateState() - { - if (!m_ConnectState.online) - return HistoryState.Offline; - if (m_ConnectState.maintenance || m_CollabState.maintenance) - return HistoryState.Maintenance; - if (!m_ConnectState.loggedIn) - return HistoryState.LoggedOut; - if (!m_CollabState.seat) - return HistoryState.NoSeat; - if (!Collab.instance.IsCollabEnabledForCurrentProject()) - return HistoryState.Disabled; - if (!Collab.instance.IsConnected() || !m_CollabState.ready || m_FetchInProgress) - return HistoryState.Waiting; - if (m_ConnectState.error || m_IsCollabError) - return HistoryState.Error; - - return HistoryState.Ready; - } - - // TODO: Eventually this can be a listener on the build service status - public void UpdateBuildServiceStatus() - { - foreach (var service in UnityConnectServiceCollection.instance.GetAllServiceInfos()) - { - if (service.name.Equals("Build")) - { - BuildServiceEnabled = service.enabled; - } - } - } - - public void ShowBuildForCommit(string revisionID) - { - m_BuildAccess.ShowBuildForCommit(revisionID); - } - - public void ShowServicePage() - { - m_BuildAccess.ShowServicePage(); - } - - public void OnUpdatePage(int page) - { - m_FetchInProgress = true; - m_Service.GetRevisions(page * ItemsPerPage, ItemsPerPage); - m_Window.UpdateState(RecalculateState(), false); - m_RequestedPage = page; - } - - private void OnFetchRevisions(RevisionsResult data) - { - m_FetchInProgress = false; - IEnumerable items = null; - if (data != null) - { - m_CurrentPage = m_RequestedPage; - m_TotalRevisions = data.RevisionsInRepo; - items = m_Factory.GenerateElements(data.Revisions, m_TotalRevisions, m_CurrentPage * ItemsPerPage, m_Service.tipRevision, m_Window.inProgressRevision, m_Window.revisionActionsEnabled, BuildServiceEnabled, m_Service.currentUser); - } - - // State must be recalculated prior to inserting items - m_Window.UpdateState(RecalculateState(), false); - m_Window.UpdateRevisions(items, m_Service.tipRevision, m_TotalRevisions, m_CurrentPage); - } - - private void OnRestore(string revisionId, bool updatetorevision) - { - m_ProgressRevision = revisionId; - Collab.instance.ResyncToRevision(revisionId); - } - - private void OnGoBack(string revisionId, bool updatetorevision) - { - m_ProgressRevision = revisionId; - Collab.instance.GoBackToRevision(revisionId, false); - } - - private void OnUpdate(string revisionId, bool updatetorevision) - { - m_ProgressRevision = revisionId; - Collab.instance.Update(revisionId, updatetorevision); - } - } -} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Presenters/CollabHistoryPresenter.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Presenters/CollabHistoryPresenter.cs.meta deleted file mode 100644 index 9c37ecd8..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Presenters/CollabHistoryPresenter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a7c91a123806d41a0873fcdcb629b1c4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views.meta deleted file mode 100644 index f62ac6be..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: fd0a39b4d296d4d509b4f1dbd08d0630 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/BuildStatusButton.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/BuildStatusButton.cs deleted file mode 100644 index ac3754d2..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/BuildStatusButton.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using UnityEditor; -using UnityEditor.Collaboration; -using UnityEngine; - -#if UNITY_2019_1_OR_NEWER -using UnityEngine.UIElements; -#else -using UnityEngine.Experimental.UIElements; -#endif - -namespace UnityEditor.Collaboration -{ - internal class BuildStatusButton : Button - { - private readonly string iconPrefix = "Icons/Collab.Build"; - private readonly string iconSuffix = ".png"; - Label labelElement = new Label(); - Image iconElement = new Image() {name = "BuildIcon"}; - - public BuildStatusButton(Action clickEvent) : base(clickEvent) - { - iconElement.image = EditorGUIUtility.Load(iconPrefix + iconSuffix) as Texture; - labelElement.text = "Build Now"; - Add(iconElement); - Add(labelElement); - } - - public BuildStatusButton(Action clickEvent, BuildState state, int failures) : base(clickEvent) - { - switch (state) - { - case BuildState.InProgress: - iconElement.image = EditorGUIUtility.Load(iconPrefix + iconSuffix) as Texture; - labelElement.text = "In progress"; - break; - - case BuildState.Failed: - iconElement.image = EditorGUIUtility.Load(iconPrefix + "Failed" + iconSuffix) as Texture; - labelElement.text = failures + ((failures == 1) ? " failure" : " failures"); - break; - - case BuildState.Success: - iconElement.image = EditorGUIUtility.Load(iconPrefix + "Succeeded" + iconSuffix) as Texture; - labelElement.text = "success"; - break; - } - - Add(iconElement); - Add(labelElement); - } - } -} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/BuildStatusButton.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/BuildStatusButton.cs.meta deleted file mode 100644 index d74a58af..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/BuildStatusButton.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0217a80286f79419daa202f69409f19b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryDropDown.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryDropDown.cs deleted file mode 100644 index e3bb05a6..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryDropDown.cs +++ /dev/null @@ -1,78 +0,0 @@ -using UnityEngine; -using System.Collections.Generic; -using UnityEditor.Connect; - -#if UNITY_2019_1_OR_NEWER -using UnityEngine.UIElements; -#else -using UnityEngine.Experimental.UIElements; -#endif - - -namespace UnityEditor.Collaboration -{ - internal class CollabHistoryDropDown : VisualElement - { - private readonly VisualElement m_FilesContainer; - private readonly Label m_ToggleLabel; - private int m_ChangesTotal; - private string m_RevisionId; - - public CollabHistoryDropDown(ICollection changes, int changesTotal, bool changesTruncated, string revisionId) - { - m_FilesContainer = new VisualElement(); - m_ChangesTotal = changesTotal; - m_RevisionId = revisionId; - - m_ToggleLabel = new Label(ToggleText(false)); - m_ToggleLabel.AddManipulator(new Clickable(ToggleDropdown)); - Add(m_ToggleLabel); - - foreach (ChangeData change in changes) - { - m_FilesContainer.Add(new CollabHistoryDropDownItem(change.path, change.action)); - } - - if (changesTruncated) - { - m_FilesContainer.Add(new Button(ShowAllClick) - { - text = "Show all on dashboard" - }); - } - } - - private void ToggleDropdown() - { - if (Contains(m_FilesContainer)) - { - CollabAnalytics.SendUserAction(CollabAnalytics.historyCategoryString, "CollapseAssets"); - Remove(m_FilesContainer); - m_ToggleLabel.text = ToggleText(false); - } - else - { - CollabAnalytics.SendUserAction(CollabAnalytics.historyCategoryString, "ExpandAssets"); - Add(m_FilesContainer); - m_ToggleLabel.text = ToggleText(true); - } - } - - private string ToggleText(bool open) - { - var icon = open ? "\u25bc" : "\u25b6"; - var change = m_ChangesTotal == 1 ? "Change" : "Changes"; - return string.Format("{0} {1} Asset {2}", icon, m_ChangesTotal, change); - } - - private void ShowAllClick() - { - var host = UnityConnect.instance.GetConfigurationURL(CloudConfigUrl.CloudServicesDashboard); - var org = UnityConnect.instance.GetOrganizationId(); - var proj = UnityConnect.instance.GetProjectGUID(); - var url = string.Format("{0}/collab/orgs/{1}/projects/{2}/commits?commit={3}", host, org, proj, m_RevisionId); - CollabAnalytics.SendUserAction(CollabAnalytics.historyCategoryString, "ShowAllOnDashboard"); - Application.OpenURL(url); - } - } -} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryDropDown.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryDropDown.cs.meta deleted file mode 100644 index 513b66bf..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryDropDown.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a483595b0257945278dc75c5ff7d82ee -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryDropDownItem.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryDropDownItem.cs deleted file mode 100644 index 3ad43f23..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryDropDownItem.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.IO; -using System.Linq; -using UnityEngine; - -#if UNITY_2019_1_OR_NEWER -using UnityEngine.UIElements; -#else -using UnityEngine.Experimental.UIElements; -#endif - - -namespace UnityEditor.Collaboration -{ - internal class CollabHistoryDropDownItem : VisualElement - { - public CollabHistoryDropDownItem(string path, string action) - { - var fileName = Path.GetFileName(path); - var isFolder = Path.GetFileNameWithoutExtension(path).Equals(fileName); - var fileIcon = GetIconElement(action, fileName, isFolder); - var metaContainer = new VisualElement(); - var fileNameLabel = new Label - { - name = "FileName", - text = fileName - }; - var filePathLabel = new Label - { - name = "FilePath", - text = path - }; - metaContainer.Add(fileNameLabel); - metaContainer.Add(filePathLabel); - Add(fileIcon); - Add(metaContainer); - } - - private Image GetIconElement(string action, string fileName, bool isFolder) - { - var prefix = isFolder ? "Folder" : "File"; - var actionName = action.First().ToString().ToUpper() + action.Substring(1); - // Use the same icon for renamed and moved files - actionName = actionName.Equals("Renamed") ? "Moved" : actionName; - var iconElement = new Image - { - name = "FileIcon", - image = EditorGUIUtility.LoadIcon("Icons/Collab." + prefix + actionName + ".png") - }; - return iconElement; - } - } -} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryDropDownItem.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryDropDownItem.cs.meta deleted file mode 100644 index 10bf40eb..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryDropDownItem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d912d4873af534bd4a9d44bf1b52f14e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryItem.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryItem.cs deleted file mode 100644 index 24e5d1dd..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryItem.cs +++ /dev/null @@ -1,229 +0,0 @@ -using System; -using System.Linq; -using System.Security.Cryptography; -using UnityEditor.Connect; -using UnityEditor.Web; -using UnityEngine; - -#if UNITY_2019_1_OR_NEWER -using UnityEngine.UIElements; -#else -using UnityEngine.Experimental.UIElements; -using UnityEngine.Experimental.UIElements.StyleEnums; -#endif - -namespace UnityEditor.Collaboration -{ - internal class CollabHistoryItem : VisualElement - { - public static RevisionAction s_OnRestore; - public static RevisionAction s_OnGoBack; - public static RevisionAction s_OnUpdate; - public static ShowBuildAction s_OnShowBuild; - public static Action s_OnShowServices; - - private readonly string m_RevisionId; - private readonly string m_FullDescription; - private readonly DateTime m_TimeStamp; - private readonly Button m_Button; - private readonly HistoryProgressSpinner m_ProgressSpinner; - private VisualElement m_ActionsTray; - private VisualElement m_Details; - private Label m_Description; - private Label m_TimeAgo; - private readonly Button m_ExpandCollapseButton; - private bool m_Expanded; - - private const int kMaxDescriptionChars = 500; - - public bool RevisionActionsEnabled - { - set - { - m_Button.SetEnabled(value); - } - } - - public DateTime timeStamp - { - get { return m_TimeStamp; } - } - - public CollabHistoryItem(RevisionData data) - { - m_RevisionId = data.id; - m_TimeStamp = data.timeStamp; - name = "HistoryItem"; - m_ActionsTray = new VisualElement {name = "HistoryItemActionsTray"}; - m_ProgressSpinner = new HistoryProgressSpinner(); - m_Details = new VisualElement {name = "HistoryDetail"}; - var author = new Label(data.authorName) {name = "Author"}; - m_TimeAgo = new Label(TimeAgo.GetString(m_TimeStamp)); - m_FullDescription = data.comment; - var shouldTruncate = ShouldTruncateDescription(m_FullDescription); - if (shouldTruncate) - { - m_Description = new Label(GetTruncatedDescription(m_FullDescription)); - } - else - { - m_Description = new Label(m_FullDescription); - } - m_Description.name = "RevisionDescription"; - var dropdown = new CollabHistoryDropDown(data.changes, data.changesTotal, data.changesTruncated, data.id); - if (data.current) - { - m_Button = new Button(Restore) {name = "ActionButton", text = "Restore"}; - } - else if (data.obtained) - { - m_Button = new Button(GoBackTo) {name = "ActionButton", text = "Go back to..."}; - } - else - { - m_Button = new Button(UpdateTo) {name = "ActionButton", text = "Update"}; - } - m_Button.SetEnabled(data.enabled); - m_ProgressSpinner.ProgressEnabled = data.inProgress; - - m_ActionsTray.Add(m_ProgressSpinner); - m_ActionsTray.Add(m_Button); - - m_Details.Add(author); - m_Details.Add(m_TimeAgo); - m_Details.Add(m_Description); - - if (shouldTruncate) - { - m_ExpandCollapseButton = new Button(ToggleDescription) { name = "ToggleDescription", text = "Show More" }; - m_Details.Add(m_ExpandCollapseButton); - } - - if (data.buildState != BuildState.None) - { - BuildStatusButton buildButton; - if (data.buildState == BuildState.Configure) - buildButton = new BuildStatusButton(ShowServicePage); - else - buildButton = new BuildStatusButton(ShowBuildForCommit, data.buildState, data.buildFailures); - - m_Details.Add(buildButton); - } - - m_Details.Add(m_ActionsTray); - m_Details.Add(dropdown); - - Add(m_Details); - - this.schedule.Execute(UpdateTimeAgo).Every(1000 * 20); - } - - public static void SetUpCallbacks(RevisionAction Restore, RevisionAction GoBack, RevisionAction Update) - { - s_OnRestore = Restore; - s_OnGoBack = GoBack; - s_OnUpdate = Update; - } - - public void SetInProgressStatus(string revisionIdInProgress) - { - if (String.IsNullOrEmpty(revisionIdInProgress)) - { - m_Button.SetEnabled(true); - m_ProgressSpinner.ProgressEnabled = false; - } - else - { - m_Button.SetEnabled(false); - if (m_RevisionId.Equals(revisionIdInProgress)) - { - m_ProgressSpinner.ProgressEnabled = true; - } - } - } - - void ShowBuildForCommit() - { - CollabAnalytics.SendUserAction(CollabAnalytics.historyCategoryString, "ShowBuild"); - if (s_OnShowBuild != null) - { - s_OnShowBuild(m_RevisionId); - } - } - - void ShowServicePage() - { - CollabAnalytics.SendUserAction(CollabAnalytics.historyCategoryString, "ShowServices"); - if (s_OnShowServices != null) - { - s_OnShowServices(); - } - } - - void Restore() - { - CollabAnalytics.SendUserAction(CollabAnalytics.historyCategoryString, "Restore"); - if (s_OnRestore != null) - { - s_OnRestore(m_RevisionId, false); - } - } - - void GoBackTo() - { - CollabAnalytics.SendUserAction(CollabAnalytics.historyCategoryString, "GoBackTo"); - if (s_OnGoBack != null) - { - s_OnGoBack(m_RevisionId, false); - } - } - - void UpdateTo() - { - CollabAnalytics.SendUserAction(CollabAnalytics.historyCategoryString, "Update"); - if (s_OnUpdate != null) - { - s_OnUpdate(m_RevisionId, true); - } - } - - void UpdateTimeAgo() - { - m_TimeAgo.text = TimeAgo.GetString(m_TimeStamp); - } - - bool ShouldTruncateDescription(string description) - { - return description.Contains(Environment.NewLine) || description.Length > kMaxDescriptionChars; - } - - string GetTruncatedDescription(string description) - { - string result = description.Contains(Environment.NewLine) ? - description.Substring(0, description.IndexOf(Environment.NewLine)) : description; - if (result.Length > kMaxDescriptionChars) - { - result = result.Substring(0, kMaxDescriptionChars) + "..."; - } - return result; - } - - void ToggleDescription() - { - if (m_Expanded) - { - CollabAnalytics.SendUserAction(CollabAnalytics.historyCategoryString, "CollapseDescription"); - m_Expanded = false; - m_ExpandCollapseButton.text = "Show More"; - m_Description.text = GetTruncatedDescription(m_FullDescription); - } - else - { - CollabAnalytics.SendUserAction(CollabAnalytics.historyCategoryString, "ExpandDescription"); - m_Expanded = true; - m_ExpandCollapseButton.text = "Show Less"; - m_Description.text = m_FullDescription; - } - } - } -} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryItem.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryItem.cs.meta deleted file mode 100644 index 290bd28e..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryItem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c4c1445ee948a4124bfa9fb818a17e36 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryItemFactory.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryItemFactory.cs deleted file mode 100644 index e7d7aa6c..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryItemFactory.cs +++ /dev/null @@ -1,121 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using UnityEditor.Collaboration; -using UnityEngine; - -#if UNITY_2019_1_OR_NEWER -using UnityEngine.UIElements; -#else -using UnityEngine.Experimental.UIElements; -using UnityEngine.Experimental.UIElements.StyleEnums; -#endif - - -namespace UnityEditor.Collaboration -{ - internal class CollabHistoryItemFactory : ICollabHistoryItemFactory - { - const int k_MaxChangesPerRevision = 10; - - public IEnumerable GenerateElements(IEnumerable revisions, int totalRevisions, int startIndex, string tipRev, string inProgressRevision, bool revisionActionsEnabled, bool buildServiceEnabled, string currentUser) - { - int index = startIndex; - - foreach (var rev in revisions) - { - index++; - var current = rev.revisionID == tipRev; - - // Calculate build status - BuildState buildState = BuildState.None; - int buildFailures = 0; - if (rev.buildStatuses != null && rev.buildStatuses.Length > 0) - { - bool inProgress = false; - foreach (CloudBuildStatus buildStatus in rev.buildStatuses) - { - if (buildStatus.complete) - { - if (!buildStatus.success) - { - buildFailures++; - } - } - else - { - inProgress = true; - break; - } - } - - if (inProgress) - { - buildState = BuildState.InProgress; - } - else if (buildFailures > 0) - { - buildState = BuildState.Failed; - } - else - { - buildState = BuildState.Success; - } - } - else if (current && !buildServiceEnabled) - { - buildState = BuildState.Configure; - } - - // Calculate the number of changes performed on files and folders (not meta files) - var paths = new Dictionary(); - foreach (ChangeAction change in rev.entries) - { - if (change.path.EndsWith(".meta")) - { - var path = change.path.Substring(0, change.path.Length - 5); - // Actions taken on meta files are secondary to any actions taken on the main file - if (!paths.ContainsKey(path)) - paths[path] = new ChangeData() {path = path, action = change.action}; - } - else - { - paths[change.path] = new ChangeData() {path = change.path, action = change.action}; - } - } - - var displayName = (rev.author != currentUser) ? rev.authorName : "You"; - - var item = new RevisionData - { - id = rev.revisionID, - index = totalRevisions - index + 1, - timeStamp = TimeStampToDateTime(rev.timeStamp), - authorName = displayName, - comment = rev.comment, - - obtained = rev.isObtained, - current = current, - inProgress = (rev.revisionID == inProgressRevision), - enabled = revisionActionsEnabled, - - buildState = buildState, - buildFailures = buildFailures, - - changes = paths.Values.Take(k_MaxChangesPerRevision).ToList(), - changesTotal = paths.Values.Count, - changesTruncated = paths.Values.Count > k_MaxChangesPerRevision, - }; - - yield return item; - } - } - - private static DateTime TimeStampToDateTime(double timeStamp) - { - DateTime dateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc); - dateTime = dateTime.AddSeconds(timeStamp).ToLocalTime(); - return dateTime; - } - } -} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryItemFactory.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryItemFactory.cs.meta deleted file mode 100644 index 3250d966..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryItemFactory.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fc46f91ea1e8e4ca2ab693fef9156dbe -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryRevisionLine.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryRevisionLine.cs deleted file mode 100644 index 2b8fe652..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryRevisionLine.cs +++ /dev/null @@ -1,94 +0,0 @@ -using System; -using UnityEditor; -using UnityEditor.Collaboration; -using UnityEngine; - -#if UNITY_2019_1_OR_NEWER -using UnityEngine.UIElements; -#else -using UnityEngine.Experimental.UIElements; -#endif - -namespace UnityEditor.Collaboration -{ - internal class CollabHistoryRevisionLine : VisualElement - { - public CollabHistoryRevisionLine(int number) - { - AddNumber(number); - AddLine("topLine"); - AddLine("bottomLine"); - AddIndicator(); - } - - public CollabHistoryRevisionLine(DateTime date, bool isFullDateObtained) - { - AddLine(isFullDateObtained ? "obtainedDateLine" : "absentDateLine"); - AddHeader(GetFormattedHeader(date)); - AddToClassList("revisionLineHeader"); - } - - private void AddHeader(string content) - { - Add(new Label - { - text = content - }); - } - - private void AddIndicator() - { - Add(new VisualElement - { - name = "RevisionIndicator" - }); - } - - private void AddLine(string className = null) - { - var line = new VisualElement - { - name = "RevisionLine" - }; - if (!String.IsNullOrEmpty(className)) - { - line.AddToClassList(className); - } - Add(line); - } - - private void AddNumber(int number) - { - Add(new Label - { - text = number.ToString(), - name = "RevisionIndex" - }); - } - - private string GetFormattedHeader(DateTime date) - { - string result = "Commits on " + date.ToString("MMM d"); - switch (date.Day) - { - case 1: - case 21: - case 31: - result += "st"; - break; - case 2: - case 22: - result += "nd"; - break; - case 3: - case 23: - result += "rd"; - break; - default: - result += "th"; - break; - } - return result; - } - } -} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryRevisionLine.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryRevisionLine.cs.meta deleted file mode 100644 index 2659a3c3..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryRevisionLine.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3c737f7a9d78541d1ab25f28f045dd32 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/HistoryProgressSpinner.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/HistoryProgressSpinner.cs deleted file mode 100644 index fad3b824..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/HistoryProgressSpinner.cs +++ /dev/null @@ -1,69 +0,0 @@ -using UnityEngine; - -#if UNITY_2019_1_OR_NEWER -using UnityEngine.UIElements; -#else -using UnityEngine.Experimental.UIElements; -#endif - -namespace UnityEditor.Collaboration -{ - internal class HistoryProgressSpinner : Image - { - private readonly Texture2D[] m_StatusWheelTextures; - private bool m_ProgressEnabled; - private IVisualElementScheduledItem m_Animation; - - public bool ProgressEnabled - { - set - { - if (m_ProgressEnabled == value) - return; - - m_ProgressEnabled = value; - visible = value; - - - if (value) - { - if (m_Animation == null) - { - m_Animation = this.schedule.Execute(AnimateProgress).Every(33); - } - else - { - m_Animation.Resume(); - } - } - else - { - if (m_Animation != null) - { - m_Animation.Pause(); - } - } - } - } - - public HistoryProgressSpinner() - { - m_StatusWheelTextures = new Texture2D[12]; - for (int i = 0; i < 12; i++) - { - m_StatusWheelTextures[i] = EditorGUIUtility.LoadIcon("WaitSpin" + i.ToString("00")); - } - image = m_StatusWheelTextures[0]; - style.width = m_StatusWheelTextures[0].width; - style.height = m_StatusWheelTextures[0].height; - visible = false; - } - - private void AnimateProgress(TimerState obj) - { - int frame = (int)Mathf.Repeat(Time.realtimeSinceStartup * 10, 11.99f); - image = m_StatusWheelTextures[frame]; - MarkDirtyRepaint(); - } - } -} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/HistoryProgressSpinner.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/HistoryProgressSpinner.cs.meta deleted file mode 100644 index 0ded4e8a..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/HistoryProgressSpinner.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cf6aca931950a4a6a886e214e9e649c4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/ICollabHistoryItemFactory.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/ICollabHistoryItemFactory.cs deleted file mode 100644 index 03239a33..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/ICollabHistoryItemFactory.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.Collaboration; - -#if UNITY_2019_1_OR_NEWER -using UnityEngine.UIElements; -#else -using UnityEngine.Experimental.UIElements; -#endif - -namespace UnityEditor.Collaboration -{ - internal interface ICollabHistoryItemFactory - { - IEnumerable GenerateElements(IEnumerable revsRevisions, int mTotalRevisions, int startIndex, string tipRev, string inProgressRevision, bool revisionActionsEnabled, bool buildServiceEnabled, string currentUser); - } -} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/ICollabHistoryItemFactory.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/ICollabHistoryItemFactory.cs.meta deleted file mode 100644 index 08e90856..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/ICollabHistoryItemFactory.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 821f5482c5a3f4389885f4432433f56f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/PagedListView.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/PagedListView.cs deleted file mode 100644 index 472a70e7..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/PagedListView.cs +++ /dev/null @@ -1,192 +0,0 @@ -using System; -using System.Collections.Generic; - -#if UNITY_2019_1_OR_NEWER -using UnityEngine.UIElements; -#else -using UnityEngine.Experimental.UIElements; -using UnityEngine.Experimental.UIElements.StyleEnums; -#endif - -namespace UnityEditor.Collaboration -{ - internal interface IPagerData - { - int curPage { get; } - int totalPages { get; } - PageChangeAction OnPageChanged { get; } - } - - internal class PagerElement : VisualElement - { - IPagerData m_Data; - readonly Label m_PageText; - readonly Button m_DownButton; - readonly Button m_UpButton; - - public PagerElement(IPagerData dataSource) - { - m_Data = dataSource; - - this.style.flexDirection = FlexDirection.Row; - this.style.alignSelf = Align.Center; - - Add(m_DownButton = new Button(OnPageDownClicked) {text = "\u25c5 Newer"}); - m_DownButton.AddToClassList("PagerDown"); - - m_PageText = new Label(); - m_PageText.AddToClassList("PagerLabel"); - Add(m_PageText); - - Add(m_UpButton = new Button(OnPageUpClicked) {text = "Older \u25bb"}); - m_UpButton.AddToClassList("PagerUp"); - - UpdateControls(); - } - - void OnPageDownClicked() - { - CollabAnalytics.SendUserAction(CollabAnalytics.historyCategoryString, "NewerPage"); - m_Data.OnPageChanged(m_Data.curPage - 1); - } - - void OnPageUpClicked() - { - CollabAnalytics.SendUserAction(CollabAnalytics.historyCategoryString, "OlderPage"); - m_Data.OnPageChanged(m_Data.curPage + 1); - } - - public void Refresh() - { - UpdateControls(); - } - - void UpdateControls() - { - var curPage = m_Data.curPage; - var totalPages = m_Data.totalPages; - - m_PageText.text = (curPage + 1) + " / " + totalPages; - m_DownButton.SetEnabled(curPage > 0); - m_UpButton.SetEnabled(curPage < totalPages - 1); - } - } - - internal enum PagerLocation - { - Top, - Bottom, - } - - internal class PagedListView : VisualElement, IPagerData - { - public const int DefaultItemsPerPage = 10; - - readonly VisualElement m_ItemContainer; - readonly PagerElement m_PagerTop, m_PagerBottom; - int m_PageSize = DefaultItemsPerPage; - IEnumerable m_Items; - int m_TotalItems; - int m_CurPage; - - public int pageSize - { - set { m_PageSize = value; } - } - - public IEnumerable items - { - set - { - m_Items = value; - LayoutItems(); - } - } - - public int totalItems - { - set - { - if (m_TotalItems == value) - return; - - m_TotalItems = value; - UpdatePager(); - } - } - - public PageChangeAction OnPageChanged { get; set; } - - public PagedListView() - { - m_PagerTop = new PagerElement(this); - - m_ItemContainer = new VisualElement() - { - name = "PagerItems", - }; - Add(m_ItemContainer); - m_Items = new List(); - - m_PagerBottom = new PagerElement(this); - } - - void LayoutItems() - { - m_ItemContainer.Clear(); - foreach (var item in m_Items) - { - m_ItemContainer.Add(item); - } - } - - void UpdatePager() - { - if (m_PagerTop.parent != this && totalPages > 1 && curPage > 0) - Insert(0, m_PagerTop); - if (m_PagerTop.parent == this && (totalPages <= 1 || curPage == 0)) - Remove(m_PagerTop); - - if (m_PagerBottom.parent != this && totalPages > 1) - Add(m_PagerBottom); - if (m_PagerBottom.parent == this && totalPages <= 1) - Remove(m_PagerBottom); - - m_PagerTop.Refresh(); - m_PagerBottom.Refresh(); - } - - int pageCount - { - get - { - var pages = m_TotalItems / m_PageSize; - if (m_TotalItems % m_PageSize > 0) - pages++; - - return pages; - } - } - - public int curPage - { - get { return m_CurPage; } - set - { - m_CurPage = value; - UpdatePager(); - } - } - - public int totalPages - { - get - { - var extraPage = 0; - if (m_TotalItems % m_PageSize > 0) - extraPage = 1; - return m_TotalItems / m_PageSize + extraPage; - } - } - } -} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/PagedListView.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/PagedListView.cs.meta deleted file mode 100644 index 565f7a2e..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/PagedListView.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 50de529b6a28f4a7093045e08810a5df -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/StatusView.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/StatusView.cs deleted file mode 100644 index 9b50e7a5..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/StatusView.cs +++ /dev/null @@ -1,88 +0,0 @@ -using System; -using UnityEditor; -using UnityEngine; - -#if UNITY_2019_1_OR_NEWER -using UnityEngine.UIElements; -#else -using UnityEngine.Experimental.UIElements; -using UnityEngine.Experimental.UIElements.StyleEnums; -#endif - -namespace UnityEditor.Collaboration -{ - internal class StatusView : VisualElement - { - Image m_Image; - Label m_Message; - Button m_Button; - Action m_Callback; - - public Texture icon - { - get { return m_Image.image; } - set - { - m_Image.image = value; - m_Image.visible = value != null; - // Until "display: hidden" is added, this is the only way to hide an element - m_Image.style.height = value != null ? 150 : 0; - } - } - - public string message - { - get { return m_Message.text; } - set - { - m_Message.text = value; - m_Message.visible = value != null; - } - } - - public string buttonText - { - get { return m_Button.text; } - set - { - m_Button.text = value; - UpdateButton(); - } - } - - public Action callback - { - get { return m_Callback; } - set - { - m_Callback = value; - UpdateButton(); - } - } - - public StatusView() - { - name = "StatusView"; - - this.StretchToParentSize(); - - m_Image = new Image() { name = "StatusIcon", visible = false, style = { height = 0f }}; - m_Message = new Label() { name = "StatusMessage", visible = false}; - m_Button = new Button(InternalCallaback) { name = "StatusButton", visible = false}; - - Add(m_Image); - Add(m_Message); - Add(m_Button); - } - - private void UpdateButton() - { - m_Button.visible = m_Button.text != null && m_Callback != null; - } - - private void InternalCallaback() - { - m_Callback(); - } - } -} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/StatusView.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/StatusView.cs.meta deleted file mode 100644 index bb634b19..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/StatusView.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 08e9894bdf0834710b22d3c0aa245ac0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Resources.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Resources.meta deleted file mode 100644 index 01229c29..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Resources.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a6ab6fd2b91214e8a9c8ec2224a528de -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Resources/Styles.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Resources/Styles.meta deleted file mode 100644 index 0ff03824..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Resources/Styles.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 6b1ae1e78552c459d9ce27048ff51c7f -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Resources/Styles/CollabHistoryCommon.uss b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Resources/Styles/CollabHistoryCommon.uss deleted file mode 100644 index b20f08e9..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Resources/Styles/CollabHistoryCommon.uss +++ /dev/null @@ -1,259 +0,0 @@ -.unity-button { - min-height:0; - -unity-text-align:middle-center; - margin-left:4px; - margin-top:3px; - margin-right:4px; - margin-bottom:3px; - border-left-width:6px; - border-top-width:4px; - border-right-width:6px; - border-bottom-width:4px; - padding-left:6px; - padding-top:2px; - padding-right:6px; - padding-bottom:3px; -} - -.unity-label { - overflow: hidden; - margin-left:4px; - margin-top:2px; - margin-right:4px; - margin-bottom:2px; - padding-left:2px; - padding-top:1px; - min-height: 0; -} - -#HistoryContainer { - flex: 1 0 0; -} - -#HistoryItem { - flex: 1 0 0; - flex-direction: row; -} - -#HistoryDetail { - margin-top: 10px; - margin-left: 10px; - margin-bottom: 10px; - margin-right: 10px; - padding-top: 4px; - flex: 1 0 0; -} - -#Author { - -unity-font-style: bold; - font-size: 12px; -} - -#HistoryDetail > Button { - align-self: flex-end; -} - -CollabHistoryRevisionLine { - width: 40px; -} - -#RevisionLine { - flex: 1 0 0; - margin-left: 35px; - width: 1.5px; -} - -#RevisionLine.topLine { - height: 20px; - flex: 0 0 auto; -} - -#RevisionLine.absentDateLine { - background-color: #797676; -} - -.absentRevision #RevisionLine { - background-color: #797676; -} - -.currentRevision #RevisionLine.topLine { - background-color: #797676; -} - -#RevisionIndex { - position: absolute; - min-width: 23px; - -unity-text-align: middle-right; - top: 15.8px; - font-size: 9px; -} - -#RevisionIndicator { - position: absolute; - background-color: #000; - border-radius: 3px; - width: 8px; - height: 8px; - border-bottom-width: 2px; - border-left-width: 2px; - border-right-width: 2px; - border-top-width: 2px; - top: 20px; - left: 32px; -} - -.revisionLineHeader { - width: 200px; - height: 20px; -} - -.revisionLineHeader > .unity-label { - position: absolute; - margin-left: 47px; - margin-top: 3px; -} - -#PagerItems { - flex-direction: column; -} - -PagerElement > .unity-label { - margin-top: 8px; -} - -.absentRevision #RevisionIndicator { - border-color: #797676; -} - -.absentRevision #RevisionIndex { - color: #797676; -} - -.currentRevision #HistoryDetail { - border-top-width: 2px; -} - -#HistoryItem #RevisionDescription { - white-space: normal; -} - -#HistoryItem #ToggleDescription { - align-self: flex-start; - padding-top: 0; - padding-left: 0; - padding-right: 0; - padding-bottom: 2px; -} - -#HistoryItem #ActionButton { - position: absolute; - right: 0; -} - -#HistoryItem #BuildIcon { - width: 16px; - height: 13px; -} - -#HistoryItemActionsTray { - flex: 1 0 0; - flex-direction: row; - align-items: center; - height: 38px; - margin-left: 10px; - margin-right: 10px; -} - -CollabHistoryDropDown { - border-top-width: 1px; -} - -CollabHistoryDropDown > .unity-label { - padding-top: 10px; - padding-bottom: 10px; -} - -CollabHistoryDropDownItem { - flex-direction: row; - border-top-width: 1px; - overflow: hidden; -} - -#FileIcon { - align-self: center; - width: 26px; - height: 26px; -} - -#FileName { - -unity-font-style: bold; - padding-bottom: 0; - margin-bottom: 0; -} - -#FileIcon { - padding-top: 0; - margin-top: 0; -} - -#ErrorBar { - height: 24px; - background-color: #ff0000; - color: #000; - font-size: 12px; -} - -#ErrorBar > #CloseButton { - position: absolute; - right: 0; - top: 0; - width: 24px; - height: 24px; - color: #000; - font-size: 18px; - -unity-font-style: bold; -} - -#StatusView { - flex-direction: column; - justify-content: center; - align-self: center; - align-items: center; - flex: 1 0 0; -} - -#StatusView > #StatusIcon { - width: 115px; - height: 150px; -} - -#StatusView > #StatusMessage { - font-size: 22px; - width: 230px; - white-space: normal; - -unity-text-align: middle-center; -} - -#StatusView > #StatusButton { - font-size: 12px; - margin-top: 20px; - background-image: none; - width: 108px; - height: 29px; -} - -BuildStatusButton.unity-button { - flex-direction: row; - align-self: flex-end; - align-items: center; - margin-right: 10px; - padding-left:0; - padding-top:0; - padding-right:0; - padding-bottom:0; -} - -BuildStatusButton.unity-button .unity-label { - padding-left: 2px; -} - diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Resources/Styles/CollabHistoryCommon.uss.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Resources/Styles/CollabHistoryCommon.uss.meta deleted file mode 100644 index 035b6621..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Resources/Styles/CollabHistoryCommon.uss.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 3a2d94c8977984b67984caeff9fa666e -ScriptedImporter: - fileIDToRecycleName: - 11400000: stylesheet - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Resources/Styles/CollabHistoryDark.uss b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Resources/Styles/CollabHistoryDark.uss deleted file mode 100644 index de436f89..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Resources/Styles/CollabHistoryDark.uss +++ /dev/null @@ -1,86 +0,0 @@ -#HistoryContainer { - background-color: #292929; -} - -.obtainedRevision #HistoryDetail { - background-color: #333; -} - -.absentRevision #HistoryDetail { - background-color: #595959; -} - -#StatusView { - background-color: #292929; -} - -#StatusView > #StatusMessage { - color: #959995; -} - -BuildStatusButton.unity-button { - color: #B4B4B4; - background-image: resource("Builtin Skins/DarkSkin/Images/btn.png"); -} - -BuildStatusButton.unity-button:hover { - color: #FFF; -} - -BuildStatusButton.unity-button:hover:active { - background-image: resource("Builtin Skins/DarkSkin/Images/btn act.png"); -} - -BuildStatusButton.unity-button:checked { - color: #F0F0F0; - background-image: resource("Builtin Skins/DarkSkin/Images/btn on.png"); -} - -BuildStatusButton.unity-button:hover:checked { - color: #FFF; -} - -BuildStatusButton.unity-button:hover:active:checked { - background-image: resource("Builtin Skins/DarkSkin/Images/btn onact.png"); -} - -BuildStatusButton.unity-button:focus:checked { - background-image: resource("Builtin Skins/DarkSkin/Images/btn on focus.png"); -} - -CollabHistoryDropDown { - border-color: #292929; -} - -CollabHistoryDropDownItem { - border-color: #292929; -} - -#RevisionLine.obtainedDateLine { - background-color: #0cb4cc; -} - -.obtainedRevision #RevisionLine { - background-color: #0cb4cc; -} - -#RevisionIndex { - color: #0cb4cc; -} - -#RevisionIndicator { - border-color: #0cb4cc; -} - -.currentRevision #RevisionIndicator { - background-color: #0cb4cc; -} - -.currentRevision #HistoryDetail { - border-color: #0cb4cc; -} - -#StatusView > #StatusButton { - background-color: #0cb4cc; - border-color: #0cb4cc; -} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Resources/Styles/CollabHistoryDark.uss.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Resources/Styles/CollabHistoryDark.uss.meta deleted file mode 100644 index 35a7d097..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Resources/Styles/CollabHistoryDark.uss.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 70d4d75a2877243758b0750cbc75b6eb -ScriptedImporter: - fileIDToRecycleName: - 11400000: stylesheet - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Resources/Styles/CollabHistoryLight.uss b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Resources/Styles/CollabHistoryLight.uss deleted file mode 100644 index 3f9b85f3..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Resources/Styles/CollabHistoryLight.uss +++ /dev/null @@ -1,86 +0,0 @@ -#HistoryContainer { - background-color: #a2a2a2; -} - -.obtainedRevision #HistoryDetail { - background-color: #c2c2c2; -} - -.absentRevision #HistoryDetail { - background-color: #dedede; -} - -#StatusView { - background-color: #a2a2a3; -} - -#StatusView > #StatusMessage { - color: #000; -} - -BuildStatusButton.unity-button { - color: #111; - background-image: resource("Builtin Skins/LightSkin/Images/btn.png"); -} - -BuildStatusButton.unity-button:hover { - color: #000; -} - -BuildStatusButton.unity-button:hover:active { - background-image: resource("Builtin Skins/LightSkin/Images/btn act.png"); -} - -BuildStatusButton.unity-button:checked { - color: #F0F0F0; - background-image: resource("Builtin Skins/LightSkin/Images/btn on.png"); -} - -BuildStatusButton.unity-button:hover:checked { - color: #000; -} - -BuildStatusButton.unity-button:hover:active:checked { - background-image: resource("Builtin Skins/LightSkin/Images/btn onact.png"); -} - -BuildStatusButton.unity-button:focus:checked { - background-image: resource("Builtin Skins/LightSkin/Images/btn on focus.png"); -} - -CollabHistoryDropDown { - border-color: #a2a2a2; -} - -CollabHistoryDropDownItem { - border-color: #a2a2a2; -} - -#RevisionLine.obtainedDateLine { - background-color: #018d98; -} - -.obtainedRevision #RevisionLine { - background-color: #018d98; -} - -#RevisionIndex { - color: #018d98; -} - -#RevisionIndicator { - border-color: #018d98; -} - -.currentRevision #RevisionIndicator { - background-color: #018d98; -} - -.currentRevision #HistoryDetail { - border-color: #018d98; -} - -#StatusView > #StatusButton { - background-color: #018d98; - border-color: #018d98; -} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Resources/Styles/CollabHistoryLight.uss.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Resources/Styles/CollabHistoryLight.uss.meta deleted file mode 100644 index 28c860e5..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Resources/Styles/CollabHistoryLight.uss.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: b52bde26a83564960bcb90217f72b910 -ScriptedImporter: - fileIDToRecycleName: - 11400000: stylesheet - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Unity.CollabProxy.Editor.asmdef b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Unity.CollabProxy.Editor.asmdef deleted file mode 100644 index 66511e1d..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Unity.CollabProxy.Editor.asmdef +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "Unity.CollabProxy.Editor", - "includePlatforms": [ - "Editor" - ], - "excludePlatforms": [] -} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Unity.CollabProxy.Editor.asmdef.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Unity.CollabProxy.Editor.asmdef.meta deleted file mode 100644 index 03ebeca0..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Unity.CollabProxy.Editor.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 645165c8169474bfbbeb8fb0bcfd26f5 -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/LICENSE.md b/Library/PackageCache/com.unity.collab-proxy@1.2.16/LICENSE.md deleted file mode 100644 index 31bde4e4..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/LICENSE.md +++ /dev/null @@ -1,31 +0,0 @@ -**Unity Companion Package License v1.0 ("_License_")** - -Copyright © 2017 Unity Technologies ApS ("**_Unity_**") - -Unity hereby grants to you a worldwide, non-exclusive, no-charge, and royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute the software that is made available with this License ("**_Software_**"), subject to the following terms and conditions: - -1. *Unity Companion Use Only*. Exercise of the license granted herein is limited to exercise for the creation, use, and/or distribution of applications, software, or other content pursuant to a valid Unity development engine software license ("**_Engine License_**"). That means while use of the Software is not limited to use in the software licensed under the Engine License, the Software may not be used for any purpose other than the creation, use, and/or distribution of Engine License-dependent applications, software, or other content. No other exercise of the license granted herein is permitted. - -1. *No Modification of Engine License*. Neither this License nor any exercise of the license granted herein modifies the Engine License in any way. - -1. *Ownership & Grant Back to You*. - - 3.1. You own your content. In this License, "derivative works" means derivatives of the Software itself--works derived only from the Software by you under this License (for example, modifying the code of the Software itself to improve its efficacy); “derivative works” of the Software do not include, for example, games, apps, or content that you create using the Software. You keep all right, title, and interest to your own content. - - 3.2. Unity owns its content. While you keep all right, title, and interest to your own content per the above, as between Unity and you, Unity will own all right, title, and interest to all intellectual property rights (including patent, trademark, and copyright) in the Software and derivative works of the Software, and you hereby assign and agree to assign all such rights in those derivative works to Unity. - - 3.3. You have a license to those derivative works. Subject to this License, Unity grants to you the same worldwide, non-exclusive, no-charge, and royalty-free copyright license to derivative works of the Software you create as is granted to you for the Software under this License. - -1. *Trademarks*. You are not granted any right or license under this License to use any trademarks, service marks, trade names, products names, or branding of Unity or its affiliates ("**_Trademarks_**"). Descriptive uses of Trademarks are permitted; see, for example, Unity’s Branding Usage Guidelines at [https://unity3d.com/public-relations/brand](https://unity3d.com/public-relations/brand). - -1. *Notices & Third-Party Rights*. This License, including the copyright notice above, must be provided in all substantial portions of the Software and derivative works thereof (or, if that is impracticable, in any other location where such notices are customarily placed). Further, if the Software is accompanied by a Unity "third-party notices" or similar file, you acknowledge and agree that software identified in that file is governed by those separate license terms. - -1. *DISCLAIMER, LIMITATION OF LIABILITY*. THE SOFTWARE AND ANY DERIVATIVE WORKS THEREOF IS PROVIDED ON AN "AS IS" BASIS, AND IS PROVIDED WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND/OR NONINFRINGEMENT. IN NO EVENT SHALL ANY COPYRIGHT HOLDER OR AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES (WHETHER DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL, INCLUDING PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF USE, DATA, OR PROFITS, AND BUSINESS INTERRUPTION), OR OTHER LIABILITY WHATSOEVER, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM OR OUT OF, OR IN CONNECTION WITH, THE SOFTWARE OR ANY DERIVATIVE WORKS THEREOF OR THE USE OF OR OTHER DEALINGS IN SAME, EVEN WHERE ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -1. *USE IS ACCEPTANCE and License Versions*. Your receipt and use of the Software constitutes your acceptance of this License and its terms and conditions. Software released by Unity under this License may be modified or updated and the License with it; upon any such modification or update, you will comply with the terms of the updated License for any use of any of the Software under the updated License. - -1. *Use in Compliance with Law and Termination*. Your exercise of the license granted herein will at all times be in compliance with applicable law and will not infringe any proprietary rights (including intellectual property rights); this License will terminate immediately on any breach by you of this License. - -1. *Severability*. If any provision of this License is held to be unenforceable or invalid, that provision will be enforced to the maximum extent possible and the other provisions will remain in full force and effect. - -1. *Governing Law and Venue*. This License is governed by and construed in accordance with the laws of Denmark, except for its conflict of laws rules; the United Nations Convention on Contracts for the International Sale of Goods will not apply. If you reside (or your principal place of business is) within the United States, you and Unity agree to submit to the personal and exclusive jurisdiction of and venue in the state and federal courts located in San Francisco County, California concerning any dispute arising out of this License ("**_Dispute_**"). If you reside (or your principal place of business is) outside the United States, you and Unity agree to submit to the personal and exclusive jurisdiction of and venue in the courts located in Copenhagen, Denmark concerning any Dispute. diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/LICENSE.md.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/LICENSE.md.meta deleted file mode 100644 index 30f5c3a6..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/LICENSE.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: c754112a02f354a6696fa4f2b99e95a5 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/README.md b/Library/PackageCache/com.unity.collab-proxy@1.2.16/README.md deleted file mode 100644 index 5cfbd88a..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Collab Proxy UPM Package -This is the packaged version of Collab, currently limited to containing the History and Toolbar windows, along with supporting classes. - -## Development -Check this repository out in your {$PROJECT}/Packages/ folder, under the name com.unity.collab-proxy. The classes will be built by Unity. - -## Testing -In order to run the tests, you will need to add this project to the testables key in your manifest.json - once you have done this, the tests will be picked up by the Unity Test Runner window. - -## Building -You may build this project using msbuild. The commands to do so can be seen under .gitlab-ci.yml. - -## Deploying -Gitlab will automatically build your project when you deploy. You can download the resulting artifact, which will be a dll, and place it in your Editor/bin/ folder. Open the package in Unity to generate the meta files, and then you will be able to publish. - -We're currently looking into a way to avoid this manual process. diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/README.md.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/README.md.meta deleted file mode 100644 index b3ad9937..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/README.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: ac281230df7b14becb40b3c479f1b429 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Tests.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Tests.meta deleted file mode 100644 index f43ddd35..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Tests.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1369382d2c5e64dc5b2ec0b6b0a94531 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Tests/Editor.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Tests/Editor.meta deleted file mode 100644 index b80cefdb..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Tests/Editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 4506ac79f5b274cb1b249ed7f4abfb9a -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Tests/Editor/HistoryTests.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Tests/Editor/HistoryTests.cs deleted file mode 100644 index ba79a204..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Tests/Editor/HistoryTests.cs +++ /dev/null @@ -1,583 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; -using UnityEditor.Collaboration; -using UnityEngine.TestTools; -using NUnit.Framework; - -namespace UnityEditor.Collaboration.Tests -{ - [TestFixture] - internal class HistoryTests - { - private TestHistoryWindow _window; - private TestRevisionsService _service; - private CollabHistoryPresenter _presenter; - - [SetUp] - public void SetUp() - { - _window = new TestHistoryWindow(); - _service = new TestRevisionsService(); - _presenter = new CollabHistoryPresenter(_window, new CollabHistoryItemFactory(), _service); - } - - [TearDown] - public void TearDown() - { - } - - [Test] - public void CollabHistoryPresenter_OnUpdatePage__PropagatesRevisionResult() - { - _service.result = new RevisionsResult() - { - Revisions = new List() - { - new Revision(authorName: "authorName", comment: "comment", revisionID: "revisionID"), - } - }; - - _presenter.OnUpdatePage(0); - var item = _window.items.First(); - - Assert.AreEqual("revisionID", item.id); - Assert.AreEqual("authorName", item.authorName); - Assert.AreEqual("comment", item.comment); - } - - [Test] - public void CollabHistoryPresenter_OnUpdatePage__RevisionNumberingIsInOrder() - { - _service.result = new RevisionsResult() - { - RevisionsInRepo = 4, - Revisions = new List() - { - new Revision(revisionID: "0"), - new Revision(revisionID: "1"), - new Revision(revisionID: "2"), - new Revision(revisionID: "3"), - } - }; - - _presenter.OnUpdatePage(0); - var items = _window.items.ToArray(); - - Assert.AreEqual(4, items[0].index); - Assert.AreEqual(3, items[1].index); - Assert.AreEqual(2, items[2].index); - Assert.AreEqual(1, items[3].index); - } - - [Test] - public void CollabHistoryPresenter_OnUpdatePage__RevisionNumberingChangesForMorePages() - { - _service.result = new RevisionsResult() - { - RevisionsInRepo = 12, - Revisions = new List() - { - new Revision(revisionID: "0"), - new Revision(revisionID: "1"), - new Revision(revisionID: "2"), - new Revision(revisionID: "3"), - new Revision(revisionID: "4"), - } - }; - - _presenter.OnUpdatePage(1); - var items = _window.items.ToArray(); - - Assert.AreEqual(12, items[0].index); - Assert.AreEqual(11, items[1].index); - Assert.AreEqual(10, items[2].index); - Assert.AreEqual(9, items[3].index); - Assert.AreEqual(8, items[4].index); - } - - [Test] - public void CollabHistoryPresenter_OnUpdatePage__ObtainedIsCalculated() - { - _service.result = new RevisionsResult() - { - Revisions = new List() - { - new Revision(isObtained: false), - new Revision(isObtained: true), - } - }; - - _presenter.OnUpdatePage(0); - var items = _window.items.ToArray(); - - Assert.IsFalse(items[0].obtained); - Assert.IsTrue(items[1].obtained); - } - - [Test] - public void CollabHistoryPresenter_OnUpdatePage__CurrentIsCalculated() - { - _service.result = new RevisionsResult() - { - Revisions = new List() - { - new Revision(revisionID: "1"), - new Revision(revisionID: "2"), - new Revision(revisionID: "3"), - } - }; - _service.tipRevision = "2"; - - _presenter.OnUpdatePage(0); - var items = _window.items.ToArray(); - - Assert.AreEqual(false, items[0].current); - Assert.AreEqual(true, items[1].current); - Assert.AreEqual(false, items[2].current); - } - - [Test] - public void CollabHistoryPresenter_OnUpdatePage__InProgressIsCalculated() - { - _service.result = new RevisionsResult() - { - Revisions = new List() - { - new Revision(revisionID: "1"), - new Revision(revisionID: "2"), - new Revision(revisionID: "3"), - } - }; - _window.inProgressRevision = "2"; - - _presenter.OnUpdatePage(0); - var items = _window.items.ToArray(); - - Assert.IsFalse(items[0].inProgress); - Assert.IsTrue(items[1].inProgress); - Assert.IsFalse(items[2].inProgress); - } - - [Test] - public void CollabHistoryPresenter_OnUpdatePage__EnabledIsCalculated() - { - _service.result = new RevisionsResult() - { - Revisions = new List() - { - new Revision(revisionID: "0"), - } - }; - _window.revisionActionsEnabled = true; - - _presenter.OnUpdatePage(0); - var item = _window.items.First(); - - Assert.AreEqual(true, item.enabled); - } - - [Test] - public void CollabHistoryPresenter_OnUpdatePage__DisabledIsCalculated() - { - _service.result = new RevisionsResult() - { - Revisions = new List() - { - new Revision(revisionID: "0"), - } - }; - _window.revisionActionsEnabled = false; - - _presenter.OnUpdatePage(0); - var item = _window.items.First(); - - Assert.AreEqual(false, item.enabled); - } - - [Test] - public void CollabHistoryPresenter_OnUpdatePage__BuildStateHasNoneWhenNotTip() - { - _service.result = new RevisionsResult() - { - Revisions = new List() - { - new Revision(revisionID: "1"), - } - }; - _service.tipRevision = "0"; - _presenter.BuildServiceEnabled = false; - - _presenter.OnUpdatePage(0); - var item = _window.items.First(); - - Assert.AreEqual(BuildState.None, item.buildState); - } - - [Test] - public void CollabHistoryPresenter_OnUpdatePage__BuildStateTipHasNoneWhenEnabled() - { - _service.result = new RevisionsResult() - { - Revisions = new List() - { - new Revision(revisionID: "0"), - } - }; - _service.tipRevision = "0"; - _presenter.BuildServiceEnabled = true; - - _presenter.OnUpdatePage(0); - var item = _window.items.First(); - - Assert.AreEqual(BuildState.None, item.buildState); - } - - [Test] - public void CollabHistoryPresenter_OnUpdatePage__BuildStateHasConfigureWhenTip() - { - _service.result = new RevisionsResult() - { - Revisions = new List() - { - new Revision(revisionID: "0"), - } - }; - _service.tipRevision = "0"; - _presenter.BuildServiceEnabled = false; - - _presenter.OnUpdatePage(0); - var item = _window.items.First(); - - Assert.AreEqual(BuildState.Configure, item.buildState); - } - - [Test] - public void CollabHistoryPresenter_OnUpdatePage__BuildStateHasConfigureWhenZeroBuildStatus() - { - _service.result = new RevisionsResult() - { - Revisions = new List() - { - new Revision(revisionID: "0"), - } - }; - _service.tipRevision = "0"; - _presenter.BuildServiceEnabled = false; - - _presenter.OnUpdatePage(0); - var item = _window.items.First(); - - Assert.AreEqual(BuildState.Configure, item.buildState); - } - - [Test] - public void CollabHistoryPresenter_OnUpdatePage__BuildStateHasNoneWhenZeroBuildStatuses() - { - _service.result = new RevisionsResult() - { - Revisions = new List() - { - new Revision(revisionID: "0"), - } - }; - _service.tipRevision = "0"; - _presenter.BuildServiceEnabled = true; - - _presenter.OnUpdatePage(0); - var item = _window.items.First(); - - Assert.AreEqual(BuildState.None, item.buildState); - } - - [Test] - public void CollabHistoryPresenter_OnUpdatePage__BuildStateHasSuccessWhenCompleteAndSucceeded() - { - _service.result = new RevisionsResult() - { - Revisions = new List() - { - new Revision - ( - revisionID: "0", - buildStatuses: new CloudBuildStatus[1] - { - new CloudBuildStatus(complete: true, success: true), - } - ), - } - }; - _service.tipRevision = "0"; - _presenter.BuildServiceEnabled = true; - - _presenter.OnUpdatePage(0); - var item = _window.items.First(); - - Assert.AreEqual(BuildState.Success, item.buildState); - } - - [Test] - public void CollabHistoryPresenter_OnUpdatePage__BuildStateHasInProgress() - { - _service.result = new RevisionsResult() - { - Revisions = new List() - { - new Revision - ( - revisionID: "0", - buildStatuses: new CloudBuildStatus[1] - { - new CloudBuildStatus(complete: false), - } - ), - } - }; - _service.tipRevision = "0"; - _presenter.BuildServiceEnabled = true; - - _presenter.OnUpdatePage(0); - var item = _window.items.First(); - - Assert.AreEqual(BuildState.InProgress, item.buildState); - } - - [Test] - public void CollabHistoryPresenter_OnUpdatePage__BuildStateHasFailure() - { - _service.result = new RevisionsResult() - { - Revisions = new List() - { - new Revision - ( - revisionID: "0", - buildStatuses: new CloudBuildStatus[1] - { - new CloudBuildStatus(complete: true, success: false), - } - ), - } - }; - _service.tipRevision = "0"; - _presenter.BuildServiceEnabled = true; - - _presenter.OnUpdatePage(0); - var item = _window.items.First(); - - Assert.AreEqual(BuildState.Failed, item.buildState); - } - - [Test] - public void CollabHistoryPresenter_OnUpdatePage__BuildStateHasFailureWhenAnyBuildsFail() - { - _service.result = new RevisionsResult() - { - Revisions = new List() - { - new Revision - ( - revisionID: "0", - buildStatuses: new CloudBuildStatus[3] - { - new CloudBuildStatus(complete: true, success: false), - new CloudBuildStatus(complete: true, success: false), - new CloudBuildStatus(complete: true, success: true), - } - ), - } - }; - _service.tipRevision = "0"; - _presenter.BuildServiceEnabled = true; - - _presenter.OnUpdatePage(0); - var item = _window.items.First(); - - Assert.AreEqual(BuildState.Failed, item.buildState); - } - - [Test] - public void CollabHistoryPresenter_OnUpdatePage__ChangesPropagateThrough() - { - _service.result = new RevisionsResult() - { - Revisions = new List() - { - new Revision(revisionID: "0", entries: GenerateChangeActions(3)), - } - }; - - _presenter.OnUpdatePage(0); - var item = _window.items.First(); - var changes = item.changes.ToList(); - - Assert.AreEqual("Path0", changes[0].path); - Assert.AreEqual("Path1", changes[1].path); - Assert.AreEqual("Path2", changes[2].path); - } - - [Test] - public void CollabHistoryPresenter_OnUpdatePage__ChangesTotalIsCalculated() - { - _service.result = new RevisionsResult() - { - Revisions = new List() - { - new Revision(revisionID: "0", entries: GenerateChangeActions(3)), - } - }; - - _presenter.OnUpdatePage(0); - var item = _window.items.First(); - - Assert.AreEqual(3, item.changes.Count); - } - - [Test] - public void CollabHistoryPresenter_OnUpdatePage__ChangesTruncatedIsCalculated() - { - for (var i = 0; i < 20; i++) - { - _service.result = new RevisionsResult() - { - Revisions = new List() - { - new Revision(revisionID: "0", entries: GenerateChangeActions(i)), - } - }; - - _presenter.OnUpdatePage(0); - var item = _window.items.First(); - - Assert.AreEqual(i > 10, item.changesTruncated); - } - } - - [Test] - public void CollabHistoryPresenter_OnUpdatePage__OnlyKeeps10ChangeActions() - { - _service.result = new RevisionsResult() - { - Revisions = new List() - { - new Revision(authorName: "Test", author: "test", entries: GenerateChangeActions(12)), - } - }; - - _presenter.OnUpdatePage(1); - var item = _window.items.First(); - - Assert.AreEqual(10, item.changes.Count); - Assert.AreEqual(12, item.changesTotal); - Assert.AreEqual(true, item.changesTruncated); - } - - [Test] - public void CollabHistoryPresenter_OnUpdatePage__DeduplicatesMetaFiles() - { - _service.result = new RevisionsResult() - { - Revisions = new List() - { - new Revision - ( - authorName: "Test", - author: "test", - revisionID: "", - entries: new ChangeAction[2] - { - new ChangeAction(path: "Path1", action: "Action1"), - new ChangeAction(path: "Path1.meta", action: "Action1"), - } - ), - } - }; - - _presenter.OnUpdatePage(1); - var item = _window.items.First(); - - Assert.AreEqual(1, item.changes.Count); - Assert.AreEqual(1, item.changesTotal); - Assert.AreEqual("Path1", item.changes.First().path); - } - - [Test] - public void CollabHistoryPresenter_OnUpdatePage__FolderMetaFilesAreCounted() - { - _service.result = new RevisionsResult() - { - Revisions = new List() - { - new Revision - ( - authorName: "Test", - author: "test", - entries: new ChangeAction[1] - { - new ChangeAction(path: "Folder1.meta", action: "Action1"), - } - ), - } - }; - - _presenter.OnUpdatePage(1); - var item = _window.items.First(); - - Assert.AreEqual(1, item.changes.Count); - Assert.AreEqual(1, item.changesTotal); - Assert.AreEqual("Folder1", item.changes.First().path); - } - - private static ChangeAction[] GenerateChangeActions(int count) - { - var entries = new ChangeAction[count]; - for (var i = 0; i < count; i++) - entries[i] = new ChangeAction(path: "Path" + i, action: "Action" + i); - return entries; - } - } - - internal class TestRevisionsService : IRevisionsService - { - public RevisionsResult result; - public event RevisionsDelegate FetchRevisionsCallback; - - public string tipRevision { get; set; } - public string currentUser { get; set; } - - public void GetRevisions(int offset, int count) - { - if(FetchRevisionsCallback != null) - { - FetchRevisionsCallback(result); - } - } - } - - internal class TestHistoryWindow : ICollabHistoryWindow - { - public IEnumerable items; - - public bool revisionActionsEnabled { get; set; } - public int itemsPerPage { get; set; } - public string errMessage { get; set; } - public string inProgressRevision { get; set; } - public PageChangeAction OnPageChangeAction { get; set; } - public RevisionAction OnGoBackAction { get; set; } - public RevisionAction OnUpdateAction { get; set; } - public RevisionAction OnRestoreAction { get; set; } - public ShowBuildAction OnShowBuildAction { get; set; } - public Action OnShowServicesAction { get; set; } - - public void UpdateState(HistoryState state, bool force) - { - } - - public void UpdateRevisions(IEnumerable items, string tip, int totalRevisions, int currPage) - { - this.items = items; - } - } -} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Tests/Editor/HistoryTests.cs.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Tests/Editor/HistoryTests.cs.meta deleted file mode 100644 index d648a7ff..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Tests/Editor/HistoryTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 23a56a19774ed42b6b65646af08a003c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Tests/Editor/Unity.CollabProxy.EditorTests.asmdef b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Tests/Editor/Unity.CollabProxy.EditorTests.asmdef deleted file mode 100644 index 3467a9ed..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Tests/Editor/Unity.CollabProxy.EditorTests.asmdef +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "Unity.CollabProxy.EditorTests", - "references": [ - "Unity.CollabProxy.Editor" - ], - "optionalUnityReferences": [ - "TestAssemblies" - ], - "includePlatforms": [ - "Editor" - ], - "excludePlatforms": [] -} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Tests/Editor/Unity.CollabProxy.EditorTests.asmdef.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Tests/Editor/Unity.CollabProxy.EditorTests.asmdef.meta deleted file mode 100644 index 57db5c7d..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Tests/Editor/Unity.CollabProxy.EditorTests.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 782de34c17796430ba8d0ceddb60944e -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/package.json b/Library/PackageCache/com.unity.collab-proxy@1.2.16/package.json deleted file mode 100644 index 34022740..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "com.unity.collab-proxy", - "displayName": "Unity Collaborate", - "version": "1.2.16", - "unity": "2018.3", - "description": "Collaborate is a simple way for teams to save, share, and sync their Unity project", - "keywords": [ - "collab", - "collaborate", - "teams", - "team", - "cloud", - "backup" - ], - "dependencies": {}, - "repository": { - "type": "git", - "url": "https://gitlab.cds.internal.unity3d.com/upm-packages/cloud-services/collab-proxy.git", - "revision": "070e173b6a36e1d6097b1d95e09c08840c23f6ca" - } -} diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/package.json.meta b/Library/PackageCache/com.unity.collab-proxy@1.2.16/package.json.meta deleted file mode 100644 index c52d0c60..00000000 --- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/package.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 57b0c806ba25b48aa8a6ecb3345a4a9b -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ext.nunit@1.0.0/.gitlab-ci.yml b/Library/PackageCache/com.unity.ext.nunit@1.0.0/.gitlab-ci.yml deleted file mode 100644 index 4c64e220..00000000 --- a/Library/PackageCache/com.unity.ext.nunit@1.0.0/.gitlab-ci.yml +++ /dev/null @@ -1,15 +0,0 @@ -image: node:6.10.0 - -stages: - - push_to_packman_staging - -push_to_packman_staging: - stage: push_to_packman_staging - only: - - tags - script: - - sed -i "s/0.0.1-PLACEHOLDERVERSION/$CI_COMMIT_TAG/g" package.json - - sed -i "s/PLACEHOLDERSHA/$CI_COMMIT_SHA/g" package.json - - sed -i "s/0.0.1-PLACEHOLDERVERSION/$CI_COMMIT_TAG/g" CHANGELOG.md - - curl -u $USER_NAME:$API_KEY https://staging-packages.unity.com/auth > .npmrc - - npm publish diff --git a/Library/PackageCache/com.unity.ext.nunit@1.0.0/CHANGELOG.md b/Library/PackageCache/com.unity.ext.nunit@1.0.0/CHANGELOG.md deleted file mode 100644 index 225baeaa..00000000 --- a/Library/PackageCache/com.unity.ext.nunit@1.0.0/CHANGELOG.md +++ /dev/null @@ -1,11 +0,0 @@ -# Changelog -All notable changes to this package will be documented in this file. - -The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - -## [1.0.0] - 2019-02-21 - -### This is the first release of *Unity Package com.unity.ext.nunit*. - -- Migrated the custom version of nunit from inside of unity. diff --git a/Library/PackageCache/com.unity.ext.nunit@1.0.0/CHANGELOG.md.meta b/Library/PackageCache/com.unity.ext.nunit@1.0.0/CHANGELOG.md.meta deleted file mode 100644 index d91fbdec..00000000 --- a/Library/PackageCache/com.unity.ext.nunit@1.0.0/CHANGELOG.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: f49bbe06ffa5ae24abe32abdab430c24 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ext.nunit@1.0.0/Documentation~/ext.nunit.md b/Library/PackageCache/com.unity.ext.nunit@1.0.0/Documentation~/ext.nunit.md deleted file mode 100644 index 2a38b9d8..00000000 --- a/Library/PackageCache/com.unity.ext.nunit@1.0.0/Documentation~/ext.nunit.md +++ /dev/null @@ -1,6 +0,0 @@ -# Custom Nunit build to work with Unity - -This version of nunit works with all platforms, il2cpp and Mono AOT. - -For Nunit Documentation: -https://github.com/nunit/docs/wiki/NUnit-Documentation diff --git a/Library/PackageCache/com.unity.ext.nunit@1.0.0/LICENSE.md b/Library/PackageCache/com.unity.ext.nunit@1.0.0/LICENSE.md deleted file mode 100644 index ccc1f59c..00000000 --- a/Library/PackageCache/com.unity.ext.nunit@1.0.0/LICENSE.md +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2018 Charlie Poole, Rob Prouse - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ext.nunit@1.0.0/LICENSE.md.meta b/Library/PackageCache/com.unity.ext.nunit@1.0.0/LICENSE.md.meta deleted file mode 100644 index 90df748f..00000000 --- a/Library/PackageCache/com.unity.ext.nunit@1.0.0/LICENSE.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: f91a00d2dca52b843b2d50ccf750737d -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ext.nunit@1.0.0/README.md b/Library/PackageCache/com.unity.ext.nunit@1.0.0/README.md deleted file mode 100644 index 2a38b9d8..00000000 --- a/Library/PackageCache/com.unity.ext.nunit@1.0.0/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# Custom Nunit build to work with Unity - -This version of nunit works with all platforms, il2cpp and Mono AOT. - -For Nunit Documentation: -https://github.com/nunit/docs/wiki/NUnit-Documentation diff --git a/Library/PackageCache/com.unity.ext.nunit@1.0.0/README.md.meta b/Library/PackageCache/com.unity.ext.nunit@1.0.0/README.md.meta deleted file mode 100644 index e9a7f9fa..00000000 --- a/Library/PackageCache/com.unity.ext.nunit@1.0.0/README.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 5da62a0c1c5218c4aa16b74546a7822d -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35.meta b/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35.meta deleted file mode 100644 index 278a2faf..00000000 --- a/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a36d8b72880a8004f96ac54ce4598ff9 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom.meta b/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom.meta deleted file mode 100644 index 750f82c9..00000000 --- a/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 2347243c7aa3e224f9282dc94e6fc3b2 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/This is a custom build DONT include.txt b/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/This is a custom build DONT include.txt deleted file mode 100644 index 0839eb99..00000000 --- a/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/This is a custom build DONT include.txt +++ /dev/null @@ -1,4 +0,0 @@ -This is a custom nUnit build meant to be used by Unity editor and players. It shoul not be included or referenced from anywhere (unless you know what you're doing) - -Build from this repo -https://github.com/Unity-Technologies/nunit \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/This is a custom build DONT include.txt.meta b/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/This is a custom build DONT include.txt.meta deleted file mode 100644 index 5e251ee0..00000000 --- a/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/This is a custom build DONT include.txt.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 3d67ccdf81bed8247ad0db2d5f47a7d1 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.dll b/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.dll deleted file mode 100644 index 3af863c6..00000000 Binary files a/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.dll and /dev/null differ diff --git a/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.dll.mdb b/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.dll.mdb deleted file mode 100644 index cb688df0..00000000 Binary files a/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.dll.mdb and /dev/null differ diff --git a/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.dll.mdb.meta b/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.dll.mdb.meta deleted file mode 100644 index 1e81d1e5..00000000 --- a/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.dll.mdb.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 6f768c3714a34a549960ea903fbadcc2 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.dll.meta b/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.dll.meta deleted file mode 100644 index 2870dbc4..00000000 --- a/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.dll.meta +++ /dev/null @@ -1,37 +0,0 @@ -fileFormatVersion: 2 -guid: f1605f5534186904fa2c4c42acbfe01e -PluginImporter: - externalObjects: {} - serializedVersion: 2 - iconMap: {} - executionOrder: {} - defineConstraints: ["UNITY_INCLUDE_TESTS"] - isPreloaded: 0 - isOverridable: 1 - isExplicitlyReferenced: 1 - platformData: - - first: - '': Any - second: - enabled: 0 - settings: {} - - first: - Any: - second: - enabled: 1 - settings: {} - - first: - Editor: Editor - second: - enabled: 0 - settings: - DefaultValueInitialized: true - - first: - Windows Store Apps: WindowsStoreApps - second: - enabled: 0 - settings: - CPU: AnyCPU - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.pdb b/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.pdb deleted file mode 100644 index cae9b393..00000000 Binary files a/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.pdb and /dev/null differ diff --git a/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.pdb.meta b/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.pdb.meta deleted file mode 100644 index dc027458..00000000 --- a/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.pdb.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: f136f1f122a53c64c9af51baecaa9c96 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.xml b/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.xml deleted file mode 100644 index aea20992..00000000 --- a/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.xml +++ /dev/null @@ -1,18101 +0,0 @@ - - - - nunit.framework - - - - - Basic Asserts on strings. - - - - - The Equals method throws an InvalidOperationException. This is done - to make sure there is no mistake by calling this function. - - - - - - - override the default ReferenceEquals to throw an InvalidOperationException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. - - - - - - - Asserts that a string is found within another string. - - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string is found within another string. - - The expected string - The string to be examined - - - - Asserts that a string is not found within another string. - - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string is found within another string. - - The expected string - The string to be examined - - - - Asserts that a string starts with another string. - - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string starts with another string. - - The expected string - The string to be examined - - - - Asserts that a string does not start with another string. - - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string does not start with another string. - - The expected string - The string to be examined - - - - Asserts that a string ends with another string. - - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string ends with another string. - - The expected string - The string to be examined - - - - Asserts that a string does not end with another string. - - The expected string - The string to be examined - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string does not end with another string. - - The expected string - The string to be examined - - - - Asserts that two strings are equal, without regard to case. - - The expected string - The actual string - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that two strings are equal, without regard to case. - - The expected string - The actual string - - - - Asserts that two strings are not equal, without regard to case. - - The expected string - The actual string - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that two strings are not equal, without regard to case. - - The expected string - The actual string - - - - Asserts that a string matches an expected regular expression pattern. - - The regex pattern to be matched - The actual string - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string matches an expected regular expression pattern. - - The regex pattern to be matched - The actual string - - - - Asserts that a string does not match an expected regular expression pattern. - - The regex pattern to be used - The actual string - The message to display in case of failure - Arguments used in formatting the message - - - - Asserts that a string does not match an expected regular expression pattern. - - The regex pattern to be used - The actual string - - - - Combines multiple filters so that a test must pass all - of them in order to pass this filter. - - - - - A base class for multi-part filters - - - - - Interface to be implemented by filters applied to tests. - The filter applies when running the test, after it has been - loaded, since this is the only time an ITest exists. - - - - - Interface to be implemented by filters applied to tests. - The filter applies when running the test, after it has been - loaded, since this is the only time an ITest exists. - - - - - An object implementing IXmlNodeBuilder is able to build - an XML representation of itself and any children. - - - - - Returns a TNode representing the current object. - - If true, children are included where applicable - A TNode representing the result - - - - Returns a TNode representing the current object after - adding it as a child of the supplied parent node. - - The parent node. - If true, children are included, where applicable - - - - - Determine if a particular test passes the filter criteria. Pass - may examine the parents and/or descendants of a test, depending - on the semantics of the particular filter - - The test to which the filter is applied - True if the test passes the filter, otherwise false - - - - Determine if a test matches the filter expicitly. That is, it must - be a direct match of the test itself or one of it's children. - - The test to which the filter is applied - True if the test matches the filter explicityly, otherwise false - - - - Unique Empty filter. - - - - - Determine if a particular test passes the filter criteria. The default - implementation checks the test itself, its parents and any descendants. - - Derived classes may override this method or any of the Match methods - to change the behavior of the filter. - - The test to which the filter is applied - True if the test passes the filter, otherwise false - - - - Determine if a test matches the filter expicitly. That is, it must - be a direct match of the test itself or one of it's children. - - The test to which the filter is applied - True if the test matches the filter explicityly, otherwise false - - - - Determine whether the test itself matches the filter criteria, without - examining either parents or descendants. This is overridden by each - different type of filter to perform the necessary tests. - - The test to which the filter is applied - True if the filter matches the any parent of the test - - - - Determine whether any ancestor of the test matches the filter criteria - - The test to which the filter is applied - True if the filter matches the an ancestor of the test - - - - Determine whether any descendant of the test matches the filter criteria. - - The test to be matched - True if at least one descendant matches the filter criteria - - - - Create a TestFilter instance from an xml representation. - - - - - Create a TestFilter from it's TNode representation - - - - - Adds an XML node - - True if recursive - The added XML node - - - - Adds an XML node - - Parent node - True if recursive - The added XML node - - - - Indicates whether this is the EmptyFilter - - - - - Indicates whether this is a top-level filter, - not contained in any other filter. - - - - - Nested class provides an empty filter - one that always - returns true when called. It never matches explicitly. - - - - - Constructs an empty CompositeFilter - - - - - Constructs a CompositeFilter from an array of filters - - - - - - Adds a filter to the list of filters - - The filter to be added - - - - Checks whether the CompositeFilter is matched by a test. - - The test to be matched - - - - Checks whether the CompositeFilter is matched by a test. - - The test to be matched - - - - Checks whether the CompositeFilter is explicit matched by a test. - - The test to be matched - - - - Adds an XML node - - Parent node - True if recursive - The added XML node - - - - Return a list of the composing filters. - - - - - Gets the element name - - Element name - - - - Constructs an empty AndFilter - - - - - Constructs an AndFilter from an array of filters - - - - - - Checks whether the AndFilter is matched by a test - - The test to be matched - True if all the component filters pass, otherwise false - - - - Checks whether the AndFilter is matched by a test - - The test to be matched - True if all the component filters match, otherwise false - - - - Checks whether the AndFilter is explicit matched by a test. - - The test to be matched - True if all the component filters explicit match, otherwise false - - - - Gets the element name - - Element name - - - - SubstringConstraint can test whether a string contains - the expected substring. - - - - - StringConstraint is the abstract base for constraints - that operate on strings. It supports the IgnoreCase - modifier for string operations. - - - - - The Constraint class is the base of all built-in constraints - within NUnit. It provides the operator overloads used to combine - constraints. - - - - - Interface for all constraints - - - - - The IResolveConstraint interface is implemented by all - complete and resolvable constraints and expressions. - - - - - Return the top-level constraint for this expression - - - - - - Applies the constraint to an actual value, returning a ConstraintResult. - - The value to be tested - A ConstraintResult - - - - Applies the constraint to an ActualValueDelegate that returns - the value to be tested. The default implementation simply evaluates - the delegate but derived classes may override it to provide for - delayed processing. - - An ActualValueDelegate - A ConstraintResult - - - - Test whether the constraint is satisfied by a given reference. - The default implementation simply dereferences the value but - derived classes may override it to provide for delayed processing. - - A reference to the value to be tested - A ConstraintResult - - - - The display name of this Constraint for use by ToString(). - - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - Arguments provided to this Constraint, for use in - formatting the description. - - - - - The ConstraintBuilder holding this constraint - - - - - Construct a constraint with optional arguments - - Arguments to be saved - - - - Applies the constraint to an actual value, returning a ConstraintResult. - - The value to be tested - A ConstraintResult - - - - Applies the constraint to an ActualValueDelegate that returns - the value to be tested. The default implementation simply evaluates - the delegate but derived classes may override it to provide for - delayed processing. - - An ActualValueDelegate - A ConstraintResult - - - - Test whether the constraint is satisfied by a given reference. - The default implementation simply dereferences the value but - derived classes may override it to provide for delayed processing. - - A reference to the value to be tested - A ConstraintResult - - - - Retrieves the value to be tested from an ActualValueDelegate. - The default implementation simply evaluates the delegate but derived - classes may override it to provide for delayed processing. - - An ActualValueDelegate - Delegate evaluation result - - - - Default override of ToString returns the constraint DisplayName - followed by any arguments within angle brackets. - - - - - - Returns the string representation of this constraint - - - - - This operator creates a constraint that is satisfied only if both - argument constraints are satisfied. - - - - - This operator creates a constraint that is satisfied if either - of the argument constraints is satisfied. - - - - - This operator creates a constraint that is satisfied if the - argument constraint is not satisfied. - - - - - Returns a DelayedConstraint with the specified delay time. - - The delay in milliseconds. - - - - - Returns a DelayedConstraint with the specified delay time - and polling interval. - - The delay in milliseconds. - The interval at which to test the constraint. - - - - - Resolves any pending operators and returns the resolved constraint. - - - - - The display name of this Constraint for use by ToString(). - The default value is the name of the constraint with - trailing "Constraint" removed. Derived classes may set - this to another name in their constructors. - - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - Arguments provided to this Constraint, for use in - formatting the description. - - - - - The ConstraintBuilder holding this constraint - - - - - Returns a ConstraintExpression by appending And - to the current constraint. - - - - - Returns a ConstraintExpression by appending And - to the current constraint. - - - - - Returns a ConstraintExpression by appending Or - to the current constraint. - - - - - The expected value - - - - - Indicates whether tests should be case-insensitive - - - - - Description of this constraint - - - - - Constructs a StringConstraint without an expected value - - - - - Constructs a StringConstraint given an expected value - - The expected value - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Test whether the constraint is satisfied by a given string - - The string to be tested - True for success, false for failure - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - Modify the constraint to ignore case in matching. - - - - - Initializes a new instance of the class. - - The expected. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Abstract base class used for prefixes - - - - - Construct given a base constraint - - - - - - The base constraint - - - - - Prefix used in forming the constraint description - - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - AssignableToConstraint is used to test that an object - can be assigned to a given Type. - - - - - TypeConstraint is the abstract base for constraints - that take a Type as their expected value. - - - - - The expected Type used by the constraint - - - - - The type of the actual argument to which the constraint was applied - - - - - Construct a TypeConstraint for a given Type - - The expected type for the constraint - Prefix used in forming the constraint description - - - - Applies the constraint to an actual value, returning a ConstraintResult. - - The value to be tested - A ConstraintResult - - - - Apply the constraint to an actual value, returning true if it succeeds - - The actual argument - True if the constraint succeeds, otherwise false. - - - - Construct an AssignableToConstraint for the type provided - - - - - - Apply the constraint to an actual value, returning true if it succeeds - - The actual argument - True if the constraint succeeds, otherwise false. - - - - Summary description for MaxTimeAttribute. - - - - - PropertyAttribute is used to attach information to a test as a name/value pair.. - - - - - The abstract base class for all custom attributes defined by NUnit. - - - - - Default constructor - - - - - The IApplyToTest interface is implemented by self-applying - attributes that modify the state of a test in some way. - - - - - Modifies a test as defined for the specific attribute. - - The test to modify - - - - Construct a PropertyAttribute with a name and string value - - The name of the property - The property value - - - - Construct a PropertyAttribute with a name and int value - - The name of the property - The property value - - - - Construct a PropertyAttribute with a name and double value - - The name of the property - The property value - - - - Constructor for derived classes that set the - property dictionary directly. - - - - - Constructor for use by derived classes that use the - name of the type as the property name. Derived classes - must ensure that the Type of the property value is - a standard type supported by the BCL. Any custom - types will cause a serialization Exception when - in the client. - - - - - Modifies a test by adding properties to it. - - The test to modify - - - - Gets the property dictionary for this attribute - - - - - Objects implementing this interface are used to wrap - the entire test, including SetUp and TearDown. - - - - - ICommandWrapper is implemented by attributes and other - objects able to wrap a TestCommand with another command. - - - Attributes or other objects should implement one of the - derived interfaces, rather than this one, since they - indicate in which part of the command chain the wrapper - should be applied. - - - - - Wrap a command and return the result. - - The command to be wrapped - The wrapped command - - - - Construct a MaxTimeAttribute, given a time in milliseconds. - - The maximum elapsed time in milliseconds - - - - Randomizer returns a set of random _values in a repeatable - way, to allow re-running of tests if necessary. It extends - the .NET Random class, providing random values for a much - wider range of types. - - The class is used internally by the framework to generate - test case data and is also exposed for use by users through - the TestContext.Random property. - - - For consistency with the underlying Random Type, methods - returning a single value use the prefix "Next..." Those - without an argument return a non-negative value up to - the full positive range of the Type. Overloads are provided - for specifying a maximum or a range. Methods that return - arrays or strings use the prefix "Get..." to avoid - confusion with the single-value methods. - - - - - Default characters for random functions. - - Default characters are the English alphabet (uppercase & lowercase), arabic numerals, and underscore - - - - Get a Randomizer for a particular member, returning - one that has already been created if it exists. - This ensures that the same _values are generated - each time the tests are reloaded. - - - - - Get a randomizer for a particular parameter, returning - one that has already been created if it exists. - This ensures that the same values are generated - each time the tests are reloaded. - - - - - Create a new Randomizer using the next seed - available to ensure that each randomizer gives - a unique sequence of values. - - - - - - Default constructor - - - - - Construct based on seed value - - - - - - Returns a random unsigned int. - - - - - Returns a random unsigned int less than the specified maximum. - - - - - Returns a random unsigned int within a specified range. - - - - - Returns a non-negative random short. - - - - - Returns a non-negative random short less than the specified maximum. - - - - - Returns a non-negative random short within a specified range. - - - - - Returns a random unsigned short. - - - - - Returns a random unsigned short less than the specified maximum. - - - - - Returns a random unsigned short within a specified range. - - - - - Returns a random long. - - - - - Returns a random long less than the specified maximum. - - - - - Returns a non-negative random long within a specified range. - - - - - Returns a random ulong. - - - - - Returns a random ulong less than the specified maximum. - - - - - Returns a non-negative random long within a specified range. - - - - - Returns a random Byte - - - - - Returns a random Byte less than the specified maximum. - - - - - Returns a random Byte within a specified range - - - - - Returns a random SByte - - - - - Returns a random sbyte less than the specified maximum. - - - - - Returns a random sbyte within a specified range - - - - - Returns a random bool - - - - - Returns a random bool based on the probablility a true result - - - - - Returns a random double between 0.0 and the specified maximum. - - - - - Returns a random double within a specified range. - - - - - Returns a random float. - - - - - Returns a random float between 0.0 and the specified maximum. - - - - - Returns a random float within a specified range. - - - - - Returns a random enum value of the specified Type as an object. - - - - - Returns a random enum value of the specified Type. - - - - - Generate a random string based on the characters from the input string. - - desired length of output string. - string representing the set of characters from which to construct the resulting string - A random string of arbitrary length - - - - Generate a random string based on the characters from the input string. - - desired length of output string. - A random string of arbitrary length - Uses DefaultStringChars as the input character set - - - - Generate a random string based on the characters from the input string. - - A random string of the default length - Uses DefaultStringChars as the input character set - - - - Returns a random decimal. - - - - - Returns a random decimal between positive zero and the specified maximum. - - - - - Returns a random decimal within a specified range, which is not - permitted to exceed decimal.MaxVal in the current implementation. - - - A limitation of this implementation is that the range from min - to max must not exceed decimal.MaxVal. - - - - - Initial seed used to create randomizers for this run - - - - - The IFixtureBuilder interface is exposed by a class that knows how to - build a TestFixture from one or more Types. In general, it is exposed - by an attribute, but may be implemented in a helper class used by the - attribute in some cases. - - - - - Build one or more TestFixtures from type provided. At least one - non-null TestSuite must always be returned, since the method is - generally called because the user has marked the target class as - a fixture. If something prevents the fixture from being used, it - will be returned nonetheless, labelled as non-runnable. - - The type info of the fixture to be used. - A TestSuite object or one derived from TestSuite. - - - - The ITestBuilder interface is exposed by a class that knows how to - build one or more TestMethods from a MethodInfo. In general, it is exposed - by an attribute, which has additional information available to provide - the necessary test parameters to distinguish the test cases built. - - - - - Build one or more TestMethods from the provided MethodInfo. - - The method to be used as a test - The TestSuite to which the method will be added - A TestMethod object - - - - The IReflectionInfo interface is implemented by NUnit wrapper objects that perform reflection. - - - - - Returns an array of custom attributes of the specified type applied to this object - - - - - Returns a value indicating whether an attribute of the specified type is defined on this object. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Represents the result of running a test suite - - - - - The TestResult class represents the result of a test. - - - - - The ITestResult interface represents the result of a test. - - - - - Gets the ResultState of the test result, which - indicates the success or failure of the test. - - - - - Gets the name of the test result - - - - - Gets the full name of the test result - - - - - Gets the elapsed time for running the test in seconds - - - - - Gets or sets the time the test started running. - - - - - Gets or sets the time the test finished running. - - - - - Gets the message associated with a test - failure or with not running the test - - - - - Gets any stacktrace associated with an - error or failure. Not available in - the Compact Framework 1.0. - - - - - Gets the number of asserts executed - when running the test and all its children. - - - - - Gets the number of test cases that failed - when running the test and all its children. - - - - - Gets the number of test cases that passed - when running the test and all its children. - - - - - Gets the number of test cases that were skipped - when running the test and all its children. - - - - - Gets the number of test cases that were inconclusive - when running the test and all its children. - - - - - Indicates whether this result has any child results. - Accessing HasChildren should not force creation of the - Children collection in classes implementing this interface. - - - - - Gets the the collection of child results. - - - - - Gets the Test to which this result applies. - - - - - Gets any text output written to this result. - - - - - The minimum duration for tests - - - - - Error message for when child tests have errors - - - - - Error message for when child tests are ignored - - - - - Aggregate assertion count - - - - - Construct a test result given a Test - - The test to be used - - - - Returns the Xml representation of the result. - - If true, descendant results are included - An XmlNode representing the result - - - - Adds the XML representation of the result as a child of the - supplied parent node.. - - The parent node. - If true, descendant results are included - - - - - Set the result of the test - - The ResultState to use in the result - - - - Set the result of the test - - The ResultState to use in the result - A message associated with the result state - - - - Set the result of the test - - The ResultState to use in the result - A message associated with the result state - Stack trace giving the location of the command - - - - Set the test result based on the type of exception thrown - - The exception that was thrown - - - - Set the test result based on the type of exception thrown - - The exception that was thrown - THe FailureSite to use in the result - - - - RecordTearDownException appends the message and stacktrace - from an exception arising during teardown of the test - to any previously recorded information, so that any - earlier failure information is not lost. Note that - calling Assert.Ignore, Assert.Inconclusive, etc. during - teardown is treated as an error. If the current result - represents a suite, it may show a teardown error even - though all contained tests passed. - - The Exception to be recorded - - - - Adds a reason element to a node and returns it. - - The target node. - The new reason element. - - - - Adds a failure element to a node and returns it. - - The target node. - The new failure element. - - - - Gets the test with which this result is associated. - - - - - Gets the ResultState of the test result, which - indicates the success or failure of the test. - - - - - Gets the name of the test result - - - - - Gets the full name of the test result - - - - - Gets or sets the elapsed time for running the test in seconds - - - - - Gets or sets the time the test started running. - - - - - Gets or sets the time the test finished running. - - - - - Gets the message associated with a test - failure or with not running the test - - - - - Gets any stacktrace associated with an - error or failure. - - - - - Gets or sets the count of asserts executed - when running the test. - - - - - Gets the number of test cases that failed - when running the test and all its children. - - - - - Gets the number of test cases that passed - when running the test and all its children. - - - - - Gets the number of test cases that were skipped - when running the test and all its children. - - - - - Gets the number of test cases that were inconclusive - when running the test and all its children. - - - - - Indicates whether this result has any child results. - - - - - Gets the collection of child results. - - - - - Gets a TextWriter, which will write output to be included in the result. - - - - - Gets any text output written to this result. - - - - - Construct a TestSuiteResult base on a TestSuite - - The TestSuite to which the result applies - - - - Adds a child result to this result, setting this result's - ResultState to Failure if the child result failed. - - The result to be added - - - - Gets the number of test cases that failed - when running the test and all its children. - - - - - Gets the number of test cases that passed - when running the test and all its children. - - - - - Gets the number of test cases that were skipped - when running the test and all its children. - - - - - Gets the number of test cases that were inconclusive - when running the test and all its children. - - - - - Indicates whether this result has any child results. - - - - - Gets the collection of child results. - - - - - TestSuite represents a composite test, which contains other tests. - - - - - The Test abstract class represents a test within the framework. - - - - - Common interface supported by all representations - of a test. Only includes informational fields. - The Run method is specifically excluded to allow - for data-only representations of a test. - - - - - Gets the id of the test - - - - - Gets the name of the test - - - - - Gets the fully qualified name of the test - - - - - Gets the name of the class containing this test. Returns - null if the test is not associated with a class. - - - - - Gets the name of the method implementing this test. - Returns null if the test is not implemented as a method. - - - - - Gets the Type of the test fixture, if applicable, or - null if no fixture type is associated with this test. - - - - - Gets an IMethod for the method implementing this test. - Returns null if the test is not implemented as a method. - - - - - Gets the RunState of the test, indicating whether it can be run. - - - - - Count of the test cases ( 1 if this is a test case ) - - - - - Gets the properties of the test - - - - - Gets the parent test, if any. - - The parent test or null if none exists. - - - - Returns true if this is a test suite - - - - - Gets a bool indicating whether the current test - has any descendant tests. - - - - - Gets this test's child tests - - A list of child tests - - - - Gets a fixture object for running this test. - - - - - Static value to seed ids. It's started at 1000 so any - uninitialized ids will stand out. - - - - - The SetUp methods. - - - - - The teardown methods - - - - - Used to cache the declaring type for this MethodInfo - - - - - Method property backing field - - - - - Constructs a test given its name - - The name of the test - - - - Constructs a test given the path through the - test hierarchy to its parent and a name. - - The parent tests full name - The name of the test - - - - TODO: Documentation needed for constructor - - - - - - Construct a test from a MethodInfo - - - - - - Creates a TestResult for this test. - - A TestResult suitable for this type of test. - - - - Modify a newly constructed test by applying any of NUnit's common - attributes, based on a supplied ICustomAttributeProvider, which is - usually the reflection element from which the test was constructed, - but may not be in some instances. The attributes retrieved are - saved for use in subsequent operations. - - An object implementing ICustomAttributeProvider - - - - Add standard attributes and members to a test node. - - - - - - - Returns the Xml representation of the test - - If true, include child tests recursively - - - - - Returns an XmlNode representing the current result after - adding it as a child of the supplied parent node. - - The parent node. - If true, descendant results are included - - - - - Compares this test to another test for sorting purposes - - The other test - Value of -1, 0 or +1 depending on whether the current test is less than, equal to or greater than the other test - - - - Gets or sets the id of the test - - - - - - Gets or sets the name of the test - - - - - Gets or sets the fully qualified name of the test - - - - - - Gets the name of the class where this test was declared. - Returns null if the test is not associated with a class. - - - - - Gets the name of the method implementing this test. - Returns null if the test is not implemented as a method. - - - - - Gets the TypeInfo of the fixture used in running this test - or null if no fixture type is associated with it. - - - - - Gets a MethodInfo for the method implementing this test. - Returns null if the test is not implemented as a method. - - - - - Whether or not the test should be run - - - - - Gets the name used for the top-level element in the - XML representation of this test - - - - - Gets a string representing the type of test. Used as an attribute - value in the XML representation of a test and has no other - function in the framework. - - - - - Gets a count of test cases represented by - or contained under this test. - - - - - Gets the properties for this test - - - - - Returns true if this is a TestSuite - - - - - Gets a bool indicating whether the current test - has any descendant tests. - - - - - Gets the parent as a Test object. - Used by the core to set the parent. - - - - - Gets this test's child tests - - A list of child tests - - - - Gets or sets a fixture object for running this test. - - - - - Static prefix used for ids in this AppDomain. - Set by FrameworkController. - - - - - Gets or Sets the Int value representing the seed for the RandomGenerator - - - - - - Our collection of child tests - - - - - Initializes a new instance of the class. - - The name of the suite. - - - - Initializes a new instance of the class. - - Name of the parent suite. - The name of the suite. - - - - Initializes a new instance of the class. - - Type of the fixture. - - - - Initializes a new instance of the class. - - Type of the fixture. - - - - Sorts tests under this suite. - - - - - Adds a test to the suite. - - The test. - - - - Overridden to return a TestSuiteResult. - - A TestResult for this test. - - - - Returns an XmlNode representing the current result after - adding it as a child of the supplied parent node. - - The parent node. - If true, descendant results are included - - - - - Check that setup and teardown methods marked by certain attributes - meet NUnit's requirements and mark the tests not runnable otherwise. - - The attribute type to check for - - - - Gets this test's child tests - - The list of child tests - - - - Gets a count of test cases represented by - or contained under this test. - - - - - - The arguments to use in creating the fixture - - - - - Set to true to suppress sorting this suite's contents - - - - - Gets a bool indicating whether the current test - has any descendant tests. - - - - - Gets the name used for the top-level element in the - XML representation of this test - - - - - A PropertyBag represents a collection of name value pairs - that allows duplicate entries with the same key. Methods - are provided for adding a new pair as well as for setting - a key to a single value. All keys are strings but _values - may be of any type. Null _values are not permitted, since - a null entry represents the absence of the key. - - - - - A PropertyBag represents a collection of name/value pairs - that allows duplicate entries with the same key. Methods - are provided for adding a new pair as well as for setting - a key to a single value. All keys are strings but _values - may be of any type. Null _values are not permitted, since - a null entry represents the absence of the key. - - The entries in a PropertyBag are of two kinds: those that - take a single value and those that take multiple _values. - However, the PropertyBag has no knowledge of which entries - fall into each category and the distinction is entirely - up to the code using the PropertyBag. - - When working with multi-valued properties, client code - should use the Add method to add name/value pairs and - indexing to retrieve a list of all _values for a given - key. For example: - - bag.Add("Tag", "one"); - bag.Add("Tag", "two"); - Assert.That(bag["Tag"], - Is.EqualTo(new string[] { "one", "two" })); - - When working with single-valued propeties, client code - should use the Set method to set the value and Get to - retrieve the value. The GetSetting methods may also be - used to retrieve the value in a type-safe manner while - also providing default. For example: - - bag.Set("Priority", "low"); - bag.Set("Priority", "high"); // replaces value - Assert.That(bag.Get("Priority"), - Is.EqualTo("high")); - Assert.That(bag.GetSetting("Priority", "low"), - Is.EqualTo("high")); - - - - - Adds a key/value pair to the property bag - - The key - The value - - - - Sets the value for a key, removing any other - _values that are already in the property set. - - - - - - - Gets a single value for a key, using the first - one if multiple _values are present and returning - null if the value is not found. - - - - - Gets a flag indicating whether the specified key has - any entries in the property set. - - The key to be checked - True if their are _values present, otherwise false - - - - Gets or sets the list of _values for a particular key - - The key for which the _values are to be retrieved or set - - - - Gets a collection containing all the keys in the property set - - - - - Adds a key/value pair to the property set - - The key - The value - - - - Sets the value for a key, removing any other - _values that are already in the property set. - - - - - - - Gets a single value for a key, using the first - one if multiple _values are present and returning - null if the value is not found. - - - - - - - Gets a flag indicating whether the specified key has - any entries in the property set. - - The key to be checked - - True if their are _values present, otherwise false - - - - - Returns an XmlNode representating the current PropertyBag. - - Not used - An XmlNode representing the PropertyBag - - - - Returns an XmlNode representing the PropertyBag after - adding it as a child of the supplied parent node. - - The parent node. - Not used - - - - - Gets a collection containing all the keys in the property set - - - - - - Gets or sets the list of _values for a particular key - - - - - Thrown when an assertion failed. Here to preserve the inner - exception and hence its stack trace. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The error message that explains - the reason for the exception - - - - Initializes a new instance of the class. - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - - - Serialization Constructor - - - - - FullName filter selects tests based on their FullName - - - - - ValueMatchFilter selects tests based on some value, which - is expected to be contained in the test. - - - - - Construct a ValueMatchFilter for a single value. - - The value to be included. - - - - Match the input provided by the derived class - - The value to be matchedT - True for a match, false otherwise. - - - - Adds an XML node - - Parent node - True if recursive - The added XML node - - - - Returns the value matched by the filter - used for testing - - - - - Indicates whether the value is a regular expression - - - - - Gets the element name - - Element name - - - - Construct a FullNameFilter for a single name - - The name the filter will recognize. - - - - Match a test against a single value. - - - - - Gets the element name - - Element name - - - - NotFilter negates the operation of another filter - - - - - Construct a not filter on another filter - - The filter to be negated - - - - Determine if a particular test passes the filter criteria. The default - implementation checks the test itself, its parents and any descendants. - - Derived classes may override this method or any of the Match methods - to change the behavior of the filter. - - The test to which the filter is applied - True if the test passes the filter, otherwise false - - - - Check whether the filter matches a test - - The test to be matched - True if it matches, otherwise false - - - - Determine if a test matches the filter expicitly. That is, it must - be a direct match of the test itself or one of it's children. - - The test to which the filter is applied - True if the test matches the filter explicityly, otherwise false - - - - Adds an XML node - - Parent node - True if recursive - The added XML node - - - - Gets the base filter - - - - - SequentialStrategy creates test cases by using all of the - parameter data sources in parallel, substituting null - when any of them run out of data. - - - - - CombiningStrategy is the abstract base for classes that - know how to combine values provided for individual test - parameters to create a set of test cases. - - - - - Gets the test cases generated by the CombiningStrategy. - - The test cases. - - - - Gets the test cases generated by the CombiningStrategy. - - The test cases. - - - - NUnitTestFixtureBuilder is able to build a fixture given - a class marked with a TestFixtureAttribute or an unmarked - class containing test methods. In the first case, it is - called by the attribute and in the second directly by - NUnitSuiteBuilder. - - - - - Build a TestFixture from type provided. A non-null TestSuite - must always be returned, since the method is generally called - because the user has marked the target class as a fixture. - If something prevents the fixture from being used, it should - be returned nonetheless, labelled as non-runnable. - - An ITypeInfo for the fixture to be used. - A TestSuite object or one derived from TestSuite. - - - - Overload of BuildFrom called by tests that have arguments. - Builds a fixture using the provided type and information - in the ITestFixtureData object. - - The TypeInfo for which to construct a fixture. - An object implementing ITestFixtureData or null. - - - - - Method to add test cases to the newly constructed fixture. - - The fixture to which cases should be added - - - - Method to create a test case from a MethodInfo and add - it to the fixture being built. It first checks to see if - any global TestCaseBuilder addin wants to build the - test case. If not, it uses the internal builder - collection maintained by this fixture builder. - - The default implementation has no test case builders. - Derived classes should add builders to the collection - in their constructor. - - The method for which a test is to be created - The test suite being built. - A newly constructed Test - - - - UniqueItemsConstraint tests whether all the items in a - collection are unique. - - - - - CollectionItemsEqualConstraint is the abstract base class for all - collection constraints that apply some notion of item equality - as a part of their operation. - - - - - CollectionConstraint is the abstract base class for - constraints that operate on collections. - - - - - Construct an empty CollectionConstraint - - - - - Construct a CollectionConstraint - - - - - - Determines whether the specified enumerable is empty. - - The enumerable. - - true if the specified enumerable is empty; otherwise, false. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Protected method to be implemented by derived classes - - - - - - - Construct an empty CollectionConstraint - - - - - Construct a CollectionConstraint - - - - - - Flag the constraint to use the supplied IComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied Comparison object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IEqualityComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IEqualityComparer object. - - The IComparer object to use. - Self. - - - - Compares two collection members for equality - - - - - Return a new CollectionTally for use in making tests - - The collection to be included in the tally - - - - Flag the constraint to ignore case and return self. - - - - - Check that all items are unique. - - - - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - SamePathOrUnderConstraint tests that one path is under another - - - - - PathConstraint serves as the abstract base of constraints - that operate on paths and provides several helper methods. - - - - - Construct a PathConstraint for a give expected path - - The expected path - - - - Returns the string representation of this constraint - - - - - Canonicalize the provided path - - - The path in standardized form - - - - Test whether one path in canonical form is a subpath of another path - - The first path - supposed to be the parent path - The second path - supposed to be the child path - - - - - Modifies the current instance to be case-sensitive - and returns it. - - - - - Initializes a new instance of the class. - - The expected path - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - NoItemConstraint applies another constraint to each - item in a collection, failing if any of them succeeds. - - - - - Construct a SomeItemsConstraint on top of an existing constraint - - - - - - Apply the item constraint to each item in the collection, - failing if any item fails. - - - - - - - The display name of this Constraint for use by ToString(). - The default value is the name of the constraint with - trailing "Constraint" removed. Derived classes may set - this to another name in their constructors. - - - - - EndsWithConstraint can test whether a string ends - with an expected substring. - - - - - Initializes a new instance of the class. - - The expected string - - - - Test whether the constraint is matched by the actual value. - This is a template method, which calls the IsMatch method - of the derived class. - - - - - - - ValuesAttribute is used to provide literal arguments for - an individual parameter of a test. - - - - - The abstract base class for all data-providing attributes - defined by NUnit. Used to select all data sources for a - method, class or parameter. - - - - - Default constructor - - - - - The IParameterDataSource interface is implemented by types - that can provide data for a test method parameter. - - - - - Gets an enumeration of data items for use as arguments - for a test method parameter. - - The parameter for which data is needed - An enumeration containing individual data items - - - - The collection of data to be returned. Must - be set by any derived attribute classes. - We use an object[] so that the individual - elements may have their type changed in GetData - if necessary - - - - - Constructs for use with an Enum parameter. Will pass every enum - value in to the test. - - - - - Construct with one argument - - - - - - Construct with two arguments - - - - - - - Construct with three arguments - - - - - - - - Construct with an array of arguments - - - - - - Get the collection of _values to be used as arguments - - - - - Marks a test to use a pairwise join of any argument - data provided. Arguments will be combined in such a - way that all possible pairs of arguments are used. - - - - - Marks a test to use a particular CombiningStrategy to join - any parameter data provided. Since this is the default, the - attribute is optional. - - - - - Construct a CombiningStrategyAttribute incorporating an - ICombiningStrategy and an IParamterDataProvider. - - Combining strategy to be used in combining data - An IParameterDataProvider to supply data - - - - Construct a CombiningStrategyAttribute incorporating an object - that implements ICombiningStrategy and an IParameterDataProvider. - This constructor is provided for CLS compliance. - - Combining strategy to be used in combining data - An IParameterDataProvider to supply data - - - - Construct one or more TestMethods from a given MethodInfo, - using available parameter data. - - The MethodInfo for which tests are to be constructed. - The suite to which the tests will be added. - One or more TestMethods - - - - Modify the test by adding the name of the combining strategy - to the properties. - - The test to modify - - - - Default constructor - - - - - CultureAttribute is used to mark a test fixture or an - individual method as applying to a particular Culture only. - - - - - Abstract base for Attributes that are used to include tests - in the test run based on environmental settings. - - - - - Constructor with no included items specified, for use - with named property syntax. - - - - - Constructor taking one or more included items - - Comma-delimited list of included items - - - - Name of the item that is needed in order for - a test to run. Multiple items may be given, - separated by a comma. - - - - - Name of the item to be excluded. Multiple items - may be given, separated by a comma. - - - - - The reason for including or excluding the test - - - - - Constructor with no cultures specified, for use - with named property syntax. - - - - - Constructor taking one or more cultures - - Comma-deliminted list of cultures - - - - Causes a test to be skipped if this CultureAttribute is not satisfied. - - The test to modify - - - - Tests to determine if the current culture is supported - based on the properties of this attribute. - - True, if the current culture is supported - - - - Test to determine if the a particular culture or comma- - delimited set of cultures is in use. - - Name of the culture or comma-separated list of culture ids - True if the culture is in use on the system - - - - Test to determine if one of a collection of cultures - is being used currently. - - - - - - - The current state of a work item - - - - - Ready to run or continue - - - - - Work Item is executing - - - - - Complete - - - - - A WorkItem may be an individual test case, a fixture or - a higher level grouping of tests. All WorkItems inherit - from the abstract WorkItem class, which uses the template - pattern to allow derived classes to perform work in - whatever way is needed. - - A WorkItem is created with a particular TestExecutionContext - and is responsible for re-establishing that context in the - current thread before it begins or resumes execution. - - - - - Creates a work item. - - The test for which this WorkItem is being created. - The filter to be used in selecting any child Tests. - - - - - Construct a WorkItem for a particular test. - - The test that the WorkItem will run - - - - Initialize the TestExecutionContext. This must be done - before executing the WorkItem. - - - Originally, the context was provided in the constructor - but delaying initialization of the context until the item - is about to be dispatched allows changes in the parent - context during OneTimeSetUp to be reflected in the child. - - The TestExecutionContext to use - - - - Execute the current work item, including any - child work items. - - - - - Cancel (abort or stop) a WorkItem - - true if the WorkItem should be aborted, false if it should run to completion - - - - Method that performs actually performs the work. It should - set the State to WorkItemState.Complete when done. - - - - - Method called by the derived class when all work is complete - - - - - Event triggered when the item is complete - - - - - Gets the current state of the WorkItem - - - - - The test being executed by the work item - - - - - The execution context - - - - - The unique id of the worker executing this item. - - - - - The test actions to be performed before and after this test - - - - - The test result - - - - - TODO: Documentation needed for class - - - - - TODO: Documentation needed for class - - - - - TestCommand is the abstract base class for all test commands - in the framework. A TestCommand represents a single stage in - the execution of a test, e.g.: SetUp/TearDown, checking for - Timeout, verifying the returned result from a method, etc. - - TestCommands may decorate other test commands so that the - execution of a lower-level command is nested within that - of a higher level command. All nested commands are executed - synchronously, as a single unit. Scheduling test execution - on separate threads is handled at a higher level, using the - task dispatcher. - - - - - Construct a TestCommand for a test. - - The test to be executed - - - - Runs the test in a specified context, returning a TestResult. - - The TestExecutionContext to be used for running the test. - A TestResult - - - - Gets the test associated with this command. - - - - TODO: Documentation needed for field - - - TODO: Documentation needed for method - - - - TODO: Documentation needed for constructor - - - - - - Initializes a new instance of the class. - - The inner command. - The max time allowed in milliseconds - - - - Runs the test, saving a TestResult in the supplied TestExecutionContext - - The context in which the test should run. - A TestResult - - - - The ITestListener interface is used internally to receive - notifications of significant events while a test is being - run. The events are propagated to clients by means of an - AsyncCallback. NUnit extensions may also monitor these events. - - - - - Called when a test has just started - - The test that is starting - - - - Called when a test has finished - - The result of the test - - - - Called when a test produces output for immediate display - - A TestOutput object containing the text to display - - - - The ITestAssemblyBuilder interface is implemented by a class - that is able to build a suite of tests given an assembly or - an assembly filename. - - - - - Build a suite of tests from a provided assembly - - The assembly from which tests are to be built - A dictionary of options to use in building the suite - A TestSuite containing the tests found in the assembly - - - - Build a suite of tests given the filename of an assembly - - The filename of the assembly from which tests are to be built - A dictionary of options to use in building the suite - A TestSuite containing the tests found in the assembly - - - - InternalTrace provides facilities for tracing the execution - of the NUnit framework. Tests and classes under test may make use - of Console writes, System.Diagnostics.Trace or various loggers and - NUnit itself traps and processes each of them. For that reason, a - separate internal trace is needed. - - Note: - InternalTrace uses a global lock to allow multiple threads to write - trace messages. This can easily make it a bottleneck so it must be - used sparingly. Keep the trace Level as low as possible and only - insert InternalTrace writes where they are needed. - TODO: add some buffering and a separate writer thread as an option. - TODO: figure out a way to turn on trace in specific classes only. - - - - - Initialize the internal trace facility using the name of the log - to be written to and the trace level. - - The log name - The trace level - - - - Initialize the internal trace using a provided TextWriter and level - - A TextWriter - The InternalTraceLevel - - - - Get a named Logger - - - - - - Get a logger named for a particular Type. - - - - - Gets a flag indicating whether the InternalTrace is initialized - - - - - The ITypeInfo interface is an abstraction of a .NET Type - - - - - Returns true if the Type wrapped is equal to the argument - - - - - Get the display name for this typeInfo. - - - - - Get the display name for an oject of this type, constructed with specific arguments - - - - - Returns a Type representing a generic type definition from which this Type can be constructed. - - - - - Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments - - - - - Returns a value indicating whether this type has a method with a specified public attribute - - - - - Returns an array of IMethodInfos for methods of this Type - that match the specified flags. - - - - - Gets the public constructor taking the specified argument Types - - - - - Returns a value indicating whether this Type has a public constructor taking the specified argument Types. - - - - - Construct an object of this Type, using the specified arguments. - - - - - Gets the underlying Type on which this ITypeInfo is based - - - - - Gets the base type of this type as an ITypeInfo - - - - - Gets the Name of the Type - - - - - Gets the FullName of the Type - - - - - Gets the assembly in which the type is declared - - - - - Gets the Namespace of the Type - - - - - Gets a value indicating whether the type is abstract. - - - - - Gets a value indicating whether the Type is a generic Type - - - - - Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. - - - - - Gets a value indicating whether the Type is a generic Type definition - - - - - Gets a value indicating whether the type is sealed. - - - - - Gets a value indicating whether this type is a static class. - - - - - Applies the constraint to an actual value, returning a ConstraintResult. - - The value to be tested - A ConstraintResult - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - Defines methods to manipulate thread-safe collections intended for producer/consumer usage. - - Specifies the type of elements in the collection. - - All implementations of this interface must enable all members of this interface - to be used concurrently from multiple threads. - - - - - Attempts to add an object to the . - - The object to add to the . - true if the object was added successfully; otherwise, false. - The was invalid for this collection. - - - - Attempts to remove and return an object from the . - - - When this method returns, if the object was removed and returned successfully, contains the removed object. If no object was available to be removed, the value is - unspecified. - - true if an object was removed and returned successfully; otherwise, false. - - - - Copies the elements contained in the to a new array. - - A new array containing the elements copied from the . - - - - Copies the elements of the to - an - , starting at a specified index. - - The one-dimensional that is the destination of - the elements copied from the . - The array must have zero-based indexing. - The zero-based index in at which copying - begins. - is a null reference (Nothing in - Visual Basic). - is less than - zero. - is equal to or greater than the - length of the - -or- The number of elements in the source is greater than the - available space from to the end of the destination . - - - - - Provide the context information of the current test. - This is an adapter for the internal ExecutionContext - class, hiding the internals from the user test. - - - - - - - - - - Construct a TestContext for an ExecutionContext - - The ExecutionContext to adapt - - - - Gets a TextWriter that will send output directly to Console.Error - - - - - Gets a TextWriter for use in displaying immediate progress messages - - - - - TestParameters object holds parameters for the test run, if any are specified - - - - Write the string representation of a boolean value to the current result - - - Write a char to the current result - - - Write a char array to the current result - - - Write the string representation of a double to the current result - - - Write the string representation of an Int32 value to the current result - - - Write the string representation of an Int64 value to the current result - - - Write the string representation of a decimal value to the current result - - - Write the string representation of an object to the current result - - - Write the string representation of a Single value to the current result - - - Write a string to the current result - - - Write the string representation of a UInt32 value to the current result - - - Write the string representation of a UInt64 value to the current result - - - Write a formatted string to the current result - - - Write a formatted string to the current result - - - Write a formatted string to the current result - - - Write a formatted string to the current result - - - Write a line terminator to the current result - - - Write the string representation of a boolean value to the current result followed by a line terminator - - - Write a char to the current result followed by a line terminator - - - Write a char array to the current result followed by a line terminator - - - Write the string representation of a double to the current result followed by a line terminator - - - Write the string representation of an Int32 value to the current result followed by a line terminator - - - Write the string representation of an Int64 value to the current result followed by a line terminator - - - Write the string representation of a decimal value to the current result followed by a line terminator - - - Write the string representation of an object to the current result followed by a line terminator - - - Write the string representation of a Single value to the current result followed by a line terminator - - - Write a string to the current result followed by a line terminator - - - Write the string representation of a UInt32 value to the current result followed by a line terminator - - - Write the string representation of a UInt64 value to the current result followed by a line terminator - - - Write a formatted string to the current result followed by a line terminator - - - Write a formatted string to the current result followed by a line terminator - - - Write a formatted string to the current result followed by a line terminator - - - Write a formatted string to the current result followed by a line terminator - - - - This method adds the a new ValueFormatterFactory to the - chain of responsibility used for fomatting values in messages. - The scope of the change is the current TestContext. - - The factory delegate - - - - This method provides a simplified way to add a ValueFormatter - delegate to the chain of responsibility, creating the factory - delegate internally. It is useful when the Type of the object - is the only criterion for selection of the formatter, since - it can be used without getting involved with a compould function. - - The type supported by this formatter - The ValueFormatter delegate - - - - Get the current test context. This is created - as needed. The user may save the context for - use within a test, but it should not be used - outside the test for which it is created. - - - - - Gets a TextWriter that will send output to the current test result. - - - - - Get a representation of the current test. - - - - - Gets a Representation of the TestResult for the current test. - - - - - Gets the unique name of the Worker that is executing this test. - - - - - Gets the directory containing the current test assembly. - - - - - Gets the directory to be used for outputting files created - by this test run. - - - - - Gets the random generator. - - - The random generator. - - - - - TestAdapter adapts a Test for consumption by - the user test code. - - - - - Construct a TestAdapter for a Test - - The Test to be adapted - - - - Gets the unique Id of a test - - - - - The name of the test, which may or may not be - the same as the method name. - - - - - The name of the method representing the test. - - - - - The FullName of the test - - - - - The ClassName of the test - - - - - The properties of the test. - - - - - ResultAdapter adapts a TestResult for consumption by - the user test code. - - - - - Construct a ResultAdapter for a TestResult - - The TestResult to be adapted - - - - Gets a ResultState representing the outcome of the test. - - - - - Gets the message associated with a test - failure or with not running the test - - - - - Gets any stacktrace associated with an - error or failure. - - - - - Gets the number of test cases that failed - when running the test and all its children. - - - - - Gets the number of test cases that passed - when running the test and all its children. - - - - - Gets the number of test cases that were skipped - when running the test and all its children. - - - - - Gets the number of test cases that were inconclusive - when running the test and all its children. - - - - - ExceptionHelper provides static methods for working with exceptions - - - - - Rethrows an exception, preserving its stack trace - - The exception to rethrow - - - - Builds up a message, using the Message field of the specified exception - as well as any InnerExceptions. - - The exception. - A combined message string. - - - - Builds up a message, using the Message field of the specified exception - as well as any InnerExceptions. - - The exception. - A combined stack trace. - - - - Gets the stack trace of the exception. - - The exception. - A string representation of the stack trace. - - - - CultureDetector is a helper class used by NUnit to determine - whether a test should be run based on the current culture. - - - - - Default constructor uses the current culture. - - - - - Construct a CultureDetector for a particular culture for testing. - - The culture to be used - - - - Test to determine if one of a collection of cultures - is being used currently. - - - - - - - Tests to determine if the current culture is supported - based on a culture attribute. - - The attribute to examine - - - - - Test to determine if the a particular culture or comma- - delimited set of cultures is in use. - - Name of the culture or comma-separated list of culture ids - True if the culture is in use on the system - - - - Return the last failure reason. Results are not - defined if called before IsSupported( Attribute ) - is called. - - - - - PairwiseStrategy creates test cases by combining the parameter - data so that all possible pairs of data items are used. - - - - The number of test cases that cover all possible pairs of test function - parameters values is significantly less than the number of test cases - that cover all possible combination of test function parameters values. - And because different studies show that most of software failures are - caused by combination of no more than two parameters, pairwise testing - can be an effective ways to test the system when it's impossible to test - all combinations of parameters. - - - The PairwiseStrategy code is based on "jenny" tool by Bob Jenkins: - http://burtleburtle.net/bob/math/jenny.html - - - - - - Gets the test cases generated by this strategy instance. - - A set of test cases. - - - - FleaRand is a pseudo-random number generator developed by Bob Jenkins: - http://burtleburtle.net/bob/rand/talksmall.html#flea - - - - - Initializes a new instance of the FleaRand class. - - The seed. - - - - FeatureInfo represents coverage of a single value of test function - parameter, represented as a pair of indices, Dimension and Feature. In - terms of unit testing, Dimension is the index of the test parameter and - Feature is the index of the supplied value in that parameter's list of - sources. - - - - - Initializes a new instance of FeatureInfo class. - - Index of a dimension. - Index of a feature. - - - - A FeatureTuple represents a combination of features, one per test - parameter, which should be covered by a test case. In the - PairwiseStrategy, we are only trying to cover pairs of features, so the - tuples actually may contain only single feature or pair of features, but - the algorithm itself works with triplets, quadruples and so on. - - - - - Initializes a new instance of FeatureTuple class for a single feature. - - Single feature. - - - - Initializes a new instance of FeatureTuple class for a pair of features. - - First feature. - Second feature. - - - - TestCase represents a single test case covering a list of features. - - - - - Initializes a new instance of TestCaseInfo class. - - A number of features in the test case. - - - - PairwiseTestCaseGenerator class implements an algorithm which generates - a set of test cases which covers all pairs of possible values of test - function. - - - - The algorithm starts with creating a set of all feature tuples which we - will try to cover (see method). This set - includes every single feature and all possible pairs of features. We - store feature tuples in the 3-D collection (where axes are "dimension", - "feature", and "all combinations which includes this feature"), and for - every two feature (e.g. "A" and "B") we generate both ("A", "B") and - ("B", "A") pairs. This data structure extremely reduces the amount of - time needed to calculate coverage for a single test case (this - calculation is the most time-consuming part of the algorithm). - - - Then the algorithm picks one tuple from the uncovered tuple, creates a - test case that covers this tuple, and then removes this tuple and all - other tuples covered by this test case from the collection of uncovered - tuples. - - - Picking a tuple to cover - - - There are no any special rules defined for picking tuples to cover. We - just pick them one by one, in the order they were generated. - - - Test generation - - - Test generation starts from creating a completely random test case which - covers, nevertheless, previously selected tuple. Then the algorithm - tries to maximize number of tuples which this test covers. - - - Test generation and maximization process repeats seven times for every - selected tuple and then the algorithm picks the best test case ("seven" - is a magic number which provides good results in acceptable time). - - Maximizing test coverage - - To maximize tests coverage, the algorithm walks thru the list of mutable - dimensions (mutable dimension is a dimension that are not included in - the previously selected tuple). Then for every dimension, the algorithm - walks thru the list of features and checks if this feature provides - better coverage than randomly selected feature, and if yes keeps this - feature. - - - This process repeats while it shows progress. If the last iteration - doesn't improve coverage, the process ends. - - - In addition, for better results, before start every iteration, the - algorithm "scrambles" dimensions - so for every iteration dimension - probes in a different order. - - - - - - Creates a set of test cases for specified dimensions. - - - An array which contains information about dimensions. Each element of - this array represents a number of features in the specific dimension. - - - A set of test cases. - - - - - Provides data from fields marked with the DatapointAttribute or the - DatapointsAttribute. - - - - - The IDataPointProvider interface is used by extensions - that provide data for a single test parameter. - - - - - Determine whether any data is available for a parameter. - - An IParameterInfo representing one - argument to a parameterized test - True if any data is available, otherwise false. - - - - Return an IEnumerable providing data for use with the - supplied parameter. - - An IParameterInfo representing one - argument to a parameterized test - An IEnumerable providing the required data - - - - Determine whether any data is available for a parameter. - - A ParameterInfo representing one - argument to a parameterized test - - True if any data is available, otherwise false. - - - - - Return an IEnumerable providing data for use with the - supplied parameter. - - A ParameterInfo representing one - argument to a parameterized test - - An IEnumerable providing the required data - - - - - CombinatorialStrategy creates test cases by using all possible - combinations of the parameter data. - - - - - Gets the test cases generated by the CombiningStrategy. - - The test cases. - - - - ThrowsNothingConstraint tests that a delegate does not - throw an exception. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True if no exception is thrown, otherwise false - - - - Applies the constraint to an ActualValueDelegate that returns - the value to be tested. The default implementation simply evaluates - the delegate but derived classes may override it to provide for - delayed processing. - - An ActualValueDelegate - A ConstraintResult - - - - Gets text describing a constraint - - - - - Operator that requires at least one of it's arguments to succeed - - - - - Abstract base class for all binary operators - - - - - The ConstraintOperator class is used internally by a - ConstraintBuilder to represent an operator that - modifies or combines constraints. - - Constraint operators use left and right precedence - _values to determine whether the top operator on the - stack should be reduced before pushing a new operator. - - - - - The precedence value used when the operator - is about to be pushed to the stack. - - - - - The precedence value used when the operator - is on the top of the stack. - - - - - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. - - - - - - The syntax element preceding this operator - - - - - The syntax element following this operator - - - - - The precedence value used when the operator - is about to be pushed to the stack. - - - - - The precedence value used when the operator - is on the top of the stack. - - - - - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. - - - - - - Abstract method that produces a constraint by applying - the operator to its left and right constraint arguments. - - - - - Gets the left precedence of the operator - - - - - Gets the right precedence of the operator - - - - - Construct an OrOperator - - - - - Apply the operator to produce an OrConstraint - - - - - The Numerics class contains common operations on numeric _values. - - - - - Checks the type of the object, returning true if - the object is a numeric type. - - The object to check - true if the object is a numeric type - - - - Checks the type of the object, returning true if - the object is a floating point numeric type. - - The object to check - true if the object is a floating point numeric type - - - - Checks the type of the object, returning true if - the object is a fixed point numeric type. - - The object to check - true if the object is a fixed point numeric type - - - - Test two numeric _values for equality, performing the usual numeric - conversions and using a provided or default tolerance. If the tolerance - provided is Empty, this method may set it to a default tolerance. - - The expected value - The actual value - A reference to the tolerance in effect - True if the _values are equal - - - - Compare two numeric _values, performing the usual numeric conversions. - - The expected value - The actual value - The relationship of the _values to each other - - - - FalseConstraint tests that the actual value is false - - - - - Initializes a new instance of the class. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - TestFixtureAttribute is used to mark a class that represents a TestFixture. - - - - - The ITestCaseData interface is implemented by a class - that is able to return the data required to create an - instance of a parameterized test fixture. - - - - - The ITestData interface is implemented by a class that - represents a single instance of a parameterized test. - - - - - Gets the name to be used for the test - - - - - Gets the RunState for this test case. - - - - - Gets the argument list to be provided to the test - - - - - Gets the property dictionary for the test case - - - - - Get the TypeArgs if separately set - - - - - Default constructor - - - - - Construct with a object[] representing a set of arguments. - In .NET 2.0, the arguments may later be separated into - type arguments and constructor arguments. - - - - - - Build a fixture from type provided. Normally called for a Type - on which the attribute has been placed. - - The type info of the fixture to be used. - A an IEnumerable holding one TestFixture object. - - - - Gets or sets the name of the test. - - The name of the test. - - - - Gets or sets the RunState of this test fixture. - - - - - The arguments originally provided to the attribute - - - - - Properties pertaining to this fixture - - - - - Get or set the type arguments. If not set - explicitly, any leading arguments that are - Types are taken as type arguments. - - - - - Descriptive text for this fixture - - - - - The author of this fixture - - - - - The type that this fixture is testing - - - - - Gets or sets the ignore reason. May set RunState as a side effect. - - The ignore reason. - - - - Gets or sets the reason for not running the fixture. - - The reason. - - - - Gets or sets the ignore reason. When set to a non-null - non-empty value, the test is marked as ignored. - - The ignore reason. - - - - Gets or sets a value indicating whether this is explicit. - - - true if explicit; otherwise, false. - - - - - Gets and sets the category for this fixture. - May be a comma-separated list of categories. - - - - - TestCaseAttribute is used to mark parameterized test cases - and provide them with their arguments. - - - - - The ITestCaseData interface is implemented by a class - that is able to return complete testcases for use by - a parameterized test method. - - - - - Gets the expected result of the test case - - - - - Returns true if an expected result has been set - - - - - IImplyFixture is an empty marker interface used by attributes like - TestAttribute that cause the class where they are used to be treated - as a TestFixture even without a TestFixtureAttribute. - - Marker interfaces are not usually considered a good practice, but - we use it here to avoid cluttering the attribute hierarchy with - classes that don't contain any extra implementation. - - - - - Construct a TestCaseAttribute with a list of arguments. - This constructor is not CLS-Compliant - - - - - - Construct a TestCaseAttribute with a single argument - - - - - - Construct a TestCaseAttribute with a two arguments - - - - - - - Construct a TestCaseAttribute with a three arguments - - - - - - - - Performs several special conversions allowed by NUnit in order to - permit arguments with types that cannot be used in the constructor - of an Attribute such as TestCaseAttribute or to simplify their use. - - The arguments to be converted - The ParameterInfo array for the method - - - - Construct one or more TestMethods from a given MethodInfo, - using available parameter data. - - The MethodInfo for which tests are to be constructed. - The suite to which the tests will be added. - One or more TestMethods - - - - Gets or sets the name of the test. - - The name of the test. - - - - Gets or sets the RunState of this test case. - - - - - Gets the list of arguments to a test case - - - - - Gets the properties of the test case - - - - - Gets or sets the expected result. - - The result. - - - - Returns true if the expected result has been set - - - - - Gets or sets the description. - - The description. - - - - The author of this test - - - - - The type that this test is testing - - - - - Gets or sets the reason for ignoring the test - - - - - Gets or sets a value indicating whether this is explicit. - - - true if explicit; otherwise, false. - - - - - Gets or sets the reason for not running the test. - - The reason. - - - - Gets or sets the ignore reason. When set to a non-null - non-empty value, the test is marked as ignored. - - The ignore reason. - - - - Comma-delimited list of platforms to run the test for - - - - - Comma-delimited list of platforms to not run the test for - - - - - Gets and sets the category for this test case. - May be a comma-separated list of categories. - - - - - GenericMethodHelper is able to deduce the Type arguments for - a generic method from the actual arguments provided. - - - - - Construct a GenericMethodHelper for a method - - MethodInfo for the method to examine - - - - Return the type argments for the method, deducing them - from the arguments actually provided. - - The arguments to the method - An array of type arguments. - - - - TestActionCommand runs the BeforeTest actions for a test, - then runs the test and finally runs the AfterTestActions. - - - - - Initializes a new instance of the class. - - The inner command. - - - - Runs the test, saving a TestResult in the supplied TestExecutionContext. - - The context in which the test should run. - A TestResult - - - - Provides internal logging to the NUnit framework - - - - - Interface for logging within the engine - - - - - Logs the specified message at the error level. - - The message. - - - - Logs the specified message at the error level. - - The message. - The arguments. - - - - Logs the specified message at the warning level. - - The message. - - - - Logs the specified message at the warning level. - - The message. - The arguments. - - - - Logs the specified message at the info level. - - The message. - - - - Logs the specified message at the info level. - - The message. - The arguments. - - - - Logs the specified message at the debug level. - - The message. - - - - Logs the specified message at the debug level. - - The message. - The arguments. - - - - Initializes a new instance of the class. - - The name. - The log level. - The writer where logs are sent. - - - - Logs the message at error level. - - The message. - - - - Logs the message at error level. - - The message. - The message arguments. - - - - Logs the message at warm level. - - The message. - - - - Logs the message at warning level. - - The message. - The message arguments. - - - - Logs the message at info level. - - The message. - - - - Logs the message at info level. - - The message. - The message arguments. - - - - Logs the message at debug level. - - The message. - - - - Logs the message at debug level. - - The message. - The message arguments. - - - - ClassName filter selects tests based on the class FullName - - - - - Construct a FullNameFilter for a single name - - The name the filter will recognize. - - - - Match a test against a single value. - - - - - Gets the element name - - Element name - - - - PropertyFilter is able to select or exclude tests - based on their properties. - - - - - - Construct a PropertyFilter using a property name and expected value - - A property name - The expected value of the property - - - - Check whether the filter matches a test - - The test to be matched - - - - - Adds an XML node - - Parent node - True if recursive - The added XML node - - - - Gets the element name - - Element name - - - - Env is a static class that provides some of the features of - System.Environment that are not available under all runtimes - - - - - The newline sequence in the current environment. - - - - - Path to the 'My Documents' folder - - - - - Directory used for file output if not specified on commandline. - - - - - The Assert class contains a collection of static methods that - implement the most common assertions used in NUnit. - - - The Assert class contains a collection of static methods that - implement the most common assertions used in NUnit. - - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - - - - Asserts that a condition is false. If the condition is true the method throws - an . - - The evaluated condition - - - - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. - - The object that is to be tested - - - - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the object that is passed in is not equal to null - If the object is null then an - is thrown. - - The object that is to be tested - - - - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. - - The object that is to be tested - - - - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. - - The object that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the object that is passed in is equal to null - If the object is not null then an - is thrown. - - The object that is to be tested - - - - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. - - The value that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. - - The value that is to be tested - - - - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. - - The value that is to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the double that is passed in is an NaN value. - If the object is not NaN then an - is thrown. - - The value that is to be tested - - - - Assert that a string is empty - that is equal to string.Empty - - The string to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Assert that a string is empty - that is equal to string.Empty - - The string to be tested - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing ICollection - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing ICollection - - - - Assert that a string is not empty - that is not equal to string.Empty - - The string to be tested - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Assert that a string is not empty - that is not equal to string.Empty - - The string to be tested - - - - Assert that an array, list or other collection is not empty - - An array, list or other collection implementing ICollection - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Assert that an array, list or other collection is not empty - - An array, list or other collection implementing ICollection - - - - Asserts that an int is zero. - - The number to be examined - - - - Asserts that an int is zero. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an unsigned int is zero. - - The number to be examined - - - - Asserts that an unsigned int is zero. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a Long is zero. - - The number to be examined - - - - Asserts that a Long is zero. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an unsigned Long is zero. - - The number to be examined - - - - Asserts that an unsigned Long is zero. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a decimal is zero. - - The number to be examined - - - - Asserts that a decimal is zero. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a double is zero. - - The number to be examined - - - - Asserts that a double is zero. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a float is zero. - - The number to be examined - - - - Asserts that a float is zero. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an int is not zero. - - The number to be examined - - - - Asserts that an int is not zero. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an unsigned int is not zero. - - The number to be examined - - - - Asserts that an unsigned int is not zero. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a Long is not zero. - - The number to be examined - - - - Asserts that a Long is not zero. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an unsigned Long is not zero. - - The number to be examined - - - - Asserts that an unsigned Long is not zero. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a decimal is zero. - - The number to be examined - - - - Asserts that a decimal is zero. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a double is zero. - - The number to be examined - - - - Asserts that a double is zero. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a float is zero. - - The number to be examined - - - - Asserts that a float is zero. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an int is negative. - - The number to be examined - - - - Asserts that an int is negative. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an unsigned int is negative. - - The number to be examined - - - - Asserts that an unsigned int is negative. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a Long is negative. - - The number to be examined - - - - Asserts that a Long is negative. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an unsigned Long is negative. - - The number to be examined - - - - Asserts that an unsigned Long is negative. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a decimal is negative. - - The number to be examined - - - - Asserts that a decimal is negative. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a double is negative. - - The number to be examined - - - - Asserts that a double is negative. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a float is negative. - - The number to be examined - - - - Asserts that a float is negative. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an int is negative. - - The number to be examined - - - - Asserts that an int is negative. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an unsigned int is negative. - - The number to be examined - - - - Asserts that an unsigned int is negative. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a Long is negative. - - The number to be examined - - - - Asserts that a Long is negative. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an unsigned Long is negative. - - The number to be examined - - - - Asserts that an unsigned Long is negative. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a decimal is negative. - - The number to be examined - - - - Asserts that a decimal is negative. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a double is negative. - - The number to be examined - - - - Asserts that a double is negative. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that a float is negative. - - The number to be examined - - - - Asserts that a float is negative. - - The number to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination - - - - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object may be assigned a value of a given Type. - - The expected Type. - The object under examination - - - - Asserts that an object may not be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object may not be assigned a value of a given Type. - - The expected Type. - The object under examination - - - - Asserts that an object may not be assigned a value of a given Type. - - The expected Type. - The object under examination - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object may not be assigned a value of a given Type. - - The expected Type. - The object under examination - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is an instance of a given type. - - The expected Type - The object being examined - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is not an instance of a given type. - - The expected Type - The object being examined - - - - Verifies that a delegate throws a particular exception when called. - - A constraint to be satisfied by the exception - A TestSnippet delegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws a particular exception when called. - - A constraint to be satisfied by the exception - A TestSnippet delegate - - - - Verifies that a delegate throws a particular exception when called. - - The exception Type expected - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws a particular exception when called. - - The exception Type expected - A TestDelegate - - - - Verifies that a delegate throws a particular exception when called. - - Type of the expected exception - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws a particular exception when called. - - Type of the expected exception - A TestDelegate - - - - Verifies that a delegate throws an exception when called - and returns it. - - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws an exception when called - and returns it. - - A TestDelegate - - - - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. - - The expected Exception Type - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. - - The expected Exception Type - A TestDelegate - - - - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. - - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate throws an exception of a certain Type - or one derived from it when called and returns it. - - A TestDelegate - - - - Verifies that a delegate does not throw an exception - - A TestDelegate - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Verifies that a delegate does not throw an exception. - - A TestDelegate - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display if the condition is false - Arguments to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - A function to build the message included with the Exception - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - A lambda that returns a Boolean - The message to display if the condition is false - Arguments to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - A lambda that returns a Boolean - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - A lambda that returns a Boolean - A function to build the message included with the Exception - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - The Type being compared. - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - The Type being compared. - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - The Type being compared. - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - A function to build the message included with the Exception - - - - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. - - A TestDelegate to be executed - A ThrowsConstraint used in the test - - - - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. - - A TestDelegate to be executed - A ThrowsConstraint used in the test - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. - - A TestDelegate to be executed - A ThrowsConstraint used in the test - A function to build the message included with the Exception - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - The Type being compared. - The actual value to test - A Constraint to be applied - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - The Type being compared. - The actual value to test - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - The Type being compared. - The actual value to test - A Constraint expression to be applied - A function to build the message included with the Exception - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - Used as a synonym for That in rare cases where a private setter - causes a Visual Basic compilation error. - - The actual value to test - A Constraint to be applied - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - Used as a synonym for That in rare cases where a private setter - causes a Visual Basic compilation error. - - - This method is provided for use by VB developers needing to test - the value of properties with private setters. - - The actual value to test - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - We don't actually want any instances of this object, but some people - like to inherit from it to add other static methods. Hence, the - protected constructor disallows any instances of this object. - - - - - The Equals method throws an InvalidOperationException. This is done - to make sure there is no mistake by calling this function. - - - - - - - override the default ReferenceEquals to throw an InvalidOperationException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. - - - - - - - Throws a with the message and arguments - that are passed in. This allows a test to be cut short, with a result - of success returned to NUnit. - - The message to initialize the with. - Arguments to be used in formatting the message - - - - Throws a with the message and arguments - that are passed in. This allows a test to be cut short, with a result - of success returned to NUnit. - - The message to initialize the with. - - - - Throws a with the message and arguments - that are passed in. This allows a test to be cut short, with a result - of success returned to NUnit. - - - - - Throws an with the message and arguments - that are passed in. This is used by the other Assert functions. - - The message to initialize the with. - Arguments to be used in formatting the message - - - - Throws an with the message that is - passed in. This is used by the other Assert functions. - - The message to initialize the with. - - - - Throws an . - This is used by the other Assert functions. - - - - - Throws an with the message and arguments - that are passed in. This causes the test to be reported as ignored. - - The message to initialize the with. - Arguments to be used in formatting the message - - - - Throws an with the message that is - passed in. This causes the test to be reported as ignored. - - The message to initialize the with. - - - - Throws an . - This causes the test to be reported as ignored. - - - - - Throws an with the message and arguments - that are passed in. This causes the test to be reported as inconclusive. - - The message to initialize the with. - Arguments to be used in formatting the message - - - - Throws an with the message that is - passed in. This causes the test to be reported as inconclusive. - - The message to initialize the with. - - - - Throws an . - This causes the test to be reported as Inconclusive. - - - - - Asserts that an object is contained in a list. - - The expected object - The list to be examined - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that an object is contained in a list. - - The expected object - The list to be examined - - - - Verifies that the first int is greater than the second - int. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first int is greater than the second - int. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is greater than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be greater - The second value, expected to be less - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that the first value is less than or equal to the second - value. If it is not, then an - is thrown. - - The first value, expected to be less - The second value, expected to be greater - - - - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - - - - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two doubles are equal considering a delta. If the - expected value is infinity then the delta value is ignored. If - they are not equal then an is - thrown. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - - - - Verifies that two objects are equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are not equal an is thrown. - - The value that is expected - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two objects are equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are not equal an is thrown. - - The value that is expected - The actual value - - - - Verifies that two objects are not equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are equal an is thrown. - - The value that is expected - The actual value - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Verifies that two objects are not equal. Two objects are considered - equal if both are null, or if both have the same value. NUnit - has special semantics for some object types. - If they are equal an is thrown. - - The value that is expected - The actual value - - - - Asserts that two objects refer to the same object. If they - are not the same an is thrown. - - The expected object - The actual object - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that two objects refer to the same object. If they - are not the same an is thrown. - - The expected object - The actual object - - - - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. - - The expected object - The actual object - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Asserts that two objects do not refer to the same object. If they - are the same an is thrown. - - The expected object - The actual object - - - - Helper for Assert.AreEqual(double expected, double actual, ...) - allowing code generation to work consistently. - - The expected value - The actual value - The maximum acceptable difference between the - the expected and the actual - The message to display in case of failure - Array of objects to be used in formatting the message - - - - Represents a constraint that succeeds if all the - members of a collection match a base constraint. - - - - - Abstract base for operators that indicate how to - apply a constraint to items in a collection. - - - - - PrefixOperator takes a single constraint and modifies - it's action in some way. - - - - - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. - - - - - - Returns the constraint created by applying this - prefix to another constraint. - - - - - - - Constructs a CollectionOperator - - - - - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - they all succeed. - - - - - FileExistsConstraint is used to determine if a file exists - - - - - FileOrDirectoryExistsConstraint is used to determine if a file or directory exists - - - - - Initializes a new instance of the class that - will check files and directories. - - - - - Initializes a new instance of the class that - will only check files if ignoreDirectories is true. - - if set to true [ignore directories]. - - - - Applies the constraint to an actual value, returning a ConstraintResult. - - The value to be tested - A ConstraintResult - - - - If true, the constraint will only check if files exist, not directories - - - - - If true, the constraint will only check if directories exist, not files - - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - Initializes a new instance of the class. - - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - TestAssemblyDirectoryResolveAttribute is used to mark a test assembly as needing a - special assembly resolution hook that will explicitly search the test assembly's - directory for dependent assemblies. This works around a conflict between mixed-mode - assembly initialization and tests running in their own AppDomain in some cases. - - - - - Helper methods for inspecting a type by reflection. - - Many of these methods take ICustomAttributeProvider as an - argument to avoid duplication, even though certain attributes can - only appear on specific types of members, like MethodInfo or Type. - - In the case where a type is being examined for the presence of - an attribute, interface or named member, the Reflect methods - operate with the full name of the member being sought. This - removes the necessity of the caller having a reference to the - assembly that defines the item being sought and allows the - NUnit core to inspect assemblies that reference an older - version of the NUnit framework. - - - - - Examine a fixture type and return an array of methods having a - particular attribute. The array is order with base methods first. - - The type to examine - The attribute Type to look for - Specifies whether to search the fixture type inheritance chain - The array of methods found - - - - Examine a fixture type and return true if it has a method with - a particular attribute. - - The type to examine - The attribute Type to look for - True if found, otherwise false - - - - Invoke the default constructor on a Type - - The Type to be constructed - An instance of the Type - - - - Invoke a constructor on a Type with arguments - - The Type to be constructed - Arguments to the constructor - An instance of the Type - - - - Returns an array of types from an array of objects. - Used because the compact framework doesn't support - Type.GetTypeArray() - - An array of objects - An array of Types - - - - Invoke a parameterless method returning void on an object. - - A MethodInfo for the method to be invoked - The object on which to invoke the method - - - - Invoke a method, converting any TargetInvocationException to an NUnitException. - - A MethodInfo for the method to be invoked - The object on which to invoke the method - The argument list for the method - The return value from the invoked method - - - - - - - - - Constructor delegate, makes it possible to use a factory to create objects - - - - - InvalidTestFixtureException is thrown when an appropriate test - fixture constructor using the provided arguments cannot be found. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The message. - - - - Initializes a new instance of the class. - - The message. - The inner. - - - - Serialization Constructor - - - - - Class to build ether a parameterized or a normal NUnitTestMethod. - There are four cases that the builder must deal with: - 1. The method needs no params and none are provided - 2. The method needs params and they are provided - 3. The method needs no params but they are provided in error - 4. The method needs params but they are not provided - This could have been done using two different builders, but it - turned out to be simpler to have just one. The BuildFrom method - takes a different branch depending on whether any parameters are - provided, but all four cases are dealt with in lower-level methods - - - - - The ITestCaseBuilder interface is exposed by a class that knows how to - build a test case from certain methods. - - - This interface is not the same as the ITestCaseBuilder interface in NUnit 2.x. - We have reused the name because the two products don't interoperate at all. - - - - - Examine the method and determine if it is suitable for - this builder to use in building a TestCase to be - included in the suite being populated. - - Note that returning false will cause the method to be ignored - in loading the tests. If it is desired to load the method - but label it as non-runnable, ignored, etc., then this - method must return true. - - The test method to examine - The suite being populated - True is the builder can use this method - - - - Build a TestCase from the provided MethodInfo for - inclusion in the suite being constructed. - - The method to be used as a test case - The test suite being populated, or null - A TestCase or null - - - - Determines if the method can be used to build an NUnit test - test method of some kind. The method must normally be marked - with an identifying attribute for this to be true. - - Note that this method does not check that the signature - of the method for validity. If we did that here, any - test methods with invalid signatures would be passed - over in silence in the test run. Since we want such - methods to be reported, the check for validity is made - in BuildFrom rather than here. - - An IMethodInfo for the method being used as a test method - True if the builder can create a test case from this method - - - - Build a Test from the provided MethodInfo. Depending on - whether the method takes arguments and on the availability - of test case data, this method may return a single test - or a group of tests contained in a ParameterizedMethodSuite. - - The method for which a test is to be built - A Test representing one or more method invocations - - - - Determines if the method can be used to build an NUnit test - test method of some kind. The method must normally be marked - with an identifying attribute for this to be true. - - Note that this method does not check that the signature - of the method for validity. If we did that here, any - test methods with invalid signatures would be passed - over in silence in the test run. Since we want such - methods to be reported, the check for validity is made - in BuildFrom rather than here. - - An IMethodInfo for the method being used as a test method - The test suite being built, to which the new test would be added - True if the builder can create a test case from this method - - - - Build a Test from the provided MethodInfo. Depending on - whether the method takes arguments and on the availability - of test case data, this method may return a single test - or a group of tests contained in a ParameterizedMethodSuite. - - The method for which a test is to be built - The test fixture being populated, or null - A Test representing one or more method invocations - - - - Builds a ParameterizedMethodSuite containing individual test cases. - - The method for which a test is to be built. - The list of test cases to include. - A ParameterizedMethodSuite populated with test cases - - - - Build a simple, non-parameterized TestMethod for this method. - - The MethodInfo for which a test is to be built - The test suite for which the method is being built - A TestMethod. - - - - Abstract base class for operators that are able to reduce to a - constraint whether or not another syntactic element follows. - - - - - NUnitEqualityComparer encapsulates NUnit's handling of - equality tests between objects. - - - - - If true, all string comparisons will ignore case - - - - - If true, arrays will be treated as collections, allowing - those of different dimensions to be compared - - - - - Comparison objects used in comparisons for some constraints. - - - - - List of points at which a failure occurred. - - - - - Compares two objects for equality within a tolerance. - - - - - Helper method to compare two arrays - - - - - Method to compare two DirectoryInfo objects - - first directory to compare - second directory to compare - true if equivalent, false if not - - - - Returns the default NUnitEqualityComparer - - - - - Gets and sets a flag indicating whether case should - be ignored in determining equality. - - - - - Gets and sets a flag indicating that arrays should be - compared as collections, without regard to their shape. - - - - - Gets the list of external comparers to be used to - test for equality. They are applied to members of - collections, in place of NUnit's own logic. - - - - - Gets the list of failure points for the last Match performed. - The list consists of objects to be interpreted by the caller. - This generally means that the caller may only make use of - objects it has placed on the list at a particular depthy. - - - - - Flags the comparer to include - property in comparison of two values. - - - Using this modifier does not allow to use the - modifier. - - - - - FailurePoint class represents one point of failure - in an equality test. - - - - - The location of the failure - - - - - The expected value - - - - - The actual value - - - - - Indicates whether the expected value is valid - - - - - Indicates whether the actual value is valid - - - - - NullConstraint tests that the actual value is null - - - - - Initializes a new instance of the class. - - - - - Applies the constraint to an actual value, returning a ConstraintResult. - - The value to be tested - A ConstraintResult - - - - CollectionSubsetConstraint is used to determine whether - one collection is a subset of another - - - - - Construct a CollectionSubsetConstraint - - The collection that the actual value is expected to be a subset of - - - - Test whether the actual collection is a subset of - the expected collection provided. - - - - - - - Flag the constraint to use the supplied predicate function - - The comparison function to use. - Self. - - - - The display name of this Constraint for use by ToString(). - The default value is the name of the constraint with - trailing "Constraint" removed. Derived classes may set - this to another name in their constructors. - - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - AndConstraint succeeds only if both members succeed. - - - - - BinaryConstraint is the abstract base of all constraints - that combine two other constraints in some fashion. - - - - - The first constraint being combined - - - - - The second constraint being combined - - - - - Construct a BinaryConstraint from two other constraints - - The first constraint - The second constraint - - - - Create an AndConstraint from two other constraints - - The first constraint - The second constraint - - - - Apply both member constraints to an actual value, succeeding - succeeding only if both of them succeed. - - The actual value - True if the constraints both succeeded - - - - Gets text describing a constraint - - - - - Contain the result of matching a against an actual value. - - - - - Constructs a for a particular . - - The Constraint to which this result applies. - The actual value to which the Constraint was applied. - - - - Constructs a for a particular . - - The Constraint to which this result applies. - The actual value to which the Constraint was applied. - The status of the new ConstraintResult. - - - - Constructs a for a particular . - - The Constraint to which this result applies. - The actual value to which the Constraint was applied. - If true, applies a status of Success to the result, otherwise Failure. - - - - Write the failure message to the MessageWriter provided - as an argument. The default implementation simply passes - the result and the actual value to the writer, which - then displays the constraint description and the value. - - Constraints that need to provide additional details, - such as where the error occured can override this. - - The MessageWriter on which to display the message - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - The actual value that was passed to the method. - - - - - Gets and sets the ResultStatus for this result. - - - - - True if actual value meets the Constraint criteria otherwise false. - - - - - Display friendly name of the constraint. - - - - - Description of the constraint may be affected by the state the constraint had - when was performed against the actual value. - - - - - Write the actual value for a failing constraint test to a - MessageWriter. The default implementation simply writes - the raw value of actual, leaving it to the writer to - perform any formatting. - - The writer on which the actual value is displayed - - - - Attribute used to identify a method that is called after - all the tests in a fixture have run. The method is - guaranteed to be called, even if an exception is thrown. - - - - - Attribute used to identify a method that is called once - after all the child tests have run. The method is - guaranteed to be called, even if an exception is thrown. - - - - - PlatformAttribute is used to mark a test fixture or an - individual method as applying to a particular platform only. - - - - - Constructor with no platforms specified, for use - with named property syntax. - - - - - Constructor taking one or more platforms - - Comma-delimited list of platforms - - - - Causes a test to be skipped if this PlatformAttribute is not satisfied. - - The test to modify - - - - Attribute used to mark a test that is to be ignored. - Ignored tests result in a warning message when the - tests are run. - - - - - Constructs the attribute giving a reason for ignoring the test - GetActionsFromAttributeProvider - The reason for ignoring the test - - - - Modifies a test by marking it as Ignored. - - The test to modify - - - - - - - - - The date in the future to stop ignoring the test as a string in UTC time. - For example for a date and time, "2014-12-25 08:10:00Z" or for just a date, - "2014-12-25". If just a date is given, the Ignore will expire at midnight UTC. - - - Once the ignore until date has passed, the test will be marked - as runnable. Tests with an ignore until date will have an IgnoreUntilDate - property set which will appear in the test results. - - The string does not contain a valid string representation of a date and time. - - - - The IApplyToContext interface is implemented by attributes - that want to make changes to the execution context before - a test is run. - - - - - Apply changes to the execution context - - The execution context - - - - A SimpleWorkItem represents a single test case and is - marked as completed immediately upon execution. This - class is also used for skipped or ignored test suites. - - - - - Construct a simple work item for a test. - - The test to be executed - The filter used to select this test - - - - Method that performs actually performs the work. - - - - - ContextSettingsCommand applies specified changes to the - TestExecutionContext prior to running a test. No special - action is needed after the test runs, since the prior - context will be restored automatically. - - - - - Initializes a new instance of the class. - - - - - - - - - - - - - - - - - - - - The RunState enum indicates whether a test can be executed. - - - - - The test is not runnable. - - - - - The test is runnable. - - - - - The test can only be run explicitly - - - - - The test has been skipped. This value may - appear on a Test when certain attributes - are used to skip the test. - - - - - The test has been ignored. May appear on - a Test, when the IgnoreAttribute is used. - - - - - Helper class with properties and methods that supply - a number of constraints used in Asserts. - - - - - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. - - - - - Returns a new ContainsConstraint. This constraint - will, in turn, make use of the appropriate second-level - constraint, depending on the type of the actual argument. - This overload is only used if the item sought is a string, - since any other type implies that we are looking for a - collection member. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a constraint that succeeds if the value - is a file or directory and it exists. - - - - - AssemblyHelper provides static methods for working - with assemblies. - - - - - Gets the path from which an assembly was loaded. - For builds where this is not possible, returns - the name of the assembly. - - The assembly. - The path. - - - - Gets the path to the directory from which an assembly was loaded. - - The assembly. - The path. - - - - Gets the AssemblyName of an assembly. - - The assembly - An AssemblyName - - - - Loads an assembly given a string, which may be the - path to the assembly or the AssemblyName - - - - - - - Gets the assembly path from code base. - - Public for testing purposes - The code base. - - - - - FrameworkController provides a facade for use in loading, browsing - and running tests without requiring a reference to the NUnit - framework. All calls are encapsulated in constructors for - this class and its nested classes, which only require the - types of the Common Type System as arguments. - - The controller supports four actions: Load, Explore, Count and Run. - They are intended to be called by a driver, which should allow for - proper sequencing of calls. Load must be called before any of the - other actions. The driver may support other actions, such as - reload on run, by combining these calls. - - - - - A MarshalByRefObject that lives forever - - - - - Obtains a lifetime service object to control the lifetime policy for this instance. - - - - - Construct a FrameworkController using the default builder and runner. - - The AssemblyName or path to the test assembly - A prefix used for all test ids created under this controller. - A Dictionary of settings to use in loading and running the tests - - - - Construct a FrameworkController using the default builder and runner. - - The test assembly - A prefix used for all test ids created under this controller. - A Dictionary of settings to use in loading and running the tests - - - - Construct a FrameworkController, specifying the types to be used - for the runner and builder. This constructor is provided for - purposes of development. - - The full AssemblyName or the path to the test assembly - A prefix used for all test ids created under this controller. - A Dictionary of settings to use in loading and running the tests - The Type of the test runner - The Type of the test builder - - - - Construct a FrameworkController, specifying the types to be used - for the runner and builder. This constructor is provided for - purposes of development. - - The test assembly - A prefix used for all test ids created under this controller. - A Dictionary of settings to use in loading and running the tests - The Type of the test runner - The Type of the test builder - - - - Loads the tests in the assembly - - - - - - Returns info about the tests in an assembly - - A string containing the XML representation of the filter to use - The XML result of exploring the tests - - - - Runs the tests in an assembly - - A string containing the XML representation of the filter to use - The XML result of the test run - - - - Runs the tests in an assembly syncronously reporting back the test results through the callback - or through the return value - - The callback that receives the test results - A string containing the XML representation of the filter to use - The XML result of the test run - - - - Runs the tests in an assembly asyncronously reporting back the test results through the callback - - The callback that receives the test results - A string containing the XML representation of the filter to use - - - - Stops the test run - - True to force the stop, false for a cooperative stop - - - - Counts the number of test cases in the loaded TestSuite - - A string containing the XML representation of the filter to use - The number of tests - - - - Inserts environment element - - Target node - The new node - - - - Inserts settings element - - Target node - Settings dictionary - The new node - - - - Gets the ITestAssemblyBuilder used by this controller instance. - - The builder. - - - - Gets the ITestAssemblyRunner used by this controller instance. - - The runner. - - - - Gets the AssemblyName or the path for which this FrameworkController was created - - - - - Gets the Assembly for which this - - - - - Gets a dictionary of settings for the FrameworkController - - - - - A shim of the .NET interface for platforms that do not support it. - Used to indicate that a control can be the target of a callback event on the server. - - - - - Processes a callback event that targets a control. - - - - - - Returns the results of a callback event that targets a control. - - - - - - FrameworkControllerAction is the base class for all actions - performed against a FrameworkController. - - - - - LoadTestsAction loads a test into the FrameworkController - - - - - LoadTestsAction loads the tests in an assembly. - - The controller. - The callback handler. - - - - ExploreTestsAction returns info about the tests in an assembly - - - - - Initializes a new instance of the class. - - The controller for which this action is being performed. - Filter used to control which tests are included (NYI) - The callback handler. - - - - CountTestsAction counts the number of test cases in the loaded TestSuite - held by the FrameworkController. - - - - - Construct a CountsTestAction and perform the count of test cases. - - A FrameworkController holding the TestSuite whose cases are to be counted - A string containing the XML representation of the filter to use - A callback handler used to report results - - - - RunTestsAction runs the loaded TestSuite held by the FrameworkController. - - - - - Construct a RunTestsAction and run all tests in the loaded TestSuite. - - A FrameworkController holding the TestSuite to run - A string containing the XML representation of the filter to use - A callback handler used to report results - - - - RunAsyncAction initiates an asynchronous test run, returning immediately - - - - - Construct a RunAsyncAction and run all tests in the loaded TestSuite. - - A FrameworkController holding the TestSuite to run - A string containing the XML representation of the filter to use - A callback handler used to report results - - - - StopRunAction stops an ongoing run. - - - - - Construct a StopRunAction and stop any ongoing run. If no - run is in process, no error is raised. - - The FrameworkController for which a run is to be stopped. - True the stop should be forced, false for a cooperative stop. - >A callback handler used to report results - A forced stop will cause threads and processes to be killed as needed. - - - - ExceptionTypeConstraint is a special version of ExactTypeConstraint - used to provided detailed info about the exception thrown in - an error message. - - - - - ExactTypeConstraint is used to test that an object - is of the exact type provided in the constructor - - - - - Construct an ExactTypeConstraint for a given Type - - The expected Type. - - - - Apply the constraint to an actual value, returning true if it succeeds - - The actual argument - True if the constraint succeeds, otherwise false. - - - - The display name of this Constraint for use by ToString(). - The default value is the name of the constraint with - trailing "Constraint" removed. Derived classes may set - this to another name in their constructors. - - - - - Constructs an ExceptionTypeConstraint - - - - - Applies the constraint to an actual value, returning a ConstraintResult. - - The value to be tested - A ConstraintResult - - - - TestProgressReporter translates ITestListener events into - the async callbacks that are used to inform the client - software about the progress of a test run. - - - - - Initializes a new instance of the class. - - The callback handler to be used for reporting progress. - - - - Called when a test has just started - - The test that is starting - - - - Called when a test has finished. Sends a result summary to the callback. - to - - The result of the test - - - - Called when a test produces output for immediate display - - A TestOutput object containing the text to display - - - - Returns the parent test item for the targer test item if it exists - - - parent test item - - - - Makes a string safe for use as an attribute, replacing - characters characters that can't be used with their - corresponding xml representations. - - The string to be used - A new string with the _values replaced - - - - Operator used to test for the presence of a named Property - on an object and optionally apply further tests to the - value of that property. - - - - - Constructs a PropOperator for a particular named property - - - - - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. - - - - - - Gets the name of the property to which the operator applies - - - - - NaNConstraint tests that the actual value is a double or float NaN - - - - - Test that the actual value is an NaN - - - - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - CollectionContainsConstraint is used to test whether a collection - contains an expected object as a member. - - - - - Construct a CollectionContainsConstraint - - - - - - Test whether the expected item is contained in the collection - - - - - - - Flag the constraint to use the supplied predicate function - - The comparison function to use. - Self. - - - - The display name of this Constraint for use by ToString(). - The default value is the name of the constraint with - trailing "Constraint" removed. Derived classes may set - this to another name in their constructors. - - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - Gets the expected object - - - - - Attribute used to mark a class that contains one-time SetUp - and/or TearDown methods that apply to all the tests in a - namespace or an assembly. - - - - - Attribute used to mark a class that contains one-time SetUp - and/or TearDown methods that apply to all the tests in a - namespace or an assembly. - - - - - Attribute used to mark a class that contains one-time SetUp - and/or TearDown methods that apply to all the tests in a - namespace or an assembly. - - - - - RepeatAttribute may be applied to test case in order - to run it multiple times. - - - - - Construct a RepeatAttribute - - The number of times to run the test - - - - Wrap a command and return the result. - - The command to be wrapped - The wrapped command - - - - The test command for the RepeatAttribute - - - - - Initializes a new instance of the class. - - The inner command. - The number of repetitions - - - - Runs the test, saving a TestResult in the supplied TestExecutionContext. - - The context in which the test should run. - A TestResult - - - - A simplified implementation of .NET 4 CountdownEvent - for use in earlier versions of .NET. Only the methods - used by NUnit are implemented. - - - - - Construct a CountdownEvent - - The initial count - - - - Decrement the count by one - - - - - Block the thread until the count reaches zero - - - - - Gets the initial count established for the CountdownEvent - - - - - Gets the current count remaining for the CountdownEvent - - - - - TheoryResultCommand adjusts the result of a Theory so that - it fails if all the results were inconclusive. - - - - - Constructs a TheoryResultCommand - - The command to be wrapped by this one - - - - Overridden to call the inner command and adjust the result - in case all chlid results were inconclusive. - - - - - - - NUnitTestCaseBuilder is a utility class used by attributes - that build test cases. - - - - - Constructs an - - - - - Builds a single NUnitTestMethod, either as a child of the fixture - or as one of a set of test cases under a ParameterizedTestMethodSuite. - - The MethodInfo from which to construct the TestMethod - The suite or fixture to which the new test will be added - The ParameterSet to be used, or null - - - - - Helper method that checks the signature of a TestMethod and - any supplied parameters to determine if the test is valid. - - Currently, NUnitTestMethods are required to be public, - non-abstract methods, either static or instance, - returning void. They may take arguments but the _values must - be provided or the TestMethod is not considered runnable. - - Methods not meeting these criteria will be marked as - non-runnable and the method will return false in that case. - - The TestMethod to be checked. If it - is found to be non-runnable, it will be modified. - Parameters to be used for this test, or null - True if the method signature is valid, false if not - - The return value is no longer used internally, but is retained - for testing purposes. - - - - - The TestStatus enum indicates the result of running a test - - - - - The test was inconclusive - - - - - The test has skipped - - - - - The test succeeded - - - - - The test failed - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - TestNameGenerator is able to create test names according to - a coded pattern. - - - - - Default pattern used to generate names - - - - - Construct a TestNameGenerator - - - - - Construct a TestNameGenerator - - The pattern used by this generator. - - - - Get the display name for a TestMethod and it's arguments - - A TestMethod - The display name - - - - Get the display name for a TestMethod and it's arguments - - A TestMethod - Arguments to be used - The display name - - - - The EqualConstraintResult class is tailored for formatting - and displaying the result of an EqualConstraint. - - - - - Construct an EqualConstraintResult - - - - - Write a failure message. Overridden to provide custom - failure messages for EqualConstraint. - - The MessageWriter to write to - - - - Display the failure information for two collections that did not match. - - The MessageWriter on which to display - The expected collection. - The actual collection - The depth of this failure in a set of nested collections - - - - Displays a single line showing the types and sizes of the expected - and actual collections or arrays. If both are identical, the value is - only shown once. - - The MessageWriter on which to display - The expected collection or array - The actual collection or array - The indentation level for the message line - - - - Displays a single line showing the point in the expected and actual - arrays at which the comparison failed. If the arrays have different - structures or dimensions, both _values are shown. - - The MessageWriter on which to display - The expected array - The actual array - Index of the failure point in the underlying collections - The indentation level for the message line - - - - Display the failure information for two IEnumerables that did not match. - - The MessageWriter on which to display - The expected enumeration. - The actual enumeration - The depth of this failure in a set of nested collections - - - - Provides NUnit specific extensions to aid in Reflection - across multiple frameworks - - - This version of the class supplies GetTypeInfo() on platforms - that don't support it. - - - - - GetTypeInfo gives access to most of the Type information we take for granted - on .NET Core and Windows Runtime. Rather than #ifdef different code for different - platforms, it is easiest to just code all platforms as if they worked this way, - thus the simple passthrough. - - - - - - - Extensions for Assembly that are not available in pre-4.5 .NET releases - - - - - An easy way to get a single custom attribute from an assembly - - The attribute Type - The assembly - An attribute of Type T - - - - Type extensions that apply to all target frameworks - - - - - Determines if the given array is castable/matches the array. - - - - - - - - Determines if one type can be implicitly converted from another - - - - - - - - This class is used as a flag when we get a parameter list for a method/constructor, but - we do not know one of the types because null was passed in. - - - - - The TestCaseData class represents a set of arguments - and other parameter info to be used for a parameterized - test case. It is derived from TestCaseParameters and adds a - fluent syntax for use in initializing the test case. - - - - - The TestCaseParameters class encapsulates method arguments and - other selected parameters needed for constructing - a parameterized test case. - - - - - TestParameters is the abstract base class for all classes - that know how to provide data for constructing a test. - - - - - Default Constructor creates an empty parameter set - - - - - Construct a parameter set with a list of arguments - - - - - - Construct a non-runnable ParameterSet, specifying - the provider exception that made it invalid. - - - - - Construct a ParameterSet from an object implementing ITestData - - - - - - Applies ParameterSet _values to the test itself. - - A test. - - - - The RunState for this set of parameters. - - - - - The arguments to be used in running the test, - which must match the method signature. - - - - - A name to be used for this test case in lieu - of the standard generated name containing - the argument list. - - - - - Gets the property dictionary for this test - - - - - The original arguments provided by the user, - used for display purposes. - - - - - The expected result to be returned - - - - - Default Constructor creates an empty parameter set - - - - - Construct a non-runnable ParameterSet, specifying - the provider exception that made it invalid. - - - - - Construct a parameter set with a list of arguments - - - - - - Construct a ParameterSet from an object implementing ITestCaseData - - - - - - The expected result of the test, which - must match the method return type. - - - - - Gets a value indicating whether an expected result was specified. - - - - - Initializes a new instance of the class. - - The arguments. - - - - Initializes a new instance of the class. - - The argument. - - - - Initializes a new instance of the class. - - The first argument. - The second argument. - - - - Initializes a new instance of the class. - - The first argument. - The second argument. - The third argument. - - - - Sets the expected result for the test - - The expected result - A modified TestCaseData - - - - Sets the name of the test case - - The modified TestCaseData instance - - - - Sets the description for the test case - being constructed. - - The description. - The modified TestCaseData instance. - - - - Applies a category to the test - - - - - - - Applies a named property to the test - - - - - - - - Applies a named property to the test - - - - - - - - Applies a named property to the test - - - - - - - - Marks the test case as explicit. - - - - - Marks the test case as explicit, specifying the reason. - - - - - Ignores this TestCase, specifying the reason. - - The reason. - - - - - - - - - - - - - - - - - - - - - Gets or sets the current test - - - - - The time the current test started execution - - - - - The time the current test started in Ticks - - - - - Gets or sets the current test result - - - - - Gets a TextWriter that will send output to the current test result. - - - - - The current test object - that is the user fixture - object on which tests are being executed. - - - - - Get or set the working directory - - - - - Get or set indicator that run should stop on the first error - - - - - Gets an enum indicating whether a stop has been requested. - - - - - The current WorkItemDispatcher. Made public for - use by nunitlite.tests - - - - - The ParallelScope to be used by tests running in this context. - For builds with out the parallel feature, it has no effect. - - - - - The unique name of the worker that spawned the context. - For builds with out the parallel feature, it is null. - - - - - Gets the RandomGenerator specific to this Test - - - - - Gets or sets the test case timeout value - - - - - Gets a list of ITestActions set by upstream tests - - - - - Saves or restores the CurrentCulture - - - - - Saves or restores the CurrentUICulture - - - - - The current head of the ValueFormatter chain, copied from MsgUtils.ValueFormatter - - - - - If true, all tests must run on the same thread. No new thread may be spawned. - - - - - Helper class used to save and restore certain static or - singleton settings in the environment that affect tests - or which might be changed by the user tests. - - An internal class is used to hold settings and a stack - of these objects is pushed and popped as Save and Restore - are called. - - - - - Link to a prior saved context - - - - - Indicates that a stop has been requested - - - - - The event listener currently receiving notifications - - - - - The number of assertions for the current test - - - - - The current culture - - - - - The current UI culture - - - - - The current test result - - - - - The current Principal. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - An existing instance of TestExecutionContext. - - - - Get the current context or return null if none is found. - - - - - - Clear the current context. This is provided to - prevent "leakage" of the CallContext containing - the current context back to any runners. - - - - - Record any changes in the environment made by - the test code in the execution context so it - will be passed on to lower level tests. - - - - - Set up the execution environment to match a context. - Note that we may be running on the same thread where the - context was initially created or on a different thread. - - - - - Increments the assert count by one. - - - - - Increments the assert count by a specified amount. - - - - - Adds a new ValueFormatterFactory to the chain of formatters - - The new factory - - - - Obtain lifetime service object - - - - - - Gets and sets the current context. - - - - - Gets or sets the current test - - - - - The time the current test started execution - - - - - The time the current test started in Ticks - - - - - Gets or sets the current test result - - - - - Gets a TextWriter that will send output to the current test result. - - - - - The current test object - that is the user fixture - object on which tests are being executed. - - - - - Get or set the working directory - - - - - Get or set indicator that run should stop on the first error - - - - - Gets an enum indicating whether a stop has been requested. - - - - - The current test event listener - - - - - The current WorkItemDispatcher. Made public for - use by nunitlite.tests - - - - - The ParallelScope to be used by tests running in this context. - For builds with out the parallel feature, it has no effect. - - - - - The unique name of the worker that spawned the context. - For builds with out the parallel feature, it is null. - - - - - Gets the RandomGenerator specific to this Test - - - - - Gets the assert count. - - The assert count. - - - - Gets or sets the test case timeout value - - - - - Gets a list of ITestActions set by upstream tests - - - - - Saves or restores the CurrentCulture - - - - - Saves or restores the CurrentUICulture - - - - - Gets or sets the current for the Thread. - - - - - The current head of the ValueFormatter chain, copied from MsgUtils.ValueFormatter - - - - - If true, all tests must run on the same thread. No new thread may be spawned. - - - - - Thrown when a test executes inconclusively. - - - - - Abstract base for Exceptions that terminate a test and provide a ResultState. - - - - The error message that explains - the reason for the exception - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - - - Serialization Constructor - - - - - Gets the ResultState provided by this exception - - - - The error message that explains - the reason for the exception - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - - - Serialization Constructor - - - - - Gets the ResultState provided by this exception - - - - - Helper class with properties and methods that supply - a number of constraints used in Asserts. - - - - - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. - - - - - Returns a new DictionaryContainsKeyConstraint checking for the - presence of a particular key in the dictionary. - - - - - Returns a new DictionaryContainsValueConstraint checking for the - presence of a particular value in the dictionary. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - EqualConstraint is able to compare an actual value with the - expected value provided in its constructor. Two objects are - considered equal if both are null, or if both have the same - value. NUnit has special semantics for some object types. - - - - - NUnitEqualityComparer used to test equality. - - - - - Initializes a new instance of the class. - - The expected value. - - - - Flag the constraint to use a tolerance when determining equality. - - Tolerance value to be used - Self. - - - - Flag the constraint to use the supplied IComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied Comparison object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IEqualityComparer object. - - The IComparer object to use. - Self. - - - - Flag the constraint to use the supplied IEqualityComparer object. - - The IComparer object to use. - Self. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Gets the tolerance for this comparison. - - - The tolerance. - - - - - Gets a value indicating whether to compare case insensitive. - - - true if comparing case insensitive; otherwise, false. - - - - - Gets a value indicating whether or not to clip strings. - - - true if set to clip strings otherwise, false. - - - - - Gets the failure points. - - - The failure points. - - - - - Flag the constraint to ignore case and return self. - - - - - Flag the constraint to suppress string clipping - and return self. - - - - - Flag the constraint to compare arrays as collections - and return self. - - - - - Flags the constraint to include - property in comparison of two values. - - - Using this modifier does not allow to use the - constraint modifier. - - - - - Switches the .Within() modifier to interpret its tolerance as - a distance in representable _values (see remarks). - - Self. - - Ulp stands for "unit in the last place" and describes the minimum - amount a given value can change. For any integers, an ulp is 1 whole - digit. For floating point _values, the accuracy of which is better - for smaller numbers and worse for larger numbers, an ulp depends - on the size of the number. Using ulps for comparison of floating - point results instead of fixed tolerances is safer because it will - automatically compensate for the added inaccuracy of larger numbers. - - - - - Switches the .Within() modifier to interpret its tolerance as - a percentage that the actual _values is allowed to deviate from - the expected value. - - Self - - - - Causes the tolerance to be interpreted as a TimeSpan in days. - - Self - - - - Causes the tolerance to be interpreted as a TimeSpan in hours. - - Self - - - - Causes the tolerance to be interpreted as a TimeSpan in minutes. - - Self - - - - Causes the tolerance to be interpreted as a TimeSpan in seconds. - - Self - - - - Causes the tolerance to be interpreted as a TimeSpan in milliseconds. - - Self - - - - Causes the tolerance to be interpreted as a TimeSpan in clock ticks. - - Self - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - Applies a delay to the match so that a match can be evaluated in the future. - - - - - Creates a new DelayedConstraint - - The inner constraint to decorate - The time interval after which the match is performed - If the value of is less than 0 - - - - Creates a new DelayedConstraint - - The inner constraint to decorate - The time interval after which the match is performed, in milliseconds - The time interval used for polling, in milliseconds - If the value of is less than 0 - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for if the base constraint fails, false if it succeeds - - - - Test whether the constraint is satisfied by a delegate - - The delegate whose value is to be tested - A ConstraintResult - - - - Test whether the constraint is satisfied by a given reference. - Overridden to wait for the specified delay period before - calling the base constraint with the dereferenced value. - - A reference to the value to be tested - True for success, false for failure - - - - Returns the string representation of the constraint. - - - - - Adjusts a Timestamp by a given TimeSpan - - - - - - - - Returns the difference between two Timestamps as a TimeSpan - - - - - - - - Gets text describing a constraint - - - - - CollectionOrderedConstraint is used to test whether a collection is ordered. - - - - - Construct a CollectionOrderedConstraint - - - - - Modifies the constraint to use an and returns self. - - - - - Modifies the constraint to use an and returns self. - - - - - Modifies the constraint to use a and returns self. - - - - - Modifies the constraint to test ordering by the value of - a specified property and returns self. - - - - - Test whether the collection is ordered - - - - - - - Returns the string representation of the constraint. - - - - - - The display name of this Constraint for use by ToString(). - The default value is the name of the constraint with - trailing "Constraint" removed. Derived classes may set - this to another name in their constructors. - - - - - If used performs a default ascending comparison - - - - - If used performs a reverse comparison - - - - - Then signals a break between two ordering steps - - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - An OrderingStep represents one stage of the sort - - - - - Attribute used to provide descriptive text about a - test case or fixture. - - - - - Construct a description Attribute - - The text of the description - - - - InvalidTestFixtureException is thrown when an appropriate test - fixture constructor using the provided arguments cannot be found. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - The message. - - - - Initializes a new instance of the class. - - The message. - The inner. - - - - Serialization Constructor - - - - - A CompositeWorkItem represents a test suite and - encapsulates the execution of the suite as well - as all its child tests. - - - - - A count of how many tests in the work item have a value for the Order Property - - - - - Construct a CompositeWorkItem for executing a test suite - using a filter to select child tests. - - The TestSuite to be executed - A filter used to select child tests - - - - Method that actually performs the work. Overridden - in CompositeWorkItem to do setup, run all child - items and then do teardown. - - - - - Sorts tests under this suite. - - - - - Cancel (abort or stop) a CompositeWorkItem and all of its children - - true if the CompositeWorkItem and all of its children should be aborted, false if it should allow all currently running tests to complete - - - - List of Child WorkItems - - - - - Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other. - - - A signed integer that indicates the relative values of and , as shown in the following table.Value Meaning Less than zero is less than .Zero equals .Greater than zero is greater than . - - The first object to compare.The second object to compare. - - - - The ISimpleTestBuilder interface is exposed by a class that knows how to - build a single TestMethod from a suitable MethodInfo Types. In general, - it is exposed by an attribute, but may be implemented in a helper class - used by the attribute in some cases. - - - - - Build a TestMethod from the provided MethodInfo. - - The method to be used as a test - The TestSuite to which the method will be added - A TestMethod object - - - - The TypeWrapper class wraps a Type so it may be used in - a platform-independent manner. - - - - - Construct a TypeWrapper for a specified Type. - - - - - Returns true if the Type wrapped is T - - - - - Get the display name for this type - - - - - Get the display name for an object of this type, constructed with the specified args. - - - - - Returns a new ITypeInfo representing an instance of this generic Type using the supplied Type arguments - - - - - Returns a Type representing a generic type definition from which this Type can be constructed. - - - - - Returns an array of custom attributes of the specified type applied to this type - - - - - Returns a value indicating whether the type has an attribute of the specified type. - - - - - - - - Returns a flag indicating whether this type has a method with an attribute of the specified type. - - - - - - - Returns an array of IMethodInfos for methods of this Type - that match the specified flags. - - - - - Gets the public constructor taking the specified argument Types - - - - - Returns a value indicating whether this Type has a public constructor taking the specified argument Types. - - - - - Construct an object of this Type, using the specified arguments. - - - - - Override ToString() so that error messages in NUnit's own tests make sense - - - - - Gets the underlying Type on which this TypeWrapper is based. - - - - - Gets the base type of this type as an ITypeInfo - - - - - Gets the Name of the Type - - - - - Gets the FullName of the Type - - - - - Gets the assembly in which the type is declared - - - - - Gets the namespace of the Type - - - - - Gets a value indicating whether the type is abstract. - - - - - Gets a value indicating whether the Type is a generic Type - - - - - Gets a value indicating whether the Type has generic parameters that have not been replaced by specific Types. - - - - - Gets a value indicating whether the Type is a generic Type definition - - - - - Gets a value indicating whether the type is sealed. - - - - - Gets a value indicating whether this type represents a static class. - - - - - DictionaryContainsValueConstraint is used to test whether a dictionary - contains an expected object as a value. - - - - - Construct a DictionaryContainsValueConstraint - - - - - - Test whether the expected value is contained in the dictionary - - - - - The display name of this Constraint for use by ToString(). - The default value is the name of the constraint with - trailing "Constraint" removed. Derived classes may set - this to another name in their constructors. - - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - TestCaseSourceAttribute indicates the source to be used to - provide test fixture instances for a test class. - - - - - Error message string is public so the tests can use it - - - - - Construct with the name of the method, property or field that will provide data - - The name of a static method, property or field that will provide data. - - - - Construct with a Type and name - - The Type that will provide data - The name of a static method, property or field that will provide data. - - - - Construct with a Type - - The type that will provide data - - - - Construct one or more TestFixtures from a given Type, - using available parameter data. - - The TypeInfo for which fixures are to be constructed. - One or more TestFixtures as TestSuite - - - - Returns a set of ITestFixtureData items for use as arguments - to a parameterized test fixture. - - The type for which data is needed. - - - - - The name of a the method, property or fiend to be used as a source - - - - - A Type to be used as a source - - - - - Gets or sets the category associated with every fixture created from - this attribute. May be a single category or a comma-separated list. - - - - - Attribute used to identify a method that is called once - to perform setup before any child tests are run. - - - - - Provides the Author of a test or test fixture. - - - - - Initializes a new instance of the class. - - The name of the author. - - - - Initializes a new instance of the class. - - The name of the author. - The email address of the author. - - - - The different targets a test action attribute can be applied to - - - - - Default target, which is determined by where the action attribute is attached - - - - - Target a individual test case - - - - - Target a suite of test cases - - - - - TestListener provides an implementation of ITestListener that - does nothing. It is used only through its NULL property. - - - - - Called when a test has just started - - The test that is starting - - - - Called when a test case has finished - - The result of the test - - - - Called when a test produces output for immediate display - - A TestOutput object containing the text to display - - - - Construct a new TestListener - private so it may not be used. - - - - - Get a listener that does nothing - - - - - PlatformHelper class is used by the PlatformAttribute class to - determine whether a platform is supported. - - - - - Comma-delimited list of all supported OS platform constants - - - - - Comma-delimited list of all supported Runtime platform constants - - - - - Default constructor uses the operating system and - common language runtime of the system. - - - - - Construct a PlatformHelper for a particular operating - system and common language runtime. Used in testing. - - OperatingSystem to be used - RuntimeFramework to be used - - - - Test to determine if one of a collection of platforms - is being used currently. - - - - - - - Tests to determine if the current platform is supported - based on a platform attribute. - - The attribute to examine - - - - - Tests to determine if the current platform is supported - based on a platform attribute. - - The attribute to examine - - - - - Test to determine if the a particular platform or comma- - delimited set of platforms is in use. - - Name of the platform or comma-separated list of platform ids - True if the platform is in use on the system - - - - Return the last failure reason. Results are not - defined if called before IsSupported( Attribute ) - is called. - - - - - DefaultTestAssemblyBuilder loads a single assembly and builds a TestSuite - containing test fixtures present in the assembly. - - - - - The default suite builder used by the test assembly builder. - - - - - Initializes a new instance of the class. - - - - - Build a suite of tests from a provided assembly - - The assembly from which tests are to be built - A dictionary of options to use in building the suite - - A TestSuite containing the tests found in the assembly - - - - - Build a suite of tests given the filename of an assembly - - The filename of the assembly from which tests are to be built - A dictionary of options to use in building the suite - - A TestSuite containing the tests found in the assembly - - - - - Helper class with properties and methods that supply - a number of constraints used in Asserts. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding only if a specified number of them succeed. - - - - - Returns a new PropertyConstraintExpression, which will either - test for the existence of the named property on the object - being tested or apply any following constraint to that property. - - - - - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. - - - - - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. - - - - - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if at least one of them succeeds. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. - - - - - EmptyConstraint tests a whether a string or collection is empty, - postponing the decision about which test is applied until the - type of the actual argument is known. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - ComparisonAdapter class centralizes all comparisons of - _values in NUnit, adapting to the use of any provided - , - or . - - - - - Returns a ComparisonAdapter that wraps an - - - - - Returns a ComparisonAdapter that wraps an - - - - - Returns a ComparisonAdapter that wraps a - - - - - Compares two objects - - - - - Gets the default ComparisonAdapter, which wraps an - NUnitComparer object. - - - - - Construct a ComparisonAdapter for an - - - - - Compares two objects - - - - - - - - Construct a default ComparisonAdapter - - - - - ComparerAdapter extends and - allows use of an or - to actually perform the comparison. - - - - - Construct a ComparisonAdapter for an - - - - - Compare a Type T to an object - - - - - Construct a ComparisonAdapter for a - - - - - Compare a Type T to an object - - - - - AssignableFromConstraint is used to test that an object - can be assigned from a given Type. - - - - - Construct an AssignableFromConstraint for the type provided - - - - - - Apply the constraint to an actual value, returning true if it succeeds - - The actual argument - True if the constraint succeeds, otherwise false. - - - - Marks a test to use a Sequential join of any argument - data provided. Arguments will be combined into test cases, - taking the next value of each argument until all are used. - - - - - Default constructor - - - - - RangeAttribute is used to supply a range of _values to an - individual parameter of a parameterized test. - - - - - Construct a range of ints using default step of 1 - - - - - - - Construct a range of ints specifying the step size - - - - - - - - Construct a range of unsigned ints using default step of 1 - - - - - - - Construct a range of unsigned ints specifying the step size - - - - - - - - Construct a range of longs using a default step of 1 - - - - - - - Construct a range of longs - - - - - - - - Construct a range of unsigned longs using default step of 1 - - - - - - - Construct a range of unsigned longs specifying the step size - - - - - - - - Construct a range of doubles - - - - - - - - Construct a range of floats - - - - - - - - Used to mark a field, property or method providing a set of datapoints to - be used in executing any theories within the same fixture that require an - argument of the Type provided. The data source may provide an array of - the required Type or an . - Synonymous with DatapointsAttribute. - - - - - StackFilter class is used to remove internal NUnit - entries from a stack trace so that the resulting - trace provides better information about the test. - - - - - Filters a raw stack trace and returns the result. - - The original stack trace - A filtered stack trace - - - - A utility class to create TestCommands - - - - - Gets the command to be executed before any of - the child tests are run. - - A TestCommand - - - - Gets the command to be executed after all of the - child tests are run. - - A TestCommand - - - - Creates a test command for use in running this test. - - - - - - Creates a command for skipping a test. The result returned will - depend on the test RunState. - - - - - Builds the set up tear down list. - - Type of the fixture. - Type of the set up attribute. - Type of the tear down attribute. - A list of SetUpTearDownItems - - - - The ParameterWrapper class wraps a ParameterInfo so that it may - be used in a platform-independent manner. - - - - - The IParameterInfo interface is an abstraction of a .NET parameter. - - - - - Gets a value indicating whether the parameter is optional - - - - - Gets an IMethodInfo representing the method for which this is a parameter - - - - - Gets the underlying .NET ParameterInfo - - - - - Gets the Type of the parameter - - - - - Construct a ParameterWrapper for a given method and parameter - - - - - - - Returns an array of custom attributes of the specified type applied to this method - - - - - Gets a value indicating whether one or more attributes of the specified type are defined on the parameter. - - - - - Gets a value indicating whether the parameter is optional - - - - - Gets an IMethodInfo representing the method for which this is a parameter. - - - - - Gets the underlying ParameterInfo - - - - - Gets the Type of the parameter - - - - - A trace listener that writes to a separate file per domain - and process using it. - - - - - Construct an InternalTraceWriter that writes to a file. - - Path to the file to use - - - - Construct an InternalTraceWriter that writes to a - TextWriter provided by the caller. - - - - - - Writes a character to the text string or stream. - - The character to write to the text stream. - - - - Writes a string to the text string or stream. - - The string to write. - - - - Writes a string followed by a line terminator to the text string or stream. - - The string to write. If is null, only the line terminator is written. - - - - Releases the unmanaged resources used by the and optionally releases the managed resources. - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - Clears all buffers for the current writer and causes any buffered data to be written to the underlying device. - - - - - Returns the character encoding in which the output is written. - - The character encoding in which the output is written. - - - - FullName filter selects tests based on their FullName - - - - - Construct a MethodNameFilter for a single name - - The name the filter will recognize. - - - - Match a test against a single value. - - - - - Gets the element name - - Element name - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Provides a platform-independent methods for getting attributes - for use by AttributeConstraint and AttributeExistsConstraint. - - - - - Gets the custom attributes from the given object. - - Portable libraries do not have an ICustomAttributeProvider, so we need to cast to each of - it's direct subtypes and try to get attributes off those instead. - The actual. - Type of the attribute. - if set to true [inherit]. - A list of the given attribute on the given object. - - - - The SpecialValue enum is used to represent TestCase arguments - that cannot be used as arguments to an Attribute. - - - - - Null represents a null value, which cannot be used as an - argument to an attriute under .NET 1.x - - - - - TypeHelper provides static methods that operate on Types. - - - - - A special value, which is used to indicate that BestCommonType() method - was unable to find a common type for the specified arguments. - - - - - Gets the display name for a Type as used by NUnit. - - The Type for which a display name is needed. - The display name for the Type - - - - Gets the display name for a Type as used by NUnit. - - The Type for which a display name is needed. - The arglist provided. - The display name for the Type - - - - Returns the best fit for a common type to be used in - matching actual arguments to a methods Type parameters. - - The first type. - The second type. - Either type1 or type2, depending on which is more general. - - - - Determines whether the specified type is numeric. - - The type to be examined. - - true if the specified type is numeric; otherwise, false. - - - - - Convert an argument list to the required parameter types. - Currently, only widening numeric conversions are performed. - - An array of args to be converted - A ParameterInfo[] whose types will be used as targets - - - - Determines whether this instance can deduce type args for a generic type from the supplied arguments. - - The type to be examined. - The arglist. - The type args to be used. - - true if this the provided args give sufficient information to determine the type args to be used; otherwise, false. - - - - - Gets the _values for an enumeration, using Enum.GetTypes - where available, otherwise through reflection. - - - - - - - Gets the ids of the _values for an enumeration, - using Enum.GetNames where available, otherwise - through reflection. - - - - - - - ThreadUtility provides a set of static methods convenient - for working with threads. - - - - - Do our best to Kill a thread - - The thread to kill - - - - Do our best to kill a thread, passing state info - - The thread to kill - Info for the ThreadAbortException handler - - - - TestFixture is a surrogate for a user test fixture class, - containing one or more tests. - - - - - Any ITest that implements this interface is at a level that the implementing - class should be disposed at the end of the test run - - - - - Initializes a new instance of the class. - - Type of the fixture. - - - - Predicate constraint wraps a Predicate in a constraint, - returning success if the predicate is true. - - - - - Construct a PredicateConstraint from a predicate - - - - - Determines whether the predicate succeeds when applied - to the actual value. - - - - - Gets text describing a constraint - - - - - NotConstraint negates the effect of some other constraint - - - - - Initializes a new instance of the class. - - The base constraint to be negated. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for if the base constraint fails, false if it succeeds - - - - Custom value formatter function - - The value - - - - - Custom value formatter factory function - - The next formatter function - ValueFormatter - If the given formatter is unable to handle a certain format, it must call the next formatter in the chain - - - - Static methods used in creating messages - - - - - Static string used when strings are clipped - - - - - Formatting strings used for expected and actual _values - - - - - Add a formatter to the chain of responsibility. - - - - - - Formats text to represent a generalized value. - - The value - The formatted text - - - - Formats text for a collection value, - starting at a particular point, to a max length - - The collection containing elements to write. - The starting point of the elements to write - The maximum number of elements to write - - - - Returns the representation of a type as used in NUnitLite. - This is the same as Type.ToString() except for arrays, - which are displayed with their declared sizes. - - - - - - - Converts any control characters in a string - to their escaped representation. - - The string to be converted - The converted string - - - - Converts any null characters in a string - to their escaped representation. - - The string to be converted - The converted string - - - - Return the a string representation for a set of indices into an array - - Array of indices for which a string is needed - - - - Get an array of indices representing the point in a collection or - array corresponding to a single int index into the collection. - - The collection to which the indices apply - Index in the collection - Array of indices - - - - Clip a string to a given length, starting at a particular offset, returning the clipped - string with ellipses representing the removed parts - - The string to be clipped - The maximum permitted length of the result string - The point at which to start clipping - The clipped string - - - - Clip the expected and actual strings in a coordinated fashion, - so that they may be displayed together. - - - - - - - - - Shows the position two strings start to differ. Comparison - starts at the start index. - - The expected string - The actual string - The index in the strings at which comparison should start - Boolean indicating whether case should be ignored - -1 if no mismatch found, or the index where mismatch found - - - - Current head of chain of value formatters. Public for testing. - - - - - Adding this attribute to a method within a - class makes the method callable from the NUnit test runner. There is a property - called Description which is optional which you can provide a more detailed test - description. This class cannot be inherited. - - - - [TestFixture] - public class Fixture - { - [Test] - public void MethodToTest() - {} - - [Test(Description = "more detailed description")] - public void TestDescriptionMethod() - {} - } - - - - - - Construct the attribute, specifying a combining strategy and source of parameter data. - - - - - Enumeration indicating whether the tests are - running normally or being cancelled. - - - - - Running normally with no stop requested - - - - - A graceful stop has been requested - - - - - A forced stop has been requested - - - - - The TestCaseParameters class encapsulates method arguments and - other selected parameters needed for constructing - a parameterized test case. - - - - - Default Constructor creates an empty parameter set - - - - - Construct a non-runnable ParameterSet, specifying - the provider exception that made it invalid. - - - - - Construct a parameter set with a list of arguments - - - - - - Construct a ParameterSet from an object implementing ITestCaseData - - - - - - Type arguments used to create a generic fixture instance - - - - - Provides methods to support legacy string comparison methods. - - - - - Compares two strings for equality, ignoring case if requested. - - The first string. - The second string.. - if set to true, the case of the letters in the strings is ignored. - Zero if the strings are equivalent, a negative number if strA is sorted first, a positive number if - strB is sorted first - - - - Compares two strings for equality, ignoring case if requested. - - The first string. - The second string.. - if set to true, the case of the letters in the strings is ignored. - True if the strings are equivalent, false if not. - - - - OneTimeSetUpCommand runs any one-time setup methods for a suite, - constructing the user test object if necessary. - - - - - Constructs a OneTimeSetUpCommand for a suite - - The suite to which the command applies - A SetUpTearDownList for use by the command - A List of TestActionItems to be run after Setup - - - - Overridden to run the one-time setup for a suite. - - The TestExecutionContext to be used. - A TestResult - - - - The TestOutput class holds a unit of output from - a test to a specific output stream - - - - - Construct with text, ouput destination type and - the name of the test that produced the output. - - Text to be output - Name of the stream or channel to which the text should be written - FullName of test that produced the output - - - - Return string representation of the object for debugging - - - - - - Convert the TestOutput object to an XML string - - - - - Get the text - - - - - Get the output type - - - - - Get the name of the test that created the output - - - - - The IMethodInfo class is used to encapsulate information - about a method in a platform-independent manner. - - - - - Gets the parameters of the method. - - - - - - Returns the Type arguments of a generic method or the Type parameters of a generic method definition. - - - - - Replaces the type parameters of the method with the array of types provided and returns a new IMethodInfo. - - The type arguments to be used - A new IMethodInfo with the type arguments replaced - - - - Invokes the method, converting any TargetInvocationException to an NUnitException. - - The object on which to invoke the method - The argument list for the method - The return value from the invoked method - - - - Gets the Type from which this method was reflected. - - - - - Gets the MethodInfo for this method. - - - - - Gets the name of the method. - - - - - Gets a value indicating whether the method is abstract. - - - - - Gets a value indicating whether the method is public. - - - - - Gets a value indicating whether the method contains unassigned generic type parameters. - - - - - Gets a value indicating whether the method is a generic method. - - - - - Gets a value indicating whether the MethodInfo represents the definition of a generic method. - - - - - Gets the return Type of the method. - - - - - ThrowsExceptionConstraint tests that an exception has - been thrown, without any further tests. - - - - - Executes the code and returns success if an exception is thrown. - - A delegate representing the code to be tested - True if an exception is thrown, otherwise false - - - - Returns the ActualValueDelegate itself as the value to be tested. - - A delegate representing the code to be tested - The delegate itself - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - LevelOfParallelismAttribute is used to set the number of worker threads - that may be allocated by the framework for running tests. - - - - - Construct a LevelOfParallelismAttribute. - - The number of worker threads to be created by the framework. - - - - RepeatAttribute may be applied to test case in order - to run it multiple times. - - - - - Construct a RepeatAttribute - - The number of times to run the test - - - - Wrap a command and return the result. - - The command to be wrapped - The wrapped command - - - - The test command for the RetryAttribute - - - - - Initializes a new instance of the class. - - The inner command. - The number of repetitions - - - - Runs the test, saving a TestResult in the supplied TestExecutionContext. - - The context in which the test should run. - A TestResult - - - - Represents the result of running a single test case. - - - - - Construct a TestCaseResult based on a TestMethod - - A TestMethod to which the result applies. - - - - Gets the number of test cases that failed - when running the test and all its children. - - - - - Gets the number of test cases that passed - when running the test and all its children. - - - - - Gets the number of test cases that were skipped - when running the test and all its children. - - - - - Gets the number of test cases that were inconclusive - when running the test and all its children. - - - - - Indicates whether this result has any child results. - - - - - Gets the collection of child results. - - - - - TestParameters class holds any named parameters supplied to the test run - - - - - Gets a flag indicating whether a parameter with the specified name exists.N - - Name of the parameter - True if it exists, otherwise false - - - - Get method is a simple alternative to the indexer - - Name of the paramter - Value of the parameter or null if not present - - - - Get the value of a parameter or a default string - - Name of the parameter - Default value of the parameter - Value of the parameter or default value if not present - - - - Get the value of a parameter or return a default - - The return Type - Name of the parameter - Default value of the parameter - Value of the parameter or default value if not present - - - - Adds a parameter to the list - - Name of the parameter - Value of the parameter - - - - Gets the number of test parameters - - - - - Gets a collection of the test parameter names - - - - - Indexer provides access to the internal dictionary - - Name of the parameter - Value of the parameter or null if not present - - - - ParameterDataSourceProvider supplies individual argument _values for - single parameters using attributes implementing IParameterDataSource. - - - - - Determine whether any data is available for a parameter. - - A ParameterInfo representing one - argument to a parameterized test - - True if any data is available, otherwise false. - - - - - Return an IEnumerable providing data for use with the - supplied parameter. - - An IParameterInfo representing one - argument to a parameterized test - - An IEnumerable providing the required data - - - - - Thrown when an assertion failed. - - - - - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - - - Serialization Constructor - - - - - Gets the ResultState provided by this exception - - - - - OrConstraint succeeds if either member succeeds - - - - - Create an OrConstraint from two other constraints - - The first constraint - The second constraint - - - - Apply the member constraints to an actual value, succeeding - succeeding as soon as one of them succeeds. - - The actual value - True if either constraint succeeded - - - - Gets text describing a constraint - - - - - Operator that tests for the presence of a particular attribute - on a type and optionally applies further tests to the attribute. - - - - - Construct an AttributeOperator for a particular Type - - The Type of attribute tested - - - - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. - - - - - MessageWriter is the abstract base for classes that write - constraint descriptions and messages in some form. The - class has separate methods for writing various components - of a message, allowing implementations to tailor the - presentation as needed. - - - - - Construct a MessageWriter given a culture - - - - - Method to write single line message with optional args, usually - written to precede the general failure message. - - The message to be written - Any arguments used in formatting the message - - - - Method to write single line message with optional args, usually - written to precede the general failure message, at a givel - indentation level. - - The indentation level of the message - The message to be written - Any arguments used in formatting the message - - - - Display Expected and Actual lines for a constraint. This - is called by MessageWriter's default implementation of - WriteMessageTo and provides the generic two-line display. - - The failing constraint result - - - - Display Expected and Actual lines for given _values. This - method may be called by constraints that need more control over - the display of actual and expected _values than is provided - by the default implementation. - - The expected value - The actual value causing the failure - - - - Display Expected and Actual lines for given _values, including - a tolerance value on the Expected line. - - The expected value - The actual value causing the failure - The tolerance within which the test was made - - - - Display the expected and actual string _values on separate lines. - If the mismatch parameter is >=0, an additional line is displayed - line containing a caret that points to the mismatch point. - - The expected string value - The actual string value - The point at which the strings don't match or -1 - If true, case is ignored in locating the point where the strings differ - If true, the strings should be clipped to fit the line - - - - Writes the text for an actual value. - - The actual value. - - - - Writes the text for a generalized value. - - The value. - - - - Writes the text for a collection value, - starting at a particular point, to a max length - - The collection containing elements to write. - The starting point of the elements to write - The maximum number of elements to write - - - - Abstract method to get the max line length - - - - - Tests whether a value is less than the value supplied to its constructor - - - - - Abstract base class for constraints that compare _values to - determine if one is greater than, equal to or less than - the other. - - - - - The value against which a comparison is to be made - - - - - If true, less than returns success - - - - - if true, equal returns success - - - - - if true, greater than returns success - - - - - ComparisonAdapter to be used in making the comparison - - - - - Initializes a new instance of the class. - - The value against which to make a comparison. - if set to true less succeeds. - if set to true equal succeeds. - if set to true greater succeeds. - String used in describing the constraint. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Modifies the constraint to use an and returns self - - The comparer used for comparison tests - A constraint modified to use the given comparer - - - - Modifies the constraint to use an and returns self - - The comparer used for comparison tests - A constraint modified to use the given comparer - - - - Modifies the constraint to use a and returns self - - The comparer used for comparison tests - A constraint modified to use the given comparer - - - - Initializes a new instance of the class. - - The expected value. - - - - EmptyStringConstraint tests whether a string is empty. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - EmptyDirectoryConstraint is used to test that a directory is empty - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - ConstraintBuilder maintains the stacks that are used in - processing a ConstraintExpression. An OperatorStack - is used to hold operators that are waiting for their - operands to be reorganized. a ConstraintStack holds - input constraints as well as the results of each - operator applied. - - - - - Initializes a new instance of the class. - - - - - Appends the specified operator to the expression by first - reducing the operator stack and then pushing the new - operator on the stack. - - The operator to push. - - - - Appends the specified constraint to the expression by pushing - it on the constraint stack. - - The constraint to push. - - - - Sets the top operator right context. - - The right context. - - - - Reduces the operator stack until the topmost item - precedence is greater than or equal to the target precedence. - - The target precedence. - - - - Resolves this instance, returning a Constraint. If the Builder - is not currently in a resolvable state, an exception is thrown. - - The resolved constraint - - - - Gets a value indicating whether this instance is resolvable. - - - true if this instance is resolvable; otherwise, false. - - - - - OperatorStack is a type-safe stack for holding ConstraintOperators - - - - - Initializes a new instance of the class. - - The ConstraintBuilder using this stack. - - - - Pushes the specified operator onto the stack. - - The operator to put onto the stack. - - - - Pops the topmost operator from the stack. - - The topmost operator on the stack - - - - Gets a value indicating whether this is empty. - - true if empty; otherwise, false. - - - - Gets the topmost operator without modifying the stack. - - - - - ConstraintStack is a type-safe stack for holding Constraints - - - - - Initializes a new instance of the class. - - The ConstraintBuilder using this stack. - - - - Pushes the specified constraint. As a side effect, - the constraint's Builder field is set to the - ConstraintBuilder owning this stack. - - The constraint to put onto the stack - - - - Pops this topmost constraint from the stack. - As a side effect, the constraint's Builder - field is set to null. - - The topmost contraint on the stack - - - - Gets a value indicating whether this is empty. - - true if empty; otherwise, false. - - - - CollectionEquivalentConstraint is used to determine whether two - collections are equivalent. - - - - - Construct a CollectionEquivalentConstraint - - - - - - Test whether two collections are equivalent - - - - - - - Flag the constraint to use the supplied predicate function - - The comparison function to use. - Self. - - - - The display name of this Constraint for use by ToString(). - The default value is the name of the constraint with - trailing "Constraint" removed. Derived classes may set - this to another name in their constructors. - - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - AttributeExistsConstraint tests for the presence of a - specified attribute on a Type. - - - - - Constructs an AttributeExistsConstraint for a specific attribute Type - - - - - - Tests whether the object provides the expected attribute. - - A Type, MethodInfo, or other ICustomAttributeProvider - True if the expected attribute is present, otherwise false - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - Marks a test that must run on a separate thread. - - - - - Construct a RequiresThreadAttribute - - - - - Construct a RequiresThreadAttribute, specifying the apartment - - - - - ExplicitAttribute marks a test or test fixture so that it will - only be run if explicitly executed from the gui or command line - or if it is included by use of a filter. The test will not be - run simply because an enclosing suite is run. - - - - - Default constructor - - - - - Constructor with a reason - - The reason test is marked explicit - - - - Modifies a test by marking it as explicit. - - The test to modify - - - - OneTimeTearDownCommand performs any teardown actions - specified for a suite and calls Dispose on the user - test object, if any. - - - - - Construct a OneTimeTearDownCommand - - The test suite to which the command applies - A SetUpTearDownList for use by the command - A List of TestActionItems to be run before teardown. - - - - Overridden to run the teardown methods specified on the test. - - The TestExecutionContext to be used. - A TestResult - - - - Class that can build a tree of automatic namespace - suites from a group of fixtures. - - - - - NamespaceDictionary of all test suites we have created to represent - namespaces. Used to locate namespace parent suites for fixtures. - - - - - The root of the test suite being created by this builder. - - - - - Initializes a new instance of the class. - - The root suite. - - - - Adds the specified fixtures to the tree. - - The fixtures to be added. - - - - Adds the specified fixture to the tree. - - The fixture to be added. - - - - Gets the root entry in the tree created by the NamespaceTreeBuilder. - - The root suite. - - - - Built-in SuiteBuilder for all types of test classes. - - - - - The ISuiteBuilder interface is exposed by a class that knows how to - build a suite from one or more Types. - - - - - Examine the type and determine if it is suitable for - this builder to use in building a TestSuite. - - Note that returning false will cause the type to be ignored - in loading the tests. If it is desired to load the suite - but label it as non-runnable, ignored, etc., then this - method must return true. - - The type of the fixture to be used - True if the type can be used to build a TestSuite - - - - Build a TestSuite from type provided. - - The type of the fixture to be used - A TestSuite - - - - Checks to see if the provided Type is a fixture. - To be considered a fixture, it must be a non-abstract - class with one or more attributes implementing the - IFixtureBuilder interface or one or more methods - marked as tests. - - The fixture type to check - True if the fixture can be built, false if not - - - - Build a TestSuite from TypeInfo provided. - - The fixture type to build - A TestSuite built from that type - - - - We look for attributes implementing IFixtureBuilder at one level - of inheritance at a time. Attributes on base classes are not used - unless there are no fixture builder attributes at all on the derived - class. This is by design. - - The type being examined for attributes - A list of the attributes found. - - - - - - - - - - - - - - - - - - - - - - - - Provide actions to execute before and after tests. - - - - - When implemented by an attribute, this interface implemented to provide actions to execute before and after tests. - - - - - Executed before each test is run - - The test that is going to be run. - - - - Executed after each test is run - - The test that has just been run. - - - - Provides the target for the action attribute - - The target for the action attribute - - - - Executed before each test is run - - The test that is going to be run. - - - - Executed after each test is run - - The test that has just been run. - - - - Provides the target for the action attribute - - - - - Marks a test that must run in a particular threading apartment state, causing it - to run in a separate thread if necessary. - - - - - Construct an ApartmentAttribute - - The apartment state that this test must be run under. You must pass in a valid apartment state. - - - - The Iz class is a synonym for Is intended for use in VB, - which regards Is as a keyword. - - - - - Helper class with properties and methods that supply - a number of constraints used in Asserts. - - - - - Returns a constraint that tests two items for equality - - - - - Returns a constraint that tests that two references are the same object - - - - - Returns a constraint that tests whether the - actual value is greater than the supplied argument - - - - - Returns a constraint that tests whether the - actual value is greater than or equal to the supplied argument - - - - - Returns a constraint that tests whether the - actual value is greater than or equal to the supplied argument - - - - - Returns a constraint that tests whether the - actual value is less than the supplied argument - - - - - Returns a constraint that tests whether the - actual value is less than or equal to the supplied argument - - - - - Returns a constraint that tests whether the - actual value is less than or equal to the supplied argument - - - - - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. - - - - - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable to the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable to the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a collection containing the same elements as the - collection supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a subset of the collection supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a superset of the collection supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. - - - - - Returns a constraint that tests whether the path provided - is the same as an expected path after canonicalization. - - - - - Returns a constraint that tests whether the path provided - is a subpath of the expected path after canonicalization. - - - - - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. - - - - - Returns a constraint that tests whether the actual value falls - inclusively within a specified range. - - from must be less than or equal to true - Inclusive beginning of the range. Must be less than or equal to to. - Inclusive end of the range. Must be greater than or equal to from. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. - - - - - Returns a constraint that tests for null - - - - - Returns a constraint that tests for True - - - - - Returns a constraint that tests for False - - - - - Returns a constraint that tests for a positive value - - - - - Returns a constraint that tests for a negative value - - - - - Returns a constraint that tests for equality with zero - - - - - Returns a constraint that tests for NaN - - - - - Returns a constraint that tests for empty - - - - - Returns a constraint that tests whether a collection - contains all unique items. - - - - - Returns a constraint that tests whether an object graph is serializable in binary format. - - - - - Returns a constraint that tests whether an object graph is serializable in xml format. - - - - - Returns a constraint that tests whether a collection is ordered - - - - - Objects implementing this interface are used to wrap - the TestMethodCommand itself. They apply after SetUp - has been run and before TearDown. - - - - - The CommandStage enumeration represents the defined stages - of execution for a series of TestCommands. The int _values - of the enum are used to apply decorators in the proper - order. Lower _values are applied first and are therefore - "closer" to the actual test execution. - - - No CommandStage is defined for actual invocation of the test or - for creation of the context. Execution may be imagined as - proceeding from the bottom of the list upwards, with cleanup - after the test running in the opposite order. - - - - - Use an application-defined default value. - - - - - Make adjustments needed before and after running - the raw test - that is, after any SetUp has run - and before TearDown. - - - - - Run SetUp and TearDown for the test. This stage is used - internally by NUnit and should not normally appear - in user-defined decorators. - - - - - Make adjustments needed before and after running - the entire test - including SetUp and TearDown. - - - - - ThrowsConstraint is used to test the exception thrown by - a delegate by applying a constraint to it. - - - - - Initializes a new instance of the class, - using a constraint to be applied to the exception. - - A constraint to apply to the caught exception. - - - - Executes the code of the delegate and captures any exception. - If a non-null base constraint was provided, it applies that - constraint to the exception. - - A delegate representing the code to be tested - True if an exception is thrown and the constraint succeeds, otherwise false - - - - Converts an ActualValueDelegate to a TestDelegate - before calling the primary overload. - - - - - - - Get the actual exception thrown - used by Assert.Throws. - - - - - Gets text describing a constraint - - - - - Write the actual value for a failing constraint test to a - MessageWriter. This override only handles the special message - used when an exception is expected but none is thrown. - - The writer on which the actual value is displayed - - - - Summary description for SamePathConstraint. - - - - - Initializes a new instance of the class. - - The expected path - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - Operator that requires both it's arguments to succeed - - - - - Construct an AndOperator - - - - - Apply the operator to produce an AndConstraint - - - - - Provides static methods to express the assumptions - that must be met for a test to give a meaningful - result. If an assumption is not met, the test - should produce an inconclusive result. - - - - - The Equals method throws an InvalidOperationException. This is done - to make sure there is no mistake by calling this function. - - The left object. - The right object. - Not applicable - - - - override the default ReferenceEquals to throw an InvalidOperationException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. - - The left object. - The right object. - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - The Type being compared. - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - The Type being compared. - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - The Type being compared. - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - A function to build the message included with the Exception - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - The message to display if the condition is false - Arguments to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the - method throws an . - - The evaluated condition - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - The evaluated condition - A function to build the message included with the Exception - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - A lambda that returns a Boolean - The message to display if the condition is false - Arguments to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - A lambda that returns a Boolean - - - - Asserts that a condition is true. If the condition is false the method throws - an . - - A lambda that returns a Boolean - A function to build the message included with the Exception - - - - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. - - A TestDelegate to be executed - A ThrowsConstraint used in the test - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - The Type being compared. - The actual value to test - A Constraint to be applied - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - The Type being compared. - The actual value to test - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an InconclusiveException on failure. - - The Type being compared. - The actual value to test - A Constraint to be applied - A function to build the message included with the Exception - - - - TODO: Documentation needed for class - - - - - Initializes a new instance of the class. - - The test being skipped. - - - - Overridden to simply set the CurrentResult to the - appropriate Skipped state. - - The execution context for the test - A TestResult - - - - The TextCapture class intercepts console output and writes it - to the current execution context, if one is present on the thread. - If no execution context is found, the output is written to a - default destination, normally the original destination of the - intercepted output. - - - - - Construct a TextCapture object - - The default destination for non-intercepted output - - - - Writes a single character - - The char to write - - - - Writes a string - - The string to write - - - - Writes a string followed by a line terminator - - The string to write - - - - Gets the Encoding in use by this TextWriter - - - - - SimpleWorkItemDispatcher handles execution of WorkItems by - directly executing them. It is provided so that a dispatcher - is always available in the context, thereby simplifying the - code needed to run child tests. - - - - - An IWorkItemDispatcher handles execution of work items. - - - - - Dispatch a single work item for execution. The first - work item dispatched is saved as the top-level - work item and used when stopping the run. - - The item to dispatch - - - - Cancel the ongoing run completely. - If no run is in process, the call has no effect. - - true if the IWorkItemDispatcher should abort all currently running WorkItems, false if it should allow all currently running WorkItems to complete - - - - Dispatch a single work item for execution. The first - work item dispatched is saved as the top-level - work item and a thread is created on which to - run it. Subsequent calls come from the top level - item or its descendants on the proper thread. - - The item to dispatch - - - - Cancel (abort or stop) the ongoing run. - If no run is in process, the call has no effect. - - true if the run should be aborted, false if it should allow its currently running test to complete - - - - Asserts on Directories - - - - - The Equals method throws an InvalidOperationException. This is done - to make sure there is no mistake by calling this function. - - - - - - - override the default ReferenceEquals to throw an InvalidOperationException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. - - - - - - - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both point to the same directory. - If they are not equal an is thrown. - - A directory containing the value that is expected - A directory containing the actual value - The message to display if the directories are not equal - Arguments to be used in formatting the message - - - - Verifies that two directories are equal. Two directories are considered - equal if both are null, or if both point to the same directory. - If they are not equal an is thrown. - - A directory containing the value that is expected - A directory containing the actual value - - - - Asserts that two directories are not equal. If they are equal - an is thrown. - - A directory containing the value that is expected - A directory containing the actual value - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Asserts that two directories are not equal. If they are equal - an is thrown. - - A directory containing the value that is expected - A directory containing the actual value - - - - Asserts that the directory exists. If it does not exist - an is thrown. - - A directory containing the actual value - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Asserts that the directory exists. If it does not exist - an is thrown. - - A directory containing the actual value - - - - Asserts that the directory exists. If it does not exist - an is thrown. - - The path to a directory containing the actual value - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Asserts that the directory exists. If it does not exist - an is thrown. - - The path to a directory containing the actual value - - - - Asserts that the directory does not exist. If it does exist - an is thrown. - - A directory containing the actual value - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Asserts that the directory does not exist. If it does exist - an is thrown. - - A directory containing the actual value - - - - Asserts that the directory does not exist. If it does exist - an is thrown. - - The path to a directory containing the actual value - The message to display if directories are not equal - Arguments to be used in formatting the message - - - - Asserts that the directory does not exist. If it does exist - an is thrown. - - The path to a directory containing the actual value - - - - TestName filter selects tests based on their Name - - - - - Construct a TestNameFilter for a single name - - The name the filter will recognize. - - - - Match a test against a single value. - - - - - Gets the element name - - Element name - - - - The ParameterDataProvider class implements IParameterDataProvider - and hosts one or more individual providers. - - - - - Construct with a collection of individual providers - - - - - Determine whether any data is available for a parameter. - - An IParameterInfo representing one - argument to a parameterized test - True if any data is available, otherwise false. - - - - Return an IEnumerable providing data for use with the - supplied parameter. - - An IParameterInfo representing one - argument to a parameterized test - An IEnumerable providing the required data - - - - ExactCountConstraint applies another constraint to each - item in a collection, succeeding only if a specified - number of items succeed. - - - - - Construct an ExactCountConstraint on top of an existing constraint - - - - - - - Apply the item constraint to each item in the collection, - succeeding only if the expected number of items pass. - - - - - - - Thrown when an assertion failed. - - - - The error message that explains - the reason for the exception - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - - - Serialization Constructor - - - - - Gets the ResultState provided by this exception - - - - - XmlSerializableConstraint tests whether - an object is serializable in xml format. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Returns the string representation of this constraint - - - - - Gets text describing a constraint - - - - Helper routines for working with floating point numbers - - - The floating point comparison code is based on this excellent article: - http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm - - - "ULP" means Unit in the Last Place and in the context of this library refers to - the distance between two adjacent floating point numbers. IEEE floating point - numbers can only represent a finite subset of natural numbers, with greater - accuracy for smaller numbers and lower accuracy for very large numbers. - - - If a comparison is allowed "2 ulps" of deviation, that means the _values are - allowed to deviate by up to 2 adjacent floating point _values, which might be - as low as 0.0000001 for small numbers or as high as 10.0 for large numbers. - - - - - Compares two floating point _values for equality - First floating point value to be compared - Second floating point value t be compared - - Maximum number of representable floating point _values that are allowed to - be between the left and the right floating point _values - - True if both numbers are equal or close to being equal - - - Floating point _values can only represent a finite subset of natural numbers. - For example, the _values 2.00000000 and 2.00000024 can be stored in a float, - but nothing inbetween them. - - - This comparison will count how many possible floating point _values are between - the left and the right number. If the number of possible _values between both - numbers is less than or equal to maxUlps, then the numbers are considered as - being equal. - - - Implementation partially follows the code outlined here: - http://www.anttirt.net/2007/08/19/proper-floating-point-comparisons/ - - - - - Compares two double precision floating point _values for equality - First double precision floating point value to be compared - Second double precision floating point value t be compared - - Maximum number of representable double precision floating point _values that are - allowed to be between the left and the right double precision floating point _values - - True if both numbers are equal or close to being equal - - - Double precision floating point _values can only represent a limited series of - natural numbers. For example, the _values 2.0000000000000000 and 2.0000000000000004 - can be stored in a double, but nothing inbetween them. - - - This comparison will count how many possible double precision floating point - _values are between the left and the right number. If the number of possible - _values between both numbers is less than or equal to maxUlps, then the numbers - are considered as being equal. - - - Implementation partially follows the code outlined here: - http://www.anttirt.net/2007/08/19/proper-floating-point-comparisons/ - - - - - - Reinterprets the memory contents of a floating point value as an integer value - - - Floating point value whose memory contents to reinterpret - - - The memory contents of the floating point value interpreted as an integer - - - - - Reinterprets the memory contents of a double precision floating point - value as an integer value - - - Double precision floating point value whose memory contents to reinterpret - - - The memory contents of the double precision floating point value - interpreted as an integer - - - - - Reinterprets the memory contents of an integer as a floating point value - - Integer value whose memory contents to reinterpret - - The memory contents of the integer value interpreted as a floating point value - - - - - Reinterprets the memory contents of an integer value as a double precision - floating point value - - Integer whose memory contents to reinterpret - - The memory contents of the integer interpreted as a double precision - floating point value - - - - Union of a floating point variable and an integer - - - The union's value as a floating point variable - - - The union's value as an integer - - - The union's value as an unsigned integer - - - Union of a double precision floating point variable and a long - - - The union's value as a double precision floating point variable - - - The union's value as a long - - - The union's value as an unsigned long - - - - EqualityAdapter class handles all equality comparisons - that use an , - or a . - - - - - Compares two objects, returning true if they are equal - - - - - Returns true if the two objects can be compared by this adapter. - The base adapter cannot handle IEnumerables except for strings. - - - - - Returns an that wraps an . - - - - - Returns an that wraps an . - - - - - Returns an EqualityAdapter that uses a predicate function for items comparison. - - - - - - - - - Returns an that wraps an . - - - - - Returns an that wraps an . - - - - - Returns an that wraps a . - - - - - that wraps an . - - - - - Returns true if the two objects can be compared by this adapter. - The base adapter cannot handle IEnumerables except for strings. - - - - - Compares two objects, returning true if they are equal - - - - - Returns true if the two objects can be compared by this adapter. - Generic adapter requires objects of the specified type. - - - - - that wraps an . - - - - - EmptyCollectionConstraint tests whether a collection is empty. - - - - - Check that the collection is empty - - - - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - Helper class with properties and methods that supply - a number of constraints used in Asserts. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding only if a specified number of them succeed. - - - - - Returns a new PropertyConstraintExpression, which will either - test for the existence of the named property on the object - being tested or apply any following constraint to that property. - - - - - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. - - - - - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. - - - - - Returns a constraint that tests two items for equality - - - - - Returns a constraint that tests that two references are the same object - - - - - Returns a constraint that tests whether the - actual value is greater than the supplied argument - - - - - Returns a constraint that tests whether the - actual value is greater than or equal to the supplied argument - - - - - Returns a constraint that tests whether the - actual value is greater than or equal to the supplied argument - - - - - Returns a constraint that tests whether the - actual value is less than the supplied argument - - - - - Returns a constraint that tests whether the - actual value is less than or equal to the supplied argument - - - - - Returns a constraint that tests whether the - actual value is less than or equal to the supplied argument - - - - - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. - - - - - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a collection containing the same elements as the - collection supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a subset of the collection supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a superset of the collection supplied as an argument. - - - - - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. - - - - - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. - - - - - Returns a new ContainsConstraint. This constraint - will, in turn, make use of the appropriate second-level - constraint, depending on the type of the actual argument. - This overload is only used if the item sought is a string, - since any other type implies that we are looking for a - collection member. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that fails if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that fails if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that fails if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. - - - - - Returns a constraint that fails if the actual - value matches the pattern supplied as an argument. - - - - - Returns a constraint that tests whether the path provided - is the same as an expected path after canonicalization. - - - - - Returns a constraint that tests whether the path provided - is a subpath of the expected path after canonicalization. - - - - - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. - - - - - Returns a constraint that tests whether the actual value falls - within a specified range. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if at least one of them succeeds. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. - - - - - Returns a constraint that tests for null - - - - - Returns a constraint that tests for True - - - - - Returns a constraint that tests for False - - - - - Returns a constraint that tests for a positive value - - - - - Returns a constraint that tests for a negative value - - - - - Returns a constraint that tests for equality with zero - - - - - Returns a constraint that tests for NaN - - - - - Returns a constraint that tests for empty - - - - - Returns a constraint that tests whether a collection - contains all unique items. - - - - - Returns a constraint that tests whether an object graph is serializable in binary format. - - - - - Returns a constraint that tests whether an object graph is serializable in xml format. - - - - - Returns a constraint that tests whether a collection is ordered - - - - - BinarySerializableConstraint tests whether - an object is serializable in binary format. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Returns the string representation - - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - Used on a method, marks the test with a timeout value in milliseconds. - The test will be run in a separate thread and is cancelled if the timeout - is exceeded. Used on a class or assembly, sets the default timeout - for all contained test methods. - - - - - Construct a TimeoutAttribute given a time in milliseconds - - The timeout value in milliseconds - - - - Adding this attribute to a method within a - class makes the method callable from the NUnit test runner. There is a property - called Description which is optional which you can provide a more detailed test - description. This class cannot be inherited. - - - - [TestFixture] - public class Fixture - { - [Test] - public void MethodToTest() - {} - - [Test(Description = "more detailed description")] - public void TestDescriptionMethod() - {} - } - - - - - - Modifies a test by adding a description, if not already set. - - The test to modify - - - - Construct a TestMethod from a given method. - - The method for which a test is to be constructed. - The suite to which the test will be added. - A TestMethod - - - - Descriptive text for this test - - - - - The author of this test - - - - - The type that this test is testing - - - - - Gets or sets the expected result. - - The result. - - - - Returns true if an expected result has been set - - - - - Summary description for SetUICultureAttribute. - - - - - Construct given the name of a culture - - - - - - Marks a test that must run in the STA, causing it - to run in a separate thread if necessary. - - - - - Construct a RequiresSTAAttribute - - - - - Used to mark a field, property or method providing a set of datapoints to - be used in executing any theories within the same fixture that require an - argument of the Type provided. The data source may provide an array of - the required Type or an . - Synonymous with DatapointSourceAttribute. - - - - - TestActionItem represents a single execution of an - ITestAction. It is used to track whether the BeforeTest - method has been called and suppress calling the - AfterTest method if it has not. - - - - - Construct a TestActionItem - - The ITestAction to be included - - - - Run the BeforeTest method of the action and remember that it has been run. - - The test to which the action applies - - - - Run the AfterTest action, but only if the BeforeTest - action was actually run. - - The test to which the action applies - - - - InternalTraceLevel is an enumeration controlling the - level of detailed presented in the internal log. - - - - - Use the default settings as specified by the user. - - - - - Do not display any trace messages - - - - - Display Error messages only - - - - - Display Warning level and higher messages - - - - - Display informational and higher messages - - - - - Display debug messages and higher - i.e. all messages - - - - - Display debug messages and higher - i.e. all messages - - - - - The ParallelScope enumeration permits specifying the degree to - which a test and its descendants may be run in parallel. - - - - - No Parallelism is permitted - - - - - The test itself may be run in parallel with others at the same level - - - - - Descendants of the test may be run in parallel with one another - - - - - Descendants of the test down to the level of TestFixtures may be run in parallel - - - - - ListMapper is used to transform a collection used as an actual argument - producing another collection to be used in the assertion. - - - - - Construct a ListMapper based on a collection - - The collection to be transformed - - - - Produces a collection containing all the _values of a property - - The collection of property _values - - - - - The List class is a helper class with properties and methods - that supply a number of constraints used with lists and collections. - - - - - List.Map returns a ListMapper, which can be used to map - the original collection to another collection. - - - - - - - TestAssembly is a TestSuite that represents the execution - of tests in a managed assembly. - - - - - Initializes a new instance of the class - specifying the Assembly and the path from which it was loaded. - - The assembly this test represents. - The path used to load the assembly. - - - - Initializes a new instance of the class - for a path which could not be loaded. - - The path used to load the assembly. - - - - Gets the Assembly represented by this instance. - - - - - Gets the name used for the top-level element in the - XML representation of this test - - - - - SetUpFixture extends TestSuite and supports - Setup and TearDown methods. - - - - - Initializes a new instance of the class. - - The type. - - - - TrueConstraint tests that the actual value is true - - - - - Initializes a new instance of the class. - - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - The Tolerance class generalizes the notion of a tolerance - within which an equality test succeeds. Normally, it is - used with numeric types, but it can be used with any - type that supports taking a difference between two - objects and comparing that difference to a value. - - - - - Constructs a linear tolerance of a specified amount - - - - - Constructs a tolerance given an amount and - - - - - Tests that the current Tolerance is linear with a - numeric value, throwing an exception if it is not. - - - - - Returns a default Tolerance object, equivalent to - specifying an exact match unless - is set, in which case, the - will be used. - - - - - Returns an empty Tolerance object, equivalent to - specifying an exact match even if - is set. - - - - - Gets the for the current Tolerance - - - - - Gets the value of the current Tolerance instance. - - - - - Returns a new tolerance, using the current amount as a percentage. - - - - - Returns a new tolerance, using the current amount in Ulps - - - - - Returns a new tolerance with a as the amount, using - the current amount as a number of days. - - - - - Returns a new tolerance with a as the amount, using - the current amount as a number of hours. - - - - - Returns a new tolerance with a as the amount, using - the current amount as a number of minutes. - - - - - Returns a new tolerance with a as the amount, using - the current amount as a number of seconds. - - - - - Returns a new tolerance with a as the amount, using - the current amount as a number of milliseconds. - - - - - Returns a new tolerance with a as the amount, using - the current amount as a number of clock ticks. - - - - - Returns true if the current tolerance has not been set or is using the . - - - - - StartsWithConstraint can test whether a string starts - with an expected substring. - - - - - Initializes a new instance of the class. - - The expected string - - - - Test whether the constraint is matched by the actual value. - This is a template method, which calls the IsMatch method - of the derived class. - - - - - - - Operator that tests that an exception is thrown and - optionally applies further tests to the exception. - - - - - Construct a ThrowsOperator - - - - - Reduce produces a constraint from the operator and - any arguments. It takes the arguments from the constraint - stack and pushes the resulting constraint on it. - - - - - ConstraintExpression represents a compound constraint in the - process of being constructed from a series of syntactic elements. - - Individual elements are appended to the expression as they are - reorganized. When a constraint is appended, it is returned as the - value of the operation so that modifiers may be applied. However, - any partially built expression is attached to the constraint for - later resolution. When an operator is appended, the partial - expression is returned. If it's a self-resolving operator, then - a ResolvableConstraintExpression is returned. - - - - - The ConstraintBuilder holding the elements recognized so far - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the - class passing in a ConstraintBuilder, which may be pre-populated. - - The builder. - - - - Returns a string representation of the expression as it - currently stands. This should only be used for testing, - since it has the side-effect of resolving the expression. - - - - - - Appends an operator to the expression and returns the - resulting expression itself. - - - - - Appends a self-resolving operator to the expression and - returns a new ResolvableConstraintExpression. - - - - - Appends a constraint to the expression and returns that - constraint, which is associated with the current state - of the expression being built. Note that the constraint - is not reduced at this time. For example, if there - is a NotOperator on the stack we don't reduce and - return a NotConstraint. The original constraint must - be returned because it may support modifiers that - are yet to be applied. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding only if a specified number of them succeed. - - - - - Returns a new PropertyConstraintExpression, which will either - test for the existence of the named property on the object - being tested or apply any following constraint to that property. - - - - - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. - - - - - Returns a new AttributeConstraint checking for the - presence of a particular attribute on an object. - - - - - Returns the constraint provided as an argument - used to allow custom - custom constraints to easily participate in the syntax. - - - - - Returns the constraint provided as an argument - used to allow custom - custom constraints to easily participate in the syntax. - - - - - Returns a constraint that tests two items for equality - - - - - Returns a constraint that tests that two references are the same object - - - - - Returns a constraint that tests whether the - actual value is greater than the supplied argument - - - - - Returns a constraint that tests whether the - actual value is greater than or equal to the supplied argument - - - - - Returns a constraint that tests whether the - actual value is greater than or equal to the supplied argument - - - - - Returns a constraint that tests whether the - actual value is less than the supplied argument - - - - - Returns a constraint that tests whether the - actual value is less than or equal to the supplied argument - - - - - Returns a constraint that tests whether the - actual value is less than or equal to the supplied argument - - - - - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. - - - - - Returns a constraint that tests whether the actual - value is of the exact type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is of the type supplied as an argument or a derived type. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is assignable from the type supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a collection containing the same elements as the - collection supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a subset of the collection supplied as an argument. - - - - - Returns a constraint that tests whether the actual value - is a superset of the collection supplied as an argument. - - - - - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. - - - - - Returns a new CollectionContainsConstraint checking for the - presence of a particular object in the collection. - - - - - Returns a new ContainsConstraint. This constraint - will, in turn, make use of the appropriate second-level - constraint, depending on the type of the actual argument. - This overload is only used if the item sought is a string, - since any other type implies that we are looking for a - collection member. - - - - - Returns a new ContainsConstraint. This constraint - will, in turn, make use of the appropriate second-level - constraint, depending on the type of the actual argument. - This overload is only used if the item sought is a string, - since any other type implies that we are looking for a - collection member. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value contains the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value starts with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value ends with the substring supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. - - - - - Returns a constraint that succeeds if the actual - value matches the regular expression supplied as an argument. - - - - - Returns a constraint that tests whether the path provided - is the same as an expected path after canonicalization. - - - - - Returns a constraint that tests whether the path provided - is the a subpath of the expected path after canonicalization. - - - - - Returns a constraint that tests whether the path provided - is the same path or under an expected path after canonicalization. - - - - - Returns a constraint that tests whether the actual value falls - within a specified range. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a ConstraintExpression that negates any - following constraint. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them succeed. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if at least one of them succeeds. - - - - - Returns a ConstraintExpression, which will apply - the following constraint to all members of a collection, - succeeding if all of them fail. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Length property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Count property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the Message property of the object being tested. - - - - - Returns a new ConstraintExpression, which will apply the following - constraint to the InnerException property of the object being tested. - - - - - With is currently a NOP - reserved for future use. - - - - - Returns a constraint that tests for null - - - - - Returns a constraint that tests for True - - - - - Returns a constraint that tests for False - - - - - Returns a constraint that tests for a positive value - - - - - Returns a constraint that tests for a negative value - - - - - Returns a constraint that tests if item is equal to zero - - - - - Returns a constraint that tests for NaN - - - - - Returns a constraint that tests for empty - - - - - Returns a constraint that tests whether a collection - contains all unique items. - - - - - Returns a constraint that tests whether an object graph is serializable in binary format. - - - - - Returns a constraint that tests whether an object graph is serializable in xml format. - - - - - Returns a constraint that tests whether a collection is ordered - - - - - Returns a constraint that succeeds if the value - is a file or directory and it exists. - - - - - Attribute used to apply a category to a test - - - - - The name of the category - - - - - Construct attribute for a given category based on - a name. The name may not contain the characters ',', - '+', '-' or '!'. However, this is not checked in the - constructor since it would cause an error to arise at - as the test was loaded without giving a clear indication - of where the problem is located. The error is handled - in NUnitFramework.cs by marking the test as not - runnable. - - The name of the category - - - - Protected constructor uses the Type name as the name - of the category. - - - - - Modifies a test by adding a category to it. - - The test to modify - - - - The name of the category - - - - - IdFilter selects tests based on their id - - - - - Construct an IdFilter for a single value - - The id the filter will recognize. - - - - Match a test against a single value. - - - - - Gets the element name - - Element name - - - - Represents a constraint that succeeds if none of the - members of a collection match a base constraint. - - - - - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - none of them succeed. - - - - - Indicates which class the test or test fixture is testing - - - - - Initializes a new instance of the class. - - The type that is being tested. - - - - Initializes a new instance of the class. - - The type that is being tested. - - - - Defines the order that the test will run in - - - - - Defines the order that the test will run in - - - - - Defines the order that the test will run in - - - - - - Modifies a test as defined for the specific attribute. - - The test to modify - - - - SingleThreadedAttribute applies to a test fixture and indicates - that all the child tests must be run on the same thread as the - OneTimeSetUp and OneTimeTearDown. It sets a flag in the - TestExecutionContext and forces all tests to be run sequentially - on the current thread. Any ParallelScope setting is ignored. - - - - - Apply changes to the TestExecutionContext - - The TestExecutionContext - - - - FrameworkPackageSettings is a static class containing constant values that - are used as keys in setting up a TestPackage. These values are used in - the framework, and set in the runner. Setting values may be a string, int or bool. - - - - - Flag (bool) indicating whether tests are being debugged. - - - - - Flag (bool) indicating whether to pause execution of tests to allow - the user to attache a debugger. - - - - - The InternalTraceLevel for this run. Values are: "Default", - "Off", "Error", "Warning", "Info", "Debug", "Verbose". - Default is "Off". "Debug" and "Verbose" are synonyms. - - - - - Full path of the directory to be used for work and result files. - This path is provided to tests by the frameowrk TestContext. - - - - - Integer value in milliseconds for the default timeout value - for test cases. If not specified, there is no timeout except - as specified by attributes on the tests themselves. - - - - - A TextWriter to which the internal trace will be sent. - - - - - A list of tests to be loaded. - - - - - The number of test threads to run for the assembly. If set to - 1, a single queue is used. If set to 0, tests are executed - directly, without queuing. - - - - - The random seed to be used for this assembly. If specified - as the value reported from a prior run, the framework should - generate identical random values for tests as were used for - that run, provided that no change has been made to the test - assembly. Default is a random value itself. - - - - - If true, execution stops after the first error or failure. - - - - - If true, use of the event queue is suppressed and test events are synchronous. - - - - - The default naming pattern used in generating test names - - - - - Parameters to be passed on to the test - - - - - Represents a constraint that succeeds if the specified - count of members of a collection match a base constraint. - - - - - Construct an ExactCountOperator for a specified count - - The expected count - - - - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - none of them succeed. - - - - - ParameterizedFixtureSuite serves as a container for the set of test - fixtures created from a given Type using various parameters. - - - - - Initializes a new instance of the class. - - The ITypeInfo for the type that represents the suite. - - - - Gets a string representing the type of test - - - - - - ReusableConstraint wraps a constraint expression after - resolving it so that it can be reused consistently. - - - - - Construct a ReusableConstraint from a constraint expression - - The expression to be resolved and reused - - - - Converts a constraint to a ReusableConstraint - - The constraint to be converted - A ReusableConstraint - - - - Returns a that represents this instance. - - - A that represents this instance. - - - - - Return the top-level constraint for this expression - - - - - - PropertyExistsConstraint tests that a named property - exists on the object provided through Match. - - Originally, PropertyConstraint provided this feature - in addition to making optional tests on the value - of the property. The two constraints are now separate. - - - - - Initializes a new instance of the class. - - The name of the property. - - - - Test whether the property exists for a given object - - The object to be tested - True for success, false for failure - - - - Returns the string representation of the constraint. - - - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - PropertyConstraint extracts a named property and uses - its value as the actual value for a chained constraint. - - - - - Initializes a new instance of the class. - - The name. - The constraint to apply to the property. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Returns the string representation of the constraint. - - - - - - Represents a constraint that simply wraps the - constraint provided as an argument, without any - further functionality, but which modifies the - order of evaluation because of its precedence. - - - - - Constructor for the WithOperator - - - - - Returns a constraint that wraps its argument - - - - - NUnitComparer encapsulates NUnit's default behavior - in comparing two objects. - - - - - Compares two objects - - - - - - - - Returns the default NUnitComparer. - - - - - Tests whether a value is less than or equal to the value supplied to its constructor - - - - - Initializes a new instance of the class. - - The expected value. - - - - Attribute used to identify a method that is - called before any tests in a fixture are run. - - - - - Used to mark a field for use as a datapoint when executing a theory - within the same fixture that requires an argument of the field's Type. - - - - - AssertionHelper is an optional base class for user tests, - allowing the use of shorter ids for constraints and - asserts and avoiding conflict with the definition of - , from which it inherits much of its - behavior, in certain mock object frameworks. - - - - - Asserts that a condition is true. If the condition is false the method throws - an . Works Identically to - . - - The evaluated condition - The message to display if the condition is false - Arguments to be used in formatting the message - - - - Asserts that a condition is true. If the condition is false the method throws - an . Works Identically to . - - The evaluated condition - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint expression to be applied - An ActualValueDelegate returning the value to be tested - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - An ActualValueDelegate returning the value to be tested - A Constraint expression to be applied - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that the code represented by a delegate throws an exception - that satisfies the constraint provided. - - A TestDelegate to be executed - A ThrowsConstraint used in the test - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint to be applied - The actual value to test - - - - Apply a constraint to an actual value, succeeding if the constraint - is satisfied and throwing an assertion exception on failure. - - A Constraint expression to be applied - The actual value to test - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Returns a ListMapper based on a collection. - - The original collection - - - - - TextMessageWriter writes constraint descriptions and messages - in displayable form as a text stream. It tailors the display - of individual message components to form the standard message - format of NUnit assertion failure messages. - - - - - Prefix used for the expected value line of a message - - - - - Prefix used for the actual value line of a message - - - - - Length of a message prefix - - - - - Construct a TextMessageWriter - - - - - Construct a TextMessageWriter, specifying a user message - and optional formatting arguments. - - - - - - - Method to write single line message with optional args, usually - written to precede the general failure message, at a given - indentation level. - - The indentation level of the message - The message to be written - Any arguments used in formatting the message - - - - Display Expected and Actual lines for a constraint. This - is called by MessageWriter's default implementation of - WriteMessageTo and provides the generic two-line display. - - The result of the constraint that failed - - - - Display Expected and Actual lines for given _values. This - method may be called by constraints that need more control over - the display of actual and expected _values than is provided - by the default implementation. - - The expected value - The actual value causing the failure - - - - Display Expected and Actual lines for given _values, including - a tolerance value on the expected line. - - The expected value - The actual value causing the failure - The tolerance within which the test was made - - - - Display the expected and actual string _values on separate lines. - If the mismatch parameter is >=0, an additional line is displayed - line containing a caret that points to the mismatch point. - - The expected string value - The actual string value - The point at which the strings don't match or -1 - If true, case is ignored in string comparisons - If true, clip the strings to fit the max line length - - - - Writes the text for an actual value. - - The actual value. - - - - Writes the text for a generalized value. - - The value. - - - - Writes the text for a collection value, - starting at a particular point, to a max length - - The collection containing elements to write. - The starting point of the elements to write - The maximum number of elements to write - - - - Write the generic 'Expected' line for a constraint - - The constraint that failed - - - - Write the generic 'Expected' line for a given value - - The expected value - - - - Write the generic 'Expected' line for a given value - and tolerance. - - The expected value - The tolerance within which the test was made - - - - Write the generic 'Actual' line for a constraint - - The ConstraintResult for which the actual value is to be written - - - - Write the generic 'Actual' line for a given value - - The actual value causing a failure - - - - Gets or sets the maximum line length for this writer - - - - - EventListenerTextWriter sends text output to the currently active - ITestEventListener in the form of a TestOutput object. If no event - listener is active in the contet, or if there is no context, - the output is forwarded to the supplied default writer. - - - - - Construct an EventListenerTextWriter - - The name of the stream to use for events - The default writer to use if no listener is available - - - - Write a single char - - - - - Write a string - - - - - Write a string followed by a newline - - - - - Get the Encoding for this TextWriter - - - - - CollectionSupersetConstraint is used to determine whether - one collection is a superset of another - - - - - Construct a CollectionSupersetConstraint - - The collection that the actual value is expected to be a superset of - - - - Test whether the actual collection is a superset of - the expected collection provided. - - - - - - - Flag the constraint to use the supplied predicate function - - The comparison function to use. - Self. - - - - The display name of this Constraint for use by ToString(). - The default value is the name of the constraint with - trailing "Constraint" removed. Derived classes may set - this to another name in their constructors. - - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - ParameterizedMethodSuite holds a collection of individual - TestMethods with their arguments applied. - - - - - Construct from a MethodInfo - - - - - - Gets a string representing the type of test - - - - - - OSPlatform represents a particular operating system platform - - - - - Platform ID for Unix as defined by Microsoft .NET 2.0 and greater - - - - - Platform ID for Unix as defined by Mono - - - - - Platform ID for XBox as defined by .NET and Mono, but not CF - - - - - Platform ID for MacOSX as defined by .NET and Mono, but not CF - - - - - Gets the actual OS Version, not the incorrect value that might be - returned for Win 8.1 and Win 10 - - - If an application is not manifested as Windows 8.1 or Windows 10, - the version returned from Environment.OSVersion will not be 6.3 and 10.0 - respectively, but will be 6.2 and 6.3. The correct value can be found in - the registry. - - The original version - The correct OS version - - - - Construct from a platform ID and version - - - - - Construct from a platform ID, version and product type - - - - - Get the OSPlatform under which we are currently running - - - - - Get the platform ID of this instance - - - - - Get the Version of this instance - - - - - Get the Product Type of this instance - - - - - Return true if this is a windows platform - - - - - Return true if this is a Unix or Linux platform - - - - - Return true if the platform is Win32S - - - - - Return true if the platform is Win32Windows - - - - - Return true if the platform is Win32NT - - - - - Return true if the platform is Windows CE - - - - - Return true if the platform is Xbox - - - - - Return true if the platform is MacOSX - - - - - Return true if the platform is Windows 95 - - - - - Return true if the platform is Windows 98 - - - - - Return true if the platform is Windows ME - - - - - Return true if the platform is NT 3 - - - - - Return true if the platform is NT 4 - - - - - Return true if the platform is NT 5 - - - - - Return true if the platform is Windows 2000 - - - - - Return true if the platform is Windows XP - - - - - Return true if the platform is Windows 2003 Server - - - - - Return true if the platform is NT 6 - - - - - Return true if the platform is NT 6.0 - - - - - Return true if the platform is NT 6.1 - - - - - Return true if the platform is NT 6.2 - - - - - Return true if the platform is NT 6.3 - - - - - Return true if the platform is Vista - - - - - Return true if the platform is Windows 2008 Server (original or R2) - - - - - Return true if the platform is Windows 2008 Server (original) - - - - - Return true if the platform is Windows 2008 Server R2 - - - - - Return true if the platform is Windows 2012 Server (original or R2) - - - - - Return true if the platform is Windows 2012 Server (original) - - - - - Return true if the platform is Windows 2012 Server R2 - - - - - Return true if the platform is Windows 7 - - - - - Return true if the platform is Windows 8 - - - - - Return true if the platform is Windows 8.1 - - - - - Return true if the platform is Windows 10 - - - - - Return true if the platform is Windows Server. This is named Windows - Server 10 to distinguish it from previous versions of Windows Server. - - - - - Product Type Enumeration used for Windows - - - - - Product type is unknown or unspecified - - - - - Product type is Workstation - - - - - Product type is Domain Controller - - - - - Product type is Server - - - - - Combines multiple filters so that a test must pass one - of them in order to pass this filter. - - - - - Constructs an empty OrFilter - - - - - Constructs an AndFilter from an array of filters - - - - - - Checks whether the OrFilter is matched by a test - - The test to be matched - True if any of the component filters pass, otherwise false - - - - Checks whether the OrFilter is matched by a test - - The test to be matched - True if any of the component filters match, otherwise false - - - - Checks whether the OrFilter is explicit matched by a test - - The test to be matched - True if any of the component filters explicit match, otherwise false - - - - Gets the element name - - Element name - - - - InstanceOfTypeConstraint is used to test that an object - is of the same type provided or derived from it. - - - - - Construct an InstanceOfTypeConstraint for the type provided - - The expected Type - - - - Apply the constraint to an actual value, returning true if it succeeds - - The actual argument - True if the constraint succeeds, otherwise false. - - - - The display name of this Constraint for use by ToString(). - The default value is the name of the constraint with - trailing "Constraint" removed. Derived classes may set - this to another name in their constructors. - - - - - Tests whether a value is greater than the value supplied to its constructor - - - - - Initializes a new instance of the class. - - The expected value. - - - - DictionaryContainsKeyConstraint is used to test whether a dictionary - contains an expected object as a key. - - - - - Construct a DictionaryContainsKeyConstraint - - - - - - Test whether the expected key is contained in the dictionary - - - - - The display name of this Constraint for use by ToString(). - The default value is the name of the constraint with - trailing "Constraint" removed. Derived classes may set - this to another name in their constructors. - - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - ContainsConstraint tests a whether a string contains a substring - or a collection contains an object. It postpones the decision of - which test to use until the type of the actual argument is known. - This allows testing whether a string is contained in a collection - or as a substring of another string using the same syntax. - - - - - Initializes a new instance of the class. - - The _expected. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - Flag the constraint to ignore case and return self. - - - - - CollectionTally counts (tallies) the number of - occurrences of each object in one or more enumerations. - - - - - Construct a CollectionTally object from a comparer and a collection - - - - - Try to remove an object from the tally - - The object to remove - True if successful, false if the object was not found - - - - Try to remove a set of objects from the tally - - The objects to remove - True if successful, false if any object was not found - - - - The number of objects remaining in the tally - - - - - AllItemsConstraint applies another constraint to each - item in a collection, succeeding if they all succeed. - - - - - Construct an AllItemsConstraint on top of an existing constraint - - - - - - Apply the item constraint to each item in the collection, - failing if any item fails. - - - - - - - The display name of this Constraint for use by ToString(). - The default value is the name of the constraint with - trailing "Constraint" removed. Derived classes may set - this to another name in their constructors. - - - - - A set of Assert methods operating on one or more collections - - - - - The Equals method throws an InvalidOperationException. This is done - to make sure there is no mistake by calling this function. - - - - - - - override the default ReferenceEquals to throw an InvalidOperationException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. - - - - - - - Asserts that all items contained in collection are of the type specified by expectedType. - - IEnumerable containing objects to be considered - System.Type that all objects in collection must be instances of - - - - Asserts that all items contained in collection are of the type specified by expectedType. - - IEnumerable containing objects to be considered - System.Type that all objects in collection must be instances of - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that all items contained in collection are not equal to null. - - IEnumerable containing objects to be considered - - - - Asserts that all items contained in collection are not equal to null. - - IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Ensures that every object contained in collection exists within the collection - once and only once. - - IEnumerable of objects to be considered - - - - Ensures that every object contained in collection exists within the collection - once and only once. - - IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - - - - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - If comparer is not null then it will be used to compare the objects. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - - - - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that expected and actual are exactly equal. The collections must have the same count, - and contain the exact same objects in the same order. - If comparer is not null then it will be used to compare the objects. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - - - - Asserts that expected and actual are equivalent, containing the same objects but the match may be in any order. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that expected and actual are not exactly equal. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - - - - Asserts that expected and actual are not exactly equal. - If comparer is not null then it will be used to compare the objects. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - - - - Asserts that expected and actual are not exactly equal. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that expected and actual are not exactly equal. - If comparer is not null then it will be used to compare the objects. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The IComparer to use in comparing objects from each IEnumerable - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that expected and actual are not equivalent. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - - - - Asserts that expected and actual are not equivalent. - - The first IEnumerable of objects to be considered - The second IEnumerable of objects to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that collection contains actual as an item. - - IEnumerable of objects to be considered - Object to be found within collection - - - - Asserts that collection contains actual as an item. - - IEnumerable of objects to be considered - Object to be found within collection - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that collection does not contain actual as an item. - - IEnumerable of objects to be considered - Object that cannot exist within collection - - - - Asserts that collection does not contain actual as an item. - - IEnumerable of objects to be considered - Object that cannot exist within collection - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that the superset does not contain the subset - - The IEnumerable subset to be considered - The IEnumerable superset to be considered - - - - Asserts that the superset does not contain the subset - - The IEnumerable subset to be considered - The IEnumerable superset to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that the superset contains the subset. - - The IEnumerable subset to be considered - The IEnumerable superset to be considered - - - - Asserts that the superset contains the subset. - - The IEnumerable subset to be considered - The IEnumerable superset to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that the subset does not contain the superset - - The IEnumerable superset to be considered - The IEnumerable subset to be considered - - - - Asserts that the subset does not contain the superset - - The IEnumerable superset to be considered - The IEnumerable subset to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Asserts that the subset contains the superset. - - The IEnumerable superset to be considered - The IEnumerable subset to be considered - - - - Asserts that the subset contains the superset. - - The IEnumerable superset to be considered - The IEnumerable subset to be considered - The message that will be displayed on failure - Arguments to be used in formatting the message - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - Arguments to be used in formatting the message - - - - Assert that an array,list or other collection is empty - - An array, list or other collection implementing IEnumerable - - - - Assert that an array, list or other collection is empty - - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - Arguments to be used in formatting the message - - - - Assert that an array,list or other collection is empty - - An array, list or other collection implementing IEnumerable - - - - Assert that an array, list or other collection is ordered - - An array, list or other collection implementing IEnumerable - The message to be displayed on failure - Arguments to be used in formatting the message - - - - Assert that an array, list or other collection is ordered - - An array, list or other collection implementing IEnumerable - - - - Assert that an array, list or other collection is ordered - - An array, list or other collection implementing IEnumerable - A custom comparer to perform the comparisons - The message to be displayed on failure - Arguments to be used in formatting the message - - - - Assert that an array, list or other collection is ordered - - An array, list or other collection implementing IEnumerable - A custom comparer to perform the comparisons - - - - TestCaseSourceAttribute indicates the source to be used to - provide test cases for a test method. - - - - - Construct with the name of the method, property or field that will provide data - - The name of a static method, property or field that will provide data. - - - - Construct with a Type and name - - The Type that will provide data - The name of a static method, property or field that will provide data. - A set of parameters passed to the method, works only if the Source Name is a method. - If the source name is a field or property has no effect. - - - - Construct with a Type and name - - The Type that will provide data - The name of a static method, property or field that will provide data. - - - - Construct with a Type - - The type that will provide data - - - - Construct one or more TestMethods from a given MethodInfo, - using available parameter data. - - The IMethod for which tests are to be constructed. - The suite to which the tests will be added. - One or more TestMethods - - - - Returns a set of ITestCaseDataItems for use as arguments - to a parameterized test method. - - The method for which data is needed. - - - - - A set of parameters passed to the method, works only if the Source Name is a method. - If the source name is a field or property has no effect. - - - - - The name of a the method, property or fiend to be used as a source - - - - - A Type to be used as a source - - - - - Gets or sets the category associated with every fixture created from - this attribute. May be a single category or a comma-separated list. - - - - - TestMethodCommand is the lowest level concrete command - used to run actual test cases. - - - - - Initializes a new instance of the class. - - The test. - - - - Runs the test, saving a TestResult in the execution context, as - well as returning it. If the test has an expected result, it - is asserts on that value. Since failed tests and errors throw - an exception, this command must be wrapped in an outer command, - will handle that exception and records the failure. This role - is usually played by the SetUpTearDown command. - - The execution context - - - - SetUpTearDownCommand runs any SetUp methods for a suite, - runs the test and then runs any TearDown methods. - - - - - Initializes a new instance of the class. - - The inner command. - - - - Runs the test, saving a TestResult in the supplied TestExecutionContext. - - The context in which the test should run. - A TestResult - - - - SetUpTearDownItem holds the setup and teardown methods - for a single level of the inheritance hierarchy. - - - - - Construct a SetUpTearDownNode - - A list of setup methods for this level - A list teardown methods for this level - - - - Run SetUp on this level. - - The execution context to use for running. - - - - Run TearDown for this level. - - - - - - Returns true if this level has any methods at all. - This flag is used to discard levels that do nothing. - - - - - Class used to guard against unexpected argument values - or operations by throwing an appropriate exception. - - - - - Throws an exception if an argument is null - - The value to be tested - The name of the argument - - - - Throws an exception if a string argument is null or empty - - The value to be tested - The name of the argument - - - - Throws an ArgumentOutOfRangeException if the specified condition is not met. - - The condition that must be met - The exception message to be used - The name of the argument - - - - Throws an ArgumentException if the specified condition is not met. - - The condition that must be met - The exception message to be used - The name of the argument - - - - Throws an InvalidOperationException if the specified condition is not met. - - The condition that must be met - The exception message to be used - - - - SubPathConstraint tests that the actual path is under the expected path - - - - - Initializes a new instance of the class. - - The expected path - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - ParallelizableAttribute is used to mark tests that may be run in parallel. - - - - - Construct a ParallelizableAttribute using default ParallelScope.Self. - - - - - Construct a ParallelizableAttribute with a specified scope. - - The ParallelScope associated with this attribute. - - - - Modify the context to be used for child tests - - The current TestExecutionContext - - - - Helper class with properties and methods that supply - constraints that operate on exceptions. - - - - - Creates a constraint specifying the exact type of exception expected - - - - - Creates a constraint specifying the exact type of exception expected - - - - - Creates a constraint specifying the type of exception expected - - - - - Creates a constraint specifying the type of exception expected - - - - - Creates a constraint specifying an expected exception - - - - - Creates a constraint specifying an exception with a given InnerException - - - - - Creates a constraint specifying an expected TargetInvocationException - - - - - Creates a constraint specifying an expected ArgumentException - - - - - Creates a constraint specifying an expected ArgumentNUllException - - - - - Creates a constraint specifying an expected InvalidOperationException - - - - - Creates a constraint specifying that no exception is thrown - - - - - Enumeration identifying a common language - runtime implementation. - - - - Any supported runtime framework - - - Microsoft .NET Framework - - - Microsoft .NET Compact Framework - - - Microsoft Shared Source CLI - - - Mono - - - Silverlight - - - MonoTouch - - - - RuntimeFramework represents a particular version - of a common language runtime implementation. - - - - - DefaultVersion is an empty Version, used to indicate that - NUnit should select the CLR version to use for the test. - - - - - Construct from a runtime type and version. If the version has - two parts, it is taken as a framework version. If it has three - or more, it is taken as a CLR version. In either case, the other - version is deduced based on the runtime type and provided version. - - The runtime type of the framework - The version of the framework - - - - Parses a string representing a RuntimeFramework. - The string may be just a RuntimeType name or just - a Version or a hyphenated RuntimeType-Version or - a Version prefixed by 'versionString'. - - - - - - - Overridden to return the short name of the framework - - - - - - Returns true if the current framework matches the - one supplied as an argument. Two frameworks match - if their runtime types are the same or either one - is RuntimeType.Any and all specified version components - are equal. Negative (i.e. unspecified) version - components are ignored. - - The RuntimeFramework to be matched. - True on match, otherwise false - - - - Static method to return a RuntimeFramework object - for the framework that is currently in use. - - - - - The type of this runtime framework - - - - - The framework version for this runtime framework - - - - - The CLR version for this runtime framework - - - - - Return true if any CLR version may be used in - matching this RuntimeFramework object. - - - - - Returns the Display name for this framework - - - - - CategoryFilter is able to select or exclude tests - based on their categories. - - - - - - Construct a CategoryFilter using a single category name - - A category name - - - - Check whether the filter matches a test - - The test to be matched - - - - - Gets the element name - - Element name - - - - GlobalSettings is a place for setting default values used - by the framework in performing asserts. Anything set through - this class applies to the entire test run. It should not normally - be used from within a test, since it is not thread-safe. - - - - - Default tolerance for floating point equality - - - - - Asserts on Files - - - - - The Equals method throws an InvalidOperationException. This is done - to make sure there is no mistake by calling this function. - - - - - - - override the default ReferenceEquals to throw an InvalidOperationException. This - implementation makes sure there is no mistake in calling this function - as part of Assert. - - - - - - - Verifies that two Streams are equal. Two Streams are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - The expected Stream - The actual Stream - The message to display if Streams are not equal - Arguments to be used in formatting the message - - - - Verifies that two Streams are equal. Two Streams are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - The expected Stream - The actual Stream - - - - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A file containing the value that is expected - A file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - - - - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - A file containing the value that is expected - A file containing the actual value - - - - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - The path to a file containing the value that is expected - The path to a file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - - - - Verifies that two files are equal. Two files are considered - equal if both are null, or if both have the same value byte for byte. - If they are not equal an is thrown. - - The path to a file containing the value that is expected - The path to a file containing the actual value - - - - Asserts that two Streams are not equal. If they are equal - an is thrown. - - The expected Stream - The actual Stream - The message to be displayed when the two Stream are the same. - Arguments to be used in formatting the message - - - - Asserts that two Streams are not equal. If they are equal - an is thrown. - - The expected Stream - The actual Stream - - - - Asserts that two files are not equal. If they are equal - an is thrown. - - A file containing the value that is expected - A file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - - - - Asserts that two files are not equal. If they are equal - an is thrown. - - A file containing the value that is expected - A file containing the actual value - - - - Asserts that two files are not equal. If they are equal - an is thrown. - - The path to a file containing the value that is expected - The path to a file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - - - - Asserts that two files are not equal. If they are equal - an is thrown. - - The path to a file containing the value that is expected - The path to a file containing the actual value - - - - Asserts that the file exists. If it does not exist - an is thrown. - - A file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - - - - Asserts that the file exists. If it does not exist - an is thrown. - - A file containing the actual value - - - - Asserts that the file exists. If it does not exist - an is thrown. - - The path to a file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - - - - Asserts that the file exists. If it does not exist - an is thrown. - - The path to a file containing the actual value - - - - Asserts that the file does not exist. If it does exist - an is thrown. - - A file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - - - - Asserts that the file does not exist. If it does exist - an is thrown. - - A file containing the actual value - - - - Asserts that the file does not exist. If it does exist - an is thrown. - - The path to a file containing the actual value - The message to display if Streams are not equal - Arguments to be used in formatting the message - - - - Asserts that the file does not exist. If it does exist - an is thrown. - - The path to a file containing the actual value - - - - Thrown when an assertion failed. - - - - - - - The error message that explains - the reason for the exception - The exception that caused the - current exception - - - - Serialization Constructor - - - - - Gets the ResultState provided by this exception - - - - - SomeItemsConstraint applies another constraint to each - item in a collection, succeeding if any of them succeeds. - - - - - Construct a SomeItemsConstraint on top of an existing constraint - - - - - - Apply the item constraint to each item in the collection, - succeeding if any item succeeds. - - - - - - - The display name of this Constraint for use by ToString(). - The default value is the name of the constraint with - trailing "Constraint" removed. Derived classes may set - this to another name in their constructors. - - - - - SameAsConstraint tests whether an object is identical to - the object passed to its constructor - - - - - Initializes a new instance of the class. - - The expected object. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - The Description of what this constraint tests, for - use in messages and in the ConstraintResult. - - - - - RegexConstraint can test whether a string matches - the pattern provided. - - - - - Initializes a new instance of the class. - - The pattern. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - ConstraintStatus represents the status of a ConstraintResult - returned by a Constraint being applied to an actual value. - - - - - The status has not yet been set - - - - - The constraint succeeded - - - - - The constraint failed - - - - - An error occured in applying the constraint (reserved for future use) - - - - - Attribute used to identify a method that is called - immediately after each test is run. The method is - guaranteed to be called, even if an exception is thrown. - - - - - Marks a test to use a combinatorial join of any argument - data provided. Since this is the default, the attribute is - optional. - - - - - Default constructor - - - - - The PropertyNames class provides static constants for the - standard property ids that NUnit uses on tests. - - - - - The FriendlyName of the AppDomain in which the assembly is running - - - - - The selected strategy for joining parameter data into test cases - - - - - The process ID of the executing assembly - - - - - The stack trace from any data provider that threw - an exception. - - - - - The reason a test was not run - - - - - The author of the tests - - - - - The ApartmentState required for running the test - - - - - The categories applying to a test - - - - - The Description of a test - - - - - The number of threads to be used in running tests - - - - - The maximum time in ms, above which the test is considered to have failed - - - - - The ParallelScope associated with a test - - - - - The number of times the test should be repeated - - - - - Indicates that the test should be run on a separate thread - - - - - The culture to be set for a test - - - - - The UI culture to be set for a test - - - - - The type that is under test - - - - - The timeout value for the test - - - - - The test will be ignored until the given date - - - - - The optional Order the test will run in - - - - - The MethodWrapper class wraps a MethodInfo so that it may - be used in a platform-independent manner. - - - - - Construct a MethodWrapper for a Type and a MethodInfo. - - - - - Construct a MethodInfo for a given Type and method name. - - - - - Gets the parameters of the method. - - - - - - Returns the Type arguments of a generic method or the Type parameters of a generic method definition. - - - - - Replaces the type parameters of the method with the array of types provided and returns a new IMethodInfo. - - The type arguments to be used - A new IMethodInfo with the type arguments replaced - - - - Returns an array of custom attributes of the specified type applied to this method - - - - - Gets a value indicating whether one or more attributes of the spcified type are defined on the method. - - - - - Invokes the method, converting any TargetInvocationException to an NUnitException. - - The object on which to invoke the method - The argument list for the method - The return value from the invoked method - - - - Override ToString() so that error messages in NUnit's own tests make sense - - - - - Gets the Type from which this method was reflected. - - - - - Gets the MethodInfo for this method. - - - - - Gets the name of the method. - - - - - Gets a value indicating whether the method is abstract. - - - - - Gets a value indicating whether the method is public. - - - - - Gets a value indicating whether the method contains unassigned generic type parameters. - - - - - Gets a value indicating whether the method is a generic method. - - - - - Gets a value indicating whether the MethodInfo represents the definition of a generic method. - - - - - Gets the return Type of the method. - - - - - Represents a constraint that succeeds if any of the - members of a collection match a base constraint. - - - - - Returns a constraint that will apply the argument - to the members of a collection, succeeding if - any of them succeed. - - - - - The TestMethod class represents a Test implemented as a method. - - - - - The ParameterSet used to create this test method - - - - - Initializes a new instance of the class. - - The method to be used as a test. - - - - Initializes a new instance of the class. - - The method to be used as a test. - The suite or fixture to which the new test will be added - - - - Overridden to return a TestCaseResult. - - A TestResult for this test. - - - - Returns a TNode representing the current result after - adding it as a child of the supplied parent node. - - The parent node. - If true, descendant results are included - - - - - Gets a bool indicating whether the current test - has any descendant tests. - - - - - Gets this test's child tests - - A list of child tests - - - - Gets the name used for the top-level element in the - XML representation of this test - - - - - Returns the name of the method - - - - - RangeConstraint tests whether two _values are within a - specified range. - - - - - Initializes a new instance of the class. - - from must be less than or equal to true - Inclusive beginning of the range. Must be less than or equal to to. - Inclusive end of the range. Must be greater than or equal to from. - - - - Test whether the constraint is satisfied by a given value - - The value to be tested - True for success, false for failure - - - - Modifies the constraint to use an and returns self. - - - - - Modifies the constraint to use an and returns self. - - - - - Modifies the constraint to use a and returns self. - - - - - Gets text describing a constraint - - - - - Tests whether a value is greater than or equal to the value supplied to its constructor - - - - - Initializes a new instance of the class. - - The expected value. - - - - Delegate used to delay evaluation of the actual value - to be used in evaluating a constraint - - - - - AttributeConstraint tests that a specified attribute is present - on a Type or other provider and that the value of the attribute - satisfies some other constraint. - - - - - Constructs an AttributeConstraint for a specified attribute - Type and base constraint. - - - - - - - Determines whether the Type or other provider has the - expected attribute and if its value matches the - additional constraint specified. - - - - - Returns a string representation of the constraint. - - - - - ValueSourceAttribute indicates the source to be used to - provide data for one parameter of a test method. - - - - - Construct with the name of the factory - for use with languages - that don't support params arrays. - - The name of a static method, property or field that will provide data. - - - - Construct with a Type and name - for use with languages - that don't support params arrays. - - The Type that will provide data - The name of a static method, property or field that will provide data. - - - - Gets an enumeration of data items for use as arguments - for a test method parameter. - - The parameter for which data is needed - - An enumeration containing individual data items - - - - - The name of a the method, property or fiend to be used as a source - - - - - A Type to be used as a source - - - - - Summary description for SetCultureAttribute. - - - - - Construct given the name of a culture - - - - - - RandomAttribute is used to supply a set of random _values - to a single parameter of a parameterized test. - - - - - Construct a random set of values appropriate for the Type of the - parameter on which the attribute appears, specifying only the count. - - - - - - Construct a set of ints within a specified range - - - - - Construct a set of unsigned ints within a specified range - - - - - Construct a set of longs within a specified range - - - - - Construct a set of unsigned longs within a specified range - - - - - Construct a set of shorts within a specified range - - - - - Construct a set of unsigned shorts within a specified range - - - - - Construct a set of doubles within a specified range - - - - - Construct a set of floats within a specified range - - - - - Construct a set of bytes within a specified range - - - - - Construct a set of sbytes within a specified range - - - - - Get the collection of _values to be used as arguments. - - - - - Delegate used by tests that execute code and - capture any thrown exception. - - - - - TNode represents a single node in the XML representation - of a Test or TestResult. It replaces System.Xml.XmlNode and - System.Xml.Linq.XElement, providing a minimal set of methods - for operating on the XML in a platform-independent manner. - - - - - Constructs a new instance of TNode - - The name of the node - - - - Constructs a new instance of TNode with a value - - The name of the node - The text content of the node - - - - Constructs a new instance of TNode with a value - - The name of the node - The text content of the node - Flag indicating whether to use CDATA when writing the text - - - - Create a TNode from it's XML text representation - - The XML text to be parsed - A TNode - - - - Adds a new element as a child of the current node and returns it. - - The element name. - The newly created child element - - - - Adds a new element with a value as a child of the current node and returns it. - - The element name - The text content of the new element - The newly created child element - - - - Adds a new element with a value as a child of the current node and returns it. - The value will be output using a CDATA section. - - The element name - The text content of the new element - The newly created child element - - - - Adds an attribute with a specified name and value to the XmlNode. - - The name of the attribute. - The value of the attribute. - - - - Finds a single descendant of this node matching an xpath - specification. The format of the specification is - limited to what is needed by NUnit and its tests. - - - - - - - Finds all descendants of this node matching an xpath - specification. The format of the specification is - limited to what is needed by NUnit and its tests. - - - - - Writes the XML representation of the node to an XmlWriter - - - - - - Gets the name of the node - - - - - Gets the value of the node - - - - - Gets a flag indicating whether the value should be output using CDATA. - - - - - Gets the dictionary of attributes - - - - - Gets a list of child nodes - - - - - Gets the first ChildNode - - - - - Gets the XML representation of this node. - - - - - Class used to represent a list of XmlResults - - - - - Class used to represent the attributes of a node - - - - - Gets or sets the value associated with the specified key. - Overridden to return null if attribute is not found. - - The key. - Value of the attribute or null - - - - The ITestAssemblyRunner interface is implemented by classes - that are able to execute a suite of tests loaded - from an assembly. - - - - - Loads the tests found in an Assembly, returning an - indication of whether or not the load succeeded. - - File name of the assembly to load - Dictionary of options to use in loading the test - An ITest representing the loaded tests - - - - Loads the tests found in an Assembly, returning an - indication of whether or not the load succeeded. - - The assembly to load - Dictionary of options to use in loading the test - An ITest representing the loaded tests - - - - Count Test Cases using a filter - - The filter to apply - The number of test cases found - - - - Run selected tests and return a test result. The test is run synchronously, - and the listener interface is notified as it progresses. - - Interface to receive ITestListener notifications. - A test filter used to select tests to be run - - - - Run selected tests asynchronously, notifying the listener interface as it progresses. - - Interface to receive EventListener notifications. - A test filter used to select tests to be run - - - - Wait for the ongoing run to complete. - - Time to wait in milliseconds - True if the run completed, otherwise false - - - - Signal any test run that is in process to stop. Return without error if no test is running. - - If true, kill any test-running threads - - - - Gets the tree of loaded tests, or null if - no tests have been loaded. - - - - - Gets the tree of test results, if the test - run is completed, otherwise null. - - - - - Indicates whether a test has been loaded - - - - - Indicates whether a test is currently running - - - - - Indicates whether a test run is complete - - - - - Modes in which the tolerance value for a comparison can be interpreted. - - - - - The tolerance was created with a value, without specifying - how the value would be used. This is used to prevent setting - the mode more than once and is generally changed to Linear - upon execution of the test. - - - - - The tolerance is used as a numeric range within which - two compared _values are considered to be equal. - - - - - Interprets the tolerance as the percentage by which - the two compared _values my deviate from each other. - - - - - Compares two _values based in their distance in - representable numbers. - - - - - ResolvableConstraintExpression is used to represent a compound - constraint being constructed at a point where the last operator - may either terminate the expression or may have additional - qualifying constraints added to it. - - It is used, for example, for a Property element or for - an Exception element, either of which may be optionally - followed by constraints that apply to the property or - exception. - - - - - Create a new instance of ResolvableConstraintExpression - - - - - Create a new instance of ResolvableConstraintExpression, - passing in a pre-populated ConstraintBuilder. - - - - - Resolve the current expression to a Constraint - - - - - Appends an And Operator to the expression - - - - - Appends an Or operator to the expression. - - - - - Negates the test of the constraint it wraps. - - - - - Constructs a new NotOperator - - - - - Returns a NotConstraint applied to its argument. - - - - - SetUpFixtureAttribute is used to identify a SetUpFixture - - - - - Build a SetUpFixture from type provided. Normally called for a Type - on which the attribute has been placed. - - The type info of the fixture to be used. - A SetUpFixture object as a TestSuite. - - - - Marks a test that must run in the MTA, causing it - to run in a separate thread if necessary. - - On methods, you may also use MTAThreadAttribute - to serve the same purpose. - - - - - Construct a RequiresMTAAttribute - - - - - The ResultState class represents the outcome of running a test. - It contains two pieces of information. The Status of the test - is an enum indicating whether the test passed, failed, was - skipped or was inconclusive. The Label provides a more - detailed breakdown for use by client runners. - - - - - Initializes a new instance of the class. - - The TestStatus. - - - - Initializes a new instance of the class. - - The TestStatus. - The label. - - - - Initializes a new instance of the class. - - The TestStatus. - The stage at which the result was produced - - - - Initializes a new instance of the class. - - The TestStatus. - The label. - The stage at which the result was produced - - - - The result is inconclusive - - - - - The test has been skipped. - - - - - The test has been ignored. - - - - - The test was skipped because it is explicit - - - - - The test succeeded - - - - - The test failed - - - - - The test encountered an unexpected exception - - - - - The test was cancelled by the user - - - - - The test was not runnable. - - - - - A suite failed because one or more child tests failed or had errors - - - - - A suite failed in its OneTimeSetUp - - - - - A suite had an unexpected exception in its OneTimeSetUp - - - - - A suite had an unexpected exception in its OneTimeDown - - - - - Get a new ResultState, which is the same as the current - one but with the FailureSite set to the specified value. - - The FailureSite to use - A new ResultState - - - - Determines whether the specified , is equal to this instance. - - The to compare with this instance. - - true if the specified is equal to this instance; otherwise, false. - - - - - Returns a hash code for this instance. - - - A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. - - - - - Returns a that represents this instance. - - - A that represents this instance. - - - - - Gets the TestStatus for the test. - - The status. - - - - Gets the label under which this test result is - categorized, if any. - - - - - Gets the stage of test execution in which - the failure or other result took place. - - - - - The FailureSite enum indicates the stage of a test - in which an error or failure occurred. - - - - - Failure in the test itself - - - - - Failure in the SetUp method - - - - - Failure in the TearDown method - - - - - Failure of a parent test - - - - - Failure of a child test - - - - - The TestFixtureData class represents a set of arguments - and other parameter info to be used for a parameterized - fixture. It is derived from TestFixtureParameters and adds a - fluent syntax for use in initializing the fixture. - - - - - Initializes a new instance of the class. - - The arguments. - - - - Initializes a new instance of the class. - - The argument. - - - - Initializes a new instance of the class. - - The first argument. - The second argument. - - - - Initializes a new instance of the class. - - The first argument. - The second argument. - The third argument. - - - - Marks the test fixture as explicit. - - - - - Marks the test fixture as explicit, specifying the reason. - - - - - Ignores this TestFixture, specifying the reason. - - The reason. - - - - - Represents a thread-safe first-in, first-out collection of objects. - - Specifies the type of elements in the queue. - - All public and protected members of are thread-safe and may be used - concurrently from multiple threads. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the - class that contains elements copied from the specified collection - - The collection whose elements are copied to the new . - The argument is - null. - - - - Adds an object to the end of the . - - The object to add to the end of the . The value can be a null reference - (Nothing in Visual Basic) for reference types. - - - - - Attempts to add an object to the . - - The object to add to the . The value can be a null - reference (Nothing in Visual Basic) for reference types. - - true if the object was added successfully; otherwise, false. - For , this operation will always add the object to the - end of the - and return true. - - - - Attempts to remove and return the object at the beginning of the . - - - When this method returns, if the operation was successful, contains the - object removed. If no object was available to be removed, the value is unspecified. - - true if an element was removed and returned from the beginning of the - successfully; otherwise, false. - - - - Attempts to return an object from the beginning of the - without removing it. - - When this method returns, contains an object from - the beginning of the or an - unspecified value if the operation failed. - true if and object was returned successfully; otherwise, false. - - - - Returns an enumerator that iterates through a collection. - - An that can be used to iterate through the collection. - - - - Returns an enumerator that iterates through the . - - An enumerator for the contents of the . - - The enumeration represents a moment-in-time snapshot of the contents - of the queue. It does not reflect any updates to the collection after - was called. The enumerator is safe to use - concurrently with reads from and writes to the queue. - - - - - Copies the elements of the to an , starting at a particular - index. - - The one-dimensional Array that is the - destination of the elements copied from the - . The Array must have zero-based indexing. - The zero-based index in at which copying - begins. - is a null reference (Nothing in - Visual Basic). - is less than - zero. - - is multidimensional. -or- - does not have zero-based indexing. -or- - is equal to or greater than the length of the - -or- The number of elements in the source is - greater than the available space from to the end of the destination - . -or- The type of the source cannot be cast automatically to the type of the - destination . - - - - - Copies the elements to an existing one-dimensional Array, starting at the specified array index. - - The one-dimensional Array that is the - destination of the elements copied from the - . The Array must have zero-based - indexing. - The zero-based index in at which copying - begins. - is a null reference (Nothing in - Visual Basic). - is less than - zero. - is equal to or greater than the - length of the - -or- The number of elements in the source is greater than the - available space from to the end of the destination . - - - - - Copies the elements stored in the to a new array. - - A new array containing a snapshot of elements copied from the . - - - - Attempts to remove and return an object from the . - - - When this method returns, if the operation was successful, contains the - object removed. If no object was available to be removed, the value is unspecified. - - true if an element was removed and returned successfully; otherwise, false. - For , this operation will attempt to remove the object - from the beginning of the . - - - - - Gets a value indicating whether access to the is - synchronized with the SyncRoot. - - true if access to the is synchronized - with the SyncRoot; otherwise, false. For , this property always - returns false. - - - - Gets an object that can be used to synchronize access to the . This property is not supported. - - The SyncRoot property is not supported. - - - - Gets the number of elements contained in the . - - The number of elements contained in the . - - For determining whether the collection contains any items, use of the - property is recommended rather than retrieving the number of items from the - property and comparing it to 0. - - - - - Gets a value that indicates whether the is empty. - - true if the is empty; otherwise, false. - - For determining whether the collection contains any items, use of this property is recommended - rather than retrieving the number of items from the property and comparing it - to 0. However, as this collection is intended to be accessed concurrently, it may be the case - that another thread will modify the collection after returns, thus invalidating - the result. - - - - - Implementation of ITestAssemblyRunner - - - - - Initializes a new instance of the class. - - The builder. - - - - Loads the tests found in an Assembly - - File name of the assembly to load - Dictionary of option settings for loading the assembly - True if the load was successful - - - - Loads the tests found in an Assembly - - The assembly to load - Dictionary of option settings for loading the assembly - True if the load was successful - - - - Count Test Cases using a filter - - The filter to apply - The number of test cases found - - - - Run selected tests and return a test result. The test is run synchronously, - and the listener interface is notified as it progresses. - - Interface to receive EventListener notifications. - A test filter used to select tests to be run - - - - - Run selected tests asynchronously, notifying the listener interface as it progresses. - - Interface to receive EventListener notifications. - A test filter used to select tests to be run - - RunAsync is a template method, calling various abstract and - virtual methods to be overridden by derived classes. - - - - - Wait for the ongoing run to complete. - - Time to wait in milliseconds - True if the run completed, otherwise false - - - - Signal any test run that is in process to stop. Return without error if no test is running. - - If true, kill any tests that are currently running - - - - Initiate the test run. - - - - - Create the initial TestExecutionContext used to run tests - - The ITestListener specified in the RunAsync call - - - - Handle the the Completed event for the top level work item - - - - - The tree of tests that was loaded by the builder - - - - - The test result, if a run has completed - - - - - Indicates whether a test is loaded - - - - - Indicates whether a test is running - - - - - Indicates whether a test run is complete - - - - - Our settings, specified when loading the assembly - - - - - The top level WorkItem created for the assembly as a whole - - - - - The TestExecutionContext for the top level WorkItem - - - - diff --git a/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.xml.meta b/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.xml.meta deleted file mode 100644 index bed4a72e..00000000 --- a/Library/PackageCache/com.unity.ext.nunit@1.0.0/net35/unity-custom/nunit.framework.xml.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 9c7ad350fb20c854a9112cf4156d1b6e -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ext.nunit@1.0.0/package.json b/Library/PackageCache/com.unity.ext.nunit@1.0.0/package.json deleted file mode 100644 index c0bc305f..00000000 --- a/Library/PackageCache/com.unity.ext.nunit@1.0.0/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "displayName": "Custom NUnit", - "name": "com.unity.ext.nunit", - "version": "1.0.0", - "unity": "2019.1", - "description": "Custom version of the nunit package build to work with Unity. Used by the Unity Test Framework.", - "keywords": ["nunit", "unittest", "test"], - "category": "Libraries", - "repository": { - "type": "git", - "url": "git@gitlab.cds.internal.unity3d.com/upm-packages/core/com.unity.ext.nunit.git", - "revision": "c8f5044ffe6adb909f9836160b0bdaa30f2d1ec9" - }, - "dependencies": { - } -} diff --git a/Library/PackageCache/com.unity.ext.nunit@1.0.0/package.json.meta b/Library/PackageCache/com.unity.ext.nunit@1.0.0/package.json.meta deleted file mode 100644 index ad884925..00000000 --- a/Library/PackageCache/com.unity.ext.nunit@1.0.0/package.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 8143d3a8390f2c64685e3bc272bd9e90 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/.editorconfig b/Library/PackageCache/com.unity.ide.rider@1.1.4/.editorconfig deleted file mode 100644 index aca19790..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/.editorconfig +++ /dev/null @@ -1,6 +0,0 @@ -root = true - -[*] -indent_style = space -indent_size = 2 -end_of_line = lf \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/CHANGELOG.md b/Library/PackageCache/com.unity.ide.rider@1.1.4/CHANGELOG.md deleted file mode 100644 index c93c8737..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/CHANGELOG.md +++ /dev/null @@ -1,74 +0,0 @@ -# Code Editor Package for Rider - -## [1.1.4] - 2019-11-21 - -fix warning - unreachable code - - -## [1.1.3] - 2019-10-17 - - - Update External Editor, when new toolbox build was installed - - Add xaml to default list of extensions to include in csproj - - Avoid initializing Rider package in secondary Unity process, which does Asset processing - - Reflect multiple csc.rsp arguments to generated csproj files: https://github.com/JetBrains/resharper-unity/issues/1337 - - Setting, which allowed to override LangVersion removed in favor of langversion in csc.rsp - - Environment.NewLine is used in generated project files instead of Windows line separator. - -## [1.1.2] - 2019-09-18 - -performance optimizations: - - avoid multiple evaluations - - avoid reflection in DisableSyncSolutionOnceCallBack - - project generation optimization -fixes: - - avoid compilation error with incompatible `Test Framework` package - -## [1.1.1] - 2019-08-26 - -parse nowarn in csc.rsp -warning, when Unity was started from Rider, but external editor was different -improved unit test support -workaround to avoid Unity internal project-generation (fix #28) - - -## [1.1.0] - 2019-07-02 - -new setting to manage list of extensions to be opened with Rider -avoid breaking everything on any unhandled exception in RiderScriptEditor cctor -hide Rider settings, when different Editor is selected -dynamically load only newer rider plugins -path detection (work on unix symlinks) -speed up for project generation -lots of bug fixing - -## [1.0.8] - 2019-05-20 - -Fix NullReferenceException when External editor was pointing to non-existing Rider everything was broken by null-ref. - -## [1.0.7] - 2019-05-16 - -Initial migration steps from rider plugin to package. -Fix OSX check and opening of files. - -## [1.0.6] - 2019-04-30 - -Ensure asset database is refreshed when generating csproj and solution files. - -## [1.0.5] - 2019-04-27 - -Add support for generating all csproj files. - -## [1.0.4] - 2019-04-18 - -Fix relative package paths. -Fix opening editor on mac. - -## [1.0.3] - 2019-04-12 - -Fixing null reference issue for callbacks to Asset pipeline. - -## [1.0.2] - 2019-01-01 - -### This is the first release of *Unity Package rider_editor*. - -Using the newly created api to integrate Rider with Unity. diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/CHANGELOG.md.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/CHANGELOG.md.meta deleted file mode 100644 index 344cac5d..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/CHANGELOG.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 8645aa9c3c74fb34ba9499e14fb332b5 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/CONTRIBUTING.md b/Library/PackageCache/com.unity.ide.rider@1.1.4/CONTRIBUTING.md deleted file mode 100644 index 576d0963..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/CONTRIBUTING.md +++ /dev/null @@ -1,6 +0,0 @@ -# Contributing - -## All contributions are subject to the [Unity Contribution Agreement(UCA)](https://unity3d.com/legal/licenses/Unity_Contribution_Agreement) -By making a pull request, you are confirming agreement to the terms and conditions of the UCA, including that your Contributions are your original creation and that you have complete right and authority to make your Contributions. - -## Once you have a change ready following these ground rules. Simply make a pull request \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/CONTRIBUTING.md.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/CONTRIBUTING.md.meta deleted file mode 100644 index 81c20c6f..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/CONTRIBUTING.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 5e83f8baac96eaa47bdd9ca781cd2002 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Documentation~/README.md b/Library/PackageCache/com.unity.ide.rider@1.1.4/Documentation~/README.md deleted file mode 100644 index 9ddd6348..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Documentation~/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Code Editor Package for Rider - -This package is not intended to be modified by users. -Nor does it provide any api intended to be included in user projects. \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/LICENSE.md b/Library/PackageCache/com.unity.ide.rider@1.1.4/LICENSE.md deleted file mode 100644 index eb18dfb7..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2019 Unity Technologies - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/LICENSE.md.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/LICENSE.md.meta deleted file mode 100644 index be2f8e64..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/LICENSE.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 5598b14661b5f4c43bed757f34b6d172 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider.meta deleted file mode 100644 index cf6222de..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 9129183a42052cd43b9c284d6dbd541e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor.meta deleted file mode 100644 index 49130a6e..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1b393f6b29a9ee84c803af1ab4944b71 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Discovery.cs b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Discovery.cs deleted file mode 100644 index 6c04ea37..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Discovery.cs +++ /dev/null @@ -1,457 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using JetBrains.Annotations; -using Microsoft.Win32; -using Unity.CodeEditor; -using UnityEngine; - -namespace Packages.Rider.Editor -{ - public interface IDiscovery - { - CodeEditor.Installation[] PathCallback(); - } - - public class Discovery : IDiscovery - { - public CodeEditor.Installation[] PathCallback() - { - return RiderPathLocator.GetAllRiderPaths() - .Select(riderInfo => new CodeEditor.Installation - { - Path = riderInfo.Path, - Name = riderInfo.Presentation - }) - .OrderBy(a=>a.Name) - .ToArray(); - } - } - - /// - /// This code is a modified version of the JetBrains resharper-unity plugin listed here: - /// https://github.com/JetBrains/resharper-unity/blob/master/unity/JetBrains.Rider.Unity.Editor/EditorPlugin/RiderPathLocator.cs - /// - public static class RiderPathLocator - { -#if !(UNITY_4_7 || UNITY_5_5) - [UsedImplicitly] // Used in com.unity.ide.rider - public static RiderInfo[] GetAllRiderPaths() - { - try - { - switch (SystemInfo.operatingSystemFamily) - { - case OperatingSystemFamily.Windows: - { - return CollectRiderInfosWindows(); - } - - case OperatingSystemFamily.MacOSX: - { - return CollectRiderInfosMac(); - } - - case OperatingSystemFamily.Linux: - { - return CollectAllRiderPathsLinux(); - } - } - } - catch (Exception e) - { - Debug.LogException(e); - } - - return new RiderInfo[0]; - } -#endif - -#if RIDER_EDITOR_PLUGIN // can't be used in com.unity.ide.rider - internal static RiderInfo[] GetAllFoundInfos(OperatingSystemFamilyRider operatingSystemFamily) - { - try - { - switch (operatingSystemFamily) - { - case OperatingSystemFamilyRider.Windows: - { - return CollectRiderInfosWindows(); - } - case OperatingSystemFamilyRider.MacOSX: - { - return CollectRiderInfosMac(); - } - case OperatingSystemFamilyRider.Linux: - { - return CollectAllRiderPathsLinux(); - } - } - } - catch (Exception e) - { - Debug.LogException(e); - } - - return new RiderInfo[0]; - } - - internal static string[] GetAllFoundPaths(OperatingSystemFamilyRider operatingSystemFamily) - { - return GetAllFoundInfos(operatingSystemFamily).Select(a=>a.Path).ToArray(); - } -#endif - - private static RiderInfo[] CollectAllRiderPathsLinux() - { - var installInfos = new List(); - var home = Environment.GetEnvironmentVariable("HOME"); - if (!string.IsNullOrEmpty(home)) - { - var toolboxRiderRootPath = GetToolboxBaseDir(); - installInfos.AddRange(CollectPathsFromToolbox(toolboxRiderRootPath, "bin", "rider.sh", false) - .Select(a => new RiderInfo(a, true)).ToList()); - - //$Home/.local/share/applications/jetbrains-rider.desktop - var shortcut = new FileInfo(Path.Combine(home, @".local/share/applications/jetbrains-rider.desktop")); - - if (shortcut.Exists) - { - var lines = File.ReadAllLines(shortcut.FullName); - foreach (var line in lines) - { - if (!line.StartsWith("Exec=\"")) - continue; - var path = line.Split('"').Where((item, index) => index == 1).SingleOrDefault(); - if (string.IsNullOrEmpty(path)) - continue; - - if (installInfos.Any(a => a.Path == path)) // avoid adding similar build as from toolbox - continue; - installInfos.Add(new RiderInfo(path, false)); - } - } - } - - // snap install - var snapInstallPath = "/snap/rider/current/bin/rider.sh"; - if (new FileInfo(snapInstallPath).Exists) - installInfos.Add(new RiderInfo(snapInstallPath, false)); - - return installInfos.ToArray(); - } - - private static RiderInfo[] CollectRiderInfosMac() - { - var installInfos = new List(); - // "/Applications/*Rider*.app" - var folder = new DirectoryInfo("/Applications"); - if (folder.Exists) - { - installInfos.AddRange(folder.GetDirectories("*Rider*.app") - .Select(a => new RiderInfo(a.FullName, false)) - .ToList()); - } - - // /Users/user/Library/Application Support/JetBrains/Toolbox/apps/Rider/ch-1/181.3870.267/Rider EAP.app - var toolboxRiderRootPath = GetToolboxBaseDir(); - var paths = CollectPathsFromToolbox(toolboxRiderRootPath, "", "Rider*.app", true) - .Select(a => new RiderInfo(a, true)); - installInfos.AddRange(paths); - - return installInfos.ToArray(); - } - - private static RiderInfo[] CollectRiderInfosWindows() - { - var installInfos = new List(); - var toolboxRiderRootPath = GetToolboxBaseDir(); - var installPathsToolbox = CollectPathsFromToolbox(toolboxRiderRootPath, "bin", "rider64.exe", false).ToList(); - installInfos.AddRange(installPathsToolbox.Select(a => new RiderInfo(a, true)).ToList()); - - var installPaths = new List(); - const string registryKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"; - CollectPathsFromRegistry(registryKey, installPaths); - const string wowRegistryKey = @"SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall"; - CollectPathsFromRegistry(wowRegistryKey, installPaths); - - installInfos.AddRange(installPaths.Select(a => new RiderInfo(a, false)).ToList()); - - return installInfos.ToArray(); - } - - private static string GetToolboxBaseDir() - { - switch (SystemInfo.operatingSystemFamily) - { - case OperatingSystemFamily.Windows: - { - var localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); - return Path.Combine(localAppData, @"JetBrains\Toolbox\apps\Rider"); - } - - case OperatingSystemFamily.MacOSX: - { - var home = Environment.GetEnvironmentVariable("HOME"); - if (!string.IsNullOrEmpty(home)) - { - return Path.Combine(home, @"Library/Application Support/JetBrains/Toolbox/apps/Rider"); - } - break; - } - - case OperatingSystemFamily.Linux: - { - var home = Environment.GetEnvironmentVariable("HOME"); - if (!string.IsNullOrEmpty(home)) - { - return Path.Combine(home, @".local/share/JetBrains/Toolbox/apps/Rider"); - } - break; - } - } - return string.Empty; - } - - internal static string GetBuildNumber(string path) - { - var file = new FileInfo(Path.Combine(path, GetRelativePathToBuildTxt())); - if (!file.Exists) - return string.Empty; - var text = File.ReadAllText(file.FullName); - if (text.Length > 3) - return text.Substring(3); - return string.Empty; - } - - internal static bool IsToolbox(string path) - { - return path.StartsWith(GetToolboxBaseDir()); - } - - private static string GetRelativePathToBuildTxt() - { - switch (SystemInfo.operatingSystemFamily) - { - case OperatingSystemFamily.Windows: - case OperatingSystemFamily.Linux: - return "../../build.txt"; - case OperatingSystemFamily.MacOSX: - return "Contents/Resources/build.txt"; - } - throw new Exception("Unknown OS"); - } - - private static void CollectPathsFromRegistry(string registryKey, List installPaths) - { - using (var key = Registry.LocalMachine.OpenSubKey(registryKey)) - { - if (key == null) return; - foreach (var subkeyName in key.GetSubKeyNames().Where(a => a.Contains("Rider"))) - { - using (var subkey = key.OpenSubKey(subkeyName)) - { - var folderObject = subkey?.GetValue("InstallLocation"); - if (folderObject == null) continue; - var folder = folderObject.ToString(); - var possiblePath = Path.Combine(folder, @"bin\rider64.exe"); - if (File.Exists(possiblePath)) - installPaths.Add(possiblePath); - } - } - } - } - - private static string[] CollectPathsFromToolbox(string toolboxRiderRootPath, string dirName, string searchPattern, - bool isMac) - { - if (!Directory.Exists(toolboxRiderRootPath)) - return new string[0]; - - var channelDirs = Directory.GetDirectories(toolboxRiderRootPath); - var paths = channelDirs.SelectMany(channelDir => - { - try - { - // use history.json - last entry stands for the active build https://jetbrains.slack.com/archives/C07KNP99D/p1547807024066500?thread_ts=1547731708.057700&cid=C07KNP99D - var historyFile = Path.Combine(channelDir, ".history.json"); - if (File.Exists(historyFile)) - { - var json = File.ReadAllText(historyFile); - var build = ToolboxHistory.GetLatestBuildFromJson(json); - if (build != null) - { - var buildDir = Path.Combine(channelDir, build); - var executablePaths = GetExecutablePaths(dirName, searchPattern, isMac, buildDir); - if (executablePaths.Any()) - return executablePaths; - } - } - - var channelFile = Path.Combine(channelDir, ".channel.settings.json"); - if (File.Exists(channelFile)) - { - var json = File.ReadAllText(channelFile).Replace("active-application", "active_application"); - var build = ToolboxInstallData.GetLatestBuildFromJson(json); - if (build != null) - { - var buildDir = Path.Combine(channelDir, build); - var executablePaths = GetExecutablePaths(dirName, searchPattern, isMac, buildDir); - if (executablePaths.Any()) - return executablePaths; - } - } - - // changes in toolbox json files format may brake the logic above, so return all found Rider installations - return Directory.GetDirectories(channelDir) - .SelectMany(buildDir => GetExecutablePaths(dirName, searchPattern, isMac, buildDir)); - } - catch (Exception e) - { - // do not write to Debug.Log, just log it. - Logger.Warn($"Failed to get RiderPath from {channelDir}", e); - } - - return new string[0]; - }) - .Where(c => !string.IsNullOrEmpty(c)) - .ToArray(); - return paths; - } - - private static string[] GetExecutablePaths(string dirName, string searchPattern, bool isMac, string buildDir) - { - var folder = new DirectoryInfo(Path.Combine(buildDir, dirName)); - if (!folder.Exists) - return new string[0]; - - if (!isMac) - return new[] {Path.Combine(folder.FullName, searchPattern)}.Where(File.Exists).ToArray(); - return folder.GetDirectories(searchPattern).Select(f => f.FullName) - .Where(Directory.Exists).ToArray(); - } - - // Disable the "field is never assigned" compiler warning. We never assign it, but Unity does. - // Note that Unity disable this warning in the generated C# projects -#pragma warning disable 0649 - - [Serializable] - class ToolboxHistory - { - public List history; - - [CanBeNull] - public static string GetLatestBuildFromJson(string json) - { - try - { -#if UNITY_4_7 || UNITY_5_5 - return JsonConvert.DeserializeObject(json).history.LastOrDefault()?.item.build; -#else - return JsonUtility.FromJson(json).history.LastOrDefault()?.item.build; -#endif - } - catch (Exception) - { - Logger.Warn($"Failed to get latest build from json {json}"); - } - - return null; - } - } - - [Serializable] - class ItemNode - { - public BuildNode item; - } - - [Serializable] - class BuildNode - { - public string build; - } - - // ReSharper disable once ClassNeverInstantiated.Global - [Serializable] - class ToolboxInstallData - { - // ReSharper disable once InconsistentNaming - public ActiveApplication active_application; - - [CanBeNull] - public static string GetLatestBuildFromJson(string json) - { - try - { -#if UNITY_4_7 || UNITY_5_5 - var toolbox = JsonConvert.DeserializeObject(json); -#else - var toolbox = JsonUtility.FromJson(json); -#endif - var builds = toolbox.active_application.builds; - if (builds != null && builds.Any()) - return builds.First(); - } - catch (Exception) - { - Logger.Warn($"Failed to get latest build from json {json}"); - } - - return null; - } - } - - [Serializable] - class ActiveApplication - { - // ReSharper disable once InconsistentNaming - public List builds; - } - -#pragma warning restore 0649 - - public struct RiderInfo - { - public bool IsToolbox; - public string Presentation; - public string BuildVersion; - public string Path; - - public RiderInfo(string path, bool isToolbox) - { - if (path == RiderScriptEditor.CurrentEditor) - { - RiderScriptEditorData.instance.Init(); - BuildVersion = RiderScriptEditorData.instance.currentEditorVersion; - } - else - BuildVersion = GetBuildNumber(path); - Path = new FileInfo(path).FullName; // normalize separators - var presentation = "Rider " + BuildVersion; - if (isToolbox) - presentation += " (JetBrains Toolbox)"; - - Presentation = presentation; - IsToolbox = isToolbox; - } - } - - private static class Logger - { - internal static void Warn(string message, Exception e = null) - { -#if RIDER_EDITOR_PLUGIN // can't be used in com.unity.ide.rider - Log.GetLog(typeof(RiderPathLocator).Name).Warn(message); - if (e != null) - Log.GetLog(typeof(RiderPathLocator).Name).Warn(e); -#else - Debug.LogError(message); - if (e != null) - Debug.LogException(e); -#endif - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Discovery.cs.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Discovery.cs.meta deleted file mode 100644 index ea4ef859..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Discovery.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: dab656c79e1985c40b31faebcda44442 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/EditorPluginInterop.cs b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/EditorPluginInterop.cs deleted file mode 100644 index 91e9624a..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/EditorPluginInterop.cs +++ /dev/null @@ -1,136 +0,0 @@ -using System; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Runtime.CompilerServices; -using Debug = UnityEngine.Debug; - -namespace Packages.Rider.Editor -{ - public static class EditorPluginInterop - { - private static string ourEntryPointTypeName = "JetBrains.Rider.Unity.Editor.PluginEntryPoint"; - - private static Assembly ourEditorPluginAssembly; - - public static Assembly EditorPluginAssembly - { - get - { - if (ourEditorPluginAssembly != null) - return ourEditorPluginAssembly; - var assemblies = AppDomain.CurrentDomain.GetAssemblies(); - ourEditorPluginAssembly = assemblies.FirstOrDefault(a => a.GetName().Name.Equals("JetBrains.Rider.Unity.Editor.Plugin.Full.Repacked")); - return ourEditorPluginAssembly; - } - } - - - private static void DisableSyncSolutionOnceCallBack() - { - // RiderScriptableSingleton.Instance.CsprojProcessedOnce = true; - // Otherwise EditorPlugin regenerates all on every AppDomain reload - var assembly = EditorPluginAssembly; - if (assembly == null) return; - var type = assembly.GetType("JetBrains.Rider.Unity.Editor.Utils.RiderScriptableSingleton"); - if (type == null) return; - var baseType = type.BaseType; - if (baseType == null) return; - var instance = baseType.GetProperty("Instance"); - if (instance == null) return; - var instanceVal = instance.GetValue(null); - var member = type.GetProperty("CsprojProcessedOnce"); - if (member==null) return; - member.SetValue(instanceVal, true); - } - - public static string LogPath - { - get - { - try - { - var assembly = EditorPluginAssembly; - if (assembly == null) return null; - var type = assembly.GetType(ourEntryPointTypeName); - if (type == null) return null; - var field = type.GetField("LogPath", BindingFlags.NonPublic | BindingFlags.Static); - if (field == null) return null; - return field.GetValue(null) as string; - } - catch (Exception) - { - Debug.Log("Unable to do OpenFile to Rider from dll, fallback to com.unity.ide.rider implementation."); - } - - return null; - } - } - - public static bool OpenFileDllImplementation(string path, int line, int column) - { - var openResult = false; - // reflection for fast OpenFileLineCol, when Rider is started and protocol connection is established - try - { - var assembly = EditorPluginAssembly; - if (assembly == null) return false; - var type = assembly.GetType(ourEntryPointTypeName); - if (type == null) return false; - var field = type.GetField("OpenAssetHandler", BindingFlags.NonPublic | BindingFlags.Static); - if (field == null) return false; - var handlerInstance = field.GetValue(null); - var method = handlerInstance.GetType() - .GetMethod("OnOpenedAsset", new[] {typeof(string), typeof(int), typeof(int)}); - if (method == null) return false; - var assetFilePath = path; - if (!string.IsNullOrEmpty(path)) - assetFilePath = Path.GetFullPath(path); - - openResult = (bool) method.Invoke(handlerInstance, new object[] {assetFilePath, line, column}); - } - catch (Exception e) - { - Debug.Log("Unable to do OpenFile to Rider from dll, fallback to com.unity.ide.rider implementation."); - Debug.LogException(e); - } - - return openResult; - } - - public static bool EditorPluginIsLoadedFromAssets(Assembly assembly) - { - if (assembly == null) - return false; - var location = assembly.Location; - var currentDir = Directory.GetCurrentDirectory(); - return location.StartsWith(currentDir, StringComparison.InvariantCultureIgnoreCase); - } - - - internal static void InitEntryPoint(Assembly assembly) - { - try - { - if (Version.TryParse(RiderScriptEditorData.instance.currentEditorVersion, out var version)) - { - if (version.Major < 192) - DisableSyncSolutionOnceCallBack(); // is require for Rider prior to 2019.2 - } - else - DisableSyncSolutionOnceCallBack(); - - var type = assembly.GetType("JetBrains.Rider.Unity.Editor.AfterUnity56.EntryPoint"); - if (type == null) - type = assembly.GetType("JetBrains.Rider.Unity.Editor.UnitTesting.EntryPoint"); // oldRider - RuntimeHelpers.RunClassConstructor(type.TypeHandle); - } - catch (TypeInitializationException ex) - { - Debug.LogException(ex); - if (ex.InnerException != null) - Debug.LogException(ex.InnerException); - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/EditorPluginInterop.cs.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/EditorPluginInterop.cs.meta deleted file mode 100644 index fda18d39..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/EditorPluginInterop.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f9bd02a3a916be64c9b47b1305149423 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/LoggingLevel.cs b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/LoggingLevel.cs deleted file mode 100644 index 19ef8ab1..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/LoggingLevel.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace Packages.Rider.Editor -{ - public enum LoggingLevel - { - /// - /// Do not use it in logging. Only in config to disable logging. - /// - OFF, - /// For errors that lead to application failure - FATAL, - /// For errors that must be shown in Exception Browser - ERROR, - /// Suspicious situations but not errors - WARN, - /// Regular level for important events - INFO, - /// Additional info for debbuging - VERBOSE, - /// Methods & callstacks tracing, more than verbose - TRACE, - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/LoggingLevel.cs.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/LoggingLevel.cs.meta deleted file mode 100644 index c0494f30..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/LoggingLevel.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 71bb46b59a9a7a346bbab1e185c723df -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/PluginSettings.cs b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/PluginSettings.cs deleted file mode 100644 index bda3fcb2..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/PluginSettings.cs +++ /dev/null @@ -1,128 +0,0 @@ -using Unity.CodeEditor; -using UnityEditor; -using UnityEngine; - -namespace Packages.Rider.Editor -{ - public class PluginSettings - { - public static LoggingLevel SelectedLoggingLevel - { - get => (LoggingLevel) EditorPrefs.GetInt("Rider_SelectedLoggingLevel", 0); - set - { - EditorPrefs.SetInt("Rider_SelectedLoggingLevel", (int) value); - } - } - - public static bool LogEventsCollectorEnabled - { - get { return EditorPrefs.GetBool("Rider_LogEventsCollectorEnabled", true); } - private set { EditorPrefs.SetBool("Rider_LogEventsCollectorEnabled", value); } - } - - - private static GUIStyle ourVersionInfoStyle = new GUIStyle() - { - normal = new GUIStyleState() - { - textColor = new Color(0, 0, 0, .6f), - }, - margin = new RectOffset(4, 4, 4, 4), - }; - - /// - /// Preferences menu layout - /// - /// - /// Contains all 3 toggles: Enable/Disable; Debug On/Off; Writing Launch File On/Off - /// - [SettingsProvider] - private static SettingsProvider RiderPreferencesItem() - { - if (!RiderScriptEditor.IsRiderInstallation(RiderScriptEditor.CurrentEditor)) - return null; - if (!RiderScriptEditorData.instance.shouldLoadEditorPlugin) - return null; - var provider = new SettingsProvider("Preferences/Rider", SettingsScope.User) - { - label = "Rider", - keywords = new[] { "Rider" }, - guiHandler = (searchContext) => - { - EditorGUIUtility.labelWidth = 200f; - EditorGUILayout.BeginVertical(); - - GUILayout.BeginVertical(); - LogEventsCollectorEnabled = - EditorGUILayout.Toggle(new GUIContent("Pass Console to Rider:"), LogEventsCollectorEnabled); - - GUILayout.EndVertical(); - GUILayout.Label(""); - - if (!string.IsNullOrEmpty(EditorPluginInterop.LogPath)) - { - EditorGUILayout.BeginHorizontal(); - EditorGUILayout.PrefixLabel("Log file:"); - var previous = GUI.enabled; - GUI.enabled = previous && SelectedLoggingLevel != LoggingLevel.OFF; - var button = GUILayout.Button(new GUIContent("Open log")); - if (button) - { - //UnityEditorInternal.InternalEditorUtility.OpenFileAtLineExternal(PluginEntryPoint.LogPath, 0); - // works much faster than the commented code, when Rider is already started - CodeEditor.CurrentEditor.OpenProject(EditorPluginInterop.LogPath, 0, 0); - } - - GUI.enabled = previous; - GUILayout.EndHorizontal(); - } - - var loggingMsg = - @"Sets the amount of Rider Debug output. If you are about to report an issue, please select Verbose logging level and attach Unity console output to the issue."; - SelectedLoggingLevel = - (LoggingLevel) EditorGUILayout.EnumPopup(new GUIContent("Logging Level:", loggingMsg), - SelectedLoggingLevel); - - - EditorGUILayout.HelpBox(loggingMsg, MessageType.None); - - var githubRepo = "https://github.com/JetBrains/resharper-unity"; - var caption = $"{githubRepo}"; - LinkButton(caption: caption, url: githubRepo); - - GUILayout.FlexibleSpace(); - GUILayout.BeginHorizontal(); - - GUILayout.FlexibleSpace(); - var assembly = EditorPluginInterop.EditorPluginAssembly; - if (assembly != null) - { - var version = assembly.GetName().Version; - GUILayout.Label("Plugin version: " + version, ourVersionInfoStyle); - } - - GUILayout.EndHorizontal(); - - EditorGUILayout.EndVertical(); - } - }; - return provider; - } - - private static void LinkButton(string caption, string url) - { - var style = GUI.skin.label; - style.richText = true; - - var bClicked = GUILayout.Button(caption, style); - - var rect = GUILayoutUtility.GetLastRect(); - rect.width = style.CalcSize(new GUIContent(caption)).x; - EditorGUIUtility.AddCursorRect(rect, MouseCursor.Link); - - if (bClicked) - Application.OpenURL(url); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/PluginSettings.cs.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/PluginSettings.cs.meta deleted file mode 100644 index 279a4cca..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/PluginSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1bfe12aa306c0c74db4f4f1a1a0ae5ce -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/PostProcessors.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/PostProcessors.meta deleted file mode 100644 index 40cdc604..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/PostProcessors.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: aa290bd9a165a0543a4bf85ac73914bc -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/PostProcessors/RiderAssetPostprocessor.cs b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/PostProcessors/RiderAssetPostprocessor.cs deleted file mode 100644 index 230633fe..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/PostProcessors/RiderAssetPostprocessor.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Unity.CodeEditor; -using UnityEditor; - -namespace Packages.Rider.Editor.PostProcessors -{ - public class RiderAssetPostprocessor: AssetPostprocessor - { - public static bool OnPreGeneratingCSProjectFiles() - { - var path = RiderScriptEditor.GetEditorRealPath(CodeEditor.CurrentEditorInstallation); - if (RiderScriptEditor.IsRiderInstallation(path)) - return !ProjectGeneration.isRiderProjectGeneration; - return false; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/PostProcessors/RiderAssetPostprocessor.cs.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/PostProcessors/RiderAssetPostprocessor.cs.meta deleted file mode 100644 index 68658ccf..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/PostProcessors/RiderAssetPostprocessor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 45471ad7b8c1f964da5e3c07d57fbf4f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/ProjectGeneration.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/ProjectGeneration.meta deleted file mode 100644 index 37615b9f..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/ProjectGeneration.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 313cbe17019f1934397f91069831062c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/ProjectGeneration/FileIOProvider.cs b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/ProjectGeneration/FileIOProvider.cs deleted file mode 100644 index 6ea51dcf..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/ProjectGeneration/FileIOProvider.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.IO; -using System.Text; - -namespace Packages.Rider.Editor { - class FileIOProvider : IFileIO - { - public bool Exists(string fileName) - { - return File.Exists(fileName); - } - - public string ReadAllText(string fileName) - { - return File.ReadAllText(fileName); - } - - public void WriteAllText(string fileName, string content) - { - File.WriteAllText(fileName, content, Encoding.UTF8); - } - } -} diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/ProjectGeneration/FileIOProvider.cs.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/ProjectGeneration/FileIOProvider.cs.meta deleted file mode 100644 index 2763839c..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/ProjectGeneration/FileIOProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a6ba838b1348d5e46a7eaacd1646c1d3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/ProjectGeneration/GUIDProvider.cs b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/ProjectGeneration/GUIDProvider.cs deleted file mode 100644 index 476766e5..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/ProjectGeneration/GUIDProvider.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; - -namespace Packages.Rider.Editor { - class GUIDProvider : IGUIDGenerator - { - public string ProjectGuid(string projectName, string assemblyName) - { - return SolutionGuidGenerator.GuidForProject(projectName + assemblyName); - } - - public string SolutionGuid(string projectName, string extension) - { - return SolutionGuidGenerator.GuidForSolution(projectName, extension); // GetExtensionOfSourceFiles(assembly.sourceFiles) - } - } -} diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/ProjectGeneration/GUIDProvider.cs.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/ProjectGeneration/GUIDProvider.cs.meta deleted file mode 100644 index 7b331f20..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/ProjectGeneration/GUIDProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8cfde1a59fb35574189691a9de1df93b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/ProjectGeneration/ProjectGeneration.cs b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/ProjectGeneration/ProjectGeneration.cs deleted file mode 100644 index d0a26649..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/ProjectGeneration/ProjectGeneration.cs +++ /dev/null @@ -1,1090 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Security; -using System.Security.Cryptography; -using System.Text; -using System.Text.RegularExpressions; -using Packages.Rider.Editor.Util; -using UnityEditor; -using UnityEditor.Compilation; -using UnityEditor.PackageManager; -using UnityEditorInternal; -using UnityEngine; - -namespace Packages.Rider.Editor -{ - public interface IGenerator - { - bool SyncIfNeeded(IEnumerable affectedFiles, IEnumerable reimportedFiles); - void Sync(); - bool HasSolutionBeenGenerated(); - string SolutionFile(); - string ProjectDirectory { get; } - void GenerateAll(bool generateAll); - } - - public interface IFileIO - { - bool Exists(string fileName); - - string ReadAllText(string fileName); - void WriteAllText(string fileName, string content); - } - - public interface IGUIDGenerator - { - string ProjectGuid(string projectName, string assemblyName); - string SolutionGuid(string projectName, string extension); - } - - public interface IAssemblyNameProvider - { - string GetAssemblyNameFromScriptPath(string path); - IEnumerable GetAssemblies(Func shouldFileBePartOfSolution); - IEnumerable GetAllAssetPaths(); - UnityEditor.PackageManager.PackageInfo FindForAssetPath(string assetPath); - ResponseFileData ParseResponseFile(string responseFilePath, string projectDirectory, string[] systemReferenceDirectories); - } - - class AssemblyNameProvider : IAssemblyNameProvider - { - public string GetAssemblyNameFromScriptPath(string path) - { - return CompilationPipeline.GetAssemblyNameFromScriptPath(path); - } - - public IEnumerable GetAssemblies(Func shouldFileBePartOfSolution) - { - return CompilationPipeline.GetAssemblies() - .Where(i => 0 < i.sourceFiles.Length && i.sourceFiles.Any(shouldFileBePartOfSolution)); - } - - public IEnumerable GetAllAssetPaths() - { - return AssetDatabase.GetAllAssetPaths(); - } - - public UnityEditor.PackageManager.PackageInfo FindForAssetPath(string assetPath) - { - return UnityEditor.PackageManager.PackageInfo.FindForAssetPath(assetPath); - } - - public ResponseFileData ParseResponseFile(string responseFilePath, string projectDirectory, string[] systemReferenceDirectories) - { - return CompilationPipeline.ParseResponseFile( - responseFilePath, - projectDirectory, - systemReferenceDirectories - ); - } - } - - public class ProjectGeneration : IGenerator - { - enum ScriptingLanguage - { - None, - CSharp - } - - public static readonly string MSBuildNamespaceUri = "http://schemas.microsoft.com/developer/msbuild/2003"; - - /// - /// Map source extensions to ScriptingLanguages - /// - static readonly Dictionary k_BuiltinSupportedExtensions = - new Dictionary - { - {"cs", ScriptingLanguage.CSharp}, - {"uxml", ScriptingLanguage.None}, - {"uss", ScriptingLanguage.None}, - {"shader", ScriptingLanguage.None}, - {"compute", ScriptingLanguage.None}, - {"cginc", ScriptingLanguage.None}, - {"hlsl", ScriptingLanguage.None}, - {"glslinc", ScriptingLanguage.None}, - {"template", ScriptingLanguage.None}, - {"raytrace", ScriptingLanguage.None} - }; - - string m_SolutionProjectEntryTemplate = string.Join(Environment.NewLine, - @"Project(""{{{0}}}"") = ""{1}"", ""{2}"", ""{{{3}}}""", - @"EndProject").Replace(" ", "\t"); - - string m_SolutionProjectConfigurationTemplate = string.Join(Environment.NewLine, - @" {{{0}}}.Debug|Any CPU.ActiveCfg = Debug|Any CPU", - @" {{{0}}}.Debug|Any CPU.Build.0 = Debug|Any CPU", - @" {{{0}}}.Release|Any CPU.ActiveCfg = Release|Any CPU", - @" {{{0}}}.Release|Any CPU.Build.0 = Release|Any CPU").Replace(" ", "\t"); - - static readonly string[] k_ReimportSyncExtensions = {".dll", ".asmdef"}; - - /// - /// Map ScriptingLanguages to project extensions - /// - /*static readonly Dictionary k_ProjectExtensions = new Dictionary - { - { ScriptingLanguage.CSharp, ".csproj" }, - { ScriptingLanguage.None, ".csproj" }, - };*/ - static readonly Regex k_ScriptReferenceExpression = new Regex( - @"^Library.ScriptAssemblies.(?(?.*)\.dll$)", - RegexOptions.Compiled | RegexOptions.IgnoreCase); - - string[] m_ProjectSupportedExtensions = new string[0]; - bool m_ShouldGenerateAll; - - public string ProjectDirectory { get; } - - public void GenerateAll(bool generateAll) - { - m_ShouldGenerateAll = generateAll; - } - - readonly string m_ProjectName; - readonly IAssemblyNameProvider m_AssemblyNameProvider; - readonly IFileIO m_FileIOProvider; - readonly IGUIDGenerator m_GUIDGenerator; - internal static bool isRiderProjectGeneration; // workaround to https://github.cds.internal.unity3d.com/unity/com.unity.ide.rider/issues/28 - - const string k_ToolsVersion = "4.0"; - const string k_ProductVersion = "10.0.20506"; - const string k_BaseDirectory = "."; - const string k_TargetFrameworkVersion = "v4.7.1"; - const string k_TargetLanguageVersion = "latest"; - - static readonly Regex scriptReferenceExpression = new Regex( - @"^Library.ScriptAssemblies.(?(?.*)\.dll$)", - RegexOptions.Compiled | RegexOptions.IgnoreCase); - - public ProjectGeneration() : this(Directory.GetParent(Application.dataPath).FullName) - { - } - - public ProjectGeneration(string tempDirectory) : this(tempDirectory, new AssemblyNameProvider(), new FileIOProvider(), new GUIDProvider()) - { - } - - public ProjectGeneration(string tempDirectory, IAssemblyNameProvider assemblyNameProvider, IFileIO fileIoProvider, IGUIDGenerator guidGenerator) - { - ProjectDirectory = tempDirectory.Replace('\\', '/'); - m_ProjectName = Path.GetFileName(ProjectDirectory); - m_AssemblyNameProvider = assemblyNameProvider; - m_FileIOProvider = fileIoProvider; - m_GUIDGenerator = guidGenerator; - } - - /// - /// Syncs the scripting solution if any affected files are relevant. - /// - /// - /// Whether the solution was synced. - /// - /// - /// A set of files whose status has changed - /// - /// - /// A set of files that got reimported - /// - public bool SyncIfNeeded(IEnumerable affectedFiles, IEnumerable reimportedFiles) - { - SetupProjectSupportedExtensions(); - - if (HasFilesBeenModified(affectedFiles, reimportedFiles)) - { - Sync(); - return true; - } - - return false; - } - - bool HasFilesBeenModified(IEnumerable affectedFiles, IEnumerable reimportedFiles) - { - return affectedFiles.Any(ShouldFileBePartOfSolution) || reimportedFiles.Any(ShouldSyncOnReimportedAsset); - } - - static bool ShouldSyncOnReimportedAsset(string asset) - { - return k_ReimportSyncExtensions.Contains(new FileInfo(asset).Extension); - } - - public void Sync() - { - SetupProjectSupportedExtensions(); - var types = GetAssetPostprocessorTypes(); - isRiderProjectGeneration = true; - bool externalCodeAlreadyGeneratedProjects = OnPreGeneratingCSProjectFiles(types); - isRiderProjectGeneration = false; - if (!externalCodeAlreadyGeneratedProjects) - { - GenerateAndWriteSolutionAndProjects(types); - } - - OnGeneratedCSProjectFiles(types); - } - - public bool HasSolutionBeenGenerated() - { - return m_FileIOProvider.Exists(SolutionFile()); - } - - void SetupProjectSupportedExtensions() - { - m_ProjectSupportedExtensions = EditorSettings.projectGenerationUserExtensions; - } - - bool ShouldFileBePartOfSolution(string file) - { - string extension = Path.GetExtension(file); - - // Exclude files coming from packages except if they are internalized. - if (!m_ShouldGenerateAll && IsInternalizedPackagePath(file)) - { - return false; - } - - // Dll's are not scripts but still need to be included.. - if (extension == ".dll") - return true; - - if (file.ToLower().EndsWith(".asmdef")) - return true; - - return IsSupportedExtension(extension); - } - - bool IsSupportedExtension(string extension) - { - extension = extension.TrimStart('.'); - if (k_BuiltinSupportedExtensions.ContainsKey(extension)) - return true; - if (m_ProjectSupportedExtensions.Contains(extension)) - return true; - return false; - } - - static ScriptingLanguage ScriptingLanguageFor(Assembly island) - { - return ScriptingLanguageFor(GetExtensionOfSourceFiles(island.sourceFiles)); - } - - static string GetExtensionOfSourceFiles(string[] files) - { - return files.Length > 0 ? GetExtensionOfSourceFile(files[0]) : "NA"; - } - - static string GetExtensionOfSourceFile(string file) - { - var ext = Path.GetExtension(file).ToLower(); - ext = ext.Substring(1); //strip dot - return ext; - } - - static ScriptingLanguage ScriptingLanguageFor(string extension) - { - return k_BuiltinSupportedExtensions.TryGetValue(extension.TrimStart('.'), out var result) - ? result - : ScriptingLanguage.None; - } - - public void GenerateAndWriteSolutionAndProjects(Type[] types) - { - // Only synchronize islands that have associated source files and ones that we actually want in the project. - // This also filters out DLLs coming from .asmdef files in packages. - var assemblies = m_AssemblyNameProvider.GetAssemblies(ShouldFileBePartOfSolution); - - var allAssetProjectParts = GenerateAllAssetProjectParts(); - - var monoIslands = assemblies.ToList(); - - SyncSolution(monoIslands, types); - var allProjectIslands = RelevantIslandsForMode(monoIslands).ToList(); - foreach (Assembly assembly in allProjectIslands) - { - var responseFileData = ParseResponseFileData(assembly); - SyncProject(assembly, allAssetProjectParts, responseFileData, allProjectIslands, types); - } - } - - IEnumerable ParseResponseFileData(Assembly assembly) - { - var systemReferenceDirectories = - CompilationPipeline.GetSystemAssemblyDirectories(assembly.compilerOptions.ApiCompatibilityLevel); - - Dictionary responseFilesData = assembly.compilerOptions.ResponseFiles.ToDictionary( - x => x, x => m_AssemblyNameProvider.ParseResponseFile( - x, - ProjectDirectory, - systemReferenceDirectories - )); - - Dictionary responseFilesWithErrors = responseFilesData.Where(x => x.Value.Errors.Any()) - .ToDictionary(x => x.Key, x => x.Value); - - if (responseFilesWithErrors.Any()) - { - foreach (var error in responseFilesWithErrors) - foreach (var valueError in error.Value.Errors) - { - Debug.LogError($"{error.Key} Parse Error : {valueError}"); - } - } - - return responseFilesData.Select(x => x.Value); - } - - Dictionary GenerateAllAssetProjectParts() - { - Dictionary stringBuilders = new Dictionary(); - - foreach (string asset in m_AssemblyNameProvider.GetAllAssetPaths()) - { - // Exclude files coming from packages except if they are internalized. - if (!m_ShouldGenerateAll && IsInternalizedPackagePath(asset)) - { - continue; - } - - string extension = Path.GetExtension(asset); - if (IsSupportedExtension(extension) && ScriptingLanguage.None == ScriptingLanguageFor(extension)) - { - // Find assembly the asset belongs to by adding script extension and using compilation pipeline. - var assemblyName = m_AssemblyNameProvider.GetAssemblyNameFromScriptPath(asset + ".cs"); - - if (string.IsNullOrEmpty(assemblyName)) - { - continue; - } - - assemblyName = FileSystemUtil.FileNameWithoutExtension(assemblyName); - - if (!stringBuilders.TryGetValue(assemblyName, out var projectBuilder)) - { - projectBuilder = new StringBuilder(); - stringBuilders[assemblyName] = projectBuilder; - } - - projectBuilder.Append(" ") - .Append(Environment.NewLine); - } - } - - var result = new Dictionary(); - - foreach (var entry in stringBuilders) - result[entry.Key] = entry.Value.ToString(); - - return result; - } - - bool IsInternalizedPackagePath(string file) - { - if (string.IsNullOrWhiteSpace(file)) - { - return false; - } - - var packageInfo = m_AssemblyNameProvider.FindForAssetPath(file); - if (packageInfo == null) - { - return false; - } - - var packageSource = packageInfo.source; - return packageSource != PackageSource.Embedded && packageSource != PackageSource.Local; - } - - void SyncProject( - Assembly island, - Dictionary allAssetsProjectParts, - IEnumerable responseFilesData, - List allProjectIslands, - Type[] types) - { - SyncProjectFileIfNotChanged(ProjectFile(island), - ProjectText(island, allAssetsProjectParts, responseFilesData.ToList(), allProjectIslands), types); - } - - void SyncProjectFileIfNotChanged(string path, string newContents, Type[] types) - { - if (Path.GetExtension(path) == ".csproj") - { - newContents = OnGeneratedCSProject(path, newContents, types); - } - - SyncFileIfNotChanged(path, newContents); - } - - void SyncSolutionFileIfNotChanged(string path, string newContents, Type[] types) - { - newContents = OnGeneratedSlnSolution(path, newContents, types); - - SyncFileIfNotChanged(path, newContents); - } - - static List SafeGetTypes(System.Reflection.Assembly a) - { - List ret; - - try - { - ret = a.GetTypes().ToList(); - } - catch (System.Reflection.ReflectionTypeLoadException rtl) - { - ret = rtl.Types.ToList(); - } - catch (Exception) - { - return new List(); - } - - return ret.Where(r => r != null).ToList(); - } - - static void OnGeneratedCSProjectFiles(Type[] types) - { - var args = new object[0]; - foreach (var type in types) - { - var method = type.GetMethod("OnGeneratedCSProjectFiles", - System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | - System.Reflection.BindingFlags.Static); - if (method == null) - { - continue; - } - - method.Invoke(null, args); - } - } - - public static Type[] GetAssetPostprocessorTypes() - { - return TypeCache.GetTypesDerivedFrom().ToArray(); // doesn't find types from EditorPlugin, which is fine - } - - static bool OnPreGeneratingCSProjectFiles(Type[] types) - { - bool result = false; - foreach (var type in types) - { - var args = new object[0]; - var method = type.GetMethod("OnPreGeneratingCSProjectFiles", - System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | - System.Reflection.BindingFlags.Static); - if (method == null) - { - continue; - } - - var returnValue = method.Invoke(null, args); - if (method.ReturnType == typeof(bool)) - { - result |= (bool) returnValue; - } - } - - return result; - } - - static string OnGeneratedCSProject(string path, string content, Type[] types) - { - foreach (var type in types) - { - var args = new[] {path, content}; - var method = type.GetMethod("OnGeneratedCSProject", - System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | - System.Reflection.BindingFlags.Static); - if (method == null) - { - continue; - } - - var returnValue = method.Invoke(null, args); - if (method.ReturnType == typeof(string)) - { - content = (string) returnValue; - } - } - - return content; - } - - static string OnGeneratedSlnSolution(string path, string content, Type[] types) - { - foreach (var type in types) - { - var args = new[] {path, content}; - var method = type.GetMethod("OnGeneratedSlnSolution", - System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | - System.Reflection.BindingFlags.Static); - if (method == null) - { - continue; - } - - var returnValue = method.Invoke(null, args); - if (method.ReturnType == typeof(string)) - { - content = (string) returnValue; - } - } - - return content; - } - - void SyncFileIfNotChanged(string filename, string newContents) - { - try - { - if (m_FileIOProvider.Exists(filename) && newContents == m_FileIOProvider.ReadAllText(filename)) - { - return; - } - } - catch (Exception exception) - { - Debug.LogException(exception); - } - - m_FileIOProvider.WriteAllText(filename, newContents); - } - - string ProjectText(Assembly assembly, - Dictionary allAssetsProjectParts, - List responseFilesData, - List allProjectIslands) - { - var projectBuilder = new StringBuilder(ProjectHeader(assembly, responseFilesData)); - var references = new List(); - var projectReferences = new List(); - - foreach (string file in assembly.sourceFiles) - { - if (!ShouldFileBePartOfSolution(file)) - continue; - - var extension = Path.GetExtension(file).ToLower(); - var fullFile = EscapedRelativePathFor(file); - if (".dll" != extension) - { - projectBuilder.Append(" ").Append(Environment.NewLine); - } - else - { - references.Add(fullFile); - } - } - - // Append additional non-script files that should be included in project generation. - if (allAssetsProjectParts.TryGetValue(assembly.name, out var additionalAssetsForProject)) - projectBuilder.Append(additionalAssetsForProject); - - var islandRefs = references.Union(assembly.allReferences); - foreach (string reference in islandRefs) - { - if (reference.EndsWith("/UnityEditor.dll", StringComparison.Ordinal) - || reference.EndsWith("/UnityEngine.dll", StringComparison.Ordinal) - || reference.EndsWith("\\UnityEditor.dll", StringComparison.Ordinal) - || reference.EndsWith("\\UnityEngine.dll", StringComparison.Ordinal)) - continue; - - var match = k_ScriptReferenceExpression.Match(reference); - if (match.Success) - { - // assume csharp language - // Add a reference to a project except if it's a reference to a script assembly - // that we are not generating a project for. This will be the case for assemblies - // coming from .assembly.json files in non-internalized packages. - var dllName = match.Groups["dllname"].Value; - if (allProjectIslands.Any(i => Path.GetFileName(i.outputPath) == dllName)) - { - projectReferences.Add(match); - continue; - } - } - - string fullReference = Path.IsPathRooted(reference) ? reference : Path.Combine(ProjectDirectory, reference); - - AppendReference(fullReference, projectBuilder); - } - - var responseRefs = responseFilesData.SelectMany(x => x.FullPathReferences.Select(r => r)); - foreach (var reference in responseRefs) - { - AppendReference(reference, projectBuilder); - } - - if (0 < projectReferences.Count) - { - projectBuilder.AppendLine(" "); - projectBuilder.AppendLine(" "); - foreach (Match reference in projectReferences) - { - var referencedProject = reference.Groups["project"].Value; - - projectBuilder.Append(" ").Append(Environment.NewLine); - projectBuilder - .Append(" {") - .Append(m_GUIDGenerator.ProjectGuid(m_ProjectName, reference.Groups["project"].Value)) - .Append("}") - .Append(Environment.NewLine); - projectBuilder.Append(" ").Append(referencedProject).Append("").Append(Environment.NewLine); - projectBuilder.AppendLine(" "); - } - } - - projectBuilder.Append(ProjectFooter()); - return projectBuilder.ToString(); - } - - static void AppendReference(string fullReference, StringBuilder projectBuilder) - { - //replace \ with / and \\ with / - var escapedFullPath = SecurityElement.Escape(fullReference); - escapedFullPath = escapedFullPath.Replace("\\\\", "/").Replace("\\", "/"); - projectBuilder.Append(" ").Append(Environment.NewLine); - projectBuilder.Append(" ").Append(escapedFullPath).Append("").Append(Environment.NewLine); - projectBuilder.Append(" ").Append(Environment.NewLine); - } - - public string ProjectFile(Assembly assembly) - { - return Path.Combine(ProjectDirectory, $"{assembly.name}.csproj"); - } - - public string SolutionFile() - { - return Path.Combine(ProjectDirectory, $"{m_ProjectName}.sln"); - } - - string ProjectHeader( - Assembly assembly, - List responseFilesData - ) - { - var otherResponseFilesData = GetOtherArgumentsFromResponseFilesData(responseFilesData); - var arguments = new object[] - { - k_ToolsVersion, k_ProductVersion, m_GUIDGenerator.ProjectGuid(m_ProjectName, assembly.name), - InternalEditorUtility.GetEngineAssemblyPath(), - InternalEditorUtility.GetEditorAssemblyPath(), - string.Join(";", - new[] {"DEBUG", "TRACE"}.Concat(EditorUserBuildSettings.activeScriptCompilationDefines).Concat(assembly.defines) - .Concat(responseFilesData.SelectMany(x => x.Defines)).Distinct().ToArray()), - MSBuildNamespaceUri, - assembly.name, - EditorSettings.projectGenerationRootNamespace, - k_TargetFrameworkVersion, - GenerateLangVersion(otherResponseFilesData["langversion"]), - k_BaseDirectory, - assembly.compilerOptions.AllowUnsafeCode | responseFilesData.Any(x => x.Unsafe), - GenerateNoWarn(otherResponseFilesData["nowarn"].Distinct().ToArray()), - GenerateAnalyserItemGroup(otherResponseFilesData["analyzer"].Concat(otherResponseFilesData["a"]).SelectMany(x=>x.Split(';')).Distinct().ToArray()), - GenerateAnalyserAdditionalFiles(otherResponseFilesData["additionalfile"].SelectMany(x=>x.Split(';')).Distinct().ToArray()), - GenerateAnalyserRuleSet(otherResponseFilesData["ruleset"].Distinct().ToArray()), - GenerateWarningLevel(otherResponseFilesData["warn"].Concat(otherResponseFilesData["w"]).Distinct()), - GenerateWarningAsError(otherResponseFilesData["warnaserror"]), - GenerateDocumentationFile(otherResponseFilesData["doc"]) - }; - - try - { - return string.Format(GetProjectHeaderTemplate(), arguments); - } - catch (Exception) - { - throw new NotSupportedException( - "Failed creating c# project because the c# project header did not have the correct amount of arguments, which is " + - arguments.Length); - } - } - - private string GenerateDocumentationFile(IEnumerable paths) - { - if (!paths.Any()) - return String.Empty; - - - return $"{Environment.NewLine}{string.Join(Environment.NewLine, paths.Select(a => $" {a}"))}"; - } - - private string GenerateWarningAsError(IEnumerable enumerable) - { - string returnValue = String.Empty; - bool allWarningsAsErrors = false; - List warningIds = new List(); - - foreach (string s in enumerable) - { - if (s == "+") allWarningsAsErrors = true; - else if (s == "-") allWarningsAsErrors = false; - else - { - warningIds.Add(s); - } - } - - returnValue += $@" {allWarningsAsErrors}"; - if (warningIds.Any()) - { - returnValue += $"{Environment.NewLine} {string.Join(";", warningIds)}"; - } - - return $"{Environment.NewLine}{returnValue}"; - } - - private string GenerateWarningLevel(IEnumerable warningLevel) - { - var level = warningLevel.FirstOrDefault(); - if (!string.IsNullOrWhiteSpace(level)) - return level; - - return 4.ToString(); - } - - static string GetSolutionText() - { - return string.Join(Environment.NewLine, - @"", - @"Microsoft Visual Studio Solution File, Format Version {0}", - @"# Visual Studio {1}", - @"{2}", - @"Global", - @" GlobalSection(SolutionConfigurationPlatforms) = preSolution", - @" Debug|Any CPU = Debug|Any CPU", - @" Release|Any CPU = Release|Any CPU", - @" EndGlobalSection", - @" GlobalSection(ProjectConfigurationPlatforms) = postSolution", - @"{3}", - @" EndGlobalSection", - @" GlobalSection(SolutionProperties) = preSolution", - @" HideSolutionNode = FALSE", - @" EndGlobalSection", - @"EndGlobal", - @"").Replace(" ", "\t"); - } - - static string GetProjectFooterTemplate() - { - return string.Join(Environment.NewLine, - @" ", - @" ", - @" ", - @"", - @""); - } - - static string GetProjectHeaderTemplate() - { - var header = new[] - { - @"", - @"", - @" ", - @" {10}", - @" <_TargetFrameworkDirectories>non_empty_path_generated_by_unity.rider.package", - @" <_FullFrameworkReferenceAssemblyPaths>non_empty_path_generated_by_unity.rider.package", - @" true{16}", - @" ", - @" ", - @" Debug", - @" AnyCPU", - @" {1}", - @" 2.0", - @" {8}", - @" {{{2}}}", - @" Library", - @" Properties", - @" {7}", - @" {9}", - @" 512", - @" {11}", - @" ", - @" ", - @" true", - @" full", - @" false", - @" Temp\bin\Debug\", - @" {5}", - @" prompt", - @" {17}", - @" 0169{13}", - @" {12}{18}{19}", - @" ", - @" ", - @" pdbonly", - @" true", - @" Temp\bin\Release\", - @" prompt", - @" {17}", - @" 0169{13}", - @" {12}{18}{19}", - @" " - }; - - var forceExplicitReferences = new[] - { - @" ", - @" true", - @" true", - @" false", - @" false", - @" false", - @" " - }; - - var itemGroupStart = new[] - { - @" " - }; - - var footer = new[] - { - @" ", - @" {3}", - @" ", - @" ", - @" {4}", - @" ", - @" {14}{15}", - @" ", - @"" - }; - - var pieces = header.Concat(forceExplicitReferences).Concat(itemGroupStart).Concat(footer).ToArray(); - return string.Join(Environment.NewLine, pieces); - } - - void SyncSolution(IEnumerable islands, Type[] types) - { - SyncSolutionFileIfNotChanged(SolutionFile(), SolutionText(islands), types); - } - - string SolutionText(IEnumerable islands) - { - var fileversion = "11.00"; - var vsversion = "2010"; - - var relevantIslands = RelevantIslandsForMode(islands); - string projectEntries = GetProjectEntries(relevantIslands); - string projectConfigurations = string.Join(Environment.NewLine, - relevantIslands.Select(i => GetProjectActiveConfigurations(m_GUIDGenerator.ProjectGuid(m_ProjectName, i.name))).ToArray()); - return string.Format(GetSolutionText(), fileversion, vsversion, projectEntries, projectConfigurations); - } - - private static string GenerateAnalyserItemGroup(string[] paths) - { - // - // - // - // - if (!paths.Any()) - return string.Empty; - - var analyserBuilder = new StringBuilder(); - analyserBuilder.AppendLine(" "); - foreach (var path in paths) - { - analyserBuilder.AppendLine($" "); - } - analyserBuilder.AppendLine(" "); - return analyserBuilder.ToString(); - } - - private static ILookup GetOtherArgumentsFromResponseFilesData(List responseFilesData) - { - var paths = responseFilesData.SelectMany(x => - { - return x.OtherArguments - .Where(a => a.StartsWith("/") || a.StartsWith("-")) - .Select(b => - { - var index = b.IndexOf(":", StringComparison.Ordinal); - if (index > 0 && b.Length > index) - { - var key = b.Substring(1, index - 1); - return new KeyValuePair(key, b.Substring(index + 1)); - } - - const string warnaserror = "warnaserror"; - if (b.Substring(1).StartsWith(warnaserror)) - { - return new KeyValuePair(warnaserror, b.Substring(warnaserror.Length+ 1) ); - } - - return default; - }); - }) - .Distinct() - .ToLookup(o => o.Key, pair => pair.Value); - return paths; - } - - private string GenerateLangVersion(IEnumerable langVersionList) - { - var langVersion = langVersionList.FirstOrDefault(); - if (!string.IsNullOrWhiteSpace(langVersion)) - return langVersion; - return k_TargetLanguageVersion; - } - - private static string GenerateAnalyserRuleSet(string[] paths) - { - //..\path\to\myrules.ruleset - if (!paths.Any()) - return string.Empty; - - return $"{Environment.NewLine}{string.Join(Environment.NewLine, paths.Select(a => $" {a}"))}"; - } - - private static string GenerateAnalyserAdditionalFiles(string[] paths) - { - if (!paths.Any()) - return string.Empty; - - - var analyserBuilder = new StringBuilder(); - analyserBuilder.AppendLine(" "); - foreach (var path in paths) - { - analyserBuilder.AppendLine($" "); - } - analyserBuilder.AppendLine(" "); - return analyserBuilder.ToString(); - } - - private static string GenerateNoWarn(string[] codes) - { - if (!codes.Any()) - return string.Empty; - - return $",{string.Join(",", codes)}"; - } - - static IEnumerable RelevantIslandsForMode(IEnumerable islands) - { - IEnumerable relevantIslands = islands.Where(i => ScriptingLanguage.CSharp == ScriptingLanguageFor(i)); - return relevantIslands; - } - - /// - /// Get a Project("{guid}") = "MyProject", "MyProject.unityproj", "{projectguid}" - /// entry for each relevant language - /// - string GetProjectEntries(IEnumerable islands) - { - var projectEntries = islands.Select(i => string.Format( - m_SolutionProjectEntryTemplate, - m_GUIDGenerator.SolutionGuid(m_ProjectName, GetExtensionOfSourceFiles(i.sourceFiles)), - i.name, - Path.GetFileName(ProjectFile(i)), - m_GUIDGenerator.ProjectGuid(m_ProjectName, i.name) - )); - - return string.Join(Environment.NewLine, projectEntries.ToArray()); - } - - /// - /// Generate the active configuration string for a given project guid - /// - string GetProjectActiveConfigurations(string projectGuid) - { - return string.Format( - m_SolutionProjectConfigurationTemplate, - projectGuid); - } - - string EscapedRelativePathFor(string file) - { - var projectDir = ProjectDirectory.Replace('/', '\\'); - file = file.Replace('/', '\\'); - var path = SkipPathPrefix(file, projectDir); - - var packageInfo = m_AssemblyNameProvider.FindForAssetPath(path.Replace('\\', '/')); - if (packageInfo != null) - { - // We have to normalize the path, because the PackageManagerRemapper assumes - // dir seperators will be os specific. - var absolutePath = Path.GetFullPath(NormalizePath(path)).Replace('/', '\\'); - path = SkipPathPrefix(absolutePath, projectDir); - } - - return SecurityElement.Escape(path); - } - - static string SkipPathPrefix(string path, string prefix) - { - if (path.Replace("\\", "/").StartsWith($"{prefix}/")) - return path.Substring(prefix.Length + 1); - return path; - } - - static string NormalizePath(string path) - { - if (Path.DirectorySeparatorChar == '\\') - return path.Replace('/', Path.DirectorySeparatorChar); - return path.Replace('\\', Path.DirectorySeparatorChar); - } - - static string ProjectFooter() - { - return GetProjectFooterTemplate(); - } - - static string GetProjectExtension() - { - return ".csproj"; - } - } - - public static class SolutionGuidGenerator - { - public static string GuidForProject(string projectName) - { - return ComputeGuidHashFor(projectName + "salt"); - } - - public static string GuidForSolution(string projectName, string sourceFileExtension) - { - if (sourceFileExtension.ToLower() == "cs") - // GUID for a C# class library: http://www.codeproject.com/Reference/720512/List-of-Visual-Studio-Project-Type-GUIDs - return "FAE04EC0-301F-11D3-BF4B-00C04F79EFBC"; - - return ComputeGuidHashFor(projectName); - } - - static string ComputeGuidHashFor(string input) - { - var hash = MD5.Create().ComputeHash(Encoding.Default.GetBytes(input)); - return HashAsGuid(HashToString(hash)); - } - - static string HashAsGuid(string hash) - { - var guid = hash.Substring(0, 8) + "-" + hash.Substring(8, 4) + "-" + hash.Substring(12, 4) + "-" + - hash.Substring(16, 4) + "-" + hash.Substring(20, 12); - return guid.ToUpper(); - } - - static string HashToString(byte[] bs) - { - var sb = new StringBuilder(); - foreach (byte b in bs) - sb.Append(b.ToString("x2")); - return sb.ToString(); - } - } -} diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/ProjectGeneration/ProjectGeneration.cs.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/ProjectGeneration/ProjectGeneration.cs.meta deleted file mode 100644 index 4a0705c1..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/ProjectGeneration/ProjectGeneration.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7078f19173ceac84fb9e29b9f6175201 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/RiderInitializer.cs b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/RiderInitializer.cs deleted file mode 100644 index d481133b..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/RiderInitializer.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.IO; -using UnityEngine; -using Debug = UnityEngine.Debug; - -namespace Packages.Rider.Editor -{ - internal class RiderInitializer - { - public void Initialize(string editorPath) - { - var assembly = EditorPluginInterop.EditorPluginAssembly; - if (EditorPluginInterop.EditorPluginIsLoadedFromAssets(assembly)) - { - Debug.LogError($"Please delete {assembly.Location}. Unity 2019.2+ loads it directly from Rider installation. To disable this, open Rider's settings, search and uncheck 'Automatically install and update Rider's Unity editor plugin'."); - return; - } - - var dllName = "JetBrains.Rider.Unity.Editor.Plugin.Full.Repacked.dll"; - var relPath = "../../plugins/rider-unity/EditorPlugin"; - if (SystemInfo.operatingSystemFamily == OperatingSystemFamily.MacOSX) - relPath = "Contents/plugins/rider-unity/EditorPlugin"; - var dllFile = new FileInfo(Path.Combine(Path.Combine(editorPath, relPath), dllName)); - - if (dllFile.Exists) - { - var bytes = File.ReadAllBytes(dllFile.FullName); - assembly = AppDomain.CurrentDomain.Load(bytes); // doesn't lock assembly on disk - // assembly = AppDomain.CurrentDomain.Load(AssemblyName.GetAssemblyName(dllFile.FullName)); // use this for external source debug - EditorPluginInterop.InitEntryPoint(assembly); - } - else - { - Debug.Log($"Unable to find Rider EditorPlugin {dllFile.FullName} for Unity "); - } - } - } -} diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/RiderInitializer.cs.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/RiderInitializer.cs.meta deleted file mode 100644 index 11d46bcb..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/RiderInitializer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f5a0cc9645f0e2d4fb816156dcf3f4dd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/RiderScriptEditor.cs b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/RiderScriptEditor.cs deleted file mode 100644 index debee95b..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/RiderScriptEditor.cs +++ /dev/null @@ -1,404 +0,0 @@ -using System; -using System.Diagnostics; -using System.IO; -using System.Linq; -using Packages.Rider.Editor.Util; -using Unity.CodeEditor; -using UnityEditor; -using UnityEngine; -using Debug = UnityEngine.Debug; - -namespace Packages.Rider.Editor -{ - [InitializeOnLoad] - public class RiderScriptEditor : IExternalCodeEditor - { - IDiscovery m_Discoverability; - IGenerator m_ProjectGeneration; - RiderInitializer m_Initiliazer = new RiderInitializer(); - - static RiderScriptEditor() - { - try - { - var projectGeneration = new ProjectGeneration(); - var editor = new RiderScriptEditor(new Discovery(), projectGeneration); - CodeEditor.Register(editor); - var path = GetEditorRealPath(CodeEditor.CurrentEditorInstallation); - - if (IsRiderInstallation(path)) - { - if (!RiderScriptEditorData.instance.InitializedOnce) - { - var installations = editor.Installations; - // is toolbox and outdated - update - if (installations.Any() && RiderPathLocator.IsToolbox(path) && installations.All(a => a.Path != path)) - { - var toolboxInstallations = installations.Where(a => a.Name.Contains("(JetBrains Toolbox)")).ToArray(); - if (toolboxInstallations.Any()) - { - var newEditor = toolboxInstallations.Last().Path; - CodeEditor.SetExternalScriptEditor(newEditor); - path = newEditor; - } - else - { - var newEditor = installations.Last().Path; - CodeEditor.SetExternalScriptEditor(newEditor); - path = newEditor; - } - } - - // exists, is non toolbox and outdated - notify - if (installations.Any() && FileSystemUtil.EditorPathExists(path) && installations.All(a => a.Path != path)) - { - var newEditorName = installations.Last().Name; - Debug.LogWarning($"Consider updating External Editor in Unity to Rider {newEditorName}."); - } - - ShowWarningOnUnexpectedScriptEditor(path); - RiderScriptEditorData.instance.InitializedOnce = true; - } - - if (!FileSystemUtil.EditorPathExists(path)) // previously used rider was removed - { - var installations = editor.Installations; - if (installations.Any()) - { - var newEditor = installations.Last().Path; - CodeEditor.SetExternalScriptEditor(newEditor); - path = newEditor; - } - } - RiderScriptEditorData.instance.Init(); - - editor.CreateSolutionIfDoesntExist(); - if (RiderScriptEditorData.instance.shouldLoadEditorPlugin) - { - editor.m_Initiliazer.Initialize(path); - } - - InitProjectFilesWatcher(); - } - } - catch (Exception e) - { - Debug.LogException(e); - } - } - - private static void ShowWarningOnUnexpectedScriptEditor(string path) - { - // Show warning, when Unity was started from Rider, but external editor is different https://github.com/JetBrains/resharper-unity/issues/1127 - var args = Environment.GetCommandLineArgs(); - var commandlineParser = new CommandLineParser(args); - if (commandlineParser.Options.ContainsKey("-riderPath")) - { - var originRiderPath = commandlineParser.Options["-riderPath"]; - var originRealPath = GetEditorRealPath(originRiderPath); - var originVersion = RiderPathLocator.GetBuildNumber(originRealPath); - var version = RiderPathLocator.GetBuildNumber(path); - if (originVersion != string.Empty && originVersion != version) - { - Debug.LogWarning("Unity was started by a version of Rider that is not the current default external editor. Advanced integration features cannot be enabled."); - Debug.Log($"Unity was started by Rider {originVersion}, but external editor is set to: {path}"); - } - } - } - - private static void InitProjectFilesWatcher() - { - var watcher = new FileSystemWatcher(); - watcher.Path = Directory.GetCurrentDirectory(); - watcher.NotifyFilter = NotifyFilters.LastWrite; //Watch for changes in LastWrite times - watcher.Filter = "*.*"; - - // Add event handlers. - watcher.Changed += OnChanged; - watcher.Created += OnChanged; - - watcher.EnableRaisingEvents = true; // Begin watching. - - AppDomain.CurrentDomain.DomainUnload += (EventHandler) ((_, __) => - { - watcher.Dispose(); - }); - } - - private static void OnChanged(object sender, FileSystemEventArgs e) - { - var extension = Path.GetExtension(e.FullPath); - if (extension == ".sln" || extension == ".csproj") - RiderScriptEditorData.instance.HasChanges = true; - } - - internal static string GetEditorRealPath(string path) - { - if (string.IsNullOrEmpty(path)) - { - return path; - } - - if (!FileSystemUtil.EditorPathExists(path)) - return path; - - if (SystemInfo.operatingSystemFamily != OperatingSystemFamily.Windows) - { - var realPath = FileSystemUtil.GetFinalPathName(path); - - // case of snap installation - if (SystemInfo.operatingSystemFamily == OperatingSystemFamily.Linux) - { - if (new FileInfo(path).Name.ToLowerInvariant() == "rider" && - new FileInfo(realPath).Name.ToLowerInvariant() == "snap") - { - var snapInstallPath = "/snap/rider/current/bin/rider.sh"; - if (new FileInfo(snapInstallPath).Exists) - return snapInstallPath; - } - } - - // in case of symlink - return realPath; - } - - return path; - } - - const string unity_generate_all = "unity_generate_all_csproj"; - - public RiderScriptEditor(IDiscovery discovery, IGenerator projectGeneration) - { - m_Discoverability = discovery; - m_ProjectGeneration = projectGeneration; - } - - private static string[] defaultExtensions - { - get - { - var customExtensions = new[] {"json", "asmdef", "log", "xaml"}; - return EditorSettings.projectGenerationBuiltinExtensions.Concat(EditorSettings.projectGenerationUserExtensions) - .Concat(customExtensions).Distinct().ToArray(); - } - } - - private static string[] HandledExtensions - { - get - { - return HandledExtensionsString.Split(new[] {';'}, StringSplitOptions.RemoveEmptyEntries).Select(s => s.TrimStart('.', '*')) - .ToArray(); - } - } - - private static string HandledExtensionsString - { - get { return EditorPrefs.GetString("Rider_UserExtensions", string.Join(";", defaultExtensions));} - set { EditorPrefs.SetString("Rider_UserExtensions", value); } - } - - private static bool SupportsExtension(string path) - { - var extension = Path.GetExtension(path); - if (string.IsNullOrEmpty(extension)) - return false; - return HandledExtensions.Contains(extension.TrimStart('.')); - } - - public void OnGUI() - { - var prevGenerate = EditorPrefs.GetBool(unity_generate_all, false); - var generateAll = EditorGUILayout.Toggle("Generate all .csproj files.", prevGenerate); - if (generateAll != prevGenerate) - { - EditorPrefs.SetBool(unity_generate_all, generateAll); - } - - m_ProjectGeneration.GenerateAll(generateAll); - - if (RiderScriptEditorData.instance.shouldLoadEditorPlugin) - { - HandledExtensionsString = EditorGUILayout.TextField(new GUIContent("Extensions handled: "), HandledExtensionsString); - } - } - - public void SyncIfNeeded(string[] addedFiles, string[] deletedFiles, string[] movedFiles, string[] movedFromFiles, - string[] importedFiles) - { - m_ProjectGeneration.SyncIfNeeded(addedFiles.Union(deletedFiles).Union(movedFiles).Union(movedFromFiles), - importedFiles); - } - - public void SyncAll() - { - AssetDatabase.Refresh(); - if (RiderScriptEditorData.instance.HasChanges) - { - m_ProjectGeneration.Sync(); - RiderScriptEditorData.instance.HasChanges = false; - } - } - - public void Initialize(string editorInstallationPath) // is called each time ExternalEditor is changed - { - RiderScriptEditorData.instance.Invalidate(editorInstallationPath); - m_ProjectGeneration.Sync(); // regenerate csproj and sln for new editor - } - - public bool OpenProject(string path, int line, int column) - { - if (path != "" && !SupportsExtension(path)) // Assets - Open C# Project passes empty path here - { - return false; - } - - if (path == "" && SystemInfo.operatingSystemFamily == OperatingSystemFamily.MacOSX) - { - // there is a bug in DllImplementation - use package implementation here instead https://github.cds.internal.unity3d.com/unity/com.unity.ide.rider/issues/21 - return OpenOSXApp(path, line, column); - } - - if (!IsUnityScript(path)) - { - var fastOpenResult = EditorPluginInterop.OpenFileDllImplementation(path, line, column); - if (fastOpenResult) - return true; - } - - if (SystemInfo.operatingSystemFamily == OperatingSystemFamily.MacOSX) - { - return OpenOSXApp(path, line, column); - } - - var solution = GetSolutionFile(path); // TODO: If solution file doesn't exist resync. - solution = solution == "" ? "" : $"\"{solution}\""; - var process = new Process - { - StartInfo = new ProcessStartInfo - { - FileName = CodeEditor.CurrentEditorInstallation, - Arguments = $"{solution} -l {line} \"{path}\"", - UseShellExecute = true, - } - }; - - process.Start(); - - return true; - } - - private bool OpenOSXApp(string path, int line, int column) - { - var solution = GetSolutionFile(path); // TODO: If solution file doesn't exist resync. - solution = solution == "" ? "" : $"\"{solution}\""; - var pathArguments = path == "" ? "" : $"-l {line} \"{path}\""; - var process = new Process - { - StartInfo = new ProcessStartInfo - { - FileName = "open", - Arguments = $"-n \"{CodeEditor.CurrentEditorInstallation}\" --args {solution} {pathArguments}", - CreateNoWindow = true, - UseShellExecute = true, - } - }; - - process.Start(); - - return true; - } - - private string GetSolutionFile(string path) - { - if (IsUnityScript(path)) - { - return Path.Combine(GetBaseUnityDeveloperFolder(), "Projects/CSharp/Unity.CSharpProjects.gen.sln"); - } - - var solutionFile = m_ProjectGeneration.SolutionFile(); - if (File.Exists(solutionFile)) - { - return solutionFile; - } - - return ""; - } - - static bool IsUnityScript(string path) - { - if (UnityEditor.Unsupported.IsDeveloperBuild()) - { - var baseFolder = GetBaseUnityDeveloperFolder().Replace("\\", "/"); - var lowerPath = path.ToLowerInvariant().Replace("\\", "/"); - - if (lowerPath.Contains((baseFolder + "/Runtime").ToLowerInvariant()) - || lowerPath.Contains((baseFolder + "/Editor").ToLowerInvariant())) - { - return true; - } - } - - return false; - } - - static string GetBaseUnityDeveloperFolder() - { - return Directory.GetParent(EditorApplication.applicationPath).Parent.Parent.FullName; - } - - public bool TryGetInstallationForPath(string editorPath, out CodeEditor.Installation installation) - { - if (FileSystemUtil.EditorPathExists(editorPath) && IsRiderInstallation(editorPath)) - { - var info = new RiderPathLocator.RiderInfo(editorPath, false); - installation = new CodeEditor.Installation - { - Name = info.Presentation, - Path = info.Path - }; - return true; - } - - installation = default; - return false; - } - - public static bool IsRiderInstallation(string path) - { - if (IsAssetImportWorkerProcess()) - return false; - - if (string.IsNullOrEmpty(path)) - { - return false; - } - - var fileInfo = new FileInfo(path); - var filename = fileInfo.Name.ToLowerInvariant(); - return filename.StartsWith("rider", StringComparison.Ordinal); - } - - private static bool IsAssetImportWorkerProcess() - { -#if UNITY_2019_3_OR_NEWER - return UnityEditor.Experimental.AssetDatabaseExperimental.IsAssetImportWorkerProcess(); -#else - return false; -#endif - } - - public static string CurrentEditor // works fast, doesn't validate if executable really exists - => EditorPrefs.GetString("kScriptsDefaultApp"); - - public CodeEditor.Installation[] Installations => m_Discoverability.PathCallback(); - - public void CreateSolutionIfDoesntExist() - { - if (!m_ProjectGeneration.HasSolutionBeenGenerated()) - { - m_ProjectGeneration.Sync(); - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/RiderScriptEditor.cs.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/RiderScriptEditor.cs.meta deleted file mode 100644 index 16764836..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/RiderScriptEditor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c4095d72f77fbb64ea39b8b3ca246622 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/RiderScriptEditorData.cs b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/RiderScriptEditorData.cs deleted file mode 100644 index f75ed0d8..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/RiderScriptEditorData.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using UnityEditor; -using UnityEngine; - -namespace Packages.Rider.Editor -{ - public class RiderScriptEditorData : ScriptableSingleton - { - [SerializeField] internal bool HasChanges = true; // sln/csproj files were changed - [SerializeField] internal bool shouldLoadEditorPlugin; - [SerializeField] internal bool InitializedOnce; - [SerializeField] internal string currentEditorVersion; - - public void Init() - { - if (string.IsNullOrEmpty(currentEditorVersion)) - Invalidate(RiderScriptEditor.CurrentEditor); - } - - public void Invalidate(string editorInstallationPath) - { - currentEditorVersion = RiderPathLocator.GetBuildNumber(editorInstallationPath); - if (!Version.TryParse(currentEditorVersion, out var version)) - shouldLoadEditorPlugin = false; - - shouldLoadEditorPlugin = version >= new Version("191.7141.156"); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/RiderScriptEditorData.cs.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/RiderScriptEditorData.cs.meta deleted file mode 100644 index 21a5abc7..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/RiderScriptEditorData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f079e3afd077fb94fa2bda74d6409499 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting.meta deleted file mode 100644 index f6e86c98..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a52391bc44c477f40a547ed4ef3b9560 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/CallbackData.cs b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/CallbackData.cs deleted file mode 100644 index 01573faf..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/CallbackData.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using JetBrains.Annotations; -using UnityEditor; - -namespace Packages.Rider.Editor.UnitTesting -{ - public class CallbackData : ScriptableSingleton - { - public bool isRider; - - [UsedImplicitly] public static event EventHandler Changed = (sender, args) => { }; - - internal void RaiseChangedEvent() - { - Changed(null, EventArgs.Empty); - } - - public List events = new List(); - - [UsedImplicitly] - public void Clear() - { - events.Clear(); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/CallbackData.cs.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/CallbackData.cs.meta deleted file mode 100644 index ce327225..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/CallbackData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 010246a07de7cb34185a2a7b1c1fad59 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/CallbackInitializer.cs b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/CallbackInitializer.cs deleted file mode 100644 index 10d528b7..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/CallbackInitializer.cs +++ /dev/null @@ -1,18 +0,0 @@ -#if TEST_FRAMEWORK -using UnityEditor; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine; - -namespace Packages.Rider.Editor.UnitTesting -{ - [InitializeOnLoad] - internal static class CallbackInitializer - { - static CallbackInitializer() - { - if (CallbackData.instance.isRider) - ScriptableObject.CreateInstance().RegisterCallbacks(ScriptableObject.CreateInstance(), 0); - } - } -} -#endif \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/CallbackInitializer.cs.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/CallbackInitializer.cs.meta deleted file mode 100644 index d47c38c9..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/CallbackInitializer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: aa1c6b1a353ab464782fc1e7c051eb02 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/RiderTestRunner.cs b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/RiderTestRunner.cs deleted file mode 100644 index e08c3465..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/RiderTestRunner.cs +++ /dev/null @@ -1,47 +0,0 @@ -using JetBrains.Annotations; -using UnityEngine; -#if TEST_FRAMEWORK -using UnityEditor; -using UnityEditor.TestTools.TestRunner.Api; -#endif - -namespace Packages.Rider.Editor.UnitTesting -{ - public static class RiderTestRunner - { -#if TEST_FRAMEWORK - private static readonly TestsCallback Callback = ScriptableObject.CreateInstance(); -#endif - [UsedImplicitly] - public static void RunTests(int testMode, string[] assemblyNames, string[] testNames, string[] categoryNames, string[] groupNames, int? buildTarget) - { -#if !TEST_FRAMEWORK - Debug.LogError("Update Test Framework package to v.1.1.1+ to run tests from Rider."); -#else - CallbackData.instance.isRider = true; - - var api = ScriptableObject.CreateInstance(); - var settings = new ExecutionSettings(); - var filter = new Filter - { - assemblyNames = assemblyNames, - testNames = testNames, - categoryNames = categoryNames, - groupNames = groupNames, - targetPlatform = (BuildTarget?) buildTarget - }; - - if (testMode > 0) // for future use - test-framework would allow running both Edit and Play test at once - filter.testMode = (TestMode) testMode; - - settings.filters = new []{ - filter - }; - api.Execute(settings); - - api.UnregisterCallbacks(Callback); // avoid multiple registrations - api.RegisterCallbacks(Callback); // This can be used to receive information about when the test suite and individual tests starts and stops. Provide this with a scriptable object implementing ICallbacks -#endif - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/RiderTestRunner.cs.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/RiderTestRunner.cs.meta deleted file mode 100644 index 6ef53130..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/RiderTestRunner.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5c3b27069cb3ddf42ba1260eeefcdd1c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/TestEvent.cs b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/TestEvent.cs deleted file mode 100644 index ce2e1b7e..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/TestEvent.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using NUnit.Framework.Interfaces; - -namespace Packages.Rider.Editor.UnitTesting -{ - [Serializable] - public enum EventType { TestStarted, TestFinished, RunFinished } - - [Serializable] - public class TestEvent - { - public EventType type; - public string id; - public string assemblyName; - public string output; - public TestStatus testStatus; - public double duration; - public string parentId; - - public TestEvent(EventType type, string id, string assemblyName, string output, double duration, TestStatus testStatus, string parentID) - { - this.type = type; - this.id = id; - this.assemblyName = assemblyName; - this.output = output; - this.testStatus = testStatus; - this.duration = duration; - parentId = parentID; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/TestEvent.cs.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/TestEvent.cs.meta deleted file mode 100644 index 7ec7c71f..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/TestEvent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f9413c47b3a14a64e8810ce76d1a6032 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/TestsCallback.cs b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/TestsCallback.cs deleted file mode 100644 index 9995050f..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/TestsCallback.cs +++ /dev/null @@ -1,83 +0,0 @@ -#if TEST_FRAMEWORK -using System; -using System.Text; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine; - -namespace Packages.Rider.Editor.UnitTesting -{ - public class TestsCallback : ScriptableObject, ICallbacks - { - public void RunFinished(ITestResultAdaptor result) - { - CallbackData.instance.isRider = false; - - CallbackData.instance.events.Add( - new TestEvent(EventType.RunFinished, "", "","", 0, ParseTestStatus(result.TestStatus), "")); - CallbackData.instance.RaiseChangedEvent(); - } - - public void TestStarted(ITestAdaptor result) - { - if (result.Method == null) return; - - CallbackData.instance.events.Add( - new TestEvent(EventType.TestStarted, GetUniqueName(result), result.Method.TypeInfo.Assembly.GetName().Name, "", 0, ParseTestStatus(TestStatus.Passed), result.ParentFullName)); - CallbackData.instance.RaiseChangedEvent(); - } - - public void TestFinished(ITestResultAdaptor result) - { - if (result.Test.Method == null) return; - - CallbackData.instance.events.Add( - new TestEvent(EventType.TestFinished, GetUniqueName(result.Test), result.Test.Method.TypeInfo.Assembly.GetName().Name, ExtractOutput(result), result.Duration, ParseTestStatus(result.TestStatus), result.Test.ParentFullName)); - CallbackData.instance.RaiseChangedEvent(); - } - - // todo: reimplement JetBrains.Rider.Unity.Editor.AfterUnity56.UnitTesting.TestEventsSender.GetUniqueName - private static string GetUniqueName(ITestAdaptor test) - { - string str = test.FullName; - return str; - } - - public void RunStarted(ITestAdaptor testsToRun) - { - } - - private static NUnit.Framework.Interfaces.TestStatus ParseTestStatus(TestStatus testStatus) - { - return (NUnit.Framework.Interfaces.TestStatus)Enum.Parse(typeof(NUnit.Framework.Interfaces.TestStatus), testStatus.ToString()); - } - - private static string ExtractOutput(ITestResultAdaptor testResult) - { - var stringBuilder = new StringBuilder(); - if (testResult.Message != null) - { - stringBuilder.AppendLine("Message: "); - stringBuilder.AppendLine(testResult.Message); - } - - if (!string.IsNullOrEmpty(testResult.Output)) - { - stringBuilder.AppendLine("Output: "); - stringBuilder.AppendLine(testResult.Output); - } - - if (!string.IsNullOrEmpty(testResult.StackTrace)) - { - stringBuilder.AppendLine("Stacktrace: "); - stringBuilder.AppendLine(testResult.StackTrace); - } - - var result = stringBuilder.ToString(); - if (result.Length > 0) - return result; - - return testResult.Output ?? string.Empty; - } - } -} -#endif \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/TestsCallback.cs.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/TestsCallback.cs.meta deleted file mode 100644 index 068cba1a..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/UnitTesting/TestsCallback.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 58aa570dbe0761f43b25ff6c2265bbe2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util.meta deleted file mode 100644 index d7ba88e9..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 5e726086cd652f82087d59d67d2c24cd -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/CommandLineParser.cs b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/CommandLineParser.cs deleted file mode 100644 index c41490a4..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/CommandLineParser.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Collections.Generic; - -namespace Packages.Rider.Editor.Util -{ - public class CommandLineParser - { - public Dictionary Options = new Dictionary(); - - public CommandLineParser(string[] args) - { - var i = 0; - while (i < args.Length) - { - var arg = args[i]; - if (!arg.StartsWith("-")) - { - i++; - continue; - } - - string value = null; - if (i + 1 < args.Length && !args[i + 1].StartsWith("-")) - { - value = args[i + 1]; - i++; - } - - if (!(Options.ContainsKey(arg))) - { - Options.Add(arg, value); - } - i++; - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/CommandLineParser.cs.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/CommandLineParser.cs.meta deleted file mode 100644 index 536d707f..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/CommandLineParser.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 154ace4bd16de9f4e84052ac257786d6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/FileSystemUtil.cs b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/FileSystemUtil.cs deleted file mode 100644 index f558acac..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/FileSystemUtil.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using System.ComponentModel; -using System.IO; -using System.Text; -using JetBrains.Annotations; -using UnityEngine; - -namespace Packages.Rider.Editor.Util -{ - public static class FileSystemUtil - { - [NotNull] - public static string GetFinalPathName([NotNull] string path) - { - if (path == null) throw new ArgumentNullException("path"); - - // up to MAX_PATH. MAX_PATH on Linux currently 4096, on Mac OS X 1024 - // doc: http://man7.org/linux/man-pages/man3/realpath.3.html - var sb = new StringBuilder(8192); - var result = LibcNativeInterop.realpath(path, sb); - if (result == IntPtr.Zero) - { - throw new Win32Exception($"{path} was not resolved."); - } - - return new FileInfo(sb.ToString()).FullName; - } - - public static string FileNameWithoutExtension(string path) - { - if (string.IsNullOrEmpty(path)) - { - return ""; - } - - var indexOfDot = -1; - var indexOfSlash = 0; - for (var i = path.Length - 1; i >= 0; i--) - { - if (indexOfDot == -1 && path[i] == '.') - { - indexOfDot = i; - } - - if (indexOfSlash == 0 && path[i] == '/' || path[i] == '\\') - { - indexOfSlash = i + 1; - break; - } - } - - if (indexOfDot == -1) - { - indexOfDot = path.Length; - } - - return path.Substring(indexOfSlash, indexOfDot - indexOfSlash); - } - - public static bool EditorPathExists(string editorPath) - { - return SystemInfo.operatingSystemFamily == OperatingSystemFamily.MacOSX && new DirectoryInfo(editorPath).Exists - || SystemInfo.operatingSystemFamily != OperatingSystemFamily.MacOSX && new FileInfo(editorPath).Exists; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/FileSystemUtil.cs.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/FileSystemUtil.cs.meta deleted file mode 100644 index ebc001b7..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/FileSystemUtil.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bdbd564a9fdad0b738e76d030cad1204 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/LibcNativeInterop.cs b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/LibcNativeInterop.cs deleted file mode 100644 index a4070f28..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/LibcNativeInterop.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.Text; - -namespace Packages.Rider.Editor.Util -{ - internal static class LibcNativeInterop - { - [DllImport("libc", SetLastError = true)] - public static extern IntPtr realpath(string path, StringBuilder resolved_path); - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/LibcNativeInterop.cs.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/LibcNativeInterop.cs.meta deleted file mode 100644 index fe70ee09..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/LibcNativeInterop.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 071c17858dc6c47ada7b2a1f1ded5402 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/RiderMenu.cs b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/RiderMenu.cs deleted file mode 100644 index 63acff63..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/RiderMenu.cs +++ /dev/null @@ -1,25 +0,0 @@ -using JetBrains.Annotations; -using Packages.Rider.Editor; -using Unity.CodeEditor; - -// Is called via commandline from Rider Notification after checking out from source control. - -// ReSharper disable once CheckNamespace -namespace JetBrains.Rider.Unity.Editor -{ - public static class RiderMenu - { - [UsedImplicitly] - public static void MenuOpenProject() - { - if (RiderScriptEditor.IsRiderInstallation(RiderScriptEditor.CurrentEditor)) - { - // Force the project files to be sync - CodeEditor.CurrentEditor.SyncAll(); - - // Load Project - CodeEditor.CurrentEditor.OpenProject(); - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/RiderMenu.cs.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/RiderMenu.cs.meta deleted file mode 100644 index b78dfae8..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/RiderMenu.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a8860c53ca4073d4f92c403e709c12ba -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/UnityUtils.cs b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/UnityUtils.cs deleted file mode 100644 index 03c9922e..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/UnityUtils.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Linq; -using UnityEngine; - -namespace Packages.Rider.Editor.Util -{ - public static class UnityUtils - { - internal static readonly string UnityApplicationVersion = Application.unityVersion; - - public static Version UnityVersion - { - get - { - var ver = UnityApplicationVersion.Split(".".ToCharArray()).Take(2).Aggregate((a, b) => a + "." + b); - return new Version(ver); - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/UnityUtils.cs.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/UnityUtils.cs.meta deleted file mode 100644 index 9a4e6fe1..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/Util/UnityUtils.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3ec9edad2de6c4df3a146b543a0fbc4c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/com.unity.ide.rider.asmdef b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/com.unity.ide.rider.asmdef deleted file mode 100644 index 4caebc4e..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/com.unity.ide.rider.asmdef +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "Unity.Rider.Editor", - "references": [ - "GUID:0acc523941302664db1f4e527237feb3" - ], - "includePlatforms": [ - "Editor" - ], - "excludePlatforms": [], - "allowUnsafeCode": false, - "overrideReferences": false, - "precompiledReferences": [], - "autoReferenced": true, - "defineConstraints": [], - "versionDefines": [ - { - "name": "com.unity.test-framework", - "expression": "1.1.1", - "define": "TEST_FRAMEWORK" - } - ] -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/com.unity.ide.rider.asmdef.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/com.unity.ide.rider.asmdef.meta deleted file mode 100644 index 7a89700b..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/Rider/Editor/com.unity.ide.rider.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: d528c8c98d269ca44a06cd9624a03945 -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/package.json b/Library/PackageCache/com.unity.ide.rider@1.1.4/package.json deleted file mode 100644 index 7159e5f5..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "com.unity.ide.rider", - "displayName": "Rider Editor", - "description": "Code editor integration for supporting Rider as code editor for unity. Adds support for generating csproj files for code completion, auto discovery of installations, etc.", - "version": "1.1.4", - "unity": "2019.2", - "unityRelease": "0a12", - "dependencies": { - "com.unity.test-framework": "1.1.3" - }, - "relatedPackages": { - "com.unity.ide.rider.tests": "1.1.4" - }, - "repository": { - "type": "git", - "url": "git@github.cds.internal.unity3d.com:unity/com.unity.ide.rider.git", - "revision": "d2ef95989104a4ce866cdcb7f94cf3c67476fcc9" - } -} diff --git a/Library/PackageCache/com.unity.ide.rider@1.1.4/package.json.meta b/Library/PackageCache/com.unity.ide.rider@1.1.4/package.json.meta deleted file mode 100644 index 11bcd7b9..00000000 --- a/Library/PackageCache/com.unity.ide.rider@1.1.4/package.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 66c95bb3c74257f41bae2622511dc02d -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/CHANGELOG.md b/Library/PackageCache/com.unity.ide.vscode@1.1.4/CHANGELOG.md deleted file mode 100644 index 6302846f..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/CHANGELOG.md +++ /dev/null @@ -1,55 +0,0 @@ -# Code Editor Package for Visual Studio Code - -## [1.1.4] - 2020-01-02 - -Delta project generation, only recompute the csproj files whose script modified. - - -## [1.1.3] - 2019-10-22 - -Exe version of vscode will use Normal ProcessWindowStyle while cmd will use Hidden - - -## [1.1.2] - 2019-08-30 - -Fixing OSX open command arguments - - -## [1.1.1] - 2019-08-19 - -Support for Player Project. Generates specific csproj files containing files, reference, defines, -etc. that will show how the assembly will be compiled for a target platform. - - -## [1.1.0] - 2019-08-07 - -Adds support for choosing extensions to be opened with VSCode. This can be done through the GUI in Preferences. -Avoids opening all extensions after the change in core unity. - - -## [1.0.7] - 2019-05-15 - -Fix various OSX specific issues. -Generate project on load if they are not generated. -Fix path recognition. - - -## [1.0.6] - 2019-04-30 - -Ensure asset database is refreshed when generating csproj and solution files. - -## [1.0.5] - 2019-04-27 - -Add support for generating all csproj files. - -## [1.0.4] - 2019-04-18 - -Fix relative package paths. -Fix opening editor on mac. -Add %LOCALAPPDATA%/Programs to the path of install paths. - -## [1.0.3] - 2019-01-01 - -### This is the first release of *Unity Package vscode_editor*. - -Using the newly created api to integrate Visual Studio Code with Unity. diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/CHANGELOG.md.meta b/Library/PackageCache/com.unity.ide.vscode@1.1.4/CHANGELOG.md.meta deleted file mode 100644 index 65aea0bb..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/CHANGELOG.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 4ddcdc3816429494a8bea67e973875f7 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/CONTRIBUTING.md b/Library/PackageCache/com.unity.ide.vscode@1.1.4/CONTRIBUTING.md deleted file mode 100644 index 576d0963..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/CONTRIBUTING.md +++ /dev/null @@ -1,6 +0,0 @@ -# Contributing - -## All contributions are subject to the [Unity Contribution Agreement(UCA)](https://unity3d.com/legal/licenses/Unity_Contribution_Agreement) -By making a pull request, you are confirming agreement to the terms and conditions of the UCA, including that your Contributions are your original creation and that you have complete right and authority to make your Contributions. - -## Once you have a change ready following these ground rules. Simply make a pull request \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/CONTRIBUTING.md.meta b/Library/PackageCache/com.unity.ide.vscode@1.1.4/CONTRIBUTING.md.meta deleted file mode 100644 index 31e836f7..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/CONTRIBUTING.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: fcb9be00baf924c4183fc0313e6185c5 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Documentation~/README.md b/Library/PackageCache/com.unity.ide.vscode@1.1.4/Documentation~/README.md deleted file mode 100644 index d0a565f7..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Documentation~/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Code Editor Package for Visual Studio Code - -This package is not intended to be modified by users. -Nor does it provide any api intended to be included in user projects. \ No newline at end of file diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor.meta b/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor.meta deleted file mode 100644 index 568fa030..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 58628227479c34542ac8c5193ccced84 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration.meta b/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration.meta deleted file mode 100644 index 48ed36c1..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c779d3735d950f341ba35154e8b3234b -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/AssemblyNameProvider.cs b/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/AssemblyNameProvider.cs deleted file mode 100644 index 43e09722..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/AssemblyNameProvider.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using UnityEditor; -using UnityEditor.Compilation; - -namespace VSCodeEditor -{ - public interface IAssemblyNameProvider - { - string GetAssemblyNameFromScriptPath(string path); - IEnumerable GetAssemblies(Func shouldFileBePartOfSolution); - IEnumerable GetAllAssetPaths(); - UnityEditor.PackageManager.PackageInfo FindForAssetPath(string assetPath); - ResponseFileData ParseResponseFile(string responseFilePath, string projectDirectory, string[] systemReferenceDirectories); - } - - internal class AssemblyNameProvider : IAssemblyNameProvider - { - public string GetAssemblyNameFromScriptPath(string path) - { - return CompilationPipeline.GetAssemblyNameFromScriptPath(path); - } - - public IEnumerable GetAssemblies(Func shouldFileBePartOfSolution) - { - return CompilationPipeline.GetAssemblies() - .Where(i => 0 < i.sourceFiles.Length && i.sourceFiles.Any(shouldFileBePartOfSolution)); - } - - public IEnumerable GetAllAssetPaths() - { - return AssetDatabase.GetAllAssetPaths(); - } - - public UnityEditor.PackageManager.PackageInfo FindForAssetPath(string assetPath) - { - return UnityEditor.PackageManager.PackageInfo.FindForAssetPath(assetPath); - } - - public ResponseFileData ParseResponseFile(string responseFilePath, string projectDirectory, string[] systemReferenceDirectories) - { - return CompilationPipeline.ParseResponseFile( - responseFilePath, - projectDirectory, - systemReferenceDirectories - ); - } - } -} diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/AssemblyNameProvider.cs.meta b/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/AssemblyNameProvider.cs.meta deleted file mode 100644 index a8ae38b5..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/AssemblyNameProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1d93ffb668978f7488211a331977b73b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/FileIO.cs b/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/FileIO.cs deleted file mode 100644 index aeff22e5..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/FileIO.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System.IO; -using System.Text; - -namespace VSCodeEditor -{ - public interface IFileIO - { - bool Exists(string fileName); - - string ReadAllText(string fileName); - void WriteAllText(string fileName, string content); - - void CreateDirectory(string pathName); - } - - class FileIOProvider : IFileIO - { - public bool Exists(string fileName) - { - return File.Exists(fileName); - } - - public string ReadAllText(string fileName) - { - return File.ReadAllText(fileName); - } - - public void WriteAllText(string fileName, string content) - { - File.WriteAllText(fileName, content, Encoding.UTF8); - } - - public void CreateDirectory(string pathName) - { - Directory.CreateDirectory(pathName); - } - } -} diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/FileIO.cs.meta b/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/FileIO.cs.meta deleted file mode 100644 index 91d8212c..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/FileIO.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: eb221cf55b3544646b0c3b6bc790080f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/GUIDGenerator.cs b/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/GUIDGenerator.cs deleted file mode 100644 index 06549664..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/GUIDGenerator.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace VSCodeEditor -{ - public interface IGUIDGenerator - { - string ProjectGuid(string projectName, string assemblyName); - string SolutionGuid(string projectName, string extension); - } - - class GUIDProvider : IGUIDGenerator - { - public string ProjectGuid(string projectName, string assemblyName) - { - return SolutionGuidGenerator.GuidForProject(projectName + assemblyName); - } - - public string SolutionGuid(string projectName, string extension) - { - return SolutionGuidGenerator.GuidForSolution(projectName, extension); // GetExtensionOfSourceFiles(assembly.sourceFiles) - } - } -} diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/GUIDGenerator.cs.meta b/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/GUIDGenerator.cs.meta deleted file mode 100644 index 9ce342e0..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/GUIDGenerator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e58bd3cca6475e54b93632bb6837aeea -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/ProjectGeneration.cs b/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/ProjectGeneration.cs deleted file mode 100644 index 61e86e1a..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/ProjectGeneration.cs +++ /dev/null @@ -1,718 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Security; -using System.Security.Cryptography; -using System.Text; -using System.Text.RegularExpressions; -using UnityEditor; -using UnityEditor.Compilation; -using UnityEditor.PackageManager; -using UnityEngine; -using UnityEngine.Profiling; - -namespace VSCodeEditor -{ - public interface IGenerator - { - bool SyncIfNeeded(List affectedFiles, string[] reimportedFiles); - void Sync(); - string SolutionFile(); - string ProjectDirectory { get; } - void GenerateAll(bool generateAll); - bool SolutionExists(); - } - - public class ProjectGeneration : IGenerator - { - enum ScriptingLanguage - { - None, - CSharp - } - - public static readonly string MSBuildNamespaceUri = "http://schemas.microsoft.com/developer/msbuild/2003"; - - const string k_WindowsNewline = "\r\n"; - - const string k_SettingsJson = @"{ - ""files.exclude"": - { - ""**/.DS_Store"":true, - ""**/.git"":true, - ""**/.gitignore"":true, - ""**/.gitmodules"":true, - ""**/*.booproj"":true, - ""**/*.pidb"":true, - ""**/*.suo"":true, - ""**/*.user"":true, - ""**/*.userprefs"":true, - ""**/*.unityproj"":true, - ""**/*.dll"":true, - ""**/*.exe"":true, - ""**/*.pdf"":true, - ""**/*.mid"":true, - ""**/*.midi"":true, - ""**/*.wav"":true, - ""**/*.gif"":true, - ""**/*.ico"":true, - ""**/*.jpg"":true, - ""**/*.jpeg"":true, - ""**/*.png"":true, - ""**/*.psd"":true, - ""**/*.tga"":true, - ""**/*.tif"":true, - ""**/*.tiff"":true, - ""**/*.3ds"":true, - ""**/*.3DS"":true, - ""**/*.fbx"":true, - ""**/*.FBX"":true, - ""**/*.lxo"":true, - ""**/*.LXO"":true, - ""**/*.ma"":true, - ""**/*.MA"":true, - ""**/*.obj"":true, - ""**/*.OBJ"":true, - ""**/*.asset"":true, - ""**/*.cubemap"":true, - ""**/*.flare"":true, - ""**/*.mat"":true, - ""**/*.meta"":true, - ""**/*.prefab"":true, - ""**/*.unity"":true, - ""build/"":true, - ""Build/"":true, - ""Library/"":true, - ""library/"":true, - ""obj/"":true, - ""Obj/"":true, - ""ProjectSettings/"":true, - ""temp/"":true, - ""Temp/"":true - } -}"; - - /// - /// Map source extensions to ScriptingLanguages - /// - static readonly Dictionary k_BuiltinSupportedExtensions = new Dictionary - { - { "cs", ScriptingLanguage.CSharp }, - { "uxml", ScriptingLanguage.None }, - { "uss", ScriptingLanguage.None }, - { "shader", ScriptingLanguage.None }, - { "compute", ScriptingLanguage.None }, - { "cginc", ScriptingLanguage.None }, - { "hlsl", ScriptingLanguage.None }, - { "glslinc", ScriptingLanguage.None }, - { "template", ScriptingLanguage.None }, - { "raytrace", ScriptingLanguage.None } - }; - - string m_SolutionProjectEntryTemplate = string.Join("\r\n", @"Project(""{{{0}}}"") = ""{1}"", ""{2}"", ""{{{3}}}""", @"EndProject").Replace(" ", "\t"); - - string m_SolutionProjectConfigurationTemplate = string.Join("\r\n", @" {{{0}}}.Debug|Any CPU.ActiveCfg = Debug|Any CPU", @" {{{0}}}.Debug|Any CPU.Build.0 = Debug|Any CPU", @" {{{0}}}.Release|Any CPU.ActiveCfg = Release|Any CPU", @" {{{0}}}.Release|Any CPU.Build.0 = Release|Any CPU").Replace(" ", "\t"); - - static readonly string[] k_ReimportSyncExtensions = { ".dll", ".asmdef" }; - - string[] m_ProjectSupportedExtensions = new string[0]; - public string ProjectDirectory { get; } - bool m_ShouldGenerateAll; - - public void GenerateAll(bool generateAll) - { - m_ShouldGenerateAll = generateAll; - } - - readonly string m_ProjectName; - readonly IAssemblyNameProvider m_AssemblyNameProvider; - readonly IFileIO m_FileIOProvider; - readonly IGUIDGenerator m_GUIDProvider; - - const string k_ToolsVersion = "4.0"; - const string k_ProductVersion = "10.0.20506"; - const string k_BaseDirectory = "."; - const string k_TargetFrameworkVersion = "v4.7.1"; - const string k_TargetLanguageVersion = "latest"; - - public ProjectGeneration(string tempDirectory) - : this(tempDirectory, new AssemblyNameProvider(), new FileIOProvider(), new GUIDProvider()) { } - - public ProjectGeneration(string tempDirectory, IAssemblyNameProvider assemblyNameProvider, IFileIO fileIO, IGUIDGenerator guidGenerator) - { - ProjectDirectory = tempDirectory.Replace('\\', '/'); - m_ProjectName = Path.GetFileName(ProjectDirectory); - m_AssemblyNameProvider = assemblyNameProvider; - m_FileIOProvider = fileIO; - m_GUIDProvider = guidGenerator; - } - - /// - /// Syncs the scripting solution if any affected files are relevant. - /// - /// - /// Whether the solution was synced. - /// - /// - /// A set of files whose status has changed - /// - /// - /// A set of files that got reimported - /// - public bool SyncIfNeeded(List affectedFiles, string[] reimportedFiles) - { - Profiler.BeginSample("SolutionSynchronizerSync"); - SetupProjectSupportedExtensions(); - - // Don't sync if we haven't synced before - if (SolutionExists() && HasFilesBeenModified(affectedFiles, reimportedFiles)) - { - var assemblies = m_AssemblyNameProvider.GetAssemblies(ShouldFileBePartOfSolution); - var allProjectAssemblies = RelevantAssembliesForMode(assemblies).ToList(); - var allAssetProjectParts = GenerateAllAssetProjectParts(); - - var affectedNames = affectedFiles.Select(asset => m_AssemblyNameProvider.GetAssemblyNameFromScriptPath(asset)?.Split(new [] {".dll"}, StringSplitOptions.RemoveEmptyEntries)[0]); - var reimportedNames = reimportedFiles.Select(asset => m_AssemblyNameProvider.GetAssemblyNameFromScriptPath(asset)?.Split(new [] {".dll"}, StringSplitOptions.RemoveEmptyEntries)[0]); - var affectedAndReimported = new HashSet(affectedNames.Concat(reimportedNames)); - var assemblyNames = new HashSet(allProjectAssemblies.Select(assembly => Path.GetFileName(assembly.outputPath))); - - foreach (var assembly in allProjectAssemblies) - { - if (!affectedAndReimported.Contains(assembly.name)) - continue; - - SyncProject(assembly, allAssetProjectParts, ParseResponseFileData(assembly), assemblyNames); - } - - Profiler.EndSample(); - return true; - } - - Profiler.EndSample(); - return false; - } - - bool HasFilesBeenModified(List affectedFiles, string[] reimportedFiles) - { - return affectedFiles.Any(ShouldFileBePartOfSolution) || reimportedFiles.Any(ShouldSyncOnReimportedAsset); - } - - static bool ShouldSyncOnReimportedAsset(string asset) - { - return k_ReimportSyncExtensions.Contains(new FileInfo(asset).Extension); - } - - public void Sync() - { - SetupProjectSupportedExtensions(); - GenerateAndWriteSolutionAndProjects(); - } - - public bool SolutionExists() - { - return m_FileIOProvider.Exists(SolutionFile()); - } - - void SetupProjectSupportedExtensions() - { - m_ProjectSupportedExtensions = EditorSettings.projectGenerationUserExtensions; - } - - bool ShouldFileBePartOfSolution(string file) - { - string extension = Path.GetExtension(file); - - // Exclude files coming from packages except if they are internalized. - if (!m_ShouldGenerateAll && IsInternalizedPackagePath(file)) - { - return false; - } - - // Dll's are not scripts but still need to be included.. - if (extension == ".dll") - return true; - - if (file.ToLower().EndsWith(".asmdef")) - return true; - - return IsSupportedExtension(extension); - } - - bool IsSupportedExtension(string extension) - { - extension = extension.TrimStart('.'); - if (k_BuiltinSupportedExtensions.ContainsKey(extension)) - return true; - if (m_ProjectSupportedExtensions.Contains(extension)) - return true; - return false; - } - - static ScriptingLanguage ScriptingLanguageFor(Assembly assembly) - { - return ScriptingLanguageFor(GetExtensionOfSourceFiles(assembly.sourceFiles)); - } - - static string GetExtensionOfSourceFiles(string[] files) - { - return files.Length > 0 ? GetExtensionOfSourceFile(files[0]) : "NA"; - } - - static string GetExtensionOfSourceFile(string file) - { - var ext = Path.GetExtension(file).ToLower(); - ext = ext.Substring(1); //strip dot - return ext; - } - - static ScriptingLanguage ScriptingLanguageFor(string extension) - { - return k_BuiltinSupportedExtensions.TryGetValue(extension.TrimStart('.'), out var result) - ? result - : ScriptingLanguage.None; - } - - public void GenerateAndWriteSolutionAndProjects() - { - // Only synchronize assemblies that have associated source files and ones that we actually want in the project. - // This also filters out DLLs coming from .asmdef files in packages. - var assemblies = m_AssemblyNameProvider.GetAssemblies(ShouldFileBePartOfSolution); - - var allAssetProjectParts = GenerateAllAssetProjectParts(); - - SyncSolution(assemblies); - var allProjectAssemblies = RelevantAssembliesForMode(assemblies).ToList(); - var assemblyNames = new HashSet(allProjectAssemblies.Select(assembly => Path.GetFileName(assembly.outputPath))); - foreach (Assembly assembly in allProjectAssemblies) - { - var responseFileData = ParseResponseFileData(assembly); - SyncProject(assembly, allAssetProjectParts, responseFileData, assemblyNames); - } - - WriteVSCodeSettingsFiles(); - } - - IEnumerable ParseResponseFileData(Assembly assembly) - { - var systemReferenceDirectories = CompilationPipeline.GetSystemAssemblyDirectories(assembly.compilerOptions.ApiCompatibilityLevel); - - Dictionary responseFilesData = assembly.compilerOptions.ResponseFiles.ToDictionary(x => x, x => m_AssemblyNameProvider.ParseResponseFile( - x, - ProjectDirectory, - systemReferenceDirectories - )); - - Dictionary responseFilesWithErrors = responseFilesData.Where(x => x.Value.Errors.Any()) - .ToDictionary(x => x.Key, x => x.Value); - - if (responseFilesWithErrors.Any()) - { - foreach (var error in responseFilesWithErrors) - foreach (var valueError in error.Value.Errors) - { - Debug.LogError($"{error.Key} Parse Error : {valueError}"); - } - } - - return responseFilesData.Select(x => x.Value); - } - - Dictionary GenerateAllAssetProjectParts() - { - Dictionary stringBuilders = new Dictionary(); - - foreach (string asset in m_AssemblyNameProvider.GetAllAssetPaths()) - { - // Exclude files coming from packages except if they are internalized. - // TODO: We need assets from the assembly API - if (!m_ShouldGenerateAll && IsInternalizedPackagePath(asset)) - { - continue; - } - - string extension = Path.GetExtension(asset); - if (IsSupportedExtension(extension) && ScriptingLanguage.None == ScriptingLanguageFor(extension)) - { - // Find assembly the asset belongs to by adding script extension and using compilation pipeline. - var assemblyName = m_AssemblyNameProvider.GetAssemblyNameFromScriptPath(asset); - - if (string.IsNullOrEmpty(assemblyName)) - { - continue; - } - - assemblyName = Path.GetFileNameWithoutExtension(assemblyName); - - if (!stringBuilders.TryGetValue(assemblyName, out var projectBuilder)) - { - projectBuilder = new StringBuilder(); - stringBuilders[assemblyName] = projectBuilder; - } - - projectBuilder.Append(" ").Append(k_WindowsNewline); - } - } - - var result = new Dictionary(); - - foreach (var entry in stringBuilders) - result[entry.Key] = entry.Value.ToString(); - - return result; - } - - bool IsInternalizedPackagePath(string file) - { - if (string.IsNullOrWhiteSpace(file)) - { - return false; - } - - var packageInfo = m_AssemblyNameProvider.FindForAssetPath(file); - if (packageInfo == null) - { - return false; - } - - var packageSource = packageInfo.source; - return packageSource != PackageSource.Embedded && packageSource != PackageSource.Local; - } - - void SyncProject( - Assembly assembly, - Dictionary allAssetsProjectParts, - IEnumerable responseFilesData, - HashSet assemblyNames) - { - SyncProjectFileIfNotChanged(ProjectFile(assembly), ProjectText(assembly, allAssetsProjectParts, responseFilesData, assemblyNames)); - } - - void SyncProjectFileIfNotChanged(string path, string newContents) - { - SyncFileIfNotChanged(path, newContents); - } - - void SyncSolutionFileIfNotChanged(string path, string newContents) - { - SyncFileIfNotChanged(path, newContents); - } - - void SyncFileIfNotChanged(string filename, string newContents) - { - if (m_FileIOProvider.Exists(filename)) - { - var currentContents = m_FileIOProvider.ReadAllText(filename); - - if (currentContents == newContents) - { - return; - } - } - - m_FileIOProvider.WriteAllText(filename, newContents); - } - - string ProjectText( - Assembly assembly, - Dictionary allAssetsProjectParts, - IEnumerable responseFilesData, - HashSet assemblyNames) - { - var projectBuilder = new StringBuilder(); - ProjectHeader(assembly, responseFilesData, projectBuilder); - var references = new List(); - var projectReferences = new List(); - - foreach (string file in assembly.sourceFiles) - { - if (!ShouldFileBePartOfSolution(file)) - continue; - - var extension = Path.GetExtension(file).ToLower(); - var fullFile = EscapedRelativePathFor(file); - if (".dll" != extension) - { - projectBuilder.Append(" ").Append(k_WindowsNewline); - } - else - { - references.Add(fullFile); - } - } - - // Append additional non-script files that should be included in project generation. - if (allAssetsProjectParts.TryGetValue(assembly.name, out var additionalAssetsForProject)) - projectBuilder.Append(additionalAssetsForProject); - - var responseRefs = responseFilesData.SelectMany(x => x.FullPathReferences.Select(r => r)); - foreach (var reference in assembly.compiledAssemblyReferences.Union(responseRefs).Union(references)) - { - string fullReference = Path.IsPathRooted(reference) ? reference : Path.Combine(ProjectDirectory, reference); - AppendReference(fullReference, projectBuilder); - } - - if (0 < assembly.assemblyReferences.Length) - { - projectBuilder.Append(" ").Append(k_WindowsNewline); - projectBuilder.Append(" ").Append(k_WindowsNewline); - foreach (Assembly reference in assembly.assemblyReferences) - { - var referencedProject = reference.outputPath; - - projectBuilder.Append(" ").Append(k_WindowsNewline); - projectBuilder.Append(" {").Append(ProjectGuid(reference.name)).Append("}").Append(k_WindowsNewline); - projectBuilder.Append(" ").Append(reference.name).Append("").Append(k_WindowsNewline); - projectBuilder.Append(" ").Append(k_WindowsNewline); - } - } - - projectBuilder.Append(ProjectFooter()); - return projectBuilder.ToString(); - } - - static void AppendReference(string fullReference, StringBuilder projectBuilder) - { - //replace \ with / and \\ with / - var escapedFullPath = SecurityElement.Escape(fullReference); - escapedFullPath = escapedFullPath.Replace("\\\\", "/"); - escapedFullPath = escapedFullPath.Replace("\\", "/"); - projectBuilder.Append(" ").Append(k_WindowsNewline); - projectBuilder.Append(" ").Append(escapedFullPath).Append("").Append(k_WindowsNewline); - projectBuilder.Append(" ").Append(k_WindowsNewline); - } - - public string ProjectFile(Assembly assembly) - { - var fileBuilder = new StringBuilder(assembly.name); - fileBuilder.Append(".csproj"); - return Path.Combine(ProjectDirectory, fileBuilder.ToString()); - } - - public string SolutionFile() - { - return Path.Combine(ProjectDirectory, $"{m_ProjectName}.sln"); - } - - void ProjectHeader( - Assembly assembly, - IEnumerable responseFilesData, - StringBuilder builder - ) - { - // TODO: .Concat(EditorUserBuildSettings.activeScriptCompilationDefines) - GetProjectHeaderTemplate( - builder, - ProjectGuid(assembly.name), - assembly.name, - string.Join(";", new[] { "DEBUG", "TRACE" }.Concat(assembly.defines).Concat(responseFilesData.SelectMany(x => x.Defines)).Distinct().ToArray()), - assembly.compilerOptions.AllowUnsafeCode | responseFilesData.Any(x => x.Unsafe)); - } - - static string GetSolutionText() - { - return string.Join("\r\n", @"", @"Microsoft Visual Studio Solution File, Format Version {0}", @"# Visual Studio {1}", @"{2}", @"Global", @" GlobalSection(SolutionConfigurationPlatforms) = preSolution", @" Debug|Any CPU = Debug|Any CPU", @" Release|Any CPU = Release|Any CPU", @" EndGlobalSection", @" GlobalSection(ProjectConfigurationPlatforms) = postSolution", @"{3}", @" EndGlobalSection", @" GlobalSection(SolutionProperties) = preSolution", @" HideSolutionNode = FALSE", @" EndGlobalSection", @"EndGlobal", @"").Replace(" ", "\t"); - } - - static string GetProjectFooterTemplate() - { - return string.Join("\r\n", @" ", @" ", @" ", @"", @""); - } - - static void GetProjectHeaderTemplate( - StringBuilder builder, - string assemblyGUID, - string assemblyName, - string defines, - bool allowUnsafe - ) - { - builder.Append(@"").Append(k_WindowsNewline); - builder.Append(@"").Append(k_WindowsNewline); - builder.Append(@" ").Append(k_WindowsNewline); - builder.Append(@" ").Append(k_TargetLanguageVersion).Append("").Append(k_WindowsNewline); - builder.Append(@" ").Append(k_WindowsNewline); - builder.Append(@" ").Append(k_WindowsNewline); - builder.Append(@" Debug").Append(k_WindowsNewline); - builder.Append(@" AnyCPU").Append(k_WindowsNewline); - builder.Append(@" ").Append(k_ProductVersion).Append("").Append(k_WindowsNewline); - builder.Append(@" 2.0").Append(k_WindowsNewline); - builder.Append(@" ").Append(EditorSettings.projectGenerationRootNamespace).Append("").Append(k_WindowsNewline); - builder.Append(@" {").Append(assemblyGUID).Append("}").Append(k_WindowsNewline); - builder.Append(@" Library").Append(k_WindowsNewline); - builder.Append(@" Properties").Append(k_WindowsNewline); - builder.Append(@" ").Append(assemblyName).Append("").Append(k_WindowsNewline); - builder.Append(@" ").Append(k_TargetFrameworkVersion).Append("").Append(k_WindowsNewline); - builder.Append(@" 512").Append(k_WindowsNewline); - builder.Append(@" ").Append(k_BaseDirectory).Append("").Append(k_WindowsNewline); - builder.Append(@" ").Append(k_WindowsNewline); - builder.Append(@" ").Append(k_WindowsNewline); - builder.Append(@" true").Append(k_WindowsNewline); - builder.Append(@" full").Append(k_WindowsNewline); - builder.Append(@" false").Append(k_WindowsNewline); - builder.Append(@" Temp\bin\Debug\").Append(k_WindowsNewline); - builder.Append(@" ").Append(defines).Append("").Append(k_WindowsNewline); - builder.Append(@" prompt").Append(k_WindowsNewline); - builder.Append(@" 4").Append(k_WindowsNewline); - builder.Append(@" 0169").Append(k_WindowsNewline); - builder.Append(@" ").Append(allowUnsafe).Append("").Append(k_WindowsNewline); - builder.Append(@" ").Append(k_WindowsNewline); - builder.Append(@" ").Append(k_WindowsNewline); - builder.Append(@" pdbonly").Append(k_WindowsNewline); - builder.Append(@" true").Append(k_WindowsNewline); - builder.Append(@" Temp\bin\Release\").Append(k_WindowsNewline); - builder.Append(@" prompt").Append(k_WindowsNewline); - builder.Append(@" 4").Append(k_WindowsNewline); - builder.Append(@" 0169").Append(k_WindowsNewline); - builder.Append(@" ").Append(allowUnsafe).Append("").Append(k_WindowsNewline); - builder.Append(@" ").Append(k_WindowsNewline); - builder.Append(@" ").Append(k_WindowsNewline); - builder.Append(@" true").Append(k_WindowsNewline); - builder.Append(@" true").Append(k_WindowsNewline); - builder.Append(@" false").Append(k_WindowsNewline); - builder.Append(@" false").Append(k_WindowsNewline); - builder.Append(@" false").Append(k_WindowsNewline); - builder.Append(@" ").Append(k_WindowsNewline); - builder.Append(@" ").Append(k_WindowsNewline); - } - - void SyncSolution(IEnumerable assemblies) - { - SyncSolutionFileIfNotChanged(SolutionFile(), SolutionText(assemblies)); - } - - string SolutionText(IEnumerable assemblies) - { - var fileversion = "11.00"; - var vsversion = "2010"; - - var relevantAssemblies = RelevantAssembliesForMode(assemblies); - string projectEntries = GetProjectEntries(relevantAssemblies); - string projectConfigurations = string.Join(k_WindowsNewline, relevantAssemblies.Select(i => GetProjectActiveConfigurations(ProjectGuid(i.name))).ToArray()); - return string.Format(GetSolutionText(), fileversion, vsversion, projectEntries, projectConfigurations); - } - - static IEnumerable RelevantAssembliesForMode(IEnumerable assemblies) - { - return assemblies.Where(i => ScriptingLanguage.CSharp == ScriptingLanguageFor(i)); - } - - /// - /// Get a Project("{guid}") = "MyProject", "MyProject.csproj", "{projectguid}" - /// entry for each relevant language - /// - string GetProjectEntries(IEnumerable assemblies) - { - var projectEntries = assemblies.Select(i => string.Format( - m_SolutionProjectEntryTemplate, - SolutionGuid(i), - i.name, - Path.GetFileName(ProjectFile(i)), - ProjectGuid(i.name) - )); - - return string.Join(k_WindowsNewline, projectEntries.ToArray()); - } - - /// - /// Generate the active configuration string for a given project guid - /// - string GetProjectActiveConfigurations(string projectGuid) - { - return string.Format( - m_SolutionProjectConfigurationTemplate, - projectGuid); - } - - string EscapedRelativePathFor(string file) - { - var projectDir = ProjectDirectory.Replace('/', '\\'); - file = file.Replace('/', '\\'); - var path = SkipPathPrefix(file, projectDir); - - var packageInfo = m_AssemblyNameProvider.FindForAssetPath(path.Replace('\\', '/')); - if (packageInfo != null) - { - // We have to normalize the path, because the PackageManagerRemapper assumes - // dir seperators will be os specific. - var absolutePath = Path.GetFullPath(NormalizePath(path)).Replace('/', '\\'); - path = SkipPathPrefix(absolutePath, projectDir); - } - - return SecurityElement.Escape(path); - } - - static string SkipPathPrefix(string path, string prefix) - { - if (path.StartsWith($@"{prefix}\")) - return path.Substring(prefix.Length + 1); - return path; - } - - static string NormalizePath(string path) - { - if (Path.DirectorySeparatorChar == '\\') - return path.Replace('/', Path.DirectorySeparatorChar); - return path.Replace('\\', Path.DirectorySeparatorChar); - } - - string ProjectGuid(string assembly) - { - return m_GUIDProvider.ProjectGuid(m_ProjectName, assembly); - } - - string SolutionGuid(Assembly assembly) - { - return m_GUIDProvider.SolutionGuid(m_ProjectName, GetExtensionOfSourceFiles(assembly.sourceFiles)); - } - - static string ProjectFooter() - { - return GetProjectFooterTemplate(); - } - - static string GetProjectExtension() - { - return ".csproj"; - } - - void WriteVSCodeSettingsFiles() - { - var vsCodeDirectory = Path.Combine(ProjectDirectory, ".vscode"); - - if (!m_FileIOProvider.Exists(vsCodeDirectory)) - m_FileIOProvider.CreateDirectory(vsCodeDirectory); - - var vsCodeSettingsJson = Path.Combine(vsCodeDirectory, "settings.json"); - - if (!m_FileIOProvider.Exists(vsCodeSettingsJson)) - m_FileIOProvider.WriteAllText(vsCodeSettingsJson, k_SettingsJson); - } - } - - public static class SolutionGuidGenerator - { - static MD5 mD5 = MD5CryptoServiceProvider.Create(); - - public static string GuidForProject(string projectName) - { - return ComputeGuidHashFor(projectName + "salt"); - } - - public static string GuidForSolution(string projectName, string sourceFileExtension) - { - if (sourceFileExtension.ToLower() == "cs") - - // GUID for a C# class library: http://www.codeproject.com/Reference/720512/List-of-Visual-Studio-Project-Type-GUIDs - return "FAE04EC0-301F-11D3-BF4B-00C04F79EFBC"; - - return ComputeGuidHashFor(projectName); - } - - static string ComputeGuidHashFor(string input) - { - var hash = mD5.ComputeHash(Encoding.Default.GetBytes(input)); - return new Guid(hash).ToString(); - } - } -} diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/ProjectGeneration.cs.meta b/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/ProjectGeneration.cs.meta deleted file mode 100644 index 5039705b..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/ProjectGeneration/ProjectGeneration.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 97d6c87381e3e51488b49f5891490b70 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/Unity.com.unity.vscode.Editor.asmdef b/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/Unity.com.unity.vscode.Editor.asmdef deleted file mode 100644 index 032da7cb..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/Unity.com.unity.vscode.Editor.asmdef +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "Unity.VSCode.Editor", - "references": [], - "optionalUnityReferences": [], - "includePlatforms": [ - "Editor" - ], - "excludePlatforms": [] -} diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/Unity.com.unity.vscode.Editor.asmdef.meta b/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/Unity.com.unity.vscode.Editor.asmdef.meta deleted file mode 100644 index 4c94f56d..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/Unity.com.unity.vscode.Editor.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 8b845b123ab418448a8be2935fa804e0 -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/VSCodeDiscovery.cs b/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/VSCodeDiscovery.cs deleted file mode 100644 index 609d2cdf..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/VSCodeDiscovery.cs +++ /dev/null @@ -1,137 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using Unity.CodeEditor; - -namespace VSCodeEditor -{ - public interface IDiscovery - { - CodeEditor.Installation[] PathCallback(); - } - - public class VSCodeDiscovery : IDiscovery - { - List m_Installations; - - public CodeEditor.Installation[] PathCallback() - { - if (m_Installations == null) - { - m_Installations = new List(); - FindInstallationPaths(); - } - - return m_Installations.ToArray(); - } - - void FindInstallationPaths() - { - string[] possiblePaths = -#if UNITY_EDITOR_OSX - { - "/Applications/Visual Studio Code.app", - "/Applications/Visual Studio Code - Insiders.app" - }; -#elif UNITY_EDITOR_WIN - { - GetProgramFiles() + @"/Microsoft VS Code/bin/code.cmd", - GetProgramFiles() + @"/Microsoft VS Code/Code.exe", - GetProgramFiles() + @"/Microsoft VS Code Insiders/bin/code-insiders.cmd", - GetProgramFiles() + @"/Microsoft VS Code Insiders/Code.exe", - GetLocalAppData() + @"/Programs/Microsoft VS Code/bin/code.cmd", - GetLocalAppData() + @"/Programs/Microsoft VS Code/Code.exe", - GetLocalAppData() + @"/Programs/Microsoft VS Code Insiders/bin/code-insiders.cmd", - GetLocalAppData() + @"/Programs/Microsoft VS Code Insiders/Code.exe", - }; -#else - { - "/usr/bin/code", - "/bin/code", - "/usr/local/bin/code", - "/var/lib/flatpak/exports/bin/com.visualstudio.code", - "/snap/current/bin/code" - }; -#endif - var existingPaths = possiblePaths.Where(VSCodeExists).ToList(); - if (!existingPaths.Any()) - { - return; - } - - var lcp = GetLongestCommonPrefix(existingPaths); - switch (existingPaths.Count) - { - case 1: - { - var path = existingPaths.First(); - m_Installations = new List - { - new CodeEditor.Installation - { - Path = path, - Name = path.Contains("Insiders") - ? "Visual Studio Code Insiders" - : "Visual Studio Code" - } - }; - break; - } - case 2 when existingPaths.Any(path => !(path.Substring(lcp.Length).Contains("/") || path.Substring(lcp.Length).Contains("\\"))): - { - goto case 1; - } - default: - { - m_Installations = existingPaths.Select(path => new CodeEditor.Installation - { - Name = $"Visual Studio Code Insiders ({path.Substring(lcp.Length)})", - Path = path - }).ToList(); - - break; - } - } - } - -#if UNITY_EDITOR_WIN - static string GetProgramFiles() - { - return Environment.GetEnvironmentVariable("ProgramFiles")?.Replace("\\", "/"); - } - - static string GetLocalAppData() - { - return Environment.GetEnvironmentVariable("LOCALAPPDATA")?.Replace("\\", "/"); - } -#endif - - static string GetLongestCommonPrefix(List paths) - { - var baseLength = paths.First().Length; - for (var pathIndex = 1; pathIndex < paths.Count; pathIndex++) - { - baseLength = Math.Min(baseLength, paths[pathIndex].Length); - for (var i = 0; i < baseLength; i++) - { - if (paths[pathIndex][i] == paths[0][i]) continue; - - baseLength = i; - break; - } - } - - return paths[0].Substring(0, baseLength); - } - - static bool VSCodeExists(string path) - { -#if UNITY_EDITOR_OSX - return System.IO.Directory.Exists(path); -#else - return new FileInfo(path).Exists; -#endif - } - } -} diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/VSCodeDiscovery.cs.meta b/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/VSCodeDiscovery.cs.meta deleted file mode 100644 index cbeca1b7..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/VSCodeDiscovery.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 380f7372e785c7d408552e2c760d269d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/VSCodeScriptEditor.cs b/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/VSCodeScriptEditor.cs deleted file mode 100644 index f1657cd8..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/VSCodeScriptEditor.cs +++ /dev/null @@ -1,257 +0,0 @@ -using System; -using System.IO; -using System.Linq; -using System.Diagnostics; -using UnityEditor; -using UnityEngine; -using Unity.CodeEditor; - -namespace VSCodeEditor -{ - [InitializeOnLoad] - public class VSCodeScriptEditor : IExternalCodeEditor - { - const string vscode_argument = "vscode_arguments"; - const string vscode_generate_all = "unity_generate_all_csproj"; - const string vscode_extension = "vscode_userExtensions"; - static readonly GUIContent k_ResetArguments = EditorGUIUtility.TrTextContent("Reset argument"); - string m_Arguments; - - IDiscovery m_Discoverability; - IGenerator m_ProjectGeneration; - - static readonly string[] k_SupportedFileNames = { "code.exe", "visualstudiocode.app", "visualstudiocode-insiders.app", "vscode.app", "code.app", "code.cmd", "code-insiders.cmd", "code", "com.visualstudio.code" }; - - static bool IsOSX => Application.platform == RuntimePlatform.OSXEditor; - - static string DefaultApp => EditorPrefs.GetString("kScriptsDefaultApp"); - - static string DefaultArgument { get; } = "\"$(ProjectPath)\" -g \"$(File)\":$(Line):$(Column)"; - - string Arguments - { - get => m_Arguments ?? (m_Arguments = EditorPrefs.GetString(vscode_argument, DefaultArgument)); - set - { - m_Arguments = value; - EditorPrefs.SetString(vscode_argument, value); - } - } - - static string[] defaultExtensions - { - get - { - var customExtensions = new[] { "json", "asmdef", "log" }; - return EditorSettings.projectGenerationBuiltinExtensions - .Concat(EditorSettings.projectGenerationUserExtensions) - .Concat(customExtensions) - .Distinct().ToArray(); - } - } - - static string[] HandledExtensions - { - get - { - return HandledExtensionsString - .Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries) - .Select(s => s.TrimStart('.', '*')) - .ToArray(); - } - } - - static string HandledExtensionsString - { - get => EditorPrefs.GetString(vscode_extension, string.Join(";", defaultExtensions)); - set => EditorPrefs.SetString(vscode_extension, value); - } - - public bool TryGetInstallationForPath(string editorPath, out CodeEditor.Installation installation) - { - var lowerCasePath = editorPath.ToLower(); - var filename = Path.GetFileName(lowerCasePath).Replace(" ", ""); - var installations = Installations; - if (!k_SupportedFileNames.Contains(filename)) - { - installation = default; - return false; - } - - if (!installations.Any()) - { - installation = new CodeEditor.Installation - { - Name = "Visual Studio Code", - Path = editorPath - }; - } - else - { - try - { - installation = installations.First(inst => inst.Path == editorPath); - } - catch (InvalidOperationException) - { - installation = new CodeEditor.Installation - { - Name = "Visual Studio Code", - Path = editorPath - }; - } - } - - return true; - } - - public void OnGUI() - { - Arguments = EditorGUILayout.TextField("External Script Editor Args", Arguments); - if (GUILayout.Button(k_ResetArguments, GUILayout.Width(120))) - { - Arguments = DefaultArgument; - } - - var prevGenerate = EditorPrefs.GetBool(vscode_generate_all, false); - - var generateAll = EditorGUILayout.Toggle("Generate all .csproj files.", prevGenerate); - if (generateAll != prevGenerate) - { - EditorPrefs.SetBool(vscode_generate_all, generateAll); - } - - m_ProjectGeneration.GenerateAll(generateAll); - - HandledExtensionsString = EditorGUILayout.TextField(new GUIContent("Extensions handled: "), HandledExtensionsString); - } - - public void CreateIfDoesntExist() - { - if (!m_ProjectGeneration.SolutionExists()) - { - m_ProjectGeneration.Sync(); - } - } - - public void SyncIfNeeded(string[] addedFiles, string[] deletedFiles, string[] movedFiles, string[] movedFromFiles, string[] importedFiles) - { - m_ProjectGeneration.SyncIfNeeded(addedFiles.Union(deletedFiles).Union(movedFiles).Union(movedFromFiles).ToList(), importedFiles); - } - - public void SyncAll() - { - AssetDatabase.Refresh(); - m_ProjectGeneration.Sync(); - } - - public bool OpenProject(string path, int line, int column) - { - if (path != "" && !SupportsExtension(path)) // Assets - Open C# Project passes empty path here - { - return false; - } - - if (line == -1) - line = 1; - if (column == -1) - column = 0; - - string arguments; - if (Arguments != DefaultArgument) - { - arguments = m_ProjectGeneration.ProjectDirectory != path - ? CodeEditor.ParseArgument(Arguments, path, line, column) - : m_ProjectGeneration.ProjectDirectory; - } - else - { - arguments = $@"""{m_ProjectGeneration.ProjectDirectory}"""; - if (m_ProjectGeneration.ProjectDirectory != path && path.Length != 0) - { - arguments += $@" -g ""{path}"":{line}:{column}"; - } - } - - if (IsOSX) - { - return OpenOSX(arguments); - } - - var app = DefaultApp; - var process = new Process - { - StartInfo = new ProcessStartInfo - { - FileName = app, - Arguments = arguments, - WindowStyle = app.EndsWith(".cmd", StringComparison.OrdinalIgnoreCase) ? ProcessWindowStyle.Hidden : ProcessWindowStyle.Normal, - CreateNoWindow = true, - UseShellExecute = true, - } - }; - - process.Start(); - return true; - } - - static bool OpenOSX(string arguments) - { - var process = new Process - { - StartInfo = new ProcessStartInfo - { - FileName = "open", - Arguments = $"-n \"{DefaultApp}\" --args {arguments}", - UseShellExecute = true, - } - }; - - process.Start(); - return true; - } - - static bool SupportsExtension(string path) - { - var extension = Path.GetExtension(path); - if (string.IsNullOrEmpty(extension)) - return false; - return HandledExtensions.Contains(extension.TrimStart('.')); - } - - public CodeEditor.Installation[] Installations => m_Discoverability.PathCallback(); - - public VSCodeScriptEditor(IDiscovery discovery, IGenerator projectGeneration) - { - m_Discoverability = discovery; - m_ProjectGeneration = projectGeneration; - } - - static VSCodeScriptEditor() - { - var editor = new VSCodeScriptEditor(new VSCodeDiscovery(), new ProjectGeneration(Directory.GetParent(Application.dataPath).FullName)); - CodeEditor.Register(editor); - - if (IsVSCodeInstallation(CodeEditor.CurrentEditorInstallation)) - { - editor.CreateIfDoesntExist(); - } - } - - static bool IsVSCodeInstallation(string path) - { - if (string.IsNullOrEmpty(path)) - { - return false; - } - - var lowerCasePath = path.ToLower(); - var filename = Path - .GetFileName(lowerCasePath.Replace('\\', Path.DirectorySeparatorChar).Replace('/', Path.DirectorySeparatorChar)) - .Replace(" ", ""); - return k_SupportedFileNames.Contains(filename); - } - - public void Initialize(string editorInstallationPath) { } - } -} diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/VSCodeScriptEditor.cs.meta b/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/VSCodeScriptEditor.cs.meta deleted file mode 100644 index a0aa5a48..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/Editor/VSCodeScriptEditor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ac3f13489022aa34d861a0320a6917b9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/LICENSE.md b/Library/PackageCache/com.unity.ide.vscode@1.1.4/LICENSE.md deleted file mode 100644 index eb18dfb7..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2019 Unity Technologies - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/LICENSE.md.meta b/Library/PackageCache/com.unity.ide.vscode@1.1.4/LICENSE.md.meta deleted file mode 100644 index 1c1e96e4..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/LICENSE.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: c9aabac5924106d4790d7b3a924ca34d -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/package.json b/Library/PackageCache/com.unity.ide.vscode@1.1.4/package.json deleted file mode 100644 index f431a909..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "com.unity.ide.vscode", - "displayName": "Visual Studio Code Editor", - "description": "Code editor integration for supporting Visual Studio Code as code editor for unity. Adds support for generating csproj files for intellisense purposes, auto discovery of installations, etc.", - "version": "1.1.4", - "unity": "2019.2", - "unityRelease": "0a12", - "dependencies": {}, - "relatedPackages": { - "com.unity.ide.vscode.tests": "1.1.4" - }, - "repository": { - "type": "git", - "url": "git@github.cds.internal.unity3d.com:unity/com.unity.ide.vscode.git", - "revision": "5b09e2bc6a13b557ca1ebf1db5f960746631630e" - } -} diff --git a/Library/PackageCache/com.unity.ide.vscode@1.1.4/package.json.meta b/Library/PackageCache/com.unity.ide.vscode@1.1.4/package.json.meta deleted file mode 100644 index 8e835390..00000000 --- a/Library/PackageCache/com.unity.ide.vscode@1.1.4/package.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: ffc6271f08270b64ca0aae9c49235d81 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/CHANGELOG.md b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/CHANGELOG.md deleted file mode 100644 index 35946fe1..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/CHANGELOG.md +++ /dev/null @@ -1,120 +0,0 @@ -# Changelog -All notable changes to this package will be documented in this file. - -The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - -## [1.5.2] - 2019-07-29 -- Fixed ToString() method of CompatibilityAssetBundleManifest to properly add new line characters and section header where multiple dependencies exist - -## [1.5.1] - 2019-07-15 -- remove preview tag - -## [1.5.0-preview] - 2019-06-13 -- Updated for API compatibility with Unity 2019.3 -- Moved CacheServerClient package into SBP. It turns out this package was not as globally useful as we thought, and we are pulling it in to ease support and discoverability. - -## [1.4.1-preview] - 2019-04-16 -- Fixed "Path is empty" exception in build cache -- Fixed an edge case where a valid cache entry could be returned for an invalid request -- Added BuildCache.PruneCache API to trim the cache down to a limit, called in the background after a build -- Moved BuildCache menu options and preferences to the "Edit/Prefferences..." window -- Added SBP_PROFILER_ENABLE define to enable per task profiling output to console -- Fixed an issue preventing PrefabPackedIdentifiers from being passed into ContentPipeline.BuildAssetBundles - -## [1.3.5-preview] - 2019-02-28 -- Minimum Unity version is now 2018.3 to address a build-time bug with progressive lightmapper. -- Added missing version into CacheEntry calculation -- Fixed build error causing AssetBundle.LoadAssetWithSubAssets to return partial results -- Updated function implementations to be virtual for overriding -- Added GetOutputFilePathForIdentifier function to generate the final file path for a given build identifier - -## [1.2.2-preview] - 2018-12-19 -- Fixed SpritePacker failing to pack SpriteAtlas objects into AssetBundles - -## [1.2.1-preview] - 2018-12-14 -- Fixed a null reference error in GenerateBundleCommands::GetSortIndex - -## [1.2.0-preview] - 2018-11-29 -- Renamed LegacyBuildPipeline & LegacyAssetBundleManifest to CompatibilityBuildPipeline & CompatibilityAssetBundleManifest. -- Moved CompatibilityAssetBundleManifest & BundleDetails into a new runtime assembly: com.unity.scriptablebuildpipeline. -- Changed CompatibilityAssetBundleManifest to inherit from ScriptableObject and updated it and BundleDetails to properly serialize using Unity's serialization systems. - -## [1.1.1-preview] - 2018-10-20 -- Reduced object duplication for scene asset bundles -- Fixed object order for scene asset bundles not being deterministic -- Fixed Shader Stripping values from Graphics Settings not applying to built data -- Fixed various code warnings for Unity 2018.3 and newer version -- Added forcing asset save on build - -## [1.1.0-preview] - 2018-10-01 -- Fixed an issue where a string hash was being used instead of a file hash causing data to not rebuild - -## [1.0.1-preview] - 2018-08-24 -- removed compile warning -- Fixed an issue where we were not using the addressableNames field of the AssetBundleBuild struct - -## [1.0.0-preview] - 2018-08-20 -- Fixed an issue in ArchiveAndCompressBundles where previous output location was being used failing to copy cached bundles to the new location -- Fixed an issue in BuildCache were built in plugin dlls did not have a hash version causing cache misses -- Fixed invalid access errors when reading access controlled files for hashing. -- Fixed an issue where you could not force rebuild asset bundles using LegacyBuildPipeline -- Implemented IEquatable on public structs -- Breaking API Change: LegacyBuildPipeline.BuildAssetBundles now returns LegacyAssetBundleManifest - - LegacyAssetBundleManifest's API is identical to AssetBundleManifest - -## [0.2.0-preview] - 2018-07-23 -- Removed ProjectInCleanState & ValidateBundleAssignments tasks and integrated them directly indo the data validation or running methods -- Added build task to append hash to asset bundle files -- Large rework of how IBuildTasks are implemented. Now using dependency injection to handle passing data. -- Added reusable BuildUsageCache for usage tag calculation performance improvements -- - Unity minimum version now 2018.2.0b9 -- Improved asset bundle hash version calculation to be unity version agnostic - -## [0.1.0-preview] - 2018-06-06 -- Added support for Cache Server integration of the Build Cache -- Refactored Build Cache internals for even more performance gains - -## [0.0.15-preview] - 2018-05-21 -- Hardened build cache against failures due to invalid data - -## [0.0.14-preview] - 2018-05-03 -- temporarily removed progress bar as it causes a recompile on mac. Will attempt to re-add selectively later. - -## [0.0.13-preview] - 2018-05-03 -- fixed hash serialization bug. - -## [0.0.12-preview] - 2018-05-02 -- Added build task for generating extra data for sprite loading edge case - -## [0.0.11-preview] - 2018-05-01 -- Updated BuildAssetBundles API to also take custom context objects -- Added support for extracting Built-In Shaders to a common bundle - -## [0.0.10-preview] - 2018-04-26 -- Added BuildAssetBundles API that takes a custom task list -- Added null checks for BuildSettings.typeDB & AssetBundleBuild.addressableNames - -## [0.0.9-preview] - 2018-04-04 -- Added documentation for IWriteOperation implementations -- Added documentation for ReturnCodes, LegacyBuildPipeline, and ContentPipeline -- Ran Unity code analysis & cleaned up warnings (boxing, performance issues, name consistency) -- Breaking api change: Changed build tasks' public static run method to private. -- Added null checks and ArgumentNullExceptions - -## [0.0.8-preview] - 2018-03-27 -- Test rename & meta file cleanup -- Added documentation for shared classes / structs -- Updated inconsistent interface / class names -- Added missing parameter to IBuildParameters -- Ran spell check -- Moved IWriteOperation to Interfaces -- Update IWriteOperation properties to PascalCase -- Added IWriteOperation documentation - -## [0.0.6-preview] - 2018-03-20 -- doc updates - -## [0.0.5-preview] - 2018-02-08 -- Initial submission for package distribution - diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/CHANGELOG.md.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/CHANGELOG.md.meta deleted file mode 100644 index 08782e6c..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/CHANGELOG.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: eb7f165f4002c4f4bb7cf6eb7f1166d9 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/CacheServerClient.md b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/CacheServerClient.md deleted file mode 100644 index d622e085..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/CacheServerClient.md +++ /dev/null @@ -1,86 +0,0 @@ -# About the Cache Server Client - -Use the Cache Server Client to upload and download files to any Unity Cache Server. The Cache Server Client is used to integrate the Unity Cache Server into processes that extend outside of the normal asset import pipeline - for example, to store and retrieve incremental artifacts of a build process. - -# Installation - -To install this package, follow the instructions in the [Package Manager documentation](https://docs.unity3d.com/Packages/com.unity.package-manager-ui@latest/index.html). - -# Usage -## API Examples -### Upload a file -```csharp -const string guidStr = "f7950ee725f9d47c7b90b02224b4534f"; -const string hashStr = "5082668810f105d565e2da3f8bf394ee"; -var fileId = FileId.From(guidStr, hashStr); - -var client = new Client("localhost", 8126); -client.Connect(); - -using(var stream = new FileStream()) -{ - client.BeginTransaction(fileId); - client.Upload(FileType.Asset, stream); - client.EndTransaction(); -} - -client.Close(); -``` -### Download a file -```csharp -const string guidStr = "f7950ee725f9d47c7b90b02224b4534f"; -const string hashStr = "5082668810f105d565e2da3f8bf394ee"; -var fileId = FileId.From(guidStr, hashStr); -var filePath = "/target/filename"; - -var client = new Client("localhost", 8126); -client.Connect(); - -// FileDownloadItem implements IDownloadItem -var downloadItem = new FileDownloadItem(fileId, FileType.Asset, filePath); -client.QueueDownload(downloadItem); - -client.DownloadFinished += (object sender, DownloadFinishedEventArgs args) => -{ - DownloadResult result = args.Result; - long size = args.Size; - long queueLength = args.DownloadQueueLength; -}; - -client.ResetDownloadFinishedEventHandler(); // cleanup -client.Close(); -``` -## Advanced - -### IDownloadItem - -Implement `IDownloadItem` to download vai WriteStream to a custom location. -## Utilities -### Upload All Assets -Quickly seed a local or remote cache server with the current project's imported assets. - -1) From the Unity Editor toolbar, select `Assets -> Cache Server -> Upload All Assets` -2) Input the destination Cache Server. The currently configured global Unity Editor setting will be used by default. -3) Press Upload - for large projects, a progress dialog will display during the upload. - -Or frome the Command Line: - -`Unity -projectPath [projectPath] -ExecuteMethod Unity.CacheServer.CacheServerUploader.UploadAllFilesToCacheServer -batchmode -quit` - -# Technical details -## Requirements - -This version of the Cache Server Client is compatible with the following versions of the Unity Editor: - -* 2017.1 and later (recommended) -* 5.6 and earlier may work but are untested - -This Cache Server Client is compatible with the following versions of the Unity Cache Server: -* [v5.x](https://github.com/Unity-Technologies/unity-cache-server) and later (recommended) -* Other Cache Server versions shipped with Unity 5.x and later - -## Document revision history -|Date|Reason| -|---|---| -|May 17, 2018|Added utility documentation.| -|May 15, 2018|Initial revision.| \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/CacheServerClient.md.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/CacheServerClient.md.meta deleted file mode 100644 index 45e03848..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/CacheServerClient.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 263aa93ee5f983b4283c7875c4ffac5d -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/GettingStarted.md b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/GettingStarted.md deleted file mode 100644 index 249b1d39..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/GettingStarted.md +++ /dev/null @@ -1,19 +0,0 @@ -# Getting started with Scriptable Build Pipeline - -## Installing the Scriptable Build Pipeline (SBP) package - -Requires Unity 2018.3 or later. - -To install this package, follow the instructions in the [Package Manager documentation](https://docs.unity3d.com/Packages/com.unity.package-manager-ui@latest). - -To build an AssetBundle, use the ContentPipeline.BuildAssetBundles() method. In its simplest form, you supply the following parameters: - -* Build Parameters - An object that implements the `IBuildParameters` interface. The object specifies the BuildTarget, the BuildTargetGroup, the output path, and additional optional properties. - -* The content to build - An object that implements the `IBundleBuildContent` interface. The object specifies the content to build (the assets) and its layout (what assets in which bundles.) - -* A results object - An object that implements the `IBundleBuildResults` interface. The object receives the details of the built AssetBundles. - -**Note:** The `UnityEditor.Build.Pipeline` namespace contains default implementations for all of the SBP required interfaces. Implementation names mirror the interfaces, with the leading 'I' removed. For example, the `IBuildParameters` interface is implemented as `BuildParameters`. - -To quickly switch to building AssetBundles with SBP, use the `CompatibilityBuildPipeline.BuildAssetBundles()` method as a drop in replacement for existing code. This method has the nearly identical parameters as the `BuildPipeline.BuildAssetBundles()` method. For additional information, see the [Usage Examples](UsageExamples.md) and [Upgrade Guide](UpgradeGuide.md). \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/GettingStarted.md.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/GettingStarted.md.meta deleted file mode 100644 index abfbade5..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/GettingStarted.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 2541c70242aefc448851603446fd4982 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/TableofContents.md b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/TableofContents.md deleted file mode 100644 index 8386f994..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/TableofContents.md +++ /dev/null @@ -1,6 +0,0 @@ -* [Scriptable Build Pipeline](index.md) - * [Getting Started](GettingStarted.md) - * [Terminology](Terminology.md) - * [Usage Examples](UsageExamples.md) - * [Upgrade Guide](UpgradeGuide.md) - * [Unity Cache Server](CacheServerClient.md) \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/TableofContents.md.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/TableofContents.md.meta deleted file mode 100644 index ee172c29..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/TableofContents.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 6b2e26372b35c4f47a102f1defd27ccb -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/Terminology.md b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/Terminology.md deleted file mode 100644 index 84840b01..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/Terminology.md +++ /dev/null @@ -1,9 +0,0 @@ -# Terminology - -**Asset** - A source file on disk, typically located in the Project’s Assets folder. This file is imported to a game-ready representation of your Asset internally which can contain multiple Objects (SubAssets.) - -**Object** (SubAsset) - A single Unity serializable unit. Also known as a **SubAsset**. An imported Asset is made up of one or more Objects. - -**Includes** - The unique set of Objects from which an Asset is constructed. - -**References** - The unique set of Objects that are needed (referenced) by the Includes of an Asset, but not included in the Asset. \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/Terminology.md.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/Terminology.md.meta deleted file mode 100644 index 9336a70e..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/Terminology.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 1e6053f8fe15edc40965c55cac4e2bca -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/UpgradeGuide.md b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/UpgradeGuide.md deleted file mode 100644 index a6aa94a0..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/UpgradeGuide.md +++ /dev/null @@ -1,31 +0,0 @@ -# Upgrade Guide - -To build your AssetBundles with the SBP package, use the `CompatibilityBuildPipeline.BuildAssetBundles` method wherever you used the `BuildPipeline.BuildAssetBundle` method. - -**Note:** Not all of the features that were supported previously are supported in SBP. - -The following tables list the features of the `CompatibilityBuildPipeline.BuildAssetBundles` method in comparison to the `BuildPipeline.BuildAssetBundle` method. - -| Feature| Support | Notes | -|:---|:---|:---| -| AssetBundles| Supported | SBP builds AssetBundles built nearly identically to the previous build pipeline. You load them in a similar manner to how you currently load AssetBundles. | -| Incremental Building | Supported | SBP implements this feature using the new `BuildCache` class. | -| Asset loading path| Behavior changed | AssetBundles built with BuildPipeline today support loading an Asset by full path: *Assets/ExampleFolder/Asset.prefab*, file name: *Asset*, or file name with extension: *Asset.prefab*. However AssetBundles built with SBP by default only support loading an Asset by full path: *Assets/ExampleFolder/Asset.prefab*. This is to avoid loading collision that can occur if two Assets in the same AssetBundle have the different full paths, but the same file name. To change this behavior, the loading path can be set using `IBundleBuildContent.Addresses` with the `ContentPipeline.BuildAssetBundles` API or use the [AssetBundleBuild.addressableNames](https://docs.unity3d.com/ScriptReference/AssetBundleBuild-addressableNames.html) field. See [Usage Examples](UsageExamples.md). | -| AssetBundle Manifest | Behavior changed | SBP implements replacement functionality using the new class name `CompatibilityAssetBundleManifest`. This has an identical API to the existing `AssetBundleManifest` class, and has an additional method to get the CRC value for a bundle which did not exist before. | -| AssetBundle Variants| Not supported | There is currently no replacement functionality for AssetBundle Variants. | - -BuildAssetBundleOptions Enum: - -| Value| Support | Notes | -|:---|:---|:---| -| UncompressedAssetBundle| Supported | Identical to using `BuildCompression.DefaultUncompressed`. | -| ChunkBasedCompression | Supported | Identical to using `BuildCompression.DefaultLZ4`. **Note:** This has always been LZ4HC in the Editor, and LZ4 if it was recompressed at Runtime. | -| DisableWriteTypeTree | Supported | Identical to using `ContentBuildFlags.DisableWriteTypeTree`. | -| DeterministicAssetBundle | Supported | This is enabled by default, and it can’t be disabled. SBP builds deterministically. | -| ForceRebuildAssetBundle | Supported | Identical to using `IBuildParameters.UseCache = false;`. | -| AppendHashToAssetBundleName | Supported | Identical to using `IBundleBuildParameters.AppendHash = true;`. | -| DisableLoadAssetByFileName | Always enabled | This is enabled by default, and can’t be disabled. SBP is strict about the rule: "what you pass in is exactly what you get out". If you pass in *My/Example1/Example2/Asset.asset* as the file name to use to load the Asset, you must use that identifier exactly, including the correct upper and lower case, and all punctuation. | -| DisableLoadAssetByFileNameWithExtension | Always enabled | See above details on DisableLoadAssetByFileName. | -| IgnoreTypeTreeChanges | Not supported | The incremental build system used this value to prevent rebuilding AssetBundles when an Asset's serialization layout changed, but the data for the Asset itself did not change. SBP currently rebuilds if there are any changes. | -| StrictMode | Not supported | The SBP is stricter about properly building AssetBundles and knowing when builds fail. | -| DryRunBuild | Not supported | SBP works fundamentally differently. It is faster to do a full build to determine if anything has changed. | \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/UpgradeGuide.md.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/UpgradeGuide.md.meta deleted file mode 100644 index 4665007d..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/UpgradeGuide.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 266785459f1a968469d8d75029c09c7a -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/UsageExamples.md b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/UsageExamples.md deleted file mode 100644 index 0c5423bc..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/UsageExamples.md +++ /dev/null @@ -1,179 +0,0 @@ -# Usage Examples - -## Basic Example -This example assumes that your are already familiar with the basic usage of the two `BuildPipeline.BuildAssetBundles` methods and want to switch to using Scriptable Build Pipeline with as little effort as possible. - -The following code example shows how AssetBundles are currently built: - -```csharp -using System.IO; -using UnityEditor; - -public static class BuildAssetBundlesExample -{ - public static bool BuildAssetBundles(string outputPath, bool forceRebuild, bool useChunkBasedCompression, BuildTarget buildTarget) - { - var options = BuildAssetBundleOptions.None; - if (useChunkBasedCompression) - options |= BuildAssetBundleOptions.ChunkBasedCompression; - - if (forceRebuild) - options |= BuildAssetBundleOptions.ForceRebuildAssetBundle; - - Directory.CreateDirectory(outputPath); - var manifest = BuildPipeline.BuildAssetBundles(outputPath, options, buildTarget); - return manifest != null; - } -} -``` - -To update the previous code example to use SBP instead, add a new `using UnityEditor.Build.Pipeline` and replace the call to `BuildPipeline.BuildAssetBundles` with `CompatibilityBuildPipeline.BuildAssetBundles` as shown below: - -```csharp -using System.IO; -using UnityEditor; -// Added new using -using UnityEditor.Build.Pipeline; - -public static class BuildAssetBundlesExample -{ - public static bool BuildAssetBundles(string outputPath, bool forceRebuild, bool useChunkBasedCompression, BuildTarget buildTarget) - { - var options = BuildAssetBundleOptions.None; - if (useChunkBasedCompression) - options |= BuildAssetBundleOptions.ChunkBasedCompression; - - if (forceRebuild) - options |= BuildAssetBundleOptions.ForceRebuildAssetBundle; - - Directory.CreateDirectory(outputPath); - // Replaced BuildPipeline.BuildAssetBundles with CompatibilityBuildPipeline.BuildAssetBundles here - var manifest = CompatibilityBuildPipeline.BuildAssetBundles(outputPath, options, buildTarget); - return manifest != null; - } -} -``` -**Notes:** Some changes in the SBP building and loading process do not match the BuildPipeline behavior. For more information on these changes, see [Upgrade Guide](UpgradeGuide.md). - -## Cache Server Integration Example -This following example shows how to share build artifacts between team members or multiple machines to achieve faster build times. - -Requirements: -1. A separate Cache Server instance dedicated to build artifacts. It cannot be shared as an Asset Cache Server as data collisions will occur. -2. The build code must use the `ContentPipeline.BuildAssetBundles` method. -3. `BundleBuildParameters.UseCache` is set to true. -4. `BundleBuildParameters.CacheServerHost` and `BundleBuildParameters.CacheServerPort` are set to the cache server instance host or IP address and port respectively. - -Example code: - -```csharp -public static class BuildAssetBundlesExample -{ - public static bool BuildAssetBundles(string outputPath, bool useChunkBasedCompression, BuildTarget buildTarget, BuildTargetGroup buildGroup) - { - var buildContent = new BundleBuildContent(ContentBuildInterface.GenerateAssetBundleBuilds()); - var buildParams = new BundleBuildParameters(buildTarget, buildGroup, outputPath); - // Set build parameters for connecting to the Cache Server - buildParams.UseCache = true; - buildParams.CacheServerHost = "buildcache.unitygames.com"; - buildParams.CacheServerPort = 8126; - - if (useChunkBasedCompression) - buildParams.BundleCompression = BuildCompression.DefaultLZ4; - - IBundleBuildResults results; - ReturnCode exitCode = ContentPipeline.BuildAssetBundles(buildParams, buildContent, out results); - return exitCode == ReturnCode.Success; - } -} -``` - -## Per-Bundle Compression Example -The following example shows how to build your AssetBundles using different compression levels for each AssetBundle.This is useful if you are planning on shipping part of your bundles as Lz4 or Uncompressed with Player and want to download the remainder as Lzma later. - -The simplest implementation is to create a custom build parameters class that inherits from `BundleBuildParameters` and override the `GetCompressionForIdentifier` method. Then construct and pass this into the `ContentPipeline.BuildAssetBundles` method. - -```csharp -using UnityEditor; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline; -using UnityEditor.Build.Pipeline.Interfaces; - -public static class BuildAssetBundlesExample -{ - // New parameters class inheriting from BundleBuildParameters - class CustomBuildParameters : BundleBuildParameters - { - public Dictionary PerBundleCompression { get; set; } - - public CustomBuildParameters(BuildTarget target, BuildTargetGroup group, string outputFolder) : base(target, group, outputFolder) - { - PerBundleCompression = new Dictionary(); - } - - // Override the GetCompressionForIdentifier method with new logic - public override BuildCompression GetCompressionForIdentifier(string identifier) - { - BuildCompression value; - if (PerBundleCompression.TryGetValue(identifier, out value)) - return value; - return BundleCompression; - } - } - - public static bool BuildAssetBundles(string outputPath, bool useChunkBasedCompression, BuildTarget buildTarget, BuildTargetGroup buildGroup) - { - var buildContent = new BundleBuildContent(ContentBuildInterface.GenerateAssetBundleBuilds()); - // Construct the new parameters class - var buildParams = new CustomBuildParameters(buildTarget, buildGroup, outputPath); - // Populate the bundle specific compression data - buildParams.PerBundleCompression.Add("Bundle1", BuildCompression.DefaultUncompressed); - buildParams.PerBundleCompression.Add("Bundle2", BuildCompression.DefaultLZMA); - - if (m_Settings.compressionType == CompressionType.None) - buildParams.BundleCompression = BuildCompression.DefaultUncompressed; - else if (m_Settings.compressionType == CompressionType.Lzma) - buildParams.BundleCompression = BuildCompression.DefaultLZMA; - else if (m_Settings.compressionType == CompressionType.Lz4 || m_Settings.compressionType == CompressionType.Lz4HC) - buildParams.BundleCompression = BuildCompression.DefaultLZ4; - - IBundleBuildResults results; - ReturnCode exitCode = ContentPipeline.BuildAssetBundles(buildParams, buildContent, out results); - return exitCode == ReturnCode.Success; - } -} -``` - -## Load By File Name Example -The following example shows how to use the `CompatibilityBuildPipeline` methods to load by a filename instead of the full path. - -The example uses the `ContentBuildInterface.GenerateAssetBundleBuilds()` method to get the set of bundles and assets to build, then modifies `addressableNames` field to set the loading path of the filename instead of the full path. - -```csharp -using System.Linq; -using UnityEditor; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline; - -public static class BuildAssetBundlesExample -{ - public static bool BuildAssetBundles(string outputPath, bool forceRebuild, bool useChunkBasedCompression, BuildTarget buildTarget) - { - var options = BuildAssetBundleOptions.None; - if (useChunkBasedCompression) - options |= BuildAssetBundleOptions.ChunkBasedCompression; - - if (forceRebuild) - options |= BuildAssetBundleOptions.ForceRebuildAssetBundle; - - // Get the set of bundle to build - var bundles = ContentBuildInterface.GenerateAssetBundleBuilds(); - // Update the addressableNames to load by the file name without extension - for (var i = 0; i < bundles.Length; i++) - bundles[i].addressableNames = bundles[i].assetNames.Select(Path.GetFileNameWithoutExtension).ToArray(); - - var manifest = CompatibilityBuildPipeline.BuildAssetBundles(m_Settings.outputPath, bundles, options, m_Settings.buildTarget); - return manifest != null; - } -} -``` diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/UsageExamples.md.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/UsageExamples.md.meta deleted file mode 100644 index ee7f2ff8..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/UsageExamples.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 0d142c6ddde5f86428c60bc924edae0e -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/index.md b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/index.md deleted file mode 100644 index e8ad8282..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/index.md +++ /dev/null @@ -1,5 +0,0 @@ -# Unity Scriptable Build Pipeline - -The Scriptable Build Pipeline (SBP) package allows you to control how Unity builds content. The package moves the previously C++-only build pipeline code to a public C# package with a pre-defined build flow for building AssetBundles. The pre-defined AssetBundle build flow reduces build time, improves incremental build processing, and provides greater flexibility than before. - -If you are moving from using BuildPipeline methods to the SBP, see the [Usage Examples](UsageExamples.md) and [Upgrade Guide](UpgradeGuide.md). diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/index.md.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/index.md.meta deleted file mode 100644 index d5814328..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Documentation~/index.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 0f39cb52d59e44a40b4cf36f34ccae52 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor.meta deleted file mode 100644 index 7035df9f..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: d90bb9eec8948a94991952bcad49c572 -folderAsset: yes -timeCreated: 1504709530 -licenseType: Pro -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/AssemblyInfo.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/AssemblyInfo.cs deleted file mode 100644 index 82503411..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/AssemblyInfo.cs +++ /dev/null @@ -1,3 +0,0 @@ -using System.Runtime.CompilerServices; - -[assembly: InternalsVisibleTo("Unity.ScriptableBuildPipeline.Editor.Tests")] \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/AssemblyInfo.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/AssemblyInfo.cs.meta deleted file mode 100644 index 65584baa..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/AssemblyInfo.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f13538c0e661bcc4c979c0f336830337 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer.meta deleted file mode 100644 index be70a11f..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: af24b50f4a1bf85459001d38afa5850e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/CacheServerUploader.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/CacheServerUploader.cs deleted file mode 100644 index 90b9dc25..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/CacheServerUploader.cs +++ /dev/null @@ -1,130 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using UnityEngine; - -namespace UnityEditor.Build.CacheServer -{ - /// - /// The CacheServerUploader is responsible for uploading assets to a given Cache Server. - /// - public static class CacheServerUploader - { - private struct Transaction - { - public struct FileInfo - { - public readonly FileType type; - public readonly string path; - - public FileInfo(FileType type, string path) - { - this.type = type; - this.path = path; - } - } - - public readonly FileId fileId; - public readonly FileInfo[] files; - - private Transaction(FileId fileId, FileInfo[] files) - { - this.fileId = fileId; - this.files = files; - } - - public static Transaction CreateForAssetPath(string assetPath) - { - var projectRoot = Directory.GetParent(Application.dataPath).FullName; - - var guid = AssetDatabase.AssetPathToGUID(assetPath); - var hash = AssetDatabase.GetAssetDependencyHash(assetPath); - - var libPath = - new[] {projectRoot, "Library", "metadata", guid.Substring(0, 2), guid} - .Aggregate(string.Empty, Path.Combine); - - if (!File.Exists(libPath)) - { - throw new Exception("Cannot find Library representation for GUID " + guid); - } - - var files = new List - { - new FileInfo(FileType.Asset, libPath) - }; - - var infoLibPath = libPath + ".info"; - if (File.Exists(infoLibPath)) - { - files.Add(new FileInfo(FileType.Info, infoLibPath)); - } - - var resLibPath = libPath + ".resource"; - if (File.Exists(resLibPath)) - { - files.Add(new FileInfo(FileType.Resource, resLibPath)); - } - - return new Transaction(FileId.From(guid, hash.ToString()), files.ToArray()); - } - } - - /// - /// Synchronize project library with the configured Cache Server. - /// - public static void UploadAllFilesToCacheServer() - { - string host; - int port; - Util.ParseCacheServerIpAddress(Util.ConfigCacheServerAddress, out host, out port); - UploadAllFilesToCacheServer(host, port); - } - - /// - /// Synchronize project library folder with a remote Cache Server. - /// - /// Host name or IP or remote Cache Server - /// Port number for remote Cache Server - public static void UploadAllFilesToCacheServer(string host, int port) - { - var client = new Client(host, port); - client.Connect(); - - var assetPaths = AssetDatabase.GetAllAssetPaths(); - var len = assetPaths.Length; - - for (var i = 0; i < len; i++) - { - var path = assetPaths[i]; - if (!File.Exists(path)) - continue; - - var progress = (float) (i + 1) / (len + 1); - - if (EditorUtility.DisplayCancelableProgressBar("Uploading to Cache Server", path, progress)) break; - - try - { - var trx = Transaction.CreateForAssetPath(path); - client.BeginTransaction(trx.fileId); - - foreach (var file in trx.files) - using (var stream = new FileStream(file.path, FileMode.Open, FileAccess.Read)) - client.Upload(file.type, stream); - - client.EndTransaction(); - } - catch (Exception e) - { - Debug.LogError(e); - break; - } - } - - EditorUtility.ClearProgressBar(); - client.Close(); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/CacheServerUploader.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/CacheServerUploader.cs.meta deleted file mode 100644 index 68214d38..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/CacheServerUploader.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e766efa9ccaf441728f810262e5ca359 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/CacheServerUploaderWindow.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/CacheServerUploaderWindow.cs deleted file mode 100644 index e4c1a2db..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/CacheServerUploaderWindow.cs +++ /dev/null @@ -1,88 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityEditor.Build.CacheServer -{ - /// - /// The Cache Server Uploader window. This interface will upload your assets to a the given address of a Cache Server. - /// - public class CacheServerUploaderWindow : EditorWindow - { - private string m_address; - - private void Awake() - { - m_address = Util.ConfigCacheServerAddress; - titleContent = new GUIContent("CS Upload"); - } - - private bool ValidateAddress() - { - string host; - int port; - Util.ParseCacheServerIpAddress(m_address, out host, out port); - - var c = new Client(host, port); - try - { - c.Connect(); - c.Close(); - } - catch (Exception e) - { - Debug.LogError(e); - return false; - } - - return true; - } - - private void OnGUI() - { - EditorGUILayout.BeginHorizontal(); - EditorGUILayout.LabelField("Cache Server Address: "); - m_address = GUILayout.TextField(m_address); - EditorGUILayout.EndHorizontal(); - - GUILayout.FlexibleSpace(); - - EditorGUILayout.BeginHorizontal(); - - if (GUILayout.Button("Upload") && EditorUtility.DisplayDialog("Upload to Cache Server", - "This will upload all assets in your Library folder to the specified Cache Server.", "Continue", "Cancel")) - { - GetWindow().Close(); - if (!ValidateAddress()) - { - Debug.LogError("Could not connect to Cache Server"); - return; - } - - string host; - int port; - Util.ParseCacheServerIpAddress(m_address, out host, out port); - CacheServerUploader.UploadAllFilesToCacheServer(host, port); - } - - if (GUILayout.Button("Cancel")) - { - GetWindow().Close(); - } - - EditorGUILayout.EndHorizontal(); - } - - private void OnInspectorUpdate() - { - Repaint(); - } - - - [MenuItem("Assets/Cache Server/Upload All Assets")] - public static void UploadAllFilesToCacheServerMenuItem() - { - var window = GetWindow(); - window.ShowUtility(); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/CacheServerUploaderWindow.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/CacheServerUploaderWindow.cs.meta deleted file mode 100644 index 8887f9ef..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/CacheServerUploaderWindow.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c18f0df0496b5418bbb5a34c4c30d6e8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/Client.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/Client.cs deleted file mode 100644 index ead7fc77..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/Client.cs +++ /dev/null @@ -1,493 +0,0 @@ -using System; -using System.Collections; -using System.Text; -using System.Collections.Generic; -using System.IO; -using System.Net.Sockets; -using UnityEngine; - -namespace UnityEditor.Build.CacheServer -{ - /// - /// The type of a particular file. - /// - public enum FileType - { - Asset = 'a', - Info = 'i', - Resource = 'r' - } - - /// - /// The result returned by a download operation. - /// - public enum DownloadResult - { - Failure = 0, - FileNotFound = 1, - Success = 2 - } - - /// - /// A GUID/Hash pair that uniquely identifies a particular file. For each FileId, the Cache Server can store a separate - /// binary stream for each FileType. - /// - public struct FileId : IEqualityComparer - { - /// - /// The guid byte array. - /// - public readonly byte[] guid; - - /// - /// The hash code byte array. - /// - public readonly byte[] hash; - - /// - /// A structure used to identify a file by guid and hash code. - /// - /// File GUID. - /// File hash code. - private FileId(byte[] guid, byte[] hash) - { - this.guid = guid; - this.hash = hash; - } - - /// - /// Create a FileId given a string guid and string hash code representation. - /// - /// GUID string representation. - /// Hash code string representation. - /// - public static FileId From(string guidStr, string hashStr) - { - if (guidStr.Length != 32) - throw new ArgumentException("Length != 32", "guidStr"); - - if (hashStr.Length != 32) - throw new ArgumentException("Length != 32", "hashStr"); - - return new FileId(Util.StringToGuid(guidStr), Util.StringToHash(hashStr)); - } - - /// - /// Create a FileId given a byte array guid and byte array hash code. - /// - /// GUID byte array. - /// Hash code byte array. - /// - public static FileId From(byte[] guid, byte[] hash) - { - if (guid.Length != 16) - throw new ArgumentException("Length != 32", "guid"); - - if (hash.Length != 16) - throw new ArgumentException("Length != 32", "hash"); - - return new FileId(guid, hash); - } - - /// - /// Check equality of two objects given their guid and hash code. - /// - /// lhs object. - /// rhs object. - /// - public new bool Equals(object x, object y) - { - var hash1 = (byte[]) x; - var hash2 = (byte[]) y; - - if (hash1.Length != hash2.Length) - return false; - - for (var i = 0; i < hash1.Length; i++) - if (hash1[i] != hash2[i]) - return false; - - return true; - } - - /// - /// Get the hash code for a specific object. - /// - /// The object you want the hash code for. - /// - public int GetHashCode(object obj) - { - var hc = 17; - hc = hc * 23 + guid.GetHashCode(); - hc = hc * 23 + hash.GetHashCode(); - return hc; - } - } - - /// - /// Exception thrown when an upload operation is not properly isolated within a begin/end transaction - /// - public class TransactionIsolationException : Exception - { - public TransactionIsolationException(string msg) : base(msg) { } - } - - /// - /// EventArgs passed to the DownloadFinished event handler - /// - public class DownloadFinishedEventArgs : EventArgs - { - /// - /// EventArgs download result code. - /// - public DownloadResult Result { get; set; } - - /// - /// The downloaded item. - /// - public IDownloadItem DownloadItem { get; set; } - - /// - /// The size of the downloaded item. - /// - public long Size { get; set; } - - /// - /// The length of the download queue. - /// - public long DownloadQueueLength { get; set; } - } - - /// - /// A client API for uploading and downloading files from a Cache Server - /// - public class Client - { - private enum StreamReadState - { - Response, - Size, - Id - } - - private const int ProtocolVersion = 254; - private const string CmdTrxBegin = "ts"; - private const string CmdTrxEnd = "te"; - private const string CmdGet = "g"; - private const string CmdPut = "p"; - private const string CmdQuit = "q"; - - private const int ResponseLen = 2; - private const int SizeLen = 16; - private const int GuidLen = 16; - private const int HashLen = 16; - private const int IdLen = GuidLen + HashLen; - private const int ReadBufferLen = 64 * 1024; - - private readonly Queue m_downloadQueue; - private readonly TcpClient m_tcpClient; - private readonly string m_host; - private readonly int m_port; - private NetworkStream m_stream; - private readonly byte[] m_streamReadBuffer; - private int m_streamBytesRead; - private int m_streamBytesNeeded; - private StreamReadState m_streamReadState = StreamReadState.Response; - private DownloadFinishedEventArgs m_nextFileCompleteEventArgs; - private Stream m_nextWriteStream; - private bool m_inTrx; - - /// - /// Returns the number of items in the download queue - /// - public int DownloadQueueLength - { - get { return m_downloadQueue.Count; } - } - - /// - /// Event fired when a queued download request finishes. - /// - public event EventHandler DownloadFinished; - - /// - /// Remove all listeners from the DownloadFinished event - /// - public void ResetDownloadFinishedEventHandler() - { - DownloadFinished = null; - } - - /// - /// Create a new Cache Server client - /// - /// The host name or IP of the Cache Server. - /// The port number of the Cache Server. Default port is 8126. - public Client(string host, int port = 8126) - { - m_streamReadBuffer = new byte[ReadBufferLen]; - m_downloadQueue = new Queue(); - m_tcpClient = new TcpClient(); - m_host = host; - m_port = port; - } - - /// - /// Connects to the Cache Server and sends a protocol version handshake. - /// - /// - public void Connect() - { - var client = m_tcpClient; - client.Connect(m_host, m_port); - m_stream = client.GetStream(); - SendVersion(); - } - - /// - /// Connects to the Cache Server and sends a protocol version handshake. A TimeoutException is thrown if the connection cannot - /// be established within milliseconds. - /// - /// - /// - /// - public void Connect(int timeoutMs) - { - var client = m_tcpClient; - var op = client.BeginConnect(m_host, m_port, null, null); - - var connected = op.AsyncWaitHandle.WaitOne(TimeSpan.FromMilliseconds(timeoutMs)); - - if(!connected) - throw new TimeoutException(); - - m_stream = client.GetStream(); - SendVersion(); - } - - /// - /// Begin an upload transaction for an asset. Transactions in process can be interupted by calling BeginTransaction - /// again before calling EndTransaction. - /// - /// - public void BeginTransaction(FileId fileId) - { - m_inTrx = true; - m_stream.Write(Encoding.ASCII.GetBytes(CmdTrxBegin), 0, 2); - m_stream.Write(fileId.guid, 0, GuidLen); - m_stream.Write(fileId.hash, 0, HashLen); - } - - /// - /// Upload from the given stream for the given FileType. Will throw an exception if not preceeded by BeginTransaction. - /// - /// - /// - /// - /// - public void Upload(FileType type, Stream readStream) - { - if(!m_inTrx) - throw new TransactionIsolationException("Upload without BeginTransaction"); - - if(!readStream.CanRead || !readStream.CanSeek) - throw new ArgumentException(); - - m_stream.Write(Encoding.ASCII.GetBytes(CmdPut + (char) type), 0, 2); - m_stream.Write(Util.EncodeInt64(readStream.Length), 0, SizeLen); - - var buf = new byte[ReadBufferLen]; - while (readStream.Position < readStream.Length - 1) - { - var len = readStream.Read(buf, 0, ReadBufferLen); - m_stream.Write(buf, 0, len); - } - } - - /// - /// Commit the uploaded files to the Cache Server. Will throw an exception if not preceeded by BeginTransaction. - /// - /// - public void EndTransaction() - { - if(!m_inTrx) - throw new TransactionIsolationException("EndTransaction without BeginTransaction"); - - m_inTrx = false; - m_stream.Write(Encoding.ASCII.GetBytes(CmdTrxEnd), 0, 2); - } - - /// - /// Send a download request to the Cache Server. Listen to the DownloadComplete event to read the results. - /// - /// The IDownloadItem that specifies which file to download - public void QueueDownload(IDownloadItem downloadItem) - { - m_stream.Write(Encoding.ASCII.GetBytes(CmdGet + (char) downloadItem.Type), 0, 2); - m_stream.Write(downloadItem.Id.guid, 0, GuidLen); - m_stream.Write(downloadItem.Id.hash, 0, HashLen); - m_downloadQueue.Enqueue(downloadItem); - - if(m_downloadQueue.Count == 1) - ReadNextDownloadResult(); - } - - /// - /// Close the connection to the Cache Server. Sends the 'quit' command and closes the network stream. - /// - public void Close() - { - if(m_stream != null) - m_stream.Write(Encoding.ASCII.GetBytes(CmdQuit), 0, 1); - - if(m_tcpClient != null) - m_tcpClient.Close(); - } - - private void SendVersion() - { - var encodedVersion = Util.EncodeInt32(ProtocolVersion, true); - m_stream.Write(encodedVersion, 0, encodedVersion.Length); - - var versionBuf = new byte[8]; - var pos = 0; - while (pos < versionBuf.Length - 1) - { - pos += m_stream.Read(versionBuf, 0, versionBuf.Length); - } - - if(Util.ReadUInt32(versionBuf, 0) != ProtocolVersion) - throw new Exception("Server version mismatch"); - } - - private void OnDownloadFinished(DownloadFinishedEventArgs e) - { - m_downloadQueue.Dequeue(); - e.DownloadQueueLength = m_downloadQueue.Count; - - if (DownloadFinished != null) - DownloadFinished(this, e); - - if(m_downloadQueue.Count > 0) - ReadNextDownloadResult(); - } - - private void ReadNextDownloadResult() - { - m_streamReadState = StreamReadState.Response; - m_streamBytesNeeded = ResponseLen; - m_streamBytesRead = 0; - m_nextFileCompleteEventArgs = new DownloadFinishedEventArgs { Result = DownloadResult.Failure }; - BeginReadHeader(); - } - - private void BeginReadHeader() - { - m_stream.BeginRead(m_streamReadBuffer, - 0, - m_streamBytesNeeded - m_streamBytesRead, - EndReadHeader, - m_stream); - } - - private void EndReadHeader(IAsyncResult r) - { - var bytesRead = m_stream.EndRead(r); - if (bytesRead <= 0) return; - - m_streamBytesRead += bytesRead; - - if (m_streamBytesRead < m_streamBytesNeeded) - { - BeginReadHeader(); - return; - } - - switch (m_streamReadState) - { - case StreamReadState.Response: - if (Convert.ToChar(m_streamReadBuffer[0]) == '+') - { - m_streamReadState = StreamReadState.Size; - m_streamBytesNeeded = SizeLen; - } - else - { - m_nextFileCompleteEventArgs.Result = DownloadResult.FileNotFound; - m_streamReadState = StreamReadState.Id; - m_streamBytesNeeded = IdLen; - } - - break; - - case StreamReadState.Size: - m_nextFileCompleteEventArgs.Size = Util.ReadUInt64(m_streamReadBuffer, 0); - m_streamReadState = StreamReadState.Id; - m_streamBytesNeeded = IdLen; - break; - - case StreamReadState.Id: - var next = m_downloadQueue.Peek(); - m_nextFileCompleteEventArgs.DownloadItem = next; - - var match = - Util.ByteArraysAreEqual(next.Id.guid, 0, m_streamReadBuffer, 0, GuidLen) && - Util.ByteArraysAreEqual(next.Id.hash, 0, m_streamReadBuffer, GuidLen, HashLen); - - if (!match) - { - Close(); - throw new InvalidDataException(); - } - - if (m_nextFileCompleteEventArgs.Result == DownloadResult.FileNotFound) - { - OnDownloadFinished(m_nextFileCompleteEventArgs); - } - else - { - var size = m_nextFileCompleteEventArgs.Size; - m_nextWriteStream = next.GetWriteStream(size); - m_streamBytesNeeded = (int) size; - m_streamBytesRead = 0; - BeginReadData(); - } - - return; - - default: - throw new ArgumentOutOfRangeException(); - } - - m_streamBytesRead = 0; - BeginReadHeader(); - } - - private void BeginReadData() - { - var len = Math.Min(ReadBufferLen, m_streamBytesNeeded - m_streamBytesRead); - m_stream.BeginRead(m_streamReadBuffer, 0, len, EndReadData, null); - } - - private void EndReadData(IAsyncResult readResult) - { - var bytesRead = m_stream.EndRead(readResult); - Debug.Assert(bytesRead > 0); - m_streamBytesRead += bytesRead; - - var writeResult = m_nextWriteStream.BeginWrite(m_streamReadBuffer, 0, bytesRead, null, null); - m_nextWriteStream.EndWrite(writeResult); - - if (m_streamBytesRead < m_streamBytesNeeded) - { - BeginReadData(); - } - else - { - m_nextFileCompleteEventArgs.DownloadItem.Finish(); - m_nextFileCompleteEventArgs.Result = DownloadResult.Success; - OnDownloadFinished(m_nextFileCompleteEventArgs); - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/Client.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/Client.cs.meta deleted file mode 100644 index 27cf680a..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/Client.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 02aa99c7f5d8f4c77810419ebddad96d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/FileDownloadItem.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/FileDownloadItem.cs deleted file mode 100644 index 55dc3114..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/FileDownloadItem.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; -using System.IO; -using UnityEngine; - -namespace UnityEditor.Build.CacheServer -{ - /// - /// - /// IDownloadItem implementation for downloading to a file specified by path - /// - public class FileDownloadItem : IDownloadItem - { - private Stream m_writeStream; - private string m_tmpPath; - - /// - /// The FileId for the FileDownloadItem. FileId consists of an assets guid and hash code. - /// - public FileId Id { get; private set; } - - /// - /// The type of the FileDownloadItems desired item. - /// - public FileType Type { get; private set; } - - /// - /// File path where downloaded file data is saved. Data is first written to a temporary file location, and moved - /// into place when the Finish() method is called by the Cache Server Client. - /// - public string FilePath { get; private set; } - - /// - /// Gets the write stream for a given FileDownloadItem. If one does not exist, it will be created. - /// - /// - /// - public Stream GetWriteStream(long size) - { - if (m_writeStream == null) - { - m_tmpPath = Path.GetTempFileName(); - m_writeStream = new FileStream(m_tmpPath, FileMode.Create, FileAccess.Write); - } - - return m_writeStream; - } - - /// - /// Create a new FileDownloadItem - /// - /// The FileId of the desired item. - /// The FileType of the desired item. - /// The path of the desired item. - public FileDownloadItem(FileId fileId, FileType fileType, string path) - { - Id = fileId; - Type = fileType; - FilePath = path; - } - - /// - /// Dispose the FileDownloadItems write stream and move the data from the temporary path to its final destination. - /// - public void Finish() - { - if (m_writeStream == null) - return; - - m_writeStream.Dispose(); - try - { - if(File.Exists(FilePath)) - File.Delete(FilePath); - - File.Move(m_tmpPath, FilePath); - } - catch (Exception e) - { - Debug.LogError(e); - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/FileDownloadItem.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/FileDownloadItem.cs.meta deleted file mode 100644 index 656fdfe5..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/FileDownloadItem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e253c6be7d9134114a9b533965c2b45f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/IDownloadItem.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/IDownloadItem.cs deleted file mode 100644 index 770131fc..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/IDownloadItem.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.IO; - -namespace UnityEditor.Build.CacheServer -{ - /// - /// Represents a single file download request from a Cache Server. - /// - public interface IDownloadItem - { - /// - /// the FileId (guid/hash pair) of the file to download - /// - FileId Id { get; } - - /// - /// the FileType for the given FileId to download - /// - FileType Type { get; } - - /// - /// Provides a writable stream for saving downloaded file bytes - /// - /// Size of file to download - /// A writable stream - Stream GetWriteStream(long size); - - /// - /// Method called when a download is finished. Used to finalize and cleanup a single file download. e.g. to move - /// a temporary file into place. - /// - void Finish(); - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/IDownloadItem.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/IDownloadItem.cs.meta deleted file mode 100644 index dc48d85d..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/IDownloadItem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 31314932afa7e4ce3ab642bfbc2dd8ff -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/UnityEditor.CacheServer.asmdef b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/UnityEditor.CacheServer.asmdef deleted file mode 100644 index 37f42daa..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/UnityEditor.CacheServer.asmdef +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "UnityEditor.CacheServer", - "references": [], - "includePlatforms": [ - "Editor" - ], - "excludePlatforms": [], - "allowUnsafeCode": false, - "overrideReferences": false, - "precompiledReferences": [], - "autoReferenced": true, - "defineConstraints": [], - "versionDefines": [] -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/UnityEditor.CacheServer.asmdef.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/UnityEditor.CacheServer.asmdef.meta deleted file mode 100644 index 71259ce9..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/UnityEditor.CacheServer.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 27fb11404301449859aa664f4cb020e0 -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/Util.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/Util.cs deleted file mode 100644 index 560eef7d..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/Util.cs +++ /dev/null @@ -1,163 +0,0 @@ -using System; -using System.Diagnostics; -using System.Globalization; -using System.Runtime.CompilerServices; -using System.Text; - -[assembly: InternalsVisibleTo("UnityEditor.CacheServerTests")] - -namespace UnityEditor.Build.CacheServer -{ - internal static class Util - { - private const string IpAddressKey = "CacheServerIPAddress"; - - private static int ReverseByte(int b) - { - return ((b & 0x0F) << 4) | ((b >> 4) & 0x0F); - } - - private static byte[] StringToByteArray(string input, bool asGuid) - { - var bytes = new byte[input.Length / 2]; - for (var i = 0; i < input.Length; i += 2) - { - var b = Convert.ToByte(input.Substring(i, 2), 16); - bytes[i / 2] = asGuid ? (byte) ReverseByte(b) : b; - } - - return bytes; - } - - /// - /// Convert a hex string to a byte array that represents an Asset Hash - /// - /// 32 character hex string - /// byte array - public static byte[] StringToHash(string hashStr) - { - Debug.Assert(hashStr.Length == 32); - return StringToByteArray(hashStr, false); - } - - /// - /// Convert a hex string to a byte array that represents an Asset GUID - /// - /// 32 character hex string - /// byte array - public static byte[] StringToGuid(string guidStr) - { - Debug.Assert(guidStr.Length == 32); - return StringToByteArray(guidStr, true); - } - - /// - /// Parse an ascii byte array at start as an int value - /// - /// byte array - /// offset - /// - public static int ReadUInt32(byte[] bytes, int index) - { - Debug.Assert(bytes.Length + index >= 8); - return Int32.Parse(Encoding.ASCII.GetString(bytes, index, 8), NumberStyles.HexNumber); - } - - /// - /// Encode an integer as an ascii byte array - /// - /// integer - /// true ensure the byte array is as short as possible; false to pad to 8 bytes - /// - public static byte[] EncodeInt32(int input, bool minLength = false) - { - return Encoding.ASCII.GetBytes(input.ToString(minLength ? "X" : "X8")); - } - - /// - /// Parse a subset of an ascii byte array as a long value - /// - /// byte array - /// offset within to read from - /// - public static long ReadUInt64(byte[] bytes, int index) - { - Debug.Assert(bytes.Length + index >= 16); - return Int64.Parse(Encoding.ASCII.GetString(bytes, index, 16), NumberStyles.HexNumber); - } - - /// - /// Encode a long value into an ascii byte array - /// - /// long value - /// - public static byte[] EncodeInt64(long input) - { - return Encoding.ASCII.GetBytes(input.ToString("X16")); - } - - /// - /// Compare two byte arrays for value equality - /// - /// first array - /// second array - /// - public static bool ByteArraysAreEqual(byte[] ar1, byte[] ar2) - { - return ar1.Length == ar2.Length && ByteArraysAreEqual(ar1, 0, ar2, 0, ar1.Length); - } - - /// - /// Compare two byte arrays for value equality at specific offsets and length - /// - /// first array - /// offset within first array - /// second array - /// offset within second array - /// number of bytes to compare - /// - public static bool ByteArraysAreEqual(byte[] ar1, int start1, byte[] ar2, int start2, int count) - { - Debug.Assert(start1 >= 0 && start2 >= 0 && count >= 0); - if(start1 + count > ar1.Length) - return false; - - if (start2 + count > ar2.Length) - return false; - - for (var i = 0; i < count; i++) - if (ar1[start1 + i] != ar2[start2 + i]) - return false; - - return true; - } - - /// - /// Retrieve the configured cache server address for the Unity Editor - /// - public static string ConfigCacheServerAddress - { - get { return EditorPrefs.GetString(IpAddressKey); } - } - - /// - /// Parse an address string in the format of 'address:port' to a string address and integer port number - /// - /// combined address string - /// address part - /// port part - public static void ParseCacheServerIpAddress(string address, out string host, out int port) - { - host = null; - port = 8126; - - var parts = address.Split(':'); - - if(parts.Length > 0) - host = parts[0]; - - if (parts.Length > 1) - port = int.Parse(parts[1]); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/Util.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/Util.cs.meta deleted file mode 100644 index dee829c8..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CacheServer/Util.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a0c7d049419ae46f19ead59b45d622fb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CompatibilityBuildPipeline.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CompatibilityBuildPipeline.cs deleted file mode 100644 index 15306a85..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CompatibilityBuildPipeline.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System.IO; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEngine; -using UnityEngine.Build.Pipeline; - -namespace UnityEditor.Build.Pipeline -{ -#if UNITY_2018_3_OR_NEWER - using BuildCompression = UnityEngine.BuildCompression; -#else - using BuildCompression = UnityEditor.Build.Content.BuildCompression; -#endif - - /// - /// Static class implementing API wrappers to match BuildPipeline APIs but use the Scriptable Build Pipeline. - /// - /// - public static class CompatibilityBuildPipeline - { - /// - /// Wrapper API to match BuildPipeline API but use the Scriptable Build Pipeline to build Asset Bundles. - /// - /// - /// - /// Not all BuildAssetBundleOptions are supported in the Scriptable Build Pipeline initial release. - /// Supported options are: ChunkBasedCompression, UncompressedAssetBundle, DisableWriteTypeTree, and DisableWriteTypeTree. - /// In addition, existing BuildPipeline callbacks are not yet supported. Est: 2018.3 release for support. - /// - /// Output path for the AssetBundles. - /// AssetBundle building options. - /// Chosen target build platform. - /// null - Generating and returning an AssetBundleManifest is not yet supported by the Scriptable Build Pipeline. Est: 2018.3 support. - public static CompatibilityAssetBundleManifest BuildAssetBundles(string outputPath, BuildAssetBundleOptions assetBundleOptions, BuildTarget targetPlatform) - { - var buildInput = ContentBuildInterface.GenerateAssetBundleBuilds(); - return BuildAssetBundles_Internal(outputPath, new BundleBuildContent(buildInput), assetBundleOptions, targetPlatform); - } - - /// - /// Wrapper API to match BuildPipeline API but use the Scriptable Build Pipeline to build Asset Bundles. - /// - /// - /// - /// Not all BuildAssetBundleOptions are supported in the Scriptable Build Pipeline initial release. - /// Supported options are: ChunkBasedCompression, UncompressedAssetBundle, DisableWriteTypeTree, and DisableWriteTypeTree. - /// In addition, existing BuildPipeline callbacks are not yet supported. Est: 2018.3 release for support. - /// - /// Output path for the AssetBundles. - /// AssetBundle building map. - /// AssetBundle building options. - /// Chosen target build platform. - /// null - Generating and returning an AssetBundleManifest is not yet supported by the Scriptable Build Pipeline. Est: 2018.3 release for support. - public static CompatibilityAssetBundleManifest BuildAssetBundles(string outputPath, AssetBundleBuild[] builds, BuildAssetBundleOptions assetBundleOptions, BuildTarget targetPlatform) - { - return BuildAssetBundles_Internal(outputPath, new BundleBuildContent(builds), assetBundleOptions, targetPlatform); - } - - internal static CompatibilityAssetBundleManifest BuildAssetBundles_Internal(string outputPath, IBundleBuildContent content, BuildAssetBundleOptions options, BuildTarget targetPlatform) - { - var group = BuildPipeline.GetBuildTargetGroup(targetPlatform); - var parameters = new BundleBuildParameters(targetPlatform, group, outputPath); - if ((options & BuildAssetBundleOptions.ForceRebuildAssetBundle) != 0) - parameters.UseCache = false; - - if ((options & BuildAssetBundleOptions.AppendHashToAssetBundleName) != 0) - parameters.AppendHash = true; - -#if UNITY_2018_3_OR_NEWER - if ((options & BuildAssetBundleOptions.ChunkBasedCompression) != 0) - parameters.BundleCompression = BuildCompression.LZ4; - else if ((options & BuildAssetBundleOptions.UncompressedAssetBundle) != 0) - parameters.BundleCompression = BuildCompression.Uncompressed; - else - parameters.BundleCompression = BuildCompression.LZMA; -#else - if ((options & BuildAssetBundleOptions.ChunkBasedCompression) != 0) - parameters.BundleCompression = BuildCompression.DefaultLZ4; - else if ((options & BuildAssetBundleOptions.UncompressedAssetBundle) != 0) - parameters.BundleCompression = BuildCompression.DefaultUncompressed; - else - parameters.BundleCompression = BuildCompression.DefaultLZMA; -#endif - - if ((options & BuildAssetBundleOptions.DisableWriteTypeTree) != 0) - parameters.ContentBuildFlags |= ContentBuildFlags.DisableWriteTypeTree; - - IBundleBuildResults results; - ReturnCode exitCode = ContentPipeline.BuildAssetBundles(parameters, content, out results); - if (exitCode < ReturnCode.Success) - return null; - - var manifest = ScriptableObject.CreateInstance(); - manifest.SetResults(results.BundleInfos); - File.WriteAllText(parameters.GetOutputFilePathForIdentifier(Path.GetFileName(outputPath) + ".manifest"), manifest.ToString()); - return manifest; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CompatibilityBuildPipeline.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CompatibilityBuildPipeline.cs.meta deleted file mode 100644 index 5cd17505..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/CompatibilityBuildPipeline.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: e4a7ddc0ee0cb5e47b5c53fb53a97808 -timeCreated: 1504709534 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/ContentPipeline.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/ContentPipeline.cs deleted file mode 100644 index 5164a605..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/ContentPipeline.cs +++ /dev/null @@ -1,137 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Threading; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Utilities; -using UnityEditor.Build.Utilities; - -namespace UnityEditor.Build.Pipeline -{ - /// - /// Static class containing the main content building entry points into the Scriptable Build Pipeline. - /// - public static class ContentPipeline - { - /// - /// Default temporary path used for building content data. - /// - public const string kTempBuildPath = "Temp/ContentBuildData"; - - /// - /// Default callback implementation. - /// - public static BuildCallbacks BuildCallbacks = new BuildCallbacks(); - - /// - /// Default implementation of generating Asset Bundles using the Scriptable Build Pipeline. - /// - /// Set of parameters used for building asset bundles. - /// Set of content and explicit asset bundle layout to build. - /// Results from building the content and explicit asset bundle layout. - /// Return code with status information about success or failure causes. - public static ReturnCode BuildAssetBundles(IBundleBuildParameters parameters, IBundleBuildContent content, out IBundleBuildResults result) - { - var taskList = DefaultBuildTasks.Create(DefaultBuildTasks.Preset.AssetBundleCompatible); - return BuildAssetBundles(parameters, content, out result, taskList); - } - - /// - /// Default implementation of generating Asset Bundles using the Scriptable Build Pipeline. - /// - /// Set of parameters used for building asset bundles. - /// Set of content and explicit asset bundle layout to build. - /// Results from building the content and explicit asset bundle layout. - /// Custom task list for building asset bundles. - /// Additional context objects to make available to the build. - /// Return code with status information about success or failure causes. - public static ReturnCode BuildAssetBundles(IBundleBuildParameters parameters, IBundleBuildContent content, out IBundleBuildResults result, IList taskList, params IContextObject[] contextObjects) - { - // Avoid throwing exceptions in here as we don't want them bubbling up to calling user code - if (parameters == null) - { - result = null; - BuildLogger.LogException(new ArgumentNullException("parameters")); - return ReturnCode.Exception; - } - - // Avoid throwing exceptions in here as we don't want them bubbling up to calling user code - if (taskList.IsNullOrEmpty()) - { - result = null; - BuildLogger.LogException(new ArgumentException("Argument cannot be null or empty.", "taskList")); - return ReturnCode.Exception; - } - - // Don't run if there are unsaved changes - if (ValidationMethods.HasDirtyScenes()) - { - result = null; - return ReturnCode.UnsavedChanges; - } - - AssetDatabase.SaveAssets(); - - ReturnCode exitCode; - result = new BundleBuildResults(); - - using (new BuildInterfacesWrapper()) -#if !CI_TESTRUNNER_PROJECT - using (new SceneStateCleanup()) - using (var progressTracker = new ProgressTracker()) -#else - using (var progressTracker = new ProgressLoggingTracker()) -#endif - using (var buildCache = new BuildCache(parameters.CacheServerHost, parameters.CacheServerPort)) - { - Directory.CreateDirectory(parameters.TempOutputFolder); - - BuildContext buildContext; - try - { - buildContext = new BuildContext(contextObjects); - buildContext.SetContextObject(parameters); - buildContext.SetContextObject(content); - buildContext.SetContextObject(result); - buildContext.SetContextObject(progressTracker); - buildContext.SetContextObject(buildCache); - // If IDeterministicIdentifiers was passed in with contextObjects, don't add the default - if (!buildContext.ContainsContextObject(typeof(IDeterministicIdentifiers))) - buildContext.SetContextObject(new Unity5PackedIdentifiers()); - buildContext.SetContextObject(new BuildDependencyData()); - buildContext.SetContextObject(new BundleWriteData()); - buildContext.SetContextObject(BuildCallbacks); - } - catch (Exception e) - { - // Avoid throwing exceptions in here as we don't want them bubbling up to calling user code - result = null; - BuildLogger.LogException(e); - return ReturnCode.Exception; - } - - exitCode = BuildTasksRunner.Validate(taskList, buildContext); - if (exitCode >= ReturnCode.Success) -#if SBP_PROFILER_ENABLE - exitCode = BuildTasksRunner.RunProfiled(taskList, buildContext); -#else - exitCode = BuildTasksRunner.Run(taskList, buildContext); -#endif - - if (Directory.Exists(parameters.TempOutputFolder)) - Directory.Delete(parameters.TempOutputFolder, true); - } - - - int maximumSize = EditorPrefs.GetInt("BuildCache.maximumSize", 200); - long maximumCacheSize = maximumSize * 1073741824L; // gigabytes to bytes - ThreadPool.QueueUserWorkItem(PruneCache, maximumCacheSize); - return exitCode; - } - - static void PruneCache(object state) - { - BuildCache.PruneCache_Background((long)state); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/ContentPipeline.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/ContentPipeline.cs.meta deleted file mode 100644 index 46a7f2d4..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/ContentPipeline.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 3ba8763d94231c9459f5a2d2aae30cfa -timeCreated: 1504709533 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Injector.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Injector.meta deleted file mode 100644 index bde34179..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Injector.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 83be1c14cfbe90c4288847f2b01c1884 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Injector/ContextInjector.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Injector/ContextInjector.cs deleted file mode 100644 index 3fc67b0f..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Injector/ContextInjector.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; -using System.Reflection; -using UnityEditor.Build.Pipeline.Interfaces; - -namespace UnityEditor.Build.Pipeline.Injector -{ - [AttributeUsage(AttributeTargets.Field)] - public class InjectContextAttribute : Attribute - { - //public string Identifier { get; set; } - public ContextUsage Usage { get; set; } - public bool Optional { get; set; } - - public InjectContextAttribute(ContextUsage usage = ContextUsage.InOut, bool optional = false) - { - this.Usage = usage; - Optional = optional; - } - } - - public enum ContextUsage - { - InOut, - In, - Out - } - - class ContextInjector - { - public static void Inject(IBuildContext context, object obj) - { - FieldInfo[] fields = obj.GetType().GetFields(BindingFlags.Instance | BindingFlags.NonPublic); - foreach (FieldInfo field in fields) - { - object[] attrs = field.GetCustomAttributes(typeof(InjectContextAttribute), true); - if (attrs.Length == 0) - continue; - - InjectContextAttribute attr = attrs[0] as InjectContextAttribute; - if (attr == null || attr.Usage == ContextUsage.Out) - continue; - - object injectionObject; - if (field.FieldType == typeof(IBuildContext)) - injectionObject = context; - else if (!attr.Optional) - injectionObject = context.GetContextObject(field.FieldType); - else - { - IContextObject contextObject; - context.TryGetContextObject(field.FieldType, out contextObject); - injectionObject = contextObject; - } - - field.SetValue(obj, injectionObject); - } - } - - public static void Extract(IBuildContext context, object obj) - { - FieldInfo[] fields = obj.GetType().GetFields(BindingFlags.Instance | BindingFlags.NonPublic); - foreach (FieldInfo field in fields) - { - object[] attrs = field.GetCustomAttributes(typeof(InjectContextAttribute), true); - if (attrs.Length == 0) - continue; - - InjectContextAttribute attr = attrs[0] as InjectContextAttribute; - if (attr == null || attr.Usage == ContextUsage.In) - continue; - - if (field.FieldType == typeof(IBuildContext)) - throw new InvalidOperationException("IBuildContext can only be used with the ContextUsage.In option."); - - IContextObject contextObject = field.GetValue(obj) as IContextObject; - if (!attr.Optional) - context.SetContextObject(field.FieldType, contextObject); - else if (contextObject != null) - context.SetContextObject(field.FieldType, contextObject); - } - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Injector/ContextInjector.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Injector/ContextInjector.cs.meta deleted file mode 100644 index 186ff508..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Injector/ContextInjector.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 29402082393e3a1439cfaa6cc77aa31b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces.meta deleted file mode 100644 index 0d1b7493..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e501e91b337adda41bd6c22cf8cae83e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IAssetRepresentationData.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IAssetRepresentationData.cs deleted file mode 100644 index c303d71e..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IAssetRepresentationData.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.Build.Content; - -namespace UnityEditor.Build.Pipeline.Interfaces -{ - [Serializable] - public class ExtendedAssetData - { - public List Representations { get; set; } - - public ExtendedAssetData() - { - Representations = new List(); - } - } - - public interface IBuildExtendedAssetData : IContextObject - { - Dictionary ExtendedData { get; } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IAssetRepresentationData.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IAssetRepresentationData.cs.meta deleted file mode 100644 index 564e96d7..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IAssetRepresentationData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 892bac4397edc914d9ffa4cde040eb0b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildCache.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildCache.cs deleted file mode 100644 index 4f13048b..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildCache.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System.Collections.Generic; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Utilities; - -namespace UnityEditor.Build.Pipeline.Interfaces -{ - /// - /// Base interface for the Build Caching - /// - public interface IBuildCache : IContextObject - { - /// - /// Gets a CacheEntry for an asset identified by its GUID. - /// - /// GUID identifier for an asset from the Asset Database - /// Version number of the system asking for an entry to distinguish it from previous incompatible entries. (Optional) - /// CacheEntry representing current asset. - CacheEntry GetCacheEntry(GUID asset, int version = 1); - - /// - /// Gets a CacheEntry for a file identified by its relative path. - /// - /// Relative path of a file on disk - /// Version number of the system asking for an entry to distinguish it from previous incompatible entries. (Optional) - /// CacheEntry representing a file on disk. - CacheEntry GetCacheEntry(string path, int version = 1); - - /// - /// Gets a CacheEntry for an object identified by an Object Identifier. - /// - /// Object identifier for an object - /// Version number of the system asking for an entry to distinguish it from previous incompatible entries. (Optional) - /// CacheEntry representing an object identifier. - CacheEntry GetCacheEntry(ObjectIdentifier objectID, int version = 1); - - /// - /// Checks if the CachedInfo passed in needs to be rebuilt - /// - /// Cached Info to check - /// true if the cached info needs to be rebuilt; otherwise, false. - bool HasAssetOrDependencyChanged(CachedInfo info); - - /// - /// Returns the path where info data can be saved in the cache - /// - /// Cache entry to get the path - /// Path on disk where to save cached info - string GetCachedInfoFile(CacheEntry entry); - - /// - /// Returns the path where artifact data can be saved in the cache - /// - /// Cache entry to get the path - /// Path on disk where to save cached artifacts - string GetCachedArtifactsDirectory(CacheEntry entry); - - /// - /// Loads a set of CachedInfos from the cache - /// - /// List of cache entries to load - /// Out list of cached infos loaded - void LoadCachedData(IList entries, out IList cachedInfos); - - /// - /// Saves a set of CachedInfos to the cache - /// - /// List of cached infos to save - void SaveCachedData(IList infos); - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildCache.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildCache.cs.meta deleted file mode 100644 index 195bcde3..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildCache.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 717b55fbf36106b449169defda0705c7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildContent.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildContent.cs deleted file mode 100644 index 10669528..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildContent.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Collections.Generic; - -namespace UnityEditor.Build.Pipeline.Interfaces -{ - /// - /// Base interface for feeding Assets to the Scriptable Build Pipeline. - /// - public interface IBuildContent : IContextObject - { - /// - /// List of Assets to include. - /// - List Assets { get; } - - /// - /// List of Scenes to include. - /// - List Scenes { get; } - } - - /// - /// Base interface for feeding Assets with explicit Asset Bundle layout to the Scriptable Build Pipeline. - /// - public interface IBundleBuildContent : IBuildContent - { - /// - /// Specific layout of asset bundles to assets or scenes. - /// - Dictionary> BundleLayout { get; } - - /// - /// Custom loading identifiers to use for Assets or Scenes. - /// - Dictionary Addresses { get; } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildContent.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildContent.cs.meta deleted file mode 100644 index 5df0cc33..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildContent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 431079301da72b74cba77e88c2af37ba -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildContext.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildContext.cs deleted file mode 100644 index 2783ba00..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildContext.cs +++ /dev/null @@ -1,138 +0,0 @@ -using System; - -namespace UnityEditor.Build.Pipeline.Interfaces -{ - /// - /// Base interface for all objects that can be stored in . - /// - public interface IContextObject { } - - /// - /// Base interface that handles processing the callbacks after script building step. - /// - public interface IScriptsCallback : IContextObject - { - /// - /// Processes all the callbacks after script building step. - /// - /// Parameters passed into the build pipeline. - /// Results from the script building step. - /// Return code from processing the callbacks. - ReturnCode PostScripts(IBuildParameters parameters, IBuildResults results); - } - - /// - /// Base interface for handling running the callbacks after dependency calculation step. - /// - public interface IDependencyCallback : IContextObject - { - /// - /// Processes all the callbacks after dependency calculation step. - /// - /// Parameters passed into the build pipeline. - /// Results from the dependency calculation step. - /// Return code from processing the callbacks. - ReturnCode PostDependency(IBuildParameters parameters, IDependencyData dependencyData); - } - - /// - /// Base interface for handling running the callbacks after packing step. - /// - public interface IPackingCallback : IContextObject - { - /// - /// Processes all the callbacks after packing step. - /// - /// Parameters passed into the build pipeline. - /// Results from the dependency calculation step. - /// Results from the packing step. - /// Return code from processing the callbacks. - ReturnCode PostPacking(IBuildParameters parameters, IDependencyData dependencyData, IWriteData writeData); - } - - /// - /// Base interface for handling running the callbacks after writing step. - /// - public interface IWritingCallback : IContextObject - { - /// - /// Processes all the callbacks after writing step. - /// - /// Parameters passed into the build pipeline. - /// Results from the dependency calculation step. - /// Results from the packing step. - /// Results from the writing step. - /// Return code from processing the callbacks. - ReturnCode PostWriting(IBuildParameters parameters, IDependencyData dependencyData, IWriteData writeData, IBuildResults results); - } - - /// - /// Base interface for build data container system - /// - public interface IBuildContext - { - /// - /// Checks the build context for existence of a data that is of the specified type. - /// - /// Type of data to check for existence. - /// true if the context contains specified type of data; otherwise, false. - bool ContainsContextObject() where T : IContextObject; - - /// - /// Checks the build context for existence of a data that is of the specified type. - /// - /// Type of data to check for existence. - /// true if the context contains specified type of data; otherwise, false. - bool ContainsContextObject(Type type); - - /// - /// Gets the data of the specified type contained in the build context. - /// - /// Type of data to return. - /// The type of data specified. - T GetContextObject() where T : IContextObject; - - /// - /// Gets the data of the specified type contained in the build context. - /// - /// Type of data to return. - /// The type of data specified. - IContextObject GetContextObject(Type type); - - /// - /// Adds the data of the specified type to the build context. - /// - /// Type of data to add. - /// Object holding the data to add. - void SetContextObject(IContextObject contextObject) where T : IContextObject; - - /// - /// Adds the data of the specified type to the build context. - /// - /// Type of data to add. - /// Object holding the data to add. - void SetContextObject(Type type, IContextObject contextObject); - - /// - /// Adds the data to the build context. Type will be inferred using Reflection. - /// - /// Object holding the data to add. - void SetContextObject(IContextObject contextObject); - - /// - /// Tries to get the data of the specified type contained in the build context. - /// - /// Type of data to return. - /// The object holding the data to be returned if found. - /// true if the context was able to returned the specified data; otherwise, false. - bool TryGetContextObject(out T contextObject) where T : IContextObject; - - /// - /// Tries to get the data of the specified type contained in the build context. - /// - /// Type of data to return. - /// The object holding the data to be returned if found. - /// true if the context was able to returned the specified data; otherwise, false. - bool TryGetContextObject(Type type, out IContextObject contextObject); - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildContext.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildContext.cs.meta deleted file mode 100644 index 8bee4873..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildContext.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ef728e637accb8d46ad52f863653cf75 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildParameters.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildParameters.cs deleted file mode 100644 index 99dfbd52..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildParameters.cs +++ /dev/null @@ -1,98 +0,0 @@ -using UnityEditor.Build.Content; -using UnityEditor.Build.Player; -using UnityEngine; - -namespace UnityEditor.Build.Pipeline.Interfaces -{ -#if UNITY_2018_3_OR_NEWER - using BuildCompression = UnityEngine.BuildCompression; -#else - using BuildCompression = UnityEditor.Build.Content.BuildCompression; -#endif - - /// - /// Base interface for the parameters container - /// - public interface IBuildParameters : IContextObject - { - /// - /// Target build platform. - /// - BuildTarget Target { get; set; } - - /// - /// Target build platform group. - /// - BuildTargetGroup Group { get; set; } - - /// - /// The set of build flags to use for building content. - /// - ContentBuildFlags ContentBuildFlags { get; set; } - - /// - /// Scripting type information to use when building content. - /// Setting this to a previously cached value will prevent the default script compiling step. - /// - TypeDB ScriptInfo { get; set; } - - /// - /// Script compilation options to use for the script compiling step. - /// - ScriptCompilationOptions ScriptOptions { get; set; } - - /// - /// Temporary location to be used for artifacts generated during the build but are not part of the final output. - /// - string TempOutputFolder { get; set; } - - /// - /// Enables the use of the build cache if set to true. - /// - bool UseCache { get; set; } - - /// - /// Enables & specifies the cache server to use. - /// - string CacheServerHost { get; set; } - - /// - /// The port for the cache server to use - /// - int CacheServerPort { get; set; } - - /// - /// Constructs and returns the BuildSettings struct to use for content building. - /// - /// Returns the BuildSettings struct to use for content building. - BuildSettings GetContentBuildSettings(); - - /// - /// Returns the output folder to use for the specified identifier. - /// - /// Identifier used to identify which output folder to use. - /// Returns the output folder to use for the specified identifier. - string GetOutputFilePathForIdentifier(string identifier); - - /// - /// Constructs and returns the BuildCompression struct to use for the specified identifier. - /// - /// Identifier used to construct the BuildCompression struct. - /// Returns the BuildCompression struct to use for a specific identifier. - BuildCompression GetCompressionForIdentifier(string identifier); - - /// - /// Constructs and returns the ScriptCompilationSettings struct to use for script compiling. - /// - /// Returns the ScriptCompilationSettings struct to use for script compiling. - ScriptCompilationSettings GetScriptCompilationSettings(); - } - - public interface IBundleBuildParameters : IBuildParameters - { - /// - /// Append the hash to the assetBundle file name. - /// - bool AppendHash { get; set; } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildParameters.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildParameters.cs.meta deleted file mode 100644 index 25393658..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildParameters.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e18580a7226c3b34c9fa7fdb324edfe6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildResults.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildResults.cs deleted file mode 100644 index 58db4096..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildResults.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Collections.Generic; -using UnityEditor.Build.Content; -using UnityEditor.Build.Player; -using UnityEngine.Build.Pipeline; - -namespace UnityEditor.Build.Pipeline.Interfaces -{ - /// - /// Base interface for the build results container - /// - public interface IBuildResults : IContextObject - { - /// - /// Results from the script compiling step. - /// - ScriptCompilationResult ScriptResults { get; set; } - - /// - /// Map of serialized file name to results for built content. - /// - Dictionary WriteResults { get; } - } - - /// - /// Extended interface for Asset Bundle build results container. - /// - /// - public interface IBundleBuildResults : IBuildResults - { - /// - /// Map of Asset Bundle name to details about the built bundle. - /// - Dictionary BundleInfos { get; } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildResults.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildResults.cs.meta deleted file mode 100644 index 118bcd07..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildResults.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 87c4ff2c85dcb524685caba3bb22110c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildSpriteData.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildSpriteData.cs deleted file mode 100644 index b75faf24..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildSpriteData.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.Build.Content; - -namespace UnityEditor.Build.Pipeline.Interfaces -{ - [Serializable] - public class SpriteImporterData - { - public bool PackedSprite { get; set; } - public ObjectIdentifier SourceTexture { get; set; } - } - - public interface IBuildSpriteData : IContextObject - { - Dictionary ImporterData { get; } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildSpriteData.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildSpriteData.cs.meta deleted file mode 100644 index 620b900f..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildSpriteData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fb4c2e00689dfb34985500f260df63cb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildTasks.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildTasks.cs deleted file mode 100644 index 88fe8ca8..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildTasks.cs +++ /dev/null @@ -1,20 +0,0 @@ -namespace UnityEditor.Build.Pipeline.Interfaces -{ - /// - /// Base interface of all build tasks. - /// - public interface IBuildTask - { - /// - /// Version identifier for the build task. - /// Primarily for caching. - /// - int Version { get; } - - /// - /// Run task method - /// - /// Return code with status information about success or failure causes. - ReturnCode Run(); - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildTasks.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildTasks.cs.meta deleted file mode 100644 index a2bb130e..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBuildTasks.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8f2c2ad6904ea9147a43a79fccd94ca1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBundleExplictObjectLayout.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBundleExplictObjectLayout.cs deleted file mode 100644 index bbc5d4ab..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBundleExplictObjectLayout.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Collections.Generic; -using UnityEditor.Build.Content; - -namespace UnityEditor.Build.Pipeline.Interfaces -{ - /// - /// Optional interface used for overriding the location where specific objects will be serialized - /// - public interface IBundleExplictObjectLayout : IContextObject - { - /// - /// Map listing object identifiers and their new bundle location - /// - Dictionary ExplicitObjectLocation { get; } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBundleExplictObjectLayout.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBundleExplictObjectLayout.cs.meta deleted file mode 100644 index aa9ed0e5..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IBundleExplictObjectLayout.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1a78160a9be3bdf4d9397ca7b0466850 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IDependencyData.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IDependencyData.cs deleted file mode 100644 index b56fe252..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IDependencyData.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System.Collections.Generic; -using UnityEditor.Build.Content; - -namespace UnityEditor.Build.Pipeline.Interfaces -{ - /// - /// Base interface for the dependency data container - /// - public interface IDependencyData : IContextObject - { - /// - /// Map of Asset to dependency data. - /// - Dictionary AssetInfo { get; } - - /// - /// Map of Asset to usage data. - /// - Dictionary AssetUsage { get; } - - /// - /// Map of Scene to dependency data. - /// - Dictionary SceneInfo { get; } - - /// - /// Map of Scene to usage data. - /// - Dictionary SceneUsage { get; } - - /// - /// Reusable cache for calculating usage tags - /// - BuildUsageCache DependencyUsageCache { get; } - - /// - /// BuildUsageTagGlobal value from GraphicsSettings - /// - BuildUsageTagGlobal GlobalUsage { get; } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IDependencyData.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IDependencyData.cs.meta deleted file mode 100644 index 4e80c952..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IDependencyData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a99d07c2f0fab1e4f8623f5913408df5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IDeterministicIdentifiers.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IDeterministicIdentifiers.cs deleted file mode 100644 index e68caba3..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IDeterministicIdentifiers.cs +++ /dev/null @@ -1,24 +0,0 @@ -using UnityEditor.Build.Content; - -namespace UnityEditor.Build.Pipeline.Interfaces -{ - /// - /// Base interface for the generating deterministic identifiers for different parts of the build pipeline. - /// - public interface IDeterministicIdentifiers : IContextObject - { - /// - /// Generates a deterministic internal file name from the passed in name. - /// - /// Name identifier for internal file name generation - /// Deterministic file name. - string GenerateInternalFileName(string name); - - /// - /// Generates a deterministic id for a given object in the build. - /// - /// Object identifier to for id generation. - /// long representing the id of the objectID. - long SerializationIndexFromObjectIdentifier(ObjectIdentifier objectID); - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IDeterministicIdentifiers.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IDeterministicIdentifiers.cs.meta deleted file mode 100644 index 6c918a71..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IDeterministicIdentifiers.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f2f62872d2484231aa95c2eb9feb8326 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IProgressTracker.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IProgressTracker.cs deleted file mode 100644 index 2792d66f..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IProgressTracker.cs +++ /dev/null @@ -1,32 +0,0 @@ -namespace UnityEditor.Build.Pipeline.Interfaces -{ - /// - /// Base interface for the build progress tracker - /// - public interface IProgressTracker : IContextObject - { - /// - /// Number of build tasks to run - /// - int TaskCount { get; set; } - - /// - /// Current 0.0f to 1.0f progress though the TaskCount - /// - float Progress { get; } - - /// - /// Increments and updated the title of the progress bar. - /// - /// The title to display on the progress bar. - /// false if the build should not continue due to user interaction with the progress bar; otherwise, true. - bool UpdateTask(string taskTitle); - - /// - /// Updates the secondary information display of the progress bar. - /// - /// The secondary information to display on the progress bar. - /// false if the build should not continue due to user interaction with the progress bar; otherwise, true. - bool UpdateInfo(string taskInfo); - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IProgressTracker.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IProgressTracker.cs.meta deleted file mode 100644 index 88d85938..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IProgressTracker.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e25b76d1a8a87c641894e4694a750cd8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IWriteData.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IWriteData.cs deleted file mode 100644 index 602ffef7..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IWriteData.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System.Collections.Generic; -using UnityEditor.Build.Content; - -namespace UnityEditor.Build.Pipeline.Interfaces -{ - /// - /// Base interface for the write data container. - /// - public interface IWriteData : IContextObject - { - /// - /// Map of asset to file dependencies. - /// First dependency in the list is the main file for an asset. - /// - Dictionary> AssetToFiles { get; } - - /// - /// Map of file to list of objects in that file - /// - Dictionary> FileToObjects { get; } - - /// - /// List of all write operations to serialize data to disk - /// - List WriteOperations { get; } - } - - /// - /// Extended interface for Asset Bundle write data container. - /// - public interface IBundleWriteData : IWriteData - { - /// - /// Map of file name to bundle name - /// - Dictionary FileToBundle { get; } - - /// - /// Map of file name to calculated usage set - /// - Dictionary FileToUsageSet { get; } - - /// - /// Map of file name to calculated object references - /// - Dictionary FileToReferenceMap { get; } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IWriteData.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IWriteData.cs.meta deleted file mode 100644 index 7cdf6dcd..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IWriteData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a8092de151d449b0962952fe68a54dd9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IWriteOperation.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IWriteOperation.cs deleted file mode 100644 index b93bce9b..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IWriteOperation.cs +++ /dev/null @@ -1,44 +0,0 @@ -using UnityEditor.Build.Content; -using UnityEngine; - -namespace UnityEditor.Build.Pipeline.Interfaces -{ - /// - /// Base interface for wrapping the different low level WriteSerializeFile API around a common high level Write function - /// - public interface IWriteOperation - { - /// - /// The specific write command containing the details about what to write to disk. - /// - /// - WriteCommand Command { get; set; } - - /// - /// The specific usage data for objects in the write command. - /// - /// - BuildUsageTagSet UsageSet { get; set; } - - /// - /// The specific reference data for objects in the write command. - /// - /// - BuildReferenceMap ReferenceMap { get; set; } - - /// - /// Write function that wraps the low level WriteSerializeFile APIs that takes the common minimum set of parameters. - /// - /// The location to write data to disk. - /// The build settings to use for writing data. - /// The global usage to use for writing data. - /// The write results struct containing details about what was written to disk - WriteResult Write(string outputFolder, BuildSettings settings, BuildUsageTagGlobal globalUsage); - - /// - /// Optimized hash function for use with the Build Cache system. - /// - /// Unique hash for the contents of this write operation. - Hash128 GetHash128(); - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IWriteOperation.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IWriteOperation.cs.meta deleted file mode 100644 index 766f699e..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Interfaces/IWriteOperation.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7df65588254d9194cb3fb45879168954 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Profiler.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Profiler.meta deleted file mode 100644 index c22ad568..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Profiler.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 24de8307d973e7541803ec7b592a5361 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Profiler/BuildProfiler.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Profiler/BuildProfiler.cs deleted file mode 100644 index c1f26c56..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Profiler/BuildProfiler.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System.Diagnostics; - -namespace UnityEditor.Build.Profiler -{ - public class BuildProfiler - { - Stopwatch[] m_Trackers; - long[] m_CallCount; - string[] m_Names; - - public BuildProfiler(int count) - { - m_Trackers = new Stopwatch[count]; - m_CallCount = new long[count]; - m_Names = new string[count]; - for (int i = 0; i < count; i++) - { - m_Trackers[i] = new Stopwatch(); - m_CallCount[i] = 0; - } - } - - public void Start(int index, string name) - { - if (m_Trackers == null) - return; - - Debug.Assert(!m_Trackers[index].IsRunning); - m_Trackers[index].Start(); - m_CallCount[index]++; - m_Names[index] = name; - } - - public void Stop(int index) - { - if (m_Trackers == null) - return; - - Debug.Assert(m_Trackers[index].IsRunning); - m_Trackers[index].Stop(); - } - - public void Print() - { - if (m_Trackers == null) - return; - - string msg = ""; - for (int i = 0; i < m_Trackers.Length; i++) - { - Debug.Assert(!m_Trackers[i].IsRunning); - msg += string.Format("Counter[{0}]\t{1}\t{2}\n", m_Names[i], m_CallCount[i], m_Trackers[i].ElapsedMilliseconds); - } - UnityEngine.Debug.Log(msg); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Profiler/BuildProfiler.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Profiler/BuildProfiler.cs.meta deleted file mode 100644 index 6173b7dd..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Profiler/BuildProfiler.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ba1f63c8c87d5ab4cad407b7245879e4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/ReturnCode.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/ReturnCode.cs deleted file mode 100644 index cf13247b..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/ReturnCode.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace UnityEditor.Build.Pipeline -{ - /// - /// Return codes for the scriptable build pipeline. Int values of these return codes are standardized to 0 or greater for Success and -1 or less for Error. - /// - public enum ReturnCode - { - // Success Codes are Positive! - Success = 0, - SuccessCached = 1, - SuccessNotRun = 2, - // Error Codes are Negative! - Error = -1, - Exception = -2, - Canceled = -3, - UnsavedChanges = -4, - MissingRequiredObjects = -5 - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/ReturnCode.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/ReturnCode.cs.meta deleted file mode 100644 index e1c75013..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/ReturnCode.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: bef0b83030006f0409c3a3cfa181ee64 -timeCreated: 1504709534 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared.meta deleted file mode 100644 index 05af7c35..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: d2753eab703276041afb1d58301a291c -folderAsset: yes -timeCreated: 1505167493 -licenseType: Pro -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildCallbacks.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildCallbacks.cs deleted file mode 100644 index b46b4fdb..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildCallbacks.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using UnityEditor.Build.Pipeline.Interfaces; - -namespace UnityEditor.Build.Pipeline -{ - /// - /// Basic implementation of IDependencyCallback, IPackingCallback, IWritingCallback, & IScriptsCallback. - /// Uses Func implementation for callbacks. , - /// , and - /// - public class BuildCallbacks : IDependencyCallback, IPackingCallback, IWritingCallback, IScriptsCallback - { - /// - /// Func delegate for the callback after scripts have been compiled. - /// - public Func PostScriptsCallbacks { get; set; } - - /// - /// Func delegate for the callback after dependency calculation has occurred. - /// - public Func PostDependencyCallback { get; set; } - - /// - /// Func delegate for the callback after packing has occurred. - /// - public Func PostPackingCallback { get; set; } - - /// - /// Func delegate for the callback after writing content has occurred. - /// - public Func PostWritingCallback { get; set; } - - /// - public ReturnCode PostScripts(IBuildParameters parameters, IBuildResults results) - { - if (PostScriptsCallbacks != null) - return PostScriptsCallbacks(parameters, results); - return ReturnCode.Success; - } - - /// - public ReturnCode PostDependency(IBuildParameters buildParameters, IDependencyData dependencyData) - { - if (PostDependencyCallback != null) - return PostDependencyCallback(buildParameters, dependencyData); - return ReturnCode.Success; - } - - /// - public ReturnCode PostPacking(IBuildParameters buildParameters, IDependencyData dependencyData, IWriteData writeData) - { - if (PostPackingCallback != null) - return PostPackingCallback(buildParameters, dependencyData, writeData); - return ReturnCode.Success; - } - - /// - public ReturnCode PostWriting(IBuildParameters parameters, IDependencyData dependencyData, IWriteData writeData, IBuildResults results) - { - if (PostWritingCallback != null) - return PostWritingCallback(parameters, dependencyData, writeData, results); - return ReturnCode.Success; - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildCallbacks.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildCallbacks.cs.meta deleted file mode 100644 index 1d4141a7..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildCallbacks.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 98f1571a4d4b4a3f8a65343e6ca1966d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildContent.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildContent.cs deleted file mode 100644 index 7be34c13..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildContent.cs +++ /dev/null @@ -1,122 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Utilities; - -namespace UnityEditor.Build.Pipeline -{ - /// - /// Basic implementation of IBuildContent. Stores the list of Assets to feed the Scriptable Build Pipeline. - /// - /// - [Serializable] - public class BuildContent : IBuildContent - { - /// - public List Assets { get; private set; } - - /// - public List Scenes { get; private set; } - - internal BuildContent() { } - - /// - /// Default constructor, takes a set of Assets and converts them to the appropriate properties. - /// - /// The set of Assets identified by GUID to ensure are packaged with the build - public BuildContent(IEnumerable assets) - { - if (assets == null) - throw new ArgumentNullException("assets"); - - Assets = new List(); - Scenes = new List(); - - foreach (var asset in assets) - { - ValidationMethods.Status assetType = ValidationMethods.ValidAsset(asset); - if (assetType == ValidationMethods.Status.Asset) - Assets.Add(asset); - else if (assetType == ValidationMethods.Status.Scene) - Scenes.Add(asset); - else - throw new ArgumentException(string.Format("Asset '{0}' is not a valid Asset or Scene.", asset.ToString())); - } - } - } - - /// - /// Basic implementation of IBundleBuildContent. Stores the list of Assets with explicit Asset Bundle layout to feed the Scriptable Build Pipeline. - /// - /// - [Serializable] - public class BundleBuildContent : IBundleBuildContent - { - /// - public List Assets { get; private set; } - - /// - public List Scenes { get; private set; } - - /// - public Dictionary Addresses { get; private set; } - - /// - public Dictionary> BundleLayout { get; private set; } - - internal BundleBuildContent() { } - - /// - /// Default constructor, takes a set of AssetBundleBuild and converts them to the appropriate properties. - /// - /// The set of AssetbundleBuild to be built. - public BundleBuildContent(IEnumerable bundleBuilds) - { - if (bundleBuilds == null) - throw new ArgumentNullException("bundleBuilds"); - - Assets = new List(); - Scenes = new List(); - Addresses = new Dictionary(); - BundleLayout = new Dictionary>(); - - foreach (var bundleBuild in bundleBuilds) - { - List guids; - BundleLayout.GetOrAdd(bundleBuild.assetBundleName, out guids); - ValidationMethods.Status bundleType = ValidationMethods.Status.Invalid; - - for (int i = 0; i < bundleBuild.assetNames.Length; i++) - { - string assetPath = bundleBuild.assetNames[i]; - GUID asset = new GUID(AssetDatabase.AssetPathToGUID(assetPath)); - - // Ensure the path is valid - ValidationMethods.Status status = ValidationMethods.ValidAsset(asset); - if (status == ValidationMethods.Status.Invalid) - throw new ArgumentException(string.Format("Asset '{0}' is not a valid Asset or Scene.", assetPath)); - - // Ensure we do not have a mixed bundle - if (bundleType == ValidationMethods.Status.Invalid) - bundleType = status; - else if (bundleType != status) - throw new ArgumentException(string.Format("Asset Bundle '{0}' is invalid because it contains mixed Asset and Scene types.", bundleBuild.assetBundleName)); - - string address = bundleBuild.addressableNames != null && i < bundleBuild.addressableNames.Length && !string.IsNullOrEmpty(bundleBuild.addressableNames[i]) ? - bundleBuild.addressableNames[i] : AssetDatabase.GUIDToAssetPath(asset.ToString()); - - // Add the guid to the bundle map - guids.Add(asset); - // Add the guid & address - Addresses.Add(asset, address); - - // Add the asset to the correct collection - if (status == ValidationMethods.Status.Asset) - Assets.Add(asset); - else if (status == ValidationMethods.Status.Scene) - Scenes.Add(asset); - } - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildContent.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildContent.cs.meta deleted file mode 100644 index b4f96dd4..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildContent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6616141fe64e4fc2b16c015f32d0a64d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildContext.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildContext.cs deleted file mode 100644 index 9528f7d2..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildContext.cs +++ /dev/null @@ -1,146 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEngine; - -namespace UnityEditor.Build.Pipeline -{ - /// - /// Basic implementation of IBuildContext. Stores data generated during a build. - /// - /// - public class BuildContext : IBuildContext - { - Dictionary m_ContextObjects; - - /// - /// Default constructor - /// - public BuildContext() - { - m_ContextObjects = new Dictionary(); - } - - /// - /// Default constructor, adds the passed in parameters to the context. - /// - /// The set of initial parameters to add to the context. - public BuildContext(params IContextObject[] buildParams) - { - m_ContextObjects = new Dictionary(); - - if (buildParams == null) - return; - - foreach (var buildParam in buildParams) - { - if (buildParam != null) - SetContextObject(buildParam); - } - } - - /// - public void SetContextObject(IContextObject contextObject) where T : IContextObject - { - if (contextObject == null) - throw new ArgumentNullException("contextObject"); - - var type = typeof(T); - if (!type.IsInterface) - throw new InvalidOperationException(string.Format("Passed in type '{0}' is not an interface.", type)); - if (!(contextObject is T)) - throw new InvalidOperationException(string.Format("'{0}' is not of passed in type '{1}'.", contextObject.GetType(), type)); - m_ContextObjects[typeof(T)] = contextObject; - } - - /// - public void SetContextObject(Type type, IContextObject contextObject) - { - if (contextObject == null) - throw new ArgumentNullException("contextObject"); - - if (!type.IsInterface) - throw new InvalidOperationException(string.Format("Passed in type '{0}' is not an interface.", type)); - if (!type.IsInstanceOfType(contextObject)) - throw new InvalidOperationException(string.Format("'{0}' is not of passed in type '{1}'.", contextObject.GetType(), type)); - m_ContextObjects[type] = contextObject; - } - - /// - public void SetContextObject(IContextObject contextObject) - { - if (contextObject == null) - throw new ArgumentNullException("contextObject"); - - var iCType = typeof(IContextObject); - Type[] iTypes = contextObject.GetType().GetInterfaces(); - foreach (var iType in iTypes) - { - if (!iCType.IsAssignableFrom(iType) || iType == iCType) - continue; - m_ContextObjects[iType] = contextObject; - } - } - - /// - public bool ContainsContextObject() where T : IContextObject - { - return ContainsContextObject(typeof(T)); - } - - /// - public bool ContainsContextObject(Type type) - { - if (type == null) - throw new ArgumentNullException("type"); - - return m_ContextObjects.ContainsKey(type); - } - - /// - public T GetContextObject() where T : IContextObject - { - return (T)m_ContextObjects[typeof(T)]; - } - - /// - public IContextObject GetContextObject(Type type) - { - if (type == null) - throw new ArgumentNullException("type"); - - if (!m_ContextObjects.ContainsKey(type)) - Debug.LogError("Missing type in GetContextObject: " + type); - - return m_ContextObjects[type]; - } - - /// - public bool TryGetContextObject(out T contextObject) where T : IContextObject - { - IContextObject cachedContextObject; - if (m_ContextObjects.TryGetValue(typeof(T), out cachedContextObject) && cachedContextObject is T) - { - contextObject = (T)cachedContextObject; - return true; - } - - contextObject = default(T); - return false; - } - - /// - public bool TryGetContextObject(Type type, out IContextObject contextObject) - { - IContextObject cachedContextObject; - if (m_ContextObjects.TryGetValue(type, out cachedContextObject) && type.IsInstanceOfType(cachedContextObject)) - { - contextObject = cachedContextObject; - return true; - } - - contextObject = null; - return false; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildContext.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildContext.cs.meta deleted file mode 100644 index 62a023c0..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildContext.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fdd470c95bb040bdb705dc362b132291 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildDependencyData.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildDependencyData.cs deleted file mode 100644 index 2d81ef64..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildDependencyData.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Utilities; - -namespace UnityEditor.Build.Pipeline -{ - /// - /// Basic implementation of IDependencyData. Stores the dependency and usage data calculated during a build. - /// - /// - [Serializable] - public class BuildDependencyData : IDependencyData - { - /// - public Dictionary AssetInfo { get; private set; } - /// - public Dictionary AssetUsage { get; private set; } - - /// - public Dictionary SceneInfo { get; private set; } - /// - public Dictionary SceneUsage { get; private set; } - - public BuildUsageTagGlobal GlobalUsage { get; private set; } - - [NonSerialized] - BuildUsageCache m_BuildUsageCache; - public BuildUsageCache DependencyUsageCache - { - get - { - if (m_BuildUsageCache == null) - m_BuildUsageCache = new BuildUsageCache(); - return m_BuildUsageCache; - } - } - - /// - /// Default constructor, initializes properties to defaults - /// - public BuildDependencyData() - { - AssetInfo = new Dictionary(); - AssetUsage = new Dictionary(); - SceneInfo = new Dictionary(); - SceneUsage = new Dictionary(); - m_BuildUsageCache = new BuildUsageCache(); - GlobalUsage = GraphicsSettingsApi.GetGlobalUsage(); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildDependencyData.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildDependencyData.cs.meta deleted file mode 100644 index 246604db..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildDependencyData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 48594b0afbd3e84448546c74bf35a6b3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildExtendedAssetData.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildExtendedAssetData.cs deleted file mode 100644 index 4646a6d4..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildExtendedAssetData.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.Build.Pipeline.Interfaces; - -namespace UnityEditor.Build.Pipeline -{ - [Serializable] - public class BuildExtendedAssetData : IBuildExtendedAssetData - { - public Dictionary ExtendedData { get; private set; } - - public BuildExtendedAssetData() - { - ExtendedData = new Dictionary(); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildExtendedAssetData.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildExtendedAssetData.cs.meta deleted file mode 100644 index ed91f8ad..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildExtendedAssetData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9b0e503817aafa447ac3b7d7db84ccc8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildParameters.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildParameters.cs deleted file mode 100644 index 45e6e396..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildParameters.cs +++ /dev/null @@ -1,143 +0,0 @@ -using System; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Player; -using UnityEngine; - -namespace UnityEditor.Build.Pipeline -{ -#if UNITY_2018_3_OR_NEWER - using BuildCompression = UnityEngine.BuildCompression; -#else - using BuildCompression = UnityEditor.Build.Content.BuildCompression; -#endif - - /// - /// Basic implementation of IBuildParameters. Stores the set of parameters passed into the Scriptable Build Pipeline. - /// - /// - [Serializable] - public class BuildParameters : IBuildParameters - { - /// - public BuildTarget Target { get; set; } - /// - public BuildTargetGroup Group { get; set; } - - /// - public ContentBuildFlags ContentBuildFlags { get; set; } - - /// - public TypeDB ScriptInfo { get; set; } - /// - public ScriptCompilationOptions ScriptOptions { get; set; } - - /// - /// Default compression option to use for all built content files - /// - public BuildCompression BundleCompression { get; set; } - - /// - /// Final output location where built content will be written. - /// - public string OutputFolder { get; set; } - - string m_TempOutputFolder; - /// - public string TempOutputFolder - { - get { return m_TempOutputFolder; } - set - { - if (string.IsNullOrEmpty(value)) - throw new ArgumentException("Argument cannot be null or empty.", "value"); - m_TempOutputFolder = value; - } - } - - /// - public bool UseCache { get; set; } - /// - public string CacheServerHost { get; set; } - /// - public int CacheServerPort { get; set; } - - internal BuildParameters() { } - - /// - /// Default constructor, requires the target, group and output parameters at minimum for a successful build. - /// - /// The target for building content. - /// The group for building content. - /// The final output location for built content. - public BuildParameters(BuildTarget target, BuildTargetGroup group, string outputFolder) - { - if (string.IsNullOrEmpty(outputFolder)) - throw new ArgumentException("Argument cannot be null or empty.", "outputFolder"); - - Target = target; - Group = group; - // TODO: Validate target & group - - ScriptInfo = null; - ScriptOptions = ScriptCompilationOptions.None; -#if UNITY_2018_3_OR_NEWER - BundleCompression = BuildCompression.LZMA; -#else - BundleCompression = BuildCompression.DefaultLZMA; -#endif - OutputFolder = outputFolder; - TempOutputFolder = ContentPipeline.kTempBuildPath; - UseCache = true; - CacheServerPort = 8126; - } - - /// - public virtual BuildSettings GetContentBuildSettings() - { - return new BuildSettings - { - group = Group, - target = Target, - typeDB = ScriptInfo, - buildFlags = ContentBuildFlags - }; - } - - /// - public virtual ScriptCompilationSettings GetScriptCompilationSettings() - { - return new ScriptCompilationSettings - { - group = Group, - target = Target, - options = ScriptOptions - }; - } - - /// - public virtual string GetOutputFilePathForIdentifier(string identifier) - { - return string.Format("{0}/{1}", OutputFolder, identifier); - } - - /// - public virtual BuildCompression GetCompressionForIdentifier(string identifier) - { - return BundleCompression; - } - } - - [Serializable] - public class BundleBuildParameters : BuildParameters, IBundleBuildParameters - { - internal BundleBuildParameters() { } - - /// - public BundleBuildParameters(BuildTarget target, BuildTargetGroup group, string outputFolder) - : base(target, group, outputFolder) { } - - /// - public bool AppendHash { get; set; } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildParameters.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildParameters.cs.meta deleted file mode 100644 index c231a66e..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildParameters.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 33d6ef15c1984642bd83826064bee25d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildResults.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildResults.cs deleted file mode 100644 index b249d051..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildResults.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Player; -using UnityEngine.Build.Pipeline; - -namespace UnityEditor.Build.Pipeline -{ - /// - /// Basic implementation of IBuildResults. Stores the results for script compilation and content building. - /// - /// - [Serializable] - public class BuildResults : IBuildResults - { - /// - public ScriptCompilationResult ScriptResults { get; set; } - /// - public Dictionary WriteResults { get; private set; } - - /// - /// Default constructor, initializes properties to defaults - /// - public BuildResults() - { - WriteResults = new Dictionary(); - } - } - - /// - /// Basic implementation of IBundleBuildResults. Stores the results for script compilation and asset bundle building. - /// - /// - [Serializable] - public class BundleBuildResults : IBundleBuildResults - { - /// - public ScriptCompilationResult ScriptResults { get; set; } - /// - public Dictionary BundleInfos { get; private set; } - /// - public Dictionary WriteResults { get; private set; } - - /// - /// Default constructor, initializes properties to defaults - /// - public BundleBuildResults() - { - BundleInfos = new Dictionary(); - WriteResults = new Dictionary(); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildResults.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildResults.cs.meta deleted file mode 100644 index 976fd6ff..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildResults.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 63ad63bf47749b944a87fce982b8b54b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildSpriteData.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildSpriteData.cs deleted file mode 100644 index 81e3857c..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildSpriteData.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.Build.Pipeline.Interfaces; - -namespace UnityEditor.Build.Pipeline -{ - [Serializable] - public class BuildSpriteData : IBuildSpriteData - { - public Dictionary ImporterData { get; set; } - - public BuildSpriteData() - { - ImporterData = new Dictionary(); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildSpriteData.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildSpriteData.cs.meta deleted file mode 100644 index 4e2c321a..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildSpriteData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 54aaf7e8e1f02d34182d881089f11f33 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildTasksRunner.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildTasksRunner.cs deleted file mode 100644 index 646b2527..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildTasksRunner.cs +++ /dev/null @@ -1,176 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.Build.Pipeline.Injector; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Utilities; -using UnityEditor.Build.Profiler; - -namespace UnityEditor.Build.Pipeline -{ - /// - /// Basic static class containing default implementations for BuildTask validation and running. - /// - public static class BuildTasksRunner - { - /// - /// Basic run implementation that takes a set of tasks, a context, and runs returning the build results. - /// , , and - /// - /// The set of build tasks to run. - /// The build context to use for this run. - /// Return code with status information about success or failure causes. - public static ReturnCode Run(IList pipeline, IBuildContext context) - { - // Avoid throwing exceptions in here as we don't want them bubbling up to calling user code - if (pipeline == null) - { - BuildLogger.LogException(new ArgumentNullException("pipeline")); - return ReturnCode.Exception; - } - - // Avoid throwing exceptions in here as we don't want them bubbling up to calling user code - if (context == null) - { - BuildLogger.LogException(new ArgumentNullException("context")); - return ReturnCode.Exception; - } - - IProgressTracker tracker; - if (context.TryGetContextObject(out tracker)) - tracker.TaskCount = pipeline.Count; - - foreach (IBuildTask task in pipeline) - { - try - { - if (!tracker.UpdateTaskUnchecked(task.GetType().Name.HumanReadable())) - return ReturnCode.Canceled; - - ContextInjector.Inject(context, task); - var result = task.Run(); - if (result < ReturnCode.Success) - return result; - ContextInjector.Extract(context, task); - } - catch (Exception e) - { - BuildLogger.LogException(e); - return ReturnCode.Exception; - } - } - - return ReturnCode.Success; - } - - /// - /// Run implementation with task profiler that takes a set of tasks, a context, runs returning the build results and prints out the profiler details. - /// , , and - /// - /// The set of build tasks to run. - /// The build context to use for this run. - /// Return code with status information about success or failure causes. - internal static ReturnCode RunProfiled(IList pipeline, IBuildContext context) - { - // Avoid throwing exceptions in here as we don't want them bubbling up to calling user code - if (pipeline == null) - { - BuildLogger.LogException(new ArgumentNullException("pipeline")); - return ReturnCode.Exception; - } - - // Avoid throwing exceptions in here as we don't want them bubbling up to calling user code - if (context == null) - { - BuildLogger.LogException(new ArgumentNullException("context")); - return ReturnCode.Exception; - } - - var profiler = new BuildProfiler(pipeline.Count + 1); - profiler.Start(pipeline.Count, "TotalTime"); - int count = 0; - - IProgressTracker tracker; - if (context.TryGetContextObject(out tracker)) - tracker.TaskCount = pipeline.Count; - - foreach (IBuildTask task in pipeline) - { - try - { - if (!tracker.UpdateTaskUnchecked(task.GetType().Name.HumanReadable())) - { - profiler.Stop(pipeline.Count); - profiler.Print(); - return ReturnCode.Canceled; - } - - ContextInjector.Inject(context, task); - profiler.Start(count, task.GetType().Name); - var result = task.Run(); - profiler.Stop(count++); - - if (result < ReturnCode.Success) - { - profiler.Stop(pipeline.Count); - profiler.Print(); - return result; - } - ContextInjector.Extract(context, task); - } - catch (Exception e) - { - BuildLogger.LogException(e); - profiler.Stop(count); - profiler.Print(); - return ReturnCode.Exception; - } - } - - profiler.Stop(pipeline.Count); - profiler.Print(); - return ReturnCode.Success; - } - - /// - /// Basic validate implementation that takes a set of tasks, a context, and does checks to ensure the task requirements are all satisfied. - /// , , and - /// - /// The set of build tasks to run. - /// The build context to use for this run. - /// Return code with status information about success or failure causes. - public static ReturnCode Validate(IList pipeline, IBuildContext context) - { - //// Avoid throwing exceptions in here as we don't want them bubbling up to calling user code - //if (pipeline == null) - //{ - // BuildLogger.LogException(new ArgumentNullException("pipeline")); - // return ReturnCode.Exception; - //} - - //// Avoid throwing exceptions in here as we don't want them bubbling up to calling user code - //if (context == null) - //{ - // BuildLogger.LogException(new ArgumentNullException("context")); - // return ReturnCode.Exception; - //} - - //var requiredTypes = new HashSet(); - //foreach (IBuildTask task in pipeline) - // requiredTypes.UnionWith(task.RequiredContextTypes); - - //var missingTypes = new List(); - //foreach (Type requiredType in requiredTypes) - //{ - // if (!context.ContainsContextObject(requiredType)) - // missingTypes.Add(requiredType.Name); - //} - - //if (missingTypes.Count > 0) - //{ - // BuildLogger.LogError("Missing required object types to run build pipeline:\n{0}", string.Join(", ", missingTypes.ToArray())); - // return ReturnCode.MissingRequiredObjects; - //} - return ReturnCode.Success; - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildTasksRunner.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildTasksRunner.cs.meta deleted file mode 100644 index db567325..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildTasksRunner.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cba3bf5fbe905c841b9ace7d603fb1d8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildWriteData.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildWriteData.cs deleted file mode 100644 index c6b50712..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildWriteData.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Interfaces; - -namespace UnityEditor.Build.Pipeline -{ - /// - /// Basic implementation of IWriteData. Stores the write information calculated during a build. - /// - /// - [Serializable] - public class BuildWriteData : IWriteData - { - /// - public Dictionary> AssetToFiles { get; private set; } - /// - public Dictionary> FileToObjects { get; private set; } - /// - public List WriteOperations { get; private set; } - - /// - /// Default constructor, initializes properties to defaults - /// - public BuildWriteData() - { - AssetToFiles = new Dictionary>(); - FileToObjects = new Dictionary>(); - WriteOperations = new List(); - } - } - - /// - /// Basic implementation of IBundleWriteData. Stores the asset bundle write information calculated during a build. - /// - /// - [Serializable] - public class BundleWriteData : IBundleWriteData - { - public Dictionary> AssetToFiles { get; private set; } - /// - public Dictionary> FileToObjects { get; private set; } - /// - public Dictionary FileToBundle { get; private set; } - /// - public Dictionary FileToUsageSet { get; private set; } - /// - public Dictionary FileToReferenceMap { get; private set; } - /// - public List WriteOperations { get; private set; } - - /// - /// Default constructor, initializes properties to defaults - /// - public BundleWriteData() - { - AssetToFiles = new Dictionary>(); - FileToObjects = new Dictionary>(); - FileToBundle = new Dictionary(); - FileToUsageSet = new Dictionary(); - FileToReferenceMap = new Dictionary(); - WriteOperations = new List(); - } - - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildWriteData.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildWriteData.cs.meta deleted file mode 100644 index 78460c92..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BuildWriteData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2b783d170d8ed6b468a9500bbe040087 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BundleExplictObjectLayout.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BundleExplictObjectLayout.cs deleted file mode 100644 index dfb36029..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BundleExplictObjectLayout.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Interfaces; - -namespace UnityEditor.Build.Pipeline -{ - /// - /// Optional context object used for overriding the location where specific objects will be serialized - /// - [Serializable] - public class BundleExplictObjectLayout : IBundleExplictObjectLayout - { - /// - public Dictionary ExplicitObjectLocation { get; set; } - - /// - /// Default constructor, initializes properties to defaults - /// - public BundleExplictObjectLayout() - { - ExplicitObjectLocation = new Dictionary(); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BundleExplictObjectLayout.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BundleExplictObjectLayout.cs.meta deleted file mode 100644 index 196cea08..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/BundleExplictObjectLayout.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d723a770823401649b007044d9a978ba -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/DefaultBuildTasks.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/DefaultBuildTasks.cs deleted file mode 100644 index abee246a..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/DefaultBuildTasks.cs +++ /dev/null @@ -1,143 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Tasks; - -namespace UnityEditor.Build.Pipeline -{ - /// - /// Basic static class containing preset build pipeline task collections. - /// - public static class DefaultBuildTasks - { - /// - /// Enum of the different preset build pipelines - /// - public enum Preset - { - PlayerScriptsOnly, - AssetBundleCompatible, - AssetBundleBuiltInShaderExtraction, - } - - /// - /// Constructs and returns an IList containing the build tasks in the correct order for the preset build pipeline. - /// - /// The preset build pipeline to construct and return. - /// The boolean to allow bypassing script compilation of a preset build pipeline if supported. - /// IList containing the build tasks in the correct order for the preset build pipeline. - public static IList Create(Preset preset) - { - switch (preset) - { - case Preset.PlayerScriptsOnly: - return PlayerScriptsOnly(); - case Preset.AssetBundleCompatible: - return AssetBundleCompatible(); - case Preset.AssetBundleBuiltInShaderExtraction: - return AssetBundleBuiltInShaderExtraction(); - default: - throw new NotImplementedException(string.Format("Preset for '{0}' not yet implemented.", preset)); - } - } - - static IList PlayerScriptsOnly() - { - var buildTasks = new List(); - - // Setup - buildTasks.Add(new SwitchToBuildPlatform()); - - // Player Scripts - buildTasks.Add(new BuildPlayerScripts()); - buildTasks.Add(new PostScriptsCallback()); - - // Dependency - // - Empty - - // Packing - // - Empty - - // Writing - // - Empty - - return buildTasks; - } - - static IList AssetBundleCompatible() - { - var buildTasks = new List(); - - // Setup - buildTasks.Add(new SwitchToBuildPlatform()); - buildTasks.Add(new RebuildSpriteAtlasCache()); - - // Player Scripts - buildTasks.Add(new BuildPlayerScripts()); - buildTasks.Add(new PostScriptsCallback()); - - // Dependency - buildTasks.Add(new CalculateSceneDependencyData()); - buildTasks.Add(new CalculateAssetDependencyData()); - buildTasks.Add(new StripUnusedSpriteSources()); - buildTasks.Add(new PostDependencyCallback()); - - // Packing - buildTasks.Add(new GenerateBundlePacking()); - buildTasks.Add(new GenerateBundleCommands()); - buildTasks.Add(new GenerateSubAssetPathMaps()); - buildTasks.Add(new GenerateBundleMaps()); - buildTasks.Add(new PostPackingCallback()); - - // Writing - buildTasks.Add(new WriteSerializedFiles()); - buildTasks.Add(new ArchiveAndCompressBundles()); - buildTasks.Add(new AppendBundleHash()); - buildTasks.Add(new PostWritingCallback()); - - // Generate manifest files - // TODO: IMPL manifest generation - - return buildTasks; - } - - static IList AssetBundleBuiltInShaderExtraction() - { - var buildTasks = new List(); - - // Setup - buildTasks.Add(new SwitchToBuildPlatform()); - buildTasks.Add(new RebuildSpriteAtlasCache()); - - // Player Scripts - buildTasks.Add(new BuildPlayerScripts()); - buildTasks.Add(new PostScriptsCallback()); - - // Dependency - buildTasks.Add(new CalculateSceneDependencyData()); - buildTasks.Add(new CalculateAssetDependencyData()); - buildTasks.Add(new StripUnusedSpriteSources()); - buildTasks.Add(new CreateBuiltInShadersBundle("UnityBuiltInShaders.bundle")); - buildTasks.Add(new PostDependencyCallback()); - - // Packing - buildTasks.Add(new GenerateBundlePacking()); - buildTasks.Add(new UpdateBundleObjectLayout()); - buildTasks.Add(new GenerateBundleCommands()); - buildTasks.Add(new GenerateSubAssetPathMaps()); - buildTasks.Add(new GenerateBundleMaps()); - buildTasks.Add(new PostPackingCallback()); - - // Writing - buildTasks.Add(new WriteSerializedFiles()); - buildTasks.Add(new ArchiveAndCompressBundles()); - buildTasks.Add(new AppendBundleHash()); - buildTasks.Add(new PostWritingCallback()); - - // Generate manifest files - // TODO: IMPL manifest generation - - return buildTasks; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/DefaultBuildTasks.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/DefaultBuildTasks.cs.meta deleted file mode 100644 index 0ec55fb4..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/DefaultBuildTasks.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 552d6f72e940a1c4a809b635a8f40d8b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/LinearPackedIdentifiers.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/LinearPackedIdentifiers.cs deleted file mode 100644 index 8b65265f..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/LinearPackedIdentifiers.cs +++ /dev/null @@ -1,39 +0,0 @@ -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Utilities; - -namespace UnityEditor.Build.Pipeline -{ - /// - /// Generates identifiers linearly for built content. Only deterministic if object order and initial Index is deterministic. - /// - public class LinearPackedIdentifiers : IDeterministicIdentifiers - { - /// - /// The index at which to start linear id assignment. - /// - public long Index { get; set; } - - /// - /// Default constructor, takes an initial index at which to start linear id assignment. - /// - /// Initial index at which to start linear id assignment. - public LinearPackedIdentifiers(long index) - { - Index = index; - } - - /// - public virtual string GenerateInternalFileName(string name) - { - var hash = HashingMethods.Calculate(name).ToString(); - return string.Format("CAB-{0}", hash); - } - - /// - public virtual long SerializationIndexFromObjectIdentifier(ObjectIdentifier objectID) - { - return Index++; - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/LinearPackedIdentifiers.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/LinearPackedIdentifiers.cs.meta deleted file mode 100644 index c581a61e..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/LinearPackedIdentifiers.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f004933c56f4b2f4792fdcc1aca8f9b7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/PrefabPackedIdentifiers.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/PrefabPackedIdentifiers.cs deleted file mode 100644 index d016f0a1..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/PrefabPackedIdentifiers.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Utilities; - -namespace UnityEditor.Build.Pipeline -{ - /// - /// Generates a deterministic identifier using a MD5 hash algorithm and does not require object ordering to be deterministic. - /// This algorithm ensures objects coming from the same asset are packed closer together and can improve loading performance under certain situations. - /// - public class PrefabPackedIdentifiers : IDeterministicIdentifiers - { - /// - public virtual string GenerateInternalFileName(string name) - { - var hash = HashingMethods.Calculate(name).ToString(); - return string.Format("CAB-{0}", hash); - } - - /// - public virtual long SerializationIndexFromObjectIdentifier(ObjectIdentifier objectID) - { - byte[] assetHash = HashingMethods.Calculate(objectID.guid, objectID.filePath).ToBytes(); - byte[] objectHash = HashingMethods.Calculate(objectID).ToBytes(); - - var assetVal = BitConverter.ToUInt64(assetHash, 0); - var objectVal = BitConverter.ToUInt64(objectHash, 0); - return (long)((0xFFFFFFFF00000000 & assetVal) | (0x00000000FFFFFFFF & (objectVal ^ assetVal))); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/PrefabPackedIdentifiers.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/PrefabPackedIdentifiers.cs.meta deleted file mode 100644 index 4ae1fd49..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/PrefabPackedIdentifiers.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5046b687c98667141a9a4f0add3345be -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/Unity5PackedIdentifiers.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/Unity5PackedIdentifiers.cs deleted file mode 100644 index 01aa7d87..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/Unity5PackedIdentifiers.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Utilities; - -namespace UnityEditor.Build.Pipeline -{ - /// - /// Generates a deterministic identifier using a MD4 hash algorithm and does not require object ordering to be deterministic. - /// This algorithm generates identical results to what is used internally in . - /// - public class Unity5PackedIdentifiers : IDeterministicIdentifiers - { - /// - public virtual string GenerateInternalFileName(string name) - { - return "CAB-" + HashingMethods.Calculate(name); - } - - /// - public virtual long SerializationIndexFromObjectIdentifier(ObjectIdentifier objectID) - { - RawHash hash; - if (objectID.fileType == FileType.MetaAssetType || objectID.fileType == FileType.SerializedAssetType) - hash = HashingMethods.Calculate(objectID.guid.ToString(), objectID.fileType, objectID.localIdentifierInFile); - else - hash = HashingMethods.Calculate(objectID.filePath, objectID.localIdentifierInFile); - return BitConverter.ToInt64(hash.ToBytes(), 0); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/Unity5PackedIdentifiers.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/Unity5PackedIdentifiers.cs.meta deleted file mode 100644 index d0f05dcc..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Shared/Unity5PackedIdentifiers.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b8ee6f8e7df445bfb88fb0372dcf691a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks.meta deleted file mode 100644 index b8815930..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: d3f1cef9a16d4a21826a13742ee5ea01 -timeCreated: 1513096288 \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/AppendBundleHash.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/AppendBundleHash.cs deleted file mode 100644 index c14abe7b..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/AppendBundleHash.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System.IO; -using System.Linq; -using UnityEditor.Build.Pipeline.Injector; -using UnityEditor.Build.Pipeline.Interfaces; - -namespace UnityEditor.Build.Pipeline.Tasks -{ - public class AppendBundleHash : IBuildTask - { - public int Version { get { return 1; } } - -#pragma warning disable 649 - [InjectContext(ContextUsage.In)] - IBundleBuildParameters m_Parameters; - - [InjectContext] - IBundleBuildResults m_Results; -#pragma warning restore 649 - - public ReturnCode Run() - { - if (!m_Parameters.AppendHash) - return ReturnCode.SuccessNotRun; - - string[] bundles = m_Results.BundleInfos.Keys.ToArray(); - foreach (string bundle in bundles) - { - var details = m_Results.BundleInfos[bundle]; - var oldFileName = details.FileName; - var newFileName = string.Format("{0}_{1}", details.FileName, details.Hash.ToString()); - details.FileName = newFileName; - m_Results.BundleInfos[bundle] = details; - - File.Delete(newFileName); - File.Move(oldFileName, newFileName); - } - - return ReturnCode.Success; - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/AppendBundleHash.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/AppendBundleHash.cs.meta deleted file mode 100644 index 591f0c10..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/AppendBundleHash.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f4af5ab96cd890342912b92e54ac2c3e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/ArchiveAndCompressBundles.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/ArchiveAndCompressBundles.cs deleted file mode 100644 index c80605cd..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/ArchiveAndCompressBundles.cs +++ /dev/null @@ -1,202 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using System.Linq; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Injector; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Utilities; -using UnityEngine; -using UnityEngine.Build.Pipeline; - -namespace UnityEditor.Build.Pipeline.Tasks -{ -#if UNITY_2018_3_OR_NEWER - using BuildCompression = UnityEngine.BuildCompression; -#else - using BuildCompression = UnityEditor.Build.Content.BuildCompression; -#endif - - public class ArchiveAndCompressBundles : IBuildTask - { - public int Version { get { return 1; } } - -#pragma warning disable 649 - [InjectContext(ContextUsage.In)] - IBuildParameters m_Parameters; - - [InjectContext(ContextUsage.In)] - IBundleWriteData m_WriteData; - - [InjectContext] - IBundleBuildResults m_Results; - - [InjectContext(ContextUsage.In, true)] - IProgressTracker m_Tracker; - - [InjectContext(ContextUsage.In, true)] - IBuildCache m_Cache; -#pragma warning restore 649 - - CacheEntry GetCacheEntry(string bundleName, IEnumerable resources, BuildCompression compression) - { - var entry = new CacheEntry(); - entry.Type = CacheEntry.EntryType.Data; - entry.Guid = HashingMethods.Calculate("ArchiveAndCompressBundles", bundleName).ToGUID(); - entry.Hash = HashingMethods.Calculate(Version, resources, compression).ToHash128(); - entry.Version = Version; - return entry; - } - - static CachedInfo GetCachedInfo(IBuildCache cache, CacheEntry entry, IEnumerable resources, BundleDetails details) - { - var info = new CachedInfo(); - info.Asset = entry; - - var dependencies = new HashSet(); - foreach (var resource in resources) - dependencies.Add(cache.GetCacheEntry(resource.fileName)); - info.Dependencies = dependencies.ToArray(); - - info.Data = new object[] { details }; - - return info; - } - - static Hash128 CalculateHashVersion(Dictionary fileOffsets, ResourceFile[] resourceFiles) - { - List hashes = new List(); - foreach (ResourceFile file in resourceFiles) - { - if (file.serializedFile) - { - // For serialized files, we ignore the header for the hash value. - // This leaves us with a hash value of just the written object data. - using (var stream = new FileStream(file.fileName, FileMode.Open, FileAccess.Read)) - { - stream.Position = (long)fileOffsets[file.fileName]; - hashes.Add(HashingMethods.CalculateStream(stream)); - } - } - else - hashes.Add(HashingMethods.CalculateFile(file.fileName)); - } - return HashingMethods.Calculate(hashes).ToHash128(); - } - - public ReturnCode Run() - { - Dictionary fileOffsets = new Dictionary(); - List>> bundleResources; - { - Dictionary> bundleToResources = new Dictionary>(); - foreach (var pair in m_Results.WriteResults) - { - string bundle = m_WriteData.FileToBundle[pair.Key]; - List resourceFiles; - bundleToResources.GetOrAdd(bundle, out resourceFiles); - resourceFiles.AddRange(pair.Value.resourceFiles); - - foreach (ResourceFile serializedFile in pair.Value.resourceFiles) - { - if (!serializedFile.serializedFile) - continue; - - ObjectSerializedInfo firstObject = pair.Value.serializedObjects.First(x => x.header.fileName == serializedFile.fileAlias); - fileOffsets[serializedFile.fileName] = firstObject.header.offset; - } - } - bundleResources = bundleToResources.ToList(); - } - - Dictionary> bundleDependencies = new Dictionary>(); - foreach (var files in m_WriteData.AssetToFiles.Values) - { - if (files.IsNullOrEmpty()) - continue; - - string bundle = m_WriteData.FileToBundle[files.First()]; - HashSet dependencies; - bundleDependencies.GetOrAdd(bundle, out dependencies); - dependencies.UnionWith(files.Select(x => m_WriteData.FileToBundle[x])); - dependencies.Remove(bundle); - } - - IList entries = bundleResources.Select(x => GetCacheEntry(x.Key, x.Value, m_Parameters.GetCompressionForIdentifier(x.Key))).ToList(); - IList cachedInfo = null; - IList uncachedInfo = null; - if (m_Parameters.UseCache && m_Cache != null) - { - m_Cache.LoadCachedData(entries, out cachedInfo); - - uncachedInfo = new List(); - } - - for (int i = 0; i < bundleResources.Count; i++) - { - string bundleName = bundleResources[i].Key; - ResourceFile[] resourceFiles = bundleResources[i].Value.ToArray(); - BuildCompression compression = m_Parameters.GetCompressionForIdentifier(bundleName); - - string writePath; - BundleDetails details; - if (cachedInfo != null && cachedInfo[i] != null) - { - if (!m_Tracker.UpdateInfoUnchecked(string.Format("{0} (Cached)", bundleName))) - return ReturnCode.Canceled; - - details = (BundleDetails)cachedInfo[i].Data[0]; - details.FileName = m_Parameters.GetOutputFilePathForIdentifier(bundleName); - - HashSet dependencies; - if (bundleDependencies.TryGetValue(bundleName, out dependencies)) - details.Dependencies = dependencies.ToArray(); - else - details.Dependencies = new string[0]; - writePath = string.Format("{0}/{1}", m_Cache.GetCachedArtifactsDirectory(entries[i]), bundleName); - } - else - { - if (!m_Tracker.UpdateInfoUnchecked(bundleName)) - return ReturnCode.Canceled; - - details = new BundleDetails(); - writePath = string.Format("{0}/{1}", m_Parameters.TempOutputFolder, bundleName); - if (m_Parameters.UseCache && m_Cache != null) - writePath = string.Format("{0}/{1}", m_Cache.GetCachedArtifactsDirectory(entries[i]), bundleName); - Directory.CreateDirectory(Path.GetDirectoryName(writePath)); - - details.FileName = m_Parameters.GetOutputFilePathForIdentifier(bundleName); - details.Crc = ContentBuildInterface.ArchiveAndCompress(resourceFiles, writePath, compression); - details.Hash = CalculateHashVersion(fileOffsets, resourceFiles); - - HashSet dependencies; - if (bundleDependencies.TryGetValue(bundleName, out dependencies)) - details.Dependencies = dependencies.ToArray(); - else - details.Dependencies = new string[0]; - - if (uncachedInfo != null) - uncachedInfo.Add(GetCachedInfo(m_Cache, entries[i], resourceFiles, details)); - } - - SetOutputInformation(writePath, details.FileName, bundleName, details); - } - - if (m_Parameters.UseCache && m_Cache != null) - m_Cache.SaveCachedData(uncachedInfo); - - return ReturnCode.Success; - } - - void SetOutputInformation(string writePath, string finalPath, string bundleName, BundleDetails details) - { - if (finalPath != writePath) - { - var directory = Path.GetDirectoryName(finalPath); - Directory.CreateDirectory(directory); - File.Copy(writePath, finalPath, true); - } - m_Results.BundleInfos.Add(bundleName, details); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/ArchiveAndCompressBundles.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/ArchiveAndCompressBundles.cs.meta deleted file mode 100644 index 418911ed..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/ArchiveAndCompressBundles.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b7bdc0bcfab4e714b88a12d6b22bac9b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/BuildPlayerScripts.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/BuildPlayerScripts.cs deleted file mode 100644 index a108e7a2..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/BuildPlayerScripts.cs +++ /dev/null @@ -1,35 +0,0 @@ -using UnityEditor.Build.Pipeline.Injector; -using UnityEditor.Build.Pipeline.Utilities; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Player; - -namespace UnityEditor.Build.Pipeline.Tasks -{ - public class BuildPlayerScripts : IBuildTask - { - public int Version { get { return 1; } } - -#pragma warning disable 649 - [InjectContext] - IBuildParameters m_Parameters; - - [InjectContext] - IBuildResults m_Results; -#pragma warning restore 649 - - public ReturnCode Run() - { - if (m_Parameters.ScriptInfo != null) - return ReturnCode.SuccessNotRun; - - // TODO: Replace with call to GetTempOrCachePath - // TODO: Create tasks to copy scripts to correct output folder? - m_Results.ScriptResults = PlayerBuildInterface.CompilePlayerScripts(m_Parameters.GetScriptCompilationSettings(), m_Parameters.TempOutputFolder); - m_Parameters.ScriptInfo = m_Results.ScriptResults.typeDB; - - if (m_Results.ScriptResults.assemblies.IsNullOrEmpty() && m_Results.ScriptResults.typeDB == null) - return ReturnCode.Error; - return ReturnCode.Success; - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/BuildPlayerScripts.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/BuildPlayerScripts.cs.meta deleted file mode 100644 index 177e6dd8..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/BuildPlayerScripts.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2c42a8e1e1d1b874e95761dab5bdfbc8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/CalculateAssetDependencyData.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/CalculateAssetDependencyData.cs deleted file mode 100644 index fabd9081..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/CalculateAssetDependencyData.cs +++ /dev/null @@ -1,170 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Injector; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Utilities; - -namespace UnityEditor.Build.Pipeline.Tasks -{ - public class CalculateAssetDependencyData : IBuildTask - { - public int Version { get { return 2; } } - -#pragma warning disable 649 - [InjectContext(ContextUsage.In)] - IBuildParameters m_Parameters; - - [InjectContext(ContextUsage.In)] - IBuildContent m_Content; - - [InjectContext] - IDependencyData m_DependencyData; - - [InjectContext(ContextUsage.InOut, true)] - IBuildSpriteData m_SpriteData; - - [InjectContext(ContextUsage.InOut, true)] - IBuildExtendedAssetData m_ExtendedAssetData; - - [InjectContext(ContextUsage.In, true)] - IProgressTracker m_Tracker; - - [InjectContext(ContextUsage.In, true)] - IBuildCache m_Cache; -#pragma warning restore 649 - - CachedInfo GetCachedInfo(GUID asset, AssetLoadInfo assetInfo, BuildUsageTagSet usageTags, SpriteImporterData importerData, ExtendedAssetData assetData) - { - var info = new CachedInfo(); - info.Asset = m_Cache.GetCacheEntry(asset, Version); - - var dependencies = new HashSet(); - foreach (var reference in assetInfo.referencedObjects) - dependencies.Add(m_Cache.GetCacheEntry(reference)); - info.Dependencies = dependencies.ToArray(); - - info.Data = new object[] { assetInfo, usageTags, importerData, assetData }; - - return info; - } - - public ReturnCode Run() - { - var globalUsage = m_DependencyData.GlobalUsage; - foreach (SceneDependencyInfo sceneInfo in m_DependencyData.SceneInfo.Values) - globalUsage |= sceneInfo.globalUsage; - - if (m_SpriteData == null) - m_SpriteData = new BuildSpriteData(); - - if (m_ExtendedAssetData == null) - m_ExtendedAssetData = new BuildExtendedAssetData(); - - IList cachedInfo = null; - List uncachedInfo = null; - if (m_Parameters.UseCache && m_Cache != null) - { - IList entries = m_Content.Assets.Select(x => m_Cache.GetCacheEntry(x, Version)).ToList(); - m_Cache.LoadCachedData(entries, out cachedInfo); - - uncachedInfo = new List(); - } - - for (int i = 0; i < m_Content.Assets.Count; i++) - { - GUID asset = m_Content.Assets[i]; - string assetPath = AssetDatabase.GUIDToAssetPath(asset.ToString()); - - AssetLoadInfo assetInfo; - BuildUsageTagSet usageTags; - SpriteImporterData importerData; - ExtendedAssetData assetData; - - if (cachedInfo != null && cachedInfo[i] != null) - { - if (!m_Tracker.UpdateInfoUnchecked(string.Format("{0} (Cached)", assetPath))) - return ReturnCode.Canceled; - - assetInfo = cachedInfo[i].Data[0] as AssetLoadInfo; - usageTags = cachedInfo[i].Data[1] as BuildUsageTagSet; - importerData = cachedInfo[i].Data[2] as SpriteImporterData; - assetData = cachedInfo[i].Data[3] as ExtendedAssetData; - } - else - { - if (!m_Tracker.UpdateInfoUnchecked(assetPath)) - return ReturnCode.Canceled; - - assetInfo = new AssetLoadInfo(); - usageTags = new BuildUsageTagSet(); - importerData = null; - assetData = null; - - assetInfo.asset = asset; - var includedObjects = ContentBuildInterface.GetPlayerObjectIdentifiersInAsset(asset, m_Parameters.Target); - assetInfo.includedObjects = new List(includedObjects); - var referencedObjects = ContentBuildInterface.GetPlayerDependenciesForObjects(includedObjects, m_Parameters.Target, m_Parameters.ScriptInfo); - assetInfo.referencedObjects = new List(referencedObjects); - ContentBuildInterface.CalculateBuildUsageTags(referencedObjects, includedObjects, globalUsage, usageTags, m_DependencyData.DependencyUsageCache); - - var importer = AssetImporter.GetAtPath(assetPath) as TextureImporter; - if (importer != null && importer.textureType == TextureImporterType.Sprite) - { - importerData = new SpriteImporterData(); - importerData.PackedSprite = !string.IsNullOrEmpty(importer.spritePackingTag); - importerData.SourceTexture = includedObjects.First(); - } - - var representations = AssetDatabase.LoadAllAssetRepresentationsAtPath(assetPath); - if (!representations.IsNullOrEmpty()) - { - assetData = new ExtendedAssetData(); - foreach (var representation in representations) - { - if (AssetDatabase.IsMainAsset(representation)) - continue; - - string guid; - long localId; - if (!AssetDatabase.TryGetGUIDAndLocalFileIdentifier(representation, out guid, out localId)) - continue; - - assetData.Representations.AddRange(includedObjects.Where(x => x.localIdentifierInFile == localId)); - } - } - - if (uncachedInfo != null) - uncachedInfo.Add(GetCachedInfo(asset, assetInfo, usageTags, importerData, assetData)); - } - - SetOutputInformation(asset, assetInfo, usageTags, importerData, assetData); - } - - if (m_SpriteData.ImporterData.Count == 0) - m_SpriteData = null; - - if (m_ExtendedAssetData.ExtendedData.Count == 0) - m_SpriteData = null; - - if (m_Parameters.UseCache && m_Cache != null) - m_Cache.SaveCachedData(uncachedInfo); - - return ReturnCode.Success; - } - - void SetOutputInformation(GUID asset, AssetLoadInfo assetInfo, BuildUsageTagSet usageTags, SpriteImporterData importerData, ExtendedAssetData assetData) - { - // Add generated asset information to IDependencyData - m_DependencyData.AssetInfo.Add(asset, assetInfo); - m_DependencyData.AssetUsage.Add(asset, usageTags); - - // Add generated importer data to IBuildSpriteData - if (importerData != null) - m_SpriteData.ImporterData.Add(asset, importerData); - - if (assetData != null) - m_ExtendedAssetData.ExtendedData.Add(asset, assetData); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/CalculateAssetDependencyData.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/CalculateAssetDependencyData.cs.meta deleted file mode 100644 index 12697421..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/CalculateAssetDependencyData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 40e93d78541d2664e8424875bca4e041 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/CalculateSceneDependencyData.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/CalculateSceneDependencyData.cs deleted file mode 100644 index 5504fd4c..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/CalculateSceneDependencyData.cs +++ /dev/null @@ -1,117 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using System.Linq; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Injector; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Utilities; - -namespace UnityEditor.Build.Pipeline.Tasks -{ - public class CalculateSceneDependencyData : IBuildTask - { - public int Version { get { return 1; } } - -#pragma warning disable 649 - [InjectContext(ContextUsage.In)] - IBuildParameters m_Parameters; - - [InjectContext(ContextUsage.In)] - IBuildContent m_Content; - - [InjectContext] - IDependencyData m_DependencyData; - - [InjectContext(ContextUsage.In, true)] - IProgressTracker m_Tracker; - - [InjectContext(ContextUsage.In, true)] - IBuildCache m_Cache; -#pragma warning restore 649 - - CachedInfo GetCachedInfo(GUID scene, IEnumerable references, SceneDependencyInfo sceneInfo, BuildUsageTagSet usageTags) - { - var info = new CachedInfo(); - info.Asset = m_Cache.GetCacheEntry(scene, Version); - - var dependencies = new HashSet(); - foreach (var reference in references) - dependencies.Add(m_Cache.GetCacheEntry(reference)); - info.Dependencies = dependencies.ToArray(); - - info.Data = new object[] { sceneInfo, usageTags }; - - return info; - } - - public ReturnCode Run() - { - if (m_Content.Scenes.IsNullOrEmpty()) - return ReturnCode.SuccessNotRun; - - IList cachedInfo = null; - IList uncachedInfo = null; - if (m_Parameters.UseCache && m_Cache != null) - { - IList entries = m_Content.Scenes.Select(x => m_Cache.GetCacheEntry(x, Version)).ToList(); - m_Cache.LoadCachedData(entries, out cachedInfo); - - uncachedInfo = new List(); - } - - BuildSettings settings = m_Parameters.GetContentBuildSettings(); - for (int i = 0; i < m_Content.Scenes.Count; i++) - { - GUID scene = m_Content.Scenes[i]; - string scenePath = AssetDatabase.GUIDToAssetPath(scene.ToString()); - - SceneDependencyInfo sceneInfo; - BuildUsageTagSet usageTags; - - if (cachedInfo != null && cachedInfo[i] != null) - { - if (!m_Tracker.UpdateInfoUnchecked(string.Format("{0} (Cached)", scenePath))) - return ReturnCode.Canceled; - - sceneInfo = (SceneDependencyInfo)cachedInfo[i].Data[0]; - usageTags = cachedInfo[i].Data[1] as BuildUsageTagSet; - } - else - { - if (!m_Tracker.UpdateInfoUnchecked(scenePath)) - return ReturnCode.Canceled; - - usageTags = new BuildUsageTagSet(); - string outputFolder = m_Parameters.TempOutputFolder; - if (m_Parameters.UseCache && m_Cache != null) - outputFolder = m_Cache.GetCachedArtifactsDirectory(m_Cache.GetCacheEntry(scene, Version)); - Directory.CreateDirectory(outputFolder); - - -#if UNITY_2019_3_OR_NEWER - sceneInfo = ContentBuildInterface.CalculatePlayerDependenciesForScene(scenePath, settings, usageTags, m_DependencyData.DependencyUsageCache); -#else - sceneInfo = ContentBuildInterface.PrepareScene(scenePath, settings, usageTags, m_DependencyData.DependencyUsageCache, outputFolder); -#endif - - if (uncachedInfo != null) - uncachedInfo.Add(GetCachedInfo(scene, sceneInfo.referencedObjects, sceneInfo, usageTags)); - } - - SetOutputInformation(scene, sceneInfo, usageTags); - } - - if (m_Parameters.UseCache && m_Cache != null) - m_Cache.SaveCachedData(uncachedInfo); - - return ReturnCode.Success; - } - - void SetOutputInformation(GUID asset, SceneDependencyInfo sceneInfo, BuildUsageTagSet usageTags) - { - // Add generated scene information to BuildDependencyData - m_DependencyData.SceneInfo.Add(asset, sceneInfo); - m_DependencyData.SceneUsage.Add(asset, usageTags); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/CalculateSceneDependencyData.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/CalculateSceneDependencyData.cs.meta deleted file mode 100644 index bcdb96c9..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/CalculateSceneDependencyData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e2d5a57757fc0cc4eb4f2fade47b59dd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/CreateBuiltInShadersBundle.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/CreateBuiltInShadersBundle.cs deleted file mode 100644 index 07bea613..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/CreateBuiltInShadersBundle.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Injector; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEngine; - -namespace UnityEditor.Build.Pipeline.Tasks -{ - /// - /// Optional build task that extracts Unity's built in shaders and assigns them to the specified bundle - /// - public class CreateBuiltInShadersBundle : IBuildTask - { - static readonly GUID k_BuiltInGuid = new GUID("0000000000000000f000000000000000"); - public int Version { get { return 1; } } - -#pragma warning disable 649 - [InjectContext(ContextUsage.In)] - IDependencyData m_DependencyData; - - [InjectContext(ContextUsage.InOut, true)] - IBundleExplictObjectLayout m_Layout; -#pragma warning restore 649 - - public string ShaderBundleName { get; set; } - - public CreateBuiltInShadersBundle(string bundleName) - { - ShaderBundleName = bundleName; - } - - public ReturnCode Run() - { - HashSet buildInObjects = new HashSet(); - foreach (AssetLoadInfo dependencyInfo in m_DependencyData.AssetInfo.Values) - buildInObjects.UnionWith(dependencyInfo.referencedObjects.Where(x => x.guid == k_BuiltInGuid)); - - foreach (SceneDependencyInfo dependencyInfo in m_DependencyData.SceneInfo.Values) - buildInObjects.UnionWith(dependencyInfo.referencedObjects.Where(x => x.guid == k_BuiltInGuid)); - - ObjectIdentifier[] usedSet = buildInObjects.ToArray(); - Type[] usedTypes = ContentBuildInterface.GetTypeForObjects(usedSet); - - if (m_Layout == null) - m_Layout = new BundleExplictObjectLayout(); - - Type shader = typeof(Shader); - for (int i = 0; i < usedTypes.Length; i++) - { - if (usedTypes[i] != shader) - continue; - - m_Layout.ExplicitObjectLocation.Add(usedSet[i], ShaderBundleName); - } - - if (m_Layout.ExplicitObjectLocation.Count == 0) - m_Layout = null; - - return ReturnCode.Success; - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/CreateBuiltInShadersBundle.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/CreateBuiltInShadersBundle.cs.meta deleted file mode 100644 index b6d60ed0..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/CreateBuiltInShadersBundle.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7b9ded651292a474fad227fce94f4c79 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/GenerateBundleCommands.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/GenerateBundleCommands.cs deleted file mode 100644 index 892640dd..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/GenerateBundleCommands.cs +++ /dev/null @@ -1,202 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using System.Linq; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Injector; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Utilities; -using UnityEditor.Build.Pipeline.WriteTypes; -using UnityEditor.Build.Utilities; - -#if !UNITY_2019_1_OR_NEWER -using System; -using UnityEngine; -#endif - -namespace UnityEditor.Build.Pipeline.Tasks -{ - public class GenerateBundleCommands : IBuildTask - { - public int Version { get { return 1; } } - -#pragma warning disable 649 - [InjectContext(ContextUsage.In)] - IBundleBuildContent m_BuildContent; - - [InjectContext(ContextUsage.In)] - IDependencyData m_DependencyData; - - [InjectContext] - IBundleWriteData m_WriteData; - - [InjectContext(ContextUsage.In)] - IDeterministicIdentifiers m_PackingMethod; -#pragma warning restore 649 - - public ReturnCode Run() - { - foreach (var bundlePair in m_BuildContent.BundleLayout) - { - if (ValidationMethods.ValidAssetBundle(bundlePair.Value)) - { - // Use generated internalName here as we could have an empty asset bundle used for raw object storage (See CreateStandardShadersBundle) - var internalName = string.Format(CommonStrings.AssetBundleNameFormat, m_PackingMethod.GenerateInternalFileName(bundlePair.Key)); - CreateAssetBundleCommand(bundlePair.Key, internalName, bundlePair.Value); - } - else if (ValidationMethods.ValidSceneBundle(bundlePair.Value)) - { - CreateSceneBundleCommand(bundlePair.Key, m_WriteData.AssetToFiles[bundlePair.Value[0]][0], bundlePair.Value[0], bundlePair.Value); - for (int i = 1; i < bundlePair.Value.Count; ++i) - CreateSceneDataCommand(m_WriteData.AssetToFiles[bundlePair.Value[i]][0], bundlePair.Value[i]); - } - } - return ReturnCode.Success; - } - - static WriteCommand CreateWriteCommand(string internalName, List objects, IDeterministicIdentifiers packingMethod) - { - var command = new WriteCommand(); - command.internalName = internalName; - command.fileName = Path.GetFileName(internalName); - - command.serializeObjects = objects.Select(x => new SerializationInfo - { - serializationObject = x, - serializationIndex = packingMethod.SerializationIndexFromObjectIdentifier(x) - }).ToList(); - return command; - } - - void CreateAssetBundleCommand(string bundleName, string internalName, List assets) - { - var abOp = new AssetBundleWriteOperation(); - - var fileObjects = m_WriteData.FileToObjects[internalName]; - abOp.Command = CreateWriteCommand(internalName, fileObjects, m_PackingMethod); - - abOp.UsageSet = new BuildUsageTagSet(); - m_WriteData.FileToUsageSet.Add(internalName, abOp.UsageSet); - - abOp.ReferenceMap = new BuildReferenceMap(); - abOp.ReferenceMap.AddMappings(internalName, abOp.Command.serializeObjects.ToArray()); - m_WriteData.FileToReferenceMap.Add(internalName, abOp.ReferenceMap); - - { - abOp.Info = new AssetBundleInfo(); - abOp.Info.bundleName = bundleName; - abOp.Info.bundleAssets = assets.Select(x => m_DependencyData.AssetInfo[x]).ToList(); - foreach (var loadInfo in abOp.Info.bundleAssets) - loadInfo.address = m_BuildContent.Addresses[loadInfo.asset]; - } - - m_WriteData.WriteOperations.Add(abOp); - } - -#if !UNITY_2019_1_OR_NEWER - static int GetSortIndex(Type type) - { - // ContentBuildInterface.GetTypeForObjects returns null for some MonoBehaviours, this will fix it until the API is fixed. - if (type == null) - return Int32.MaxValue - 3; - if (type == typeof(MonoScript)) - return Int32.MinValue; - if (typeof(ScriptableObject).IsAssignableFrom(type)) - return Int32.MaxValue - 4; - if (typeof(MonoBehaviour).IsAssignableFrom(type)) - return Int32.MaxValue - 3; - if (typeof(TerrainData).IsAssignableFrom(type)) - return Int32.MaxValue - 2; - return BitConverter.ToInt32(HashingMethods.Calculate(type.Name).ToBytes(), 0); - } - - struct SortObject - { - public ObjectIdentifier objectId; - public int sortIndex; - } - - static List GetSortedSceneObjectIdentifiers(List objects) - { - var types = new List(ContentBuildInterface.GetTypeForObjects(objects.ToArray())); - var sortedObjects = new List(); - for (int i = 0; i < objects.Count; i++) - sortedObjects.Add(new SortObject { sortIndex = GetSortIndex(types[i]), objectId = objects[i] }); - return sortedObjects.OrderBy(x => x.sortIndex).Select(x => x.objectId).ToList(); - } -#endif - - void CreateSceneBundleCommand(string bundleName, string internalName, GUID asset, List assets) - { - var sbOp = new SceneBundleWriteOperation(); - - var fileObjects = m_WriteData.FileToObjects[internalName]; -#if !UNITY_2019_1_OR_NEWER - // ContentBuildInterface.PrepareScene was not returning stable sorted references, causing a indeterminism and loading errors in some cases - // Add correct sorting here until patch lands to fix the API. - fileObjects = GetSortedSceneObjectIdentifiers(fileObjects); -#endif - sbOp.Command = CreateWriteCommand(internalName, fileObjects, new LinearPackedIdentifiers(3)); // Start at 3: PreloadData = 1, AssetBundle = 2 - - sbOp.UsageSet = new BuildUsageTagSet(); - m_WriteData.FileToUsageSet.Add(internalName, sbOp.UsageSet); - - sbOp.ReferenceMap = new BuildReferenceMap(); - m_WriteData.FileToReferenceMap.Add(internalName, sbOp.ReferenceMap); - - var sceneInfo = m_DependencyData.SceneInfo[asset]; - sbOp.Scene = sceneInfo.scene; -#if !UNITY_2019_3_OR_NEWER - sbOp.ProcessedScene = sceneInfo.processedScene; -#endif - - { - sbOp.PreloadInfo = new PreloadInfo { preloadObjects = sceneInfo.referencedObjects.Where(x => !fileObjects.Contains(x)).ToList() }; - } - - { - sbOp.Info = new SceneBundleInfo(); - sbOp.Info.bundleName = bundleName; - sbOp.Info.bundleScenes = assets.Select(x => new SceneLoadInfo - { - asset = x, - internalName = Path.GetFileNameWithoutExtension(m_WriteData.AssetToFiles[x][0]), - address = m_BuildContent.Addresses[x] - }).ToList(); - } - - m_WriteData.WriteOperations.Add(sbOp); - } - - void CreateSceneDataCommand(string internalName, GUID asset) - { - var sdOp = new SceneDataWriteOperation(); - - var fileObjects = m_WriteData.FileToObjects[internalName]; -#if !UNITY_2019_1_OR_NEWER - // ContentBuildInterface.PrepareScene was not returning stable sorted references, causing a indeterminism and loading errors in some cases - // Add correct sorting here until patch lands to fix the API. - fileObjects = GetSortedSceneObjectIdentifiers(fileObjects); -#endif - sdOp.Command = CreateWriteCommand(internalName, fileObjects, new LinearPackedIdentifiers(2)); // Start at 2: PreloadData = 1 - - sdOp.UsageSet = new BuildUsageTagSet(); - m_WriteData.FileToUsageSet.Add(internalName, sdOp.UsageSet); - - sdOp.ReferenceMap = new BuildReferenceMap(); - m_WriteData.FileToReferenceMap.Add(internalName, sdOp.ReferenceMap); - - var sceneInfo = m_DependencyData.SceneInfo[asset]; - sdOp.Scene = sceneInfo.scene; -#if !UNITY_2019_3_OR_NEWER - sdOp.ProcessedScene = sceneInfo.processedScene; -#endif - - { - sdOp.PreloadInfo = new PreloadInfo(); - sdOp.PreloadInfo.preloadObjects = sceneInfo.referencedObjects.Where(x => !fileObjects.Contains(x)).ToList(); - } - - m_WriteData.WriteOperations.Add(sdOp); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/GenerateBundleCommands.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/GenerateBundleCommands.cs.meta deleted file mode 100644 index 3d78e805..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/GenerateBundleCommands.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f8f85552081e62e47abaaba497a138d7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/GenerateBundleMaps.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/GenerateBundleMaps.cs deleted file mode 100644 index eb4722c6..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/GenerateBundleMaps.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Injector; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Utilities; - -namespace UnityEditor.Build.Pipeline.Tasks -{ - public class GenerateBundleMaps : IBuildTask - { - public int Version { get { return 1; } } - -#pragma warning disable 649 - [InjectContext(ContextUsage.In)] - IDependencyData m_DependencyData; - - [InjectContext] - IBundleWriteData m_WriteData; -#pragma warning restore 649 - - public ReturnCode Run() - { - Dictionary fileToCommand = m_WriteData.WriteOperations.ToDictionary(x => x.Command.internalName, x => x.Command); - Dictionary> filesMapped = new Dictionary>(); - foreach (var assetFilesPair in m_WriteData.AssetToFiles) - { - // Generate BuildReferenceMap map - AddReferencesForFiles(assetFilesPair.Value, filesMapped, fileToCommand); - - // Generate BuildUsageTagSet map - AddUsageSetForFiles(assetFilesPair.Key, assetFilesPair.Value); - } - - return ReturnCode.Success; - } - - void AddReferencesForFiles(IList files, Dictionary> filesMapped, Dictionary fileToCommand) - { - HashSet visited; - filesMapped.GetOrAdd(files[0], out visited); - - BuildReferenceMap referenceMap; - if (!m_WriteData.FileToReferenceMap.TryGetValue(files[0], out referenceMap)) - { - referenceMap = new BuildReferenceMap(); - m_WriteData.FileToReferenceMap.Add(files[0], referenceMap); - } - - foreach (var file in files) - { - if (!visited.Add(file)) - continue; - - var command = fileToCommand[file]; - referenceMap.AddMappings(file, command.serializeObjects.ToArray()); - } - } - - void AddUsageSetForFiles(GUID asset, IList files) - { - BuildUsageTagSet assetUsage; - if (!m_DependencyData.AssetUsage.TryGetValue(asset, out assetUsage)) - { - if (!m_DependencyData.SceneUsage.TryGetValue(asset, out assetUsage)) - return; - } - - foreach (var file in files) - { - BuildUsageTagSet fileUsage; - if (!m_WriteData.FileToUsageSet.TryGetValue(file, out fileUsage)) - { - fileUsage = new BuildUsageTagSet(); - m_WriteData.FileToUsageSet.Add(file, fileUsage); - } - fileUsage.UnionWith(assetUsage); - } - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/GenerateBundleMaps.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/GenerateBundleMaps.cs.meta deleted file mode 100644 index 9666373a..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/GenerateBundleMaps.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9d24a7995f0e1ed4c81c185bcc48a695 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/GenerateBundlePacking.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/GenerateBundlePacking.cs deleted file mode 100644 index 30f65562..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/GenerateBundlePacking.cs +++ /dev/null @@ -1,170 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Injector; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Utilities; -using UnityEditor.Build.Utilities; - -namespace UnityEditor.Build.Pipeline.Tasks -{ - public class GenerateBundlePacking : IBuildTask - { - public int Version { get { return 1; } } - -#pragma warning disable 649 - [InjectContext(ContextUsage.In)] - IBundleBuildContent m_BuildContent; - - [InjectContext(ContextUsage.In)] - IDependencyData m_DependencyData; - - [InjectContext] - IBundleWriteData m_WriteData; - - [InjectContext(ContextUsage.In)] - IDeterministicIdentifiers m_PackingMethod; -#pragma warning restore 649 - - public ReturnCode Run() - { - Dictionary> assetToReferences = new Dictionary>(); - - // Pack each asset bundle - foreach (var bundle in m_BuildContent.BundleLayout) - { - if (ValidationMethods.ValidAssetBundle(bundle.Value)) - PackAssetBundle(bundle.Key, bundle.Value, assetToReferences); - else if (ValidationMethods.ValidSceneBundle(bundle.Value)) - PackSceneBundle(bundle.Key, bundle.Value, assetToReferences); - } - - // Calculate Asset file load dependency list - foreach (var bundle in m_BuildContent.BundleLayout) - { - foreach (var asset in bundle.Value) - { - List files = m_WriteData.AssetToFiles[asset]; - List references = assetToReferences[asset]; - foreach (var reference in references) - { - List referenceFiles = m_WriteData.AssetToFiles[reference]; - if (!files.Contains(referenceFiles[0])) - files.Add(referenceFiles[0]); - } - } - } - - return ReturnCode.Success; - } - - void PackAssetBundle(string bundleName, List includedAssets, Dictionary> assetToReferences) - { - var internalName = string.Format(CommonStrings.AssetBundleNameFormat, m_PackingMethod.GenerateInternalFileName(bundleName)); - - var allObjects = new HashSet(); - foreach (var asset in includedAssets) - { - AssetLoadInfo assetInfo = m_DependencyData.AssetInfo[asset]; - allObjects.UnionWith(assetInfo.includedObjects); - - var references = new List(); - references.AddRange(assetInfo.referencedObjects); - assetToReferences[asset] = FilterReferencesForAsset(asset, references); - - allObjects.UnionWith(references); - m_WriteData.AssetToFiles[asset] = new List { internalName }; - } - - m_WriteData.FileToBundle.Add(internalName, bundleName); - m_WriteData.FileToObjects.Add(internalName, allObjects.ToList()); - } - - void PackSceneBundle(string bundleName, List includedScenes, Dictionary> assetToReferences) - { - if (includedScenes.IsNullOrEmpty()) - return; - - string firstFileName = ""; - HashSet previousSceneObjects = new HashSet(); - List sceneInternalNames = new List(); - foreach (var scene in includedScenes) - { - var scenePath = AssetDatabase.GUIDToAssetPath(scene.ToString()); - var internalSceneName = m_PackingMethod.GenerateInternalFileName(scenePath); - if (string.IsNullOrEmpty(firstFileName)) - firstFileName = internalSceneName; - var internalName = string.Format(CommonStrings.SceneBundleNameFormat, firstFileName, internalSceneName); - - SceneDependencyInfo sceneInfo = m_DependencyData.SceneInfo[scene]; - - var references = new List(); - references.AddRange(sceneInfo.referencedObjects); - assetToReferences[scene] = FilterReferencesForAsset(scene, references, previousSceneObjects); - previousSceneObjects.UnionWith(references); - - m_WriteData.FileToObjects.Add(internalName, references); - m_WriteData.FileToBundle.Add(internalName, bundleName); - - var files = new List{ internalName }; - files.AddRange(sceneInternalNames); - m_WriteData.AssetToFiles[scene] = files; - - sceneInternalNames.Add(internalName); - } - } - - List FilterReferencesForAsset(GUID asset, List references, HashSet previousSceneObjects = null) - { - var referencedAssets = new HashSet(); - - // First pass: Remove Default Resources and Includes for Assets assigned to Bundles - for (int i = references.Count - 1; i >= 0; --i) - { - var reference = references[i]; - if (reference.filePath == CommonStrings.UnityDefaultResourcePath) - { - references.RemoveAt(i); - continue; // TODO: Fix this so we can pull these in - } - - AssetLoadInfo referenceInfo; - if (m_DependencyData.AssetInfo.TryGetValue(reference.guid, out referenceInfo)) - { - references.RemoveAt(i); - referencedAssets.Add(referenceInfo); - continue; - } - } - - // Second pass: Remove References also included by non-circular Referenced Assets - foreach (var referencedAsset in referencedAssets) - { - var circularRef = referencedAsset.referencedObjects.Select(x => x.guid).Contains(asset); - if (circularRef) - continue; - - references.RemoveAll(x => referencedAsset.referencedObjects.Contains(x)); - } - - // Final pass: Remove References also included by circular Referenced Assets if Asset's GUID is higher than Referenced Asset's GUID - foreach (var referencedAsset in referencedAssets) - { - var circularRef = referencedAsset.referencedObjects.Select(x => x.guid).Contains(asset); - if (!circularRef) - continue; - - if (asset < referencedAsset.asset) - continue; - - references.RemoveAll(x => referencedAsset.referencedObjects.Contains(x)); - } - - // Special path for scenes, they can use data from previous sharedAssets in the same bundle - if (!previousSceneObjects.IsNullOrEmpty()) - references.RemoveAll(previousSceneObjects.Contains); - - return referencedAssets.Select(x => x.asset).ToList(); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/GenerateBundlePacking.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/GenerateBundlePacking.cs.meta deleted file mode 100644 index 500ac90f..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/GenerateBundlePacking.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8de0232a33280c9479a3db23d266ef17 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/GenerateSubAssetPathMaps.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/GenerateSubAssetPathMaps.cs deleted file mode 100644 index 3cfe4b1f..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/GenerateSubAssetPathMaps.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Injector; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Utilities; -using UnityEditor.Build.Pipeline.WriteTypes; - -namespace UnityEditor.Build.Pipeline.Tasks -{ - public class GenerateSubAssetPathMaps : IBuildTask - { - public int Version { get { return 1; } } - -#pragma warning disable 649 - [InjectContext] - IBundleWriteData m_WriteData; - - [InjectContext(ContextUsage.In, true)] - IBuildExtendedAssetData m_ExtendedAssetData; -#pragma warning restore 649 - - public ReturnCode Run() - { - if (m_ExtendedAssetData == null || m_ExtendedAssetData.ExtendedData.IsNullOrEmpty()) - return ReturnCode.SuccessNotRun; - - Dictionary fileToOperation = m_WriteData.WriteOperations.ToDictionary(x => x.Command.internalName, x => x); - foreach (var pair in m_ExtendedAssetData.ExtendedData) - { - GUID asset = pair.Key; - string mainFile = m_WriteData.AssetToFiles[asset][0]; - var abOp = fileToOperation[mainFile] as AssetBundleWriteOperation; - - int assetInfoIndex = abOp.Info.bundleAssets.FindIndex(x => x.asset == asset); - AssetLoadInfo assetInfo = abOp.Info.bundleAssets[assetInfoIndex]; - int offset = 1; - foreach (var subAsset in pair.Value.Representations) - { - var secondaryAssetInfo = CreateSubAssetLoadInfo(assetInfo, subAsset); - abOp.Info.bundleAssets.Insert(assetInfoIndex + offset, secondaryAssetInfo); - offset++; - } - } - - return ReturnCode.Success; - } - - static AssetLoadInfo CreateSubAssetLoadInfo(AssetLoadInfo assetInfo, ObjectIdentifier subAsset) - { - var subAssetLoadInfo = new AssetLoadInfo(); - subAssetLoadInfo.asset = assetInfo.asset; - subAssetLoadInfo.address = assetInfo.address; - subAssetLoadInfo.referencedObjects = new List(assetInfo.referencedObjects); - subAssetLoadInfo.includedObjects = new List(assetInfo.includedObjects); - - var index = subAssetLoadInfo.includedObjects.IndexOf(subAsset); - subAssetLoadInfo.includedObjects.Swap(0, index); - return subAssetLoadInfo; - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/GenerateSubAssetPathMaps.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/GenerateSubAssetPathMaps.cs.meta deleted file mode 100644 index 7ff9e13e..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/GenerateSubAssetPathMaps.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fa9edcd7497f45242bddd18f8e0582d4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PostDependencyCallback.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PostDependencyCallback.cs deleted file mode 100644 index 020532a3..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PostDependencyCallback.cs +++ /dev/null @@ -1,26 +0,0 @@ -using UnityEditor.Build.Pipeline.Injector; -using UnityEditor.Build.Pipeline.Interfaces; - -namespace UnityEditor.Build.Pipeline.Tasks -{ - public class PostDependencyCallback : IBuildTask - { - public int Version { get { return 1; } } - -#pragma warning disable 649 - [InjectContext] - IBuildParameters m_Parameters; - - [InjectContext] - IDependencyData m_DependencyData; - - [InjectContext(ContextUsage.In)] - IDependencyCallback m_Callback; -#pragma warning restore 649 - - public ReturnCode Run() - { - return m_Callback.PostDependency(m_Parameters, m_DependencyData); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PostDependencyCallback.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PostDependencyCallback.cs.meta deleted file mode 100644 index dc3bd139..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PostDependencyCallback.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 225da2e71801378408ef9f717020c323 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PostPackingCallback.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PostPackingCallback.cs deleted file mode 100644 index c7e3c739..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PostPackingCallback.cs +++ /dev/null @@ -1,29 +0,0 @@ -using UnityEditor.Build.Pipeline.Injector; -using UnityEditor.Build.Pipeline.Interfaces; - -namespace UnityEditor.Build.Pipeline.Tasks -{ - public class PostPackingCallback : IBuildTask - { - public int Version { get { return 1; } } - -#pragma warning disable 649 - [InjectContext] - IBuildParameters m_Parameters; - - [InjectContext] - IDependencyData m_DependencyData; - - [InjectContext] - IWriteData m_WriteData; - - [InjectContext(ContextUsage.In)] - IPackingCallback m_Callback; -#pragma warning restore 649 - - public ReturnCode Run() - { - return m_Callback.PostPacking(m_Parameters, m_DependencyData, m_WriteData); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PostPackingCallback.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PostPackingCallback.cs.meta deleted file mode 100644 index b8868bb8..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PostPackingCallback.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1f0e09841d3888f46a1a3f84af21a639 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PostScriptsCallback.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PostScriptsCallback.cs deleted file mode 100644 index 558ca54d..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PostScriptsCallback.cs +++ /dev/null @@ -1,26 +0,0 @@ -using UnityEditor.Build.Pipeline.Injector; -using UnityEditor.Build.Pipeline.Interfaces; - -namespace UnityEditor.Build.Pipeline.Tasks -{ - public class PostScriptsCallback : IBuildTask - { - public int Version { get { return 1; } } - -#pragma warning disable 649 - [InjectContext] - IBuildParameters m_Parameters; - - [InjectContext] - IBuildResults m_Results; - - [InjectContext(ContextUsage.In)] - IScriptsCallback m_Callback; -#pragma warning restore 649 - - public ReturnCode Run() - { - return m_Callback.PostScripts(m_Parameters, m_Results); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PostScriptsCallback.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PostScriptsCallback.cs.meta deleted file mode 100644 index e5b23eb9..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PostScriptsCallback.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3ed24626228f71246a5f32ebe0fb61e2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PostWritingCallback.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PostWritingCallback.cs deleted file mode 100644 index 9eb8c89e..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PostWritingCallback.cs +++ /dev/null @@ -1,32 +0,0 @@ -using UnityEditor.Build.Pipeline.Injector; -using UnityEditor.Build.Pipeline.Interfaces; - -namespace UnityEditor.Build.Pipeline.Tasks -{ - public class PostWritingCallback : IBuildTask - { - public int Version { get { return 1; } } - -#pragma warning disable 649 - [InjectContext] - IBuildParameters m_Parameters; - - [InjectContext] - IDependencyData m_DependencyData; - - [InjectContext] - IWriteData m_WriteData; - - [InjectContext] - IBuildResults m_Results; - - [InjectContext(ContextUsage.In)] - IWritingCallback m_Callback; -#pragma warning restore 649 - - public ReturnCode Run() - { - return m_Callback.PostWriting(m_Parameters, m_DependencyData, m_WriteData, m_Results); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PostWritingCallback.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PostWritingCallback.cs.meta deleted file mode 100644 index 4b243936..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PostWritingCallback.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0f2109e178c64897a911d0c8471401d7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PreviewSceneDependencyData.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PreviewSceneDependencyData.cs deleted file mode 100644 index 6d4f7253..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PreviewSceneDependencyData.cs +++ /dev/null @@ -1,124 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Injector; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Utilities; - -namespace UnityEditor.Build.Pipeline.Tasks -{ - public class PreviewSceneDependencyData : IBuildTask - { - public int Version { get { return 1; } } - -#pragma warning disable 649 - [InjectContext(ContextUsage.In)] - IBuildParameters m_Parameters; - - [InjectContext(ContextUsage.In)] - IBuildContent m_Content; - - [InjectContext] - IDependencyData m_DependencyData; - - [InjectContext(ContextUsage.In, true)] - IProgressTracker m_Tracker; - - [InjectContext(ContextUsage.In, true)] - IBuildCache m_Cache; -#pragma warning restore 649 - - CachedInfo GetCachedInfo(GUID scene, IEnumerable references, SceneDependencyInfo sceneInfo, BuildUsageTagSet usageTags) - { - var info = new CachedInfo(); - info.Asset = m_Cache.GetCacheEntry(scene, Version); - - var dependencies = new HashSet(); - foreach (ObjectIdentifier reference in references) - dependencies.Add(m_Cache.GetCacheEntry(reference)); - info.Dependencies = dependencies.ToArray(); - - info.Data = new object[] { sceneInfo, usageTags }; - - return info; - } - - public ReturnCode Run() - { - IList cachedInfo = null; - IList uncachedInfo = null; - if (m_Parameters.UseCache && m_Cache != null) - { - IList entries = m_Content.Scenes.Select(x => m_Cache.GetCacheEntry(x, Version)).ToList(); - m_Cache.LoadCachedData(entries, out cachedInfo); - - uncachedInfo = new List(); - } - - for (int i = 0; i < m_Content.Scenes.Count; i++) - { - GUID scene = m_Content.Scenes[i]; - string scenePath = AssetDatabase.GUIDToAssetPath(scene.ToString()); - - SceneDependencyInfo sceneInfo; - BuildUsageTagSet usageTags; - - if (cachedInfo != null && cachedInfo[i] != null) - { - if (!m_Tracker.UpdateInfoUnchecked(string.Format("{0} (Cached)", scenePath))) - return ReturnCode.Canceled; - - sceneInfo = (SceneDependencyInfo)cachedInfo[i].Data[0]; - usageTags = cachedInfo[i].Data[1] as BuildUsageTagSet; - } - else - { - if (!m_Tracker.UpdateInfoUnchecked(scenePath)) - return ReturnCode.Canceled; - - var references = new HashSet(); - string[] dependencies = AssetDatabase.GetDependencies(scenePath); - foreach (var assetPath in dependencies) - { - var assetGuid = new GUID(AssetDatabase.AssetPathToGUID(assetPath)); - if (ValidationMethods.ValidAsset(assetGuid) != ValidationMethods.Status.Asset) - continue; - - // TODO: Use Cache to speed this up? - var assetIncludes = ContentBuildInterface.GetPlayerObjectIdentifiersInAsset(assetGuid, m_Parameters.Target); - var assetReferences = ContentBuildInterface.GetPlayerDependenciesForObjects(assetIncludes, m_Parameters.Target, m_Parameters.ScriptInfo); - references.UnionWith(assetIncludes); - references.UnionWith(assetReferences); - } - - sceneInfo = new SceneDependencyInfo(); - usageTags = new BuildUsageTagSet(); - - var boxedInfo = (object)sceneInfo; - typeof(SceneDependencyInfo).GetField("m_Scene", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(boxedInfo, scenePath); - typeof(SceneDependencyInfo).GetField("m_ProcessedScene", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(boxedInfo, scenePath); - typeof(SceneDependencyInfo).GetField("m_ReferencedObjects", BindingFlags.Instance | BindingFlags.NonPublic).SetValue(boxedInfo, references.ToArray()); - sceneInfo = (SceneDependencyInfo)boxedInfo; - - if (uncachedInfo != null) - uncachedInfo.Add(GetCachedInfo(scene, sceneInfo.referencedObjects, sceneInfo, usageTags)); - } - - SetOutputInformation(scene, sceneInfo, usageTags); - } - - if (m_Parameters.UseCache && m_Cache != null) - m_Cache.SaveCachedData(uncachedInfo); - - return ReturnCode.Success; - } - - void SetOutputInformation(GUID asset, SceneDependencyInfo sceneInfo, BuildUsageTagSet usageTags) - { - // Add generated scene information to BuildDependencyData - m_DependencyData.SceneInfo.Add(asset, sceneInfo); - m_DependencyData.SceneUsage.Add(asset, usageTags); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PreviewSceneDependencyData.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PreviewSceneDependencyData.cs.meta deleted file mode 100644 index 9f0e764b..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/PreviewSceneDependencyData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 46ff9bb9c11e4daa9d9424fa410fcc30 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/RebuildSpriteAtlasCache.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/RebuildSpriteAtlasCache.cs deleted file mode 100644 index da557b6c..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/RebuildSpriteAtlasCache.cs +++ /dev/null @@ -1,25 +0,0 @@ -using UnityEditor.Build.Pipeline.Injector; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Sprites; -using UnityEditor.U2D; - -namespace UnityEditor.Build.Pipeline.Tasks -{ - public class RebuildSpriteAtlasCache : IBuildTask - { - public int Version { get { return 1; } } - -#pragma warning disable 649 - [InjectContext(ContextUsage.In)] - IBuildParameters m_Parameters; -#pragma warning restore 649 - - public ReturnCode Run() - { - // TODO: Need a return value if this ever can fail - Packer.RebuildAtlasCacheIfNeeded(m_Parameters.Target, true, Packer.Execution.Normal); - SpriteAtlasUtility.PackAllAtlases(m_Parameters.Target); - return ReturnCode.Success; - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/RebuildSpriteAtlasCache.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/RebuildSpriteAtlasCache.cs.meta deleted file mode 100644 index dcb93102..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/RebuildSpriteAtlasCache.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 49d4a1540f2adfc418fd2e5dd536420b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/StripUnusedSpriteSources.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/StripUnusedSpriteSources.cs deleted file mode 100644 index 4f7c1dd8..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/StripUnusedSpriteSources.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Injector; -using UnityEditor.Build.Pipeline.Interfaces; - -namespace UnityEditor.Build.Pipeline.Tasks -{ - public class StripUnusedSpriteSources : IBuildTask - { - public int Version { get { return 2; } } - -#pragma warning disable 649 - [InjectContext] - IDependencyData m_DependencyData; - - [InjectContext(ContextUsage.In, true)] - IBuildSpriteData m_SpriteData; -#pragma warning restore 649 - - public ReturnCode Run() - { - if (m_SpriteData == null || m_SpriteData.ImporterData.Count == 0) - return ReturnCode.SuccessNotRun; - - if (EditorSettings.spritePackerMode == SpritePackerMode.Disabled) - return ReturnCode.SuccessNotRun; - - var unusedSources = new HashSet(); - var textures = m_SpriteData.ImporterData.Values.Where(x => x.PackedSprite).Select(x => x.SourceTexture); - unusedSources.UnionWith(textures); - - // Count refs from assets - var assetRefs = m_DependencyData.AssetInfo.SelectMany(x => x.Value.referencedObjects); - foreach (ObjectIdentifier reference in assetRefs) - unusedSources.Remove(reference); - - // Count refs from scenes - var sceneRefs = m_DependencyData.SceneInfo.SelectMany(x => x.Value.referencedObjects); - foreach (ObjectIdentifier reference in sceneRefs) - unusedSources.Remove(reference); - - SetOutputInformation(unusedSources); - return ReturnCode.Success; - } - - public void SetOutputInformation(HashSet unusedSources) - { - foreach (var source in unusedSources) - { - var assetInfo = m_DependencyData.AssetInfo[source.guid]; - assetInfo.includedObjects.RemoveAt(0); - } - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/StripUnusedSpriteSources.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/StripUnusedSpriteSources.cs.meta deleted file mode 100644 index 10ceb267..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/StripUnusedSpriteSources.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: db8e822ddcadee542b625284a3d0aa16 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/SwitchToBuildPlatform.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/SwitchToBuildPlatform.cs deleted file mode 100644 index 1a7e5f2c..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/SwitchToBuildPlatform.cs +++ /dev/null @@ -1,22 +0,0 @@ -using UnityEditor.Build.Pipeline.Injector; -using UnityEditor.Build.Pipeline.Interfaces; - -namespace UnityEditor.Build.Pipeline.Tasks -{ - public class SwitchToBuildPlatform : IBuildTask - { - public int Version { get { return 1; } } - -#pragma warning disable 649 - [InjectContext(ContextUsage.In)] - IBuildParameters m_Parameters; -#pragma warning restore 649 - - public ReturnCode Run() - { - if (EditorUserBuildSettings.SwitchActiveBuildTarget(m_Parameters.Group, m_Parameters.Target)) - return ReturnCode.Success; - return ReturnCode.Error; - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/SwitchToBuildPlatform.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/SwitchToBuildPlatform.cs.meta deleted file mode 100644 index 44238016..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/SwitchToBuildPlatform.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8195792273a50ed4982b1717d1203dbf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/UpdateBundleObjectLayout.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/UpdateBundleObjectLayout.cs deleted file mode 100644 index 5c3ce1d9..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/UpdateBundleObjectLayout.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System.Collections.Generic; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Injector; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Utilities; -using UnityEditor.Build.Utilities; - -namespace UnityEditor.Build.Pipeline.Tasks -{ - public class UpdateBundleObjectLayout : IBuildTask - { - public int Version { get { return 1; } } - -#pragma warning disable 649 - [InjectContext(ContextUsage.In, true)] - IBundleExplictObjectLayout m_Layout; - - [InjectContext] - IBundleBuildContent m_Content; - - [InjectContext(ContextUsage.In)] - IDependencyData m_DependencyData; - - [InjectContext] - IBundleWriteData m_WriteData; - - [InjectContext(ContextUsage.In)] - IDeterministicIdentifiers m_PackingMethod; -#pragma warning restore 649 - - public ReturnCode Run() - { - if (m_Layout == null || m_Layout.ExplicitObjectLocation.IsNullOrEmpty()) - return ReturnCode.SuccessNotRun; - - // Go object by object - foreach (var pair in m_Layout.ExplicitObjectLocation) - { - ObjectIdentifier objectID = pair.Key; - string bundleName = pair.Value; - string internalName = string.Format(CommonStrings.AssetBundleNameFormat, m_PackingMethod.GenerateInternalFileName(bundleName)); - - // Add dependency on possible new file if asset depends on object - foreach (KeyValuePair dependencyPair in m_DependencyData.AssetInfo) - { - var asset = dependencyPair.Key; - var assetInfo = dependencyPair.Value; - var assetFiles = m_WriteData.AssetToFiles[asset]; - AddFileDependencyIfFound(objectID, internalName, assetFiles, assetInfo.includedObjects); - AddFileDependencyIfFound(objectID, internalName, assetFiles, assetInfo.referencedObjects); - } - - // Add dependency on possible new file if scene depends on object - foreach (KeyValuePair dependencyPair in m_DependencyData.SceneInfo) - { - var asset = dependencyPair.Key; - var assetInfo = dependencyPair.Value; - AddFileDependencyIfFound(objectID, internalName, m_WriteData.AssetToFiles[asset], assetInfo.referencedObjects); - } - - // Remove object from existing FileToObjects - foreach (List fileObjects in m_WriteData.FileToObjects.Values) - { - if (fileObjects.Contains(objectID)) - fileObjects.Remove(objectID); - } - - // Update File to bundle and Bundle layout - if (!m_WriteData.FileToBundle.ContainsKey(internalName)) - { - m_WriteData.FileToBundle.Add(internalName, bundleName); - m_Content.BundleLayout.Add(bundleName, new List()); - } - - // Update File to object map - List objectIDs; - m_WriteData.FileToObjects.GetOrAdd(internalName, out objectIDs); - if (!objectIDs.Contains(objectID)) - objectIDs.Add(objectID); - } - return ReturnCode.Success; - } - - static void AddFileDependencyIfFound(ObjectIdentifier objectID, string fileName, ICollection assetFiles, ICollection collection) - { - if (collection.Contains(objectID)) - { - if (!assetFiles.Contains(fileName)) - assetFiles.Add(fileName); - } - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/UpdateBundleObjectLayout.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/UpdateBundleObjectLayout.cs.meta deleted file mode 100644 index 054f947c..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/UpdateBundleObjectLayout.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 69a3d9bdf64896044a9fdb61df07a1f8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/WriteSerializedFiles.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/WriteSerializedFiles.cs deleted file mode 100644 index b8959a85..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/WriteSerializedFiles.cs +++ /dev/null @@ -1,127 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using System.Linq; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Injector; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Utilities; -using UnityEditor.Build.Pipeline.WriteTypes; - -namespace UnityEditor.Build.Pipeline.Tasks -{ - public class WriteSerializedFiles : IBuildTask - { - public int Version { get { return 2; } } - -#pragma warning disable 649 - [InjectContext(ContextUsage.In)] - IBuildParameters m_Parameters; - - [InjectContext(ContextUsage.In)] - IDependencyData m_DependencyData; - - [InjectContext(ContextUsage.In)] - IWriteData m_WriteData; - - [InjectContext] - IBuildResults m_Results; - - [InjectContext(ContextUsage.In, true)] - IProgressTracker m_Tracker; - - [InjectContext(ContextUsage.In, true)] - IBuildCache m_Cache; -#pragma warning restore 649 - - CacheEntry GetCacheEntry(IWriteOperation operation, BuildSettings settings, BuildUsageTagGlobal globalUsage) - { - var entry = new CacheEntry(); - entry.Type = CacheEntry.EntryType.Data; - entry.Guid = HashingMethods.Calculate("WriteSerializedFiles", operation.Command.internalName).ToGUID(); - entry.Hash = HashingMethods.Calculate(Version, operation.GetHash128(), settings.GetHash128(), globalUsage).ToHash128(); - entry.Version = Version; - return entry; - } - - CachedInfo GetCachedInfo(CacheEntry entry, IWriteOperation operation, WriteResult result) - { - var info = new CachedInfo(); - info.Asset = entry; - - var dependencies = new HashSet(); -#if !UNITY_2019_3_OR_NEWER - var sceneBundleOp = operation as SceneBundleWriteOperation; - if (sceneBundleOp != null) - dependencies.Add(m_Cache.GetCacheEntry(sceneBundleOp.ProcessedScene)); - var sceneDataOp = operation as SceneDataWriteOperation; - if (sceneDataOp != null) - dependencies.Add(m_Cache.GetCacheEntry(sceneDataOp.ProcessedScene)); -#endif - foreach (var serializeObject in operation.Command.serializeObjects) - dependencies.Add(m_Cache.GetCacheEntry(serializeObject.serializationObject)); - info.Dependencies = dependencies.ToArray(); - - info.Data = new object[] { result }; - - return info; - } - - public ReturnCode Run() - { - BuildUsageTagGlobal globalUsage = m_DependencyData.GlobalUsage; - foreach (var sceneInfo in m_DependencyData.SceneInfo) - globalUsage |= sceneInfo.Value.globalUsage; - - IList entries = m_WriteData.WriteOperations.Select(x => GetCacheEntry(x, m_Parameters.GetContentBuildSettings(), globalUsage)).ToList(); - IList cachedInfo = null; - IList uncachedInfo = null; - if (m_Parameters.UseCache && m_Cache != null) - { - m_Cache.LoadCachedData(entries, out cachedInfo); - - uncachedInfo = new List(); - } - - for (int i = 0; i < m_WriteData.WriteOperations.Count; i++) - { - IWriteOperation op = m_WriteData.WriteOperations[i]; - - WriteResult result; - if (cachedInfo != null && cachedInfo[i] != null) - { - if (!m_Tracker.UpdateInfoUnchecked(string.Format("{0} (Cached)", op.Command.internalName))) - return ReturnCode.Canceled; - - result = (WriteResult)cachedInfo[i].Data[0]; - } - else - { - if (!m_Tracker.UpdateInfoUnchecked(op.Command.internalName)) - return ReturnCode.Canceled; - - var outputFolder = m_Parameters.TempOutputFolder; - if (m_Parameters.UseCache && m_Cache != null) - outputFolder = m_Cache.GetCachedArtifactsDirectory(entries[i]); - Directory.CreateDirectory(outputFolder); - - result = op.Write(outputFolder, m_Parameters.GetContentBuildSettings(), globalUsage); - - if (uncachedInfo != null) - uncachedInfo.Add(GetCachedInfo(entries[i], op, result)); - } - - SetOutputInformation(op.Command.internalName, result); - } - - if (m_Parameters.UseCache && m_Cache != null) - m_Cache.SaveCachedData(uncachedInfo); - - return ReturnCode.Success; - } - - void SetOutputInformation(string fileName, WriteResult result) - { - m_Results.WriteResults.Add(fileName, result); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/WriteSerializedFiles.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/WriteSerializedFiles.cs.meta deleted file mode 100644 index 3ba364e8..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Tasks/WriteSerializedFiles.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4d29a4991c6c8884aa7a81dc6d2e1cc5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Unity.ScriptableBuildPipeline.Editor.asmdef b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Unity.ScriptableBuildPipeline.Editor.asmdef deleted file mode 100644 index b5ca5ee3..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Unity.ScriptableBuildPipeline.Editor.asmdef +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "Unity.ScriptableBuildPipeline.Editor", - "references": [ - "Unity.ScriptableBuildPipeline", - "UnityEditor.CacheServer" - ], - "includePlatforms": [ - "Editor" - ], - "excludePlatforms": [], - "allowUnsafeCode": false, - "overrideReferences": false, - "precompiledReferences": [], - "autoReferenced": true, - "defineConstraints": [], - "versionDefines": [] -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Unity.ScriptableBuildPipeline.Editor.asmdef.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Unity.ScriptableBuildPipeline.Editor.asmdef.meta deleted file mode 100644 index fc9ad32c..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Unity.ScriptableBuildPipeline.Editor.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: c5ecc461727906345a35491a0440694f -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities.meta deleted file mode 100644 index 47408003..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: b6a4a5214fe67cf46ab0e4e1770ef275 -folderAsset: yes -timeCreated: 1504709530 -licenseType: Pro -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/BuildCache.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/BuildCache.cs deleted file mode 100644 index f0d7e505..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/BuildCache.cs +++ /dev/null @@ -1,480 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.Serialization.Formatters.Binary; -using System.Threading; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Utilities; -using UnityEngine; -using UnityEngine.Assertions; - -namespace UnityEditor.Build.Pipeline.Utilities -{ - /// - /// Default implementation of the Build Cache - /// - public class BuildCache : IBuildCache, IDisposable - { - const string k_CachePath = "Library/BuildCache"; - const int k_Version = 2; - - Dictionary, CacheEntry> m_GuidToHash = new Dictionary, CacheEntry>(); - Dictionary, CacheEntry> m_PathToHash = new Dictionary, CacheEntry>(); - - Thread m_ActiveWriteThread; - - [NonSerialized] - Hash128 m_GlobalHash; - - [NonSerialized] - CacheServerUploader m_Uploader; - - [NonSerialized] - CacheServerDownloader m_Downloader; - - public BuildCache() - { - m_GlobalHash = CalculateGlobalArtifactVersionHash(); - } - - public BuildCache(string host, int port = 8126) - { - m_GlobalHash = CalculateGlobalArtifactVersionHash(); - - if (string.IsNullOrEmpty(host)) - return; - - m_Uploader = new CacheServerUploader(host, port); - m_Downloader = new CacheServerDownloader(this, host, port); - } - - // internal for testing purposes only - internal void OverrideGlobalHash(Hash128 hash) - { - m_GlobalHash = hash; - if (m_Uploader != null) - m_Uploader.SetGlobalHash(m_GlobalHash); - if (m_Downloader != null) - m_Downloader.SetGlobalHash(m_GlobalHash); - } - - static Hash128 CalculateGlobalArtifactVersionHash() - { -#if UNITY_2019_3_OR_NEWER - return HashingMethods.Calculate(Application.unityVersion, k_Version).ToHash128(); -#else - return HashingMethods.Calculate(PlayerSettings.scriptingRuntimeVersion, Application.unityVersion, k_Version).ToHash128(); -#endif - } - - internal void ClearCacheEntryMaps() - { - m_GuidToHash.Clear(); - m_PathToHash.Clear(); - } - - public void Dispose() - { - SyncPendingSaves(); - if (m_Uploader != null) - m_Uploader.Dispose(); - if (m_Downloader != null) - m_Downloader.Dispose(); - m_Uploader = null; - m_Downloader = null; - } - - /// - public CacheEntry GetCacheEntry(GUID asset, int version = 1) - { - CacheEntry entry; - KeyValuePair key = new KeyValuePair(asset, version); - if (m_GuidToHash.TryGetValue(key, out entry)) - return entry; - - entry = new CacheEntry { Guid = asset, Version = version }; - string path = AssetDatabase.GUIDToAssetPath(asset.ToString()); - entry.Type = CacheEntry.EntryType.Asset; - - if (path.Equals(CommonStrings.UnityBuiltInExtraPath, StringComparison.OrdinalIgnoreCase) || path.Equals(CommonStrings.UnityDefaultResourcePath, StringComparison.OrdinalIgnoreCase)) - entry.Hash = HashingMethods.Calculate(Application.unityVersion, path).ToHash128(); - else - { - entry.Hash = AssetDatabase.GetAssetDependencyHash(path); - if (!entry.Hash.isValid && File.Exists(path)) - entry.Hash = HashingMethods.CalculateFile(path).ToHash128(); - } - - if (entry.Hash.isValid) - entry.Hash = HashingMethods.Calculate(entry.Hash, entry.Version).ToHash128(); - - m_GuidToHash[key] = entry; - return entry; - } - - /// - public CacheEntry GetCacheEntry(string path, int version = 1) - { - CacheEntry entry; - KeyValuePair key = new KeyValuePair(path, version); - if (m_PathToHash.TryGetValue(key, out entry)) - return entry; - - var guid = AssetDatabase.AssetPathToGUID(path); - if (!string.IsNullOrEmpty(guid)) - return GetCacheEntry(new GUID(guid), version); - - entry = new CacheEntry { File = path, Version = version }; - entry.Guid = HashingMethods.Calculate("FileHash", entry.File).ToGUID(); - if (File.Exists(entry.File)) - entry.Hash = HashingMethods.Calculate(HashingMethods.CalculateFile(entry.File), entry.Version).ToHash128(); - entry.Type = CacheEntry.EntryType.File; - - m_PathToHash[key] = entry; - return entry; - } - - /// - public CacheEntry GetCacheEntry(ObjectIdentifier objectID, int version = 1) - { - if (objectID.guid.Empty()) - return GetCacheEntry(objectID.filePath, version); - return GetCacheEntry(objectID.guid, version); - } - - internal CacheEntry GetUpdatedCacheEntry(CacheEntry entry) - { - if (entry.Type == CacheEntry.EntryType.File) - return GetCacheEntry(entry.File, entry.Version); - if (entry.Type == CacheEntry.EntryType.Asset) - return GetCacheEntry(entry.Guid, entry.Version); - return entry; - } - - /// - public bool HasAssetOrDependencyChanged(CachedInfo info) - { - if (info == null || !info.Asset.IsValid() || info.Asset != GetUpdatedCacheEntry(info.Asset)) - return true; - - foreach (var dependency in info.Dependencies) - { - if (!dependency.IsValid() || dependency != GetUpdatedCacheEntry(dependency)) - return true; - } - - return false; - } - - /// - public string GetCachedInfoFile(CacheEntry entry) - { - var guid = entry.Guid.ToString(); - string finalHash = HashingMethods.Calculate(m_GlobalHash, entry.Hash).ToString(); - return string.Format("{0}/{1}/{2}/{3}/{2}.info", k_CachePath, guid.Substring(0, 2), guid, finalHash); - } - - /// - public string GetCachedArtifactsDirectory(CacheEntry entry) - { - var guid = entry.Guid.ToString(); - string finalHash = HashingMethods.Calculate(m_GlobalHash, entry.Hash).ToString(); - return string.Format("{0}/{1}/{2}/{3}", k_CachePath, guid.Substring(0, 2), guid, finalHash); - } - - class FileOperations - { - public FileOperations(int size) - { - data = new FileOperation[size]; - waitLock = new Semaphore(0, size); - } - - public FileOperation[] data; - public Semaphore waitLock; - } - - struct FileOperation - { - public string file; - public MemoryStream bytes; - } - - static void Read(object data) - { - var ops = (FileOperations)data; - for (int index = 0; index < ops.data.Length; index++, ops.waitLock.Release()) - { - try - { - var op = ops.data[index]; - if (File.Exists(op.file)) - { - byte[] bytes = File.ReadAllBytes(op.file); - if (bytes.Length > 0) - op.bytes = new MemoryStream(bytes, false); - } - ops.data[index] = op; - } - catch (Exception e) - { - BuildLogger.LogException(e); - } - } - } - - static void Write(object data) - { - var ops = (FileOperations)data; - for (int index = 0; index < ops.data.Length; index++) - { - // Basic spin lock - ops.waitLock.WaitOne(); - - var op = ops.data[index]; - if (op.bytes != null && op.bytes.Length > 0) - { - try - { - Directory.CreateDirectory(Path.GetDirectoryName(op.file)); - File.WriteAllBytes(op.file, op.bytes.GetBuffer()); - } - catch (Exception e) - { - BuildLogger.LogException(e); - } - } - } - ((IDisposable)ops.waitLock).Dispose(); - } - - /// - public void LoadCachedData(IList entries, out IList cachedInfos) - { - if (entries == null) - { - cachedInfos = null; - return; - } - - if (entries.Count == 0) - { - cachedInfos = new List(); - return; - } - - // Setup Operations - var ops = new FileOperations(entries.Count); - for (int i = 0; i < entries.Count; i++) - { - var op = ops.data[i]; - op.file = GetCachedInfoFile(entries[i]); - ops.data[i] = op; - } - - // Start file reading - Thread thread = new Thread(Read); - thread.Start(ops); - - cachedInfos = new List(entries.Count); - - // Deserialize as files finish reading - var formatter = new BinaryFormatter(); - for (int index = 0; index < entries.Count; index++) - { - // Basic wait lock - ops.waitLock.WaitOne(); - - CachedInfo info = null; - try - { - var op = ops.data[index]; - if (op.bytes != null && op.bytes.Length > 0) - info = formatter.Deserialize(op.bytes) as CachedInfo; - } - catch (Exception e) - { - BuildLogger.LogException(e); - } - cachedInfos.Add(info); - } - thread.Join(); - ((IDisposable)ops.waitLock).Dispose(); - - // Validate cached data is reusable - for (int i = 0; i < cachedInfos.Count; i++) - { - if (HasAssetOrDependencyChanged(cachedInfos[i])) - cachedInfos[i] = null; - } - - // If we have a cache server connection, download & check any missing info - if (m_Downloader != null) - m_Downloader.DownloadMissing(entries, cachedInfos); - - Assert.AreEqual(entries.Count, cachedInfos.Count); - } - - /// - public void SaveCachedData(IList infos) - { - if (infos == null || infos.Count == 0) - return; - - // Setup Operations - var ops = new FileOperations(infos.Count); - for (int i = 0; i < infos.Count; i++) - { - var op = ops.data[i]; - op.file = GetCachedInfoFile(infos[i].Asset); - ops.data[i] = op; - } - - // Start writing thread - SyncPendingSaves(); - m_ActiveWriteThread = new Thread(Write); - m_ActiveWriteThread.Start(ops); - - // Serialize data as previous data is being written out - var formatter = new BinaryFormatter(); - for (int index = 0; index < infos.Count; index++, ops.waitLock.Release()) - { - try - { - var op = ops.data[index]; - var stream = new MemoryStream(); - formatter.Serialize(stream, infos[index]); - if (stream.Length > 0) - { - op.bytes = stream; - ops.data[index] = op; - - // If we have a cache server connection, upload the cached data - if (m_Uploader != null) - m_Uploader.QueueUpload(infos[index].Asset, GetCachedArtifactsDirectory(infos[index].Asset), new MemoryStream(stream.GetBuffer(), false)); - } - } - catch (Exception e) - { - BuildLogger.LogException(e); - } - } - } - - internal void SyncPendingSaves() - { - if (m_ActiveWriteThread != null) - { - m_ActiveWriteThread.Join(); - m_ActiveWriteThread = null; - } - } - - internal struct CacheFolder - { - public DirectoryInfo directory; - public long Length { get; set; } - public void Delete() => directory.Delete(true); - public DateTime LastAccessTimeUtc - { - get => directory.LastAccessTimeUtc; - internal set => directory.LastAccessTimeUtc = value; - } - } - - public static void PurgeCache(bool prompt) - { - if (!Directory.Exists(k_CachePath)) - { - if (prompt) - Debug.Log("Current build cache is empty."); - return; - } - - if (prompt) - { - if (!EditorUtility.DisplayDialog("Purge Build Cache", "Do you really want to purge your entire build cache?", "Yes", "No")) - return; - - EditorUtility.DisplayProgressBar(BuildCachePreferences.BuildCacheProperties.purgeCache.text, BuildCachePreferences.BuildCacheProperties.pleaseWait.text, 0.0F); - Directory.Delete(k_CachePath, true); - EditorUtility.ClearProgressBar(); - } - else - Directory.Delete(k_CachePath, true); - } - - public static void PruneCache() - { - int maximumSize = EditorPrefs.GetInt("BuildCache.maximumSize", 200); - long maximumCacheSize = maximumSize * 1073741824L; // gigabytes to bytes - - // Get sizes based on common directory root for a guid / hash - ComputeCacheSizeAndFolders(out long currentCacheSize, out List cacheFolders); - - if (currentCacheSize < maximumCacheSize) - { - Debug.LogFormat("Current build cache currentCacheSize {0}, prune threshold {1} GB. No prune performed. You can change this value in the \"Edit/Preferences...\" window.", EditorUtility.FormatBytes(currentCacheSize), maximumSize); - return; - } - - if (!EditorUtility.DisplayDialog("Prune Build Cache", string.Format("Current build cache currentCacheSize is {0}, which is over the prune threshold of {1}. Do you want to prune your build cache now?", EditorUtility.FormatBytes(currentCacheSize), EditorUtility.FormatBytes(maximumCacheSize)), "Yes", "No")) - return; - - EditorUtility.DisplayProgressBar(BuildCachePreferences.BuildCacheProperties.pruneCache.text, BuildCachePreferences.BuildCacheProperties.pleaseWait.text, 0.0F); - - PruneCacheFolders(maximumCacheSize, currentCacheSize, cacheFolders); - - EditorUtility.ClearProgressBar(); - } - - public static void PruneCache_Background(long maximumCacheSize) - { - // Get sizes based on common directory root for a guid / hash - ComputeCacheSizeAndFolders(out long currentCacheSize, out List cacheFolders); - if (currentCacheSize < maximumCacheSize) - return; - - PruneCacheFolders(maximumCacheSize, currentCacheSize, cacheFolders); - } - - internal static void ComputeCacheSizeAndFolders(out long currentCacheSize, out List cacheFolders) - { - currentCacheSize = 0; - cacheFolders = new List(); - - var directory = new DirectoryInfo(k_CachePath); - if (!directory.Exists) - return; - - int length = directory.FullName.Count(x => x == Path.DirectorySeparatorChar) + 3; - DirectoryInfo[] subDirectories = directory.GetDirectories("*", SearchOption.AllDirectories); - foreach (var subDirectory in subDirectories) - { - if (subDirectory.FullName.Count(x => x == Path.DirectorySeparatorChar) != length) - continue; - - FileInfo[] files = subDirectory.GetFiles("*", SearchOption.AllDirectories); - var cacheFolder = new CacheFolder { directory = subDirectory, Length = files.Sum(x => x.Length) }; - cacheFolders.Add(cacheFolder); - - currentCacheSize += cacheFolder.Length; - } - } - - internal static void PruneCacheFolders(long maximumCacheSize, long currentCacheSize, List cacheFolders) - { - cacheFolders.Sort((a, b) => a.LastAccessTimeUtc.CompareTo(b.LastAccessTimeUtc)); - // Need to delete sets of files as the .info might reference a specific file artifact - foreach (var cacheFolder in cacheFolders) - { - currentCacheSize -= cacheFolder.Length; - cacheFolder.Delete(); - if (currentCacheSize < maximumCacheSize) - break; - } - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/BuildCache.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/BuildCache.cs.meta deleted file mode 100644 index 8ad310a0..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/BuildCache.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e2bbbc81002ad3642a2b1e7857a3f11a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/BuildCachePreferences.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/BuildCachePreferences.cs deleted file mode 100644 index 9a333574..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/BuildCachePreferences.cs +++ /dev/null @@ -1,104 +0,0 @@ -using UnityEngine; -using System.Threading; -using System.Collections.Generic; - -namespace UnityEditor.Build.Pipeline.Utilities -{ - static class BuildCachePreferences - { - internal class GUIScope : GUI.Scope - { - float m_LabelWidth; - public GUIScope(float layoutMaxWidth) - { - m_LabelWidth = EditorGUIUtility.labelWidth; - EditorGUIUtility.labelWidth = 200; - GUILayout.BeginHorizontal(GUILayout.MaxWidth(layoutMaxWidth)); - GUILayout.Space(10); - GUILayout.BeginVertical(); - GUILayout.Space(15); - } - - public GUIScope() : this(500) - { - } - - protected override void CloseScope() - { - GUILayout.EndVertical(); - GUILayout.EndHorizontal(); - EditorGUIUtility.labelWidth = m_LabelWidth; - } - } - - internal class BuildCacheProperties - { - public static readonly GUIContent maxCacheSize = EditorGUIUtility.TrTextContent("Maximum Cache Size (GB)", "The size of the Build Cache folder will be kept below this maximum value when possible."); - public static readonly GUIContent purgeCache = EditorGUIUtility.TrTextContent("Purge Cache"); - public static readonly GUIContent pruneCache = EditorGUIUtility.TrTextContent("Prune Cache"); - public static readonly GUIContent cacheSizeIs = EditorGUIUtility.TrTextContent("Cache size is"); - public static readonly GUIContent pleaseWait = EditorGUIUtility.TrTextContent("Please wait..."); - public static bool startedCalculation = false; - public static long currentCacheSize = -1; - } - -#if UNITY_2019_1_OR_NEWER - [SettingsProvider] - static SettingsProvider CreateBuildCacheProvider() - { - var provider = new SettingsProvider("Preferences/Build Cache", SettingsScope.User, SettingsProvider.GetSearchKeywordsFromGUIContentProperties()); - provider.guiHandler = sarchContext => OnGUI(); - return provider; - } -#else - [PreferenceItem("Build Cache")] -#endif - static void OnGUI() - { - using (new GUIScope()) - DrawProperties(); - } - - static void DrawProperties() - { - // Show Gigabytes to the user. - const int kMinSizeInGigabytes = 1; - const int kMaxSizeInGigabytes = 200; - - // Write size in GigaBytes. - int maximumSize = EditorPrefs.GetInt("BuildCache.maximumSize", 200); - int newMaximumSize = EditorGUILayout.IntSlider(BuildCacheProperties.maxCacheSize, maximumSize, kMinSizeInGigabytes, kMaxSizeInGigabytes); - if (maximumSize != newMaximumSize) - EditorPrefs.SetInt("BuildCache.maximumSize", newMaximumSize); - - GUILayout.BeginHorizontal(GUILayout.MaxWidth(500)); - if (GUILayout.Button(BuildCacheProperties.purgeCache, GUILayout.Width(120))) - { - BuildCache.PurgeCache(true); - BuildCacheProperties.startedCalculation = false; - } - - if (GUILayout.Button(BuildCacheProperties.pruneCache, GUILayout.Width(120))) - { - BuildCache.PruneCache(); - BuildCacheProperties.startedCalculation = false; - } - GUILayout.EndHorizontal(); - - // Current cache size - if (!BuildCacheProperties.startedCalculation) - { - BuildCacheProperties.startedCalculation = true; - ThreadPool.QueueUserWorkItem((state) => - { - BuildCache.ComputeCacheSizeAndFolders(out BuildCacheProperties.currentCacheSize, out List cacheFolders); - }); - } - - if (BuildCacheProperties.currentCacheSize >= 0) - GUILayout.Label(BuildCacheProperties.cacheSizeIs.text + " " + EditorUtility.FormatBytes(BuildCacheProperties.currentCacheSize)); - else - GUILayout.Label(BuildCacheProperties.cacheSizeIs.text + " is being calculated..."); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/BuildCachePreferences.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/BuildCachePreferences.cs.meta deleted file mode 100644 index e303f1d8..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/BuildCachePreferences.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a3917bebe3c7f9c468182aa64f311e69 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/BuildInterfacesWrapper.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/BuildInterfacesWrapper.cs deleted file mode 100644 index 57be966e..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/BuildInterfacesWrapper.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Reflection; - -namespace UnityEditor.Build.Pipeline.Utilities -{ - public class BuildInterfacesWrapper : IDisposable - { - Type m_Type = null; - - bool m_Disposed = false; - - public BuildInterfacesWrapper() - { - // BuildPipelineInterfaces is internal, and needs a little cleaning before it can be made public, - // but we need to use this for IProcessScene, IProcessSceneWithReport, & IPreprocessShaders callbacks. - // So use reflection for now, pay no attention to the man behind the curtain - m_Type = Type.GetType("UnityEditor.Build.BuildPipelineInterfaces, UnityEditor"); - var init = m_Type.GetMethod("InitializeBuildCallbacks", BindingFlags.NonPublic | BindingFlags.Static); - init.Invoke(null, new object[] { 18 }); // 18 = BuildCallbacks.SceneProcessors | BuildCallbacks.ShaderProcessors - } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (m_Disposed) - return; - - var clean = m_Type.GetMethod("CleanupBuildCallbacks", BindingFlags.NonPublic | BindingFlags.Static); - clean.Invoke(null, null); - - m_Disposed = true; - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/BuildInterfacesWrapper.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/BuildInterfacesWrapper.cs.meta deleted file mode 100644 index 435f3dec..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/BuildInterfacesWrapper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cff0546d9c35a3248bd820d7dd136af6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/BuildLogger.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/BuildLogger.cs deleted file mode 100644 index 32592aa1..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/BuildLogger.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System.Diagnostics; - -namespace UnityEditor.Build.Pipeline.Utilities -{ - using Debug = UnityEngine.Debug; - - public static class BuildLogger - { - [Conditional("BUILD_CACHE_DEBUG")] - public static void LogCache(string msg, params object[] attrs) - { - Log(msg, attrs); - } - - [Conditional("BUILD_CACHE_DEBUG")] - public static void LogCacheWarning(string msg, params object[] attrs) - { - LogWarning(msg, attrs); - } - - [Conditional("DEBUG")] - public static void Log(string msg) - { - Debug.Log(msg); - } - - [Conditional("DEBUG")] - public static void Log(object msg) - { - Debug.Log(msg); - } - - [Conditional("DEBUG")] - public static void Log(string msg, params object[] attrs) - { - Debug.Log(string.Format(msg, attrs)); - } - - [Conditional("DEBUG")] - public static void LogWarning(string msg) - { - Debug.LogWarning(msg); - } - - [Conditional("DEBUG")] - public static void LogWarning(object msg) - { - Debug.LogWarning(msg); - } - - [Conditional("DEBUG")] - public static void LogWarning(string msg, params object[] attrs) - { - Debug.LogWarning(string.Format(msg, attrs)); - } - - [Conditional("DEBUG")] - public static void LogError(string msg) - { - Debug.LogError(msg); - } - - [Conditional("DEBUG")] - public static void LogError(object msg) - { - Debug.LogError(msg); - } - - [Conditional("DEBUG")] - public static void LogError(string msg, params object[] attrs) - { - Debug.LogError(string.Format(msg, attrs)); - } - - [Conditional("DEBUG")] - public static void LogException(System.Exception e) - { - Debug.LogException(e); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/BuildLogger.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/BuildLogger.cs.meta deleted file mode 100644 index caa9fddc..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/BuildLogger.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 91081fbba8a37084c8b7e9d7d5995080 -timeCreated: 1504709533 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/CacheEntry.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/CacheEntry.cs deleted file mode 100644 index b85ec37a..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/CacheEntry.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityEditor.Build.Pipeline.Utilities -{ - interface ICachedData { } - - [Serializable] - public class CachedInfo : ICachedData - { - public CacheEntry Asset { get; set; } - public CacheEntry[] Dependencies { get; set; } - public object[] Data { get; set; } - } - - [Serializable] - public struct CacheEntry : IEquatable - { - public enum EntryType - { - Asset, - File, - Data - } - - public Hash128 Hash { get; internal set; } - public GUID Guid { get; internal set; } - public int Version { get; internal set; } - public EntryType Type { get; internal set; } - public string File { get; internal set; } - - public bool IsValid() - { - return Hash.isValid && !Guid.Empty(); - } - - public override bool Equals(object obj) - { - if (ReferenceEquals(null, obj)) - return false; - return obj is CacheEntry && Equals((CacheEntry)obj); - } - - public static bool operator ==(CacheEntry x, CacheEntry y) - { - return x.Hash == y.Hash && x.Guid == y.Guid; - } - - public static bool operator !=(CacheEntry x, CacheEntry y) - { - return !(x == y); - } - - public override int GetHashCode() - { - unchecked - { - var hashCode = Hash.GetHashCode(); - hashCode = (hashCode * 397) ^ Guid.GetHashCode(); - hashCode = (hashCode * 397) ^ Version; - hashCode = (hashCode * 397) ^ (int)Type; - hashCode = (hashCode * 397) ^ (File != null ? File.GetHashCode() : 0); - return hashCode; - } - } - - public override string ToString() - { - if (Type == EntryType.File) - return string.Format("{{{0}, {1}}}", File, Hash); - return string.Format("{{{0}, {1}}}", Guid, Hash); - } - - public bool Equals(CacheEntry other) - { - return Hash.Equals(other.Hash) && Guid.Equals(other.Guid) && Version == other.Version && Type == other.Type && string.Equals(File, other.File); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/CacheEntry.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/CacheEntry.cs.meta deleted file mode 100644 index cfbfd68e..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/CacheEntry.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 4664ae20418c56944a2f6c5ab30f82bf -timeCreated: 1504709533 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/CacheServerDownloader.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/CacheServerDownloader.cs deleted file mode 100644 index f14f84c1..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/CacheServerDownloader.cs +++ /dev/null @@ -1,163 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Runtime.Serialization.Formatters.Binary; -using System.Threading; -using UnityEditor.Build.CacheServer; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEngine; -using UnityEngine.Assertions; - -namespace UnityEditor.Build.Pipeline.Utilities -{ - class CacheServerDownloader : IDisposable - { - const string k_CachePath = "Temp/CacheServer"; - - IBuildCache m_Cache; - Client m_Client; - Hash128 m_GlobalHash; - - bool m_Disposed; - - Semaphore m_Semaphore; - - public CacheServerDownloader(IBuildCache cache, string host, int port = 8126) - { - m_Cache = cache; - m_Client = new Client(host, port); - m_Client.Connect(); - } - - public void Dispose() - { - if (!m_Disposed) - { - m_Disposed = true; - m_Client.Close(); - } - } - - public void SetGlobalHash(Hash128 hash) - { - m_GlobalHash = hash; - } - - string GetCachedInfoFile(CacheEntry entry) - { - string finalHash = HashingMethods.Calculate(entry.Hash, m_GlobalHash).ToString(); - return string.Format("{0}/{1}_{2}.info", k_CachePath, entry.Guid.ToString(), finalHash); - } - - string GetCachedArtifactsFile(CacheEntry entry) - { - string finalHash = HashingMethods.Calculate(entry.Hash, m_GlobalHash).ToString(); - return string.Format("{0}/{1}_{2}.sbpGz", k_CachePath, entry.Guid.ToString(), finalHash); - } - - // Called on background thread - void ThreadedDownloadFinished(object sender, DownloadFinishedEventArgs args) - { - // Only run this for Info files - if (args.DownloadItem.Type != FileType.Info) - return; - - m_Semaphore.Release(); - } - - // We don't return from this function until all downloads are processed. So it is safe to dispose immediately after. - public void DownloadMissing(IList entries, IList cachedInfos) - { - Assert.AreEqual(entries.Count, cachedInfos.Count); - Directory.CreateDirectory(k_CachePath); - - m_Semaphore = new Semaphore(0, entries.Count); - m_Client.DownloadFinished += ThreadedDownloadFinished; - - // Queue up downloads for the missing or invalid local data - for (var index = 0; index < entries.Count; index++) - { - // Only download data for cachedInfos that are invalid - if (cachedInfos[index] != null) - continue; - - var entry = entries[index]; - - string finalHash = HashingMethods.Calculate(entry.Hash, m_GlobalHash).ToHash128().ToString(); - var fileId = FileId.From(entry.Guid.ToString(), finalHash); - - // Download artifacts before info to ensure both are available when download for info returns - var downloadArtifact = new FileDownloadItem(fileId, FileType.Resource, GetCachedArtifactsFile(entry)); - m_Client.QueueDownload(downloadArtifact); - - var downloadInfo = new FileDownloadItem(fileId, FileType.Info, GetCachedInfoFile(entry)); - m_Client.QueueDownload(downloadInfo); - } - - // Check downloads to see if it is usable data - var formatter = new BinaryFormatter(); - for (var index = 0; index < entries.Count; index++) - { - // find the next invalid cachedInfo - while (index < entries.Count && cachedInfos[index] != null) - index++; - // make sure we didn't go out of bounds looking for invalid entries - if (index >= entries.Count) - break; - - // Wait for info download - m_Semaphore.WaitOne(); - - string tempInfoFile = GetCachedInfoFile(entries[index]); - if (!File.Exists(tempInfoFile)) - continue; - - try - { - CachedInfo info; - using (var fileStream = new FileStream(tempInfoFile, FileMode.Open, FileAccess.Read)) - info = formatter.Deserialize(fileStream) as CachedInfo; - - if (m_Cache.HasAssetOrDependencyChanged(info)) - continue; - - // Not every info file will have artifacts. So just check to see if we downloaded something. - // TODO: May want to extend CachedInfo with Artifact knowledge if there is a performance benefit? - string tempArtifactFile = GetCachedArtifactsFile(entries[index]); - string tempArtifactDir = Path.ChangeExtension(tempArtifactFile, ""); - if (File.Exists(tempArtifactFile) && !FileCompressor.Decompress(tempArtifactFile, tempArtifactDir)) - continue; - - // All valid, move downloaded data into place - cachedInfos[index] = info; - - string targetInfoFile = m_Cache.GetCachedInfoFile(info.Asset); - if (File.Exists(targetInfoFile)) - File.Delete(targetInfoFile); - else - Directory.CreateDirectory(Path.GetDirectoryName(targetInfoFile)); - File.Move(tempInfoFile, targetInfoFile); - - if (Directory.Exists(tempArtifactDir)) - { - string targetArtifactDir = m_Cache.GetCachedArtifactsDirectory(info.Asset); - if (Directory.Exists(targetArtifactDir)) - Directory.Delete(targetArtifactDir, true); - Directory.Move(tempArtifactDir, targetArtifactDir); - } - } - catch (Exception e) - { - BuildLogger.LogException(e); - } - } - - m_Client.ResetDownloadFinishedEventHandler(); - - ((IDisposable)m_Semaphore).Dispose(); - m_Semaphore = null; - - Directory.Delete(k_CachePath, true); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/CacheServerDownloader.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/CacheServerDownloader.cs.meta deleted file mode 100644 index b5ef7e2f..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/CacheServerDownloader.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3c6caf6db0f23fb459226c679978683d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/CacheServerUploader.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/CacheServerUploader.cs deleted file mode 100644 index 420cc86f..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/CacheServerUploader.cs +++ /dev/null @@ -1,106 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Threading; -using UnityEditor.Build.CacheServer; -using UnityEngine; - -namespace UnityEditor.Build.Pipeline.Utilities -{ - class CacheServerUploader : IDisposable - { - Queue m_WorkItems = new Queue(); - Semaphore m_Semaphore = new Semaphore(0, Int32.MaxValue); - Hash128 m_GlobalHash; - Thread m_UploaderThread; - - Client m_Client; - - bool m_Disposed; - - struct WorkItem - { - public FileId fileId; - public string artifactsPath; - public MemoryStream stream; - } - - public CacheServerUploader(string host, int port = 8126) - { - m_Client = new Client(host, port); - m_Client.Connect(); - - m_UploaderThread = new Thread(ThreadedUploader); - m_UploaderThread.Start(); - } - - public void SetGlobalHash(Hash128 hash) - { - m_GlobalHash = hash; - } - - // We return from this function before all uploads are complete. So we must wait to dispose until all uploads are finished. - public void QueueUpload(CacheEntry entry, string artifactsPath, MemoryStream stream) - { - var item = new WorkItem(); - string finalHash = HashingMethods.Calculate(entry.Hash, m_GlobalHash).ToString(); - item.fileId = FileId.From(entry.Guid.ToString(), finalHash); - item.artifactsPath = artifactsPath; - item.stream = stream; - - lock (m_WorkItems) - m_WorkItems.Enqueue(item); - m_Semaphore.Release(); - } - - // Called on background thread - void ThreadedUploader() - { - while (true) - { - m_Semaphore.WaitOne(); - - WorkItem item; - lock (m_WorkItems) - { - // If we got past the semaphore, and no items are left, time to clean up - if (m_WorkItems.Count == 0) - { - ((IDisposable)m_Semaphore).Dispose(); - m_Client.Close(); - return; - } - - item = m_WorkItems.Dequeue(); - } - - m_Client.BeginTransaction(item.fileId); - m_Client.Upload(FileType.Info, item.stream); - - string artifactsZip = Path.GetTempFileName(); - if (FileCompressor.Compress(item.artifactsPath, artifactsZip)) - { - using (var stream = new FileStream(artifactsZip, FileMode.Open, FileAccess.Read)) - m_Client.Upload(FileType.Resource, stream); - } - File.Delete(artifactsZip); - - m_Client.EndTransaction(); - } - } - - public void Dispose() - { - if (!m_Disposed) - { - m_Disposed = true; - m_Semaphore.Release(); - if (m_UploaderThread != null) - { - m_UploaderThread.Join(); - m_UploaderThread = null; - } - } - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/CacheServerUploader.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/CacheServerUploader.cs.meta deleted file mode 100644 index 5b57a25b..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/CacheServerUploader.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 429f5bce8a9b4ba4295f2d48eebd9639 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/CommonStrings.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/CommonStrings.cs deleted file mode 100644 index 4a0c2ca5..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/CommonStrings.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace UnityEditor.Build.Utilities -{ - public static class CommonStrings - { - public const string UnityEditorResourcePath = "library/unity editor resources"; - public const string UnityDefaultResourcePath = "library/unity default resources"; - public const string UnityBuiltInExtraPath = "resources/unity_builtin_extra"; - public const string AssetBundleNameFormat = "archive:/{0}/{0}"; - public const string SceneBundleNameFormat = "archive:/{0}/{1}.sharedAssets"; - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/CommonStrings.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/CommonStrings.cs.meta deleted file mode 100644 index 181f0e90..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/CommonStrings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7e08d97accaeb0f47909f2371a26ca32 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/ExtensionMethods.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/ExtensionMethods.cs deleted file mode 100644 index b88adf74..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/ExtensionMethods.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System.Collections.Generic; -using UnityEditor.Build.Content; -using UnityEngine; - -namespace UnityEditor.Build.Pipeline.Utilities -{ - static class ExtensionMethods - { - public static bool IsNullOrEmpty(this ICollection collection) - { - return collection == null || collection.Count == 0; - } - - public static void GetOrAdd(this IDictionary> dictionary, TKey key, out List value) - { - if (dictionary.TryGetValue(key, out value)) - return; - - value = new List(); - dictionary.Add(key, value); - } - - public static void GetOrAdd(this IDictionary> dictionary, TKey key, out HashSet value) - { - if (dictionary.TryGetValue(key, out value)) - return; - - value = new HashSet(); - dictionary.Add(key, value); - } - - public static void Swap(this IList list, int first, int second) - { - T temp = list[second]; - list[second] = list[first]; - list[first] = temp; - } - - public static Hash128 GetHash128(this BuildSettings settings) - { - if (settings.typeDB == null) - return HashingMethods.Calculate(settings.target, settings.group, settings.buildFlags).ToHash128(); - return HashingMethods.Calculate(settings.target, settings.group, settings.buildFlags, settings.typeDB.GetHash128()).ToHash128(); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/ExtensionMethods.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/ExtensionMethods.cs.meta deleted file mode 100644 index 4067cfa1..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/ExtensionMethods.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 10534ee7753023c4dbd1556e9efb590c -timeCreated: 1504709533 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/FileCompressor.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/FileCompressor.cs deleted file mode 100644 index 1a6f9fed..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/FileCompressor.cs +++ /dev/null @@ -1,118 +0,0 @@ -using System; -using System.IO; -using System.IO.Compression; -using System.Linq; -using System.Text; - -namespace UnityEditor.Build.Pipeline.Utilities -{ - // Since C# only has GZipStream until .NET 4.0, we are forced to implement our own packing system - // for artifact files. We compact all artifacts into a single GZip Stream with the header before - // the file name and contents. The header contains the file name length and file length (in bytes). - public class FileCompressor - { - public static bool Compress(string directoryPath, string archiveFilePath) - { - if (!directoryPath.EndsWith("/") && !directoryPath.EndsWith("\\")) - directoryPath += Path.DirectorySeparatorChar.ToString(); - - var directory = new DirectoryInfo(directoryPath); - if (!directory.Exists) - return false; - - var files = directory.GetFiles("*", SearchOption.AllDirectories); - files = files.Where(x => (File.GetAttributes(x.FullName) & FileAttributes.Hidden) != FileAttributes.Hidden && x.Extension != ".sbpGz").ToArray(); - if (files.Length == 0) - return false; - - using (var archiveStream = new FileStream(archiveFilePath, FileMode.OpenOrCreate, FileAccess.Write)) - { - using (var gZipStream = new GZipStream(archiveStream, CompressionMode.Compress)) - { - foreach (var file in files) - { - var relativePath = file.FullName.Substring(directory.FullName.Length); - relativePath = relativePath.Replace("\\", "/"); - - using (var fileStream = file.OpenRead()) - { - byte[] filePathBytes = Encoding.ASCII.GetBytes(relativePath); - - // Write chunk header - gZipStream.Write(BitConverter.GetBytes(filePathBytes.Length), 0, sizeof(int)); - gZipStream.Write(BitConverter.GetBytes(fileStream.Length), 0, sizeof(long)); - - // Write chunk body - // Write file path - gZipStream.Write(filePathBytes, 0, filePathBytes.Length); - - // Write file contents - byte[] readBuffer = new byte[4096]; - int readSize = readBuffer.Length; - while (readSize == readBuffer.Length) - { - readSize = fileStream.Read(readBuffer, 0, readBuffer.Length); - gZipStream.Write(readBuffer, 0, readSize); - } - } - } - } - } - return true; - } - - public static bool Decompress(string archiveFilePath, string directoryPath) - { - var archiveFile = new FileInfo(archiveFilePath); - if (!archiveFile.Exists) - return false; - - var directory = new DirectoryInfo(directoryPath); - if (!directory.Exists) - directory.Create(); - - using (var archiveStream = archiveFile.OpenRead()) - { - using (var gZipStream = new GZipStream(archiveStream, CompressionMode.Decompress)) - { - while (true) - { - // Read chunk header - byte[] header = new byte[sizeof(int) + sizeof(long)]; - int readSize = gZipStream.Read(header, 0, header.Length); - if (readSize != header.Length) - break; - - int filePathLength = BitConverter.ToInt32(header, 0); - long fileLenth = BitConverter.ToInt64(header, sizeof(int)); - - // Read chunk body - // Read file path - byte[] filePathBytes = new byte[filePathLength]; - gZipStream.Read(filePathBytes, 0, filePathLength); - string filePath = Encoding.ASCII.GetString(filePathBytes); - - var pathSeperator = filePath.LastIndexOf("/"); - if (pathSeperator > -1) - Directory.CreateDirectory(string.Format("{0}/{1}", directoryPath, filePath.Substring(0, pathSeperator))); - - // Read file contents - using (var fileStream = new FileStream(directoryPath + "/" + filePath, FileMode.OpenOrCreate, FileAccess.Write)) - { - byte[] readBuffer = new byte[4096]; - long readRemaining = fileLenth; - while (readRemaining > 0) - { - readSize = readBuffer.Length < readRemaining ? readBuffer.Length : (int)readRemaining; - gZipStream.Read(readBuffer, 0, readSize); - fileStream.Write(readBuffer, 0, readSize); - readRemaining -= readSize; - } - } - } - } - } - return true; - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/FileCompressor.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/FileCompressor.cs.meta deleted file mode 100644 index 5286b638..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/FileCompressor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 05b619d8a4e3fce47acecb2fcf4122b7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/GraphicsSettingsApi.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/GraphicsSettingsApi.cs deleted file mode 100644 index 5206cbb5..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/GraphicsSettingsApi.cs +++ /dev/null @@ -1,149 +0,0 @@ -using UnityEditor.Build.Content; - -namespace UnityEditor.Build.Pipeline.Utilities -{ -#if !UNITY_2019_1_OR_NEWER - using System.Reflection; - using UnityEngine.Rendering; - - using Object = UnityEngine.Object; -#endif - - static class GraphicsSettingsApi - { -#if UNITY_2019_1_OR_NEWER - internal static BuildUsageTagGlobal GetGlobalUsage() - { - return ContentBuildInterface.GetGlobalUsageFromGraphicsSettings(); - } -#else - static SerializedObject m_SerializedObject; - static SerializedProperty m_LightmapStripping; - static SerializedProperty m_LightmapKeepPlain; - static SerializedProperty m_LightmapKeepDirCombined; - static SerializedProperty m_LightmapKeepDynamicPlain; - static SerializedProperty m_LightmapKeepDynamicDirCombined; - static SerializedProperty m_LightmapKeepShadowMask; - static SerializedProperty m_LightmapKeepSubtractive; - static SerializedProperty m_FogStripping; - static SerializedProperty m_FogKeepLinear; - static SerializedProperty m_FogKeepExp; - static SerializedProperty m_FogKeepExp2; - static SerializedProperty m_InstancingStripping; - - static FieldInfo m_LightmapModesUsed; - static FieldInfo m_LegacyLightmapModesUsed; - static FieldInfo m_DynamicLightmapsUsed; - static FieldInfo m_FogModesUsed; - static FieldInfo m_ForceInstancingStrip; - static FieldInfo m_ForceInstancingKeep; - static FieldInfo m_ShadowMasksUsed; - static FieldInfo m_SubtractiveUsed; - - static uint m_LightmapModesUsed_Value; - static uint m_LegacyLightmapModesUsed_Value; - static uint m_DynamicLightmapsUsed_Value; - static uint m_FogModesUsed_Value; - static bool m_ForceInstancingStrip_Value; - static bool m_ForceInstancingKeep_Value; - static bool m_ShadowMasksUsed_Value; - static bool m_SubtractiveUsed_Value; - - static void OnEnable() - { - m_LightmapModesUsed_Value = 0; - m_LegacyLightmapModesUsed_Value = 0; - m_DynamicLightmapsUsed_Value = 0; - m_FogModesUsed_Value = 0; - m_ForceInstancingStrip_Value = false; - m_ForceInstancingKeep_Value = false; - m_ShadowMasksUsed_Value = false; - m_SubtractiveUsed_Value = false; - - if (m_SerializedObject != null) - return; - - var getGraphicsSettings = typeof(GraphicsSettings).GetMethod("GetGraphicsSettings", BindingFlags.Static | BindingFlags.NonPublic); - var graphicsSettings = getGraphicsSettings.Invoke(null, null) as Object; - m_SerializedObject = new SerializedObject(graphicsSettings); - - m_LightmapStripping = m_SerializedObject.FindProperty("m_LightmapStripping"); - m_LightmapKeepPlain = m_SerializedObject.FindProperty("m_LightmapKeepPlain"); - m_LightmapKeepDirCombined = m_SerializedObject.FindProperty("m_LightmapKeepDirCombined"); - m_LightmapKeepDynamicPlain = m_SerializedObject.FindProperty("m_LightmapKeepDynamicPlain"); - m_LightmapKeepDynamicDirCombined = m_SerializedObject.FindProperty("m_LightmapKeepDynamicDirCombined"); - m_LightmapKeepShadowMask = m_SerializedObject.FindProperty("m_LightmapKeepShadowMask"); - m_LightmapKeepSubtractive = m_SerializedObject.FindProperty("m_LightmapKeepSubtractive"); - m_FogStripping = m_SerializedObject.FindProperty("m_FogStripping"); - m_FogKeepLinear = m_SerializedObject.FindProperty("m_FogKeepLinear"); - m_FogKeepExp = m_SerializedObject.FindProperty("m_FogKeepExp"); - m_FogKeepExp2 = m_SerializedObject.FindProperty("m_FogKeepExp2"); - m_InstancingStripping = m_SerializedObject.FindProperty("m_InstancingStripping"); - - var globalUsageType = typeof(BuildUsageTagGlobal); - m_LightmapModesUsed = globalUsageType.GetField("m_LightmapModesUsed", BindingFlags.Instance | BindingFlags.NonPublic); - m_LegacyLightmapModesUsed = globalUsageType.GetField("m_LegacyLightmapModesUsed", BindingFlags.Instance | BindingFlags.NonPublic);; - m_DynamicLightmapsUsed = globalUsageType.GetField("m_DynamicLightmapsUsed", BindingFlags.Instance | BindingFlags.NonPublic);; - m_FogModesUsed = globalUsageType.GetField("m_FogModesUsed", BindingFlags.Instance | BindingFlags.NonPublic);; - m_ForceInstancingStrip = globalUsageType.GetField("m_ForceInstancingStrip", BindingFlags.Instance | BindingFlags.NonPublic);; - m_ForceInstancingKeep = globalUsageType.GetField("m_ForceInstancingKeep", BindingFlags.Instance | BindingFlags.NonPublic);; - m_ShadowMasksUsed = globalUsageType.GetField("m_ShadowMasksUsed", BindingFlags.Instance | BindingFlags.NonPublic);; - m_SubtractiveUsed = globalUsageType.GetField("m_SubtractiveUsed", BindingFlags.Instance | BindingFlags.NonPublic);; - } - - internal static BuildUsageTagGlobal GetGlobalUsage() - { - OnEnable(); - - if (m_LightmapStripping.intValue != 0) - { - if (m_LightmapKeepPlain.boolValue) - m_LegacyLightmapModesUsed_Value |= (1 << 0); - if (m_LightmapKeepDirCombined.boolValue) - m_LegacyLightmapModesUsed_Value |= (1 << 2); - - if (m_LightmapKeepPlain.boolValue) - m_LightmapModesUsed_Value |= (1 << 0); - if (m_LightmapKeepDirCombined.boolValue) - m_LightmapModesUsed_Value |= (1 << 1); - - if (m_LightmapKeepDynamicPlain.boolValue) - m_DynamicLightmapsUsed_Value |= (1 << 0); - if (m_LightmapKeepDynamicDirCombined.boolValue) - m_DynamicLightmapsUsed_Value |= (1 << 1); - - if (m_LightmapKeepShadowMask.boolValue) - m_ShadowMasksUsed_Value = true; - if (m_LightmapKeepSubtractive.boolValue) - m_SubtractiveUsed_Value = true; - } - - if (m_FogStripping.intValue != 0) - { - if (m_FogKeepLinear.boolValue) - m_FogModesUsed_Value |= (1 << 1); - if (m_FogKeepExp.boolValue) - m_FogModesUsed_Value |= (1 << 2); - if (m_FogKeepExp2.boolValue) - m_FogModesUsed_Value |= (1 << 3); - } - - m_ForceInstancingStrip_Value = (m_InstancingStripping.intValue == 1); - m_ForceInstancingKeep_Value = (m_InstancingStripping.intValue == 2); - - BuildUsageTagGlobal globalUsage = new BuildUsageTagGlobal(); - var boxedUsage = (object)globalUsage; - m_LightmapModesUsed.SetValue(boxedUsage, m_LightmapModesUsed_Value); - m_LegacyLightmapModesUsed.SetValue(boxedUsage, m_LegacyLightmapModesUsed_Value); - m_DynamicLightmapsUsed.SetValue(boxedUsage, m_DynamicLightmapsUsed_Value); - m_FogModesUsed.SetValue(boxedUsage, m_FogModesUsed_Value); - m_ForceInstancingStrip.SetValue(boxedUsage, m_ForceInstancingStrip_Value); - m_ForceInstancingKeep.SetValue(boxedUsage, m_ForceInstancingKeep_Value); - m_ShadowMasksUsed.SetValue(boxedUsage, m_ShadowMasksUsed_Value); - m_SubtractiveUsed.SetValue(boxedUsage, m_SubtractiveUsed_Value); - globalUsage = (BuildUsageTagGlobal)boxedUsage; - return globalUsage; - } -#endif - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/GraphicsSettingsApi.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/GraphicsSettingsApi.cs.meta deleted file mode 100644 index 35f7b265..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/GraphicsSettingsApi.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 07feb49ed5894cd459f42e594a2fbb94 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/HashingMethods.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/HashingMethods.cs deleted file mode 100644 index 625ba566..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/HashingMethods.cs +++ /dev/null @@ -1,307 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using System.Security.Cryptography; -using System.Text; -using UnityEngine; - -namespace UnityEditor.Build.Pipeline.Utilities -{ - [Serializable] - public struct RawHash : IEquatable - { - readonly byte[] m_Hash; - - internal RawHash(byte[] hash) - { - m_Hash = hash; - } - - internal static RawHash Zero() - { - return new RawHash(new byte[16]); - } - - public byte[] ToBytes() - { - return m_Hash; - } - - public Hash128 ToHash128() - { - if (m_Hash == null || m_Hash.Length != 16) - return new Hash128(); - - return new Hash128(BitConverter.ToUInt32(m_Hash, 0), BitConverter.ToUInt32(m_Hash, 4), - BitConverter.ToUInt32(m_Hash, 8), BitConverter.ToUInt32(m_Hash, 12)); - } - - public GUID ToGUID() - { - if (m_Hash == null || m_Hash.Length != 16) - return new GUID(); - - return new GUID(ToString()); - } - - public override string ToString() - { - if (m_Hash == null || m_Hash.Length != 16) - return "00000000000000000000000000000000"; - - return BitConverter.ToString(m_Hash).Replace("-", "").ToLower(); - } - - public bool Equals(RawHash other) - { - return Equals(m_Hash, other.m_Hash); - } - - public override bool Equals(object obj) - { - if (ReferenceEquals(null, obj)) - return false; - return obj is RawHash && Equals((RawHash)obj); - } - - public override int GetHashCode() - { - return (m_Hash != null ? m_Hash.GetHashCode() : 0); - } - } - - public static class HashingMethods - { - // TODO: Make this even faster! - // Maybe use unsafe code to access the raw bytes and pass them directly into the stream? - // Maybe pass the bytes into the HashAlgorithm directly - // TODO: Does this handle arrays? - static void GetRawBytes(Stack state, Stream stream) - { - if (state.Count == 0) - return; - - object currObj = state.Pop(); - if (currObj == null) - return; - - // Handle basic types - if (currObj is bool) - { - var bytes = BitConverter.GetBytes((bool)currObj); - stream.Write(bytes, 0, bytes.Length); - } - else if (currObj is char) - { - var bytes = BitConverter.GetBytes((char)currObj); - stream.Write(bytes, 0, bytes.Length); - } - else if (currObj is double) - { - var bytes = BitConverter.GetBytes((double)currObj); - stream.Write(bytes, 0, bytes.Length); - } - else if (currObj is short) - { - var bytes = BitConverter.GetBytes((short)currObj); - stream.Write(bytes, 0, bytes.Length); - } - else if (currObj is int) - { - var bytes = BitConverter.GetBytes((int)currObj); - stream.Write(bytes, 0, bytes.Length); - } - else if (currObj is long) - { - var bytes = BitConverter.GetBytes((long)currObj); - stream.Write(bytes, 0, bytes.Length); - } - else if (currObj is float) - { - var bytes = BitConverter.GetBytes((float)currObj); - stream.Write(bytes, 0, bytes.Length); - } - else if (currObj is ushort) - { - var bytes = BitConverter.GetBytes((ushort)currObj); - stream.Write(bytes, 0, bytes.Length); - } - else if (currObj is uint) - { - var bytes = BitConverter.GetBytes((uint)currObj); - stream.Write(bytes, 0, bytes.Length); - } - else if (currObj is ulong) - { - var bytes = BitConverter.GetBytes((ulong)currObj); - stream.Write(bytes, 0, bytes.Length); - } - else if (currObj is byte[]) - { - var bytes = (byte[])currObj; - stream.Write(bytes, 0, bytes.Length); - } - else if (currObj is string) - { - var bytes = Encoding.ASCII.GetBytes((string)currObj); - stream.Write(bytes, 0, bytes.Length); - } - else if (currObj.GetType().IsEnum) - { - // Handle enums - var type = Enum.GetUnderlyingType(currObj.GetType()); - var newObj = Convert.ChangeType(currObj, type); - state.Push(newObj); - } - else if (currObj.GetType().IsArray) - { - // Handle arrays - var array = (Array)currObj; - for (int i = array.Length - 1; i >= 0; i--) - state.Push(array.GetValue(i)); - } - else if (currObj is System.Collections.IEnumerable) - { - var iterator = (System.Collections.IEnumerable)currObj; - var reverseOrder = new Stack(); - foreach (var newObj in iterator) - reverseOrder.Push(newObj); - foreach (var newObj in reverseOrder) - state.Push(newObj); - } - else - { - // Use reflection for remainder - var fields = currObj.GetType().GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); - for (var index = fields.Length - 1; index >= 0; index--) - { - var field = fields[index]; - var newObj = field.GetValue(currObj); - state.Push(newObj); - } - } - } - - static void GetRawBytes(Stream stream, object obj) - { - var objStack = new Stack(); - objStack.Push(obj); - while (objStack.Count > 0) - GetRawBytes(objStack, stream); - } - - static void GetRawBytes(Stream stream, params object[] objects) - { - var objStack = new Stack(); - for (var index = objects.Length - 1; index >= 0; index--) - objStack.Push(objects[index]); - while (objStack.Count > 0) - GetRawBytes(objStack, stream); - } - - static HashAlgorithm GetHashAlgorithm(Type type) - { - if (type == typeof(MD4)) - return MD4.Create(); - - // TODO: allow user created HashAlgorithms? - var alggorithm = HashAlgorithm.Create(type.FullName); - if (alggorithm == null) - throw new NotImplementedException("Unable to create hash algorithm: '" + type.FullName + "'."); - return alggorithm; - } - - public static RawHash CalculateStream(Stream stream) - { - if (stream == null) - return RawHash.Zero(); - - byte[] hash; - using (var hashAlgorithm = GetHashAlgorithm(typeof(MD5))) - hash = hashAlgorithm.ComputeHash(stream); - return new RawHash(hash); - } - - public static RawHash CalculateStream(Stream stream) where T : HashAlgorithm - { - if (stream == null) - return RawHash.Zero(); - - byte[] hash; - using (var hashAlgorithm = GetHashAlgorithm(typeof(T))) - hash = hashAlgorithm.ComputeHash(stream); - return new RawHash(hash); - } - - public static RawHash Calculate(object obj) - { - RawHash rawHash; - using (var stream = new MemoryStream()) - { - GetRawBytes(stream, obj); - stream.Position = 0; - rawHash = CalculateStream(stream); - } - return rawHash; - } - - public static RawHash Calculate(params object[] objects) - { - if (objects == null) - return RawHash.Zero(); - - RawHash rawHash; - using (var stream = new MemoryStream()) - { - GetRawBytes(stream, objects); - stream.Position = 0; - rawHash = CalculateStream(stream); - } - return rawHash; - } - - public static RawHash Calculate(object obj) where T : HashAlgorithm - { - RawHash rawHash; - using (var stream = new MemoryStream()) - { - GetRawBytes(stream, obj); - stream.Position = 0; - rawHash = CalculateStream(stream); - } - return rawHash; - } - - public static RawHash Calculate(params object[] objects) where T : HashAlgorithm - { - if (objects == null) - return RawHash.Zero(); - - RawHash rawHash; - using (var stream = new MemoryStream()) - { - GetRawBytes(stream, objects); - stream.Position = 0; - rawHash = CalculateStream(stream); - } - return rawHash; - } - - public static RawHash CalculateFile(string filePath) - { - RawHash rawHash; - using (var stream = new FileStream(filePath, FileMode.Open, FileAccess.Read)) - rawHash = CalculateStream(stream); - return rawHash; - } - - public static RawHash CalculateFile(string filePath) where T : HashAlgorithm - { - RawHash rawHash; - using (var stream = new FileStream(filePath, FileMode.Open, FileAccess.Read)) - rawHash = CalculateStream(stream); - return rawHash; - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/HashingMethods.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/HashingMethods.cs.meta deleted file mode 100644 index 485ca16c..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/HashingMethods.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: f72b7476a69b89147a08603d7391218a -timeCreated: 1504709534 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/MD4.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/MD4.cs deleted file mode 100644 index 26d3e6cf..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/MD4.cs +++ /dev/null @@ -1,206 +0,0 @@ -using System; -using System.Security.Cryptography; - -/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All - rights reserved. - - License to copy and use this software is granted provided that it - is identified as the "RSA Data Security, Inc. MD4 Message-Digest - Algorithm" in all material mentioning or referencing this software - or this function. - - License is also granted to make and use derivative works provided - that such works are identified as "derived from the RSA Data - Security, Inc. MD4 Message-Digest Algorithm" in all material - mentioning or referencing the derived work. - - RSA Data Security, Inc. makes no representations concerning either - the merchantability of this software or the suitability of this - software for any particular purpose. It is provided "as is" - without express or implied warranty of any kind. - - These notices must be retained in any copies of any part of this - documentation and/or software. - */ - -/* Converted to C# by Ryan Caltabiano for Unity Technologies */ - -namespace UnityEditor.Build.Pipeline.Utilities -{ - public sealed class MD4 : HashAlgorithm - { - uint[] m_Buffer; - uint[] m_Block; - uint m_Bytes; - - static readonly byte[] kPadding = { - 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 - }; - - MD4() - { - Initialize(); - } - - public new static MD4 Create() - { - return new MD4(); - } - - public override void Initialize() - { - m_Buffer = new uint[] - { - 0x67452301, - 0xefcdab89, - 0x98badcfe, - 0x10325476 - }; - - m_Block = new uint[16]; - m_Bytes = 0; - } - - protected override void HashCore(byte[] array, int ibStart, int cbSize) - { - if (array == null) - throw new ArgumentNullException("array"); - - for (var i = 0; i < cbSize; i++) - { - var b = array[ibStart + i]; - var c = m_Bytes & 63; - var k = c >> 2; - var s = (c & 3) << 3; - m_Block[k] = (m_Block[k] & ~((uint)255 << (int)s)) | ((uint)b << (int)s); - - if (c == 63) - ProcessBlock(); - - m_Bytes++; - } - } - - protected override byte[] HashFinal() - { - var bytes = BitConverter.GetBytes(m_Bytes << 3); - - var length = ((m_Bytes + 8) & 0x7fffffc0) + 56 - m_Bytes; - HashCore(kPadding, 0, (int)length); - HashCore(bytes, 0, 4); - HashCore(kPadding, kPadding.Length - 4, 4); - - var output = new byte[16]; - output[0] = (byte)(m_Buffer[0] & 0xff); - output[1] = (byte)((m_Buffer[0] >> 8) & 0xff); - output[2] = (byte)((m_Buffer[0] >> 16) & 0xff); - output[3] = (byte)((m_Buffer[0] >> 24) & 0xff); - output[4] = (byte)(m_Buffer[1] & 0xff); - output[5] = (byte)((m_Buffer[1] >> 8) & 0xff); - output[6] = (byte)((m_Buffer[1] >> 16) & 0xff); - output[7] = (byte)((m_Buffer[1] >> 24) & 0xff); - output[8] = (byte)(m_Buffer[2] & 0xff); - output[9] = (byte)((m_Buffer[2] >> 8) & 0xff); - output[10] = (byte)((m_Buffer[2] >> 16) & 0xff); - output[11] = (byte)((m_Buffer[2] >> 24) & 0xff); - output[12] = (byte)(m_Buffer[3] & 0xff); - output[13] = (byte)((m_Buffer[3] >> 8) & 0xff); - output[14] = (byte)((m_Buffer[3] >> 16) & 0xff); - output[15] = (byte)((m_Buffer[3] >> 24) & 0xff); - return output; - } - - void ProcessBlock() - { - var buffer = new uint[4]; - Array.Copy(m_Buffer, buffer, 4); - - /* Round 1 */ - buffer[0] = RotateLeft(buffer[0] + F(buffer[1], buffer[2], buffer[3]) + m_Block[0], 3); - buffer[3] = RotateLeft(buffer[3] + F(buffer[0], buffer[1], buffer[2]) + m_Block[1], 7); - buffer[2] = RotateLeft(buffer[2] + F(buffer[3], buffer[0], buffer[1]) + m_Block[2], 11); - buffer[1] = RotateLeft(buffer[1] + F(buffer[2], buffer[3], buffer[0]) + m_Block[3], 19); - buffer[0] = RotateLeft(buffer[0] + F(buffer[1], buffer[2], buffer[3]) + m_Block[4], 3); - buffer[3] = RotateLeft(buffer[3] + F(buffer[0], buffer[1], buffer[2]) + m_Block[5], 7); - buffer[2] = RotateLeft(buffer[2] + F(buffer[3], buffer[0], buffer[1]) + m_Block[6], 11); - buffer[1] = RotateLeft(buffer[1] + F(buffer[2], buffer[3], buffer[0]) + m_Block[7], 19); - buffer[0] = RotateLeft(buffer[0] + F(buffer[1], buffer[2], buffer[3]) + m_Block[8], 3); - buffer[3] = RotateLeft(buffer[3] + F(buffer[0], buffer[1], buffer[2]) + m_Block[9], 7); - buffer[2] = RotateLeft(buffer[2] + F(buffer[3], buffer[0], buffer[1]) + m_Block[10], 11); - buffer[1] = RotateLeft(buffer[1] + F(buffer[2], buffer[3], buffer[0]) + m_Block[11], 19); - buffer[0] = RotateLeft(buffer[0] + F(buffer[1], buffer[2], buffer[3]) + m_Block[12], 3); - buffer[3] = RotateLeft(buffer[3] + F(buffer[0], buffer[1], buffer[2]) + m_Block[13], 7); - buffer[2] = RotateLeft(buffer[2] + F(buffer[3], buffer[0], buffer[1]) + m_Block[14], 11); - buffer[1] = RotateLeft(buffer[1] + F(buffer[2], buffer[3], buffer[0]) + m_Block[15], 19); - - /* Round 2 */ - buffer[0] = RotateLeft(buffer[0] + G(buffer[1], buffer[2], buffer[3]) + m_Block[0] + 0x5A827999, 3); - buffer[3] = RotateLeft(buffer[3] + G(buffer[0], buffer[1], buffer[2]) + m_Block[4] + 0x5A827999, 5); - buffer[2] = RotateLeft(buffer[2] + G(buffer[3], buffer[0], buffer[1]) + m_Block[8] + 0x5A827999, 9); - buffer[1] = RotateLeft(buffer[1] + G(buffer[2], buffer[3], buffer[0]) + m_Block[12] + 0x5A827999, 13); - buffer[0] = RotateLeft(buffer[0] + G(buffer[1], buffer[2], buffer[3]) + m_Block[1] + 0x5A827999, 3); - buffer[3] = RotateLeft(buffer[3] + G(buffer[0], buffer[1], buffer[2]) + m_Block[5] + 0x5A827999, 5); - buffer[2] = RotateLeft(buffer[2] + G(buffer[3], buffer[0], buffer[1]) + m_Block[9] + 0x5A827999, 9); - buffer[1] = RotateLeft(buffer[1] + G(buffer[2], buffer[3], buffer[0]) + m_Block[13] + 0x5A827999, 13); - buffer[0] = RotateLeft(buffer[0] + G(buffer[1], buffer[2], buffer[3]) + m_Block[2] + 0x5A827999, 3); - buffer[3] = RotateLeft(buffer[3] + G(buffer[0], buffer[1], buffer[2]) + m_Block[6] + 0x5A827999, 5); - buffer[2] = RotateLeft(buffer[2] + G(buffer[3], buffer[0], buffer[1]) + m_Block[10] + 0x5A827999, 9); - buffer[1] = RotateLeft(buffer[1] + G(buffer[2], buffer[3], buffer[0]) + m_Block[14] + 0x5A827999, 13); - buffer[0] = RotateLeft(buffer[0] + G(buffer[1], buffer[2], buffer[3]) + m_Block[3] + 0x5A827999, 3); - buffer[3] = RotateLeft(buffer[3] + G(buffer[0], buffer[1], buffer[2]) + m_Block[7] + 0x5A827999, 5); - buffer[2] = RotateLeft(buffer[2] + G(buffer[3], buffer[0], buffer[1]) + m_Block[11] + 0x5A827999, 9); - buffer[1] = RotateLeft(buffer[1] + G(buffer[2], buffer[3], buffer[0]) + m_Block[15] + 0x5A827999, 13); - - /* Round 3 */ - buffer[0] = RotateLeft(buffer[0] + H(buffer[1], buffer[2], buffer[3]) + m_Block[0] + 0x6ED9EBA1, 3); - buffer[3] = RotateLeft(buffer[3] + H(buffer[0], buffer[1], buffer[2]) + m_Block[8] + 0x6ED9EBA1, 9); - buffer[2] = RotateLeft(buffer[2] + H(buffer[3], buffer[0], buffer[1]) + m_Block[4] + 0x6ED9EBA1, 11); - buffer[1] = RotateLeft(buffer[1] + H(buffer[2], buffer[3], buffer[0]) + m_Block[12] + 0x6ED9EBA1, 15); - buffer[0] = RotateLeft(buffer[0] + H(buffer[1], buffer[2], buffer[3]) + m_Block[2] + 0x6ED9EBA1, 3); - buffer[3] = RotateLeft(buffer[3] + H(buffer[0], buffer[1], buffer[2]) + m_Block[10] + 0x6ED9EBA1, 9); - buffer[2] = RotateLeft(buffer[2] + H(buffer[3], buffer[0], buffer[1]) + m_Block[6] + 0x6ED9EBA1, 11); - buffer[1] = RotateLeft(buffer[1] + H(buffer[2], buffer[3], buffer[0]) + m_Block[14] + 0x6ED9EBA1, 15); - buffer[0] = RotateLeft(buffer[0] + H(buffer[1], buffer[2], buffer[3]) + m_Block[1] + 0x6ED9EBA1, 3); - buffer[3] = RotateLeft(buffer[3] + H(buffer[0], buffer[1], buffer[2]) + m_Block[9] + 0x6ED9EBA1, 9); - buffer[2] = RotateLeft(buffer[2] + H(buffer[3], buffer[0], buffer[1]) + m_Block[5] + 0x6ED9EBA1, 11); - buffer[1] = RotateLeft(buffer[1] + H(buffer[2], buffer[3], buffer[0]) + m_Block[13] + 0x6ED9EBA1, 15); - buffer[0] = RotateLeft(buffer[0] + H(buffer[1], buffer[2], buffer[3]) + m_Block[3] + 0x6ED9EBA1, 3); - buffer[3] = RotateLeft(buffer[3] + H(buffer[0], buffer[1], buffer[2]) + m_Block[11] + 0x6ED9EBA1, 9); - buffer[2] = RotateLeft(buffer[2] + H(buffer[3], buffer[0], buffer[1]) + m_Block[7] + 0x6ED9EBA1, 11); - buffer[1] = RotateLeft(buffer[1] + H(buffer[2], buffer[3], buffer[0]) + m_Block[15] + 0x6ED9EBA1, 15); - - unchecked - { - m_Buffer[0] += buffer[0]; - m_Buffer[1] += buffer[1]; - m_Buffer[2] += buffer[2]; - m_Buffer[3] += buffer[3]; - } - } - - static uint F(uint x, uint y, uint z) - { - // XY v not(X) Z - return (x & y) | (~x & z); - } - - static uint G(uint x, uint y, uint z) - { - // XY v XZ v YZ - return (x & y) | (x & z) | (y & z); - } - - static uint H(uint x, uint y, uint z) - { - // X XOR Y XOR Z - return x ^ y ^ z; - } - - static uint RotateLeft(uint x, uint n) - { - return (x << (int)n) | (x >> (32 - (int)n)); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/MD4.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/MD4.cs.meta deleted file mode 100644 index c013516a..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/MD4.cs.meta +++ /dev/null @@ -1,13 +0,0 @@ -fileFormatVersion: 2 -guid: 3d01c0faeb539534689fe05bc369751e -timeCreated: 1504709533 -licenseType: Pro -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/ProgressLoggingTracker.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/ProgressLoggingTracker.cs deleted file mode 100644 index 2cafaa42..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/ProgressLoggingTracker.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; - -namespace UnityEditor.Build.Pipeline.Utilities -{ - public class ProgressLoggingTracker : ProgressTracker - { - public ProgressLoggingTracker() - { - BuildLogger.Log(string.Format("[{0}] Progress Tracker Started.", DateTime.Now.ToString())); - } - - public override bool UpdateTask(string taskTitle) - { - BuildLogger.Log(string.Format("[{0}] {1:P2} Running Task: '{2}'", DateTime.Now.ToString(), Progress.ToString(), taskTitle)); - return base.UpdateTask(taskTitle); - } - - public override bool UpdateInfo(string taskInfo) - { - BuildLogger.Log(string.Format("[{0}] {1:P2} Running Task: '{2}' Information: '{3}'", DateTime.Now.ToString(), Progress.ToString(), CurrentTaskTitle, taskInfo)); - return base.UpdateInfo(taskInfo); - } - - protected override void Dispose(bool disposing) - { - BuildLogger.Log(string.Format("[{0}] Progress Tracker Completed.", DateTime.Now.ToString())); - base.Dispose(disposing); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/ProgressLoggingTracker.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/ProgressLoggingTracker.cs.meta deleted file mode 100644 index cd52d3e9..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/ProgressLoggingTracker.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fdaf4f8f6845474a8b19554240f1e8ed -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/ProgressTracker.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/ProgressTracker.cs deleted file mode 100644 index 8c20cd7d..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/ProgressTracker.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using UnityEditor.Build.Pipeline.Interfaces; - -namespace UnityEditor.Build.Pipeline.Utilities -{ - public class ProgressTracker : IProgressTracker, IDisposable - { - const long k_TicksPerSecond = 10000000; - - public int TaskCount { get; set; } - - public float Progress { get { return CurrentTask / (float)TaskCount; } } - - public uint UpdatesPerSecond - { - get { return (uint)(k_TicksPerSecond / UpdateFrequency); } - set { UpdateFrequency = k_TicksPerSecond / Math.Max(value, 1); } - } - - bool m_Disposed = false; - - protected int CurrentTask { get; set; } - - protected string CurrentTaskTitle { get; set; } - - protected long TimeStamp { get; set; } - - protected long UpdateFrequency { get; set; } - - public ProgressTracker() - { - CurrentTask = 0; - CurrentTaskTitle = ""; - TimeStamp = 0; - UpdateFrequency = k_TicksPerSecond / 100; - } - - public virtual bool UpdateTask(string taskTitle) - { - CurrentTask++; - CurrentTaskTitle = taskTitle; - TimeStamp = 0; - return !EditorUtility.DisplayCancelableProgressBar(CurrentTaskTitle, "", Progress); - } - - public virtual bool UpdateInfo(string taskInfo) - { - var currentTicks = DateTime.Now.Ticks; - if (currentTicks - TimeStamp < UpdateFrequency) - return true; - - TimeStamp = currentTicks; - return !EditorUtility.DisplayCancelableProgressBar(CurrentTaskTitle, taskInfo, Progress); - } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (m_Disposed) - return; - - if (disposing) - EditorUtility.ClearProgressBar(); - - m_Disposed = true; - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/ProgressTracker.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/ProgressTracker.cs.meta deleted file mode 100644 index 383b563a..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/ProgressTracker.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 02d56b860c3f05a47a85e63f62578654 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/SceneStateCleanup.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/SceneStateCleanup.cs deleted file mode 100644 index b0ecdabf..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/SceneStateCleanup.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using UnityEditor.Build.Pipeline.Utilities; -using UnityEditor.SceneManagement; -using System.Linq; - -namespace UnityEditor.Build.Utilities -{ - public class SceneStateCleanup : IDisposable - { - SceneSetup[] m_Scenes; - - bool m_Disposed; - - public SceneStateCleanup() - { - m_Scenes = EditorSceneManager.GetSceneManagerSetup(); - } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - protected virtual void Dispose(bool disposing) - { - if (m_Disposed) - return; - - m_Disposed = true; - - if (disposing) - { - // Test runner injects scenes, so we strip those here - var scenes = m_Scenes.Where(s => !string.IsNullOrEmpty(s.path)).ToArray(); - if (!scenes.IsNullOrEmpty()) - EditorSceneManager.RestoreSceneManagerSetup(scenes); - else - EditorSceneManager.NewScene(NewSceneSetup.DefaultGameObjects); - } - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/SceneStateCleanup.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/SceneStateCleanup.cs.meta deleted file mode 100644 index 71258101..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/SceneStateCleanup.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9ba75fbd280d0c849b9b6a53db5056ac -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/TrackerExtensions.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/TrackerExtensions.cs deleted file mode 100644 index 4596b9e3..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/TrackerExtensions.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Text.RegularExpressions; -using UnityEditor.Build.Pipeline.Interfaces; - -namespace UnityEditor.Build.Pipeline.Utilities -{ - public static class TrackerExtensions - { - public static string HumanReadable(this string camelCased) - { - return Regex.Replace(camelCased, @"(\B[A-Z]+?(?=[A-Z][^A-Z])|\B[A-Z]+?(?=[^A-Z]))", " $1"); - } - - public static bool UpdateTaskUnchecked(this IProgressTracker tracker, string taskTitle) - { - return tracker == null || tracker.UpdateTask(taskTitle); - } - - public static bool UpdateInfoUnchecked(this IProgressTracker tracker, string taskInfo) - { - return tracker == null || tracker.UpdateInfo(taskInfo); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/TrackerExtensions.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/TrackerExtensions.cs.meta deleted file mode 100644 index cd1052da..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/TrackerExtensions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cc721af777e8101459b9a2ea31544b01 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/ValidationMethods.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/ValidationMethods.cs deleted file mode 100644 index c219f11a..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/ValidationMethods.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using System.Linq; -using UnityEditor.SceneManagement; - -namespace UnityEditor.Build.Pipeline.Utilities -{ - static class ValidationMethods - { - public enum Status - { - Invalid, - Asset, - Scene - } - - public static Status ValidAsset(GUID asset) - { - var path = AssetDatabase.GUIDToAssetPath(asset.ToString()); - if (string.IsNullOrEmpty(path) || !File.Exists(path)) - return Status.Invalid; - - if (path.EndsWith(".unity")) - return Status.Scene; - - return Status.Asset; - } - - public static bool ValidSceneBundle(List assets) - { - return assets.All(x => ValidAsset(x) == Status.Scene); - } - - public static bool ValidAssetBundle(List assets) - { - return assets.All(x => ValidAsset(x) == Status.Asset); - } - - public static bool HasDirtyScenes() - { - var unsavedChanges = false; - var sceneCount = EditorSceneManager.sceneCount; - for (var i = 0; i < sceneCount; ++i) - { - var scene = EditorSceneManager.GetSceneAt(i); - if (!scene.isDirty) - continue; - unsavedChanges = true; - break; - } - - return unsavedChanges; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/ValidationMethods.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/ValidationMethods.cs.meta deleted file mode 100644 index c2b4f88a..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/Utilities/ValidationMethods.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f2a640ae477de17469deed96101db8c5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes.meta deleted file mode 100644 index a3ea5185..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 560595c1147a03c47af5bcc7410963c0 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/AssetBundleWriteOperation.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/AssetBundleWriteOperation.cs deleted file mode 100644 index 9f5bcfad..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/AssetBundleWriteOperation.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Utilities; -using UnityEngine; - -namespace UnityEditor.Build.Pipeline.WriteTypes -{ - /// - /// Explicit implementation for writing a serialized file that can be used with the Asset Bundle systems. - /// - [Serializable] - public class AssetBundleWriteOperation : IWriteOperation - { - /// - public WriteCommand Command { get; set; } - /// - public BuildUsageTagSet UsageSet { get; set; } - /// - public BuildReferenceMap ReferenceMap { get; set; } - - /// - /// Information needed for generating the Asset Bundle object to be included in the serialized file. - /// - /// - public AssetBundleInfo Info { get; set; } - - /// - public WriteResult Write(string outputFolder, BuildSettings settings, BuildUsageTagGlobal globalUsage) - { -#if UNITY_2019_3_OR_NEWER - return ContentBuildInterface.WriteSerializedFile(outputFolder, new WriteParameters - { - writeCommand = Command, - settings = settings, - globalUsage = globalUsage, - usageSet = UsageSet, - referenceMap = ReferenceMap, - bundleInfo = Info - }); -#else - return ContentBuildInterface.WriteSerializedFile(outputFolder, Command, settings, globalUsage, UsageSet, ReferenceMap, Info); -#endif - } - - /// - public Hash128 GetHash128() - { - return HashingMethods.Calculate(Command, UsageSet.GetHash128(), ReferenceMap.GetHash128(), Info).ToHash128(); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/AssetBundleWriteOperation.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/AssetBundleWriteOperation.cs.meta deleted file mode 100644 index ce51d35d..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/AssetBundleWriteOperation.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5ec22ea32817fe444823d42d0c4e0024 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/RawWriteOperation.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/RawWriteOperation.cs deleted file mode 100644 index 1f02f01f..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/RawWriteOperation.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Utilities; -using UnityEngine; - -namespace UnityEditor.Build.Pipeline.WriteTypes -{ - /// - /// Explicit implementation for writing a serialized file that can be used with the upcoming raw loading systems. - /// - [Serializable] - public class RawWriteOperation : IWriteOperation - { - /// - public WriteCommand Command { get; set; } - /// - public BuildUsageTagSet UsageSet { get; set; } - /// - public BuildReferenceMap ReferenceMap { get; set; } - - /// - public WriteResult Write(string outputFolder, BuildSettings settings, BuildUsageTagGlobal globalUsage) - { -#if UNITY_2019_3_OR_NEWER - return ContentBuildInterface.WriteSerializedFile(outputFolder, new WriteParameters - { - writeCommand = Command, - settings = settings, - globalUsage = globalUsage, - usageSet = UsageSet, - referenceMap = ReferenceMap - }); -#else - return ContentBuildInterface.WriteSerializedFile(outputFolder, Command, settings, globalUsage, UsageSet, ReferenceMap); -#endif - } - - /// - public Hash128 GetHash128() - { - return HashingMethods.Calculate(Command, UsageSet.GetHash128(), ReferenceMap.GetHash128()).ToHash128(); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/RawWriteOperation.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/RawWriteOperation.cs.meta deleted file mode 100644 index bc1f5ee0..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/RawWriteOperation.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: aee1195813efc3b45b3173443338b2c3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/SceneBundleWriteOperation.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/SceneBundleWriteOperation.cs deleted file mode 100644 index b3daff49..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/SceneBundleWriteOperation.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Utilities; -using UnityEngine; - -namespace UnityEditor.Build.Pipeline.WriteTypes -{ - /// - /// Explicit implementation for writing a scene serialized file that can be used with the Asset Bundle systems. - /// - [Serializable] - public class SceneBundleWriteOperation : IWriteOperation - { - /// - public WriteCommand Command { get; set; } - /// - public BuildUsageTagSet UsageSet { get; set; } - /// - public BuildReferenceMap ReferenceMap { get; set; } - - /// - /// Source scene asset path - /// - public string Scene { get; set; } - - /// - /// Processed scene path returned by the ProcessScene API. - /// - /// -#if UNITY_2019_3_OR_NEWER - [Obsolete("ProcessedScene has been deprecated.")] -#endif - public string ProcessedScene { get; set; } - - /// - /// Information needed for scene preloadeding. - /// - /// - public PreloadInfo PreloadInfo { get; set; } - - /// - /// Information needed for generating the Asset Bundle object to be included in the serialized file. - /// - /// - public SceneBundleInfo Info { get; set; } - - /// - public WriteResult Write(string outputFolder, BuildSettings settings, BuildUsageTagGlobal globalUsage) - { -#if UNITY_2019_3_OR_NEWER - return ContentBuildInterface.WriteSceneSerializedFile(outputFolder, new WriteSceneParameters - { - scenePath = Scene, - writeCommand = Command, - settings = settings, - globalUsage = globalUsage, - usageSet = UsageSet, - referenceMap = ReferenceMap, - preloadInfo = PreloadInfo, - sceneBundleInfo = Info - }); -#else - return ContentBuildInterface.WriteSceneSerializedFile(outputFolder, Scene, ProcessedScene, Command, settings, globalUsage, UsageSet, ReferenceMap, PreloadInfo, Info); -#endif - } - - /// - public Hash128 GetHash128() - { -#if UNITY_2019_3_OR_NEWER - return HashingMethods.Calculate(Command, UsageSet.GetHash128(), ReferenceMap.GetHash128(), Scene, PreloadInfo, Info).ToHash128(); -#else - var processedSceneHash = HashingMethods.CalculateFile(ProcessedScene).ToHash128(); - return HashingMethods.Calculate(Command, UsageSet.GetHash128(), ReferenceMap.GetHash128(), Scene, processedSceneHash, PreloadInfo, Info).ToHash128(); -#endif - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/SceneBundleWriteOperation.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/SceneBundleWriteOperation.cs.meta deleted file mode 100644 index 78375b89..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/SceneBundleWriteOperation.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 242d63556dd92c346a8d3a24fa55d25b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/SceneDataWriteOperation.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/SceneDataWriteOperation.cs deleted file mode 100644 index f6293186..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/SceneDataWriteOperation.cs +++ /dev/null @@ -1,72 +0,0 @@ -using System; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Utilities; -using UnityEngine; - -namespace UnityEditor.Build.Pipeline.WriteTypes -{ - /// - /// Explicit implementation for writing a scene serialized file that can be used with the player data systems. - /// - [Serializable] - public class SceneDataWriteOperation : IWriteOperation - { - /// - public WriteCommand Command { get; set; } - /// - public BuildUsageTagSet UsageSet { get; set; } - /// - public BuildReferenceMap ReferenceMap { get; set; } - - /// - /// Source scene asset path - /// - public string Scene { get; set; } - - /// - /// Processed scene path returned by the ProcessScene API. - /// - /// -#if UNITY_2019_3_OR_NEWER - [Obsolete("ProcessedScene has been deprecated.")] -#endif - public string ProcessedScene { get; set; } - - /// - /// Information needed for scene preloadeding. - /// - /// - public PreloadInfo PreloadInfo { get; set; } - - /// - public WriteResult Write(string outputFolder, BuildSettings settings, BuildUsageTagGlobal globalUsage) - { -#if UNITY_2019_3_OR_NEWER - return ContentBuildInterface.WriteSceneSerializedFile(outputFolder, new WriteSceneParameters - { - scenePath = Scene, - writeCommand = Command, - settings = settings, - globalUsage = globalUsage, - usageSet = UsageSet, - referenceMap = ReferenceMap, - preloadInfo = PreloadInfo - }); -#else - return ContentBuildInterface.WriteSceneSerializedFile(outputFolder, Scene, ProcessedScene, Command, settings, globalUsage, UsageSet, ReferenceMap, PreloadInfo); -#endif - } - - /// - public Hash128 GetHash128() - { -#if UNITY_2019_3_OR_NEWER - return HashingMethods.Calculate(Command, UsageSet.GetHash128(), ReferenceMap.GetHash128(), Scene, PreloadInfo).ToHash128(); -#else - var processedSceneHash = HashingMethods.CalculateFile(ProcessedScene).ToHash128(); - return HashingMethods.Calculate(Command, UsageSet.GetHash128(), ReferenceMap.GetHash128(), Scene, processedSceneHash, PreloadInfo).ToHash128(); -#endif - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/SceneDataWriteOperation.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/SceneDataWriteOperation.cs.meta deleted file mode 100644 index 18ea1c01..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/SceneDataWriteOperation.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d2fe9d7a258944946a57628f3e9de498 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/SceneRawWriteOperation.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/SceneRawWriteOperation.cs deleted file mode 100644 index 44912b14..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/SceneRawWriteOperation.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Utilities; -using UnityEngine; - -namespace UnityEditor.Build.Pipeline.WriteTypes -{ - /// - /// Explicit implementation for writing a scene serialized file that can be used with the upcoming raw loading systems. - /// - [Serializable] - public class SceneRawWriteOperation : IWriteOperation - { - /// - public WriteCommand Command { get; set; } - /// - public BuildUsageTagSet UsageSet { get; set; } - /// - public BuildReferenceMap ReferenceMap { get; set; } - - /// - /// Source scene asset path - /// - public string Scene { get; set; } - - /// - /// Processed scene path returned by the ProcessScene API. - /// - /// -#if UNITY_2019_3_OR_NEWER - [Obsolete("ProcessedScene has been deprecated.")] -#endif - public string ProcessedScene { get; set; } - - /// - public WriteResult Write(string outputFolder, BuildSettings settings, BuildUsageTagGlobal globalUsage) - { -#if UNITY_2019_3_OR_NEWER - return ContentBuildInterface.WriteSceneSerializedFile(outputFolder, new WriteSceneParameters - { - scenePath = Scene, - writeCommand = Command, - settings = settings, - globalUsage = globalUsage, - usageSet = UsageSet, - referenceMap = ReferenceMap - }); -#else - return ContentBuildInterface.WriteSceneSerializedFile(outputFolder, Scene, ProcessedScene, Command, settings, globalUsage, UsageSet, ReferenceMap); -#endif - } - - /// - public Hash128 GetHash128() - { -#if UNITY_2019_3_OR_NEWER - return HashingMethods.Calculate(Command, UsageSet.GetHash128(), ReferenceMap.GetHash128(), Scene).ToHash128(); -#else - var processedSceneHash = HashingMethods.CalculateFile(ProcessedScene).ToHash128(); - return HashingMethods.Calculate(Command, UsageSet.GetHash128(), ReferenceMap.GetHash128(), Scene, processedSceneHash).ToHash128(); -#endif - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/SceneRawWriteOperation.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/SceneRawWriteOperation.cs.meta deleted file mode 100644 index d88bf2ae..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Editor/WriteTypes/SceneRawWriteOperation.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b95096aeec814934caf102c7159c6585 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/README.md b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/README.md deleted file mode 100644 index fc782f45..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Unity Asset Bundle Build Pipeline -Coming soon. diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/README.md.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/README.md.meta deleted file mode 100644 index 12bf74a2..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/README.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: d683a20b1b4bb4b409b2d642100e0f6c -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Runtime.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Runtime.meta deleted file mode 100644 index 69a6c335..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Runtime.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: dfb88b91599701840970930f261b8843 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Runtime/CompatibilityAssetBundleManifest.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Runtime/CompatibilityAssetBundleManifest.cs deleted file mode 100644 index 74c4df02..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Runtime/CompatibilityAssetBundleManifest.cs +++ /dev/null @@ -1,117 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace UnityEngine.Build.Pipeline -{ - [Serializable] - public class CompatibilityAssetBundleManifest : ScriptableObject, ISerializationCallbackReceiver - { - Dictionary m_Details; - - [SerializeField] - List m_Keys; - - [SerializeField] - List m_Values; - - public void SetResults(Dictionary results) - { - m_Details = new Dictionary(results); - } - - public string[] GetAllAssetBundles() - { - string[] bundles = m_Details.Keys.ToArray(); - Array.Sort(bundles); - return bundles; - } - - public string[] GetAllAssetBundlesWithVariant() - { - return new string[0]; - } - - public Hash128 GetAssetBundleHash(string assetBundleName) - { - BundleDetails details; - if (m_Details.TryGetValue(assetBundleName, out details)) - return details.Hash; - return new Hash128(); - } - - public uint GetAssetBundleCrc(string assetBundleName) - { - BundleDetails details; - if (m_Details.TryGetValue(assetBundleName, out details)) - return details.Crc; - return 0; - } - - public string[] GetDirectDependencies(string assetBundleName) - { - return GetAllDependencies(assetBundleName); - } - - public string[] GetAllDependencies(string assetBundleName) - { - BundleDetails details; - if (m_Details.TryGetValue(assetBundleName, out details)) - return details.Dependencies.ToArray(); - return new string[0]; - } - - public override string ToString() - { - StringBuilder builder = new StringBuilder(); - builder.Append("ManifestFileVersion: 1\n"); - builder.Append("CompatibilityAssetBundleManifest:\n"); - - if (m_Details != null && m_Details.Count > 0) - { - builder.Append(" AssetBundleInfos:\n"); - int infoCount = 0; - foreach (var details in m_Details) - { - builder.AppendFormat(" Info_{0}:\n", infoCount++); - builder.AppendFormat(" Name: {0}\n", details.Key); - builder.AppendFormat(" Hash: {0}\n", details.Value.Hash); - builder.AppendFormat(" CRC: {0}\n", details.Value.Crc); - int dependencyCount = 0; - if (details.Value.Dependencies != null && details.Value.Dependencies.Length > 0) - { - builder.Append(" Dependencies: {}\n"); - foreach (var dependency in details.Value.Dependencies) - builder.AppendFormat(" Dependency_{0}: {1}\n", dependencyCount++, dependency); - } - else - builder.Append(" Dependencies: {}\n"); - } - } - else - builder.Append(" AssetBundleInfos: {}\n"); - - return builder.ToString(); - } - - public void OnBeforeSerialize() - { - m_Keys = new List(); - m_Values = new List(); - - foreach (var pair in m_Details) - { - m_Keys.Add(pair.Key); - m_Values.Add(pair.Value); - } - } - - public void OnAfterDeserialize() - { - m_Details = new Dictionary(); - for (int i = 0; i != Math.Min(m_Keys.Count, m_Values.Count); i++) - m_Details.Add(m_Keys[i], m_Values[i]); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Runtime/CompatibilityAssetBundleManifest.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Runtime/CompatibilityAssetBundleManifest.cs.meta deleted file mode 100644 index 052d3b41..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Runtime/CompatibilityAssetBundleManifest.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 31aaa31a24f444640bde087a4bd59d51 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Runtime/Shared.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Runtime/Shared.meta deleted file mode 100644 index 1784d388..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Runtime/Shared.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 5585298bf0833b040b458ff94f911fd9 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Runtime/Shared/BundleDetails.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Runtime/Shared/BundleDetails.cs deleted file mode 100644 index b74c515d..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Runtime/Shared/BundleDetails.cs +++ /dev/null @@ -1,95 +0,0 @@ -using System; - -namespace UnityEngine.Build.Pipeline -{ - /// - /// Struct containing detailed information about a built asset bundle - /// - [Serializable] - public struct BundleDetails : IEquatable - { - [SerializeField] - string m_FileName; - - [SerializeField] - uint m_Crc; - - [SerializeField] - Hash128 m_Hash; - - [SerializeField] - string[] m_Dependencies; - - /// - /// Specific file name on disk of the asset bundle. - /// - public string FileName - { - get { return m_FileName; } - set { m_FileName = value; } - } - - /// - /// Cyclic redundancy check of the content contained inside of the asset bundle. - /// This value will not change between identical asset bundles with different compression options. - /// - public uint Crc - { - get { return m_Crc; } - set { m_Crc = value; } - } - - /// - /// The hash version of the content contained inside of the asset bundle. - /// This value will not change between identical asset bundles with different compression options. - /// - public Hash128 Hash - { - get { return m_Hash; } - set { m_Hash = value; } - } - - /// - /// The array of all dependent asset bundles for this asset bundle. - /// - public string[] Dependencies - { - get { return m_Dependencies; } - set { m_Dependencies = value; } - } - - public override bool Equals(object obj) - { - if (ReferenceEquals(null, obj)) - return false; - return obj is BundleDetails && Equals((BundleDetails)obj); - } - - public override int GetHashCode() - { - unchecked - { - var hashCode = (FileName != null ? FileName.GetHashCode() : 0); - hashCode = (hashCode * 397) ^ (int)Crc; - hashCode = (hashCode * 397) ^ Hash.GetHashCode(); - hashCode = (hashCode * 397) ^ (Dependencies != null ? Dependencies.GetHashCode() : 0); - return hashCode; - } - } - - public static bool operator ==(BundleDetails a, BundleDetails b) - { - return a.Equals(b); - } - - public static bool operator !=(BundleDetails a, BundleDetails b) - { - return !(a == b); - } - - public bool Equals(BundleDetails other) - { - return string.Equals(FileName, other.FileName) && Crc == other.Crc && Hash.Equals(other.Hash) && Equals(Dependencies, other.Dependencies); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Runtime/Shared/BundleDetails.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Runtime/Shared/BundleDetails.cs.meta deleted file mode 100644 index a6154cfc..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Runtime/Shared/BundleDetails.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bbb71bee805aca34a84943ae76051c5d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Runtime/Unity.ScriptableBuildPipeline.asmdef b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Runtime/Unity.ScriptableBuildPipeline.asmdef deleted file mode 100644 index 8a7cc6f1..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Runtime/Unity.ScriptableBuildPipeline.asmdef +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name": "Unity.ScriptableBuildPipeline" -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Runtime/Unity.ScriptableBuildPipeline.asmdef.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Runtime/Unity.ScriptableBuildPipeline.asmdef.meta deleted file mode 100644 index 8f937b05..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Runtime/Unity.ScriptableBuildPipeline.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 5c1ff9bd975acec488150743d53a93ca -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests.meta deleted file mode 100644 index f3271b29..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d62ab3f6f7d317849b5f962b9d036f08 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor.meta deleted file mode 100644 index ee234ee5..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d759189bc3e47411985027b7cb98f986 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/BuildCacheTestBase.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/BuildCacheTestBase.cs deleted file mode 100644 index 01a3e469..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/BuildCacheTestBase.cs +++ /dev/null @@ -1,403 +0,0 @@ -using System; -using NUnit.Framework; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using UnityEditor.Build.Pipeline.Utilities; -using UnityEngine; - -namespace UnityEditor.Build.Pipeline.Tests -{ - [TestFixture] - abstract internal class BuildCacheTestBase - { - protected const string kBuildCacheTestPath = "Assets/BuildCacheTestAssets"; - - protected string kTestFile1 - { - get { return Path.Combine(kBuildCacheTestPath, "testfile1.txt"); } - } - - protected string kUncachedTestFilename - { - get { return Path.Combine(kBuildCacheTestPath, "uncached.txt"); } - } - - protected string kTempAssetFilename - { - get { return Path.Combine(kBuildCacheTestPath, "temporary.txt"); } - } - - protected GUID TestFile1GUID - { - get { return new GUID(AssetDatabase.AssetPathToGUID(kTestFile1)); } - } - - protected GUID UncachedGUID - { - get { return new GUID(AssetDatabase.AssetPathToGUID(kUncachedTestFilename)); } - } - - protected GUID TempAssetGUID - { - get { return new GUID(AssetDatabase.AssetPathToGUID(kTempAssetFilename)); } - } - - protected BuildCache m_Cache; - - internal virtual void OneTimeSetupDerived() { } - internal virtual void OneTimeTearDownDerived() { } - internal virtual void SetupDerived() { } - internal virtual void TeardownDerived() { } - - [OneTimeSetUp] - public void OneTimeSetUp() - { - Directory.CreateDirectory(kBuildCacheTestPath); - File.WriteAllText(kTestFile1, "t1"); - File.WriteAllText(kUncachedTestFilename, "uncached"); - File.WriteAllText(kTempAssetFilename, "delete me"); - AssetDatabase.Refresh(); - OneTimeSetupDerived(); - } - - [OneTimeTearDown] - public void OneTimeTearDown() - { - Directory.Delete(kBuildCacheTestPath, true); - File.Delete(kBuildCacheTestPath + ".meta"); - AssetDatabase.Refresh(); - OneTimeTearDownDerived(); - } - - [SetUp] - public void Setup() - { - PurgeBuildCache(); - RecreateBuildCache(); - SetupDerived(); - } - - [TearDown] - public void TearDown() - { - if (m_Cache != null) - { - m_Cache.Dispose(); - m_Cache = null; - } - TeardownDerived(); - } - - protected virtual void RecreateBuildCache() - { - if (m_Cache != null) - { - m_Cache.Dispose(); - m_Cache = null; - } - m_Cache = new BuildCache(); - } - - protected virtual void PurgeBuildCache() - { - if (m_Cache != null) - m_Cache.SyncPendingSaves(); - BuildCache.PurgeCache(false); - } - - static protected CachedInfo LoadCachedInfoForGUID(BuildCache cache, GUID guid) - { - IList infos; - CacheEntry entry1 = cache.GetCacheEntry(guid); - cache.LoadCachedData(new List() { entry1 }, out infos); - return infos[0]; - } - - static protected void StoreDataInCacheWithGUID(BuildCache cache, GUID guid, object data, GUID depGUID = new GUID()) - { - List deps = new List(); - if (!depGUID.Empty()) - deps.Add(cache.GetCacheEntry(depGUID)); - - CacheEntry entry1 = cache.GetCacheEntry(guid); - CachedInfo info = new CachedInfo(); - info.Asset = entry1; - info.Dependencies = deps.ToArray(); - info.Data = new object[] { data }; - cache.SaveCachedData(new List() { info }); - cache.SyncPendingSaves(); - } - - static protected GUID CreateTestTextAsset(string contents) - { - string filename; - return CreateTestTextAsset(contents, out filename); - } - - static protected GUID CreateTestTextAsset(string contents, out string filename) - { - int fileIndex = 0; - while (true) - { - filename = Path.Combine(kBuildCacheTestPath, "testasset" + fileIndex); - if (!File.Exists(filename)) - { - File.WriteAllText(filename, contents); - AssetDatabase.Refresh(); - return new GUID(AssetDatabase.AssetPathToGUID(filename)); - } - - fileIndex++; - } - } - - static protected void ModifyTestTextAsset(GUID guid, string text) - { - string filename = AssetDatabase.GUIDToAssetPath(guid.ToString()); - File.WriteAllText(filename, text); - AssetDatabase.ImportAsset(filename); - } - - [Test] - public void WhenLoadingCachedDataForGUIDWithModifiedDependency_CachedInfoIsNull() - { - GUID depGuid = CreateTestTextAsset("mytext"); - StoreDataInCacheWithGUID(m_Cache, TestFile1GUID, "data", depGuid); - ModifyTestTextAsset(depGuid, "mytext2"); - RecreateBuildCache(); - CachedInfo info = LoadCachedInfoForGUID(m_Cache, TestFile1GUID); - Assert.IsNull(info); - } - - [Test] - public void WhenLoadingCachedDataForModifiedGUID_CachedInfoIsNull() - { - GUID guid = CreateTestTextAsset("mytext"); - StoreDataInCacheWithGUID(m_Cache, guid, "data"); - ModifyTestTextAsset(guid, "mytext2"); - RecreateBuildCache(); - CachedInfo info = LoadCachedInfoForGUID(m_Cache, guid); - Assert.IsNull(info); - } - - [Test] - public void WhenLoadingStoredCachedData_CachedInfoIsValid() - { - StoreDataInCacheWithGUID(m_Cache, TestFile1GUID, "data"); - RecreateBuildCache(); - CachedInfo info = LoadCachedInfoForGUID(m_Cache, TestFile1GUID); - Assert.AreEqual("data", (string)info.Data[0]); - } - - [Test] - public void WhenLoadingUncachedData_CachedInfoIsNull() - { - CachedInfo info = LoadCachedInfoForGUID(m_Cache, UncachedGUID); - Assert.IsNull(info); - } - - [Test] - public void WhenGlobalVersionChanges_OriginalCachedInfoDoesNotNeedRebuild() - { - m_Cache.OverrideGlobalHash(new Hash128(0, 1, 0, 0)); - - StoreDataInCacheWithGUID(m_Cache, TestFile1GUID, "data"); - CachedInfo info1 = LoadCachedInfoForGUID(m_Cache, TestFile1GUID); - - RecreateBuildCache(); - m_Cache.OverrideGlobalHash(new Hash128(0, 2, 0, 0)); - CachedInfo info2 = LoadCachedInfoForGUID(m_Cache, TestFile1GUID); - - Assert.IsFalse(m_Cache.HasAssetOrDependencyChanged(info1)); // original info still doesn't need rebuild. Required for content update - Assert.IsNull(info2); // however the data cannot be recovered - } - - [Test] - public void WhenLocalVersionChanges_AssetReturnsDifferentCacheEntry() - { - GUID guid = CreateTestTextAsset("mytext"); - - var entry1 = m_Cache.GetCacheEntry(guid, 2); - var entry2 = m_Cache.GetCacheEntry(guid, 4); - - Assert.AreEqual(entry1.Guid, entry2.Guid); - Assert.AreEqual(entry1.File, entry2.File); - Assert.AreEqual(entry1.Type, entry2.Type); - Assert.AreNotEqual(entry1.Version, entry2.Version); - Assert.AreNotEqual(entry1.Hash, entry2.Hash); - } - - [Test] - public void WhenLocalVersionChanges_FileReturnsDifferentCacheEntry() - { - string filename; - CreateTestTextAsset("mytext", out filename); - - var entry1 = m_Cache.GetCacheEntry(filename, 2); - var entry2 = m_Cache.GetCacheEntry(filename, 4); - - Assert.AreEqual(entry1.Guid, entry2.Guid); - Assert.AreEqual(entry1.File, entry2.File); - Assert.AreEqual(entry1.Type, entry2.Type); - Assert.AreNotEqual(entry1.Version, entry2.Version); - Assert.AreNotEqual(entry1.Hash, entry2.Hash); - } - - [Test] - public void GetUpdatedCacheEntry_ReturnsCacheEntryWithSameVersionAndHash_IfAssetHasNotChanged() - { - GUID guid = CreateTestTextAsset("mytext"); - - var entry1 = m_Cache.GetCacheEntry(guid, 2); - m_Cache.ClearCacheEntryMaps(); - var entry2 = m_Cache.GetUpdatedCacheEntry(entry1); - - Assert.AreEqual(entry1.Guid, entry2.Guid); - Assert.AreEqual(entry1.File, entry2.File); - Assert.AreEqual(entry1.Type, entry2.Type); - Assert.AreEqual(entry1.Version, entry2.Version); - Assert.AreEqual(entry1.Hash, entry2.Hash); - } - - [Test] - public void GetUpdatedCacheEntry_ReturnsCacheEntryWithSameVersionAndHash_IfFileHasNotChanged() - { - string filename; - CreateTestTextAsset("mytext", out filename); - - var entry1 = m_Cache.GetCacheEntry(filename, 2); - m_Cache.ClearCacheEntryMaps(); - var entry2 = m_Cache.GetUpdatedCacheEntry(entry1); - - Assert.AreEqual(entry1.Guid, entry2.Guid); - Assert.AreEqual(entry1.File, entry2.File); - Assert.AreEqual(entry1.Type, entry2.Type); - Assert.AreEqual(entry1.Version, entry2.Version); - Assert.AreEqual(entry1.Hash, entry2.Hash); - } - - [Test] - public void GetCacheEntry_InvalidPath_ReturnsInvalidCacheEntry() - { - var entry = m_Cache.GetCacheEntry("this/path/does/not/exist"); - Assert.IsFalse(entry.IsValid()); - } - - [Test] - public void GetCacheEntry_InvalidGUID_ReturnsInvalidCacheEntry() - { - var entry = m_Cache.GetCacheEntry(new GUID("00000000000000000000000000000000")); - Assert.IsFalse(entry.IsValid()); - } - - [Test] - public void GetCacheEntry_FormerValidPathAndGUID_ReturnsInvalidCacheEntry() - { - var tempAssetGUID = TempAssetGUID; - - var entry1 = m_Cache.GetCacheEntry(kTempAssetFilename); - var entry2 = m_Cache.GetCacheEntry(tempAssetGUID); - Assert.IsTrue(entry1.IsValid()); - Assert.IsTrue(entry2.IsValid()); - - File.Delete(kTempAssetFilename); - AssetDatabase.Refresh(); - m_Cache.ClearCacheEntryMaps(); - - entry1 = m_Cache.GetCacheEntry(kTempAssetFilename); - entry2 = m_Cache.GetCacheEntry(tempAssetGUID); - Assert.IsFalse(entry1.IsValid()); - Assert.IsFalse(entry2.IsValid()); - } - - [Test] - public void GetCacheEntry_PathForAsset_ReturnsAssetBasedCacheEntry() - { - var entry1 = m_Cache.GetCacheEntry(kTestFile1); - var entry2 = m_Cache.GetCacheEntry(TestFile1GUID); - - Assert.IsTrue(entry1.Type == CacheEntry.EntryType.Asset); - Assert.AreEqual(entry2, entry1); - } - - [Test] - public void GetCachedInfoFile_IsInside_GetCachedArtifactsDirectory() - { - var entry = m_Cache.GetCacheEntry(kTestFile1); - var infoFile = m_Cache.GetCachedInfoFile(entry); - var artifactsDirectory = m_Cache.GetCachedArtifactsDirectory(entry); - - StringAssert.Contains(artifactsDirectory, infoFile); - } - - void WriteRandomFile(string fileName, int sizeInMB) - { - byte[] data = new byte[sizeInMB * 1024 * 1024]; - var rng = new System.Random(); - rng.NextBytes(data); - File.WriteAllBytes(fileName, data); - } - - void PopulateCache(out int filesWritten, out string[] artifactsDirectories) - { - var entries = new[] - { - m_Cache.GetCacheEntry(kTestFile1), - m_Cache.GetCacheEntry(kUncachedTestFilename) - }; - artifactsDirectories = new[] - { - Path.GetFullPath(m_Cache.GetCachedArtifactsDirectory(entries[0])), - Path.GetFullPath(m_Cache.GetCachedArtifactsDirectory(entries[1])) - }; - - // Setup cache - filesWritten = 0; - foreach (var directory in artifactsDirectories) - { - Directory.CreateDirectory(directory); - for (int i = 0; i < 2; i++) - { - WriteRandomFile($"{directory}/cachefile_{i}.bytes", 2); - filesWritten++; - } - } - } - - [Test] - public void PruneCache_ComputeCacheSizeAndFolders_ReturnsCorrectSizeAndFolders() - { - PopulateCache(out int filesWritten, out string[] artifactsDirectories); - - BuildCache.ComputeCacheSizeAndFolders(out long currentCacheSize, out List cacheFolders); - //filesWritten * 2mb each * 1024 to kb * 1024 to b - Assert.AreEqual(filesWritten * 2 * 1024 * 1024, currentCacheSize); - Assert.AreEqual(artifactsDirectories.Length, cacheFolders.Count); - var folders = cacheFolders.Select(x => x.directory.FullName); - CollectionAssert.AreEquivalent(artifactsDirectories, folders); - } - - [Test] - public void PruneCache_PruneCacheFolders_WillRemoveOldestFolders() - { - PopulateCache(out int filesWritten, out string[] artifactsDirectories); - BuildCache.ComputeCacheSizeAndFolders(out long currentCacheSize, out List cacheFolders); - - // Set folder older - var folder = cacheFolders[0]; - folder.LastAccessTimeUtc = folder.LastAccessTimeUtc.Subtract(new TimeSpan(1, 0, 0)); - cacheFolders[0] = folder; - - // delete just under the first folder size - long maximumCacheSize = currentCacheSize - folder.Length + 1; - BuildCache.PruneCacheFolders(maximumCacheSize, currentCacheSize, cacheFolders); - BuildCache.ComputeCacheSizeAndFolders(out long newCurrentCacheSize, out List newCacheFolders); - - Assert.AreNotEqual(0, newCurrentCacheSize); - Assert.GreaterOrEqual(maximumCacheSize, newCurrentCacheSize); - Assert.AreEqual(artifactsDirectories.Length - 1, newCacheFolders.Count); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/BuildCacheTestBase.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/BuildCacheTestBase.cs.meta deleted file mode 100644 index 7924414e..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/BuildCacheTestBase.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cd396e02e0371554e9bfc4ebb8035318 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer.meta deleted file mode 100644 index b197abcf..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c655781b9e2c70945bf8e3f232c54d6e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/ByteArrayStream.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/ByteArrayStream.cs deleted file mode 100644 index bc3bf012..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/ByteArrayStream.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System; -using System.Diagnostics; -using System.IO; -using System.Security.Cryptography; - -namespace UnityEditor.CacheServerTests -{ - internal class ByteArrayStream : Stream - { - private int m_pos; - - public override bool CanRead - { - get { return true; } - } - - public override bool CanSeek - { - get { return true; } - } - - public override bool CanWrite - { - get { return true; } - } - - public override long Length - { - get { return BackingBuffer.Length; } - } - - public override long Position - { - get { return m_pos; } - set - { - m_pos = Math.Min((int) value, BackingBuffer.Length - 1); - Debug.Assert(m_pos >= 0); - } - } - - public byte[] BackingBuffer { get; private set; } - - public ByteArrayStream(long size) - { - BackingBuffer = new byte[size]; - RandomNumberGenerator.Create().GetBytes(BackingBuffer); - } - - public override void SetLength(long value){} - public override void Flush(){} - - public override void Write(byte[] buffer, int offset, int count) - { - Debug.Assert(count <= BackingBuffer.Length - m_pos); // can't write past out buffer length - count = Math.Min(count, buffer.Length - offset); // Don't read past the input buffer length - Buffer.BlockCopy(buffer, offset, BackingBuffer, m_pos, count); - m_pos += count; - } - - public override int Read(byte[] buffer, int offset, int count) - { - count = Math.Min(count, BackingBuffer.Length - m_pos); // Don't copy more bytes than we have - count = Math.Min(count, buffer.Length - offset); // Don't overrun the destination buffer - Buffer.BlockCopy(BackingBuffer, m_pos, buffer, offset, count); - m_pos += count; - return count; - } - - public override long Seek(long offset, SeekOrigin origin) - { - switch (origin) - { - case SeekOrigin.Begin: - Position = (int) offset; - break; - - case SeekOrigin.Current: - Position += (int) offset; - break; - case SeekOrigin.End: - Position = BackingBuffer.Length - (int) offset - 1; - break; - default: - throw new ArgumentOutOfRangeException("origin", origin, null); - } - - return Position; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/ByteArrayStream.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/ByteArrayStream.cs.meta deleted file mode 100644 index 6386a97c..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/ByteArrayStream.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8cce051c0b60040d68cd27a80e58f787 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/LocalCacheServer.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/LocalCacheServer.cs deleted file mode 100644 index 49024d16..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/LocalCacheServer.cs +++ /dev/null @@ -1,133 +0,0 @@ -using System; -using System.Diagnostics; -using System.IO; -using System.Net; -using System.Net.Sockets; -using UnityEditor; -using UnityEngine; - -namespace UnityEditor.CacheServerTests -{ - internal class LocalCacheServer : ScriptableSingleton - { - [SerializeField] public string m_path; - [SerializeField] public int m_port; - [SerializeField] public int m_pid = -1; - - private void Create(int port, ulong size, string cachePath) - { - var nodeExecutable = Utils.Paths.Combine(EditorApplication.applicationContentsPath, "Tools", "nodejs"); - nodeExecutable = Application.platform == RuntimePlatform.WindowsEditor - ? Utils.Paths.Combine(nodeExecutable, "node.exe") - : Utils.Paths.Combine(nodeExecutable, "bin", "node"); - - if (!Directory.Exists(cachePath)) - Directory.CreateDirectory(cachePath); - - m_path = cachePath; - - var cacheServerJs = Utils.Paths.Combine(EditorApplication.applicationContentsPath, "Tools", "CacheServer", "main.js"); - var processStartInfo = new ProcessStartInfo(nodeExecutable) - { - Arguments = "\"" + cacheServerJs + "\"" - + " --port " + port - + " --path \"" + m_path - + "\" --nolegacy" - + " --monitor-parent-process " + Process.GetCurrentProcess().Id - // node.js has issues running on windows with stdout not redirected. - // so we silence logging to avoid that. And also to avoid CacheServer - // spamming the editor logs on OS X. - + " --silent" - + " --size " + size, - UseShellExecute = false, - CreateNoWindow = true - }; - - var p = new Process {StartInfo = processStartInfo}; - p.Start(); - - m_port = port; - m_pid = p.Id; - Save(true); - } - - public static string CachePath - { - get { return instance.m_path; } - } - - public static int Port - { - get { return instance.m_port; } - } - - public static void Setup(ulong size, string cachePath) - { - Kill(); - instance.Create(GetRandomUnusedPort(), size, cachePath); - WaitForServerToComeAlive(instance.m_port); - } - - public static void Kill() - { - if (instance.m_pid == -1) - return; - - try - { - var p = Process.GetProcessById(instance.m_pid); - p.Kill(); - instance.m_pid = -1; - } - catch - { - // if we could not get a process, there is non alive. continue. - } - } - - public static void Clear() - { - Kill(); - if (Directory.Exists(instance.m_path)) - Directory.Delete(instance.m_path, true); - } - - private static void WaitForServerToComeAlive(int port) - { - var start = DateTime.Now; - var maximum = start.AddSeconds(5); - while (DateTime.Now < maximum) - { - if (!PingHost("localhost", port, 10)) continue; - Console.WriteLine("Server Came alive after {0} ms", (DateTime.Now - start).TotalMilliseconds); - break; - } - } - - private static int GetRandomUnusedPort() - { - var listener = new TcpListener(IPAddress.Any, 0); - listener.Start(); - var port = ((IPEndPoint)listener.LocalEndpoint).Port; - listener.Stop(); - return port; - } - - private static bool PingHost(string host, int port, int timeout) - { - try - { - using (var client = new TcpClient()) - { - var result = client.BeginConnect(host, port, null, null); - result.AsyncWaitHandle.WaitOne(TimeSpan.FromMilliseconds(timeout)); - return client.Connected; - } - } - catch - { - return false; - } - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/LocalCacheServer.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/LocalCacheServer.cs.meta deleted file mode 100644 index e8651777..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/LocalCacheServer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1b623084ee8eb4b9199e34858add3cac -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/TestDownloadItem.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/TestDownloadItem.cs deleted file mode 100644 index f9e831d5..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/TestDownloadItem.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.IO; -using UnityEditor.Build.CacheServer; - -namespace UnityEditor.CacheServerTests -{ - internal class TestDownloadItem : IDownloadItem - { - private ByteArrayStream m_writeStream; - - public FileId Id { get; private set; } - public FileType Type { get; private set; } - - public void Finish(){} - public byte[] Bytes - { - get { return m_writeStream.BackingBuffer; } - } - - public Stream GetWriteStream(long size) - { - return m_writeStream ?? (m_writeStream = new ByteArrayStream(size)); - } - - public TestDownloadItem(FileId fileId, FileType fileType) - { - Id = fileId; - Type = fileType; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/TestDownloadItem.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/TestDownloadItem.cs.meta deleted file mode 100644 index af53e974..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/TestDownloadItem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b734b613791eb4b0381013f84745a995 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/Tests.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/Tests.cs deleted file mode 100644 index 4698dcb2..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/Tests.cs +++ /dev/null @@ -1,330 +0,0 @@ -using System; -using System.IO; -using System.Threading; -using NUnit.Framework; -using UnityEditor.Build.CacheServer; -using UnityEngine; -using Random = System.Random; - -namespace UnityEditor.CacheServerTests -{ - [TestFixture] - public class Tests - { - private const string KTestHost = "127.0.0.1"; - private const string KInvalidTestHost = "192.0.2.1"; - private Random rand; - - private static int TestPort - { - get { return LocalCacheServer.Port; } - } - - private FileId GenerateFileId() - { - if(rand == null) - rand = new Random(); - var guid = new byte[16]; - var hash = new byte[16]; - rand.NextBytes(guid); - rand.NextBytes(hash); - return FileId.From(guid, hash); - } - - [OneTimeSetUp] - public void BeforeAll() - { - var cachePath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); - LocalCacheServer.Setup(1024 * 1024, cachePath); - rand = new Random(); - } - - [OneTimeTearDown] - public void AfterAll() - { - LocalCacheServer.Clear(); - } - - [Test] - public void FileDownloadItem() - { - var fileId = GenerateFileId(); - var readStream = new ByteArrayStream(128 * 1024); - - var client = new Client(KTestHost, TestPort); - client.Connect(); - - client.BeginTransaction(fileId); - client.Upload(FileType.Asset, readStream); - client.EndTransaction(); - Thread.Sleep(50); // give the server a little time to finish the transaction - - var targetFile = Path.GetTempFileName(); - var downloadItem = new FileDownloadItem(fileId, FileType.Asset, targetFile); - - var mre = new ManualResetEvent(false); - Exception err = null; - client.DownloadFinished += (sender, args) => - { - try - { - Assert.AreEqual(DownloadResult.Success, args.Result); - Assert.AreEqual(args.DownloadItem.Id, fileId); - Assert.IsTrue(File.Exists(targetFile)); - - var fileBytes = File.ReadAllBytes(targetFile); - Assert.IsTrue(Util.ByteArraysAreEqual(readStream.BackingBuffer, fileBytes)); - } - catch (Exception e) - { - err = e; - } - finally - { - if(File.Exists(targetFile)) - File.Delete(targetFile); - - mre.Set(); - } - }; - - client.QueueDownload(downloadItem); - Assert.IsTrue(mre.WaitOne(2000)); - - if (err != null) - throw err; - } - - [Test] - public void Connect() - { - var client = new Client(KTestHost, TestPort); - client.Connect(); - client.Close(); - } - - [Test] - public void ConnectTimeout() - { - var client = new Client(KInvalidTestHost, TestPort); - TimeoutException err = null; - try - { - client.Connect(0); - } - catch (TimeoutException e) - { - err = e; - } - finally - { - client.Close(); - Debug.Assert(err != null); - } - } - - [Test] - public void TransactionIsolation() - { - var fileId = GenerateFileId(); - var readStream = new ByteArrayStream(16 * 1024); - - var client = new Client(KTestHost, TestPort); - client.Connect(); - - Assert.Throws(() => client.Upload(FileType.Asset, readStream)); - Assert.Throws(() => client.EndTransaction()); - - // Back-to-back begin transactions are allowed - client.BeginTransaction(fileId); - Assert.DoesNotThrow(() => client.BeginTransaction(fileId)); - } - - [Test] - public void UploadDownloadOne() - { - var fileId = GenerateFileId(); - var readStream = new ByteArrayStream(16 * 1024); - - var client = new Client(KTestHost, TestPort); - client.Connect(); - - client.BeginTransaction(fileId); - client.Upload(FileType.Asset, readStream); - client.EndTransaction(); - Thread.Sleep(50); // give the server a little time to finish the transaction - - var downloadItem = new TestDownloadItem(fileId, FileType.Asset); - - client.QueueDownload(downloadItem); - - Exception err = null; - var mre = new ManualResetEvent(false); - client.DownloadFinished += (sender, args) => - { - try - { - Assert.AreEqual(0, args.DownloadQueueLength); - Assert.AreEqual(DownloadResult.Success, args.Result); - Assert.AreEqual(fileId, args.DownloadItem.Id); - } - catch (Exception e) - { - err = e; - } - finally - { - mre.Set(); - } - }; - - Assert.IsTrue(mre.WaitOne(2000)); - - if (err != null) - throw err; - - Assert.IsTrue(Util.ByteArraysAreEqual(readStream.BackingBuffer, downloadItem.Bytes)); - } - - [Test] - public void DownloadMany() - { - const int fileCount = 5; - - var fileIds = new FileId[fileCount]; - var fileStreams = new ByteArrayStream[fileCount]; - - var client = new Client(KTestHost, TestPort); - client.Connect(); - - // Upload files - var rand = new Random(); - for (var i = 0; i < fileCount; i++) - { - fileIds[i] = GenerateFileId(); - fileStreams[i] = new ByteArrayStream(rand.Next(64 * 1024, 128 * 1024)); - - client.BeginTransaction(fileIds[i]); - client.Upload(FileType.Asset, fileStreams[i]); - client.EndTransaction(); - } - - Thread.Sleep(50); - - // Download - var receivedCount = 0; - Exception err = null; - var mre = new ManualResetEvent(false); - client.DownloadFinished += (sender, args) => - { - try - { - Assert.AreEqual(args.Result, DownloadResult.Success); - Assert.AreEqual(args.DownloadItem.Id, fileIds[receivedCount]); - - var downloadItem = (TestDownloadItem) args.DownloadItem; - Assert.IsTrue(Util.ByteArraysAreEqual(fileStreams[receivedCount].BackingBuffer, downloadItem.Bytes)); - - receivedCount++; - Assert.AreEqual(fileCount - receivedCount, args.DownloadQueueLength); - } - catch (Exception e) - { - err = e; - } - finally - { - if(err != null || receivedCount == fileCount) - mre.Set(); - } - }; - - for (var i = 0; i < fileCount; i++) - client.QueueDownload(new TestDownloadItem(fileIds[i], FileType.Asset)); - - Assert.AreEqual(fileCount, client.DownloadQueueLength); - - Assert.IsTrue(mre.WaitOne(2000)); - - if (err != null) - throw err; - - Assert.AreEqual(fileCount, receivedCount); - } - - [Test] - public void DonwloadFileNotFound() - { - var client = new Client(KTestHost, TestPort); - client.Connect(); - - var fileId = FileId.From(new byte[16], new byte[16]); - - var mre = new ManualResetEvent(false); - var downloadItem = new TestDownloadItem(fileId, FileType.Asset); - - client.QueueDownload(downloadItem); - - Exception err = null; - - client.DownloadFinished += (sender, args) => - { - try - { - Assert.AreEqual(args.Result, DownloadResult.FileNotFound); - Assert.AreEqual(args.DownloadItem.Id, fileId); - } - catch (Exception e) - { - err = e; - } - finally - { - mre.Set(); - } - }; - - mre.WaitOne(500); - - if (err != null) - throw err; - } - - [Test] - public void ResetDownloadFinishedEventHandler() - { - var fileId = GenerateFileId(); - var readStream = new ByteArrayStream(16 * 1024); - - var client = new Client(KTestHost, TestPort); - client.Connect(); - - client.BeginTransaction(fileId); - client.Upload(FileType.Asset, readStream); - client.EndTransaction(); - Thread.Sleep(50); - - var downloadItem = new TestDownloadItem(fileId, FileType.Asset); - - // Add two listeners that will assert if called - client.DownloadFinished += (sender, args) => { Debug.Assert(false); }; - client.DownloadFinished += (sender, args) => { Debug.Assert(false); }; - - // Clear the listeners so they will not be called - client.ResetDownloadFinishedEventHandler(); - - client.QueueDownload(downloadItem); - - var mre = new ManualResetEvent(false); - ThreadPool.QueueUserWorkItem(state => - { - while (client.DownloadQueueLength > 0) - Thread.Sleep(0); - - mre.Set(); - }); - - Assert.IsTrue(mre.WaitOne(2000)); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/Tests.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/Tests.cs.meta deleted file mode 100644 index 8f32f2bc..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/Tests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 012e8bc53e96d4c638db9f5b04ef84de -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/UnityEditor.CacheServerTests.asmdef b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/UnityEditor.CacheServerTests.asmdef deleted file mode 100644 index e7f075dc..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/UnityEditor.CacheServerTests.asmdef +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "UnityEditor.CacheServerTests", - "references": [ - "UnityEditor.CacheServer" - ], - "includePlatforms": [ - "Editor" - ], - "optionalUnityReferences": [ - "TestAssemblies" - ], - "excludePlatforms": [], - "allowUnsafeCode": false -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/UnityEditor.CacheServerTests.asmdef.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/UnityEditor.CacheServerTests.asmdef.meta deleted file mode 100644 index 8bee10cb..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/UnityEditor.CacheServerTests.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: de0adf19d0a2a46a19acaa82fcb5a988 -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/Utils.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/Utils.cs deleted file mode 100644 index b3633d44..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/Utils.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.IO; - -namespace UnityEditor.CacheServerTests -{ - public static class Utils - { - public static class Paths - { - public static string Combine(params string[] components) - { - if (components.Length < 1) - throw new ArgumentException("At least one component must be provided!"); - - var path1 = components[0]; - - for (var index = 1; index < components.Length; ++index) - path1 = Path.Combine(path1, components[index]); - - return path1; - } - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/Utils.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/Utils.cs.meta deleted file mode 100644 index 0d1a80c5..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServer/Utils.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 493e67a6e86284a8681aab6f10d05c34 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServerBuildCacheTests.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServerBuildCacheTests.cs deleted file mode 100644 index 9723261a..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServerBuildCacheTests.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.IO; -using UnityEditor.Build.Pipeline.Utilities; - -namespace UnityEditor.Build.Pipeline.Tests -{ - // Test suite against Build Cache with Cache Server backend, tests are implemented in BuildCacheTestBase - class CacheServerBuildCacheTests : BuildCacheTestBase - { - internal override void OneTimeSetupDerived() - { - var cachePath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); - LocalCacheServer.Setup(1024 * 1024, cachePath); - } - - internal override void OneTimeTearDownDerived() - { - LocalCacheServer.Clear(); - } - - protected override void RecreateBuildCache() - { - // purge the local cache to make sure we don't load anything out of it again. - // these tests need to pull from the cache server - if (m_Cache != null) - m_Cache.Dispose(); - PurgeBuildCache(); - m_Cache = new BuildCache("localhost", LocalCacheServer.instance.m_port); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServerBuildCacheTests.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServerBuildCacheTests.cs.meta deleted file mode 100644 index b0e95760..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/CacheServerBuildCacheTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cde708facb1abd24cb7b42fedf436309 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/ContextInjectionTests.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/ContextInjectionTests.cs deleted file mode 100644 index 8b2adf7f..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/ContextInjectionTests.cs +++ /dev/null @@ -1,162 +0,0 @@ -using System; -using NUnit.Framework; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Injector; - -namespace UnityEditor.Build.Pipeline.Tests -{ - [TestFixture] - class ContextInjectionTests - { - interface IInjectionContext : IContextObject - { - int State { get; set; } - } - - class InjectionClass : IInjectionContext - { - public int State { get; set; } - } - - struct InjectionStruct : IInjectionContext - { - public int State { get; set; } - } - - struct TaskStruct : IBuildTask - { - public int Version { get { return 1; } } - public int NewState { get; private set; } - -#pragma warning disable 649 - [InjectContext] - internal IInjectionContext InjectedObject; -#pragma warning restore 649 - - public TaskStruct(int newState) - : this() - { - NewState = newState; - } - - public ReturnCode Run() - { - InjectedObject.State = NewState; - return ReturnCode.Success; - } - } - - class TaskClass : IBuildTask - { - public int Version { get { return 1; } } - public int NewState { get; private set; } - -#pragma warning disable 649 - [InjectContext] - internal IInjectionContext InjectedObject; -#pragma warning restore 649 - - public TaskClass(int newState) - { - NewState = newState; - } - - public ReturnCode Run() - { - InjectedObject.State = NewState; - return ReturnCode.Success; - } - } - - class TaskContext : IBuildTask - { - public int Version { get { return 1; } } - -#pragma warning disable 649 - [InjectContext] - internal IBuildContext InjectedContext; -#pragma warning restore 649 - - public ReturnCode Run() - { - return ReturnCode.Success; - } - } - - - [Test] - public void CanInjectAndExtractWithStructs() - { - IInjectionContext injection = new InjectionStruct(); - injection.State = 1; - - IBuildContext context = new BuildContext(); - context.SetContextObject(injection); - - TaskStruct task = new TaskStruct(2); - Assert.IsNull(task.InjectedObject); - - // Still need to box / unbox the struct task - IBuildTask boxed = task; - ContextInjector.Inject(context, boxed); - task = (TaskStruct)boxed; - - Assert.IsNotNull(task.InjectedObject); - Assert.AreEqual(1, task.InjectedObject.State); - - ReturnCode result = task.Run(); - Assert.AreEqual(ReturnCode.Success, result); - - ContextInjector.Extract(context, task); - - IInjectionContext modifiedInjection = context.GetContextObject(); - Assert.AreEqual(task.NewState, modifiedInjection.State); - } - - - [Test] - public void CanInjectAndExtractWithClasses() - { - IInjectionContext injection = new InjectionClass(); - injection.State = 1; - - IBuildContext context = new BuildContext(); - context.SetContextObject(injection); - - TaskClass task = new TaskClass(2); - Assert.IsNull(task.InjectedObject); - - ContextInjector.Inject(context, task); - - Assert.IsNotNull(task.InjectedObject); - Assert.AreEqual(1, task.InjectedObject.State); - - ReturnCode result = task.Run(); - Assert.AreEqual(ReturnCode.Success, result); - - ContextInjector.Extract(context, task); - - IInjectionContext modifiedInjection = context.GetContextObject(); - Assert.AreEqual(task.NewState, modifiedInjection.State); - } - - [Test] - public void CanInjectIBuildContextAsInOnly() - { - IBuildContext context = new BuildContext(); - - TaskContext task = new TaskContext(); - Assert.IsNull(task.InjectedContext); - - ContextInjector.Inject(context, task); - - Assert.IsNotNull(task.InjectedContext); - Assert.AreEqual(context, task.InjectedContext); - - Assert.Throws(() => - { - ContextInjector.Extract(context, task); - }); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/ContextInjectionTests.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/ContextInjectionTests.cs.meta deleted file mode 100644 index 4737a6df..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/ContextInjectionTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 288dd00735888d6419c1d6312c8a1d51 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/ContextObjectSerializationTests.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/ContextObjectSerializationTests.cs deleted file mode 100644 index 94121f7c..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/ContextObjectSerializationTests.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.IO; -using System.Linq; -using System.Runtime.Serialization.Formatters.Binary; -using NUnit.Framework; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Utilities; - -namespace UnityEditor.Build.Pipeline.Tests -{ - [TestFixture] - public class ContextObjectSerializationTests - { - public Type[] GetIContextObjectTypes() - { - var blacklist = new[] - { - typeof(BuildCallbacks), typeof(Unity5PackedIdentifiers), typeof(PrefabPackedIdentifiers), typeof(LinearPackedIdentifiers), typeof(BuildCache), - typeof(ProgressTracker), typeof(ProgressLoggingTracker) - }; - - var assembly = AppDomain.CurrentDomain.GetAssemblies().First(x => x.GetName().Name == "Unity.ScriptableBuildPipeline.Editor"); - return assembly.GetTypes().Where(x => typeof(IContextObject).IsAssignableFrom(x) && !x.IsInterface && !x.IsAbstract).Where(x => !blacklist.Contains(x)).ToArray(); - } - - [Test] - public void IContextObjects_SupportSerialization() - { - // This is just a generic catch all to ensure we properly setup C# serialization on IContextTypes - // More explicit tests should be written per type to validate proper serialization in / out - var types = GetIContextObjectTypes(); - foreach (var type in types) - IContextObject_SupportSerialization(type); - } - - static T SerializedAndDeserializeObject(T obj) - { - var formatter = new BinaryFormatter(); - using (var stream = new MemoryStream()) - { - formatter.Serialize(stream, obj); - stream.Position = 0; - var obj2 = (T)formatter.Deserialize(stream); - return obj2; - } - } - - static void IContextObject_SupportSerialization(Type type) - { - var instance1 = (IContextObject)Activator.CreateInstance(type, true); - var instance2 = SerializedAndDeserializeObject(instance1); - Assert.NotNull(instance2); - Assert.AreEqual(type, instance2.GetType()); - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/ContextObjectSerializationTests.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/ContextObjectSerializationTests.cs.meta deleted file mode 100644 index 511bcbab..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/ContextObjectSerializationTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fa12bf74f16f5e84f93111cdd55bf70b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/FileCompressorTests.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/FileCompressorTests.cs deleted file mode 100644 index a9618afb..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/FileCompressorTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System.IO; -using NUnit.Framework; -using UnityEditor.Build.Pipeline.Utilities; - -namespace UnityEditor.Build.Pipeline.Tests -{ - [TestFixture] - class FileCompressorTests - { - const string k_SourceDirectory = "Compressor"; - - static readonly string[] k_SourceFiles = { - "/File1.json", - "/Subdir/File2.json", - "\\File3.json", - "\\Subdir\\File4.json" - }; - - static string NormalizePath(string path) - { - return path.Replace("\\", "/"); - } - - [OneTimeSetUp] - public void OneTimeSetUp() - { - foreach (string file in k_SourceFiles) - { - var filePath = NormalizePath(k_SourceDirectory + file); - var dir = Path.GetDirectoryName(filePath); - Directory.CreateDirectory(dir); - File.WriteAllText(filePath, filePath); - } - } - - [OneTimeTearDown] - public void OneTimeTearDown() - { - Directory.Delete(k_SourceDirectory, true); - } - - [Test] - public void CompressAndDecompressCanHandleSubdirectories() - { - var targetDirectory = k_SourceDirectory + "2"; - var success = FileCompressor.Compress(k_SourceDirectory, "artifacts.sbpGz"); - Assert.IsTrue(success); - - success = FileCompressor.Decompress("artifacts.sbpGz", targetDirectory); - Assert.IsTrue(success); - - for (int i = 0; i < k_SourceFiles.Length; i++) - { - var sourcePath = NormalizePath(k_SourceDirectory + k_SourceFiles[i]); - var targetPath = NormalizePath(targetDirectory + k_SourceFiles[i]); - FileAssert.Exists(targetPath); - FileAssert.AreEqual(sourcePath, targetPath); - } - - File.Delete("artifacts.sbpGz"); - Directory.Delete(targetDirectory, true); - } - - [Test] - public void TrailingSlashDoesNotChangeResults() - { - var success = FileCompressor.Compress(k_SourceDirectory, "artifacts1.sbpGz"); - Assert.IsTrue(success); - - success = FileCompressor.Compress(k_SourceDirectory + "/", "artifacts2.sbpGz"); - Assert.IsTrue(success); - - FileAssert.AreEqual("artifacts1.sbpGz", "artifacts2.sbpGz"); - - File.Delete("artifacts1.sbpGz"); - File.Delete("artifacts2.sbpGz"); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/FileCompressorTests.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/FileCompressorTests.cs.meta deleted file mode 100644 index 4824651d..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/FileCompressorTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6d2f1f46c2a196649b1eb9cd319cc991 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/HashingMethodsTests.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/HashingMethodsTests.cs deleted file mode 100644 index c33cada3..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/HashingMethodsTests.cs +++ /dev/null @@ -1,121 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using NUnit.Framework; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Utilities; - -namespace UnityEditor.Build.Pipeline.Tests -{ - [TestFixture] - class HashingMethodsTests - { - [Test] - public void CSharpMD4GeneratesCppMD4IdenticalFileNames() - { - var sourceNames = new[] - { - "basic_sprite", - "audio", - "prefabs", - "shaderwithcollection", - "multi_sprite_packed" - }; - - var expectedNames = new[] - { - "a67a7313ceb7840411094318a4aa7055", - "d5ae2b5aa3edc0f73b4bb6b1ae125a53", - "6fee5e41c4939eed80f81beb3e5e6ebc", - "dc5d7d3a7d9efcf91a0314cdcc3af3c8", - "ddc8dcea83a5ff418d94c6a1623e81ad" - }; - - for (var i = 0; i < 5; i++) - Assert.AreEqual(expectedNames[i], HashingMethods.Calculate(sourceNames[i]).ToString()); - } - - [Test] - public void CSharpMD4GeneratesCppMD4IdenticalFileIDs() - { - Assert.AreEqual(-7588530676450950513, BitConverter.ToInt64(HashingMethods.Calculate("fb3a9882e5510684697de78116693750", FileType.MetaAssetType, (long)21300000).ToBytes(), 0)); - Assert.AreEqual(-8666180608703991793, BitConverter.ToInt64(HashingMethods.Calculate("library/atlascache/27/2799803afb660251e3b3049ba37cb15a", (long)2).ToBytes(), 0)); - } - - [Test] - public void HashingMethodsCanConsumeArrays() - { - var sourceNames = new[] - { - "basic_sprite", - "audio", - "prefabs", - "shaderwithcollection", - "multi_sprite_packed" - }; - - // Use cast so it doesn't automatically expand the array to params object[] objects - Assert.AreEqual("99944412d5093e431ba7ccdaf48f44f3", HashingMethods.Calculate((object)sourceNames).ToString()); - } - - [Test] - public void HashingMethodsCanConsumeLists() - { - var sourceNames = new List - { - "basic_sprite", - "audio", - "prefabs", - "shaderwithcollection", - "multi_sprite_packed" - }; - - Assert.AreEqual("99944412d5093e431ba7ccdaf48f44f3", HashingMethods.Calculate(sourceNames).ToString()); - } - - [Test] - public void HashingMethodsCanConsumeHashSet() - { - var sourceNames = new HashSet - { - "basic_sprite", - "audio", - "prefabs", - "shaderwithcollection", - "multi_sprite_packed" - }; - - Assert.AreEqual("99944412d5093e431ba7ccdaf48f44f3", HashingMethods.Calculate(sourceNames).ToString()); - } - - [Test] - public void HashingMethodsCanConsumeDictionaries() - { - var sourceNames = new Dictionary - { - { "basic_sprite", "audio" }, - { "prefabs", "shaderwithcollection" } - }; - - Assert.AreEqual("34392e04ec079d34cd861df956db2099", HashingMethods.Calculate(sourceNames).ToString()); - } - - [Test] - public void CalculateStreamCanUseOffsets() - { - byte[] bytes = { 0xe1, 0x43, 0x2f, 0x83, 0xdf, 0xeb, 0xa8, 0x86, 0xfb, 0xfe, 0xc9, 0x97, 0x20, 0xfb, 0x53, 0x45, - 0x24, 0x5d, 0x92, 0x8b, 0xa2, 0xc4, 0xe1, 0xe2, 0x48, 0x4a, 0xbb, 0x66, 0x43, 0x9a, 0xbc, 0x84 }; - - using (var stream = new MemoryStream(bytes)) - { - stream.Position = 16; - RawHash hash1 = HashingMethods.CalculateStream(stream); - - stream.Position = 0; - RawHash hash2 = HashingMethods.CalculateStream(stream); - - Assert.AreNotEqual(hash1.ToString(), hash2.ToString()); - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/HashingMethodsTests.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/HashingMethodsTests.cs.meta deleted file mode 100644 index f001563a..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/HashingMethodsTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d628170b66f4d154eb5dda6859439c32 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/LocalBuildCacheTests.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/LocalBuildCacheTests.cs deleted file mode 100644 index e558c8b3..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/LocalBuildCacheTests.cs +++ /dev/null @@ -1,10 +0,0 @@ -using NUnit.Framework; - -namespace UnityEditor.Build.Pipeline.Tests -{ - // Test suite against Build Cache, tests are implemented in BuildCacheTestBase - class LocalBuildCacheTests : BuildCacheTestBase - { - - }; -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/LocalBuildCacheTests.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/LocalBuildCacheTests.cs.meta deleted file mode 100644 index 649824e7..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/LocalBuildCacheTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3bf61af2f16576547894347350205854 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/LocalCacheServer.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/LocalCacheServer.cs deleted file mode 100644 index 2aceafc6..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/LocalCacheServer.cs +++ /dev/null @@ -1,146 +0,0 @@ -using System; -using System.Diagnostics; -using System.IO; -using System.Net; -using System.Net.Sockets; -using UnityEditor; -using UnityEngine; - -namespace UnityEditor.Build.Pipeline.Tests -{ - class LocalCacheServer : ScriptableSingleton - { - [SerializeField] public string m_path; - [SerializeField] public int m_port; - [SerializeField] public int m_pid = -1; - - public static string Combine(params string[] components) - { - if (components.Length < 1) - throw new ArgumentException("At least one component must be provided!"); - - var path1 = components[0]; - - for (var index = 1; index < components.Length; ++index) - path1 = Path.Combine(path1, components[index]); - - return path1; - } - - private void Create(int port, ulong size, string cachePath) - { - var nodeExecutable = Combine(EditorApplication.applicationContentsPath, "Tools", "nodejs"); - nodeExecutable = Application.platform == RuntimePlatform.WindowsEditor - ? Combine(nodeExecutable, "node.exe") - : Combine(nodeExecutable, "bin", "node"); - - if (!Directory.Exists(cachePath)) - Directory.CreateDirectory(cachePath); - - m_path = cachePath; - - var cacheServerJs = Combine(EditorApplication.applicationContentsPath, "Tools", "CacheServer", "main.js"); - var processStartInfo = new ProcessStartInfo(nodeExecutable) - { - Arguments = "\"" + cacheServerJs + "\"" - + " --port " + port - + " --path \"" + m_path - + "\" --nolegacy" - + " --monitor-parent-process " + Process.GetCurrentProcess().Id - // node.js has issues running on windows with stdout not redirected. - // so we silence logging to avoid that. And also to avoid CacheServer - // spamming the editor logs on OS X. - + " --silent" - + " --size " + size, - UseShellExecute = false, - CreateNoWindow = true - }; - - var p = new Process { StartInfo = processStartInfo }; - p.Start(); - - m_port = port; - m_pid = p.Id; - Save(true); - } - - public static string CachePath - { - get { return instance.m_path; } - } - - public static int Port - { - get { return instance.m_port; } - } - - public static void Setup(ulong size, string cachePath) - { - Kill(); - instance.Create(GetRandomUnusedPort(), size, cachePath); - WaitForServerToComeAlive(instance.m_port); - } - - public static void Kill() - { - if (instance.m_pid == -1) - return; - - try - { - var p = Process.GetProcessById(instance.m_pid); - p.Kill(); - instance.m_pid = -1; - } - catch - { - // if we could not get a process, there is non alive. continue. - } - } - - public static void Clear() - { - Kill(); - if (Directory.Exists(instance.m_path)) - Directory.Delete(instance.m_path, true); - } - - private static void WaitForServerToComeAlive(int port) - { - var start = DateTime.Now; - var maximum = start.AddSeconds(5); - while (DateTime.Now < maximum) - { - if (!PingHost("localhost", port, 10)) continue; - Console.WriteLine("Server Came alive after {0} ms", (DateTime.Now - start).TotalMilliseconds); - break; - } - } - - private static int GetRandomUnusedPort() - { - var listener = new TcpListener(IPAddress.Any, 0); - listener.Start(); - var port = ((IPEndPoint)listener.LocalEndpoint).Port; - listener.Stop(); - return port; - } - - private static bool PingHost(string host, int port, int timeout) - { - try - { - using (var client = new TcpClient()) - { - var result = client.BeginConnect(host, port, null, null); - result.AsyncWaitHandle.WaitOne(TimeSpan.FromMilliseconds(timeout)); - return client.Connected; - } - } - catch - { - return false; - } - } - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/LocalCacheServer.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/LocalCacheServer.cs.meta deleted file mode 100644 index f8324f88..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/LocalCacheServer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5b2102a42c1d8884989d74c98d4442b4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/ScriptableBuildPipelineTests.cs b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/ScriptableBuildPipelineTests.cs deleted file mode 100644 index f8be44a8..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/ScriptableBuildPipelineTests.cs +++ /dev/null @@ -1,308 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using NUnit.Framework; -using UnityEditor.Build.Content; -using UnityEditor.Build.Pipeline.Injector; -using UnityEditor.Build.Pipeline.Interfaces; -using UnityEditor.Build.Pipeline.Tasks; -using UnityEditor.Build.Pipeline.Utilities; -using UnityEditor.SceneManagement; -using UnityEngine; -using UnityEngine.Build.Pipeline; -using UnityEngine.SceneManagement; -using UnityEngine.TestTools; - -namespace UnityEditor.Build.Pipeline.Tests - -{ - [TestFixture] - - class ScriptableBuildPipelineTests - { - const string k_FolderPath = "Test"; - const string k_TmpPath = "tmp"; - - const string k_ScenePath = "Assets/testScene.unity"; - const string k_TestAssetsPath = "Assets/TestAssetsOnlyWillBeDeleted"; - const string k_CubePath = k_TestAssetsPath + "/Cube.prefab"; - - [OneTimeSetUp] - public void Setup() - { - EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo(); - Directory.CreateDirectory(k_TestAssetsPath); -#if UNITY_2018_3_OR_NEWER - PrefabUtility.SaveAsPrefabAsset(GameObject.CreatePrimitive(PrimitiveType.Cube), k_CubePath); -#else - PrefabUtility.CreatePrefab(k_CubePath, GameObject.CreatePrimitive(PrimitiveType.Cube)); -#endif - } - - [OneTimeTearDown] - public void Cleanup() - { - - EditorSceneManager.NewScene(NewSceneSetup.EmptyScene); - AssetDatabase.DeleteAsset(k_ScenePath); - - if (Directory.Exists(k_FolderPath)) - Directory.Delete(k_FolderPath, true); - if (Directory.Exists(k_TmpPath)) - Directory.Delete(k_TmpPath, true); - if (Directory.Exists(k_TestAssetsPath)) - Directory.Delete(k_TestAssetsPath, true); - if (File.Exists(k_TestAssetsPath + ".meta")) - File.Delete(k_TestAssetsPath + ".meta"); - } - - static ReturnCode RunTask(params IContextObject[] args) where T : IBuildTask - { - IBuildContext context = new BuildContext(args); - IBuildTask instance = Activator.CreateInstance(); - ContextInjector.Inject(context, instance); - var result = instance.Run(); - ContextInjector.Extract(context, instance); - return result; - } - - static IBundleBuildParameters GetBuildParameters() - { - if (Directory.Exists(k_FolderPath)) - Directory.Delete(k_FolderPath, true); - if (Directory.Exists(k_TmpPath)) - Directory.Delete(k_TmpPath, true); - - Directory.CreateDirectory(k_FolderPath); - Directory.CreateDirectory(k_TmpPath); - - IBundleBuildParameters buildParams = new BundleBuildParameters(EditorUserBuildSettings.activeBuildTarget, BuildTargetGroup.Unknown, k_FolderPath); - buildParams.TempOutputFolder = k_TmpPath; - return buildParams; - } - - static IBundleBuildContent GetBundleContent() - { - List buildData = new List(); - AssetBundleBuild dataPoint1 = new AssetBundleBuild() - { - addressableNames = new[] { k_CubePath }, - assetBundleName = "bundle", - assetBundleVariant = "", - assetNames = new[] { k_CubePath } - }; - buildData.Add(dataPoint1); - IBundleBuildContent buildContent = new BundleBuildContent(buildData); - return buildContent; - } - - static IDependencyData GetDependencyData() - { - GUID guid; - GUID.TryParse(AssetDatabase.AssetPathToGUID(k_CubePath), out guid); - ObjectIdentifier[] oId = ContentBuildInterface.GetPlayerObjectIdentifiersInAsset(guid, EditorUserBuildSettings.activeBuildTarget); - AssetLoadInfo loadInfo = new AssetLoadInfo() - { - asset = guid, - address = k_CubePath, - includedObjects = oId.ToList(), - referencedObjects = oId.ToList() - }; - - IDependencyData dep = new BuildDependencyData(); - dep.AssetInfo.Add(guid, loadInfo); - - return dep; - } - - [UnityTest] - public IEnumerator BuildPipeline_AssetBundleBuild_DoesNotResetUnsavedScene() - { - Scene s = EditorSceneManager.NewScene(NewSceneSetup.EmptyScene); - yield return null; - EditorSceneManager.SaveScene(s, k_ScenePath); - GameObject.CreatePrimitive(PrimitiveType.Cube); - EditorSceneManager.MarkSceneDirty(s); - - GameObject objectWeAdded = GameObject.Find("Cube"); - Assert.IsNotNull(objectWeAdded, "No object before entering playmode"); - Assert.AreEqual("testScene", SceneManager.GetActiveScene().name); - - IBundleBuildParameters buildParameters = GetBuildParameters(); - IBundleBuildContent buildContent = GetBundleContent(); - IBundleBuildResults results; - - ReturnCode exitCode = ContentPipeline.BuildAssetBundles(buildParameters, buildContent, out results); - Assert.AreEqual(ReturnCode.UnsavedChanges, exitCode); - - Assert.AreEqual("testScene", SceneManager.GetActiveScene().name); - objectWeAdded = GameObject.Find("Cube"); - Assert.IsNotNull(objectWeAdded, "No object after entering playmode"); - } - - [UnityTest] - public IEnumerator ValidationMethods_HasDirtyScenes() - { - Scene s = EditorSceneManager.NewScene(NewSceneSetup.EmptyScene); - yield return null; - - bool dirty = ValidationMethods.HasDirtyScenes(); - Assert.IsFalse(dirty); - - EditorSceneManager.MarkSceneDirty(s); - - dirty = ValidationMethods.HasDirtyScenes(); - Assert.IsTrue(dirty); - } - - [Test] - public void DefaultBuildTasks_WriteSerializedFiles() - { - IBuildParameters buildParams = GetBuildParameters(); - IDependencyData dependencyData = new BuildDependencyData(); - IWriteData writeData = new BuildWriteData(); - IBuildResults results = new BuildResults(); - - ReturnCode exitCode = RunTask(buildParams, dependencyData, writeData, results); - Assert.AreEqual(ReturnCode.Success, exitCode); - } - - [Test] - public void DefaultBuildTasks_GenerateBundlePacking() - { - IBundleBuildContent buildContent = GetBundleContent(); - IDependencyData dep = GetDependencyData(); - IBundleWriteData writeData = new BundleWriteData(); - IDeterministicIdentifiers deterministicId = new PrefabPackedIdentifiers(); - - ReturnCode exitCode = RunTask(buildContent, dep, writeData, deterministicId); - Assert.AreEqual(ReturnCode.Success, exitCode); - } - - [Test] - public void DefaultBuildTasks_GenerateBundleCommands() - { - IBundleBuildContent buildContent = GetBundleContent(); - IDependencyData dep = GetDependencyData(); - IBundleWriteData writeData = new BundleWriteData(); - IDeterministicIdentifiers deterministicId = new PrefabPackedIdentifiers(); - - RunTask(buildContent, dep, writeData, deterministicId); - - ReturnCode exitCode = RunTask(buildContent, dep, writeData, deterministicId); - Assert.AreEqual(ReturnCode.Success, exitCode); - } - - [Test] - public void DefaultBuildTasks_GenerateBundleMaps() - { - IDependencyData dep = GetDependencyData(); - IBundleWriteData writeData = new BundleWriteData(); - - ReturnCode exitCode = RunTask(dep, writeData); - Assert.AreEqual(ReturnCode.Success, exitCode); - } - - [Test] - public void DefaultBuildTasks_PostPackingCallback() - { - bool packingCallbackCalled = false; - - IBuildParameters buildParams = GetBuildParameters(); - IDependencyData dep = GetDependencyData(); - IBundleWriteData writeData = new BundleWriteData(); - BuildCallbacks callback = new BuildCallbacks(); - callback.PostPackingCallback = (parameters, data, arg3) => - { - packingCallbackCalled = true; - return ReturnCode.Success; - }; - - ReturnCode exitCode = RunTask(buildParams, dep, writeData, callback); - Assert.AreEqual(ReturnCode.Success, exitCode); - Assert.IsTrue(packingCallbackCalled); - } - - [Test] - public void DefaultBuildTasks_PostWritingCallback() - { - bool writingCallbackCalled = false; - - IBuildParameters buildParams = GetBuildParameters(); - IDependencyData dep = GetDependencyData(); - IWriteData writeData = new BuildWriteData(); - IBuildResults results = new BuildResults(); - BuildCallbacks callback = new BuildCallbacks(); - callback.PostWritingCallback = (parameters, data, arg3, arg4) => - { - writingCallbackCalled = true; - return ReturnCode.Success; - }; - - ReturnCode exitCode = RunTask(buildParams, dep, writeData, results, callback); - Assert.AreEqual(ReturnCode.Success, exitCode); - Assert.IsTrue(writingCallbackCalled); - } - - [Test] - public void DefaultBuildTasks_PostDependencyCallback() - { - bool dependencyCallbackCalled = false; - - IBuildParameters buildParameters = GetBuildParameters(); - IDependencyData dep = GetDependencyData(); - BuildCallbacks callback = new BuildCallbacks(); - callback.PostDependencyCallback = (parameters, data) => - { - dependencyCallbackCalled = true; - return ReturnCode.Success; - }; - - ReturnCode exitCode = RunTask(buildParameters, dep, callback); - Assert.AreEqual(ReturnCode.Success, exitCode); - Assert.IsTrue(dependencyCallbackCalled); - } - - [Test] - public void DefaultBuildTasks_PostScriptsCallbacks() - { - bool scriptsCallbackCalled = false; - - IBuildParameters buildParameters = GetBuildParameters(); - IBuildResults results = new BuildResults(); - BuildCallbacks callback = new BuildCallbacks(); - callback.PostScriptsCallbacks = (parameters, buildResults) => - { - scriptsCallbackCalled = true; - return ReturnCode.Success; - }; - - ReturnCode exitCode = RunTask(buildParameters, results, callback); - Assert.AreEqual(ReturnCode.Success, exitCode); - Assert.IsTrue(scriptsCallbackCalled); - } - - [Test] - public void DefaultBuildTasks_AppendBundleHash() - { - IBundleBuildParameters buildParameters = GetBuildParameters(); - buildParameters.AppendHash = true; - var fileName = k_FolderPath + "/TestBundle"; - var fileHash = HashingMethods.Calculate(fileName).ToHash128(); - File.WriteAllText(fileName, fileName); - IBundleBuildResults results = new BundleBuildResults(); - results.BundleInfos["TestBundle"] = new BundleDetails - { - Crc = 0, - FileName = fileName, - Hash = fileHash - }; - - ReturnCode exitCode = RunTask(buildParameters, results); - Assert.AreEqual(ReturnCode.Success, exitCode); - FileAssert.Exists(fileName + "_" + fileHash); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/ScriptableBuildPipelineTests.cs.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/ScriptableBuildPipelineTests.cs.meta deleted file mode 100644 index 6356236b..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/ScriptableBuildPipelineTests.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 170ac2c906650624cbab749adb2cc2ed -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/Unity.ScriptableBuildPipeline.Editor.Tests.asmdef b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/Unity.ScriptableBuildPipeline.Editor.Tests.asmdef deleted file mode 100644 index 7181e5f2..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/Unity.ScriptableBuildPipeline.Editor.Tests.asmdef +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "Unity.ScriptableBuildPipeline.Editor.Tests", - "references": [ - "Unity.ScriptableBuildPipeline.Editor", - "Unity.ScriptableBuildPipeline" - ], - "optionalUnityReferences": [ - "TestAssemblies" - ], - "includePlatforms": [ - "Editor" - ], - "excludePlatforms": [], - "allowUnsafeCode": false -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/Unity.ScriptableBuildPipeline.Editor.Tests.asmdef.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/Unity.ScriptableBuildPipeline.Editor.Tests.asmdef.meta deleted file mode 100644 index 788e98bb..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/Tests/Editor/Unity.ScriptableBuildPipeline.Editor.Tests.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 0244ca4987514734a84f74195d54113d -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/license.md b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/license.md deleted file mode 100644 index 5c2a5e4a..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/license.md +++ /dev/null @@ -1,5 +0,0 @@ -Scriptable Build Pipeline copyright © 2017 Unity Technologies ApS - -Licensed under the Unity Companion License for Unity-dependent projects--see [Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License). - -Unless expressly provided otherwise, the Software under this license is made available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. Please review the license for details on these and other terms and conditions. \ No newline at end of file diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/license.md.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/license.md.meta deleted file mode 100644 index 8c866470..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/license.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 93c1484372a5f5448ab6371fdb212c20 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/package.json b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/package.json deleted file mode 100644 index cdb2fef4..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "com.unity.scriptablebuildpipeline", - "displayName": "Scriptable Build Pipeline", - "version": "1.5.2", - "unity": "2018.3", - "description": "The Scriptable Build Pipeline moves the asset bundle build pipeline to C#. Use the pre-defined build flows, or create your own using the divided up APIs. This system improves build time, fixes incremental build, and provides greater flexibility.", - "keywords": [ - "build", - "bundle", - "bundles", - "assetbundles", - "cache", - "server" - ], - "category": "", - "dependencies": {}, - "repository": { - "type": "git", - "url": "git@github.cds.internal.unity3d.com:unity/Addressables.git", - "revision": "feeab367b101a12d5a04960d0d9b20b267c5726d" - } -} diff --git a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/package.json.meta b/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/package.json.meta deleted file mode 100644 index 55a0099b..00000000 --- a/Library/PackageCache/com.unity.scriptablebuildpipeline@1.5.2/package.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: d38d5a5256466c349a81338d02621916 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/CHANGELOG.md b/Library/PackageCache/com.unity.test-framework@1.1.13/CHANGELOG.md deleted file mode 100644 index a768f5bd..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/CHANGELOG.md +++ /dev/null @@ -1,125 +0,0 @@ -# Changelog -## [1.1.13] - 2020-03-16 -- Fixed an issue where a combination of Entering / Exiting playmode and recompiling scripts would result in the test run repeating (case 1213958). -- Fixed a regression from 1.1.12 where prefabs left in the scene would be cleaned up to aggressively. -- Fixed Test execution timed out. No activity received from the player in 600 seconds error when player is not supposed to start (case 1225147) - -## [1.1.12] - 2020-03-02 -- Now 'Open error line' for a failed UTF test does not throw exceptions for corrupted testable pdb in Editor release mode (case 1118259) -- Fixed an issue where running a test fixture would also run other fixtures with the same full name (namespace plus classname) in other assemblies (case 1197385). -- Running tests with the same full name, with a domain reload inbetween, will no longer fail to initialize the fixture of the second class (case 1205240). -- Running a playmode tests with "Maximize on Play" will now correctly show the result of the tests in the test runner window (case 1014908). -- Fixed an issue where leaving a game object in a scene with a DontSaveInEditor hideFlags would result in an error on cleanup (case 1136883). -- Now ITestPlayerBuildModifier.ModifyOptions is called as expected when running tests on a device (case 1213845) - -## [1.1.11] - 2020-01-16 -- Fixed test runner dlls got included into player build (case 1211624) -- Passing a non-full-path of XML file for -testResults in Unity Batchmode issue resolved, now passing "result.xml" creates the result file in the project file directory (case 959078) -- Respect Script Debugging build setting when running tests - -## [1.1.10] - 2019-12-19 -- Introduced PostSuccessfulLaunchAction callback -- Fixed an issue where canceling a UnityTest while it was running would incorrectly mark it as passed instead of canceled. -- Added command line argument for running tests synchronously. -- The test search bar now handles null values correctly. -- The test output pane now retains its size on domain reloads. - -## [1.1.9] - 2019-12-12 -- Rolled back refactoring to the test run system, as it caused issues in some corner cases. - -## [1.1.8] - 2019-11-15 -- Ensured that a resumed test run is continued instantly. - -## [1.1.7] - 2019-11-14 -- Fixed an issue with test runs after domain reload. - -## [1.1.6] - 2019-11-12 -- Building a player for test will no longer look in unrelated assemblies for relevant attributes. - -## [1.1.5] - 2019-10-23 -- Fixed a regression to synchronous runs introduced in 1.1.4. - -## [1.1.4] - 2019-10-15 -- Running tests in batch mode now correctly returns error code 3 (RunError) when a timeout or a build error occurs. -- Fixed an issue where a test run in a player would time out, if the player takes longer than 10 minutes to run. -- Added command line argument and api setting for specifying custom heartbeat timeout for running on players. - -## [1.1.3] - 2019-09-23 -- Fixed a regression where tests in a player would report a timeout after a test run is finished. -- Made it possible for the ui to change its test items when the test tree changes without script compilation. -- Added synchronous runs as an option to the TestRunnerApi. - -## [1.1.2] - 2019-09-11 -- Fixed an issue where Run Selected would run all tests in the category, if a category filter was selected, regardless of what tests were selected. -- Unsupported attributes used in UnityTests now give an explicit error. -- Added support for the Repeat and Retry attributes in UnityTests (case 1131940). -- Tests with a explicit timeout higher than 10 minutes, no longer times out after running longer than 10 minutes when running from command line (case 1125991). -- Fixed a performance regression in the test runner api result reporting, introduced in 2018.3 (case 1109865). -- Fixed an issue where parameterized test fixtures would not run if selected in the test tree (case 1092244). -- Pressing Clear Results now also correctly clears the counters on the test list (case 1181763). -- Prebuild setup now handles errors logged with Debug.LogError and stops the run if any is logged (case 1115240). It now also supports LogAssert.Expect. - -## [1.1.1] - 2019-08-07 -- Tests retrieved as a test list with the test runner api incorrectly showed both mode as their TestMode. -- Fixed a compatibility issue with running tests from rider. - -## [1.1.0] - 2019-07-30 -- Introduced the TestRunnerApi for running tests programmatically from elsewhere inside the Editor. -- Introduced yield instructions for recompiling scripts and awaiting a domain reload in Edit Mode tests. -- Added a button to the Test Runner UI for clearing the results. - -## [1.0.18] - 2019-07-15 -- Included new full documentation of the test framework. - -## [1.0.17] - 2019-07-11 -- Fixed an issue where the Test Runner window wouldn’t frame selected items after search filter is cleared. -- Fixed a regression where playmode test application on the IOS platform would not quit after the tests are done. - -## [1.0.16] - 2019-06-20 -- Fixed an issue where the Test Runner window popped out if it was docked, or if something else was docked next to it, when re-opened (case 1158961) -- Fixed a regression where the running standalone playmode tests from the ui would result in an error. - -## [1.0.15] - 2019-06-18 -- Added new `[TestMustExpectAllLogs]` attribute, which automatically does `LogAssert.NoUnexpectedReceived()` at the end of affected tests. See docs for this attribute for more info on usage. -- Fixed a regression where no tests would be run if multiple filters are specified. E.g. selecting both a whole assembly and an individual test in the ui. -- Fixed an issue where performing `Run Selected` on a selected assembly would run all assemblies. -- Introduced the capability to do a split build and run, when running playmode tests on standalone devices. -- Fixed an error in ConditionalIgnore, if the condition were not set. - -## [1.0.14] - 2019-05-27 -- Fixed issue preventing scene creation in IPrebuildSetup.Setup callback when running standalone playmode tests. -- Fixed an issue where test assemblies would sometimes not be ordered alphabetically. -- Added module references to the package for the required modules: imgui and jsonserialize. -- Added a ConditionalIgnore attribute to help ignoring tests only under specific conditions. -- Fixed a typo in the player test window (case 1148671). - -## [1.0.13] - 2019-05-07 -- Fixed a regression where results from the player would no longer update correctly in the UI (case 1151147). - -## [1.0.12] - 2019-04-16 -- Added specific unity release to the package information. - -## [1.0.11] - 2019-04-10 -- Fixed a regression from 1.0.10 where test-started events were triggered multiple times after a domain reload. - -## [1.0.10] - 2019-04-08 -- Fixed an issue where test-started events would not be fired correctly after a test performing a domain reload (case 1141530). -- The UI should correctly run tests inside a nested class, when that class is selected. -- All actions should now correctly display a prefix when reporting test result. E.g. "TearDown :". -- Errors logged with Debug.LogError in TearDowns now append the error, rather than overwriting the existing result (case 1114306). -- Incorrect implementations of IWrapTestMethod and IWrapSetUpTearDown now gives a meaningful error. -- Fixed a regression where the Test Framework would run TearDown in a base class before the inheriting class (case 1142553). -- Fixed a regression introduced in 1.0.9 where tests with the Explicit attribute could no longer be executed. - -## [1.0.9] - 2019-03-27 -- Fixed an issue where a corrupt instance of the test runner window would block for a new being opened. -- Added the required modules to the list of package requirements. -- Fixed an issue where errors would happen if the test filter ui was clicked before the ui is done loading. -- Fix selecting items with duplicate names in test hierarchy of Test Runner window (case 987587). -- Fixed RecompileScripts instruction which we use in tests (case 1128994). -- Fixed an issue where using multiple filters on tests would sometimes give an incorrect result. - -## [1.0.7] - 2019-03-12 -### This is the first release of *Unity Package com.unity.test-framework*. - -- Migrated the test-framework from the current extension in unity. diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/CHANGELOG.md.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/CHANGELOG.md.meta deleted file mode 100644 index 4fca79ed..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/CHANGELOG.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: d691174143fd3774ba63d7c493633b99 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/CONTRIBUTING.md b/Library/PackageCache/com.unity.test-framework@1.1.13/CONTRIBUTING.md deleted file mode 100644 index 9f299b10..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/CONTRIBUTING.md +++ /dev/null @@ -1,9 +0,0 @@ -# Contributing - -## If you are interested in contributing, here are some ground rules: -* ... Define guidelines & rules for what contributors need to know to successfully make Pull requests against your repo ... - -## All contributions are subject to the [Unity Contribution Agreement(UCA)](https://unity3d.com/legal/licenses/Unity_Contribution_Agreement) -By making a pull request, you are confirming agreement to the terms and conditions of the UCA, including that your Contributions are your original creation and that you have complete right and authority to make your Contributions. - -## Once you have a change ready following these ground rules. Simply make a pull request diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/CONTRIBUTING.md.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/CONTRIBUTING.md.meta deleted file mode 100644 index 39e850ae..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/CONTRIBUTING.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 57d2ac5c7d5786e499d4794973fe0d4e -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/TableOfContents.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/TableOfContents.md deleted file mode 100644 index 3155c1fc..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/TableOfContents.md +++ /dev/null @@ -1,66 +0,0 @@ -* [Unity Test Framework overview](./index.md) -* [Edit Mode vs. Play Mode tests](./edit-mode-vs-play-mode-tests.md) -* [Getting started with UTF](./getting-started.md) - * [How to create a new test assembly](./workflow-create-test-assembly.md) - * [How to create a test](./workflow-create-test.md) - * [How to run a test](./workflow-run-test.md) - * [How to create a Play Mode test](./workflow-create-playmode-test.md) - * [How to run a Play Mode test as standalone](./workflow-run-playmode-test-standalone.md) -* [Resources](./resources.md) -* [Extending UTF](./extending.md) - * [How to split the build and run process for standalone Play Mode tests](./reference-attribute-testplayerbuildmodifier.md#split-build-and-run-for-player-mode-tests) - * [How to run tests programmatically](./extension-run-tests.md) - * [How to get test results](./extension-get-test-results.md) - * [How to retrieve the list of tests](./extension-retrieve-test-list.md) -* [Reference](./manual.md#reference) - * [Running tests from the command-line](./reference-command-line.md) - * [UnityTest attribute](./reference-attribute-unitytest.md) - * [Setup and cleanup at build time](./reference-setup-and-cleanup.md) - * [IPrebuildSetup](./reference-setup-and-cleanup.md#iprebuildsetup) - * [IPostBuildCleanup](./reference-setup-and-cleanup.md#ipostbuildcleanup) - * [Actions outside of tests](./reference-actions-outside-tests.md) - * [Action execution order](./reference-actions-outside-tests.md#action-execution-order) - * [UnitySetUp and UnityTearDown](./reference-actions-outside-tests.md#unitysetup-and-unityteardown) - * [OuterUnityTestAction](./reference-actions-outside-tests.md#outerunitytestaction) - * [Domain Reloads](./reference-actions-outside-tests.md#domain-reloads) - * [Custom attributes](./reference-custom-attributes.md) - * [ConditionalIgnore attribute](./reference-attribute-conditionalignore.md) - * [PostBuildCleanup attribute](./reference-setup-and-cleanup.md#prebuildsetup-and-postbuildcleanup) - * [PrebuildSetup attribute](./reference-setup-and-cleanup.md#prebuildsetup-and-postbuildcleanup) - * [TestMustExpectAllLogs attribute](./reference-attribute-testmustexpectalllogs.md) - * [TestPlayerBuildModifier attribute](./reference-attribute-testplayerbuildmodifier.md) - * [TestRunCallback attribute](./reference-attribute-testruncallback.md) - * [UnityPlatform attribute](./reference-attribute-unityplatform.md) - * [UnitySetUp attribute](./reference-actions-outside-tests.md#unitysetup-and-unityteardown) - * [UnityTearDown attribute](./reference-actions-outside-tests.md#unitysetup-and-unityteardown) - * [UnityTest attribute](./reference-attribute-unitytest.md) - * [Custom equality comparers](./reference-custom-equality-comparers.md) - * [ColorEqualityComparer](./reference-comparer-color.md) - * [FloatEqualityComparer](./reference-comparer-float.md) - * [QuaternionEqualityComparer](./reference-comparer-quaternion.md) - * [Vector2EqualityComparer](./reference-comparer-vector2.md) - * [Vector3EqualityComparer](./reference-comparer-vector3.md) - * [Vector4EqualityComparer](./reference-comparer-vector4.md) - * [Custom equality comparers with equals operator](./reference-comparer-equals.md) - * [Test Utils](./reference-test-utils.md) - * [Custom yield instructions](./reference-custom-yield-instructions.md) - * [IEditModeTestYieldInstruction](./reference-custom-yield-instructions.md#IEditModeTestYieldInstruction) - * [EnterPlayMode](./reference-custom-yield-instructions.md#enterplaymode) - * [ExitPlayMode](./reference-custom-yield-instructions.md#exitplaymode) - * [RecompileScripts](./reference-recompile-scripts.md) - * [WaitForDomainReload](./reference-wait-for-domain-reload.md) - * [Custom assertion](./reference-custom-assertion.md) - * [LogAssert](./reference-custom-assertion.md#logassert) - * [Custom constraints](./reference-custom-constraints.md) - * [Is](./reference-custom-constraints.md#is) - * [Parameterized tests](./reference-tests-parameterized.md) - * [MonoBehaviour tests](./reference-tests-monobehaviour.md) - * [MonoBehaviourTest<T>](./reference-tests-monobehaviour.md#monobehaviourtestt) - * [IMonoBehaviourTest](./reference-tests-monobehaviour.md#imonobehaviourtest) - * [TestRunnerApi](./reference-test-runner-api.md) - * [ExecutionSettings](./reference-execution-settings.md) - * [Filter](./reference-filter.md) - * [ITestRunSettings](./reference-itest-run-settings.md) - * [ICallbacks](./reference-icallbacks.md) - * [IErrorCallbacks](./reference-ierror-callbacks.md) - diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/edit-mode-vs-play-mode-tests.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/edit-mode-vs-play-mode-tests.md deleted file mode 100644 index 54596396..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/edit-mode-vs-play-mode-tests.md +++ /dev/null @@ -1,53 +0,0 @@ -# Edit Mode vs. Play Mode tests - -Let’s clarify a bit what Play Mode and Edit Mode test means from the Unity Test Framework perspective: - -## Edit Mode tests - -**Edit Mode** tests (also known as Editor tests) are only run in the Unity Editor and have access to the Editor code in addition to the game code. - -With Edit Mode tests it is possible to test any of your [Editor extensions](https://docs.unity3d.com/Manual/ExtendingTheEditor.html) using the [UnityTest](./reference-attribute-unitytest.md) attribute. For Edit Mode tests, your test code runs in the [EditorApplication.update](https://docs.unity3d.com/ScriptReference/EditorApplication-update.html) callback loop. - -> **Note**: You can also control entering and exiting Play Mode from your Edit Mode test. This allow your test to make changes before entering Play Mode. - -Edit Mode tests should meet one of the following conditions: - -* They should have an [assembly definition](./workflow-create-test-assembly.md) with reference to *nunit.framework.dll* and has only the Editor as a target platform: - -```assembly - "includePlatforms": [ - "Editor" - ], -``` - -* Legacy condition: put tests in the project’s [Editor](https://docs.unity3d.com/Manual/SpecialFolders.html) folder. - -## Play Mode tests - -You can run **Play Mode** tests as a [standalone in a Player](./workflow-run-playmode-test-standalone.md) or inside the Editor. Play Mode tests allow you to exercise your game code, as the tests run as [coroutines](https://docs.unity3d.com/ScriptReference/Coroutine.html) if marked with the `UnityTest` attribute. - -Play Mode tests should correspond to the following conditions: - -* Have an [assembly definition](./workflow-create-test-assembly.md) with reference to *nunit.framework.dll*. -* Have the test scripts located in a folder with the .asmdef file. -* The test assembly should reference an assembly within the code that you need to test. - -```assembly - "references": [ - "NewAssembly" - ], - "optionalUnityReferences": [ - "TestAssemblies" - ], - "includePlatforms": [], -``` - -## Recommendations - -### Attributes - -Use the [NUnit](http://www.nunit.org/) `Test` attribute instead of the `UnityTest` attribute, unless you need to [yield special instructions](./reference-custom-yield-instructions.md), in Edit Mode, or if you need to skip a frame or wait for a certain amount of time in Play Mode. - -### References - -It is possible for your Test Assemblies to reference the test tools in `UnityEngine.TestRunner` and `UnityEditor.TestRunner`. The latter is only available in Edit Mode. You can specify these references in the `Assembly Definition References` on the Assembly Definition. \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/extending.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/extending.md deleted file mode 100644 index 045c94a8..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/extending.md +++ /dev/null @@ -1,10 +0,0 @@ -# Extending Unity Test Framework -It is possible to extend the Unity Test Framework (UTF) in many ways, for custom workflows for your projects and for other packages to build on top of UTF. - -These extensions are a supplement to the ones already offered by [NUnit](https://github.com/nunit/docs/wiki/Framework-Extensibility). - -Some workflows for extending UTF include: -* [How to split the build and run process for standalone Play Mode tests](./reference-attribute-testplayerbuildmodifier.md#split-build-and-run-for-player-mode-tests) -* [How to run tests programmatically](./extension-run-tests.md) -* [How to get test results](./extension-get-test-results.md) -* [How to retrieve the list of tests](./extension-retrieve-test-list.md)  \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/extension-get-test-results.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/extension-get-test-results.md deleted file mode 100644 index 8b71d7ed..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/extension-get-test-results.md +++ /dev/null @@ -1,45 +0,0 @@ -# How to get test results -You can receive callbacks when the active test run, or individual tests, starts and finishes. You can register callbacks by invoking `RegisterCallbacks` on the [TestRunnerApi](./reference-test-runner-api.md) with an instance of a class that implements [ICallbacks](./reference-icallbacks.md). There are four `ICallbacks` methods for the start and finish of both the whole run and each level of the test tree. - -## Example -An example of how listeners can be set up: - -> **Note**: Listeners receive callbacks from all test runs, regardless of the registered `TestRunnerApi` for that instance. - -``` C# -public void SetupListeners() -{ - var api = ScriptableObject.CreateInstance(); - api.RegisterCallbacks(new MyCallbacks()); -} - -private class MyCallbacks : ICallbacks -{ - public void RunStarted(ITestAdaptor testsToRun) - { - - } - - public void RunFinished(ITestResultAdaptor result) - { - - } - - public void TestStarted(ITestAdaptor test) - { - - } - - public void TestFinished(ITestResultAdaptor result) - { - if (!result.HasChildren && result.ResultState != "Success") - { - Debug.Log(string.Format("Test {0} {1}", result.Test.Name, result.ResultState)); - } - } -} -``` - -> **Note**: The registered callbacks are not persisted on domain reloads. So it is necessary to re-register the callback after a domain reloads, usually with [InitializeOnLoad](https://docs.unity3d.com/Manual/RunningEditorCodeOnLaunch.html). - -It is possible to provide a `priority` as an integer as the second argument when registering a callback. This influences the invocation order of different callbacks. The default value is zero. It is also possible to provide `RegisterCallbacks` with a class instance that implements [IErrorCallbacks](./reference-ierror-callbacks.md) that is an extended version of `ICallbacks`. `IErrorCallbacks` also has a callback method for `OnError` that invokes if the run fails to start, for example, due to compilation errors or if an [IPrebuildSetup](./reference-setup-and-cleanup.md) throws an exception. \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/extension-retrieve-test-list.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/extension-retrieve-test-list.md deleted file mode 100644 index dedc7fab..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/extension-retrieve-test-list.md +++ /dev/null @@ -1,13 +0,0 @@ -# How to retrieve the list of tests -It is possible to use the [TestRunnerApi](./reference-test-runner-api.md) to retrieve the test tree for a given test mode (**Edit Mode** or **Play Mode**). You can retrieve the test tree by invoking `RetrieveTestList` with the desired `TestMode` and a callback action, with an [ITestAdaptor](./reference-itest-adaptor.md) representing the test tree. - -## Example -The following example retrieves the test tree for Edit Mode tests and prints the number of total test cases: -``` C# -var api = ScriptableObject.CreateInstance(); -api.RetrieveTestList(TestMode.EditMode, (testRoot) => -{ - Debug.Log(string.Format("Tree contains {0} tests.", testRoot.TestCaseCount)); -}); -``` - diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/extension-run-tests.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/extension-run-tests.md deleted file mode 100644 index 60ff3dc7..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/extension-run-tests.md +++ /dev/null @@ -1,72 +0,0 @@ -# How to run tests programmatically -## Filters - -Run tests by calling `Execute` on the [TestRunnerApi](./reference-test-runner-api.md), and provide some execution settings that consists of a [Filter](./reference-filter.md). The `Filter` specifies what tests to run. - -### Example - -The following is an example of how to run all **Play Mode** tests in a project: - -``` C# -var testRunnerApi = ScriptableObject.CreateInstance(); -var filter = new Filter() -{ - testMode = TestMode.PlayMode -}; -testRunnerApi.Execute(new ExecutionSettings(filter)); -``` -## Multiple filter values - -It is possible to specify a more specific filter by filling out the fields on the `Filter` class in more detail. - -Many of the fields allow for multiple values. The runner tries to match tests against at least one of the values provided and then runs any tests that match. - -### Example - -In this example, the API runs tests with full names that fit either of the two names provided: - -``` C# -var api = ScriptableObject.CreateInstance(); -api.Execute(new ExecutionSettings(new Filter() -{ - testNames = new[] {"MyTestClass.NameOfMyTest", "SpecificTestFixture.NameOfAnotherTest"} -})); -``` -## Multiple filter fields - -If using multiple different fields on the filter, then it matches against tests that fulfill all the different fields. - -### Example - -In this example, it runs any test that fits either of the two test names, and that also belongs to a test assembly that fits the given name. - -``` C# -var api = ScriptableObject.CreateInstance(); -api.Execute(new ExecutionSettings(new Filter() -{ - assemblyNames = new [] {"MyTestAssembly"}, - testNames = new [] {"MyTestClass.NameOfMyTest", "MyTestClass.AnotherNameOfATest"} -})); -``` -## Multiple constructor filters - -The execution settings take one or more filters in its constructor. If there is no filter provided, then it runs all **Edit Mode** tests by default. If there are multiple filters provided, then a test runs if it matches any of the filters. - -### Example - -In this example, it runs any tests that are either in the assembly named `MyTestAssembly` or if the full name of the test matches either of the two provided test names: - -``` C# -var api = ScriptableObject.CreateInstance(); -api.Execute(new ExecutionSettings( - new Filter() - { - assemblyNames = new[] {"MyTestAssembly"}, - }, - new Filter() - { - testNames = new[] {"MyTestClass.NameOfMyTest", "MyTestClass.AnotherNameOfATest"} - } -)); -``` -> **Note**: Specifying different test modes or platforms in each `Filter` is not currently supported. The test mode and platform is from the first `Filter` only and defaults to Edit Mode, if not supplied. \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/getting-started.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/getting-started.md deleted file mode 100644 index a8051f26..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/getting-started.md +++ /dev/null @@ -1,18 +0,0 @@ -# Getting started with Unity Test Framework - -To access the Unity Test Framework (UTF) in the Unity Editor, open the **Test Runner** window; go to **Window** > **General** > **Test Runner**. - -![Unity Test Runner window](./images/test-runner-window.png) - -To get started with UTF, follow the workflows below: - -* [How to create a new test assembly](./workflow-create-test-assembly.md) -* [How to create a test](./workflow-create-test.md) -* [How to run a test](./workflow-run-test.md) -* [How to create a Play Mode test](./workflow-create-playmode-test.md) -* [How to run a Play Mode test as standalone](./workflow-run-playmode-test-standalone.md) - - - -For further information, see the [resources](./resources.md) and [reference](./manual.md#reference) sections. - diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/editmode-create-test-script.png b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/editmode-create-test-script.png deleted file mode 100644 index fc9af556..00000000 Binary files a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/editmode-create-test-script.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/editmode-run-test.png b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/editmode-run-test.png deleted file mode 100644 index df1b53c5..00000000 Binary files a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/editmode-run-test.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/editmode-run-tests.png b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/editmode-run-tests.png deleted file mode 100644 index c890d815..00000000 Binary files a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/editmode-run-tests.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/editmode-tab.png b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/editmode-tab.png deleted file mode 100644 index e1b00d7a..00000000 Binary files a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/editmode-tab.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/import-settings.png b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/import-settings.png deleted file mode 100644 index 6a34e924..00000000 Binary files a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/import-settings.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/new-test-script.png b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/new-test-script.png deleted file mode 100644 index 21de0810..00000000 Binary files a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/new-test-script.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/playmode-enable-all.png b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/playmode-enable-all.png deleted file mode 100644 index 961991ae..00000000 Binary files a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/playmode-enable-all.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/playmode-results-standalone.png b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/playmode-results-standalone.png deleted file mode 100644 index de40c031..00000000 Binary files a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/playmode-results-standalone.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/playmode-run-standalone.png b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/playmode-run-standalone.png deleted file mode 100644 index ded57927..00000000 Binary files a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/playmode-run-standalone.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/playmode-tab.png b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/playmode-tab.png deleted file mode 100644 index 9d315cb9..00000000 Binary files a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/playmode-tab.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/test-runner-window.png b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/test-runner-window.png deleted file mode 100644 index f3023fb3..00000000 Binary files a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/test-runner-window.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/test-templates.png b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/test-templates.png deleted file mode 100644 index 753a1552..00000000 Binary files a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/test-templates.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/tests-folder-assembly.png b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/tests-folder-assembly.png deleted file mode 100644 index 4e63751b..00000000 Binary files a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/images/tests-folder-assembly.png and /dev/null differ diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/index.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/index.md deleted file mode 100644 index 604a9163..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/index.md +++ /dev/null @@ -1,54 +0,0 @@ -# About Unity Test Framework - -The Unity Test Framework (UTF) enables Unity users to test their code in both **Edit Mode** and **Play Mode**, and also on target platforms such as [Standalone](https://docs.unity3d.com/Manual/Standalone.html), Android, iOS, etc. - -This package provides a standard test framework for users of Unity and developers at Unity so that both benefit from the same features and can write tests the same way. - -UTF uses a Unity integration of NUnit library, which is an open-source unit testing library for .Net languages. For more information about NUnit, see the [official NUnit website](http://www.nunit.org/) and the [NUnit documentation on GitHub](https://github.com/nunit/docs/wiki/NUnit-Documentation). - -> **Note**: UTF is not a new concept or toolset; it is an adjusted and more descriptive naming for the toolset otherwise known as Unity Test Runner, which is now available as this package. - -# Installing Unity Test Framework - -To install this package, follow the instructions in the [Package Manager documentation](https://docs.unity3d.com/Packages/com.unity.package-manager-ui@latest/index.html). - -> **Note**: Search for the Test Framework package. In Unity 2019.2 and higher, you may need to enable the package before use. - -# Using Unity Test Framework - -To learn how to use the Unity Test Framework package in your project, read the [manual](./manual.md). - -# Technical details - -## Requirements - -This version of the Unity Test Framework is compatible with the following versions of the Unity Editor: - -* 2019.2 and later. - -## Known limitations - -Unity Test Framework version 1.0.18 includes the following known limitations: - -* The `UnityTest` attribute does not support WebGL and WSA platforms. -* The `UnityTest` attribute does not support [Parameterized tests](https://github.com/nunit/docs/wiki/Parameterized-Tests) (except for `ValueSource`). -* The `UnityTest` attribute does not support the `NUnit` [Repeat](https://github.com/nunit/docs/wiki/Repeat-Attribute) attribute. -* Nested test fixture cannot run from the Editor UI. -* When using the `NUnit` [Retry](https://github.com/nunit/docs/wiki/Retry-Attribute) attribute in PlayMode tests, it throws `InvalidCastException`. - -## Package contents - -The following table indicates the root folders in the package where you can find useful resources: - -| Location | Description | -| :----------------------------------------- | :------------------------------------------ | -| _/com.unity.test-framework/Documentation~_ | Contains the documentation for the package. | - -## Document revision history - -| Date | Reason | -| :----------- | :---------------------------------------------------- | -| August 23, 2019 | Applied feedback to the documentation | -| July 25, 2019 | Documentation updated to include features in version 1.1.0 | -| July 11, 2019 | Documentation updated. Matches package version 1.0.18 | -| May 27, 2019 | Documentation created. Matches package version 1.0.14 | diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/manual.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/manual.md deleted file mode 100644 index e50f7add..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/manual.md +++ /dev/null @@ -1,80 +0,0 @@ -# Unity Test Framework manual - -This is the manual for the Unity Test Framework (UTF): - -## **Introduction** - -* [Unity Test Framework overview](./index.md) -* [Edit Mode vs. Play Mode tests](edit-mode-vs-play-mode-tests.md) - -## **Getting started** - -* [Getting started with UTF](./getting-started.md) - * Workflows: - * [How to create a new test assembly](./workflow-create-test-assembly.md) - * [How to create a test](./workflow-create-test.md) - * [How to run a test](workflow-run-test.md) - * [How to create a Play Mode test](./workflow-create-playmode-test.md) - * [How to run a Play Mode test in player](./workflow-run-playmode-test-standalone.md) -* [Resources](./resources.md) - -## Extending UTF - -* [Extending UTF](./extending.md) - * Workflows: - * [How to split the build and run process for standalone Play Mode tests](./reference-attribute-testplayerbuildmodifier.md#split-build-and-run) - * [How to run tests programmatically](./extension-run-tests.md) - * [How to get test results](./extension-get-test-results.md) - * [How to retrieve the list of tests](./extension-retrieve-test-list.md) - -## Reference - -* [Running tests from the command-line](./reference-command-line.md) -* [UnityTest attribute](./reference-attribute-unitytest.md) -* [Setup and cleanup at build time](./reference-setup-and-cleanup.md) - * [IPrebuildSetup](./reference-setup-and-cleanup.md#iprebuildsetup) - * [IPostBuildCleanup](./reference-setup-and-cleanup.md#ipostbuildcleanup) -* [Actions outside of tests](./reference-actions-outside-tests.md) - * [Action execution order](./reference-actions-outside-tests.md#action-execution-order) - * [UnitySetUp and UnityTearDown](./reference-actions-outside-tests.md#unitysetup-and-unityteardown) - * [OuterUnityTestAction](./reference-actions-outside-tests.md#outerunitytestaction) - * [Domain Reloads](./reference-actions-outside-tests.md#domain-reloads) -* [Custom attributes](./reference-custom-attributes.md) - * [ConditionalIgnore attribute](./reference-attribute-conditionalignore.md) - * [PostBuildCleanup attribute](./reference-setup-and-cleanup.md#prebuildsetup-and-postbuildcleanup) - * [PrebuildSetup attribute](./reference-setup-and-cleanup.md#prebuildsetup-and-postbuildcleanup) - * [TestMustExpectAllLogs attribute](./reference-attribute-testmustexpectalllogs.md) - * [TestPlayerBuildModifier attribute](./reference-attribute-testplayerbuildmodifier.md) - * [TestRunCallback attribute](./reference-attribute-testruncallback.md) - * [UnityPlatform attribute](./reference-attribute-unityplatform.md) - * [UnitySetUp attribute](./reference-actions-outside-tests.md#unitysetup-and-unityteardown) - * [UnityTearDown attribute](./reference-actions-outside-tests.md#unitysetup-and-unityteardown) - * [UnityTest attribute](./reference-attribute-unitytest.md) -* [Custom equality comparers](./reference-custom-equality-comparers.md) - * [ColorEqualityComparer](./reference-comparer-color.md) - * [FloatEqualityComparer](./reference-comparer-float.md) - * [QuaternionEqualityComparer](./reference-comparer-quaternion.md) - * [Vector2EqualityComparer](./reference-comparer-vector2.md) - * [Vector3EqualityComparer](./reference-comparer-vector3.md) - * [Vector4EqualityComparer](./reference-comparer-vector4.md) - * [Custom equality comparers with equals operator](./reference-comparer-equals.md) - * [Test Utils](./reference-test-utils.md) -* [Custom yield instructions](./reference-custom-yield-instructions.md) - * [IEditModeTestYieldInstruction](./reference-custom-yield-instructions.md#IEditModeTestYieldInstruction) - * [EnterPlayMode](./reference-custom-yield-instructions.md#enterplaymode) - * [ExitPlayMode](./reference-custom-yield-instructions.md#exitplaymode) -* [Custom assertion](./reference-custom-assertion.md) - * [LogAssert](./reference-custom-assertion.md#logassert) -* [Custom constraints](./reference-custom-constraints.md) - * [Is](./reference-custom-constraints.md#is) -* [Parameterized tests](./reference-tests-parameterized.md) -* [MonoBehaviour tests](./reference-tests-monobehaviour.md) - * [MonoBehaviourTest](./reference-tests-monobehaviour.md#monobehaviourtestt) - * [IMonoBehaviourTest](./reference-tests-monobehaviour.md#imonobehaviourtest) - -* [TestRunnerApi](./reference-test-runner-api.md) - * [ExecutionSettings](./reference-execution-settings.md) - * [Filter](./reference-filter.md) - * [ITestRunSettings](./reference-itest-run-settings.md) - * [ICallbacks](./reference-icallbacks.md) - * [IErrorCallbacks](./reference-ierror-callbacks.md) \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-actions-outside-tests.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-actions-outside-tests.md deleted file mode 100644 index 0c8a4372..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-actions-outside-tests.md +++ /dev/null @@ -1,98 +0,0 @@ -# Actions outside of tests - -When writing tests, it is possible to avoid duplication of code by using the [SetUp and TearDown](https://github.com/nunit/docs/wiki/SetUp-and-TearDown) methods built into [NUnit](http://www.nunit.org/). The Unity Test Framework has extended these methods with extra functionality, which can yield commands and skip frames, in the same way as [UnityTest](./reference-attribute-unitytest.md). - -## Action execution order - -The actions related to a test run in the following order: - -* Attributes implementing [IApplyToContext](https://github.com/nunit/docs/wiki/IApplyToContext-Interface) -* Any attribute implementing [OuterUnityTestAction](#outerunitytestaction) has its `BeforeTest` invoked -* Tests with [UnitySetUp](#unitysetup-and-unityteardown) methods in their test class. -* Attributes implementing [IWrapSetUpTearDown](https://github.com/nunit/docs/wiki/ICommandWrapper-Interface) -* Any [SetUp](https://github.com/nunit/docs/wiki/SetUp-and-TearDown) attributes -* [Action attributes](https://nunit.org/docs/2.6/actionAttributes.html) have their `BeforeTest` method invoked -* Attributes implementing of [IWrapTestMethod](https://github.com/nunit/docs/wiki/ICommandWrapper-Interface) -* **The test itself runs** -* [Action attributes](https://nunit.org/docs/2.6/actionAttributes.html) have their `AfterTest` method invoked -* Any method with the [TearDown](https://github.com/nunit/docs/wiki/SetUp-and-TearDown) attribute -* Tests with [UnityTearDown](#unitysetup-and-unityteardown) methods in their test class -* Any [OuterUnityTestAction](#outerunitytestaction) has its `AfterTest` invoked - -The list of actions is the same for both `Test` and `UnityTest`. - -## UnitySetUp and UnityTearDown - -The `UnitySetUp` and `UnityTearDown` attributes are identical to the standard `SetUp` and `TearDown` attributes, with the exception that they allow for [yielding instructions](reference-custom-yield-instructions.md). The `UnitySetUp` and `UnityTearDown` attributes expect a return type of [IEnumerator](https://docs.microsoft.com/en-us/dotnet/api/system.collections.ienumerator?view=netframework-4.8). - -### Example - -```c# -public class SetUpTearDownExample -{ - [UnitySetUp] - public IEnumerator SetUp() - { - yield return new EnterPlayMode(); - } - - [Test] - public void MyTest() - { - Debug.Log("This runs inside playmode"); - } - - [UnitySetUp] - public IEnumerator TearDown() - { - - yield return new ExitPlayMode(); - } -} -``` - - - -## OuterUnityTestAction - -`OuterUnityTestAction` is a wrapper outside of the tests, which allows for any tests with this attribute to run code before and after the tests. This method allows for yielding commands in the same way as `UnityTest`. The attribute must inherit the `NUnit` attribute and implement `IOuterUnityTestAction`. - -### Example - -```c# -using System.Collections; -using NUnit.Framework; -using NUnit.Framework.Interfaces; -using UnityEngine; -using UnityEngine.TestTools; - -public class MyTestClass -{ - [UnityTest, MyOuterActionAttribute] - public IEnumerator MyTestInsidePlaymode() - { - Assert.IsTrue(Application.isPlaying); - yield return null; - } -} - -public class MyOuterActionAttribute : NUnitAttribute, IOuterUnityTestAction -{ - public IEnumerator BeforeTest(ITest test) - { - yield return new EnterPlayMode(); - } - - public IEnumerator AfterTest(ITest test) - { - yield return new ExitPlayMode(); - } -} - -``` - - - -## Domain Reloads - -In **Edit Mode** tests it is possible to yield instructions that can result in a domain reload, such as entering or exiting **Play Mode** (see [Custom yield instructions](./reference-custom-yield-instructions.md)). When a domain reload happens, all non-Unity actions (such as `OneTimeSetup` and `Setup`) are rerun before the code, which initiated the domain reload, continues. Unity actions (such as `UnitySetup`) are not rerun. If the Unity action is the code that initiated the domain reload, then the rest of the code in the `UnitySetup` method runs after the domain reload. \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-attribute-conditionalignore.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-attribute-conditionalignore.md deleted file mode 100644 index c051e018..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-attribute-conditionalignore.md +++ /dev/null @@ -1,39 +0,0 @@ -# ConditionalIgnore attribute - -This attribute is an alternative to the standard `Ignore` attribute in [NUnit](http://www.nunit.org/). It allows for ignoring tests only under a specified condition. The condition evaluates during `OnLoad`, referenced by ID. - -## Example - -The following example shows a method to use the `ConditionalIgnore` attribute to ignore a test if the Unity Editor is running macOS: - -```C# -using UnityEditor; -using NUnit.Framework; -using UnityEngine.TestTools; - -[InitializeOnLoad] -public class OnLoad -{ - static OnLoad() - { - var editorIsOSX = false; - #if UNITY_EDITOR_OSX - editorIsOSX = true; - #endif - - ConditionalIgnoreAttribute.AddConditionalIgnoreMapping("IgnoreInMacEditor", editorIsOSX); - } -} - -public class MyTestClass -{ - [Test, ConditionalIgnore("IgnoreInMacEditor", "Ignored on Mac editor.")] - public void TestNeverRunningInMacEditor() - { - Assert.Pass(); - } -} - -``` - -> **Note**: You can only use `InitializeOnLoad` in **Edit Mode** tests. \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-attribute-testmustexpectalllogs.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-attribute-testmustexpectalllogs.md deleted file mode 100644 index f0c46651..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-attribute-testmustexpectalllogs.md +++ /dev/null @@ -1,11 +0,0 @@ -# TestMustExpectAllLogs attribute - -The presence of this attribute causes the **Test Runner** to expect every single log. By default, the Test Runner only fails on error logs, but `TestMustExpectAllLogs` fails on warnings and info level messages as well. It is the same as calling the method [LogAssert.NoUnexpectedReceived](./reference-custom-assertion.md#static-methods) at the bottom of every affected test. - -## Assembly-wide usage - -You can apply this attribute to test assemblies (that affects every test in the assembly), fixtures (affects every test in the fixture), or on individual test methods. It is also inherited from base fixtures. - -The `MustExpect` property (`true` by default) lets you enable or disable the higher level value. - -For example when migrating an assembly to this more strict checking method, you might attach `[assembly:TestMustExpectAllLogs]` to the assembly itself, but then whitelist failing fixtures and test methods with `[TestMustExpectAllLogs(MustExpect=false)]` until you have migrated them. This also means new tests in that assembly would have the more strict checking. \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-attribute-testplayerbuildmodifier.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-attribute-testplayerbuildmodifier.md deleted file mode 100644 index 4ab7ccb8..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-attribute-testplayerbuildmodifier.md +++ /dev/null @@ -1,105 +0,0 @@ -# TestPlayerBuildModifier attribute - -You can use the `TestPlayerBuildModifier` attribute to accomplish a couple of different scenarios: - -## Modify the Player build options for Play Mode tests - -It is possible to change the [BuildPlayerOptions](https://docs.unity3d.com/ScriptReference/BuildPlayerOptions.html) for the test **Player**, to achieve custom behavior when running **Play Mode** tests. Modifying the build options allows for changing the target location of the build as well as changing [BuildOptions](https://docs.unity3d.com/ScriptReference/BuildOptions.html). - -To modify the `BuildPlayerOptions`, do the following: - -* Implement the `ITestPlayerBuildModifier` -* Reference the implementation type in a `TestPlayerBuildModifier` attribute on an assembly level. - -### Example - -```c# -using UnityEditor; -using UnityEditor.TestTools; - -[assembly:TestPlayerBuildModifier(typeof(BuildModifier))] -public class BuildModifier : ITestPlayerBuildModifier -{ - public BuildPlayerOptions ModifyOptions(BuildPlayerOptions playerOptions) - { - if (playerOptions.target == BuildTarget.iOS) - { - playerOptions.options |= BuildOptions.SymlinkLibraries; // Enable symlink libraries when running on iOS - } - - playerOptions.options |= BuildOptions.AllowDebugging; // Enable allow Debugging flag on the test Player. - return playerOptions; - } -} -``` - -> **Note:** When building the Player, it includes all `TestPlayerBuildModifier` attributes across all loaded assemblies, independent of the currently used test filter. As the implementation references the `UnityEditor` namespace, the code is typically implemented in an Editor only assembly, as the `UnityEditor` namespace is not available otherwise. - -## Split build and run - -It is possible to use the Unity Editor for building the Player with tests, without [running the tests](./workflow-run-playmode-test-standalone.md). This allows for running the Player on e.g. another machine. In this case, it is necessary to modify the Player to build and implement a custom handling of the test result. - -By using `TestPlayerBuildModifier`, you can alter the `BuildOptions` to not start the Player after the build as well as build the Player at a specific location. Combined with [PostBuildCleanup](./reference-setup-and-cleanup.md#prebuildsetup-and-postbuildcleanup), you can automatically exit the Editor on completion of the build. - -### Example - -```c# -using System; -using System.IO; -using System.Linq; -using Tests; -using UnityEditor; -using UnityEditor.TestTools; -using UnityEngine; -using UnityEngine.TestTools; - -[assembly:TestPlayerBuildModifier(typeof(HeadlessPlayModeSetup))] -[assembly:PostBuildCleanup(typeof(HeadlessPlayModeSetup))] - -namespace Tests -{ - public class HeadlessPlayModeSetup : ITestPlayerBuildModifier, IPostBuildCleanup - { - private static bool s_RunningPlayerTests; - public BuildPlayerOptions ModifyOptions(BuildPlayerOptions playerOptions) - { - // Do not launch the player after the build completes. - playerOptions.options &= ~BuildOptions.AutoRunPlayer; - - // Set the headlessBuildLocation to the output directory you desire. It does not need to be inside the project. - var headlessBuildLocation = Path.GetFullPath(Path.Combine(Application.dataPath, ".//..//PlayModeTestPlayer")); - var fileName = Path.GetFileName(playerOptions.locationPathName); - if (!string.IsNullOrEmpty(fileName)) - { - headlessBuildLocation = Path.Combine(headlessBuildLocation, fileName); - } - playerOptions.locationPathName = headlessBuildLocation; - - // Instruct the cleanup to exit the Editor if the run came from the command line. - // The variable is static because the cleanup is being invoked in a new instance of the class. - s_RunningPlayerTests = true; - return playerOptions; - } - - public void Cleanup() - { - if (s_RunningPlayerTests && IsRunningTestsFromCommandLine()) - { - // Exit the Editor on the next update, allowing for other PostBuildCleanup steps to run. - EditorApplication.update += () => { EditorApplication.Exit(0); }; - } - } - - private static bool IsRunningTestsFromCommandLine() - { - var commandLineArgs = Environment.GetCommandLineArgs(); - return commandLineArgs.Any(value => value == "-runTests"); - } - } -} -``` - -If the Editor is still running after the Play Mode tests have run, the Player tries to report the results back, using [PlayerConnection](https://docs.unity3d.com/ScriptReference/Networking.PlayerConnection.PlayerConnection.html), which has a reference to the IP address of the Editor machine, when built. - -To implement a custom way of reporting the results of the test run, let one of the assemblies in the Player include a [TestRunCallback](./reference-attribute-testruncallback.md). At `RunFinished`, it is possible to get the full test report as XML from the [NUnit](http://www.nunit.org/) test result by calling `result.ToXml(true)`. You can save the result and then save it on the device or send it to another machine as needed. - diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-attribute-testruncallback.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-attribute-testruncallback.md deleted file mode 100644 index dad865a5..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-attribute-testruncallback.md +++ /dev/null @@ -1,46 +0,0 @@ -# TestRunCallback attribute - -It is possible for the test framework to invoke callbacks as the current test run progresses. To do this, there is a `TestRunCallback` attribute which takes the type of `ITestRunCallback` implementation. You can invoke the callbacks with [NUnit](http://www.nunit.org/) `ITest` and `ITestResult` classes. - -At the `RunStarted` and `RunFinished` methods, the test and test results are for the whole test tree. These methods invoke at each node in the test tree; first with the whole test assembly, then with the test class, and last with the test method. - -From these callbacks, it is possible to read the partial or the full results, and it is furthermore possible to save the XML version of the result for further processing or continuous integration. - -## Example - -```C# -using NUnit.Framework.Interfaces; -using UnityEngine; -using UnityEngine.TestRunner; - -[assembly:TestRunCallback(typeof(MyTestRunCallback))] - -public class MyTestRunCallback : ITestRunCallback -{ - public void RunStarted(ITest testsToRun) - { - - } - - public void RunFinished(ITestResult testResults) - { - - } - - public void TestStarted(ITest test) - { - - } - - public void TestFinished(ITestResult result) - { - if (!result.Test.IsSuite) - { - Debug.Log($"Result of {result.Name}: {result.ResultState.Status}"); - } - } -} - -``` - -> **Note:** The `TestRunCallback` does not need any references to the `UnityEditor` namespace and is thus able to run in standalone Players, on the **Player** side. \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-attribute-unityplatform.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-attribute-unityplatform.md deleted file mode 100644 index 931ab878..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-attribute-unityplatform.md +++ /dev/null @@ -1,35 +0,0 @@ -# UnityPlatform attribute - -Use this attribute to define a specific set of platforms you want or do not want your test(s) to run on. - -You can use this attribute on the test method, test class, or test assembly level. Use the supported [RuntimePlatform](https://docs.unity3d.com/ScriptReference/RuntimePlatform.html) enumeration values to specify the platforms. You can also specify which platforms to test by passing one or more `RuntimePlatform` values along with or without the include or exclude properties as parameters to the [Platform](https://github.com/nunit/docs/wiki/Platform-Attribute) attribute constructor. - -The test(s) skips if the current target platform is: - -- Not explicitly specified in the included platforms list -- In the excluded platforms list - -```c# -using UnityEngine; -using UnityEngine.TestTools; -using NUnit.Framework; - -[TestFixture] -public class TestClass -{ - [Test] - [UnityPlatform(RuntimePlatform.WindowsPlayer)] - public void TestMethod() - { - Assert.AreEqual(Application.platform, RuntimePlatform.WindowsPlayer); - } -} -``` - -## Properties - -| Syntax | Description | -| --------------------------- | ------------------------------------------------------------ | -| `RuntimePlatform[] exclude` | List the platforms you do not want to have your tests run on. | -| `RuntimePlatform[] include` | A subset of platforms you need to have your tests run on. | - diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-attribute-unitytest.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-attribute-unitytest.md deleted file mode 100644 index dd002b2d..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-attribute-unitytest.md +++ /dev/null @@ -1,51 +0,0 @@ -# UnityTest attribute - -`UnityTest` attribute is the main addition to the standard [NUnit](http://www.nunit.org/) library for the Unity Test Framework. This type of unit test allows you to skip a frame from within a test (so background tasks can finish) or give certain commands to the Unity **Editor**, such as performing a domain reload or entering **Play Mode** from an **Edit Mode** test. - -In Play Mode, the `UnityTest` attribute runs as a [coroutine](https://docs.unity3d.com/Manual/Coroutines.html). Whereas Edit Mode tests run in the [EditorApplication.update](https://docs.unity3d.com/ScriptReference/EditorApplication-update.html) callback loop. - -The `UnityTest` attribute is, in fact, an alternative to the `NUnit` [Test attribute](https://github.com/nunit/docs/wiki/Test-Attribute), which allows yielding instructions back to the framework. Once the instruction is complete, the test run continues. If you `yield return null`, you skip a frame. That might be necessary to ensure that some changes do happen on the next iteration of either the `EditorApplication.update` loop or the [game loop](https://docs.unity3d.com/Manual/ExecutionOrder.html). - -## Edit Mode example - -The most simple example of an Edit Mode test could be the one that yields `null` to skip the current frame and then continues to run: - -```C# -[UnityTest] -public IEnumerator EditorUtility_WhenExecuted_ReturnsSuccess() -{ - var utility = RunEditorUtilityInTheBackgroud(); - - while (utility.isRunning) - { - yield return null; - } - - Assert.IsTrue(utility.isSuccess); -} -``` - -## Play Mode example - -In Play Mode, a test runs as a coroutine attached to a [MonoBehaviour](https://docs.unity3d.com/ScriptReference/MonoBehaviour.html). So all the yield instructions available in coroutines, are also available in your test. - -From a Play Mode test you can use one of Unity’s [Yield Instructions](https://docs.unity3d.com/ScriptReference/YieldInstruction.html): - -- [WaitForFixedUpdate](https://docs.unity3d.com/ScriptReference/WaitForFixedUpdate.html): to ensure changes expected within the next cycle of physics calculations. -- [WaitForSeconds](https://docs.unity3d.com/ScriptReference/WaitForSeconds.html): if you want to pause your test coroutine for a fixed amount of time. Be careful about creating long-running tests. - -The simplest example is to yield to `WaitForFixedUpdate`: - -```c# -[UnityTest] -public IEnumerator GameObject_WithRigidBody_WillBeAffectedByPhysics() -{ - var go = new GameObject(); - go.AddComponent(); - var originalPosition = go.transform.position.y; - - yield return new WaitForFixedUpdate(); - - Assert.AreNotEqual(originalPosition, go.transform.position.y); -} -``` diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-command-line.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-command-line.md deleted file mode 100644 index e0a17ec4..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-command-line.md +++ /dev/null @@ -1,116 +0,0 @@ -# Running tests from the command line - -It’s pretty simple to run a test project from the command line. Here is an example in Windows: - -```bash -Unity.exe -runTests -batchmode -projectPath PATH_TO_YOUR_PROJECT -testResults C:\temp\results.xml -testPlatform PS4 -``` - -For more information, see [Command line arguments](https://docs.unity3d.com/Manual/CommandLineArguments.html). - -## Commands - -### batchmode - -Runs Unity in batch mode and ensures no pop-up windows appear to eliminate the need for any human intervention. - -### forgetProjectPath - -Don't save your current **Project** into the Unity launcher/hub history. - -### runTests - -Runs tests in the Project. - -### testCategory - -A semicolon-separated list of test categories to include in the run. If using both `testFilter` and `testCategory`, then tests only run that matches both. - -### testFilter - -A semicolon-separated list of test names to run, or a regular expression pattern to match tests by their full name. - -### testPlatform - -The platform you want to run tests on. Available platforms are **EditMode** and **PlayMode**. - -> **Note**: If unspecified, tests run in Edit Mode by default. - -Platform/Type convention is from the [BuildTarget](https://docs.unity3d.com/ScriptReference/BuildTarget.html) enum. Supported platforms are: - -* StandaloneWindows -* StandaloneWindows64 -* StandaloneLinux64 -* StandaloneOSX -* iOS -* Android -* PS4 -* XboxOne - -### testResults - -The path where Unity should save the result file. By default, Unity saves it in the Project’s root folder. - -### playerHeartbeatTimeout - -The time, in seconds, the editor should wait for heartbeats after starting a test run on a player. This defaults to 10 minutes. - -### runSynchronously - -If included, the test run will run tests synchronously, guaranteeing that all tests runs in one editor update call. Note that this is only supported for EditMode tests, and that tests which take multiple frames (i.e. `[UnityTest]` tests, or tests with `[UnitySetUp]` or `[UnityTearDown]` scaffolding) will be filtered out. - -### testSettingsFile - -Path to a *TestSettings.json* file that allows you to set up extra options for your test run. An example of the *TestSettings.json* file could look like this: - -```json -{ - "scriptingBackend":2, - "Architecture":null, - "apiProfile":0 -} -``` - -#### apiProfile - -The .Net compatibility level. Set to one of the following values: - -- 1 - .Net 2.0 -- 2 - .Net 2.0 Subset -- 3 - .Net 4.6 -- 5 - .Net micro profile (used by Mono scripting backend if **Stripping Level** is set to **Use micro mscorlib**) -- 6 - .Net Standard 2.0 - -#### appleEnableAutomaticSigning - -Sets option for automatic signing of Apple devices. - -#### appleDeveloperTeamID - -Sets the team ID for the apple developer account. - -#### architecture - -Target architecture for Android. Set to one of the following values: - -* None = 0 -* ARMv7 = 1 -* ARM64 = 2 -* X86 = 4 -* All = 4294967295 - -#### iOSManualProvisioningProfileType - -Set to one of the following values: - -* 0 - Automatic -* 1 - Development -* 2 - Distribution iOSManualProvisioningProfileID - -#### scriptingBackend - - Set to one of the following values: - -- Mono2x = 0 -- IL2CPP = 1 -- WinRT DotNET = 2 \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-comparer-color.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-comparer-color.md deleted file mode 100644 index f4ae57e6..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-comparer-color.md +++ /dev/null @@ -1,47 +0,0 @@ -# ColorEqualityComparer - -Use this class to compare two `Color` objects. `ColorEqualityComparer.Instance` has default calculation error value set to 0.01f. To set a test specific error value instantiate a comparer instance using the [one argument constructor](#constructors). - -## Static properties - -| Syntax | Description | -| ---------- | ------------------------------------------------------------ | -| `Instance` | A singleton instance of the comparer with a default error value set to 0.01f. | - -## Constructors - -| Syntax | Description | -| ------------------------------------ | ------------------------------------------------------------ | -| `ColorEqualityComparer(float error)` | Creates an instance of the comparer with a custom error value. | - -## Public methods - -| Syntax | Description | -| -------------------------------------------- | ------------------------------------------------------------ | -| `bool Equals(Color expected, Color actual);` | Compares the actual and expected `Color` objects for equality using `Utils.AreFloatsEqualAbsoluteError` to compare the `RGB` and `Alpha` attributes of `Color`. Returns `true` if expected and actual objects are equal otherwise, it returns `false`. | - -## Example - -```c# -[TestFixture] -public class ColorEqualityTest -{ - [Test] - public void GivenColorsAreEqual_WithAllowedCalculationError() - { - // Using default error - var firstColor = new Color(0f, 0f, 0f, 0f); - var secondColor = new Color(0f, 0f, 0f, 0f); - - Assert.That(firstColor, Is.EqualTo(secondColor).Using(ColorEqualityComparer.Instance)); - - // Allowed error 10e-5f - var comparer = new ColorEqualityComparer(10e-5f); - firstColor = new Color(0f, 0f, 0f, 1f); - secondColor = new Color(10e-6f, 0f, 0f, 1f); - - Assert.That(firstColor, Is.EqualTo(secondColor).Using(comparer)); - } -} -``` - diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-comparer-equals.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-comparer-equals.md deleted file mode 100644 index cc5d4d64..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-comparer-equals.md +++ /dev/null @@ -1,27 +0,0 @@ -# Custom equality comparers with equals operator - -If you need to compare Vectors using the overloaded operator == (see [Vector2.operator ==](https://docs.unity3d.com/ScriptReference/Vector2-operator_eq.html), [Vector3.operator ==](https://docs.unity3d.com/ScriptReference/Vector3-operator_eq.html), and [Vector4.operator ==](https://docs.unity3d.com/ScriptReference/Vector4-operator_eq.html)) you should use the respective comparer implementations: - -- Vector2ComparerWithEqualsOperator -- Vector3ComparerWithEqualsOperator -- Vector4ComparerWithEqualsOperator - -The interface is the same as for other [equality comparers](./reference-custom-equality-comparers.md) except the public [constructor](./reference-custom-equality-comparers.md#constructors) `error` parameter is inapplicable in this case. - -## Example - -```c# -[TestFixture] -public class Vector3Test -{ - [Test] - public void VerifyThat_TwoVector3ObjectsAreEqual() - { - var actual = new Vector3(10e-7f, 10e-7f, 10e-7f); - var expected = new Vector3(0f, 0f, 0f); - - Assert.That(actual, Is.EqualTo(expected).Using(Vector3ComparerWithEqualsOperator.Instance)); - } -} -``` - diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-comparer-float.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-comparer-float.md deleted file mode 100644 index 188d2075..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-comparer-float.md +++ /dev/null @@ -1,46 +0,0 @@ -# FloatEqualityComparer - -Use this class to compare two float values for equality with [NUnit](http://www.nunit.org/) constraints. Use `FloatEqualityComparer.Instance` comparer to have the default error value set to 0.0001f. For any other error, use the [one argument constructor](#constructors) to create a comparer. - -## Static Properties - -| Syntax | Description | -| ---------- | ------------------------------------------------------------ | -| `Instance` | A singleton instance of the comparer with a default error value set to 0.0001f. | - -## Constructors - -| Syntax | Description | -| ------------------------------------------- | ------------------------------------------------------------ | -| `FloatEqualityComparer(float allowedError)` | Creates an instance of the comparer with a custom error value. | - -## Public methods - -| Syntax | Description | -| -------------------------------------------- | ------------------------------------------------------------ | -| `bool Equals(float expected, float actual);` | Compares the `actual` and `expected` float values for equality using `Utils.AreFloatsEqual`. | - -## Example - -```c# -[TestFixture] -public class FloatsTest -{ - [Test] - public void VerifyThat_TwoFloatsAreEqual() - { - var comparer = new FloatEqualityComparer(10e-6f); - var actual = -0.00009f; - var expected = 0.00009f; - - Assert.That(actual, Is.EqualTo(expected).Using(comparer)); - - // Default relative error 0.0001f - actual = 10e-8f; - expected = 0f; - - Assert.That(actual, Is.EqualTo(expected).Using(FloatEqualityComparer.Instance)); - } -} -``` - diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-comparer-quaternion.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-comparer-quaternion.md deleted file mode 100644 index 5d7abc86..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-comparer-quaternion.md +++ /dev/null @@ -1,46 +0,0 @@ -# QuaternionEqualityComparer - -Use this utility to compare two [Quaternion](https://docs.unity3d.com/ScriptReference/Quaternion.html) objects for equality with [NUnit](http://www.nunit.org/) assertion constraints. Use the static instance `QuaternionEqualityComparer.Instance` to have the default calculation error value set to 0.00001f. For any other custom error value, use the [one argument constructor](#constructors). - -## Static properties - -| Syntax | Description | -| ---------- | ---------------------------------------------------------- | -| `Instance` | A comparer instance with the default error value 0.00001f. | - -## Constructors - -| Syntax | Description | -| ------------------------------------------------ | ------------------------------------------------------------ | -| `QuaternionEqualityComparer(float allowedError)` | Creates an instance of the comparer with a custom allowed error value. | - -## Public methods - -| Syntax | Description | -| ----------------------------------------------------- | ------------------------------------------------------------ | -| `bool Equals(Quaternion expected, Quaternion actual)` | Compares the `actual` and `expected` `Quaternion` objects for equality using the [Quaternion.Dot](https://docs.unity3d.com/ScriptReference/Quaternion.Dot.html) method. | - -## Example - -```c# -[TestFixture] -public class QuaternionTest -{ - [Test] - public void VerifyThat_TwoQuaternionsAreEqual() - { - var actual = new Quaternion(10f, 0f, 0f, 0f); - var expected = new Quaternion(1f, 10f, 0f, 0f); - var comparer = new QuaternionEqualityComparer(10e-6f); - - Assert.That(actual, Is.EqualTo(expected).Using(comparer)); - - //Using default error 0.00001f - actual = new Quaternion(10f, 0f, 0.1f, 0f); - expected = new Quaternion(1f, 10f, 0.1f, 0f); - - Assert.That(actual, Is.EqualTo(expected).Using(QuaternionEqualityComparer.Instance)); - } -} -``` - diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-comparer-vector2.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-comparer-vector2.md deleted file mode 100644 index 977879e2..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-comparer-vector2.md +++ /dev/null @@ -1,47 +0,0 @@ -# Vector2EqualityComparer - -Use this class to compare two [Vector2](https://docs.unity3d.com/ScriptReference/Vector2.html) objects for equality with [NUnit](http://www.nunit.org/) constraints. Use the static `Vector2EqualityComparer.Instance` to have the calculation error value set to default 0.0001f. For any other error value, instantiate a new comparer object with the [one argument constructor](#constructors). - -## Static properties - -| Syntax | Description | -| ---------- | ------------------------------------------------------------ | -| `Instance` | A comparer instance with the default error value set to 0.0001f. | - -## Constructors - -| Syntax | Description | -| -------------------------------------- | ---------------------------------------------- | -| `Vector2EqualityComparer(float error)` | Creates an instance with a custom error value. | - -## Public methods - -| Syntax | Description | -| ------------------------------------------ | ------------------------------------------------------------ | -| `Equals(Vector2 expected, Vector2 actual)` | Compares the `actual` and `expected` `Vector2` objects for equality using the [Utils.AreFloatsEqual](./reference-test-utils.md) method. | - -## Example - -```c# -[TestFixture] -public class Vector2Test -{ - [Test] - public void VerifyThat_TwoVector2ObjectsAreEqual() - { - // Custom calculation error - var actual = new Vector2(10e-7f, 10e-7f); - var expected = new Vector2(0f, 0f); - var comparer = new Vector2EqualityComparer(10e-6f); - - Assert.That(actual, Is.EqualTo(expected).Using(comparer)); - - //Default error 0.0001f - actual = new Vector2(0.01f, 0.01f); - expected = new Vector2(0.01f, 0.01f); - - Assert.That(actual, Is.EqualTo(expected).Using(Vector2EqualityComparer.Instance)); - } -} -``` - diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-comparer-vector3.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-comparer-vector3.md deleted file mode 100644 index 6fe1122b..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-comparer-vector3.md +++ /dev/null @@ -1,47 +0,0 @@ -# Vector3EqualityComparer - -Use this class to compare two [Vector3](https://docs.unity3d.com/ScriptReference/Vector3.html) objects for equality with `NUnit` constraints. Call `Vector3EqualityComparer.Instance` comparer to perform a comparison with the default calculation error value 0.0001f. To specify a different error value, use the [one argument constructor](#constructors) to instantiate a new comparer. - -## Static properties - -| Syntax | Description | -| ---------- | ------------------------------------------------------------ | -| `Instance` | A comparer instance with the default calculation error value equal to 0.0001f. | - -## Constructors - -| Syntax | Description | -| --------------------------------------------- | ---------------------------------------------- | -| `Vector3EqualityComparer(float allowedError)` | Creates an instance with a custom error value. | - -## Public methods - -| Syntax | Description | -| ----------------------------------------------- | ------------------------------------------------------------ | -| `bool Equals(Vector3 expected, Vector3 actual)` | Compares the `actual` and `expected` `Vector3` objects for equality using [Utils.AreFloatsEqual](http://todo) to compare the `x`, `y`, and `z` attributes of `Vector3`. | - -## Example - -```c# -[TestFixture] -public class Vector3Test -{ - [Test] - public void VerifyThat_TwoVector3ObjectsAreEqual() - { - // Custom error 10e-6f - var actual = new Vector3(10e-8f, 10e-8f, 10e-8f); - var expected = new Vector3(0f, 0f, 0f); - var comparer = new Vector3EqualityComparer(10e-6f); - - Assert.That(actual, Is.EqualTo(expected).Using(comparer)); - - //Default error 0.0001f - actual = new Vector3(0.01f, 0.01f, 0f); - expected = new Vector3(0.01f, 0.01f, 0f); - - Assert.That(actual, Is.EqualTo(expected).Using(Vector3EqualityComparer.Instance)); - } -} -``` - diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-comparer-vector4.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-comparer-vector4.md deleted file mode 100644 index 915cd65d..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-comparer-vector4.md +++ /dev/null @@ -1,47 +0,0 @@ -# Vector4EqualityComparer - -Use this class to compare two [Vector4](https://docs.unity3d.com/ScriptReference/Vector4.html) objects for equality with [NUnit](http://www.nunit.org/) constraints. Call `Vector4EqualityComparer.Instance` to perform comparisons using default calculation error value 0.0001f. To set a custom test value, instantiate a new comparer using the [one argument constructor](#constructor). - -## Static Properties - -| Syntax | Description | -| ---------------------------------- | ------------------------------------------------------------ | -| `Vector4EqualityComparer Instance` | A comparer instance with the default calculation error value set to 0.0001f. | - -## Constructors - -| Syntax | Description | -| --------------------------------------------- | ---------------------------------------------- | -| `Vector4EqualityComparer(float allowedError)` | Creates an instance with a custom error value. | - -## Public methods - -| Syntax | Description | -| ------------------------------------------------ | ------------------------------------------------------------ | -| `bool Equals(Vector4 expected, Vector4 actual);` | Compares the `actual` and `expected` `Vector4` objects for equality using [Utils.AreFloatsEqual](http://todo) to compare the `x`, `y`, `z`, and `w` attributes of `Vector4`. | - -## Example - -```c# -[TestFixture] -public class Vector4Test -{ - [Test] - public void VerifyThat_TwoVector4ObjectsAreEqual() - { - // Custom error 10e-6f - var actual = new Vector4(0, 0, 1e-6f, 1e-6f); - var expected = new Vector4(1e-6f, 0f, 0f, 0f); - var comparer = new Vector4EqualityComparer(10e-6f); - - Assert.That(actual, Is.EqualTo(expected).Using(comparer)); - - // Default error 0.0001f - actual = new Vector4(0.01f, 0.01f, 0f, 0f); - expected = new Vector4(0.01f, 0.01f, 0f, 0f); - - Assert.That(actual, Is.EqualTo(expected).Using(Vector4EqualityComparer.Instance)); - } -} -``` - diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-custom-assertion.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-custom-assertion.md deleted file mode 100644 index 665597b8..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-custom-assertion.md +++ /dev/null @@ -1,66 +0,0 @@ -# Custom assertion - -A test fails if Unity logs a message other than a regular log or warning message. Use [LogAssert](#logassert) to check for an expected message in the log so that the test does not fail when Unity logs the message. - -Use `LogAssert.Expect` before running the code under test, as the check for expected logs runs at the end of each frame. - -A test also reports a failure, if an expected message does not appear, or if Unity does not log any regular log or warning messages. - -## Example - -```c# -[Test] -public void LogAssertExample() -{ - // Expect a regular log message - LogAssert.Expect(LogType.Log, "Log message"); - - // The test fails without the following expected log message - Debug.Log("Log message"); - - // An error log - Debug.LogError("Error message"); - - // Without expecting an error log, the test would fail - LogAssert.Expect(LogType.Error, "Error message"); -} -``` - -## LogAssert - -`LogAssert` lets you expect Unity log messages that would otherwise cause the test to fail. - -### Static properties - -| Syntax | Description | -| ---------------------------- | ------------------------------------------------------------ | -| `bool ignoreFailingMessages` | Set this property to `true` to prevent unexpected error log messages from triggering an assertion. By default, it is `false`. | - -### Static Methods - -| Syntax | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | -| `void Expect(LogType type, string message);` `void Expect(LogType type, Regex message);` | Verifies that a log message of a specified type appears in the log. A test won’t fail from an expected error, assertion, or exception log message. It does fail if an expected message does not appear in the log. | -| `void NoUnexpectedReceived();` | Triggers an assertion when receiving any log messages and fails the test if some are unexpected messages. If multiple tests need to check for no received unexpected logs, consider using the [TestMustExpectAllLogs](./reference-attribute-testmustexpectalllogs.md) attribute instead. | - -### Expect string message - -`void Expect(LogType type, string message);` - -#### Parameters - -| Syntax | Description | -| ---------------- | ------------------------------------------------------------ | -| `LogType type` | A type of log to expect. It can take one of the [LogType enum](https://docs.unity3d.com/ScriptReference/LogType.html) values. | -| `string message` | A string value that should equate to the expected message. | - -### Expect Regex message - -`void Expect(LogType type, Regex message);` - -#### Parameters - -| Syntax | Description | -| --------------- | ------------------------------------------------------------ | -| `LogType type` | A type of log to expect. It can take one of the [LogType enum](https://docs.unity3d.com/ScriptReference/LogType.html) values. | -| `Regex message` | A regular expression pattern to match the expected message. | \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-custom-attributes.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-custom-attributes.md deleted file mode 100644 index 115e4cb4..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-custom-attributes.md +++ /dev/null @@ -1,15 +0,0 @@ -# Custom attributes - -As a part of UTF’s public API we provide the following attributes: - -* [ConditionalIgnore attribute](./reference-attribute-conditionalignore.md) -* [PostBuildCleanup attribute](./reference-setup-and-cleanup.md#prebuildsetup-and-postbuildcleanup) -* [PrebuildSetup attribute](./reference-setup-and-cleanup.md#prebuildsetup-and-postbuildcleanup) -* [TestMustExpectAllLogs attribute](./reference-attribute-testmustexpectalllogs.md) -* [TestPlayerBuildModifier attribute](./reference-attribute-testplayerbuildmodifier.md) -* [TestRunCallback attribute](./reference-attribute-testruncallback.md) -* [UnityPlatform attribute](./reference-attribute-unityplatform.md) -* [UnitySetUp attribute](./reference-actions-outside-tests.md#unitysetup-and-unityteardown) -* [UnityTearDown attribute](./reference-actions-outside-tests.md#unitysetup-and-unityteardown) -* [UnityTest attribute](./reference-attribute-unitytest.md) - diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-custom-constraints.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-custom-constraints.md deleted file mode 100644 index 10b205b9..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-custom-constraints.md +++ /dev/null @@ -1,31 +0,0 @@ -# Custom constraints - -`NUnit` allows you to write test assertions in a more descriptive and human readable way using the [Assert.That](https://github.com/nunit/docs/wiki/Assertions) mechanism, where the first parameter is an object under test and the second parameter describes conditions that the object has to meet. - -## Is - -We’ve extended `NUnit` API with a custom constraint type and declared an overlay `Is` class. To resolve ambiguity between the original implementation and the custom one you must explicitly declare it with a using statement or via addressing through the full type name `UnityEngine.TestTools.Constraints.Is`. - -### Static Methods - -| Syntax | Description | -| -------------------- | ------------------------------------------------------------ | -| `AllocatingGCMemory` | A constraint type that invokes the delegate you provide as the parameter of `Assert.That` and checks whether it causes any GC memory allocations. It passes if any GC memory is allocated and fails if not. | - -## Example - -```c# -using Is = UnityEngine.TestTools.Constraints.Is; - -class MyTestClass -{ - [Test] - public void MyTest() - { - Assert.That(() => { - var i = new int[500]; - }, Is.AllocatingGCMemory()); - } -} -``` - diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-custom-equality-comparers.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-custom-equality-comparers.md deleted file mode 100644 index 8203a32f..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-custom-equality-comparers.md +++ /dev/null @@ -1,32 +0,0 @@ -# Custom equality comparers - -To enable easier verification of custom Unity type values in your tests we provide you with some custom equality comparers: - -* [ColorEqualityComparer](./reference-comparer-color.md) -* [FloatEqualityComparer](./reference-comparer-float.md) -* [QuaternionEqualityComparer](./reference-comparer-quaternion.md) -* [Vector2EqualityComparer](./reference-comparer-vector2.md) -* [Vector3EqualityComparer](./reference-comparer-vector3.md) -* [Vector4EqualityComparer](./reference-comparer-vector4.md) - -Use these classes to compare two objects of the same type for equality within the range of a given tolerance using [NUnit ](https://github.com/nunit/docs/wiki/Constraints)or [custom constraints](./reference-custom-constraints.md) . Call Instance to apply the default calculation error value to the comparison. To set a specific error value, instantiate a new comparer object using a one argument constructor `ctor(float error)`. - -## Static properties - -| Syntax | Description | -| ---------- | ------------------------------------------------------------ | -| `Instance` | A singleton instance of the comparer with a predefined default error value. | - -## Constructors - -| Syntax | Description | -| ------------------- | ------------------------------------------------------------ | -| `ctor(float error)` | Creates an instance of comparer with a custom error `value.allowedError`. The relative error to be considered while comparing two values. | - -## Public methods - -| Syntax | Description | -| ------------------------------------ | ------------------------------------------------------------ | -| `bool Equals(T expected, T actual);` | Compares the actual and expected objects for equality using a custom comparison mechanism. Returns `true` if expected and actual objects are equal, otherwise it returns `false`. | - - diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-custom-yield-instructions.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-custom-yield-instructions.md deleted file mode 100644 index 9814ca35..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-custom-yield-instructions.md +++ /dev/null @@ -1,60 +0,0 @@ -# Custom yield instructions - -By implementing this interface below, you can define custom yield instructions in **Edit Mode** tests. - -## IEditModeTestYieldInstruction - -In an Edit Mode test, you can use `IEditModeTestYieldInstruction` interface to implement your own instruction. There are also a couple of commonly used implementations available: - -- [EnterPlayMode](#enterplaymode) -- [ExitPlayMode](#exitplaymode) -- [RecompileScripts](./reference-recompile-scripts.md) -- [WaitForDomainReload](./reference-wait-for-domain-reload.md) - -## Example - -```c# -[UnityTest] - -public IEnumerator PlayOnAwakeDisabled_DoesntPlayWhenEnteringPlayMode() - -{ - var videoPlayer = PrefabUtility.InstantiatePrefab(m_VideoPlayerPrefab.GetComponent()) as VideoPlayer; - - videoPlayer.playOnAwake = false; - - yield return new EnterPlayMode(); - - var videoPlayerGO = GameObject.Find(m_VideoPlayerPrefab.name); - - Assert.IsFalse(videoPlayerGO.GetComponent().isPlaying); - - yield return new ExitPlayMode(); - - Object.DestroyImmediate(GameObject.Find(m_VideoPlayerPrefab.name)); -} -``` - -## Properties - -| Syntax | Description | -| ---------------------------- | ------------------------------------------------------------ | -| `bool ExpectDomainReload` | Returns `true` if the instruction expects a domain reload to occur. | -| `bool ExpectedPlaymodeState` | Returns `true` if the instruction expects the Unity Editor to be in **Play Mode**. | - -## Methods - -| Syntax | Description | -| ----------------------- | ------------------------------------------------------------ | -| `IEnumerator Perform()` | Used to define multi-frame operations performed when instantiating a yield instruction. | - -## EnterPlayMode - -* Implements `IEditModeTestYieldInstruction`. Creates a yield instruction to enter Play Mode. -* When creating an Editor test that uses the `UnityTest` attribute, use this to trigger the Editor to enter Play Mode. -* Throws an exception if the Editor is already in Play Mode or if there is a [script compilation error](https://support.unity3d.com/hc/en-us/articles/205930539-How-do-I-interpret-a-compiler-error-). - -## ExitPlayMode - -* Implements `IEditModeTestYieldInstruction`. A new instance of the class is a yield instruction to exit Play Mode. -* Throws an exception if the Editor is not in Play Mode. diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-execution-settings.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-execution-settings.md deleted file mode 100644 index e40a3334..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-execution-settings.md +++ /dev/null @@ -1,17 +0,0 @@ -# ExecutionSettings -The `ExecutionSettings` is a set of filters and other settings provided when running a set of tests from the [TestRunnerApi](./reference-test-runner-api.md). - -## Constructors - -| Syntax | Description | -| ----------------------------------------------------- | -------------------------------------------------------- | -| `ExecutionSettings(params Filter[] filtersToExecute)` | Creates an instance with a given set of filters, if any. | - -## Fields - -| Syntax | Description | -| ---------------------------- | ------------------------------------------------------------ | -| `Filter[] filters` | A collection of [Filters](./reference-filter.md) to execute tests on. | -| `ITestRunSettings overloadTestRunSettings` | An instance of [ITestRunSettings](./reference-itest-run-settings.md) to set up before running tests on a Player. | -| `bool runSynchronously` | If true, the call to `Execute()` will run tests synchronously, guaranteeing that all tests have finished running by the time the call returns. Note that this is only supported for EditMode tests, and that tests which take multiple frames (i.e. `[UnityTest]` tests, or tests with `[UnitySetUp]` or `[UnityTearDown]` scaffolding) will be filtered out. | -| 'int playerHeartbeatTimeout' | The time, in seconds, the editor should wait for heartbeats after starting a test run on a player. This defaults to 10 minutes. | \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-filter.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-filter.md deleted file mode 100644 index 8cfa9107..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-filter.md +++ /dev/null @@ -1,15 +0,0 @@ -# Filter -The filter class provides the [TestRunnerApi](./reference-test-runner-api.md) with a specification of what tests to run when [running tests programmatically](./extension-run-tests.md). - -## Fields - -| Syntax | Description | -| ----------------------------- | ------------------------------------------------------------ | -| `TestMode testMode` | An enum flag that specifies if **Edit Mode** or **Play Mode** tests should run. Applying both Edit Mode and Play Mode is currently not supported when running tests from the API. | -| `string[] testNames` | The full name of the tests to match the filter. This is usually in the format `FixtureName.TestName`. If the test has test arguments, then include them in parenthesis. E.g. `MyTestClass2.MyTestWithMultipleValues(1)`. | -| `string[] groupNames` | The same as `testNames`, except that it allows for Regex. This is useful for running specific fixtures or namespaces. E.g. `"^MyNamespace\\."` Runs any tests where the top namespace is `MyNamespace`. | -| `string[] categoryNames` | The name of a [Category](https://nunit.org/docs/2.2.7/category.html) to include in the run. Any test or fixtures runs that have a `Category` matching the string. | -| `string[] assemblyNames` | The name of assemblies included in the run. That is the assembly name, without the .dll file extension. E.g., `MyTestAssembly`. | -| `BuildTarget? targetPlatform` | The [BuildTarget](https://docs.unity3d.com/ScriptReference/BuildTarget.html) platform to run the test on. If set to `null`, then the Editor is the target for the tests. | - - diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-icallbacks.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-icallbacks.md deleted file mode 100644 index b04e7e82..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-icallbacks.md +++ /dev/null @@ -1,48 +0,0 @@ -# ICallbacks -An interface for receiving callbacks when running tests. All test runs invoke the callbacks until the next domain reload. - -The `RunStarted` method runs when the whole test run starts. Then the `TestStarted` method runs with information about the tests it is about to run on an assembly level. Afterward, it runs on a test fixture level and then on the individual test. If the test is a [parameterized test](./https://github.com/nunit/docs/wiki/Parameterized-Tests), then it is also invoked for each parameter combination. After each part of the test tree have completed running, the corresponding `TestFinished` method runs with the test result. At the end of the run, the `RunFinished` event runs with the test result. - -An extended version of the callback, [IErrorCallbacks](./reference-ierror-callbacks.md), extends this `ICallbacks` to receive calls when a run fails due to a build error. - -## Public methods - -| Syntax | Description | -| ---------------------------------------------- | ------------------------------------------------------------ | -| `void RunStarted(ITestAdaptor testsToRun)` | Invoked when the test run starts. The [ITestAdaptor](./reference-itest-adaptor.md) represents the tree of tests to run. | -| `void RunFinished(ITestResultAdaptor result)` | Invoked when the test run finishes. The [ITestResultAdaptor](./reference-itest-result-adaptor.md) represents the results of the set of tests that have run. | -| `void TestStarted(ITestAdaptor test)` | Invoked on each node of the test tree, as that part of the tree starts to run. | -| `void TestFinished(ITestResultAdaptor result)` | Invoked on each node of the test tree once that part of the test tree has finished running. The [ITestResultAdaptor](./reference-itest-result-adaptor.md) represents the results of the current node of the test tree. | - -## Example -An example that sets up a listener on the API. The listener prints the number of failed tests after the run has finished: -``` C# -public void SetupListeners() -{ - var api = ScriptableObject.CreateInstance(); - api.RegisterCallbacks(new MyCallbacks()); -} - -private class MyCallbacks : ICallbacks -{ - public void RunStarted(ITestAdaptor testsToRun) - { - - } - - public void RunFinished(ITestResultAdaptor result) - { - Debug.Log(string.Format("Run finished {0} test(s) failed.", result.FailCount)); - } - - public void TestStarted(ITestAdaptor test) - { - - } - - public void TestFinished(ITestResultAdaptor result) - { - - } -} -``` \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-ierror-callbacks.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-ierror-callbacks.md deleted file mode 100644 index bf833091..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-ierror-callbacks.md +++ /dev/null @@ -1,9 +0,0 @@ -# IErrorCallbacks -An extended version of the [ICallbacks](./reference-icallbacks.md), which get invoked if the test run fails due to a build error or if any [IPrebuildSetup](./reference-setup-and-cleanup.md) has a failure. - -## Public methods - -| Syntax | Description | -| ---------------------------- | ------------------------------------------------------------------- | -| void OnError(string message) | The error message detailing the reason for the run to fail. | - diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-itest-adaptor.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-itest-adaptor.md deleted file mode 100644 index 04e72f6f..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-itest-adaptor.md +++ /dev/null @@ -1,31 +0,0 @@ -# ITestAdaptor -`ITestAdaptor` is a representation of a node in the test tree implemented as a wrapper around the [NUnit](http://www.nunit.org/) [ITest](https://github.com/nunit/nunit/blob/master/src/NUnitFramework/framework/Interfaces/ITest.cs) interface. - -## Properties - -| Syntax | Description | -| ---------- | ------------------------------------------------------------ | -| `string Id` | The ID of the test tree node. The ID can change if you add new tests to the suite. Use `UniqueName`, if you want to have a more permanent point of reference. | -| `string Name` | The name of the test. E.g., `MyTest`. | -| `string FullName` | The full name of the test. E.g., `MyNamespace.MyTestClass.MyTest`. | -| `int TestCaseCount` | The total number of test cases in the node and all sub-nodes. | -| `bool HasChildren` | Whether the node has any children. | -| `bool IsSuite` | Whether the node is a test suite/fixture. | -| `IEnumerable Children` | The child nodes. | -| `ITestAdaptor Parent` | The parent node, if any. | -| `int TestCaseTimeout` | The test case timeout in milliseconds. Note that this value is only available on TestFinished. | -| `ITypeInfo TypeInfo` | The type of test class as an `NUnit` [ITypeInfo](https://github.com/nunit/nunit/blob/master/src/NUnitFramework/framework/Interfaces/ITypeInfo.cs). If the node is not a test class, then the value is `null`. | -| `IMethodInfo Method` | The [Nunit IMethodInfo](https://github.com/nunit/nunit/blob/master/src/NUnitFramework/framework/Interfaces/IMethodInfo.cs) of the test method. If the node is not a test method, then the value is `null`. | -| `string[] Categories` | An array of the categories applied to the test or fixture. | -| `bool IsTestAssembly` | Whether the node represents a test assembly. | -| `RunState RunState` | The run state of the test node. Either `NotRunnable`, `Runnable`, `Explicit`, `Skipped`, or `Ignored`. | -| `string Description` | The description of the test. | -| `string SkipReason` | The skip reason. E.g., if ignoring the test. | -| `string ParentId` | The ID of the parent node. | -| `string ParentFullName` | The full name of the parent node. | -| `string UniqueName` | A unique generated name for the test node. E.g., `Tests.dll/MyNamespace/MyTestClass/[Tests][MyNamespace.MyTestClass.MyTest]`. | -| `string ParentUniqueName` | A unique name of the parent node. E.g., `Tests.dll/MyNamespace/[Tests][MyNamespace.MyTestClass][suite]`. | -| `int ChildIndex` | The child index of the node in its parent. | -| `TestMode TestMode` | The mode of the test. Either **Edit Mode** or **Play Mode**. | - -> **Note**: Some properties are not available when receiving the test tree as a part of a test result coming from a standalone Player, such as `TypeInfo` and `Method`. \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-itest-result-adaptor.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-itest-result-adaptor.md deleted file mode 100644 index 63280f62..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-itest-result-adaptor.md +++ /dev/null @@ -1,25 +0,0 @@ -# ITestResultAdaptor -The `ITestResultAdaptor` is the representation of the test results for a node in the test tree implemented as a wrapper around the [NUnit](http://www.nunit.org/) [ITest](https://github.com/nunit/nunit/blob/master/src/NUnitFramework/framework/Interfaces/ITestResults.cs) interface. -## Properties - -| Syntax | Description | -| ---------- | ------------------------------------------------------------ | -| `ITestAdaptor Test` | The test details of the test result tree node as a [TestAdaptor](./reference-itest-adaptor.md). | -| `string Name` | The name of the test node. | -| `string FullName` | Gets the full name of the test result | -| `string ResultState` | The state of the result as a string. E.g., `Success`, `Skipped`, `Failure`, `Explicit`, `Cancelled`. | -| `TestStatus TestStatus` | The status of the test as an enum. Either `Inconclusive`, `Skipped`, `Passed`, or `Failed`. | -| `double Duration` | Gets the elapsed time for running the test in seconds. | -| `DateTime StartTime` | Gets or sets the time the test started running. | -| `DateTime EndTime` | Gets or sets the time the test finished running. | -| `string Message` | Gets the message associated with a test failure or with not running the test | -| `string StackTrace` | Gets any stack trace associated with an error or failure. Not available in the [Compact Framework](https://en.wikipedia.org/wiki/.NET_Compact_Framework) 1.0. | -| `int AssertCount` | Gets the number of asserts that ran during the test and all its children. | -| `int FailCount` | Gets the number of test cases that failed when running the test and all its children. | -| `int PassCount` | Gets the number of test cases that passed when running the test and all its children. | -| `int SkipCount` | Gets the number of test cases skipped when running the test and all its children. | -| `int InconclusiveCount` | Gets the number of test cases that were inconclusive when running the test and all its children. | -| `bool HasChildren` | Indicates whether this result has any child results. Accessing HasChildren should not force the creation of the Children collection in classes implementing this interface. | -| `IEnumerable Children` | Gets the collection of child results. | -| `string Output` | Gets any text output written to this result. | -| `TNode ToXml` | Gets the test results as an `NUnit` XML node. Use this to save the results to an XML file. | diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-itest-run-settings.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-itest-run-settings.md deleted file mode 100644 index 79c344b5..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-itest-run-settings.md +++ /dev/null @@ -1,29 +0,0 @@ -# ITestRunSettings -`ITestRunSettings` lets you set any of the global settings right before building a Player for a test run and then reverts the settings afterward. -`ITestRunSettings` implements [IDisposable](https://docs.microsoft.com/en-us/dotnet/api/system.idisposable), and runs after building the Player with tests. - -## Public methods - -| Syntax | Description | -| ---------------- | ------------------------------------------------------------ | -| `void Apply()` | A method called before building the Player. | -| `void Dispose()` | A method called after building the Player or if the build failed. | - -## Example -The following example sets the iOS SDK version to be the simulator SDK and resets it to the original value after the run. -``` C# -public class MyTestSettings : ITestRunSettings -{ - private iOSSdkVersion originalSdkVersion; - public void Apply() - { - originalSdkVersion = PlayerSettings.iOS.sdkVersion; - PlayerSettings.iOS.sdkVersion = iOSSdkVersion.SimulatorSDK; - } - - public void Dispose() - { - PlayerSettings.iOS.sdkVersion = originalSdkVersion; - } -} -``` \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-recompile-scripts.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-recompile-scripts.md deleted file mode 100644 index 0fb86446..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-recompile-scripts.md +++ /dev/null @@ -1,22 +0,0 @@ -# RecompileScripts -`RecompileScripts` is an [IEditModeTestYieldInstruction](./reference-custom-yield-instructions.md) that you can yield in Edit Mode tests. It lets you trigger a recompilation of scripts in the Unity Editor. - -## Constructors - -| Syntax | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | -| `RecompileScripts(bool expectScriptCompilation = true, bool expectScriptCompilationSuccess = true)` | Creates a new instance of the `RecompileScripts` yield instruction. The parameter `expectScriptCompilation` indicates if you expect a script compilation to start (defaults to true). If a script compilation does not start and `expectScriptCompilation` is `true`, then it throws an exception. | - -## Example -``` C@ -[UnitySetUp] -public IEnumerator SetUp() -{ - using (var file = File.CreateText("Assets/temp/myScript.cs")) - { - file.Write("public class ATempClass { }"); - } - AssetDatabase.Refresh(); - yield return new RecompileScripts(); -} -``` \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-setup-and-cleanup.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-setup-and-cleanup.md deleted file mode 100644 index 93e77a56..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-setup-and-cleanup.md +++ /dev/null @@ -1,91 +0,0 @@ -# Setup and cleanup at build time - -In some cases, it is relevant to perform changes to Unity or the file system before building the tests. In the same way, it may be necessary to clean up such changes after the test run. In response to such needs, you can incorporate the pre-build setup and post-build cleanup concepts into your tests in one of the following ways: - -1. Via implementation of `IPrebuildSetup` and `IPostBuildCleanup` interfaces by a test class. -2. Via applying the `PrebuildSetup` attribute and `PostBuildCleanup` attribute on your test class, one of the tests or the test assembly, providing a class name that implements the corresponding interface as an argument (fx `[PrebuildSetup("MyTestSceneSetup")]`). - -## Execution order - -All setups run in a deterministic order one after another. The first to run are the setups defined with attributes. Then any test class implementing the interface runs, in alphabetical order inside their namespace, which is the same order as the tests run. - -> **Note**: Cleanup runs right away for a standalone test run, but only after related tests run in the Unity Editor. - -## PrebuildSetup and PostBuildCleanup - -Both `PrebuildSetup` and `PostBuildCleanup` attributes run if the respective test or test class is in the current test run. The test is included either by running all tests or setting a [filter](./workflow-create-test.md#filters) that includes the test. If multiple tests reference the same pre-built setup or post-build cleanup, then it only runs once. - -## IPrebuildSetup - -Implement this interface if you want to define a set of actions to run as a pre-build step. - -### Public methods - -| Syntax | Description | -| -------------- | ------------------------------------------------------------ | -| `void Setup()` | Implement this method to call actions automatically before the build process. | - -## IPostBuildCleanup - -Implement this interface if you want to define a set of actions to execute as a post-build step. Cleanup runs right away for a standalone test run, but only after all the tests run within the Editor. - -### Public methods - -| Syntax | Description | -| ---------------- | ------------------------------------------------------------ | -| `void Cleanup()` | Implement this method to specify actions that should run as a post-build cleanup step. | - -## Example - -```c# -[TestFixture] -public class CreateSpriteTest : IPrebuildSetup -{ - Texture2D m_Texture; - Sprite m_Sprite; - - public void Setup() - { - -#if UNITY_EDITOR - - var spritePath = "Assets/Resources/Circle.png"; - - var ti = UnityEditor.AssetImporter.GetAtPath(spritePath) as UnityEditor.TextureImporter; - - ti.textureCompression = UnityEditor.TextureImporterCompression.Uncompressed; - - ti.SaveAndReimport(); - -#endif - } - - [SetUp] - public void SetUpTest() - { - m_Texture = Resources.Load("Circle"); - } - - [Test] - public void WhenNullTextureIsPassed_CreateShouldReturnNullSprite() - { - - // Check with Valid Texture. - - LogAssert.Expect(LogType.Log, "Circle Sprite Created"); - - Sprite.Create(m_Texture, new Rect(0, 0, m_Texture.width, m_Texture.height), new Vector2(0.5f, 0.5f)); - - Debug.Log("Circle Sprite Created"); - - // Check with NULL Texture. Should return NULL Sprite. - - m_Sprite = Sprite.Create(null, new Rect(0, 0, m_Texture.width, m_Texture.heig`t), new Vector2(0.5f, 0.5f)); - - Assert.That(m_Sprite, Is.Null, "Sprite created with null texture should be null"); - - } -} -``` - -> **Tip**: Use `#if UNITY_EDITOR` if you want to access Editor only APIs, but the setup/cleanup is inside a **Play Mode** assembly. diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-test-runner-api.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-test-runner-api.md deleted file mode 100644 index b594f7ef..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-test-runner-api.md +++ /dev/null @@ -1,23 +0,0 @@ -# TestRunnerApi -The `TestRunnerApi` retrieves and runs tests programmatically from code inside the project, or inside other packages. `TestRunnerApi` is a [ScriptableObject](https://docs.unity3d.com/ScriptReference/ScriptableObject.html). - -You can initialize the API like this: - -```c# -var testRunnerApi = ScriptableObject.CreateInstance(); -``` -> **Note**: You can subscribe and receive test results in one instance of the API, even if the run starts from another instance. - -The `TestRunnerApi` supports the following workflows: -* [How to run tests programmatically](./extension-run-tests.md) -* [How to get test results](./extension-get-test-results.md) -* [How to retrieve the list of tests](./extension-retrieve-test-list.md) - -## Public methods - -| Syntax | Description | -| ------------------------------------------ | ------------------------------------------------------------ | -| `void Execute(ExecutionSettings executionSettings)` | Starts a test run with a given set of [ExecutionSettings](./reference-execution-settings.md). | -| `void RegisterCallbacks(ICallbacks testCallbacks, int priority = 0)` | Sets up a given instance of [ICallbacks](./reference-icallbacks.md) to be invoked on test runs. | -| `void UnregisterCallbacks(ICallbacks testCallbacks)` | Unregisters an instance of ICallbacks to no longer receive callbacks from test runs. | -| `void RetrieveTestList(TestMode testMode, Action callback)` | Retrieve the full test tree as [ITestAdaptor](./reference-itest-adaptor.md) for a given test mode. | \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-test-utils.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-test-utils.md deleted file mode 100644 index dae8daea..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-test-utils.md +++ /dev/null @@ -1,40 +0,0 @@ -# Test Utils - -This contains test utility functions for float value comparison and creating primitives. - -## Static Methods - -| Syntax | Description | -| ------------------------------------------------------------ | ------------------------------------------------------------ | -| `bool AreFloatsEqual(float expected, float actual, float allowedRelativeError)` | Relative epsilon comparison of two float values for equality. `allowedRelativeError` is the relative error to be used in relative epsilon comparison. The relative error is the absolute error divided by the magnitude of the exact value. Returns `true` if the actual value is equivalent to the expected value. | -| `bool AreFloatsEqualAbsoluteError(float expected, float actual, float allowedAbsoluteError)` | Compares two floating point numbers for equality under the given absolute tolerance. `allowedAbsoluteError` is the permitted error tolerance. Returns `true` if the actual value is equivalent to the expected value under the given tolerance. | -| `GameObject CreatePrimitive( type)` | Creates a [GameObject](https://docs.unity3d.com/ScriptReference/GameObject.html) with a primitive [MeshRenderer](https://docs.unity3d.com/ScriptReference/MeshRenderer.html). This is an analogue to the [GameObject.CreatePrimitive](https://docs.unity3d.com/ScriptReference/GameObject.CreatePrimitive.html), but creates a primitive `MeshRenderer` with a fast [Shader](https://docs.unity3d.com/ScriptReference/Shader.html) instead of the default built-in `Shader`, optimized for testing performance. `type` is the [primitive type](https://docs.unity3d.com/ScriptReference/PrimitiveType.html) of the required `GameObject`. Returns a `GameObject` with primitive `MeshRenderer` and [Collider](https://docs.unity3d.com/ScriptReference/Collider.html). | - -## Example - -```c# -[TestFixture] -class UtilsTests -{ - [Test] - public void ChechThat_FloatsAreEqual() - { - float expected = 10e-8f; - float actual = 0f; - float allowedRelativeError = 10e-6f; - - Assert.That(Utils.AreFloatsEqual(expected, actual, allowedRelativeError), Is.True); - } - - [Test] - public void ChechThat_FloatsAreAbsoluteEqual() - { - float expected = 0f; - float actual = 10e-6f; - float error = 10e-5f; - - Assert.That(Utils.AreFloatsEqualAbsoluteError(expected, actual, error), Is.True); - } -} -``` - diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-tests-monobehaviour.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-tests-monobehaviour.md deleted file mode 100644 index 64093335..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-tests-monobehaviour.md +++ /dev/null @@ -1,51 +0,0 @@ -# MonoBehaviour tests - -`MonoBehaviourTest` is a [coroutine](https://docs.unity3d.com/ScriptReference/Coroutine.html) and a helper for writing [MonoBehaviour](https://docs.unity3d.com/ScriptReference/MonoBehaviour.html) tests. - -Yield a `MonoBehaviourTest` when using the `UnityTest` attribute to instantiate the `MonoBehaviour` you wish to test and wait for it to finish running. Implement the `IMonoBehaviourTest` interface on the `MonoBehaviour` to state when the test completes. - -## Example - -```c# -[UnityTest] -public IEnumerator MonoBehaviourTest_Works() -{ - yield return new MonoBehaviourTest(); -} - -public class MyMonoBehaviourTest : MonoBehaviour, IMonoBehaviourTest -{ - private int frameCount; - public bool IsTestFinished - { - get { return frameCount > 10; } - } - - void Update() - { - frameCount++; - } -} -``` - -## MonoBehaviourTest<T> - -This is a wrapper that allows running tests on `MonoBehaviour` scripts. Inherits from [CustomYieldInstruction](https://docs.unity3d.com/ScriptReference/CustomYieldInstruction.html). - -### Properties - -| Syntax | Description | -| ----------------------- | ------------------------------------------------------------ | -| `T component` | A `MonoBehaviour` component created for the test and attached to the test’s [GameObject](https://docs.unity3d.com/ScriptReference/GameObject.html). | -| `GameObject gameObject` | A `GameObject` created as a container for the test component. | -| `bool keepWaiting` | (Inherited) Returns `true` if the test is not finished yet, which keeps the coroutine suspended. | - -## IMonoBehaviourTest - -An interface implemented by a `MonoBehaviour` test. - -### Properties - -| Syntax | Description | -| --------------------- | ----------------------------------------------- | -| `bool IsTestFinished` | Indicates when the test is considered finished. | \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-tests-parameterized.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-tests-parameterized.md deleted file mode 100644 index 6182bad6..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-tests-parameterized.md +++ /dev/null @@ -1,18 +0,0 @@ -# Parameterized tests - -For data-driven testing, you may want to have your tests parameterized. You may use both the [NUnit](http://www.nunit.org/) attributes [TestCase](https://github.com/nunit/docs/wiki/TestCase-Attribute) and [ValueSource](https://github.com/nunit/docs/wiki/ValueSource-Attribute) with a unit test. - -> **Note**: With `UnityTest` it is recommended to use `ValueSource` since `TestCase` is not supported. - -## Example - -```c# -static int[] values = new int[] { 1, 5, 6 }; - -[UnityTest] -public IEnumerator MyTestWithMultipleValues([ValueSource("values")] int value) -{ - yield return null; -} -``` - diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-wait-for-domain-reload.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-wait-for-domain-reload.md deleted file mode 100644 index 8d42e70d..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/reference-wait-for-domain-reload.md +++ /dev/null @@ -1,19 +0,0 @@ -# WaitForDomainReload -`WaitForDomainReload` is an [IEditModeTestYieldInstruction](./reference-custom-yield-instructions.md) that you can yield in Edit Mode tests. It delays the execution of scripts until after an incoming domain reload. If the domain reload results in a script compilation failure, then it throws an exception. - -## Constructors - -| Syntax | Description | -| ---------------------------- | ------------------------------------------------------------ | -| `WaitForDomainReload()` | Create a new instance of the `WaitForDomainReload` yield instruction. | - -## Example -``` C@ -[UnitySetUp] -public IEnumerator SetUp() -{ - File.Copy("Resources/MyDll.dll", @"Assets/MyDll.dll", true); // Trigger a domain reload. - AssetDatabase.Refresh(); - yield return new WaitForDomainReload(); -} -``` \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/resources.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/resources.md deleted file mode 100644 index ce261e95..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/resources.md +++ /dev/null @@ -1,6 +0,0 @@ -# Resources - -Here you can find other related resources to the Unity Test Framework: - -* [Performance Benchmarking in Unity: How to Get Started](https://blogs.unity3d.com/2018/09/25/performance-benchmarking-in-unity-how-to-get-started/) [Blog] -* [Testing Test-Driven Development with the Unity Test Runner](https://blogs.unity3d.com/2018/11/02/testing-test-driven-development-with-the-unity-test-runner/) [Blog] \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/workflow-create-playmode-test.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/workflow-create-playmode-test.md deleted file mode 100644 index a21b6191..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/workflow-create-playmode-test.md +++ /dev/null @@ -1,28 +0,0 @@ -# Workflow: How to create a Play Mode test - -To create a **Play Mode** test, you can follow a similar process as when you want to create an **Edit Mode** test. - -1. Start with switching to the **PlayMode** tab in the **Test Runner** window. -2. Create a test assembly folder (see [How to create a new test assembly)](./workflow-create-test-assembly.md). The folder name is *Tests* by default (or *Tests 1*, *Tests 2*, etc. if the preceding name is already in use). - -![PlayMode tab](./images/playmode-tab.png) - -> **Note**: If you don’t see the **Create Play Mode Test Assembly Folder** button enabled, make sure that in the Project window you navigate out of a folder with another .asmdef (such as one for Edit Mode tests). - -3. When you have your Play Mode test assembly folder ready, then [create your Play Mode test](./workflow-create-test.md). - -> **Note**: [Pre-defined Unity assemblies](https://docs.unity3d.com/Manual/ScriptCompileOrderFolders.html) (such as _Assembly-CSharp.dll_) do not reference your new assembly. - -## References and builds - -Unity Test Framework adds a reference to `TestAssemblies` in the [Assembly Definition](https://docs.unity3d.com/Manual/ScriptCompilationAssemblyDefinitionFiles.html) file, but it won't include any other references (e.g., to other scripting assemblies within the Unity project). So you need to add other assemblies yourself if you want to test them too. - -Unity does not include `TestAssemblies` in Player builds, but in the Test Runner window, we have such an option. If you need to test code in pre-defined assemblies, you can reference `TestAssemblies` from other assemblies. You must remove these tests after the test run so that Unity does not add them to the final Player build. - -To do this, in the Test Runner window choose **Enable playmode tests for all assemblies** option from the drop-down menu (to expand, click on the small list item in the top right corner). In the dialog box, click **OK** to manually restart the Editor. - -![Enable Play Mode tests for all assemblies](./images/playmode-enable-all.png) - -> **Note**: **Enabling Play Mode tests for all assemblies** includes additional assemblies in your project build, which can increase the project’s size as well as the build time. - -For more information, see [Edit Mode vs. Play Mode tests](./edit-mode-vs-play-mode-tests.md). \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/workflow-create-test-assembly.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/workflow-create-test-assembly.md deleted file mode 100644 index eb358969..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/workflow-create-test-assembly.md +++ /dev/null @@ -1,17 +0,0 @@ -# Workflow: **How to create a new test assembly** - -Unity Test Framework looks for a test inside any assembly that references [NUnit](http://www.nunit.org/). We refer to such assemblies as `TestAssemblies`. The [Test Runner](./getting-started.md) UI can help you set up `TestAssemblies`. **Play Mode** and **Edit Mode** tests need to be in separate assemblies. - -In the **Test Runner** window, you will see an **EditMode** tab enabled by default, as well as a **Create EditMode Test Assembly Folder** button. - -![Test Runner window EditMode tab](./images/editmode-tab.png) - -Click the button to create a *Tests* folder with a respective .asmdef file by default. Change the name of the new [Assembly Definition](https://docs.unity3d.com/Manual/ScriptCompilationAssemblyDefinitionFiles.html), if necessary, and press Enter to accept it. - -![New Test folder and assembly file](./images/tests-folder-assembly.png) - -In the Inspector window, it should have references to **nunit.framework.dll***,* **UnityEngine.TestRunner,** and **UnityEditor.TestRunner** assemblies, as well as **Editor** preselected as a target platform. - -> **Note**: The **UnityEditor.TestRunner** reference is only available for [Edit Mode tests](./edit-mode-vs-play-mode-tests.md#edit-mode-tests). - -![Assembly definition import settings](./images/import-settings.png) diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/workflow-create-test.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/workflow-create-test.md deleted file mode 100644 index 612106ee..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/workflow-create-test.md +++ /dev/null @@ -1,36 +0,0 @@ -# Workflow: How to create a test - -To create a test, do the following: - -1. Create your *Test* [assembly folder](./workflow-create-test-assembly.md) and select it in the **Project** window. -2. Click the button **Create Test Script in current folder** option in the **Test Runner** window. - -![EditMode create test script](./images/editmode-create-test-script.png) - -3. It creates a *NewTestScript.cs* file in the *Tests* folder. Change the name of the script, if necessary, and press Enter to accept it. - -![NewTestScript.cs](./images/new-test-script.png) - -Now you’ll see two sample tests in the Test Runner window: - -![Test templates](./images/test-templates.png) - -Now you can open the tests in your favorite script editor. - -You can also create test scripts by navigating to **Assets** > **Create > Testing** > **C# Test Script**, unless adding a test script would result in a compilation error. - -> **Note**: Unity does not include `TestAssemblies` ([NUnit](http://www.nunit.org/), Unity Test Framework, and user script assemblies) when using the normal build pipeline, but does include them when using **Run on <Platform>** in the Test Runner window. - -## Filters - -If you have a lot of tests, and you only want to view/run a sub-set of them, you can filter them in three ways (see image above): - -* Type in the search box in the top left - -* Click a test class or fixture (such as **NewTestScript** in the image above) - -* Click one of the test result icon buttons in the top right - - - -For more information, see [Edit Mode vs. Play Mode tests](./edit-mode-vs-play-mode-tests.md). diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/workflow-run-playmode-test-standalone.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/workflow-run-playmode-test-standalone.md deleted file mode 100644 index 0a2fa815..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/workflow-run-playmode-test-standalone.md +++ /dev/null @@ -1,21 +0,0 @@ -# Workflow: How to run a Play Mode test in player - -If you run a **Play Mode** test in the same way as an [Editor test](./workflow-run-test.md), it runs inside the Unity Editor. You can also run Play Mode tests on specific platforms. Click **Run all in the player** to build and run your tests on the currently active target platform. - -![Run PlayMode test in player](./images/playmode-run-standalone.png) - -> **Note**: Your current platform displays in brackets on the button. For example, in the image above, the button reads **Run all in player (StandaloneWindows)**, because the current platform is Windows. The target platform is always the current Platform selected in [Build Settings](https://docs.unity3d.com/Manual/BuildSettings.html) (menu: **File** > **Build Settings**). - -The test result displays in the build once the test completes: - -![Results of PlayMode in player test run](./images/playmode-results-standalone.png) - -The application running on the platform reports back the test results to the Editor UI then displays the executed tests and shuts down. To make sure you receive the test results from the Player on your target platform back into the Editor that’s running the test, both should be on the same network. - -> **Note:** Some platforms do not support shutting down the application with `Application.Quit`, so it will continue running after reporting the test results. - -If Unity cannot instantiate the connection, you can see the tests succeed in the running application. Running tests on platforms with arguments, in this state, does not provide XML test results. - - - -For more information, see [Edit Mode vs Play Mode tests](./edit-mode-vs-play-mode-tests.md). \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/workflow-run-test.md b/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/workflow-run-test.md deleted file mode 100644 index 506194b8..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/Documentation~/workflow-run-test.md +++ /dev/null @@ -1,19 +0,0 @@ -# Workflow: How to run a test - -To run a test, you need to double-click on the test or test fixture name in the **Test Runner** window. - -You can also use one of the buttons on the top bar, **Run All** or **Run Selected**. As a result, you’ll see the test status icon changed and a counter in the top right corner updated: - -![EditMode Run Test](./images/editmode-run-test.png) - -You may also use a context menu option **Run**, right-click on any item in the test tree to have it (with all its children if any) run. - -![EditMode Run Tests](./images/editmode-run-tests.png) - - - -## Run tests within Rider - -It is possible to run unit tests in the Unity Test Framework directly from [JetBrains Rider](https://www.jetbrains.com/rider/). - -For more information, see the [JetBrains official documentation](https://www.jetbrains.com/help/rider/Running_and_Debugging_Unity_Tests.html) and their blog post [Run Unity tests in Rider 2018.1](https://blog.jetbrains.com/dotnet/2018/04/18/run-unity-tests-rider-2018-1/). \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/LICENSE.md b/Library/PackageCache/com.unity.test-framework@1.1.13/LICENSE.md deleted file mode 100644 index e6a38bf8..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/LICENSE.md +++ /dev/null @@ -1,5 +0,0 @@ -Test Framework copyright © 2020 Unity Technologies ApS - -Licensed under the Unity Companion License for Unity-dependent projects--see [Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License). - -Unless expressly provided otherwise, the Software under this license is made available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. Please review the license for details on these and other terms and conditions. diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/LICENSE.md.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/LICENSE.md.meta deleted file mode 100644 index f6a2ca23..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/LICENSE.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 3ec7596410385054a9e0bc90377fbe63 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner.meta deleted file mode 100644 index d1eb5739..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 95cdf27b47eb82747ba9e51f41e72a35 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api.meta deleted file mode 100644 index 2ffb8f97..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: fa423365b1ce06a4dbdc6fb4a8597bfa -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/CallbacksDelegator.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/CallbacksDelegator.cs deleted file mode 100644 index 91f2d4cf..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/CallbacksDelegator.cs +++ /dev/null @@ -1,136 +0,0 @@ -using System; -using System.Linq; -using System.Text; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using UnityEngine; -using UnityEngine.TestRunner.TestLaunchers; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - internal class CallbacksDelegator : ICallbacksDelegator - { - private static CallbacksDelegator s_instance; - public static CallbacksDelegator instance - { - get - { - if (s_instance == null) - { - s_instance = new CallbacksDelegator(CallbacksHolder.instance.GetAll, new TestAdaptorFactory()); - } - return s_instance; - } - } - - private readonly Func m_CallbacksProvider; - private readonly ITestAdaptorFactory m_AdaptorFactory; - - public CallbacksDelegator(Func callbacksProvider, ITestAdaptorFactory adaptorFactory) - { - m_CallbacksProvider = callbacksProvider; - m_AdaptorFactory = adaptorFactory; - } - - public void RunStarted(ITest testsToRun) - { - m_AdaptorFactory.ClearResultsCache(); - var testRunnerTestsToRun = m_AdaptorFactory.Create(testsToRun); - TryInvokeAllCallbacks(callbacks => callbacks.RunStarted(testRunnerTestsToRun)); - } - - public void RunStartedRemotely(byte[] testsToRunData) - { - var testData = Deserialize(testsToRunData); - var testsToRun = m_AdaptorFactory.BuildTree(testData); - TryInvokeAllCallbacks(callbacks => callbacks.RunStarted(testsToRun)); - } - - public void RunFinished(ITestResult testResults) - { - var testResult = m_AdaptorFactory.Create(testResults); - TryInvokeAllCallbacks(callbacks => callbacks.RunFinished(testResult)); - } - - public void RunFinishedRemotely(byte[] testResultsData) - { - var remoteTestResult = Deserialize(testResultsData); - var testResult = m_AdaptorFactory.Create(remoteTestResult.results.First(), remoteTestResult); - TryInvokeAllCallbacks(callbacks => callbacks.RunFinished(testResult)); - } - - public void RunFailed(string failureMessage) - { - Debug.LogError(failureMessage); - TryInvokeAllCallbacks(callbacks => - { - var errorCallback = callbacks as IErrorCallbacks; - if (errorCallback != null) - { - errorCallback.OnError(failureMessage); - } - }); - } - - public void TestStarted(ITest test) - { - var testRunnerTest = m_AdaptorFactory.Create(test); - TryInvokeAllCallbacks(callbacks => callbacks.TestStarted(testRunnerTest)); - } - - public void TestStartedRemotely(byte[] testStartedData) - { - var testData = Deserialize(testStartedData); - var testsToRun = m_AdaptorFactory.BuildTree(testData); - - TryInvokeAllCallbacks(callbacks => callbacks.TestStarted(testsToRun)); - } - - public void TestFinished(ITestResult result) - { - var testResult = m_AdaptorFactory.Create(result); - TryInvokeAllCallbacks(callbacks => callbacks.TestFinished(testResult)); - } - - public void TestFinishedRemotely(byte[] testResultsData) - { - var remoteTestResult = Deserialize(testResultsData); - var testResult = m_AdaptorFactory.Create(remoteTestResult.results.First(), remoteTestResult); - TryInvokeAllCallbacks(callbacks => callbacks.TestFinished(testResult)); - } - - public void TestTreeRebuild(ITest test) - { - m_AdaptorFactory.ClearTestsCache(); - var testAdaptor = m_AdaptorFactory.Create(test); - TryInvokeAllCallbacks(callbacks => - { - var rebuildCallbacks = callbacks as ITestTreeRebuildCallbacks; - if (rebuildCallbacks != null) - { - rebuildCallbacks.TestTreeRebuild(testAdaptor); - } - }); - } - - private void TryInvokeAllCallbacks(Action callbackAction) - { - foreach (var testRunnerApiCallback in m_CallbacksProvider()) - { - try - { - callbackAction(testRunnerApiCallback); - } - catch (Exception ex) - { - Debug.LogException(ex); - } - } - } - - private static T Deserialize(byte[] data) - { - return JsonUtility.FromJson(Encoding.UTF8.GetString(data)); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/CallbacksDelegator.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/CallbacksDelegator.cs.meta deleted file mode 100644 index 89e09046..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/CallbacksDelegator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0de03ebd74e2b474fa23d05ab42d0cd8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/CallbacksDelegatorListener.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/CallbacksDelegatorListener.cs deleted file mode 100644 index c19621d5..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/CallbacksDelegatorListener.cs +++ /dev/null @@ -1,28 +0,0 @@ -using UnityEngine; -using UnityEngine.TestTools.TestRunner; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - internal class CallbacksDelegatorListener : ScriptableObject, ITestRunnerListener - { - public void RunStarted(NUnit.Framework.Interfaces.ITest testsToRun) - { - CallbacksDelegator.instance.RunStarted(testsToRun); - } - - public void RunFinished(NUnit.Framework.Interfaces.ITestResult testResults) - { - CallbacksDelegator.instance.RunFinished(testResults); - } - - public void TestStarted(NUnit.Framework.Interfaces.ITest test) - { - CallbacksDelegator.instance.TestStarted(test); - } - - public void TestFinished(NUnit.Framework.Interfaces.ITestResult result) - { - CallbacksDelegator.instance.TestFinished(result); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/CallbacksDelegatorListener.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/CallbacksDelegatorListener.cs.meta deleted file mode 100644 index c9bb94a3..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/CallbacksDelegatorListener.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f3e1b3cbf3fac6a459b1a602167ad311 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/CallbacksHolder.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/CallbacksHolder.cs deleted file mode 100644 index 5df378d5..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/CallbacksHolder.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - internal class CallbacksHolder : ScriptableSingleton, ICallbacksHolder - { - private List m_Callbacks = new List(); - public void Add(ICallbacks callback, int priority) - { - m_Callbacks.Add(new CallbackWithPriority(callback, priority)); - } - - public void Remove(ICallbacks callback) - { - m_Callbacks.RemoveAll(callbackWithPriority => callbackWithPriority.Callback == callback); - } - - public ICallbacks[] GetAll() - { - return m_Callbacks.OrderByDescending(callback => callback.Priority).Select(callback => callback.Callback).ToArray(); - } - - public void Clear() - { - m_Callbacks.Clear(); - } - - private struct CallbackWithPriority - { - public ICallbacks Callback; - public int Priority; - public CallbackWithPriority(ICallbacks callback, int priority) - { - Callback = callback; - Priority = priority; - } - } - - // Sometimes - such as when we want to test the test framework itself - it's necessary to launch a test run from - // inside a test. Because callbacks are registered globally, this can cause a lot of confusion (e.g. the in-test - // run will emit UTP messages, utterly confusing UTR). In such circumstances the safest thing to do is to - // temporarily suppress all registered callbacks for the duration of the in-test run. This method can be called - // to set up a using() block which will suppress the callbacks for the scope. - public IDisposable TemporarilySuppressCallbacks() - { - return new Suppressor(this); - } - - private sealed class Suppressor : IDisposable - { - private readonly CallbacksHolder _instance; - private readonly List _suppressed; - - public Suppressor(CallbacksHolder instance) - { - _instance = instance; - _suppressed = new List(instance.m_Callbacks); - instance.m_Callbacks.Clear(); - } - - public void Dispose() - { - _instance.m_Callbacks.AddRange(_suppressed); - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/CallbacksHolder.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/CallbacksHolder.cs.meta deleted file mode 100644 index 7c420282..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/CallbacksHolder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4884ccc3528cb2e40a0e6f0a19a2b35b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ExecutionSettings.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ExecutionSettings.cs deleted file mode 100644 index 83a35ed6..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ExecutionSettings.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Linq; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal.Filters; -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - [Serializable] - public class ExecutionSettings - { - public ExecutionSettings(params Filter[] filtersToExecute) - { - filters = filtersToExecute; - } - - [SerializeField] - internal BuildTarget? targetPlatform; - - // Note: Is not available after serialization - public ITestRunSettings overloadTestRunSettings; - - [SerializeField] - internal Filter filter; - [SerializeField] - public Filter[] filters; - [SerializeField] - public bool runSynchronously; - [SerializeField] - public int playerHeartbeatTimeout = 60*10; - - internal bool EditModeIncluded() - { - return filters.Any(f => IncludesTestMode(f.testMode, TestMode.EditMode)); - } - - internal bool PlayModeInEditorIncluded() - { - return filters.Any(f => IncludesTestMode(f.testMode, TestMode.PlayMode) && targetPlatform == null); - } - - internal bool PlayerIncluded() - { - return filters.Any(f => IncludesTestMode(f.testMode, TestMode.PlayMode) && targetPlatform != null); - } - - private static bool IncludesTestMode(TestMode testMode, TestMode modeToCheckFor) - { - return (testMode & modeToCheckFor) == modeToCheckFor; - } - - internal ITestFilter BuildNUnitFilter() - { - return new OrFilter(filters.Select(f => f.BuildNUnitFilter(runSynchronously)).ToArray()); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ExecutionSettings.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ExecutionSettings.cs.meta deleted file mode 100644 index 602a117c..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ExecutionSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: eea34a28297f9bc4c9f4c573bc8d5d1c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/Filter.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/Filter.cs deleted file mode 100644 index d787c725..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/Filter.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Filters; -using UnityEngine; -using UnityEngine.TestRunner.NUnitExtensions.Filters; -using UnityEngine.TestTools.TestRunner.GUI; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - [Serializable] - public class Filter - { - [SerializeField] - public TestMode testMode; - [SerializeField] - public string[] testNames; - [SerializeField] - public string[] groupNames; - [SerializeField] - public string[] categoryNames; - [SerializeField] - public string[] assemblyNames; - [SerializeField] - public BuildTarget? targetPlatform; - - internal TestRunnerFilter ToTestRunnerFilter() - { - return new TestRunnerFilter() - { - testNames = testNames, - categoryNames = categoryNames, - groupNames = groupNames, - assemblyNames = assemblyNames - }; - } - - internal ITestFilter BuildNUnitFilter(bool synchronousOnly) - { - var filters = new List(); - - if (testNames != null && testNames.Length != 0) - { - var nameFilter = new OrFilter(testNames.Select(n => new FullNameFilter(n)).ToArray()); - filters.Add(nameFilter); - } - - if (groupNames != null && groupNames.Length != 0) - { - var exactNamesFilter = new OrFilter(groupNames.Select(n => - { - var f = new FullNameFilter(n); - f.IsRegex = true; - return f; - }).ToArray()); - filters.Add(exactNamesFilter); - } - - if (assemblyNames != null && assemblyNames.Length != 0) - { - var assemblyFilter = new OrFilter(assemblyNames.Select(c => new AssemblyNameFilter(c)).ToArray()); - filters.Add(assemblyFilter); - } - - if (categoryNames != null && categoryNames.Length != 0) - { - var categoryFilter = new OrFilter(categoryNames.Select(c => new CategoryFilterExtended(c) {IsRegex = true}).ToArray()); - filters.Add(categoryFilter); - } - - if (synchronousOnly) - { - filters.Add(new SynchronousFilter()); - } - - return filters.Count == 0 ? TestFilter.Empty : new AndFilter(filters.ToArray()); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/Filter.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/Filter.cs.meta deleted file mode 100644 index bbb21b58..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/Filter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 05f92e4a2414cb144a92157752dfa324 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ICallbacks.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ICallbacks.cs deleted file mode 100644 index 365102b6..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ICallbacks.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.Api -{ - public interface ICallbacks - { - void RunStarted(ITestAdaptor testsToRun); - void RunFinished(ITestResultAdaptor result); - void TestStarted(ITestAdaptor test); - void TestFinished(ITestResultAdaptor result); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ICallbacks.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ICallbacks.cs.meta deleted file mode 100644 index 851e3f68..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ICallbacks.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 93eea84e53d0226479c9a584f19427b5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ICallbacksDelegator.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ICallbacksDelegator.cs deleted file mode 100644 index 9005c460..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ICallbacksDelegator.cs +++ /dev/null @@ -1,18 +0,0 @@ -using NUnit.Framework.Interfaces; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - internal interface ICallbacksDelegator - { - void RunStarted(ITest testsToRun); - void RunStartedRemotely(byte[] testsToRunData); - void RunFinished(ITestResult testResults); - void RunFinishedRemotely(byte[] testResultsData); - void RunFailed(string failureMessage); - void TestStarted(ITest test); - void TestStartedRemotely(byte[] testStartedData); - void TestFinished(ITestResult result); - void TestFinishedRemotely(byte[] testResultsData); - void TestTreeRebuild(ITest test); - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ICallbacksDelegator.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ICallbacksDelegator.cs.meta deleted file mode 100644 index fb264591..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ICallbacksDelegator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8f8f74fe8e363da42875d9cab025d3b2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ICallbacksHolder.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ICallbacksHolder.cs deleted file mode 100644 index ff7128b0..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ICallbacksHolder.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.Api -{ - internal interface ICallbacksHolder - { - void Add(ICallbacks callback, int priority); - void Remove(ICallbacks callback); - ICallbacks[] GetAll(); - void Clear(); - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ICallbacksHolder.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ICallbacksHolder.cs.meta deleted file mode 100644 index 7f11d808..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ICallbacksHolder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d742f2caefd9f934d9f19dad07a08e6f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/IErrorCallbacks.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/IErrorCallbacks.cs deleted file mode 100644 index 2d7a9224..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/IErrorCallbacks.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.Api -{ - public interface IErrorCallbacks : ICallbacks - { - void OnError(string message); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/IErrorCallbacks.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/IErrorCallbacks.cs.meta deleted file mode 100644 index 34728c61..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/IErrorCallbacks.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1a06c562b0c5eb046bcb876a29f93c98 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestAdaptor.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestAdaptor.cs deleted file mode 100644 index 7e7736a6..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestAdaptor.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Collections.Generic; -using NUnit.Framework.Interfaces; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - public interface ITestAdaptor - { - string Id { get; } - string Name { get; } - string FullName { get; } - int TestCaseCount { get; } - bool HasChildren { get; } - bool IsSuite { get; } - IEnumerable Children { get; } - ITestAdaptor Parent { get; } - int TestCaseTimeout { get; } - ITypeInfo TypeInfo { get; } - IMethodInfo Method { get; } - string[] Categories { get; } - bool IsTestAssembly { get; } - RunState RunState { get; } - string Description { get; } - string SkipReason { get; } - string ParentId { get; } - string ParentFullName { get; } - string UniqueName { get; } - string ParentUniqueName { get; } - int ChildIndex { get; } - TestMode TestMode { get; } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestAdaptor.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestAdaptor.cs.meta deleted file mode 100644 index 2ae45afd..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestAdaptor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 85dd7af03f02aea4aae13a3945e3b313 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestAdaptorFactory.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestAdaptorFactory.cs deleted file mode 100644 index 021b3135..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestAdaptorFactory.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Collections.Generic; -using NUnit.Framework.Interfaces; -using UnityEngine.TestRunner.TestLaunchers; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - internal interface ITestAdaptorFactory - { - ITestAdaptor Create(ITest test); - ITestAdaptor Create(RemoteTestData testData); - ITestResultAdaptor Create(ITestResult testResult); - ITestResultAdaptor Create(RemoteTestResultData testResult, RemoteTestResultDataWithTestData allData); - ITestAdaptor BuildTree(RemoteTestResultDataWithTestData data); - IEnumerator BuildTreeAsync(RemoteTestResultDataWithTestData data); - void ClearResultsCache(); - void ClearTestsCache(); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestAdaptorFactory.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestAdaptorFactory.cs.meta deleted file mode 100644 index 05dadbac..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestAdaptorFactory.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 803abab0f7e17044db56f8760186dbd1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestResultAdaptor.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestResultAdaptor.cs deleted file mode 100644 index ae4b9f6d..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestResultAdaptor.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.Collections.Generic; -using NUnit.Framework.Interfaces; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - public interface ITestResultAdaptor - { - ITestAdaptor Test { get; } - string Name { get; } - - /// Gets the full name of the test result - string FullName { get; } - - string ResultState { get; } - - TestStatus TestStatus { get; } - - /// Gets the elapsed time for running the test in seconds - double Duration { get; } - - /// Gets or sets the time the test started running. - DateTime StartTime { get; } - - /// Gets or sets the time the test finished running. - DateTime EndTime { get; } - - /// - /// Gets the message associated with a test - /// failure or with not running the test - /// - string Message { get; } - - /// - /// Gets any stacktrace associated with an - /// error or failure. Not available in - /// the Compact Framework 1.0. - /// - string StackTrace { get; } - - /// - /// Gets the number of asserts executed - /// when running the test and all its children. - /// - int AssertCount { get; } - - /// - /// Gets the number of test cases that failed - /// when running the test and all its children. - /// - int FailCount { get; } - - /// - /// Gets the number of test cases that passed - /// when running the test and all its children. - /// - int PassCount { get; } - - /// - /// Gets the number of test cases that were skipped - /// when running the test and all its children. - /// - int SkipCount { get; } - - /// - /// Gets the number of test cases that were inconclusive - /// when running the test and all its children. - /// - int InconclusiveCount { get; } - - /// - /// Indicates whether this result has any child results. - /// Accessing HasChildren should not force creation of the - /// Children collection in classes implementing this interface. - /// - bool HasChildren { get; } - - /// Gets the the collection of child results. - IEnumerable Children { get; } - - /// Gets any text output written to this result. - string Output { get; } - - TNode ToXml(); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestResultAdaptor.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestResultAdaptor.cs.meta deleted file mode 100644 index 5ea944f1..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestResultAdaptor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4f90cfe4bf5cfb44f84a5b11387f2a42 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestRunSettings.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestRunSettings.cs deleted file mode 100644 index 90058c1f..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestRunSettings.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - public interface ITestRunSettings : IDisposable - { - void Apply(); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestRunSettings.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestRunSettings.cs.meta deleted file mode 100644 index 27a3a332..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestRunSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2ae2ce6274819484fa8747a28cebdf3a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestRunnerApi.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestRunnerApi.cs deleted file mode 100644 index da3ffddf..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestRunnerApi.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - internal interface ITestRunnerApi - { - string Execute(ExecutionSettings executionSettings); - void RegisterCallbacks(T testCallbacks, int priority = 0) where T : ICallbacks; - void UnregisterCallbacks(T testCallbacks) where T : ICallbacks; - void RetrieveTestList(TestMode testMode, Action callback); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestRunnerApi.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestRunnerApi.cs.meta deleted file mode 100644 index d581ffdb..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestRunnerApi.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a7842a837a4b13e41ae16193db753418 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestTreeRebuildCallbacks.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestTreeRebuildCallbacks.cs deleted file mode 100644 index cc5a3018..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestTreeRebuildCallbacks.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.Api -{ - internal interface ITestTreeRebuildCallbacks : ICallbacks - { - void TestTreeRebuild(ITestAdaptor test); - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestTreeRebuildCallbacks.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestTreeRebuildCallbacks.cs.meta deleted file mode 100644 index eb1117cf..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/ITestTreeRebuildCallbacks.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4230e406313f1db43a4b548e7a3ad2e2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/RunState.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/RunState.cs deleted file mode 100644 index ab449de9..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/RunState.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.Api -{ - public enum RunState - { - NotRunnable, - Runnable, - Explicit, - Skipped, - Ignored, - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/RunState.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/RunState.cs.meta deleted file mode 100644 index 818e3c02..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/RunState.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8bb59cb2f66d156418ca1bd1e2703233 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestAdaptor.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestAdaptor.cs deleted file mode 100644 index 556bb0c0..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestAdaptor.cs +++ /dev/null @@ -1,142 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using UnityEngine.TestRunner.NUnitExtensions; -using UnityEngine.TestRunner.NUnitExtensions.Runner; -using UnityEngine.TestRunner.TestLaunchers; -using UnityEngine.TestTools.Utils; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - internal class TestAdaptor : ITestAdaptor - { - internal TestAdaptor(ITest test, ITestAdaptor[] children = null) - { - Id = test.Id; - Name = test.Name; - var childIndex = -1; - if (test.Properties["childIndex"].Count > 0) - { - childIndex = (int)test.Properties["childIndex"][0]; - } - FullName = childIndex != -1 ? GetIndexedTestCaseName(test.FullName, childIndex) : test.FullName; - TestCaseCount = test.TestCaseCount; - HasChildren = test.HasChildren; - IsSuite = test.IsSuite; - if (UnityTestExecutionContext.CurrentContext != null) - { - TestCaseTimeout = UnityTestExecutionContext.CurrentContext.TestCaseTimeout; - } - else - { - TestCaseTimeout = CoroutineRunner.k_DefaultTimeout; - } - - TypeInfo = test.TypeInfo; - Method = test.Method; - Categories = test.GetAllCategoriesFromTest().Distinct().ToArray(); - IsTestAssembly = test is TestAssembly; - RunState = (RunState)Enum.Parse(typeof(RunState), test.RunState.ToString()); - Description = (string)test.Properties.Get(PropertyNames.Description); - SkipReason = test.GetSkipReason(); - ParentId = test.GetParentId(); - ParentFullName = test.GetParentFullName(); - UniqueName = test.GetUniqueName(); - ParentUniqueName = test.GetParentUniqueName(); - ChildIndex = childIndex; - - if (test.Parent != null) - { - if (test.Parent.Parent == null) // Assembly level - { - TestMode = (TestMode)Enum.Parse(typeof(TestMode),test.Properties.Get("platform").ToString()); - } - } - - Children = children; - } - - public void SetParent(ITestAdaptor parent) - { - Parent = parent; - if (parent != null) - { - TestMode = parent.TestMode; - } - } - - internal TestAdaptor(RemoteTestData test) - { - Id = test.id; - Name = test.name; - FullName = test.ChildIndex != -1 ? GetIndexedTestCaseName(test.fullName, test.ChildIndex) : test.fullName; - TestCaseCount = test.testCaseCount; - HasChildren = test.hasChildren; - IsSuite = test.isSuite; - m_ChildrenIds = test.childrenIds; - TestCaseTimeout = test.testCaseTimeout; - Categories = test.Categories; - IsTestAssembly = test.IsTestAssembly; - RunState = (RunState)Enum.Parse(typeof(RunState), test.RunState.ToString()); - Description = test.Description; - SkipReason = test.SkipReason; - ParentId = test.ParentId; - UniqueName = test.UniqueName; - ParentUniqueName = test.ParentUniqueName; - ParentFullName = test.ParentFullName; - ChildIndex = test.ChildIndex; - TestMode = TestMode.PlayMode; - } - - internal void ApplyChildren(IEnumerable allTests) - { - Children = m_ChildrenIds.Select(id => allTests.First(t => t.Id == id)).ToArray(); - if (!string.IsNullOrEmpty(ParentId)) - { - Parent = allTests.FirstOrDefault(t => t.Id == ParentId); - } - } - - public string Id { get; private set; } - public string Name { get; private set; } - public string FullName { get; private set; } - public int TestCaseCount { get; private set; } - public bool HasChildren { get; private set; } - public bool IsSuite { get; private set; } - public IEnumerable Children { get; private set; } - public ITestAdaptor Parent { get; private set; } - public int TestCaseTimeout { get; private set; } - public ITypeInfo TypeInfo { get; private set; } - public IMethodInfo Method { get; private set; } - private string[] m_ChildrenIds; - public string[] Categories { get; private set; } - public bool IsTestAssembly { get; private set; } - public RunState RunState { get; } - public string Description { get; } - public string SkipReason { get; } - public string ParentId { get; } - public string ParentFullName { get; } - public string UniqueName { get; } - public string ParentUniqueName { get; } - public int ChildIndex { get; } - public TestMode TestMode { get; private set; } - - private static string GetIndexedTestCaseName(string fullName, int index) - { - var generatedTestSuffix = " GeneratedTestCase" + index; - if (fullName.EndsWith(")")) - { - // Test names from generated TestCaseSource look like Test(TestCaseSourceType) - // This inserts a unique test case index in the name, so that it becomes Test(TestCaseSourceType GeneratedTestCase0) - return fullName.Substring(0, fullName.Length - 1) + generatedTestSuffix + fullName[fullName.Length - 1]; - } - - // In some cases there can be tests with duplicate names generated in other ways and they won't have () in their name - // We just append a suffix at the end of the name in that case - return fullName + generatedTestSuffix; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestAdaptor.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestAdaptor.cs.meta deleted file mode 100644 index 81e39b71..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestAdaptor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6e0e62db88935c74288c97c907243bd0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestAdaptorFactory.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestAdaptorFactory.cs deleted file mode 100644 index 7a25ec84..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestAdaptorFactory.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework.Interfaces; -using UnityEngine.TestRunner.NUnitExtensions; -using UnityEngine.TestRunner.TestLaunchers; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - internal class TestAdaptorFactory : ITestAdaptorFactory - { - private Dictionary m_TestAdaptorCache = new Dictionary(); - private Dictionary m_TestResultAdaptorCache = new Dictionary(); - public ITestAdaptor Create(ITest test) - { - var uniqueName = test.GetUniqueName(); - if (m_TestAdaptorCache.ContainsKey(uniqueName)) - { - return m_TestAdaptorCache[uniqueName]; - } - - var adaptor = new TestAdaptor(test, test.Tests.Select(Create).ToArray()); - foreach (var child in adaptor.Children) - { - (child as TestAdaptor).SetParent(adaptor); - } - m_TestAdaptorCache[uniqueName] = adaptor; - return adaptor; - } - - public ITestAdaptor Create(RemoteTestData testData) - { - return new TestAdaptor(testData); - } - - public ITestResultAdaptor Create(ITestResult testResult) - { - var uniqueName = testResult.Test.GetUniqueName(); - if (m_TestResultAdaptorCache.ContainsKey(uniqueName)) - { - return m_TestResultAdaptorCache[uniqueName]; - } - var adaptor = new TestResultAdaptor(testResult, Create(testResult.Test), testResult.Children.Select(Create).ToArray()); - m_TestResultAdaptorCache[uniqueName] = adaptor; - return adaptor; - } - - public ITestResultAdaptor Create(RemoteTestResultData testResult, RemoteTestResultDataWithTestData allData) - { - return new TestResultAdaptor(testResult, allData); - } - - public ITestAdaptor BuildTree(RemoteTestResultDataWithTestData data) - { - var tests = data.tests.Select(remoteTestData => new TestAdaptor(remoteTestData)).ToList(); - - foreach (var test in tests) - { - test.ApplyChildren(tests); - } - - return tests.First(); - } - - public IEnumerator BuildTreeAsync(RemoteTestResultDataWithTestData data) - { - var tests = data.tests.Select(remoteTestData => new TestAdaptor(remoteTestData)).ToList(); - - for (var index = 0; index < tests.Count; index++) - { - var test = tests[index]; - test.ApplyChildren(tests); - if (index % 100 == 0) - { - yield return null; - } - } - - yield return tests.First(); - } - - public void ClearResultsCache() - { - m_TestResultAdaptorCache.Clear(); - } - - public void ClearTestsCache() - { - m_TestAdaptorCache.Clear(); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestAdaptorFactory.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestAdaptorFactory.cs.meta deleted file mode 100644 index 0b1175fd..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestAdaptorFactory.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d0663d520c26b7c48a4135599e66acf8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestMode.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestMode.cs deleted file mode 100644 index e55ee3a4..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestMode.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - [Flags] - public enum TestMode - { - EditMode = 1 << 0, - PlayMode = 1 << 1 - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestMode.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestMode.cs.meta deleted file mode 100644 index e04594b9..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestMode.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cad095eccea17b741bc4cd264e7441cd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestResultAdaptor.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestResultAdaptor.cs deleted file mode 100644 index 7374b3fd..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestResultAdaptor.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework.Interfaces; -using UnityEngine.TestRunner.TestLaunchers; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - internal class TestResultAdaptor : ITestResultAdaptor - { - private TNode m_Node; - - internal TestResultAdaptor(ITestResult result, ITestAdaptor test, ITestResultAdaptor[] children = null) - { - Test = test; - Name = result.Name; - FullName = result.FullName; - ResultState = result.ResultState.ToString(); - TestStatus = ParseTestStatus(result.ResultState.Status); - Duration = result.Duration; - StartTime = result.StartTime; - EndTime = result.EndTime; - Message = result.Message; - StackTrace = result.StackTrace; - AssertCount = result.AssertCount; - FailCount = result.FailCount; - PassCount = result.PassCount; - SkipCount = result.SkipCount; - InconclusiveCount = result.InconclusiveCount; - HasChildren = result.HasChildren; - Output = result.Output; - Children = children; - m_Node = result.ToXml(true); - } - - internal TestResultAdaptor(RemoteTestResultData result, RemoteTestResultDataWithTestData allData) - { - Test = new TestAdaptor(allData.tests.First(t => t.id == result.testId)); - Name = result.name; - FullName = result.fullName; - ResultState = result.resultState; - TestStatus = ParseTestStatus(result.testStatus); - Duration = result.duration; - StartTime = result.startTime; - EndTime = result.endTime; - Message = result.message; - StackTrace = result.stackTrace; - AssertCount = result.assertCount; - FailCount = result.failCount; - PassCount = result.passCount; - SkipCount = result.skipCount; - InconclusiveCount = result.inconclusiveCount; - HasChildren = result.hasChildren; - Output = result.output; - Children = result.childrenIds.Select(childId => new TestResultAdaptor(allData.results.First(r => r.testId == childId), allData)).ToArray(); - m_Node = TNode.FromXml(result.xml); - } - - public ITestAdaptor Test { get; private set; } - public string Name { get; private set; } - public string FullName { get; private set; } - public string ResultState { get; private set; } - public TestStatus TestStatus { get; private set; } - public double Duration { get; private set; } - public DateTime StartTime { get; private set; } - public DateTime EndTime { get; private set; } - public string Message { get; private set; } - public string StackTrace { get; private set; } - public int AssertCount { get; private set; } - public int FailCount { get; private set; } - public int PassCount { get; private set; } - public int SkipCount { get; private set; } - public int InconclusiveCount { get; private set; } - public bool HasChildren { get; private set; } - public IEnumerable Children { get; private set; } - public string Output { get; private set; } - public TNode ToXml() - { - return m_Node; - } - - private static TestStatus ParseTestStatus(NUnit.Framework.Interfaces.TestStatus testStatus) - { - return (TestStatus)Enum.Parse(typeof(TestStatus), testStatus.ToString()); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestResultAdaptor.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestResultAdaptor.cs.meta deleted file mode 100644 index c2b119e2..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestResultAdaptor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d061ada5d3169454daf54243390b5fdb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestRunnerApi.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestRunnerApi.cs deleted file mode 100644 index c7af3f05..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestRunnerApi.cs +++ /dev/null @@ -1,120 +0,0 @@ -using System; -using System.Linq; -using System.Threading; -using UnityEditor.TestTools.TestRunner.CommandLineTest; -using UnityEditor.TestTools.TestRunner.TestRun; -using UnityEngine; -using UnityEngine.TestRunner.TestLaunchers; -using UnityEngine.TestTools; -using UnityEngine.TestTools.NUnitExtensions; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - public class TestRunnerApi : ScriptableObject, ITestRunnerApi - { - internal ICallbacksHolder callbacksHolder; - - private ICallbacksHolder m_CallbacksHolder - { - get - { - if (callbacksHolder == null) - { - return CallbacksHolder.instance; - } - - return callbacksHolder; - } - } - - internal Func ScheduleJob = (executionSettings) => - { - var runner = new TestJobRunner(); - return runner.RunJob(new TestJobData(executionSettings)); - }; - - public string Execute(ExecutionSettings executionSettings) - { - if (executionSettings == null) - { - throw new ArgumentNullException(nameof(executionSettings)); - } - - if ((executionSettings.filters == null || executionSettings.filters.Length == 0) && executionSettings.filter != null) - { - // Map filter (singular) to filters (plural), for backwards compatibility. - executionSettings.filters = new [] {executionSettings.filter}; - } - - if (executionSettings.targetPlatform == null && executionSettings.filters != null && - executionSettings.filters.Length > 0) - { - executionSettings.targetPlatform = executionSettings.filters[0].targetPlatform; - } - - return ScheduleJob(executionSettings); - } - - public void RegisterCallbacks(T testCallbacks, int priority = 0) where T : ICallbacks - { - if (testCallbacks == null) - { - throw new ArgumentNullException(nameof(testCallbacks)); - } - - m_CallbacksHolder.Add(testCallbacks, priority); - } - - public void UnregisterCallbacks(T testCallbacks) where T : ICallbacks - { - if (testCallbacks == null) - { - throw new ArgumentNullException(nameof(testCallbacks)); - } - - m_CallbacksHolder.Remove(testCallbacks); - } - - internal void RetrieveTestList(ExecutionSettings executionSettings, Action callback) - { - if (executionSettings == null) - { - throw new ArgumentNullException(nameof(executionSettings)); - } - - var firstFilter = executionSettings.filters?.FirstOrDefault() ?? executionSettings.filter; - RetrieveTestList(firstFilter.testMode, callback); - } - - public void RetrieveTestList(TestMode testMode, Action callback) - { - if (callback == null) - { - throw new ArgumentNullException(nameof(callback)); - } - - var platform = ParseTestMode(testMode); - var testAssemblyProvider = new EditorLoadedTestAssemblyProvider(new EditorCompilationInterfaceProxy(), new EditorAssembliesProxy()); - var testAdaptorFactory = new TestAdaptorFactory(); - var testListCache = new TestListCache(testAdaptorFactory, new RemoteTestResultDataFactory(), TestListCacheData.instance); - var testListProvider = new TestListProvider(testAssemblyProvider, new UnityTestAssemblyBuilder()); - var cachedTestListProvider = new CachingTestListProvider(testListProvider, testListCache, testAdaptorFactory); - - var job = new TestListJob(cachedTestListProvider, platform, (testRoot) => - { - callback(testRoot); - }); - job.Start(); - } - - internal static bool IsRunActive() - { - return RunData.instance.isRunning; - } - - private static TestPlatform ParseTestMode(TestMode testMode) - { - return (((testMode & TestMode.EditMode) == TestMode.EditMode) ? TestPlatform.EditMode : 0) | (((testMode & TestMode.PlayMode) == TestMode.PlayMode) ? TestPlatform.PlayMode : 0); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestRunnerApi.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestRunnerApi.cs.meta deleted file mode 100644 index 7ad5fc15..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestRunnerApi.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 68993ba529ae04440916cb7c23bf3279 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestStatus.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestStatus.cs deleted file mode 100644 index f330fa17..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestStatus.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.Api -{ - public enum TestStatus - { - Inconclusive, - Skipped, - Passed, - Failed - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestStatus.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestStatus.cs.meta deleted file mode 100644 index 38bd6af0..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/Api/TestStatus.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9ec94545c5b00344c9bd8e691f15d799 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/AssemblyInfo.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/AssemblyInfo.cs deleted file mode 100644 index 49b650e1..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/AssemblyInfo.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly: AssemblyTitle("UnityEditor.TestRunner")] -[assembly: InternalsVisibleTo("Assembly-CSharp-Editor-testable")] -[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] -[assembly: InternalsVisibleTo("Unity.PerformanceTesting.Editor")] -[assembly: InternalsVisibleTo("Unity.IntegrationTests")] -[assembly: InternalsVisibleTo("UnityEditor.TestRunner.Tests")] -[assembly: InternalsVisibleTo("Unity.TestTools.CodeCoverage.Editor")] -[assembly: InternalsVisibleTo("Unity.PackageManagerUI.Develop.Editor")] -[assembly: InternalsVisibleTo("Unity.PackageManagerUI.Develop.EditorTests")] -[assembly: InternalsVisibleTo("Unity.PackageValidationSuite.Editor")] - -[assembly: AssemblyVersion("1.0.0")] diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/AssemblyInfo.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/AssemblyInfo.cs.meta deleted file mode 100644 index 5e1b8dd1..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/AssemblyInfo.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9db19a04003fca7439552acd4de9baa1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineParser.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineParser.meta deleted file mode 100644 index b5a29bdc..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineParser.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7602252bdb82b8d45ae3483c3a00d3e1 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineParser/CommandLineOption.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineParser/CommandLineOption.cs deleted file mode 100644 index 1a2d98a4..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineParser/CommandLineOption.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Linq; - -namespace UnityEditor.TestRunner.CommandLineParser -{ - internal class CommandLineOption : ICommandLineOption - { - Action m_ArgAction; - - public CommandLineOption(string argName, Action action) - { - ArgName = argName; - m_ArgAction = s => action(); - } - - public CommandLineOption(string argName, Action action) - { - ArgName = argName; - m_ArgAction = action; - } - - public CommandLineOption(string argName, Action action) - { - ArgName = argName; - m_ArgAction = s => action(SplitStringToArray(s)); - } - - public string ArgName { get; private set; } - - public void ApplyValue(string value) - { - m_ArgAction(value); - } - - static string[] SplitStringToArray(string value) - { - if (string.IsNullOrEmpty(value)) - { - return null; - } - - return value.Split(';').ToArray(); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineParser/CommandLineOption.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineParser/CommandLineOption.cs.meta deleted file mode 100644 index 65f32561..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineParser/CommandLineOption.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a3529368f4cd0424a89aa51080a16b06 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineParser/CommandLineOptionSet.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineParser/CommandLineOptionSet.cs deleted file mode 100644 index d08c233d..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineParser/CommandLineOptionSet.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; - -namespace UnityEditor.TestRunner.CommandLineParser -{ - internal class CommandLineOptionSet - { - ICommandLineOption[] m_Options; - - public CommandLineOptionSet(params ICommandLineOption[] options) - { - m_Options = options; - } - - public void Parse(string[] args) - { - var i = 0; - while (i < args.Length) - { - var arg = args[i]; - if (!arg.StartsWith("-")) - { - i++; - continue; - } - - string value = null; - if (i + 1 < args.Length && !args[i + 1].StartsWith("-")) - { - value = args[i + 1]; - i++; - } - - ApplyValueToMatchingOptions(arg, value); - i++; - } - } - - private void ApplyValueToMatchingOptions(string argName, string value) - { - foreach (var option in m_Options) - { - if ("-" + option.ArgName == argName) - { - option.ApplyValue(value); - } - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineParser/CommandLineOptionSet.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineParser/CommandLineOptionSet.cs.meta deleted file mode 100644 index 1db24d0d..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineParser/CommandLineOptionSet.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 139c5eac101a4dc4fb3098e30c29f15e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineParser/ICommandLineOption.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineParser/ICommandLineOption.cs deleted file mode 100644 index 7f699adc..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineParser/ICommandLineOption.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace UnityEditor.TestRunner.CommandLineParser -{ - interface ICommandLineOption - { - string ArgName { get; } - void ApplyValue(string value); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineParser/ICommandLineOption.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineParser/ICommandLineOption.cs.meta deleted file mode 100644 index 613d95f0..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineParser/ICommandLineOption.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f445ca0c614a846449fcd8ae648c24e2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest.meta deleted file mode 100644 index d005718c..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b477d1f29b65a674e9d5cdab4eb72b01 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/Executer.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/Executer.cs deleted file mode 100644 index fe0eb3b3..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/Executer.cs +++ /dev/null @@ -1,134 +0,0 @@ -using System; -using System.Linq; -using UnityEditor.TestRunner.TestLaunchers; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner.CommandLineTest -{ - internal class Executer - { - private ITestRunnerApi m_TestRunnerApi; - private ISettingsBuilder m_SettingsBuilder; - private Action m_LogErrorFormat; - private Action m_LogException; - private Action m_ExitEditorApplication; - private Func m_ScriptCompilationFailedCheck; - - public Executer(ITestRunnerApi testRunnerApi, ISettingsBuilder settingsBuilder, Action logErrorFormat, Action logException, Action exitEditorApplication, Func scriptCompilationFailedCheck) - { - m_TestRunnerApi = testRunnerApi; - m_SettingsBuilder = settingsBuilder; - m_LogErrorFormat = logErrorFormat; - m_LogException = logException; - m_ExitEditorApplication = exitEditorApplication; - m_ScriptCompilationFailedCheck = scriptCompilationFailedCheck; - } - - internal void InitializeAndExecuteRun(string[] commandLineArgs) - { - Api.ExecutionSettings executionSettings; - try - { - executionSettings = m_SettingsBuilder.BuildApiExecutionSettings(commandLineArgs); - if (executionSettings.targetPlatform.HasValue) - RemotePlayerLogController.instance.SetBuildTarget(executionSettings.targetPlatform.Value); - } - catch (SetupException exception) - { - HandleSetupException(exception); - return; - } - - try - { - Debug.Log("Executing tests with settings: " + ExecutionSettingsToString(executionSettings)); - m_TestRunnerApi.Execute(executionSettings); - } - catch (Exception exception) - { - m_LogException(exception); - m_ExitEditorApplication((int)ReturnCodes.RunError); - } - } - - internal ExecutionSettings BuildExecutionSettings(string[] commandLineArgs) - { - return m_SettingsBuilder.BuildExecutionSettings(commandLineArgs); - } - - internal enum ReturnCodes - { - Ok = 0, - Failed = 2, - RunError = 3, - PlatformNotFoundReturnCode = 4 - } - - internal void SetUpCallbacks(ExecutionSettings executionSettings) - { - RemotePlayerLogController.instance.SetLogsDirectory(executionSettings.DeviceLogsDirectory); - - var resultSavingCallback = ScriptableObject.CreateInstance(); - resultSavingCallback.m_ResultFilePath = executionSettings.TestResultsFile; - - var logSavingCallback = ScriptableObject.CreateInstance(); - - m_TestRunnerApi.RegisterCallbacks(resultSavingCallback); - m_TestRunnerApi.RegisterCallbacks(logSavingCallback); - m_TestRunnerApi.RegisterCallbacks(ScriptableObject.CreateInstance(), -10); - } - - internal void ExitOnCompileErrors() - { - if (m_ScriptCompilationFailedCheck()) - { - var handling = s_ExceptionHandlingMapping.First(h => h.m_ExceptionType == SetupException.ExceptionType.ScriptCompilationFailed); - m_LogErrorFormat(handling.m_Message, new object[0]); - m_ExitEditorApplication(handling.m_ReturnCode); - } - } - - void HandleSetupException(SetupException exception) - { - ExceptionHandling handling = s_ExceptionHandlingMapping.FirstOrDefault(h => h.m_ExceptionType == exception.Type) ?? new ExceptionHandling(exception.Type, "Unknown command line test run error. " + exception.Type, ReturnCodes.RunError); - m_LogErrorFormat(handling.m_Message, exception.Details); - m_ExitEditorApplication(handling.m_ReturnCode); - } - - private class ExceptionHandling - { - internal SetupException.ExceptionType m_ExceptionType; - internal string m_Message; - internal int m_ReturnCode; - public ExceptionHandling(SetupException.ExceptionType exceptionType, string message, ReturnCodes returnCode) - { - m_ExceptionType = exceptionType; - m_Message = message; - m_ReturnCode = (int)returnCode; - } - } - - static ExceptionHandling[] s_ExceptionHandlingMapping = new[] - { - new ExceptionHandling(SetupException.ExceptionType.ScriptCompilationFailed, "Scripts had compilation errors.", ReturnCodes.RunError), - new ExceptionHandling(SetupException.ExceptionType.PlatformNotFound, "Test platform not found ({0}).", ReturnCodes.PlatformNotFoundReturnCode), - new ExceptionHandling(SetupException.ExceptionType.TestSettingsFileNotFound, "Test settings file not found at {0}.", ReturnCodes.RunError) - }; - - private static string ExecutionSettingsToString(Api.ExecutionSettings executionSettings) - { - if (executionSettings == null) - { - return "none"; - } - - if (executionSettings.filters == null || executionSettings.filters.Length == 0) - { - return "no filter"; - } - - return "test mode = " + executionSettings.filters[0].testMode; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/Executer.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/Executer.cs.meta deleted file mode 100644 index e57a0103..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/Executer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 083c6a3a5426382449369ddc12b691d8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ExecutionSettings.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ExecutionSettings.cs deleted file mode 100644 index 3ff23563..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ExecutionSettings.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -namespace UnityEditor.TestTools.TestRunner.CommandLineTest -{ - [Serializable] - internal class ExecutionSettings - { - public string TestResultsFile; - public string DeviceLogsDirectory; - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ExecutionSettings.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ExecutionSettings.cs.meta deleted file mode 100644 index 35edc4c9..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ExecutionSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c3a75354f6ceac94ca15ca9d96593290 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ExitCallbacks.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ExitCallbacks.cs deleted file mode 100644 index 0e46f6ea..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ExitCallbacks.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner.CommandLineTest -{ - [Serializable] - internal class ExitCallbacks : ScriptableObject, IErrorCallbacks - { - private bool m_AnyTestsExecuted; - private bool m_RunFailed; - internal static bool preventExit; - - public void RunFinished(ITestResultAdaptor testResults) - { - if (preventExit) - { - return; - } - - if (!m_AnyTestsExecuted) - { - Debug.LogFormat(LogType.Warning, LogOption.NoStacktrace, null, "No tests were executed"); - } - EditorApplication.Exit(m_RunFailed ? (int)Executer.ReturnCodes.Failed : (int)Executer.ReturnCodes.Ok); - } - - public void TestStarted(ITestAdaptor test) - { - if (!test.IsSuite) - { - m_AnyTestsExecuted = true; - } - } - - public void TestFinished(ITestResultAdaptor result) - { - if (!result.Test.IsSuite && (result.TestStatus == TestStatus.Failed)) - { - m_RunFailed = true; - } - } - - public void RunStarted(ITestAdaptor testsToRun) - { - } - - public void OnError(string message) - { - EditorApplication.Exit((int)Executer.ReturnCodes.RunError); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ExitCallbacks.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ExitCallbacks.cs.meta deleted file mode 100644 index 62964631..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ExitCallbacks.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1adaa8dcc4fda3d4cb4d3c8e0cb65d12 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ISettingsBuilder.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ISettingsBuilder.cs deleted file mode 100644 index 557195d0..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ISettingsBuilder.cs +++ /dev/null @@ -1,10 +0,0 @@ -using UnityEditor.TestTools.TestRunner.Api; - -namespace UnityEditor.TestTools.TestRunner.CommandLineTest -{ - interface ISettingsBuilder - { - Api.ExecutionSettings BuildApiExecutionSettings(string[] commandLineArgs); - ExecutionSettings BuildExecutionSettings(string[] commandLineArgs); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ISettingsBuilder.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ISettingsBuilder.cs.meta deleted file mode 100644 index cc0b2480..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ISettingsBuilder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8a13cbeb2099aca47bb456f49845f86c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/LogSavingCallbacks.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/LogSavingCallbacks.cs deleted file mode 100644 index 40a185f5..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/LogSavingCallbacks.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using UnityEditor.TestRunner.TestLaunchers; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner.CommandLineTest -{ - [Serializable] - internal class LogSavingCallbacks : ScriptableObject, ICallbacks - { - public void RunStarted(ITestAdaptor testsToRun) - { - RemotePlayerLogController.instance.StartLogWriters(); - } - - public virtual void RunFinished(ITestResultAdaptor testResults) - { - RemotePlayerLogController.instance.StopLogWriters(); - } - - public void TestStarted(ITestAdaptor test) - { - } - - public void TestFinished(ITestResultAdaptor result) - { - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/LogSavingCallbacks.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/LogSavingCallbacks.cs.meta deleted file mode 100644 index c9681781..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/LogSavingCallbacks.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8d20eedbe40f0ce41a4c4f633f225de8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/LogWriter.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/LogWriter.cs deleted file mode 100644 index 5470fd7e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/LogWriter.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using UnityEditor.DeploymentTargets; -using UnityEditor.Utils; -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner.CommandLineTest -{ - internal class LogWriter : IDisposable - { - private string m_LogsDirectory; - private string m_DeviceID; - private Dictionary m_LogStreams; - private DeploymentTargetLogger m_Logger; - - internal LogWriter(string logsDirectory, string deviceID, DeploymentTargetLogger logger) - { - m_LogStreams = new Dictionary(); - m_Logger = logger; - m_LogsDirectory = logsDirectory; - m_DeviceID = deviceID; - - logger.logMessage += WriteLogToFile; - } - - private void WriteLogToFile(string id, string logLine) - { - StreamWriter logStream; - var streamExists = m_LogStreams.TryGetValue(id, out logStream); - if (!streamExists) - { - var filePath = GetLogFilePath(m_LogsDirectory, m_DeviceID, id); - logStream = CreateLogFile(filePath); - - m_LogStreams.Add(id, logStream); - } - - try - { - if (logLine != null) - logStream.WriteLine(logLine); - } - catch (Exception ex) - { - Debug.LogError($"Writing {id} log failed."); - Debug.LogException(ex); - } - } - - public void Stop() - { - m_Logger.Stop(); - foreach (var logStream in m_LogStreams) - { - logStream.Value.Close(); - } - } - - public void Dispose() - { - Stop(); - } - - private StreamWriter CreateLogFile(string path) - { - Debug.LogFormat(LogType.Log, LogOption.NoStacktrace, null, "Creating {0} device log: {1}", m_DeviceID, path); - StreamWriter streamWriter = null; - try - { - if (!Directory.Exists(path)) - Directory.CreateDirectory(Path.GetDirectoryName(path)); - - streamWriter = File.CreateText(path); - } - catch (Exception ex) - { - Debug.LogError($"Creating device log {path} file failed."); - Debug.LogException(ex); - } - - return streamWriter; - } - - private string GetLogFilePath(string lgosDirectory, string deviceID, string logID) - { - var fileName = "Device-" + deviceID + "-" + logID + ".txt"; - fileName = string.Join("_", fileName.Split(Path.GetInvalidFileNameChars())); - return Paths.Combine(lgosDirectory, fileName); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/LogWriter.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/LogWriter.cs.meta deleted file mode 100644 index 56872b9f..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/LogWriter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 05778dd1de4433d418793b6f3d3c18cf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ResultsSavingCallbacks.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ResultsSavingCallbacks.cs deleted file mode 100644 index a3837bf9..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ResultsSavingCallbacks.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.IO; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEditor.Utils; -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner.CommandLineTest -{ - [Serializable] - internal class ResultsSavingCallbacks : ScriptableObject, ICallbacks - { - [SerializeField] - public string m_ResultFilePath; - - public ResultsSavingCallbacks() - { - this.m_ResultFilePath = GetDefaultResultFilePath(); - } - - public void RunStarted(ITestAdaptor testsToRun) - { - } - - public virtual void RunFinished(ITestResultAdaptor testResults) - { - if (string.IsNullOrEmpty(m_ResultFilePath)) - { - m_ResultFilePath = GetDefaultResultFilePath(); - } - - var resultWriter = new ResultsWriter(); - resultWriter.WriteResultToFile(testResults, m_ResultFilePath); - } - - public void TestStarted(ITestAdaptor test) - { - } - - public void TestFinished(ITestResultAdaptor result) - { - } - - private static string GetDefaultResultFilePath() - { - var fileName = "TestResults-" + DateTime.Now.Ticks + ".xml"; - var projectPath = Directory.GetCurrentDirectory(); - return Paths.Combine(projectPath, fileName); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ResultsSavingCallbacks.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ResultsSavingCallbacks.cs.meta deleted file mode 100644 index ca06f3a3..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ResultsSavingCallbacks.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ef563c5a6ecf64d4193dc144cb7d472a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ResultsWriter.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ResultsWriter.cs deleted file mode 100644 index e713a6e9..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ResultsWriter.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System; -using System.IO; -using System.Xml; -using NUnit.Framework.Interfaces; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner.CommandLineTest -{ - internal class ResultsWriter - { - private const string k_nUnitVersion = "3.5.0.0"; - - private const string k_TestRunNode = "test-run"; - private const string k_Id = "id"; - private const string k_Testcasecount = "testcasecount"; - private const string k_Result = "result"; - private const string k_Total = "total"; - private const string k_Passed = "passed"; - private const string k_Failed = "failed"; - private const string k_Inconclusive = "inconclusive"; - private const string k_Skipped = "skipped"; - private const string k_Asserts = "asserts"; - private const string k_EngineVersion = "engine-version"; - private const string k_ClrVersion = "clr-version"; - private const string k_StartTime = "start-time"; - private const string k_EndTime = "end-time"; - private const string k_Duration = "duration"; - - private const string k_TimeFormat = "u"; - - public void WriteResultToFile(ITestResultAdaptor result, string filePath) - { - Debug.LogFormat(LogType.Log, LogOption.NoStacktrace, null, "Saving results to: {0}", filePath); - - try - { - if (!Directory.Exists(filePath)) - { - CreateDirectory(filePath); - } - - using (var fileStream = File.CreateText(filePath)) - { - WriteResultToStream(result, fileStream); - } - } - catch (Exception ex) - { - Debug.LogError("Saving result file failed."); - Debug.LogException(ex); - } - } - - void CreateDirectory(string filePath) - { - var driectoryPath = Path.GetDirectoryName(filePath); - if (!String.IsNullOrEmpty(driectoryPath)) - { - Directory.CreateDirectory(driectoryPath); - } - } - - public void WriteResultToStream(ITestResultAdaptor result, StreamWriter streamWriter, XmlWriterSettings settings = null) - { - settings = settings ?? new XmlWriterSettings(); - settings.Indent = true; - settings.NewLineOnAttributes = false; - - using (var xmlWriter = XmlWriter.Create(streamWriter, settings)) - { - WriteResultsToXml(result, xmlWriter); - } - } - - void WriteResultsToXml(ITestResultAdaptor result, XmlWriter xmlWriter) - { - // XML format as specified at https://github.com/nunit/docs/wiki/Test-Result-XML-Format - - var testRunNode = new TNode(k_TestRunNode); - - testRunNode.AddAttribute(k_Id, "2"); - testRunNode.AddAttribute(k_Testcasecount, (result.PassCount + result.FailCount + result.SkipCount + result.InconclusiveCount).ToString()); - testRunNode.AddAttribute(k_Result, result.ResultState.ToString()); - testRunNode.AddAttribute(k_Total, (result.PassCount + result.FailCount + result.SkipCount + result.InconclusiveCount).ToString()); - testRunNode.AddAttribute(k_Passed, result.PassCount.ToString()); - testRunNode.AddAttribute(k_Failed, result.FailCount.ToString()); - testRunNode.AddAttribute(k_Inconclusive, result.InconclusiveCount.ToString()); - testRunNode.AddAttribute(k_Skipped, result.SkipCount.ToString()); - testRunNode.AddAttribute(k_Asserts, result.AssertCount.ToString()); - testRunNode.AddAttribute(k_EngineVersion, k_nUnitVersion); - testRunNode.AddAttribute(k_ClrVersion, Environment.Version.ToString()); - testRunNode.AddAttribute(k_StartTime, result.StartTime.ToString(k_TimeFormat)); - testRunNode.AddAttribute(k_EndTime, result.EndTime.ToString(k_TimeFormat)); - testRunNode.AddAttribute(k_Duration, result.Duration.ToString()); - - var resultNode = result.ToXml(); - testRunNode.ChildNodes.Add(resultNode); - - testRunNode.WriteTo(xmlWriter); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ResultsWriter.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ResultsWriter.cs.meta deleted file mode 100644 index 074fe65c..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/ResultsWriter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 29d603e0a726a9043b3503112271844a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/RunData.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/RunData.cs deleted file mode 100644 index 6a469a7b..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/RunData.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.CommandLineTest -{ - internal class RunData : ScriptableSingleton - { - public bool isRunning; - public ExecutionSettings executionSettings; - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/RunData.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/RunData.cs.meta deleted file mode 100644 index 4cfe30e6..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/RunData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3f8c1075884df0249b80e23a0598f9c1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/RunSettings.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/RunSettings.cs deleted file mode 100644 index 9b914c75..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/RunSettings.cs +++ /dev/null @@ -1,29 +0,0 @@ -using UnityEditor.TestTools.TestRunner.Api; - -namespace UnityEditor.TestTools.TestRunner.CommandLineTest -{ - internal class RunSettings : ITestRunSettings - { - private ITestSettings m_TestSettings; - public RunSettings(ITestSettings testSettings) - { - this.m_TestSettings = testSettings; - } - - public void Apply() - { - if (m_TestSettings != null) - { - m_TestSettings.SetupProjectParameters(); - } - } - - public void Dispose() - { - if (m_TestSettings != null) - { - m_TestSettings.Dispose(); - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/RunSettings.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/RunSettings.cs.meta deleted file mode 100644 index 0e241ba8..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/RunSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 59d3f5586b341a74c84c8f72144a4568 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/SettingsBuilder.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/SettingsBuilder.cs deleted file mode 100644 index 11961c91..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/SettingsBuilder.cs +++ /dev/null @@ -1,185 +0,0 @@ -using System; -using System.IO; -using UnityEditor.TestRunner.CommandLineParser; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine.TestTools.TestRunner.GUI; - -namespace UnityEditor.TestTools.TestRunner.CommandLineTest -{ - internal class SettingsBuilder : ISettingsBuilder - { - private ITestSettingsDeserializer m_TestSettingsDeserializer; - private Action m_LogAction; - private Action m_LogWarningAction; - private Func m_FileExistsCheck; - private Func m_ScriptCompilationFailedCheck; - public SettingsBuilder(ITestSettingsDeserializer testSettingsDeserializer, Action logAction, Action logWarningAction, Func fileExistsCheck, Func scriptCompilationFailedCheck) - { - m_LogAction = logAction; - m_LogWarningAction = logWarningAction; - m_FileExistsCheck = fileExistsCheck; - m_ScriptCompilationFailedCheck = scriptCompilationFailedCheck; - m_TestSettingsDeserializer = testSettingsDeserializer; - } - - public Api.ExecutionSettings BuildApiExecutionSettings(string[] commandLineArgs) - { - var quit = false; - string testPlatform = TestMode.EditMode.ToString(); - string[] testFilters = null; - string[] testCategories = null; - string testSettingsFilePath = null; - int testRepetitions = 1; - int? playerHeartbeatTimeout = null; - bool runSynchronously = false; - - var optionSet = new CommandLineOptionSet( - new CommandLineOption("quit", () => { quit = true; }), - new CommandLineOption("testPlatform", platform => { testPlatform = platform; }), - new CommandLineOption("editorTestsFilter", filters => { testFilters = filters; }), - new CommandLineOption("testFilter", filters => { testFilters = filters; }), - new CommandLineOption("editorTestsCategories", catagories => { testCategories = catagories; }), - new CommandLineOption("testCategory", catagories => { testCategories = catagories; }), - new CommandLineOption("testSettingsFile", settingsFilePath => { testSettingsFilePath = settingsFilePath; }), - new CommandLineOption("testRepetitions", reps => { testRepetitions = int.Parse(reps); }), - new CommandLineOption("playerHeartbeatTimeout", timeout => { playerHeartbeatTimeout = int.Parse(timeout); }), - new CommandLineOption("runSynchronously", () => { runSynchronously = true; }) - ); - optionSet.Parse(commandLineArgs); - - DisplayQuitWarningIfQuitIsGiven(quit); - - CheckForScriptCompilationErrors(); - - LogParametersForRun(testPlatform, testFilters, testCategories, testSettingsFilePath); - - var testSettings = GetTestSettings(testSettingsFilePath); - - var filter = new Filter() - { - groupNames = testFilters, - categoryNames = testCategories - }; - - var buildTarget = SetFilterAndGetBuildTarget(testPlatform, filter); - - RerunCallbackData.instance.runFilters = new []{new TestRunnerFilter() - { - categoryNames = filter.categoryNames, - groupNames = filter.groupNames, - testRepetitions = testRepetitions - }}; - - RerunCallbackData.instance.testMode = filter.testMode; - - var settings = new Api.ExecutionSettings() - { - filters = new []{filter}, - overloadTestRunSettings = new RunSettings(testSettings), - targetPlatform = buildTarget, - runSynchronously = runSynchronously - }; - - if (playerHeartbeatTimeout != null) - { - settings.playerHeartbeatTimeout = playerHeartbeatTimeout.Value; - } - - return settings; - } - - public ExecutionSettings BuildExecutionSettings(string[] commandLineArgs) - { - string resultFilePath = null; - string deviceLogsDirectory = null; - - var optionSet = new CommandLineOptionSet( - new CommandLineOption("editorTestsResultFile", filePath => { resultFilePath = filePath; }), - new CommandLineOption("testResults", filePath => { resultFilePath = filePath; }), - new CommandLineOption("deviceLogs", dirPath => { deviceLogsDirectory = dirPath; }) - ); - optionSet.Parse(commandLineArgs); - - return new ExecutionSettings() - { - TestResultsFile = resultFilePath, - DeviceLogsDirectory = deviceLogsDirectory - }; - } - - void DisplayQuitWarningIfQuitIsGiven(bool quitIsGiven) - { - if (quitIsGiven) - { - m_LogWarningAction("Running tests from command line arguments will not work when \"quit\" is specified."); - } - } - - void CheckForScriptCompilationErrors() - { - if (m_ScriptCompilationFailedCheck()) - { - throw new SetupException(SetupException.ExceptionType.ScriptCompilationFailed); - } - } - - void LogParametersForRun(string testPlatform, string[] testFilters, string[] testCategories, string testSettingsFilePath) - { - m_LogAction("Running tests for " + testPlatform); - if (testFilters != null && testFilters.Length > 0) - { - m_LogAction("With test filter: " + string.Join(", ", testFilters)); - } - if (testCategories != null && testCategories.Length > 0) - { - m_LogAction("With test categories: " + string.Join(", ", testCategories)); - } - if (!string.IsNullOrEmpty(testSettingsFilePath)) - { - m_LogAction("With test settings file: " + testSettingsFilePath); - } - } - - ITestSettings GetTestSettings(string testSettingsFilePath) - { - ITestSettings testSettings = null; - if (!string.IsNullOrEmpty(testSettingsFilePath)) - { - if (!m_FileExistsCheck(testSettingsFilePath)) - { - throw new SetupException(SetupException.ExceptionType.TestSettingsFileNotFound, testSettingsFilePath); - } - - testSettings = m_TestSettingsDeserializer.GetSettingsFromJsonFile(testSettingsFilePath); - } - return testSettings; - } - - static BuildTarget? SetFilterAndGetBuildTarget(string testPlatform, Filter filter) - { - BuildTarget? buildTarget = null; - if (testPlatform.ToLower() == "editmode") - { - filter.testMode = TestMode.EditMode; - } - else if (testPlatform.ToLower() == "playmode") - { - filter.testMode = TestMode.PlayMode; - } - else - { - try - { - buildTarget = (BuildTarget)Enum.Parse(typeof(BuildTarget), testPlatform, true); - - filter.testMode = TestMode.PlayMode; - } - catch (ArgumentException) - { - throw new SetupException(SetupException.ExceptionType.PlatformNotFound, testPlatform); - } - } - return buildTarget; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/SettingsBuilder.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/SettingsBuilder.cs.meta deleted file mode 100644 index 1e2f8c93..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/SettingsBuilder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b7468a027a77337478e133b40b42b4f9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/SetupException.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/SetupException.cs deleted file mode 100644 index 33377134..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/SetupException.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; - -namespace UnityEditor.TestTools.TestRunner.CommandLineTest -{ - internal class SetupException : Exception - { - public ExceptionType Type { get; } - public object[] Details { get; } - - public SetupException(ExceptionType type, params object[] details) - { - Type = type; - Details = details; - } - - public enum ExceptionType - { - ScriptCompilationFailed, - PlatformNotFound, - TestSettingsFileNotFound, - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/SetupException.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/SetupException.cs.meta deleted file mode 100644 index bdb235cf..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/SetupException.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 63572993f2104574099a48392460b211 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/TestStarter.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/TestStarter.cs deleted file mode 100644 index bced7274..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/TestStarter.cs +++ /dev/null @@ -1,80 +0,0 @@ -using System; -using System.IO; -using UnityEditor.TestRunner.CommandLineParser; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner.CommandLineTest -{ - [InitializeOnLoad] - static class TestStarter - { - static TestStarter() - { - if (!ShouldRunTests()) - { - return; - } - - if (EditorApplication.isCompiling) - { - return; - } - - executer.ExitOnCompileErrors(); - - if (RunData.instance.isRunning) - { - executer.SetUpCallbacks(RunData.instance.executionSettings); - return; - } - - EditorApplication.update += UpdateWatch; - } - - static void UpdateWatch() - { - EditorApplication.update -= UpdateWatch; - - if (RunData.instance.isRunning) - { - return; - } - - RunData.instance.isRunning = true; - var commandLineArgs = Environment.GetCommandLineArgs(); - RunData.instance.executionSettings = executer.BuildExecutionSettings(commandLineArgs); - executer.SetUpCallbacks(RunData.instance.executionSettings); - executer.InitializeAndExecuteRun(commandLineArgs); - } - - static bool ShouldRunTests() - { - var shouldRunTests = false; - var optionSet = new CommandLineOptionSet( - new CommandLineOption("runTests", () => { shouldRunTests = true; }), - new CommandLineOption("runEditorTests", () => { shouldRunTests = true; }) - ); - optionSet.Parse(Environment.GetCommandLineArgs()); - return shouldRunTests; - } - - static Executer s_Executer; - - static Executer executer - { - get - { - if (s_Executer == null) - { - Func compilationCheck = () => EditorUtility.scriptCompilationFailed; - Action actionLogger = (string msg) => { Debug.LogFormat(LogType.Log, LogOption.NoStacktrace, null, msg); }; - var apiSettingsBuilder = new SettingsBuilder(new TestSettingsDeserializer(() => new TestSettings()), actionLogger, Debug.LogWarning, File.Exists, compilationCheck); - s_Executer = new Executer(ScriptableObject.CreateInstance(), apiSettingsBuilder, Debug.LogErrorFormat, Debug.LogException, EditorApplication.Exit, compilationCheck); - } - - return s_Executer; - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/TestStarter.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/TestStarter.cs.meta deleted file mode 100644 index 4d5dfdc0..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/CommandLineTest/TestStarter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4d616d1a494edd144b262cf6cd5e5fda -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI.meta deleted file mode 100644 index bc9308a4..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 7e609b27ad2caa14c83dd9951b6c13c6 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/AssetsDatabaseHelper.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/AssetsDatabaseHelper.cs deleted file mode 100644 index 0016142e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/AssetsDatabaseHelper.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.GUI -{ - internal class AssetsDatabaseHelper : IAssetsDatabaseHelper - { - public void OpenAssetInItsDefaultExternalEditor(string assetPath, int line) - { - var asset = AssetDatabase.LoadMainAssetAtPath(assetPath); - AssetDatabase.OpenAsset(asset, line); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/AssetsDatabaseHelper.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/AssetsDatabaseHelper.cs.meta deleted file mode 100644 index 4fad1fca..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/AssetsDatabaseHelper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 740b3785866edda4b8d1e1a05570a5f8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/GuiHelper.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/GuiHelper.cs deleted file mode 100644 index e1f23a32..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/GuiHelper.cs +++ /dev/null @@ -1,108 +0,0 @@ -using System; -using System.IO; -using System.Linq; -using System.Reflection; -using System.Text.RegularExpressions; -using UnityEditor.Utils; -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner.GUI -{ - internal class GuiHelper : IGuiHelper - { - public GuiHelper(IMonoCecilHelper monoCecilHelper, IAssetsDatabaseHelper assetsDatabaseHelper) - { - MonoCecilHelper = monoCecilHelper; - AssetsDatabaseHelper = assetsDatabaseHelper; - } - - protected IMonoCecilHelper MonoCecilHelper { get; private set; } - public IAssetsDatabaseHelper AssetsDatabaseHelper { get; private set; } - - public void OpenScriptInExternalEditor(Type type, MethodInfo method) - { - var fileOpenInfo = GetFileOpenInfo(type, method); - - if (string.IsNullOrEmpty(fileOpenInfo.FilePath)) - { - Debug.LogWarning("Failed to open test method source code in external editor. Inconsistent filename and yield return operator in target method."); - - return; - } - - if (fileOpenInfo.LineNumber == 1) - { - Debug.LogWarning("Failed to get a line number for unity test method. So please find it in opened file in external editor."); - } - - AssetsDatabaseHelper.OpenAssetInItsDefaultExternalEditor(fileOpenInfo.FilePath, fileOpenInfo.LineNumber); - } - - public IFileOpenInfo GetFileOpenInfo(Type type, MethodInfo method) - { - const string fileExtension = ".cs"; - - var fileOpenInfo = MonoCecilHelper.TryGetCecilFileOpenInfo(type, method); - if (string.IsNullOrEmpty(fileOpenInfo.FilePath)) - { - var dirPath = Paths.UnifyDirectorySeparator(Application.dataPath); - var allCsFiles = Directory.GetFiles(dirPath, $"*{fileExtension}", SearchOption.AllDirectories) - .Select(Paths.UnifyDirectorySeparator); - - var fileName = allCsFiles.FirstOrDefault(x => - x.Split(Path.DirectorySeparatorChar).Last().Equals(string.Concat(type.Name, fileExtension))); - - fileOpenInfo.FilePath = fileName ?? string.Empty; - } - - fileOpenInfo.FilePath = FilePathToAssetsRelativeAndUnified(fileOpenInfo.FilePath); - - return fileOpenInfo; - } - - public string FilePathToAssetsRelativeAndUnified(string filePath) - { - if (string.IsNullOrEmpty(filePath)) - return string.Empty; - - filePath = Paths.UnifyDirectorySeparator(filePath); - var length = Paths.UnifyDirectorySeparator(Application.dataPath).Length - "Assets".Length; - - return filePath.Substring(length); - } - - public bool OpenScriptInExternalEditor(string stacktrace) - { - if (string.IsNullOrEmpty(stacktrace)) - return false; - - var regex = new Regex("in (?.*):{1}(?[0-9]+)"); - - var matchingLines = stacktrace.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).Where(x => regex.IsMatch(x)).ToList(); - if (!matchingLines.Any()) - return false; - - var fileOpenInfos = matchingLines - .Select(x => regex.Match(x)) - .Select(x => - new FileOpenInfo - { - FilePath = x.Groups["path"].Value, - LineNumber = int.Parse(x.Groups["line"].Value) - }).ToList(); - - var fileOpenInfo = fileOpenInfos - .FirstOrDefault(openInfo => !string.IsNullOrEmpty(openInfo.FilePath) && File.Exists(openInfo.FilePath)); - - if (fileOpenInfo == null) - { - return false; - } - - var filePath = FilePathToAssetsRelativeAndUnified(fileOpenInfo.FilePath); - AssetsDatabaseHelper.OpenAssetInItsDefaultExternalEditor(filePath, fileOpenInfo.LineNumber); - - return true; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/GuiHelper.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/GuiHelper.cs.meta deleted file mode 100644 index a1512d06..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/GuiHelper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d0138170d24533e47b8e6c250c6d7fbc -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/IAssetsDatabaseHelper.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/IAssetsDatabaseHelper.cs deleted file mode 100644 index 3e26c53a..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/IAssetsDatabaseHelper.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.GUI -{ - internal interface IAssetsDatabaseHelper - { - void OpenAssetInItsDefaultExternalEditor(string assetPath, int line); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/IAssetsDatabaseHelper.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/IAssetsDatabaseHelper.cs.meta deleted file mode 100644 index 622fe68d..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/IAssetsDatabaseHelper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 208e46d59ff6e304db0318377d20f5a1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/IGuiHelper.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/IGuiHelper.cs deleted file mode 100644 index a87fb8df..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/IGuiHelper.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Reflection; - -namespace UnityEditor.TestTools.TestRunner.GUI -{ - internal interface IGuiHelper - { - bool OpenScriptInExternalEditor(string stacktrace); - void OpenScriptInExternalEditor(Type type, MethodInfo method); - IFileOpenInfo GetFileOpenInfo(Type type, MethodInfo method); - string FilePathToAssetsRelativeAndUnified(string filePath); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/IGuiHelper.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/IGuiHelper.cs.meta deleted file mode 100644 index 9c6e266b..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/IGuiHelper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fd57cf917f61bbb42b8f030436426ddd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder.meta deleted file mode 100644 index e6829237..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 07ea0326ed848fb4489187cb58f96113 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder/RenderingOptions.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder/RenderingOptions.cs deleted file mode 100644 index 34118d65..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder/RenderingOptions.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.GUI -{ - internal class RenderingOptions - { - public string nameFilter; - public bool showSucceeded; - public bool showFailed; - public bool showIgnored; - public bool showNotRunned; - public string[] categories; - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder/RenderingOptions.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder/RenderingOptions.cs.meta deleted file mode 100644 index 57e67487..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder/RenderingOptions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 87357ff0dec4ef348a295235835c6ee4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder/ResultSummarizer.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder/ResultSummarizer.cs deleted file mode 100644 index cee81dab..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder/ResultSummarizer.cs +++ /dev/null @@ -1,175 +0,0 @@ -// **************************************************************** -// Based on nUnit 2.6.2 (http://www.nunit.org/) -// **************************************************************** - -using System; -using System.Collections.Generic; -using UnityEngine.TestTools.TestRunner.GUI; - -namespace UnityEditor.TestTools.TestRunner.GUI -{ - /// - /// Summary description for ResultSummarizer. - /// - internal class ResultSummarizer - { - private int m_ErrorCount = -1; - private int m_FailureCount; - private int m_IgnoreCount = -1; - private int m_InconclusiveCount = -1; - private int m_NotRunnable = -1; - private int m_ResultCount; - private int m_SkipCount; - private int m_SuccessCount; - private int m_TestsRun; - - private TimeSpan m_Duration = TimeSpan.FromSeconds(0); - - public ResultSummarizer(IEnumerable results) - { - foreach (var result in results) - Summarize(result); - } - - public bool success - { - get { return m_FailureCount == 0; } - } - - /// - /// Returns the number of test cases for which results - /// have been summarized. Any tests excluded by use of - /// Category or Explicit attributes are not counted. - /// - public int ResultCount - { - get { return m_ResultCount; } - } - - /// - /// Returns the number of test cases actually run, which - /// is the same as ResultCount, less any Skipped, Ignored - /// or NonRunnable tests. - /// - public int TestsRun - { - get { return m_TestsRun; } - } - - /// - /// Returns the number of tests that passed - /// - public int Passed - { - get { return m_SuccessCount; } - } - - /// - /// Returns the number of test cases that had an error. - /// - public int errors - { - get { return m_ErrorCount; } - } - - /// - /// Returns the number of test cases that failed. - /// - public int failures - { - get { return m_FailureCount; } - } - - /// - /// Returns the number of test cases that failed. - /// - public int inconclusive - { - get { return m_InconclusiveCount; } - } - - /// - /// Returns the number of test cases that were not runnable - /// due to errors in the signature of the class or method. - /// Such tests are also counted as Errors. - /// - public int notRunnable - { - get { return m_NotRunnable; } - } - - /// - /// Returns the number of test cases that were skipped. - /// - public int Skipped - { - get { return m_SkipCount; } - } - - public int ignored - { - get { return m_IgnoreCount; } - } - - public double duration - { - get { return m_Duration.TotalSeconds; } - } - - public int testsNotRun - { - get { return m_SkipCount + m_IgnoreCount + m_NotRunnable; } - } - - public void Summarize(TestRunnerResult result) - { - m_Duration += TimeSpan.FromSeconds(result.duration); - m_ResultCount++; - - if (result.resultStatus != TestRunnerResult.ResultStatus.NotRun) - { - //TODO implement missing features - // if(result.IsIgnored) - // { - // m_IgnoreCount++; - // return; - // } - - m_SkipCount++; - return; - } - - switch (result.resultStatus) - { - case TestRunnerResult.ResultStatus.Passed: - m_SuccessCount++; - m_TestsRun++; - break; - case TestRunnerResult.ResultStatus.Failed: - m_FailureCount++; - m_TestsRun++; - break; - //TODO implement missing features - // case TestResultState.Error: - // case TestResultState.Cancelled: - // m_ErrorCount++; - // m_TestsRun++; - // break; - // case TestResultState.Inconclusive: - // m_InconclusiveCount++; - // m_TestsRun++; - // break; - // case TestResultState.NotRunnable: - // m_NotRunnable++; - // // errorCount++; - // break; - // case TestResultState.Ignored: - // m_IgnoreCount++; - // break; - default: - m_SkipCount++; - break; - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder/ResultSummarizer.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder/ResultSummarizer.cs.meta deleted file mode 100644 index bc4b465e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder/ResultSummarizer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 95a2914724952ef40bb590d0607fc878 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder/TestFilterSettings.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder/TestFilterSettings.cs deleted file mode 100644 index 576a685b..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder/TestFilterSettings.cs +++ /dev/null @@ -1,105 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using UnityEngine; -using UnityEngine.TestTools.TestRunner.GUI; - -namespace UnityEditor.TestTools.TestRunner.GUI -{ - internal class TestFilterSettings - { - public bool showSucceeded; - public bool showFailed; - public bool showIgnored; - public bool showNotRun; - - public string filterByName; - public int filterByCategory; - - private GUIContent m_SucceededBtn; - private GUIContent m_FailedBtn; - private GUIContent m_IgnoredBtn; - private GUIContent m_NotRunBtn; - - public string[] availableCategories; - - private readonly string m_PrefsKey; - - public TestFilterSettings(string prefsKey) - { - availableCategories = null; - m_PrefsKey = prefsKey; - Load(); - UpdateCounters(Enumerable.Empty()); - } - - public void Load() - { - showSucceeded = EditorPrefs.GetBool(m_PrefsKey + ".ShowSucceeded", true); - showFailed = EditorPrefs.GetBool(m_PrefsKey + ".ShowFailed", true); - showIgnored = EditorPrefs.GetBool(m_PrefsKey + ".ShowIgnored", true); - showNotRun = EditorPrefs.GetBool(m_PrefsKey + ".ShowNotRun", true); - filterByName = EditorPrefs.GetString(m_PrefsKey + ".FilterByName", string.Empty); - filterByCategory = EditorPrefs.GetInt(m_PrefsKey + ".FilterByCategory", 0); - } - - public void Save() - { - EditorPrefs.SetBool(m_PrefsKey + ".ShowSucceeded", showSucceeded); - EditorPrefs.SetBool(m_PrefsKey + ".ShowFailed", showFailed); - EditorPrefs.SetBool(m_PrefsKey + ".ShowIgnored", showIgnored); - EditorPrefs.SetBool(m_PrefsKey + ".ShowNotRun", showNotRun); - EditorPrefs.SetString(m_PrefsKey + ".FilterByName", filterByName); - EditorPrefs.SetInt(m_PrefsKey + ".FilterByCategory", filterByCategory); - } - - public void UpdateCounters(IEnumerable results) - { - var summary = new ResultSummarizer(results); - - m_SucceededBtn = new GUIContent(summary.Passed.ToString(), Icons.s_SuccessImg, "Show tests that succeeded"); - m_FailedBtn = new GUIContent((summary.errors + summary.failures + summary.inconclusive).ToString(), Icons.s_FailImg, "Show tests that failed"); - m_IgnoredBtn = new GUIContent((summary.ignored + summary.notRunnable).ToString(), Icons.s_IgnoreImg, "Show tests that are ignored"); - m_NotRunBtn = new GUIContent((summary.testsNotRun - summary.ignored - summary.notRunnable).ToString(), Icons.s_UnknownImg, "Show tests that didn't run"); - } - - public string[] GetSelectedCategories() - { - if (availableCategories == null) - return new string[0]; - - return availableCategories.Where((c, i) => (filterByCategory & (1 << i)) != 0).ToArray(); - } - - public void OnGUI() - { - EditorGUI.BeginChangeCheck(); - - filterByName = GUILayout.TextField(filterByName, "ToolbarSeachTextField", GUILayout.MinWidth(100), GUILayout.MaxWidth(250), GUILayout.ExpandWidth(true)); - if (GUILayout.Button(GUIContent.none, string.IsNullOrEmpty(filterByName) ? "ToolbarSeachCancelButtonEmpty" : "ToolbarSeachCancelButton")) - filterByName = string.Empty; - - if (availableCategories != null && availableCategories.Length > 0) - filterByCategory = EditorGUILayout.MaskField(filterByCategory, availableCategories, EditorStyles.toolbarDropDown, GUILayout.MaxWidth(90)); - - showSucceeded = GUILayout.Toggle(showSucceeded, m_SucceededBtn, EditorStyles.toolbarButton); - showFailed = GUILayout.Toggle(showFailed, m_FailedBtn, EditorStyles.toolbarButton); - showIgnored = GUILayout.Toggle(showIgnored, m_IgnoredBtn, EditorStyles.toolbarButton); - showNotRun = GUILayout.Toggle(showNotRun, m_NotRunBtn, EditorStyles.toolbarButton); - - if (EditorGUI.EndChangeCheck()) - Save(); - } - - public RenderingOptions BuildRenderingOptions() - { - var options = new RenderingOptions(); - options.showSucceeded = showSucceeded; - options.showFailed = showFailed; - options.showIgnored = showIgnored; - options.showNotRunned = showNotRun; - options.nameFilter = filterByName; - options.categories = GetSelectedCategories(); - return options; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder/TestFilterSettings.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder/TestFilterSettings.cs.meta deleted file mode 100644 index af8b799a..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder/TestFilterSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 046c3854296c5ec48bac50da6ca248ec -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder/TestTreeViewBuilder.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder/TestTreeViewBuilder.cs deleted file mode 100644 index 86d42f3a..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder/TestTreeViewBuilder.cs +++ /dev/null @@ -1,111 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using UnityEditor.IMGUI.Controls; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine.TestRunner.NUnitExtensions; -using UnityEngine.TestTools.TestRunner.GUI; -using UnityEngine.TestRunner.NUnitExtensions.Filters; - -namespace UnityEditor.TestTools.TestRunner.GUI -{ - internal class TestTreeViewBuilder - { - public List results = new List(); - private readonly List m_OldTestResultList; - private readonly TestRunnerUIFilter m_UIFilter; - private readonly ITestAdaptor m_TestListRoot; - - private readonly List m_AvailableCategories = new List(); - - public string[] AvailableCategories - { - get { return m_AvailableCategories.Distinct().OrderBy(a => a).ToArray(); } - } - - public TestTreeViewBuilder(ITestAdaptor tests, List oldTestResultResults, TestRunnerUIFilter uiFilter) - { - m_AvailableCategories.Add(CategoryFilterExtended.k_DefaultCategory); - m_OldTestResultList = oldTestResultResults; - m_TestListRoot = tests; - m_UIFilter = uiFilter; - } - - public TreeViewItem BuildTreeView(TestFilterSettings settings, bool sceneBased, string sceneName) - { - var rootItem = new TreeViewItem(int.MaxValue, 0, null, "Invisible Root Item"); - ParseTestTree(0, rootItem, m_TestListRoot); - return rootItem; - } - - private bool IsFilteredOutByUIFilter(ITestAdaptor test, TestRunnerResult result) - { - if (m_UIFilter.PassedHidden && result.resultStatus == TestRunnerResult.ResultStatus.Passed) - return true; - if (m_UIFilter.FailedHidden && (result.resultStatus == TestRunnerResult.ResultStatus.Failed || result.resultStatus == TestRunnerResult.ResultStatus.Inconclusive)) - return true; - if (m_UIFilter.NotRunHidden && (result.resultStatus == TestRunnerResult.ResultStatus.NotRun || result.resultStatus == TestRunnerResult.ResultStatus.Skipped)) - return true; - if (m_UIFilter.CategoryFilter.Length > 0) - return !test.Categories.Any(category => m_UIFilter.CategoryFilter.Contains(category)); - return false; - } - - private void ParseTestTree(int depth, TreeViewItem rootItem, ITestAdaptor testElement) - { - m_AvailableCategories.AddRange(testElement.Categories); - - var testElementId = testElement.UniqueName; - if (!testElement.HasChildren) - { - var result = m_OldTestResultList.FirstOrDefault(a => a.uniqueId == testElementId); - - if (result != null && - (result.ignoredOrSkipped - || result.notRunnable - || testElement.RunState == RunState.NotRunnable - || testElement.RunState == RunState.Ignored - || testElement.RunState == RunState.Skipped - ) - ) - { - //if the test was or becomes ignored or not runnable, we recreate the result in case it has changed - result = null; - } - if (result == null) - { - result = new TestRunnerResult(testElement); - } - results.Add(result); - - var test = new TestTreeViewItem(testElement, depth, rootItem); - if (!IsFilteredOutByUIFilter(testElement, result)) - rootItem.AddChild(test); - test.SetResult(result); - return; - } - - var groupResult = m_OldTestResultList.FirstOrDefault(a => a.uniqueId == testElementId); - if (groupResult == null) - { - groupResult = new TestRunnerResult(testElement); - } - - results.Add(groupResult); - var group = new TestTreeViewItem(testElement, depth, rootItem); - group.SetResult(groupResult); - - depth++; - foreach (var child in testElement.Children) - { - ParseTestTree(depth, group, child); - } - - - if (testElement.IsTestAssembly && !testElement.HasChildren) - return; - - if (group.hasChildren) - rootItem.AddChild(group); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder/TestTreeViewBuilder.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder/TestTreeViewBuilder.cs.meta deleted file mode 100644 index 68a6c250..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListBuilder/TestTreeViewBuilder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e17c88b021c2a4c409b3f15b0d80ac62 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListGuiHelper.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListGuiHelper.cs deleted file mode 100644 index 05cadbac..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListGuiHelper.cs +++ /dev/null @@ -1,135 +0,0 @@ -using System; -using System.IO; -using System.Linq; -using UnityEditor.ProjectWindowCallback; -using UnityEditor.Scripting.ScriptCompilation; -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner.GUI -{ - internal class TestListGUIHelper - { - private const string kResourcesTemplatePath = "Resources/ScriptTemplates"; - private const string kAssemblyDefinitionTestTemplate = "92-Assembly Definition-NewTestAssembly.asmdef.txt"; - - private const string kAssemblyDefinitionEditModeTestTemplate = - "92-Assembly Definition-NewEditModeTestAssembly.asmdef.txt"; - - private const string kTestScriptTemplate = "83-C# Script-NewTestScript.cs.txt"; - private const string kNewTestScriptName = "NewTestScript.cs"; - private const string kNunit = "nunit.framework.dll"; - - [MenuItem("Assets/Create/Testing/Tests Assembly Folder", false, 83)] - public static void MenuItemAddFolderAndAsmDefForTesting() - { - AddFolderAndAsmDefForTesting(); - } - - [MenuItem("Assets/Create/Testing/Tests Assembly Folder", true, 83)] - public static bool MenuItemAddFolderAndAsmDefForTestingWithValidation() - { - return !SelectedFolderContainsTestAssembly(); - } - - public static void AddFolderAndAsmDefForTesting(bool isEditorOnly = false) - { - ProjectWindowUtil.CreateFolderWithTemplates("Tests", - isEditorOnly ? kAssemblyDefinitionEditModeTestTemplate : kAssemblyDefinitionTestTemplate); - } - - public static bool SelectedFolderContainsTestAssembly() - { - var theNearestCustomScriptAssembly = GetTheNearestCustomScriptAssembly(); - if (theNearestCustomScriptAssembly != null) - { - return theNearestCustomScriptAssembly.PrecompiledReferences != null && theNearestCustomScriptAssembly.PrecompiledReferences.Any(x => Path.GetFileName(x) == kNunit); - } - - return false; - } - - [MenuItem("Assets/Create/Testing/C# Test Script", false, 83)] - public static void AddTest() - { - var basePath = Path.Combine(EditorApplication.applicationContentsPath, kResourcesTemplatePath); - var destPath = Path.Combine(GetActiveFolderPath(), kNewTestScriptName); - var templatePath = Path.Combine(basePath, kTestScriptTemplate); - var icon = EditorGUIUtility.IconContent("cs Script Icon").image as Texture2D; - ProjectWindowUtil.StartNameEditingIfProjectWindowExists(0, - ScriptableObject.CreateInstance(), destPath, icon, templatePath); - - AssetDatabase.Refresh(); - } - - [MenuItem("Assets/Create/Testing/C# Test Script", true, 83)] - public static bool CanAddScriptAndItWillCompile() - { - return CanAddEditModeTestScriptAndItWillCompile() || CanAddPlayModeTestScriptAndItWillCompile(); - } - - public static bool CanAddEditModeTestScriptAndItWillCompile() - { - var theNearestCustomScriptAssembly = GetTheNearestCustomScriptAssembly(); - if (theNearestCustomScriptAssembly != null) - { - return (theNearestCustomScriptAssembly.AssemblyFlags & AssemblyFlags.EditorOnly) == - AssemblyFlags.EditorOnly; - } - - var activeFolderPath = GetActiveFolderPath(); - return activeFolderPath.ToLower().Contains("/editor"); - } - - public static bool CanAddPlayModeTestScriptAndItWillCompile() - { - if (PlayerSettings.playModeTestRunnerEnabled) - { - return true; - } - - var theNearestCustomScriptAssembly = GetTheNearestCustomScriptAssembly(); - - if (theNearestCustomScriptAssembly == null) - { - return false; - } - - var hasTestAssemblyFlag = theNearestCustomScriptAssembly.PrecompiledReferences != null && theNearestCustomScriptAssembly.PrecompiledReferences.Any(x => Path.GetFileName(x) == kNunit);; - var editorOnlyAssembly = (theNearestCustomScriptAssembly.AssemblyFlags & AssemblyFlags.EditorOnly) != 0; - - return hasTestAssemblyFlag && !editorOnlyAssembly; - } - - public static string GetActiveFolderPath() - { - var path = "Assets"; - - foreach (var obj in Selection.GetFiltered(typeof(UnityEngine.Object), SelectionMode.Assets)) - { - path = AssetDatabase.GetAssetPath(obj); - if (!string.IsNullOrEmpty(path) && File.Exists(path)) - { - path = Path.GetDirectoryName(path); - break; - } - } - return path; - } - - private static CustomScriptAssembly GetTheNearestCustomScriptAssembly() - { - CustomScriptAssembly findCustomScriptAssemblyFromScriptPath; - try - { - findCustomScriptAssemblyFromScriptPath = - EditorCompilationInterface.Instance.FindCustomScriptAssemblyFromScriptPath( - Path.Combine(GetActiveFolderPath(), "Foo.cs")); - } - catch (Exception) - { - return null; - } - return findCustomScriptAssemblyFromScriptPath; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListGuiHelper.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListGuiHelper.cs.meta deleted file mode 100644 index 70d8f193..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListGuiHelper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 97a05971510726f438153cd4987526fb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView.meta deleted file mode 100644 index 63ce2ad0..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 68cb547af0187634aad591a09c01cd5b -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView/Icons.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView/Icons.cs deleted file mode 100644 index 52c94a51..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView/Icons.cs +++ /dev/null @@ -1,24 +0,0 @@ -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner.GUI -{ - internal static class Icons - { - public static readonly Texture2D s_FailImg; - public static readonly Texture2D s_IgnoreImg; - public static readonly Texture2D s_SuccessImg; - public static readonly Texture2D s_UnknownImg; - public static readonly Texture2D s_InconclusiveImg; - public static readonly Texture2D s_StopwatchImg; - - static Icons() - { - s_FailImg = EditorGUIUtility.IconContent("TestFailed").image as Texture2D; - s_IgnoreImg = EditorGUIUtility.IconContent("TestIgnored").image as Texture2D; - s_SuccessImg = EditorGUIUtility.IconContent("TestPassed").image as Texture2D; - s_UnknownImg = EditorGUIUtility.IconContent("TestNormal").image as Texture2D; - s_InconclusiveImg = EditorGUIUtility.IconContent("TestInconclusive").image as Texture2D; - s_StopwatchImg = EditorGUIUtility.IconContent("TestStopwatch").image as Texture2D; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView/Icons.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView/Icons.cs.meta deleted file mode 100644 index 3ddb7ee1..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView/Icons.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 27769e9b00b038d47aefe306a4d20bec -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView/TestListTreeViewDataSource.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView/TestListTreeViewDataSource.cs deleted file mode 100644 index 0fc9409c..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView/TestListTreeViewDataSource.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System.Collections.Generic; -using NUnit.Framework.Interfaces; -using UnityEditor.IMGUI.Controls; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine.SceneManagement; -using UnityEngine.TestTools.TestRunner; -using UnityEngine.TestTools.TestRunner.GUI; - -namespace UnityEditor.TestTools.TestRunner.GUI -{ - internal class TestListTreeViewDataSource : TreeViewDataSource - { - private bool m_ExpandTreeOnCreation; - private readonly TestListGUI m_TestListGUI; - private ITestAdaptor m_RootTest; - - public TestListTreeViewDataSource(TreeViewController testListTree, TestListGUI testListGUI, ITestAdaptor rootTest) : base(testListTree) - { - showRootItem = false; - rootIsCollapsable = false; - m_TestListGUI = testListGUI; - m_RootTest = rootTest; - } - - public void UpdateRootTest(ITestAdaptor rootTest) - { - m_RootTest = rootTest; - } - - public override void FetchData() - { - var sceneName = SceneManager.GetActiveScene().name; - if (sceneName.StartsWith("InitTestScene")) - sceneName = PlaymodeTestsController.GetController().settings.originalScene; - - var testListBuilder = new TestTreeViewBuilder(m_RootTest, m_TestListGUI.newResultList, m_TestListGUI.m_TestRunnerUIFilter); - - m_RootItem = testListBuilder.BuildTreeView(null, false, sceneName); - SetExpanded(m_RootItem, true); - if (m_RootItem.hasChildren && m_RootItem.children.Count == 1) - SetExpanded(m_RootItem.children[0], true); - - if (m_ExpandTreeOnCreation) - SetExpandedWithChildren(m_RootItem, true); - - m_TestListGUI.newResultList = new List(testListBuilder.results); - m_TestListGUI.m_TestRunnerUIFilter.availableCategories = testListBuilder.AvailableCategories; - m_NeedRefreshRows = true; - } - - public override bool IsRenamingItemAllowed(TreeViewItem item) - { - return false; - } - - public void ExpandTreeOnCreation() - { - m_ExpandTreeOnCreation = true; - } - - public override bool IsExpandable(TreeViewItem item) - { - if (item is TestTreeViewItem) - return ((TestTreeViewItem)item).IsGroupNode; - return base.IsExpandable(item); - } - - protected override List Search(TreeViewItem rootItem, string search) - { - var result = new List(); - - if (rootItem.hasChildren) - { - foreach (var child in rootItem.children) - { - SearchTestTree(child, search, result); - } - } - return result; - } - - protected void SearchTestTree(TreeViewItem item, string search, IList searchResult) - { - var testItem = item as TestTreeViewItem; - if (!testItem.IsGroupNode) - { - if (testItem.FullName.ToLower().Contains(search)) - { - searchResult.Add(item); - } - } - else if (item.children != null) - { - foreach (var child in item.children) - SearchTestTree(child, search, searchResult); - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView/TestListTreeViewDataSource.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView/TestListTreeViewDataSource.cs.meta deleted file mode 100644 index 5ec53327..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView/TestListTreeViewDataSource.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ce87c287371edde43a4b5fcfdee7b9ef -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView/TestListTreeViewGUI.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView/TestListTreeViewGUI.cs deleted file mode 100644 index 66578130..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView/TestListTreeViewGUI.cs +++ /dev/null @@ -1,11 +0,0 @@ -using UnityEditor.IMGUI.Controls; - -namespace UnityEditor.TestTools.TestRunner.GUI -{ - internal class TestListTreeViewGUI : TreeViewGUI - { - public TestListTreeViewGUI(TreeViewController testListTree) : base(testListTree) - { - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView/TestListTreeViewGUI.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView/TestListTreeViewGUI.cs.meta deleted file mode 100644 index ed09e250..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView/TestListTreeViewGUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 52c907c81459f324497af504b84fd557 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView/TestTreeViewItem.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView/TestTreeViewItem.cs deleted file mode 100644 index ccc5fc25..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView/TestTreeViewItem.cs +++ /dev/null @@ -1,134 +0,0 @@ -using System; -using System.Reflection; -using System.Text; -using UnityEditor.IMGUI.Controls; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine.TestTools.TestRunner.GUI; - -namespace UnityEditor.TestTools.TestRunner.GUI -{ - internal sealed class TestTreeViewItem : TreeViewItem - { - public TestRunnerResult result; - internal ITestAdaptor m_Test; - - public Type type; - public MethodInfo method; - - private const int k_ResultTestMaxLength = 15000; - - public bool IsGroupNode { get { return m_Test.IsSuite; } } - - public string FullName { get { return m_Test.FullName; } } - - public string GetAssemblyName() - { - var test = m_Test; - while (test != null) - { - if (test.IsTestAssembly) - { - return test.FullName; - } - - test = test.Parent; - } - - return null; - } - - public TestTreeViewItem(ITestAdaptor test, int depth, TreeViewItem parent) - : base(GetId(test), depth, parent, test.Name) - { - m_Test = test; - - if (test.TypeInfo != null) - { - type = test.TypeInfo.Type; - } - if (test.Method != null) - { - method = test.Method.MethodInfo; - } - - displayName = test.Name.Replace("\n", ""); - icon = Icons.s_UnknownImg; - } - - private static int GetId(ITestAdaptor test) - { - return test.UniqueName.GetHashCode(); - } - - public void SetResult(TestRunnerResult testResult) - { - result = testResult; - result.SetResultChangedCallback(ResultUpdated); - ResultUpdated(result); - } - - public string GetResultText() - { - var durationString = String.Format("{0:0.000}", result.duration); - var sb = new StringBuilder(string.Format("{0} ({1}s)", displayName.Trim(), durationString)); - if (!string.IsNullOrEmpty(result.description)) - { - sb.AppendFormat("\n{0}", result.description); - } - if (!string.IsNullOrEmpty(result.messages)) - { - sb.Append("\n---\n"); - sb.Append(result.messages.Trim()); - } - if (!string.IsNullOrEmpty(result.stacktrace)) - { - sb.Append("\n---\n"); - sb.Append(result.stacktrace.Trim()); - } - if (!string.IsNullOrEmpty(result.output)) - { - sb.Append("\n---\n"); - sb.Append(result.output.Trim()); - } - if (sb.Length > k_ResultTestMaxLength) - { - sb.Length = k_ResultTestMaxLength; - sb.AppendFormat("...\n\n---MESSAGE TRUNCATED AT {0} CHARACTERS---", k_ResultTestMaxLength); - } - return sb.ToString().Trim(); - } - - private void ResultUpdated(TestRunnerResult testResult) - { - switch (testResult.resultStatus) - { - case TestRunnerResult.ResultStatus.Passed: - icon = Icons.s_SuccessImg; - break; - case TestRunnerResult.ResultStatus.Failed: - icon = Icons.s_FailImg; - break; - case TestRunnerResult.ResultStatus.Inconclusive: - icon = Icons.s_InconclusiveImg; - break; - case TestRunnerResult.ResultStatus.Skipped: - icon = Icons.s_IgnoreImg; - break; - default: - if (testResult.ignoredOrSkipped) - { - icon = Icons.s_IgnoreImg; - } - else if (testResult.notRunnable) - { - icon = Icons.s_FailImg; - } - else - { - icon = Icons.s_UnknownImg; - } - break; - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView/TestTreeViewItem.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView/TestTreeViewItem.cs.meta deleted file mode 100644 index 1a29abe9..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestListTreeView/TestTreeViewItem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ce567ddbf30368344bc7b80e20cac36e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestRunnerResult.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestRunnerResult.cs deleted file mode 100644 index b70d0ab5..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestRunnerResult.cs +++ /dev/null @@ -1,149 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine.TestTools.TestRunner.GUI; - -namespace UnityEditor.TestTools.TestRunner.GUI -{ - [Serializable] - internal class TestRunnerResult : TestRunnerFilter.IClearableResult - { - public string id; - public string uniqueId; - public string name; - public string fullName; - public ResultStatus resultStatus = ResultStatus.NotRun; - public float duration; - public string messages; - public string output; - public string stacktrace; - public bool notRunnable; - public bool ignoredOrSkipped; - public string description; - public bool isSuite; - public List categories; - public string parentId; - public string parentUniqueId; - - //This field is suppose to mark results from before domain reload - //Such result is outdated because the code might haev changed - //This field will get reset every time a domain reload happens - [NonSerialized] - public bool notOutdated; - - protected Action m_OnResultUpdate; - - internal TestRunnerResult(ITestAdaptor test) - { - id = test.Id; - uniqueId = test.UniqueName; - - fullName = test.FullName; - name = test.Name; - description = test.Description; - isSuite = test.IsSuite; - - ignoredOrSkipped = test.RunState == RunState.Ignored || test.RunState == RunState.Skipped; - notRunnable = test.RunState == RunState.NotRunnable; - - if (ignoredOrSkipped) - { - messages = test.SkipReason; - } - if (notRunnable) - { - resultStatus = ResultStatus.Failed; - messages = test.SkipReason; - } - categories = test.Categories.ToList(); - parentId = test.ParentId; - parentUniqueId = test.ParentUniqueName; - } - - internal TestRunnerResult(ITestResultAdaptor testResult) : this(testResult.Test) - { - notOutdated = true; - - messages = testResult.Message; - output = testResult.Output; - stacktrace = testResult.StackTrace; - duration = (float)testResult.Duration; - if (testResult.Test.IsSuite && testResult.ResultState == "Ignored") - { - resultStatus = ResultStatus.Passed; - } - else - { - resultStatus = ParseNUnitResultStatus(testResult.TestStatus); - } - } - - public void Update(TestRunnerResult result) - { - if (ReferenceEquals(result, null)) - return; - resultStatus = result.resultStatus; - duration = result.duration; - messages = result.messages; - output = result.output; - stacktrace = result.stacktrace; - ignoredOrSkipped = result.ignoredOrSkipped; - notRunnable = result.notRunnable; - description = result.description; - notOutdated = result.notOutdated; - if (m_OnResultUpdate != null) - m_OnResultUpdate(this); - } - - public void SetResultChangedCallback(Action resultUpdated) - { - m_OnResultUpdate = resultUpdated; - } - - [Serializable] - internal enum ResultStatus - { - NotRun, - Passed, - Failed, - Inconclusive, - Skipped - } - - private static ResultStatus ParseNUnitResultStatus(TestStatus status) - { - switch (status) - { - case TestStatus.Passed: - return ResultStatus.Passed; - case TestStatus.Failed: - return ResultStatus.Failed; - case TestStatus.Inconclusive: - return ResultStatus.Inconclusive; - case TestStatus.Skipped: - return ResultStatus.Skipped; - default: - return ResultStatus.NotRun; - } - } - - public override string ToString() - { - return string.Format("{0} ({1})", name, fullName); - } - - public string Id { get { return uniqueId; } } - public string FullName { get { return fullName; } } - public string ParentId { get { return parentUniqueId; } } - public bool IsSuite { get { return isSuite; } } - public List Categories { get { return categories; } } - - public void Clear() - { - resultStatus = ResultStatus.NotRun; - if (m_OnResultUpdate != null) - m_OnResultUpdate(this); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestRunnerResult.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestRunnerResult.cs.meta deleted file mode 100644 index 771053c1..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestRunnerResult.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a04a45bbed9e1714f9902fc9443669b9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestRunnerUIFilter.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestRunnerUIFilter.cs deleted file mode 100644 index e0b18c21..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestRunnerUIFilter.cs +++ /dev/null @@ -1,178 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using UnityEngine; -using UnityEngine.TestTools.TestRunner.GUI; - -namespace UnityEditor.TestTools.TestRunner.GUI -{ - [Serializable] - internal class TestRunnerUIFilter - { - private int m_PassedCount; - private int m_FailedCount; - private int m_NotRunCount; - private int m_InconclusiveCount; - private int m_SkippedCount; - - public int PassedCount { get { return m_PassedCount; } } - public int FailedCount { get { return m_FailedCount + m_InconclusiveCount; } } - public int NotRunCount { get { return m_NotRunCount + m_SkippedCount; } } - - [SerializeField] - public bool PassedHidden; - [SerializeField] - public bool FailedHidden; - [SerializeField] - public bool NotRunHidden; - - [SerializeField] - private string m_SearchString; - [SerializeField] - private int selectedCategoryMask; - - public string[] availableCategories = new string[0]; - - - private GUIContent m_SucceededBtn; - private GUIContent m_FailedBtn; - private GUIContent m_NotRunBtn; - - public Action RebuildTestList; - public Action SearchStringChanged; - public Action SearchStringCleared; - public bool IsFiltering - { - get - { - return !string.IsNullOrEmpty(m_SearchString) || PassedHidden || FailedHidden || NotRunHidden || - selectedCategoryMask != 0; - } - } - - public string[] CategoryFilter - { - get - { - var list = new List(); - for (int i = 0; i < availableCategories.Length; i++) - { - if ((selectedCategoryMask & (1 << i)) != 0) - { - list.Add(availableCategories[i]); - } - } - return list.ToArray(); - } - } - - public void UpdateCounters(List resultList) - { - m_PassedCount = m_FailedCount = m_NotRunCount = m_InconclusiveCount = m_SkippedCount = 0; - foreach (var result in resultList) - { - if (result.isSuite) - continue; - switch (result.resultStatus) - { - case TestRunnerResult.ResultStatus.Passed: - m_PassedCount++; - break; - case TestRunnerResult.ResultStatus.Failed: - m_FailedCount++; - break; - case TestRunnerResult.ResultStatus.Inconclusive: - m_InconclusiveCount++; - break; - case TestRunnerResult.ResultStatus.Skipped: - m_SkippedCount++; - break; - case TestRunnerResult.ResultStatus.NotRun: - default: - m_NotRunCount++; - break; - } - } - - var succeededTooltip = string.Format("Show tests that succeeded\n{0} succeeded", m_PassedCount); - m_SucceededBtn = new GUIContent(PassedCount.ToString(), Icons.s_SuccessImg, succeededTooltip); - var failedTooltip = string.Format("Show tests that failed\n{0} failed\n{1} inconclusive", m_FailedCount, m_InconclusiveCount); - m_FailedBtn = new GUIContent(FailedCount.ToString(), Icons.s_FailImg, failedTooltip); - var notRunTooltip = string.Format("Show tests that didn't run\n{0} didn't run\n{1} skipped or ignored", m_NotRunCount, m_SkippedCount); - m_NotRunBtn = new GUIContent(NotRunCount.ToString(), Icons.s_UnknownImg, notRunTooltip); - } - - public void Draw() - { - EditorGUI.BeginChangeCheck(); - if (m_SearchString == null) - { - m_SearchString = ""; - } - m_SearchString = EditorGUILayout.ToolbarSearchField(m_SearchString); - if (EditorGUI.EndChangeCheck() && SearchStringChanged != null) - { - SearchStringChanged(m_SearchString); - if (String.IsNullOrEmpty(m_SearchString)) - SearchStringCleared(); - } - - if (availableCategories != null && availableCategories.Any()) - { - EditorGUI.BeginChangeCheck(); - selectedCategoryMask = EditorGUILayout.MaskField(selectedCategoryMask, availableCategories, EditorStyles.toolbarDropDown, GUILayout.MaxWidth(150)); - if (EditorGUI.EndChangeCheck() && RebuildTestList != null) - { - RebuildTestList(); - } - } - else - { - EditorGUILayout.Popup(0, new[] { "" }, EditorStyles.toolbarDropDown, GUILayout.MaxWidth(150)); - } - - EditorGUI.BeginChangeCheck(); - if (m_SucceededBtn != null) - { - PassedHidden = !GUILayout.Toggle(!PassedHidden, m_SucceededBtn, EditorStyles.toolbarButton, GUILayout.MaxWidth(GetMaxWidth(PassedCount))); - } - if (m_FailedBtn != null) - { - FailedHidden = !GUILayout.Toggle(!FailedHidden, m_FailedBtn, EditorStyles.toolbarButton, GUILayout.MaxWidth(GetMaxWidth(FailedCount))); - } - if (m_NotRunBtn != null) - { - NotRunHidden = !GUILayout.Toggle(!NotRunHidden, m_NotRunBtn, EditorStyles.toolbarButton, GUILayout.MaxWidth(GetMaxWidth(NotRunCount))); - } - - if (EditorGUI.EndChangeCheck() && RebuildTestList != null) - { - RebuildTestList(); - } - } - - private static int GetMaxWidth(int count) - { - if (count < 10) - return 33; - return count < 100 ? 40 : 47; - } - - public void Clear() - { - PassedHidden = false; - FailedHidden = false; - NotRunHidden = false; - selectedCategoryMask = 0; - m_SearchString = ""; - if (SearchStringChanged != null) - { - SearchStringChanged(m_SearchString); - } - if (SearchStringCleared != null) - { - SearchStringCleared(); - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestRunnerUIFilter.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestRunnerUIFilter.cs.meta deleted file mode 100644 index e65f91a3..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/TestRunnerUIFilter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 15f870c6975ad6449b5b52514b90dc2b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/Views.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/Views.meta deleted file mode 100644 index ca14182c..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/Views.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c5535d742ea2e4941850b421f9c70a1f -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/Views/EditModeTestListGUI.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/Views/EditModeTestListGUI.cs deleted file mode 100644 index 2bd0b745..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/Views/EditModeTestListGUI.cs +++ /dev/null @@ -1,93 +0,0 @@ -using System; -using System.Linq; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine; -using UnityEngine.TestTools; -using UnityEngine.TestTools.TestRunner.GUI; - -namespace UnityEditor.TestTools.TestRunner.GUI -{ - [Serializable] - internal class EditModeTestListGUI : TestListGUI - { - public override TestMode TestMode - { - get { return TestMode.EditMode; } - } - - public override void RenderNoTestsInfo() - { - if (!TestListGUIHelper.SelectedFolderContainsTestAssembly()) - { - var noTestText = "No tests to show"; - - if (!PlayerSettings.playModeTestRunnerEnabled) - { - const string testsArePulledFromCustomAssemblies = - "EditMode tests can be in Editor only Assemblies, either in the editor special folder or Editor only Assembly Definitions that references the \"nunit.framework.dll\" Assembly Reference or any of the Assembly Definition References \"UnityEngine.TestRunner\" or \"UnityEditor.TestRunner\".."; - noTestText += Environment.NewLine + testsArePulledFromCustomAssemblies; - } - - EditorGUILayout.HelpBox(noTestText, MessageType.Info); - if (GUILayout.Button("Create EditMode Test Assembly Folder")) - { - TestListGUIHelper.AddFolderAndAsmDefForTesting(isEditorOnly: true); - } - } - - if (!TestListGUIHelper.CanAddEditModeTestScriptAndItWillCompile()) - { - UnityEngine.GUI.enabled = false; - EditorGUILayout.HelpBox("EditMode test scripts can only be created in editor test assemblies.", MessageType.Warning); - } - if (GUILayout.Button("Create Test Script in current folder")) - { - TestListGUIHelper.AddTest(); - } - UnityEngine.GUI.enabled = true; - } - - public override void PrintHeadPanel() - { - base.PrintHeadPanel(); - DrawFilters(); - } - - protected override void RunTests(params TestRunnerFilter[] filters) - { - if (EditorUtility.scriptCompilationFailed) - { - Debug.LogError("Fix compilation issues before running tests"); - return; - } - - foreach (var filter in filters) - { - filter.ClearResults(newResultList.OfType().ToList()); - } - - RerunCallbackData.instance.runFilters = filters; - RerunCallbackData.instance.testMode = TestMode.EditMode; - - var testRunnerApi = ScriptableObject.CreateInstance(); - testRunnerApi.Execute(new ExecutionSettings() - { - filters = filters.Select(filter => new Filter() - { - assemblyNames = filter.assemblyNames, - categoryNames = filter.categoryNames, - groupNames = filter.groupNames, - testMode = TestMode, - testNames = filter.testNames - }).ToArray() - }); - } - - public override TestPlatform TestPlatform { get { return TestPlatform.EditMode; } } - - protected override bool IsBusy() - { - return TestRunnerApi.IsRunActive() || EditorApplication.isCompiling || EditorApplication.isPlaying; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/Views/EditModeTestListGUI.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/Views/EditModeTestListGUI.cs.meta deleted file mode 100644 index afd4abb5..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/Views/EditModeTestListGUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0336a32a79bfaed43a3fd2d88b91e974 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/Views/PlayModeTestListGUI.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/Views/PlayModeTestListGUI.cs deleted file mode 100644 index 112ef827..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/Views/PlayModeTestListGUI.cs +++ /dev/null @@ -1,111 +0,0 @@ -using System; -using System.Linq; -using UnityEditor.SceneManagement; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine; -using UnityEngine.TestTools; -using UnityEngine.TestTools.TestRunner.GUI; - -namespace UnityEditor.TestTools.TestRunner.GUI -{ - [Serializable] - internal class PlayModeTestListGUI : TestListGUI - { - public override TestMode TestMode - { - get { return TestMode.PlayMode; } - } - public override void PrintHeadPanel() - { - EditorGUILayout.BeginHorizontal(GUILayout.ExpandHeight(false)); - base.PrintHeadPanel(); - var runButtonText = EditorUserBuildSettings.installInBuildFolder ? "Export project" : "Run all in player"; - if (GUILayout.Button($"{runButtonText} ({EditorUserBuildSettings.activeBuildTarget})", EditorStyles.toolbarButton)) - { - RunTestsInPlayer(); - } - EditorGUILayout.EndHorizontal(); - DrawFilters(); - EditorGUILayout.BeginHorizontal(GUILayout.ExpandHeight(false)); - EditorGUILayout.EndHorizontal(); - } - - public override void RenderNoTestsInfo() - { - if (!TestListGUIHelper.SelectedFolderContainsTestAssembly()) - { - var noTestText = "No tests to show"; - if (!PlayerSettings.playModeTestRunnerEnabled) - { - const string testsArePulledFromCustomAssemblues = "Test Assemblies are defined by Assembly Definitions that references the \"nunit.framework.dll\" Assembly Reference or the Assembly Definition Reference \"UnityEngine.TestRunner\"."; - const string infoTextAboutTestsInAllAssemblies = - "To have tests in all assemblies enable it in the Test Runner window context menu"; - noTestText += Environment.NewLine + testsArePulledFromCustomAssemblues + Environment.NewLine + - infoTextAboutTestsInAllAssemblies; - } - - EditorGUILayout.HelpBox(noTestText, MessageType.Info); - if (GUILayout.Button("Create PlayMode Test Assembly Folder")) - { - TestListGUIHelper.AddFolderAndAsmDefForTesting(); - } - } - - if (!TestListGUIHelper.CanAddPlayModeTestScriptAndItWillCompile()) - { - UnityEngine.GUI.enabled = false; - EditorGUILayout.HelpBox("PlayMode test scripts can only be created in non editor test assemblies.", MessageType.Warning); - } - if (GUILayout.Button("Create Test Script in current folder")) - { - TestListGUIHelper.AddTest(); - } - UnityEngine.GUI.enabled = true; - } - - protected override void RunTests(TestRunnerFilter[] filters) - { - foreach (var filter in filters) - { - filter.ClearResults(newResultList.OfType().ToList()); - } - - RerunCallbackData.instance.runFilters = filters; - RerunCallbackData.instance.testMode = TestMode.PlayMode; - - var testRunnerApi = ScriptableObject.CreateInstance(); - testRunnerApi.Execute(new ExecutionSettings() - { - filters = filters.Select(filter => new Filter() - { - assemblyNames = filter.assemblyNames, - categoryNames = filter.categoryNames, - groupNames = filter.groupNames, - testMode = TestMode, - testNames = filter.testNames - }).ToArray() - }); - } - - protected void RunTestsInPlayer() - { - var testRunnerApi = ScriptableObject.CreateInstance(); - testRunnerApi.Execute(new ExecutionSettings() - { - filters = new [] { new Filter() - { - testMode = TestMode, - }}, - targetPlatform = EditorUserBuildSettings.activeBuildTarget - }); - GUIUtility.ExitGUI(); - } - - public override TestPlatform TestPlatform { get { return TestPlatform.PlayMode; } } - - protected override bool IsBusy() - { - return TestRunnerApi.IsRunActive() || PlaymodeLauncher.IsRunning || EditorApplication.isCompiling || EditorApplication.isPlaying; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/Views/PlayModeTestListGUI.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/Views/PlayModeTestListGUI.cs.meta deleted file mode 100644 index 6f0c1d6d..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/Views/PlayModeTestListGUI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c3efd39f2cfb43a4c830d4fd5689900f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/Views/TestListGUIBase.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/Views/TestListGUIBase.cs deleted file mode 100644 index 45a9aa9e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/Views/TestListGUIBase.cs +++ /dev/null @@ -1,539 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text.RegularExpressions; -using UnityEditor.IMGUI.Controls; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine; -using UnityEngine.TestTools.TestRunner.GUI; -using UnityEngine.TestTools; - -namespace UnityEditor.TestTools.TestRunner.GUI -{ - internal abstract class TestListGUI - { - private static readonly GUIContent s_GUIRunSelectedTests = EditorGUIUtility.TrTextContent("Run Selected", "Run selected test(s)"); - private static readonly GUIContent s_GUIRunAllTests = EditorGUIUtility.TrTextContent("Run All", "Run all tests"); - private static readonly GUIContent s_GUIRerunFailedTests = EditorGUIUtility.TrTextContent("Rerun Failed", "Rerun all failed tests"); - private static readonly GUIContent s_GUIRun = EditorGUIUtility.TrTextContent("Run"); - private static readonly GUIContent s_GUIRunUntilFailed = EditorGUIUtility.TrTextContent("Run Until Failed"); - private static readonly GUIContent s_GUIRun100Times = EditorGUIUtility.TrTextContent("Run 100 times"); - private static readonly GUIContent s_GUIOpenTest = EditorGUIUtility.TrTextContent("Open source code"); - private static readonly GUIContent s_GUIOpenErrorLine = EditorGUIUtility.TrTextContent("Open error line"); - private static readonly GUIContent s_GUIClearResults = EditorGUIUtility.TrTextContent("Clear Results", "Clear all test results"); - - [SerializeField] - protected TestRunnerWindow m_Window; - [SerializeField] - public List newResultList = new List(); - [SerializeField] - private string m_ResultText; - [SerializeField] - private string m_ResultStacktrace; - - private TreeViewController m_TestListTree; - [SerializeField] - internal TreeViewState m_TestListState; - [SerializeField] - internal TestRunnerUIFilter m_TestRunnerUIFilter = new TestRunnerUIFilter(); - - private Vector2 m_TestInfoScroll, m_TestListScroll; - private string m_PreviousProjectPath; - private List m_QueuedResults = new List(); - - protected TestListGUI() - { - MonoCecilHelper = new MonoCecilHelper(); - AssetsDatabaseHelper = new AssetsDatabaseHelper(); - - GuiHelper = new GuiHelper(MonoCecilHelper, AssetsDatabaseHelper); - } - - protected IMonoCecilHelper MonoCecilHelper { get; private set; } - protected IAssetsDatabaseHelper AssetsDatabaseHelper { get; private set; } - protected IGuiHelper GuiHelper { get; private set; } - - public abstract TestMode TestMode { get; } - - public virtual void PrintHeadPanel() - { - EditorGUILayout.BeginHorizontal(EditorStyles.toolbar); - using (new EditorGUI.DisabledScope(IsBusy())) - { - if (GUILayout.Button(s_GUIRunAllTests, EditorStyles.toolbarButton)) - { - var filter = new TestRunnerFilter {categoryNames = m_TestRunnerUIFilter.CategoryFilter}; - RunTests(filter); - GUIUtility.ExitGUI(); - } - } - using (new EditorGUI.DisabledScope(m_TestListTree == null || !m_TestListTree.HasSelection() || IsBusy())) - { - if (GUILayout.Button(s_GUIRunSelectedTests, EditorStyles.toolbarButton)) - { - RunTests(GetSelectedTestsAsFilter(m_TestListTree.GetSelection())); - GUIUtility.ExitGUI(); - } - } - using (new EditorGUI.DisabledScope(m_TestRunnerUIFilter.FailedCount == 0 || IsBusy())) - { - if (GUILayout.Button(s_GUIRerunFailedTests, EditorStyles.toolbarButton)) - { - var failedTestnames = new List(); - foreach (var result in newResultList) - { - if (result.isSuite) - continue; - if (result.resultStatus == TestRunnerResult.ResultStatus.Failed || - result.resultStatus == TestRunnerResult.ResultStatus.Inconclusive) - failedTestnames.Add(result.fullName); - } - RunTests(new TestRunnerFilter() {testNames = failedTestnames.ToArray(), categoryNames = m_TestRunnerUIFilter.CategoryFilter}); - GUIUtility.ExitGUI(); - } - } - using (new EditorGUI.DisabledScope(IsBusy())) - { - if (GUILayout.Button(s_GUIClearResults, EditorStyles.toolbarButton)) - { - foreach (var result in newResultList) - { - result.Clear(); - } - m_TestRunnerUIFilter.UpdateCounters(newResultList); - GUIUtility.ExitGUI(); - } - } - GUILayout.FlexibleSpace(); - EditorGUILayout.EndHorizontal(); - } - - protected void DrawFilters() - { - EditorGUILayout.BeginHorizontal(EditorStyles.toolbar); - m_TestRunnerUIFilter.Draw(); - EditorGUILayout.EndHorizontal(); - } - - public bool HasTreeData() - { - return m_TestListTree != null; - } - - public virtual void RenderTestList() - { - if (m_TestListTree == null) - { - GUILayout.Label("Loading..."); - return; - } - - m_TestListScroll = EditorGUILayout.BeginScrollView(m_TestListScroll, - GUILayout.ExpandWidth(true), - GUILayout.MaxWidth(2000)); - - if (m_TestListTree.data.root == null || m_TestListTree.data.rowCount == 0 || (!m_TestListTree.isSearching && !m_TestListTree.data.GetItem(0).hasChildren)) - { - if (m_TestRunnerUIFilter.IsFiltering) - { - if (GUILayout.Button("Clear filters")) - { - m_TestRunnerUIFilter.Clear(); - m_TestListTree.ReloadData(); - m_Window.Repaint(); - } - } - RenderNoTestsInfo(); - } - else - { - var treeRect = EditorGUILayout.GetControlRect(GUILayout.ExpandHeight(true), GUILayout.ExpandWidth(true)); - var treeViewKeyboardControlId = GUIUtility.GetControlID(FocusType.Keyboard); - - m_TestListTree.OnGUI(treeRect, treeViewKeyboardControlId); - } - - EditorGUILayout.EndScrollView(); - } - - public virtual void RenderNoTestsInfo() - { - EditorGUILayout.HelpBox("No tests to show", MessageType.Info); - } - - public void RenderDetails() - { - m_TestInfoScroll = EditorGUILayout.BeginScrollView(m_TestInfoScroll); - var resultTextSize = TestRunnerWindow.Styles.info.CalcSize(new GUIContent(m_ResultText)); - EditorGUILayout.SelectableLabel(m_ResultText, TestRunnerWindow.Styles.info, - GUILayout.ExpandHeight(true), - GUILayout.ExpandWidth(true), - GUILayout.MinWidth(resultTextSize.x), - GUILayout.MinHeight(resultTextSize.y)); - EditorGUILayout.EndScrollView(); - } - - public void Reload() - { - if (m_TestListTree != null) - { - m_TestListTree.ReloadData(); - UpdateQueuedResults(); - } - } - - public void Repaint() - { - if (m_TestListTree == null || m_TestListTree.data.root == null) - { - return; - } - - m_TestListTree.Repaint(); - if (m_TestListTree.data.rowCount == 0) - m_TestListTree.SetSelection(new int[0], false); - TestSelectionCallback(m_TestListState.selectedIDs.ToArray()); - } - - public void Init(TestRunnerWindow window, ITestAdaptor rootTest) - { - if (m_Window == null) - { - m_Window = window; - } - - if (m_TestListTree == null) - { - if (m_TestListState == null) - { - m_TestListState = new TreeViewState(); - } - if (m_TestListTree == null) - m_TestListTree = new TreeViewController(m_Window, m_TestListState); - - m_TestListTree.deselectOnUnhandledMouseDown = false; - - m_TestListTree.selectionChangedCallback += TestSelectionCallback; - m_TestListTree.itemDoubleClickedCallback += TestDoubleClickCallback; - m_TestListTree.contextClickItemCallback += TestContextClickCallback; - - var testListTreeViewDataSource = new TestListTreeViewDataSource(m_TestListTree, this, rootTest); - - if (!newResultList.Any()) - testListTreeViewDataSource.ExpandTreeOnCreation(); - - m_TestListTree.Init(new Rect(), - testListTreeViewDataSource, - new TestListTreeViewGUI(m_TestListTree), - null); - } - - EditorApplication.update += RepaintIfProjectPathChanged; - - m_TestRunnerUIFilter.UpdateCounters(newResultList); - m_TestRunnerUIFilter.RebuildTestList = () => m_TestListTree.ReloadData(); - m_TestRunnerUIFilter.SearchStringChanged = s => m_TestListTree.searchString = s; - m_TestRunnerUIFilter.SearchStringCleared = () => FrameSelection(); - } - - public void UpdateResult(TestRunnerResult result) - { - if (!HasTreeData()) - { - m_QueuedResults.Add(result); - return; - } - - if (newResultList.All(x => x.uniqueId != result.uniqueId)) - { - return; - } - - var testRunnerResult = newResultList.FirstOrDefault(x => x.uniqueId == result.uniqueId); - if (testRunnerResult != null) - { - testRunnerResult.Update(result); - } - - Repaint(); - m_Window.Repaint(); - } - - public void UpdateTestTree(ITestAdaptor test) - { - if (!HasTreeData()) - { - return; - } - - (m_TestListTree.data as TestListTreeViewDataSource).UpdateRootTest(test); - - m_TestListTree.ReloadData(); - Repaint(); - m_Window.Repaint(); - } - - private void UpdateQueuedResults() - { - foreach (var testRunnerResult in m_QueuedResults) - { - var existingResult = newResultList.FirstOrDefault(x => x.uniqueId == testRunnerResult.uniqueId); - if (existingResult != null) - { - existingResult.Update(testRunnerResult); - } - } - m_QueuedResults.Clear(); - TestSelectionCallback(m_TestListState.selectedIDs.ToArray()); - m_TestRunnerUIFilter.UpdateCounters(newResultList); - Repaint(); - m_Window.Repaint(); - } - - internal void TestSelectionCallback(int[] selected) - { - if (m_TestListTree != null && selected.Length == 1) - { - if (m_TestListTree != null) - { - var node = m_TestListTree.FindItem(selected[0]); - if (node is TestTreeViewItem) - { - var test = node as TestTreeViewItem; - m_ResultText = test.GetResultText(); - m_ResultStacktrace = test.result.stacktrace; - } - } - } - else if (selected.Length == 0) - { - m_ResultText = ""; - } - } - - protected virtual void TestDoubleClickCallback(int id) - { - if (IsBusy()) - return; - - RunTests(GetSelectedTestsAsFilter(new List { id })); - GUIUtility.ExitGUI(); - } - - protected virtual void RunTests(params TestRunnerFilter[] filters) - { - throw new NotImplementedException(); - } - - protected virtual void TestContextClickCallback(int id) - { - if (id == 0) - return; - - var m = new GenericMenu(); - var testFilters = GetSelectedTestsAsFilter(m_TestListState.selectedIDs); - var multilineSelection = m_TestListState.selectedIDs.Count > 1; - - if (!multilineSelection) - { - var testNode = GetSelectedTest(); - var isNotSuite = !testNode.IsGroupNode; - if (isNotSuite) - { - if (!string.IsNullOrEmpty(m_ResultStacktrace)) - { - m.AddItem(s_GUIOpenErrorLine, - false, - data => - { - if (!GuiHelper.OpenScriptInExternalEditor(m_ResultStacktrace)) - { - GuiHelper.OpenScriptInExternalEditor(testNode.type, testNode.method); - } - }, - ""); - } - - m.AddItem(s_GUIOpenTest, - false, - data => GuiHelper.OpenScriptInExternalEditor(testNode.type, testNode.method), - ""); - m.AddSeparator(""); - } - } - - if (!IsBusy()) - { - m.AddItem(multilineSelection ? s_GUIRunSelectedTests : s_GUIRun, - false, - data => RunTests(testFilters), - ""); - - if (EditorPrefs.GetBool("DeveloperMode", false)) - { - m.AddItem(multilineSelection ? s_GUIRunSelectedTests : s_GUIRunUntilFailed, - false, - data => - { - foreach (var filter in testFilters) - { - filter.testRepetitions = int.MaxValue; - } - - RunTests(testFilters); - }, - ""); - - m.AddItem(multilineSelection ? s_GUIRunSelectedTests : s_GUIRun100Times, - false, - data => - { - foreach (var filter in testFilters) - { - filter.testRepetitions = 100; - } - - RunTests(testFilters); - }, - ""); - } - } - else - m.AddDisabledItem(multilineSelection ? s_GUIRunSelectedTests : s_GUIRun, false); - - m.ShowAsContext(); - } - - private TestRunnerFilter[] GetSelectedTestsAsFilter(IEnumerable selectedIDs) - { - var namesToRun = new List(); - var assembliesForNamesToRun = new List(); - var exactNamesToRun = new List(); - var assembliesToRun = new List(); - foreach (var lineId in selectedIDs) - { - var line = m_TestListTree.FindItem(lineId); - if (line is TestTreeViewItem) - { - var testLine = line as TestTreeViewItem; - if (testLine.IsGroupNode && !testLine.FullName.Contains("+")) - { - if (testLine.parent != null && testLine.parent.displayName == "Invisible Root Item") - { - //Root node selected. Use an empty TestRunnerFilter to run every test - return new[] {new TestRunnerFilter()}; - } - - if (testLine.FullName.EndsWith(".dll", StringComparison.OrdinalIgnoreCase)) - { - assembliesToRun.Add(TestRunnerFilter.AssemblyNameFromPath(testLine.FullName)); - } - else - { - namesToRun.Add($"^{Regex.Escape(testLine.FullName)}$"); - var assembly = TestRunnerFilter.AssemblyNameFromPath(testLine.GetAssemblyName()); - if (!string.IsNullOrEmpty(assembly) && !assembliesForNamesToRun.Contains(assembly)) - { - assembliesForNamesToRun.Add(assembly); - } - } - } - else - { - exactNamesToRun.Add(testLine.FullName); - } - } - } - - var filters = new List(); - - if (assembliesToRun.Count > 0) - { - filters.Add(new TestRunnerFilter() - { - assemblyNames = assembliesToRun.ToArray() - }); - } - - if (namesToRun.Count > 0) - { - filters.Add(new TestRunnerFilter() - { - groupNames = namesToRun.ToArray(), - assemblyNames = assembliesForNamesToRun.ToArray() - }); - } - - if (exactNamesToRun.Count > 0) - { - filters.Add(new TestRunnerFilter() - { - testNames = exactNamesToRun.ToArray() - }); - } - - if (filters.Count == 0) - { - filters.Add(new TestRunnerFilter()); - } - - var categories = m_TestRunnerUIFilter.CategoryFilter.ToArray(); - if (categories.Length > 0) - { - foreach (var filter in filters) - { - filter.categoryNames = categories; - } - } - - return filters.ToArray(); - } - - private TestTreeViewItem GetSelectedTest() - { - foreach (var lineId in m_TestListState.selectedIDs) - { - var line = m_TestListTree.FindItem(lineId); - if (line is TestTreeViewItem) - { - return line as TestTreeViewItem; - } - } - return null; - } - - private void FrameSelection() - { - if (m_TestListTree.HasSelection()) - { - var firstClickedID = m_TestListState.selectedIDs.First() == m_TestListState.lastClickedID ? m_TestListState.selectedIDs.Last() : m_TestListState.selectedIDs.First(); - m_TestListTree.Frame(firstClickedID, true, false); - } - } - - public abstract TestPlatform TestPlatform { get; } - - public void RebuildUIFilter() - { - m_TestRunnerUIFilter.UpdateCounters(newResultList); - if (m_TestRunnerUIFilter.IsFiltering) - { - m_TestListTree.ReloadData(); - } - } - - public void RepaintIfProjectPathChanged() - { - var path = TestListGUIHelper.GetActiveFolderPath(); - if (path != m_PreviousProjectPath) - { - m_PreviousProjectPath = path; - TestRunnerWindow.s_Instance.Repaint(); - } - - EditorApplication.update -= RepaintIfProjectPathChanged; - } - - protected abstract bool IsBusy(); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/Views/TestListGUIBase.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/Views/TestListGUIBase.cs.meta deleted file mode 100644 index 3bef151c..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/GUI/Views/TestListGUIBase.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b8abb41ceb6f62c45a00197ae59224c1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension.meta deleted file mode 100644 index 0c998895..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3f9202a39620f51418046c7754f215f0 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/Attributes.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/Attributes.meta deleted file mode 100644 index a5930f1a..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/Attributes.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 96c503bf059df984c86eecf572370347 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/Attributes/AssetPipelineIgnore.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/Attributes/AssetPipelineIgnore.cs deleted file mode 100644 index e71b62c9..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/Attributes/AssetPipelineIgnore.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using NUnit.Framework; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; - -namespace UnityEditor.TestTools -{ - /// - /// Ignore attributes dedicated to Asset Import Pipeline backend version handling. - /// - internal static class AssetPipelineIgnore - { - internal enum AssetPipelineBackend - { - V1, - V2 - } - - /// - /// Ignore the test when running with the legacy Asset Import Pipeline V1 backend. - /// - internal class IgnoreInV1 : AssetPipelineIgnoreAttribute - { - public IgnoreInV1(string ignoreReason) : base(AssetPipelineBackend.V1, ignoreReason) {} - } - - /// - /// Ignore the test when running with the latest Asset Import Pipeline V2 backend. - /// - internal class IgnoreInV2 : AssetPipelineIgnoreAttribute - { - public IgnoreInV2(string ignoreReason) : base(AssetPipelineBackend.V2, ignoreReason) {} - } - - [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method)] - internal class AssetPipelineIgnoreAttribute : NUnitAttribute, IApplyToTest - { - readonly string m_IgnoreReason; - readonly AssetPipelineBackend m_IgnoredBackend; - static readonly AssetPipelineBackend k_ActiveBackend = AssetDatabase.IsV2Enabled() - ? AssetPipelineBackend.V2 - : AssetPipelineBackend.V1; - - static string ActiveBackendName = Enum.GetName(typeof(AssetPipelineBackend), k_ActiveBackend); - - public AssetPipelineIgnoreAttribute(AssetPipelineBackend backend, string ignoreReason) - { - m_IgnoredBackend = backend; - m_IgnoreReason = ignoreReason; - } - - public void ApplyToTest(Test test) - { - if (k_ActiveBackend == m_IgnoredBackend) - { - test.RunState = RunState.Ignored; - var skipReason = string.Format("Not supported by asset pipeline {0} backend {1}", ActiveBackendName, m_IgnoreReason); - test.Properties.Add(PropertyNames.SkipReason, skipReason); - } - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/Attributes/AssetPipelineIgnore.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/Attributes/AssetPipelineIgnore.cs.meta deleted file mode 100644 index 5f7207f1..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/Attributes/AssetPipelineIgnore.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b88caca58e05ee74486d86fb404c48e2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/Attributes/ITestPlayerBuildModifier.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/Attributes/ITestPlayerBuildModifier.cs deleted file mode 100644 index 08bab3a9..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/Attributes/ITestPlayerBuildModifier.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace UnityEditor.TestTools -{ - public interface ITestPlayerBuildModifier - { - BuildPlayerOptions ModifyOptions(BuildPlayerOptions playerOptions); - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/Attributes/ITestPlayerBuildModifier.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/Attributes/ITestPlayerBuildModifier.cs.meta deleted file mode 100644 index 1bb36a65..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/Attributes/ITestPlayerBuildModifier.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6d2f47eae5f447748892c46848956d5f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/Attributes/TestPlayerBuildModifierAttribute.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/Attributes/TestPlayerBuildModifierAttribute.cs deleted file mode 100644 index 328e6664..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/Attributes/TestPlayerBuildModifierAttribute.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; - -namespace UnityEditor.TestTools -{ - [AttributeUsage(AttributeTargets.Assembly)] - public class TestPlayerBuildModifierAttribute : Attribute - { - private Type m_Type; - public TestPlayerBuildModifierAttribute(Type type) - { - var interfaceType = typeof(ITestPlayerBuildModifier); - if (!interfaceType.IsAssignableFrom(type)) - { - throw new ArgumentException(string.Format("Type provided to {0} does not implement {1}", this.GetType().Name, interfaceType.Name)); - } - m_Type = type; - } - - internal ITestPlayerBuildModifier ConstructModifier() - { - return Activator.CreateInstance(m_Type) as ITestPlayerBuildModifier; - } - } -} - diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/Attributes/TestPlayerBuildModifierAttribute.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/Attributes/TestPlayerBuildModifierAttribute.cs.meta deleted file mode 100644 index 3f9dfe35..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/Attributes/TestPlayerBuildModifierAttribute.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: dd57b1176859fc84e93586103d3b5f73 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/TestRunnerStateSerializer.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/TestRunnerStateSerializer.cs deleted file mode 100644 index a24190e4..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/TestRunnerStateSerializer.cs +++ /dev/null @@ -1,162 +0,0 @@ -using System; -using System.Reflection; -using System.Text; -using System.Collections.Generic; -using UnityEngine; -using UnityEngine.TestRunner.NUnitExtensions.Runner; -using UnityEngine.TestTools.NUnitExtensions; -using UnityEngine.TestTools.Logging; - -namespace UnityEditor.TestTools.TestRunner -{ - [Serializable] - internal class TestRunnerStateSerializer : IStateSerializer - { - private const BindingFlags Flags = BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance | BindingFlags.FlattenHierarchy; - - [SerializeField] - private HideFlags m_OriginalHideFlags; - - [SerializeField] - private bool m_ShouldRestore; - - [SerializeField] - private string m_TestObjectTypeName; - - [SerializeField] - private ScriptableObject m_TestObject; - - [SerializeField] - private string m_TestObjectTxt; - - [SerializeField] - private long StartTicks; - - [SerializeField] - private double StartTimeOA; - - [SerializeField] - private string output; - - [SerializeField] - private LogMatch[] m_ExpectedLogs; - - public bool ShouldRestore() - { - return m_ShouldRestore; - } - - public void SaveContext() - { - var currentContext = UnityTestExecutionContext.CurrentContext; - - if (currentContext.TestObject != null) - { - m_TestObjectTypeName = currentContext.TestObject.GetType().AssemblyQualifiedName; - m_TestObject = null; - m_TestObjectTxt = null; - if (currentContext.TestObject is ScriptableObject) - { - m_TestObject = currentContext.TestObject as ScriptableObject; - m_OriginalHideFlags = m_TestObject.hideFlags; - m_TestObject.hideFlags |= HideFlags.DontSave; - } - else - { - m_TestObjectTxt = JsonUtility.ToJson(currentContext.TestObject); - } - } - - output = currentContext.CurrentResult.Output; - StartTicks = currentContext.StartTicks; - StartTimeOA = currentContext.StartTime.ToOADate(); - if (LogScope.HasCurrentLogScope()) - { - m_ExpectedLogs = LogScope.Current.ExpectedLogs.ToArray(); - } - - m_ShouldRestore = true; - } - - public void RestoreContext() - { - var currentContext = UnityTestExecutionContext.CurrentContext; - - var outputProp = currentContext.CurrentResult.GetType().BaseType.GetField("_output", Flags); - (outputProp.GetValue(currentContext.CurrentResult) as StringBuilder).Append(output); - - currentContext.StartTicks = StartTicks; - currentContext.StartTime = DateTime.FromOADate(StartTimeOA); - if (LogScope.HasCurrentLogScope()) - { - LogScope.Current.ExpectedLogs = new Queue(m_ExpectedLogs); - } - - m_ShouldRestore = false; - } - - public bool CanRestoreFromScriptableObject(Type requestedType) - { - if (m_TestObject == null) - { - return false; - } - return m_TestObjectTypeName == requestedType.AssemblyQualifiedName; - } - - public ScriptableObject RestoreScriptableObjectInstance() - { - if (m_TestObject == null) - { - Debug.LogError("No object to restore"); - return null; - } - EditorApplication.playModeStateChanged += OnPlayModeStateChanged; - var temp = m_TestObject; - m_TestObject = null; - m_TestObjectTypeName = null; - return temp; - } - - public bool CanRestoreFromJson(Type requestedType) - { - if (string.IsNullOrEmpty(m_TestObjectTxt)) - { - return false; - } - return m_TestObjectTypeName == requestedType.AssemblyQualifiedName; - } - - public void RestoreClassFromJson(ref object instance) - { - if (string.IsNullOrEmpty(m_TestObjectTxt)) - { - Debug.LogWarning("No JSON representation to restore"); - return; - } - JsonUtility.FromJsonOverwrite(m_TestObjectTxt, instance); - m_TestObjectTxt = null; - m_TestObjectTypeName = null; - } - - private void OnPlayModeStateChanged(PlayModeStateChange state) - { - if (m_TestObject == null) - { - EditorApplication.playModeStateChanged -= OnPlayModeStateChanged; - return; - } - - //We set the DontSave flag here because the ScriptableObject would be nulled right before entering EditMode - if (state == PlayModeStateChange.ExitingPlayMode) - { - m_TestObject.hideFlags |= HideFlags.DontSave; - } - else if (state == PlayModeStateChange.EnteredEditMode) - { - m_TestObject.hideFlags = m_OriginalHideFlags; - EditorApplication.playModeStateChanged -= OnPlayModeStateChanged; - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/TestRunnerStateSerializer.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/TestRunnerStateSerializer.cs.meta deleted file mode 100644 index 7d36e9d1..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/NUnitExtension/TestRunnerStateSerializer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 124533853216377448d786fd7c725701 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/RequireApiProfileAttribute.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/RequireApiProfileAttribute.cs deleted file mode 100644 index e99d4524..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/RequireApiProfileAttribute.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Linq; -using NUnit.Framework; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; - -namespace UnityEditor.TestTools -{ - [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method)] - internal class RequireApiProfileAttribute : NUnitAttribute, IApplyToTest - { - public ApiCompatibilityLevel[] apiProfiles { get; private set; } - - public RequireApiProfileAttribute(params ApiCompatibilityLevel[] apiProfiles) - { - this.apiProfiles = apiProfiles; - } - - void IApplyToTest.ApplyToTest(Test test) - { - test.Properties.Add(PropertyNames.Category, string.Format("ApiProfile({0})", string.Join(", ", apiProfiles.Select(p => p.ToString()).OrderBy(p => p).ToArray()))); - ApiCompatibilityLevel testProfile = PlayerSettings.GetApiCompatibilityLevel(EditorUserBuildSettings.activeBuildTargetGroup); - - if (!apiProfiles.Contains(testProfile)) - { - string skipReason = "Skipping test as it requires a compatible api profile set: " + string.Join(", ", apiProfiles.Select(p => p.ToString()).ToArray()); - test.RunState = RunState.Skipped; - test.Properties.Add(PropertyNames.SkipReason, skipReason); - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/RequireApiProfileAttribute.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/RequireApiProfileAttribute.cs.meta deleted file mode 100644 index 66d03bd4..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/RequireApiProfileAttribute.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a667f6654ad7a9548b8c8e68b51c8895 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/RequirePlatformSupportAttribute.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/RequirePlatformSupportAttribute.cs deleted file mode 100644 index 321a0fe0..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/RequirePlatformSupportAttribute.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Linq; -using NUnit.Framework; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; - -namespace UnityEditor.TestTools -{ - [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method)] - public class RequirePlatformSupportAttribute : NUnitAttribute, IApplyToTest - { - public RequirePlatformSupportAttribute(params BuildTarget[] platforms) - { - this.platforms = platforms; - } - - public BuildTarget[] platforms { get; private set; } - - void IApplyToTest.ApplyToTest(Test test) - { - test.Properties.Add(PropertyNames.Category, string.Format("RequirePlatformSupport({0})", string.Join(", ", platforms.Select(p => p.ToString()).OrderBy(p => p).ToArray()))); - - if (!platforms.All(p => BuildPipeline.IsBuildTargetSupported(BuildTargetGroup.Unknown, p))) - { - var missingPlatforms = platforms.Where(p => !BuildPipeline.IsBuildTargetSupported(BuildTargetGroup.Unknown, p)).Select(p => p.ToString()).ToArray(); - string skipReason = "Test cannot be run as it requires support for the following platforms to be installed: " + string.Join(", ", missingPlatforms); - - test.RunState = RunState.Skipped; - test.Properties.Add(PropertyNames.SkipReason, skipReason); - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/RequirePlatformSupportAttribute.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/RequirePlatformSupportAttribute.cs.meta deleted file mode 100644 index 84930580..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/RequirePlatformSupportAttribute.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d2146428d3f1ad54eb7326c9a44b3284 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestBuildAssemblyFilter.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestBuildAssemblyFilter.cs deleted file mode 100644 index a0947cbd..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestBuildAssemblyFilter.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Linq; -using UnityEditor.Build; - -namespace UnityEditor.TestRunner -{ - // This class is invoked from native, during build - internal class TestBuildAssemblyFilter : IFilterBuildAssemblies - { - private const string nunitAssemblyName = "nunit.framework"; - private const string unityTestRunnerAssemblyName = "UnityEngine.TestRunner"; - - public int callbackOrder { get; } - public string[] OnFilterAssemblies(BuildOptions buildOptions, string[] assemblies) - { - if ((buildOptions & BuildOptions.IncludeTestAssemblies) == BuildOptions.IncludeTestAssemblies || PlayerSettings.playModeTestRunnerEnabled) - { - return assemblies; - } - return assemblies.Where(x => !x.Contains(nunitAssemblyName) && !x.Contains(unityTestRunnerAssemblyName)).ToArray(); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestBuildAssemblyFilter.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestBuildAssemblyFilter.cs.meta deleted file mode 100644 index f3cd3bd2..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestBuildAssemblyFilter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3411e19edd44cfd46b548b058c3bc36c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers.meta deleted file mode 100644 index c6a951b3..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d64d92e4f04a13e4b99ea8d48e9e8ae9 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/AttributeFinderBase.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/AttributeFinderBase.cs deleted file mode 100644 index 236d6a89..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/AttributeFinderBase.cs +++ /dev/null @@ -1,104 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework.Interfaces; -using UnityEngine; -using UnityEngine.TestTools; - -namespace UnityEditor.TestTools.TestRunner -{ - internal abstract class AttributeFinderBase : IAttributeFinder - { - public abstract IEnumerable Search(ITest tests, ITestFilter filter, RuntimePlatform testTargetPlatform); - } - - internal interface IAttributeFinder - { - IEnumerable Search(ITest tests, ITestFilter filter, RuntimePlatform testTargetPlatform); - } - - internal abstract class AttributeFinderBase : AttributeFinderBase where T2 : Attribute - { - private readonly Func m_TypeSelector; - protected AttributeFinderBase(Func typeSelector) - { - m_TypeSelector = typeSelector; - } - - public override IEnumerable Search(ITest tests, ITestFilter filter, RuntimePlatform testTargetPlatform) - { - var selectedTests = new List(); - GetMatchingTests(tests, filter, ref selectedTests, testTargetPlatform); - - var result = new List(); - result.AddRange(GetTypesFromPrebuildAttributes(selectedTests)); - result.AddRange(GetTypesFromInterface(selectedTests, testTargetPlatform)); - - return result.Distinct(); - } - - private static void GetMatchingTests(ITest tests, ITestFilter filter, ref List resultList, RuntimePlatform testTargetPlatform) - { - foreach (var test in tests.Tests) - { - if (IsTestEnabledOnPlatform(test, testTargetPlatform)) - { - if (test.IsSuite) - { - GetMatchingTests(test, filter, ref resultList, testTargetPlatform); - } - else - { - if (filter.Pass(test)) - resultList.Add(test); - } - } - } - } - - private static bool IsTestEnabledOnPlatform(ITest test, RuntimePlatform testTargetPlatform) - { - if (test.Method == null) - { - return true; - } - - var attributesFromMethods = test.Method.GetCustomAttributes(true).Select(attribute => attribute); - var attributesFromTypes = test.Method.TypeInfo.GetCustomAttributes(true).Select(attribute => attribute); - - if (!attributesFromMethods.All(a => a.IsPlatformSupported(testTargetPlatform))) - { - return false; - } - - if (!attributesFromTypes.All(a => a.IsPlatformSupported(testTargetPlatform))) - { - return false; - } - - return true; - } - - private IEnumerable GetTypesFromPrebuildAttributes(IEnumerable tests) - { - var allAssemblies = AppDomain.CurrentDomain.GetAssemblies(); - allAssemblies = allAssemblies.Where(x => x.GetReferencedAssemblies().Any(z => z.Name == "UnityEditor.TestRunner")).ToArray(); - var attributesFromAssemblies = allAssemblies.SelectMany(assembly => assembly.GetCustomAttributes(typeof(T2), true).OfType()); - var attributesFromMethods = tests.SelectMany(t => t.Method.GetCustomAttributes(true).Select(attribute => attribute)); - var attributesFromTypes = tests.SelectMany(t => t.Method.TypeInfo.GetCustomAttributes(true).Select(attribute => attribute)); - - var result = new List(); - result.AddRange(attributesFromAssemblies); - result.AddRange(attributesFromMethods); - result.AddRange(attributesFromTypes); - - return result.Select(m_TypeSelector).Where(type => type != null); - } - - private static IEnumerable GetTypesFromInterface(IEnumerable selectedTests, RuntimePlatform testTargetPlatform) - { - var typesWithInterfaces = selectedTests.Where(t => typeof(T1).IsAssignableFrom(t.Method.TypeInfo.Type) && IsTestEnabledOnPlatform(t, testTargetPlatform)); - return typesWithInterfaces.Select(t => t.Method.TypeInfo.Type); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/AttributeFinderBase.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/AttributeFinderBase.cs.meta deleted file mode 100644 index 19986f0e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/AttributeFinderBase.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5d4de3d4682a8d641907cc75e4fb950e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/DelayedCallback.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/DelayedCallback.cs deleted file mode 100644 index b331d155..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/DelayedCallback.cs +++ /dev/null @@ -1,44 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner -{ - internal class DelayedCallback - { - private System.Action m_Callback; - private double m_CallbackTime; - private double m_Delay; - - public DelayedCallback(System.Action function, double timeFromNow) - { - m_Callback = function; - m_CallbackTime = EditorApplication.timeSinceStartup + timeFromNow; - m_Delay = timeFromNow; - EditorApplication.update += Update; - } - - public void Clear() - { - EditorApplication.update -= Update; - m_CallbackTime = 0.0; - m_Callback = null; - } - - private void Update() - { - if (EditorApplication.timeSinceStartup > m_CallbackTime) - { - // Clear state before firing callback to ensure reset (callback could call ExitGUI) - var callback = m_Callback; - Clear(); - - callback?.Invoke(); - } - } - - public void Reset() - { - if (m_Callback != null) - { - m_CallbackTime = EditorApplication.timeSinceStartup + m_Delay; - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/DelayedCallback.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/DelayedCallback.cs.meta deleted file mode 100644 index 5218c8ec..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/DelayedCallback.cs.meta +++ /dev/null @@ -1,3 +0,0 @@ -fileFormatVersion: 2 -guid: b9d121df8c444236a5b38ccfadfdd1a7 -timeCreated: 1583140472 \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/EditModeLauncher.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/EditModeLauncher.cs deleted file mode 100644 index 97a3a97e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/EditModeLauncher.cs +++ /dev/null @@ -1,160 +0,0 @@ -using System; -using System.Collections.Generic; -using NUnit.Framework.Interfaces; -using UnityEditor.SceneManagement; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine; -using UnityEngine.SceneManagement; -using UnityEngine.TestRunner.Utils; -using UnityEngine.TestTools; -using UnityEngine.TestTools.TestRunner; -using UnityEngine.TestTools.TestRunner.GUI; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class EditModeLauncher : TestLauncherBase - { - public static bool IsRunning; - internal readonly EditModeRunner m_EditModeRunner; - public bool launchedOutsideApi; - - // provided for backward compatibility with Rider UnitTesting prior to Rider package v.1.1.1 - public EditModeLauncher(TestRunnerFilter filter, TestPlatform platform) - { - launchedOutsideApi = true; - var apiFilter = new[] - { - new Filter() - { - testMode = TestMode.EditMode, - testNames = filter.testNames, - categoryNames = filter.categoryNames, - groupNames = filter.groupNames, - assemblyNames = filter.assemblyNames - } - }; - - ScriptableObject.CreateInstance().Execute(new ExecutionSettings(apiFilter)); - } - - public EditModeLauncher(Filter[] filters, TestPlatform platform, bool runSynchronously) - { - m_EditModeRunner = ScriptableObject.CreateInstance(); - m_EditModeRunner.UnityTestAssemblyRunnerFactory = new UnityTestAssemblyRunnerFactory(); - m_EditModeRunner.Init(filters, platform, runSynchronously); - } - - public override void Run() - { - if (launchedOutsideApi) - { - // Do not use the launcher, as it will be relaunched trough the api. See ctor. - return; - } - - IsRunning = true; - - SceneSetup[] previousSceneSetup; - if (!OpenNewScene(out previousSceneSetup)) - return; - - var callback = AddEventHandler(); - callback.previousSceneSetup = previousSceneSetup; - callback.runner = m_EditModeRunner; - AddEventHandler(); - - m_EditModeRunner.Run(); - AddEventHandler(); - AddEventHandler(); - - if (m_EditModeRunner.RunningSynchronously) - m_EditModeRunner.CompleteSynchronously(); - } - - private static bool OpenNewScene(out SceneSetup[] previousSceneSetup) - { - previousSceneSetup = null; - - var sceneCount = SceneManager.sceneCount; - - var scene = SceneManager.GetSceneAt(0); - var isSceneNotPersisted = string.IsNullOrEmpty(scene.path); - - if (sceneCount == 1 && isSceneNotPersisted) - { - EditorSceneManager.NewScene(NewSceneSetup.DefaultGameObjects, NewSceneMode.Single); - return true; - } - RemoveUntitledScenes(); - - // In case the user chose not to save the dirty scenes we reload them - ReloadUnsavedDirtyScene(); - - previousSceneSetup = EditorSceneManager.GetSceneManagerSetup(); - - scene = EditorSceneManager.NewScene(NewSceneSetup.EmptyScene, NewSceneMode.Additive); - SceneManager.SetActiveScene(scene); - - return true; - } - - private static void ReloadUnsavedDirtyScene() - { - for (var i = 0; i < SceneManager.sceneCount; i++) - { - var scene = SceneManager.GetSceneAt(i); - var isSceneNotPersisted = string.IsNullOrEmpty(scene.path); - var isSceneDirty = scene.isDirty; - if (isSceneNotPersisted && isSceneDirty) - { - EditorSceneManager.ReloadScene(scene); - } - } - } - - private static void RemoveUntitledScenes() - { - int sceneCount = SceneManager.sceneCount; - - var scenesToClose = new List(); - for (var i = 0; i < sceneCount; i++) - { - var scene = SceneManager.GetSceneAt(i); - var isSceneNotPersisted = string.IsNullOrEmpty(scene.path); - if (isSceneNotPersisted) - { - scenesToClose.Add(scene); - } - } - foreach (Scene scene in scenesToClose) - { - EditorSceneManager.CloseScene(scene, true); - } - } - - public class BackgroundListener : ScriptableObject, ITestRunnerListener - { - public void RunStarted(ITest testsToRun) - { - } - - public void RunFinished(ITestResult testResults) - { - IsRunning = false; - } - - public void TestStarted(ITest test) - { - } - - public void TestFinished(ITestResult result) - { - } - } - - public T AddEventHandler() where T : ScriptableObject, ITestRunnerListener - { - return m_EditModeRunner.AddEventHandler(); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/EditModeLauncher.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/EditModeLauncher.cs.meta deleted file mode 100644 index 694d7d6a..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/EditModeLauncher.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ac68f5ae37c8957468562b8da42f9984 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/EditModeLauncherContextSettings.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/EditModeLauncherContextSettings.cs deleted file mode 100644 index e20305cd..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/EditModeLauncherContextSettings.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class EditModeLauncherContextSettings : IDisposable - { - private bool m_RunInBackground; - - public EditModeLauncherContextSettings() - { - SetupProjectParameters(); - } - - public void Dispose() - { - CleanupProjectParameters(); - } - - private void SetupProjectParameters() - { - m_RunInBackground = Application.runInBackground; - Application.runInBackground = true; - } - - private void CleanupProjectParameters() - { - Application.runInBackground = m_RunInBackground; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/EditModeLauncherContextSettings.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/EditModeLauncherContextSettings.cs.meta deleted file mode 100644 index 2bed8fde..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/EditModeLauncherContextSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a582090813554df479fb9ca03e9857d3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup.meta deleted file mode 100644 index 49473826..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: ebc4d20cc106cea49b1df1153f0b3b5e -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/AndroidPlatformSetup.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/AndroidPlatformSetup.cs deleted file mode 100644 index e0f72777..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/AndroidPlatformSetup.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System; -using UnityEngine; -using System.Net; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class AndroidPlatformSetup : IPlatformSetup - { - private string m_oldApplicationIdentifier; - private string m_oldDeviceSocketAddress; - [SerializeField] - private bool m_Stripping; - - public void Setup() - { - m_oldApplicationIdentifier = PlayerSettings.GetApplicationIdentifier(BuildTargetGroup.Android); - PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android, "com.UnityTestRunner.UnityTestRunner"); - - m_oldDeviceSocketAddress = EditorUserBuildSettings.androidDeviceSocketAddress; - var androidDeviceConnection = Environment.GetEnvironmentVariable("ANDROID_DEVICE_CONNECTION"); - EditorUserBuildSettings.waitForPlayerConnection = true; - if (androidDeviceConnection != null) - { - EditorUserBuildSettings.androidDeviceSocketAddress = androidDeviceConnection; - } - m_Stripping = PlayerSettings.stripEngineCode; - PlayerSettings.stripEngineCode = false; - } - - public void PostBuildAction() - { - PlayerSettings.stripEngineCode = m_Stripping; - } - - public void PostSuccessfulBuildAction() - { - } - - public void PostSuccessfulLaunchAction() - { - var connectionResult = -1; - var maxTryCount = 10; - var tryCount = maxTryCount; - while (tryCount-- > 0 && connectionResult == -1) - { - connectionResult = EditorConnectionInternal.ConnectPlayerProxy(IPAddress.Loopback.ToString(), 34999); - if (EditorUtility.DisplayCancelableProgressBar("Editor Connection", "Connecting to the player", - 1 - ((float)tryCount / maxTryCount))) - { - EditorUtility.ClearProgressBar(); - throw new TestLaunchFailedException(); - } - } - EditorUtility.ClearProgressBar(); - if (connectionResult == -1) - throw new TestLaunchFailedException( - "Timed out trying to connect to the player. Player failed to launch or crashed soon after launching"); - } - - public void CleanUp() - { - EditorUserBuildSettings.androidDeviceSocketAddress = m_oldDeviceSocketAddress; - PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android, m_oldApplicationIdentifier); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/AndroidPlatformSetup.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/AndroidPlatformSetup.cs.meta deleted file mode 100644 index 6e18a7c7..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/AndroidPlatformSetup.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 961642509dec50b44a293d26240140ec -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/ApplePlatformSetup.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/ApplePlatformSetup.cs deleted file mode 100644 index f625eb23..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/ApplePlatformSetup.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Diagnostics; -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner -{ - [Serializable] - internal class ApplePlatformSetup : IPlatformSetup - { - [SerializeField] - private bool m_Stripping; - - public ApplePlatformSetup(BuildTarget buildTarget) - { - } - - public void Setup() - { - // Camera and fonts are stripped out and app crashes on iOS when test runner is trying to add a scene with... camera and text - m_Stripping = PlayerSettings.stripEngineCode; - PlayerSettings.stripEngineCode = false; - } - - public void PostBuildAction() - { - // Restoring player setting as early as possible - PlayerSettings.stripEngineCode = m_Stripping; - } - - public void PostSuccessfulBuildAction() - { - } - - public void PostSuccessfulLaunchAction() - { - } - - public void CleanUp() - { - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/ApplePlatformSetup.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/ApplePlatformSetup.cs.meta deleted file mode 100644 index 36f22a6b..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/ApplePlatformSetup.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f6c189a159d3bde4c964cee562e508ea -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/IPlatformSetup.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/IPlatformSetup.cs deleted file mode 100644 index db76c212..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/IPlatformSetup.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner -{ - internal interface IPlatformSetup - { - void Setup(); - void PostBuildAction(); - void PostSuccessfulBuildAction(); - void PostSuccessfulLaunchAction(); - void CleanUp(); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/IPlatformSetup.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/IPlatformSetup.cs.meta deleted file mode 100644 index 94405b53..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/IPlatformSetup.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9d614808f9add8a4f8e4860db2c7af0d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/LuminPlatformSetup.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/LuminPlatformSetup.cs deleted file mode 100644 index 1a0c4bf4..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/LuminPlatformSetup.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Threading; -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class LuminPlatformSetup : IPlatformSetup - { - private const string kDeviceAddress = "127.0.0.1"; - private const int kDevicePort = 55000; - - public void Setup() - { - } - - public void PostBuildAction() - { - } - - public void PostSuccessfulBuildAction() - { - } - - public void PostSuccessfulLaunchAction() - { - var connectionResult = -1; - var maxTryCount = 100; - var tryCount = maxTryCount; - while (tryCount-- > 0 && connectionResult == -1) - { - Thread.Sleep(1000); - connectionResult = EditorConnectionInternal.ConnectPlayerProxy(kDeviceAddress, kDevicePort); - if (EditorUtility.DisplayCancelableProgressBar("Editor Connection", "Connecting to the player", - 1 - ((float)tryCount / maxTryCount))) - { - EditorUtility.ClearProgressBar(); - throw new TestLaunchFailedException(); - } - } - EditorUtility.ClearProgressBar(); - if (connectionResult == -1) - throw new TestLaunchFailedException( - "Timed out trying to connect to the player. Player failed to launch or crashed soon after launching"); - } - - public void CleanUp() - { - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/LuminPlatformSetup.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/LuminPlatformSetup.cs.meta deleted file mode 100644 index 9e4dcc52..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/LuminPlatformSetup.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c38ae0585d6a55042a2d678330689685 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/PlatformSpecificSetup.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/PlatformSpecificSetup.cs deleted file mode 100644 index 4c8ae77c..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/PlatformSpecificSetup.cs +++ /dev/null @@ -1,123 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner -{ - [Serializable] - internal class PlatformSpecificSetup - { - [SerializeField] - private ApplePlatformSetup m_AppleiOSPlatformSetup = new ApplePlatformSetup(BuildTarget.iOS); - [SerializeField] - private ApplePlatformSetup m_AppleTvOSPlatformSetup = new ApplePlatformSetup(BuildTarget.tvOS); - [SerializeField] - private XboxOnePlatformSetup m_XboxOnePlatformSetup = new XboxOnePlatformSetup(); - [SerializeField] - private AndroidPlatformSetup m_AndroidPlatformSetup = new AndroidPlatformSetup(); - [SerializeField] - private SwitchPlatformSetup m_SwitchPlatformSetup = new SwitchPlatformSetup(); -#if UNITY_2019_3_OR_NEWER - [SerializeField] - private StadiaPlatformSetup m_StadiaPlatformSetup = new StadiaPlatformSetup(); -#endif - [SerializeField] - private UwpPlatformSetup m_UwpPlatformSetup = new UwpPlatformSetup(); - - [SerializeField] - private LuminPlatformSetup m_LuminPlatformSetup = new LuminPlatformSetup(); - - - private IDictionary m_SetupTypes; - - [SerializeField] - private BuildTarget m_Target; - - public PlatformSpecificSetup() - { - } - - public PlatformSpecificSetup(BuildTarget target) - { - m_Target = target; - } - - public void Setup() - { - var dictionary = GetSetup(); - - if (!dictionary.ContainsKey(m_Target)) - { - return; - } - - dictionary[m_Target].Setup(); - } - - public void PostBuildAction() - { - var dictionary = GetSetup(); - - if (!dictionary.ContainsKey(m_Target)) - { - return; - } - - dictionary[m_Target].PostBuildAction(); - } - - public void PostSuccessfulBuildAction() - { - var dictionary = GetSetup(); - - if (!dictionary.ContainsKey(m_Target)) - { - return; - } - - dictionary[m_Target].PostSuccessfulBuildAction(); - } - - public void PostSuccessfulLaunchAction() - { - var dictionary = GetSetup(); - - if (!dictionary.ContainsKey(m_Target)) - { - return; - } - - dictionary[m_Target].PostSuccessfulLaunchAction(); - } - - public void CleanUp() - { - var dictionary = GetSetup(); - - if (!dictionary.ContainsKey(m_Target)) - { - return; - } - - dictionary[m_Target].CleanUp(); - } - - private IDictionary GetSetup() - { - m_SetupTypes = new Dictionary() - { - {BuildTarget.iOS, m_AppleiOSPlatformSetup}, - {BuildTarget.tvOS, m_AppleTvOSPlatformSetup}, - {BuildTarget.XboxOne, m_XboxOnePlatformSetup}, - {BuildTarget.Android, m_AndroidPlatformSetup}, - {BuildTarget.WSAPlayer, m_UwpPlatformSetup}, - {BuildTarget.Lumin, m_LuminPlatformSetup}, -#if UNITY_2019_3_OR_NEWER - {BuildTarget.Stadia, m_StadiaPlatformSetup}, -#endif - {BuildTarget.Switch, m_SwitchPlatformSetup} - }; - return m_SetupTypes; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/PlatformSpecificSetup.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/PlatformSpecificSetup.cs.meta deleted file mode 100644 index a250a1a3..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/PlatformSpecificSetup.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6cccd50ebf7384242bda4d7bcb282ebf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/StadiaPlatformSetup.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/StadiaPlatformSetup.cs deleted file mode 100644 index c62016be..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/StadiaPlatformSetup.cs +++ /dev/null @@ -1,25 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner -{ - internal class StadiaPlatformSetup : IPlatformSetup - { - public void Setup() - { - } - - public void PostBuildAction() - { - } - - public void PostSuccessfulBuildAction() - { - } - - public void PostSuccessfulLaunchAction() - { - } - - public void CleanUp() - { - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/StadiaPlatformSetup.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/StadiaPlatformSetup.cs.meta deleted file mode 100644 index 59e70a4c..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/StadiaPlatformSetup.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fa19b42bd3dc35e40a618448bd330270 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/SwitchPlatformSetup.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/SwitchPlatformSetup.cs deleted file mode 100644 index 7c1ea363..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/SwitchPlatformSetup.cs +++ /dev/null @@ -1,41 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner -{ - internal class SwitchPlatformSetup : IPlatformSetup - { - public void Setup() - { - EditorUserBuildSettings.switchCreateRomFile = true; - EditorUserBuildSettings.switchNVNGraphicsDebugger = false; -#if UNITY_2020_1_OR_NEWER - EditorUserBuildSettings.switchNVNDrawValidation_Heavy = true; // catches more graphics errors -#else - EditorUserBuildSettings.switchNVNDrawValidation = true; // catches more graphics errors -#endif - EditorUserBuildSettings.development = true; - EditorUserBuildSettings.switchRedirectWritesToHostMount = true; - - // We can use these when more debugging is required: - //EditorUserBuildSettings.switchNVNDrawValidation = false; // cannot be used with shader debug - //EditorUserBuildSettings.switchNVNGraphicsDebugger = true; - //EditorUserBuildSettings.switchNVNShaderDebugging = true; - //EditorUserBuildSettings.switchCreateSolutionFile = true; // for shorter iteration time - //EditorUserBuildSettings.allowDebugging = true; // managed debugger can be attached - } - - public void PostBuildAction() - { - } - - public void PostSuccessfulBuildAction() - { - } - - public void PostSuccessfulLaunchAction() - { - } - - public void CleanUp() - { - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/SwitchPlatformSetup.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/SwitchPlatformSetup.cs.meta deleted file mode 100644 index fb9dd054..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/SwitchPlatformSetup.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: adf7bea9401c1834380d55601add6cfb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/UwpPlatformSetup.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/UwpPlatformSetup.cs deleted file mode 100644 index a229c343..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/UwpPlatformSetup.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class UwpPlatformSetup : IPlatformSetup - { - private const string k_SettingsBuildConfiguration = "BuildConfiguration"; - private bool m_InternetClientServer; - private bool m_PrivateNetworkClientServer; - - public void Setup() - { - m_InternetClientServer = PlayerSettings.WSA.GetCapability(PlayerSettings.WSACapability.InternetClientServer); - m_PrivateNetworkClientServer = PlayerSettings.WSA.GetCapability(PlayerSettings.WSACapability.PrivateNetworkClientServer); - PlayerSettings.WSA.SetCapability(PlayerSettings.WSACapability.InternetClientServer, true); - PlayerSettings.WSA.SetCapability(PlayerSettings.WSACapability.PrivateNetworkClientServer, true); - - // This setting is initialized only when Window Store App is selected from the Build Settings window, and - // is typically an empty strings when running tests via UTR on the command-line. - bool wsaSettingNotInitialized = string.IsNullOrEmpty(EditorUserBuildSettings.wsaArchitecture); - - // If WSA build settings aren't fully initialized or running from a build machine, specify a default build configuration. - // Otherwise we can use the existing configuration specified by the user in Build Settings. - if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("UNITY_THISISABUILDMACHINE")) || wsaSettingNotInitialized) - { - EditorUserBuildSettings.wsaSubtarget = WSASubtarget.PC; - EditorUserBuildSettings.wsaArchitecture = "x64"; - EditorUserBuildSettings.SetPlatformSettings(BuildPipeline.GetBuildTargetName(BuildTarget.WSAPlayer), k_SettingsBuildConfiguration, WSABuildType.Debug.ToString()); - EditorUserBuildSettings.wsaUWPBuildType = WSAUWPBuildType.ExecutableOnly; - PlayerSettings.SetIl2CppCompilerConfiguration(BuildTargetGroup.WSA, Il2CppCompilerConfiguration.Debug); - } - } - - public void PostBuildAction() - { - } - - public void PostSuccessfulBuildAction() - { - } - - public void PostSuccessfulLaunchAction() - { - } - - public void CleanUp() - { - PlayerSettings.WSA.SetCapability(PlayerSettings.WSACapability.InternetClientServer, m_InternetClientServer); - PlayerSettings.WSA.SetCapability(PlayerSettings.WSACapability.PrivateNetworkClientServer, m_PrivateNetworkClientServer); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/UwpPlatformSetup.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/UwpPlatformSetup.cs.meta deleted file mode 100644 index 751ac7e9..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/UwpPlatformSetup.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 667c6ad86a0b7a548aaa5c287f2c2861 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/XboxOnePlatformSetup.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/XboxOnePlatformSetup.cs deleted file mode 100644 index 54c51edb..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/XboxOnePlatformSetup.cs +++ /dev/null @@ -1,47 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner -{ - internal class XboxOnePlatformSetup : IPlatformSetup - { - private XboxOneDeployMethod oldXboxOneDeployMethod; - private XboxOneDeployDrive oldXboxOneDeployDrive; - private string oldXboxOneAdditionalDebugPorts; - - public void Setup() - { - oldXboxOneDeployMethod = EditorUserBuildSettings.xboxOneDeployMethod; - oldXboxOneDeployDrive = EditorUserBuildSettings.xboxOneDeployDrive; - oldXboxOneAdditionalDebugPorts = EditorUserBuildSettings.xboxOneAdditionalDebugPorts; - - EditorUserBuildSettings.xboxOneDeployMethod = XboxOneDeployMethod.Package; - EditorUserBuildSettings.xboxOneDeployDrive = XboxOneDeployDrive.Default; - - // This causes the XboxOne post processing systems to open this port in your package manifest. - // In addition it will open the ephemeral range for debug connections as well. - // Failure to do this will cause connection problems. - EditorUserBuildSettings.xboxOneAdditionalDebugPorts = "34999"; - } - - public void PostBuildAction() - { - } - - public void PostSuccessfulBuildAction() - { - } - - public void PostSuccessfulLaunchAction() - { - } - - public void CleanUp() - { - EditorUserBuildSettings.xboxOneDeployMethod = oldXboxOneDeployMethod; - EditorUserBuildSettings.xboxOneDeployDrive = oldXboxOneDeployDrive; - - // This causes the XboxOne post processing systems to open this port in your package manifest. - // In addition it will open the ephemeral range for debug connections as well. - // Failure to do this will cause connection problems. - EditorUserBuildSettings.xboxOneAdditionalDebugPorts = oldXboxOneAdditionalDebugPorts; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/XboxOnePlatformSetup.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/XboxOnePlatformSetup.cs.meta deleted file mode 100644 index 771c8538..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlatformSetup/XboxOnePlatformSetup.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: aed7ab02155e43341a2dbcb7bc17c160 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlayerLauncher.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlayerLauncher.cs deleted file mode 100644 index d6987e6f..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlayerLauncher.cs +++ /dev/null @@ -1,219 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading; -using NUnit.Framework.Internal.Filters; -using UnityEditor; -using UnityEditor.TestRunner.TestLaunchers; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine; -using UnityEngine.SceneManagement; -using UnityEngine.TestRunner.Utils; -using UnityEngine.TestTools.TestRunner; -using UnityEngine.TestTools.TestRunner.Callbacks; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class TestLaunchFailedException : Exception - { - public TestLaunchFailedException() {} - public TestLaunchFailedException(string message) : base(message) {} - } - - [Serializable] - internal class PlayerLauncher : RuntimeTestLauncherBase - { - private readonly PlaymodeTestsControllerSettings m_Settings; - private readonly BuildTarget m_TargetPlatform; - private ITestRunSettings m_OverloadTestRunSettings; - private string m_SceneName; - private int m_HeartbeatTimeout; - - public PlayerLauncher(PlaymodeTestsControllerSettings settings, BuildTarget? targetPlatform, ITestRunSettings overloadTestRunSettings, int heartbeatTimeout) - { - m_Settings = settings; - m_TargetPlatform = targetPlatform ?? EditorUserBuildSettings.activeBuildTarget; - m_OverloadTestRunSettings = overloadTestRunSettings; - m_HeartbeatTimeout = heartbeatTimeout; - } - - protected override RuntimePlatform? TestTargetPlatform - { - get { return BuildTargetConverter.TryConvertToRuntimePlatform(m_TargetPlatform); } - } - - public override void Run() - { - var editorConnectionTestCollector = RemoteTestRunController.instance; - editorConnectionTestCollector.hideFlags = HideFlags.HideAndDontSave; - editorConnectionTestCollector.Init(m_TargetPlatform, m_HeartbeatTimeout); - - var remotePlayerLogController = RemotePlayerLogController.instance; - remotePlayerLogController.hideFlags = HideFlags.HideAndDontSave; - - using (var settings = new PlayerLauncherContextSettings(m_OverloadTestRunSettings)) - { - m_SceneName = CreateSceneName(); - var scene = PrepareScene(m_SceneName); - string scenePath = scene.path; - - var filter = m_Settings.BuildNUnitFilter(); - var runner = LoadTests(filter); - var exceptionThrown = ExecutePreBuildSetupMethods(runner.LoadedTest, filter); - if (exceptionThrown) - { - ReopenOriginalScene(m_Settings.originalScene); - AssetDatabase.DeleteAsset(m_SceneName); - CallbacksDelegator.instance.RunFailed("Run Failed: One or more errors in a prebuild setup. See the editor log for details."); - return; - } - - var playerBuildOptions = GetBuildOptions(scenePath); - - var success = BuildAndRunPlayer(playerBuildOptions); - editorConnectionTestCollector.PostBuildAction(); - ExecutePostBuildCleanupMethods(runner.LoadedTest, filter); - - ReopenOriginalScene(m_Settings.originalScene); - AssetDatabase.DeleteAsset(m_SceneName); - - if (!success) - { - ScriptableObject.DestroyImmediate(editorConnectionTestCollector); - Debug.LogError("Player build failed"); - throw new TestLaunchFailedException("Player build failed"); - } - - if ((playerBuildOptions.BuildPlayerOptions.options & BuildOptions.AutoRunPlayer) != 0) - { - editorConnectionTestCollector.PostSuccessfulBuildAction(); - editorConnectionTestCollector.PostSuccessfulLaunchAction(); - } - } - } - - public Scene PrepareScene(string sceneName) - { - var scene = CreateBootstrapScene(sceneName, runner => - { - runner.AddEventHandlerMonoBehaviour(); - runner.settings = m_Settings; - runner.AddEventHandlerMonoBehaviour(); - runner.AddEventHandlerScriptableObject(); - }); - return scene; - } - - private static bool BuildAndRunPlayer(PlayerLauncherBuildOptions buildOptions) - { - Debug.LogFormat(LogType.Log, LogOption.NoStacktrace, null, "Building player with following options:\n{0}", buildOptions); - - - // Android has to be in listen mode to establish player connection - if (buildOptions.BuildPlayerOptions.target == BuildTarget.Android) - { - buildOptions.BuildPlayerOptions.options &= ~BuildOptions.ConnectToHost; - } - - // For now, so does Lumin - if (buildOptions.BuildPlayerOptions.target == BuildTarget.Lumin) - { - buildOptions.BuildPlayerOptions.options &= ~BuildOptions.ConnectToHost; - } - - var result = BuildPipeline.BuildPlayer(buildOptions.BuildPlayerOptions); - if (result.summary.result != Build.Reporting.BuildResult.Succeeded) - Debug.LogError(result.SummarizeErrors()); - - return result.summary.result == Build.Reporting.BuildResult.Succeeded; - } - - private PlayerLauncherBuildOptions GetBuildOptions(string scenePath) - { - var buildOptions = new BuildPlayerOptions(); - var reduceBuildLocationPathLength = false; - - //Some platforms hit MAX_PATH limits during the build process, in these cases minimize the path length - if ((m_TargetPlatform == BuildTarget.WSAPlayer) || (m_TargetPlatform == BuildTarget.XboxOne)) - { - reduceBuildLocationPathLength = true; - } - - var scenes = new List() { scenePath }; - scenes.AddRange(EditorBuildSettings.scenes.Select(x => x.path)); - buildOptions.scenes = scenes.ToArray(); - - buildOptions.options |= BuildOptions.Development | BuildOptions.ConnectToHost | BuildOptions.IncludeTestAssemblies | BuildOptions.StrictMode; - buildOptions.target = m_TargetPlatform; - - if (EditorUserBuildSettings.waitForPlayerConnection) - buildOptions.options |= BuildOptions.WaitForPlayerConnection; - - if (EditorUserBuildSettings.allowDebugging) - buildOptions.options |= BuildOptions.AllowDebugging; - - if (EditorUserBuildSettings.installInBuildFolder) - buildOptions.options |= BuildOptions.InstallInBuildFolder; - else - buildOptions.options |= BuildOptions.AutoRunPlayer; - - var buildTargetGroup = EditorUserBuildSettings.activeBuildTargetGroup; - - //Check if Lz4 is supported for the current buildtargetgroup and enable it if need be - if (PostprocessBuildPlayer.SupportsLz4Compression(buildTargetGroup, m_TargetPlatform)) - { - if (EditorUserBuildSettings.GetCompressionType(buildTargetGroup) == Compression.Lz4) - buildOptions.options |= BuildOptions.CompressWithLz4; - else if (EditorUserBuildSettings.GetCompressionType(buildTargetGroup) == Compression.Lz4HC) - buildOptions.options |= BuildOptions.CompressWithLz4HC; - } - - var uniqueTempPathInProject = FileUtil.GetUniqueTempPathInProject(); - var playerDirectoryName = reduceBuildLocationPathLength ? "PwT" : "PlayerWithTests"; - - if (reduceBuildLocationPathLength) - { - uniqueTempPathInProject = Path.GetTempFileName(); - File.Delete(uniqueTempPathInProject); - Directory.CreateDirectory(uniqueTempPathInProject); - } - var tempPath = Path.GetFullPath(uniqueTempPathInProject); - var buildLocation = Path.Combine(tempPath, playerDirectoryName); - - // iOS builds create a folder with Xcode project instead of an executable, therefore no executable name is added - if (m_TargetPlatform == BuildTarget.iOS) - { - buildOptions.locationPathName = buildLocation; - } - else - { - string extensionForBuildTarget = PostprocessBuildPlayer.GetExtensionForBuildTarget(buildTargetGroup, buildOptions.target, buildOptions.options); - var playerExecutableName = "PlayerWithTests"; - playerExecutableName += string.Format(".{0}", extensionForBuildTarget); - buildOptions.locationPathName = Path.Combine(buildLocation, playerExecutableName); - } - - return new PlayerLauncherBuildOptions - { - BuildPlayerOptions = ModifyBuildOptions(buildOptions), - PlayerDirectory = buildLocation, - }; - } - - private BuildPlayerOptions ModifyBuildOptions(BuildPlayerOptions buildOptions) - { - var allAssemblies = AppDomain.CurrentDomain.GetAssemblies() - .Where(x => x.GetReferencedAssemblies().Any(z => z.Name == "UnityEditor.TestRunner")).ToArray(); - var attributes = allAssemblies.SelectMany(assembly => assembly.GetCustomAttributes(typeof(TestPlayerBuildModifierAttribute), true).OfType()).ToArray(); - var modifiers = attributes.Select(attribute => attribute.ConstructModifier()).ToArray(); - - foreach (var modifier in modifiers) - { - buildOptions = modifier.ModifyOptions(buildOptions); - } - - return buildOptions; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlayerLauncher.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlayerLauncher.cs.meta deleted file mode 100644 index 60bb1c7f..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlayerLauncher.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d973fc1524e4d724081553934c55958c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlayerLauncherBuildOptions.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlayerLauncherBuildOptions.cs deleted file mode 100644 index b4985147..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlayerLauncherBuildOptions.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Text; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class PlayerLauncherBuildOptions - { - public BuildPlayerOptions BuildPlayerOptions; - public string PlayerDirectory; - - public override string ToString() - { - var str = new StringBuilder(); - str.AppendLine("locationPathName = " + BuildPlayerOptions.locationPathName); - str.AppendLine("target = " + BuildPlayerOptions.target); - str.AppendLine("scenes = " + string.Join(", ", BuildPlayerOptions.scenes)); - str.AppendLine("assetBundleManifestPath = " + BuildPlayerOptions.assetBundleManifestPath); - str.AppendLine("options.Development = " + ((BuildPlayerOptions.options & BuildOptions.Development) != 0)); - str.AppendLine("options.AutoRunPlayer = " + ((BuildPlayerOptions.options & BuildOptions.AutoRunPlayer) != 0)); - str.AppendLine("options.ForceEnableAssertions = " + ((BuildPlayerOptions.options & BuildOptions.ForceEnableAssertions) != 0)); - return str.ToString(); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlayerLauncherBuildOptions.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlayerLauncherBuildOptions.cs.meta deleted file mode 100644 index 73c17796..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlayerLauncherBuildOptions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2a0bd678385f98e4d8eabdfc07d62b4f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlayerLauncherContextSettings.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlayerLauncherContextSettings.cs deleted file mode 100644 index 8b027c5e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlayerLauncherContextSettings.cs +++ /dev/null @@ -1,112 +0,0 @@ -using System; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class PlayerLauncherContextSettings : IDisposable - { - private ITestRunSettings m_OverloadSettings; - - private EditorBuildSettingsScene[] m_EditorBuildSettings; -#pragma warning disable 618 - private ResolutionDialogSetting m_DisplayResolutionDialog; -#pragma warning restore 618 - private bool m_RunInBackground; - private FullScreenMode m_FullScreenMode; - private bool m_ResizableWindow; - private bool m_ShowUnitySplashScreen; - private string m_OldproductName; - private string m_OldAotOptions; -#pragma warning disable 618 - private Lightmapping.GIWorkflowMode m_OldLightmapping; -#pragma warning restore 618 - private bool m_explicitNullChecks; - - private bool m_Disposed; - - public PlayerLauncherContextSettings(ITestRunSettings overloadSettings) - { - m_OverloadSettings = overloadSettings; - SetupProjectParameters(); - - if (overloadSettings != null) - { - overloadSettings.Apply(); - } - } - - public void Dispose() - { - if (!m_Disposed) - { - CleanupProjectParameters(); - if (m_OverloadSettings != null) - { - m_OverloadSettings.Dispose(); - } - - m_Disposed = true; - } - } - - private void SetupProjectParameters() - { - EditorApplication.LockReloadAssemblies(); - - m_EditorBuildSettings = EditorBuildSettings.scenes; - -#pragma warning disable 618 - m_DisplayResolutionDialog = PlayerSettings.displayResolutionDialog; - PlayerSettings.displayResolutionDialog = ResolutionDialogSetting.Disabled; -#pragma warning restore 618 - - m_RunInBackground = PlayerSettings.runInBackground; - PlayerSettings.runInBackground = true; - - m_FullScreenMode = PlayerSettings.fullScreenMode; - PlayerSettings.fullScreenMode = FullScreenMode.Windowed; - - m_OldAotOptions = PlayerSettings.aotOptions; - PlayerSettings.aotOptions = "nimt-trampolines=1024"; - - m_ResizableWindow = PlayerSettings.resizableWindow; - PlayerSettings.resizableWindow = true; - - m_ShowUnitySplashScreen = PlayerSettings.SplashScreen.show; - PlayerSettings.SplashScreen.show = false; - - m_OldproductName = PlayerSettings.productName; - PlayerSettings.productName = "UnityTestFramework"; - -#pragma warning disable 618 - m_OldLightmapping = Lightmapping.giWorkflowMode; - Lightmapping.giWorkflowMode = Lightmapping.GIWorkflowMode.OnDemand; -#pragma warning restore 618 - - m_explicitNullChecks = EditorUserBuildSettings.explicitNullChecks; - EditorUserBuildSettings.explicitNullChecks = true; - } - - private void CleanupProjectParameters() - { - EditorBuildSettings.scenes = m_EditorBuildSettings; - - PlayerSettings.fullScreenMode = m_FullScreenMode; - PlayerSettings.runInBackground = m_RunInBackground; -#pragma warning disable 618 - PlayerSettings.displayResolutionDialog = m_DisplayResolutionDialog; -#pragma warning restore 618 - PlayerSettings.resizableWindow = m_ResizableWindow; - PlayerSettings.SplashScreen.show = m_ShowUnitySplashScreen; - PlayerSettings.productName = m_OldproductName; - PlayerSettings.aotOptions = m_OldAotOptions; -#pragma warning disable 618 - Lightmapping.giWorkflowMode = m_OldLightmapping; -#pragma warning restore 618 - EditorUserBuildSettings.explicitNullChecks = m_explicitNullChecks; - - EditorApplication.UnlockReloadAssemblies(); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlayerLauncherContextSettings.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlayerLauncherContextSettings.cs.meta deleted file mode 100644 index 29cb8915..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlayerLauncherContextSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6965880f76f40194593cb53a88f74005 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlaymodeLauncher.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlaymodeLauncher.cs deleted file mode 100644 index 223db274..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlaymodeLauncher.cs +++ /dev/null @@ -1,133 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal.Filters; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine; -using UnityEngine.SceneManagement; -using UnityEngine.TestRunner.Utils; -using UnityEngine.TestTools.TestRunner; -using UnityEngine.TestTools.TestRunner.Callbacks; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class PlaymodeLauncher : RuntimeTestLauncherBase - { - public static bool IsRunning; - private Scene m_Scene; - private bool m_IsTestSetupPerformed; - private readonly PlaymodeTestsControllerSettings m_Settings; - private ITestFilter testFilter; - - [SerializeField] - private List m_EventHandlers = new List(); - - public PlaymodeLauncher(PlaymodeTestsControllerSettings settings) - { - m_Settings = settings; - } - - public override void Run() - { - IsRunning = true; - ConsoleWindow.SetConsoleErrorPause(false); - Application.runInBackground = true; - - var sceneName = CreateSceneName(); - m_Scene = CreateBootstrapScene(sceneName, runner => - { - runner.AddEventHandlerMonoBehaviour(); - runner.AddEventHandlerScriptableObject(); - runner.AddEventHandlerScriptableObject(); - runner.AddEventHandlerScriptableObject(); - - foreach (var eventHandler in m_EventHandlers) - { - var obj = ScriptableObject.CreateInstance(eventHandler); - runner.AddEventHandlerScriptableObject(obj as ITestRunnerListener); - } - - runner.settings = m_Settings; - }); - - if (m_Settings.sceneBased) - { - var newListOfScenes = - new List {new EditorBuildSettingsScene(sceneName, true)}; - newListOfScenes.AddRange(EditorBuildSettings.scenes); - EditorBuildSettings.scenes = newListOfScenes.ToArray(); - } - - EditorApplication.update += UpdateCallback; - } - - public void UpdateCallback() - { - if (m_IsTestSetupPerformed) - { - if (m_Scene.IsValid()) - SceneManager.SetActiveScene(m_Scene); - EditorApplication.update -= UpdateCallback; - EditorApplication.isPlaying = true; - } - else - { - testFilter = m_Settings.BuildNUnitFilter(); - var runner = LoadTests(testFilter); - - var exceptionThrown = ExecutePreBuildSetupMethods(runner.LoadedTest, testFilter); - if (exceptionThrown) - { - EditorApplication.update -= UpdateCallback; - IsRunning = false; - var controller = PlaymodeTestsController.GetController(); - ReopenOriginalScene(controller); - AssetDatabase.DeleteAsset(controller.settings.bootstrapScene); - CallbacksDelegator.instance.RunFailed("Run Failed: One or more errors in a prebuild setup. See the editor log for details."); - return; - } - m_IsTestSetupPerformed = true; - } - } - - [InitializeOnLoad] - public class BackgroundWatcher - { - static BackgroundWatcher() - { - EditorApplication.playModeStateChanged += OnPlayModeStateChanged; - } - - private static void OnPlayModeStateChanged(PlayModeStateChange state) - { - if (!PlaymodeTestsController.IsControllerOnScene()) - return; - var runner = PlaymodeTestsController.GetController(); - if (runner == null) - return; - if (state == PlayModeStateChange.ExitingPlayMode) - { - AssetDatabase.DeleteAsset(runner.settings.bootstrapScene); - ExecutePostBuildCleanupMethods(runner.m_Runner.LoadedTest, runner.settings.BuildNUnitFilter(), Application.platform); - IsRunning = false; - } - else if (state == PlayModeStateChange.EnteredEditMode) - { - //reopen the original scene once we exit playmode - ReopenOriginalScene(runner); - } - } - } - - protected static void ReopenOriginalScene(PlaymodeTestsController runner) - { - ReopenOriginalScene(runner.settings.originalScene); - } - - public void AddEventHandler() where T : ScriptableObject, ITestRunnerListener - { - m_EventHandlers.Add(typeof(T)); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlaymodeLauncher.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlaymodeLauncher.cs.meta deleted file mode 100644 index ddb6e1c3..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PlaymodeLauncher.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d3217d58bbd1d2b4aaee933e2e8b9195 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PostbuildCleanupAttributeFinder.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PostbuildCleanupAttributeFinder.cs deleted file mode 100644 index 32dee2b6..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PostbuildCleanupAttributeFinder.cs +++ /dev/null @@ -1,9 +0,0 @@ -using UnityEngine.TestTools; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class PostbuildCleanupAttributeFinder : AttributeFinderBase - { - public PostbuildCleanupAttributeFinder() : base(attribute => attribute.TargetClass) {} - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PostbuildCleanupAttributeFinder.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PostbuildCleanupAttributeFinder.cs.meta deleted file mode 100644 index 454dd107..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PostbuildCleanupAttributeFinder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2c2dfcbbb77359547bcaa7cdabd47ebb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PrebuildSetupAttributeFinder.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PrebuildSetupAttributeFinder.cs deleted file mode 100644 index b51241f5..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PrebuildSetupAttributeFinder.cs +++ /dev/null @@ -1,9 +0,0 @@ -using UnityEngine.TestTools; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class PrebuildSetupAttributeFinder : AttributeFinderBase - { - public PrebuildSetupAttributeFinder() : base((attribute) => attribute.TargetClass) {} - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PrebuildSetupAttributeFinder.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PrebuildSetupAttributeFinder.cs.meta deleted file mode 100644 index d524e56e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/PrebuildSetupAttributeFinder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3c4ccfb0896bcf44da13e152b267aa49 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/RemotePlayerLogController.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/RemotePlayerLogController.cs deleted file mode 100644 index abaa2192..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/RemotePlayerLogController.cs +++ /dev/null @@ -1,89 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.DeploymentTargets; -using UnityEditor.TestTools.TestRunner.CommandLineTest; -using UnityEngine; - -namespace UnityEditor.TestRunner.TestLaunchers -{ - [Serializable] - internal class RemotePlayerLogController : ScriptableSingleton - { - private List m_LogWriters; - - private Dictionary m_Loggers; - - private string m_DeviceLogsDirectory; - - public void SetBuildTarget(BuildTarget buildTarget) - { - m_Loggers = GetDeploymentTargetLoggers(buildTarget); - - if (m_Loggers == null) - Debug.Log("Deployment target logger could not be created"); - } - - public void SetLogsDirectory(string dir) - { - m_DeviceLogsDirectory = dir; - } - - public void StartLogWriters() - { - if (m_DeviceLogsDirectory == null || m_Loggers == null) - return; - - m_LogWriters = new List(); - - foreach (var logger in m_Loggers) - { - m_LogWriters.Add(new LogWriter(m_DeviceLogsDirectory, logger.Key, logger.Value)); - logger.Value.Start(); - } - } - - public void StopLogWriters() - { - if (m_LogWriters == null) - return; - - foreach (var logWriter in m_LogWriters) - { - logWriter.Stop(); - } - } - - private Dictionary GetDeploymentTargetLoggers(BuildTarget buildTarget) - { - DeploymentTargetManager deploymentTargetManager; - - try - { - deploymentTargetManager = DeploymentTargetManager.CreateInstance(EditorUserBuildSettings.activeBuildTargetGroup, buildTarget); - - if (deploymentTargetManager == null) - return null; - } - catch (NotSupportedException ex) - { - Debug.Log(ex.Message); - Debug.Log("Deployment target logger not initialised"); - return null; - } - - var targets = deploymentTargetManager.GetKnownTargets(); - var loggers = new Dictionary(); - - foreach (var target in targets) - { - if (target.status != DeploymentTargetStatus.Ready) continue; - - var logger = deploymentTargetManager.GetTargetLogger(target.id); - logger.Clear(); - loggers.Add(target.id, logger); - } - - return loggers; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/RemotePlayerLogController.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/RemotePlayerLogController.cs.meta deleted file mode 100644 index b2084192..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/RemotePlayerLogController.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: edd2a1fe1acbbde43aad39862bb3f4a8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/RemotePlayerTestController.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/RemotePlayerTestController.cs deleted file mode 100644 index 951bb8a5..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/RemotePlayerTestController.cs +++ /dev/null @@ -1,110 +0,0 @@ -using System; -using UnityEditor.Networking.PlayerConnection; -using UnityEditor.TestTools.TestRunner; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEditor.TestTools.TestRunner.UnityTestProtocol; -using UnityEngine; -using UnityEngine.Networking.PlayerConnection; -using UnityEngine.TestRunner.TestLaunchers; - -namespace UnityEditor.TestRunner.TestLaunchers -{ - [Serializable] - internal class RemoteTestRunController : ScriptableSingleton - { - internal const int k_HeartbeatTimeout = 60 * 10; - - [SerializeField] - private RemoteTestResultReciever m_RemoteTestResultReciever; - - [SerializeField] - private PlatformSpecificSetup m_PlatformSpecificSetup; - - [SerializeField] - private bool m_RegisteredConnectionCallbacks; - - [SerializeField] - private int m_HearbeatTimeOut; - - private UnityEditor.TestTools.TestRunner.DelayedCallback m_TimeoutCallback; - - public void Init(BuildTarget buildTarget, int heartbeatTimeout) - { - m_HearbeatTimeOut = heartbeatTimeout; - m_PlatformSpecificSetup = new PlatformSpecificSetup(buildTarget); - m_PlatformSpecificSetup.Setup(); - m_RemoteTestResultReciever = new RemoteTestResultReciever(); - EditorConnection.instance.Initialize(); - if (!m_RegisteredConnectionCallbacks) - { - EditorConnection.instance.Initialize(); - DelegateEditorConnectionEvents(); - } - } - - private void DelegateEditorConnectionEvents() - { - m_RegisteredConnectionCallbacks = true; - //This is needed because RemoteTestResultReceiver is not a ScriptableObject - EditorConnection.instance.Register(PlayerConnectionMessageIds.runStartedMessageId, RunStarted); - EditorConnection.instance.Register(PlayerConnectionMessageIds.runFinishedMessageId, RunFinished); - EditorConnection.instance.Register(PlayerConnectionMessageIds.testStartedMessageId, TestStarted); - EditorConnection.instance.Register(PlayerConnectionMessageIds.testFinishedMessageId, TestFinished); - EditorConnection.instance.Register(PlayerConnectionMessageIds.playerAliveHeartbeat, PlayerAliveHeartbeat); - } - - private void RunStarted(MessageEventArgs messageEventArgs) - { - m_TimeoutCallback?.Reset(); - m_RemoteTestResultReciever.RunStarted(messageEventArgs); - CallbacksDelegator.instance.RunStartedRemotely(messageEventArgs.data); - } - - private void RunFinished(MessageEventArgs messageEventArgs) - { - m_TimeoutCallback?.Clear(); - m_RemoteTestResultReciever.RunFinished(messageEventArgs); - m_PlatformSpecificSetup.CleanUp(); - - CallbacksDelegator.instance.RunFinishedRemotely(messageEventArgs.data); - } - - private void TestStarted(MessageEventArgs messageEventArgs) - { - m_TimeoutCallback?.Reset(); - CallbacksDelegator.instance.TestStartedRemotely(messageEventArgs.data); - } - - private void TestFinished(MessageEventArgs messageEventArgs) - { - m_TimeoutCallback?.Reset(); - CallbacksDelegator.instance.TestFinishedRemotely(messageEventArgs.data); - } - - private void PlayerAliveHeartbeat(MessageEventArgs messageEventArgs) - { - m_TimeoutCallback?.Reset(); - } - - private void TimeoutCallback() - { - CallbacksDelegator.instance.RunFailed($"Test execution timed out. No activity received from the player in {m_HearbeatTimeOut} seconds."); - } - - public void PostBuildAction() - { - m_PlatformSpecificSetup.PostBuildAction(); - } - - public void PostSuccessfulBuildAction() - { - m_PlatformSpecificSetup.PostSuccessfulBuildAction(); - m_TimeoutCallback = new UnityEditor.TestTools.TestRunner.DelayedCallback(TimeoutCallback, m_HearbeatTimeOut); - } - - public void PostSuccessfulLaunchAction() - { - m_PlatformSpecificSetup.PostSuccessfulLaunchAction(); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/RemotePlayerTestController.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/RemotePlayerTestController.cs.meta deleted file mode 100644 index 020222b5..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/RemotePlayerTestController.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7d36034e63ad8254b9b2f55280fcc040 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/RemoteTestResultReciever.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/RemoteTestResultReciever.cs deleted file mode 100644 index 75b07125..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/RemoteTestResultReciever.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using UnityEditor.Networking.PlayerConnection; -using UnityEngine; -using UnityEngine.Networking.PlayerConnection; -using UnityEngine.TestRunner.TestLaunchers; - -namespace UnityEditor.TestTools.TestRunner -{ - [Serializable] - internal class RemoteTestResultReciever - { - public void RunStarted(MessageEventArgs messageEventArgs) - { - } - - public void RunFinished(MessageEventArgs messageEventArgs) - { - EditorConnection.instance.Send(PlayerConnectionMessageIds.quitPlayerMessageId, null, messageEventArgs.playerId); - EditorConnection.instance.DisconnectAll(); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/RemoteTestResultReciever.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/RemoteTestResultReciever.cs.meta deleted file mode 100644 index e7010151..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/RemoteTestResultReciever.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fdb35ef8fc437e14fa4b6c74a0609e86 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/RuntimeTestLauncherBase.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/RuntimeTestLauncherBase.cs deleted file mode 100644 index 87d96728..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/RuntimeTestLauncherBase.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Linq; -using NUnit.Framework.Interfaces; -using UnityEditor.Events; -using UnityEditor.SceneManagement; -using UnityEngine; -using UnityEngine.SceneManagement; -using UnityEngine.TestRunner.NUnitExtensions.Runner; -using UnityEngine.TestTools; -using UnityEngine.TestTools.NUnitExtensions; -using UnityEngine.TestTools.TestRunner; -using UnityEngine.TestTools.Utils; - -namespace UnityEditor.TestTools.TestRunner -{ - internal abstract class RuntimeTestLauncherBase : TestLauncherBase - { - protected Scene CreateBootstrapScene(string sceneName, Action runnerSetup) - { - var scene = EditorSceneManager.NewScene(NewSceneSetup.EmptyScene, NewSceneMode.Single); - var go = new GameObject(PlaymodeTestsController.kPlaymodeTestControllerName); - - var editorLoadedTestAssemblyProvider = new EditorLoadedTestAssemblyProvider(new EditorCompilationInterfaceProxy(), new EditorAssembliesProxy()); - - var runner = go.AddComponent(); - runnerSetup(runner); - runner.settings.bootstrapScene = sceneName; - runner.AssembliesWithTests = editorLoadedTestAssemblyProvider.GetAssembliesGroupedByType(TestPlatform.PlayMode).Select(x => x.Assembly.GetName().Name).ToList(); - - EditorSceneManager.MarkSceneDirty(scene); - AssetDatabase.SaveAssets(); - EditorSceneManager.SaveScene(scene, sceneName, false); - - return scene; - } - - public string CreateSceneName() - { - return "Assets/InitTestScene" + DateTime.Now.Ticks + ".unity"; - } - - protected UnityTestAssemblyRunner LoadTests(ITestFilter filter) - { - var editorLoadedTestAssemblyProvider = new EditorLoadedTestAssemblyProvider(new EditorCompilationInterfaceProxy(), new EditorAssembliesProxy()); - var assembliesWithTests = editorLoadedTestAssemblyProvider.GetAssembliesGroupedByType(TestPlatform.PlayMode).Select(x => x.Assembly.GetName().Name).ToList(); - - var nUnitTestAssemblyRunner = new UnityTestAssemblyRunner(new UnityTestAssemblyBuilder(), null); - var assemblyProvider = new PlayerTestAssemblyProvider(new AssemblyLoadProxy(), assembliesWithTests); - nUnitTestAssemblyRunner.Load(assemblyProvider.GetUserAssemblies().Select(a => a.Assembly).ToArray(), TestPlatform.PlayMode, UnityTestAssemblyBuilder.GetNUnitTestBuilderSettings(TestPlatform.PlayMode)); - return nUnitTestAssemblyRunner; - } - - protected static void ReopenOriginalScene(string originalSceneName) - { - EditorSceneManager.NewScene(NewSceneSetup.DefaultGameObjects); - if (!string.IsNullOrEmpty(originalSceneName)) - { - EditorSceneManager.OpenScene(originalSceneName); - } - } - } - - internal static class PlaymodeTestsControllerExtensions - { - internal static T AddEventHandlerMonoBehaviour(this PlaymodeTestsController controller) where T : MonoBehaviour, ITestRunnerListener - { - var eventHandler = controller.gameObject.AddComponent(); - SetListeners(controller, eventHandler); - return eventHandler; - } - - internal static T AddEventHandlerScriptableObject(this PlaymodeTestsController controller) where T : ScriptableObject, ITestRunnerListener - { - var eventListener = ScriptableObject.CreateInstance(); - AddEventHandlerScriptableObject(controller, eventListener); - return eventListener; - } - - internal static void AddEventHandlerScriptableObject(this PlaymodeTestsController controller, ITestRunnerListener obj) - { - SetListeners(controller, obj); - } - - private static void SetListeners(PlaymodeTestsController controller, ITestRunnerListener eventHandler) - { - UnityEventTools.AddPersistentListener(controller.testStartedEvent, eventHandler.TestStarted); - UnityEventTools.AddPersistentListener(controller.testFinishedEvent, eventHandler.TestFinished); - UnityEventTools.AddPersistentListener(controller.runStartedEvent, eventHandler.RunStarted); - UnityEventTools.AddPersistentListener(controller.runFinishedEvent, eventHandler.RunFinished); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/RuntimeTestLauncherBase.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/RuntimeTestLauncherBase.cs.meta deleted file mode 100644 index 28c74163..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/RuntimeTestLauncherBase.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0efb23ecb373b6d4bbe5217485785138 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/TestLauncherBase.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/TestLauncherBase.cs deleted file mode 100644 index 7bfd3546..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/TestLauncherBase.cs +++ /dev/null @@ -1,85 +0,0 @@ -using System; -using System.Linq; -using NUnit.Framework.Interfaces; -using UnityEngine; -using UnityEngine.TestTools; -using UnityEngine.TestTools.Logging; -using UnityEngine.TestTools.TestRunner; - -namespace UnityEditor.TestTools.TestRunner -{ - internal abstract class TestLauncherBase - { - public abstract void Run(); - - protected virtual RuntimePlatform? TestTargetPlatform - { - get { return Application.platform; } - } - - protected bool ExecutePreBuildSetupMethods(ITest tests, ITestFilter testRunnerFilter) - { - var attributeFinder = new PrebuildSetupAttributeFinder(); - var logString = "Executing setup for: {0}"; - return ExecuteMethods(tests, testRunnerFilter, attributeFinder, logString, targetClass => targetClass.Setup(), TestTargetPlatform); - } - - public void ExecutePostBuildCleanupMethods(ITest tests, ITestFilter testRunnerFilter) - { - ExecutePostBuildCleanupMethods(tests, testRunnerFilter, TestTargetPlatform); - } - - public static void ExecutePostBuildCleanupMethods(ITest tests, ITestFilter testRunnerFilter, RuntimePlatform? testTargetPlatform) - { - var attributeFinder = new PostbuildCleanupAttributeFinder(); - var logString = "Executing cleanup for: {0}"; - ExecuteMethods(tests, testRunnerFilter, attributeFinder, logString, targetClass => targetClass.Cleanup(), testTargetPlatform); - } - - private static bool ExecuteMethods(ITest tests, ITestFilter testRunnerFilter, AttributeFinderBase attributeFinder, string logString, Action action, RuntimePlatform? testTargetPlatform) - { - var exceptionsThrown = false; - - if (testTargetPlatform == null) - { - Debug.LogError("Could not determine test target platform from build target " + EditorUserBuildSettings.activeBuildTarget); - return true; - } - - foreach (var targetClassType in attributeFinder.Search(tests, testRunnerFilter, testTargetPlatform.Value)) - { - try - { - var targetClass = (T)Activator.CreateInstance(targetClassType); - - Debug.LogFormat(logString, targetClassType.FullName); - - using (var logScope = new LogScope()) - { - action(targetClass); - - if (logScope.AnyFailingLogs()) - { - var failingLog = logScope.FailingLogs.First(); - throw new UnhandledLogMessageException(failingLog); - } - - if (logScope.ExpectedLogs.Any()) - { - var expectedLogs = logScope.ExpectedLogs.First(); - throw new UnexpectedLogMessageException(expectedLogs); - } - } - } - catch (InvalidCastException) {} - catch (Exception e) - { - Debug.LogException(e); - exceptionsThrown = true; - } - } - - return exceptionsThrown; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/TestLauncherBase.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/TestLauncherBase.cs.meta deleted file mode 100644 index c36990c7..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestLaunchers/TestLauncherBase.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1cddf785b0d07434d8e0607c97b09135 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestResultSerializer.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestResultSerializer.cs deleted file mode 100644 index e3b5220c..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestResultSerializer.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System; -using System.Reflection; -using System.Text; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using UnityEngine; -using UnityEngine.TestRunner.NUnitExtensions; - -namespace UnityEditor.TestTools.TestRunner -{ - [Serializable] - internal class TestResultSerializer - { - private static readonly BindingFlags flags = BindingFlags.NonPublic | BindingFlags.Public | - BindingFlags.Instance | BindingFlags.FlattenHierarchy; - - [SerializeField] public string id; - - [SerializeField] public string fullName; - - [SerializeField] private double duration; - - [SerializeField] private string label; - - [SerializeField] private string message; - - [SerializeField] private string output; - - [SerializeField] private string site; - - [SerializeField] private string stacktrace; - - [SerializeField] private double startTimeAO; - - [SerializeField] private string status; - - [SerializeField] public string uniqueName; - - public static TestResultSerializer MakeFromTestResult(ITestResult result) - { - var wrapper = new TestResultSerializer(); - wrapper.id = result.Test.Id; - wrapper.fullName = result.FullName; - wrapper.status = result.ResultState.Status.ToString(); - wrapper.label = result.ResultState.Label; - wrapper.site = result.ResultState.Site.ToString(); - wrapper.output = result.Output; - wrapper.duration = result.Duration; - wrapper.stacktrace = result.StackTrace; - wrapper.message = result.Message; - wrapper.startTimeAO = result.StartTime.ToOADate(); - wrapper.uniqueName = result.Test.GetUniqueName(); - return wrapper; - } - - public void RestoreTestResult(TestResult result) - { - var resultState = new ResultState((TestStatus)Enum.Parse(typeof(TestStatus), status), label, - (FailureSite)Enum.Parse(typeof(FailureSite), site)); - result.GetType().BaseType.GetField("_resultState", flags).SetValue(result, resultState); - result.GetType().BaseType.GetField("_output", flags).SetValue(result, new StringBuilder(output)); - result.GetType().BaseType.GetField("_duration", flags).SetValue(result, duration); - result.GetType().BaseType.GetField("_message", flags).SetValue(result, message); - result.GetType().BaseType.GetField("_stackTrace", flags).SetValue(result, stacktrace); - result.GetType() - .BaseType.GetProperty("StartTime", flags) - .SetValue(result, DateTime.FromOADate(startTimeAO), null); - } - - public bool IsPassed() - { - return status == TestStatus.Passed.ToString(); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestResultSerializer.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestResultSerializer.cs.meta deleted file mode 100644 index 96f29603..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestResultSerializer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 559482fe33c79e44882d3a6cedc55fb5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun.meta deleted file mode 100644 index 6f6e8cfd..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 8721cb2237d4a564a94a51f56243bdac -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks.meta deleted file mode 100644 index bb019b79..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 6dba53789da15814387fa5b1445e81e0 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/BuildActionTaskBase.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/BuildActionTaskBase.cs deleted file mode 100644 index 7efaecb2..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/BuildActionTaskBase.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework.Interfaces; -using UnityEngine; -using UnityEngine.TestTools.Logging; -using UnityEngine.TestTools.TestRunner; - -namespace UnityEditor.TestTools.TestRunner.TestRun.Tasks -{ - internal abstract class BuildActionTaskBase : TestTaskBase - { - private string typeName; - internal IAttributeFinder attributeFinder; - internal RuntimePlatform targetPlatform = Application.platform; - internal Action logAction = Debug.Log; - internal Func logScopeProvider = () => new LogScope(); - internal Func createInstance = Activator.CreateInstance; - - protected BuildActionTaskBase(IAttributeFinder attributeFinder) - { - this.attributeFinder = attributeFinder; - typeName = typeof(T).Name; - } - - protected abstract void Action(T target); - - public override IEnumerator Execute(TestJobData testJobData) - { - if (testJobData.testTree == null) - { - throw new Exception($"Test tree is not available for {GetType().Name}."); - } - - var enumerator = ExecuteMethods(testJobData.testTree, testJobData.executionSettings.BuildNUnitFilter()); - while (enumerator.MoveNext()) - { - yield return null; - } - } - - protected IEnumerator ExecuteMethods(ITest testTree, ITestFilter testRunnerFilter) - { - var exceptions = new List(); - - foreach (var targetClassType in attributeFinder.Search(testTree, testRunnerFilter, targetPlatform)) - { - try - { - var targetClass = (T) createInstance(targetClassType); - - logAction($"Executing {typeName} for: {targetClassType.FullName}."); - - using (var logScope = logScopeProvider()) - { - Action(targetClass); - - if (logScope.AnyFailingLogs()) - { - var failingLog = logScope.FailingLogs.First(); - throw new UnhandledLogMessageException(failingLog); - } - - if (logScope.ExpectedLogs.Any()) - { - var expectedLogs = logScope.ExpectedLogs.First(); - throw new UnexpectedLogMessageException(expectedLogs); - } - } - } - catch (Exception ex) - { - exceptions.Add(ex); - } - - yield return null; - } - - if (exceptions.Count > 0) - { - throw new AggregateException($"One or more exceptions when executing {typeName}.", exceptions); - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/BuildActionTaskBase.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/BuildActionTaskBase.cs.meta deleted file mode 100644 index 54afd57c..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/BuildActionTaskBase.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c2441d353f9c42a44af6e224e4901b52 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/BuildTestTreeTask.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/BuildTestTreeTask.cs deleted file mode 100644 index b66f5073..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/BuildTestTreeTask.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Collections; -using System.Linq; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine.TestRunner.NUnitExtensions; -using UnityEngine.TestTools; -using UnityEngine.TestTools.NUnitExtensions; - -namespace UnityEditor.TestTools.TestRunner.TestRun.Tasks -{ - internal class BuildTestTreeTask : TestTaskBase - { - private TestPlatform m_TestPlatform; - - public BuildTestTreeTask(TestPlatform testPlatform) - { - m_TestPlatform = testPlatform; - } - - internal IEditorLoadedTestAssemblyProvider m_testAssemblyProvider = new EditorLoadedTestAssemblyProvider(new EditorCompilationInterfaceProxy(), new EditorAssembliesProxy()); - internal IAsyncTestAssemblyBuilder m_testAssemblyBuilder = new UnityTestAssemblyBuilder(); - internal ICallbacksDelegator m_CallbacksDelegator = CallbacksDelegator.instance; - - public override IEnumerator Execute(TestJobData testJobData) - { - if (testJobData.testTree != null) - { - yield break; - } - - var assembliesEnumerator = m_testAssemblyProvider.GetAssembliesGroupedByTypeAsync(m_TestPlatform); - while (assembliesEnumerator.MoveNext()) - { - yield return null; - } - - if (assembliesEnumerator.Current == null) - { - throw new Exception("Assemblies not retrieved."); - } - - var assemblies = assembliesEnumerator.Current.Where(pair => m_TestPlatform.IsFlagIncluded(pair.Key)).SelectMany(pair => pair.Value).Select(x => x.Assembly).ToArray(); - var buildSettings = UnityTestAssemblyBuilder.GetNUnitTestBuilderSettings(m_TestPlatform); - var enumerator = m_testAssemblyBuilder.BuildAsync(assemblies, Enumerable.Repeat(m_TestPlatform, assemblies.Length).ToArray(), buildSettings); - while (enumerator.MoveNext()) - { - yield return null; - } - - var testList = enumerator.Current; - if (testList== null) - { - throw new Exception("Test list not retrieved."); - } - - testList.ParseForNameDuplicates(); - testJobData.testTree = testList; - m_CallbacksDelegator.TestTreeRebuild(testList); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/BuildTestTreeTask.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/BuildTestTreeTask.cs.meta deleted file mode 100644 index b00d7b1d..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/BuildTestTreeTask.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a0288e1c9324e824bab7e2044a72a434 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/CleanupVerificationTask.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/CleanupVerificationTask.cs deleted file mode 100644 index cf07f4c3..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/CleanupVerificationTask.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Collections; -using System.IO; -using System.Linq; -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner.TestRun.Tasks -{ - internal class CleanupVerificationTask : FileCleanupVerifierTaskBase - { - private const string k_Indent = " "; - - internal Action logAction = Debug.LogWarning; - - public override IEnumerator Execute(TestJobData testJobData) - { - var currentFiles = GetAllFilesInAssetsDirectory(); - var existingFiles = testJobData.existingFiles; - - if (currentFiles.Length != existingFiles.Length) - { - LogWarningForFilesIfAny(currentFiles.Where(file => !testJobData.existingFiles.Contains(file)).ToArray()); - } - - yield return null; - } - - private void LogWarningForFilesIfAny(string[] filePaths) - { - if (!filePaths.Any()) - { - return; - } - - var stringWriter = new StringWriter(); - stringWriter.WriteLine("Files generated by test without cleanup."); - stringWriter.WriteLine(k_Indent + "Found {0} new files.", filePaths.Length); - - foreach (var filePath in filePaths) - { - stringWriter.WriteLine(k_Indent + filePath); - } - - logAction(stringWriter.ToString()); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/CleanupVerificationTask.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/CleanupVerificationTask.cs.meta deleted file mode 100644 index 2ea7cb03..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/CleanupVerificationTask.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 93eb6389f4fb6924987867ce0bc339ee -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/FileCleanupVerifierTaskBase.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/FileCleanupVerifierTaskBase.cs deleted file mode 100644 index 35f4aa0a..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/FileCleanupVerifierTaskBase.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -namespace UnityEditor.TestTools.TestRunner.TestRun.Tasks -{ - internal abstract class FileCleanupVerifierTaskBase : TestTaskBase - { - internal Func GetAllAssetPathsAction = AssetDatabase.GetAllAssetPaths; - - protected string[] GetAllFilesInAssetsDirectory() - { - return GetAllAssetPathsAction(); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/FileCleanupVerifierTaskBase.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/FileCleanupVerifierTaskBase.cs.meta deleted file mode 100644 index 617b92d8..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/FileCleanupVerifierTaskBase.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ad7bb166069f8414e9ad26606b305e66 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/LegacyEditModeRunTask.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/LegacyEditModeRunTask.cs deleted file mode 100644 index 30db2674..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/LegacyEditModeRunTask.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Collections; -using UnityEngine; -using UnityEngine.TestTools; - -namespace UnityEditor.TestTools.TestRunner.TestRun.Tasks -{ - internal class LegacyEditModeRunTask : TestTaskBase - { - public LegacyEditModeRunTask() : base(true) - { - - } - - public override IEnumerator Execute(TestJobData testJobData) - { - var testLauncher = new EditModeLauncher(testJobData.executionSettings.filters, TestPlatform.EditMode, testJobData.executionSettings.runSynchronously); - testJobData.editModeRunner = testLauncher.m_EditModeRunner; - testLauncher.Run(); - - while (testJobData.editModeRunner != null && !testJobData.editModeRunner.RunFinished) - { - yield return null; - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/LegacyEditModeRunTask.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/LegacyEditModeRunTask.cs.meta deleted file mode 100644 index 3a65c889..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/LegacyEditModeRunTask.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b4246555189b5ee43b4857220f9fd29b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/LegacyPlayModeRunTask.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/LegacyPlayModeRunTask.cs deleted file mode 100644 index 0d0c8c7c..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/LegacyPlayModeRunTask.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Collections; -using System.Linq; -using UnityEngine.TestTools.TestRunner; - -namespace UnityEditor.TestTools.TestRunner.TestRun.Tasks -{ - internal class LegacyPlayModeRunTask : TestTaskBase - { - public LegacyPlayModeRunTask() : base(true) - { - - } - public override IEnumerator Execute(TestJobData testJobData) - { - var settings = PlaymodeTestsControllerSettings.CreateRunnerSettings(testJobData.executionSettings.filters.Select(filter => filter.ToTestRunnerFilter()).ToArray()); - var launcher = new PlaymodeLauncher(settings); - - launcher.Run(); - - while (PlaymodeLauncher.IsRunning) - { - yield return null; - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/LegacyPlayModeRunTask.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/LegacyPlayModeRunTask.cs.meta deleted file mode 100644 index 0a753683..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/LegacyPlayModeRunTask.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4769fe1e7475c8843b092338acbcad25 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/LegacyPlayerRunTask.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/LegacyPlayerRunTask.cs deleted file mode 100644 index 0caa6730..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/LegacyPlayerRunTask.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Collections; -using System.Linq; -using UnityEngine.TestTools.TestRunner; - -namespace UnityEditor.TestTools.TestRunner.TestRun.Tasks -{ - internal class LegacyPlayerRunTask : TestTaskBase - { - public override IEnumerator Execute(TestJobData testJobData) - { - var executionSettings = testJobData.executionSettings; - var settings = PlaymodeTestsControllerSettings.CreateRunnerSettings(executionSettings.filters.Select(filter => filter.ToTestRunnerFilter()).ToArray()); - var launcher = new PlayerLauncher(settings, executionSettings.targetPlatform, executionSettings.overloadTestRunSettings, executionSettings.playerHeartbeatTimeout); - launcher.Run(); - yield return null; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/LegacyPlayerRunTask.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/LegacyPlayerRunTask.cs.meta deleted file mode 100644 index 67eea1a1..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/LegacyPlayerRunTask.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b93fe5bbea454ae438fcec241c5fa85b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/PerformUndoTask.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/PerformUndoTask.cs deleted file mode 100644 index 93878cf7..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/PerformUndoTask.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections; -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner.TestRun.Tasks -{ - internal class PerformUndoTask : TestTaskBase - { - private const double warningThreshold = 1000; - - internal Action RevertAllDownToGroup = Undo.RevertAllDownToGroup; - internal Action LogWarning = Debug.LogWarning; - internal Action DisplayProgressBar = EditorUtility.DisplayProgressBar; - internal Action ClearProgressBar = EditorUtility.ClearProgressBar; - internal Func TimeNow = () => DateTime.Now; - - public override IEnumerator Execute(TestJobData testJobData) - { - if (testJobData.undoGroup < 0) - { - yield break; - } - - DisplayProgressBar("Undo", "Reverting changes to the scene", 0); - - var undoStartTime = TimeNow(); - - RevertAllDownToGroup(testJobData.undoGroup); - - var timeDelta = TimeNow() - undoStartTime; - if (timeDelta.TotalMilliseconds >= warningThreshold) - { - LogWarning($"Undo after editor test run took {timeDelta.Seconds} second{(timeDelta.Seconds == 1 ? "" : "s")}."); - } - - ClearProgressBar(); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/PerformUndoTask.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/PerformUndoTask.cs.meta deleted file mode 100644 index f5067424..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/PerformUndoTask.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fb1abebffd37bd4458c84e15a5d7ab04 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/PrebuildSetupTask.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/PrebuildSetupTask.cs deleted file mode 100644 index adec2ae2..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/PrebuildSetupTask.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections; -using NUnit.Framework.Interfaces; -using UnityEngine; -using UnityEngine.TestTools; - -namespace UnityEditor.TestTools.TestRunner.TestRun.Tasks -{ - internal class PrebuildSetupTask : BuildActionTaskBase - { - public PrebuildSetupTask() : base(new PrebuildSetupAttributeFinder()) - { - } - - protected override void Action(IPrebuildSetup target) - { - target.Setup(); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/PrebuildSetupTask.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/PrebuildSetupTask.cs.meta deleted file mode 100644 index 5a564af7..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/PrebuildSetupTask.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fc039194235714f48a39bd364885e744 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/RegisterFilesForCleanupVerificationTask.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/RegisterFilesForCleanupVerificationTask.cs deleted file mode 100644 index 50b4cf67..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/RegisterFilesForCleanupVerificationTask.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Collections; - -namespace UnityEditor.TestTools.TestRunner.TestRun.Tasks -{ - internal class RegisterFilesForCleanupVerificationTask : FileCleanupVerifierTaskBase - { - public override IEnumerator Execute(TestJobData testJobData) - { - testJobData.existingFiles = GetAllFilesInAssetsDirectory(); - yield return null; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/RegisterFilesForCleanupVerificationTask.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/RegisterFilesForCleanupVerificationTask.cs.meta deleted file mode 100644 index 51eb7dd8..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/RegisterFilesForCleanupVerificationTask.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a398fde47a0349a40a9bdf8988c392c9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/SaveModiedSceneTask.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/SaveModiedSceneTask.cs deleted file mode 100644 index d42f7b96..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/SaveModiedSceneTask.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections; -using UnityEditor.SceneManagement; - -namespace UnityEditor.TestTools.TestRunner.TestRun.Tasks -{ - internal class SaveModiedSceneTask : TestTaskBase - { - internal Func SaveCurrentModifiedScenesIfUserWantsTo = - EditorSceneManager.SaveCurrentModifiedScenesIfUserWantsTo; - public override IEnumerator Execute(TestJobData testJobData) - { - var cancelled = !SaveCurrentModifiedScenesIfUserWantsTo(); - if (cancelled) - { - throw new TestRunCanceledException(); - } - - yield break; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/SaveModiedSceneTask.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/SaveModiedSceneTask.cs.meta deleted file mode 100644 index 7300f3bd..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/SaveModiedSceneTask.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c321246872d389b469bd0cb86d3701ed -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/SaveUndoIndexTask.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/SaveUndoIndexTask.cs deleted file mode 100644 index ee6de8f7..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/SaveUndoIndexTask.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections; - -namespace UnityEditor.TestTools.TestRunner.TestRun.Tasks -{ - internal class SaveUndoIndexTask : TestTaskBase - { - internal Func GetUndoGroup = Undo.GetCurrentGroup; - public override IEnumerator Execute(TestJobData testJobData) - { - testJobData.undoGroup = GetUndoGroup(); - yield break; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/SaveUndoIndexTask.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/SaveUndoIndexTask.cs.meta deleted file mode 100644 index 30789a18..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/SaveUndoIndexTask.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cc0ce06a7515c044bb8db4c75db84114 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/TestTaskBase.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/TestTaskBase.cs deleted file mode 100644 index 81b18491..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/TestTaskBase.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Collections; - -namespace UnityEditor.TestTools.TestRunner.TestRun.Tasks -{ - internal abstract class TestTaskBase - { - public bool SupportsResumingEnumerator; - - protected TestTaskBase(bool supportsResumingEnumerator = false) - { - SupportsResumingEnumerator = supportsResumingEnumerator; - } - - public abstract IEnumerator Execute(TestJobData testJobData); - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/TestTaskBase.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/TestTaskBase.cs.meta deleted file mode 100644 index 8b54c2e1..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/Tasks/TestTaskBase.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 342d9ef4da0a19b49877f576c2deec14 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/TestJobData.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/TestJobData.cs deleted file mode 100644 index 05ab5034..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/TestJobData.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using NUnit.Framework.Interfaces; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner.TestRun -{ - [Serializable] - internal class TestJobData - { - [SerializeField] - public string guid; - - [SerializeField] - public int taskIndex; - - [SerializeField] - public int taskPC; - - [SerializeField] - public bool isRunning; - - [SerializeField] - public ExecutionSettings executionSettings; - - [SerializeField] - public string[] existingFiles; - - [SerializeField] - public int undoGroup = -1; - - [SerializeField] - public EditModeRunner editModeRunner; - - [NonSerialized] - public bool isHandledByRunner; - - public ITest testTree; - - public TestJobData(ExecutionSettings settings) - { - guid = Guid.NewGuid().ToString(); - executionSettings = settings; - isRunning = false; - taskIndex = 0; - taskPC = 0; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/TestJobData.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/TestJobData.cs.meta deleted file mode 100644 index 5da5662e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/TestJobData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 80ac8f5b2a7fa904dbc80111be88c8be -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/TestJobDataHolder.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/TestJobDataHolder.cs deleted file mode 100644 index 7852f739..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/TestJobDataHolder.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Collections.Generic; -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner.TestRun -{ - internal class TestJobDataHolder : ScriptableSingleton - { - [SerializeField] - public List TestRuns = new List(); - - [InitializeOnLoadMethod] - private static void ResumeRunningJobs() - { - foreach (var testRun in instance.TestRuns.ToArray()) - { - if (testRun.isRunning) - { - var runner = new TestJobRunner(); - runner.RunJob(testRun); - } - else - { - instance.TestRuns.Remove(testRun); - } - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/TestJobDataHolder.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/TestJobDataHolder.cs.meta deleted file mode 100644 index 3612b80a..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/TestJobDataHolder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 612b00d793cac3c49808ab3ee5428f16 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/TestJobRunner.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/TestJobRunner.cs deleted file mode 100644 index 8a9cd4f9..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/TestJobRunner.cs +++ /dev/null @@ -1,166 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEditor.TestTools.TestRunner.TestRun.Tasks; -using UnityEngine; -using UnityEngine.TestTools; - -namespace UnityEditor.TestTools.TestRunner.TestRun -{ - internal class TestJobRunner - { - private static IEnumerable GetTaskList(ExecutionSettings settings) - { - if (settings == null) - { - yield break; - } - - if (settings.EditModeIncluded() || (PlayerSettings.runPlayModeTestAsEditModeTest && settings.PlayModeInEditorIncluded())) - { - yield return new SaveModiedSceneTask(); - yield return new RegisterFilesForCleanupVerificationTask(); - yield return new SaveUndoIndexTask(); - yield return new BuildTestTreeTask(TestPlatform.EditMode); - yield return new PrebuildSetupTask(); - yield return new LegacyEditModeRunTask(); - yield return new PerformUndoTask(); - yield return new CleanupVerificationTask(); - yield break; - } - - if (settings.PlayModeInEditorIncluded() && !PlayerSettings.runPlayModeTestAsEditModeTest) - { - yield return new SaveModiedSceneTask(); - yield return new LegacyPlayModeRunTask(); - yield break; - } - - if (settings.PlayerIncluded()) - { - yield return new LegacyPlayerRunTask(); - yield break; - } - } - - internal List SavedTestJobData = TestJobDataHolder.instance.TestRuns; - internal Action SubscribeCallback = (callback) => EditorApplication.update += callback; - // ReSharper disable once DelegateSubtraction - internal Action UnsubscribeCallback = (callback) => EditorApplication.update -= callback; - internal TestCommandPcHelper PcHelper = new EditModePcHelper(); - internal Func> GetTasks = GetTaskList; - internal Action LogException = Debug.LogException; - internal Action LogError = Debug.LogError; - internal Action ReportRunFailed = CallbacksDelegator.instance.RunFailed; - - private TestJobData m_JobData; - private TestTaskBase[] Tasks; - private IEnumerator m_Enumerator = null; - - public string RunJob(TestJobData data) - { - if (data == null) - { - throw new ArgumentException(null, nameof(data)); - } - - if (m_JobData != null && m_JobData.isRunning) - { - throw new Exception("TestJobRunner is already running a job."); - } - - if (data.isHandledByRunner) - { - throw new Exception("Test job is already being handled."); - } - - m_JobData = data; - m_JobData.isHandledByRunner = true; - - if (!m_JobData.isRunning) - { - m_JobData.isRunning = true; - SavedTestJobData.Add(m_JobData); - } - - Tasks = GetTasks(data.executionSettings).ToArray(); - if (!data.executionSettings.runSynchronously) - { - SubscribeCallback(ExecuteStep); - } - else - { - while (data.isRunning) - { - ExecuteStep(); - } - } - - return data.guid; - } - - private void ExecuteStep() - { - try - { - if (m_JobData.taskIndex >= Tasks.Length) - { - StopRun(); - return; - } - - if (m_Enumerator == null) - { - var task = Tasks[m_JobData.taskIndex]; - m_Enumerator = task.Execute(m_JobData); - if (task.SupportsResumingEnumerator) - { - PcHelper.SetEnumeratorPC(m_Enumerator, m_JobData.taskPC); - } - } - - if (!m_Enumerator.MoveNext()) - { - m_JobData.taskIndex++; - m_JobData.taskPC = 0; - m_Enumerator = null; - return; - } - - if (Tasks[m_JobData.taskIndex].SupportsResumingEnumerator) - { - m_JobData.taskPC = PcHelper.GetEnumeratorPC(m_Enumerator); - } - } - catch (TestRunCanceledException) - { - StopRun(); - } - catch (AggregateException ex) - { - StopRun(); - LogError(ex.Message); - foreach (var innerException in ex.InnerExceptions) - { - LogException(innerException); - } - ReportRunFailed("Multiple unexpected errors happened while running tests."); - } - catch (Exception ex) - { - StopRun(); - LogException(ex); - ReportRunFailed("An unexpected error happened while running tests."); - } - } - - private void StopRun() - { - m_JobData.isRunning = false; - UnsubscribeCallback(ExecuteStep); - SavedTestJobData.Remove(m_JobData); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/TestJobRunner.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/TestJobRunner.cs.meta deleted file mode 100644 index df11aa02..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/TestJobRunner.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0b677ddfd54046c498a20446baa4f932 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/TestRunCanceledException.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/TestRunCanceledException.cs deleted file mode 100644 index 542c501f..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/TestRunCanceledException.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace UnityEditor.TestTools.TestRunner.TestRun -{ - internal class TestRunCanceledException : Exception - { - - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/TestRunCanceledException.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/TestRunCanceledException.cs.meta deleted file mode 100644 index 2237e642..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRun/TestRunCanceledException.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1d45b9d3cf85bee4f99c1492fca8438a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner.meta deleted file mode 100644 index d09886b6..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 49d4c2ab7ff0f4442af256bad7c9d57c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks.meta deleted file mode 100644 index 9e611a48..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 5d7f0d6acfced954682a89e7002c04d9 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/EditModeRunnerCallback.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/EditModeRunnerCallback.cs deleted file mode 100644 index a22c7988..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/EditModeRunnerCallback.cs +++ /dev/null @@ -1,186 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using UnityEditor.SceneManagement; -using UnityEngine; -using UnityEngine.TestTools.TestRunner; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class EditModeRunnerCallback : ScriptableObject, ITestRunnerListener - { - private EditModeLauncherContextSettings m_Settings; - public SceneSetup[] previousSceneSetup; - public EditModeRunner runner; - - private bool m_Canceled; - private ITest m_CurrentTest; - private int m_TotalTests; - - [SerializeField] - private List m_PendingTests; - [SerializeField] - private string m_LastCountedTestName; - [SerializeField] - private bool m_RunRestarted; - - public void OnDestroy() - { - CleanUp(); - } - - public void RunStarted(ITest testsToRun) - { - Setup(); - if (m_PendingTests == null) - { - m_PendingTests = GetTestsExpectedToRun(testsToRun, runner.GetFilter()); - m_TotalTests = m_PendingTests.Count; - } - } - - public void OnEnable() - { - if (m_RunRestarted) - { - Setup(); - } - } - - private void Setup() - { - m_Settings = new EditModeLauncherContextSettings(); - Application.logMessageReceivedThreaded += LogReceived; - EditorApplication.playModeStateChanged += WaitForExitPlaymode; - EditorApplication.update += DisplayProgressBar; - AssemblyReloadEvents.beforeAssemblyReload += BeforeAssemblyReload; - } - - private void BeforeAssemblyReload() - { - if (m_CurrentTest != null) - { - m_LastCountedTestName = m_CurrentTest.FullName; - m_RunRestarted = true; - } - } - - private void DisplayProgressBar() - { - if (m_CurrentTest == null) - return; - if (!m_Canceled && EditorUtility.DisplayCancelableProgressBar("Test Runner", "Running test " + m_CurrentTest.Name, Math.Min(1.0f, (float)(m_TotalTests - m_PendingTests.Count) / m_TotalTests))) - { - EditorApplication.update -= DisplayProgressBar; - m_Canceled = true; - EditorUtility.ClearProgressBar(); - runner.OnRunCancel(); - } - } - - private static void LogReceived(string message, string stacktrace, LogType type) - { - if (TestContext.Out != null) - TestContext.Out.WriteLine(message); - } - - private static void WaitForExitPlaymode(PlayModeStateChange state) - { - if (state == PlayModeStateChange.EnteredEditMode) - { - EditorApplication.playModeStateChanged -= WaitForExitPlaymode; - //because logMessage is reset on Enter EditMode - //we remove and add the callback - //because Unity - Application.logMessageReceivedThreaded -= LogReceived; - Application.logMessageReceivedThreaded += LogReceived; - } - } - - public void RunFinished(ITestResult result) - { - if (previousSceneSetup != null && previousSceneSetup.Length > 0) - { - try - { - EditorSceneManager.RestoreSceneManagerSetup(previousSceneSetup); - } - catch (ArgumentException e) - { - Debug.LogWarning(e.Message); - } - } - else - { - foreach (var obj in FindObjectsOfType()) - { - if (obj != null && obj.transform.parent != null && (obj.transform.parent.hideFlags & HideFlags.DontSaveInEditor) == HideFlags.DontSaveInEditor && obj.transform.parent.gameObject != null) - { - DestroyImmediate(obj.transform.parent.gameObject); - } - } - - EditorSceneManager.NewScene(NewSceneSetup.DefaultGameObjects, NewSceneMode.Single); - } - CleanUp(); - } - - private void CleanUp() - { - m_CurrentTest = null; - EditorUtility.ClearProgressBar(); - if (m_Settings != null) - { - m_Settings.Dispose(); - } - Application.logMessageReceivedThreaded -= LogReceived; - EditorApplication.update -= DisplayProgressBar; - } - - public void TestStarted(ITest test) - { - if (test.IsSuite || !(test is TestMethod)) - { - return; - } - - m_CurrentTest = test; - - if (m_RunRestarted) - { - if (test.FullName == m_LastCountedTestName) - m_RunRestarted = false; - } - } - - public void TestFinished(ITestResult result) - { - if (result.Test is TestMethod) - { - m_PendingTests.Remove(result.Test.FullName); - } - } - - private static List GetTestsExpectedToRun(ITest test, ITestFilter filter) - { - var expectedTests = new List(); - - if (filter.Pass(test)) - { - if (test.IsSuite) - { - expectedTests.AddRange(test.Tests.SelectMany(subTest => GetTestsExpectedToRun(subTest, filter))); - } - else - { - expectedTests.Add(test.FullName); - } - } - - return expectedTests; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/EditModeRunnerCallback.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/EditModeRunnerCallback.cs.meta deleted file mode 100644 index 1a0d71c8..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/EditModeRunnerCallback.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cc456ba93311a3a43ad896449fee9868 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/RerunCallback.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/RerunCallback.cs deleted file mode 100644 index bf8e698f..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/RerunCallback.cs +++ /dev/null @@ -1,86 +0,0 @@ -using UnityEditor.TestTools.TestRunner.Api; -using UnityEditor.TestTools.TestRunner.CommandLineTest; -using UnityEngine.TestTools.TestRunner.GUI; -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class RerunCallback : ScriptableObject, ICallbacks - { - public static bool useMockRunFilter = false; - public static TestRunnerFilter mockRunFilter = null; - - public void RunFinished(ITestResultAdaptor result) - { - if (RerunCallbackData.instance.runFilters == null || RerunCallbackData.instance.runFilters.Length == 0) - RerunCallbackData.instance.runFilters = new[] {new TestRunnerFilter()}; - - var runFilter = RerunCallbackData.instance.runFilters[0]; - - if (useMockRunFilter) - { - runFilter = mockRunFilter; - } - - runFilter.testRepetitions--; - if (runFilter.testRepetitions <= 0 || result.TestStatus != TestStatus.Passed) - { - ExitCallbacks.preventExit = false; - return; - } - - ExitCallbacks.preventExit = true; - if (EditorApplication.isPlaying) - { - EditorApplication.playModeStateChanged += WaitForExitPlaymode; - return; - } - - if (!useMockRunFilter) - { - ExecuteTestRunnerAPI(); - } - } - - private static void WaitForExitPlaymode(PlayModeStateChange state) - { - if (state == PlayModeStateChange.EnteredEditMode) - { - ExecuteTestRunnerAPI(); - } - } - - private static void ExecuteTestRunnerAPI() - { - var runFilter = RerunCallbackData.instance.runFilters[0]; - var testMode = RerunCallbackData.instance.testMode; - - var testRunnerApi = ScriptableObject.CreateInstance(); - testRunnerApi.Execute(new Api.ExecutionSettings() - { - filters = new[] - { - new Filter() - { - categoryNames = runFilter.categoryNames, - groupNames = runFilter.groupNames, - testMode = testMode, - testNames = runFilter.testNames - } - } - }); - } - - public void TestStarted(ITestAdaptor test) - { - } - - public void TestFinished(ITestResultAdaptor result) - { - } - - public void RunStarted(ITestAdaptor testsToRun) - { - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/RerunCallback.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/RerunCallback.cs.meta deleted file mode 100644 index 3a3be6ce..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/RerunCallback.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b7ff2b2e91321ff4381d4ab45870a32e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/RerunCallbackData.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/RerunCallbackData.cs deleted file mode 100644 index 710069c3..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/RerunCallbackData.cs +++ /dev/null @@ -1,15 +0,0 @@ -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine; -using UnityEngine.TestTools.TestRunner.GUI; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class RerunCallbackData : ScriptableSingleton - { - [SerializeField] - internal TestRunnerFilter[] runFilters; - - [SerializeField] - internal TestMode testMode; - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/RerunCallbackData.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/RerunCallbackData.cs.meta deleted file mode 100644 index e72f3af1..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/RerunCallbackData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 087cba9fa6ac867479a0b0fdc0a5864b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/RerunCallbackInitializer.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/RerunCallbackInitializer.cs deleted file mode 100644 index 2260d4da..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/RerunCallbackInitializer.cs +++ /dev/null @@ -1,17 +0,0 @@ -using UnityEngine; -using UnityEditor.TestTools.TestRunner.Api; - -namespace UnityEditor.TestTools.TestRunner -{ - [InitializeOnLoad] - static class RerunCallbackInitializer - { - static RerunCallbackInitializer() - { - var testRunnerApi = ScriptableObject.CreateInstance(); - - var rerunCallback = ScriptableObject.CreateInstance(); - testRunnerApi.RegisterCallbacks(rerunCallback); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/RerunCallbackInitializer.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/RerunCallbackInitializer.cs.meta deleted file mode 100644 index 5149605a..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/RerunCallbackInitializer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f73fc901e4b0f2d4daf11f46506054ba -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/TestRunnerCallback.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/TestRunnerCallback.cs deleted file mode 100644 index 4234754a..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/TestRunnerCallback.cs +++ /dev/null @@ -1,37 +0,0 @@ -using NUnit.Framework.Interfaces; -using UnityEngine; -using UnityEngine.TestTools.TestRunner; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class TestRunnerCallback : ScriptableObject, ITestRunnerListener - { - public void RunStarted(ITest testsToRun) - { - EditorApplication.playModeStateChanged += OnPlayModeStateChanged; - } - - private void OnPlayModeStateChanged(PlayModeStateChange state) - { - if (state == PlayModeStateChange.ExitingPlayMode) - { - EditorApplication.playModeStateChanged -= OnPlayModeStateChanged; - //We need to make sure we don't block NUnit thread in case we exit PlayMode earlier - PlaymodeTestsController.TryCleanup(); - } - } - - public void RunFinished(ITestResult testResults) - { - EditorApplication.isPlaying = false; - } - - public void TestStarted(ITest testName) - { - } - - public void TestFinished(ITestResult test) - { - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/TestRunnerCallback.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/TestRunnerCallback.cs.meta deleted file mode 100644 index 1356ff98..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/TestRunnerCallback.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d44e6804bc58be84ea71a619b468f150 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/WindowResultUpdater.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/WindowResultUpdater.cs deleted file mode 100644 index 05465d85..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/WindowResultUpdater.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System.Linq; -using TestRunner.Callbacks; -using UnityEditor.TestTools.TestRunner.Api; - -namespace UnityEditor.TestTools.TestRunner.GUI -{ - internal class WindowResultUpdater : ICallbacks, ITestTreeRebuildCallbacks - { - public WindowResultUpdater() - { - var cachedResults = WindowResultUpdaterDataHolder.instance.CachedResults; - var testList = TestRunnerWindow.s_Instance.m_SelectedTestTypes; - foreach (var result in cachedResults) - { - testList.UpdateResult(result); - } - - cachedResults.Clear(); - - } - public void RunStarted(ITestAdaptor testsToRun) - { - } - - public void RunFinished(ITestResultAdaptor testResults) - { - if (TestRunnerWindow.s_Instance != null) - { - TestRunnerWindow.s_Instance.RebuildUIFilter(); - } - } - - public void TestStarted(ITestAdaptor testName) - { - } - - public void TestFinished(ITestResultAdaptor test) - { - var result = new TestRunnerResult(test); - if (TestRunnerWindow.s_Instance == null) - { - WindowResultUpdaterDataHolder.instance.CachedResults.Add(result); - return; - } - - TestRunnerWindow.s_Instance.m_SelectedTestTypes.UpdateResult(result); - } - - public void TestTreeRebuild(ITestAdaptor test) - { - if (TestRunnerWindow.s_Instance == null) - { - return; - } - - TestRunnerWindow.s_Instance.m_SelectedTestTypes.UpdateTestTree(test); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/WindowResultUpdater.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/WindowResultUpdater.cs.meta deleted file mode 100644 index d9e35df8..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/WindowResultUpdater.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6d468ee3657be7a43a2ef2178ec14239 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/WindowResultUpdaterDataHolder.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/WindowResultUpdaterDataHolder.cs deleted file mode 100644 index a1fd48d3..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/WindowResultUpdaterDataHolder.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Collections.Generic; -using UnityEditor; -using UnityEditor.TestTools.TestRunner.GUI; - -namespace TestRunner.Callbacks -{ - internal class WindowResultUpdaterDataHolder : ScriptableSingleton - { - public List CachedResults = new List(); - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/WindowResultUpdaterDataHolder.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/WindowResultUpdaterDataHolder.cs.meta deleted file mode 100644 index aed0d8c0..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Callbacks/WindowResultUpdaterDataHolder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 82075836be5e0c64bbe84e1f9436682e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EditModePCHelper.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EditModePCHelper.cs deleted file mode 100644 index 8776887c..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EditModePCHelper.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Collections; -using System.Reflection; -using UnityEngine.TestTools; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class EditModePcHelper : TestCommandPcHelper - { - public override void SetEnumeratorPC(IEnumerator enumerator, int pc) - { - GetPCFieldInfo(enumerator).SetValue(enumerator, pc); - } - - public override int GetEnumeratorPC(IEnumerator enumerator) - { - if (enumerator == null) - { - return 0; - } - return (int)GetPCFieldInfo(enumerator).GetValue(enumerator); - } - - private FieldInfo GetPCFieldInfo(IEnumerator enumerator) - { - var field = enumerator.GetType().GetField("$PC", BindingFlags.NonPublic | BindingFlags.Instance); - if (field == null) // Roslyn - field = enumerator.GetType().GetField("<>1__state", BindingFlags.NonPublic | BindingFlags.Instance); - - return field; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EditModePCHelper.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EditModePCHelper.cs.meta deleted file mode 100644 index ce559af2..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EditModePCHelper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6d16f2e78a356d34c9a32108929de932 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EditModeRunner.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EditModeRunner.cs deleted file mode 100644 index d16bdbf2..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EditModeRunner.cs +++ /dev/null @@ -1,438 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Filters; -using UnityEngine; -using UnityEngine.TestTools.NUnitExtensions; -using UnityEngine.TestTools.TestRunner; -using UnityEngine.TestTools; -using UnityEngine.TestTools.TestRunner.GUI; -using UnityEditor.Callbacks; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine.TestRunner.NUnitExtensions; -using UnityEngine.TestRunner.NUnitExtensions.Runner; - -namespace UnityEditor.TestTools.TestRunner -{ - internal interface IUnityTestAssemblyRunnerFactory - { - IUnityTestAssemblyRunner Create(TestPlatform testPlatform, WorkItemFactory factory); - } - - internal class UnityTestAssemblyRunnerFactory : IUnityTestAssemblyRunnerFactory - { - public IUnityTestAssemblyRunner Create(TestPlatform testPlatform, WorkItemFactory factory) - { - return new UnityTestAssemblyRunner(new UnityTestAssemblyBuilder(), factory); - } - } - - [Serializable] - internal class EditModeRunner : ScriptableObject, IDisposable - { - [SerializeField] - private Filter[] m_Filters; - - //The counter from the IEnumerator object - [SerializeField] - private int m_CurrentPC; - - [SerializeField] - private bool m_ExecuteOnEnable; - - [SerializeField] - private List m_AlreadyStartedTests; - - [SerializeField] - private List m_ExecutedTests; - - [SerializeField] - private List m_CallbackObjects = new List(); - - [SerializeField] - private TestStartedEvent m_TestStartedEvent = new TestStartedEvent(); - - [SerializeField] - private TestFinishedEvent m_TestFinishedEvent = new TestFinishedEvent(); - - [SerializeField] - private RunStartedEvent m_RunStartedEvent = new RunStartedEvent(); - - [SerializeField] - private RunFinishedEvent m_RunFinishedEvent = new RunFinishedEvent(); - - [SerializeField] - private TestRunnerStateSerializer m_TestRunnerStateSerializer = new TestRunnerStateSerializer(); - - [SerializeField] - private bool m_RunningTests; - - [SerializeField] - private TestPlatform m_TestPlatform; - - [SerializeField] - private object m_CurrentYieldObject; - - [SerializeField] - private BeforeAfterTestCommandState m_SetUpTearDownState; - [SerializeField] - private BeforeAfterTestCommandState m_OuterUnityTestActionState; - - [SerializeField] - public bool RunFinished = false; - - public bool RunningSynchronously { get; private set; } - - internal IUnityTestAssemblyRunner m_Runner; - - private ConstructDelegator m_ConstructDelegator; - - private IEnumerator m_RunStep; - - public IUnityTestAssemblyRunnerFactory UnityTestAssemblyRunnerFactory { get; set; } - - public void Init(Filter[] filters, TestPlatform platform, bool runningSynchronously) - { - m_Filters = filters; - m_TestPlatform = platform; - m_AlreadyStartedTests = new List(); - m_ExecutedTests = new List(); - RunningSynchronously = runningSynchronously; - InitRunner(); - } - - private void InitRunner() - { - //We give the EditMode platform here so we dont suddenly create Playmode work items in the test Runner. - m_Runner = (UnityTestAssemblyRunnerFactory ?? new UnityTestAssemblyRunnerFactory()).Create(TestPlatform.EditMode, new EditmodeWorkItemFactory()); - var testAssemblyProvider = new EditorLoadedTestAssemblyProvider(new EditorCompilationInterfaceProxy(), new EditorAssembliesProxy()); - var assemblies = testAssemblyProvider.GetAssembliesGroupedByType(m_TestPlatform).Select(x => x.Assembly).ToArray(); - var loadedTests = m_Runner.Load(assemblies, TestPlatform.EditMode, - UnityTestAssemblyBuilder.GetNUnitTestBuilderSettings(m_TestPlatform)); - loadedTests.ParseForNameDuplicates(); - CallbacksDelegator.instance.TestTreeRebuild(loadedTests); - hideFlags |= HideFlags.DontSave; - EnumerableSetUpTearDownCommand.ActivePcHelper = new EditModePcHelper(); - OuterUnityTestActionCommand.ActivePcHelper = new EditModePcHelper(); - } - - public void OnEnable() - { - if (m_ExecuteOnEnable) - { - InitRunner(); - m_ExecuteOnEnable = false; - foreach (var callback in m_CallbackObjects) - { - AddListeners(callback as ITestRunnerListener); - } - m_ConstructDelegator = new ConstructDelegator(m_TestRunnerStateSerializer); - - EnumeratorStepHelper.SetEnumeratorPC(m_CurrentPC); - - UnityWorkItemDataHolder.alreadyExecutedTests = m_ExecutedTests.Select(x => x.uniqueName).ToList(); - UnityWorkItemDataHolder.alreadyStartedTests = m_AlreadyStartedTests; - Run(); - } - } - - public void TestStartedEvent(ITest test) - { - m_AlreadyStartedTests.Add(test.GetUniqueName()); - } - - public void TestFinishedEvent(ITestResult testResult) - { - m_AlreadyStartedTests.Remove(testResult.Test.GetUniqueName()); - m_ExecutedTests.Add(TestResultSerializer.MakeFromTestResult(testResult)); - } - - public void Run() - { - EditModeTestCallbacks.RestoringTestContext += OnRestoringTest; - var context = m_Runner.GetCurrentContext(); - if (m_SetUpTearDownState == null) - { - m_SetUpTearDownState = CreateInstance(); - } - context.SetUpTearDownState = m_SetUpTearDownState; - - if (m_OuterUnityTestActionState == null) - { - m_OuterUnityTestActionState = CreateInstance(); - } - context.OuterUnityTestActionState = m_OuterUnityTestActionState; - - if (!m_RunningTests) - { - m_RunStartedEvent.Invoke(m_Runner.LoadedTest); - } - - if (m_ConstructDelegator == null) - m_ConstructDelegator = new ConstructDelegator(m_TestRunnerStateSerializer); - - Reflect.ConstructorCallWrapper = m_ConstructDelegator.Delegate; - m_TestStartedEvent.AddListener(TestStartedEvent); - m_TestFinishedEvent.AddListener(TestFinishedEvent); - - AssemblyReloadEvents.beforeAssemblyReload += OnBeforeAssemblyReload; - - RunningTests = true; - - EditorApplication.LockReloadAssemblies(); - - var testListenerWrapper = new TestListenerWrapper(m_TestStartedEvent, m_TestFinishedEvent); - m_RunStep = m_Runner.Run(testListenerWrapper, GetFilter()).GetEnumerator(); - m_RunningTests = true; - - if (!RunningSynchronously) - EditorApplication.update += TestConsumer; - } - - public void CompleteSynchronously() - { - while (!m_Runner.IsTestComplete) - TestConsumer(); - } - - private void OnBeforeAssemblyReload() - { - EditorApplication.update -= TestConsumer; - - if (m_ExecuteOnEnable) - { - AssemblyReloadEvents.beforeAssemblyReload -= OnBeforeAssemblyReload; - return; - } - - if (m_Runner != null && m_Runner.TopLevelWorkItem != null) - m_Runner.TopLevelWorkItem.ResultedInDomainReload = true; - - if (RunningTests) - { - Debug.LogError("TestRunner: Unexpected assembly reload happened while running tests"); - - EditorUtility.ClearProgressBar(); - - if (m_Runner.GetCurrentContext() != null && m_Runner.GetCurrentContext().CurrentResult != null) - { - m_Runner.GetCurrentContext().CurrentResult.SetResult(ResultState.Cancelled, "Unexpected assembly reload happened"); - } - OnRunCancel(); - } - } - - private bool RunningTests; - - private Stack StepStack = new Stack(); - - private bool MoveNextAndUpdateYieldObject() - { - var result = m_RunStep.MoveNext(); - - if (result) - { - m_CurrentYieldObject = m_RunStep.Current; - while (m_CurrentYieldObject is IEnumerator) // going deeper - { - var currentEnumerator = (IEnumerator)m_CurrentYieldObject; - - // go deeper and add parent to stack - StepStack.Push(m_RunStep); - - m_RunStep = currentEnumerator; - m_CurrentYieldObject = m_RunStep.Current; - } - - if (StepStack.Count > 0 && m_CurrentYieldObject != null) // not null and not IEnumerator, nested - { - Debug.LogError("EditMode test can only yield null, but not <" + m_CurrentYieldObject.GetType().Name + ">"); - } - - return true; - } - - if (StepStack.Count == 0) // done - return false; - - m_RunStep = StepStack.Pop(); // going up - return MoveNextAndUpdateYieldObject(); - } - - private void TestConsumer() - { - var moveNext = MoveNextAndUpdateYieldObject(); - - if (m_CurrentYieldObject != null) - { - InvokeDelegator(); - } - - if (!moveNext && !m_Runner.IsTestComplete) - { - CompleteTestRun(); - throw new IndexOutOfRangeException("There are no more elements to process and IsTestComplete is false"); - } - - if (m_Runner.IsTestComplete) - { - CompleteTestRun(); - } - } - - private void CompleteTestRun() - { - if (!RunningSynchronously) - EditorApplication.update -= TestConsumer; - - TestLauncherBase.ExecutePostBuildCleanupMethods(this.GetLoadedTests(), this.GetFilter(), Application.platform); - - m_RunFinishedEvent.Invoke(m_Runner.Result); - RunFinished = true; - - if (m_ConstructDelegator != null) - m_ConstructDelegator.DestroyCurrentTestObjectIfExists(); - Dispose(); - UnityWorkItemDataHolder.alreadyExecutedTests = null; - } - - private void OnRestoringTest() - { - var item = m_ExecutedTests.Find(t => t.fullName == UnityTestExecutionContext.CurrentContext.CurrentTest.FullName); - if (item != null) - { - item.RestoreTestResult(UnityTestExecutionContext.CurrentContext.CurrentResult); - } - } - - private static bool IsCancelled() - { - return UnityTestExecutionContext.CurrentContext.ExecutionStatus == TestExecutionStatus.AbortRequested || UnityTestExecutionContext.CurrentContext.ExecutionStatus == TestExecutionStatus.StopRequested; - } - - private void InvokeDelegator() - { - if (m_CurrentYieldObject == null) - { - return; - } - - if (IsCancelled()) - { - return; - } - - if (m_CurrentYieldObject is RestoreTestContextAfterDomainReload) - { - if (m_TestRunnerStateSerializer.ShouldRestore()) - { - m_TestRunnerStateSerializer.RestoreContext(); - } - - return; - } - - try - { - if (m_CurrentYieldObject is IEditModeTestYieldInstruction) - { - var editModeTestYieldInstruction = (IEditModeTestYieldInstruction)m_CurrentYieldObject; - if (editModeTestYieldInstruction.ExpectDomainReload) - { - PrepareForDomainReload(); - } - return; - } - } - catch (Exception e) - { - UnityTestExecutionContext.CurrentContext.CurrentResult.RecordException(e); - return; - } - - Debug.LogError("EditMode test can only yield null"); - } - - private void CompilationFailureWatch() - { - if (EditorApplication.isCompiling) - return; - - EditorApplication.update -= CompilationFailureWatch; - - if (EditorUtility.scriptCompilationFailed) - { - EditorUtility.ClearProgressBar(); - OnRunCancel(); - } - } - - private void PrepareForDomainReload() - { - m_TestRunnerStateSerializer.SaveContext(); - m_CurrentPC = EnumeratorStepHelper.GetEnumeratorPC(TestEnumerator.Enumerator); - m_ExecuteOnEnable = true; - - RunningTests = false; - } - - public T AddEventHandler() where T : ScriptableObject, ITestRunnerListener - { - var eventHandler = CreateInstance(); - eventHandler.hideFlags |= HideFlags.DontSave; - m_CallbackObjects.Add(eventHandler); - - AddListeners(eventHandler); - - return eventHandler; - } - - private void AddListeners(ITestRunnerListener eventHandler) - { - m_TestStartedEvent.AddListener(eventHandler.TestStarted); - m_TestFinishedEvent.AddListener(eventHandler.TestFinished); - m_RunStartedEvent.AddListener(eventHandler.RunStarted); - m_RunFinishedEvent.AddListener(eventHandler.RunFinished); - } - - public void Dispose() - { - Reflect.MethodCallWrapper = null; - EditorApplication.update -= TestConsumer; - - DestroyImmediate(this); - - if (m_CallbackObjects != null) - { - foreach (var obj in m_CallbackObjects) - { - DestroyImmediate(obj); - } - m_CallbackObjects.Clear(); - } - RunningTests = false; - EditorApplication.UnlockReloadAssemblies(); - } - - public void OnRunCancel() - { - UnityWorkItemDataHolder.alreadyExecutedTests = null; - m_ExecuteOnEnable = false; - m_Runner.StopRun(); - RunFinished = true; - } - - public ITest GetLoadedTests() - { - return m_Runner.LoadedTest; - } - - public ITestFilter GetFilter() - { - return new OrFilter(m_Filters.Select(filter => filter.BuildNUnitFilter(RunningSynchronously)).ToArray()); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EditModeRunner.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EditModeRunner.cs.meta deleted file mode 100644 index 78c00399..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EditModeRunner.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c9219e99d466b7741a057132d1994f35 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EditmodeWorkItemFactory.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EditmodeWorkItemFactory.cs deleted file mode 100644 index c2bf9212..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EditmodeWorkItemFactory.cs +++ /dev/null @@ -1,14 +0,0 @@ -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using UnityEngine.TestRunner.NUnitExtensions.Runner; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class EditmodeWorkItemFactory : WorkItemFactory - { - protected override UnityWorkItem Create(TestMethod method, ITestFilter filter, ITest loadedTest) - { - return new EditorEnumeratorTestWorkItem(method, filter); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EditmodeWorkItemFactory.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EditmodeWorkItemFactory.cs.meta deleted file mode 100644 index ab4bd459..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EditmodeWorkItemFactory.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3dde15f260b0dd1469e60d16eaa795dc -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EditorEnumeratorTestWorkItem.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EditorEnumeratorTestWorkItem.cs deleted file mode 100644 index 288c70a5..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EditorEnumeratorTestWorkItem.cs +++ /dev/null @@ -1,179 +0,0 @@ -using System; -using System.Collections; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Commands; -using NUnit.Framework.Internal.Execution; -using UnityEngine; -using UnityEngine.TestRunner.NUnitExtensions.Runner; -using UnityEngine.TestTools; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class EditorEnumeratorTestWorkItem : UnityWorkItem - { - private TestCommand m_Command; - - public EditorEnumeratorTestWorkItem(TestMethod test, ITestFilter filter) - : base(test, null) - { - m_Command = TestCommandBuilder.BuildTestCommand(test, filter); - } - - private static IEnumerableTestMethodCommand FindFirstIEnumerableTestMethodCommand(TestCommand command) - { - if (command == null) - { - return null; - } - - if (command is IEnumerableTestMethodCommand) - { - return (IEnumerableTestMethodCommand)command; - } - - if (command is DelegatingTestCommand) - { - var delegatingTestCommand = (DelegatingTestCommand)command; - return FindFirstIEnumerableTestMethodCommand(delegatingTestCommand.GetInnerCommand()); - } - return null; - } - - protected override IEnumerable PerformWork() - { - if (IsCancelledRun()) - { - yield break; - } - - if (m_DontRunRestoringResult) - { - if (EditModeTestCallbacks.RestoringTestContext == null) - { - throw new NullReferenceException("RestoringTestContext is not set"); - } - EditModeTestCallbacks.RestoringTestContext(); - Result = Context.CurrentResult; - yield break; - } - - try - { - if (IsCancelledRun()) - { - yield break; - } - - if (m_Command is SkipCommand) - { - m_Command.Execute(Context); - Result = Context.CurrentResult; - yield break; - } - - //Check if we can execute this test - var firstEnumerableCommand = FindFirstIEnumerableTestMethodCommand(m_Command); - if (firstEnumerableCommand == null) - { - Context.CurrentResult.SetResult(ResultState.Error, "Returning IEnumerator but not using test attribute supporting this"); - yield break; - } - - if (m_Command.Test.Method.ReturnType.IsType(typeof(IEnumerator))) - { - if (m_Command is ApplyChangesToContextCommand) - { - var applyChangesToContextCommand = ((ApplyChangesToContextCommand)m_Command); - applyChangesToContextCommand.ApplyChanges(Context); - m_Command = applyChangesToContextCommand.GetInnerCommand(); - } - - var innerCommand = m_Command as IEnumerableTestMethodCommand; - if (innerCommand == null) - { - Debug.Log("failed getting innerCommand"); - throw new Exception("Tests returning IEnumerator can only use test attributes handling those"); - } - - foreach (var workItemStep in innerCommand.ExecuteEnumerable(Context)) - { - if (IsCancelledRun()) - { - yield break; - } - - if (workItemStep is TestEnumerator) - { - if (EnumeratorStepHelper.UpdateEnumeratorPcIfNeeded(TestEnumerator.Enumerator)) - { - yield return new RestoreTestContextAfterDomainReload(); - } - continue; - } - - if (workItemStep is AsyncOperation) - { - var asyncOperation = (AsyncOperation)workItemStep; - while (!asyncOperation.isDone) - { - if (IsCancelledRun()) - { - yield break; - } - - yield return null; - } - continue; - } - - ResultedInDomainReload = false; - - if (workItemStep is IEditModeTestYieldInstruction) - { - var editModeTestYieldInstruction = (IEditModeTestYieldInstruction)workItemStep; - yield return editModeTestYieldInstruction; - var enumerator = editModeTestYieldInstruction.Perform(); - while (true) - { - bool moveNext; - try - { - moveNext = enumerator.MoveNext(); - } - catch (Exception e) - { - Context.CurrentResult.RecordException(e); - break; - } - - if (!moveNext) - { - break; - } - yield return null; - } - } - else - { - yield return workItemStep; - } - } - - Result = Context.CurrentResult; - EditorApplication.isPlaying = false; - yield return null; - } - } - finally - { - WorkItemComplete(); - } - } - - private bool IsCancelledRun() - { - return Context.ExecutionStatus == TestExecutionStatus.AbortRequested || Context.ExecutionStatus == TestExecutionStatus.StopRequested; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EditorEnumeratorTestWorkItem.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EditorEnumeratorTestWorkItem.cs.meta deleted file mode 100644 index 982f7eeb..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EditorEnumeratorTestWorkItem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1ebc1994f9a3d5649a1201d3a84b38df -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EnumeratorStepHelper.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EnumeratorStepHelper.cs deleted file mode 100644 index 46fc7145..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EnumeratorStepHelper.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System.Collections; -using System.Reflection; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class EnumeratorStepHelper - { - private static int m_PC; - - public static void SetEnumeratorPC(int pc) - { - m_PC = pc; - } - - /// - /// Gets the current enumerator PC - /// - /// - /// The PC - /// 0 if no current Enumeration - /// - public static int GetEnumeratorPC(IEnumerator enumerator) - { - if (enumerator == null) - { - return 0; - } - return (int)GetPCFieldInfo(enumerator).GetValue(enumerator); - } - - public static bool UpdateEnumeratorPcIfNeeded(IEnumerator enumerator) - { - if (m_PC != 0) - { - GetPCFieldInfo(enumerator).SetValue(enumerator, m_PC); - m_PC = 0; - return true; - } - return false; - } - - private static FieldInfo GetPCFieldInfo(IEnumerator enumerator) - { - var field = enumerator.GetType().GetField("$PC", BindingFlags.NonPublic | BindingFlags.Instance); - if (field == null) // Roslyn - field = enumerator.GetType().GetField("<>1__state", BindingFlags.NonPublic | BindingFlags.Instance); - - return field; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EnumeratorStepHelper.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EnumeratorStepHelper.cs.meta deleted file mode 100644 index 08662b9e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/EnumeratorStepHelper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 901b761c5c1e22d4e8a3ba7d95bc1f5d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages.meta deleted file mode 100644 index 0660c637..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d9682e749d3efc642af54d789d9090a6 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages/EnterPlayMode.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages/EnterPlayMode.cs deleted file mode 100644 index 796c531d..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages/EnterPlayMode.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections; -using UnityEditor; - -namespace UnityEngine.TestTools -{ - public class EnterPlayMode : IEditModeTestYieldInstruction - { - public bool ExpectDomainReload { get; } - public bool ExpectedPlaymodeState { get; private set; } - - public EnterPlayMode(bool expectDomainReload = true) - { - ExpectDomainReload = expectDomainReload; - } - - public IEnumerator Perform() - { - if (EditorApplication.isPlaying) - { - throw new Exception("Editor is already in PlayMode"); - } - if (EditorUtility.scriptCompilationFailed) - { - throw new Exception("Script compilation failed"); - } - yield return null; - ExpectedPlaymodeState = true; - - EditorApplication.UnlockReloadAssemblies(); - EditorApplication.isPlaying = true; - - while (!EditorApplication.isPlaying) - { - yield return null; - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages/EnterPlayMode.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages/EnterPlayMode.cs.meta deleted file mode 100644 index fa1dc2e0..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages/EnterPlayMode.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9bd5a110ed89025499ddee8c7e73778e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages/ExitPlayMode.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages/ExitPlayMode.cs deleted file mode 100644 index 2eed28ba..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages/ExitPlayMode.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections; -using UnityEditor; - -namespace UnityEngine.TestTools -{ - public class ExitPlayMode : IEditModeTestYieldInstruction - { - public bool ExpectDomainReload { get; } - public bool ExpectedPlaymodeState { get; private set; } - - public ExitPlayMode() - { - ExpectDomainReload = false; - ExpectedPlaymodeState = false; - } - - public IEnumerator Perform() - { - if (!EditorApplication.isPlayingOrWillChangePlaymode) - { - throw new Exception("Editor is already in EditMode"); - } - - EditorApplication.isPlaying = false; - while (EditorApplication.isPlaying) - { - yield return null; - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages/ExitPlayMode.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages/ExitPlayMode.cs.meta deleted file mode 100644 index 1de769dc..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages/ExitPlayMode.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 408674d91d506a54aac9a7f07951c018 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages/RecompileScripts.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages/RecompileScripts.cs deleted file mode 100644 index 52af5a7b..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages/RecompileScripts.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using System.Collections; -using UnityEditor; - -namespace UnityEngine.TestTools -{ - public class RecompileScripts : IEditModeTestYieldInstruction - { - public RecompileScripts() : this(true) - { - } - - public RecompileScripts(bool expectScriptCompilation) : this(expectScriptCompilation, true) - { - } - - public RecompileScripts(bool expectScriptCompilation, bool expectScriptCompilationSuccess) - { - ExpectScriptCompilation = expectScriptCompilation; - ExpectScriptCompilationSuccess = expectScriptCompilationSuccess; - ExpectDomainReload = true; - } - - public bool ExpectDomainReload { get; private set; } - public bool ExpectedPlaymodeState { get; } - public bool ExpectScriptCompilation { get; private set; } - public bool ExpectScriptCompilationSuccess { get; private set; } - public static RecompileScripts Current { get; private set; } - - public IEnumerator Perform() - { - Current = this; - - // We need to yield, to give the test runner a chance to prepare for the domain reload - // If the script compilation happens very fast, then EditModeRunner.MoveNextAndUpdateYieldObject will not have a chance to set m_CurrentYieldObject - // This really should be fixed in EditModeRunner.MoveNextAndUpdateYieldObject - yield return null; - - AssetDatabase.Refresh(); - - if (ExpectScriptCompilation && !EditorApplication.isCompiling) - { - Current = null; - throw new Exception("Editor does not need to recompile scripts"); - } - - EditorApplication.UnlockReloadAssemblies(); - - while (EditorApplication.isCompiling) - { - yield return null; - } - - Current = null; - - if (ExpectScriptCompilationSuccess && EditorUtility.scriptCompilationFailed) - { - EditorApplication.LockReloadAssemblies(); - throw new Exception("Script compilation failed"); - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages/RecompileScripts.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages/RecompileScripts.cs.meta deleted file mode 100644 index f764d6e8..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages/RecompileScripts.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9202fbba95ea8294cb5e718f028f21b0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages/WaitForDomainReload.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages/WaitForDomainReload.cs deleted file mode 100644 index b71630ae..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages/WaitForDomainReload.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections; -using UnityEditor; - -namespace UnityEngine.TestTools -{ - public class WaitForDomainReload : IEditModeTestYieldInstruction - { - public WaitForDomainReload() - { - ExpectDomainReload = true; - } - - public bool ExpectDomainReload { get;  } - public bool ExpectedPlaymodeState { get; } - - public IEnumerator Perform() - { - EditorApplication.UnlockReloadAssemblies(); - - // Detect if AssetDatabase.Refresh was called (true) or if it will be called on next tick - bool isAsync = EditorApplication.isCompiling; - - yield return null; - - if (!isAsync) - { - EditorApplication.LockReloadAssemblies(); - throw new Exception("Expected domain reload, but it did not occur"); - } - - while (EditorApplication.isCompiling) - { - yield return null; - } - - if (EditorUtility.scriptCompilationFailed) - { - EditorApplication.LockReloadAssemblies(); - throw new Exception("Script compilation failed"); - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages/WaitForDomainReload.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages/WaitForDomainReload.cs.meta deleted file mode 100644 index 7fa45cb5..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Messages/WaitForDomainReload.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5df3c21c5237c994db89660fbdfee07d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils.meta deleted file mode 100644 index 78ceec0c..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1f5bbb88ca730434483440cbc0278ef6 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/CachingTestListProvider.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/CachingTestListProvider.cs deleted file mode 100644 index ff540e67..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/CachingTestListProvider.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine.TestRunner.NUnitExtensions; -using UnityEngine.TestTools; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class CachingTestListProvider - { - private readonly ITestListProvider m_InnerTestListProvider; - private readonly ITestListCache m_TestListCache; - private readonly ITestAdaptorFactory m_TestAdaptorFactory; - public CachingTestListProvider(ITestListProvider innerTestListProvider, ITestListCache testListCache, ITestAdaptorFactory testAdaptorFactory) - { - m_InnerTestListProvider = innerTestListProvider; - m_TestListCache = testListCache; - m_TestAdaptorFactory = testAdaptorFactory; - } - - public IEnumerator GetTestListAsync(TestPlatform platform) - { - var testFromCache = m_TestListCache.GetTestFromCacheAsync(platform); - while (testFromCache.MoveNext()) - { - yield return null; - } - - - if (testFromCache.Current != null) - { - yield return testFromCache.Current; - } - else - { - var test = m_InnerTestListProvider.GetTestListAsync(platform); - while (test.MoveNext()) - { - yield return null; - } - - test.Current.ParseForNameDuplicates(); - m_TestListCache.CacheTest(platform, test.Current); - yield return m_TestAdaptorFactory.Create(test.Current); - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/CachingTestListProvider.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/CachingTestListProvider.cs.meta deleted file mode 100644 index 57566236..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/CachingTestListProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 26f3e7301af463c4ca72fa98d59b429e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/EditorAssembliesProxy.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/EditorAssembliesProxy.cs deleted file mode 100644 index bc0fe193..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/EditorAssembliesProxy.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Linq; -using UnityEngine.TestTools.Utils; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class EditorAssembliesProxy : IEditorAssembliesProxy - { - public IAssemblyWrapper[] loadedAssemblies - { - get { return EditorAssemblies.loadedAssemblies.OrderBy(a => a.FullName).Select(x => new EditorAssemblyWrapper(x)).ToArray(); } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/EditorAssembliesProxy.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/EditorAssembliesProxy.cs.meta deleted file mode 100644 index fdb1b6c4..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/EditorAssembliesProxy.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f96d0ea807c081145a1170ed1b6d71e0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/EditorAssemblyWrapper.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/EditorAssemblyWrapper.cs deleted file mode 100644 index 804eb4b1..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/EditorAssemblyWrapper.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Reflection; -using UnityEngine.TestTools.Utils; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class EditorAssemblyWrapper : AssemblyWrapper - { - public EditorAssemblyWrapper(Assembly assembly) - : base(assembly) {} - - public override AssemblyName[] GetReferencedAssemblies() - { - return Assembly.GetReferencedAssemblies(); - } - - public override string Location { get { return Assembly.Location; } } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/EditorAssemblyWrapper.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/EditorAssemblyWrapper.cs.meta deleted file mode 100644 index 70bd58bf..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/EditorAssemblyWrapper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 20cdb37e6fea6d946bbb84d2c923db85 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/EditorCompilationInterfaceProxy.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/EditorCompilationInterfaceProxy.cs deleted file mode 100644 index ad0b5ad5..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/EditorCompilationInterfaceProxy.cs +++ /dev/null @@ -1,17 +0,0 @@ -using UnityEditor.Scripting.ScriptCompilation; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class EditorCompilationInterfaceProxy : IEditorCompilationInterfaceProxy - { - public ScriptAssembly[] GetAllEditorScriptAssemblies() - { - return EditorCompilationInterface.Instance.GetAllEditorScriptAssemblies(EditorCompilationInterface.GetAdditionalEditorScriptCompilationOptions()); - } - - public PrecompiledAssembly[] GetAllPrecompiledAssemblies() - { - return EditorCompilationInterface.Instance.GetAllPrecompiledAssemblies(); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/EditorCompilationInterfaceProxy.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/EditorCompilationInterfaceProxy.cs.meta deleted file mode 100644 index ef5ade0a..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/EditorCompilationInterfaceProxy.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c9b23632c77de204abfe8bf7168d48c0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/EditorLoadedTestAssemblyProvider.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/EditorLoadedTestAssemblyProvider.cs deleted file mode 100644 index 8a46cbff..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/EditorLoadedTestAssemblyProvider.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using System.Linq; -using UnityEditor.Scripting.ScriptCompilation; -using UnityEngine.TestTools; -using UnityEngine.TestTools.Utils; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class EditorLoadedTestAssemblyProvider : IEditorLoadedTestAssemblyProvider - { - private const string k_NunitAssemblyName = "nunit.framework"; - private const string k_TestRunnerAssemblyName = "UnityEngine.TestRunner"; - internal const string k_PerformanceTestingAssemblyName = "Unity.PerformanceTesting"; - - private readonly IEditorAssembliesProxy m_EditorAssembliesProxy; - private readonly ScriptAssembly[] m_AllEditorScriptAssemblies; - private readonly PrecompiledAssembly[] m_AllPrecompiledAssemblies; - - public EditorLoadedTestAssemblyProvider(IEditorCompilationInterfaceProxy compilationInterfaceProxy, IEditorAssembliesProxy editorAssembliesProxy) - { - m_EditorAssembliesProxy = editorAssembliesProxy; - m_AllEditorScriptAssemblies = compilationInterfaceProxy.GetAllEditorScriptAssemblies(); - m_AllPrecompiledAssemblies = compilationInterfaceProxy.GetAllPrecompiledAssemblies(); - } - - public List GetAssembliesGroupedByType(TestPlatform mode) - { - var assemblies = GetAssembliesGroupedByTypeAsync(mode); - while (assemblies.MoveNext()) - { - } - - return assemblies.Current.Where(pair => mode.IsFlagIncluded(pair.Key)).SelectMany(pair => pair.Value).ToList(); - } - - public IEnumerator>> GetAssembliesGroupedByTypeAsync(TestPlatform mode) - { - IAssemblyWrapper[] loadedAssemblies = m_EditorAssembliesProxy.loadedAssemblies; - - IDictionary> result = new Dictionary>() - { - {TestPlatform.EditMode, new List() }, - {TestPlatform.PlayMode, new List() } - }; - - foreach (var loadedAssembly in loadedAssemblies) - { - if (loadedAssembly.GetReferencedAssemblies().Any(x => x.Name == k_NunitAssemblyName || x.Name == k_TestRunnerAssemblyName || x.Name == k_PerformanceTestingAssemblyName)) - { - var assemblyName = new FileInfo(loadedAssembly.Location).Name; - var scriptAssemblies = m_AllEditorScriptAssemblies.Where(x => x.Filename == assemblyName).ToList(); - var precompiledAssemblies = m_AllPrecompiledAssemblies.Where(x => new FileInfo(x.Path).Name == assemblyName).ToList(); - if (scriptAssemblies.Count < 1 && precompiledAssemblies.Count < 1) - { - continue; - } - - var assemblyFlags = scriptAssemblies.Any() ? scriptAssemblies.Single().Flags : precompiledAssemblies.Single().Flags; - var assemblyType = (assemblyFlags & AssemblyFlags.EditorOnly) == AssemblyFlags.EditorOnly ? TestPlatform.EditMode : TestPlatform.PlayMode; - result[assemblyType].Add(loadedAssembly); - yield return null; - } - } - - yield return result; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/EditorLoadedTestAssemblyProvider.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/EditorLoadedTestAssemblyProvider.cs.meta deleted file mode 100644 index efba6a7c..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/EditorLoadedTestAssemblyProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 033c884ba52437d49bc55935939ef1c6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/IEditorAssembliesProxy.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/IEditorAssembliesProxy.cs deleted file mode 100644 index 35ec87d0..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/IEditorAssembliesProxy.cs +++ /dev/null @@ -1,9 +0,0 @@ -using UnityEngine.TestTools.Utils; - -namespace UnityEditor.TestTools.TestRunner -{ - internal interface IEditorAssembliesProxy - { - IAssemblyWrapper[] loadedAssemblies { get; } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/IEditorAssembliesProxy.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/IEditorAssembliesProxy.cs.meta deleted file mode 100644 index ad00f55d..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/IEditorAssembliesProxy.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 98808b11e78f6c84a841a6b4bc5a29d2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/IEditorCompilationInterfaceProxy.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/IEditorCompilationInterfaceProxy.cs deleted file mode 100644 index 25defb78..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/IEditorCompilationInterfaceProxy.cs +++ /dev/null @@ -1,10 +0,0 @@ -using UnityEditor.Scripting.ScriptCompilation; - -namespace UnityEditor.TestTools.TestRunner -{ - internal interface IEditorCompilationInterfaceProxy - { - ScriptAssembly[] GetAllEditorScriptAssemblies(); - PrecompiledAssembly[] GetAllPrecompiledAssemblies(); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/IEditorCompilationInterfaceProxy.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/IEditorCompilationInterfaceProxy.cs.meta deleted file mode 100644 index 2bc608bf..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/IEditorCompilationInterfaceProxy.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 28c8fcb831e6e734a9f564bc4f495eba -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/IEditorLoadedTestAssemblyProvider.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/IEditorLoadedTestAssemblyProvider.cs deleted file mode 100644 index d54bda79..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/IEditorLoadedTestAssemblyProvider.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Collections.Generic; -using UnityEngine.TestTools; -using UnityEngine.TestTools.Utils; - -namespace UnityEditor.TestTools.TestRunner -{ - internal interface IEditorLoadedTestAssemblyProvider - { - List GetAssembliesGroupedByType(TestPlatform mode); - IEnumerator>> GetAssembliesGroupedByTypeAsync(TestPlatform mode); - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/IEditorLoadedTestAssemblyProvider.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/IEditorLoadedTestAssemblyProvider.cs.meta deleted file mode 100644 index cbe48975..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/IEditorLoadedTestAssemblyProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 936b6288befc460409cfdff3ac92fc95 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/ITestListCache.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/ITestListCache.cs deleted file mode 100644 index 5df7a784..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/ITestListCache.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Collections.Generic; -using NUnit.Framework.Interfaces; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine.TestTools; - -namespace UnityEditor.TestTools.TestRunner -{ - interface ITestListCache - { - void CacheTest(TestPlatform platform, ITest test); - IEnumerator GetTestFromCacheAsync(TestPlatform platform); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/ITestListCache.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/ITestListCache.cs.meta deleted file mode 100644 index 41943d42..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/ITestListCache.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a704c010bcdb1ec4a9f3417b3c393164 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/ITestListCacheData.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/ITestListCacheData.cs deleted file mode 100644 index d11fe475..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/ITestListCacheData.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System.Collections.Generic; -using NUnit.Framework.Interfaces; -using UnityEngine.TestRunner.TestLaunchers; -using UnityEngine.TestTools; - -namespace UnityEditor.TestTools.TestRunner -{ - interface ITestListCacheData - { - List platforms { get; } - List cachedData { get; } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/ITestListCacheData.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/ITestListCacheData.cs.meta deleted file mode 100644 index b229c0cb..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/ITestListCacheData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7043e9a330ac2d84a80a965ada4589ad -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/ITestListProvider.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/ITestListProvider.cs deleted file mode 100644 index b734f536..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/ITestListProvider.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Collections.Generic; -using NUnit.Framework.Interfaces; -using UnityEngine.TestTools; - -namespace UnityEditor.TestTools.TestRunner -{ - interface ITestListProvider - { - IEnumerator GetTestListAsync(TestPlatform platform); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/ITestListProvider.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/ITestListProvider.cs.meta deleted file mode 100644 index b62929bc..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/ITestListProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 64689f8b25eadac4da519e96f514b653 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/TestListCache.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/TestListCache.cs deleted file mode 100644 index e69bfcbc..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/TestListCache.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System.Collections.Generic; -using NUnit.Framework.Interfaces; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine.TestRunner.TestLaunchers; -using UnityEngine.TestTools; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class TestListCache : ITestListCache - { - private readonly ITestAdaptorFactory m_TestAdaptorFactory; - private readonly IRemoteTestResultDataFactory m_TestResultDataFactory; - private readonly ITestListCacheData m_TestListCacheData; - - public TestListCache(ITestAdaptorFactory testAdaptorFactory, IRemoteTestResultDataFactory testResultDataFactory, ITestListCacheData testListCacheData) - { - m_TestAdaptorFactory = testAdaptorFactory; - m_TestResultDataFactory = testResultDataFactory; - m_TestListCacheData = testListCacheData; - } - - public void CacheTest(TestPlatform platform, ITest test) - { - var index = m_TestListCacheData.platforms.IndexOf(platform); - if (index < 0) - { - m_TestListCacheData.cachedData.Add(test); - m_TestListCacheData.platforms.Add(platform); - } - else - { - m_TestListCacheData.cachedData[index] = test; - } - } - - public IEnumerator GetTestFromCacheAsync(TestPlatform platform) - { - var index = m_TestListCacheData.platforms.IndexOf(platform); - if (index < 0) - { - yield return null; - yield break; - } - - var testData = m_TestListCacheData.cachedData[index]; - yield return m_TestAdaptorFactory.Create(testData); - } - - [Callbacks.DidReloadScripts] - private static void ScriptReloaded() - { - TestListCacheData.instance.cachedData.Clear(); - TestListCacheData.instance.platforms.Clear(); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/TestListCache.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/TestListCache.cs.meta deleted file mode 100644 index ea8d0966..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/TestListCache.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d685d97a1eb004f49afea0cc982ff728 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/TestListCacheData.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/TestListCacheData.cs deleted file mode 100644 index 175082f1..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/TestListCacheData.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System.Collections.Generic; -using NUnit.Framework.Interfaces; -using UnityEngine; -using UnityEngine.TestRunner.TestLaunchers; -using UnityEngine.TestTools; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class TestListCacheData : ScriptableSingleton, ITestListCacheData - { - [SerializeField] - private List m_Platforms = new List(); - - [SerializeField] - private List m_CachedData = new List(); - - public List platforms - { - get { return m_Platforms; } - } - - public List cachedData - { - get { return m_CachedData; } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/TestListCacheData.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/TestListCacheData.cs.meta deleted file mode 100644 index 2ad79aca..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/TestListCacheData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f1b6399349763114d9361bc6dfcd025b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/TestListJob.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/TestListJob.cs deleted file mode 100644 index 0df60c35..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/TestListJob.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine.TestTools; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class TestListJob - { - private CachingTestListProvider m_TestListProvider; - private TestPlatform m_Platform; - private Action m_Callback; - private IEnumerator m_ResultEnumerator; - public TestListJob(CachingTestListProvider testListProvider, TestPlatform platform, Action callback) - { - m_TestListProvider = testListProvider; - m_Platform = platform; - m_Callback = callback; - } - - public void Start() - { - m_ResultEnumerator = m_TestListProvider.GetTestListAsync(m_Platform); - EditorApplication.update += EditorUpdate; - } - - private void EditorUpdate() - { - if (!m_ResultEnumerator.MoveNext()) - { - m_Callback(m_ResultEnumerator.Current); - EditorApplication.update -= EditorUpdate; - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/TestListJob.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/TestListJob.cs.meta deleted file mode 100644 index a17c0915..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/TestListJob.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: dec9066d4afefe444be0dad3f137730d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/TestListProvider.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/TestListProvider.cs deleted file mode 100644 index 1da846e9..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/TestListProvider.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework.Interfaces; -using UnityEngine.TestTools; -using UnityEngine.TestTools.NUnitExtensions; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class TestListProvider : ITestListProvider - { - private readonly EditorLoadedTestAssemblyProvider m_AssemblyProvider; - private readonly UnityTestAssemblyBuilder m_AssemblyBuilder; - - public TestListProvider(EditorLoadedTestAssemblyProvider assemblyProvider, UnityTestAssemblyBuilder assemblyBuilder) - { - m_AssemblyProvider = assemblyProvider; - m_AssemblyBuilder = assemblyBuilder; - } - - public IEnumerator GetTestListAsync(TestPlatform platform) - { - var assembliesTask = m_AssemblyProvider.GetAssembliesGroupedByTypeAsync(platform); - while (assembliesTask.MoveNext()) - { - yield return null; - } - - var assemblies = assembliesTask.Current.Where(pair => platform.IsFlagIncluded(pair.Key)) - .SelectMany(pair => pair.Value.Select(assemblyInfo => Tuple.Create(assemblyInfo.Assembly, pair.Key))).ToArray(); - - var settings = UnityTestAssemblyBuilder.GetNUnitTestBuilderSettings(platform); - var test = m_AssemblyBuilder.BuildAsync(assemblies.Select(a => a.Item1).ToArray(), assemblies.Select(a => a.Item2).ToArray(), settings); - while (test.MoveNext()) - { - yield return null; - } - - yield return test.Current; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/TestListProvider.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/TestListProvider.cs.meta deleted file mode 100644 index c0e66d53..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunner/Utils/TestListProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f15cbb987069826429540d0ea0937442 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunnerWindow.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunnerWindow.cs deleted file mode 100644 index 5ec1511e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunnerWindow.cs +++ /dev/null @@ -1,259 +0,0 @@ -using System; -using UnityEditor.Callbacks; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEditor.TestTools.TestRunner.GUI; -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner -{ - [Serializable] - internal class TestRunnerWindow : EditorWindow, IHasCustomMenu - { - internal static class Styles - { - public static GUIStyle info; - public static GUIStyle testList; - - static Styles() - { - info = new GUIStyle(EditorStyles.wordWrappedLabel); - info.wordWrap = false; - info.stretchHeight = true; - info.margin.right = 15; - - testList = new GUIStyle("CN Box"); - testList.margin.top = 0; - testList.padding.left = 3; - } - } - - private readonly GUIContent m_GUIHorizontalSplit = EditorGUIUtility.TrTextContent("Horizontal layout"); - private readonly GUIContent m_GUIVerticalSplit = EditorGUIUtility.TrTextContent("Vertical layout"); - private readonly GUIContent m_GUIEnableaPlaymodeTestsRunner = EditorGUIUtility.TrTextContent("Enable playmode tests for all assemblies"); - private readonly GUIContent m_GUIDisablePlaymodeTestsRunner = EditorGUIUtility.TrTextContent("Disable playmode tests for all assemblies"); - private readonly GUIContent m_GUIRunPlayModeTestAsEditModeTests = EditorGUIUtility.TrTextContent("Run playmode tests as editmode tests"); - - internal static TestRunnerWindow s_Instance; - private bool m_IsBuilding; - [NonSerialized] - private bool m_Enabled; - public TestFilterSettings filterSettings; - - [SerializeField] - private SplitterState m_Spl = new SplitterState(new float[] { 75, 25 }, new[] { 32, 32 }, null); - - private TestRunnerWindowSettings m_Settings; - - private enum TestRunnerMenuLabels - { - PlayMode = 0, - EditMode = 1 - } - [SerializeField] - private int m_TestTypeToolbarIndex = (int)TestRunnerMenuLabels.EditMode; - [SerializeField] - private PlayModeTestListGUI m_PlayModeTestListGUI; - [SerializeField] - private EditModeTestListGUI m_EditModeTestListGUI; - - internal TestListGUI m_SelectedTestTypes; - - private ITestRunnerApi m_testRunnerApi; - - private WindowResultUpdater m_WindowResultUpdater; - - [MenuItem("Window/General/Test Runner", false, 201, false)] - public static void ShowPlaymodeTestsRunnerWindowCodeBased() - { - s_Instance = GetWindow("Test Runner"); - s_Instance.Show(); - } - - static TestRunnerWindow() - { - InitBackgroundRunners(); - } - - private static void InitBackgroundRunners() - { - EditorApplication.playModeStateChanged -= OnPlayModeStateChanged; - EditorApplication.playModeStateChanged += OnPlayModeStateChanged; - } - - [DidReloadScripts] - private static void CompilationCallback() - { - UpdateWindow(); - } - - private static void OnPlayModeStateChanged(PlayModeStateChange state) - { - if (s_Instance && state == PlayModeStateChange.EnteredEditMode && s_Instance.m_SelectedTestTypes.HasTreeData()) - { - //repaint message details after exit playmode - s_Instance.m_SelectedTestTypes.TestSelectionCallback(s_Instance.m_SelectedTestTypes.m_TestListState.selectedIDs.ToArray()); - s_Instance.Repaint(); - } - } - - public void OnDestroy() - { - EditorApplication.playModeStateChanged -= OnPlayModeStateChanged; - } - - private void OnEnable() - { - s_Instance = this; - SelectTestListGUI(m_TestTypeToolbarIndex); - - m_testRunnerApi = ScriptableObject.CreateInstance(); - m_WindowResultUpdater = new WindowResultUpdater(); - m_testRunnerApi.RegisterCallbacks(m_WindowResultUpdater); - } - - private void Enable() - { - m_Settings = new TestRunnerWindowSettings("UnityEditor.PlaymodeTestsRunnerWindow"); - filterSettings = new TestFilterSettings("UnityTest.IntegrationTestsRunnerWindow"); - - if (m_SelectedTestTypes == null) - { - SelectTestListGUI(m_TestTypeToolbarIndex); - } - - StartRetrieveTestList(); - m_SelectedTestTypes.Reload(); - m_Enabled = true; - } - - private void SelectTestListGUI(int testTypeToolbarIndex) - { - if (testTypeToolbarIndex == (int)TestRunnerMenuLabels.PlayMode) - { - if (m_PlayModeTestListGUI == null) - { - m_PlayModeTestListGUI = new PlayModeTestListGUI(); - } - m_SelectedTestTypes = m_PlayModeTestListGUI; - } - else if (testTypeToolbarIndex == (int)TestRunnerMenuLabels.EditMode) - { - if (m_EditModeTestListGUI == null) - { - m_EditModeTestListGUI = new EditModeTestListGUI(); - } - m_SelectedTestTypes = m_EditModeTestListGUI; - } - } - - private void StartRetrieveTestList() - { - if (!m_SelectedTestTypes.HasTreeData()) - { - m_testRunnerApi.RetrieveTestList(m_SelectedTestTypes.TestMode, (rootTest) => - { - m_SelectedTestTypes.Init(this, rootTest); - m_SelectedTestTypes.Reload(); - }); - } - } - - public void OnGUI() - { - if (!m_Enabled) - { - Enable(); - } - - if (BuildPipeline.isBuildingPlayer) - { - m_IsBuilding = true; - } - else if (m_IsBuilding) - { - m_IsBuilding = false; - Repaint(); - } - - EditorGUILayout.BeginHorizontal(); - GUILayout.FlexibleSpace(); - var selectedIndex = m_TestTypeToolbarIndex; - m_TestTypeToolbarIndex = GUILayout.Toolbar(m_TestTypeToolbarIndex, Enum.GetNames(typeof(TestRunnerMenuLabels)), "LargeButton", UnityEngine.GUI.ToolbarButtonSize.FitToContents); - GUILayout.FlexibleSpace(); - EditorGUILayout.EndHorizontal(); - - if (selectedIndex != m_TestTypeToolbarIndex) - { - SelectTestListGUI(m_TestTypeToolbarIndex); - StartRetrieveTestList(); - } - - EditorGUILayout.BeginVertical(); - using (new EditorGUI.DisabledScope(EditorApplication.isPlayingOrWillChangePlaymode)) - { - m_SelectedTestTypes.PrintHeadPanel(); - } - EditorGUILayout.EndVertical(); - - if (m_Settings.verticalSplit) - SplitterGUILayout.BeginVerticalSplit(m_Spl); - else - SplitterGUILayout.BeginHorizontalSplit(m_Spl); - - EditorGUILayout.BeginVertical(); - EditorGUILayout.BeginVertical(Styles.testList); - m_SelectedTestTypes.RenderTestList(); - EditorGUILayout.EndVertical(); - EditorGUILayout.EndVertical(); - - m_SelectedTestTypes.RenderDetails(); - - if (m_Settings.verticalSplit) - SplitterGUILayout.EndVerticalSplit(); - else - SplitterGUILayout.EndHorizontalSplit(); - } - - public void AddItemsToMenu(GenericMenu menu) - { - menu.AddItem(m_GUIVerticalSplit, m_Settings.verticalSplit, m_Settings.ToggleVerticalSplit); - menu.AddItem(m_GUIHorizontalSplit, !m_Settings.verticalSplit, m_Settings.ToggleVerticalSplit); - - menu.AddSeparator(null); - - var playModeTestRunnerEnabled = PlayerSettings.playModeTestRunnerEnabled; - var currentActive = playModeTestRunnerEnabled ? m_GUIDisablePlaymodeTestsRunner : m_GUIEnableaPlaymodeTestsRunner; - - if (EditorPrefs.GetBool("InternalMode", false)) - { - menu.AddItem(m_GUIRunPlayModeTestAsEditModeTests, PlayerSettings.runPlayModeTestAsEditModeTest, () => - { - PlayerSettings.runPlayModeTestAsEditModeTest = !PlayerSettings.runPlayModeTestAsEditModeTest; - }); - } - - menu.AddItem(currentActive, false, () => - { - PlayerSettings.playModeTestRunnerEnabled = !playModeTestRunnerEnabled; - EditorUtility.DisplayDialog(currentActive.text, "You need to restart the editor now", "Ok"); - }); - } - - public void RebuildUIFilter() - { - if (m_SelectedTestTypes != null && m_SelectedTestTypes.HasTreeData()) - { - m_SelectedTestTypes.RebuildUIFilter(); - } - } - - public static void UpdateWindow() - { - if (s_Instance != null && s_Instance.m_SelectedTestTypes != null) - { - s_Instance.m_SelectedTestTypes.Repaint(); - s_Instance.Repaint(); - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunnerWindow.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunnerWindow.cs.meta deleted file mode 100644 index 5cb0e868..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunnerWindow.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4dfcd3a631f61d248b7cc0b845d40345 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunnerWindowSettings.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunnerWindowSettings.cs deleted file mode 100644 index 366df260..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunnerWindowSettings.cs +++ /dev/null @@ -1,26 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner -{ - internal class TestRunnerWindowSettings - { - public bool verticalSplit; - - private readonly string m_PrefsKey; - - public TestRunnerWindowSettings(string prefsKey) - { - m_PrefsKey = prefsKey; - verticalSplit = EditorPrefs.GetBool(m_PrefsKey + ".verticalSplit", true); - } - - public void ToggleVerticalSplit() - { - verticalSplit = !verticalSplit; - Save(); - } - - private void Save() - { - EditorPrefs.SetBool(m_PrefsKey + ".verticalSplit", verticalSplit); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunnerWindowSettings.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunnerWindowSettings.cs.meta deleted file mode 100644 index 44bcc5a0..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestRunnerWindowSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2b301b727225f1941974d69e61a55620 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings.meta deleted file mode 100644 index 41276310..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 95b719082a664ea45bb56759eed1f271 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings/ITestSettings.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings/ITestSettings.cs deleted file mode 100644 index d2720372..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings/ITestSettings.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; - -namespace UnityEditor.TestTools.TestRunner -{ - internal interface ITestSettings : IDisposable - { - ScriptingImplementation? scriptingBackend { get; set; } - - string Architecture { get; set; } - - ApiCompatibilityLevel? apiProfile { get; set; } - - bool? appleEnableAutomaticSigning { get; set; } - string appleDeveloperTeamID { get; set; } - ProvisioningProfileType? iOSManualProvisioningProfileType { get; set; } - string iOSManualProvisioningProfileID { get; set; } - ProvisioningProfileType? tvOSManualProvisioningProfileType { get; set; } - string tvOSManualProvisioningProfileID { get; set; } - - void SetupProjectParameters(); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings/ITestSettings.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings/ITestSettings.cs.meta deleted file mode 100644 index 9a8563c9..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings/ITestSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 83eda34b7da01e04aa894f268158b0c0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings/ITestSettingsDeserializer.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings/ITestSettingsDeserializer.cs deleted file mode 100644 index 701c91d8..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings/ITestSettingsDeserializer.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner -{ - interface ITestSettingsDeserializer - { - ITestSettings GetSettingsFromJsonFile(string jsonFilePath); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings/ITestSettingsDeserializer.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings/ITestSettingsDeserializer.cs.meta deleted file mode 100644 index 72c587e7..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings/ITestSettingsDeserializer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d208a1684f8aa6a40ad91d6aa9600c14 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings/TestSettings.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings/TestSettings.cs deleted file mode 100644 index a5bdf7ad..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings/TestSettings.cs +++ /dev/null @@ -1,160 +0,0 @@ -using System; - -namespace UnityEditor.TestTools.TestRunner -{ - internal class TestSettings : ITestSettings - { - private readonly TestSetting[] m_Settings = - { - new TestSetting( - settings => settings.scriptingBackend, - () => PlayerSettings.GetScriptingBackend(EditorUserBuildSettings.activeBuildTargetGroup), - implementation => PlayerSettings.SetScriptingBackend(EditorUserBuildSettings.activeBuildTargetGroup, implementation.Value)), - new TestSetting( - settings => settings.Architecture, - () => EditorUserBuildSettings.activeBuildTarget == BuildTarget.Android ? PlayerSettings.Android.targetArchitectures.ToString() : null, - architecture => - { - if (EditorUserBuildSettings.activeBuildTarget == BuildTarget.Android) - { - if (!string.IsNullOrEmpty(architecture)) - { - var targetArchitectures = (AndroidArchitecture)Enum.Parse(typeof(AndroidArchitecture), architecture, true); - PlayerSettings.Android.targetArchitectures = targetArchitectures; - } - } - }), - new TestSetting( - settings => settings.apiProfile, - () => PlayerSettings.GetApiCompatibilityLevel(EditorUserBuildSettings.activeBuildTargetGroup), - implementation => - { - if (Enum.IsDefined(typeof(ApiCompatibilityLevel), implementation.Value)) - { - PlayerSettings.SetApiCompatibilityLevel(EditorUserBuildSettings.activeBuildTargetGroup, - implementation.Value); - } - }), - new TestSetting( - settings => settings.appleEnableAutomaticSigning, - () => PlayerSettings.iOS.appleEnableAutomaticSigning, - enableAutomaticSigning => - { - if (enableAutomaticSigning != null) - PlayerSettings.iOS.appleEnableAutomaticSigning = enableAutomaticSigning.Value; - }), - new TestSetting( - settings => settings.appleDeveloperTeamID, - () => PlayerSettings.iOS.appleDeveloperTeamID, - developerTeam => - { - if (developerTeam != null) - PlayerSettings.iOS.appleDeveloperTeamID = developerTeam; - }), - new TestSetting( - settings => settings.iOSManualProvisioningProfileType, - () => PlayerSettings.iOS.iOSManualProvisioningProfileType, - profileType => - { - if (profileType != null) - PlayerSettings.iOS.iOSManualProvisioningProfileType = profileType.Value; - }), - new TestSetting( - settings => settings.iOSManualProvisioningProfileID, - () => PlayerSettings.iOS.iOSManualProvisioningProfileID, - provisioningUUID => - { - if (provisioningUUID != null) - PlayerSettings.iOS.iOSManualProvisioningProfileID = provisioningUUID; - }), - new TestSetting( - settings => settings.tvOSManualProvisioningProfileType, - () => PlayerSettings.iOS.tvOSManualProvisioningProfileType, - profileType => - { - if (profileType != null) - PlayerSettings.iOS.tvOSManualProvisioningProfileType = profileType.Value; - }), - new TestSetting( - settings => settings.tvOSManualProvisioningProfileID, - () => PlayerSettings.iOS.tvOSManualProvisioningProfileID, - provisioningUUID => - { - if (provisioningUUID != null) - PlayerSettings.iOS.tvOSManualProvisioningProfileID = provisioningUUID; - }), - }; - - private bool m_Disposed; - - public ScriptingImplementation? scriptingBackend { get; set; } - - public string Architecture { get; set; } - - public ApiCompatibilityLevel? apiProfile { get; set; } - - public bool? appleEnableAutomaticSigning { get; set; } - public string appleDeveloperTeamID { get; set; } - public ProvisioningProfileType? iOSManualProvisioningProfileType { get; set; } - public string iOSManualProvisioningProfileID { get; set; } - public ProvisioningProfileType? tvOSManualProvisioningProfileType { get; set; } - public string tvOSManualProvisioningProfileID { get; set; } - - public void Dispose() - { - if (!m_Disposed) - { - foreach (var testSetting in m_Settings) - { - testSetting.Cleanup(); - } - - m_Disposed = true; - } - } - - public void SetupProjectParameters() - { - foreach (var testSetting in m_Settings) - { - testSetting.Setup(this); - } - } - - private abstract class TestSetting - { - public abstract void Setup(TestSettings settings); - public abstract void Cleanup(); - } - - private class TestSetting : TestSetting - { - private T m_ValueBeforeSetup; - private Func m_GetFromSettings; - private Func m_GetCurrentValue; - private Action m_SetValue; - - public TestSetting(Func getFromSettings, Func getCurrentValue, Action setValue) - { - m_GetFromSettings = getFromSettings; - m_GetCurrentValue = getCurrentValue; - m_SetValue = setValue; - } - - public override void Setup(TestSettings settings) - { - m_ValueBeforeSetup = m_GetCurrentValue(); - var newValue = m_GetFromSettings(settings); - if (newValue != null) - { - m_SetValue(newValue); - } - } - - public override void Cleanup() - { - m_SetValue(m_ValueBeforeSetup); - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings/TestSettings.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings/TestSettings.cs.meta deleted file mode 100644 index 23e6f5e2..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings/TestSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6b32b6725087a0d4bb1670818d26996e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings/TestSettingsDeserializer.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings/TestSettingsDeserializer.cs deleted file mode 100644 index cdba06e9..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings/TestSettingsDeserializer.cs +++ /dev/null @@ -1,130 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner -{ - /// - /// Handles deserialization of TestSettings from a provided json file path. - /// - internal class TestSettingsDeserializer : ITestSettingsDeserializer - { - private static readonly SettingsMap[] s_SettingsMapping = - { - new SettingsMap("scriptingBackend", (settings, value) => settings.scriptingBackend = value), - new SettingsMap("architecture", (settings, value) => settings.Architecture = value), - new SettingsMap("apiProfile", (settings, value) => settings.apiProfile = value), - new SettingsMap("appleEnableAutomaticSigning", (settings, value) => settings.appleEnableAutomaticSigning = value), - new SettingsMap("appleDeveloperTeamID", (settings, value) => settings.appleDeveloperTeamID = value), - new SettingsMap("iOSManualProvisioningProfileType", (settings, value) => settings.iOSManualProvisioningProfileType = value), - new SettingsMap("iOSManualProvisioningProfileID", (settings, value) => settings.iOSManualProvisioningProfileID = value), - new SettingsMap("tvOSManualProvisioningProfileType", (settings, value) => settings.tvOSManualProvisioningProfileType = value), - new SettingsMap("tvOSManualProvisioningProfileID", (settings, value) => settings.tvOSManualProvisioningProfileID = value), - }; - - private readonly Func m_TestSettingsFactory; - public TestSettingsDeserializer(Func testSettingsFactory) - { - m_TestSettingsFactory = testSettingsFactory; - } - - public ITestSettings GetSettingsFromJsonFile(string jsonFilePath) - { - var text = File.ReadAllText(jsonFilePath); - var settingsDictionary = Json.Deserialize(text) as Dictionary; - - var testSettings = m_TestSettingsFactory(); - if (settingsDictionary == null) - { - return testSettings; - } - - foreach (var settingsMap in s_SettingsMapping) - { - if (!settingsDictionary.ContainsKey(settingsMap.Key)) - { - continue; - } - - if (settingsMap.Type.IsEnum) - { - SetEnumValue(settingsMap.Key, settingsDictionary[settingsMap.Key], settingsMap.Type, value => settingsMap.ApplyToSettings(testSettings, value)); - } - else - { - SetValue(settingsMap.Key, settingsDictionary[settingsMap.Key], settingsMap.Type, value => settingsMap.ApplyToSettings(testSettings, value)); - } - } - - return testSettings; - } - - private abstract class SettingsMap - { - public string Key { get; } - public Type Type { get; } - protected SettingsMap(string key, Type type) - { - Key = key; - Type = type; - } - - public abstract void ApplyToSettings(ITestSettings settings, object value); - } - - private class SettingsMap : SettingsMap - { - private Action m_Setter; - public SettingsMap(string key, Action setter) : base(key, typeof(T)) - { - m_Setter = setter; - } - - public override void ApplyToSettings(ITestSettings settings, object value) - { - m_Setter(settings, (T)value); - } - } - - private static void SetEnumValue(string key, object value, Type type, Action setter) - { - object enumValue; - if (TryGetEnum(value as string, type, out enumValue)) - { - setter(enumValue); - return; - } - - var acceptedValues = string.Join(", ", Enum.GetValues(type).OfType().Select(val => val.ToString()).ToArray()); - - Debug.LogFormat("Could not convert '{0}' argument '{1}' to a valid {2}. Accepted values: {3}.", key, value, type.Name, acceptedValues); - } - - private static bool TryGetEnum(string value, Type type, out object enumValue) - { - try - { - enumValue = Enum.Parse(type, value, true); - return true; - } - catch (Exception) - { - enumValue = null; - return false; - } - } - - private static void SetValue(string key, object value, Type type, Action setter) - { - if (type.IsInstanceOfType(value)) - { - setter(value); - return; - } - - Debug.LogFormat("Could not convert '{0}' argument '{1}' to a valid {2}.", key, value, type.Name); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings/TestSettingsDeserializer.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings/TestSettingsDeserializer.cs.meta deleted file mode 100644 index 4d50295d..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/TestSettings/TestSettingsDeserializer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 75e7d7a9a57458841a85fe42d9c9141f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityEditor.TestRunner.asmdef b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityEditor.TestRunner.asmdef deleted file mode 100644 index efdc7cf6..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityEditor.TestRunner.asmdef +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "UnityEditor.TestRunner", - "references": [ - "UnityEngine.TestRunner" - ], - "includePlatforms": [ - "Editor" - ], - "excludePlatforms": [], - "allowUnsafeCode": false, - "overrideReferences": true, - "precompiledReferences": [ - "nunit.framework.dll", - "Mono.Cecil.dll", - "Mono.Cecil.Pdb.dll", - "Mono.Cecil.Mdb.dll", - "Mono.Cecil.Rocks.dll" - ], - "autoReferenced": false, - "defineConstraints": [] -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityEditor.TestRunner.asmdef.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityEditor.TestRunner.asmdef.meta deleted file mode 100644 index 63c02900..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityEditor.TestRunner.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 0acc523941302664db1f4e527237feb3 -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol.meta deleted file mode 100644 index 8499c835..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 936c6340f3468444ebb1785b4c311126 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/AssemblyCompilationErrorsMessage.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/AssemblyCompilationErrorsMessage.cs deleted file mode 100644 index 7f00c5b6..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/AssemblyCompilationErrorsMessage.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol -{ - internal class AssemblyCompilationErrorsMessage : Message - { - public string assembly; - public string[] errors; - - public AssemblyCompilationErrorsMessage() - { - type = "AssemblyCompilationErrors"; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/AssemblyCompilationErrorsMessage.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/AssemblyCompilationErrorsMessage.cs.meta deleted file mode 100644 index 67d5b2a3..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/AssemblyCompilationErrorsMessage.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c346a7445959bba46a96de0747e77c2a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/ITestRunnerApiMapper.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/ITestRunnerApiMapper.cs deleted file mode 100644 index f7dcacfe..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/ITestRunnerApiMapper.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Collections.Generic; -using UnityEditor.TestTools.TestRunner.Api; - -namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol -{ - interface ITestRunnerApiMapper - { - string GetRunStateFromResultNunitXml(ITestResultAdaptor result); - TestState GetTestStateFromResult(ITestResultAdaptor result); - List FlattenTestNames(ITestAdaptor testsToRun); - TestPlanMessage MapTestToTestPlanMessage(ITestAdaptor testsToRun); - TestStartedMessage MapTestToTestStartedMessage(ITestAdaptor test); - TestFinishedMessage TestResultToTestFinishedMessage(ITestResultAdaptor result); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/ITestRunnerApiMapper.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/ITestRunnerApiMapper.cs.meta deleted file mode 100644 index 75e0ba23..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/ITestRunnerApiMapper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6de79ae237e51554da96fd28f68b66a6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/IUtpLogger.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/IUtpLogger.cs deleted file mode 100644 index bdb96c13..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/IUtpLogger.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol -{ - interface IUtpLogger - { - void Log(Message msg); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/IUtpLogger.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/IUtpLogger.cs.meta deleted file mode 100644 index dbd33aac..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/IUtpLogger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9014630255533ed42915965b4065cde8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/IUtpMessageReporter.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/IUtpMessageReporter.cs deleted file mode 100644 index 3a9895e1..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/IUtpMessageReporter.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections.Generic; -using UnityEditor.Compilation; -using UnityEditor.TestTools.TestRunner.Api; - -namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol -{ - internal interface IUtpMessageReporter - { - void ReportAssemblyCompilationErrors(string assembly, IEnumerable errorCompilerMessages); - void ReportTestFinished(ITestResultAdaptor result); - void ReportTestRunStarted(ITestAdaptor testsToRun); - void ReportTestStarted(ITestAdaptor test); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/IUtpMessageReporter.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/IUtpMessageReporter.cs.meta deleted file mode 100644 index 4c96a902..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/IUtpMessageReporter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 952b3dc7b47846947b37c8d3ae46579a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/Message.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/Message.cs deleted file mode 100644 index d10a5e42..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/Message.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Diagnostics; - -namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol -{ - [Serializable] - internal abstract class Message - { - public string type; - // Milliseconds since unix epoch - public ulong time; - public int version; - public string phase; - public int processId; - - protected Message() - { - version = 2; - phase = "Immediate"; - processId = Process.GetCurrentProcess().Id; - AddTimeStamp(); - } - - public void AddTimeStamp() - { - time = Convert.ToUInt64((DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalMilliseconds); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/Message.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/Message.cs.meta deleted file mode 100644 index bfc702bb..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/Message.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 321dc2c0720f8dd4f9396ecdc12b8746 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestFinishedMessage.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestFinishedMessage.cs deleted file mode 100644 index 66e18ff8..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestFinishedMessage.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol -{ - internal class TestFinishedMessage : Message - { - public string name; - public TestState state; - public string message; - public ulong duration; // milliseconds - public ulong durationMicroseconds; - public string stackTrace; - - public TestFinishedMessage() - { - type = "TestStatus"; - phase = "End"; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestFinishedMessage.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestFinishedMessage.cs.meta deleted file mode 100644 index 15b951b9..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestFinishedMessage.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 423fe2ef878fa1140a7e1f7f9e365815 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestPlanMessage.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestPlanMessage.cs deleted file mode 100644 index c0a76dad..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestPlanMessage.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System.Collections.Generic; - -namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol -{ - internal class TestPlanMessage : Message - { - public List tests; - - public TestPlanMessage() - { - type = "TestPlan"; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestPlanMessage.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestPlanMessage.cs.meta deleted file mode 100644 index c057f60c..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestPlanMessage.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 28f79a0d7e64c2345bc46f8c4cf788f8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestRunnerApiMapper.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestRunnerApiMapper.cs deleted file mode 100644 index af93dba9..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestRunnerApiMapper.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Xml; -using UnityEditor.TestTools.TestRunner.Api; - -namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol -{ - internal class TestRunnerApiMapper : ITestRunnerApiMapper - { - public TestPlanMessage MapTestToTestPlanMessage(ITestAdaptor testsToRun) - { - var testsNames = testsToRun != null ? FlattenTestNames(testsToRun) : new List(); - - var msg = new TestPlanMessage - { - tests = testsNames - }; - - return msg; - } - - public TestStartedMessage MapTestToTestStartedMessage(ITestAdaptor test) - { - return new TestStartedMessage - { - name = test.FullName - }; - } - - public TestFinishedMessage TestResultToTestFinishedMessage(ITestResultAdaptor result) - { - return new TestFinishedMessage - { - name = result.Test.FullName, - duration = Convert.ToUInt64(result.Duration * 1000), - durationMicroseconds = Convert.ToUInt64(result.Duration * 1000000), - message = result.Message, - state = GetTestStateFromResult(result), - stackTrace = result.StackTrace - }; - } - - public string GetRunStateFromResultNunitXml(ITestResultAdaptor result) - { - var doc = new XmlDocument(); - doc.LoadXml(result.ToXml().OuterXml); - return doc.FirstChild.Attributes["runstate"].Value; - } - - public TestState GetTestStateFromResult(ITestResultAdaptor result) - { - var state = TestState.Failure; - - if (result.TestStatus == TestStatus.Passed) - { - state = TestState.Success; - - var runstate = GetRunStateFromResultNunitXml(result); - runstate = runstate ?? String.Empty; - - if (runstate.ToLowerInvariant().Equals("explicit")) - state = TestState.Skipped; - } - else if (result.TestStatus == TestStatus.Skipped) - { - state = TestState.Skipped; - - if (result.ResultState.ToLowerInvariant().EndsWith("ignored")) - state = TestState.Ignored; - } - else - { - if (result.ResultState.ToLowerInvariant().Equals("inconclusive")) - state = TestState.Inconclusive; - - if (result.ResultState.ToLowerInvariant().EndsWith("cancelled") || - result.ResultState.ToLowerInvariant().EndsWith("error")) - state = TestState.Error; - } - - return state; - } - - public List FlattenTestNames(ITestAdaptor test) - { - var results = new List(); - - if (!test.IsSuite) - results.Add(test.FullName); - - if (test.Children != null && test.Children.Any()) - foreach (var child in test.Children) - results.AddRange(FlattenTestNames(child)); - - return results; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestRunnerApiMapper.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestRunnerApiMapper.cs.meta deleted file mode 100644 index 47634b98..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestRunnerApiMapper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2011a59d3f76b3d4a85cb53f945fceee -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestStartedMessage.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestStartedMessage.cs deleted file mode 100644 index c21464fc..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestStartedMessage.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol -{ - internal class TestStartedMessage : Message - { - public string name; - public TestState state; - - public TestStartedMessage() - { - type = "TestStatus"; - phase = "Begin"; - state = TestState.Inconclusive; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestStartedMessage.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestStartedMessage.cs.meta deleted file mode 100644 index 18b53d11..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestStartedMessage.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bd3e81baa10021f4d877fa36382bab16 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestState.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestState.cs deleted file mode 100644 index 223a73d5..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestState.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol -{ - // This matches the state definitions expected by the Perl code, which in turn matches the NUnit 2 values... - internal enum TestState - { - Inconclusive = 0, - Skipped = 2, - Ignored = 3, - Success = 4, - Failure = 5, - Error = 6 - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestState.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestState.cs.meta deleted file mode 100644 index ac666417..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/TestState.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 77f432980bb30084299a138e15c6f571 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolListener.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolListener.cs deleted file mode 100644 index 09daf8dc..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolListener.cs +++ /dev/null @@ -1,35 +0,0 @@ -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol -{ - internal class UnityTestProtocolListener : ScriptableObject, ICallbacks - { - private IUtpMessageReporter m_UtpMessageReporter; - - public UnityTestProtocolListener() - { - m_UtpMessageReporter = new UtpMessageReporter(new UtpDebugLogger()); - } - - public void RunStarted(ITestAdaptor testsToRun) - { - m_UtpMessageReporter.ReportTestRunStarted(testsToRun); - } - - public void RunFinished(ITestResultAdaptor testResults) - { - // Apparently does nothing :) - } - - public void TestStarted(ITestAdaptor test) - { - m_UtpMessageReporter.ReportTestStarted(test); - } - - public void TestFinished(ITestResultAdaptor result) - { - m_UtpMessageReporter.ReportTestFinished(result); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolListener.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolListener.cs.meta deleted file mode 100644 index 8ba29bea..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolListener.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 900aac3710bc14542a8d164e3f0ff820 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolStarter.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolStarter.cs deleted file mode 100644 index cca2fd82..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolStarter.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Linq; -using UnityEditor.Compilation; -using UnityEditor.TestTools.TestRunner.Api; -using UnityEngine; -using UnityEngine.TestTools; - -namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol -{ - [InitializeOnLoad] - internal static class UnityTestProtocolStarter - { - static UnityTestProtocolStarter() - { - var commandLineArgs = Environment.GetCommandLineArgs(); - if (commandLineArgs.Contains("-automated") && commandLineArgs.Contains("-runTests")) // wanna have it only for utr run - { - var api = ScriptableObject.CreateInstance(); - var listener = ScriptableObject.CreateInstance(); - api.RegisterCallbacks(listener); - CompilationPipeline.assemblyCompilationFinished += OnAssemblyCompilationFinished; - } - } - - public static void OnAssemblyCompilationFinished(string assembly, CompilerMessage[] messages) - { - bool checkCompileErrors = RecompileScripts.Current == null || RecompileScripts.Current.ExpectScriptCompilationSuccess; - - if (checkCompileErrors && messages.Any(x => x.type == CompilerMessageType.Error)) - { - var compilerErrorMessages = messages.Where(x => x.type == CompilerMessageType.Error); - var utpMessageReporter = new UtpMessageReporter(new UtpDebugLogger()); - utpMessageReporter.ReportAssemblyCompilationErrors(assembly, compilerErrorMessages); - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolStarter.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolStarter.cs.meta deleted file mode 100644 index 540b31e0..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/UnityTestProtocolStarter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1ac58cb55fc8daf4abd3945a2bbbb0c5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/UtpDebuglogger.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/UtpDebuglogger.cs deleted file mode 100644 index e32f6d28..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/UtpDebuglogger.cs +++ /dev/null @@ -1,13 +0,0 @@ -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol -{ - class UtpDebugLogger : IUtpLogger - { - public void Log(Message msg) - { - var msgJson = JsonUtility.ToJson(msg); - Debug.LogFormat(LogType.Log, LogOption.NoStacktrace, null, "\n##utp:{0}", msgJson); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/UtpDebuglogger.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/UtpDebuglogger.cs.meta deleted file mode 100644 index 7debc237..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/UtpDebuglogger.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d0abdd8cb6b29a24c8ee19626ef741b9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/UtpMessageReporter.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/UtpMessageReporter.cs deleted file mode 100644 index 37c4ee7e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/UtpMessageReporter.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using UnityEditor.Compilation; -using UnityEditor.TestTools.TestRunner.Api; - -namespace UnityEditor.TestTools.TestRunner.UnityTestProtocol -{ - internal class UtpMessageReporter : IUtpMessageReporter - { - public ITestRunnerApiMapper TestRunnerApiMapper; - public IUtpLogger Logger; - - public UtpMessageReporter(IUtpLogger utpLogger) - { - TestRunnerApiMapper = new TestRunnerApiMapper(); - Logger = utpLogger; - } - - public void ReportAssemblyCompilationErrors(string assembly, IEnumerable errorCompilerMessages) - { - var compilationErrorMessage = new AssemblyCompilationErrorsMessage - { - assembly = assembly, - errors = errorCompilerMessages.Select(x => x.message).ToArray() - }; - - Logger.Log(compilationErrorMessage); - } - - public void ReportTestRunStarted(ITestAdaptor testsToRun) - { - var msg = TestRunnerApiMapper.MapTestToTestPlanMessage(testsToRun); - - Logger.Log(msg); - } - - public void ReportTestStarted(ITestAdaptor test) - { - if (test.IsSuite) - return; - - var msg = TestRunnerApiMapper.MapTestToTestStartedMessage(test); - - Logger.Log(msg); - } - - public void ReportTestFinished(ITestResultAdaptor result) - { - if (result.Test.IsSuite) - return; - - var msg = TestRunnerApiMapper.TestResultToTestFinishedMessage(result); - - Logger.Log(msg); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/UtpMessageReporter.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/UtpMessageReporter.cs.meta deleted file mode 100644 index c818d4ff..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEditor.TestRunner/UnityTestProtocol/UtpMessageReporter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ebcc5f899d9277642868aeda9a17cbaf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner.meta deleted file mode 100644 index 95890508..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 950890083f4907541a6ed06d70959e49 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/AssemblyInfo.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/AssemblyInfo.cs deleted file mode 100644 index 41496773..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/AssemblyInfo.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly: AssemblyTitle("UnityEngine.TestRunner")] - -[assembly: InternalsVisibleTo("UnityEditor.TestRunner")] -[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] -[assembly: InternalsVisibleTo("Unity.PerformanceTesting")] -[assembly: InternalsVisibleTo("Unity.PerformanceTesting.Editor")] -[assembly: InternalsVisibleTo("Assembly-CSharp-testable")] -[assembly: InternalsVisibleTo("Assembly-CSharp-Editor-testable")] -[assembly: InternalsVisibleTo("UnityEngine.TestRunner.Tests")] -[assembly: InternalsVisibleTo("UnityEditor.TestRunner.Tests")] -[assembly: InternalsVisibleTo("Unity.PackageManagerUI.Editor")] - -[assembly: AssemblyVersion("1.0.0")] diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/AssemblyInfo.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/AssemblyInfo.cs.meta deleted file mode 100644 index b499e312..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/AssemblyInfo.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cc22cc13b69c1094c85e176c008b9ef8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions.meta deleted file mode 100644 index 4e7bbdfe..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1ad55f5ad04d1d045a1f287409c650dd -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/AllocatingGCMemoryConstraint.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/AllocatingGCMemoryConstraint.cs deleted file mode 100644 index 339a090e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/AllocatingGCMemoryConstraint.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; -using NUnit.Framework; -using NUnit.Framework.Constraints; -using UnityEngine.Profiling; - -namespace UnityEngine.TestTools.Constraints -{ - public class AllocatingGCMemoryConstraint : Constraint - { - private class AllocatingGCMemoryResult : ConstraintResult - { - private readonly int diff; - public AllocatingGCMemoryResult(IConstraint constraint, object actualValue, int diff) : base(constraint, actualValue, diff > 0) - { - this.diff = diff; - } - - public override void WriteMessageTo(MessageWriter writer) - { - if (diff == 0) - writer.WriteMessageLine("The provided delegate did not make any GC allocations."); - else - writer.WriteMessageLine("The provided delegate made {0} GC allocation(s).", diff); - } - } - - private ConstraintResult ApplyTo(Action action, object original) - { - var recorder = Recorder.Get("GC.Alloc"); - - // The recorder was created enabled, which means it captured the creation of the Recorder object itself, etc. - // Disabling it flushes its data, so that we can retrieve the sample block count and have it correctly account - // for these initial allocations. - recorder.enabled = false; - -#if !UNITY_WEBGL - recorder.FilterToCurrentThread(); -#endif - - recorder.enabled = true; - - try - { - action(); - } - finally - { - recorder.enabled = false; -#if !UNITY_WEBGL - recorder.CollectFromAllThreads(); -#endif - } - - return new AllocatingGCMemoryResult(this, original, recorder.sampleBlockCount); - } - - public override ConstraintResult ApplyTo(object obj) - { - if (obj == null) - throw new ArgumentNullException(); - - TestDelegate d = obj as TestDelegate; - if (d == null) - throw new ArgumentException(string.Format("The actual value must be a TestDelegate but was {0}", - obj.GetType())); - - return ApplyTo(() => d.Invoke(), obj); - } - - public override ConstraintResult ApplyTo(ActualValueDelegate del) - { - if (del == null) - throw new ArgumentNullException(); - - return ApplyTo(() => del.Invoke(), del); - } - - public override string Description - { - get { return "allocates GC memory"; } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/AllocatingGCMemoryConstraint.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/AllocatingGCMemoryConstraint.cs.meta deleted file mode 100644 index 0933c855..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/AllocatingGCMemoryConstraint.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d09858396dd7adb4bbdb22ea0c8c3a37 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/ConstraintsExtensions.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/ConstraintsExtensions.cs deleted file mode 100644 index 812b1f06..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/ConstraintsExtensions.cs +++ /dev/null @@ -1,14 +0,0 @@ -using NUnit.Framework.Constraints; - -namespace UnityEngine.TestTools.Constraints -{ - public static class ConstraintExtensions - { - public static AllocatingGCMemoryConstraint AllocatingGCMemory(this ConstraintExpression chain) - { - var constraint = new AllocatingGCMemoryConstraint(); - chain.Append(constraint); - return constraint; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/ConstraintsExtensions.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/ConstraintsExtensions.cs.meta deleted file mode 100644 index 13434964..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/ConstraintsExtensions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 68a48d1900320ed458e118415857faf6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/InvalidSignatureException.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/InvalidSignatureException.cs deleted file mode 100644 index ab4ff8e3..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/InvalidSignatureException.cs +++ /dev/null @@ -1,18 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.Interfaces; - -namespace UnityEngine.TestTools.TestRunner -{ - internal class InvalidSignatureException : ResultStateException - { - public InvalidSignatureException(string message) - : base(message) - { - } - - public override ResultState ResultState - { - get { return ResultState.NotRunnable; } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/InvalidSignatureException.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/InvalidSignatureException.cs.meta deleted file mode 100644 index 86aee7fa..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/InvalidSignatureException.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9650d910fcaefb34cb45f121c1993892 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/Is.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/Is.cs deleted file mode 100644 index c0871ef2..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/Is.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace UnityEngine.TestTools.Constraints -{ - public class Is : NUnit.Framework.Is - { - public static AllocatingGCMemoryConstraint AllocatingGCMemory() - { - return new AllocatingGCMemoryConstraint(); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/Is.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/Is.cs.meta deleted file mode 100644 index 23ed44a6..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/Is.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6d5833966abeadb429de247e4316eef4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogAssert.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogAssert.cs deleted file mode 100644 index 51b97ded..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogAssert.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System.Text.RegularExpressions; -using UnityEngine.TestTools.Logging; - -namespace UnityEngine.TestTools -{ - public static class LogAssert - { - public static void Expect(LogType type, string message) - { - LogScope.Current.ExpectedLogs.Enqueue(new LogMatch() { LogType = type, Message = message }); - } - - public static void Expect(LogType type, Regex message) - { - LogScope.Current.ExpectedLogs.Enqueue(new LogMatch() { LogType = type, MessageRegex = message }); - } - - public static void NoUnexpectedReceived() - { - LogScope.Current.NoUnexpectedReceived(); - } - - public static bool ignoreFailingMessages - { - get - { - return LogScope.Current.IgnoreFailingMessages; - } - set - { - if (value != LogScope.Current.IgnoreFailingMessages) - { - Debug.LogFormat(LogType.Log, LogOption.NoStacktrace, null, "\nIgnoreFailingMessages:" + (value? "true":"false")); - } - LogScope.Current.IgnoreFailingMessages = value; - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogAssert.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogAssert.cs.meta deleted file mode 100644 index 7a278a31..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogAssert.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c97b794b51780d349a16826a4c7898d7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope.meta deleted file mode 100644 index 284dc6ad..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b1d8465ba1376b148bdab58965101f47 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope/ILogScope.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope/ILogScope.cs deleted file mode 100644 index 5e73bb54..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope/ILogScope.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace UnityEngine.TestTools.Logging -{ - internal interface ILogScope : IDisposable - { - Queue ExpectedLogs { get; set; } - List AllLogs { get; } - List FailingLogs { get; } - bool IgnoreFailingMessages { get; set; } - bool IsNUnitException { get; } - bool IsNUnitSuccessException { get; } - bool IsNUnitInconclusiveException { get; } - bool IsNUnitIgnoreException { get; } - string NUnitExceptionMessage { get; } - void AddLog(string message, string stacktrace, LogType type); - bool AnyFailingLogs(); - void ProcessExpectedLogs(); - void NoUnexpectedReceived(); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope/ILogScope.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope/ILogScope.cs.meta deleted file mode 100644 index 69e7d556..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope/ILogScope.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3504aa04cda851b44a65973f9aead6f7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope/LogEvent.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope/LogEvent.cs deleted file mode 100644 index bbc805e8..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope/LogEvent.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace UnityEngine.TestTools.Logging -{ - internal class LogEvent - { - public string Message { get; set; } - - public string StackTrace { get; set; } - - public LogType LogType { get; set; } - - public bool IsHandled { get; set; } - - public override string ToString() - { - return string.Format("[{0}] {1}", LogType, Message); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope/LogEvent.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope/LogEvent.cs.meta deleted file mode 100644 index 66c9130d..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope/LogEvent.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0c56471f08a0f6846afc792f0b4205b9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope/LogMatch.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope/LogMatch.cs deleted file mode 100644 index 9b862d92..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope/LogMatch.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System; -using System.Text.RegularExpressions; - -namespace UnityEngine.TestTools.Logging -{ - [Serializable] - internal class LogMatch - { - [SerializeField] - private bool m_UseRegex; - [SerializeField] - private string m_Message; - [SerializeField] - private string m_MessageRegex; - [SerializeField] - private string m_LogType; - - public string Message - { - get { return m_Message; } - set - { - m_Message = value; - m_UseRegex = false; - } - } - - public Regex MessageRegex - { - get - { - if (!m_UseRegex) - { - return null; - } - - return new Regex(m_MessageRegex); - } - set - { - if (value != null) - { - m_MessageRegex = value.ToString(); - m_UseRegex = true; - } - else - { - m_MessageRegex = null; - m_UseRegex = false; - } - } - } - - public LogType? LogType - { - get - { - if (!string.IsNullOrEmpty(m_LogType)) - { - return Enum.Parse(typeof(LogType), m_LogType) as LogType ? ; - } - - return null; - } - set - { - if (value != null) - { - m_LogType = value.Value.ToString(); - } - else - { - m_LogType = null; - } - } - } - - public bool Matches(LogEvent log) - { - if (LogType != null && LogType != log.LogType) - { - return false; - } - - if (m_UseRegex) - { - return MessageRegex.IsMatch(log.Message); - } - else - { - return Message.Equals(log.Message); - } - } - - public override string ToString() - { - if (m_UseRegex) - return string.Format("[{0}] Regex: {1}", LogType, MessageRegex); - else - return string.Format("[{0}] {1}", LogType, Message); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope/LogMatch.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope/LogMatch.cs.meta deleted file mode 100644 index ffc2bc32..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope/LogMatch.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9945ffed4692c6044b6d3acf81efd694 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope/LogScope.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope/LogScope.cs deleted file mode 100644 index 84957d87..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope/LogScope.cs +++ /dev/null @@ -1,223 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using UnityEngine.TestTools.TestRunner; - -namespace UnityEngine.TestTools.Logging -{ - sealed class LogScope : ILogScope - { - static List s_ActiveScopes = new List(); - - readonly object m_Lock = new object(); - bool m_Disposed; - bool m_NeedToProcessLogs; - - public Queue ExpectedLogs { get; set; } - public List AllLogs { get; } - public List FailingLogs { get; } - public bool IgnoreFailingMessages { get; set; } - public bool IsNUnitException { get; private set; } - public bool IsNUnitSuccessException { get; private set; } - public bool IsNUnitInconclusiveException { get; private set; } - public bool IsNUnitIgnoreException { get; private set; } - public string NUnitExceptionMessage { get; private set; } - - public static LogScope Current - { - get - { - if (s_ActiveScopes.Count == 0) - throw new InvalidOperationException("No log scope is available"); - return s_ActiveScopes[0]; - } - } - - public static bool HasCurrentLogScope() - { - return s_ActiveScopes.Count > 0; - } - - public LogScope() - { - AllLogs = new List(); - FailingLogs = new List(); - ExpectedLogs = new Queue(); - IgnoreFailingMessages = false; - Activate(); - } - - void Activate() - { - s_ActiveScopes.Insert(0, this); - RegisterScope(this); - Application.logMessageReceivedThreaded -= AddLog; - Application.logMessageReceivedThreaded += AddLog; - } - - void Deactivate() - { - Application.logMessageReceivedThreaded -= AddLog; - s_ActiveScopes.Remove(this); - UnregisterScope(this); - } - - static void RegisterScope(LogScope logScope) - { - Application.logMessageReceivedThreaded += logScope.AddLog; - } - - static void UnregisterScope(LogScope logScope) - { - Application.logMessageReceivedThreaded -= logScope.AddLog; - } - - public void AddLog(string message, string stacktrace, LogType type) - { - lock (m_Lock) - { - m_NeedToProcessLogs = true; - var log = new LogEvent - { - LogType = type, - Message = message, - StackTrace = stacktrace, - }; - - AllLogs.Add(log); - - if (IsNUnitResultStateException(stacktrace, type)) - { - if (message.StartsWith("SuccessException")) - { - IsNUnitException = true; - IsNUnitSuccessException = true; - if (message.StartsWith("SuccessException: ")) - { - NUnitExceptionMessage = message.Substring("SuccessException: ".Length); - return; - } - } - else if (message.StartsWith("InconclusiveException")) - { - IsNUnitException = true; - IsNUnitInconclusiveException = true; - if (message.StartsWith("InconclusiveException: ")) - { - NUnitExceptionMessage = message.Substring("InconclusiveException: ".Length); - return; - } - } - else if (message.StartsWith("IgnoreException")) - { - IsNUnitException = true; - IsNUnitIgnoreException = true; - if (message.StartsWith("IgnoreException: ")) - { - NUnitExceptionMessage = message.Substring("IgnoreException: ".Length); - return; - } - } - } - - if (IsFailingLog(type) && !IgnoreFailingMessages) - { - FailingLogs.Add(log); - } - } - } - - static bool IsNUnitResultStateException(string stacktrace, LogType logType) - { - if (logType != LogType.Exception) - return false; - - return string.IsNullOrEmpty(stacktrace) || stacktrace.StartsWith("NUnit.Framework.Assert."); - } - - static bool IsFailingLog(LogType type) - { - switch (type) - { - case LogType.Assert: - case LogType.Error: - case LogType.Exception: - return true; - default: - return false; - } - } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - void Dispose(bool disposing) - { - if (m_Disposed) - { - return; - } - - m_Disposed = true; - - if (disposing) - { - Deactivate(); - } - } - - public bool AnyFailingLogs() - { - ProcessExpectedLogs(); - return FailingLogs.Any(); - } - - public void ProcessExpectedLogs() - { - lock (m_Lock) - { - if (!m_NeedToProcessLogs || !ExpectedLogs.Any()) - return; - - LogMatch expectedLog = null; - foreach (var logEvent in AllLogs) - { - if (!ExpectedLogs.Any()) - break; - if (expectedLog == null && ExpectedLogs.Any()) - expectedLog = ExpectedLogs.Peek(); - - if (expectedLog != null && expectedLog.Matches(logEvent)) - { - ExpectedLogs.Dequeue(); - logEvent.IsHandled = true; - if (FailingLogs.Any(expectedLog.Matches)) - { - var failingLog = FailingLogs.First(expectedLog.Matches); - FailingLogs.Remove(failingLog); - } - expectedLog = null; - } - } - m_NeedToProcessLogs = false; - } - } - - public void NoUnexpectedReceived() - { - lock (m_Lock) - { - ProcessExpectedLogs(); - - var unhandledLog = AllLogs.FirstOrDefault(x => !x.IsHandled); - if (unhandledLog != null) - { - throw new UnhandledLogMessageException(unhandledLog); - } - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope/LogScope.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope/LogScope.cs.meta deleted file mode 100644 index ea13dd62..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/LogScope/LogScope.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4bbc17b35884fdf468e4b52ae4222882 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/UnexpectedLogMessageException.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/UnexpectedLogMessageException.cs deleted file mode 100644 index 8ad39f44..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/UnexpectedLogMessageException.cs +++ /dev/null @@ -1,29 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.Interfaces; -using UnityEngine.TestTools.Logging; - -namespace UnityEngine.TestTools.TestRunner -{ - internal class UnexpectedLogMessageException : ResultStateException - { - public LogMatch LogEvent; - - public UnexpectedLogMessageException(LogMatch log) - : base(BuildMessage(log)) - { - LogEvent = log; - } - - private static string BuildMessage(LogMatch log) - { - return string.Format("Expected log did not appear: {0}", log); - } - - public override ResultState ResultState - { - get { return ResultState.Failure; } - } - - public override string StackTrace { get { return null; } } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/UnexpectedLogMessageException.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/UnexpectedLogMessageException.cs.meta deleted file mode 100644 index 7b9e6115..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/UnexpectedLogMessageException.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5b2eeca598284bd4abb4a15c30df1576 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/UnhandledLogMessageException.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/UnhandledLogMessageException.cs deleted file mode 100644 index 9427cc86..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/UnhandledLogMessageException.cs +++ /dev/null @@ -1,35 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.Interfaces; -using UnityEngine.TestTools.Logging; -using UnityEngine.TestTools.Utils; - -namespace UnityEngine.TestTools.TestRunner -{ - internal class UnhandledLogMessageException : ResultStateException - { - public LogEvent LogEvent; - private readonly string m_CustomStackTrace; - - public UnhandledLogMessageException(LogEvent log) - : base(BuildMessage(log)) - { - LogEvent = log; - m_CustomStackTrace = StackTraceFilter.Filter(log.StackTrace); - } - - private static string BuildMessage(LogEvent log) - { - return string.Format("Unhandled log message: '{0}'. Use UnityEngine.TestTools.LogAssert.Expect", log); - } - - public override ResultState ResultState - { - get { return ResultState.Failure; } - } - - public override string StackTrace - { - get { return m_CustomStackTrace; } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/UnhandledLogMessageException.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/UnhandledLogMessageException.cs.meta deleted file mode 100644 index 1019924b..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/UnhandledLogMessageException.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a8ed4063f2beecd41a234a582202f3c4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/UnityTestTimeoutException.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/UnityTestTimeoutException.cs deleted file mode 100644 index 6ba39c26..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/UnityTestTimeoutException.cs +++ /dev/null @@ -1,28 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.Interfaces; - -namespace UnityEngine.TestTools.TestRunner -{ - internal class UnityTestTimeoutException : ResultStateException - { - public UnityTestTimeoutException(int timeout) - : base(BuildMessage(timeout)) - { - } - - private static string BuildMessage(int timeout) - { - return string.Format("UnityTest exceeded Timeout value of {0}ms", timeout); - } - - public override ResultState ResultState - { - get { return ResultState.Failure; } - } - - public override string StackTrace - { - get { return ""; } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/UnityTestTimeoutException.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/UnityTestTimeoutException.cs.meta deleted file mode 100644 index d366ec90..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Assertions/UnityTestTimeoutException.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ffb335140c799c4408411d81789fb05c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions.meta deleted file mode 100644 index 3023e521..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3e8d6af343b383544ba5743d119f4062 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/ActionDelegator.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/ActionDelegator.cs deleted file mode 100644 index ed8d8963..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/ActionDelegator.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.Linq; -using UnityEngine.TestRunner.NUnitExtensions.Runner; -using UnityEngine.TestTools.Logging; -using UnityEngine.TestTools.TestRunner; - -namespace UnityEngine.TestTools.NUnitExtensions -{ - /// - /// This class delegates actions from the NUnit thread that should be executed on the main thread. - /// NUnit thread calls Delegate which blocks the execution on the thread until the action is executed. - /// The main thread will poll for awaiting actions (HasAction) and invoke them (Execute). - /// Once the action is executed, the main thread releases the lock and executino on the NUnit thread is continued. - /// - internal class ActionDelegator : BaseDelegator - { - private Func m_Action; - public object Delegate(Action action) - { - return Delegate(() => { action(); return null; }); - } - - public object Delegate(Func action) - { - if (m_Aborted) - { - return null; - } - - AssertState(); - m_Context = UnityTestExecutionContext.CurrentContext; - - m_Signal.Reset(); - m_Action = action; - - WaitForSignal(); - - return HandleResult(); - } - - private void AssertState() - { - if (m_Action != null) - { - throw new Exception("Action not executed yet"); - } - } - - public bool HasAction() - { - return m_Action != null; - } - - public void Execute(LogScope logScope) - { - try - { - SetCurrentTestContext(); - m_Result = m_Action(); - if (logScope.AnyFailingLogs()) - { - var failingLog = logScope.FailingLogs.First(); - throw new UnhandledLogMessageException(failingLog); - } - if (logScope.ExpectedLogs.Any()) - throw new UnexpectedLogMessageException(LogScope.Current.ExpectedLogs.Peek()); - } - catch (Exception e) - { - m_Exception = e; - } - finally - { - m_Action = null; - m_Signal.Set(); - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/ActionDelegator.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/ActionDelegator.cs.meta deleted file mode 100644 index 5f4e2d19..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/ActionDelegator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4f939b9e23a0946439b812551e07ac81 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes.meta deleted file mode 100644 index c7cae094..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 0cb14878543cf3d4f8472b15f7ecf0e3 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/ConditionalIgnoreAttribute.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/ConditionalIgnoreAttribute.cs deleted file mode 100644 index a8b4780d..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/ConditionalIgnoreAttribute.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Collections.Generic; -using NUnit.Framework; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; - -namespace UnityEngine.TestTools -{ - public class ConditionalIgnoreAttribute : NUnitAttribute, IApplyToTest - { - string m_ConditionKey; - string m_IgnoreReason; - - public ConditionalIgnoreAttribute(string conditionKey, string ignoreReason) - { - m_ConditionKey = conditionKey; - m_IgnoreReason = ignoreReason; - } - - public void ApplyToTest(Test test) - { - var key = m_ConditionKey.ToLowerInvariant(); - if (m_ConditionMap.ContainsKey(key) && m_ConditionMap[key]) - { - test.RunState = RunState.Ignored; - string skipReason = string.Format(m_IgnoreReason); - test.Properties.Add(PropertyNames.SkipReason, skipReason); - } - } - - static Dictionary m_ConditionMap = new Dictionary(); - public static void AddConditionalIgnoreMapping(string key, bool value) - { - m_ConditionMap.Add(key.ToLowerInvariant(), value); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/ConditionalIgnoreAttribute.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/ConditionalIgnoreAttribute.cs.meta deleted file mode 100644 index d7373354..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/ConditionalIgnoreAttribute.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c82a8473f4a8f7b42a004c91e06d2f2b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestEnumerator.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestEnumerator.cs deleted file mode 100644 index 89c5f76b..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestEnumerator.cs +++ /dev/null @@ -1,52 +0,0 @@ -using System; -using System.Collections; -using NUnit.Framework; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; - -namespace UnityEngine.TestTools -{ - internal class TestEnumerator - { - private readonly ITestExecutionContext m_Context; - private static IEnumerator m_TestEnumerator; - - public static IEnumerator Enumerator { get { return m_TestEnumerator; } } - - public TestEnumerator(ITestExecutionContext context, IEnumerator testEnumerator) - { - m_Context = context; - m_TestEnumerator = testEnumerator; - } - - public IEnumerator Execute() - { - m_Context.CurrentResult.SetResult(ResultState.Success); - - while (true) - { - object current = null; - try - { - if (!m_TestEnumerator.MoveNext()) - { - yield break; - } - - if (!m_Context.CurrentResult.ResultState.Equals(ResultState.Success)) - { - yield break; - } - - current = m_TestEnumerator.Current; - } - catch (Exception exception) - { - m_Context.CurrentResult.RecordException(exception); - yield break; - } - yield return current; - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestEnumerator.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestEnumerator.cs.meta deleted file mode 100644 index 6ca4f728..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestEnumerator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 750aad009559b814dbc27001341fc1c3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestMustExpectAllLogsAttribute.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestMustExpectAllLogsAttribute.cs deleted file mode 100644 index f9232edf..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestMustExpectAllLogsAttribute.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; - -namespace UnityEngine.TestTools -{ - /// - /// The presence of this attribute will cause the test runner to require that every single log is expected. By - /// default, the runner will only automatically fail on any error logs, so this adds warnings and infos as well. - /// It is the same as calling `LogAssert.NoUnexpectedReceived()` at the bottom of every affected test. - /// - /// This attribute can be applied to test assemblies (will affect every test in the assembly), fixtures (will - /// affect every test in the fixture), or on individual test methods. It is also automatically inherited from base - /// fixtures. - /// - /// The MustExpect property (on by default) lets you selectively enable or disable the higher level value. For - /// example when migrating an assembly to this more strict checking method, you might attach - /// `[assembly:TestMustExpectAllLogs]` to the assembly itself, but then whitelist failing fixtures and test methods - /// with `[TestMustExpectAllLogs(MustExpect=false)]` until they can be migrated. This also means new tests in that - /// assembly would be required to have the more strict checking. - /// - [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method)] - public class TestMustExpectAllLogsAttribute : Attribute - { - public TestMustExpectAllLogsAttribute(bool mustExpect = true) - => MustExpect = mustExpect; - - public bool MustExpect { get; } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestMustExpectAllLogsAttribute.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestMustExpectAllLogsAttribute.cs.meta deleted file mode 100644 index 82c5e47f..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestMustExpectAllLogsAttribute.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3803f736886e77842995ddbc3531afaa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityCombinatorialStrategy.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityCombinatorialStrategy.cs deleted file mode 100644 index 84f8d845..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityCombinatorialStrategy.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal.Builders; - -namespace UnityEngine.TestTools -{ - internal class UnityCombinatorialStrategy : CombinatorialStrategy, ICombiningStrategy - { - public new IEnumerable GetTestCases(IEnumerable[] sources) - { - var testCases = base.GetTestCases(sources); - foreach (var testCase in testCases) - { - testCase.GetType().GetProperty("ExpectedResult").SetValue(testCase, new object(), null); - } - return testCases; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityCombinatorialStrategy.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityCombinatorialStrategy.cs.meta deleted file mode 100644 index 84774ce9..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityCombinatorialStrategy.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7af6ac3e6b51b8d4aab04adc85b8de2f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityPlatformAttribute.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityPlatformAttribute.cs deleted file mode 100644 index ff538ea1..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityPlatformAttribute.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; - -namespace UnityEngine.TestTools -{ - [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = false)] - public class UnityPlatformAttribute : NUnitAttribute, IApplyToTest - { - public RuntimePlatform[] include { get; set; } - public RuntimePlatform[] exclude { get; set; } - - private string m_skippedReason; - - public UnityPlatformAttribute() - { - include = new List().ToArray(); - exclude = new List().ToArray(); - } - - public UnityPlatformAttribute(params RuntimePlatform[] include) - : this() - { - this.include = include; - } - - public void ApplyToTest(Test test) - { - if (test.RunState == RunState.NotRunnable || test.RunState == RunState.Ignored || IsPlatformSupported(Application.platform)) - { - return; - } - test.RunState = RunState.Skipped; - test.Properties.Add("_SKIPREASON", m_skippedReason); - } - - internal bool IsPlatformSupported(RuntimePlatform testTargetPlatform) - { - if (include.Any() && !include.Any(x => x == testTargetPlatform)) - { - m_skippedReason = string.Format("Only supported on {0}", string.Join(", ", include.Select(x => x.ToString()).ToArray())); - return false; - } - - if (exclude.Any(x => x == testTargetPlatform)) - { - m_skippedReason = string.Format("Not supported on {0}", string.Join(", ", include.Select(x => x.ToString()).ToArray())); - return false; - } - return true; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityPlatformAttribute.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityPlatformAttribute.cs.meta deleted file mode 100644 index 003e1540..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityPlatformAttribute.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5440c1153b397e14c9c7b1d6eb83b9f9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnitySetUpAttribute.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnitySetUpAttribute.cs deleted file mode 100644 index f51da12e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnitySetUpAttribute.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using NUnit.Framework; - -namespace UnityEngine.TestTools -{ - [AttributeUsage(AttributeTargets.Method)] - public class UnitySetUpAttribute : NUnitAttribute - { - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnitySetUpAttribute.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnitySetUpAttribute.cs.meta deleted file mode 100644 index ccd0d7e0..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnitySetUpAttribute.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cc6401f13df54ba44bfd7cdc93c7d64d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTearDownAttribute.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTearDownAttribute.cs deleted file mode 100644 index dec605c1..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTearDownAttribute.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -using NUnit.Framework; - -namespace UnityEngine.TestTools -{ - [AttributeUsage(AttributeTargets.Method)] - public class UnityTearDownAttribute : NUnitAttribute - { - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTearDownAttribute.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTearDownAttribute.cs.meta deleted file mode 100644 index db199044..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTearDownAttribute.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 600f4b74746dbf944901257f81a8af6d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTestAttribute.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTestAttribute.cs deleted file mode 100644 index 69e2020e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTestAttribute.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using NUnit.Framework; -using NUnit.Framework.Internal.Commands; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Builders; -using UnityEngine.TestRunner.NUnitExtensions.Runner; - -namespace UnityEngine.TestTools -{ - [AttributeUsage(AttributeTargets.Method)] - public class UnityTestAttribute : CombiningStrategyAttribute, ISimpleTestBuilder, IImplyFixture - { - public UnityTestAttribute() : base(new UnityCombinatorialStrategy(), new ParameterDataSourceProvider()) {} - - private readonly NUnitTestCaseBuilder _builder = new NUnitTestCaseBuilder(); - - TestMethod ISimpleTestBuilder.BuildFrom(IMethodInfo method, Test suite) - { - TestCaseParameters parms = new TestCaseParameters - { - ExpectedResult = new object(), - HasExpectedResult = true - }; - - var t = _builder.BuildTestMethod(method, suite, parms); - - if (t.parms != null) - t.parms.HasExpectedResult = false; - return t; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTestAttribute.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTestAttribute.cs.meta deleted file mode 100644 index e2fcb633..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTestAttribute.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fedb0f9e5006b1943abae52f52f08a1a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs deleted file mode 100644 index 65bcbbaa..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System; -using System.Threading; -using NUnit.Framework.Internal; - -namespace UnityEngine.TestTools.NUnitExtensions -{ - internal abstract class BaseDelegator - { - protected ManualResetEvent m_Signal = new ManualResetEvent(false); - - protected object m_Result; - protected Exception m_Exception; - protected ITestExecutionContext m_Context; - - protected bool m_Aborted; - - protected object HandleResult() - { - SetCurrentTestContext(); - if (m_Exception != null) - { - var temp = m_Exception; - m_Exception = null; - throw temp; - } - var tempResult = m_Result; - m_Result = null; - return tempResult; - } - - protected void WaitForSignal() - { - while (!m_Signal.WaitOne(100)) - { - if (m_Aborted) - { - m_Aborted = false; - Reflect.MethodCallWrapper = null; - throw new Exception(); - } - } - } - - public void Abort() - { - m_Aborted = true; - } - - protected void SetCurrentTestContext() - { - var prop = typeof(TestExecutionContext).GetProperty("CurrentContext"); - if (prop != null) - { - prop.SetValue(null, m_Context, null); - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs.meta deleted file mode 100644 index 613537b8..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 37cea569bfefafe49a1513c4d7f0e9eb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands.meta deleted file mode 100644 index 75dd09d4..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 6b72875690e0f7343911e06af3145bd5 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandBase.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandBase.cs deleted file mode 100644 index af350f12..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandBase.cs +++ /dev/null @@ -1,196 +0,0 @@ -using System; -using System.Collections; -using System.Linq; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Commands; -using UnityEngine.TestRunner.NUnitExtensions; -using UnityEngine.TestRunner.NUnitExtensions.Runner; -using UnityEngine.TestTools.Logging; -using UnityEngine.TestTools.TestRunner; - -namespace UnityEngine.TestTools -{ - internal abstract class BeforeAfterTestCommandBase : DelegatingTestCommand, IEnumerableTestMethodCommand - { - private string m_BeforeErrorPrefix; - private string m_AfterErrorPrefix; - private bool m_SkipYieldAfterActions; - protected BeforeAfterTestCommandBase(TestCommand innerCommand, string beforeErrorPrefix, string afterErrorPrefix, bool skipYieldAfterActions = false) - : base(innerCommand) - { - m_BeforeErrorPrefix = beforeErrorPrefix; - m_AfterErrorPrefix = afterErrorPrefix; - m_SkipYieldAfterActions = skipYieldAfterActions; - } - - protected T[] BeforeActions = new T[0]; - - protected T[] AfterActions = new T[0]; - - protected abstract IEnumerator InvokeBefore(T action, Test test, UnityTestExecutionContext context); - - protected abstract IEnumerator InvokeAfter(T action, Test test, UnityTestExecutionContext context); - - protected abstract BeforeAfterTestCommandState GetState(UnityTestExecutionContext context); - - public IEnumerable ExecuteEnumerable(ITestExecutionContext context) - { - var unityContext = (UnityTestExecutionContext)context; - var state = GetState(unityContext); - - if (state == null) - { - // We do not expect a state to exist in playmode - state = ScriptableObject.CreateInstance(); - } - - state.ApplyTestResult(context.CurrentResult); - - while (state.NextBeforeStepIndex < BeforeActions.Length) - { - var action = BeforeActions[state.NextBeforeStepIndex]; - var enumerator = InvokeBefore(action, Test, unityContext); - ActivePcHelper.SetEnumeratorPC(enumerator, state.NextBeforeStepPc); - - using (var logScope = new LogScope()) - { - while (true) - { - try - { - if (!enumerator.MoveNext()) - { - break; - } - } - catch (Exception ex) - { - state.TestHasRun = true; - context.CurrentResult.RecordPrefixedException(m_BeforeErrorPrefix, ex); - state.StoreTestResult(context.CurrentResult); - break; - } - - state.NextBeforeStepPc = ActivePcHelper.GetEnumeratorPC(enumerator); - state.StoreTestResult(context.CurrentResult); - if (m_SkipYieldAfterActions) - { - break; - } - else - { - yield return enumerator.Current; - } - } - - if (logScope.AnyFailingLogs()) - { - state.TestHasRun = true; - context.CurrentResult.RecordPrefixedError(m_BeforeErrorPrefix, new UnhandledLogMessageException(logScope.FailingLogs.First()).Message); - state.StoreTestResult(context.CurrentResult); - } - } - - state.NextBeforeStepIndex++; - state.NextBeforeStepPc = 0; - } - - if (!state.TestHasRun) - { - if (innerCommand is IEnumerableTestMethodCommand) - { - var executeEnumerable = ((IEnumerableTestMethodCommand)innerCommand).ExecuteEnumerable(context); - foreach (var iterator in executeEnumerable) - { - state.StoreTestResult(context.CurrentResult); - yield return iterator; - } - } - else - { - context.CurrentResult = innerCommand.Execute(context); - state.StoreTestResult(context.CurrentResult); - } - - state.TestHasRun = true; - } - - while (state.NextAfterStepIndex < AfterActions.Length) - { - state.TestAfterStarted = true; - var action = AfterActions[state.NextAfterStepIndex]; - var enumerator = InvokeAfter(action, Test, unityContext); - ActivePcHelper.SetEnumeratorPC(enumerator, state.NextAfterStepPc); - - using (var logScope = new LogScope()) - { - while (true) - { - try - { - if (!enumerator.MoveNext()) - { - break; - } - } - catch (Exception ex) - { - context.CurrentResult.RecordPrefixedException(m_AfterErrorPrefix, ex); - state.StoreTestResult(context.CurrentResult); - break; - } - - state.NextAfterStepPc = ActivePcHelper.GetEnumeratorPC(enumerator); - state.StoreTestResult(context.CurrentResult); - - if (m_SkipYieldAfterActions) - { - break; - } - else - { - yield return enumerator.Current; - } - } - - if (logScope.AnyFailingLogs()) - { - state.TestHasRun = true; - context.CurrentResult.RecordPrefixedError(m_AfterErrorPrefix, new UnhandledLogMessageException(logScope.FailingLogs.First()).Message); - state.StoreTestResult(context.CurrentResult); - } - } - - state.NextAfterStepIndex++; - state.NextAfterStepPc = 0; - } - - state.Reset(); - } - - public override TestResult Execute(ITestExecutionContext context) - { - throw new NotImplementedException("Use ExecuteEnumerable"); - } - - private static TestCommandPcHelper pcHelper; - - internal static TestCommandPcHelper ActivePcHelper - { - get - { - if (pcHelper == null) - { - pcHelper = new TestCommandPcHelper(); - } - - return pcHelper; - } - set - { - pcHelper = value; - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandBase.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandBase.cs.meta deleted file mode 100644 index e3e48190..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandBase.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cbbca1d8a0434be4bbc7f165523763ac -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandState.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandState.cs deleted file mode 100644 index 273b61ca..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandState.cs +++ /dev/null @@ -1,49 +0,0 @@ -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; - -namespace UnityEngine.TestTools -{ - internal class BeforeAfterTestCommandState : ScriptableObject - { - public int NextBeforeStepIndex; - public int NextBeforeStepPc; - public int NextAfterStepIndex; - public int NextAfterStepPc; - public bool TestHasRun; - public TestStatus CurrentTestResultStatus; - public string CurrentTestResultLabel; - public FailureSite CurrentTestResultSite; - public string CurrentTestMessage; - public string CurrentTestStrackTrace; - public bool TestAfterStarted; - - public void Reset() - { - NextBeforeStepIndex = 0; - NextBeforeStepPc = 0; - NextAfterStepIndex = 0; - NextAfterStepPc = 0; - TestHasRun = false; - CurrentTestResultStatus = TestStatus.Inconclusive; - CurrentTestResultLabel = null; - CurrentTestResultSite = default(FailureSite); - CurrentTestMessage = null; - CurrentTestStrackTrace = null; - TestAfterStarted = false; - } - - public void StoreTestResult(TestResult result) - { - CurrentTestResultStatus = result.ResultState.Status; - CurrentTestResultLabel = result.ResultState.Label; - CurrentTestResultSite = result.ResultState.Site; - CurrentTestMessage = result.Message; - CurrentTestStrackTrace = result.StackTrace; - } - - public void ApplyTestResult(TestResult result) - { - result.SetResult(new ResultState(CurrentTestResultStatus, CurrentTestResultLabel, CurrentTestResultSite), CurrentTestMessage, CurrentTestStrackTrace); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandState.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandState.cs.meta deleted file mode 100644 index da9bd2bc..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandState.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7f65567c9026afb4db5de3355accc636 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableApplyChangesToContextCommand.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableApplyChangesToContextCommand.cs deleted file mode 100644 index d452f248..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableApplyChangesToContextCommand.cs +++ /dev/null @@ -1,34 +0,0 @@ - -using System.Collections; -using System.Collections.Generic; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Commands; -using UnityEngine.TestRunner.NUnitExtensions.Runner; - -namespace UnityEngine.TestTools -{ - internal class EnumerableApplyChangesToContextCommand : ApplyChangesToContextCommand, IEnumerableTestMethodCommand - { - public EnumerableApplyChangesToContextCommand(TestCommand innerCommand, IEnumerable changes) - : base(innerCommand, changes) { } - - public IEnumerable ExecuteEnumerable(ITestExecutionContext context) - { - ApplyChanges(context); - - if (innerCommand is IEnumerableTestMethodCommand) - { - var executeEnumerable = ((IEnumerableTestMethodCommand)innerCommand).ExecuteEnumerable(context); - foreach (var iterator in executeEnumerable) - { - yield return iterator; - } - } - else - { - context.CurrentResult = innerCommand.Execute(context); - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableApplyChangesToContextCommand.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableApplyChangesToContextCommand.cs.meta deleted file mode 100644 index 6a955cae..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableApplyChangesToContextCommand.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3b4429eff9fcffb48b006e8edcc90338 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRepeatedTestCommand.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRepeatedTestCommand.cs deleted file mode 100644 index 1bdac69e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRepeatedTestCommand.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Collections; -using System.Reflection; -using NUnit.Framework; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Commands; -using UnityEngine.TestRunner.NUnitExtensions.Runner; - -namespace UnityEngine.TestTools -{ - internal class EnumerableRepeatedTestCommand : DelegatingTestCommand, IEnumerableTestMethodCommand - { - private int repeatCount; - - public EnumerableRepeatedTestCommand(RepeatAttribute.RepeatedTestCommand commandToReplace) : base(commandToReplace.GetInnerCommand()) - { - repeatCount = (int) typeof(RepeatAttribute.RepeatedTestCommand) - .GetField("repeatCount", BindingFlags.NonPublic | BindingFlags.Instance) - .GetValue(commandToReplace); - } - - public override TestResult Execute(ITestExecutionContext context) - { - throw new NotImplementedException("Use ExecuteEnumerable"); - } - - public IEnumerable ExecuteEnumerable(ITestExecutionContext context) - { - var unityContext = (UnityTestExecutionContext)context; - int count = unityContext.EnumerableRepeatedTestState; - - while (count < repeatCount) - { - count++; - unityContext.EnumerableRepeatedTestState = count; - - if (innerCommand is IEnumerableTestMethodCommand) - { - var executeEnumerable = ((IEnumerableTestMethodCommand)innerCommand).ExecuteEnumerable(context); - foreach (var iterator in executeEnumerable) - { - yield return iterator; - } - } - else - { - context.CurrentResult = innerCommand.Execute(context); - } - - if (context.CurrentResult.ResultState != ResultState.Success) - { - break; - } - } - - unityContext.EnumerableRepeatedTestState = 0; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRepeatedTestCommand.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRepeatedTestCommand.cs.meta deleted file mode 100644 index a738fba6..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRepeatedTestCommand.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e273462feb9a65948826739f683cc9a9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRetryTestCommand.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRetryTestCommand.cs deleted file mode 100644 index ee82c29a..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRetryTestCommand.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Collections; -using System.Reflection; -using NUnit.Framework; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Commands; -using UnityEngine.TestRunner.NUnitExtensions.Runner; - -namespace UnityEngine.TestTools -{ - internal class EnumerableRetryTestCommand : DelegatingTestCommand, IEnumerableTestMethodCommand - { - private int retryCount; - - public EnumerableRetryTestCommand(RetryAttribute.RetryCommand commandToReplace) : base(commandToReplace.GetInnerCommand()) - { - retryCount = (int) typeof(RetryAttribute.RetryCommand) - .GetField("_retryCount", BindingFlags.NonPublic | BindingFlags.Instance) - .GetValue(commandToReplace); - } - - public override TestResult Execute(ITestExecutionContext context) - { - throw new NotImplementedException("Use ExecuteEnumerable"); - } - - public IEnumerable ExecuteEnumerable(ITestExecutionContext context) - { - var unityContext = (UnityTestExecutionContext)context; - int count = unityContext.EnumerableRetryTestState; - - while (count < retryCount) - { - count++; - unityContext.EnumerableRetryTestState = count; - - if (innerCommand is IEnumerableTestMethodCommand) - { - var executeEnumerable = ((IEnumerableTestMethodCommand)innerCommand).ExecuteEnumerable(context); - foreach (var iterator in executeEnumerable) - { - yield return iterator; - } - } - else - { - context.CurrentResult = innerCommand.Execute(context); - } - - if (context.CurrentResult.ResultState != ResultState.Failure) - { - break; - } - } - - unityContext.EnumerableRetryTestState = 0; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRetryTestCommand.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRetryTestCommand.cs.meta deleted file mode 100644 index 56f4e142..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRetryTestCommand.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6de2f178a24cd2e48a0816cacd9a0583 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableSetUpTearDownCommand.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableSetUpTearDownCommand.cs deleted file mode 100644 index e5bf7b81..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableSetUpTearDownCommand.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections; -using System.Linq; -using System.Reflection; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Commands; -using UnityEngine.TestRunner.NUnitExtensions.Runner; - -namespace UnityEngine.TestTools -{ - internal class EnumerableSetUpTearDownCommand : BeforeAfterTestCommandBase - { - public EnumerableSetUpTearDownCommand(TestCommand innerCommand) - : base(innerCommand, "SetUp", "TearDown") - { - if (Test.TypeInfo.Type != null) - { - BeforeActions = GetMethodsWithAttributeFromFixture(Test.TypeInfo.Type, typeof(UnitySetUpAttribute)); - AfterActions = GetMethodsWithAttributeFromFixture(Test.TypeInfo.Type, typeof(UnityTearDownAttribute)).Reverse().ToArray(); - } - } - - private static MethodInfo[] GetMethodsWithAttributeFromFixture(Type fixtureType, Type setUpType) - { - MethodInfo[] methodsWithAttribute = Reflect.GetMethodsWithAttribute(fixtureType, setUpType, true); - return methodsWithAttribute.Where(x => x.ReturnType == typeof(IEnumerator)).ToArray(); - } - - protected override IEnumerator InvokeBefore(MethodInfo action, Test test, UnityTestExecutionContext context) - { - return (IEnumerator)Reflect.InvokeMethod(action, context.TestObject); - } - - protected override IEnumerator InvokeAfter(MethodInfo action, Test test, UnityTestExecutionContext context) - { - return (IEnumerator)Reflect.InvokeMethod(action, context.TestObject); - } - - protected override BeforeAfterTestCommandState GetState(UnityTestExecutionContext context) - { - return context.SetUpTearDownState; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableSetUpTearDownCommand.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableSetUpTearDownCommand.cs.meta deleted file mode 100644 index e61d0499..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableSetUpTearDownCommand.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: dd85a35169d313840a0874aea1a28629 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableTestMethodCommand.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableTestMethodCommand.cs deleted file mode 100644 index 7a548ecf..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableTestMethodCommand.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using NUnit.Framework; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Commands; -using NUnit.Framework.Internal.Execution; -using UnityEngine.TestRunner.NUnitExtensions.Runner; -using UnityEngine.TestTools.TestRunner; - -namespace UnityEngine.TestTools -{ - internal class EnumerableTestMethodCommand : TestCommand, IEnumerableTestMethodCommand - { - private readonly TestMethod testMethod; - - public EnumerableTestMethodCommand(TestMethod testMethod) - : base(testMethod) - { - this.testMethod = testMethod; - } - - public IEnumerable ExecuteEnumerable(ITestExecutionContext context) - { - yield return null; - - var currentExecutingTestEnumerator = new TestEnumeratorWrapper(testMethod).GetEnumerator(context); - if (currentExecutingTestEnumerator != null) - { - var testEnumeraterYieldInstruction = new TestEnumerator(context, currentExecutingTestEnumerator); - - yield return testEnumeraterYieldInstruction; - - var enumerator = testEnumeraterYieldInstruction.Execute(); - - var executingEnumerator = ExecuteEnumerableAndRecordExceptions(enumerator, context); - while (executingEnumerator.MoveNext()) - { - yield return executingEnumerator.Current; - } - } - else - { - if (context.CurrentResult.ResultState != ResultState.Ignored) - { - context.CurrentResult.SetResult(ResultState.Success); - } - } - } - - private static IEnumerator ExecuteEnumerableAndRecordExceptions(IEnumerator enumerator, ITestExecutionContext context) - { - while (true) - { - try - { - if (!enumerator.MoveNext()) - { - break; - } - } - catch (Exception ex) - { - context.CurrentResult.RecordException(ex); - break; - } - - if (enumerator.Current is IEnumerator) - { - var current = (IEnumerator)enumerator.Current; - yield return ExecuteEnumerableAndRecordExceptions(current, context); - } - else - { - yield return enumerator.Current; - } - } - } - - public override TestResult Execute(ITestExecutionContext context) - { - throw new NotImplementedException("Use ExecuteEnumerable"); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableTestMethodCommand.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableTestMethodCommand.cs.meta deleted file mode 100644 index 4631e40b..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableTestMethodCommand.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 19a6f000f81e24c4a826c1abd43e77c7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/ImmediateEnumerableCommand.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/ImmediateEnumerableCommand.cs deleted file mode 100644 index ae1b7b7e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/ImmediateEnumerableCommand.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Commands; -using UnityEngine.TestRunner.NUnitExtensions.Runner; - -namespace UnityEngine.TestTools -{ - internal class ImmediateEnumerableCommand : DelegatingTestCommand - { - public ImmediateEnumerableCommand(TestCommand innerCommand) - : base(innerCommand) { } - - public override TestResult Execute(ITestExecutionContext context) - { - if (innerCommand is IEnumerableTestMethodCommand) - { - var executeEnumerable = ((IEnumerableTestMethodCommand)innerCommand).ExecuteEnumerable(context); - foreach (var iterator in executeEnumerable) - { - if (iterator != null) - { - throw new Exception("Only null can be yielded at this point."); - } - } - return context.CurrentResult; - } - - return innerCommand.Execute(context); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/ImmediateEnumerableCommand.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/ImmediateEnumerableCommand.cs.meta deleted file mode 100644 index e650b549..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/ImmediateEnumerableCommand.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8349e42a2b30c7a4abd8678c203428ba -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/OuterUnityTestActionCommand.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/OuterUnityTestActionCommand.cs deleted file mode 100644 index a0646f13..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/OuterUnityTestActionCommand.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Commands; -using UnityEngine.TestRunner.NUnitExtensions.Runner; - -namespace UnityEngine.TestTools -{ - internal class OuterUnityTestActionCommand : BeforeAfterTestCommandBase - { - public OuterUnityTestActionCommand(TestCommand innerCommand) - : base(innerCommand, "BeforeTest", "AfterTest") - { - if (Test.TypeInfo.Type != null) - { - BeforeActions = GetUnityTestActionsFromMethod(Test.Method.MethodInfo); - AfterActions = BeforeActions; - } - } - - private static IOuterUnityTestAction[] GetUnityTestActionsFromMethod(MethodInfo method) - { - var attributes = method.GetCustomAttributes(false); - List actions = new List(); - foreach (var attribute in attributes) - { - if (attribute is IOuterUnityTestAction) - actions.Add(attribute as IOuterUnityTestAction); - } - return actions.ToArray(); - } - - protected override IEnumerator InvokeBefore(IOuterUnityTestAction action, Test test, UnityTestExecutionContext context) - { - return action.BeforeTest(test); - } - - protected override IEnumerator InvokeAfter(IOuterUnityTestAction action, Test test, UnityTestExecutionContext context) - { - return action.AfterTest(test); - } - - protected override BeforeAfterTestCommandState GetState(UnityTestExecutionContext context) - { - return context.OuterUnityTestActionState; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/OuterUnityTestActionCommand.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/OuterUnityTestActionCommand.cs.meta deleted file mode 100644 index 64158729..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/OuterUnityTestActionCommand.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0d4fc309a0784294c8ab658b53b12320 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/SetUpTearDownCommand.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/SetUpTearDownCommand.cs deleted file mode 100644 index c6ff0d9c..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/SetUpTearDownCommand.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections; -using System.Linq; -using System.Reflection; -using NUnit.Framework; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Commands; -using NUnit.Framework.Internal.Execution; -using UnityEngine.TestRunner.NUnitExtensions.Runner; - -namespace UnityEngine.TestTools -{ - internal class SetUpTearDownCommand : BeforeAfterTestCommandBase - { - public SetUpTearDownCommand(TestCommand innerCommand) - : base(innerCommand, "SetUp", "TearDown", true) - { - if (Test.TypeInfo.Type != null) - { - BeforeActions = GetMethodsWithAttributeFromFixture(Test.TypeInfo.Type, typeof(SetUpAttribute)); - AfterActions = GetMethodsWithAttributeFromFixture(Test.TypeInfo.Type, typeof(TearDownAttribute)).Reverse().ToArray(); - } - } - - private static MethodInfo[] GetMethodsWithAttributeFromFixture(Type fixtureType, Type setUpType) - { - MethodInfo[] methodsWithAttribute = Reflect.GetMethodsWithAttribute(fixtureType, setUpType, true); - return methodsWithAttribute.Where(x => x.ReturnType == typeof(void)).ToArray(); - } - - protected override IEnumerator InvokeBefore(MethodInfo action, Test test, UnityTestExecutionContext context) - { - Reflect.InvokeMethod(action, context.TestObject); - yield return null; - } - - protected override IEnumerator InvokeAfter(MethodInfo action, Test test, UnityTestExecutionContext context) - { - Reflect.InvokeMethod(action, context.TestObject); - yield return null; - } - - protected override BeforeAfterTestCommandState GetState(UnityTestExecutionContext context) - { - return null; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/SetUpTearDownCommand.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/SetUpTearDownCommand.cs.meta deleted file mode 100644 index 28b84ace..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/SetUpTearDownCommand.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e0db3f3921670cd4ca2e925737c3fba4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/TestActionCommand.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/TestActionCommand.cs deleted file mode 100644 index 9b99dd0d..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/TestActionCommand.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Reflection; -using NUnit.Framework; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Commands; -using UnityEngine.TestRunner.NUnitExtensions.Runner; - -namespace UnityEngine.TestTools -{ - internal class TestActionCommand : BeforeAfterTestCommandBase - { - public TestActionCommand(TestCommand innerCommand) - : base(innerCommand, "BeforeTest", "AfterTest", true) - { - if (Test.TypeInfo.Type != null) - { - BeforeActions = GetTestActionsFromMethod(Test.Method.MethodInfo); - AfterActions = BeforeActions; - } - } - - private static ITestAction[] GetTestActionsFromMethod(MethodInfo method) - { - var attributes = method.GetCustomAttributes(false); - List actions = new List(); - foreach (var attribute in attributes) - { - if (attribute is ITestAction) - actions.Add(attribute as ITestAction); - } - return actions.ToArray(); - } - - protected override IEnumerator InvokeBefore(ITestAction action, Test test, UnityTestExecutionContext context) - { - action.BeforeTest(test); - yield return null; - } - - protected override IEnumerator InvokeAfter(ITestAction action, Test test, UnityTestExecutionContext context) - { - action.AfterTest(test); - yield return null; - } - - protected override BeforeAfterTestCommandState GetState(UnityTestExecutionContext context) - { - return null; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/TestActionCommand.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/TestActionCommand.cs.meta deleted file mode 100644 index 3f44e9d7..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/TestActionCommand.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2de8ba3b840049641897e0da7ce1d5cd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/TestCommandPcHelper.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/TestCommandPcHelper.cs deleted file mode 100644 index 26eb4b03..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/TestCommandPcHelper.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections; - -namespace UnityEngine.TestTools -{ - internal class TestCommandPcHelper - { - public virtual void SetEnumeratorPC(IEnumerator enumerator, int pc) - { - // Noop implementation used in playmode. - } - - public virtual int GetEnumeratorPC(IEnumerator enumerator) - { - return 0; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/TestCommandPcHelper.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/TestCommandPcHelper.cs.meta deleted file mode 100644 index 1dbd4f43..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Commands/TestCommandPcHelper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 33e6b78c96bb0694e96383e3c56b7b54 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/ConstructDelegator.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/ConstructDelegator.cs deleted file mode 100644 index dd7fbc29..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/ConstructDelegator.cs +++ /dev/null @@ -1,141 +0,0 @@ -using System; -using System.Linq; -using NUnit.Framework.Internal; -using UnityEngine.TestRunner.NUnitExtensions.Runner; -using UnityEngine.TestTools.Logging; -using UnityEngine.TestTools.TestRunner; - -namespace UnityEngine.TestTools.NUnitExtensions -{ - /// - /// Specialization of BaseDelegator that makes sure objects are created on the MainThread. - /// It also deals with ScriptableObjects so that tests can survive assembly reload. - /// - internal class ConstructDelegator - { - private Type m_RequestedType; - private object[] m_Arguments; - - private ScriptableObject m_CurrentRunningTest; - private readonly IStateSerializer m_StateSerializer; - - protected Exception m_Exception; - protected object m_Result; - protected ITestExecutionContext m_Context; - - public ConstructDelegator(IStateSerializer stateSerializer) - { - m_StateSerializer = stateSerializer; - } - - protected object HandleResult() - { - SetCurrentTestContext(); - if (m_Exception != null) - { - var temp = m_Exception; - m_Exception = null; - throw temp; - } - var tempResult = m_Result; - m_Result = null; - return tempResult; - } - - protected void SetCurrentTestContext() - { - var prop = typeof(UnityTestExecutionContext).GetProperty("CurrentContext"); - if (prop != null) - { - prop.SetValue(null, m_Context, null); - } - } - - public object Delegate(Type type, object[] arguments) - { - AssertState(); - m_Context = UnityTestExecutionContext.CurrentContext; - - m_RequestedType = type; - m_Arguments = arguments; - - using (var logScope = new LogScope()) - { - Execute(logScope); - } - - return HandleResult(); - } - - private void AssertState() - { - if (m_RequestedType != null) - { - throw new Exception("Constructor not executed yet"); - } - } - - public bool HasAction() - { - return m_RequestedType != null; - } - - public void Execute(LogScope logScope) - { - try - { - if (typeof(ScriptableObject).IsAssignableFrom(m_RequestedType)) - { - if (m_CurrentRunningTest != null && m_RequestedType != m_CurrentRunningTest.GetType()) - { - DestroyCurrentTestObjectIfExists(); - } - if (m_CurrentRunningTest == null) - { - if (m_StateSerializer.CanRestoreFromScriptableObject(m_RequestedType)) - { - m_CurrentRunningTest = m_StateSerializer.RestoreScriptableObjectInstance(); - } - else - { - m_CurrentRunningTest = ScriptableObject.CreateInstance(m_RequestedType); - } - } - m_Result = m_CurrentRunningTest; - } - else - { - DestroyCurrentTestObjectIfExists(); - m_Result = Activator.CreateInstance(m_RequestedType, m_Arguments); - if (m_StateSerializer.CanRestoreFromJson(m_RequestedType)) - { - m_StateSerializer.RestoreClassFromJson(ref m_Result); - } - } - if (logScope.AnyFailingLogs()) - { - var failingLog = logScope.FailingLogs.First(); - throw new UnhandledLogMessageException(failingLog); - } - if (logScope.ExpectedLogs.Any()) - throw new UnexpectedLogMessageException(LogScope.Current.ExpectedLogs.Peek()); - } - catch (Exception e) - { - m_Exception = e; - } - finally - { - m_RequestedType = null; - m_Arguments = null; - } - } - - public void DestroyCurrentTestObjectIfExists() - { - if (m_CurrentRunningTest == null) - return; - Object.DestroyImmediate(m_CurrentRunningTest); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/ConstructDelegator.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/ConstructDelegator.cs.meta deleted file mode 100644 index cb04fc8a..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/ConstructDelegator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b42e1db66fe9c634798674cb9e1df2ca -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Filters.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Filters.meta deleted file mode 100644 index a0aa9946..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Filters.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: c3de99f9efc582a48995bc8e8c2df418 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Filters/AssemblyNameFilter.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Filters/AssemblyNameFilter.cs deleted file mode 100644 index d53a2d0f..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Filters/AssemblyNameFilter.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal.Filters; - -namespace UnityEngine.TestRunner.NUnitExtensions.Filters -{ - internal class AssemblyNameFilter : ValueMatchFilter - { - public AssemblyNameFilter(string assemblyName) : base(assemblyName) {} - - public override bool Match(ITest test) - { - string assemblyName = string.Empty; - //Assembly fullname is in the format "Assembly-name, meta data ...", so extract the name by looking for the comma - if (test.TypeInfo != null && test.TypeInfo.Assembly != null && test.TypeInfo.FullName != null) - assemblyName = test.TypeInfo.Assembly.FullName.Substring(0, test.TypeInfo.Assembly.FullName.IndexOf(',')).TrimEnd(','); - return ExpectedValue.Equals(assemblyName, StringComparison.OrdinalIgnoreCase); - } - - protected override string ElementName - { - get { return "id"; } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Filters/AssemblyNameFilter.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Filters/AssemblyNameFilter.cs.meta deleted file mode 100644 index 2b897451..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Filters/AssemblyNameFilter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 91319408591cec1478efd3c62f9f418a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Filters/CategoryFilterExtended.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Filters/CategoryFilterExtended.cs deleted file mode 100644 index 58430e8c..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Filters/CategoryFilterExtended.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Collections; -using System.Linq; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Filters; - -namespace UnityEngine.TestRunner.NUnitExtensions.Filters -{ - internal class CategoryFilterExtended : CategoryFilter - { - public static string k_DefaultCategory = "Uncategorized"; - - public CategoryFilterExtended(string name) : base(name) - { - } - - public override bool Match(ITest test) - { - IList testCategories = test.Properties[PropertyNames.Category].Cast().ToList(); - - if (test is TestMethod) - { - // Do not count tests with no attribute as Uncategorized if test fixture class has at least one attribute - // The test inherits the attribute from the test fixture - IList fixtureCategories = test.Parent.Properties[PropertyNames.Category].Cast().ToList(); - if (fixtureCategories.Count > 0) - return false; - } - - if (testCategories.Count == 0 && ExpectedValue == k_DefaultCategory && test is TestMethod) - return true; - - return base.Match(test); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Filters/CategoryFilterExtended.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Filters/CategoryFilterExtended.cs.meta deleted file mode 100644 index a115cd20..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Filters/CategoryFilterExtended.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ebeedaa04bb53e24ba2e7fb6745e3fd3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/IAsyncTestAssemblyBuilder.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/IAsyncTestAssemblyBuilder.cs deleted file mode 100644 index 6bc15932..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/IAsyncTestAssemblyBuilder.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Collections.Generic; -using System.Reflection; -using NUnit.Framework.Api; -using NUnit.Framework.Interfaces; - -namespace UnityEngine.TestTools.NUnitExtensions -{ - internal interface IAsyncTestAssemblyBuilder : ITestAssemblyBuilder - { - IEnumerator BuildAsync(Assembly[] assemblies, TestPlatform[] testPlatforms, IDictionary options); - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/IAsyncTestAssemblyBuilder.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/IAsyncTestAssemblyBuilder.cs.meta deleted file mode 100644 index 64283a34..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/IAsyncTestAssemblyBuilder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c3aa5c3d59b94854e843f10b75b3ad63 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/IStateSerializer.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/IStateSerializer.cs deleted file mode 100644 index 951d079e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/IStateSerializer.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace UnityEngine.TestTools.NUnitExtensions -{ - internal interface IStateSerializer - { - ScriptableObject RestoreScriptableObjectInstance(); - void RestoreClassFromJson(ref object instance); - bool CanRestoreFromJson(Type requestedType); - bool CanRestoreFromScriptableObject(Type requestedType); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/IStateSerializer.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/IStateSerializer.cs.meta deleted file mode 100644 index 1d327152..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/IStateSerializer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5f875a14565308a40a5262d2504da705 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner.meta deleted file mode 100644 index 1604cb56..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 37888acc09d9ee848bf9559f06645c45 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/CompositeWorkItem.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/CompositeWorkItem.cs deleted file mode 100644 index 260e3cf8..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/CompositeWorkItem.cs +++ /dev/null @@ -1,342 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using NUnit.Framework; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Commands; -using NUnit.Framework.Internal.Execution; -using UnityEngine.TestTools.Logging; -using UnityEngine.TestTools.TestRunner; - -namespace UnityEngine.TestRunner.NUnitExtensions.Runner -{ - internal class CompositeWorkItem : UnityWorkItem - { - private readonly TestSuite _suite; - private readonly TestSuiteResult _suiteResult; - private readonly ITestFilter _childFilter; - private TestCommand _setupCommand; - private TestCommand _teardownCommand; - - public List Children { get; private set; } - - private int _countOrder; - - private CountdownEvent _childTestCountdown; - - public CompositeWorkItem(TestSuite suite, ITestFilter childFilter, WorkItemFactory factory) - : base(suite, factory) - { - _suite = suite; - _suiteResult = Result as TestSuiteResult; - _childFilter = childFilter; - _countOrder = 0; - } - - protected override IEnumerable PerformWork() - { - InitializeSetUpAndTearDownCommands(); - - if (UnityTestExecutionContext.CurrentContext != null && m_DontRunRestoringResult && EditModeTestCallbacks.RestoringTestContext != null) - { - EditModeTestCallbacks.RestoringTestContext(); - } - - if (!CheckForCancellation()) - if (Test.RunState == RunState.Explicit && !_childFilter.IsExplicitMatch(Test)) - SkipFixture(ResultState.Explicit, GetSkipReason(), null); - else - switch (Test.RunState) - { - default: - case RunState.Runnable: - case RunState.Explicit: - Result.SetResult(ResultState.Success); - - CreateChildWorkItems(); - - if (Children.Count > 0) - { - if (!m_DontRunRestoringResult) - { - //This is needed to give the editor a chance to go out of playmode if needed before creating objects. - //If we do not, the objects could be automatically destroyed when exiting playmode and could result in errors later on - yield return null; - PerformOneTimeSetUp(); - } - - if (!CheckForCancellation()) - { - switch (Result.ResultState.Status) - { - case TestStatus.Passed: - foreach (var child in RunChildren()) - { - if (CheckForCancellation()) - { - yield break; - } - - yield return child; - } - break; - case TestStatus.Skipped: - case TestStatus.Inconclusive: - case TestStatus.Failed: - SkipChildren(_suite, Result.ResultState.WithSite(FailureSite.Parent), "OneTimeSetUp: " + Result.Message); - break; - } - } - - if (Context.ExecutionStatus != TestExecutionStatus.AbortRequested && !m_DontRunRestoringResult) - { - PerformOneTimeTearDown(); - } - } - break; - - case RunState.Skipped: - SkipFixture(ResultState.Skipped, GetSkipReason(), null); - break; - - case RunState.Ignored: - SkipFixture(ResultState.Ignored, GetSkipReason(), null); - break; - - case RunState.NotRunnable: - SkipFixture(ResultState.NotRunnable, GetSkipReason(), GetProviderStackTrace()); - break; - } - if (!ResultedInDomainReload) - { - WorkItemComplete(); - } - } - - private bool CheckForCancellation() - { - if (Context.ExecutionStatus != TestExecutionStatus.Running) - { - Result.SetResult(ResultState.Cancelled, "Test cancelled by user"); - return true; - } - - return false; - } - - private void InitializeSetUpAndTearDownCommands() - { - List setUpTearDownItems = _suite.TypeInfo != null - ? CommandBuilder.BuildSetUpTearDownList(_suite.TypeInfo.Type, typeof(OneTimeSetUpAttribute), typeof(OneTimeTearDownAttribute)) - : new List(); - - var actionItems = new List(); - foreach (ITestAction action in Actions) - { - bool applyToSuite = (action.Targets & ActionTargets.Suite) == ActionTargets.Suite - || action.Targets == ActionTargets.Default && !(Test is ParameterizedMethodSuite); - - bool applyToTest = (action.Targets & ActionTargets.Test) == ActionTargets.Test - && !(Test is ParameterizedMethodSuite); - - if (applyToSuite) - actionItems.Add(new TestActionItem(action)); - - if (applyToTest) - Context.UpstreamActions.Add(action); - } - - _setupCommand = CommandBuilder.MakeOneTimeSetUpCommand(_suite, setUpTearDownItems, actionItems); - _teardownCommand = CommandBuilder.MakeOneTimeTearDownCommand(_suite, setUpTearDownItems, actionItems); - } - - private void PerformOneTimeSetUp() - { - var logScope = new LogScope(); - try - { - _setupCommand.Execute(Context); - } - catch (Exception ex) - { - if (ex is NUnitException || ex is TargetInvocationException) - ex = ex.InnerException; - - Result.RecordException(ex, FailureSite.SetUp); - } - - if (logScope.AnyFailingLogs()) - { - Result.RecordException(new UnhandledLogMessageException(logScope.FailingLogs.First())); - } - logScope.Dispose(); - } - - private IEnumerable RunChildren() - { - int childCount = Children.Count; - if (childCount == 0) - throw new InvalidOperationException("RunChildren called but item has no children"); - - _childTestCountdown = new CountdownEvent(childCount); - - foreach (UnityWorkItem child in Children) - { - if (CheckForCancellation()) - { - yield break; - } - - var unityTestExecutionContext = new UnityTestExecutionContext(Context); - child.InitializeContext(unityTestExecutionContext); - - var enumerable = child.Execute().GetEnumerator(); - - while (true) - { - if (!enumerable.MoveNext()) - { - break; - } - ResultedInDomainReload |= child.ResultedInDomainReload; - yield return enumerable.Current; - } - - _suiteResult.AddResult(child.Result); - childCount--; - } - - if (childCount > 0) - { - while (childCount-- > 0) - CountDownChildTest(); - } - } - - private void CreateChildWorkItems() - { - Children = new List(); - var testSuite = _suite; - - foreach (ITest test in testSuite.Tests) - { - if (_childFilter.Pass(test)) - { - var child = m_Factory.Create(test, _childFilter); - - if (test.Properties.ContainsKey(PropertyNames.Order)) - { - Children.Insert(0, child); - _countOrder++; - } - else - { - Children.Add(child); - } - } - } - - if (_countOrder != 0) SortChildren(); - } - - private class UnityWorkItemOrderComparer : IComparer - { - public int Compare(UnityWorkItem x, UnityWorkItem y) - { - var xKey = int.MaxValue; - var yKey = int.MaxValue; - - if (x.Test.Properties.ContainsKey(PropertyNames.Order)) - xKey = (int)x.Test.Properties[PropertyNames.Order][0]; - - if (y.Test.Properties.ContainsKey(PropertyNames.Order)) - yKey = (int)y.Test.Properties[PropertyNames.Order][0]; - - return xKey.CompareTo(yKey); - } - } - - private void SortChildren() - { - Children.Sort(0, _countOrder, new UnityWorkItemOrderComparer()); - } - - private void SkipFixture(ResultState resultState, string message, string stackTrace) - { - Result.SetResult(resultState.WithSite(FailureSite.SetUp), message, StackFilter.Filter(stackTrace)); - SkipChildren(_suite, resultState.WithSite(FailureSite.Parent), "OneTimeSetUp: " + message); - } - - private void SkipChildren(TestSuite suite, ResultState resultState, string message) - { - foreach (Test child in suite.Tests) - { - if (_childFilter.Pass(child)) - { - Context.Listener.TestStarted(child); - TestResult childResult = child.MakeTestResult(); - childResult.SetResult(resultState, message); - _suiteResult.AddResult(childResult); - - if (child.IsSuite) - SkipChildren((TestSuite)child, resultState, message); - - Context.Listener.TestFinished(childResult); - } - } - } - - private void PerformOneTimeTearDown() - { - _teardownCommand.Execute(Context); - } - - private string GetSkipReason() - { - return (string)Test.Properties.Get(PropertyNames.SkipReason); - } - - private string GetProviderStackTrace() - { - return (string)Test.Properties.Get(PropertyNames.ProviderStackTrace); - } - - private void CountDownChildTest() - { - _childTestCountdown.Signal(); - if (_childTestCountdown.CurrentCount == 0) - { - if (Context.ExecutionStatus != TestExecutionStatus.AbortRequested) - PerformOneTimeTearDown(); - - foreach (var childResult in _suiteResult.Children) - if (childResult.ResultState == ResultState.Cancelled) - { - this.Result.SetResult(ResultState.Cancelled, "Cancelled by user"); - break; - } - - WorkItemComplete(); - } - } - - public override void Cancel(bool force) - { - if (Children == null) - return; - - foreach (var child in Children) - { - var ctx = child.Context; - if (ctx != null) - ctx.ExecutionStatus = force ? TestExecutionStatus.AbortRequested : TestExecutionStatus.StopRequested; - - if (child.State == WorkItemState.Running) - child.Cancel(force); - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/CompositeWorkItem.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/CompositeWorkItem.cs.meta deleted file mode 100644 index 355dd71d..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/CompositeWorkItem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 110d5035a36a6a34580fb65bb40cd78f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/CoroutineTestWorkItem.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/CoroutineTestWorkItem.cs deleted file mode 100644 index 666a8dd6..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/CoroutineTestWorkItem.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System; -using System.Collections; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Commands; -using NUnit.Framework.Internal.Execution; -using UnityEngine.TestTools.Utils; - -namespace UnityEngine.TestRunner.NUnitExtensions.Runner -{ - internal class CoroutineTestWorkItem : UnityWorkItem - { - private static MonoBehaviour m_MonoBehaviourCoroutineRunner; - private TestCommand m_Command; - - public static MonoBehaviour monoBehaviourCoroutineRunner - { - get - { - if (m_MonoBehaviourCoroutineRunner == null) - { - throw new NullReferenceException("MonoBehaviour coroutine runner not set"); - } - return m_MonoBehaviourCoroutineRunner; - } - set { m_MonoBehaviourCoroutineRunner = value; } - } - - public CoroutineTestWorkItem(TestMethod test, ITestFilter filter) - : base(test, null) - { - m_Command = m_Command = TestCommandBuilder.BuildTestCommand(test, filter); - } - - protected override IEnumerable PerformWork() - { - if (m_Command is SkipCommand) - { - m_Command.Execute(Context); - Result = Context.CurrentResult; - WorkItemComplete(); - yield break; - } - - if (m_Command is ApplyChangesToContextCommand) - { - var applyChangesToContextCommand = (ApplyChangesToContextCommand)m_Command; - applyChangesToContextCommand.ApplyChanges(Context); - m_Command = applyChangesToContextCommand.GetInnerCommand(); - } - - var enumerableTestMethodCommand = (IEnumerableTestMethodCommand)m_Command; - try - { - var executeEnumerable = enumerableTestMethodCommand.ExecuteEnumerable(Context).GetEnumerator(); - - var coroutineRunner = new CoroutineRunner(monoBehaviourCoroutineRunner, Context); - yield return coroutineRunner.HandleEnumerableTest(executeEnumerable); - - if (coroutineRunner.HasFailedWithTimeout()) - { - Context.CurrentResult.SetResult(ResultState.Failure, string.Format("Test exceeded Timeout value of {0}ms", Context.TestCaseTimeout)); - } - - while (executeEnumerable.MoveNext()) {} - - Result = Context.CurrentResult; - } - finally - { - WorkItemComplete(); - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/CoroutineTestWorkItem.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/CoroutineTestWorkItem.cs.meta deleted file mode 100644 index f5eb9983..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/CoroutineTestWorkItem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b557515fff172984e8c4400b43f1c631 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/DefaultTestWorkItem.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/DefaultTestWorkItem.cs deleted file mode 100644 index b1dad835..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/DefaultTestWorkItem.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System; -using System.Collections; -using System.Linq; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Commands; -using NUnit.Framework.Internal.Execution; -using UnityEngine.TestTools; -using SetUpTearDownCommand = NUnit.Framework.Internal.Commands.SetUpTearDownCommand; -using TestActionCommand = NUnit.Framework.Internal.Commands.TestActionCommand; - -namespace UnityEngine.TestRunner.NUnitExtensions.Runner -{ - internal class EditModeTestCallbacks - { - public static Action RestoringTestContext { get; set; } - } - - internal class DefaultTestWorkItem : UnityWorkItem - { - private TestCommand _command; - - public DefaultTestWorkItem(TestMethod test, ITestFilter filter) - : base(test, null) - { - _command = TestCommandBuilder.BuildTestCommand(test, filter); - } - - protected override IEnumerable PerformWork() - { - if (m_DontRunRestoringResult && EditModeTestCallbacks.RestoringTestContext != null) - { - EditModeTestCallbacks.RestoringTestContext(); - Result = Context.CurrentResult; - yield break; - } - - try - { - if (_command is SkipCommand || _command is FailCommand) - { - Result = _command.Execute(Context); - yield break; - } - - if (!(_command is IEnumerableTestMethodCommand)) - { - Debug.LogError("Cannot perform work on " + _command.GetType().Name); - yield break; - } - - foreach (var workItemStep in ((IEnumerableTestMethodCommand)_command).ExecuteEnumerable(Context)) - { - ResultedInDomainReload = false; - - if (workItemStep is IEditModeTestYieldInstruction) - { - var editModeTestYieldInstruction = (IEditModeTestYieldInstruction)workItemStep; - yield return editModeTestYieldInstruction; - var enumerator = editModeTestYieldInstruction.Perform(); - while (true) - { - bool moveNext; - try - { - moveNext = enumerator.MoveNext(); - } - catch (Exception e) - { - Context.CurrentResult.RecordException(e); - break; - } - - if (!moveNext) - { - break; - } - - yield return null; - } - } - else - { - yield return workItemStep; - } - } - - Result = Context.CurrentResult; - } - finally - { - WorkItemComplete(); - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/DefaultTestWorkItem.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/DefaultTestWorkItem.cs.meta deleted file mode 100644 index a843b77a..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/DefaultTestWorkItem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c7cfda246e604b945b12b7afedb094ce -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/FailCommand.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/FailCommand.cs deleted file mode 100644 index a01769dd..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/FailCommand.cs +++ /dev/null @@ -1,34 +0,0 @@ - -using System.Collections; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Commands; - -namespace UnityEngine.TestRunner.NUnitExtensions.Runner -{ - internal class FailCommand : TestCommand, IEnumerableTestMethodCommand - { - private ResultState m_ResultState; - private string m_Message; - - public FailCommand(Test test, ResultState resultState, string message) - : base(test) - { - m_ResultState = resultState; - m_Message = message; - } - - public override TestResult Execute(ITestExecutionContext context) - { - context.CurrentResult.SetResult(m_ResultState, m_Message); - return context.CurrentResult; - } - - public IEnumerable ExecuteEnumerable(ITestExecutionContext context) - { - context.CurrentResult.SetResult(m_ResultState, m_Message); - yield return null; - } - } - -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/FailCommand.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/FailCommand.cs.meta deleted file mode 100644 index 921cc0ae..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/FailCommand.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 68e5dc8bfd5d72647a93b7f2e1da831a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/IEnumerableTestMethodCommand.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/IEnumerableTestMethodCommand.cs deleted file mode 100644 index 758e2956..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/IEnumerableTestMethodCommand.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Collections; -using NUnit.Framework.Internal; - -namespace UnityEngine.TestRunner.NUnitExtensions.Runner -{ - internal interface IEnumerableTestMethodCommand - { - IEnumerable ExecuteEnumerable(ITestExecutionContext context); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/IEnumerableTestMethodCommand.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/IEnumerableTestMethodCommand.cs.meta deleted file mode 100644 index 4434337b..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/IEnumerableTestMethodCommand.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: dbd43d8a3b8122d4e89b055f53382b11 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/PlaymodeWorkItemFactory.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/PlaymodeWorkItemFactory.cs deleted file mode 100644 index 5d32f268..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/PlaymodeWorkItemFactory.cs +++ /dev/null @@ -1,13 +0,0 @@ -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; - -namespace UnityEngine.TestRunner.NUnitExtensions.Runner -{ - internal class PlaymodeWorkItemFactory : WorkItemFactory - { - protected override UnityWorkItem Create(TestMethod method, ITestFilter filter, ITest loadedTest) - { - return new CoroutineTestWorkItem(method, filter); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/PlaymodeWorkItemFactory.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/PlaymodeWorkItemFactory.cs.meta deleted file mode 100644 index 9c2a8eda..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/PlaymodeWorkItemFactory.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7ef6801a8b664544aa9f2ab1bc1f8b60 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/RestoreTestContextAfterDomainReload.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/RestoreTestContextAfterDomainReload.cs deleted file mode 100644 index e05910ab..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/RestoreTestContextAfterDomainReload.cs +++ /dev/null @@ -1,4 +0,0 @@ -namespace UnityEngine.TestRunner.NUnitExtensions.Runner -{ - internal class RestoreTestContextAfterDomainReload {} -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/RestoreTestContextAfterDomainReload.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/RestoreTestContextAfterDomainReload.cs.meta deleted file mode 100644 index 640354d6..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/RestoreTestContextAfterDomainReload.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 26721f9940339264fb14bdbfe1290e21 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/TestCommandBuilder.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/TestCommandBuilder.cs deleted file mode 100644 index 0a0c1c3e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/TestCommandBuilder.cs +++ /dev/null @@ -1,127 +0,0 @@ -using System; -using System.Collections; -using System.Linq; -using NUnit.Framework; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Commands; -using UnityEngine.TestTools; - -namespace UnityEngine.TestRunner.NUnitExtensions.Runner -{ - internal static class TestCommandBuilder - { - public static TestCommand BuildTestCommand(TestMethod test, ITestFilter filter) - { - if (test.RunState != RunState.Runnable && - !(test.RunState == RunState.Explicit && filter.IsExplicitMatch(test))) - { - return new SkipCommand(test); - } - - var testReturnsIEnumerator = test.Method.ReturnType.Type == typeof(IEnumerator); - - TestCommand command; - if (!testReturnsIEnumerator) - { - command = new TestMethodCommand(test); - } - else - { - command = new EnumerableTestMethodCommand(test); - } - - command = new UnityLogCheckDelegatingCommand(command); - foreach (var wrapper in test.Method.GetCustomAttributes(true)) - { - command = wrapper.Wrap(command); - if (command == null) - { - var message = String.Format("IWrapTestMethod implementation '{0}' returned null as command.", - wrapper.GetType().FullName); - return new FailCommand(test, ResultState.Failure, message); - } - - if (testReturnsIEnumerator && !(command is IEnumerableTestMethodCommand)) - { - command = TryReplaceWithEnumerableCommand(command); - if (command != null) - { - continue; - } - - var message = String.Format("'{0}' is not supported on {1} as it does not handle returning IEnumerator.", - wrapper.GetType().FullName, - GetTestBuilderName(test)); - return new FailCommand(test, ResultState.Failure, message); - } - } - - command = new UnityEngine.TestTools.TestActionCommand(command); - command = new UnityEngine.TestTools.SetUpTearDownCommand(command); - - if (!testReturnsIEnumerator) - { - command = new ImmediateEnumerableCommand(command); - } - - foreach (var wrapper in test.Method.GetCustomAttributes(true)) - { - command = wrapper.Wrap(command); - if (command == null) - { - var message = String.Format("IWrapSetUpTearDown implementation '{0}' returned null as command.", - wrapper.GetType().FullName); - return new FailCommand(test, ResultState.Failure, message); - } - - if (testReturnsIEnumerator && !(command is IEnumerableTestMethodCommand)) - { - command = TryReplaceWithEnumerableCommand(command); - if (command != null) - { - continue; - } - - var message = String.Format("'{0}' is not supported on {1} as it does not handle returning IEnumerator.", - wrapper.GetType().FullName, - GetTestBuilderName(test)); - return new FailCommand(test, ResultState.Failure, message); - } - } - - command = new EnumerableSetUpTearDownCommand(command); - command = new OuterUnityTestActionCommand(command); - - IApplyToContext[] changes = test.Method.GetCustomAttributes(true); - if (changes.Length > 0) - { - command = new EnumerableApplyChangesToContextCommand(command, changes); - } - - return command; - } - - private static string GetTestBuilderName(TestMethod testMethod) - { - return new[] - { - testMethod.Method.GetCustomAttributes(true).Select(attribute => attribute.GetType().Name), - testMethod.Method.GetCustomAttributes(true).Select(attribute => attribute.GetType().Name) - }.SelectMany(v => v).FirstOrDefault(); - } - - private static TestCommand TryReplaceWithEnumerableCommand(TestCommand command) - { - switch (command.GetType().Name) - { - case nameof(RepeatAttribute.RepeatedTestCommand): - return new EnumerableRepeatedTestCommand(command as RepeatAttribute.RepeatedTestCommand); - case nameof(RetryAttribute.RetryCommand): - return new EnumerableRetryTestCommand(command as RetryAttribute.RetryCommand); - default: - return null; - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/TestCommandBuilder.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/TestCommandBuilder.cs.meta deleted file mode 100644 index 769bce6b..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/TestCommandBuilder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f40df9c8cf926b241b093a37028d8815 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityLogCheckDelegatingCommand.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityLogCheckDelegatingCommand.cs deleted file mode 100644 index 05b725a9..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityLogCheckDelegatingCommand.cs +++ /dev/null @@ -1,143 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Commands; -using UnityEngine.TestTools; -using UnityEngine.TestTools.Logging; -using UnityEngine.TestTools.TestRunner; - -namespace UnityEngine.TestRunner.NUnitExtensions.Runner -{ - class UnityLogCheckDelegatingCommand : DelegatingTestCommand, IEnumerableTestMethodCommand - { - static Dictionary s_AttributeCache = new Dictionary(); - - public UnityLogCheckDelegatingCommand(TestCommand innerCommand) - : base(innerCommand) {} - - public override TestResult Execute(ITestExecutionContext context) - { - using (var logScope = new LogScope()) - { - if (ExecuteAndCheckLog(logScope, context.CurrentResult, () => innerCommand.Execute(context))) - PostTestValidation(logScope, innerCommand, context.CurrentResult); - } - - return context.CurrentResult; - } - - public IEnumerable ExecuteEnumerable(ITestExecutionContext context) - { - if (!(innerCommand is IEnumerableTestMethodCommand enumerableTestMethodCommand)) - { - Execute(context); - yield break; - } - - using (var logScope = new LogScope()) - { - IEnumerable executeEnumerable = null; - - if (!ExecuteAndCheckLog(logScope, context.CurrentResult, - () => executeEnumerable = enumerableTestMethodCommand.ExecuteEnumerable(context))) - yield break; - - foreach (var step in executeEnumerable) - { - // do not check expected logs here - we want to permit expecting and receiving messages to run - // across frames. (but we do always want to catch a fail immediately.) - if (!CheckFailingLogs(logScope, context.CurrentResult)) - yield break; - - yield return step; - } - - if (!CheckLogs(context.CurrentResult, logScope)) - yield break; - - PostTestValidation(logScope, innerCommand, context.CurrentResult); - } - } - - static bool CaptureException(TestResult result, Action action) - { - try - { - action(); - return true; - } - catch (Exception e) - { - result.RecordException(e); - return false; - } - } - - static bool ExecuteAndCheckLog(LogScope logScope, TestResult result, Action action) - => CaptureException(result, action) && CheckLogs(result, logScope); - - static void PostTestValidation(LogScope logScope, TestCommand command, TestResult result) - { - if (MustExpect(command.Test.Method.MethodInfo)) - CaptureException(result, logScope.NoUnexpectedReceived); - } - - static bool CheckLogs(TestResult result, LogScope logScope) - => CheckFailingLogs(logScope, result) && CheckExpectedLogs(logScope, result); - - static bool CheckFailingLogs(LogScope logScope, TestResult result) - { - if (!logScope.AnyFailingLogs()) - return true; - - var failingLog = logScope.FailingLogs.First(); - result.RecordException(new UnhandledLogMessageException(failingLog)); - return false; - } - - static bool CheckExpectedLogs(LogScope logScope, TestResult result) - { - if (!logScope.ExpectedLogs.Any()) - return true; - - var expectedLog = logScope.ExpectedLogs.Peek(); - result.RecordException(new UnexpectedLogMessageException(expectedLog)); - return false; - } - - static bool MustExpect(MemberInfo method) - { - // method - - var methodAttr = method.GetCustomAttributes(true).FirstOrDefault(); - if (methodAttr != null) - return methodAttr.MustExpect; - - // fixture - - var fixture = method.DeclaringType; - if (!s_AttributeCache.TryGetValue(fixture, out var mustExpect)) - { - var fixtureAttr = fixture.GetCustomAttributes(true).FirstOrDefault(); - mustExpect = s_AttributeCache[fixture] = fixtureAttr?.MustExpect; - } - - if (mustExpect != null) - return mustExpect.Value; - - // assembly - - var assembly = fixture.Assembly; - if (!s_AttributeCache.TryGetValue(assembly, out mustExpect)) - { - var assemblyAttr = assembly.GetCustomAttributes().FirstOrDefault(); - mustExpect = s_AttributeCache[assembly] = assemblyAttr?.MustExpect; - } - - return mustExpect == true; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityLogCheckDelegatingCommand.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityLogCheckDelegatingCommand.cs.meta deleted file mode 100644 index 86d9d9ea..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityLogCheckDelegatingCommand.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 48230e4e90fb4d14a9d56bddea898413 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestAssemblyRunner.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestAssemblyRunner.cs deleted file mode 100644 index 96ed23a1..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestAssemblyRunner.cs +++ /dev/null @@ -1,98 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using NUnit; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using UnityEngine.TestTools; -using UnityEngine.TestTools.NUnitExtensions; - -namespace UnityEngine.TestRunner.NUnitExtensions.Runner -{ - internal interface IUnityTestAssemblyRunner - { - ITest LoadedTest { get; } - ITestResult Result { get; } - bool IsTestLoaded { get; } - bool IsTestRunning { get; } - bool IsTestComplete { get; } - UnityWorkItem TopLevelWorkItem { get; set; } - UnityTestExecutionContext GetCurrentContext(); - ITest Load(Assembly[] assemblies, TestPlatform testPlatform, IDictionary settings); - IEnumerable Run(ITestListener listener, ITestFilter filter); - void StopRun(); - } - - internal class UnityTestAssemblyRunner : IUnityTestAssemblyRunner - { - private readonly UnityTestAssemblyBuilder unityBuilder; - private readonly WorkItemFactory m_Factory; - - protected UnityTestExecutionContext Context { get; set; } - - public UnityTestExecutionContext GetCurrentContext() - { - return UnityTestExecutionContext.CurrentContext; - } - - protected IDictionary Settings { get; set; } - public ITest LoadedTest { get; protected set; } - - public ITestResult Result - { - get { return TopLevelWorkItem == null ? null : TopLevelWorkItem.Result; } - } - - public bool IsTestLoaded - { - get { return LoadedTest != null; } - } - - public bool IsTestRunning - { - get { return TopLevelWorkItem != null && TopLevelWorkItem.State == NUnit.Framework.Internal.Execution.WorkItemState.Running; } - } - public bool IsTestComplete - { - get { return TopLevelWorkItem != null && TopLevelWorkItem.State == NUnit.Framework.Internal.Execution.WorkItemState.Complete; } - } - - public UnityTestAssemblyRunner(UnityTestAssemblyBuilder builder, WorkItemFactory factory) - { - unityBuilder = builder; - m_Factory = factory; - Context = new UnityTestExecutionContext(); - } - - public ITest Load(Assembly[] assemblies, TestPlatform testPlatform, IDictionary settings) - { - Settings = settings; - - if (settings.ContainsKey(FrameworkPackageSettings.RandomSeed)) - Randomizer.InitialSeed = (int)settings[FrameworkPackageSettings.RandomSeed]; - - return LoadedTest = unityBuilder.Build(assemblies, Enumerable.Repeat(testPlatform, assemblies.Length).ToArray(), settings); - } - - public IEnumerable Run(ITestListener listener, ITestFilter filter) - { - TopLevelWorkItem = m_Factory.Create(LoadedTest, filter); - TopLevelWorkItem.InitializeContext(Context); - UnityTestExecutionContext.CurrentContext = Context; - Context.Listener = listener; - - return TopLevelWorkItem.Execute(); - } - - public UnityWorkItem TopLevelWorkItem { get; set; } - - public void StopRun() - { - if (IsTestRunning) - { - TopLevelWorkItem.Cancel(false); - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestAssemblyRunner.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestAssemblyRunner.cs.meta deleted file mode 100644 index 96179c58..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestAssemblyRunner.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 874e40a588dbb1e48bc128d686337d4e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestExecutionContext.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestExecutionContext.cs deleted file mode 100644 index 08bd03dc..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestExecutionContext.cs +++ /dev/null @@ -1,130 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using NUnit.Framework; -using NUnit.Framework.Constraints; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Execution; -using UnityEngine.TestTools; - -namespace UnityEngine.TestRunner.NUnitExtensions.Runner -{ - internal class UnityTestExecutionContext : ITestExecutionContext - { - private readonly UnityTestExecutionContext _priorContext; - private TestResult _currentResult; - private int _assertCount; - - public static UnityTestExecutionContext CurrentContext { get; set; } - - public UnityTestExecutionContext Context { get; private set; } - - public Test CurrentTest { get; set; } - public DateTime StartTime { get; set; } - public long StartTicks { get; set; } - public TestResult CurrentResult - { - get { return _currentResult; } - set - { - _currentResult = value; - if (value != null) - OutWriter = value.OutWriter; - } - } - - public object TestObject { get; set; } - public string WorkDirectory { get; set; } - - - private TestExecutionStatus _executionStatus; - public TestExecutionStatus ExecutionStatus - { - get - { - // ExecutionStatus may have been set to StopRequested or AbortRequested - // in a prior context. If so, reflect the same setting in this context. - if (_executionStatus == TestExecutionStatus.Running && _priorContext != null) - _executionStatus = _priorContext.ExecutionStatus; - - return _executionStatus; - } - set - { - _executionStatus = value; - - // Push the same setting up to all prior contexts - if (_priorContext != null) - _priorContext.ExecutionStatus = value; - } - } - - public List UpstreamActions { get; private set; } - public int TestCaseTimeout { get; set; } - public CultureInfo CurrentCulture { get; set; } - public CultureInfo CurrentUICulture { get; set; } - public ITestListener Listener { get; set; } - - public UnityTestExecutionContext() - { - UpstreamActions = new List(); - CurrentContext = this; - } - - public UnityTestExecutionContext(UnityTestExecutionContext other) - { - _priorContext = other; - - CurrentTest = other.CurrentTest; - CurrentResult = other.CurrentResult; - TestObject = other.TestObject; - WorkDirectory = other.WorkDirectory; - Listener = other.Listener; - TestCaseTimeout = other.TestCaseTimeout; - UpstreamActions = new List(other.UpstreamActions); - SetUpTearDownState = other.SetUpTearDownState; - OuterUnityTestActionState = other.OuterUnityTestActionState; - - TestContext.CurrentTestExecutionContext = this; - - CurrentCulture = other.CurrentCulture; - CurrentUICulture = other.CurrentUICulture; - CurrentContext = this; - } - - public TextWriter OutWriter { get; private set; } - public bool StopOnError { get; set; } - - public IWorkItemDispatcher Dispatcher { get; set; } - - public ParallelScope ParallelScope { get; set; } - public string WorkerId { get; private set; } - public Randomizer RandomGenerator { get; private set; } - public ValueFormatter CurrentValueFormatter { get; private set; } - public bool IsSingleThreaded { get; set; } - public BeforeAfterTestCommandState SetUpTearDownState { get; set; } - public BeforeAfterTestCommandState OuterUnityTestActionState { get; set; } - public int EnumerableRepeatedTestState { get; set; } - public int EnumerableRetryTestState { get; set; } - - internal int AssertCount - { - get - { - return _assertCount; - } - } - - public void IncrementAssertCount() - { - _assertCount += 1; - } - - public void AddFormatter(ValueFormatterFactory formatterFactory) - { - throw new NotImplementedException(); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestExecutionContext.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestExecutionContext.cs.meta deleted file mode 100644 index 33d323b6..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestExecutionContext.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 59ff995fabb3bac45afa0f96f333e5dc -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItem.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItem.cs deleted file mode 100644 index 030b40ef..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItem.cs +++ /dev/null @@ -1,116 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; -using NUnit.Framework; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Execution; - -namespace UnityEngine.TestRunner.NUnitExtensions.Runner -{ - internal abstract class UnityWorkItem - { - protected readonly WorkItemFactory m_Factory; - protected bool m_ExecuteTestStartEvent; - protected bool m_DontRunRestoringResult; - public event EventHandler Completed; - - public bool ResultedInDomainReload { get; internal set; } - - public UnityTestExecutionContext Context { get; private set; } - - public Test Test { get; private set; } - - public TestResult Result { get; protected set; } - - public WorkItemState State { get; private set; } - - public List Actions { get; private set; } - - protected UnityWorkItem(Test test, WorkItemFactory factory) - { - m_Factory = factory; - Test = test; - Actions = new List(); - Result = test.MakeTestResult(); - State = WorkItemState.Ready; - m_ExecuteTestStartEvent = ShouldExecuteStartEvent(); - m_DontRunRestoringResult = ShouldRestore(test); - } - - protected static bool ShouldRestore(ITest loadedTest) - { - return UnityWorkItemDataHolder.alreadyExecutedTests != null && - UnityWorkItemDataHolder.alreadyExecutedTests.Contains(loadedTest.GetUniqueName()); - } - - protected bool ShouldExecuteStartEvent() - { - return UnityWorkItemDataHolder.alreadyStartedTests != null && - UnityWorkItemDataHolder.alreadyStartedTests.All(x => x != Test.GetUniqueName()) && - !ShouldRestore(Test); - } - - protected abstract IEnumerable PerformWork(); - - public void InitializeContext(UnityTestExecutionContext context) - { - Context = context; - - if (Test is TestAssembly) - Actions.AddRange(ActionsHelper.GetActionsFromTestAssembly((TestAssembly)Test)); - else if (Test is ParameterizedMethodSuite) - Actions.AddRange(ActionsHelper.GetActionsFromTestMethodInfo(Test.Method)); - else if (Test.TypeInfo != null) - Actions.AddRange(ActionsHelper.GetActionsFromTypesAttributes(Test.TypeInfo.Type)); - } - - public virtual IEnumerable Execute() - { - Context.CurrentTest = this.Test; - Context.CurrentResult = this.Result; - - if (m_ExecuteTestStartEvent) - { - Context.Listener.TestStarted(Test); - } - - Context.StartTime = DateTime.UtcNow; - Context.StartTicks = Stopwatch.GetTimestamp(); - - State = WorkItemState.Running; - - return PerformWork(); - } - - protected void WorkItemComplete() - { - State = WorkItemState.Complete; - - Result.StartTime = Context.StartTime; - Result.EndTime = DateTime.UtcNow; - - long tickCount = Stopwatch.GetTimestamp() - Context.StartTicks; - double seconds = (double)tickCount / Stopwatch.Frequency; - Result.Duration = seconds; - - //Result.AssertCount += Context.AssertCount; - - Context.Listener.TestFinished(Result); - - if (Completed != null) - Completed(this, EventArgs.Empty); - - Context.TestObject = null; - Test.Fixture = null; - } - - public virtual void Cancel(bool force) - { - Result.SetResult(ResultState.Cancelled, "Cancelled by user"); - Context.Listener.TestFinished(Result); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItem.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItem.cs.meta deleted file mode 100644 index 48b9f92d..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItem.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 79ced2556f0af814a840b86232613ff1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItemDataHolder.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItemDataHolder.cs deleted file mode 100644 index d9fb7004..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItemDataHolder.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Collections.Generic; - -namespace UnityEngine.TestRunner.NUnitExtensions.Runner -{ - internal class UnityWorkItemDataHolder - { - public static List alreadyStartedTests = new List(); - public static List alreadyExecutedTests; - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItemDataHolder.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItemDataHolder.cs.meta deleted file mode 100644 index 6d90872b..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItemDataHolder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5b3e90046c38f1d4dad2e0d5a79e871c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/WorkItemFactory.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/WorkItemFactory.cs deleted file mode 100644 index 94d9c0fe..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/WorkItemFactory.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System.Collections; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; - -namespace UnityEngine.TestRunner.NUnitExtensions.Runner -{ - internal abstract class WorkItemFactory - { - public UnityWorkItem Create(ITest loadedTest, ITestFilter filter) - { - TestSuite suite = loadedTest as TestSuite; - if (suite != null) - { - return new CompositeWorkItem(suite, filter, this); - } - - var testMethod = (TestMethod)loadedTest; - if (testMethod.Method.ReturnType.Type != typeof(IEnumerator)) - { - return new DefaultTestWorkItem(testMethod, filter); - } - - return Create(testMethod, filter, loadedTest); - } - - protected abstract UnityWorkItem Create(TestMethod method, ITestFilter filter, ITest loadedTest); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/WorkItemFactory.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/WorkItemFactory.cs.meta deleted file mode 100644 index e5f03777..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/Runner/WorkItemFactory.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5c15bf0966eb95847a4260d830a30d30 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/TestExtensions.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/TestExtensions.cs deleted file mode 100644 index e4ea3feb..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/TestExtensions.cs +++ /dev/null @@ -1,146 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using UnityEngine.TestRunner.NUnitExtensions.Filters; - -namespace UnityEngine.TestRunner.NUnitExtensions -{ - internal static class TestExtensions - { - private static IEnumerable GetTestCategories(this ITest test) - { - var categories = test.Properties[PropertyNames.Category].Cast().ToList(); - if (categories.Count == 0 && test is TestMethod) - { - // only mark tests as Uncategorized if the test fixture doesn't have a category, - // otherwise the test inherits the Fixture category - var fixtureCategories = test.Parent.Properties[PropertyNames.Category].Cast().ToList(); - if (fixtureCategories.Count == 0) - categories.Add(CategoryFilterExtended.k_DefaultCategory); - } - return categories; - } - - public static bool HasCategory(this ITest test, string[] categoryFilter) - { - var categories = test.GetAllCategoriesFromTest().Distinct(); - return categoryFilter.Any(c => categories.Any(r => r == c)); - } - - public static List GetAllCategoriesFromTest(this ITest test) - { - if (test.Parent == null) - return test.GetTestCategories().ToList(); - - var categories = GetAllCategoriesFromTest(test.Parent); - categories.AddRange(test.GetTestCategories()); - return categories; - } - - public static void ParseForNameDuplicates(this ITest test) - { - var duplicates = new Dictionary(); - for (var i = 0; i < test.Tests.Count; i++) - { - var child = test.Tests[i]; - int count; - if (duplicates.TryGetValue(child.FullName, out count)) - { - count++; - child.Properties.Add("childIndex", count); - duplicates[child.FullName] = count; - } - else - { - duplicates.Add(child.FullName, 1); - } - ParseForNameDuplicates(child); - } - } - - public static int GetChildIndex(this ITest test) - { - var index = test.Properties["childIndex"]; - return (int)index[0]; - } - - public static bool HasChildIndex(this ITest test) - { - var index = test.Properties["childIndex"]; - return index.Count > 0; - } - - static string GetAncestorPath(ITest test) - { - var path = ""; - var testParent = test.Parent; - - while (testParent != null && testParent.Parent != null && !string.IsNullOrEmpty(testParent.Name)) - { - path = testParent.Name + "/" + path; - testParent = testParent.Parent; - } - - return path; - } - - public static string GetUniqueName(this ITest test) - { - var id = GetAncestorPath(test) + GetFullName(test); - if (test.HasChildIndex()) - { - var index = test.GetChildIndex(); - if (index >= 0) - id += index; - } - if (test.IsSuite) - { - id += "[suite]"; - } - return id; - } - - public static string GetFullName(ITest test) - { - if (test.TypeInfo == null && (test.Parent == null || test.Parent.TypeInfo == null)) - { - return "[" + test.FullName + "]"; - } - var assemblyId = test.TypeInfo == null ? test.Parent.TypeInfo.Assembly.GetName().Name : test.TypeInfo.Assembly.GetName().Name; - return string.Format("[{0}][{1}]", assemblyId, test.FullName); - } - - public static string GetSkipReason(this ITest test) - { - if (test.Properties.ContainsKey(PropertyNames.SkipReason)) - return (string)test.Properties.Get(PropertyNames.SkipReason); - - return null; - } - - public static string GetParentId(this ITest test) - { - if (test.Parent != null) - return test.Parent.Id; - - return null; - } - - public static string GetParentFullName(this ITest test) - { - if (test.Parent != null) - return test.Parent.FullName; - - return null; - } - - public static string GetParentUniqueName(this ITest test) - { - if (test.Parent != null) - return GetUniqueName(test.Parent); - - return null; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/TestExtensions.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/TestExtensions.cs.meta deleted file mode 100644 index 3230eb44..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/TestExtensions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8bc74398aa3944646ade4ee78cd57484 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/TestResultExtensions.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/TestResultExtensions.cs deleted file mode 100644 index d79072b0..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/TestResultExtensions.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System; -using NUnit.Framework; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; - -namespace UnityEngine.TestRunner.NUnitExtensions -{ - internal static class TestResultExtensions - { - public static void RecordPrefixedException(this TestResult testResult, string prefix, Exception ex, ResultState resultState = null) - - { - if (ex is NUnitException) - { - ex = ex.InnerException; - } - - if (resultState == null) - { - resultState = testResult.ResultState == ResultState.Cancelled - ? ResultState.Cancelled - : ResultState.Error; - } - - var exceptionMessage = ExceptionHelper.BuildMessage(ex); - string stackTrace = "--" + prefix + NUnit.Env.NewLine + ExceptionHelper.BuildStackTrace(ex); - if (testResult.StackTrace != null) - { - stackTrace = testResult.StackTrace + NUnit.Env.NewLine + stackTrace; - } - - if (testResult.Test.IsSuite) - { - resultState = resultState.WithSite(FailureSite.TearDown); - } - - if (ex is ResultStateException) - { - exceptionMessage = ex.Message; - resultState = ((ResultStateException)ex).ResultState; - stackTrace = StackFilter.Filter(ex.StackTrace); - } - - string message = (string.IsNullOrEmpty(prefix) ? "" : (prefix + " : ")) + exceptionMessage; - if (testResult.Message != null) - { - message = testResult.Message + NUnit.Env.NewLine + message; - } - - testResult.SetResult(resultState, message, stackTrace); - } - - public static void RecordPrefixedError(this TestResult testResult, string prefix, string error, ResultState resultState = null) - - { - if (resultState == null) - { - resultState = testResult.ResultState == ResultState.Cancelled - ? ResultState.Cancelled - : ResultState.Error; - } - - if (testResult.Test.IsSuite) - { - resultState = resultState.WithSite(FailureSite.TearDown); - } - - string message = (string.IsNullOrEmpty(prefix) ? "" : (prefix + " : ")) + error; - if (testResult.Message != null) - { - message = testResult.Message + NUnit.Env.NewLine + message; - } - - testResult.SetResult(resultState, message); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/TestResultExtensions.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/TestResultExtensions.cs.meta deleted file mode 100644 index ff97b17b..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/TestResultExtensions.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 65fb6da362a78334ab360a125cfafdaf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/UnityTestAssemblyBuilder.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/UnityTestAssemblyBuilder.cs deleted file mode 100644 index 79f4aa5d..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/UnityTestAssemblyBuilder.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using NUnit; -using NUnit.Framework.Api; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; - -namespace UnityEngine.TestTools.NUnitExtensions -{ - internal class UnityTestAssemblyBuilder : DefaultTestAssemblyBuilder, IAsyncTestAssemblyBuilder - { - private readonly string m_ProductName; - public UnityTestAssemblyBuilder() - { - m_ProductName = Application.productName; - } - - public ITest Build(Assembly[] assemblies, TestPlatform[] testPlatforms, IDictionary options) - { - var test = BuildAsync(assemblies, testPlatforms, options); - while (test.MoveNext()) - { - } - - return test.Current; - } - - public IEnumerator BuildAsync(Assembly[] assemblies, TestPlatform[] testPlatforms, IDictionary options) - { - var productName = string.Join("_", m_ProductName.Split(Path.GetInvalidFileNameChars())); - var suite = new TestSuite(productName); - for (var index = 0; index < assemblies.Length; index++) - { - var assembly = assemblies[index]; - var platform = testPlatforms[index]; - - var assemblySuite = Build(assembly, options) as TestSuite; - if (assemblySuite != null && assemblySuite.HasChildren) - { - assemblySuite.Properties.Set("platform", platform); - suite.Add(assemblySuite); - } - - yield return null; - } - - yield return suite; - } - - public static Dictionary GetNUnitTestBuilderSettings(TestPlatform testPlatform) - { - var emptySettings = new Dictionary(); - emptySettings.Add(FrameworkPackageSettings.TestParameters, "platform=" + testPlatform); - return emptySettings; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/UnityTestAssemblyBuilder.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/UnityTestAssemblyBuilder.cs.meta deleted file mode 100644 index f0fdf171..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/NUnitExtensions/UnityTestAssemblyBuilder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 98ba0396e4b4ee8498a8f097affcfddf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner.meta deleted file mode 100644 index e44f8794..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 1ddb9e1c877ea80479d1eab4ddaa5d0d -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks.meta deleted file mode 100644 index 899ce792..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 61e236e8570a95e4eb754fb291e102e0 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks/PlayModeRunnerCallback.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks/PlayModeRunnerCallback.cs deleted file mode 100644 index d7926873..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks/PlayModeRunnerCallback.cs +++ /dev/null @@ -1,47 +0,0 @@ -using NUnit.Framework; -using NUnit.Framework.Interfaces; - -namespace UnityEngine.TestTools.TestRunner.Callbacks -{ - [AddComponentMenu("")] - internal class PlayModeRunnerCallback : MonoBehaviour, ITestRunnerListener - { - private TestResultRenderer m_ResultRenderer; - - public void RunFinished(ITestResult testResults) - { - Application.logMessageReceivedThreaded -= LogRecieved; - if (Camera.main == null) - { - gameObject.AddComponent(); - } - m_ResultRenderer = new TestResultRenderer(testResults); - m_ResultRenderer.ShowResults(); - } - - public void TestFinished(ITestResult result) - { - } - - public void OnGUI() - { - if (m_ResultRenderer != null) - m_ResultRenderer.Draw(); - } - - public void RunStarted(ITest testsToRun) - { - Application.logMessageReceivedThreaded += LogRecieved; - } - - public void TestStarted(ITest test) - { - } - - private void LogRecieved(string message, string stacktrace, LogType type) - { - if (TestContext.Out != null) - TestContext.Out.WriteLine(message); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks/PlayModeRunnerCallback.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks/PlayModeRunnerCallback.cs.meta deleted file mode 100644 index 15706d58..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks/PlayModeRunnerCallback.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3cf5cb9e1ef590c48b1f919f2a7bd895 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks/RemoteTestResultSender.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks/RemoteTestResultSender.cs deleted file mode 100644 index b72947f8..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks/RemoteTestResultSender.cs +++ /dev/null @@ -1,151 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using NUnit.Framework.Interfaces; -using UnityEngine.Networking.PlayerConnection; -using UnityEngine.TestRunner.TestLaunchers; - -namespace UnityEngine.TestTools.TestRunner.Callbacks -{ - [AddComponentMenu("")] - internal class RemoteTestResultSender : MonoBehaviour, ITestRunnerListener - { - private class QueueData - { - public Guid id { get; set; } - public byte[] data { get; set; } - } - - private const int k_aliveMessageFrequency = 120; - private float m_NextliveMessage = k_aliveMessageFrequency; - private readonly Queue m_SendQueue = new Queue(); - private readonly object m_LockQueue = new object(); - private readonly IRemoteTestResultDataFactory m_TestResultDataFactory = new RemoteTestResultDataFactory(); - - public void Start() - { - PlayerConnection.instance.Register(PlayerConnectionMessageIds.quitPlayerMessageId, EditorProccessedTheResult); - StartCoroutine(SendDataRoutine()); - } - - private void EditorProccessedTheResult(MessageEventArgs arg0) - { - if (arg0.data != null) - { - return; - } - - //Some platforms don't quit, so we need to disconnect to make sure they will not connect to another editor instance automatically. - PlayerConnection.instance.DisconnectAll(); - - //XBOX has an error when quitting - if (Application.platform == RuntimePlatform.XboxOne) - { - return; - } - Application.Quit(); - } - - private byte[] SerializeObject(object objectToSerialize) - { - return Encoding.UTF8.GetBytes(JsonUtility.ToJson(objectToSerialize)); - } - - public void RunStarted(ITest testsToRun) - { - var data = SerializeObject(m_TestResultDataFactory.CreateFromTest(testsToRun)); - lock (m_LockQueue) - { - m_SendQueue.Enqueue(new QueueData - { - id = PlayerConnectionMessageIds.runStartedMessageId, - data = data - }); - } - } - - public void RunFinished(ITestResult testResults) - { - var data = SerializeObject(m_TestResultDataFactory.CreateFromTestResult(testResults)); - lock (m_LockQueue) - { - m_SendQueue.Enqueue(new QueueData { id = PlayerConnectionMessageIds.runFinishedMessageId, data = data, }); - } - } - - public void TestStarted(ITest test) - { - var data = SerializeObject(m_TestResultDataFactory.CreateFromTest(test)); - lock (m_LockQueue) - { - m_SendQueue.Enqueue(new QueueData - { - id = PlayerConnectionMessageIds.testStartedMessageId, - data = data - }); - } - } - - public void TestFinished(ITestResult result) - { - var testRunnerResultForApi = m_TestResultDataFactory.CreateFromTestResult(result); - var resultData = SerializeObject(testRunnerResultForApi); - lock (m_LockQueue) - { - m_SendQueue.Enqueue(new QueueData - { - id = PlayerConnectionMessageIds.testFinishedMessageId, - data = resultData, - }); - } - } - - public IEnumerator SendDataRoutine() - { - while (!PlayerConnection.instance.isConnected) - { - yield return new WaitForSeconds(1); - } - - while (true) - { - lock (m_LockQueue) - { - if (PlayerConnection.instance.isConnected && m_SendQueue.Count > 0) - { - ResetNextPlayerAliveMessageTime(); - var queueData = m_SendQueue.Dequeue(); - PlayerConnection.instance.Send(queueData.id, queueData.data); - yield return null; - } - - //This is needed so we dont stall the player totally - if (!m_SendQueue.Any()) - { - SendAliveMessageIfNeeded(); - yield return new WaitForSeconds(0.02f); - } - } - } - } - - private void SendAliveMessageIfNeeded() - { - if (Time.timeSinceLevelLoad < m_NextliveMessage) - { - return; - } - - Debug.Log("Sending player alive message back to editor."); - ResetNextPlayerAliveMessageTime(); - PlayerConnection.instance.Send(PlayerConnectionMessageIds.playerAliveHeartbeat, new byte[0]); - } - - private void ResetNextPlayerAliveMessageTime() - { - m_NextliveMessage = Time.timeSinceLevelLoad + k_aliveMessageFrequency; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks/RemoteTestResultSender.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks/RemoteTestResultSender.cs.meta deleted file mode 100644 index cbb4d406..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks/RemoteTestResultSender.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 20793418366caf14293b29c55df5e9ec -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRenderer.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRenderer.cs deleted file mode 100644 index 3d59430e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRenderer.cs +++ /dev/null @@ -1,97 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; - -namespace UnityEngine.TestTools.TestRunner.Callbacks -{ - internal class TestResultRenderer - { - private static class Styles - { - public static readonly GUIStyle SucceedLabelStyle; - public static readonly GUIStyle FailedLabelStyle; - public static readonly GUIStyle FailedMessagesStyle; - - static Styles() - { - SucceedLabelStyle = new GUIStyle("label"); - SucceedLabelStyle.normal.textColor = Color.green; - SucceedLabelStyle.fontSize = 48; - - FailedLabelStyle = new GUIStyle("label"); - FailedLabelStyle.normal.textColor = Color.red; - FailedLabelStyle.fontSize = 32; - - FailedMessagesStyle = new GUIStyle("label"); - FailedMessagesStyle.wordWrap = false; - FailedMessagesStyle.richText = true; - } - } - - private readonly List m_FailedTestCollection; - - private bool m_ShowResults; - private Vector2 m_ScrollPosition; - - public TestResultRenderer(ITestResult testResults) - { - m_FailedTestCollection = new List(); - GetFailedTests(testResults); - } - - private void GetFailedTests(ITestResult testResults) - { - if (testResults is TestCaseResult) - { - if (testResults.ResultState.Status == TestStatus.Failed) - m_FailedTestCollection.Add(testResults); - } - else if (testResults.HasChildren) - { - foreach (var testResultsChild in testResults.Children) - { - GetFailedTests(testResultsChild); - } - } - } - - private const int k_MaxStringLength = 15000; - - public void ShowResults() - { - m_ShowResults = true; - Cursor.visible = true; - } - - public void Draw() - { - if (!m_ShowResults) return; - if (m_FailedTestCollection.Count == 0) - { - GUILayout.Label("All test(s) succeeded", Styles.SucceedLabelStyle, GUILayout.Width(600)); - } - else - { - int count = m_FailedTestCollection.Count; - GUILayout.Label(count + " tests failed!", Styles.FailedLabelStyle); - - m_ScrollPosition = GUILayout.BeginScrollView(m_ScrollPosition, GUILayout.ExpandWidth(true)); - var text = ""; - - text += "Code-based tests\n"; - text += string.Join("\n", m_FailedTestCollection - .Select(result => result.Name + " " + result.ResultState + "\n" + result.Message) - .ToArray()); - - if (text.Length > k_MaxStringLength) - text = text.Substring(0, k_MaxStringLength); - - GUILayout.TextArea(text, Styles.FailedMessagesStyle); - GUILayout.EndScrollView(); - } - if (GUILayout.Button("Close")) - Application.Quit(); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRenderer.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRenderer.cs.meta deleted file mode 100644 index 02cca205..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRenderer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5ebb87899ca30b743bb4274bc00c02b4 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRendererCallback.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRendererCallback.cs deleted file mode 100644 index b5d23f7f..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRendererCallback.cs +++ /dev/null @@ -1,36 +0,0 @@ -using NUnit.Framework.Interfaces; - -namespace UnityEngine.TestTools.TestRunner.Callbacks -{ - internal class TestResultRendererCallback : MonoBehaviour, ITestRunnerListener - { - private TestResultRenderer m_ResultRenderer; - public void RunStarted(ITest testsToRun) - { - } - - public void RunFinished(ITestResult testResults) - { - if (Camera.main == null) - { - gameObject.AddComponent(); - } - m_ResultRenderer = new TestResultRenderer(testResults); - m_ResultRenderer.ShowResults(); - } - - public void OnGUI() - { - if (m_ResultRenderer != null) - m_ResultRenderer.Draw(); - } - - public void TestStarted(ITest test) - { - } - - public void TestFinished(ITestResult result) - { - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRendererCallback.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRendererCallback.cs.meta deleted file mode 100644 index deaa0ae6..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRendererCallback.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: dfc336f10b83bd74eaded16a658275c7 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/ITestRunnerListener.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/ITestRunnerListener.cs deleted file mode 100644 index 6a2fa5b2..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/ITestRunnerListener.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using NUnit.Framework.Interfaces; -using UnityEngine.Events; - -namespace UnityEngine.TestTools.TestRunner -{ - internal interface ITestRunnerListener - { - void RunStarted(ITest testsToRun); - void RunFinished(ITestResult testResults); - void TestStarted(ITest test); - void TestFinished(ITestResult result); - } - - [Serializable] - internal class TestFinishedEvent : UnityEvent {} - - [Serializable] - internal class TestStartedEvent : UnityEvent {} - - [Serializable] - internal class RunFinishedEvent : UnityEvent {} - - [Serializable] - internal class RunStartedEvent : UnityEvent {} -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/ITestRunnerListener.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/ITestRunnerListener.cs.meta deleted file mode 100644 index 848ab3d9..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/ITestRunnerListener.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d1b534518943030499685344fd1d476d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Messages.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Messages.meta deleted file mode 100644 index 5ab167cc..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Messages.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 256a0ca37fa972840bce7fca446e75e7 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Messages/IEditModeTestYieldInstruction.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Messages/IEditModeTestYieldInstruction.cs deleted file mode 100644 index df7acb23..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Messages/IEditModeTestYieldInstruction.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Collections; - -namespace UnityEngine.TestTools -{ - public interface IEditModeTestYieldInstruction - { - bool ExpectDomainReload { get; } - bool ExpectedPlaymodeState { get; } - - IEnumerator Perform(); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Messages/IEditModeTestYieldInstruction.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Messages/IEditModeTestYieldInstruction.cs.meta deleted file mode 100644 index f61c35ae..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/Messages/IEditModeTestYieldInstruction.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 898bc38486fc899428fbe5bd6adfe473 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/PlaymodeTestsController.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/PlaymodeTestsController.cs deleted file mode 100644 index 87091ca1..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/PlaymodeTestsController.cs +++ /dev/null @@ -1,129 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using UnityEngine.SceneManagement; -using UnityEngine.TestRunner.NUnitExtensions; -using UnityEngine.TestRunner.NUnitExtensions.Runner; -using UnityEngine.TestTools.NUnitExtensions; -using UnityEngine.TestTools.Utils; - -namespace UnityEngine.TestTools.TestRunner -{ - [Serializable] - [AddComponentMenu("")] - internal class PlaymodeTestsController : MonoBehaviour - { - private IEnumerator m_TestSteps; - - [SerializeField] - private List m_AssembliesWithTests; - public List AssembliesWithTests - { - get - { - return m_AssembliesWithTests; - } - set - { - m_AssembliesWithTests = value; - } - } - - [SerializeField] - internal TestStartedEvent testStartedEvent = new TestStartedEvent(); - [SerializeField] - internal TestFinishedEvent testFinishedEvent = new TestFinishedEvent(); - [SerializeField] - internal RunStartedEvent runStartedEvent = new RunStartedEvent(); - [SerializeField] - internal RunFinishedEvent runFinishedEvent = new RunFinishedEvent(); - - internal const string kPlaymodeTestControllerName = "Code-based tests runner"; - - [SerializeField] - public PlaymodeTestsControllerSettings settings = new PlaymodeTestsControllerSettings(); - - internal UnityTestAssemblyRunner m_Runner; - - public IEnumerator Start() - { - //Skip 2 frame because Unity. - yield return null; - yield return null; - StartCoroutine(Run()); - } - - internal static bool IsControllerOnScene() - { - return GameObject.Find(kPlaymodeTestControllerName) != null; - } - - internal static PlaymodeTestsController GetController() - { - return GameObject.Find(kPlaymodeTestControllerName).GetComponent(); - } - - public IEnumerator TestRunnerCoroutine() - { - while (m_TestSteps.MoveNext()) - { - yield return m_TestSteps.Current; - } - - if (m_Runner.IsTestComplete) - { - runFinishedEvent.Invoke(m_Runner.Result); - Cleanup(); - - yield return null; - } - } - - public IEnumerator Run() - { - CoroutineTestWorkItem.monoBehaviourCoroutineRunner = this; - gameObject.hideFlags |= HideFlags.DontSave; - - if (settings.sceneBased) - { - SceneManager.LoadScene(1, LoadSceneMode.Additive); - yield return null; - } - - var testListUtil = new PlayerTestAssemblyProvider(new AssemblyLoadProxy(), m_AssembliesWithTests); - m_Runner = new UnityTestAssemblyRunner(new UnityTestAssemblyBuilder(), new PlaymodeWorkItemFactory()); - - var loadedTests = m_Runner.Load(testListUtil.GetUserAssemblies().Select(a => a.Assembly).ToArray(), TestPlatform.PlayMode, UnityTestAssemblyBuilder.GetNUnitTestBuilderSettings(TestPlatform.PlayMode)); - loadedTests.ParseForNameDuplicates(); - runStartedEvent.Invoke(m_Runner.LoadedTest); - - var testListenerWrapper = new TestListenerWrapper(testStartedEvent, testFinishedEvent); - m_TestSteps = m_Runner.Run(testListenerWrapper, settings.BuildNUnitFilter()).GetEnumerator(); - - yield return TestRunnerCoroutine(); - } - - public void Cleanup() - { - if (m_Runner != null) - { - m_Runner.StopRun(); - m_Runner = null; - } - if (Application.isEditor) - { - Destroy(gameObject); - } - } - - public static void TryCleanup() - { - var controller = GetController(); - if (controller != null) - { - controller.Cleanup(); - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/PlaymodeTestsController.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/PlaymodeTestsController.cs.meta deleted file mode 100644 index 96937783..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/PlaymodeTestsController.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 102e512f651ee834f951a2516c1ea3b8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/PlaymodeTestsControllerSettings.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/PlaymodeTestsControllerSettings.cs deleted file mode 100644 index f40586b6..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/PlaymodeTestsControllerSettings.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Linq; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal.Filters; -using UnityEngine.SceneManagement; -using UnityEngine.TestTools.TestRunner.GUI; - -namespace UnityEngine.TestTools.TestRunner -{ - [Serializable] - internal class PlaymodeTestsControllerSettings - { - [SerializeField] - public TestRunnerFilter[] filters; - public bool sceneBased; - public string originalScene; - public string bootstrapScene; - - public static PlaymodeTestsControllerSettings CreateRunnerSettings(TestRunnerFilter[] filters) - { - var settings = new PlaymodeTestsControllerSettings - { - filters = filters, - sceneBased = false, - originalScene = SceneManager.GetActiveScene().path, - bootstrapScene = null - }; - return settings; - } - - internal ITestFilter BuildNUnitFilter() - { - return new OrFilter(filters.Select(f => f.BuildNUnitFilter()).ToArray()); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/PlaymodeTestsControllerSettings.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/PlaymodeTestsControllerSettings.cs.meta deleted file mode 100644 index 06448a7f..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/PlaymodeTestsControllerSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2799eb4c84e72e54092a292cf626936b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers.meta deleted file mode 100644 index d23c0a71..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 91c20d2c22b8b3a4cb6c816bd225591a -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/IRemoteTestResultDataFactory.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/IRemoteTestResultDataFactory.cs deleted file mode 100644 index fffba298..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/IRemoteTestResultDataFactory.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; -using NUnit.Framework.Interfaces; - -namespace UnityEngine.TestRunner.TestLaunchers -{ - internal interface IRemoteTestResultDataFactory - { - RemoteTestResultDataWithTestData CreateFromTestResult(ITestResult result); - RemoteTestResultDataWithTestData CreateFromTest(ITest test); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/IRemoteTestResultDataFactory.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/IRemoteTestResultDataFactory.cs.meta deleted file mode 100644 index 3bc8e30f..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/IRemoteTestResultDataFactory.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 874c0713cdc44f549b0161750b48d2c2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/PlayerConnectionMessageIds.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/PlayerConnectionMessageIds.cs deleted file mode 100644 index 162ad0b5..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/PlayerConnectionMessageIds.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; - -namespace UnityEngine.TestRunner.TestLaunchers -{ - internal static class PlayerConnectionMessageIds - { - public static Guid runStartedMessageId { get { return new Guid("6a7f53dd-4672-461d-a7b5-9467e9393fd3"); } } - public static Guid runFinishedMessageId { get { return new Guid("ffb622fc-34ad-4901-8d7b-47fb04b0bdd4"); } } - public static Guid testStartedMessageId { get { return new Guid("b54d241e-d88d-4dba-8c8f-ee415d11c030"); } } - public static Guid testFinishedMessageId { get { return new Guid("72f7b7f4-6829-4cd1-afde-78872b9d5adc"); } } - public static Guid quitPlayerMessageId { get { return new Guid("ab44bfe0-bb50-4ee6-9977-69d2ea6bb3a0"); } } - public static Guid playerAliveHeartbeat { get { return new Guid("8c0c307b-f7fd-4216-8623-35b4b3f55fb6"); } } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/PlayerConnectionMessageIds.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/PlayerConnectionMessageIds.cs.meta deleted file mode 100644 index bf86f7ec..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/PlayerConnectionMessageIds.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 41d60936b62cc6d4ca7fe628b22b0e40 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestData.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestData.cs deleted file mode 100644 index 6559b451..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestData.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Linq; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using UnityEngine.TestRunner.NUnitExtensions; - -namespace UnityEngine.TestRunner.TestLaunchers -{ - [Serializable] - internal class RemoteTestData - { - public string id; - public string name; - public string fullName; - public int testCaseCount; - public int ChildIndex; - public bool hasChildren; - public bool isSuite; - public string[] childrenIds; - public int testCaseTimeout; - public string[] Categories; - public bool IsTestAssembly; - public RunState RunState; - public string Description; - public string SkipReason; - public string ParentId; - public string UniqueName; - public string ParentUniqueName; - public string ParentFullName; - - internal RemoteTestData(ITest test) - { - id = test.Id; - name = test.Name; - fullName = test.FullName; - testCaseCount = test.TestCaseCount; - ChildIndex = -1; - if (test.Properties["childIndex"].Count > 0) - { - ChildIndex = (int)test.Properties["childIndex"][0]; - } - hasChildren = test.HasChildren; - isSuite = test.IsSuite; - childrenIds = test.Tests.Select(t => t.Id).ToArray(); - Categories = test.GetAllCategoriesFromTest().ToArray(); - IsTestAssembly = test is TestAssembly; - RunState = (RunState)Enum.Parse(typeof(RunState), test.RunState.ToString()); - Description = (string)test.Properties.Get(PropertyNames.Description); - SkipReason = test.GetSkipReason(); - ParentId = test.GetParentId(); - UniqueName = test.GetUniqueName(); - ParentUniqueName = test.GetParentUniqueName(); - ParentFullName = test.GetParentFullName(); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestData.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestData.cs.meta deleted file mode 100644 index 0c286dcd..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b135ec222fdcd11468014c90d11d6821 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultData.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultData.cs deleted file mode 100644 index 90f82a42..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultData.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework.Interfaces; - -namespace UnityEngine.TestRunner.TestLaunchers -{ - [Serializable] - internal class RemoteTestResultData - { - public string testId; - public string name; - public string fullName; - public string resultState; - public TestStatus testStatus; - public double duration; - public DateTime startTime; - public DateTime endTime; - public string message; - public string stackTrace; - public int assertCount; - public int failCount; - public int passCount; - public int skipCount; - public int inconclusiveCount; - public bool hasChildren; - public string output; - public string xml; - public string[] childrenIds; - - internal RemoteTestResultData(ITestResult result) - { - testId = result.Test.Id; - name = result.Name; - fullName = result.FullName; - resultState = result.ResultState.ToString(); - testStatus = result.ResultState.Status; - duration = result.Duration; - startTime = result.StartTime; - endTime = result.EndTime; - message = result.Message; - stackTrace = result.StackTrace; - assertCount = result.AssertCount; - failCount = result.FailCount; - passCount = result.PassCount; - skipCount = result.SkipCount; - inconclusiveCount = result.InconclusiveCount; - hasChildren = result.HasChildren; - output = result.Output; - xml = result.ToXml(true).OuterXml; - childrenIds = result.Children.Select(child => child.Test.Id).ToArray(); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultData.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultData.cs.meta deleted file mode 100644 index a213e6be..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 03e4d63665d06f04c8a6cf68133c1592 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataFactory.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataFactory.cs deleted file mode 100644 index 0b3cd035..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataFactory.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework.Interfaces; -using UnityEngine.TestRunner.NUnitExtensions.Runner; - -namespace UnityEngine.TestRunner.TestLaunchers -{ - internal class RemoteTestResultDataFactory : IRemoteTestResultDataFactory - { - public RemoteTestResultDataWithTestData CreateFromTestResult(ITestResult result) - { - var tests = CreateTestDataList(result.Test); - tests.First().testCaseTimeout = UnityTestExecutionContext.CurrentContext.TestCaseTimeout; - return new RemoteTestResultDataWithTestData() - { - results = CreateTestResultDataList(result), - tests = tests - }; - } - - public RemoteTestResultDataWithTestData CreateFromTest(ITest test) - { - var tests = CreateTestDataList(test); - if (UnityTestExecutionContext.CurrentContext != null) - { - tests.First().testCaseTimeout = UnityTestExecutionContext.CurrentContext.TestCaseTimeout; - } - - return new RemoteTestResultDataWithTestData() - { - tests = tests - }; - } - - private RemoteTestData[] CreateTestDataList(ITest test) - { - var list = new List(); - list.Add(new RemoteTestData(test)); - list.AddRange(test.Tests.SelectMany(CreateTestDataList)); - return list.ToArray(); - } - - private static RemoteTestResultData[] CreateTestResultDataList(ITestResult result) - { - var list = new List(); - list.Add(new RemoteTestResultData(result)); - list.AddRange(result.Children.SelectMany(CreateTestResultDataList)); - return list.ToArray(); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataFactory.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataFactory.cs.meta deleted file mode 100644 index bc0dd7c9..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataFactory.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 826b6becaef90fb458eedebe4c2f3664 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataWithTestData.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataWithTestData.cs deleted file mode 100644 index 36124cc7..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataWithTestData.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework.Interfaces; -using UnityEngine.TestRunner.NUnitExtensions.Runner; - -namespace UnityEngine.TestRunner.TestLaunchers -{ - [Serializable] - internal class RemoteTestResultDataWithTestData - { - public RemoteTestResultData[] results; - public RemoteTestData[] tests; - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataWithTestData.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataWithTestData.cs.meta deleted file mode 100644 index ffab8f68..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataWithTestData.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 475e3699f219c854f8581a9838135002 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/SynchronousFilter.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/SynchronousFilter.cs deleted file mode 100644 index 525da47a..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/SynchronousFilter.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System.Collections; -using System.Linq; -using System.Reflection; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; - -namespace UnityEngine.TestTools.TestRunner.GUI -{ - class SynchronousFilter : ITestFilter - { - public TNode ToXml(bool recursive) - { - return new TNode("synchronousOnly"); - } - - public TNode AddToXml(TNode parentNode, bool recursive) - { - return parentNode.AddElement("synchronousOnly"); - } - - public bool Pass(ITest test) - { - if (test.Method == null) - return true; - - if (test.Method.ReturnType.Type == typeof(IEnumerator)) - return false; - - if (test.Method.GetCustomAttributes(true).Any()) - return false; - - if (test.TypeInfo?.Type != null) - { - if (Reflect.GetMethodsWithAttribute(test.TypeInfo.Type, typeof(UnitySetUpAttribute), true) - .Any(mi => mi.ReturnType == typeof(System.Collections.IEnumerator))) - return false; - - if (Reflect.GetMethodsWithAttribute(test.TypeInfo.Type, typeof(UnityTearDownAttribute), true) - .Any(mi => mi.ReturnType == typeof(System.Collections.IEnumerator))) - return false; - } - - return true; - } - - public bool IsExplicitMatch(ITest test) - { - return Pass(test); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/SynchronousFilter.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/SynchronousFilter.cs.meta deleted file mode 100644 index 08c6010a..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/SynchronousFilter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b9aec9d3b0a86466ab4647d01e8fc87d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/TestEnumeratorWrapper.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/TestEnumeratorWrapper.cs deleted file mode 100644 index 5ed2ec84..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/TestEnumeratorWrapper.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using System.Collections; -using System.Reflection; -using NUnit.Framework; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; - -namespace UnityEngine.TestTools.TestRunner -{ - internal class TestEnumeratorWrapper - { - private readonly TestMethod m_TestMethod; - - public TestEnumeratorWrapper(TestMethod testMethod) - { - m_TestMethod = testMethod; - } - - public IEnumerator GetEnumerator(ITestExecutionContext context) - { - if (m_TestMethod.Method.ReturnType.Type == typeof(IEnumerator)) - { - return HandleEnumerableTest(context); - } - var message = string.Format("Return type {0} of {1} in {2} is not supported.", - m_TestMethod.Method.ReturnType, m_TestMethod.Method.Name, m_TestMethod.Method.TypeInfo.FullName); - if (m_TestMethod.Method.ReturnType.Type == typeof(IEnumerable)) - { - message += "\nDid you mean IEnumerator?"; - } - throw new InvalidSignatureException(message); - } - - private IEnumerator HandleEnumerableTest(ITestExecutionContext context) - { - try - { - return m_TestMethod.Method.MethodInfo.Invoke(context.TestObject, m_TestMethod.parms != null ? m_TestMethod.parms.OriginalArguments : null) as IEnumerator; - } - catch (TargetInvocationException e) - { - if (e.InnerException is IgnoreException) - { - context.CurrentResult.SetResult(ResultState.Ignored, e.InnerException.Message); - return null; - } - throw; - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/TestEnumeratorWrapper.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/TestEnumeratorWrapper.cs.meta deleted file mode 100644 index f19ee3e3..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/TestEnumeratorWrapper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9ad0b0c865b01af4ca1b414689e71259 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/TestListenerWrapper.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/TestListenerWrapper.cs deleted file mode 100644 index ffa23de5..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/TestListenerWrapper.cs +++ /dev/null @@ -1,30 +0,0 @@ -using NUnit.Framework.Interfaces; - -namespace UnityEngine.TestTools.TestRunner -{ - internal class TestListenerWrapper : ITestListener - { - private readonly TestFinishedEvent m_TestFinishedEvent; - private readonly TestStartedEvent m_TestStartedEvent; - - public TestListenerWrapper(TestStartedEvent testStartedEvent, TestFinishedEvent testFinishedEvent) - { - m_TestStartedEvent = testStartedEvent; - m_TestFinishedEvent = testFinishedEvent; - } - - public void TestStarted(ITest test) - { - m_TestStartedEvent.Invoke(test); - } - - public void TestFinished(ITestResult result) - { - m_TestFinishedEvent.Invoke(result); - } - - public void TestOutput(TestOutput output) - { - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/TestListenerWrapper.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/TestListenerWrapper.cs.meta deleted file mode 100644 index aefe0393..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/TestListenerWrapper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 73deb9b8722aa284eab27c4dc90956c6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/TestPlatform.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/TestPlatform.cs deleted file mode 100644 index 21a6ec2b..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/TestPlatform.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; - -namespace UnityEngine.TestTools -{ - [Flags] - [Serializable] - public enum TestPlatform : byte - { - All = 0xFF, - EditMode = 1 << 1, - PlayMode = 1 << 2 - } - - internal static class TestPlatformEnumExtensions - { - public static bool IsFlagIncluded(this TestPlatform flags, TestPlatform flag) - { - return (flags & flag) == flag; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/TestPlatform.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/TestPlatform.cs.meta deleted file mode 100644 index 6eb087a7..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/TestPlatform.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 743879b4db4bc1a4b829aae4386f4acf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/TestRunnerFilter.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/TestRunnerFilter.cs deleted file mode 100644 index dd176d54..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/TestRunnerFilter.cs +++ /dev/null @@ -1,203 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text.RegularExpressions; -using System.IO; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Filters; -using UnityEngine.TestRunner.NUnitExtensions.Filters; - -namespace UnityEngine.TestTools.TestRunner.GUI -{ - [Serializable] - internal class TestRunnerFilter - { -#pragma warning disable 649 - public string[] assemblyNames; - public string[] groupNames; - public string[] categoryNames; - public static TestRunnerFilter empty = new TestRunnerFilter(); - public string[] testNames; - public int testRepetitions = 1; - public bool synchronousOnly = false; - - public static string AssemblyNameFromPath(string path) - { - string output = Path.GetFileName(path); - if (output != null && output.EndsWith(".dll", StringComparison.OrdinalIgnoreCase)) - return output.Substring(0, output.Length - 4); - return output; - } - - private bool CategoryMatches(IEnumerable categories) - { - if (categoryNames == null || categoryNames.Length == 0) - return true; - - foreach (string category in categories) - { - if (categoryNames.Contains(category)) - return true; - } - - return false; - } - - private bool IDMatchesAssembly(string id) - { - if (AreOptionalFiltersEmpty()) - return true; - - if (assemblyNames == null || assemblyNames.Length == 0) - return true; - - int openingBracket = id.IndexOf('['); - int closingBracket = id.IndexOf(']'); - if (openingBracket >= 0 && openingBracket < id.Length && closingBracket > openingBracket && openingBracket < id.Length) - { - //Some assemblies are absolute and explicitly part of the test ID e.g. - //"[/path/to/assembly-name.dll][rest of ID ...]" - //While some are minimal assembly names e.g. - //"[assembly-name][rest of ID ...]" - //Strip them down to just the assembly name - string assemblyNameFromID = AssemblyNameFromPath(id.Substring(openingBracket + 1, closingBracket - openingBracket - 1)); - foreach (string assemblyName in assemblyNames) - { - if (assemblyName.Equals(assemblyNameFromID, StringComparison.OrdinalIgnoreCase)) - return true; - } - } - return false; - } - - private bool NameMatches(string name) - { - if (AreOptionalFiltersEmpty()) - return true; - - if (groupNames == null || groupNames.Length == 0) - return true; - - foreach (var nameFromFilter in groupNames) - { - //Strict regex match for test group name on its own - if (Regex.IsMatch(name, nameFromFilter)) - return true; - //Match test names that end with parametrized test values and full nunit generated test names that have . separators - var regex = nameFromFilter.TrimEnd('$') + @"[\.|\(.*\)]"; - if (Regex.IsMatch(name, regex)) - return true; - } - return false; - } - - private bool AreOptionalFiltersEmpty() - { - if (assemblyNames != null && assemblyNames.Length != 0) - return false; - if (groupNames != null && groupNames.Length != 0) - return false; - if (testNames != null && testNames.Length != 0) - return false; - return true; - } - - private bool NameMatchesExactly(string name) - { - if (AreOptionalFiltersEmpty()) - return true; - - if (testNames == null || testNames.Length == 0) - return true; - - foreach (var exactName in testNames) - { - if (name == exactName) - return true; - } - return false; - } - - private static void ClearAncestors(IEnumerable newResultList, string parentID) - { - if (string.IsNullOrEmpty(parentID)) - return; - foreach (var result in newResultList) - { - if (result.Id == parentID) - { - result.Clear(); - ClearAncestors(newResultList, result.ParentId); - break; - } - } - } - - public void ClearResults(List newResultList) - { - foreach (var result in newResultList) - { - if (!result.IsSuite && CategoryMatches(result.Categories)) - { - if (IDMatchesAssembly(result.Id) && NameMatches(result.FullName) && NameMatchesExactly(result.FullName)) - { - result.Clear(); - ClearAncestors(newResultList, result.ParentId); - } - } - } - } - - public ITestFilter BuildNUnitFilter() - { - var filters = new List(); - - if (testNames != null && testNames.Length != 0) - { - var nameFilter = new OrFilter(testNames.Select(n => new FullNameFilter(n)).ToArray()); - filters.Add(nameFilter); - } - - if (groupNames != null && groupNames.Length != 0) - { - var exactNamesFilter = new OrFilter(groupNames.Select(n => - { - var f = new FullNameFilter(n); - f.IsRegex = true; - return f; - }).ToArray()); - filters.Add(exactNamesFilter); - } - - if (assemblyNames != null && assemblyNames.Length != 0) - { - var assemblyFilter = new OrFilter(assemblyNames.Select(c => new AssemblyNameFilter(c)).ToArray()); - filters.Add(assemblyFilter); - } - - if (categoryNames != null && categoryNames.Length != 0) - { - var categoryFilter = new OrFilter(categoryNames.Select(c => new CategoryFilterExtended(c) {IsRegex = true}).ToArray()); - filters.Add(categoryFilter); - } - - if (synchronousOnly) - { - filters.Add(new SynchronousFilter()); - } - - return filters.Count == 0 ? TestFilter.Empty : new AndFilter(filters.ToArray()); - } - - internal interface IClearableResult - { - string Id { get; } - string FullName { get; } - string ParentId { get; } - bool IsSuite { get; } - List Categories { get; } - void Clear(); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/TestRunnerFilter.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/TestRunnerFilter.cs.meta deleted file mode 100644 index 5f9aa3b6..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/TestRunner/TestRunnerFilter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a025ba7ee40d0104db8d08b1d9eabb0d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/UnityEngine.TestRunner.asmdef b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/UnityEngine.TestRunner.asmdef deleted file mode 100644 index 6dc17daa..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/UnityEngine.TestRunner.asmdef +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "UnityEngine.TestRunner", - "references": [], - "includePlatforms": [], - "excludePlatforms": [], - "allowUnsafeCode": false, - "overrideReferences": true, - "precompiledReferences": [ - "nunit.framework.dll" - ], - "autoReferenced": false, - "defineConstraints": [] -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/UnityEngine.TestRunner.asmdef.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/UnityEngine.TestRunner.asmdef.meta deleted file mode 100644 index a2002fd6..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/UnityEngine.TestRunner.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 27619889b8ba8c24980f49ee34dbb44a -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils.meta deleted file mode 100644 index d9503ad3..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: bb32bccaf32a6db448d1c0cc99c78688 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider.meta deleted file mode 100644 index a8326f06..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 51557afa652635743b264a309f0a5c60 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyLoadProxy.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyLoadProxy.cs deleted file mode 100644 index 9edc5171..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyLoadProxy.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Reflection; - -namespace UnityEngine.TestTools.Utils -{ - internal class AssemblyLoadProxy : IAssemblyLoadProxy - { - public IAssemblyWrapper Load(string assemblyString) - { - return new AssemblyWrapper(Assembly.Load(assemblyString)); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyLoadProxy.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyLoadProxy.cs.meta deleted file mode 100644 index 8bb527d9..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyLoadProxy.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fb593906b7b6d824087dcaebf6c082e0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyWrapper.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyWrapper.cs deleted file mode 100644 index cb46f1b6..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyWrapper.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Reflection; - -namespace UnityEngine.TestTools.Utils -{ - internal class AssemblyWrapper : IAssemblyWrapper - { - public AssemblyWrapper(Assembly assembly) - { - Assembly = assembly; - } - - public Assembly Assembly { get; } - - public virtual string Location - { - get - { - //Some platforms dont support this - throw new NotImplementedException(); - } - } - - public virtual AssemblyName[] GetReferencedAssemblies() - { - //Some platforms dont support this - throw new NotImplementedException(); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyWrapper.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyWrapper.cs.meta deleted file mode 100644 index 1e4a7184..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyWrapper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2e3b9bbf2c1a3cd4f88883ca32882ec6 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyLoadProxy.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyLoadProxy.cs deleted file mode 100644 index feffa62e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyLoadProxy.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace UnityEngine.TestTools.Utils -{ - internal interface IAssemblyLoadProxy - { - IAssemblyWrapper Load(string assemblyString); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyLoadProxy.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyLoadProxy.cs.meta deleted file mode 100644 index 284d33b0..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyLoadProxy.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 12dfd4bdbb5c8e6419432fbc54ef25d9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyWrapper.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyWrapper.cs deleted file mode 100644 index 145c682d..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyWrapper.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Reflection; - -namespace UnityEngine.TestTools.Utils -{ - internal interface IAssemblyWrapper - { - Assembly Assembly { get; } - string Location { get; } - AssemblyName[] GetReferencedAssemblies(); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyWrapper.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyWrapper.cs.meta deleted file mode 100644 index 486888d5..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyWrapper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1c5afe945b715e149a70113a4be7b32a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/IScriptingRuntimeProxy.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/IScriptingRuntimeProxy.cs deleted file mode 100644 index 0dc2b7f3..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/IScriptingRuntimeProxy.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace UnityEngine.TestTools.Utils -{ - internal interface IScriptingRuntimeProxy - { - string[] GetAllUserAssemblies(); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/IScriptingRuntimeProxy.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/IScriptingRuntimeProxy.cs.meta deleted file mode 100644 index 85ae9850..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/IScriptingRuntimeProxy.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fe4aef60e4ace544c8430da8ef8acba2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/ITestAssemblyProvider.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/ITestAssemblyProvider.cs deleted file mode 100644 index 74f27692..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/ITestAssemblyProvider.cs +++ /dev/null @@ -1,10 +0,0 @@ -using NUnit.Framework.Interfaces; - -namespace UnityEngine.TestTools.Utils -{ - internal interface ITestAssemblyProvider - { - ITest GetTestsWithNUnit(); - IAssemblyWrapper[] GetUserAssemblies(); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/ITestAssemblyProvider.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/ITestAssemblyProvider.cs.meta deleted file mode 100644 index d7e856b7..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/ITestAssemblyProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c5acba6181d845c4e92146009bd4480f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/PlayerTestAssemblyProvider.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/PlayerTestAssemblyProvider.cs deleted file mode 100644 index bb0aa941..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/PlayerTestAssemblyProvider.cs +++ /dev/null @@ -1,66 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using System.Linq; -using NUnit.Framework.Interfaces; -using UnityEngine.TestTools.NUnitExtensions; - -namespace UnityEngine.TestTools.Utils -{ - internal class PlayerTestAssemblyProvider - { - private IAssemblyLoadProxy m_AssemblyLoadProxy; - private readonly List m_AssembliesToLoad; - - //Cached until domain reload - private static List m_LoadedAssemblies; - - internal PlayerTestAssemblyProvider(IAssemblyLoadProxy assemblyLoadProxy, List assembliesToLoad) - { - m_AssemblyLoadProxy = assemblyLoadProxy; - m_AssembliesToLoad = assembliesToLoad; - LoadAssemblies(); - } - - public ITest GetTestsWithNUnit() - { - return BuildTests(TestPlatform.PlayMode, m_LoadedAssemblies.ToArray()); - } - - public List GetUserAssemblies() - { - return m_LoadedAssemblies; - } - - protected static ITest BuildTests(TestPlatform testPlatform, IAssemblyWrapper[] assemblies) - { - var settings = UnityTestAssemblyBuilder.GetNUnitTestBuilderSettings(testPlatform); - var builder = new UnityTestAssemblyBuilder(); - return builder.Build(assemblies.Select(a => a.Assembly).ToArray(), Enumerable.Repeat(testPlatform, assemblies.Length).ToArray(), settings); - } - - private void LoadAssemblies() - { - if (m_LoadedAssemblies != null) - { - return; - } - - m_LoadedAssemblies = new List(); - - foreach (var userAssembly in m_AssembliesToLoad) - { - IAssemblyWrapper a; - try - { - a = m_AssemblyLoadProxy.Load(userAssembly); - } - catch (FileNotFoundException) - { - continue; - } - if (a != null) - m_LoadedAssemblies.Add(a); - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/PlayerTestAssemblyProvider.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/PlayerTestAssemblyProvider.cs.meta deleted file mode 100644 index ffee12cf..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/PlayerTestAssemblyProvider.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 43a3aec217baa9644a7cf34b5f93fed9 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/ScriptingRuntimeProxy.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/ScriptingRuntimeProxy.cs deleted file mode 100644 index 0f1eb2bc..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/ScriptingRuntimeProxy.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace UnityEngine.TestTools.Utils -{ - internal class ScriptingRuntimeProxy : IScriptingRuntimeProxy - { - public string[] GetAllUserAssemblies() - { - return ScriptingRuntime.GetAllUserAssemblies(); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/ScriptingRuntimeProxy.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/ScriptingRuntimeProxy.cs.meta deleted file mode 100644 index 7b16cb9f..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AssemblyProvider/ScriptingRuntimeProxy.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f3a361a6ad1aff14ba8f48976e94ad76 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AttributeHelper.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AttributeHelper.cs deleted file mode 100644 index 7d710cb8..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AttributeHelper.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.IO; -using System.Linq; - -namespace UnityEngine.TestTools -{ - internal static class AttributeHelper - { - internal static Type GetTargetClassFromName(string targetClassName, Type attributeInterface) - { - Type targetClass = null; - foreach (var assemblyName in ScriptingRuntime.GetAllUserAssemblies()) - { - // we need to pass the assembly name without the .dll extension, so removing that first - var name = Path.GetFileNameWithoutExtension(assemblyName); - targetClass = Type.GetType(targetClassName + "," + name); - if (targetClass != null) - break; - } - - if (targetClass == null) - { - Debug.LogWarningFormat("Class type not found: " + targetClassName); - return null; - } - - ValidateTargetClass(targetClass, attributeInterface); - return targetClass; - } - - private static void ValidateTargetClass(Type targetClass, Type attributeInterface) - { - var constructorInfos = targetClass.GetConstructors(); - if (constructorInfos.All(constructor => constructor.GetParameters().Length != 0)) - { - Debug.LogWarningFormat("{0} does not implement default constructor", targetClass.Name); - } - - if (!attributeInterface.IsAssignableFrom(targetClass)) - { - Debug.LogWarningFormat("{0} does not implement {1}", targetClass.Name, attributeInterface.Name); - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AttributeHelper.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AttributeHelper.cs.meta deleted file mode 100644 index cc47e6f1..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/AttributeHelper.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ae8ce3ffe04ac2c42945fd27e0291fc3 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/ColorEqualityComparer.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/ColorEqualityComparer.cs deleted file mode 100644 index 073aa086..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/ColorEqualityComparer.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Collections.Generic; - -namespace UnityEngine.TestTools.Utils -{ - public class ColorEqualityComparer : IEqualityComparer - { - private const float k_DefaultError = 0.01f; - private readonly float AllowedError; - - - private static readonly ColorEqualityComparer m_Instance = new ColorEqualityComparer(); - public static ColorEqualityComparer Instance { get { return m_Instance; } } - - private ColorEqualityComparer() : this(k_DefaultError) - { - } - - public ColorEqualityComparer(float error) - { - this.AllowedError = error; - } - - public bool Equals(Color expected, Color actual) - { - return Utils.AreFloatsEqualAbsoluteError(expected.r, actual.r, AllowedError) && - Utils.AreFloatsEqualAbsoluteError(expected.g, actual.g, AllowedError) && - Utils.AreFloatsEqualAbsoluteError(expected.b, actual.b, AllowedError) && - Utils.AreFloatsEqualAbsoluteError(expected.a, actual.a, AllowedError); - } - - public int GetHashCode(Color color) - { - return 0; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/ColorEqualityComparer.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/ColorEqualityComparer.cs.meta deleted file mode 100644 index 42da0754..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/ColorEqualityComparer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d6105bc8cf5ce544487daca4cbc62583 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/CoroutineRunner.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/CoroutineRunner.cs deleted file mode 100644 index db4d769e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/CoroutineRunner.cs +++ /dev/null @@ -1,103 +0,0 @@ -using System; -using System.Collections; -using NUnit.Framework.Internal; -using UnityEngine.TestRunner.NUnitExtensions.Runner; - -namespace UnityEngine.TestTools.Utils -{ - internal class CoroutineRunner - { - private bool m_Running; - private bool m_TestFailed; - private bool m_Timeout; - private readonly MonoBehaviour m_Controller; - private readonly UnityTestExecutionContext m_Context; - private Coroutine m_TimeOutCoroutine; - private IEnumerator m_TestCoroutine; - - internal const int k_DefaultTimeout = 1000 * 180; - - public CoroutineRunner(MonoBehaviour playmodeTestsController, UnityTestExecutionContext context) - { - m_Controller = playmodeTestsController; - m_Context = context; - } - - public IEnumerator HandleEnumerableTest(IEnumerator testEnumerator) - { - if (m_Context.TestCaseTimeout == 0) - { - m_Context.TestCaseTimeout = k_DefaultTimeout; - } - do - { - if (!m_Running) - { - m_Running = true; - m_TestCoroutine = ExMethod(testEnumerator, m_Context.TestCaseTimeout); - m_Controller.StartCoroutine(m_TestCoroutine); - } - if (m_TestFailed) - { - StopAllRunningCoroutines(); - yield break; - } - - if (m_Context.ExecutionStatus == TestExecutionStatus.StopRequested || m_Context.ExecutionStatus == TestExecutionStatus.AbortRequested) - { - StopAllRunningCoroutines(); - yield break; - } - yield return null; - } - while (m_Running); - } - - private void StopAllRunningCoroutines() - { - if (m_TimeOutCoroutine != null) - { - m_Controller.StopCoroutine(m_TimeOutCoroutine); - } - - if (m_TestCoroutine != null) - { - m_Controller.StopCoroutine(m_TestCoroutine); - } - } - - private IEnumerator ExMethod(IEnumerator e, int timeout) - { - m_TimeOutCoroutine = m_Controller.StartCoroutine(StartTimer(e, timeout, - () => - { - m_TestFailed = true; - m_Timeout = true; - m_Running = false; - })); - - yield return m_Controller.StartCoroutine(e); - m_Controller.StopCoroutine(m_TimeOutCoroutine); - m_Running = false; - } - - private IEnumerator StartTimer(IEnumerator coroutineToBeKilled, int timeout, Action onTimeout) - { - yield return new WaitForSecondsRealtime(timeout / 1000f); - if (coroutineToBeKilled != null) - m_Controller.StopCoroutine(coroutineToBeKilled); - if (onTimeout != null) - onTimeout(); - } - - public bool HasFailedWithTimeout() - { - return m_Timeout; - } - - public int GetDefaultTimeout() - { - return k_DefaultTimeout; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/CoroutineRunner.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/CoroutineRunner.cs.meta deleted file mode 100644 index 756d54ee..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/CoroutineRunner.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 24a158219395ebf44a60547b97784ddc -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/FloatEqualityComparer.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/FloatEqualityComparer.cs deleted file mode 100644 index 58438a7e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/FloatEqualityComparer.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Collections.Generic; - -namespace UnityEngine.TestTools.Utils -{ - public class FloatEqualityComparer : IEqualityComparer - { - private const float k_DefaultError = 0.0001f; - private readonly float AllowedError; - - private static readonly FloatEqualityComparer m_Instance = new FloatEqualityComparer(); - public static FloatEqualityComparer Instance { get { return m_Instance; } } - - private FloatEqualityComparer() : this(k_DefaultError) {} - - public FloatEqualityComparer(float allowedError) - { - this.AllowedError = allowedError; - } - - public bool Equals(float expected, float actual) - { - return Utils.AreFloatsEqual(expected, actual, AllowedError); - } - - public int GetHashCode(float value) - { - return 0; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/FloatEqualityComparer.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/FloatEqualityComparer.cs.meta deleted file mode 100644 index 74971310..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/FloatEqualityComparer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: af5042802f06c804c8abddd544b77a4a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/IOuterUnityTestAction.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/IOuterUnityTestAction.cs deleted file mode 100644 index ff0fe77d..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/IOuterUnityTestAction.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Collections; -using NUnit.Framework.Interfaces; - -namespace UnityEngine.TestTools -{ - /// - /// When implemented by an attribute, this interface implemented to provide actions to execute before setup and after teardown of tests. - /// - public interface IOuterUnityTestAction - { - /// Executed before each test is run - /// The test that is going to be run. - IEnumerator BeforeTest(ITest test); - - /// Executed after each test is run - /// The test that has just been run. - IEnumerator AfterTest(ITest test); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/IOuterUnityTestAction.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/IOuterUnityTestAction.cs.meta deleted file mode 100644 index 93429d44..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/IOuterUnityTestAction.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: b9c2a6302985d3846b7b9f6fd9e2da9a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/IPostBuildCleanup.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/IPostBuildCleanup.cs deleted file mode 100644 index 489357c3..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/IPostBuildCleanup.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace UnityEngine.TestTools -{ - public interface IPostBuildCleanup - { - void Cleanup(); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/IPostBuildCleanup.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/IPostBuildCleanup.cs.meta deleted file mode 100644 index f1cb9a92..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/IPostBuildCleanup.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: ff67c526455160f4690a44f74dee4cbe -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/IPrebuildSceneSetup.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/IPrebuildSceneSetup.cs deleted file mode 100644 index 3920b0bb..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/IPrebuildSceneSetup.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace UnityEngine.TestTools -{ - public interface IPrebuildSetup - { - void Setup(); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/IPrebuildSceneSetup.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/IPrebuildSceneSetup.cs.meta deleted file mode 100644 index 77dff879..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/IPrebuildSceneSetup.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: acc16f0c684508f44813662a300c574b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/ITestRunCallback.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/ITestRunCallback.cs deleted file mode 100644 index d2944fc6..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/ITestRunCallback.cs +++ /dev/null @@ -1,12 +0,0 @@ -using NUnit.Framework.Interfaces; - -namespace UnityEngine.TestRunner -{ - public interface ITestRunCallback - { - void RunStarted(ITest testsToRun); - void RunFinished(ITestResult testResults); - void TestStarted(ITest test); - void TestFinished(ITestResult result); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/ITestRunCallback.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/ITestRunCallback.cs.meta deleted file mode 100644 index 09f6f53d..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/ITestRunCallback.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 38d0b8a87b967304da08a2ae9b955066 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/MonoBehaviourTest.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/MonoBehaviourTest.meta deleted file mode 100644 index 5da2eb98..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/MonoBehaviourTest.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: ce8da628f68c7594b8b9a597fa52db7b -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/MonoBehaviourTest/IMonoBehaviourTest.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/MonoBehaviourTest/IMonoBehaviourTest.cs deleted file mode 100644 index 334da4c3..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/MonoBehaviourTest/IMonoBehaviourTest.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace UnityEngine.TestTools -{ - public interface IMonoBehaviourTest - { - bool IsTestFinished {get; } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/MonoBehaviourTest/IMonoBehaviourTest.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/MonoBehaviourTest/IMonoBehaviourTest.cs.meta deleted file mode 100644 index 9af40042..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/MonoBehaviourTest/IMonoBehaviourTest.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a002d3737b873954395b7cf862873ab8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/MonoBehaviourTest/MonoBehaviourTest.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/MonoBehaviourTest/MonoBehaviourTest.cs deleted file mode 100644 index e0b6372c..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/MonoBehaviourTest/MonoBehaviourTest.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace UnityEngine.TestTools -{ - public class MonoBehaviourTest : CustomYieldInstruction where T : MonoBehaviour, IMonoBehaviourTest - { - public T component { get; } - public GameObject gameObject { get { return component.gameObject; } } - - public MonoBehaviourTest(bool dontDestroyOnLoad = true) - { - var go = new GameObject("MonoBehaviourTest: " + typeof(T).FullName); - component = go.AddComponent(); - if (dontDestroyOnLoad) - { - Object.DontDestroyOnLoad(go); - } - } - - public override bool keepWaiting - { - get { return !component.IsTestFinished; } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/MonoBehaviourTest/MonoBehaviourTest.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/MonoBehaviourTest/MonoBehaviourTest.cs.meta deleted file mode 100644 index c727f85a..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/MonoBehaviourTest/MonoBehaviourTest.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 164c9b1458eaab743a4b45c37a4d720d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/PostBuildCleanupAttribute.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/PostBuildCleanupAttribute.cs deleted file mode 100644 index 2b91efbd..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/PostBuildCleanupAttribute.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; - -namespace UnityEngine.TestTools -{ - [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method)] - public class PostBuildCleanupAttribute : Attribute - { - public PostBuildCleanupAttribute(Type targetClass) - { - TargetClass = targetClass; - } - - public PostBuildCleanupAttribute(string targetClassName) - { - TargetClass = AttributeHelper.GetTargetClassFromName(targetClassName, typeof(IPostBuildCleanup)); - } - - internal Type TargetClass { get; private set; } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/PostBuildCleanupAttribute.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/PostBuildCleanupAttribute.cs.meta deleted file mode 100644 index b45a7a66..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/PostBuildCleanupAttribute.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 621fd19bcb071b64aa1d68f0271aa780 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/PrebuildSceneSetupAttribute.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/PrebuildSceneSetupAttribute.cs deleted file mode 100644 index 86326fbd..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/PrebuildSceneSetupAttribute.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; - -namespace UnityEngine.TestTools -{ - [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method)] - public class PrebuildSetupAttribute : Attribute - { - public PrebuildSetupAttribute(Type targetClass) - { - TargetClass = targetClass; - } - - public PrebuildSetupAttribute(string targetClassName) - { - TargetClass = AttributeHelper.GetTargetClassFromName(targetClassName, typeof(IPrebuildSetup)); - } - - internal Type TargetClass { get; private set; } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/PrebuildSceneSetupAttribute.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/PrebuildSceneSetupAttribute.cs.meta deleted file mode 100644 index 7b6ae4a8..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/PrebuildSceneSetupAttribute.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d1b7ce919aa8864409412e809073cf96 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/QuaternionEqualityComparer.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/QuaternionEqualityComparer.cs deleted file mode 100644 index 220f1aa9..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/QuaternionEqualityComparer.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Collections.Generic; - -namespace UnityEngine.TestTools.Utils -{ - public class QuaternionEqualityComparer : IEqualityComparer - { - private const float k_DefaultError = 0.00001f; - private readonly float AllowedError; - - private static readonly QuaternionEqualityComparer m_Instance = new QuaternionEqualityComparer(); - public static QuaternionEqualityComparer Instance { get { return m_Instance; } } - - - private QuaternionEqualityComparer() : this(k_DefaultError) {} - - public QuaternionEqualityComparer(float allowedError) - { - AllowedError = allowedError; - } - - public bool Equals(Quaternion expected, Quaternion actual) - { - return Mathf.Abs(Quaternion.Dot(expected, actual)) > (1.0f - AllowedError); - } - - public int GetHashCode(Quaternion quaternion) - { - return 0; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/QuaternionEqualityComparer.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/QuaternionEqualityComparer.cs.meta deleted file mode 100644 index 31faf0c3..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/QuaternionEqualityComparer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 3b28913f21577de429da928d6d05219f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/StacktraceFilter.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/StacktraceFilter.cs deleted file mode 100644 index af431f33..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/StacktraceFilter.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System.Linq; -using System.Text; - -namespace UnityEngine.TestTools.Utils -{ - internal static class StackTraceFilter - { - private static readonly string[] s_FilteredLogMessages = - { - @"UnityEngine.DebugLogHandler:Internal_Log", - @"UnityEngine.DebugLogHandler:Log", - @"UnityEngine.Logger:Log", - @"UnityEngine.Debug" - }; - - private static readonly string[] s_LastMessages = - { - @"System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)", - @"UnityEditor.TestTools.TestRunner.EditModeRunner:InvokeDelegator" - }; - - public static string Filter(string inputStackTrace) - { - int idx; - foreach (var lastMessage in s_LastMessages) - { - idx = inputStackTrace.IndexOf(lastMessage); - if (idx != -1) - inputStackTrace = inputStackTrace.Substring(0, idx); - } - - var inputStackTraceLines = inputStackTrace.Split('\n'); - var result = new StringBuilder(); - foreach (var line in inputStackTraceLines) - { - if (s_FilteredLogMessages.Any(s => line.StartsWith(s))) - continue; - result.AppendLine(line); - } - return result.ToString(); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/StacktraceFilter.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/StacktraceFilter.cs.meta deleted file mode 100644 index 4f837a1a..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/StacktraceFilter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: fc748d99f1f0d484a811a566fc7915ec -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/TestRunCallbackAttribute.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/TestRunCallbackAttribute.cs deleted file mode 100644 index 48561ed0..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/TestRunCallbackAttribute.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; - -namespace UnityEngine.TestRunner -{ - [AttributeUsage(AttributeTargets.Assembly)] - public class TestRunCallbackAttribute : Attribute - { - private Type m_Type; - public TestRunCallbackAttribute(Type type) - { - var interfaceType = typeof(ITestRunCallback); - if (!interfaceType.IsAssignableFrom(type)) - { - throw new ArgumentException(string.Format("Type provided to {0} does not implement {1}", this.GetType().Name, interfaceType.Name)); - } - m_Type = type; - } - - internal ITestRunCallback ConstructCallback() - { - return Activator.CreateInstance(m_Type) as ITestRunCallback; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/TestRunCallbackAttribute.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/TestRunCallbackAttribute.cs.meta deleted file mode 100644 index 06b20189..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/TestRunCallbackAttribute.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 76b3a3296de548f48b0c3d088fb4b490 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/TestRunCallbackListener.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/TestRunCallbackListener.cs deleted file mode 100644 index d4a8c40a..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/TestRunCallbackListener.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using UnityEngine.TestTools.TestRunner; - -namespace UnityEngine.TestRunner.Utils -{ - internal class TestRunCallbackListener : ScriptableObject, ITestRunnerListener - { - private ITestRunCallback[] m_Callbacks; - public void RunStarted(ITest testsToRun) - { - InvokeAllCallbacks(callback => callback.RunStarted(testsToRun)); - } - - private static ITestRunCallback[] GetAllCallbacks() - { - var allAssemblies = AppDomain.CurrentDomain.GetAssemblies(); - allAssemblies = allAssemblies.Where(x => x.GetReferencedAssemblies().Any(z => z.Name == "UnityEngine.TestRunner")).ToArray(); - var attributes = allAssemblies.SelectMany(assembly => assembly.GetCustomAttributes(typeof(TestRunCallbackAttribute), true).OfType()).ToArray(); - return attributes.Select(attribute => attribute.ConstructCallback()).ToArray(); - } - - private void InvokeAllCallbacks(Action invoker) - { - if (m_Callbacks == null) - { - m_Callbacks = GetAllCallbacks(); - } - - foreach (var testRunCallback in m_Callbacks) - { - try - { - invoker(testRunCallback); - } - catch (Exception e) - { - Debug.LogException(e); - throw; - } - } - } - - public void RunFinished(ITestResult testResults) - { - InvokeAllCallbacks(callback => callback.RunFinished(testResults)); - } - - public void TestStarted(ITest test) - { - InvokeAllCallbacks(callback => callback.TestStarted(test)); - } - - public void TestFinished(ITestResult result) - { - InvokeAllCallbacks(callback => callback.TestFinished(result)); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/TestRunCallbackListener.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/TestRunCallbackListener.cs.meta deleted file mode 100644 index 77f82eed..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/TestRunCallbackListener.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 68f09f0f82599b5448579854e622a4c1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Utils.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Utils.cs deleted file mode 100644 index bc8b6171..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Utils.cs +++ /dev/null @@ -1,40 +0,0 @@ -using System; - -namespace UnityEngine.TestTools.Utils -{ - public static class Utils - { - public static bool AreFloatsEqual(float expected, float actual, float epsilon) - { - // special case for infinity - if (expected == Mathf.Infinity || actual == Mathf.Infinity || expected == Mathf.NegativeInfinity || actual == Mathf.NegativeInfinity) - return expected == actual; - - // we cover both relative and absolute tolerance with this check - // which is better than just relative in case of small (in abs value) args - // please note that "usually" approximation is used [i.e. abs(x)+abs(y)+1] - // but we speak about test code so we dont care that much about performance - // but we do care about checks being more precise - return Math.Abs(actual - expected) <= epsilon * Mathf.Max(Mathf.Max(Mathf.Abs(actual), Mathf.Abs(expected)), 1.0f); - } - - public static bool AreFloatsEqualAbsoluteError(float expected, float actual, float allowedAbsoluteError) - { - return Math.Abs(actual - expected) <= allowedAbsoluteError; - } - - /// - /// Analogous to GameObject.CreatePrimitive, but creates a primitive mesh renderer with fast shader instead of a default builtin shader. - /// Optimized for testing performance. - /// - /// A GameObject with primitive mesh renderer and collider. - public static GameObject CreatePrimitive(PrimitiveType type) - { - var prim = GameObject.CreatePrimitive(type); - var renderer = prim.GetComponent(); - if (renderer) - renderer.sharedMaterial = new Material(Shader.Find("VertexLit")); - return prim; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Utils.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Utils.cs.meta deleted file mode 100644 index 63b9c66c..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Utils.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9502550ba4785e3499d6c9251fa2114b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector2ComparerWithEqualsOperator.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector2ComparerWithEqualsOperator.cs deleted file mode 100644 index 081a8bbd..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector2ComparerWithEqualsOperator.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Collections.Generic; - -namespace UnityEngine.TestTools.Utils -{ - public class Vector2ComparerWithEqualsOperator : IEqualityComparer - { - private static readonly Vector2ComparerWithEqualsOperator m_Instance = new Vector2ComparerWithEqualsOperator(); - public static Vector2ComparerWithEqualsOperator Instance { get { return m_Instance; } } - - private Vector2ComparerWithEqualsOperator() {} - - public bool Equals(Vector2 expected, Vector2 actual) - { - return expected == actual; - } - - public int GetHashCode(Vector2 vec2) - { - return 0; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector2ComparerWithEqualsOperator.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector2ComparerWithEqualsOperator.cs.meta deleted file mode 100644 index 07662bb3..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector2ComparerWithEqualsOperator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 65701ebe8bada6b4785e9c7afe7f5bee -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector2EqualityComparer.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector2EqualityComparer.cs deleted file mode 100644 index c0cca3f2..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector2EqualityComparer.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System.Collections.Generic; - -namespace UnityEngine.TestTools.Utils -{ - public class Vector2EqualityComparer : IEqualityComparer - { - private const float k_DefaultError = 0.0001f; - private readonly float AllowedError; - - private static readonly Vector2EqualityComparer m_Instance = new Vector2EqualityComparer(); - public static Vector2EqualityComparer Instance { get { return m_Instance; } } - - private Vector2EqualityComparer() : this(k_DefaultError) - { - } - - public Vector2EqualityComparer(float error) - { - this.AllowedError = error; - } - - public bool Equals(Vector2 expected, Vector2 actual) - { - return Utils.AreFloatsEqual(expected.x, actual.x, AllowedError) && - Utils.AreFloatsEqual(expected.y, actual.y, AllowedError); - } - - public int GetHashCode(Vector2 vec2) - { - return 0; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector2EqualityComparer.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector2EqualityComparer.cs.meta deleted file mode 100644 index ed2951a1..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector2EqualityComparer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 58ad09607a0d62d458a78d7174665566 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector3ComparerWithEqualsOperator.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector3ComparerWithEqualsOperator.cs deleted file mode 100644 index ed665c04..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector3ComparerWithEqualsOperator.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Collections.Generic; - -namespace UnityEngine.TestTools.Utils -{ - public class Vector3ComparerWithEqualsOperator : IEqualityComparer - { - private static readonly Vector3ComparerWithEqualsOperator m_Instance = new Vector3ComparerWithEqualsOperator(); - public static Vector3ComparerWithEqualsOperator Instance { get { return m_Instance; } } - - private Vector3ComparerWithEqualsOperator() {} - - public bool Equals(Vector3 expected, Vector3 actual) - { - return expected == actual; - } - - public int GetHashCode(Vector3 vec3) - { - return 0; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector3ComparerWithEqualsOperator.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector3ComparerWithEqualsOperator.cs.meta deleted file mode 100644 index 01662a49..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector3ComparerWithEqualsOperator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5b994928117e3db418da69c821da7e19 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector3EqualityComparer.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector3EqualityComparer.cs deleted file mode 100644 index 47fac4be..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector3EqualityComparer.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Collections.Generic; - - -namespace UnityEngine.TestTools.Utils -{ - public class Vector3EqualityComparer : IEqualityComparer - { - private const float k_DefaultError = 0.0001f; - private readonly float AllowedError; - - private static readonly Vector3EqualityComparer m_Instance = new Vector3EqualityComparer(); - public static Vector3EqualityComparer Instance { get { return m_Instance; } } - - private Vector3EqualityComparer() : this(k_DefaultError) {} - public Vector3EqualityComparer(float allowedError) - { - this.AllowedError = allowedError; - } - - public bool Equals(Vector3 expected, Vector3 actual) - { - return Utils.AreFloatsEqual(expected.x, actual.x, AllowedError) && - Utils.AreFloatsEqual(expected.y, actual.y, AllowedError) && - Utils.AreFloatsEqual(expected.z, actual.z, AllowedError); - } - - public int GetHashCode(Vector3 vec3) - { - return 0; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector3EqualityComparer.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector3EqualityComparer.cs.meta deleted file mode 100644 index 37e0a03e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector3EqualityComparer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4bd2bc28ff24d5c488844851cb785db0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector4ComparerWithEqualsOperator.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector4ComparerWithEqualsOperator.cs deleted file mode 100644 index 1f8d1066..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector4ComparerWithEqualsOperator.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Collections.Generic; - -namespace UnityEngine.TestTools.Utils -{ - public class Vector4ComparerWithEqualsOperator : IEqualityComparer - { - private static readonly Vector4ComparerWithEqualsOperator m_Instance = new Vector4ComparerWithEqualsOperator(); - public static Vector4ComparerWithEqualsOperator Instance { get { return m_Instance; } } - - private Vector4ComparerWithEqualsOperator() {} - - public bool Equals(Vector4 expected, Vector4 actual) - { - return expected == actual; - } - - public int GetHashCode(Vector4 vec4) - { - return 0; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector4ComparerWithEqualsOperator.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector4ComparerWithEqualsOperator.cs.meta deleted file mode 100644 index a23cf663..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector4ComparerWithEqualsOperator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 44100f5f60f351348b9719b46d46cebe -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector4EqualityComparer.cs b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector4EqualityComparer.cs deleted file mode 100644 index 70472421..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector4EqualityComparer.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Collections.Generic; - -namespace UnityEngine.TestTools.Utils -{ - public class Vector4EqualityComparer : IEqualityComparer - { - private const float k_DefaultError = 0.0001f; - private readonly float AllowedError; - - private static readonly Vector4EqualityComparer m_Instance = new Vector4EqualityComparer(); - public static Vector4EqualityComparer Instance { get { return m_Instance; } } - - private Vector4EqualityComparer() : this(k_DefaultError) {} - public Vector4EqualityComparer(float allowedError) - { - this.AllowedError = allowedError; - } - - public bool Equals(Vector4 expected, Vector4 actual) - { - return Utils.AreFloatsEqual(expected.x, actual.x, AllowedError) && - Utils.AreFloatsEqual(expected.y, actual.y, AllowedError) && - Utils.AreFloatsEqual(expected.z, actual.z, AllowedError) && - Utils.AreFloatsEqual(expected.w, actual.w, AllowedError); - } - - public int GetHashCode(Vector4 vec4) - { - return 0; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector4EqualityComparer.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector4EqualityComparer.cs.meta deleted file mode 100644 index 149157d1..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/UnityEngine.TestRunner/Utils/Vector4EqualityComparer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 32da81683c22faf458026716a2b821aa -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/package.json b/Library/PackageCache/com.unity.test-framework@1.1.13/package.json deleted file mode 100644 index 12adfa5e..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "com.unity.test-framework", - "displayName": "Test Framework", - "version": "1.1.13", - "unity": "2019.2", - "unityRelease": "0a10", - "description": "Test framework for running Edit mode and Play mode tests in Unity.", - "keywords": [ - "Test", - "TestFramework" - ], - "category": "Unity Test Framework", - "repository": { - "footprint": "0edbd71b6e546163efc787a25bec5c553ea56f7e", - "type": "git", - "url": "https://github.com/Unity-Technologies/com.unity.test-framework.git", - "revision": "4e23f3669a98972ba72ea8f4af092123c2a8f8ed" - }, - "dependencies": { - "com.unity.ext.nunit": "1.0.0", - "com.unity.modules.imgui": "1.0.0", - "com.unity.modules.jsonserialize": "1.0.0" - }, - "relatedPackages": { - "com.unity.test-framework.tests": "1.1.13" - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.13/package.json.meta b/Library/PackageCache/com.unity.test-framework@1.1.13/package.json.meta deleted file mode 100644 index 63170c30..00000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.13/package.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: d6a2e6e4803de7b43baacdc355fc144d -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/.gitlab-ci.yml b/Library/PackageCache/com.unity.textmeshpro@2.0.1/.gitlab-ci.yml deleted file mode 100644 index 45a43a13..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/.gitlab-ci.yml +++ /dev/null @@ -1,12 +0,0 @@ -image: node:6.10.0 - -stages: - - push_to_packman_staging - -push_to_packman_staging: - stage: push_to_packman_staging - only: - - tags - script: - - curl -u $USER_NAME:$API_KEY https://staging-packages.unity.com/auth > .npmrc - - npm publish diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/CHANGELOG.md b/Library/PackageCache/com.unity.textmeshpro@2.0.1/CHANGELOG.md deleted file mode 100644 index 7b8d9d02..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/CHANGELOG.md +++ /dev/null @@ -1,180 +0,0 @@ -# Changelog -These are the release notes for the TextMesh Pro UPM package which was first introduced with Unity 2018.1. Please see the following link for the Release Notes for prior versions of TextMesh Pro. http://digitalnativestudios.com/forum/index.php?topic=1363.0 - -## [2.0.1] - 2019-05-08 -### Changes -- See Release 1.4.1 -- Requires .Net 4.x Scripting Runtime. - -## [2.0.0] - 2019-03-01 -### Changes -- Same release as 1.4.0 - -## [1.4.1] - 2019-05-08 -### Changes -- Improved handling of automatic Font Asset upgrade to version 1.1.0 which is required to support the new Dynamic SDF system. See Case #1144858 -- Made release compatible with .Net 3.5 Scripting Runtime. -- Added support for Stereo rendering to the TMP SDF Overlay shaders. -- Fixed Caret positioning issue when using IME. Case #1146626 - -## [1.4.0] - 2019-03-07 -### Changes -- Same release as 1.4.0-preview.3a. - -## [1.4.0-preview.3a] - 2019-02-28 -### Changes -- Improved performance of the Project Files GUID Remapping Tool. -- Fixed an issue with the TMP_FontAsset.TryAddCharacters() functions which was resulting in an error when added characters exceeded the capacity of the atlas texture. -- Updated TMP_FontAsset.TryAddCharacters functions to add new overloads returning list of characters that could not be added. -- Added function in OnEnable of FontAsset Editor's to clean up Fallback list to remove any null / empty entries. -- Added support for Stereo rendering to the TMP Distance Field and Mobile Distance Field shaders. - -## [1.4.0-preview.2a] - 2019-02-14 -### Changes -- Fixed an issue with SDF Scale handling where the text object would not render correctly after the object scale had been set to zero. -- Fixed an issue with the TMP_UpdateManager where text objects were not getting unregistered correctly. -- Any changes to Font Asset Creation Settings' padding, atlas width and / or atlas height will now result in all Material Presets for the given font asset to also be updated. -- Added new section in the TMP Settings related to the new Dynamic Font System. -- Added new property in the Dynamic Font System section to determine if OpenType Font Features will be retrieved from source font files at runtime as new characters are added to font assets. Glyph Adjustment Data (Kerning) is the only feature currently supported. -- Fix an issue where font assets created at runtime were not getting their asset version number set to "1.1.0". -- Improved parsing of the text file used in the Font Asset Creator and "Characters from File" option to handle UTF16 "\u" and UTF32 "\U" escape character sequences. -- Fixed a Null Reference Error (NRE) that could occur when using the <font> tag with an invalid font name followed by the <sprite> tag. -- The Glyph Adjustment Table presentation and internal data structure has been changed to facilitate the future addition of OpenType font features. See https://forum.unity.com/threads/version-1-4-0-preview-with-dynamic-sdf-for-unity-2018-3-now-available.622420/#post-4206595 for more details. -- Fixed an issue with the <rotate> tag incorrectly affecting character spacing. - -## [1.4.0-preview.1] - 2019-01-30 -### Changes -- Renamed TMPro_FontUtilities to TMP_FontAssetCommon to more accurately reflect the content of this file. -- Accessing the TextMesh Pro Settings via the new Edit - Settings menu when TMP Essential Resources have not yet been imported in the project will no longer open a new window to provide the options to import these resources. -- Fixed an issue where using int.MaxValue, int.MinValue, float.MaxValue and float.MinValue in conjunction with SetText() would display incorrect numerical values. Case #1078521. -- Added public setter to the TMP Settings' missingGlyphCharacter to allow changing which character will be used for missing characters via scripting. -- Fixed a potential Null Reference Exception related to loading the Default Style Sheet. -- Added compiler conditional to TMP_UpdateManager.cs to address changes to SRP. -- Improved the <margin> tag to make it possible to define both left and right margin values. Example: <margin left=10% right=10px>. -- Added new menu option to allow the quick creation of a UI Button using TMP. New menu option is located in Create - UI - Button (TextMeshPro). -- Renamed TMP related create menu options. -- Fixed TMP object creation handling when using Prefab isolation mode. Case #1077392 -- Fixed another issue related to Prefabs where some serialized properties of the text object would incorrectly show up in the Overrides prefab options. Case #1093101 -- Fixed issue where changing the Sorting Layer or Sorting Order of a object would not dirty the scene. Case #1069776 -- Fixed a text alignment issue when setting text alignment on disabled text objects. Case #1047771 -- Fixed an issue where text object bounds were not set correctly on newly created text objects or in some cases when setting the text to null or string.empty. Case #1093388 -- Fixed an issue in the IntToString() function that could result in Index Out Of Bounds error. Case #1102007 -- Changed the TMP_InputField IsValidChar function to protected virtual. -- The "Allow Rich Text Editing" property of the TMP_InputField is now set to false by default. -- Added new option to the Sprite Asset context menu to make it easier to update sprite glyphs edited via the Unity Sprite Editor. -- Added new Sharpness slider in the Debug section of the SDF Material inspector. -- Fixed an error that would occur when using the context menu Reset on text component. Case #1044726 -- Fixed issue where CharacterInfo.index would be incorrect as a result of using Surrogate Pairs in the text. Case #1037828 -- The TMP_EditorPanel and TMP_UiEditorPanel now have their "UseForChildren" flag set to true to enable user / custom inspectors to inherit from them. -- Fixed an issue where rich text tags using pixel (px) or font units (em) were not correctly accounting for orthographic camera mode. This change only affects the normal TMP text component. -- Fixed an inspector issue related to changes to the margin in the TMP Extra Settings panel. Case #1114253 -- Added new property to Glyph Adjustment Pairs which determines if Character Spacing Adjustments should affect the given pair. -- Updated the Glyph Adjustment Table where ID now represents the unicode (hex) value for the character instead of its decimal value. -- Added new SetValueWithoutNotify() function to TMP_DropDown and SetTextWithoutNotify() function to TMP_InputField allowing these to be set without triggering OnValueChanged event. -- Geometry buffer deallocation which normally takes place when current allocations exceed those of the new text by more than 256 characters will no longer occur if the new text is set to null or string.empty. -- Fixed a minor issue where the underline SDF scale would be incorrect when the underline text sequence contained normal size characters and ended with a subscript or superscript character. -- Fixed an error that would occur when using the Reset Context menu on a Material using the SDF Surface or Mobile SDF Surface Shaders. Case #1122279 -- Resolved a Null Reference Error that would appear when cycling through the text overflow modes. Case #1121624 - -## [1.3.0] - 2018-08-09 -### Changes -- Revamped UI to conform to Unity Human Interface Guidelines. -- Updated the title text on the Font Asset Creator window tab to "Font Asset Creator". -- Using TMP_Text.SetCharArray() with an empty char[] array will now clear the text. -- Made a small improvement to the TMP Input Field when using nested 2d RectMasks. -- Renamed symbol defines used by TMP to append TMP_ in front of the define to avoid potential conflicts with user defines. -- Improved the Project Files GUID Remapping tool to allow specifying a target folder to scan. -- Added the ability to cancel the scanning process used by the Project Files GUID Remapping tool. -- Moved TMP Settings to universal settings window in 2018.3 and above. -- Changing style sheet in the TMP Settings will now be reflected automatically on existing text objects in the editor. -- Added new function TMP_StyleSheet.UpdateStyleSheet() to update the internal reference to which style sheet text objects should be using in conjunction with the style tag. - -## [1.2.4] - 2018-06-10 -### Changes -- Fixed a minor issue when using Justified and Flush alignment in conjunction with \u00A0. -- The Font Asset creationSettings field is no longer an Editor only serialized field. - -## [1.2.3] - 2018-05-29 -### Changes -- Added new bitmap shader with support for Custom Font Atlas texture. This shader also includes a new property "Padding" to provide control over the geometry padding to closely fit a modified / custom font atlas texture. -- Fixed an issue with ForceMeshUpdate(bool ignoreActiveState) not being handled correctly. -- Cleaned up memory allocations from repeated use of the Font Asset Creator. -- Sprites are now scaled based on the current font instead of the primary font asset assigned to the text object. -- It is now possible to recall the most recent settings used when creating a font asset in the Font Asset Creator. -- Newly created font assets now contain the settings used when they were last created. This will make the process of updating / regenerating font assets much easier. -- New context menu "Update Font Asset" was added to the Font Asset inspector which will open the Font Asset Creator with the most recently used settings for that font asset. -- New Context Menu "Create Font Asset" was added to the Font inspector panel which will open the Font Asset Creator with this source font file already selected. -- Fixed 3 compiler warnings that would appear when using .Net 4.x. -- Modified the TMP Settings to place the Missing Glyph options in their own section. -- Renamed a symbol used for internal debugging to avoid potential conflicts with other user project defines. -- TMP Sprite Importer "Create Sprite Asset" and "Save Sprite Asset" options are disabled unless a Sprite Data Source, Import Format and Sprite Texture Atlas are provided. -- Improved the performance of the Project Files GUID Remapping tool. -- Users will now be prompted to import the TMP Essential Resources when using the Font Asset Creator if such resources have not already been imported. - -## [1.2.2] - 2018-03-28 -### Changes -- Calling SetAllDirty() on a TMP text component will now force a regeneration of the text object including re-parsing of the text. -- Fixed potential Null Reference Exception that could occur when assigning a new fallback font asset. -- Removed public from test classes. -- Fixed an issue where using nested links (which doesn't make sense conceptually) would result in an error. Should accidental use of nested links occurs, the last / most nested ends up being used. -- Fixed a potential text alignment issue where an hyphen at the end of a line followed by a new line containing a single word too long to fit the text container would result in miss alignment of the hyphen. -- Updated package license. -- Non-Breaking Space character (0xA0) will now be excluded from word spacing adjustments when using Justified or Flush text alignment. -- Improved handling of Underline, Strikethrough and Mark tag with regards to vertex color and Color tag alpha. -- Improved TMP_FontAsset.HasCharacter(char character, bool searchFallbacks) to include a recursive search of fallbacks as well as TMP Settings fallback list and default font asset. -- The <gradient> tag will now also apply to sprites provided the sprite tint attribute is set to a value of 1. Ex. <sprite="Sprite Asset" index=0 tint=1>. -- Updated Font Asset Creator Plugin to allow for cancellation of the font asset generation process. -- Added callback to support the Scriptable Render Pipeline (SRP) with the normal TextMeshPro component. -- Improved handling of some non-breaking space characters which should not be ignored at the end of a line. -- Sprite Asset fallbacks will now be searched when using the <sprite> tag and referencing a sprite by Unicode or by Name. -- Updated EmojiOne samples from https://www.emojione.com/ and added attribution. -- Removed the 32bit versions of the TMP Plugins used by the Font Asset Creator since the Unity Editor is now only available as 64bit. -- The isTextTruncated property is now serialized. -- Added new event handler to the TMP_TextEventHandler.cs script included in Example 12a to allow tracking of interactions with Sprites. - -## [1.2.1] - 2018-02-14 -### Changes -- Package is now backwards compatible with Unity 2018.1. -- Renamed Assembly Definitions (.asmdef) to new UPM package conventions. -- Added DisplayName for TMP UPM package. -- Revised Editor and Playmode tests to ignore / skip over the tests if the required resources are not present in the project. -- Revised implementation of Font Asset Creator progress bar to use Unity's EditorGUI.ProgressBar instead of custom texture. -- Fixed an issue where using the material tag in conjunction with fallback font assets was not handled correctly. -- Fixed an issue where changing the fontStyle property in conjunction with using alternative typefaces / font weights would not correctly trigger a regeneration of the text object. - -## [1.2.0] - 2018-01-23 -### Changes -- Package version # increased to 1.2.0 which is the first release for Unity 2018.2. - -## [1.1.0] - 2018-01-23 -### Changes -- Package version # increased to 1.1.0 which is the first release for Unity 2018.1. - -## [1.0.27] - 2018-01-16 -### Changes -- Fixed an issue where setting the TMP_InputField.text property to null would result in an error. -- Fixed issue with Raycast Target state not getting serialized properly when saving / reloading a scene. -- Changed reference to PrefabUtility.GetPrefabParent() to PrefabUtility.GetCorrespondingObjectFromSource() to reflect public API change in 2018.2 -- Option to import package essential resources will only be presented to users when accessing a TMP component or the TMP Settings file via the project menu. - -## [1.0.26] - 2018-01-10 -### Added -- Removed Tizen player references in the TMP_InputField as the Tizen player is no longer supported as of Unity 2018.1. - -## [1.0.25] - 2018-01-05 -### Added -- Fixed a minor issue with PreferredValues calculation in conjunction with using text auto-sizing. -- Improved Kerning handling where it is now possible to define positional adjustments for the first and second glyph in the pair. -- Renamed Kerning Info Table to Glyph Adjustment Table to better reflect the added functionality of this table. -- Added Search toolbar to the Glyph Adjustment Table. -- Fixed incorrect detection / handling of Asset Serialization mode in the Project Conversion Utility. -- Removed SelectionBase attribute from TMP components. -- Revised TMP Shaders to support the new UNITY_UI_CLIP_RECT shader keyword which can provide a performance improvement of up to 30% on some devices. -- Added TMP_PRESENT define as per the request of several third party asset publishers. - -## [1.0.23] - 2017-11-14 -### Added -- New menu option added to Import Examples and additional content like Font Assets, Materials Presets, etc for TextMesh Pro. This new menu option is located in "Window -> TextMeshPro -> Import Examples and Extra Content". -- New menu option added to Convert existing project files and assets created with either the Source Code or DLL only version of TextMesh Pro. Please be sure to backup your project before using this option. The new menu option is located in "Window -> TextMeshPro -> Project Files GUID Remapping Tool". -- Added Assembly Definitions for the TMP Runtime and Editor scripts. -- Added support for the UI DirtyLayoutCallback, DirtyVerticesCallback and DirtyMaterialCallback. \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/CHANGELOG.md.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/CHANGELOG.md.meta deleted file mode 100644 index edf5c327..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/CHANGELOG.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 22464cf7ab0243a6bf9c79851183b002 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Documentation~/TextMeshPro.md b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Documentation~/TextMeshPro.md deleted file mode 100644 index 8f8c0926..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Documentation~/TextMeshPro.md +++ /dev/null @@ -1,35 +0,0 @@ -# **_TextMesh Pro User Guide_** - -#### **Overview** -This User Guide was designed to provide first time users of TextMesh Pro with a basic overview of the features and functionality of the tool. - -#### **Installation** -The TextMesh Pro UPM package is already included with the Unity Editor and as such does not require installation. TextMesh Pro "TMP" does however require adding resources to your project which are essential for using TextMesh Pro. - -To import the "*TMP Essential Resources*", please use the "*Window -> TextMeshPro -> Import TMP Essential Resources*" menu option. These resources will be added at the root of your project in the "*TextMesh Pro*" folder. - -The TextMesh Pro package also includes additional resources and examples that will make discovering and learning about TextMesh Pro's powerful features easier. It is strongly recommended that first time users import these additional resources. - -To import the "*TMP Examples & Extras*", please use the "*Window -> TextMeshPro -> Import TMP Examples & Extras*" menu option. These resources will also be added in the same "*TextMesh Pro*" folder inside your project. - - -#### **Quick Start** -There are two TextMesh Pro components available. The first TMP text component is of type <TextMeshPro> and designed to work with the MeshRenderer. This component is an ideal replacement for the legacy TextMesh component. - -To add a new <TextMeshPro> text object, go to: “*GameObject->3D Object->TextMeshPro Text*”. - -The second TMP text component is of type <TextMeshProUGUI> and designed to work with the CanvasRenderer and Canvas system. This component is an ideal replacement for the UI.Text component. - -To add a new <TextMeshProUGUI> text object, go to: “*GameObject->UI->TextMeshPro Text*”. - -You may also wish to watch this [Getting Started](https://youtu.be/olnxlo-Wri4) short video which covers this topic. - -We strongly recommend that you also watch the [Font Asset Creation](https://youtu.be/qzJNIGCFFtY) video as well as the [Working with Material Presets](https://youtu.be/d2MARbDNeaA) as these two topics is also key to working and getting the most out of TextMesh Pro. - -As mentionned in the Installation section of this guide, it is recommended that you import the "*TMP Examples & Extras*" and take the time to explore each of the examples as they provide a great overview of the functionality of the tool and the many text layout and [rich text tags](http://digitalnativestudios.com/textmeshpro/docs/rich-text/) available in TextMesh Pro. - -#### **Support & API Documentation** -Should you have questions or require assistance, please visit the [Unity UI & TextMesh Pro](https://forum.unity.com/forums/unity-ui-textmesh-pro.60/) section of the Unity forum as well as the [TextMesh Pro User Forum](http://digitalnativestudios.com/forum/index.php) where you will find additional information, [Video Tutorials](http://digitalnativestudios.com/forum/index.php?board=4.0) and [FAQ](http://digitalnativestudios.com/forum/index.php?topic=890.0). In the event you are unable to find the information you seek, always feel free to post on the [Unity UI & TextMesh Pro](https://forum.unity.com/forums/unity-ui-textmesh-pro.60/) section user forum. - -[Online Documentation](http://digitalnativestudios.com/textmeshpro/docs/) is also available on TextMesh Pro including Rich Text tags, Shaders, Scripting API and more. - diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Documentation~/TextMeshPro.md.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Documentation~/TextMeshPro.md.meta deleted file mode 100644 index 8c72f725..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Documentation~/TextMeshPro.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: ca77d26d10b9455ca5a4b22c93be2a31 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources.meta deleted file mode 100644 index 7c07b007..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: d1a0a27327b54c3bac52a08929c33f81 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos.meta deleted file mode 100644 index f2596c78..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e93ec7eb6de342aabd156833e253f838 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Dropdown Icon.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Dropdown Icon.psd deleted file mode 100644 index 93f5a2cb..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Dropdown Icon.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Dropdown Icon.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Dropdown Icon.psd.meta deleted file mode 100644 index 7bdb473e..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Dropdown Icon.psd.meta +++ /dev/null @@ -1,143 +0,0 @@ -fileFormatVersion: 2 -guid: a7ec9e7ad8b847b7ae4510af83c5d868 -TextureImporter: - fileIDToRecycleName: {} - externalObjects: {} - serializedVersion: 7 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - sRGBTexture: 1 - linearTexture: 1 - fadeOut: 0 - borderMipMap: 0 - mipMapsPreserveCoverage: 0 - alphaTestReferenceValue: 0.5 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - streamingMipmaps: 0 - streamingMipmapsPriority: 0 - grayScaleToAlpha: 0 - generateCubemap: 6 - cubemapConvolution: 0 - seamlessCubemap: 0 - textureFormat: -2 - maxTextureSize: 128 - textureSettings: - serializedVersion: 2 - filterMode: -1 - aniso: 1 - mipBias: -100 - wrapU: 1 - wrapV: 1 - wrapW: 1 - nPOTScale: 0 - 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: 1 - spriteTessellationDetail: -1 - textureType: 2 - textureShape: 1 - singleChannelComponent: 0 - maxTextureSizeSet: 0 - compressionQualitySet: 0 - textureFormatSet: 0 - platformSettings: - - serializedVersion: 2 - buildTarget: DefaultTexturePlatform - maxTextureSize: 128 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - serializedVersion: 2 - buildTarget: Standalone - maxTextureSize: 128 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - serializedVersion: 2 - buildTarget: iPhone - maxTextureSize: 128 - resizeAlgorithm: 0 - textureFormat: 2 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - serializedVersion: 2 - buildTarget: Android - maxTextureSize: 128 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - serializedVersion: 2 - buildTarget: Windows Store Apps - maxTextureSize: 128 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - - serializedVersion: 2 - buildTarget: WebGL - maxTextureSize: 128 - resizeAlgorithm: 0 - textureFormat: -1 - textureCompression: 0 - compressionQuality: 50 - crunchedCompression: 0 - allowsAlphaSplitting: 0 - overridden: 0 - androidETC2FallbackOverride: 0 - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - physicsShape: [] - bones: [] - spriteID: - vertices: [] - indices: - edges: [] - weights: [] - spritePackingTag: - pSDRemoveMatte: 1 - pSDShowRemoveMatteOption: 1 - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Font Asset Icon.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Font Asset Icon.psd deleted file mode 100644 index 2fb1164d..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Font Asset Icon.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Font Asset Icon.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Font Asset Icon.psd.meta deleted file mode 100644 index bd64ad7d..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Font Asset Icon.psd.meta +++ /dev/null @@ -1,57 +0,0 @@ -fileFormatVersion: 2 -guid: ee148e281f3c41c5b4ff5f8a5afe5a6c -timeCreated: 1463559213 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 7 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - outline: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Input Field Icon.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Input Field Icon.psd deleted file mode 100644 index f0360d34..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Input Field Icon.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Input Field Icon.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Input Field Icon.psd.meta deleted file mode 100644 index eb2e1ce2..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Input Field Icon.psd.meta +++ /dev/null @@ -1,57 +0,0 @@ -fileFormatVersion: 2 -guid: 3ee40aa79cd242a5b53b0b0ca4f13f0f -timeCreated: 1457860876 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - outline: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Sprite Asset Icon.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Sprite Asset Icon.psd deleted file mode 100644 index 7036296e..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Sprite Asset Icon.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Sprite Asset Icon.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Sprite Asset Icon.psd.meta deleted file mode 100644 index a22cdf1c..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Sprite Asset Icon.psd.meta +++ /dev/null @@ -1,57 +0,0 @@ -fileFormatVersion: 2 -guid: ec7c645d93308c04d8840982af12101e -timeCreated: 1463559213 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 7 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - outline: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Text Component Icon.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Text Component Icon.psd deleted file mode 100644 index 3cc41630..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Text Component Icon.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Text Component Icon.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Text Component Icon.psd.meta deleted file mode 100644 index 623993d2..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Gizmos/TMP - Text Component Icon.psd.meta +++ /dev/null @@ -1,53 +0,0 @@ -fileFormatVersion: 2 -guid: 2fd6421f253b4ef1a19526541f9ffc0c -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 128 - textureSettings: - filterMode: -1 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Shaders.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Shaders.meta deleted file mode 100644 index 95efe2ba..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Shaders.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 2da27f5fe80a3a549ac7331d9f52f5f0 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Shaders/TMP_Properties.cginc b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Shaders/TMP_Properties.cginc deleted file mode 100644 index 2e962588..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Shaders/TMP_Properties.cginc +++ /dev/null @@ -1,85 +0,0 @@ -// UI Editable properties -uniform sampler2D _FaceTex; // Alpha : Signed Distance -uniform float _FaceUVSpeedX; -uniform float _FaceUVSpeedY; -uniform fixed4 _FaceColor; // RGBA : Color + Opacity -uniform float _FaceDilate; // v[ 0, 1] -uniform float _OutlineSoftness; // v[ 0, 1] - -uniform sampler2D _OutlineTex; // RGBA : Color + Opacity -uniform float _OutlineUVSpeedX; -uniform float _OutlineUVSpeedY; -uniform fixed4 _OutlineColor; // RGBA : Color + Opacity -uniform float _OutlineWidth; // v[ 0, 1] - -uniform float _Bevel; // v[ 0, 1] -uniform float _BevelOffset; // v[-1, 1] -uniform float _BevelWidth; // v[-1, 1] -uniform float _BevelClamp; // v[ 0, 1] -uniform float _BevelRoundness; // v[ 0, 1] - -uniform sampler2D _BumpMap; // Normal map -uniform float _BumpOutline; // v[ 0, 1] -uniform float _BumpFace; // v[ 0, 1] - -uniform samplerCUBE _Cube; // Cube / sphere map -uniform fixed4 _ReflectFaceColor; // RGB intensity -uniform fixed4 _ReflectOutlineColor; -//uniform float _EnvTiltX; // v[-1, 1] -//uniform float _EnvTiltY; // v[-1, 1] -uniform float3 _EnvMatrixRotation; -uniform float4x4 _EnvMatrix; - -uniform fixed4 _SpecularColor; // RGB intensity -uniform float _LightAngle; // v[ 0,Tau] -uniform float _SpecularPower; // v[ 0, 1] -uniform float _Reflectivity; // v[ 5, 15] -uniform float _Diffuse; // v[ 0, 1] -uniform float _Ambient; // v[ 0, 1] - -uniform fixed4 _UnderlayColor; // RGBA : Color + Opacity -uniform float _UnderlayOffsetX; // v[-1, 1] -uniform float _UnderlayOffsetY; // v[-1, 1] -uniform float _UnderlayDilate; // v[-1, 1] -uniform float _UnderlaySoftness; // v[ 0, 1] - -uniform fixed4 _GlowColor; // RGBA : Color + Intesity -uniform float _GlowOffset; // v[-1, 1] -uniform float _GlowOuter; // v[ 0, 1] -uniform float _GlowInner; // v[ 0, 1] -uniform float _GlowPower; // v[ 1, 1/(1+4*4)] - -// API Editable properties -uniform float _ShaderFlags; -uniform float _WeightNormal; -uniform float _WeightBold; - -uniform float _ScaleRatioA; -uniform float _ScaleRatioB; -uniform float _ScaleRatioC; - -uniform float _VertexOffsetX; -uniform float _VertexOffsetY; - -//uniform float _UseClipRect; -uniform float _MaskID; -uniform sampler2D _MaskTex; -uniform float4 _MaskCoord; -uniform float4 _ClipRect; // bottom left(x,y) : top right(z,w) -//uniform float _MaskWipeControl; -//uniform float _MaskEdgeSoftness; -//uniform fixed4 _MaskEdgeColor; -//uniform bool _MaskInverse; - -uniform float _MaskSoftnessX; -uniform float _MaskSoftnessY; - -// Font Atlas properties -uniform sampler2D _MainTex; -uniform float _TextureWidth; -uniform float _TextureHeight; -uniform float _GradientScale; -uniform float _ScaleX; -uniform float _ScaleY; -uniform float _PerspectiveFilter; -uniform float _Sharpness; diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Shaders/TMP_Properties.cginc.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Shaders/TMP_Properties.cginc.meta deleted file mode 100644 index e6dcc0a0..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Shaders/TMP_Properties.cginc.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 3c6c403084eacec478a1129ce20061ea -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Shaders/TMP_SDF Internal SSD.shader b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Shaders/TMP_SDF Internal SSD.shader deleted file mode 100644 index 7e28d745..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Shaders/TMP_SDF Internal SSD.shader +++ /dev/null @@ -1,126 +0,0 @@ -// Simplified SDF shader: -// - No Shading Option (bevel / bump / env map) -// - No Glow Option -// - Softness is applied on both side of the outline - -Shader "Hidden/TextMeshPro/Internal/Distance Field SSD" { - -Properties { - _FaceColor ("Face Color", Color) = (1,1,1,1) - _FaceDilate ("Face Dilate", Range(-1,1)) = 0 - - _OutlineSoftness ("Outline Softness", Range(0,1)) = 0.02 - - _WeightNormal ("Weight Normal", float) = 0 - _WeightBold ("Weight Bold", float) = .5 - - _MainTex ("Font Atlas", 2D) = "white" {} - _TextureWidth ("Texture Width", float) = 512 - _TextureHeight ("Texture Height", float) = 512 - _GradientScale ("Gradient Scale", float) = 5 - _ScaleX ("Scale X", float) = 1 - _ScaleY ("Scale Y", float) = 1 - _Sharpness ("Sharpness", Range(-1,1)) = 0 - - _VertexOffsetX ("Vertex OffsetX", float) = 0 - _VertexOffsetY ("Vertex OffsetY", float) = 0 - - _ColorMask ("Color Mask", Float) = 15 -} - -SubShader { - Tags - { - "ForceSupported" = "True" - } - - Lighting Off - Blend One OneMinusSrcAlpha - Cull Off - ZWrite Off - ZTest Always - - Pass { - CGPROGRAM - #pragma vertex VertShader - #pragma fragment PixShader - - #include "UnityCG.cginc" - #include "TMP_Properties.cginc" - - sampler2D _GUIClipTexture; - uniform float4x4 unity_GUIClipTextureMatrix; - - struct vertex_t { - float4 vertex : POSITION; - float3 normal : NORMAL; - fixed4 color : COLOR; - float2 texcoord0 : TEXCOORD0; - float2 texcoord1 : TEXCOORD1; - }; - - struct pixel_t { - float4 vertex : SV_POSITION; - fixed4 faceColor : COLOR; - float2 texcoord0 : TEXCOORD0; - float2 clipUV : TEXCOORD1; - }; - - - pixel_t VertShader(vertex_t input) - { - // Does not handle simulated bold correctly. - - float4 vert = input.vertex; - vert.x += _VertexOffsetX; - vert.y += _VertexOffsetY; - float4 vPosition = UnityObjectToClipPos(vert); - - float opacity = input.color.a; - - fixed4 faceColor = fixed4(input.color.rgb, opacity) * _FaceColor; - faceColor.rgb *= faceColor.a; - - // Generate UV for the Clip Texture - float3 eyePos = UnityObjectToViewPos(input.vertex); - float2 clipUV = mul(unity_GUIClipTextureMatrix, float4(eyePos.xy, 0, 1.0)); - - // Structure for pixel shader - pixel_t output = { - vPosition, - faceColor, - float2(input.texcoord0.x, input.texcoord0.y), - clipUV, - }; - - return output; - } - - half transition(half2 range, half distance) - { - return smoothstep(range.x, range.y, distance); - } - - // PIXEL SHADER - fixed4 PixShader(pixel_t input) : SV_Target - { - half distanceSample = tex2D(_MainTex, input.texcoord0).a; - half smoothing = fwidth(distanceSample) * (1 - _Sharpness) + _OutlineSoftness; - half contour = 0.5 - _FaceDilate * 0.5; - half2 edgeRange = half2(contour - smoothing, contour + smoothing); - - half4 c = input.faceColor; - - half edgeTransition = transition(edgeRange, distanceSample); - c *= edgeTransition; - - c *= tex2D(_GUIClipTexture, input.clipUV).a; - - return c; - } - ENDCG - } -} - -CustomEditor "TMPro.EditorUtilities.TMP_SDFShaderGUI" -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Shaders/TMP_SDF Internal SSD.shader.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Shaders/TMP_SDF Internal SSD.shader.meta deleted file mode 100644 index 7845e119..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Shaders/TMP_SDF Internal SSD.shader.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: ce4ec0f498d1b1a4f90fe94e115b6f9a -ShaderImporter: - externalObjects: {} - defaultTextures: [] - nonModifiableTextures: [] - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures.meta deleted file mode 100644 index d6754b05..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f8e6a2d47aba4c6c9b3c5a72d9f48da5 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/SectionHeader_Dark.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/SectionHeader_Dark.psd deleted file mode 100644 index 8ebaa27a..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/SectionHeader_Dark.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/SectionHeader_Dark.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/SectionHeader_Dark.psd.meta deleted file mode 100644 index ed7250a7..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/SectionHeader_Dark.psd.meta +++ /dev/null @@ -1,53 +0,0 @@ -fileFormatVersion: 2 -guid: fb5730e24283d0c489e5c7d0bee023d9 -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/SectionHeader_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/SectionHeader_Light.psd deleted file mode 100644 index e598e6d9..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/SectionHeader_Light.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/SectionHeader_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/SectionHeader_Light.psd.meta deleted file mode 100644 index 1e747b22..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/SectionHeader_Light.psd.meta +++ /dev/null @@ -1,53 +0,0 @@ -fileFormatVersion: 2 -guid: e3b0f810fdea84e40ab4ba20f256f7e8 -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignBaseLine.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignBaseLine.psd deleted file mode 100644 index 3da358a1..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignBaseLine.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignBaseLine.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignBaseLine.psd.meta deleted file mode 100644 index 09deb3c8..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignBaseLine.psd.meta +++ /dev/null @@ -1,53 +0,0 @@ -fileFormatVersion: 2 -guid: 8bc445bb79654bf496c92d0407840a92 -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignBaseLine_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignBaseLine_Light.psd deleted file mode 100644 index cf49b6cb..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignBaseLine_Light.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignBaseLine_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignBaseLine_Light.psd.meta deleted file mode 100644 index 78e14cba..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignBaseLine_Light.psd.meta +++ /dev/null @@ -1,53 +0,0 @@ -fileFormatVersion: 2 -guid: 18775b51e3bd42299fd30bd036ea982f -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignBottom.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignBottom.psd deleted file mode 100644 index 1f35779e..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignBottom.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignBottom.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignBottom.psd.meta deleted file mode 100644 index 8e79b489..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignBottom.psd.meta +++ /dev/null @@ -1,53 +0,0 @@ -fileFormatVersion: 2 -guid: ca51b19024094d1b87f3e07edb0a75fb -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignBottom_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignBottom_Light.psd deleted file mode 100644 index d8af55bd..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignBottom_Light.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignBottom_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignBottom_Light.psd.meta deleted file mode 100644 index 9c9a6fc0..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignBottom_Light.psd.meta +++ /dev/null @@ -1,53 +0,0 @@ -fileFormatVersion: 2 -guid: 585b70cb75dd43efbfead809c30a1731 -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCapLine.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCapLine.psd deleted file mode 100644 index 7eefe6b2..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCapLine.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCapLine.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCapLine.psd.meta deleted file mode 100644 index 0455a2fc..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCapLine.psd.meta +++ /dev/null @@ -1,58 +0,0 @@ -fileFormatVersion: 2 -guid: 0d9a36012a224080966c7b55896aa0f9 -timeCreated: 1467964791 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 7 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCapLine_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCapLine_Light.psd deleted file mode 100644 index f08bb6ce..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCapLine_Light.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCapLine_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCapLine_Light.psd.meta deleted file mode 100644 index dfd05a11..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCapLine_Light.psd.meta +++ /dev/null @@ -1,58 +0,0 @@ -fileFormatVersion: 2 -guid: 49679f302ac6408697f6b9314a38985c -timeCreated: 1467964413 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 7 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCenter.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCenter.psd deleted file mode 100644 index 939bc6dc..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCenter.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCenter.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCenter.psd.meta deleted file mode 100644 index d189fc27..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCenter.psd.meta +++ /dev/null @@ -1,53 +0,0 @@ -fileFormatVersion: 2 -guid: 81ed8c76d2bc4a4c95d092c98af4e58f -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCenterGeo.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCenterGeo.psd deleted file mode 100644 index f9ce9a8b..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCenterGeo.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCenterGeo.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCenterGeo.psd.meta deleted file mode 100644 index 555bb1bb..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCenterGeo.psd.meta +++ /dev/null @@ -1,56 +0,0 @@ -fileFormatVersion: 2 -guid: c76700ea0062413d9f69409b4e9e151b -timeCreated: 1484171296 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCenterGeo_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCenterGeo_Light.psd deleted file mode 100644 index e37b2e25..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCenterGeo_Light.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCenterGeo_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCenterGeo_Light.psd.meta deleted file mode 100644 index 044d0c21..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCenterGeo_Light.psd.meta +++ /dev/null @@ -1,56 +0,0 @@ -fileFormatVersion: 2 -guid: 35ff0937876540d3bd4b6a941df62a92 -timeCreated: 1484171296 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCenter_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCenter_Light.psd deleted file mode 100644 index 7274887f..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCenter_Light.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCenter_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCenter_Light.psd.meta deleted file mode 100644 index d98d3772..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignCenter_Light.psd.meta +++ /dev/null @@ -1,53 +0,0 @@ -fileFormatVersion: 2 -guid: 6ace62d30f494c948b71d5594afce11d -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignFlush.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignFlush.psd deleted file mode 100644 index eeeea67b..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignFlush.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignFlush.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignFlush.psd.meta deleted file mode 100644 index 84ed28c0..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignFlush.psd.meta +++ /dev/null @@ -1,53 +0,0 @@ -fileFormatVersion: 2 -guid: 691475c57a824010be0c6f474caeb7e1 -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignFlush_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignFlush_Light.psd deleted file mode 100644 index b69f6a2e..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignFlush_Light.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignFlush_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignFlush_Light.psd.meta deleted file mode 100644 index b9e61247..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignFlush_Light.psd.meta +++ /dev/null @@ -1,53 +0,0 @@ -fileFormatVersion: 2 -guid: 64b9fad609434c489c32b1cdf2004a1c -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignJustified.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignJustified.psd deleted file mode 100644 index 3ce55c49..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignJustified.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignJustified.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignJustified.psd.meta deleted file mode 100644 index f8a90b42..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignJustified.psd.meta +++ /dev/null @@ -1,59 +0,0 @@ -fileFormatVersion: 2 -guid: 92027f7f8cfc4feaa477da0dc38d3d46 -timeCreated: 1472535271 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 7 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - spriteTessellationDetail: -1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignJustified_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignJustified_Light.psd deleted file mode 100644 index d7fd5c82..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignJustified_Light.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignJustified_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignJustified_Light.psd.meta deleted file mode 100644 index e5b5aa85..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignJustified_Light.psd.meta +++ /dev/null @@ -1,59 +0,0 @@ -fileFormatVersion: 2 -guid: fa6bd40a216346b783a4cce741d277a5 -timeCreated: 1472535778 -licenseType: Pro -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 7 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - spriteTessellationDetail: -1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignLeft.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignLeft.psd deleted file mode 100644 index fc7e10b2..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignLeft.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignLeft.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignLeft.psd.meta deleted file mode 100644 index 8023379e..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignLeft.psd.meta +++ /dev/null @@ -1,53 +0,0 @@ -fileFormatVersion: 2 -guid: 9288066c33474b94b6ee5465f4df1cc0 -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignLeft_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignLeft_Light.psd deleted file mode 100644 index 5522c373..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignLeft_Light.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignLeft_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignLeft_Light.psd.meta deleted file mode 100644 index aaa8b81d..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignLeft_Light.psd.meta +++ /dev/null @@ -1,53 +0,0 @@ -fileFormatVersion: 2 -guid: 12736c98af174f91827a26b66d2b01b9 -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignMidLine.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignMidLine.psd deleted file mode 100644 index 14d28a2d..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignMidLine.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignMidLine.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignMidLine.psd.meta deleted file mode 100644 index e481463b..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignMidLine.psd.meta +++ /dev/null @@ -1,58 +0,0 @@ -fileFormatVersion: 2 -guid: c2f7f6a88b4c4f20a53deb72f3d9144c -timeCreated: 1426240649 -licenseType: Store -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignMiddle.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignMiddle.psd deleted file mode 100644 index c4483dbd..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignMiddle.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignMiddle.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignMiddle.psd.meta deleted file mode 100644 index d1ec5285..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignMiddle.psd.meta +++ /dev/null @@ -1,53 +0,0 @@ -fileFormatVersion: 2 -guid: 41b96614b2e6494ba995ddcd252d11ae -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignMiddle_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignMiddle_Light.psd deleted file mode 100644 index 4263bf9b..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignMiddle_Light.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignMiddle_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignMiddle_Light.psd.meta deleted file mode 100644 index 7cda20b7..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignMiddle_Light.psd.meta +++ /dev/null @@ -1,53 +0,0 @@ -fileFormatVersion: 2 -guid: 066619c9c9c84f89acb1b48c11a7efe2 -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignMidline_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignMidline_Light.psd deleted file mode 100644 index a5bed371..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignMidline_Light.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignMidline_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignMidline_Light.psd.meta deleted file mode 100644 index 6fabec54..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignMidline_Light.psd.meta +++ /dev/null @@ -1,58 +0,0 @@ -fileFormatVersion: 2 -guid: bb42b2d967d6427983c901a4ffc8ecd9 -timeCreated: 1426240650 -licenseType: Store -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: 0.25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - allowsAlphaSplitting: 0 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: 0.5, y: 0.5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - serializedVersion: 2 - sprites: [] - outline: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignRight.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignRight.psd deleted file mode 100644 index 4ef1998b..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignRight.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignRight.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignRight.psd.meta deleted file mode 100644 index cf5c7649..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignRight.psd.meta +++ /dev/null @@ -1,53 +0,0 @@ -fileFormatVersion: 2 -guid: 342a0f8aca7f4f0691338912faec0494 -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignRight_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignRight_Light.psd deleted file mode 100644 index bdeff413..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignRight_Light.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignRight_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignRight_Light.psd.meta deleted file mode 100644 index dab7997c..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignRight_Light.psd.meta +++ /dev/null @@ -1,53 +0,0 @@ -fileFormatVersion: 2 -guid: e05ace3bd15740cda0bad60d89092a5b -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignTop.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignTop.psd deleted file mode 100644 index b00d4585..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignTop.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignTop.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignTop.psd.meta deleted file mode 100644 index 74931bf8..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignTop.psd.meta +++ /dev/null @@ -1,53 +0,0 @@ -fileFormatVersion: 2 -guid: 48d034c499ee4697af9dd6e327110249 -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignTop_Light.psd b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignTop_Light.psd deleted file mode 100644 index 84f0e61c..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignTop_Light.psd and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignTop_Light.psd.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignTop_Light.psd.meta deleted file mode 100644 index bbd509d1..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Editor Resources/Textures/btn_AlignTop_Light.psd.meta +++ /dev/null @@ -1,53 +0,0 @@ -fileFormatVersion: 2 -guid: ed041e68439749a69d0efa0e3d896c2e -TextureImporter: - fileIDToRecycleName: {} - serializedVersion: 2 - mipmaps: - mipMapMode: 0 - enableMipMap: 0 - linearTexture: 1 - correctGamma: 0 - fadeOut: 0 - borderMipMap: 0 - mipMapFadeDistanceStart: 1 - mipMapFadeDistanceEnd: 3 - bumpmap: - convertToNormalMap: 0 - externalNormalMap: 0 - heightScale: .25 - normalMapFilter: 0 - isReadable: 0 - grayScaleToAlpha: 0 - generateCubemap: 0 - cubemapConvolution: 0 - cubemapConvolutionSteps: 8 - cubemapConvolutionExponent: 1.5 - seamlessCubemap: 0 - textureFormat: -3 - maxTextureSize: 32 - textureSettings: - filterMode: 0 - aniso: 1 - mipBias: -1 - wrapMode: 1 - nPOTScale: 0 - lightmap: 0 - rGBM: 0 - compressionQuality: 50 - spriteMode: 0 - spriteExtrude: 1 - spriteMeshType: 1 - alignment: 0 - spritePivot: {x: .5, y: .5} - spriteBorder: {x: 0, y: 0, z: 0, w: 0} - spritePixelsToUnits: 100 - alphaIsTransparency: 1 - textureType: 2 - buildTargetSettings: [] - spriteSheet: - sprites: [] - spritePackingTag: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/LICENSE.md b/Library/PackageCache/com.unity.textmeshpro@2.0.1/LICENSE.md deleted file mode 100644 index 37d06155..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/LICENSE.md +++ /dev/null @@ -1,5 +0,0 @@ -TextMesh Pro copyright © 2014-2019 Unity Technologies ApS - -Licensed under the Unity Companion License for Unity-dependent projects--see [Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License). - -Unless expressly provided otherwise, the Software under this license is made available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. Please review the license for details on these and other terms and conditions. \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/LICENSE.md.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/LICENSE.md.meta deleted file mode 100644 index 1df95556..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/LICENSE.md.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 0d2d0f36e67d4518a07df76235e91f9a -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Package Resources.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Package Resources.meta deleted file mode 100644 index e8a96b82..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Package Resources.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 5ec95f4d5b2d1f14e9ff8682562553f9 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Package Resources/TMP Essential Resources.unitypackage b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Package Resources/TMP Essential Resources.unitypackage deleted file mode 100644 index 6c1904f4..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Package Resources/TMP Essential Resources.unitypackage and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Package Resources/TMP Essential Resources.unitypackage.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Package Resources/TMP Essential Resources.unitypackage.meta deleted file mode 100644 index bc49ab30..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Package Resources/TMP Essential Resources.unitypackage.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: ce4ff17ca867d2b48b5c8a4181611901 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Package Resources/TMP Examples & Extras.unitypackage b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Package Resources/TMP Examples & Extras.unitypackage deleted file mode 100644 index 975bf1be..00000000 Binary files a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Package Resources/TMP Examples & Extras.unitypackage and /dev/null differ diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Package Resources/TMP Examples & Extras.unitypackage.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Package Resources/TMP Examples & Extras.unitypackage.meta deleted file mode 100644 index aaf21f78..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Package Resources/TMP Examples & Extras.unitypackage.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: bc00e25696e4132499f56528d3fed2e3 -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/PackageConversionData.json b/Library/PackageCache/com.unity.textmeshpro@2.0.1/PackageConversionData.json deleted file mode 100644 index 05c193e2..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/PackageConversionData.json +++ /dev/null @@ -1,654 +0,0 @@ -{ - "assetRecords": [ - { - "referencedResource": "Blue to Purple - Vertical.asset", - "target": "guid: 1e643bbd7e13d46418da3774e72bef60", - "replacement": "guid: 479a66fa4b094512a62b0a8e553ad95a" - }, - { - "referencedResource": "Dark to Light Green - Vertical.asset", - "target": "guid: 90c9133b254e2184b8084dea4f392337", - "replacement": "guid: 4c86a3366cd840348ebe8dc438570ee4" - }, - { - "referencedResource": "Light to Dark Green - Vertical.asset", - "target": "guid: 33c745f0979f3984182a138bcc6e57ec", - "replacement": "guid: 5cf8ae092ca54931b443bec5148f3c59" - }, - { - "referencedResource": "Yellow to Orange - Vertical.asset", - "target": "guid: e002cb2a36d9e4a439a062867fa24e1e", - "replacement": "guid: 69a525efa7e6472eab268f6ea605f06e" - }, - { - "referencedResource": "Crate - Surface Shader Scene.mat", - "target": "guid: e177c46c2a091564d88df2c2ca9dcf97", - "replacement": "guid: e6b9b44320f4448d9d5e0ee634259966" - }, - { - "referencedResource": "Ground - Logo Scene.mat", - "target": "guid: 504ae362e57fc464b847f1e9fd0e4035", - "replacement": "guid: c719e38f25a9480abd2480ab621a2949" - }, - { - "referencedResource": "Ground - Surface Shader Scene.mat", - "target": "guid: 9ed9aa864ec2d7f4dad266b9534c6d85", - "replacement": "guid: aadd5a709a48466c887296bb5b1b8110" - }, - { - "referencedResource": "Small Crate_diffuse.mat", - "target": "guid: 92f161029a6d3c54a92d9d283352a135", - "replacement": "guid: 22262639920f43d6be32430e4e58350d" - }, - { - "referencedResource": "Text Popup.prefab", - "target": "guid: c879e892866c8db4f8930b25672233ac", - "replacement": "guid: b06f0e6c1dfa4356ac918da1bb32c603" - }, - { - "referencedResource": "TextMeshPro - Prefab 1.prefab", - "target": "guid: a6a60659abb4d9d4b934feebd3dcc952", - "replacement": "guid: a6e39ced0ea046bcb636c3f0b2e2a745" - }, - { - "referencedResource": "TextMeshPro - Prefab 2.prefab", - "target": "guid: 1b190e3e0ab4c8e4881656b9160c59c2", - "replacement": "guid: fdad9d952ae84cafb74c63f2e694d042" - }, - { - "referencedResource": "Anton SDF.asset", - "target": "guid: f76ef802b8b940c46a31f9027f2b0158", - "replacement": "guid: 8a89fa14b10d46a99122fd4f73fca9a2" - }, - { - "referencedResource": "Anton SDF - Drop Shadow.mat", - "target": "guid: 250a1a103b3b4914c9707e6a423446d6", - "replacement": "guid: 749b9069dc4742c5bfa5c74644049926" - }, - { - "referencedResource": "Anton SDF - Outline.mat", - "target": "guid: e077dc203e948b740859c1c0ca8b9691", - "replacement": "guid: a00013af81304728b2be1f4309ee2433" - }, - { - "referencedResource": "Bangers SDF.asset", - "target": "guid: 808aa8f1ab804104aa7d0c337a6c1481", - "replacement": "guid: 125cb55b44b24c4393181402bc6200e6" - }, - { - "referencedResource": "Bangers SDF - Drop Shadow.mat", - "target": "guid: c26f698d4eee19e4a8b8f42cd299bab5", - "replacement": "guid: f2dcf029949142e28b974630369c8b4e" - }, - { - "referencedResource": "Bangers SDF - Outline.mat", - "target": "guid: db7f2cfbf23d6d54ca4e74a9abd55326", - "replacement": "guid: f629c6e43dba4bf38cb74d8860150664" - }, - { - "referencedResource": "Bangers SDF Glow.mat", - "target": "guid: 7dd7006c58d8a3148a73aa211d8c13d0", - "replacement": "guid: d75b8f41e959450c84ac6e967084d3e1" - }, - { - "referencedResource": "Bangers SDF Logo.mat", - "target": "guid: 4fb51aa7001a2244395ddf6a15d37389", - "replacement": "guid: f4e195ac1e204eff960149d1cb34e18c" - }, - { - "referencedResource": "Electronic Highway Sign SDF.asset", - "target": "guid: 163292f6f226d954593d45b079f8aae0", - "replacement": "guid: dc36b3fdc14f47ebb36fd484a67e268a" - }, - { - "referencedResource": "LiberationSans SDF - Drop Shadow.mat", - "target": "guid: 33db60c37b63f08448ded4b385e74e38", - "replacement": "guid: e73a58f6e2794ae7b1b7e50b7fb811b0" - }, - { - "referencedResource": "LiberationSans SDF - Metalic Green.mat", - "target": "guid: 4f9843c79516ed1468b9b5a4f32e67e3", - "replacement": "guid: 8b29aaa3eec7468097ff07adfcf29ac9" - }, - { - "referencedResource": "LiberationSans SDF - Outline.mat", - "target": "guid: 83a1b0fe6c3dbac44b66f09c82e1d509", - "replacement": "guid: 79459efec17a4d00a321bdcc27bbc385" - }, - { - "referencedResource": "LiberationSans SDF - Overlay.mat", - "target": "guid: 55eb086ae18c76e4bb6cc7106d0dd6e2", - "replacement": "guid: 9ad269c99dcf42b7aedefd83dd5a7b9d" - }, - { - "referencedResource": "LiberationSans SDF - Soft Mask.mat", - "target": "guid: 74e06d99c1657fc4abd33f20685ea9ff", - "replacement": "guid: 42df1c7856584b6b8db9a509b6b10074" - }, - { - "referencedResource": "Oswald Bold SDF.asset", - "target": "guid: 09641b029dfa78843902b548a9de7553", - "replacement": "guid: 0161d805a3764c089bef00bfe00793f5" - }, - { - "referencedResource": "Roboto-Bold SDF.asset", - "target": "guid: d62a573c923f5cb47b8ff65261033b90", - "replacement": "guid: 5302535af1044152a457ed104f1f4b91" - }, - { - "referencedResource": "Roboto-Bold SDF - Drop Shadow.mat", - "target": "guid: 102e7c5c5e3b1f3468518cb166967d77", - "replacement": "guid: b246c4190f4e46ec9352fe15a7b09ce0" - }, - { - "referencedResource": "Roboto-Bold SDF - Surface.mat", - "target": "guid: e2da38ead8f8238449c54a1ef49e080f", - "replacement": "guid: e6b276ec991f467aa14ef1f3cc665993" - }, - { - "referencedResource": "DropCap Numbers.asset", - "target": "guid: c4fd2a959a50b584b92dedfefec1ffda", - "replacement": "guid: 14aa93acbb234d16aaef0e8b46814db6" - }, - { - "referencedResource": "Benchmark01.cs", - "target": "guid: c5fb1b5c24460f745be29cc0eb06a58c", - "replacement": "guid: f970ea55f9f84bf79b05dab180b8c125" - }, - { - "referencedResource": "Benchmark01_UGUI.cs", - "target": "guid: 5e6abf300e36c0a4eb43969c3f2172f8", - "replacement": "guid: 8ef7be1c625941f7ba8ed7cc71718c0d" - }, - { - "referencedResource": "Benchmark02.cs", - "target": "guid: 3467f4170568a484d8b57e2051a27363", - "replacement": "guid: e8538afcddc14efbb5d9e94b7ae50197" - }, - { - "referencedResource": "Benchmark03.cs", - "target": "guid: e6e9d20624a23da4c8b2b6fb7608bb9a", - "replacement": "guid: a73109742c8d47ac822895a473300c29" - }, - { - "referencedResource": "Benchmark04.cs", - "target": "guid: 481dd67bdedc3104ea2156ed49f3acd5", - "replacement": "guid: dc20866c0d5e413ab7559440e15333ae" - }, - { - "referencedResource": "CameraController.cs", - "target": "guid: a9f0e07aefca0cc459134ff9df622278", - "replacement": "guid: 2d687537154440a3913a9a3c7977978c" - }, - { - "referencedResource": "ChatController.cs", - "target": "guid: eba5a4db2591a5844aea5f6f3ad8548e", - "replacement": "guid: 53d91f98a2664f5cb9af11de72ac54ec" - }, - { - "referencedResource": "EnvMapAnimator.cs", - "target": "guid: 7e69f3f28c520ce4d9ab9964b2895b1a", - "replacement": "guid: a4b6f99e8bc54541bbd149b014ff441c" - }, - { - "referencedResource": "ObjectSpin.cs", - "target": "guid: 5e7872ff51989434dabf7807265ada3c", - "replacement": "guid: 4f19c7f94c794c5097d8bd11e39c750d" - }, - { - "referencedResource": "ShaderPropAnimator.cs", - "target": "guid: c56cf968fb6a5b6488e709242718845d", - "replacement": "guid: 2787a46a4dc848c1b4b7b9307b614bfd" - }, - { - "referencedResource": "SimpleScript.cs", - "target": "guid: c64808ff5137c9044a583750e5b0468a", - "replacement": "guid: 9eff140b25d64601aabc6ba32245d099" - }, - { - "referencedResource": "SkewTextExample.cs", - "target": "guid: 48d40dfeb33b717488f55ddbf676643a", - "replacement": "guid: d412675cfb3441efa3bf8dcd9b7624dc" - }, - { - "referencedResource": "TeleType.cs", - "target": "guid: 9094c5c777af3f14489e8947748e86e6", - "replacement": "guid: e32c266ee6204b21a427753cb0694c81" - }, - { - "referencedResource": "TextConsoleSimulator.cs", - "target": "guid: 45757dcc8f119454dac6365e8fd15e8b", - "replacement": "guid: 43bcd35a1c0c40ccb6d472893fe2093f" - }, - { - "referencedResource": "TextMeshProFloatingText.cs", - "target": "guid: dd0e4b969aa70504382a89d2f208ae6c", - "replacement": "guid: a4d4c76e63944cba8c7d00f56334b98c" - }, - { - "referencedResource": "TextMeshSpawner.cs", - "target": "guid: 385939aed18e82d41894437798c30ed8", - "replacement": "guid: 76c11bbcfddf44e0ba17d6c2751c8d84" - }, - { - "referencedResource": "TMP_ExampleScript_01.cs", - "target": "guid: 36bafabb5572c6347923b971425ab3be", - "replacement": "guid: 6f2c5b59b6874405865e2616e4ec276a" - }, - { - "referencedResource": "TMP_FrameRateCounter.cs", - "target": "guid: c0357609254b68d4881cab18f04dd4dc", - "replacement": "guid: 686ec78b56aa445795335fbadafcfaa4" - }, - { - "referencedResource": "TMP_TextEventCheck.cs", - "target": "guid: ba181bda76b7f6047ba2188e94bf0894", - "replacement": "guid: d736ce056cf444ca96e424f4d9c42b76" - }, - { - "referencedResource": "TMP_TextEventHandler.cs", - "target": "guid: 48a2fdbd95acd794caf78a85a0b6926a", - "replacement": "guid: 1312ae25639a4bae8e25ae223209cc50" - }, - { - "referencedResource": "TMP_TextInfoDebugTool.cs", - "target": "guid: 5eeee4467ee5b6a4884a1ec94812d93e", - "replacement": "guid: 21256c5b62f346f18640dad779911e20" - }, - { - "referencedResource": "TMP_TextSelector_A.cs", - "target": "guid: 68baf2864c88f4a43a50f16709de8717", - "replacement": "guid: 103e0a6a1d404693b9fb1a5173e0e979" - }, - { - "referencedResource": "TMP_TextSelector_B.cs", - "target": "guid: f499ff45b9a3d0840a0df48d01b2877b", - "replacement": "guid: a05dcd8be7ec4ccbb35c26219884aa37" - }, - { - "referencedResource": "TMP_UiFrameRateCounter.cs", - "target": "guid: dc33b7a34d20d5e4e8d54b6867ce81e3", - "replacement": "guid: 24b0dc2d1d494adbbec1f4db26b4cf83" - }, - { - "referencedResource": "TMPro_InstructionOverlay.cs", - "target": "guid: 53b866620ba77504eaf52cab7dbd95c9", - "replacement": "guid: c3c1afeda5e545e0b19add5373896d2e" - }, - { - "referencedResource": "VertexColorCycler.cs", - "target": "guid: c8d54cdd5913d4e4bb7b655d7d16835b", - "replacement": "guid: 91b8ba3d52e041fab2d0e0f169855539" - }, - { - "referencedResource": "VertexJitter.cs", - "target": "guid: e4769cb37968ea948a763a9a89f9e583", - "replacement": "guid: 2ed57967c52645d390a89dcf8f61ba73" - }, - { - "referencedResource": "VertexShakeA.cs", - "target": "guid: eaa12d191e718c945ac55da73fa469db", - "replacement": "guid: f7cfa58e417a46ea8889989684c2522e" - }, - { - "referencedResource": "VertexShakeB.cs", - "target": "guid: 32c83a5d3ba42b84aa26386eac47566b", - "replacement": "guid: e4e0d9ccee5f4950be8979268c9014e0" - }, - { - "referencedResource": "VertexZoom.cs", - "target": "guid: 5305493000edc7d4ea4302757dc19a99", - "replacement": "guid: 52ec835d14bd486f900952b77698b7eb" - }, - { - "referencedResource": "WarpTextExample.cs", - "target": "guid: f3eef864a10f51045a7530e2afe7c179", - "replacement": "guid: 790744c462254b7ba8038e6ed28b3db2" - }, - { - "referencedResource": "DropCap Numbers.psd", - "target": "guid: 28b41fef228d6814f90e541deaf9f262", - "replacement": "guid: fd09957580ac4326916010f1f260975b" - }, - { - "referencedResource": "Brushed Metal 3.jpg", - "target": "guid: c30270e41dccf9441ab56d94261bdcfa", - "replacement": "guid: f88677df267a41d6be1e7a6133e7d227" - }, - { - "referencedResource": "Engraved Wall.jpg", - "target": "guid: 93d6f74f2ef358e41989d4152b195f88", - "replacement": "guid: e0f91e6569da4934a48d85bf8d3063f0" - }, - { - "referencedResource": "Engraved Wall Normal.jpg", - "target": "guid: 1edd0950293e8664094053a041548c23", - "replacement": "guid: 20f91c93e7fb490f9496609c52ef3904" - }, - { - "referencedResource": "Floor Cement.jpg", - "target": "guid: ac5a0a5373b36e049bb7f98f88dbc244", - "replacement": "guid: 283f897e4925411ebbaa758b4cb13fc2" - }, - { - "referencedResource": "Floor Tiles 1 - diffuse.jpg", - "target": "guid: 7bbfb8818476e4641ba3e75f5225eb69", - "replacement": "guid: 85ac55597b97403c82fc6601a93cf241" - }, - { - "referencedResource": "Floor Tiles 1 - normal.jpg", - "target": "guid: e00d5a9a0944134448432ccacf221b95", - "replacement": "guid: c45cd05946364f32aba704f0853a975b" - }, - { - "referencedResource": "Fruit Jelly (B&W).jpg", - "target": "guid: 74d8c208a0193e14ca6916bea88a2c52", - "replacement": "guid: 1cdc5b506b1a4a33a53c30669ced1f51" - }, - { - "referencedResource": "Gradient Diagonal (Color).jpg", - "target": "guid: 2421a4955e71725448211e6bfbc7d7fb", - "replacement": "guid: 2ce5c55e85304b819a1826ecbc839aa5" - }, - { - "referencedResource": "Gradient Horizontal (Color).jpg", - "target": "guid: 0bbb43aff4f7811419ffceb1b16cf3d6", - "replacement": "guid: 6eb184de103d4b3f812b38561065192f" - }, - { - "referencedResource": "Gradient Vertical (Color).jpg", - "target": "guid: 3359915af07779e4e9a966df9eed764f", - "replacement": "guid: 03d0538de6e24c0f819bfc9ce084dfa9" - }, - { - "referencedResource": "Mask Zig-n-Zag.psd", - "target": "guid: 04eb87e72b3c1c648ba47a869ee00505", - "replacement": "guid: bb8dfcd263ad4eb383a33d74a720be6f" - }, - { - "referencedResource": "Sand Normal Map.jpg", - "target": "guid: 89e1b1c005d29cf4598ea861deb35a80", - "replacement": "guid: 8b8c8a10edf94ddc8cc4cc4fcd5696a9" - }, - { - "referencedResource": "Small Crate_diffuse.jpg", - "target": "guid: 64734c9bc6df32149a0c9cb0b18693e1", - "replacement": "guid: 602cb87b6a29443b8636370ea0751574" - }, - { - "referencedResource": "Small Crate_normal.jpg", - "target": "guid: 81b50d9cb6f3104448ec54c00a80101a", - "replacement": "guid: 8878a782f4334ecbbcf683b3ac780966" - }, - { - "referencedResource": "Stainless 03.png", - "target": "guid: 40d7f27f614cc1043a1f7e19074f461c", - "replacement": "guid: 83cb272f9ee046f6ab6636ca38af8db4" - }, - { - "referencedResource": "Text Overflow - Linked Text Image 1.png", - "target": "guid: 1fd8c568b1fcdbe43be65c1619cf3293", - "replacement": "guid: 4ccf43d26c4748c792174516f4a8fcef" - }, - { - "referencedResource": "Text Overflow - Linked Text UI Screenshot.png", - "target": "guid: 7983d2ec0427c114a916ae3c4769dc10", - "replacement": "guid: c76d18757a194d618355f05f815cb0a1" - }, - { - "referencedResource": "Wipe Pattern - Circle.psd", - "target": "guid: 6f5e9497d22a7a84193ec825e2eb41ac", - "replacement": "guid: 10c49fcd9c64421db7c0133e61e55f97" - }, - { - "referencedResource": "Wipe Pattern - Diagonal.psd", - "target": "guid: 8ee4d366b96418044aa9f94b3e2de645", - "replacement": "guid: ed5290d8df18488780e2996b9b882f01" - }, - { - "referencedResource": "Wipe Pattern - Radial Double.psd", - "target": "guid: 3e0e22da7c9570b498205179ef58ef38", - "replacement": "guid: 7631f4eff8f74ed38eb3eb9db17134e1" - }, - { - "referencedResource": "Wipe Pattern - Radial Quad.psd", - "target": "guid: 05ffd580f33f74644a6025ec196860af", - "replacement": "guid: 2b5e9ae96c5644d8bae932f8b4ca68a2" - }, - { - "referencedResource": "LiberationSans SDF.asset", - "target": "guid: 715b80e429c437e40867928a4e1fc975", - "replacement": "guid: 8f586378b4e144a9851e7b34d9b748ee" - }, - { - "referencedResource": "LineBreaking Following Characters.txt", - "target": "guid: 312ba5b9e90627940866e19549a788cf", - "replacement": "guid: fade42e8bc714b018fac513c043d323b" - }, - { - "referencedResource": "LineBreaking Leading Characters.txt", - "target": "guid: 8d713940fcbede142ae4a33ea0062b33", - "replacement": "guid: d82c1b31c7e74239bff1220585707d2b" - }, - { - "referencedResource": "TMP_Bitmap.shader", - "target": "guid: edfcf888cd11d9245b91d2883049a57e", - "replacement": "guid: 128e987d567d4e2c824d754223b3f3b0" - }, - { - "referencedResource": "TMP_Bitmap-Mobile.shader", - "target": "guid: d1cf17907700cb647aa3ea423ba38f2e", - "replacement": "guid: 1e3b057af24249748ff873be7fafee47" - }, - { - "referencedResource": "TMP_SDF.shader", - "target": "guid: dca26082f9cb439469295791d9f76fe5", - "replacement": "guid: 68e6db2ebdc24f95958faec2be5558d6" - }, - { - "referencedResource": "TMP_SDF Overlay.shader", - "target": "guid: 4a7755d6b5b67874f89c85f56f95fe97", - "replacement": "guid: dd89cf5b9246416f84610a006f916af7" - }, - { - "referencedResource": "TMP_SDF-Mobile.shader", - "target": "guid: cafd18099dfc0114896e0a8b277b81b6", - "replacement": "guid: fe393ace9b354375a9cb14cdbbc28be4" - }, - { - "referencedResource": "TMP_SDF-Mobile Masking.shader", - "target": "guid: afc255f7c2be52e41973a3d10a2e632d", - "replacement": "guid: bc1ede39bf3643ee8e493720e4259791" - }, - { - "referencedResource": "TMP_SDF-Mobile Overlay.shader", - "target": "guid: 9ecb3fe313cb5f7478141eba4a2d54ed", - "replacement": "guid: a02a7d8c237544f1962732b55a9aebf1" - }, - { - "referencedResource": "TMP_SDF-Surface.shader", - "target": "guid: 8e6b9842dbb1a5a4887378afab854e63", - "replacement": "guid: f7ada0af4f174f0694ca6a487b8f543d" - }, - { - "referencedResource": "TMP_SDF-Surface-Mobile.shader", - "target": "guid: 3c2ea7753c1425145a74d106ec1cd852", - "replacement": "guid: 85187c2149c549c5b33f0cdb02836b17" - }, - { - "referencedResource": "TMP_Sprite.shader", - "target": "guid: 3a1c68c8292caf046bd21158886c5e40", - "replacement": "guid: cf81c85f95fe47e1a27f6ae460cf182c" - }, - { - "referencedResource": "Default Sprite Asset.asset", - "target": "guid: 273ca6c80b4b5d746b5e548f532bffd8", - "replacement": "guid: fbef3c704dce48f08a44612d6c856c8d" - }, - { - "referencedResource": "EmojiOne.asset", - "target": "guid: 9a952e2781ef26940ae089f1053ef4ef", - "replacement": "guid: c41005c129ba4d66911b75229fd70b45" - }, - { - "referencedResource": "TMP Default Style Sheet.asset", - "target": "guid: 54d1085f9a2fdea4587fcfc7dddcd4bc", - "replacement": "guid: f952c082cb03451daed3ee968ac6c63e" - }, - { - "referencedResource": "TMP Settings.asset", - "target": "guid: 69ed5bac41eebaa4c97e9d2a4168c54f", - "replacement": "guid: 3f5b5dff67a942289a9defa416b206f3" - }, - { - "referencedResource": "TextContainer.cs", - "target": "guid: 3b34fc186f40e8043b977d4fa70db8c5", - "replacement": "guid: 32d40088a6124c578ad6b428df586e2e" - }, - { - "referencedResource": "TextContainer.cs", - "target": "fileID: 311004786, guid: 89f0137620f6af44b9ba852b4190e64e", - "replacement": "fileID: 11500000, guid: 32d40088a6124c578ad6b428df586e2e" - }, - { - "referencedResource": "TextMeshPro.cs", - "target": "guid: 1a1578b9753d2604f98d608cb4239e2f", - "replacement": "guid: 9541d86e2fd84c1d9990edf0852d74ab" - }, - { - "referencedResource": "TextMeshPro.cs", - "target": "fileID: -806885394, guid: 89f0137620f6af44b9ba852b4190e64e", - "replacement": "fileID: 11500000, guid: 9541d86e2fd84c1d9990edf0852d74ab" - }, - { - "referencedResource": "TextMeshProUGUI.cs", - "target": "guid: 496f2e385b0c62542b5c739ccfafd8da", - "replacement": "guid: f4688fdb7df04437aeb418b961361dc5" - }, - { - "referencedResource": "TextMeshProUGUI.cs", - "target": "fileID: 1453722849, guid: 89f0137620f6af44b9ba852b4190e64e", - "replacement": "fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5" - }, - { - "referencedResource": "TMP_Asset.cs", - "target": "guid: e2c4405608b405a4680436e183e53c45", - "replacement": "guid: 3bda1886f58f4e0ab1139400b160c3ee" - }, - { - "referencedResource": "TMP_Asset.cs", - "target": "fileID: -659140726, guid: 89f0137620f6af44b9ba852b4190e64e", - "replacement": "fileID: 11500000, guid: 3bda1886f58f4e0ab1139400b160c3ee" - }, - { - "referencedResource": "TMP_ColorGradient.cs", - "target": "guid: e90e18dd4a044ff4394833216e6bf4d2", - "replacement": "guid: 54d21f6ece3b46479f0c328f8c6007e0" - }, - { - "referencedResource": "TMP_ColorGradient.cs", - "target": "fileID: 2108210716, guid: 89f0137620f6af44b9ba852b4190e64e", - "replacement": "fileID: 11500000, guid: 54d21f6ece3b46479f0c328f8c6007e0" - }, - { - "referencedResource": "TMP_Dropdown.cs", - "target": "guid: 44cb1d34ddab9d449a05fc3747876be1", - "replacement": "guid: 7b743370ac3e4ec2a1668f5455a8ef8a" - }, - { - "referencedResource": "TMP_Dropdown.cs", - "target": "fileID: 1148083418, guid: 89f0137620f6af44b9ba852b4190e64e", - "replacement": "fileID: 11500000, guid: 7b743370ac3e4ec2a1668f5455a8ef8a" - }, - { - "referencedResource": "TMP_FontAsset.cs", - "target": "guid: 74dfce233ddb29b4294c3e23c1d3650d", - "replacement": "guid: 71c1514a6bd24e1e882cebbe1904ce04" - }, - { - "referencedResource": "TMP_FontAsset.cs", - "target": "fileID: -667331979, guid: 89f0137620f6af44b9ba852b4190e64e", - "replacement": "fileID: 11500000, guid: 71c1514a6bd24e1e882cebbe1904ce04" - }, - { - "referencedResource": "TMP_InputField.cs", - "target": "guid: 7b85855a3deaa2e44ac6741a6bbc85f6", - "replacement": "guid: 2da0c512f12947e489f739169773d7ca" - }, - { - "referencedResource": "TMP_InputField.cs", - "target": "fileID: -1620774994, guid: 89f0137620f6af44b9ba852b4190e64e", - "replacement": "fileID: 11500000, guid: 2da0c512f12947e489f739169773d7ca" - }, - { - "referencedResource": "TMP_Settings.cs", - "target": "guid: aafc3c7b9e915d64e8ec3d2c88b3a231", - "replacement": "guid: 2705215ac5b84b70bacc50632be6e391" - }, - { - "referencedResource": "TMP_Settings.cs", - "target": "fileID: -395462249, guid: 89f0137620f6af44b9ba852b4190e64e", - "replacement": "fileID: 11500000, guid: 2705215ac5b84b70bacc50632be6e391" - }, - { - "referencedResource": "TMP_SpriteAsset.cs", - "target": "guid: 90940d439ca0ef746af0b48419b92d2e", - "replacement": "guid: 84a92b25f83d49b9bc132d206b370281" - }, - { - "referencedResource": "TMP_SpriteAsset.cs", - "target": "fileID: 2019389346, guid: 89f0137620f6af44b9ba852b4190e64e", - "replacement": "fileID: 11500000, guid: 84a92b25f83d49b9bc132d206b370281" - }, - { - "referencedResource": "TMP_StyleSheet.cs", - "target": "guid: 13259b4ce497b194eb52a33d8eda0bdc", - "replacement": "guid: ab2114bdc8544297b417dfefe9f1e410" - }, - { - "referencedResource": "TMP_StyleSheet.cs", - "target": "fileID: -1936749209, guid: 89f0137620f6af44b9ba852b4190e64e", - "replacement": "fileID: 11500000, guid: ab2114bdc8544297b417dfefe9f1e410" - }, - { - "referencedResource": "TMP_SubMesh.cs", - "target": "guid: bd950677b2d06c74494b1c1118584fff", - "replacement": "guid: 07994bfe8b0e4adb97d706de5dea48d5" - }, - { - "referencedResource": "TMP_SubMesh.cs", - "target": "fileID: 1330537494, guid: 89f0137620f6af44b9ba852b4190e64e", - "replacement": "fileID: 11500000, guid: 07994bfe8b0e4adb97d706de5dea48d5" - }, - { - "referencedResource": "TMP_SubMeshUI.cs", - "target": "guid: a5378e1f14d974d419f811d6b0861f20", - "replacement": "guid: 058cba836c1846c3aa1c5fd2e28aea77" - }, - { - "referencedResource": "TMP_SubMeshUI.cs", - "target": "fileID: 1908110080, guid: 89f0137620f6af44b9ba852b4190e64e", - "replacement": "fileID: 11500000, guid: 058cba836c1846c3aa1c5fd2e28aea77" - }, - { - "referencedResource": "TMP_Text.cs", - "target": "guid: 9ec8dc9c3fa2e5d41b939b5888d2f1e8", - "replacement": "guid: 5143f58107604835ab1a5efa2d8818fd" - }, - { - "referencedResource": "TMP_Text.cs", - "target": "fileID: -1385168320, guid: 89f0137620f6af44b9ba852b4190e64e", - "replacement": "fileID: 11500000, guid: 5143f58107604835ab1a5efa2d8818fd" - }, - { - "referencedResource": "Default Sprite Asset.png", - "target": "guid: 5b32c2d36abe44540bed74c1f787033b", - "replacement": "guid: a0fc465d6cf04254a2938578735e2383" - }, - { - "referencedResource": "EmojiOne.png", - "target": "guid: 6ec706981a919c3489f0b061a40054e2", - "replacement": "guid: dffef66376be4fa480fb02b19edbe903" - } - ] -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/PackageConversionData.json.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/PackageConversionData.json.meta deleted file mode 100644 index a7a2790c..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/PackageConversionData.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 05f5bfd584002f948982a1498890f9a9 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/PackageConversionData_Assets.json b/Library/PackageCache/com.unity.textmeshpro@2.0.1/PackageConversionData_Assets.json deleted file mode 100644 index f07aa23f..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/PackageConversionData_Assets.json +++ /dev/null @@ -1,184 +0,0 @@ -{ - "assetRecords": [ - { - "referencedResource": "TMP_FontAsset.cs", - "target": "guid: 74dfce233ddb29b4294c3e23c1d3650d", - "replacement": "guid: 71c1514a6bd24e1e882cebbe1904ce04" - }, - { - "referencedResource": "TMP_FontAsset.cs", - "target": "fileID: -667331979, guid: 89f0137620f6af44b9ba852b4190e64e", - "replacement": "fileID: 11500000, guid: 71c1514a6bd24e1e882cebbe1904ce04" - }, - { - "referencedResource": "Anton SDF.asset", - "target": "guid: f76ef802b8b940c46a31f9027f2b0158", - "replacement": "guid: 8a89fa14b10d46a99122fd4f73fca9a2" - }, - { - "referencedResource": "Bangers SDF.asset", - "target": "guid: 808aa8f1ab804104aa7d0c337a6c1481", - "replacement": "guid: 125cb55b44b24c4393181402bc6200e6" - }, - { - "referencedResource": "Electronic Highway Sign SDF.asset", - "target": "guid: 163292f6f226d954593d45b079f8aae0", - "replacement": "guid: dc36b3fdc14f47ebb36fd484a67e268a" - }, - { - "referencedResource": "Oswald Bold SDF.asset", - "target": "guid: 09641b029dfa78843902b548a9de7553", - "replacement": "guid: 0161d805a3764c089bef00bfe00793f5" - }, - { - "referencedResource": "Roboto-Bold SDF.asset", - "target": "guid: d62a573c923f5cb47b8ff65261033b90", - "replacement": "guid: 5302535af1044152a457ed104f1f4b91" - }, - { - "referencedResource": "LiberationSans SDF.asset", - "target": "guid: 715b80e429c437e40867928a4e1fc975", - "replacement": "guid: 8f586378b4e144a9851e7b34d9b748ee" - }, - { - "referencedResource": "TMP_Bitmap.shader", - "target": "guid: edfcf888cd11d9245b91d2883049a57e", - "replacement": "guid: 128e987d567d4e2c824d754223b3f3b0" - }, - { - "referencedResource": "TMP_Bitmap-Mobile.shader", - "target": "guid: d1cf17907700cb647aa3ea423ba38f2e", - "replacement": "guid: 1e3b057af24249748ff873be7fafee47" - }, - { - "referencedResource": "TMP_SDF.shader", - "target": "guid: dca26082f9cb439469295791d9f76fe5", - "replacement": "guid: 68e6db2ebdc24f95958faec2be5558d6" - }, - { - "referencedResource": "TMP_SDF Overlay.shader", - "target": "guid: 4a7755d6b5b67874f89c85f56f95fe97", - "replacement": "guid: dd89cf5b9246416f84610a006f916af7" - }, - { - "referencedResource": "TMP_SDF-Mobile.shader", - "target": "guid: cafd18099dfc0114896e0a8b277b81b6", - "replacement": "guid: fe393ace9b354375a9cb14cdbbc28be4" - }, - { - "referencedResource": "TMP_SDF-Mobile Masking.shader", - "target": "guid: afc255f7c2be52e41973a3d10a2e632d", - "replacement": "guid: bc1ede39bf3643ee8e493720e4259791" - }, - { - "referencedResource": "TMP_SDF-Mobile Overlay.shader", - "target": "guid: 9ecb3fe313cb5f7478141eba4a2d54ed", - "replacement": "guid: a02a7d8c237544f1962732b55a9aebf1" - }, - { - "referencedResource": "TMP_SDF-Surface.shader", - "target": "guid: 8e6b9842dbb1a5a4887378afab854e63", - "replacement": "guid: f7ada0af4f174f0694ca6a487b8f543d" - }, - { - "referencedResource": "TMP_SDF-Surface-Mobile.shader", - "target": "guid: 3c2ea7753c1425145a74d106ec1cd852", - "replacement": "guid: 85187c2149c549c5b33f0cdb02836b17" - }, - { - "referencedResource": "TMP_Sprite.shader", - "target": "guid: 3a1c68c8292caf046bd21158886c5e40", - "replacement": "guid: cf81c85f95fe47e1a27f6ae460cf182c" - }, - { - "referencedResource": "TMP_ColorGradient.cs", - "target": "guid: e90e18dd4a044ff4394833216e6bf4d2", - "replacement": "guid: 54d21f6ece3b46479f0c328f8c6007e0" - }, - { - "referencedResource": "TMP_ColorGradient.cs", - "target": "fileID: 2108210716, guid: 89f0137620f6af44b9ba852b4190e64e", - "replacement": "fileID: 11500000, guid: 54d21f6ece3b46479f0c328f8c6007e0" - }, - { - "referencedResource": "TMP_Settings.cs", - "target": "guid: aafc3c7b9e915d64e8ec3d2c88b3a231", - "replacement": "guid: 2705215ac5b84b70bacc50632be6e391" - }, - { - "referencedResource": "TMP_Settings.cs", - "target": "fileID: -395462249, guid: 89f0137620f6af44b9ba852b4190e64e", - "replacement": "fileID: 11500000, guid: 2705215ac5b84b70bacc50632be6e391" - }, - { - "referencedResource": "TMP Settings.asset", - "target": "guid: 69ed5bac41eebaa4c97e9d2a4168c54f", - "replacement": "guid: 3f5b5dff67a942289a9defa416b206f3" - }, - { - "referencedResource": "LineBreaking Following Characters.txt", - "target": "guid: 312ba5b9e90627940866e19549a788cf", - "replacement": "guid: fade42e8bc714b018fac513c043d323b" - }, - { - "referencedResource": "LineBreaking Leading Characters.txt", - "target": "guid: 8d713940fcbede142ae4a33ea0062b33", - "replacement": "guid: d82c1b31c7e74239bff1220585707d2b" - }, - { - "referencedResource": "TMP_StyleSheet.cs", - "target": "guid: 13259b4ce497b194eb52a33d8eda0bdc", - "replacement": "guid: ab2114bdc8544297b417dfefe9f1e410" - }, - { - "referencedResource": "TMP_StyleSheet.cs", - "target": "fileID: -1936749209, guid: 89f0137620f6af44b9ba852b4190e64e", - "replacement": "fileID: 11500000, guid: ab2114bdc8544297b417dfefe9f1e410" - }, - { - "referencedResource": "TMP Default Style Sheet.asset", - "target": "guid: 54d1085f9a2fdea4587fcfc7dddcd4bc", - "replacement": "guid: f952c082cb03451daed3ee968ac6c63e" - }, - { - "referencedResource": "TMP_SpriteAsset.cs", - "target": "guid: 90940d439ca0ef746af0b48419b92d2e", - "replacement": "guid: 84a92b25f83d49b9bc132d206b370281" - }, - { - "referencedResource": "TMP_SpriteAsset.cs", - "target": "fileID: 2019389346, guid: 89f0137620f6af44b9ba852b4190e64e", - "replacement": "fileID: 11500000, guid: 84a92b25f83d49b9bc132d206b370281" - }, - { - "referencedResource": "Default Sprite Asset.asset", - "target": "guid: 273ca6c80b4b5d746b5e548f532bffd8", - "replacement": "guid: fbef3c704dce48f08a44612d6c856c8d" - }, - { - "referencedResource": "Default Sprite Asset.png", - "target": "guid: 5b32c2d36abe44540bed74c1f787033b", - "replacement": "guid: a0fc465d6cf04254a2938578735e2383" - }, - { - "referencedResource": "EmojiOne.asset", - "target": "guid: 9a952e2781ef26940ae089f1053ef4ef", - "replacement": "guid: c41005c129ba4d66911b75229fd70b45" - }, - { - "referencedResource": "EmojiOne.png", - "target": "guid: 6ec706981a919c3489f0b061a40054e2", - "replacement": "guid: dffef66376be4fa480fb02b19edbe903" - }, - { - "referencedResource": "DropCap Numbers.asset", - "target": "guid: c4fd2a959a50b584b92dedfefec1ffda", - "replacement": "guid: 14aa93acbb234d16aaef0e8b46814db6" - }, - { - "referencedResource": "DropCap Numbers.psd", - "target": "guid: 28b41fef228d6814f90e541deaf9f262", - "replacement": "guid: fd09957580ac4326916010f1f260975b" - } - ] -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/PackageConversionData_Assets.json.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/PackageConversionData_Assets.json.meta deleted file mode 100644 index f534ac14..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/PackageConversionData_Assets.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 0e0afa652c0031c48896a97b424d027b -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts.meta deleted file mode 100644 index 3c2e4cf7..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: e6a1d1e3d2384453a7371b4a07a41ca4 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor.meta deleted file mode 100644 index af509a3a..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b5d6c28ed7b94775be9e2560f300247c -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/DropdownOptionListDrawer.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/DropdownOptionListDrawer.cs deleted file mode 100644 index 2b7dc854..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/DropdownOptionListDrawer.cs +++ /dev/null @@ -1,60 +0,0 @@ -using UnityEditorInternal; -using UnityEngine; -using UnityEngine.UI; -using UnityEditor; - -namespace TMPro.EditorUtilities -{ - [CustomPropertyDrawer(typeof(TMP_Dropdown.OptionDataList), true)] - class DropdownOptionListDrawer : PropertyDrawer - { - private ReorderableList m_ReorderableList; - - private void Init(SerializedProperty property) - { - if (m_ReorderableList != null) - return; - - SerializedProperty array = property.FindPropertyRelative("m_Options"); - - m_ReorderableList = new ReorderableList(property.serializedObject, array); - m_ReorderableList.drawElementCallback = DrawOptionData; - m_ReorderableList.drawHeaderCallback = DrawHeader; - m_ReorderableList.elementHeight += 16; - } - - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) - { - Init(property); - - m_ReorderableList.DoList(position); - } - - private void DrawHeader(Rect rect) - { - GUI.Label(rect, "Options"); - } - - private void DrawOptionData(Rect rect, int index, bool isActive, bool isFocused) - { - SerializedProperty itemData = m_ReorderableList.serializedProperty.GetArrayElementAtIndex(index); - SerializedProperty itemText = itemData.FindPropertyRelative("m_Text"); - SerializedProperty itemImage = itemData.FindPropertyRelative("m_Image"); - - RectOffset offset = new RectOffset(0, 0, -1, -3); - rect = offset.Add(rect); - rect.height = EditorGUIUtility.singleLineHeight; - - EditorGUI.PropertyField(rect, itemText, GUIContent.none); - rect.y += EditorGUIUtility.singleLineHeight; - EditorGUI.PropertyField(rect, itemImage, GUIContent.none); - } - - public override float GetPropertyHeight(SerializedProperty property, GUIContent label) - { - Init(property); - - return m_ReorderableList.GetHeight(); - } - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/DropdownOptionListDrawer.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/DropdownOptionListDrawer.cs.meta deleted file mode 100644 index f7f4c565..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/DropdownOptionListDrawer.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 9545c9eb3bf94265810463794fec8334 -timeCreated: 1464818008 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/GlyphInfoDrawer.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/GlyphInfoDrawer.cs deleted file mode 100644 index 0936dc75..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/GlyphInfoDrawer.cs +++ /dev/null @@ -1,61 +0,0 @@ -/* -using UnityEngine; -using UnityEditor; -using System.Collections; - - -namespace TMPro.EditorUtilities -{ - - [CustomPropertyDrawer(typeof(TMP_Glyph))] - public class GlyphInfoDrawer : PropertyDrawer - { - - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) - { - SerializedProperty prop_id = property.FindPropertyRelative("id"); - SerializedProperty prop_x = property.FindPropertyRelative("x"); - SerializedProperty prop_y = property.FindPropertyRelative("y"); - SerializedProperty prop_width = property.FindPropertyRelative("width"); - SerializedProperty prop_height = property.FindPropertyRelative("height"); - SerializedProperty prop_xOffset = property.FindPropertyRelative("xOffset"); - SerializedProperty prop_yOffset = property.FindPropertyRelative("yOffset"); - SerializedProperty prop_xAdvance = property.FindPropertyRelative("xAdvance"); - SerializedProperty prop_scale = property.FindPropertyRelative("scale"); - - - // We get Rect since a valid position may not be provided by the caller. - Rect rect = GUILayoutUtility.GetRect(position.width, 48); - rect.y -= 15; - - //GUI.enabled = false; - EditorGUIUtility.labelWidth = 40f; - EditorGUIUtility.fieldWidth = 45f; - - bool prevGuiState = GUI.enabled; - GUI.enabled = true; - EditorGUI.LabelField(new Rect(rect.x + 5f, rect.y, 80f, 18), new GUIContent("Ascii: " + prop_id.intValue + ""), TMP_UIStyleManager.label); - EditorGUI.LabelField(new Rect(rect.x + 90f, rect.y, 80f, 18), new GUIContent("Hex: " + prop_id.intValue.ToString("X") + ""), TMP_UIStyleManager.label); - EditorGUI.LabelField(new Rect(rect.x + 170f, rect.y, 80, 18), "Char: [ " + (char)prop_id.intValue + " ]", TMP_UIStyleManager.label); - GUI.enabled = prevGuiState; - - EditorGUIUtility.labelWidth = 35f; - EditorGUIUtility.fieldWidth = 10f; - - float width = (rect.width - 5f) / 4; - EditorGUI.PropertyField(new Rect(rect.x + 5f + width * 0, rect.y + 22, width - 5f, 18), prop_x, new GUIContent("X:")); - EditorGUI.PropertyField(new Rect(rect.x + 5f + width * 1, rect.y + 22, width - 5f, 18), prop_y, new GUIContent("Y:")); - EditorGUI.PropertyField(new Rect(rect.x + 5f + width * 2, rect.y + 22, width - 5f, 18), prop_width, new GUIContent("W:")); - EditorGUI.PropertyField(new Rect(rect.x + 5f + width * 3, rect.y + 22, width - 5f, 18), prop_height, new GUIContent("H:")); - - //GUI.enabled = true; - EditorGUI.PropertyField(new Rect(rect.x + 5f + width * 0, rect.y + 44, width - 5f, 18), prop_xOffset, new GUIContent("OX:")); - EditorGUI.PropertyField(new Rect(rect.x + 5f + width * 1, rect.y + 44, width - 5f, 18), prop_yOffset, new GUIContent("OY:")); - //GUI.enabled = true; - EditorGUI.PropertyField(new Rect(rect.x + 5f + width * 2, rect.y + 44, width - 5f, 18), prop_xAdvance, new GUIContent("ADV:")); - EditorGUI.PropertyField(new Rect(rect.x + 5f + width * 3, rect.y + 44, width - 5f, 18), prop_scale, new GUIContent("SF:")); - } - - } -} -*/ \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/GlyphInfoDrawer.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/GlyphInfoDrawer.cs.meta deleted file mode 100644 index 10ed151e..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/GlyphInfoDrawer.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 900f1a451c764dc3bdcc0de815a15935 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/GlyphMetricsPropertyDrawer.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/GlyphMetricsPropertyDrawer.cs deleted file mode 100644 index 1e1f4d18..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/GlyphMetricsPropertyDrawer.cs +++ /dev/null @@ -1,53 +0,0 @@ -using UnityEngine; -using UnityEngine.TextCore; -using UnityEditor; -using System.Collections; - - -namespace TMPro.EditorUtilities -{ - - [CustomPropertyDrawer(typeof(GlyphMetrics))] - public class GlyphMetricsPropertyDrawer : PropertyDrawer - { - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) - { - SerializedProperty prop_Width = property.FindPropertyRelative("m_Width"); - SerializedProperty prop_Height = property.FindPropertyRelative("m_Height"); - SerializedProperty prop_HoriBearingX = property.FindPropertyRelative("m_HorizontalBearingX"); - SerializedProperty prop_HoriBearingY = property.FindPropertyRelative("m_HorizontalBearingY"); - SerializedProperty prop_HoriAdvance = property.FindPropertyRelative("m_HorizontalAdvance"); - - // We get Rect since a valid position may not be provided by the caller. - Rect rect = new Rect(position.x, position.y, position.width, 49); - - EditorGUI.LabelField(rect, new GUIContent("Glyph Metrics")); - - EditorGUIUtility.labelWidth = 30f; - EditorGUIUtility.fieldWidth = 10f; - - //GUI.enabled = false; - float width = (rect.width - 75f) / 2; - EditorGUI.PropertyField(new Rect(rect.x + width * 0, rect.y + 20, width - 5f, 18), prop_Width, new GUIContent("W:")); - EditorGUI.PropertyField(new Rect(rect.x + width * 1, rect.y + 20, width - 5f, 18), prop_Height, new GUIContent("H:")); - - //GUI.enabled = true; - - width = (rect.width - 75f) / 3; - EditorGUI.BeginChangeCheck(); - EditorGUI.PropertyField(new Rect(rect.x + width * 0, rect.y + 40, width - 5f, 18), prop_HoriBearingX, new GUIContent("BX:")); - EditorGUI.PropertyField(new Rect(rect.x + width * 1, rect.y + 40, width - 5f, 18), prop_HoriBearingY, new GUIContent("BY:")); - EditorGUI.PropertyField(new Rect(rect.x + width * 2, rect.y + 40, width - 5f, 18), prop_HoriAdvance, new GUIContent("AD:")); - if (EditorGUI.EndChangeCheck()) - { - - } - } - - public override float GetPropertyHeight(SerializedProperty property, GUIContent label) - { - return 65f; - } - - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/GlyphMetricsPropertyDrawer.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/GlyphMetricsPropertyDrawer.cs.meta deleted file mode 100644 index d91f5791..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/GlyphMetricsPropertyDrawer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e3882522a08b6f5459b4dea6f8791278 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/GlyphRectPropertyDrawer.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/GlyphRectPropertyDrawer.cs deleted file mode 100644 index 87ecf0cc..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/GlyphRectPropertyDrawer.cs +++ /dev/null @@ -1,44 +0,0 @@ -using UnityEngine; -using UnityEngine.TextCore; -using UnityEditor; -using System.Collections; - - -namespace TMPro.EditorUtilities -{ - - [CustomPropertyDrawer(typeof(GlyphRect))] - public class GlyphRectPropertyDrawer : PropertyDrawer - { - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) - { - //EditorGUI.BeginProperty(position, label, property); - - SerializedProperty prop_X = property.FindPropertyRelative("m_X"); - SerializedProperty prop_Y = property.FindPropertyRelative("m_Y"); - SerializedProperty prop_Width = property.FindPropertyRelative("m_Width"); - SerializedProperty prop_Height = property.FindPropertyRelative("m_Height"); - - // We get Rect since a valid position may not be provided by the caller. - Rect rect = new Rect(position.x, position.y, position.width, 49); - EditorGUI.LabelField(rect, new GUIContent("Glyph Rect")); - - EditorGUIUtility.labelWidth = 30f; - EditorGUIUtility.fieldWidth = 10f; - - //GUI.enabled = false; - float width = (rect.width - 75f) / 4; - EditorGUI.PropertyField(new Rect(rect.x + width * 0, rect.y + 20, width - 5f, 18), prop_X, new GUIContent("X:")); - EditorGUI.PropertyField(new Rect(rect.x + width * 1, rect.y + 20, width - 5f, 18), prop_Y, new GUIContent("Y:")); - EditorGUI.PropertyField(new Rect(rect.x + width * 2, rect.y + 20, width - 5f, 18), prop_Width, new GUIContent("W:")); - EditorGUI.PropertyField(new Rect(rect.x + width * 3, rect.y + 20, width - 5f, 18), prop_Height, new GUIContent("H:")); - - //EditorGUI.EndProperty(); - } - - public override float GetPropertyHeight(SerializedProperty property, GUIContent label) - { - return 45f; - } - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/GlyphRectPropertyDrawer.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/GlyphRectPropertyDrawer.cs.meta deleted file mode 100644 index 93232794..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/GlyphRectPropertyDrawer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8bc2b083b068f3546a9509c805e0541c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BaseEditorPanel.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BaseEditorPanel.cs deleted file mode 100644 index c4a55baf..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BaseEditorPanel.cs +++ /dev/null @@ -1,1116 +0,0 @@ -using UnityEngine; -using UnityEditor; - -namespace TMPro.EditorUtilities -{ - public abstract class TMP_BaseEditorPanel : Editor - { - //Labels and Tooltips - static readonly GUIContent k_RtlToggleLabel = new GUIContent("Enable RTL Editor", "Reverses text direction and allows right to left editing."); - static readonly GUIContent k_MainSettingsLabel = new GUIContent("Main Settings"); - static readonly GUIContent k_FontAssetLabel = new GUIContent("Font Asset", "The Font Asset containing the glyphs that can be rendered for this text."); - static readonly GUIContent k_MaterialPresetLabel = new GUIContent("Material Preset", "The material used for rendering. Only materials created from the Font Asset can be used."); - static readonly GUIContent k_AutoSizeLabel = new GUIContent("Auto Size", "Auto sizes the text to fit the available space."); - static readonly GUIContent k_FontSizeLabel = new GUIContent("Font Size", "The size the text will be rendered at in points."); - static readonly GUIContent k_AutoSizeOptionsLabel = new GUIContent("Auto Size Options"); - static readonly GUIContent k_MinLabel = new GUIContent("Min", "The minimum font size."); - static readonly GUIContent k_MaxLabel = new GUIContent("Max", "The maximum font size."); - static readonly GUIContent k_WdLabel = new GUIContent("WD%", "Compresses character width up to this value before reducing font size."); - static readonly GUIContent k_LineLabel = new GUIContent("Line", "Negative value only. Compresses line height down to this value before reducing font size."); - static readonly GUIContent k_FontStyleLabel = new GUIContent("Font Style", "Styles to apply to the text such as Bold or Italic."); - - static readonly GUIContent k_BoldLabel = new GUIContent("B", "Bold"); - static readonly GUIContent k_ItalicLabel = new GUIContent("I", "Italic"); - static readonly GUIContent k_UnderlineLabel = new GUIContent("U", "Underline"); - static readonly GUIContent k_StrikethroughLabel = new GUIContent("S", "Strikethrough"); - static readonly GUIContent k_LowercaseLabel = new GUIContent("ab", "Lowercase"); - static readonly GUIContent k_UppercaseLabel = new GUIContent("AB", "Uppercase"); - static readonly GUIContent k_SmallcapsLabel = new GUIContent("SC", "Smallcaps"); - - static readonly GUIContent k_ColorModeLabel = new GUIContent("Color Mode", "The type of gradient to use."); - static readonly GUIContent k_BaseColorLabel = new GUIContent("Vertex Color", "The base color of the text vertices."); - static readonly GUIContent k_ColorPresetLabel = new GUIContent("Color Preset", "A Color Preset which override the local color settings."); - static readonly GUIContent k_ColorGradientLabel = new GUIContent("Color Gradient", "The gradient color applied over the Vertex Color. Can be locally set or driven by a Gradient Asset."); - static readonly GUIContent k_CorenerColorsLabel = new GUIContent("Colors", "The color composition of the gradient."); - static readonly GUIContent k_OverrideTagsLabel = new GUIContent("Override Tags", "Whether the color settings override the tag."); - - static readonly GUIContent k_SpacingOptionsLabel = new GUIContent("Spacing Options", "Spacing adjustments between different elements of the text."); - static readonly GUIContent k_CharacterSpacingLabel = new GUIContent("Character"); - static readonly GUIContent k_WordSpacingLabel = new GUIContent("Word"); - static readonly GUIContent k_LineSpacingLabel = new GUIContent("Line"); - static readonly GUIContent k_ParagraphSpacingLabel = new GUIContent("Paragraph"); - - static readonly GUIContent k_AlignmentLabel = new GUIContent("Alignment", "Horizontal and vertical aligment of the text within its container."); - static readonly GUIContent k_WrapMixLabel = new GUIContent("Wrap Mix (W <-> C)", "How much to favor words versus characters when distributing the text."); - - static readonly GUIContent k_WrappingLabel = new GUIContent("Wrapping", "Wraps text to the next line when reaching the edge of the container."); - static readonly GUIContent[] k_WrappingOptions = { new GUIContent("Disabled"), new GUIContent("Enabled") }; - static readonly GUIContent k_OverflowLabel = new GUIContent("Overflow", "How to display text which goes past the edge of the container."); - - static readonly GUIContent k_MarginsLabel = new GUIContent("Margins", "The space between the text and the edge of its container."); - static readonly GUIContent k_GeometrySortingLabel = new GUIContent("Geometry Sorting", "The order in which text geometry is sorted. Used to adjust the way overlapping characters are displayed."); - static readonly GUIContent k_RichTextLabel = new GUIContent("Rich Text", "Enables the use of rich text tags such as and ."); - static readonly GUIContent k_EscapeCharactersLabel = new GUIContent("Parse Escape Characters", "Whether to display strings such as \"\\n\" as is or replace them by the character they represent."); - static readonly GUIContent k_VisibleDescenderLabel = new GUIContent("Visible Descender", "Compute descender values from visible characters only. Used to adjust layout behavior when hiding and revealing characters dynamically."); - static readonly GUIContent k_SpriteAssetLabel = new GUIContent("Sprite Asset", "The Sprite Asset used when NOT specifically referencing one using ."); - - static readonly GUIContent k_HorizontalMappingLabel = new GUIContent("Horizontal Mapping", "Horizontal UV mapping when using a shader with a texture face option."); - static readonly GUIContent k_VerticalMappingLabel = new GUIContent("Vertical Mapping", "Vertical UV mapping when using a shader with a texture face option."); - static readonly GUIContent k_LineOffsetLabel = new GUIContent("Line Offset", "Adds an horizontal offset to each successive line. Used for slanted texturing."); - - static readonly GUIContent k_KerningLabel = new GUIContent("Kerning", "Enables character specific spacing between pairs of characters."); - static readonly GUIContent k_PaddingLabel = new GUIContent("Extra Padding", "Adds some padding between the characters and the edge of the text mesh. Can reduce graphical errors when displaying small text."); - - static readonly GUIContent k_LeftLabel = new GUIContent("Left"); - static readonly GUIContent k_TopLabel = new GUIContent("Top"); - static readonly GUIContent k_RightLabel = new GUIContent("Right"); - static readonly GUIContent k_BottomLabel = new GUIContent("Bottom"); - - protected static readonly GUIContent k_ExtraSettingsLabel = new GUIContent("Extra Settings"); - - protected struct Foldout - { - // Track Inspector foldout panel states, globally. - public static bool extraSettings = false; - public static bool materialInspector = true; - } - - protected static int s_EventId; - - public int selAlignGridA; - public int selAlignGridB; - - protected SerializedProperty m_TextProp; - - protected SerializedProperty m_IsRightToLeftProp; - protected string m_RtlText; - - protected SerializedProperty m_FontAssetProp; - - protected SerializedProperty m_FontSharedMaterialProp; - protected Material[] m_MaterialPresets; - protected GUIContent[] m_MaterialPresetNames; - protected int m_MaterialPresetSelectionIndex; - protected bool m_IsPresetListDirty; - - protected SerializedProperty m_FontStyleProp; - - protected SerializedProperty m_FontColorProp; - protected SerializedProperty m_EnableVertexGradientProp; - protected SerializedProperty m_FontColorGradientProp; - protected SerializedProperty m_FontColorGradientPresetProp; - protected SerializedProperty m_OverrideHtmlColorProp; - - protected SerializedProperty m_FontSizeProp; - protected SerializedProperty m_FontSizeBaseProp; - - protected SerializedProperty m_AutoSizingProp; - protected SerializedProperty m_FontSizeMinProp; - protected SerializedProperty m_FontSizeMaxProp; - - protected SerializedProperty m_LineSpacingMaxProp; - protected SerializedProperty m_CharWidthMaxAdjProp; - - protected SerializedProperty m_CharacterSpacingProp; - protected SerializedProperty m_WordSpacingProp; - protected SerializedProperty m_LineSpacingProp; - protected SerializedProperty m_ParagraphSpacingProp; - - protected SerializedProperty m_TextAlignmentProp; - - protected SerializedProperty m_HorizontalMappingProp; - protected SerializedProperty m_VerticalMappingProp; - protected SerializedProperty m_UvLineOffsetProp; - - protected SerializedProperty m_EnableWordWrappingProp; - protected SerializedProperty m_WordWrappingRatiosProp; - protected SerializedProperty m_TextOverflowModeProp; - protected SerializedProperty m_PageToDisplayProp; - protected SerializedProperty m_LinkedTextComponentProp; - protected SerializedProperty m_IsLinkedTextComponentProp; - - protected SerializedProperty m_EnableKerningProp; - - protected SerializedProperty m_IsRichTextProp; - - protected SerializedProperty m_HasFontAssetChangedProp; - - protected SerializedProperty m_EnableExtraPaddingProp; - protected SerializedProperty m_CheckPaddingRequiredProp; - protected SerializedProperty m_EnableEscapeCharacterParsingProp; - protected SerializedProperty m_UseMaxVisibleDescenderProp; - protected SerializedProperty m_GeometrySortingOrderProp; - - protected SerializedProperty m_SpriteAssetProp; - - protected SerializedProperty m_MarginProp; - - protected SerializedProperty m_ColorModeProp; - - protected bool m_HavePropertiesChanged; - - protected TMP_Text m_TextComponent; - protected RectTransform m_RectTransform; - - protected Material m_TargetMaterial; - - protected Vector3[] m_RectCorners = new Vector3[4]; - protected Vector3[] m_HandlePoints = new Vector3[4]; - - protected virtual void OnEnable() - { - m_TextProp = serializedObject.FindProperty("m_text"); - m_IsRightToLeftProp = serializedObject.FindProperty("m_isRightToLeft"); - m_FontAssetProp = serializedObject.FindProperty("m_fontAsset"); - m_FontSharedMaterialProp = serializedObject.FindProperty("m_sharedMaterial"); - - m_FontStyleProp = serializedObject.FindProperty("m_fontStyle"); - - m_FontSizeProp = serializedObject.FindProperty("m_fontSize"); - m_FontSizeBaseProp = serializedObject.FindProperty("m_fontSizeBase"); - - m_AutoSizingProp = serializedObject.FindProperty("m_enableAutoSizing"); - m_FontSizeMinProp = serializedObject.FindProperty("m_fontSizeMin"); - m_FontSizeMaxProp = serializedObject.FindProperty("m_fontSizeMax"); - - m_LineSpacingMaxProp = serializedObject.FindProperty("m_lineSpacingMax"); - m_CharWidthMaxAdjProp = serializedObject.FindProperty("m_charWidthMaxAdj"); - - // Colors & Gradient - m_FontColorProp = serializedObject.FindProperty("m_fontColor"); - m_EnableVertexGradientProp = serializedObject.FindProperty("m_enableVertexGradient"); - m_FontColorGradientProp = serializedObject.FindProperty("m_fontColorGradient"); - m_FontColorGradientPresetProp = serializedObject.FindProperty("m_fontColorGradientPreset"); - m_OverrideHtmlColorProp = serializedObject.FindProperty("m_overrideHtmlColors"); - - m_CharacterSpacingProp = serializedObject.FindProperty("m_characterSpacing"); - m_WordSpacingProp = serializedObject.FindProperty("m_wordSpacing"); - m_LineSpacingProp = serializedObject.FindProperty("m_lineSpacing"); - m_ParagraphSpacingProp = serializedObject.FindProperty("m_paragraphSpacing"); - - m_TextAlignmentProp = serializedObject.FindProperty("m_textAlignment"); - - m_HorizontalMappingProp = serializedObject.FindProperty("m_horizontalMapping"); - m_VerticalMappingProp = serializedObject.FindProperty("m_verticalMapping"); - m_UvLineOffsetProp = serializedObject.FindProperty("m_uvLineOffset"); - - m_EnableWordWrappingProp = serializedObject.FindProperty("m_enableWordWrapping"); - m_WordWrappingRatiosProp = serializedObject.FindProperty("m_wordWrappingRatios"); - m_TextOverflowModeProp = serializedObject.FindProperty("m_overflowMode"); - m_PageToDisplayProp = serializedObject.FindProperty("m_pageToDisplay"); - m_LinkedTextComponentProp = serializedObject.FindProperty("m_linkedTextComponent"); - m_IsLinkedTextComponentProp = serializedObject.FindProperty("m_isLinkedTextComponent"); - - m_EnableKerningProp = serializedObject.FindProperty("m_enableKerning"); - - m_EnableExtraPaddingProp = serializedObject.FindProperty("m_enableExtraPadding"); - m_IsRichTextProp = serializedObject.FindProperty("m_isRichText"); - m_CheckPaddingRequiredProp = serializedObject.FindProperty("checkPaddingRequired"); - m_EnableEscapeCharacterParsingProp = serializedObject.FindProperty("m_parseCtrlCharacters"); - m_UseMaxVisibleDescenderProp = serializedObject.FindProperty("m_useMaxVisibleDescender"); - - m_GeometrySortingOrderProp = serializedObject.FindProperty("m_geometrySortingOrder"); - - m_SpriteAssetProp = serializedObject.FindProperty("m_spriteAsset"); - - m_MarginProp = serializedObject.FindProperty("m_margin"); - - m_HasFontAssetChangedProp = serializedObject.FindProperty("m_hasFontAssetChanged"); - - m_ColorModeProp = serializedObject.FindProperty("m_colorMode"); - - m_TextComponent = (TMP_Text)target; - m_RectTransform = m_TextComponent.rectTransform; - - // Create new Material Editor if one does not exists - m_TargetMaterial = m_TextComponent.fontSharedMaterial; - - // Set material inspector visibility - if (m_TargetMaterial != null) - UnityEditorInternal.InternalEditorUtility.SetIsInspectorExpanded(m_TargetMaterial, Foldout.materialInspector); - - // Find all Material Presets matching the current Font Asset Material - m_MaterialPresetNames = GetMaterialPresets(); - - // Initialize the Event Listener for Undo Events. - Undo.undoRedoPerformed += OnUndoRedo; - } - - protected virtual void OnDisable() - { - // Set material inspector visibility - if (m_TargetMaterial != null) - Foldout.materialInspector = UnityEditorInternal.InternalEditorUtility.GetIsInspectorExpanded(m_TargetMaterial); - - if (Undo.undoRedoPerformed != null) - Undo.undoRedoPerformed -= OnUndoRedo; - } - - public override void OnInspectorGUI() - { - // Make sure Multi selection only includes TMP Text objects. - if (IsMixSelectionTypes()) return; - - serializedObject.Update(); - - DrawTextInput(); - - DrawMainSettings(); - - DrawExtraSettings(); - - EditorGUILayout.Space(); - - if (m_HavePropertiesChanged) - { - m_HavePropertiesChanged = false; - m_TextComponent.havePropertiesChanged = true; - m_TextComponent.ComputeMarginSize(); - EditorUtility.SetDirty(target); - } - - serializedObject.ApplyModifiedProperties(); - } - - public void OnSceneGUI() - { - if (IsMixSelectionTypes()) return; - - // Margin Frame & Handles - m_RectTransform.GetWorldCorners(m_RectCorners); - Vector4 marginOffset = m_TextComponent.margin; - Vector3 lossyScale = m_RectTransform.lossyScale; - - m_HandlePoints[0] = m_RectCorners[0] + m_RectTransform.TransformDirection(new Vector3(marginOffset.x * lossyScale.x, marginOffset.w * lossyScale.y, 0)); - m_HandlePoints[1] = m_RectCorners[1] + m_RectTransform.TransformDirection(new Vector3(marginOffset.x * lossyScale.x, -marginOffset.y * lossyScale.y, 0)); - m_HandlePoints[2] = m_RectCorners[2] + m_RectTransform.TransformDirection(new Vector3(-marginOffset.z * lossyScale.x, -marginOffset.y * lossyScale.y, 0)); - m_HandlePoints[3] = m_RectCorners[3] + m_RectTransform.TransformDirection(new Vector3(-marginOffset.z * lossyScale.x, marginOffset.w * lossyScale.y, 0)); - - Handles.DrawSolidRectangleWithOutline(m_HandlePoints, new Color32(255, 255, 255, 0), new Color32(255, 255, 0, 255)); - - // Draw & process FreeMoveHandles - - // LEFT HANDLE - Vector3 oldLeft = (m_HandlePoints[0] + m_HandlePoints[1]) * 0.5f; - Vector3 newLeft = Handles.FreeMoveHandle(oldLeft, Quaternion.identity, HandleUtility.GetHandleSize(m_RectTransform.position) * 0.05f, Vector3.zero, Handles.DotHandleCap); - bool hasChanged = false; - if (oldLeft != newLeft) - { - float delta = oldLeft.x - newLeft.x; - marginOffset.x += -delta / lossyScale.x; - //Debug.Log("Left Margin H0:" + handlePoints[0] + " H1:" + handlePoints[1]); - hasChanged = true; - } - - // TOP HANDLE - Vector3 oldTop = (m_HandlePoints[1] + m_HandlePoints[2]) * 0.5f; - Vector3 newTop = Handles.FreeMoveHandle(oldTop, Quaternion.identity, HandleUtility.GetHandleSize(m_RectTransform.position) * 0.05f, Vector3.zero, Handles.DotHandleCap); - if (oldTop != newTop) - { - float delta = oldTop.y - newTop.y; - marginOffset.y += delta / lossyScale.y; - //Debug.Log("Top Margin H1:" + handlePoints[1] + " H2:" + handlePoints[2]); - hasChanged = true; - } - - // RIGHT HANDLE - Vector3 oldRight = (m_HandlePoints[2] + m_HandlePoints[3]) * 0.5f; - Vector3 newRight = Handles.FreeMoveHandle(oldRight, Quaternion.identity, HandleUtility.GetHandleSize(m_RectTransform.position) * 0.05f, Vector3.zero, Handles.DotHandleCap); - if (oldRight != newRight) - { - float delta = oldRight.x - newRight.x; - marginOffset.z += delta / lossyScale.x; - hasChanged = true; - //Debug.Log("Right Margin H2:" + handlePoints[2] + " H3:" + handlePoints[3]); - } - - // BOTTOM HANDLE - Vector3 oldBottom = (m_HandlePoints[3] + m_HandlePoints[0]) * 0.5f; - Vector3 newBottom = Handles.FreeMoveHandle(oldBottom, Quaternion.identity, HandleUtility.GetHandleSize(m_RectTransform.position) * 0.05f, Vector3.zero, Handles.DotHandleCap); - if (oldBottom != newBottom) - { - float delta = oldBottom.y - newBottom.y; - marginOffset.w += -delta / lossyScale.y; - hasChanged = true; - //Debug.Log("Bottom Margin H0:" + handlePoints[0] + " H3:" + handlePoints[3]); - } - - if (hasChanged) - { - Undo.RecordObjects(new Object[] {m_RectTransform, m_TextComponent }, "Margin Changes"); - m_TextComponent.margin = marginOffset; - EditorUtility.SetDirty(target); - } - } - - protected void DrawTextInput() - { - EditorGUILayout.Space(); - - // If the text component is linked, disable the text input box. - if (m_IsLinkedTextComponentProp.boolValue) - { - EditorGUILayout.HelpBox("The Text Input Box is disabled due to this text component being linked to another.", MessageType.Info); - } - else - { - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(m_TextProp); - - if (EditorGUI.EndChangeCheck() || (m_IsRightToLeftProp.boolValue && string.IsNullOrEmpty(m_RtlText))) - { - m_TextComponent.m_inputSource = TMP_Text.TextInputSources.Text; - m_TextComponent.m_isInputParsingRequired = true; - m_HavePropertiesChanged = true; - - // Handle Left to Right or Right to Left Editor - if (m_IsRightToLeftProp.boolValue) - { - m_RtlText = string.Empty; - string sourceText = m_TextProp.stringValue; - - // Reverse Text displayed in Text Input Box - for (int i = 0; i < sourceText.Length; i++) - { - m_RtlText += sourceText[sourceText.Length - i - 1]; - } - } - } - - // Toggle showing Rich Tags - m_IsRightToLeftProp.boolValue = EditorGUILayout.Toggle(k_RtlToggleLabel, m_IsRightToLeftProp.boolValue); - - if (m_IsRightToLeftProp.boolValue) - { - EditorGUI.BeginChangeCheck(); - m_RtlText = EditorGUILayout.TextArea(m_RtlText, TMP_UIStyleManager.wrappingTextArea, GUILayout.Height(EditorGUI.GetPropertyHeight(m_TextProp) - EditorGUIUtility.singleLineHeight), GUILayout.ExpandWidth(true)); - if (EditorGUI.EndChangeCheck()) - { - // Convert RTL input - string sourceText = string.Empty; - - // Reverse Text displayed in Text Input Box - for (int i = 0; i < m_RtlText.Length; i++) - { - sourceText += m_RtlText[m_RtlText.Length - i - 1]; - } - - m_TextProp.stringValue = sourceText; - } - } - } - } - - protected void DrawMainSettings() - { - // MAIN SETTINGS SECTION - GUILayout.Label(k_MainSettingsLabel, EditorStyles.boldLabel); - - EditorGUI.indentLevel += 1; - - DrawFont(); - - DrawColor(); - - DrawSpacing(); - - DrawAlignment(); - - DrawWrappingOverflow(); - - DrawTextureMapping(); - - EditorGUI.indentLevel -= 1; - } - - void DrawFont() - { - // Update list of material presets if needed. - if (m_IsPresetListDirty) - m_MaterialPresetNames = GetMaterialPresets(); - - // FONT ASSET - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(m_FontAssetProp, k_FontAssetLabel); - if (EditorGUI.EndChangeCheck()) - { - m_HavePropertiesChanged = true; - m_HasFontAssetChangedProp.boolValue = true; - - m_IsPresetListDirty = true; - m_MaterialPresetSelectionIndex = 0; - } - - Rect rect; - - // MATERIAL PRESET - if (m_MaterialPresetNames != null) - { - EditorGUI.BeginChangeCheck(); - rect = EditorGUILayout.GetControlRect(false, 17); - - float oldHeight = EditorStyles.popup.fixedHeight; - EditorStyles.popup.fixedHeight = rect.height; - - int oldSize = EditorStyles.popup.fontSize; - EditorStyles.popup.fontSize = 11; - - m_MaterialPresetSelectionIndex = EditorGUI.Popup(rect, k_MaterialPresetLabel, m_MaterialPresetSelectionIndex, m_MaterialPresetNames); - if (EditorGUI.EndChangeCheck()) - { - m_FontSharedMaterialProp.objectReferenceValue = m_MaterialPresets[m_MaterialPresetSelectionIndex]; - m_HavePropertiesChanged = true; - } - - //Make sure material preset selection index matches the selection - if (m_MaterialPresetSelectionIndex < m_MaterialPresetNames.Length && m_TargetMaterial != m_MaterialPresets[m_MaterialPresetSelectionIndex] && !m_HavePropertiesChanged) - m_IsPresetListDirty = true; - - EditorStyles.popup.fixedHeight = oldHeight; - EditorStyles.popup.fontSize = oldSize; - } - - // FONT STYLE - EditorGUI.BeginChangeCheck(); - - int v1, v2, v3, v4, v5, v6, v7; - - if (EditorGUIUtility.wideMode) - { - rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight + 2f); - - EditorGUI.PrefixLabel(rect, k_FontStyleLabel); - - int styleValue = m_FontStyleProp.intValue; - - rect.x += EditorGUIUtility.labelWidth; - rect.width -= EditorGUIUtility.labelWidth; - - rect.width = Mathf.Max(25f, rect.width / 7f); - - v1 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 1) == 1, k_BoldLabel, TMP_UIStyleManager.alignmentButtonLeft) ? 1 : 0; // Bold - rect.x += rect.width; - v2 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 2) == 2, k_ItalicLabel, TMP_UIStyleManager.alignmentButtonMid) ? 2 : 0; // Italics - rect.x += rect.width; - v3 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 4) == 4, k_UnderlineLabel, TMP_UIStyleManager.alignmentButtonMid) ? 4 : 0; // Underline - rect.x += rect.width; - v7 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 64) == 64, k_StrikethroughLabel, TMP_UIStyleManager.alignmentButtonRight) ? 64 : 0; // Strikethrough - rect.x += rect.width; - - int selected = 0; - - EditorGUI.BeginChangeCheck(); - v4 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 8) == 8, k_LowercaseLabel, TMP_UIStyleManager.alignmentButtonLeft) ? 8 : 0; // Lowercase - if (EditorGUI.EndChangeCheck() && v4 > 0) - { - selected = v4; - } - rect.x += rect.width; - EditorGUI.BeginChangeCheck(); - v5 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 16) == 16, k_UppercaseLabel, TMP_UIStyleManager.alignmentButtonMid) ? 16 : 0; // Uppercase - if (EditorGUI.EndChangeCheck() && v5 > 0) - { - selected = v5; - } - rect.x += rect.width; - EditorGUI.BeginChangeCheck(); - v6 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 32) == 32, k_SmallcapsLabel, TMP_UIStyleManager.alignmentButtonRight) ? 32 : 0; // Smallcaps - if (EditorGUI.EndChangeCheck() && v6 > 0) - { - selected = v6; - } - - if (selected > 0) - { - v4 = selected == 8 ? 8 : 0; - v5 = selected == 16 ? 16 : 0; - v6 = selected == 32 ? 32 : 0; - } - } - else - { - rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight + 2f); - - EditorGUI.PrefixLabel(rect, k_FontStyleLabel); - - int styleValue = m_FontStyleProp.intValue; - - rect.x += EditorGUIUtility.labelWidth; - rect.width -= EditorGUIUtility.labelWidth; - rect.width = Mathf.Max(25f, rect.width / 4f); - - v1 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 1) == 1, k_BoldLabel, TMP_UIStyleManager.alignmentButtonLeft) ? 1 : 0; // Bold - rect.x += rect.width; - v2 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 2) == 2, k_ItalicLabel, TMP_UIStyleManager.alignmentButtonMid) ? 2 : 0; // Italics - rect.x += rect.width; - v3 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 4) == 4, k_UnderlineLabel, TMP_UIStyleManager.alignmentButtonMid) ? 4 : 0; // Underline - rect.x += rect.width; - v7 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 64) == 64, k_StrikethroughLabel, TMP_UIStyleManager.alignmentButtonRight) ? 64 : 0; // Strikethrough - - rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight + 2f); - - rect.x += EditorGUIUtility.labelWidth; - rect.width -= EditorGUIUtility.labelWidth; - - rect.width = Mathf.Max(25f, rect.width / 4f); - - int selected = 0; - - EditorGUI.BeginChangeCheck(); - v4 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 8) == 8, k_LowercaseLabel, TMP_UIStyleManager.alignmentButtonLeft) ? 8 : 0; // Lowercase - if (EditorGUI.EndChangeCheck() && v4 > 0) - { - selected = v4; - } - rect.x += rect.width; - EditorGUI.BeginChangeCheck(); - v5 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 16) == 16, k_UppercaseLabel, TMP_UIStyleManager.alignmentButtonMid) ? 16 : 0; // Uppercase - if (EditorGUI.EndChangeCheck() && v5 > 0) - { - selected = v5; - } - rect.x += rect.width; - EditorGUI.BeginChangeCheck(); - v6 = TMP_EditorUtility.EditorToggle(rect, (styleValue & 32) == 32, k_SmallcapsLabel, TMP_UIStyleManager.alignmentButtonRight) ? 32 : 0; // Smallcaps - if (EditorGUI.EndChangeCheck() && v6 > 0) - { - selected = v6; - } - - if (selected > 0) - { - v4 = selected == 8 ? 8 : 0; - v5 = selected == 16 ? 16 : 0; - v6 = selected == 32 ? 32 : 0; - } - } - - if (EditorGUI.EndChangeCheck()) - { - m_FontStyleProp.intValue = v1 + v2 + v3 + v4 + v5 + v6 + v7; - m_HavePropertiesChanged = true; - } - - // FONT SIZE - EditorGUI.BeginChangeCheck(); - - EditorGUI.BeginDisabledGroup(m_AutoSizingProp.boolValue); - EditorGUILayout.PropertyField(m_FontSizeProp, k_FontSizeLabel, GUILayout.MaxWidth(EditorGUIUtility.labelWidth + 50f)); - EditorGUI.EndDisabledGroup(); - - if (EditorGUI.EndChangeCheck()) - { - m_FontSizeBaseProp.floatValue = m_FontSizeProp.floatValue; - m_HavePropertiesChanged = true; - } - - EditorGUI.indentLevel += 1; - - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(m_AutoSizingProp, k_AutoSizeLabel); - if (EditorGUI.EndChangeCheck()) - { - if (m_AutoSizingProp.boolValue == false) - m_FontSizeProp.floatValue = m_FontSizeBaseProp.floatValue; - - m_HavePropertiesChanged = true; - } - - // Show auto sizing options - if (m_AutoSizingProp.boolValue) - { - rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight); - - EditorGUI.PrefixLabel(rect, k_AutoSizeOptionsLabel); - - int previousIndent = EditorGUI.indentLevel; - - EditorGUI.indentLevel = 0; - - rect.width = (rect.width - EditorGUIUtility.labelWidth) / 4f; - rect.x += EditorGUIUtility.labelWidth; - - EditorGUIUtility.labelWidth = 24; - EditorGUI.BeginChangeCheck(); - EditorGUI.PropertyField(rect, m_FontSizeMinProp, k_MinLabel); - if (EditorGUI.EndChangeCheck()) - { - m_FontSizeMinProp.floatValue = Mathf.Min(m_FontSizeMinProp.floatValue, m_FontSizeMaxProp.floatValue); - m_HavePropertiesChanged = true; - } - rect.x += rect.width; - - EditorGUIUtility.labelWidth = 27; - EditorGUI.BeginChangeCheck(); - EditorGUI.PropertyField(rect, m_FontSizeMaxProp, k_MaxLabel); - if (EditorGUI.EndChangeCheck()) - { - m_FontSizeMaxProp.floatValue = Mathf.Max(m_FontSizeMinProp.floatValue, m_FontSizeMaxProp.floatValue); - m_HavePropertiesChanged = true; - } - rect.x += rect.width; - - EditorGUI.BeginChangeCheck(); - EditorGUIUtility.labelWidth = 36; - EditorGUI.PropertyField(rect, m_CharWidthMaxAdjProp, k_WdLabel); - rect.x += rect.width; - EditorGUIUtility.labelWidth = 28; - EditorGUI.PropertyField(rect, m_LineSpacingMaxProp, k_LineLabel); - - EditorGUIUtility.labelWidth = 0; - - if (EditorGUI.EndChangeCheck()) - { - m_CharWidthMaxAdjProp.floatValue = Mathf.Clamp(m_CharWidthMaxAdjProp.floatValue, 0, 50); - m_LineSpacingMaxProp.floatValue = Mathf.Min(0, m_LineSpacingMaxProp.floatValue); - m_HavePropertiesChanged = true; - } - - EditorGUI.indentLevel = previousIndent; - } - - EditorGUI.indentLevel -= 1; - - - - EditorGUILayout.Space(); - } - - void DrawColor() - { - // FACE VERTEX COLOR - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(m_FontColorProp, k_BaseColorLabel); - - EditorGUILayout.PropertyField(m_EnableVertexGradientProp, k_ColorGradientLabel); - if (EditorGUI.EndChangeCheck()) - { - m_HavePropertiesChanged = true; - } - - EditorGUIUtility.fieldWidth = 0; - - if (m_EnableVertexGradientProp.boolValue) - { - EditorGUI.indentLevel += 1; - - EditorGUI.BeginChangeCheck(); - - EditorGUILayout.PropertyField(m_FontColorGradientPresetProp, k_ColorPresetLabel); - - SerializedObject obj = null; - - SerializedProperty colorMode; - - SerializedProperty topLeft; - SerializedProperty topRight; - SerializedProperty bottomLeft; - SerializedProperty bottomRight; - - if (m_FontColorGradientPresetProp.objectReferenceValue == null) - { - colorMode = m_ColorModeProp; - topLeft = m_FontColorGradientProp.FindPropertyRelative("topLeft"); - topRight = m_FontColorGradientProp.FindPropertyRelative("topRight"); - bottomLeft = m_FontColorGradientProp.FindPropertyRelative("bottomLeft"); - bottomRight = m_FontColorGradientProp.FindPropertyRelative("bottomRight"); - } - else - { - obj = new SerializedObject(m_FontColorGradientPresetProp.objectReferenceValue); - colorMode = obj.FindProperty("colorMode"); - topLeft = obj.FindProperty("topLeft"); - topRight = obj.FindProperty("topRight"); - bottomLeft = obj.FindProperty("bottomLeft"); - bottomRight = obj.FindProperty("bottomRight"); - } - - EditorGUILayout.PropertyField(colorMode, k_ColorModeLabel); - - var rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2)); - - EditorGUI.PrefixLabel(rect, k_CorenerColorsLabel); - - rect.x += EditorGUIUtility.labelWidth; - rect.width = rect.width - EditorGUIUtility.labelWidth; - - switch ((ColorMode)colorMode.enumValueIndex) - { - case ColorMode.Single: - TMP_EditorUtility.DrawColorProperty(rect, topLeft); - - topRight.colorValue = topLeft.colorValue; - bottomLeft.colorValue = topLeft.colorValue; - bottomRight.colorValue = topLeft.colorValue; - break; - case ColorMode.HorizontalGradient: - rect.width /= 2f; - - TMP_EditorUtility.DrawColorProperty(rect, topLeft); - - rect.x += rect.width; - - TMP_EditorUtility.DrawColorProperty(rect, topRight); - - bottomLeft.colorValue = topLeft.colorValue; - bottomRight.colorValue = topRight.colorValue; - break; - case ColorMode.VerticalGradient: - TMP_EditorUtility.DrawColorProperty(rect, topLeft); - - rect = EditorGUILayout.GetControlRect(false, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2)); - rect.x += EditorGUIUtility.labelWidth; - - TMP_EditorUtility.DrawColorProperty(rect, bottomLeft); - - topRight.colorValue = topLeft.colorValue; - bottomRight.colorValue = bottomLeft.colorValue; - break; - case ColorMode.FourCornersGradient: - rect.width /= 2f; - - TMP_EditorUtility.DrawColorProperty(rect, topLeft); - - rect.x += rect.width; - - TMP_EditorUtility.DrawColorProperty(rect, topRight); - - rect = EditorGUILayout.GetControlRect(false, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2)); - rect.x += EditorGUIUtility.labelWidth; - rect.width = (rect.width - EditorGUIUtility.labelWidth) / 2f; - - TMP_EditorUtility.DrawColorProperty(rect, bottomLeft); - - rect.x += rect.width; - - TMP_EditorUtility.DrawColorProperty(rect, bottomRight); - break; - } - - if (EditorGUI.EndChangeCheck()) - { - m_HavePropertiesChanged = true; - if (obj != null) - { - obj.ApplyModifiedProperties(); - TMPro_EventManager.ON_COLOR_GRAIDENT_PROPERTY_CHANGED(m_FontColorGradientPresetProp.objectReferenceValue as TMP_ColorGradient); - } - } - - EditorGUI.indentLevel -= 1; - } - - EditorGUILayout.PropertyField(m_OverrideHtmlColorProp, k_OverrideTagsLabel); - - EditorGUILayout.Space(); - } - - void DrawSpacing() - { - // CHARACTER, LINE & PARAGRAPH SPACING - EditorGUI.BeginChangeCheck(); - - Rect rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight); - - EditorGUI.PrefixLabel(rect, k_SpacingOptionsLabel); - - int oldIndent = EditorGUI.indentLevel; - EditorGUI.indentLevel = 0; - - rect.x += EditorGUIUtility.labelWidth; - rect.width = (rect.width - EditorGUIUtility.labelWidth - 3f) / 2f; - - EditorGUIUtility.labelWidth = Mathf.Min(rect.width * 0.55f, 80f); - - EditorGUI.PropertyField(rect, m_CharacterSpacingProp, k_CharacterSpacingLabel); - rect.x += rect.width + 3f; - EditorGUI.PropertyField(rect, m_WordSpacingProp, k_WordSpacingLabel); - - rect = EditorGUILayout.GetControlRect(false, EditorGUIUtility.singleLineHeight); - EditorGUIUtility.labelWidth = 0; - rect.x += EditorGUIUtility.labelWidth; - rect.width = (rect.width - EditorGUIUtility.labelWidth -3f) / 2f; - EditorGUIUtility.labelWidth = Mathf.Min(rect.width * 0.55f, 80f); - - EditorGUI.PropertyField(rect, m_LineSpacingProp, k_LineSpacingLabel); - rect.x += rect.width + 3f; - EditorGUI.PropertyField(rect, m_ParagraphSpacingProp, k_ParagraphSpacingLabel); - - EditorGUIUtility.labelWidth = 0; - EditorGUI.indentLevel = oldIndent; - - if (EditorGUI.EndChangeCheck()) - { - m_HavePropertiesChanged = true; - } - } - - void DrawAlignment() - { - // TEXT ALIGNMENT - EditorGUI.BeginChangeCheck(); - - EditorGUILayout.PropertyField(m_TextAlignmentProp, k_AlignmentLabel); - - // WRAPPING RATIOS shown if Justified mode is selected. - if (((_HorizontalAlignmentOptions)m_TextAlignmentProp.intValue & _HorizontalAlignmentOptions.Justified) == _HorizontalAlignmentOptions.Justified || ((_HorizontalAlignmentOptions)m_TextAlignmentProp.intValue & _HorizontalAlignmentOptions.Flush) == _HorizontalAlignmentOptions.Flush) - DrawPropertySlider(k_WrapMixLabel, m_WordWrappingRatiosProp); - - if (EditorGUI.EndChangeCheck()) - m_HavePropertiesChanged = true; - - EditorGUILayout.Space(); - } - - void DrawWrappingOverflow() - { - // TEXT WRAPPING - EditorGUI.BeginChangeCheck(); - int wrapSelection = EditorGUILayout.Popup(k_WrappingLabel, m_EnableWordWrappingProp.boolValue ? 1 : 0, k_WrappingOptions); - if (EditorGUI.EndChangeCheck()) - { - m_EnableWordWrappingProp.boolValue = wrapSelection == 1; - m_HavePropertiesChanged = true; - m_TextComponent.m_isInputParsingRequired = true; - } - - // TEXT OVERFLOW - EditorGUI.BeginChangeCheck(); - - // Cache Reference to Linked Text Component - TMP_Text oldLinkedComponent = m_LinkedTextComponentProp.objectReferenceValue as TMP_Text; - - if ((TextOverflowModes)m_TextOverflowModeProp.enumValueIndex == TextOverflowModes.Linked) - { - EditorGUILayout.BeginHorizontal(); - EditorGUILayout.PropertyField(m_TextOverflowModeProp, k_OverflowLabel); - - EditorGUILayout.PropertyField(m_LinkedTextComponentProp, GUIContent.none); - - EditorGUILayout.EndHorizontal(); - - if (GUI.changed) - { - TMP_Text linkedComponent = m_LinkedTextComponentProp.objectReferenceValue as TMP_Text; - - if (linkedComponent) - m_TextComponent.linkedTextComponent = linkedComponent; - - } - } - else if ((TextOverflowModes)m_TextOverflowModeProp.enumValueIndex == TextOverflowModes.Page) - { - EditorGUILayout.BeginHorizontal(); - EditorGUILayout.PropertyField(m_TextOverflowModeProp, k_OverflowLabel); - EditorGUILayout.PropertyField(m_PageToDisplayProp, GUIContent.none); - EditorGUILayout.EndHorizontal(); - - if (oldLinkedComponent) - m_TextComponent.linkedTextComponent = null; - } - else - { - EditorGUILayout.PropertyField(m_TextOverflowModeProp, k_OverflowLabel); - - if (oldLinkedComponent) - m_TextComponent.linkedTextComponent = null; - } - - if (EditorGUI.EndChangeCheck()) - { - m_HavePropertiesChanged = true; - m_TextComponent.m_isInputParsingRequired = true; - } - - EditorGUILayout.Space(); - } - - protected abstract void DrawExtraSettings(); - - protected void DrawMargins() - { - EditorGUI.BeginChangeCheck(); - DrawMarginProperty(m_MarginProp, k_MarginsLabel); - if (EditorGUI.EndChangeCheck()) - { - m_HavePropertiesChanged = true; - } - - EditorGUILayout.Space(); - } - - protected void DrawGeometrySorting() - { - EditorGUI.BeginChangeCheck(); - - EditorGUILayout.PropertyField(m_GeometrySortingOrderProp, k_GeometrySortingLabel); - - if (EditorGUI.EndChangeCheck()) - m_HavePropertiesChanged = true; - - EditorGUILayout.Space(); - } - - protected void DrawRichText() - { - EditorGUI.BeginChangeCheck(); - - EditorGUILayout.PropertyField(m_IsRichTextProp, k_RichTextLabel); - if (EditorGUI.EndChangeCheck()) - m_HavePropertiesChanged = true; - } - - protected void DrawParsing() - { - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(m_EnableEscapeCharacterParsingProp, k_EscapeCharactersLabel); - EditorGUILayout.PropertyField(m_UseMaxVisibleDescenderProp, k_VisibleDescenderLabel); - - EditorGUILayout.Space(); - - EditorGUILayout.PropertyField(m_SpriteAssetProp, k_SpriteAssetLabel, true); - - if (EditorGUI.EndChangeCheck()) - m_HavePropertiesChanged = true; - - EditorGUILayout.Space(); - } - - protected void DrawTextureMapping() - { - // TEXTURE MAPPING OPTIONS - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(m_HorizontalMappingProp, k_HorizontalMappingLabel); - EditorGUILayout.PropertyField(m_VerticalMappingProp, k_VerticalMappingLabel); - if (EditorGUI.EndChangeCheck()) - { - m_HavePropertiesChanged = true; - } - - // UV OPTIONS - if (m_HorizontalMappingProp.enumValueIndex > 0) - { - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(m_UvLineOffsetProp, k_LineOffsetLabel, GUILayout.MinWidth(70f)); - if (EditorGUI.EndChangeCheck()) - { - m_HavePropertiesChanged = true; - } - } - - EditorGUILayout.Space(); - } - - protected void DrawKerning() - { - // KERNING - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(m_EnableKerningProp, k_KerningLabel); - if (EditorGUI.EndChangeCheck()) - { - m_HavePropertiesChanged = true; - } - } - - protected void DrawPadding() - { - // EXTRA PADDING - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(m_EnableExtraPaddingProp, k_PaddingLabel); - if (EditorGUI.EndChangeCheck()) - { - m_HavePropertiesChanged = true; - m_CheckPaddingRequiredProp.boolValue = true; - } - } - - /// - /// Method to retrieve the material presets that match the currently selected font asset. - /// - protected GUIContent[] GetMaterialPresets() - { - TMP_FontAsset fontAsset = m_FontAssetProp.objectReferenceValue as TMP_FontAsset; - if (fontAsset == null) return null; - - m_MaterialPresets = TMP_EditorUtility.FindMaterialReferences(fontAsset); - m_MaterialPresetNames = new GUIContent[m_MaterialPresets.Length]; - - for (int i = 0; i < m_MaterialPresetNames.Length; i++) - { - m_MaterialPresetNames[i] = new GUIContent(m_MaterialPresets[i].name); - - if (m_TargetMaterial.GetInstanceID() == m_MaterialPresets[i].GetInstanceID()) - m_MaterialPresetSelectionIndex = i; - } - - m_IsPresetListDirty = false; - - return m_MaterialPresetNames; - } - - // DRAW MARGIN PROPERTY - protected void DrawMarginProperty(SerializedProperty property, GUIContent label) - { - Rect rect = EditorGUILayout.GetControlRect(false, 2 * 18); - - EditorGUI.BeginProperty(rect, label, property); - - Rect pos0 = new Rect(rect.x + 15, rect.y + 2, rect.width - 15, 18); - - float width = rect.width + 3; - pos0.width = EditorGUIUtility.labelWidth; - GUI.Label(pos0, label); - - var vec = property.vector4Value; - - float widthB = width - EditorGUIUtility.labelWidth; - float fieldWidth = widthB / 4; - pos0.width = Mathf.Max(fieldWidth - 5, 45f); - - // Labels - pos0.x = EditorGUIUtility.labelWidth + 15; - GUI.Label(pos0, k_LeftLabel); - - pos0.x += fieldWidth; - GUI.Label(pos0, k_TopLabel); - - pos0.x += fieldWidth; - GUI.Label(pos0, k_RightLabel); - - pos0.x += fieldWidth; - GUI.Label(pos0, k_BottomLabel); - - pos0.y += 18; - - pos0.x = EditorGUIUtility.labelWidth; - vec.x = EditorGUI.FloatField(pos0, GUIContent.none, vec.x); - - pos0.x += fieldWidth; - vec.y = EditorGUI.FloatField(pos0, GUIContent.none, vec.y); - - pos0.x += fieldWidth; - vec.z = EditorGUI.FloatField(pos0, GUIContent.none, vec.z); - - pos0.x += fieldWidth; - vec.w = EditorGUI.FloatField(pos0, GUIContent.none, vec.w); - - property.vector4Value = vec; - - EditorGUI.EndProperty(); - } - - protected void DrawPropertySlider(GUIContent label, SerializedProperty property) - { - Rect rect = EditorGUILayout.GetControlRect(false, 17); - - GUIContent content = label ?? GUIContent.none; - EditorGUI.Slider(new Rect(rect.x, rect.y, rect.width, rect.height), property, 0.0f, 1.0f, content); - } - - protected abstract bool IsMixSelectionTypes(); - - // Special Handling of Undo / Redo Events. - protected abstract void OnUndoRedo(); - - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BaseEditorPanel.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BaseEditorPanel.cs.meta deleted file mode 100644 index 87bd7391..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BaseEditorPanel.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 91950f78729ab144aa36e94690b28fad -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BaseShaderGUI.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BaseShaderGUI.cs deleted file mode 100644 index ed87b504..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BaseShaderGUI.cs +++ /dev/null @@ -1,534 +0,0 @@ -using UnityEngine; -using UnityEditor; - -namespace TMPro.EditorUtilities -{ - /// Base class for TextMesh Pro shader GUIs. - public abstract class TMP_BaseShaderGUI : ShaderGUI - { - /// Representation of a #pragma shader_feature. - /// It is assumed that the first feature option is for no keyword (underscores). - protected class ShaderFeature - { - public string undoLabel; - - public GUIContent label; - - /// The keyword labels, for display. Include the no-keyword as the first option. - public GUIContent[] keywordLabels; - - /// The shader keywords. Exclude the no-keyword option. - public string[] keywords; - - int m_State; - - public bool Active - { - get { return m_State >= 0; } - } - - public int State - { - get { return m_State; } - } - - public void ReadState(Material material) - { - for (int i = 0; i < keywords.Length; i++) - { - if (material.IsKeywordEnabled(keywords[i])) - { - m_State = i; - return; - } - } - - m_State = -1; - } - - public void SetActive(bool active, Material material) - { - m_State = active ? 0 : -1; - SetStateKeywords(material); - } - - public void DoPopup(MaterialEditor editor, Material material) - { - EditorGUI.BeginChangeCheck(); - int selection = EditorGUILayout.Popup(label, m_State + 1, keywordLabels); - if (EditorGUI.EndChangeCheck()) - { - m_State = selection - 1; - editor.RegisterPropertyChangeUndo(undoLabel); - SetStateKeywords(material); - } - } - - void SetStateKeywords(Material material) - { - for (int i = 0; i < keywords.Length; i++) - { - if (i == m_State) - { - material.EnableKeyword(keywords[i]); - } - else - { - material.DisableKeyword(keywords[i]); - } - } - } - } - - static GUIContent s_TempLabel = new GUIContent(); - - protected static bool s_DebugExtended; - - static int s_UndoRedoCount, s_LastSeenUndoRedoCount; - - static float[][] s_TempFloats = - { - null, new float[1], new float[2], new float[3], new float[4] - }; - - protected static GUIContent[] s_XywhVectorLabels = - { - new GUIContent("X"), - new GUIContent("Y"), - new GUIContent("W", "Width"), - new GUIContent("H", "Height") - }; - - protected static GUIContent[] s_LbrtVectorLabels = - { - new GUIContent("L", "Left"), - new GUIContent("B", "Bottom"), - new GUIContent("R", "Right"), - new GUIContent("T", "Top") - }; - - static TMP_BaseShaderGUI() - { - // Keep track of how many undo/redo events happened. - Undo.undoRedoPerformed += () => s_UndoRedoCount += 1; - } - - bool m_IsNewGUI = true; - - float m_DragAndDropMinY; - - protected MaterialEditor m_Editor; - - protected Material m_Material; - - protected MaterialProperty[] m_Properties; - - void PrepareGUI() - { - m_IsNewGUI = false; - ShaderUtilities.GetShaderPropertyIDs(); - - // New GUI just got constructed. This happens in response to a selection, - // but also after undo/redo events. - if (s_LastSeenUndoRedoCount != s_UndoRedoCount) - { - // There's been at least one undo/redo since the last time this GUI got constructed. - // Maybe the undo/redo was for this material? Assume that is was. - TMPro_EventManager.ON_MATERIAL_PROPERTY_CHANGED(true, m_Material as Material); - } - - s_LastSeenUndoRedoCount = s_UndoRedoCount; - } - - public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] properties) - { - m_Editor = materialEditor; - m_Material = materialEditor.target as Material; - this.m_Properties = properties; - - if (m_IsNewGUI) - { - PrepareGUI(); - } - - DoDragAndDropBegin(); - EditorGUI.BeginChangeCheck(); - DoGUI(); - if (EditorGUI.EndChangeCheck()) - { - TMPro_EventManager.ON_MATERIAL_PROPERTY_CHANGED(true, m_Material); - } - - DoDragAndDropEnd(); - } - - /// Override this method to create the specific shader GUI. - protected abstract void DoGUI(); - - static string[] s_PanelStateLabel = new string[] { "\t- Click to collapse -", "\t- Click to expand -" }; - - protected bool BeginPanel(string panel, bool expanded) - { - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - - Rect r = EditorGUI.IndentedRect(GUILayoutUtility.GetRect(20, 18)); - r.x += 20; - r.width += 6; - - bool enabled = GUI.enabled; - GUI.enabled = true; - expanded = TMP_EditorUtility.EditorToggle(r, expanded, new GUIContent(panel), TMP_UIStyleManager.panelTitle); - r.width -= 30; - EditorGUI.LabelField(r, new GUIContent(expanded ? s_PanelStateLabel[0] : s_PanelStateLabel[1]), TMP_UIStyleManager.rightLabel); - GUI.enabled = enabled; - - EditorGUI.indentLevel += 1; - EditorGUI.BeginDisabledGroup(false); - - return expanded; - } - - protected bool BeginPanel(string panel, ShaderFeature feature, bool expanded, bool readState = true) - { - if (readState) - { - feature.ReadState(m_Material); - } - - EditorGUI.BeginChangeCheck(); - - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - GUILayout.BeginHorizontal(); - - Rect r = EditorGUI.IndentedRect(GUILayoutUtility.GetRect(20, 20, GUILayout.Width(20f))); - bool active = EditorGUI.Toggle(r, feature.Active); - - if (EditorGUI.EndChangeCheck()) - { - m_Editor.RegisterPropertyChangeUndo(feature.undoLabel); - feature.SetActive(active, m_Material); - } - - r = EditorGUI.IndentedRect(GUILayoutUtility.GetRect(20, 18)); - r.width += 6; - - bool enabled = GUI.enabled; - GUI.enabled = true; - expanded = TMP_EditorUtility.EditorToggle(r, expanded, new GUIContent(panel), TMP_UIStyleManager.panelTitle); - r.width -= 10; - EditorGUI.LabelField(r, new GUIContent(expanded ? s_PanelStateLabel[0] : s_PanelStateLabel[1]), TMP_UIStyleManager.rightLabel); - GUI.enabled = enabled; - - GUILayout.EndHorizontal(); - - EditorGUI.indentLevel += 1; - EditorGUI.BeginDisabledGroup(!active); - - return expanded; - } - - public void EndPanel() - { - EditorGUI.EndDisabledGroup(); - EditorGUI.indentLevel -= 1; - EditorGUILayout.EndVertical(); - } - - MaterialProperty BeginProperty(string name) - { - MaterialProperty property = FindProperty(name, m_Properties); - EditorGUI.BeginChangeCheck(); - EditorGUI.showMixedValue = property.hasMixedValue; - m_Editor.BeginAnimatedCheck(Rect.zero, property); - - return property; - } - - bool EndProperty() - { - m_Editor.EndAnimatedCheck(); - EditorGUI.showMixedValue = false; - return EditorGUI.EndChangeCheck(); - } - - protected void DoPopup(string name, string label, GUIContent[] options) - { - MaterialProperty property = BeginProperty(name); - s_TempLabel.text = label; - int index = EditorGUILayout.Popup(s_TempLabel, (int)property.floatValue, options); - if (EndProperty()) - { - property.floatValue = index; - } - } - - protected void DoCubeMap(string name, string label) - { - DoTexture(name, label, typeof(Cubemap)); - } - - protected void DoTexture2D(string name, string label, bool withTilingOffset = false, string[] speedNames = null) - { - DoTexture(name, label, typeof(Texture2D), withTilingOffset, speedNames); - } - - void DoTexture(string name, string label, System.Type type, bool withTilingOffset = false, string[] speedNames = null) - { - MaterialProperty property = BeginProperty(name); - Rect rect = EditorGUILayout.GetControlRect(true, 60f); - float totalWidth = rect.width; - rect.width = EditorGUIUtility.labelWidth + 60f; - s_TempLabel.text = label; - Object tex = EditorGUI.ObjectField(rect, s_TempLabel, property.textureValue, type, false); - - if (EndProperty()) - { - property.textureValue = tex as Texture; - } - - rect.x += rect.width + 4f; - rect.width = totalWidth - rect.width - 4f; - rect.height = EditorGUIUtility.singleLineHeight; - - if (withTilingOffset) - { - DoTilingOffset(rect, property); - rect.y += (rect.height + 2f) * 2f; - } - - if (speedNames != null) - { - DoUVSpeed(rect, speedNames); - } - } - - void DoTilingOffset(Rect rect, MaterialProperty property) - { - float labelWidth = EditorGUIUtility.labelWidth; - int indentLevel = EditorGUI.indentLevel; - EditorGUI.indentLevel = 0; - EditorGUIUtility.labelWidth = Mathf.Min(40f, rect.width * 0.20f); - - Vector4 vector = property.textureScaleAndOffset; - - bool changed = false; - float[] values = s_TempFloats[2]; - - s_TempLabel.text = "Tiling"; - Rect vectorRect = EditorGUI.PrefixLabel(rect, s_TempLabel); - values[0] = vector.x; - values[1] = vector.y; - EditorGUI.BeginChangeCheck(); - EditorGUI.MultiFloatField(vectorRect, s_XywhVectorLabels, values); - if (EndProperty()) - { - vector.x = values[0]; - vector.y = values[1]; - changed = true; - } - - rect.y += rect.height + 2f; - s_TempLabel.text = "Offset"; - vectorRect = EditorGUI.PrefixLabel(rect, s_TempLabel); - values[0] = vector.z; - values[1] = vector.w; - EditorGUI.BeginChangeCheck(); - EditorGUI.MultiFloatField(vectorRect, s_XywhVectorLabels, values); - if (EndProperty()) - { - vector.z = values[0]; - vector.w = values[1]; - changed = true; - } - - if (changed) - { - property.textureScaleAndOffset = vector; - } - - EditorGUIUtility.labelWidth = labelWidth; - EditorGUI.indentLevel = indentLevel; - } - - protected void DoUVSpeed(Rect rect, string[] names) - { - float labelWidth = EditorGUIUtility.labelWidth; - int indentLevel = EditorGUI.indentLevel; - EditorGUI.indentLevel = 0; - EditorGUIUtility.labelWidth = Mathf.Min(40f, rect.width * 0.20f); - - s_TempLabel.text = "Speed"; - rect = EditorGUI.PrefixLabel(rect, s_TempLabel); - - EditorGUIUtility.labelWidth = 13f; - rect.width = rect.width * 0.5f - 1f; - DoFloat(rect, names[0], "X"); - rect.x += rect.width + 2f; - DoFloat(rect, names[1], "Y"); - EditorGUIUtility.labelWidth = labelWidth; - EditorGUI.indentLevel = indentLevel; - } - - protected void DoToggle(string name, string label) - { - MaterialProperty property = BeginProperty(name); - s_TempLabel.text = label; - bool value = EditorGUILayout.Toggle(s_TempLabel, property.floatValue == 1f); - if (EndProperty()) - { - property.floatValue = value ? 1f : 0f; - } - } - - protected void DoFloat(string name, string label) - { - MaterialProperty property = BeginProperty(name); - Rect rect = EditorGUILayout.GetControlRect(); - rect.width = EditorGUIUtility.labelWidth + 55f; - s_TempLabel.text = label; - float value = EditorGUI.FloatField(rect, s_TempLabel, property.floatValue); - if (EndProperty()) - { - property.floatValue = value; - } - } - - protected void DoColor(string name, string label) - { - MaterialProperty property = BeginProperty(name); - s_TempLabel.text = label; - Color value = EditorGUI.ColorField(EditorGUILayout.GetControlRect(), s_TempLabel, property.colorValue); - if (EndProperty()) - { - property.colorValue = value; - } - } - - void DoFloat(Rect rect, string name, string label) - { - MaterialProperty property = BeginProperty(name); - s_TempLabel.text = label; - float value = EditorGUI.FloatField(rect, s_TempLabel, property.floatValue); - if (EndProperty()) - { - property.floatValue = value; - } - } - - protected void DoSlider(string name, string label) - { - MaterialProperty property = BeginProperty(name); - Vector2 range = property.rangeLimits; - s_TempLabel.text = label; - float value = EditorGUI.Slider( - EditorGUILayout.GetControlRect(), s_TempLabel, property.floatValue, range.x, range.y - ); - if (EndProperty()) - { - property.floatValue = value; - } - } - - protected void DoVector3(string name, string label) - { - MaterialProperty property = BeginProperty(name); - s_TempLabel.text = label; - Vector4 value = EditorGUILayout.Vector3Field(s_TempLabel, property.vectorValue); - if (EndProperty()) - { - property.vectorValue = value; - } - } - - protected void DoVector(string name, string label, GUIContent[] subLabels) - { - MaterialProperty property = BeginProperty(name); - Rect rect = EditorGUILayout.GetControlRect(); - s_TempLabel.text = label; - rect = EditorGUI.PrefixLabel(rect, s_TempLabel); - Vector4 vector = property.vectorValue; - - float[] values = s_TempFloats[subLabels.Length]; - for (int i = 0; i < subLabels.Length; i++) - { - values[i] = vector[i]; - } - - EditorGUI.MultiFloatField(rect, subLabels, values); - if (EndProperty()) - { - for (int i = 0; i < subLabels.Length; i++) - { - vector[i] = values[i]; - } - - property.vectorValue = vector; - } - } - - void DoDragAndDropBegin() - { - m_DragAndDropMinY = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)).y; - } - - void DoDragAndDropEnd() - { - Rect rect = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); - Event evt = Event.current; - if (evt.type == EventType.DragUpdated) - { - DragAndDrop.visualMode = DragAndDropVisualMode.Generic; - evt.Use(); - } - else if ( - evt.type == EventType.DragPerform && - Rect.MinMaxRect(rect.xMin, m_DragAndDropMinY, rect.xMax, rect.yMax).Contains(evt.mousePosition) - ) - { - DragAndDrop.AcceptDrag(); - evt.Use(); - Material droppedMaterial = DragAndDrop.objectReferences[0] as Material; - if (droppedMaterial && droppedMaterial != m_Material) - { - PerformDrop(droppedMaterial); - } - } - } - - void PerformDrop(Material droppedMaterial) - { - Texture droppedTex = droppedMaterial.GetTexture(ShaderUtilities.ID_MainTex); - if (!droppedTex) - { - return; - } - - Texture currentTex = m_Material.GetTexture(ShaderUtilities.ID_MainTex); - TMP_FontAsset requiredFontAsset = null; - if (droppedTex != currentTex) - { - requiredFontAsset = TMP_EditorUtility.FindMatchingFontAsset(droppedMaterial); - if (!requiredFontAsset) - { - return; - } - } - - foreach (GameObject o in Selection.gameObjects) - { - if (requiredFontAsset) - { - TMP_Text textComponent = o.GetComponent(); - if (textComponent) - { - Undo.RecordObject(textComponent, "Font Asset Change"); - textComponent.font = requiredFontAsset; - } - } - - TMPro_EventManager.ON_DRAG_AND_DROP_MATERIAL_CHANGED(o, m_Material, droppedMaterial); - EditorUtility.SetDirty(o); - } - } - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BaseShaderGUI.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BaseShaderGUI.cs.meta deleted file mode 100644 index f07bd856..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BaseShaderGUI.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 438efd46088d408d8a53f707fa68d976 -timeCreated: 1469844810 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BitmapShaderGUI.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BitmapShaderGUI.cs deleted file mode 100644 index d35d5392..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BitmapShaderGUI.cs +++ /dev/null @@ -1,85 +0,0 @@ -using UnityEngine; -using UnityEditor; - -namespace TMPro.EditorUtilities -{ - public class TMP_BitmapShaderGUI : TMP_BaseShaderGUI - { - static bool s_Face = true; - - protected override void DoGUI() - { - s_Face = BeginPanel("Face", s_Face); - if (s_Face) - { - DoFacePanel(); - } - - EndPanel(); - - s_DebugExtended = BeginPanel("Debug Settings", s_DebugExtended); - if (s_DebugExtended) - { - DoDebugPanel(); - } - - EndPanel(); - } - - void DoFacePanel() - { - EditorGUI.indentLevel += 1; - if (m_Material.HasProperty(ShaderUtilities.ID_FaceTex)) - { - DoColor("_FaceColor", "Color"); - DoTexture2D("_FaceTex", "Texture", true); - } - else - { - DoColor("_Color", "Color"); - DoSlider("_DiffusePower", "Diffuse Power"); - } - - EditorGUI.indentLevel -= 1; - - EditorGUILayout.Space(); - } - - void DoDebugPanel() - { - EditorGUI.indentLevel += 1; - DoTexture2D("_MainTex", "Font Atlas"); - if (m_Material.HasProperty(ShaderUtilities.ID_VertexOffsetX)) - { - if (m_Material.HasProperty(ShaderUtilities.ID_Padding)) - { - EditorGUILayout.Space(); - DoFloat("_Padding", "Padding"); - } - - EditorGUILayout.Space(); - DoFloat("_VertexOffsetX", "Offset X"); - DoFloat("_VertexOffsetY", "Offset Y"); - } - - if (m_Material.HasProperty(ShaderUtilities.ID_MaskSoftnessX)) - { - EditorGUILayout.Space(); - DoFloat("_MaskSoftnessX", "Softness X"); - DoFloat("_MaskSoftnessY", "Softness Y"); - DoVector("_ClipRect", "Clip Rect", s_LbrtVectorLabels); - } - - if (m_Material.HasProperty(ShaderUtilities.ID_StencilID)) - { - EditorGUILayout.Space(); - DoFloat("_Stencil", "Stencil ID"); - DoFloat("_StencilComp", "Stencil Comp"); - } - - EditorGUI.indentLevel -= 1; - - EditorGUILayout.Space(); - } - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BitmapShaderGUI.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BitmapShaderGUI.cs.meta deleted file mode 100644 index 6d0e0529..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_BitmapShaderGUI.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 806de5a9211448c8b65c8435ebb48dd4 -timeCreated: 1469998850 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_CharacterPropertyDrawer.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_CharacterPropertyDrawer.cs deleted file mode 100644 index c1f5fb99..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_CharacterPropertyDrawer.cs +++ /dev/null @@ -1,237 +0,0 @@ -using UnityEngine; -using UnityEngine.TextCore; -using UnityEngine.TextCore.LowLevel; -using UnityEditor; -using System.Collections; - - -namespace TMPro.EditorUtilities -{ - [CustomPropertyDrawer(typeof(TMP_Character))] - public class TMP_CharacterPropertyDrawer : PropertyDrawer - { - //[SerializeField] - //static Material s_InternalSDFMaterial; - - //[SerializeField] - //static Material s_InternalBitmapMaterial; - - int m_GlyphSelectedForEditing = -1; - - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) - { - SerializedProperty prop_Unicode = property.FindPropertyRelative("m_Unicode"); - SerializedProperty prop_GlyphIndex = property.FindPropertyRelative("m_GlyphIndex"); - SerializedProperty prop_Scale = property.FindPropertyRelative("m_Scale"); - - - GUIStyle style = new GUIStyle(EditorStyles.label); - style.richText = true; - - EditorGUIUtility.labelWidth = 40f; - EditorGUIUtility.fieldWidth = 50; - - Rect rect = new Rect(position.x + 50, position.y, position.width, 49); - - // Display non-editable fields - if (GUI.enabled == false) - { - int unicode = prop_Unicode.intValue; - EditorGUI.LabelField(new Rect(rect.x, rect.y, 120f, 18), new GUIContent("Unicode: 0x" + unicode.ToString("X") + ""), style); - EditorGUI.LabelField(new Rect(rect.x + 115, rect.y, 120f, 18), unicode <= 0xFFFF ? new GUIContent("UTF16: \\u" + unicode.ToString("X4") + "") : new GUIContent("UTF32: \\U" + unicode.ToString("X8") + ""), style); - EditorGUI.LabelField(new Rect(rect.x, rect.y + 18, 120, 18), new GUIContent("Glyph ID: " + prop_GlyphIndex.intValue + ""), style); - EditorGUI.LabelField(new Rect(rect.x, rect.y + 36, 80, 18), new GUIContent("Scale: " + prop_Scale.floatValue + ""), style); - - // Draw Glyph (if exists) - DrawGlyph(position, property); - } - else // Display editable fields - { - EditorGUIUtility.labelWidth = 55f; - GUI.SetNextControlName("Unicode Input"); - EditorGUI.BeginChangeCheck(); - string unicode = EditorGUI.TextField(new Rect(rect.x, rect.y, 120, 18), "Unicode:", prop_Unicode.intValue.ToString("X")); - - if (GUI.GetNameOfFocusedControl() == "Unicode Input") - { - //Filter out unwanted characters. - char chr = Event.current.character; - if ((chr < '0' || chr > '9') && (chr < 'a' || chr > 'f') && (chr < 'A' || chr > 'F')) - { - Event.current.character = '\0'; - } - } - - if (EditorGUI.EndChangeCheck()) - { - // Update Unicode value - prop_Unicode.intValue = TMP_TextUtilities.StringHexToInt(unicode); - } - - // Cache current glyph index in case it needs to be restored if the new glyph index is invalid. - int currentGlyphIndex = prop_GlyphIndex.intValue; - - EditorGUIUtility.labelWidth = 59f; - EditorGUI.BeginChangeCheck(); - EditorGUI.DelayedIntField(new Rect(rect.x, rect.y + 18, 100, 18), prop_GlyphIndex, new GUIContent("Glyph ID:")); - if (EditorGUI.EndChangeCheck()) - { - // Get a reference to the font asset - TMP_FontAsset fontAsset = property.serializedObject.targetObject as TMP_FontAsset; - - // Make sure new glyph index is valid. - int elementIndex = fontAsset.glyphTable.FindIndex(item => item.index == prop_GlyphIndex.intValue); - - if (elementIndex == -1) - prop_GlyphIndex.intValue = currentGlyphIndex; - else - fontAsset.m_IsFontAssetLookupTablesDirty = true; - } - - int glyphIndex = prop_GlyphIndex.intValue; - - // Reset glyph selection if new character has been selected. - if (GUI.enabled && m_GlyphSelectedForEditing != glyphIndex) - m_GlyphSelectedForEditing = -1; - - // Display button to edit the glyph data. - if (GUI.Button(new Rect(rect.x + 120, rect.y + 18, 75, 18), new GUIContent("Edit Glyph"))) - { - if (m_GlyphSelectedForEditing == -1) - m_GlyphSelectedForEditing = glyphIndex; - else - m_GlyphSelectedForEditing = -1; - - // Button clicks should not result in potential change. - GUI.changed = false; - } - - // Show the glyph property drawer if selected - if (glyphIndex == m_GlyphSelectedForEditing && GUI.enabled) - { - // Get a reference to the font asset - TMP_FontAsset fontAsset = property.serializedObject.targetObject as TMP_FontAsset; - - if (fontAsset != null) - { - // Get the index of the glyph in the font asset glyph table. - int elementIndex = fontAsset.glyphTable.FindIndex(item => item.index == glyphIndex); - - if (elementIndex != -1) - { - SerializedProperty prop_GlyphTable = property.serializedObject.FindProperty("m_GlyphTable"); - SerializedProperty prop_Glyph = prop_GlyphTable.GetArrayElementAtIndex(elementIndex); - - SerializedProperty prop_GlyphMetrics = prop_Glyph.FindPropertyRelative("m_Metrics"); - SerializedProperty prop_GlyphRect = prop_Glyph.FindPropertyRelative("m_GlyphRect"); - - Rect newRect = EditorGUILayout.GetControlRect(false, 115); - EditorGUI.DrawRect(new Rect(newRect.x + 52, newRect.y - 20, newRect.width - 52, newRect.height - 5), new Color(0.1f, 0.1f, 0.1f, 0.45f)); - EditorGUI.DrawRect(new Rect(newRect.x + 53, newRect.y - 19, newRect.width - 54, newRect.height - 7), new Color(0.3f, 0.3f, 0.3f, 0.8f)); - - // Display GlyphRect - newRect.x += 55; - newRect.y -= 18; - newRect.width += 5; - EditorGUI.PropertyField(newRect, prop_GlyphRect); - - // Display GlyphMetrics - newRect.y += 45; - EditorGUI.PropertyField(newRect, prop_GlyphMetrics); - - rect.y += 120; - } - } - } - - EditorGUIUtility.labelWidth = 39f; - EditorGUI.PropertyField(new Rect(rect.x, rect.y + 36, 80, 18), prop_Scale, new GUIContent("Scale:")); - - // Draw Glyph (if exists) - DrawGlyph(position, property); - } - } - - public override float GetPropertyHeight(SerializedProperty property, GUIContent label) - { - return 58; - } - - void DrawGlyph(Rect position, SerializedProperty property) - { - // Get a reference to the atlas texture - TMP_FontAsset fontAsset = property.serializedObject.targetObject as TMP_FontAsset; - - if (fontAsset == null) - return; - - // Get a reference to the Glyph Table - SerializedProperty prop_GlyphTable = property.serializedObject.FindProperty("m_GlyphTable"); - int glyphIndex = property.FindPropertyRelative("m_GlyphIndex").intValue; - int elementIndex = fontAsset.glyphTable.FindIndex(item => item.index == glyphIndex); - - // Return if we can't find the glyph - if (elementIndex == -1) - return; - - SerializedProperty prop_Glyph = prop_GlyphTable.GetArrayElementAtIndex(elementIndex); - - // Get reference to atlas texture. - int atlasIndex = prop_Glyph.FindPropertyRelative("m_AtlasIndex").intValue; - Texture2D atlasTexture = fontAsset.atlasTextures.Length > atlasIndex ? fontAsset.atlasTextures[atlasIndex] : null; - - if (atlasTexture == null) - return; - - Material mat; - if (((GlyphRasterModes)fontAsset.atlasRenderMode & GlyphRasterModes.RASTER_MODE_BITMAP) == GlyphRasterModes.RASTER_MODE_BITMAP) - { - mat = TMP_FontAssetEditor.internalBitmapMaterial; - - if (mat == null) - return; - - mat.mainTexture = atlasTexture; - mat.SetColor("_Color", Color.white); - } - else - { - mat = TMP_FontAssetEditor.internalSDFMaterial; - - if (mat == null) - return; - - mat.mainTexture = atlasTexture; - mat.SetFloat(ShaderUtilities.ID_GradientScale, fontAsset.atlasPadding + 1); - } - - // Draw glyph - Rect glyphDrawPosition = new Rect(position.x, position.y, 48, 58); - - SerializedProperty prop_GlyphRect = prop_Glyph.FindPropertyRelative("m_GlyphRect"); - - int glyphOriginX = prop_GlyphRect.FindPropertyRelative("m_X").intValue; - int glyphOriginY = prop_GlyphRect.FindPropertyRelative("m_Y").intValue; - int glyphWidth = prop_GlyphRect.FindPropertyRelative("m_Width").intValue; - int glyphHeight = prop_GlyphRect.FindPropertyRelative("m_Height").intValue; - - float normalizedHeight = fontAsset.faceInfo.ascentLine - fontAsset.faceInfo.descentLine; - float scale = glyphDrawPosition.width / normalizedHeight; - - // Compute the normalized texture coordinates - Rect texCoords = new Rect((float)glyphOriginX / atlasTexture.width, (float)glyphOriginY / atlasTexture.height, (float)glyphWidth / atlasTexture.width, (float)glyphHeight / atlasTexture.height); - - if (Event.current.type == EventType.Repaint) - { - glyphDrawPosition.x += (glyphDrawPosition.width - glyphWidth * scale) / 2; - glyphDrawPosition.y += (glyphDrawPosition.height - glyphHeight * scale) / 2; - glyphDrawPosition.width = glyphWidth * scale; - glyphDrawPosition.height = glyphHeight * scale; - - // Could switch to using the default material of the font asset which would require passing scale to the shader. - Graphics.DrawTexture(glyphDrawPosition, atlasTexture, texCoords, 0, 0, 0, 0, new Color(1f, 1f, 1f), mat); - } - } - - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_CharacterPropertyDrawer.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_CharacterPropertyDrawer.cs.meta deleted file mode 100644 index 3bf78921..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_CharacterPropertyDrawer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 01ada73c4792aba4c937ff5d92cce866 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ColorGradientAssetMenu.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ColorGradientAssetMenu.cs deleted file mode 100644 index ccfd3676..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ColorGradientAssetMenu.cs +++ /dev/null @@ -1,51 +0,0 @@ -using UnityEditor; -using UnityEngine; -using System.IO; -using System.Collections; - - - -namespace TMPro.EditorUtilities -{ - - public static class TMP_ColorGradientAssetMenu - { - [MenuItem("Assets/Create/TextMeshPro/Color Gradient", false, 115)] - public static void CreateColorGradient(MenuCommand context) - { - string filePath; - - if (Selection.assetGUIDs.Length == 0) - filePath = "Assets/New TMP Color Gradient.asset"; - else - filePath = AssetDatabase.GUIDToAssetPath(Selection.assetGUIDs[0]); - - if (Directory.Exists(filePath)) - { - filePath += "/New TMP Color Gradient.asset"; - } - else - { - filePath = Path.GetDirectoryName(filePath) + "/New TMP Color Gradient.asset"; - } - - filePath = AssetDatabase.GenerateUniqueAssetPath(filePath); - - // Create new Color Gradient Asset. - TMP_ColorGradient colorGradient = ScriptableObject.CreateInstance(); - - // Create Asset - AssetDatabase.CreateAsset(colorGradient, filePath); - - //EditorUtility.SetDirty(colorGradient); - - AssetDatabase.SaveAssets(); - - AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(colorGradient)); - - EditorUtility.FocusProjectWindow(); - Selection.activeObject = colorGradient; - - } - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ColorGradientAssetMenu.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ColorGradientAssetMenu.cs.meta deleted file mode 100644 index a2201ee6..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ColorGradientAssetMenu.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: d9647b571c5e44729b71d756b3d55317 -timeCreated: 1468187791 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ColorGradientEditor.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ColorGradientEditor.cs deleted file mode 100644 index 4dddbfb0..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ColorGradientEditor.cs +++ /dev/null @@ -1,146 +0,0 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - - -namespace TMPro.EditorUtilities -{ - [CustomEditor(typeof(TMP_ColorGradient))] - public class TMP_ColorGradientEditor : Editor - { - SerializedProperty m_ColorMode; - SerializedProperty m_TopLeftColor; - SerializedProperty m_TopRightColor; - SerializedProperty m_BottomLeftColor; - SerializedProperty m_BottomRightColor; - - void OnEnable() - { - m_ColorMode = serializedObject.FindProperty("colorMode"); - m_TopLeftColor = serializedObject.FindProperty("topLeft"); - m_TopRightColor = serializedObject.FindProperty("topRight"); - m_BottomLeftColor = serializedObject.FindProperty("bottomLeft"); - m_BottomRightColor = serializedObject.FindProperty("bottomRight"); - } - - public override void OnInspectorGUI() - { - serializedObject.Update(); - - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(m_ColorMode, new GUIContent("Color Mode")); - if (EditorGUI.EndChangeCheck()) - { - switch ((ColorMode)m_ColorMode.enumValueIndex) - { - case ColorMode.Single: - m_TopRightColor.colorValue = m_TopLeftColor.colorValue; - m_BottomLeftColor.colorValue = m_TopLeftColor.colorValue; - m_BottomRightColor.colorValue = m_TopLeftColor.colorValue; - break; - case ColorMode.HorizontalGradient: - m_BottomLeftColor.colorValue = m_TopLeftColor.colorValue; - m_BottomRightColor.colorValue = m_TopRightColor.colorValue; - break; - case ColorMode.VerticalGradient: - m_TopRightColor.colorValue = m_TopLeftColor.colorValue; - m_BottomRightColor.colorValue = m_BottomLeftColor.colorValue; - break; - } - } - Rect rect; - switch ((ColorMode)m_ColorMode.enumValueIndex) - { - case ColorMode.Single: - EditorGUI.BeginChangeCheck(); - rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2)); - EditorGUI.PrefixLabel(rect, new GUIContent("Colors")); - rect.x += EditorGUIUtility.labelWidth; - rect.width = (rect.width - EditorGUIUtility.labelWidth) / (EditorGUIUtility.wideMode ? 1f : 2f); - TMP_EditorUtility.DrawColorProperty(rect, m_TopLeftColor); - if (EditorGUI.EndChangeCheck()) - { - m_TopRightColor.colorValue = m_TopLeftColor.colorValue; - m_BottomLeftColor.colorValue = m_TopLeftColor.colorValue; - m_BottomRightColor.colorValue = m_TopLeftColor.colorValue; - } - break; - - case ColorMode.HorizontalGradient: - rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2)); - EditorGUI.PrefixLabel(rect, new GUIContent("Colors")); - rect.x += EditorGUIUtility.labelWidth; - rect.width = (rect.width - EditorGUIUtility.labelWidth) / 2f; - - EditorGUI.BeginChangeCheck(); - TMP_EditorUtility.DrawColorProperty(rect, m_TopLeftColor); - if (EditorGUI.EndChangeCheck()) - { - m_BottomLeftColor.colorValue = m_TopLeftColor.colorValue; - } - - rect.x += rect.width; - - EditorGUI.BeginChangeCheck(); - TMP_EditorUtility.DrawColorProperty(rect, m_TopRightColor); - if (EditorGUI.EndChangeCheck()) - { - m_BottomRightColor.colorValue = m_TopRightColor.colorValue; - } - break; - - case ColorMode.VerticalGradient: - rect = EditorGUILayout.GetControlRect(false, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2)); - EditorGUI.PrefixLabel(rect, new GUIContent("Colors")); - rect.x += EditorGUIUtility.labelWidth; - rect.width = (rect.width - EditorGUIUtility.labelWidth) / (EditorGUIUtility.wideMode ? 1f : 2f); - rect.height = EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2); - - EditorGUI.BeginChangeCheck(); - TMP_EditorUtility.DrawColorProperty(rect, m_TopLeftColor); - if (EditorGUI.EndChangeCheck()) - { - m_TopRightColor.colorValue = m_TopLeftColor.colorValue; - } - - rect = EditorGUILayout.GetControlRect(false, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2)); - rect.x += EditorGUIUtility.labelWidth; - rect.width = (rect.width - EditorGUIUtility.labelWidth) / (EditorGUIUtility.wideMode ? 1f : 2f); - rect.height = EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2); - - EditorGUI.BeginChangeCheck(); - TMP_EditorUtility.DrawColorProperty(rect, m_BottomLeftColor); - if (EditorGUI.EndChangeCheck()) - { - m_BottomRightColor.colorValue = m_BottomLeftColor.colorValue; - } - break; - - case ColorMode.FourCornersGradient: - rect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2)); - EditorGUI.PrefixLabel(rect, new GUIContent("Colors")); - rect.x += EditorGUIUtility.labelWidth; - rect.width = (rect.width - EditorGUIUtility.labelWidth) / 2f; - rect.height = EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2); - - TMP_EditorUtility.DrawColorProperty(rect, m_TopLeftColor); - rect.x += rect.width; - TMP_EditorUtility.DrawColorProperty(rect, m_TopRightColor); - - rect = EditorGUILayout.GetControlRect(false, EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2)); - rect.x += EditorGUIUtility.labelWidth; - rect.width = (rect.width - EditorGUIUtility.labelWidth) / 2f; - rect.height = EditorGUIUtility.singleLineHeight * (EditorGUIUtility.wideMode ? 1 : 2); - - TMP_EditorUtility.DrawColorProperty(rect, m_BottomLeftColor); - rect.x += rect.width; - TMP_EditorUtility.DrawColorProperty(rect, m_BottomRightColor); - break; - } - - if (serializedObject.ApplyModifiedProperties()) - TMPro_EventManager.ON_COLOR_GRAIDENT_PROPERTY_CHANGED(target as TMP_ColorGradient); - - } - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ColorGradientEditor.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ColorGradientEditor.cs.meta deleted file mode 100644 index dc58116c..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ColorGradientEditor.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: fcc60c1d6bb544d9b712b652f418ff3a -timeCreated: 1468400050 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_DropdownEditor.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_DropdownEditor.cs deleted file mode 100644 index b8e96135..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_DropdownEditor.cs +++ /dev/null @@ -1,51 +0,0 @@ -using UnityEngine; -using UnityEditor; -using UnityEditor.UI; -using UnityEngine.UI; - -namespace TMPro.EditorUtilities -{ - [CustomEditor(typeof(TMP_Dropdown), true)] - [CanEditMultipleObjects] - public class DropdownEditor : SelectableEditor - { - SerializedProperty m_Template; - SerializedProperty m_CaptionText; - SerializedProperty m_CaptionImage; - SerializedProperty m_ItemText; - SerializedProperty m_ItemImage; - SerializedProperty m_OnSelectionChanged; - SerializedProperty m_Value; - SerializedProperty m_Options; - - protected override void OnEnable() - { - base.OnEnable(); - m_Template = serializedObject.FindProperty("m_Template"); - m_CaptionText = serializedObject.FindProperty("m_CaptionText"); - m_CaptionImage = serializedObject.FindProperty("m_CaptionImage"); - m_ItemText = serializedObject.FindProperty("m_ItemText"); - m_ItemImage = serializedObject.FindProperty("m_ItemImage"); - m_OnSelectionChanged = serializedObject.FindProperty("m_OnValueChanged"); - m_Value = serializedObject.FindProperty("m_Value"); - m_Options = serializedObject.FindProperty("m_Options"); - } - - public override void OnInspectorGUI() - { - base.OnInspectorGUI(); - EditorGUILayout.Space(); - - serializedObject.Update(); - EditorGUILayout.PropertyField(m_Template); - EditorGUILayout.PropertyField(m_CaptionText); - EditorGUILayout.PropertyField(m_CaptionImage); - EditorGUILayout.PropertyField(m_ItemText); - EditorGUILayout.PropertyField(m_ItemImage); - EditorGUILayout.PropertyField(m_Value); - EditorGUILayout.PropertyField(m_Options); - EditorGUILayout.PropertyField(m_OnSelectionChanged); - serializedObject.ApplyModifiedProperties(); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_DropdownEditor.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_DropdownEditor.cs.meta deleted file mode 100644 index 75030cfd..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_DropdownEditor.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 6dbcf248c987476181a37f01a1814975 -timeCreated: 1446377461 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_EditorCoroutine.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_EditorCoroutine.cs deleted file mode 100644 index e0056039..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_EditorCoroutine.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using UnityEditor; -using UnityEngine; - - -namespace TMPro.EditorUtilities -{ - /// - /// Simple implementation of coroutine working in the Unity Editor. - /// - public class TMP_EditorCoroutine - { - //private static Dictionary s_ActiveCoroutines; - - readonly IEnumerator coroutine; - - /// - /// Constructor - /// - /// - TMP_EditorCoroutine(IEnumerator routine) - { - this.coroutine = routine; - } - - - /// - /// Starts a new EditorCoroutine. - /// - /// Coroutine - /// new EditorCoroutine - public static TMP_EditorCoroutine StartCoroutine(IEnumerator routine) - { - TMP_EditorCoroutine coroutine = new TMP_EditorCoroutine(routine); - coroutine.Start(); - - // Add coroutine to tracking list - //if (s_ActiveCoroutines == null) - // s_ActiveCoroutines = new Dictionary(); - - // Add new instance of editor coroutine to dictionary. - //s_ActiveCoroutines.Add(coroutine.GetHashCode(), coroutine); - - return coroutine; - } - - - /// - /// Clear delegate list - /// - //public static void StopAllEditorCoroutines() - //{ - // EditorApplication.update = null; - //} - - - /// - /// Register callback for editor updates - /// - void Start() - { - EditorApplication.update += EditorUpdate; - } - - - /// - /// Unregister callback for editor updates. - /// - public void Stop() - { - if (EditorApplication.update != null) - EditorApplication.update -= EditorUpdate; - - //s_ActiveCoroutines.Remove(this.GetHashCode()); - } - - - /// - /// Delegate function called on editor updates. - /// - void EditorUpdate() - { - // Stop editor coroutine if it does not continue. - if (coroutine.MoveNext() == false) - Stop(); - - // Process the different types of EditorCoroutines. - if (coroutine.Current != null) - { - - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_EditorCoroutine.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_EditorCoroutine.cs.meta deleted file mode 100644 index 16e03fa8..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_EditorCoroutine.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 27a0335dab59ec542aadd6636a5b4ebd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_EditorPanel.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_EditorPanel.cs deleted file mode 100644 index bf961c6d..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_EditorPanel.cs +++ /dev/null @@ -1,153 +0,0 @@ -using UnityEngine; -using UnityEditor; - -namespace TMPro.EditorUtilities -{ - - [CustomEditor(typeof(TextMeshPro), true), CanEditMultipleObjects] - public class TMP_EditorPanel : TMP_BaseEditorPanel - { - static readonly GUIContent k_SortingLayerLabel = new GUIContent("Sorting Layer", "Name of the Renderer's sorting layer."); - static readonly GUIContent k_OrderInLayerLabel = new GUIContent("Order in Layer", "Renderer's order within a sorting layer."); - static readonly GUIContent k_OrthographicLabel = new GUIContent("Orthographic Mode", "Should be enabled when using an orthographic camera. Instructs the shader to not perform any perspective correction."); - static readonly GUIContent k_VolumetricLabel = new GUIContent("Volumetric Setup", "Use cubes rather than quads to render the text. Allows for volumetric rendering when combined with a compatible shader."); - - SerializedProperty m_IsVolumetricTextProp; - - SerializedProperty m_IsOrthographicProp; - - Renderer m_Renderer; - - protected override void OnEnable() - { - base.OnEnable(); - - m_IsOrthographicProp = serializedObject.FindProperty("m_isOrthographic"); - - m_IsVolumetricTextProp = serializedObject.FindProperty("m_isVolumetricText"); - - m_Renderer = m_TextComponent.GetComponent(); - } - - protected override void DrawExtraSettings() - { - Foldout.extraSettings = EditorGUILayout.Foldout(Foldout.extraSettings, k_ExtraSettingsLabel, true, TMP_UIStyleManager.boldFoldout); - if (Foldout.extraSettings) - { - EditorGUI.indentLevel += 1; - - DrawMargins(); - - DrawSortingLayer(); - - DrawGeometrySorting(); - - DrawOrthographicMode(); - - DrawRichText(); - - DrawParsing(); - - DrawVolumetricSetup(); - - DrawKerning(); - - DrawPadding(); - - EditorGUI.indentLevel -= 1; - } - } - - protected void DrawSortingLayer() - { - Undo.RecordObject(m_Renderer, "Sorting Layer Change"); - - EditorGUI.BeginChangeCheck(); - - // SORTING LAYERS - var sortingLayerNames = SortingLayerHelper.sortingLayerNames; - - var textComponent = (TextMeshPro)m_TextComponent; - - // Look up the layer name using the current layer ID - string oldName = SortingLayerHelper.GetSortingLayerNameFromID(textComponent.sortingLayerID); - - // Use the name to look up our array index into the names list - int oldLayerIndex = System.Array.IndexOf(sortingLayerNames, oldName); - - // Show the pop-up for the names - EditorGUIUtility.fieldWidth = 0f; - int newLayerIndex = EditorGUILayout.Popup(k_SortingLayerLabel, oldLayerIndex, sortingLayerNames); - - // If the index changes, look up the ID for the new index to store as the new ID - if (newLayerIndex != oldLayerIndex) - { - textComponent.sortingLayerID = SortingLayerHelper.GetSortingLayerIDForIndex(newLayerIndex); - } - - // Expose the manual sorting order - int newSortingLayerOrder = EditorGUILayout.IntField(k_OrderInLayerLabel, textComponent.sortingOrder); - if (newSortingLayerOrder != textComponent.sortingOrder) - { - textComponent.sortingOrder = newSortingLayerOrder; - } - - if (EditorGUI.EndChangeCheck()) - m_HavePropertiesChanged = true; - - EditorGUILayout.Space(); - } - - protected void DrawOrthographicMode() - { - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(m_IsOrthographicProp, k_OrthographicLabel); - if (EditorGUI.EndChangeCheck()) - m_HavePropertiesChanged = true; - } - - protected void DrawVolumetricSetup() - { - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(m_IsVolumetricTextProp, k_VolumetricLabel); - if (EditorGUI.EndChangeCheck()) - { - m_HavePropertiesChanged = true; - m_TextComponent.textInfo.ResetVertexLayout(m_IsVolumetricTextProp.boolValue); - } - - EditorGUILayout.Space(); - } - - // Method to handle multi object selection - protected override bool IsMixSelectionTypes() - { - GameObject[] objects = Selection.gameObjects; - if (objects.Length > 1) - { - for (int i = 0; i < objects.Length; i++) - { - if (objects[i].GetComponent() == null) - return true; - } - } - return false; - } - - protected override void OnUndoRedo() - { - int undoEventId = Undo.GetCurrentGroup(); - int lastUndoEventId = s_EventId; - - if (undoEventId != lastUndoEventId) - { - for (int i = 0; i < targets.Length; i++) - { - //Debug.Log("Undo & Redo Performed detected in Editor Panel. Event ID:" + Undo.GetCurrentGroup()); - TMPro_EventManager.ON_TEXTMESHPRO_PROPERTY_CHANGED(true, targets[i] as TextMeshPro); - s_EventId = undoEventId; - } - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_EditorPanel.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_EditorPanel.cs.meta deleted file mode 100644 index 54fd8048..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_EditorPanel.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 34f6695d37a94370a3697f6b068f5d5e -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_EditorUtility.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_EditorUtility.cs deleted file mode 100644 index d9ccd86f..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_EditorUtility.cs +++ /dev/null @@ -1,450 +0,0 @@ -using UnityEngine; -using UnityEditor; -using System.Text; -using System.IO; -using System.Collections; -using System.Collections.Generic; - - -namespace TMPro.EditorUtilities -{ - - public static class TMP_EditorUtility - { - /// - /// Returns the relative path of the package. - /// - public static string packageRelativePath - { - get - { - if (string.IsNullOrEmpty(m_PackagePath)) - m_PackagePath = GetPackageRelativePath(); - - return m_PackagePath; - } - } - [SerializeField] - private static string m_PackagePath; - - /// - /// Returns the fully qualified path of the package. - /// - public static string packageFullPath - { - get - { - if (string.IsNullOrEmpty(m_PackageFullPath)) - m_PackageFullPath = GetPackageFullPath(); - - return m_PackageFullPath; - } - } - [SerializeField] - private static string m_PackageFullPath; - - - // Static Fields Related to locating the TextMesh Pro Asset - private static string folderPath = "Not Found"; - - private static EditorWindow Gameview; - private static bool isInitialized = false; - - private static void GetGameview() - { - System.Reflection.Assembly assembly = typeof(UnityEditor.EditorWindow).Assembly; - System.Type type = assembly.GetType("UnityEditor.GameView"); - Gameview = EditorWindow.GetWindow(type); - } - - - public static void RepaintAll() - { - if (isInitialized == false) - { - GetGameview(); - isInitialized = true; - } - - SceneView.RepaintAll(); - Gameview.Repaint(); - } - - - /// - /// Create and return a new asset in a smart location based on the current selection and then select it. - /// - /// - /// Name of the new asset. Do not include the .asset extension. - /// - /// - /// The new asset. - /// - public static T CreateAsset(string name) where T : ScriptableObject - { - string path = AssetDatabase.GetAssetPath(Selection.activeObject); - if (path.Length == 0) - { - // no asset selected, place in asset root - path = "Assets/" + name + ".asset"; - } - else if (Directory.Exists(path)) - { - // place in currently selected directory - path += "/" + name + ".asset"; - } - else { - // place in current selection's containing directory - path = Path.GetDirectoryName(path) + "/" + name + ".asset"; - } - T asset = ScriptableObject.CreateInstance(); - AssetDatabase.CreateAsset(asset, AssetDatabase.GenerateUniqueAssetPath(path)); - EditorUtility.FocusProjectWindow(); - Selection.activeObject = asset; - return asset; - } - - - - // Function used to find all materials which reference a font atlas so we can update all their references. - public static Material[] FindMaterialReferences(TMP_FontAsset fontAsset) - { - List refs = new List(); - Material mat = fontAsset.material; - refs.Add(mat); - - // Get materials matching the search pattern. - string searchPattern = "t:Material" + " " + fontAsset.name.Split(new char[] { ' ' })[0]; - string[] materialAssetGUIDs = AssetDatabase.FindAssets(searchPattern); - - for (int i = 0; i < materialAssetGUIDs.Length; i++) - { - string materialPath = AssetDatabase.GUIDToAssetPath(materialAssetGUIDs[i]); - Material targetMaterial = AssetDatabase.LoadAssetAtPath(materialPath); - - if (targetMaterial.HasProperty(ShaderUtilities.ID_MainTex) && targetMaterial.GetTexture(ShaderUtilities.ID_MainTex) != null && mat.GetTexture(ShaderUtilities.ID_MainTex) != null && targetMaterial.GetTexture(ShaderUtilities.ID_MainTex).GetInstanceID() == mat.GetTexture(ShaderUtilities.ID_MainTex).GetInstanceID()) - { - if (!refs.Contains(targetMaterial)) - refs.Add(targetMaterial); - } - else - { - // TODO: Find a more efficient method to unload resources. - //Resources.UnloadAsset(targetMaterial.GetTexture(ShaderUtilities.ID_MainTex)); - } - } - - return refs.ToArray(); - } - - - // Function used to find the Font Asset which matches the given Material Preset and Font Atlas Texture. - public static TMP_FontAsset FindMatchingFontAsset(Material mat) - { - if (mat.GetTexture(ShaderUtilities.ID_MainTex) == null) return null; - - // Find the dependent assets of this material. - string[] dependentAssets = AssetDatabase.GetDependencies(AssetDatabase.GetAssetPath(mat), false); - - for (int i = 0; i < dependentAssets.Length; i++) - { - TMP_FontAsset fontAsset = AssetDatabase.LoadAssetAtPath(dependentAssets[i]); - if (fontAsset != null) - return fontAsset; - } - - return null; - } - - - private static string GetPackageRelativePath() - { - // Check for potential UPM package - string packagePath = Path.GetFullPath("Packages/com.unity.textmeshpro"); - if (Directory.Exists(packagePath)) - { - return "Packages/com.unity.textmeshpro"; - } - - packagePath = Path.GetFullPath("Assets/.."); - if (Directory.Exists(packagePath)) - { - // Search default location for development package - if (Directory.Exists(packagePath + "/Assets/Packages/com.unity.TextMeshPro/Editor Resources")) - { - return "Assets/Packages/com.unity.TextMeshPro"; - } - - // Search for default location of normal TextMesh Pro AssetStore package - if (Directory.Exists(packagePath + "/Assets/TextMesh Pro/Editor Resources")) - { - return "Assets/TextMesh Pro"; - } - - // Search for potential alternative locations in the user project - string[] matchingPaths = Directory.GetDirectories(packagePath, "TextMesh Pro", SearchOption.AllDirectories); - packagePath = ValidateLocation(matchingPaths, packagePath); - if (packagePath != null) return packagePath; - } - - return null; - } - - private static string GetPackageFullPath() - { - // Check for potential UPM package - string packagePath = Path.GetFullPath("Packages/com.unity.textmeshpro"); - if (Directory.Exists(packagePath)) - { - return packagePath; - } - - packagePath = Path.GetFullPath("Assets/.."); - if (Directory.Exists(packagePath)) - { - // Search default location for development package - if (Directory.Exists(packagePath + "/Assets/Packages/com.unity.TextMeshPro/Editor Resources")) - { - return packagePath + "/Assets/Packages/com.unity.TextMeshPro"; - } - - // Search for default location of normal TextMesh Pro AssetStore package - if (Directory.Exists(packagePath + "/Assets/TextMesh Pro/Editor Resources")) - { - return packagePath + "/Assets/TextMesh Pro"; - } - - // Search for potential alternative locations in the user project - string[] matchingPaths = Directory.GetDirectories(packagePath, "TextMesh Pro", SearchOption.AllDirectories); - string path = ValidateLocation(matchingPaths, packagePath); - if (path != null) return packagePath + path; - } - - return null; - } - - - /// - /// Method to validate the location of the asset folder by making sure the GUISkins folder exists. - /// - /// - /// - private static string ValidateLocation(string[] paths, string projectPath) - { - for (int i = 0; i < paths.Length; i++) - { - // Check if any of the matching directories contain a GUISkins directory. - if (Directory.Exists(paths[i] + "/Editor Resources")) - { - folderPath = paths[i].Replace(projectPath, ""); - folderPath = folderPath.TrimStart('\\', '/'); - return folderPath; - } - } - - return null; - } - - - /// - /// Function which returns a string containing a sequence of Decimal character ranges. - /// - /// - /// - public static string GetDecimalCharacterSequence(int[] characterSet) - { - if (characterSet == null || characterSet.Length == 0) - return string.Empty; - - string characterSequence = string.Empty; - int count = characterSet.Length; - int first = characterSet[0]; - int last = first; - - for (int i = 1; i < count; i++) - { - if (characterSet[i - 1] + 1 == characterSet[i]) - { - last = characterSet[i]; - } - else - { - if (first == last) - characterSequence += first + ","; - else - characterSequence += first + "-" + last + ","; - - first = last = characterSet[i]; - } - - } - - // handle the final group - if (first == last) - characterSequence += first; - else - characterSequence += first + "-" + last; - - return characterSequence; - } - - - /// - /// Function which returns a string containing a sequence of Unicode (Hex) character ranges. - /// - /// - /// - public static string GetUnicodeCharacterSequence(int[] characterSet) - { - if (characterSet == null || characterSet.Length == 0) - return string.Empty; - - string characterSequence = string.Empty; - int count = characterSet.Length; - int first = characterSet[0]; - int last = first; - - for (int i = 1; i < count; i++) - { - if (characterSet[i - 1] + 1 == characterSet[i]) - { - last = characterSet[i]; - } - else - { - if (first == last) - characterSequence += first.ToString("X2") + ","; - else - characterSequence += first.ToString("X2") + "-" + last.ToString("X2") + ","; - - first = last = characterSet[i]; - } - - } - - // handle the final group - if (first == last) - characterSequence += first.ToString("X2"); - else - characterSequence += first.ToString("X2") + "-" + last.ToString("X2"); - - return characterSequence; - } - - - /// - /// - /// - /// - /// - /// - public static void DrawBox(Rect rect, float thickness, Color color) - { - EditorGUI.DrawRect(new Rect(rect.x - thickness, rect.y + thickness, rect.width + thickness * 2, thickness), color); - EditorGUI.DrawRect(new Rect(rect.x - thickness, rect.y + thickness, thickness, rect.height - thickness * 2), color); - EditorGUI.DrawRect(new Rect(rect.x - thickness, rect.y + rect.height - thickness * 2, rect.width + thickness * 2, thickness), color); - EditorGUI.DrawRect(new Rect(rect.x + rect.width, rect.y + thickness, thickness, rect.height - thickness * 2), color); - } - - - /// - /// Function to return the horizontal alignment grid value. - /// - /// - /// - public static int GetHorizontalAlignmentGridValue(int value) - { - if ((value & 0x1) == 0x1) - return 0; - else if ((value & 0x2) == 0x2) - return 1; - else if ((value & 0x4) == 0x4) - return 2; - else if ((value & 0x8) == 0x8) - return 3; - else if ((value & 0x10) == 0x10) - return 4; - else if ((value & 0x20) == 0x20) - return 5; - - return 0; - } - - /// - /// Function to return the vertical alignment grid value. - /// - /// - /// - public static int GetVerticalAlignmentGridValue(int value) - { - if ((value & 0x100) == 0x100) - return 0; - if ((value & 0x200) == 0x200) - return 1; - if ((value & 0x400) == 0x400) - return 2; - if ((value & 0x800) == 0x800) - return 3; - if ((value & 0x1000) == 0x1000) - return 4; - if ((value & 0x2000) == 0x2000) - return 5; - - return 0; - } - - public static void DrawColorProperty(Rect rect, SerializedProperty property) - { - int oldIndent = EditorGUI.indentLevel; - EditorGUI.indentLevel = 0; - if (EditorGUIUtility.wideMode) - { - EditorGUI.PropertyField(new Rect(rect.x, rect.y, 50f, rect.height), property, GUIContent.none); - rect.x += 50f; - rect.width = Mathf.Min(100f, rect.width - 55f); - } - else - { - rect.height /= 2f; - rect.width = Mathf.Min(100f, rect.width - 5f); - EditorGUI.PropertyField(rect, property, GUIContent.none); - rect.y += rect.height; - } - - EditorGUI.BeginChangeCheck(); - string colorString = EditorGUI.TextField(rect, string.Format("#{0}", ColorUtility.ToHtmlStringRGBA(property.colorValue))); - if (EditorGUI.EndChangeCheck()) - { - if (ColorUtility.TryParseHtmlString(colorString, out Color color)) - { - property.colorValue = color; - } - } - EditorGUI.indentLevel = oldIndent; - } - - public static bool EditorToggle(Rect position, bool value, GUIContent content, GUIStyle style) - { - var id = GUIUtility.GetControlID(content, FocusType.Keyboard, position); - var evt = Event.current; - - // Toggle selected toggle on space or return key - if (GUIUtility.keyboardControl == id && evt.type == EventType.KeyDown && (evt.keyCode == KeyCode.Space || evt.keyCode == KeyCode.Return || evt.keyCode == KeyCode.KeypadEnter)) - { - value = !value; - evt.Use(); - GUI.changed = true; - } - - if (evt.type == EventType.MouseDown && position.Contains(Event.current.mousePosition)) - { - GUIUtility.keyboardControl = id; - EditorGUIUtility.editingTextField = false; - HandleUtility.Repaint(); - } - - return GUI.Toggle(position, id, value, content, style); - } - - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_EditorUtility.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_EditorUtility.cs.meta deleted file mode 100644 index 5088b1bd..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_EditorUtility.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 2300e75732d74890b38a8ff257a3ae15 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_FontAssetEditor.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_FontAssetEditor.cs deleted file mode 100644 index 0e445262..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_FontAssetEditor.cs +++ /dev/null @@ -1,1711 +0,0 @@ -using UnityEngine; -using UnityEditor; -using UnityEditorInternal; -using System.Collections; -using System.Collections.Generic; -using UnityEngine.TextCore; -using UnityEngine.TextCore.LowLevel; - - -namespace TMPro.EditorUtilities -{ - - [CustomPropertyDrawer(typeof(TMP_FontWeightPair))] - public class FontWeightDrawer : PropertyDrawer - { - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) - { - SerializedProperty prop_regular = property.FindPropertyRelative("regularTypeface"); - SerializedProperty prop_italic = property.FindPropertyRelative("italicTypeface"); - - float width = position.width; - - position.width = EditorGUIUtility.labelWidth; - EditorGUI.LabelField(position, label); - - int oldIndent = EditorGUI.indentLevel; - EditorGUI.indentLevel = 0; - - // NORMAL TYPEFACE - if (label.text[0] == '4') GUI.enabled = false; - position.x += position.width; position.width = (width - position.width) / 2; - EditorGUI.PropertyField(position, prop_regular, GUIContent.none); - - // ITALIC TYPEFACE - GUI.enabled = true; - position.x += position.width; - EditorGUI.PropertyField(position, prop_italic, GUIContent.none); - - EditorGUI.indentLevel = oldIndent; - } - } - - [CustomEditor(typeof(TMP_FontAsset))] - public class TMP_FontAssetEditor : Editor - { - private struct UI_PanelState - { - public static bool faceInfoPanel = true; - public static bool generationSettingsPanel = true; - public static bool fontAtlasInfoPanel = true; - public static bool fontWeightPanel = true; - public static bool fallbackFontAssetPanel = true; - public static bool glyphTablePanel = false; - public static bool characterTablePanel = false; - public static bool fontFeatureTablePanel = false; - } - - private struct AtlasSettings - { - public GlyphRenderMode glyphRenderMode; - public int pointSize; - public int padding; - public int atlasWidth; - public int atlasHeight; - } - - /// - /// Material used to display SDF glyphs in the Character and Glyph tables. - /// - internal static Material internalSDFMaterial - { - get - { - if (s_InternalSDFMaterial == null) - { - Shader shader = Shader.Find("Hidden/TextMeshPro/Internal/Distance Field SSD"); - - if (shader != null) - s_InternalSDFMaterial = new Material(shader); - } - - return s_InternalSDFMaterial; - } - } - static Material s_InternalSDFMaterial; - - /// - /// Material used to display Bitmap glyphs in the Character and Glyph tables. - /// - internal static Material internalBitmapMaterial - { - get - { - if (s_InternalBitmapMaterial == null) - { - Shader shader = Shader.Find("Hidden/Internal-GUITextureClipText"); - - if (shader != null) - s_InternalBitmapMaterial = new Material(shader); - } - - return s_InternalBitmapMaterial; - } - } - static Material s_InternalBitmapMaterial; - - private static string[] s_UiStateLabel = new string[] { "(Click to collapse) ", "(Click to expand) " }; - private GUIContent[] m_AtlasResolutionLabels = { new GUIContent("8"), new GUIContent("16"), new GUIContent("32"), new GUIContent("64"), new GUIContent("128"), new GUIContent("256"), new GUIContent("512"), new GUIContent("1024"), new GUIContent("2048"), new GUIContent("4096"), new GUIContent("8192") }; - private int[] m_AtlasResolutions = { 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192 }; - - private struct Warning - { - public bool isEnabled; - public double expirationTime; - } - - private int m_CurrentGlyphPage = 0; - private int m_CurrentCharacterPage = 0; - private int m_CurrentKerningPage = 0; - - private int m_SelectedGlyphRecord = -1; - private int m_SelectedCharacterRecord = -1; - private int m_SelectedAdjustmentRecord = -1; - - private string m_dstGlyphID; - private string m_dstUnicode; - private const string k_placeholderUnicodeHex = "New Unicode (Hex)"; - private string m_unicodeHexLabel = k_placeholderUnicodeHex; - private const string k_placeholderGlyphID = "New Glyph ID"; - private string m_GlyphIDLabel = k_placeholderGlyphID; - - private Warning m_AddGlyphWarning; - private Warning m_AddCharacterWarning; - private bool m_DisplayDestructiveChangeWarning; - private AtlasSettings m_AtlasSettings; - private bool m_MaterialPresetsRequireUpdate; - - private string m_GlyphSearchPattern; - private List m_GlyphSearchList; - - private string m_CharacterSearchPattern; - private List m_CharacterSearchList; - - private string m_KerningTableSearchPattern; - private List m_KerningTableSearchList; - - private bool m_isSearchDirty; - - private const string k_UndoRedo = "UndoRedoPerformed"; - - private SerializedProperty m_AtlasPopulationMode_prop; - private SerializedProperty font_atlas_prop; - private SerializedProperty font_material_prop; - - private SerializedProperty m_AtlasRenderMode_prop; - private SerializedProperty m_SamplingPointSize_prop; - private SerializedProperty m_AtlasPadding_prop; - private SerializedProperty m_AtlasWidth_prop; - private SerializedProperty m_AtlasHeight_prop; - - private SerializedProperty fontWeights_prop; - - //private SerializedProperty fallbackFontAssets_prop; - private ReorderableList m_list; - - private SerializedProperty font_normalStyle_prop; - private SerializedProperty font_normalSpacing_prop; - - private SerializedProperty font_boldStyle_prop; - private SerializedProperty font_boldSpacing_prop; - - private SerializedProperty font_italicStyle_prop; - private SerializedProperty font_tabSize_prop; - - private SerializedProperty m_FaceInfo_prop; - private SerializedProperty m_GlyphTable_prop; - private SerializedProperty m_CharacterTable_prop; - - private TMP_FontFeatureTable m_FontFeatureTable; - private SerializedProperty m_FontFeatureTable_prop; - private SerializedProperty m_GlyphPairAdjustmentRecords_prop; - - private TMP_SerializedPropertyHolder m_SerializedPropertyHolder; - private SerializedProperty m_EmptyGlyphPairAdjustmentRecord_prop; - - private TMP_FontAsset m_fontAsset; - - private Material[] m_materialPresets; - - private bool isAssetDirty = false; - - private int errorCode; - - private System.DateTime timeStamp; - - - public void OnEnable() - { - m_FaceInfo_prop = serializedObject.FindProperty("m_FaceInfo"); - - font_atlas_prop = serializedObject.FindProperty("m_AtlasTextures").GetArrayElementAtIndex(0); - font_material_prop = serializedObject.FindProperty("material"); - - m_AtlasPopulationMode_prop = serializedObject.FindProperty("m_AtlasPopulationMode"); - m_AtlasRenderMode_prop = serializedObject.FindProperty("m_AtlasRenderMode"); - m_SamplingPointSize_prop = m_FaceInfo_prop.FindPropertyRelative("m_PointSize"); - m_AtlasPadding_prop = serializedObject.FindProperty("m_AtlasPadding"); - m_AtlasWidth_prop = serializedObject.FindProperty("m_AtlasWidth"); - m_AtlasHeight_prop = serializedObject.FindProperty("m_AtlasHeight"); - - fontWeights_prop = serializedObject.FindProperty("m_FontWeightTable"); - - m_list = new ReorderableList(serializedObject, serializedObject.FindProperty("m_FallbackFontAssetTable"), true, true, true, true); - - m_list.drawElementCallback = (Rect rect, int index, bool isActive, bool isFocused) => - { - var element = m_list.serializedProperty.GetArrayElementAtIndex(index); - rect.y += 2; - EditorGUI.PropertyField(new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight), element, GUIContent.none); - }; - - m_list.drawHeaderCallback = rect => - { - EditorGUI.LabelField(rect, "Fallback List"); - }; - - // Clean up fallback list in the event if contains null elements. - CleanFallbackFontAssetTable(); - - font_normalStyle_prop = serializedObject.FindProperty("normalStyle"); - font_normalSpacing_prop = serializedObject.FindProperty("normalSpacingOffset"); - - font_boldStyle_prop = serializedObject.FindProperty("boldStyle"); - font_boldSpacing_prop = serializedObject.FindProperty("boldSpacing"); - - font_italicStyle_prop = serializedObject.FindProperty("italicStyle"); - font_tabSize_prop = serializedObject.FindProperty("tabSize"); - - m_CharacterTable_prop = serializedObject.FindProperty("m_CharacterTable"); - m_GlyphTable_prop = serializedObject.FindProperty("m_GlyphTable"); - - m_FontFeatureTable_prop = serializedObject.FindProperty("m_FontFeatureTable"); - m_GlyphPairAdjustmentRecords_prop = m_FontFeatureTable_prop.FindPropertyRelative("m_GlyphPairAdjustmentRecords"); - - m_fontAsset = target as TMP_FontAsset; - m_FontFeatureTable = m_fontAsset.fontFeatureTable; - - // Upgrade Font Feature Table if necessary - if (m_fontAsset.m_KerningTable != null && m_fontAsset.m_KerningTable.kerningPairs != null && m_fontAsset.m_KerningTable.kerningPairs.Count > 0) - m_fontAsset.ReadFontAssetDefinition(); - - // Create serialized object to allow us to use a serialized property of an empty kerning pair. - m_SerializedPropertyHolder = CreateInstance(); - m_SerializedPropertyHolder.fontAsset = m_fontAsset; - SerializedObject internalSerializedObject = new SerializedObject(m_SerializedPropertyHolder); - m_EmptyGlyphPairAdjustmentRecord_prop = internalSerializedObject.FindProperty("glyphPairAdjustmentRecord"); - - m_materialPresets = TMP_EditorUtility.FindMaterialReferences(m_fontAsset); - - m_GlyphSearchList = new List(); - m_KerningTableSearchList = new List(); - } - - - public void OnDisable() - { - // Revert changes if user closes or changes selection without having made a choice. - if (m_DisplayDestructiveChangeWarning) - { - m_DisplayDestructiveChangeWarning = false; - RestoreAtlasGenerationSettings(); - GUIUtility.keyboardControl = 0; - - serializedObject.ApplyModifiedProperties(); - } - } - - - public override void OnInspectorGUI() - { - //Debug.Log("OnInspectorGUI Called."); - - Event currentEvent = Event.current; - - serializedObject.Update(); - - Rect rect = EditorGUILayout.GetControlRect(false, 24); - float labelWidth = EditorGUIUtility.labelWidth; - float fieldWidth = EditorGUIUtility.fieldWidth; - - // FACE INFO PANEL - #region Face info - GUI.Label(rect, new GUIContent("Face Info - v" + m_fontAsset.version), TMP_UIStyleManager.sectionHeader); - - rect.x += rect.width - 132f; - rect.y += 2; - rect.width = 130f; - rect.height = 18f; - if (GUI.Button(rect, new GUIContent("Update Atlas Texture"))) - { - TMPro_FontAssetCreatorWindow.ShowFontAtlasCreatorWindow(target as TMP_FontAsset); - } - - EditorGUI.indentLevel = 1; - GUI.enabled = false; // Lock UI - - // TODO : Consider creating a property drawer for these. - EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_FamilyName")); - EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_StyleName")); - EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_PointSize")); - - GUI.enabled = true; - - EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_Scale")); - EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_LineHeight")); - - EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_AscentLine")); - EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_CapLine")); - EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_MeanLine")); - EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_Baseline")); - EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_DescentLine")); - EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_UnderlineOffset")); - EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_UnderlineThickness")); - EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_StrikethroughOffset")); - //EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("strikethroughThickness")); - EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_SuperscriptOffset")); - EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_SuperscriptSize")); - EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_SubscriptOffset")); - EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_SubscriptSize")); - EditorGUILayout.PropertyField(m_FaceInfo_prop.FindPropertyRelative("m_TabWidth")); - // TODO : Add clamping for some of these values. - //subSize_prop.floatValue = Mathf.Clamp(subSize_prop.floatValue, 0.25f, 1f); - - EditorGUILayout.Space(); - #endregion - - // GENERATION SETTINGS - #region Generation Settings - rect = EditorGUILayout.GetControlRect(false, 24); - - if (GUI.Button(rect, new GUIContent("Generation Settings"), TMP_UIStyleManager.sectionHeader)) - UI_PanelState.generationSettingsPanel = !UI_PanelState.generationSettingsPanel; - - GUI.Label(rect, (UI_PanelState.generationSettingsPanel ? "" : s_UiStateLabel[1]), TMP_UIStyleManager.rightLabel); - - if (UI_PanelState.generationSettingsPanel) - { - EditorGUI.indentLevel = 1; - - EditorGUI.BeginChangeCheck(); - Font sourceFont = (Font)EditorGUILayout.ObjectField("Source Font File", m_fontAsset.m_SourceFontFile_EditorRef, typeof(Font), false); - if (EditorGUI.EndChangeCheck()) - { - string guid = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(sourceFont)); - m_fontAsset.m_SourceFontFileGUID = guid; - m_fontAsset.m_SourceFontFile_EditorRef = sourceFont; - } - - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(m_AtlasPopulationMode_prop, new GUIContent("Atlas Population Mode")); - if (EditorGUI.EndChangeCheck()) - { - serializedObject.ApplyModifiedProperties(); - - bool isDatabaseRefreshRequired = false; - - if (m_AtlasPopulationMode_prop.intValue == 0) - { - m_fontAsset.sourceFontFile = null; - - // Set atlas textures to non readable. - //for (int i = 0; i < m_fontAsset.atlasTextures.Length; i++) - //{ - // Texture2D tex = m_fontAsset.atlasTextures[i]; - - // if (tex != null && tex.isReadable) - // { - // string texPath = AssetDatabase.GetAssetPath(tex); - // var texImporter = AssetImporter.GetAtPath(texPath) as TextureImporter; - // if (texImporter != null) - // { - // texImporter.isReadable = false; - // AssetDatabase.ImportAsset(texPath); - // isDatabaseRefreshRequired = true; - // } - // } - //} - - Debug.Log("Atlas Population mode set to [Static]."); - } - else if (m_AtlasPopulationMode_prop.intValue == 1) - { - if (m_fontAsset.m_SourceFontFile_EditorRef.dynamic == false) - { - Debug.LogWarning("Please set the [" + m_fontAsset.name + "] font to dynamic mode as this is required for Dynamic SDF support.", m_fontAsset.m_SourceFontFile_EditorRef); - m_AtlasPopulationMode_prop.intValue = 0; - - serializedObject.ApplyModifiedProperties(); - } - else - { - m_fontAsset.sourceFontFile = m_fontAsset.m_SourceFontFile_EditorRef; - - /* - // Set atlas textures to non readable. - for (int i = 0; i < m_fontAsset.atlasTextures.Length; i++) - { - Texture2D tex = m_fontAsset.atlasTextures[i]; - - if (tex != null && tex.isReadable == false) - { - string texPath = AssetDatabase.GetAssetPath(tex.GetInstanceID()); - Object[] paths = AssetDatabase.LoadAllAssetsAtPath(texPath); - var texImporter = AssetImporter.GetAtPath(texPath) as TextureImporter; - if (texImporter != null) - { - texImporter.isReadable = true; - AssetDatabase.ImportAsset(texPath); - isDatabaseRefreshRequired = true; - } - } - } - */ - Debug.Log("Atlas Population mode set to [Dynamic]."); - } - } - - if (isDatabaseRefreshRequired) - AssetDatabase.Refresh(); - - serializedObject.Update(); - isAssetDirty = true; - } - - GUI.enabled = true; - // Save state of atlas settings - if (m_DisplayDestructiveChangeWarning == false) - { - SavedAtlasGenerationSettings(); - //Undo.RegisterCompleteObjectUndo(m_fontAsset, "Font Asset Changes"); - } - - EditorGUI.BeginChangeCheck(); - // TODO: Switch shaders depending on GlyphRenderMode. - EditorGUILayout.PropertyField(m_AtlasRenderMode_prop); - EditorGUILayout.PropertyField(m_SamplingPointSize_prop, new GUIContent("Sampling Point Size")); - if (EditorGUI.EndChangeCheck()) - { - m_DisplayDestructiveChangeWarning = true; - } - - // Changes to these properties require updating Material Presets for this font asset. - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(m_AtlasPadding_prop, new GUIContent("Padding")); - EditorGUILayout.IntPopup(m_AtlasWidth_prop, m_AtlasResolutionLabels, m_AtlasResolutions, new GUIContent("Atlas Width")); - EditorGUILayout.IntPopup(m_AtlasHeight_prop, m_AtlasResolutionLabels, m_AtlasResolutions, new GUIContent("Atlas Height")); - if (EditorGUI.EndChangeCheck()) - { - m_MaterialPresetsRequireUpdate = true; - m_DisplayDestructiveChangeWarning = true; - } - - if (m_DisplayDestructiveChangeWarning) - { - // These changes are destructive on the font asset - rect = EditorGUILayout.GetControlRect(false, 60); - rect.x += 15; - rect.width -= 15; - EditorGUI.HelpBox(rect, "Changing these settings will clear the font asset's character, glyph and texture data.", MessageType.Warning); - - if (GUI.Button(new Rect(rect.width - 140, rect.y + 36, 80, 18), new GUIContent("Apply"))) - { - m_DisplayDestructiveChangeWarning = false; - - // Update face info is sampling point size was changed. - if (m_AtlasSettings.pointSize != m_SamplingPointSize_prop.intValue) - { - FontEngine.LoadFontFace(m_fontAsset.sourceFontFile, m_SamplingPointSize_prop.intValue); - m_fontAsset.faceInfo = FontEngine.GetFaceInfo(); - } - - // Update material - m_fontAsset.material.SetFloat(ShaderUtilities.ID_TextureWidth, m_AtlasWidth_prop.intValue); - m_fontAsset.material.SetFloat(ShaderUtilities.ID_TextureHeight, m_AtlasHeight_prop.intValue); - m_fontAsset.material.SetFloat(ShaderUtilities.ID_GradientScale, m_AtlasPadding_prop.intValue + 1); - - // Update material presets if any of the relevant properties have been changed. - if (m_MaterialPresetsRequireUpdate) - { - m_MaterialPresetsRequireUpdate = false; - - Material[] materialPresets = TMP_EditorUtility.FindMaterialReferences(m_fontAsset); - for (int i = 0; i < materialPresets.Length; i++) - { - Material mat = materialPresets[i]; - - mat.SetFloat(ShaderUtilities.ID_TextureWidth, m_AtlasWidth_prop.intValue); - mat.SetFloat(ShaderUtilities.ID_TextureHeight, m_AtlasHeight_prop.intValue); - mat.SetFloat(ShaderUtilities.ID_GradientScale, m_AtlasPadding_prop.intValue + 1); - } - } - - m_fontAsset.ClearFontAssetData(); - GUIUtility.keyboardControl = 0; - isAssetDirty = true; - - // Update Font Asset Creation Settings to reflect new changes. - UpdateFontAssetCreationSettings(); - - // TODO: Clear undo buffers. - //Undo.ClearUndo(m_fontAsset); - } - - if (GUI.Button(new Rect(rect.width - 56, rect.y + 36, 80, 18), new GUIContent("Revert"))) - { - m_DisplayDestructiveChangeWarning = false; - RestoreAtlasGenerationSettings(); - GUIUtility.keyboardControl = 0; - - // TODO: Clear undo buffers. - //Undo.ClearUndo(m_fontAsset); - } - } - EditorGUILayout.Space(); - } - #endregion - - // ATLAS & MATERIAL PANEL - #region Atlas & Material - rect = EditorGUILayout.GetControlRect(false, 24); - - if (GUI.Button(rect, new GUIContent("Atlas & Material"), TMP_UIStyleManager.sectionHeader)) - UI_PanelState.fontAtlasInfoPanel = !UI_PanelState.fontAtlasInfoPanel; - - GUI.Label(rect, (UI_PanelState.fontAtlasInfoPanel ? "" : s_UiStateLabel[1]), TMP_UIStyleManager.rightLabel); - - if (UI_PanelState.fontAtlasInfoPanel) - { - EditorGUI.indentLevel = 1; - - GUI.enabled = false; - EditorGUILayout.PropertyField(font_atlas_prop, new GUIContent("Font Atlas")); - EditorGUILayout.PropertyField(font_material_prop, new GUIContent("Font Material")); - GUI.enabled = true; - EditorGUILayout.Space(); - } - #endregion - - string evt_cmd = Event.current.commandName; // Get Current Event CommandName to check for Undo Events - - // FONT WEIGHT PANEL - #region Font Weights - rect = EditorGUILayout.GetControlRect(false, 24); - - if (GUI.Button(rect, new GUIContent("Font Weights", "The Font Assets that will be used for different font weights and the settings used to simulate a typeface when no asset is available."), TMP_UIStyleManager.sectionHeader)) - UI_PanelState.fontWeightPanel = !UI_PanelState.fontWeightPanel; - - GUI.Label(rect, (UI_PanelState.fontWeightPanel ? "" : s_UiStateLabel[1]), TMP_UIStyleManager.rightLabel); - - if (UI_PanelState.fontWeightPanel) - { - EditorGUIUtility.labelWidth *= 0.75f; - EditorGUIUtility.fieldWidth *= 0.25f; - - EditorGUILayout.BeginVertical(); - EditorGUI.indentLevel = 1; - rect = EditorGUILayout.GetControlRect(true); - rect.x += EditorGUIUtility.labelWidth; - rect.width = (rect.width - EditorGUIUtility.labelWidth) / 2f; - GUI.Label(rect, "Regular Tyepface", EditorStyles.label); - rect.x += rect.width; - GUI.Label(rect, "Italic Typeface", EditorStyles.label); - - EditorGUI.indentLevel = 1; - - EditorGUILayout.PropertyField(fontWeights_prop.GetArrayElementAtIndex(1), new GUIContent("100 - Thin")); - EditorGUILayout.PropertyField(fontWeights_prop.GetArrayElementAtIndex(2), new GUIContent("200 - Extra-Light")); - EditorGUILayout.PropertyField(fontWeights_prop.GetArrayElementAtIndex(3), new GUIContent("300 - Light")); - EditorGUILayout.PropertyField(fontWeights_prop.GetArrayElementAtIndex(4), new GUIContent("400 - Regular")); - EditorGUILayout.PropertyField(fontWeights_prop.GetArrayElementAtIndex(5), new GUIContent("500 - Medium")); - EditorGUILayout.PropertyField(fontWeights_prop.GetArrayElementAtIndex(6), new GUIContent("600 - Semi-Bold")); - EditorGUILayout.PropertyField(fontWeights_prop.GetArrayElementAtIndex(7), new GUIContent("700 - Bold")); - EditorGUILayout.PropertyField(fontWeights_prop.GetArrayElementAtIndex(8), new GUIContent("800 - Heavy")); - EditorGUILayout.PropertyField(fontWeights_prop.GetArrayElementAtIndex(9), new GUIContent("900 - Black")); - - EditorGUILayout.EndVertical(); - - EditorGUILayout.Space(); - - EditorGUILayout.BeginVertical(); - - EditorGUILayout.BeginHorizontal(); - EditorGUILayout.PropertyField(font_normalStyle_prop, new GUIContent("Normal Weight")); - font_normalStyle_prop.floatValue = Mathf.Clamp(font_normalStyle_prop.floatValue, -3.0f, 3.0f); - if (GUI.changed || evt_cmd == k_UndoRedo) - { - GUI.changed = false; - - // Modify the material property on matching material presets. - for (int i = 0; i < m_materialPresets.Length; i++) - m_materialPresets[i].SetFloat("_WeightNormal", font_normalStyle_prop.floatValue); - } - - EditorGUILayout.PropertyField(font_boldStyle_prop, new GUIContent("Bold Weight")); - font_boldStyle_prop.floatValue = Mathf.Clamp(font_boldStyle_prop.floatValue, -3.0f, 3.0f); - if (GUI.changed || evt_cmd == k_UndoRedo) - { - GUI.changed = false; - - // Modify the material property on matching material presets. - for (int i = 0; i < m_materialPresets.Length; i++) - m_materialPresets[i].SetFloat("_WeightBold", font_boldStyle_prop.floatValue); - } - EditorGUILayout.EndHorizontal(); - - EditorGUILayout.BeginHorizontal(); - EditorGUILayout.PropertyField(font_normalSpacing_prop, new GUIContent("Spacing Offset")); - font_normalSpacing_prop.floatValue = Mathf.Clamp(font_normalSpacing_prop.floatValue, -100, 100); - if (GUI.changed || evt_cmd == k_UndoRedo) - { - GUI.changed = false; - } - - EditorGUILayout.PropertyField(font_boldSpacing_prop, new GUIContent("Bold Spacing")); - font_boldSpacing_prop.floatValue = Mathf.Clamp(font_boldSpacing_prop.floatValue, 0, 100); - if (GUI.changed || evt_cmd == k_UndoRedo) - { - GUI.changed = false; - } - EditorGUILayout.EndHorizontal(); - - EditorGUILayout.BeginHorizontal(); - EditorGUILayout.PropertyField(font_italicStyle_prop, new GUIContent("Italic Style")); - font_italicStyle_prop.intValue = Mathf.Clamp(font_italicStyle_prop.intValue, 15, 60); - - EditorGUILayout.PropertyField(font_tabSize_prop, new GUIContent("Tab Multiple")); - EditorGUILayout.EndHorizontal(); - EditorGUILayout.EndVertical(); - EditorGUILayout.Space(); - } - - EditorGUIUtility.labelWidth = 0; - EditorGUIUtility.fieldWidth = 0; - #endregion - - // FALLBACK FONT ASSETS - #region Fallback Font Asset - rect = EditorGUILayout.GetControlRect(false, 24); - EditorGUI.indentLevel = 0; - if (GUI.Button(rect, new GUIContent("Fallback Font Assets", "Select the Font Assets that will be searched and used as fallback when characters are missing from this font asset."), TMP_UIStyleManager.sectionHeader)) - UI_PanelState.fallbackFontAssetPanel = !UI_PanelState.fallbackFontAssetPanel; - - GUI.Label(rect, (UI_PanelState.fallbackFontAssetPanel ? "" : s_UiStateLabel[1]), TMP_UIStyleManager.rightLabel); - - if (UI_PanelState.fallbackFontAssetPanel) - { - EditorGUIUtility.labelWidth = 120; - EditorGUI.indentLevel = 0; - - m_list.DoLayoutList(); - EditorGUILayout.Space(); - } - #endregion - - // CHARACTER TABLE TABLE - #region Character Table - EditorGUIUtility.labelWidth = labelWidth; - EditorGUIUtility.fieldWidth = fieldWidth; - EditorGUI.indentLevel = 0; - rect = EditorGUILayout.GetControlRect(false, 24); - - if (GUI.Button(rect, new GUIContent("Character Table", "List of characters contained in this font asset."), TMP_UIStyleManager.sectionHeader)) - UI_PanelState.characterTablePanel = !UI_PanelState.characterTablePanel; - - GUI.Label(rect, (UI_PanelState.characterTablePanel ? "" : s_UiStateLabel[1]), TMP_UIStyleManager.rightLabel); - - if (UI_PanelState.characterTablePanel) - { - int arraySize = m_CharacterTable_prop.arraySize; - int itemsPerPage = 15; - - // Display Glyph Management Tools - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - { - // Search Bar implementation - #region DISPLAY SEARCH BAR - EditorGUILayout.BeginHorizontal(); - { - EditorGUIUtility.labelWidth = 130f; - EditorGUI.BeginChangeCheck(); - string searchPattern = EditorGUILayout.TextField("Character Search", m_CharacterSearchPattern, "SearchTextField"); - if (EditorGUI.EndChangeCheck() || m_isSearchDirty) - { - if (string.IsNullOrEmpty(searchPattern) == false) - { - m_CharacterSearchPattern = searchPattern; - - // Search Character Table for potential matches - SearchCharacterTable (m_CharacterSearchPattern, ref m_CharacterSearchList); - } - else - m_CharacterSearchPattern = null; - - m_isSearchDirty = false; - } - - string styleName = string.IsNullOrEmpty(m_CharacterSearchPattern) ? "SearchCancelButtonEmpty" : "SearchCancelButton"; - if (GUILayout.Button(GUIContent.none, styleName)) - { - GUIUtility.keyboardControl = 0; - m_CharacterSearchPattern = string.Empty; - } - } - EditorGUILayout.EndHorizontal(); - #endregion - - // Display Page Navigation - if (!string.IsNullOrEmpty(m_CharacterSearchPattern)) - arraySize = m_CharacterSearchList.Count; - - DisplayPageNavigation(ref m_CurrentCharacterPage, arraySize, itemsPerPage); - } - EditorGUILayout.EndVertical(); - - // Display Character Table Elements - if (arraySize > 0) - { - // Display each character entry using the CharacterPropertyDrawer. - for (int i = itemsPerPage * m_CurrentCharacterPage; i < arraySize && i < itemsPerPage * (m_CurrentCharacterPage + 1); i++) - { - // Define the start of the selection region of the element. - Rect elementStartRegion = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); - - int elementIndex = i; - if (!string.IsNullOrEmpty(m_CharacterSearchPattern)) - elementIndex = m_CharacterSearchList[i]; - - SerializedProperty characterProperty = m_CharacterTable_prop.GetArrayElementAtIndex(elementIndex); - - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - - EditorGUI.BeginDisabledGroup(i != m_SelectedCharacterRecord); - { - EditorGUILayout.PropertyField(characterProperty); - } - EditorGUI.EndDisabledGroup(); - - EditorGUILayout.EndVertical(); - - // Define the end of the selection region of the element. - Rect elementEndRegion = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); - - // Check for Item selection - Rect selectionArea = new Rect(elementStartRegion.x, elementStartRegion.y, elementEndRegion.width, elementEndRegion.y - elementStartRegion.y); - if (DoSelectionCheck(selectionArea)) - { - if (m_SelectedCharacterRecord == i) - m_SelectedCharacterRecord = -1; - else - { - m_SelectedCharacterRecord = i; - m_AddCharacterWarning.isEnabled = false; - m_unicodeHexLabel = k_placeholderUnicodeHex; - GUIUtility.keyboardControl = 0; - } - } - - // Draw Selection Highlight and Glyph Options - if (m_SelectedCharacterRecord == i) - { - TMP_EditorUtility.DrawBox(selectionArea, 2f, new Color32(40, 192, 255, 255)); - - // Draw Glyph management options - Rect controlRect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight * 1f); - float optionAreaWidth = controlRect.width * 0.6f; - float btnWidth = optionAreaWidth / 3; - - Rect position = new Rect(controlRect.x + controlRect.width * .4f, controlRect.y, btnWidth, controlRect.height); - - // Copy Selected Glyph to Target Glyph ID - GUI.enabled = !string.IsNullOrEmpty(m_dstUnicode); - if (GUI.Button(position, new GUIContent("Copy to"))) - { - GUIUtility.keyboardControl = 0; - - // Convert Hex Value to Decimal - int dstGlyphID = TMP_TextUtilities.StringHexToInt(m_dstUnicode); - - //Add new glyph at target Unicode hex id. - if (!AddNewCharacter(elementIndex, dstGlyphID)) - { - m_AddCharacterWarning.isEnabled = true; - m_AddCharacterWarning.expirationTime = EditorApplication.timeSinceStartup + 1; - } - - m_dstUnicode = string.Empty; - m_isSearchDirty = true; - - TMPro_EventManager.ON_FONT_PROPERTY_CHANGED(true, m_fontAsset); - } - - // Target Glyph ID - GUI.enabled = true; - position.x += btnWidth; - - GUI.SetNextControlName("CharacterID_Input"); - m_dstUnicode = EditorGUI.TextField(position, m_dstUnicode); - - // Placeholder text - EditorGUI.LabelField(position, new GUIContent(m_unicodeHexLabel, "The Unicode (Hex) ID of the duplicated Character"), TMP_UIStyleManager.label); - - // Only filter the input when the destination glyph ID text field has focus. - if (GUI.GetNameOfFocusedControl() == "CharacterID_Input") - { - m_unicodeHexLabel = string.Empty; - - //Filter out unwanted characters. - char chr = Event.current.character; - if ((chr < '0' || chr > '9') && (chr < 'a' || chr > 'f') && (chr < 'A' || chr > 'F')) - { - Event.current.character = '\0'; - } - } - else - { - m_unicodeHexLabel = k_placeholderUnicodeHex; - //m_dstUnicode = string.Empty; - } - - - // Remove Glyph - position.x += btnWidth; - if (GUI.Button(position, "Remove")) - { - GUIUtility.keyboardControl = 0; - - RemoveCharacterFromList(elementIndex); - - isAssetDirty = true; - m_SelectedCharacterRecord = -1; - m_isSearchDirty = true; - break; - } - - if (m_AddCharacterWarning.isEnabled && EditorApplication.timeSinceStartup < m_AddCharacterWarning.expirationTime) - { - EditorGUILayout.HelpBox("The Destination Character ID already exists", MessageType.Warning); - } - - } - } - } - - DisplayPageNavigation(ref m_CurrentCharacterPage, arraySize, itemsPerPage); - - EditorGUILayout.Space(); - } - #endregion - - // GLYPH TABLE - #region Glyph Table - EditorGUIUtility.labelWidth = labelWidth; - EditorGUIUtility.fieldWidth = fieldWidth; - EditorGUI.indentLevel = 0; - rect = EditorGUILayout.GetControlRect(false, 24); - - GUIStyle glyphPanelStyle = new GUIStyle(EditorStyles.helpBox); - - if (GUI.Button(rect, new GUIContent("Glyph Table", "List of glyphs contained in this font asset."), TMP_UIStyleManager.sectionHeader)) - UI_PanelState.glyphTablePanel = !UI_PanelState.glyphTablePanel; - - GUI.Label(rect, (UI_PanelState.glyphTablePanel ? "" : s_UiStateLabel[1]), TMP_UIStyleManager.rightLabel); - - if (UI_PanelState.glyphTablePanel) - { - int arraySize = m_GlyphTable_prop.arraySize; - int itemsPerPage = 15; - - // Display Glyph Management Tools - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - { - // Search Bar implementation - #region DISPLAY SEARCH BAR - EditorGUILayout.BeginHorizontal(); - { - EditorGUIUtility.labelWidth = 130f; - EditorGUI.BeginChangeCheck(); - string searchPattern = EditorGUILayout.TextField("Glyph Search", m_GlyphSearchPattern, "SearchTextField"); - if (EditorGUI.EndChangeCheck() || m_isSearchDirty) - { - if (string.IsNullOrEmpty(searchPattern) == false) - { - m_GlyphSearchPattern = searchPattern; - - // Search Glyph Table for potential matches - SearchGlyphTable(m_GlyphSearchPattern, ref m_GlyphSearchList); - } - else - m_GlyphSearchPattern = null; - - m_isSearchDirty = false; - } - - string styleName = string.IsNullOrEmpty(m_GlyphSearchPattern) ? "SearchCancelButtonEmpty" : "SearchCancelButton"; - if (GUILayout.Button(GUIContent.none, styleName)) - { - GUIUtility.keyboardControl = 0; - m_GlyphSearchPattern = string.Empty; - } - } - EditorGUILayout.EndHorizontal(); - #endregion - - // Display Page Navigation - if (!string.IsNullOrEmpty(m_GlyphSearchPattern)) - arraySize = m_GlyphSearchList.Count; - - DisplayPageNavigation(ref m_CurrentGlyphPage, arraySize, itemsPerPage); - } - EditorGUILayout.EndVertical(); - - // Display Glyph Table Elements - - if (arraySize > 0) - { - // Display each GlyphInfo entry using the GlyphInfo property drawer. - for (int i = itemsPerPage * m_CurrentGlyphPage; i < arraySize && i < itemsPerPage * (m_CurrentGlyphPage + 1); i++) - { - // Define the start of the selection region of the element. - Rect elementStartRegion = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); - - int elementIndex = i; - if (!string.IsNullOrEmpty(m_GlyphSearchPattern)) - elementIndex = m_GlyphSearchList[i]; - - SerializedProperty glyphProperty = m_GlyphTable_prop.GetArrayElementAtIndex(elementIndex); - - EditorGUILayout.BeginVertical(glyphPanelStyle); - - using (new EditorGUI.DisabledScope(i != m_SelectedGlyphRecord)) - { - EditorGUILayout.PropertyField(glyphProperty); - } - - EditorGUILayout.EndVertical(); - - // Define the end of the selection region of the element. - Rect elementEndRegion = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); - - // Check for Item selection - Rect selectionArea = new Rect(elementStartRegion.x, elementStartRegion.y, elementEndRegion.width, elementEndRegion.y - elementStartRegion.y); - if (DoSelectionCheck(selectionArea)) - { - if (m_SelectedGlyphRecord == i) - m_SelectedGlyphRecord = -1; - else - { - m_SelectedGlyphRecord = i; - m_AddGlyphWarning.isEnabled = false; - m_unicodeHexLabel = k_placeholderUnicodeHex; - GUIUtility.keyboardControl = 0; - } - } - - // Draw Selection Highlight and Glyph Options - if (m_SelectedGlyphRecord == i) - { - TMP_EditorUtility.DrawBox(selectionArea, 2f, new Color32(40, 192, 255, 255)); - - // Draw Glyph management options - Rect controlRect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight * 1f); - float optionAreaWidth = controlRect.width * 0.6f; - float btnWidth = optionAreaWidth / 3; - - Rect position = new Rect(controlRect.x + controlRect.width * .4f, controlRect.y, btnWidth, controlRect.height); - - // Copy Selected Glyph to Target Glyph ID - GUI.enabled = !string.IsNullOrEmpty(m_dstGlyphID); - if (GUI.Button(position, new GUIContent("Copy to"))) - { - GUIUtility.keyboardControl = 0; - - // Convert Hex Value to Decimal - int.TryParse(m_dstGlyphID, out int dstGlyphID); - - //Add new glyph at target Unicode hex id. - if (!AddNewGlyph(elementIndex, dstGlyphID)) - { - m_AddGlyphWarning.isEnabled = true; - m_AddGlyphWarning.expirationTime = EditorApplication.timeSinceStartup + 1; - } - - m_dstGlyphID = string.Empty; - m_isSearchDirty = true; - - TMPro_EventManager.ON_FONT_PROPERTY_CHANGED(true, m_fontAsset); - } - - // Target Glyph ID - GUI.enabled = true; - position.x += btnWidth; - - GUI.SetNextControlName("GlyphID_Input"); - m_dstGlyphID = EditorGUI.TextField(position, m_dstGlyphID); - - // Placeholder text - EditorGUI.LabelField(position, new GUIContent(m_GlyphIDLabel, "The Glyph ID of the duplicated Glyph"), TMP_UIStyleManager.label); - - // Only filter the input when the destination glyph ID text field has focus. - if (GUI.GetNameOfFocusedControl() == "GlyphID_Input") - { - m_GlyphIDLabel = string.Empty; - - //Filter out unwanted characters. - char chr = Event.current.character; - if ((chr < '0' || chr > '9')) - { - Event.current.character = '\0'; - } - } - else - { - m_GlyphIDLabel = k_placeholderGlyphID; - //m_dstGlyphID = string.Empty; - } - - // Remove Glyph - position.x += btnWidth; - if (GUI.Button(position, "Remove")) - { - GUIUtility.keyboardControl = 0; - - RemoveGlyphFromList(elementIndex); - - isAssetDirty = true; - m_SelectedGlyphRecord = -1; - m_isSearchDirty = true; - break; - } - - if (m_AddGlyphWarning.isEnabled && EditorApplication.timeSinceStartup < m_AddGlyphWarning.expirationTime) - { - EditorGUILayout.HelpBox("The Destination Glyph ID already exists", MessageType.Warning); - } - - } - } - } - - DisplayPageNavigation(ref m_CurrentGlyphPage, arraySize, itemsPerPage); - - EditorGUILayout.Space(); - } - #endregion - - // FONT FEATURE TABLE - #region Font Feature Table - EditorGUIUtility.labelWidth = labelWidth; - EditorGUIUtility.fieldWidth = fieldWidth; - EditorGUI.indentLevel = 0; - rect = EditorGUILayout.GetControlRect(false, 24); - - if (GUI.Button(rect, new GUIContent("Glyph Adjustment Table", "List of glyph adjustment / advanced kerning pairs."), TMP_UIStyleManager.sectionHeader)) - UI_PanelState.fontFeatureTablePanel = !UI_PanelState.fontFeatureTablePanel; - - GUI.Label(rect, (UI_PanelState.fontFeatureTablePanel ? "" : s_UiStateLabel[1]), TMP_UIStyleManager.rightLabel); - - if (UI_PanelState.fontFeatureTablePanel) - { - int arraySize = m_GlyphPairAdjustmentRecords_prop.arraySize; - int itemsPerPage = 20; - - // Display Kerning Pair Management Tools - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - { - // Search Bar implementation - #region DISPLAY SEARCH BAR - EditorGUILayout.BeginHorizontal(); - { - EditorGUIUtility.labelWidth = 150f; - EditorGUI.BeginChangeCheck(); - string searchPattern = EditorGUILayout.TextField("Adjustment Pair Search", m_KerningTableSearchPattern, "SearchTextField"); - if (EditorGUI.EndChangeCheck() || m_isSearchDirty) - { - if (string.IsNullOrEmpty(searchPattern) == false) - { - m_KerningTableSearchPattern = searchPattern; - - // Search Glyph Table for potential matches - SearchKerningTable(m_KerningTableSearchPattern, ref m_KerningTableSearchList); - } - else - m_KerningTableSearchPattern = null; - - m_isSearchDirty = false; - } - - string styleName = string.IsNullOrEmpty(m_KerningTableSearchPattern) ? "SearchCancelButtonEmpty" : "SearchCancelButton"; - if (GUILayout.Button(GUIContent.none, styleName)) - { - GUIUtility.keyboardControl = 0; - m_KerningTableSearchPattern = string.Empty; - } - } - EditorGUILayout.EndHorizontal(); - #endregion - - // Display Page Navigation - if (!string.IsNullOrEmpty(m_KerningTableSearchPattern)) - arraySize = m_KerningTableSearchList.Count; - - DisplayPageNavigation(ref m_CurrentKerningPage, arraySize, itemsPerPage); - } - EditorGUILayout.EndVertical(); - - if (arraySize > 0) - { - // Display each GlyphInfo entry using the GlyphInfo property drawer. - for (int i = itemsPerPage * m_CurrentKerningPage; i < arraySize && i < itemsPerPage * (m_CurrentKerningPage + 1); i++) - { - // Define the start of the selection region of the element. - Rect elementStartRegion = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); - - int elementIndex = i; - if (!string.IsNullOrEmpty(m_KerningTableSearchPattern)) - elementIndex = m_KerningTableSearchList[i]; - - SerializedProperty pairAdjustmentRecordProperty = m_GlyphPairAdjustmentRecords_prop.GetArrayElementAtIndex(elementIndex); - - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - - using (new EditorGUI.DisabledScope(i != m_SelectedAdjustmentRecord)) - { - EditorGUILayout.PropertyField(pairAdjustmentRecordProperty, new GUIContent("Selectable")); - } - - EditorGUILayout.EndVertical(); - - // Define the end of the selection region of the element. - Rect elementEndRegion = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); - - // Check for Item selection - Rect selectionArea = new Rect(elementStartRegion.x, elementStartRegion.y, elementEndRegion.width, elementEndRegion.y - elementStartRegion.y); - if (DoSelectionCheck(selectionArea)) - { - if (m_SelectedAdjustmentRecord == i) - { - m_SelectedAdjustmentRecord = -1; - } - else - { - m_SelectedAdjustmentRecord = i; - GUIUtility.keyboardControl = 0; - } - } - - // Draw Selection Highlight and Kerning Pair Options - if (m_SelectedAdjustmentRecord == i) - { - TMP_EditorUtility.DrawBox(selectionArea, 2f, new Color32(40, 192, 255, 255)); - - // Draw Glyph management options - Rect controlRect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight * 1f); - float optionAreaWidth = controlRect.width; - float btnWidth = optionAreaWidth / 4; - - Rect position = new Rect(controlRect.x + controlRect.width - btnWidth, controlRect.y, btnWidth, controlRect.height); - - // Remove Kerning pair - GUI.enabled = true; - if (GUI.Button(position, "Remove")) - { - GUIUtility.keyboardControl = 0; - - RemoveAdjustmentPairFromList(i); - - isAssetDirty = true; - m_SelectedAdjustmentRecord = -1; - m_isSearchDirty = true; - break; - } - } - } - } - - DisplayPageNavigation(ref m_CurrentKerningPage, arraySize, itemsPerPage); - - GUILayout.Space(5); - - // Add new kerning pair - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - { - EditorGUILayout.PropertyField(m_EmptyGlyphPairAdjustmentRecord_prop); - } - EditorGUILayout.EndVertical(); - - if (GUILayout.Button("Add New Glyph Adjustment Record")) - { - SerializedProperty firstAdjustmentRecordProperty = m_EmptyGlyphPairAdjustmentRecord_prop.FindPropertyRelative("m_FirstAdjustmentRecord"); - SerializedProperty secondAdjustmentRecordProperty = m_EmptyGlyphPairAdjustmentRecord_prop.FindPropertyRelative("m_SecondAdjustmentRecord"); - - uint firstGlyphIndex = (uint)firstAdjustmentRecordProperty.FindPropertyRelative("m_GlyphIndex").intValue; - uint secondGlyphIndex = (uint)secondAdjustmentRecordProperty.FindPropertyRelative("m_GlyphIndex").intValue; - - TMP_GlyphValueRecord firstValueRecord = GetValueRecord(firstAdjustmentRecordProperty.FindPropertyRelative("m_GlyphValueRecord")); - TMP_GlyphValueRecord secondValueRecord = GetValueRecord(secondAdjustmentRecordProperty.FindPropertyRelative("m_GlyphValueRecord")); - - errorCode = -1; - long pairKey = (long)secondGlyphIndex << 32 | firstGlyphIndex; - if (m_FontFeatureTable.m_GlyphPairAdjustmentRecordLookupDictionary.ContainsKey(pairKey) == false) - { - TMP_GlyphPairAdjustmentRecord adjustmentRecord = new TMP_GlyphPairAdjustmentRecord(new TMP_GlyphAdjustmentRecord(firstGlyphIndex, firstValueRecord), new TMP_GlyphAdjustmentRecord(secondGlyphIndex, secondValueRecord)); - m_FontFeatureTable.m_GlyphPairAdjustmentRecords.Add(adjustmentRecord); - m_FontFeatureTable.m_GlyphPairAdjustmentRecordLookupDictionary.Add(pairKey, adjustmentRecord); - errorCode = 0; - } - - // Add glyphs and characters - uint firstCharacter = m_SerializedPropertyHolder.firstCharacter; - if (!m_fontAsset.characterLookupTable.ContainsKey(firstCharacter)) - m_fontAsset.TryAddCharacterInternal(firstCharacter, out TMP_Character character); - - uint secondCharacter = m_SerializedPropertyHolder.secondCharacter; - if (!m_fontAsset.characterLookupTable.ContainsKey(secondCharacter)) - m_fontAsset.TryAddCharacterInternal(secondCharacter, out TMP_Character character); - - // Sort Kerning Pairs & Reload Font Asset if new kerning pair was added. - if (errorCode != -1) - { - m_FontFeatureTable.SortGlyphPairAdjustmentRecords(); - serializedObject.ApplyModifiedProperties(); - isAssetDirty = true; - m_isSearchDirty = true; - } - else - { - timeStamp = System.DateTime.Now.AddSeconds(5); - } - - // Clear Add Kerning Pair Panel - // TODO - } - - if (errorCode == -1) - { - GUILayout.BeginHorizontal(); - GUILayout.FlexibleSpace(); - GUILayout.Label("Kerning Pair already exists!", TMP_UIStyleManager.label); - GUILayout.FlexibleSpace(); - GUILayout.EndHorizontal(); - - if (System.DateTime.Now > timeStamp) - errorCode = 0; - } - } - #endregion - - if (serializedObject.ApplyModifiedProperties() || evt_cmd == k_UndoRedo || isAssetDirty) - { - // Delay callback until user has decided to Apply or Revert the changes. - if (m_DisplayDestructiveChangeWarning == false) - TMPro_EventManager.ON_FONT_PROPERTY_CHANGED(true, m_fontAsset); - - if (m_fontAsset.m_IsFontAssetLookupTablesDirty || evt_cmd == k_UndoRedo) - m_fontAsset.ReadFontAssetDefinition(); - - isAssetDirty = false; - EditorUtility.SetDirty(target); - } - - - // Clear selection if mouse event was not consumed. - GUI.enabled = true; - if (currentEvent.type == EventType.MouseDown && currentEvent.button == 0) - m_SelectedAdjustmentRecord = -1; - - } - - void CleanFallbackFontAssetTable() - { - SerializedProperty m_FallbackFontAsseTable = serializedObject.FindProperty("m_FallbackFontAssetTable"); - - bool isListDirty = false; - - int elementCount = m_FallbackFontAsseTable.arraySize; - - for (int i = 0; i < elementCount; i++) - { - SerializedProperty element = m_FallbackFontAsseTable.GetArrayElementAtIndex(i); - if (element.objectReferenceValue == null) - { - m_FallbackFontAsseTable.DeleteArrayElementAtIndex(i); - elementCount -= 1; - i -= 1; - - isListDirty = true; - } - } - - if (isListDirty) - { - serializedObject.ApplyModifiedProperties(); - serializedObject.Update(); - } - } - - void SavedAtlasGenerationSettings() - { - m_AtlasSettings.glyphRenderMode = (GlyphRenderMode)m_AtlasRenderMode_prop.intValue; - m_AtlasSettings.pointSize = m_SamplingPointSize_prop.intValue; - m_AtlasSettings.padding = m_AtlasPadding_prop.intValue; - m_AtlasSettings.atlasWidth = m_AtlasWidth_prop.intValue; - m_AtlasSettings.atlasHeight = m_AtlasHeight_prop.intValue; - } - - void RestoreAtlasGenerationSettings() - { - m_AtlasRenderMode_prop.intValue = (int)m_AtlasSettings.glyphRenderMode; - m_SamplingPointSize_prop.intValue = m_AtlasSettings.pointSize; - m_AtlasPadding_prop.intValue = m_AtlasSettings.padding; - m_AtlasWidth_prop.intValue = m_AtlasSettings.atlasWidth; - m_AtlasHeight_prop.intValue = m_AtlasSettings.atlasHeight; - } - - - void UpdateFontAssetCreationSettings() - { - m_fontAsset.m_CreationSettings.pointSize = m_SamplingPointSize_prop.intValue; - m_fontAsset.m_CreationSettings.renderMode = m_AtlasRenderMode_prop.intValue; - m_fontAsset.m_CreationSettings.padding = m_AtlasPadding_prop.intValue; - m_fontAsset.m_CreationSettings.atlasWidth = m_AtlasWidth_prop.intValue; - m_fontAsset.m_CreationSettings.atlasHeight = m_AtlasHeight_prop.intValue; - } - - - void UpdateCharacterData(SerializedProperty property, int index) - { - TMP_Character character = m_fontAsset.characterTable[index]; - - character.unicode = (uint)property.FindPropertyRelative("m_Unicode").intValue; - character.scale = property.FindPropertyRelative("m_Scale").floatValue; - - SerializedProperty glyphProperty = property.FindPropertyRelative("m_Glyph"); - character.glyph.index = (uint)glyphProperty.FindPropertyRelative("m_Index").intValue; - - SerializedProperty glyphRectProperty = glyphProperty.FindPropertyRelative("m_GlyphRect"); - character.glyph.glyphRect = new GlyphRect(glyphRectProperty.FindPropertyRelative("m_X").intValue, glyphRectProperty.FindPropertyRelative("m_Y").intValue, glyphRectProperty.FindPropertyRelative("m_Width").intValue, glyphRectProperty.FindPropertyRelative("m_Height").intValue); - - SerializedProperty glyphMetricsProperty = glyphProperty.FindPropertyRelative("m_Metrics"); - character.glyph.metrics = new GlyphMetrics(glyphMetricsProperty.FindPropertyRelative("m_Width").floatValue, glyphMetricsProperty.FindPropertyRelative("m_Height").floatValue, glyphMetricsProperty.FindPropertyRelative("m_HorizontalBearingX").floatValue, glyphMetricsProperty.FindPropertyRelative("m_HorizontalBearingY").floatValue, glyphMetricsProperty.FindPropertyRelative("m_HorizontalAdvance").floatValue); - - character.glyph.scale = glyphProperty.FindPropertyRelative("m_Scale").floatValue; - - character.glyph.atlasIndex = glyphProperty.FindPropertyRelative("m_AtlasIndex").intValue; - } - - - void UpdateGlyphData(SerializedProperty property, int index) - { - Glyph glyph = m_fontAsset.glyphTable[index]; - - glyph.index = (uint)property.FindPropertyRelative("m_Index").intValue; - - SerializedProperty glyphRect = property.FindPropertyRelative("m_GlyphRect"); - glyph.glyphRect = new GlyphRect(glyphRect.FindPropertyRelative("m_X").intValue, glyphRect.FindPropertyRelative("m_Y").intValue, glyphRect.FindPropertyRelative("m_Width").intValue, glyphRect.FindPropertyRelative("m_Height").intValue); - - SerializedProperty glyphMetrics = property.FindPropertyRelative("m_Metrics"); - glyph.metrics = new GlyphMetrics(glyphMetrics.FindPropertyRelative("m_Width").floatValue, glyphMetrics.FindPropertyRelative("m_Height").floatValue, glyphMetrics.FindPropertyRelative("m_HorizontalBearingX").floatValue, glyphMetrics.FindPropertyRelative("m_HorizontalBearingY").floatValue, glyphMetrics.FindPropertyRelative("m_HorizontalAdvance").floatValue); - - glyph.scale = property.FindPropertyRelative("m_Scale").floatValue; - } - - - void DisplayPageNavigation(ref int currentPage, int arraySize, int itemsPerPage) - { - Rect pagePos = EditorGUILayout.GetControlRect(false, 20); - pagePos.width /= 3; - - int shiftMultiplier = Event.current.shift ? 10 : 1; // Page + Shift goes 10 page forward - - // Previous Page - GUI.enabled = currentPage > 0; - - if (GUI.Button(pagePos, "Previous Page")) - currentPage -= 1 * shiftMultiplier; - - - // Page Counter - GUI.enabled = true; - pagePos.x += pagePos.width; - int totalPages = (int)(arraySize / (float)itemsPerPage + 0.999f); - GUI.Label(pagePos, "Page " + (currentPage + 1) + " / " + totalPages, TMP_UIStyleManager.centeredLabel); - - // Next Page - pagePos.x += pagePos.width; - GUI.enabled = itemsPerPage * (currentPage + 1) < arraySize; - - if (GUI.Button(pagePos, "Next Page")) - currentPage += 1 * shiftMultiplier; - - // Clamp page range - currentPage = Mathf.Clamp(currentPage, 0, arraySize / itemsPerPage); - - GUI.enabled = true; - } - - - /// - /// - /// - /// - /// - bool AddNewGlyph(int srcIndex, int dstGlyphID) - { - // Make sure Destination Glyph ID doesn't already contain a Glyph - if (m_fontAsset.glyphLookupTable.ContainsKey((uint)dstGlyphID)) - return false; - - // Add new element to glyph list. - m_GlyphTable_prop.arraySize += 1; - - // Get a reference to the source glyph. - SerializedProperty sourceGlyph = m_GlyphTable_prop.GetArrayElementAtIndex(srcIndex); - - int dstIndex = m_GlyphTable_prop.arraySize - 1; - - // Get a reference to the target / destination glyph. - SerializedProperty targetGlyph = m_GlyphTable_prop.GetArrayElementAtIndex(dstIndex); - - CopyGlyphSerializedProperty(sourceGlyph, ref targetGlyph); - - // Update the ID of the glyph - targetGlyph.FindPropertyRelative("m_Index").intValue = dstGlyphID; - - serializedObject.ApplyModifiedProperties(); - - m_fontAsset.SortGlyphTable(); - - m_fontAsset.ReadFontAssetDefinition(); - - return true; - } - - /// - /// - /// - /// - void RemoveGlyphFromList(int index) - { - if (index > m_GlyphTable_prop.arraySize) - return; - - int targetGlyphIndex = m_GlyphTable_prop.GetArrayElementAtIndex(index).FindPropertyRelative("m_Index").intValue; - - m_GlyphTable_prop.DeleteArrayElementAtIndex(index); - - // Remove all characters referencing this glyph. - for (int i = 0; i < m_CharacterTable_prop.arraySize; i++) - { - int glyphIndex = m_CharacterTable_prop.GetArrayElementAtIndex(i).FindPropertyRelative("m_GlyphIndex").intValue; - - if (glyphIndex == targetGlyphIndex) - { - // Remove character - m_CharacterTable_prop.DeleteArrayElementAtIndex(i); - } - } - - serializedObject.ApplyModifiedProperties(); - - m_fontAsset.ReadFontAssetDefinition(); - } - - bool AddNewCharacter(int srcIndex, int dstGlyphID) - { - // Make sure Destination Glyph ID doesn't already contain a Glyph - if (m_fontAsset.characterLookupTable.ContainsKey((uint)dstGlyphID)) - return false; - - // Add new element to glyph list. - m_CharacterTable_prop.arraySize += 1; - - // Get a reference to the source glyph. - SerializedProperty sourceCharacter = m_CharacterTable_prop.GetArrayElementAtIndex(srcIndex); - - int dstIndex = m_CharacterTable_prop.arraySize - 1; - - // Get a reference to the target / destination glyph. - SerializedProperty targetCharacter = m_CharacterTable_prop.GetArrayElementAtIndex(dstIndex); - - CopyCharacterSerializedProperty(sourceCharacter, ref targetCharacter); - - // Update the ID of the glyph - targetCharacter.FindPropertyRelative("m_Unicode").intValue = dstGlyphID; - - serializedObject.ApplyModifiedProperties(); - - m_fontAsset.SortCharacterTable(); - - m_fontAsset.ReadFontAssetDefinition(); - - return true; - } - - void RemoveCharacterFromList(int index) - { - if (index > m_CharacterTable_prop.arraySize) - return; - - m_CharacterTable_prop.DeleteArrayElementAtIndex(index); - - serializedObject.ApplyModifiedProperties(); - - m_fontAsset.ReadFontAssetDefinition(); - } - - - // Check if any of the Style elements were clicked on. - private bool DoSelectionCheck(Rect selectionArea) - { - Event currentEvent = Event.current; - - switch (currentEvent.type) - { - case EventType.MouseDown: - if (selectionArea.Contains(currentEvent.mousePosition) && currentEvent.button == 0) - { - currentEvent.Use(); - return true; - } - - break; - } - - return false; - } - - TMP_GlyphValueRecord GetValueRecord(SerializedProperty property) - { - TMP_GlyphValueRecord record = new TMP_GlyphValueRecord(); - record.xPlacement = property.FindPropertyRelative("m_XPlacement").floatValue; - record.yPlacement = property.FindPropertyRelative("m_YPlacement").floatValue; - record.xAdvance = property.FindPropertyRelative("m_XAdvance").floatValue; - record.yAdvance = property.FindPropertyRelative("m_YAdvance").floatValue; - - return record; - } - - void RemoveAdjustmentPairFromList(int index) - { - if (index > m_GlyphPairAdjustmentRecords_prop.arraySize) - return; - - m_GlyphPairAdjustmentRecords_prop.DeleteArrayElementAtIndex(index); - - serializedObject.ApplyModifiedProperties(); - - m_fontAsset.ReadFontAssetDefinition(); - } - - /// - /// - /// - /// - /// - void CopyGlyphSerializedProperty(SerializedProperty srcGlyph, ref SerializedProperty dstGlyph) - { - // TODO : Should make a generic function which copies each of the properties. - dstGlyph.FindPropertyRelative("m_Index").intValue = srcGlyph.FindPropertyRelative("m_Index").intValue; - - // Glyph -> GlyphMetrics - SerializedProperty srcGlyphMetrics = srcGlyph.FindPropertyRelative("m_Metrics"); - SerializedProperty dstGlyphMetrics = dstGlyph.FindPropertyRelative("m_Metrics"); - - dstGlyphMetrics.FindPropertyRelative("m_Width").floatValue = srcGlyphMetrics.FindPropertyRelative("m_Width").floatValue; - dstGlyphMetrics.FindPropertyRelative("m_Height").floatValue = srcGlyphMetrics.FindPropertyRelative("m_Height").floatValue; - dstGlyphMetrics.FindPropertyRelative("m_HorizontalBearingX").floatValue = srcGlyphMetrics.FindPropertyRelative("m_HorizontalBearingX").floatValue; - dstGlyphMetrics.FindPropertyRelative("m_HorizontalBearingY").floatValue = srcGlyphMetrics.FindPropertyRelative("m_HorizontalBearingY").floatValue; - dstGlyphMetrics.FindPropertyRelative("m_HorizontalAdvance").floatValue = srcGlyphMetrics.FindPropertyRelative("m_HorizontalAdvance").floatValue; - - // Glyph -> GlyphRect - SerializedProperty srcGlyphRect = srcGlyph.FindPropertyRelative("m_GlyphRect"); - SerializedProperty dstGlyphRect = dstGlyph.FindPropertyRelative("m_GlyphRect"); - - dstGlyphRect.FindPropertyRelative("m_X").intValue = srcGlyphRect.FindPropertyRelative("m_X").intValue; - dstGlyphRect.FindPropertyRelative("m_Y").intValue = srcGlyphRect.FindPropertyRelative("m_Y").intValue; - dstGlyphRect.FindPropertyRelative("m_Width").intValue = srcGlyphRect.FindPropertyRelative("m_Width").intValue; - dstGlyphRect.FindPropertyRelative("m_Height").intValue = srcGlyphRect.FindPropertyRelative("m_Height").intValue; - - dstGlyph.FindPropertyRelative("m_Scale").floatValue = srcGlyph.FindPropertyRelative("m_Scale").floatValue; - dstGlyph.FindPropertyRelative("m_AtlasIndex").intValue = srcGlyph.FindPropertyRelative("m_AtlasIndex").intValue; - } - - - void CopyCharacterSerializedProperty(SerializedProperty source, ref SerializedProperty target) - { - // TODO : Should make a generic function which copies each of the properties. - int unicode = source.FindPropertyRelative("m_Unicode").intValue; - target.FindPropertyRelative("m_Unicode").intValue = unicode; - - int srcGlyphIndex = source.FindPropertyRelative("m_GlyphIndex").intValue; - target.FindPropertyRelative("m_GlyphIndex").intValue = srcGlyphIndex; - - target.FindPropertyRelative("m_Scale").floatValue = source.FindPropertyRelative("m_Scale").floatValue; - } - - - /// - /// - /// - /// - /// - void SearchGlyphTable (string searchPattern, ref List searchResults) - { - if (searchResults == null) searchResults = new List(); - - searchResults.Clear(); - - int arraySize = m_GlyphTable_prop.arraySize; - - for (int i = 0; i < arraySize; i++) - { - SerializedProperty sourceGlyph = m_GlyphTable_prop.GetArrayElementAtIndex(i); - - int id = sourceGlyph.FindPropertyRelative("m_Index").intValue; - - // Check for potential match against a character. - //if (searchPattern.Length == 1 && id == searchPattern[0]) - // searchResults.Add(i); - - // Check for potential match against decimal id - if (id.ToString().Contains(searchPattern)) - searchResults.Add(i); - - //if (id.ToString("x").Contains(searchPattern)) - // searchResults.Add(i); - - //if (id.ToString("X").Contains(searchPattern)) - // searchResults.Add(i); - } - } - - - void SearchCharacterTable(string searchPattern, ref List searchResults) - { - if (searchResults == null) searchResults = new List(); - - searchResults.Clear(); - - int arraySize = m_CharacterTable_prop.arraySize; - - for (int i = 0; i < arraySize; i++) - { - SerializedProperty sourceCharacter = m_CharacterTable_prop.GetArrayElementAtIndex(i); - - int id = sourceCharacter.FindPropertyRelative("m_Unicode").intValue; - - // Check for potential match against a character. - if (searchPattern.Length == 1 && id == searchPattern[0]) - searchResults.Add(i); - else if (id.ToString("x").Contains(searchPattern)) - searchResults.Add(i); - else if (id.ToString("X").Contains(searchPattern)) - searchResults.Add(i); - - // Check for potential match against decimal id - //if (id.ToString().Contains(searchPattern)) - // searchResults.Add(i); - } - } - - - void SearchKerningTable(string searchPattern, ref List searchResults) - { - if (searchResults == null) searchResults = new List(); - - searchResults.Clear(); - - // Lookup glyph index of potential characters contained in the search pattern. - uint firstGlyphIndex = 0; - if (searchPattern.Length > 0 && m_fontAsset.characterLookupTable.TryGetValue(searchPattern[0], out TMP_Character firstCharacterSearch)) - firstGlyphIndex = firstCharacterSearch.glyphIndex; - - uint secondGlyphIndex = 0; - if (searchPattern.Length > 1 && m_fontAsset.characterLookupTable.TryGetValue(searchPattern[1], out TMP_Character secondCharacterSearch)) - secondGlyphIndex = secondCharacterSearch.glyphIndex; - - int arraySize = m_GlyphPairAdjustmentRecords_prop.arraySize; - - for (int i = 0; i < arraySize; i++) - { - SerializedProperty record = m_GlyphPairAdjustmentRecords_prop.GetArrayElementAtIndex(i); - - SerializedProperty firstAdjustmentRecord = record.FindPropertyRelative("m_FirstAdjustmentRecord"); - SerializedProperty secondAdjustmentRecord = record.FindPropertyRelative("m_SecondAdjustmentRecord"); - - int firstGlyph = firstAdjustmentRecord.FindPropertyRelative("m_GlyphIndex").intValue; - int secondGlyph = secondAdjustmentRecord.FindPropertyRelative("m_GlyphIndex").intValue; - - if (firstGlyphIndex == firstGlyph && secondGlyphIndex == secondGlyph) - searchResults.Add(i); - else if (searchPattern.Length == 1 && (firstGlyphIndex == firstGlyph || firstGlyphIndex == secondGlyph)) - searchResults.Add(i); - else if (firstGlyph.ToString().Contains(searchPattern)) - searchResults.Add(i); - else if (secondGlyph.ToString().Contains(searchPattern)) - searchResults.Add(i); - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_FontAssetEditor.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_FontAssetEditor.cs.meta deleted file mode 100644 index 9b26bae5..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_FontAssetEditor.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 96b44f7d98314b139324a8a87eb66067 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_FontAsset_CreationMenu.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_FontAsset_CreationMenu.cs deleted file mode 100644 index 1e432331..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_FontAsset_CreationMenu.cs +++ /dev/null @@ -1,190 +0,0 @@ -using UnityEngine; -using UnityEditor; -using System.Linq; -using System.IO; -using System.Collections; -using System.Collections.Generic; -using UnityEngine.TextCore; -using UnityEngine.TextCore.LowLevel; -using TMPro; - - -namespace TMPro -{ - public static class TMP_FontAsset_CreationMenu - { - /* - [MenuItem("Assets/Create/TextMeshPro/Font Asset Fallback", false, 105)] - public static void CreateFallbackFontAsset() - { - Object target = Selection.activeObject; - - // Make sure the selection is a font file - if (target == null || target.GetType() != typeof(TMP_FontAsset)) - { - Debug.LogWarning("A Font file must first be selected in order to create a Font Asset."); - return; - } - - TMP_FontAsset sourceFontAsset = (TMP_FontAsset)target; - - string sourceFontFilePath = AssetDatabase.GetAssetPath(target); - - string folderPath = Path.GetDirectoryName(sourceFontFilePath); - string assetName = Path.GetFileNameWithoutExtension(sourceFontFilePath); - - string newAssetFilePathWithName = AssetDatabase.GenerateUniqueAssetPath(folderPath + "/" + assetName + " - Fallback.asset"); - - //// Create new TM Font Asset. - TMP_FontAsset fontAsset = ScriptableObject.CreateInstance(); - AssetDatabase.CreateAsset(fontAsset, newAssetFilePathWithName); - - fontAsset.version = "1.1.0"; - - fontAsset.faceInfo = sourceFontAsset.faceInfo; - - fontAsset.m_SourceFontFileGUID = sourceFontAsset.m_SourceFontFileGUID; - fontAsset.m_SourceFontFile_EditorRef = sourceFontAsset.m_SourceFontFile_EditorRef; - fontAsset.atlasPopulationMode = TMP_FontAsset.AtlasPopulationMode.Dynamic; - - int atlasWidth = fontAsset.atlasWidth = sourceFontAsset.atlasWidth; - int atlasHeight = fontAsset.atlasHeight = sourceFontAsset.atlasHeight; - int atlasPadding = fontAsset.atlasPadding = sourceFontAsset.atlasPadding; - fontAsset.atlasRenderMode = sourceFontAsset.atlasRenderMode; - - // Initialize array for the font atlas textures. - fontAsset.atlasTextures = new Texture2D[1]; - - // Create and add font atlas texture - Texture2D texture = new Texture2D(atlasWidth, atlasHeight, TextureFormat.Alpha8, false); - Color32[] colors = new Color32[atlasWidth * atlasHeight]; - texture.SetPixels32(colors); - - texture.name = assetName + " Atlas"; - fontAsset.atlasTextures[0] = texture; - AssetDatabase.AddObjectToAsset(texture, fontAsset); - - // Add free rectangle of the size of the texture. - int packingModifier = ((GlyphRasterModes)fontAsset.atlasRenderMode & GlyphRasterModes.RASTER_MODE_BITMAP) == GlyphRasterModes.RASTER_MODE_BITMAP ? 0 : 1; - fontAsset.m_FreeGlyphRects = new List() { new GlyphRect(0, 0, atlasWidth - packingModifier, atlasHeight - packingModifier) }; - fontAsset.m_UsedGlyphRects = new List(); - - // Create new Material and Add it as Sub-Asset - Material tmp_material = new Material(sourceFontAsset.material); - - tmp_material.name = texture.name + " Material"; - tmp_material.SetTexture(ShaderUtilities.ID_MainTex, texture); - tmp_material.SetFloat(ShaderUtilities.ID_TextureWidth, atlasWidth); - tmp_material.SetFloat(ShaderUtilities.ID_TextureHeight, atlasHeight); - - tmp_material.SetFloat(ShaderUtilities.ID_GradientScale, atlasPadding + packingModifier); - - tmp_material.SetFloat(ShaderUtilities.ID_WeightNormal, fontAsset.normalStyle); - tmp_material.SetFloat(ShaderUtilities.ID_WeightBold, fontAsset.boldStyle); - - fontAsset.material = tmp_material; - - AssetDatabase.AddObjectToAsset(tmp_material, fontAsset); - - // Add Font Asset Creation Settings - // TODO - - // Not sure if this is still necessary in newer versions of Unity. - EditorUtility.SetDirty(fontAsset); - - AssetDatabase.SaveAssets(); - } - */ - - //[MenuItem("Assets/Create/TextMeshPro/Font Asset #%F12", true)] - //public static bool CreateFontAssetMenuValidation() - //{ - // return false; - //} - - [MenuItem("Assets/Create/TextMeshPro/Font Asset #%F12", false, 100)] - public static void CreateFontAsset() - { - Object target = Selection.activeObject; - - // Make sure the selection is a font file - if (target == null || target.GetType() != typeof(Font)) - { - Debug.LogWarning("A Font file must first be selected in order to create a Font Asset."); - return; - } - - Font sourceFont = (Font)target; - - string sourceFontFilePath = AssetDatabase.GetAssetPath(target); - - string folderPath = Path.GetDirectoryName(sourceFontFilePath); - string assetName = Path.GetFileNameWithoutExtension(sourceFontFilePath); - - string newAssetFilePathWithName = AssetDatabase.GenerateUniqueAssetPath(folderPath + "/" + assetName + " SDF.asset"); - - //// Create new TM Font Asset. - TMP_FontAsset fontAsset = ScriptableObject.CreateInstance(); - AssetDatabase.CreateAsset(fontAsset, newAssetFilePathWithName); - - fontAsset.version = "1.1.0"; - - // Set face information - FontEngine.InitializeFontEngine(); - FontEngine.LoadFontFace(sourceFont, 90); - fontAsset.faceInfo = FontEngine.GetFaceInfo(); - - // Set font reference and GUID - fontAsset.m_SourceFontFileGUID = AssetDatabase.AssetPathToGUID(sourceFontFilePath); - fontAsset.m_SourceFontFile_EditorRef = sourceFont; - fontAsset.atlasPopulationMode = AtlasPopulationMode.Dynamic; - - // Default atlas resolution is 1024 x 1024. - int atlasWidth = fontAsset.atlasWidth = 1024; - int atlasHeight = fontAsset.atlasHeight = 1024; - int atlasPadding = fontAsset.atlasPadding = 9; - fontAsset.atlasRenderMode = GlyphRenderMode.SDFAA; - - // Initialize array for the font atlas textures. - fontAsset.atlasTextures = new Texture2D[1]; - - // Create atlas texture of size zero. - Texture2D texture = new Texture2D(0, 0, TextureFormat.Alpha8, false); - - texture.name = assetName + " Atlas"; - fontAsset.atlasTextures[0] = texture; - AssetDatabase.AddObjectToAsset(texture, fontAsset); - - // Add free rectangle of the size of the texture. - int packingModifier = ((GlyphRasterModes)fontAsset.atlasRenderMode & GlyphRasterModes.RASTER_MODE_BITMAP) == GlyphRasterModes.RASTER_MODE_BITMAP ? 0 : 1; - fontAsset.freeGlyphRects = new List() { new GlyphRect(0, 0, atlasWidth - packingModifier, atlasHeight - packingModifier) }; - fontAsset.usedGlyphRects = new List(); - - // Create new Material and Add it as Sub-Asset - Shader default_Shader = Shader.Find("TextMeshPro/Distance Field"); - Material tmp_material = new Material(default_Shader); - - tmp_material.name = texture.name + " Material"; - tmp_material.SetTexture(ShaderUtilities.ID_MainTex, texture); - tmp_material.SetFloat(ShaderUtilities.ID_TextureWidth, atlasWidth); - tmp_material.SetFloat(ShaderUtilities.ID_TextureHeight, atlasHeight); - - tmp_material.SetFloat(ShaderUtilities.ID_GradientScale, atlasPadding + packingModifier); - - tmp_material.SetFloat(ShaderUtilities.ID_WeightNormal, fontAsset.normalStyle); - tmp_material.SetFloat(ShaderUtilities.ID_WeightBold, fontAsset.boldStyle); - - fontAsset.material = tmp_material; - - AssetDatabase.AddObjectToAsset(tmp_material, fontAsset); - - // Add Font Asset Creation Settings - fontAsset.creationSettings = new FontAssetCreationSettings(fontAsset.m_SourceFontFileGUID, fontAsset.faceInfo.pointSize, 0, atlasPadding, 0, 1024, 1024, 7, string.Empty, (int)GlyphRenderMode.SDFAA); - - // Not sure if this is still necessary in newer versions of Unity. - EditorUtility.SetDirty(fontAsset); - - AssetDatabase.SaveAssets(); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_FontAsset_CreationMenu.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_FontAsset_CreationMenu.cs.meta deleted file mode 100644 index 57a3fcea..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_FontAsset_CreationMenu.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 7496af95dfe67cf429ac65edaaf99106 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_GlyphPairAdjustmentRecordPropertyDrawer.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_GlyphPairAdjustmentRecordPropertyDrawer.cs deleted file mode 100644 index 77268baa..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_GlyphPairAdjustmentRecordPropertyDrawer.cs +++ /dev/null @@ -1,382 +0,0 @@ -using UnityEngine; -using UnityEngine.TextCore; -using UnityEngine.TextCore.LowLevel; -using UnityEditor; -using System.Collections; -using System.Text.RegularExpressions; - - -namespace TMPro.EditorUtilities -{ - - [CustomPropertyDrawer(typeof(TMP_GlyphPairAdjustmentRecord))] - public class TMP_GlyphPairAdjustmentRecordPropertyDrawer : PropertyDrawer - { - private bool isEditingEnabled = false; - private bool isSelectable = false; - - private string m_FirstCharacter = string.Empty; - private string m_SecondCharacter = string.Empty; - private string m_PreviousInput; - - static GUIContent s_CharacterTextFieldLabel = new GUIContent("Char:", "Enter the character or its UTF16 or UTF32 Unicode character escape sequence. For UTF16 use \"\\uFF00\" and for UTF32 use \"\\UFF00FF00\" representation."); - - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) - { - SerializedProperty prop_FirstAdjustmentRecord = property.FindPropertyRelative("m_FirstAdjustmentRecord"); - SerializedProperty prop_SecondAdjustmentRecord = property.FindPropertyRelative("m_SecondAdjustmentRecord"); - - SerializedProperty prop_FirstGlyphIndex = prop_FirstAdjustmentRecord.FindPropertyRelative("m_GlyphIndex"); - SerializedProperty prop_FirstGlyphValueRecord = prop_FirstAdjustmentRecord.FindPropertyRelative("m_GlyphValueRecord"); - - SerializedProperty prop_SecondGlyphIndex = prop_SecondAdjustmentRecord.FindPropertyRelative("m_GlyphIndex"); - SerializedProperty prop_SecondGlyphValueRecord = prop_SecondAdjustmentRecord.FindPropertyRelative("m_GlyphValueRecord"); - - SerializedProperty prop_FontFeatureLookupFlags = property.FindPropertyRelative("m_FeatureLookupFlags"); - - position.yMin += 2; - - float width = position.width / 2; - float padding = 5.0f; - - Rect rect; - - isEditingEnabled = GUI.enabled; - isSelectable = label.text == "Selectable" ? true : false; - - if (isSelectable) - GUILayoutUtility.GetRect(position.width, 75); - else - GUILayoutUtility.GetRect(position.width, 55); - - GUIStyle style = new GUIStyle(EditorStyles.label); - style.richText = true; - - // First Glyph - GUI.enabled = isEditingEnabled; - if (isSelectable) - { - rect = new Rect(position.x + 70, position.y, position.width, 49); - - float labelWidth = GUI.skin.label.CalcSize(new GUIContent("ID: " + prop_FirstGlyphIndex.intValue)).x; - EditorGUI.LabelField(new Rect(position.x + (64 - labelWidth) / 2, position.y + 60, 64f, 18f), new GUIContent("ID: " + prop_FirstGlyphIndex.intValue + ""), style); - - GUI.enabled = isEditingEnabled; - EditorGUIUtility.labelWidth = 30f; - - rect = new Rect(position.x + 70, position.y + 10, (width - 70) - padding, 18); - EditorGUI.PropertyField(rect, prop_FirstGlyphValueRecord.FindPropertyRelative("m_XPlacement"), new GUIContent("OX:")); - - rect.y += 20; - EditorGUI.PropertyField(rect, prop_FirstGlyphValueRecord.FindPropertyRelative("m_YPlacement"), new GUIContent("OY:")); - - rect.y += 20; - EditorGUI.PropertyField(rect, prop_FirstGlyphValueRecord.FindPropertyRelative("m_XAdvance"), new GUIContent("AX:")); - - //rect.y += 20; - //EditorGUI.PropertyField(rect, prop_FirstGlyphValueRecord.FindPropertyRelative("m_YAdvance"), new GUIContent("AY:")); - - DrawGlyph((uint)prop_FirstGlyphIndex.intValue, new Rect(position.x, position.y, position.width, position.height), property); - } - else - { - rect = new Rect(position.x, position.y, width / 2 * 0.8f - padding, 18); - EditorGUIUtility.labelWidth = 40f; - - // First Character Lookup - GUI.SetNextControlName("FirstCharacterField"); - EditorGUI.BeginChangeCheck(); - string firstCharacter = EditorGUI.TextField(rect, s_CharacterTextFieldLabel, m_FirstCharacter); - - if (GUI.GetNameOfFocusedControl() == "FirstCharacterField") - { - if (ValidateInput(firstCharacter)) - { - //Debug.Log("1st Unicode value: [" + firstCharacter + "]"); - - uint unicode = GetUnicodeCharacter(firstCharacter); - - // Lookup glyph index - TMP_SerializedPropertyHolder propertyHolder = property.serializedObject.targetObject as TMP_SerializedPropertyHolder; - TMP_FontAsset fontAsset = propertyHolder.fontAsset; - if (fontAsset != null) - { - prop_FirstGlyphIndex.intValue = (int)fontAsset.GetGlyphIndex(unicode); - propertyHolder.firstCharacter = unicode; - } - } - } - - if (EditorGUI.EndChangeCheck()) - m_FirstCharacter = firstCharacter; - - // First Glyph Index - rect.x += width / 2 * 0.8f; - - EditorGUIUtility.labelWidth = 25f; - EditorGUI.BeginChangeCheck(); - EditorGUI.PropertyField(rect, prop_FirstGlyphIndex, new GUIContent("ID:")); - if (EditorGUI.EndChangeCheck()) - { - - } - - GUI.enabled = isEditingEnabled; - EditorGUIUtility.labelWidth = 25f; - - rect = new Rect(position.x, position.y + 20, width * 0.5f - padding, 18); - EditorGUI.PropertyField(rect, prop_FirstGlyphValueRecord.FindPropertyRelative("m_XPlacement"), new GUIContent("OX")); - - rect.x += width * 0.5f; - EditorGUI.PropertyField(rect, prop_FirstGlyphValueRecord.FindPropertyRelative("m_YPlacement"), new GUIContent("OY")); - - rect.x = position.x; - rect.y += 20; - EditorGUI.PropertyField(rect, prop_FirstGlyphValueRecord.FindPropertyRelative("m_XAdvance"), new GUIContent("AX")); - - //rect.x += width * 0.5f; - //EditorGUI.PropertyField(rect, prop_FirstGlyphAdjustment.FindPropertyRelative("m_YAdvance"), new GUIContent("AY")); - - } - - - // Second Glyph - GUI.enabled = isEditingEnabled; - if (isSelectable) - { - float labelWidth = GUI.skin.label.CalcSize(new GUIContent("ID: " + prop_SecondGlyphIndex.intValue)).x; - EditorGUI.LabelField(new Rect(position.width / 2 + 20 + (64 - labelWidth) / 2, position.y + 60, 64f, 18f), new GUIContent("ID: " + prop_SecondGlyphIndex.intValue + ""), style); - - GUI.enabled = isEditingEnabled; - EditorGUIUtility.labelWidth = 30f; - - rect = new Rect(position.width / 2 + 20 + 70, position.y + 10, (width - 70) - padding, 18); - EditorGUI.PropertyField(rect, prop_SecondGlyphValueRecord.FindPropertyRelative("m_XPlacement"), new GUIContent("OX:")); - - rect.y += 20; - EditorGUI.PropertyField(rect, prop_SecondGlyphValueRecord.FindPropertyRelative("m_YPlacement"), new GUIContent("OY:")); - - rect.y += 20; - EditorGUI.PropertyField(rect, prop_SecondGlyphValueRecord.FindPropertyRelative("m_XAdvance"), new GUIContent("AX:")); - - //rect.y += 20; - //EditorGUI.PropertyField(rect, prop_SecondGlyphAdjustment.FindPropertyRelative("m_YAdvance"), new GUIContent("AY")); - - DrawGlyph((uint)prop_SecondGlyphIndex.intValue, new Rect(position.width / 2 + 20, position.y, position.width, position.height), property); - } - else - { - rect = new Rect(position.width / 2 + 20, position.y, width / 2 * 0.8f - padding, 18); - EditorGUIUtility.labelWidth = 40f; - - // Second Character Lookup - GUI.SetNextControlName("SecondCharacterField"); - EditorGUI.BeginChangeCheck(); - string secondCharacter = EditorGUI.TextField(rect, s_CharacterTextFieldLabel, m_SecondCharacter); - - if (GUI.GetNameOfFocusedControl() == "SecondCharacterField") - { - if (ValidateInput(secondCharacter)) - { - //Debug.Log("2nd Unicode value: [" + secondCharacter + "]"); - - uint unicode = GetUnicodeCharacter(secondCharacter); - - // Lookup glyph index - TMP_SerializedPropertyHolder propertyHolder = property.serializedObject.targetObject as TMP_SerializedPropertyHolder; - TMP_FontAsset fontAsset = propertyHolder.fontAsset; - if (fontAsset != null) - { - prop_SecondGlyphIndex.intValue = (int)fontAsset.GetGlyphIndex(unicode); - propertyHolder.secondCharacter = unicode; - } - } - } - - if (EditorGUI.EndChangeCheck()) - m_SecondCharacter = secondCharacter; - - // Second Glyph Index - rect.x += width / 2 * 0.8f; - - EditorGUIUtility.labelWidth = 25f; - EditorGUI.BeginChangeCheck(); - EditorGUI.PropertyField(rect, prop_SecondGlyphIndex, new GUIContent("ID:")); - if (EditorGUI.EndChangeCheck()) - { - - } - - GUI.enabled = isEditingEnabled; - EditorGUIUtility.labelWidth = 25f; - - rect = new Rect(position.width / 2 + 20, position.y + 20, width * 0.5f - padding, 18); - EditorGUI.PropertyField(rect, prop_SecondGlyphValueRecord.FindPropertyRelative("m_XPlacement"), new GUIContent("OX")); - - rect.x += width * 0.5f; - EditorGUI.PropertyField(rect, prop_SecondGlyphValueRecord.FindPropertyRelative("m_YPlacement"), new GUIContent("OY")); - - rect.x = position.width / 2 + 20; - rect.y += 20; - EditorGUI.PropertyField(rect, prop_SecondGlyphValueRecord.FindPropertyRelative("m_XAdvance"), new GUIContent("AX")); - - //rect.x += width * 0.5f; - //EditorGUI.PropertyField(rect, prop_SecondGlyphAdjustment.FindPropertyRelative("m_YAdvance"), new GUIContent("AY")); - } - - // Font Feature Lookup Flags - if (isSelectable) - { - EditorGUIUtility.labelWidth = 55f; - - rect.x = position.width - 255; - rect.y += 23; - rect.width = 270; // width - 70 - padding; - - FontFeatureLookupFlags flags = (FontFeatureLookupFlags)prop_FontFeatureLookupFlags.intValue; - - EditorGUI.BeginChangeCheck(); - flags = (FontFeatureLookupFlags)EditorGUI.EnumFlagsField(rect, new GUIContent("Options:"), flags); - if (EditorGUI.EndChangeCheck()) - { - prop_FontFeatureLookupFlags.intValue = (int)flags; - } - } - - } - - bool ValidateInput(string source) - { - int length = string.IsNullOrEmpty(source) ? 0 : source.Length; - - ////Filter out unwanted characters. - Event evt = Event.current; - - char c = evt.character; - - if (c != '\0') - { - switch (length) - { - case 0: - break; - case 1: - if (source != m_PreviousInput) - return true; - - if ((source[0] == '\\' && (c == 'u' || c == 'U')) == false) - evt.character = '\0'; - - break; - case 2: - case 3: - case 4: - case 5: - if ((c < '0' || c > '9') && (c < 'a' || c > 'f') && (c < 'A' || c > 'F')) - evt.character = '\0'; - break; - case 6: - case 7: - case 8: - case 9: - if (source[1] == 'u' || (c < '0' || c > '9') && (c < 'a' || c > 'f') && (c < 'A' || c > 'F')) - evt.character = '\0'; - - // Validate input - if (length == 6 && source[1] == 'u' && source != m_PreviousInput) - return true; - break; - case 10: - if (source != m_PreviousInput) - return true; - - evt.character = '\0'; - break; - } - } - - m_PreviousInput = source; - - return false; - } - - uint GetUnicodeCharacter (string source) - { - uint unicode; - - if (source.Length == 1) - unicode = source[0]; - else if (source.Length == 6) - unicode = (uint)TMP_TextUtilities.StringHexToInt(source.Replace("\\u", "")); - else - unicode = (uint)TMP_TextUtilities.StringHexToInt(source.Replace("\\U", "")); - - return unicode; - } - - void DrawGlyph(uint glyphIndex, Rect position, SerializedProperty property) - { - // Get a reference to the sprite texture - TMP_FontAsset fontAsset = property.serializedObject.targetObject as TMP_FontAsset; - - if (fontAsset == null) - return; - - // Check if glyph currently exists in the atlas texture. - if (!fontAsset.glyphLookupTable.TryGetValue(glyphIndex, out Glyph glyph)) - return; - - // Get reference to atlas texture. - int atlasIndex = fontAsset.m_AtlasTextureIndex; - Texture2D atlasTexture = fontAsset.atlasTextures.Length > atlasIndex ? fontAsset.atlasTextures[atlasIndex] : null; - - if (atlasTexture == null) - return; - - Material mat; - if (((GlyphRasterModes)fontAsset.atlasRenderMode & GlyphRasterModes.RASTER_MODE_BITMAP) == GlyphRasterModes.RASTER_MODE_BITMAP) - { - mat = TMP_FontAssetEditor.internalBitmapMaterial; - - if (mat == null) - return; - - mat.mainTexture = atlasTexture; - } - else - { - mat = TMP_FontAssetEditor.internalSDFMaterial; - - if (mat == null) - return; - - mat.mainTexture = atlasTexture; - mat.SetFloat(ShaderUtilities.ID_GradientScale, fontAsset.atlasPadding + 1); - } - - // Draw glyph from atlas texture. - Rect glyphDrawPosition = new Rect(position.x, position.y + 2, 64, 60); - - GlyphRect glyphRect = glyph.glyphRect; - - float normalizedHeight = fontAsset.faceInfo.ascentLine - fontAsset.faceInfo.descentLine; - float scale = glyphDrawPosition.width / normalizedHeight; - - // Compute the normalized texture coordinates - Rect texCoords = new Rect((float)glyphRect.x / atlasTexture.width, (float)glyphRect.y / atlasTexture.height, (float)glyphRect.width / atlasTexture.width, (float)glyphRect.height / atlasTexture.height); - - if (Event.current.type == EventType.Repaint) - { - glyphDrawPosition.x += (glyphDrawPosition.width - glyphRect.width * scale) / 2; - glyphDrawPosition.y += (glyphDrawPosition.height - glyphRect.height * scale) / 2; - glyphDrawPosition.width = glyphRect.width * scale; - glyphDrawPosition.height = glyphRect.height * scale; - - // Could switch to using the default material of the font asset which would require passing scale to the shader. - Graphics.DrawTexture(glyphDrawPosition, atlasTexture, texCoords, 0, 0, 0, 0, new Color(1f, 1f, 1f), mat); - } - } - - - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_GlyphPairAdjustmentRecordPropertyDrawer.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_GlyphPairAdjustmentRecordPropertyDrawer.cs.meta deleted file mode 100644 index b95203f5..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_GlyphPairAdjustmentRecordPropertyDrawer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d256fa541faf5d4409992c631adb98a1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_GlyphPropertyDrawer.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_GlyphPropertyDrawer.cs deleted file mode 100644 index b92dfd66..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_GlyphPropertyDrawer.cs +++ /dev/null @@ -1,118 +0,0 @@ - using UnityEngine; -using UnityEngine.TextCore; -using UnityEngine.TextCore.LowLevel; -using UnityEditor; -using System.Collections; - - -namespace TMPro.EditorUtilities -{ - - [CustomPropertyDrawer(typeof(Glyph))] - public class TMP_GlyphPropertyDrawer : PropertyDrawer - { - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) - { - SerializedProperty prop_GlyphIndex = property.FindPropertyRelative("m_Index"); - SerializedProperty prop_GlyphMetrics = property.FindPropertyRelative("m_Metrics"); - SerializedProperty prop_GlyphRect = property.FindPropertyRelative("m_GlyphRect"); - SerializedProperty prop_Scale = property.FindPropertyRelative("m_Scale"); - SerializedProperty prop_AtlasIndex = property.FindPropertyRelative("m_AtlasIndex"); - - GUIStyle style = new GUIStyle(EditorStyles.label); - style.richText = true; - - Rect rect = new Rect(position.x + 70, position.y, position.width, 49); - - float labelWidth = GUI.skin.label.CalcSize(new GUIContent("ID: " + prop_GlyphIndex.intValue)).x; - EditorGUI.LabelField(new Rect(position.x + (64 - labelWidth) / 2, position.y + 85, 64f, 18f), new GUIContent("ID: " + prop_GlyphIndex.intValue + ""), style); - //EditorGUIUtility.labelWidth = 22f; - //EditorGUI.DelayedIntField(new Rect(position.x + (64 - labelWidth) / 2, position.y + 89, 58f, 18f), prop_GlyphIndex, new GUIContent("ID:")); - - // We get Rect since a valid position may not be provided by the caller. - EditorGUI.PropertyField(new Rect(rect.x, rect.y, position.width, 49), prop_GlyphRect); - - rect.y += 45; - EditorGUI.PropertyField(rect, prop_GlyphMetrics); - - EditorGUIUtility.labelWidth = 40f; - EditorGUI.PropertyField(new Rect(rect.x, rect.y + 65, 75, 18), prop_Scale, new GUIContent("Scale:")); // new GUIContent("Scale: " + prop_Scale.floatValue + ""), style); - - EditorGUIUtility.labelWidth = 74f; - EditorGUI.PropertyField(new Rect(rect.x + 85, rect.y + 65, 95, 18), prop_AtlasIndex, new GUIContent("Atlas Index:")); // new GUIContent("Atlas Index: " + prop_AtlasIndex.intValue + ""), style); - - DrawGlyph(position, property); - } - - public override float GetPropertyHeight(SerializedProperty property, GUIContent label) - { - return 130f; - } - - void DrawGlyph(Rect position, SerializedProperty property) - { - // Get a reference to the sprite texture - TMP_FontAsset fontAsset = property.serializedObject.targetObject as TMP_FontAsset; - - if (fontAsset == null) - return; - - // Get reference to atlas texture. - int atlasIndex = property.FindPropertyRelative("m_AtlasIndex").intValue; - Texture2D atlasTexture = fontAsset.atlasTextures.Length > atlasIndex ? fontAsset.atlasTextures[atlasIndex] : null; - - if (atlasTexture == null) - return; - - Material mat; - if (((GlyphRasterModes)fontAsset.atlasRenderMode & GlyphRasterModes.RASTER_MODE_BITMAP) == GlyphRasterModes.RASTER_MODE_BITMAP) - { - mat = TMP_FontAssetEditor.internalBitmapMaterial; - - if (mat == null) - return; - - mat.mainTexture = atlasTexture; - mat.SetColor("_Color", Color.white); - } - else - { - mat = TMP_FontAssetEditor.internalSDFMaterial; - - if (mat == null) - return; - - mat.mainTexture = atlasTexture; - mat.SetFloat(ShaderUtilities.ID_GradientScale, fontAsset.atlasPadding + 1); - } - - // Draw glyph from atlas texture. - Rect glyphDrawPosition = new Rect(position.x, position.y + 2, 64, 80); - - SerializedProperty prop_GlyphRect = property.FindPropertyRelative("m_GlyphRect"); - - int glyphOriginX = prop_GlyphRect.FindPropertyRelative("m_X").intValue; - int glyphOriginY = prop_GlyphRect.FindPropertyRelative("m_Y").intValue; - int glyphWidth = prop_GlyphRect.FindPropertyRelative("m_Width").intValue; - int glyphHeight = prop_GlyphRect.FindPropertyRelative("m_Height").intValue; - - float normalizedHeight = fontAsset.faceInfo.ascentLine - fontAsset.faceInfo.descentLine; - float scale = glyphDrawPosition.width / normalizedHeight; - - // Compute the normalized texture coordinates - Rect texCoords = new Rect((float)glyphOriginX / atlasTexture.width, (float)glyphOriginY / atlasTexture.height, (float)glyphWidth / atlasTexture.width, (float)glyphHeight / atlasTexture.height); - - if (Event.current.type == EventType.Repaint) - { - glyphDrawPosition.x += (glyphDrawPosition.width - glyphWidth * scale) / 2; - glyphDrawPosition.y += (glyphDrawPosition.height - glyphHeight * scale) / 2; - glyphDrawPosition.width = glyphWidth * scale; - glyphDrawPosition.height = glyphHeight * scale; - - // Could switch to using the default material of the font asset which would require passing scale to the shader. - Graphics.DrawTexture(glyphDrawPosition, atlasTexture, texCoords, 0, 0, 0, 0, new Color(1f, 1f, 1f), mat); - } - } - - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_GlyphPropertyDrawer.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_GlyphPropertyDrawer.cs.meta deleted file mode 100644 index ce08447f..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_GlyphPropertyDrawer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: c4777500b5da6094e956c3d4f04de4db -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_InputFieldEditor.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_InputFieldEditor.cs deleted file mode 100644 index d50dc585..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_InputFieldEditor.cs +++ /dev/null @@ -1,283 +0,0 @@ -using UnityEngine; -using UnityEngine.UI; -using UnityEditor; -using UnityEditor.UI; -using UnityEditor.AnimatedValues; - - -namespace TMPro.EditorUtilities -{ - [CanEditMultipleObjects] - [CustomEditor(typeof(TMP_InputField), true)] - public class TMP_InputFieldEditor : SelectableEditor - { - private struct m_foldout - { // Track Inspector foldout panel states, globally. - public static bool textInput = true; - public static bool fontSettings = true; - public static bool extraSettings = true; - //public static bool shadowSetting = false; - //public static bool materialEditor = true; - } - - SerializedProperty m_TextViewport; - SerializedProperty m_TextComponent; - SerializedProperty m_Text; - SerializedProperty m_ContentType; - SerializedProperty m_LineType; - SerializedProperty m_LineLimit; - SerializedProperty m_InputType; - SerializedProperty m_CharacterValidation; - SerializedProperty m_InputValidator; - SerializedProperty m_RegexValue; - SerializedProperty m_KeyboardType; - SerializedProperty m_CharacterLimit; - SerializedProperty m_CaretBlinkRate; - SerializedProperty m_CaretWidth; - SerializedProperty m_CaretColor; - SerializedProperty m_CustomCaretColor; - SerializedProperty m_SelectionColor; - SerializedProperty m_HideMobileKeyboard; - SerializedProperty m_HideMobileInput; - SerializedProperty m_Placeholder; - SerializedProperty m_VerticalScrollbar; - SerializedProperty m_ScrollbarScrollSensitivity; - SerializedProperty m_OnValueChanged; - SerializedProperty m_OnEndEdit; - SerializedProperty m_OnSelect; - SerializedProperty m_OnDeselect; - SerializedProperty m_ReadOnly; - SerializedProperty m_RichText; - SerializedProperty m_RichTextEditingAllowed; - SerializedProperty m_ResetOnDeActivation; - SerializedProperty m_RestoreOriginalTextOnEscape; - - SerializedProperty m_OnFocusSelectAll; - SerializedProperty m_GlobalPointSize; - SerializedProperty m_GlobalFontAsset; - - AnimBool m_CustomColor; - - //TMP_InputValidator m_ValidationScript; - - protected override void OnEnable() - { - base.OnEnable(); - - m_TextViewport = serializedObject.FindProperty("m_TextViewport"); - m_TextComponent = serializedObject.FindProperty("m_TextComponent"); - m_Text = serializedObject.FindProperty("m_Text"); - m_ContentType = serializedObject.FindProperty("m_ContentType"); - m_LineType = serializedObject.FindProperty("m_LineType"); - m_LineLimit = serializedObject.FindProperty("m_LineLimit"); - m_InputType = serializedObject.FindProperty("m_InputType"); - m_CharacterValidation = serializedObject.FindProperty("m_CharacterValidation"); - m_InputValidator = serializedObject.FindProperty("m_InputValidator"); - m_RegexValue = serializedObject.FindProperty("m_RegexValue"); - m_KeyboardType = serializedObject.FindProperty("m_KeyboardType"); - m_CharacterLimit = serializedObject.FindProperty("m_CharacterLimit"); - m_CaretBlinkRate = serializedObject.FindProperty("m_CaretBlinkRate"); - m_CaretWidth = serializedObject.FindProperty("m_CaretWidth"); - m_CaretColor = serializedObject.FindProperty("m_CaretColor"); - m_CustomCaretColor = serializedObject.FindProperty("m_CustomCaretColor"); - m_SelectionColor = serializedObject.FindProperty("m_SelectionColor"); - - m_HideMobileKeyboard = serializedObject.FindProperty("m_HideSoftKeyboard"); - m_HideMobileInput = serializedObject.FindProperty("m_HideMobileInput"); - - m_Placeholder = serializedObject.FindProperty("m_Placeholder"); - m_VerticalScrollbar = serializedObject.FindProperty("m_VerticalScrollbar"); - m_ScrollbarScrollSensitivity = serializedObject.FindProperty("m_ScrollSensitivity"); - - m_OnValueChanged = serializedObject.FindProperty("m_OnValueChanged"); - m_OnEndEdit = serializedObject.FindProperty("m_OnEndEdit"); - m_OnSelect = serializedObject.FindProperty("m_OnSelect"); - m_OnDeselect = serializedObject.FindProperty("m_OnDeselect"); - m_ReadOnly = serializedObject.FindProperty("m_ReadOnly"); - m_RichText = serializedObject.FindProperty("m_RichText"); - m_RichTextEditingAllowed = serializedObject.FindProperty("m_isRichTextEditingAllowed"); - m_ResetOnDeActivation = serializedObject.FindProperty("m_ResetOnDeActivation"); - m_RestoreOriginalTextOnEscape = serializedObject.FindProperty("m_RestoreOriginalTextOnEscape"); - - m_OnFocusSelectAll = serializedObject.FindProperty("m_OnFocusSelectAll"); - m_GlobalPointSize = serializedObject.FindProperty("m_GlobalPointSize"); - m_GlobalFontAsset = serializedObject.FindProperty("m_GlobalFontAsset"); - - m_CustomColor = new AnimBool(m_CustomCaretColor.boolValue); - m_CustomColor.valueChanged.AddListener(Repaint); - } - - protected override void OnDisable() - { - base.OnDisable(); - m_CustomColor.valueChanged.RemoveListener(Repaint); - } - - public override void OnInspectorGUI() - { - serializedObject.Update(); - - base.OnInspectorGUI(); - - EditorGUILayout.Space(); - - EditorGUILayout.PropertyField(m_TextViewport); - - EditorGUILayout.PropertyField(m_TextComponent); - - TextMeshProUGUI text = null; - if (m_TextComponent != null && m_TextComponent.objectReferenceValue != null) - { - text = m_TextComponent.objectReferenceValue as TextMeshProUGUI; - //if (text.supportRichText) - //{ - // EditorGUILayout.HelpBox("Using Rich Text with input is unsupported.", MessageType.Warning); - //} - } - - EditorGUI.BeginDisabledGroup(m_TextComponent == null || m_TextComponent.objectReferenceValue == null); - - // TEXT INPUT BOX - EditorGUILayout.PropertyField(m_Text); - - // INPUT FIELD SETTINGS - #region INPUT FIELD SETTINGS - - m_foldout.fontSettings = EditorGUILayout.Foldout(m_foldout.fontSettings, "Input Field Settings", true, TMP_UIStyleManager.boldFoldout); - - if (m_foldout.fontSettings) - { - EditorGUI.indentLevel++; - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(m_GlobalFontAsset, new GUIContent("Font Asset", "Set the Font Asset for both Placeholder and Input Field text object.")); - if (EditorGUI.EndChangeCheck()) - { - TMP_InputField inputField = target as TMP_InputField; - inputField.SetGlobalFontAsset(m_GlobalFontAsset.objectReferenceValue as TMP_FontAsset); - } - - - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(m_GlobalPointSize, new GUIContent("Point Size", "Set the point size of both Placeholder and Input Field text object.")); - if (EditorGUI.EndChangeCheck()) - { - TMP_InputField inputField = target as TMP_InputField; - inputField.SetGlobalPointSize(m_GlobalPointSize.floatValue); - } - - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(m_CharacterLimit); - - EditorGUILayout.Space(); - - EditorGUILayout.PropertyField(m_ContentType); - if (!m_ContentType.hasMultipleDifferentValues) - { - EditorGUI.indentLevel++; - - if (m_ContentType.enumValueIndex == (int)TMP_InputField.ContentType.Standard || - m_ContentType.enumValueIndex == (int)TMP_InputField.ContentType.Autocorrected || - m_ContentType.enumValueIndex == (int)TMP_InputField.ContentType.Custom) - { - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(m_LineType); - if (EditorGUI.EndChangeCheck()) - { - if (text != null) - { - if (m_LineType.enumValueIndex == (int)TMP_InputField.LineType.SingleLine) - text.enableWordWrapping = false; - else - { - text.enableWordWrapping = true; - } - } - } - - if (m_LineType.enumValueIndex != (int)TMP_InputField.LineType.SingleLine) - { - EditorGUILayout.PropertyField(m_LineLimit); - } - } - - if (m_ContentType.enumValueIndex == (int)TMP_InputField.ContentType.Custom) - { - EditorGUILayout.PropertyField(m_InputType); - EditorGUILayout.PropertyField(m_KeyboardType); - EditorGUILayout.PropertyField(m_CharacterValidation); - if (m_CharacterValidation.enumValueIndex == (int)TMP_InputField.CharacterValidation.Regex) - { - EditorGUILayout.PropertyField(m_RegexValue); - } - else if (m_CharacterValidation.enumValueIndex == (int)TMP_InputField.CharacterValidation.CustomValidator) - { - EditorGUILayout.PropertyField(m_InputValidator); - } - } - - EditorGUI.indentLevel--; - } - - EditorGUILayout.Space(); - - EditorGUILayout.PropertyField(m_Placeholder); - EditorGUILayout.PropertyField(m_VerticalScrollbar); - - if (m_VerticalScrollbar.objectReferenceValue != null) - EditorGUILayout.PropertyField(m_ScrollbarScrollSensitivity); - - EditorGUILayout.PropertyField(m_CaretBlinkRate); - EditorGUILayout.PropertyField(m_CaretWidth); - - EditorGUILayout.PropertyField(m_CustomCaretColor); - - m_CustomColor.target = m_CustomCaretColor.boolValue; - - if (EditorGUILayout.BeginFadeGroup(m_CustomColor.faded)) - { - EditorGUILayout.PropertyField(m_CaretColor); - } - EditorGUILayout.EndFadeGroup(); - - EditorGUILayout.PropertyField(m_SelectionColor); - - EditorGUI.indentLevel--; - } - #endregion - - - // CONTROL SETTINGS - #region CONTROL SETTINGS - m_foldout.extraSettings = EditorGUILayout.Foldout(m_foldout.extraSettings, "Control Settings", true, TMP_UIStyleManager.boldFoldout); - - if (m_foldout.extraSettings) - { - EditorGUI.indentLevel++; - - EditorGUILayout.PropertyField(m_OnFocusSelectAll, new GUIContent("OnFocus - Select All", "Should all the text be selected when the Input Field is selected.")); - EditorGUILayout.PropertyField(m_ResetOnDeActivation, new GUIContent("Reset On DeActivation", "Should the Text and Caret position be reset when Input Field is DeActivated.")); - EditorGUILayout.PropertyField(m_RestoreOriginalTextOnEscape, new GUIContent("Restore On ESC Key", "Should the original text be restored when pressing ESC.")); - EditorGUILayout.PropertyField(m_HideMobileKeyboard, new GUIContent("Hide Soft Keyboard", "Controls the visibility of the mobile virtual keyboard.")); - EditorGUILayout.PropertyField(m_HideMobileInput, new GUIContent("Hide Mobile Input", "Controls the visibility of the editable text field above the mobile virtual keyboard. Not supported on all mobile platforms.")); - EditorGUILayout.PropertyField(m_ReadOnly); - EditorGUILayout.PropertyField(m_RichText); - EditorGUILayout.PropertyField(m_RichTextEditingAllowed, new GUIContent("Allow Rich Text Editing")); - - EditorGUI.indentLevel--; - } - #endregion - - - EditorGUILayout.Space(); - - EditorGUILayout.PropertyField(m_OnValueChanged); - EditorGUILayout.PropertyField(m_OnEndEdit); - EditorGUILayout.PropertyField(m_OnSelect); - EditorGUILayout.PropertyField(m_OnDeselect); - - EditorGUI.EndDisabledGroup(); - - serializedObject.ApplyModifiedProperties(); - } - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_InputFieldEditor.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_InputFieldEditor.cs.meta deleted file mode 100644 index eeb62d8c..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_InputFieldEditor.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: aa160f27c3fe4052a5850e21108811b6 -timeCreated: 1457861621 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_MeshRendererEditor.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_MeshRendererEditor.cs deleted file mode 100644 index 83d19f8c..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_MeshRendererEditor.cs +++ /dev/null @@ -1,76 +0,0 @@ -// When enabled, allows setting the material by dropping a material onto the MeshRenderer inspector component. -// The drawback is that the MeshRenderer inspector will not have properties for light probes, so if you need light probe support, do not enable this. -//#define ALLOW_MESHRENDERER_MATERIAL_DRAG_N_DROP - -using UnityEngine; -using UnityEditor; -using System.Collections; - - -namespace TMPro.EditorUtilities -{ - // Disabled for compatibility reason as lightprobe setup isn't supported due to inability to inherit from MeshRendererEditor class -#if ALLOW_MESHRENDERER_MATERIAL_DRAG_N_DROP - [CanEditMultipleObjects] - [CustomEditor(typeof(MeshRenderer))] - public class TMP_MeshRendererEditor : Editor - { - private SerializedProperty m_Materials; - - void OnEnable() - { - m_Materials = serializedObject.FindProperty("m_Materials"); - } - - - public override void OnInspectorGUI() - { - serializedObject.Update(); - - // Get a reference to the current material. - SerializedProperty material_prop = m_Materials.GetArrayElementAtIndex(0); - Material currentMaterial = material_prop.objectReferenceValue as Material; - - EditorGUI.BeginChangeCheck(); - base.OnInspectorGUI(); - if (EditorGUI.EndChangeCheck()) - { - material_prop = m_Materials.GetArrayElementAtIndex(0); - - TMP_FontAsset newFontAsset = null; - Material newMaterial = null; - - if (material_prop != null) - newMaterial = material_prop.objectReferenceValue as Material; - - // Check if the new material is referencing a different font atlas texture. - if (newMaterial != null && currentMaterial.GetInstanceID() != newMaterial.GetInstanceID()) - { - // Search for the Font Asset matching the new font atlas texture. - newFontAsset = TMP_EditorUtility.FindMatchingFontAsset(newMaterial); - } - - - GameObject[] objects = Selection.gameObjects; - - for (int i = 0; i < objects.Length; i++) - { - // Assign new font asset - if (newFontAsset != null) - { - TMP_Text textComponent = objects[i].GetComponent(); - - if (textComponent != null) - { - Undo.RecordObject(textComponent, "Font Asset Change"); - textComponent.font = newFontAsset; - } - } - - TMPro_EventManager.ON_DRAG_AND_DROP_MATERIAL_CHANGED(objects[i], currentMaterial, newMaterial); - } - } - } - } -#endif -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_MeshRendererEditor.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_MeshRendererEditor.cs.meta deleted file mode 100644 index d6b133fd..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_MeshRendererEditor.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 6d437b997e074079b4b2f6e395394f4b -timeCreated: 1462864011 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_PackageUtilities.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_PackageUtilities.cs deleted file mode 100644 index 5e50d76e..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_PackageUtilities.cs +++ /dev/null @@ -1,920 +0,0 @@ -using UnityEngine; -using UnityEditor; -using System; -using System.IO; -using System.Linq; -using System.Collections; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using TMPro.EditorUtilities; - - -namespace TMPro -{ - /// - /// Data structure containing the target and replacement fileIDs and GUIDs which will require remapping from previous version of TextMesh Pro to the new TextMesh Pro UPM package. - /// - [System.Serializable] - struct AssetConversionRecord - { - public string referencedResource; - public string target; - public string replacement; - } - - - /// - /// Data structure containing a list of target and replacement fileID and GUID requiring remapping from previous versions of TextMesh Pro to the new TextMesh Pro UPM package. - /// This data structure is populated with the data contained in the PackageConversionData.json file included in the package. - /// - [System.Serializable] - class AssetConversionData - { - public List assetRecords; - } - - - public class TMP_ProjectConversionUtility : EditorWindow - { - // Create Sprite Asset Editor Window - [MenuItem("Window/TextMeshPro/Project Files GUID Remapping Tool", false, 2100)] - static void ShowConverterWindow() - { - var window = GetWindow(); - window.titleContent = new GUIContent("Conversion Tool"); - window.Focus(); - } - - private static HashSet m_IgnoreAssetTypes = new HashSet() - { - typeof(AnimatorOverrideController), - typeof(AudioClip), - typeof(AvatarMask), - typeof(ComputeShader), - typeof(Cubemap), - typeof(DefaultAsset), - typeof(Flare), - typeof(Font), - typeof(GUISkin), - typeof(HumanTemplate), - typeof(LightingDataAsset), - typeof(Mesh), - typeof(MonoScript), - typeof(PhysicMaterial), - typeof(PhysicsMaterial2D), - typeof(RenderTexture), - typeof(Shader), - typeof(TerrainData), - typeof(TextAsset), - typeof(Texture2D), - typeof(Texture2DArray), - typeof(Texture3D), - typeof(UnityEditor.Animations.AnimatorController), - typeof(UnityEditorInternal.AssemblyDefinitionAsset), - typeof(UnityEngine.AI.NavMeshData), - typeof(UnityEngine.Tilemaps.Tile), - typeof(UnityEngine.U2D.SpriteAtlas), - typeof(UnityEngine.Video.VideoClip), - }; - - /// - /// - /// - struct AssetModificationRecord - { - public string assetFilePath; - public string assetDataFile; - } - - struct AssetFileRecord - { - public string assetFilePath; - public string assetMetaFilePath; - - public AssetFileRecord(string filePath, string metaFilePath) - { - this.assetFilePath = filePath; - this.assetMetaFilePath = metaFilePath; - } - } - - private static string m_ProjectPath; - private static string m_ProjectFolderToScan; - private static bool m_IsAlreadyScanningProject; - private static bool m_CancelScanProcess; - private static string k_ProjectScanReportDefaultText = "Project Scan Results\n"; - private static string k_ProjectScanLabelPrefix = "Scanning: "; - private static string m_ProjectScanResults = string.Empty; - private static Vector2 m_ProjectScanResultScrollPosition; - private static float m_ProgressPercentage = 0; - - private static int m_ScanningTotalFiles; - private static int m_RemainingFilesToScan; - private static int m_ScanningCurrentFileIndex; - private static string m_ScanningCurrentFileName; - - private static AssetConversionData m_ConversionData; - - private static List m_ModifiedAssetList = new List(); - - - void OnEnable() - { - // Set Editor Window Size - SetEditorWindowSize(); - - m_ProjectScanResults = k_ProjectScanReportDefaultText; - } - - - void OnGUI() - { - GUILayout.BeginVertical(); - { - // Scan project files and resources - GUILayout.BeginVertical(EditorStyles.helpBox); - { - GUILayout.Label("Scan Project Files", EditorStyles.boldLabel); - GUILayout.Label("Press the Scan Project Files button to begin scanning your project for files & resources that were created with a previous version of TextMesh Pro.", TMP_UIStyleManager.label); - GUILayout.Space(10f); - GUILayout.Label("Project folder to be scanned. Example \"Assets/TextMesh Pro\""); - m_ProjectFolderToScan = EditorGUILayout.TextField("Folder Path: Assets/", m_ProjectFolderToScan); - GUILayout.Space(5f); - - GUI.enabled = m_IsAlreadyScanningProject == false ? true : false; - if (GUILayout.Button("Scan Project Files")) - { - m_CancelScanProcess = false; - - // Make sure Asset Serialization mode is set to ForceText and Version Control mode to Visible Meta Files. - if (CheckProjectSerializationAndSourceControlModes() == true) - { - m_ProjectPath = Path.GetFullPath("Assets/.."); - TMP_EditorCoroutine.StartCoroutine(ScanProjectFiles()); - } - else - { - EditorUtility.DisplayDialog("Project Settings Change Required", "In menu options \"Edit - Project Settings - Editor\", please change Asset Serialization Mode to ForceText and Source Control Mode to Visible Meta Files.", "OK", string.Empty); - } - } - GUI.enabled = true; - - // Display progress bar - Rect rect = GUILayoutUtility.GetRect(0f, 20f, GUILayout.ExpandWidth(true)); - EditorGUI.ProgressBar(rect, m_ProgressPercentage, "Scan Progress (" + m_ScanningCurrentFileIndex + "/" + m_ScanningTotalFiles + ")"); - - // Display cancel button and name of file currently being scanned. - if (m_IsAlreadyScanningProject) - { - Rect cancelRect = new Rect(rect.width - 20, rect.y + 2, 20, 16); - if (GUI.Button(cancelRect, "X")) - { - m_CancelScanProcess = true; - } - GUILayout.Label(k_ProjectScanLabelPrefix + m_ScanningCurrentFileName, TMP_UIStyleManager.label); - } - else - GUILayout.Label(string.Empty); - - GUILayout.Space(5); - - // Creation Feedback - GUILayout.BeginVertical(TMP_UIStyleManager.textAreaBoxWindow, GUILayout.ExpandHeight(true)); - { - m_ProjectScanResultScrollPosition = EditorGUILayout.BeginScrollView(m_ProjectScanResultScrollPosition, GUILayout.ExpandHeight(true)); - EditorGUILayout.LabelField(m_ProjectScanResults, TMP_UIStyleManager.label); - EditorGUILayout.EndScrollView(); - } - GUILayout.EndVertical(); - GUILayout.Space(5f); - } - GUILayout.EndVertical(); - - // Scan project files and resources - GUILayout.BeginVertical(EditorStyles.helpBox); - { - GUILayout.Label("Save Modified Project Files", EditorStyles.boldLabel); - GUILayout.Label("Pressing the Save Modified Project Files button will update the files in the Project Scan Results listed above. Please make sure that you have created a backup of your project first as these file modifications are permanent and cannot be undone.", TMP_UIStyleManager.label); - GUILayout.Space(5f); - - GUI.enabled = m_IsAlreadyScanningProject == false && m_ModifiedAssetList.Count > 0 ? true : false; - if (GUILayout.Button("Save Modified Project Files")) - { - UpdateProjectFiles(); - } - GUILayout.Space(10f); - } - GUILayout.EndVertical(); - - } - GUILayout.EndVertical(); - GUILayout.Space(5f); - } - - void OnInspectorUpdate() - { - Repaint(); - } - - - /// - /// Limits the minimum size of the editor window. - /// - void SetEditorWindowSize() - { - EditorWindow editorWindow = this; - - Vector2 currentWindowSize = editorWindow.minSize; - - editorWindow.minSize = new Vector2(Mathf.Max(640, currentWindowSize.x), Mathf.Max(420, currentWindowSize.y)); - } - - - /// - /// - /// - /// - /// - private static bool ShouldIgnoreFile(string filePath) - { - string fileExtension = Path.GetExtension(filePath); - Type fileType = AssetDatabase.GetMainAssetTypeAtPath(filePath); - - if (m_IgnoreAssetTypes.Contains(fileType)) - return true; - - // Exclude FBX - if (fileType == typeof(GameObject) && fileExtension.ToLower() == ".fbx") { return true; } - return false; - } - - - private IEnumerator ScanProjectFiles() - { - m_IsAlreadyScanningProject = true; - string packageFullPath = EditorUtilities.TMP_EditorUtility.packageFullPath; - - // List containing assets that have been modified. - m_ProjectScanResults = k_ProjectScanReportDefaultText; - m_ModifiedAssetList.Clear(); - m_ProgressPercentage = 0; - - // Read Conversion Data from Json file. - if (m_ConversionData == null) - m_ConversionData = JsonUtility.FromJson(File.ReadAllText(packageFullPath + "/PackageConversionData.json")); - - // Get list of GUIDs for assets that might contain references to previous GUIDs that require updating. - string searchFolder = string.IsNullOrEmpty(m_ProjectFolderToScan) ? "Assets" : ("Assets/" + m_ProjectFolderToScan); - string[] guids = AssetDatabase.FindAssets("t:Object", new string[] { searchFolder }).Distinct().ToArray(); - - k_ProjectScanLabelPrefix = "Phase 1 - Filtering: "; - m_ScanningTotalFiles = guids.Length; - m_ScanningCurrentFileIndex = 0; - - List projectFilesToScan = new List(); - - foreach (var guid in guids) - { - if (m_CancelScanProcess) - break; - - string assetFilePath = AssetDatabase.GUIDToAssetPath(guid); - - m_ScanningCurrentFileIndex += 1; - m_ScanningCurrentFileName = assetFilePath; - m_ProgressPercentage = (float)m_ScanningCurrentFileIndex / m_ScanningTotalFiles; - - // Filter out file types we have no interest in searching - if (ShouldIgnoreFile(assetFilePath)) - continue; - - string assetMetaFilePath = AssetDatabase.GetTextMetaFilePathFromAssetPath(assetFilePath); - - projectFilesToScan.Add(new AssetFileRecord(assetFilePath, assetMetaFilePath)); - - yield return null; - } - - m_RemainingFilesToScan = m_ScanningTotalFiles = projectFilesToScan.Count; - - k_ProjectScanLabelPrefix = "Phase 2 - Scanning: "; - - for (int i = 0; i < m_ScanningTotalFiles; i++) - { - if (m_CancelScanProcess) - break; - - AssetFileRecord fileRecord = projectFilesToScan[i]; - - Task.Run(() => - { - ScanProjectFileAsync(fileRecord); - - m_ScanningCurrentFileName = fileRecord.assetFilePath; - - int completedScans = m_ScanningTotalFiles - Interlocked.Decrement(ref m_RemainingFilesToScan); - - m_ScanningCurrentFileIndex = completedScans; - m_ProgressPercentage = (float)completedScans / m_ScanningTotalFiles; - }); - - if (i % 64 == 0) - yield return new WaitForSeconds(2.0f); - - } - - while (m_RemainingFilesToScan > 0 && !m_CancelScanProcess) - yield return null; - - m_IsAlreadyScanningProject = false; - m_ScanningCurrentFileName = string.Empty; - } - - - static void ScanProjectFileAsync(AssetFileRecord fileRecord) - { - if (m_CancelScanProcess) - return; - - // Read the asset data file - string assetDataFile = string.Empty; - bool hasFileChanged = false; - - try - { - assetDataFile = File.ReadAllText(m_ProjectPath + "/" + fileRecord.assetFilePath); - } - catch - { - // Continue to the next asset if we can't read the current one. - return; - } - - // Read the asset meta data file - string assetMetaFile = File.ReadAllText(m_ProjectPath + "/" + fileRecord.assetMetaFilePath); - bool hasMetaFileChanges = false; - - foreach (AssetConversionRecord record in m_ConversionData.assetRecords) - { - if (assetDataFile.Contains(record.target)) - { - hasFileChanged = true; - - assetDataFile = assetDataFile.Replace(record.target, record.replacement); - } - - //// Check meta file - if (assetMetaFile.Contains(record.target)) - { - hasMetaFileChanges = true; - - assetMetaFile = assetMetaFile.Replace(record.target, record.replacement); - } - } - - if (hasFileChanged) - { - AssetModificationRecord modifiedAsset; - modifiedAsset.assetFilePath = fileRecord.assetFilePath; - modifiedAsset.assetDataFile = assetDataFile; - - m_ModifiedAssetList.Add(modifiedAsset); - - m_ProjectScanResults += fileRecord.assetFilePath + "\n"; - } - - if (hasMetaFileChanges) - { - AssetModificationRecord modifiedAsset; - modifiedAsset.assetFilePath = fileRecord.assetMetaFilePath; - modifiedAsset.assetDataFile = assetMetaFile; - - m_ModifiedAssetList.Add(modifiedAsset); - - m_ProjectScanResults += fileRecord.assetMetaFilePath + "\n"; - } - } - - - /// - /// - /// - private static void ResetScanProcess() - { - m_IsAlreadyScanningProject = false; - m_ScanningCurrentFileName = string.Empty; - m_ProgressPercentage = 0; - m_ScanningCurrentFileIndex = 0; - m_ScanningTotalFiles = 0; - } - - - /// - /// - /// - private static void UpdateProjectFiles() - { - // Make sure Asset Serialization mode is set to ForceText with Visible Meta Files. - CheckProjectSerializationAndSourceControlModes(); - - string projectPath = Path.GetFullPath("Assets/.."); - - // Display dialogue to show user a list of project files that will be modified upon their consent. - if (EditorUtility.DisplayDialog("Save Modified Asset(s)?", "Are you sure you want to save all modified assets?", "YES", "NO")) - { - for (int i = 0; i < m_ModifiedAssetList.Count; i++) - { - // Make sure all file streams that might have been opened by Unity are closed. - //AssetDatabase.ReleaseCachedFileHandles(); - - //Debug.Log("Writing asset file [" + m_ModifiedAssetList[i].assetFilePath + "]."); - - File.WriteAllText(projectPath + "/" + m_ModifiedAssetList[i].assetFilePath, m_ModifiedAssetList[i].assetDataFile); - } - } - - AssetDatabase.Refresh(); - - m_ProgressPercentage = 0; - m_ProjectScanResults = k_ProjectScanReportDefaultText; - } - - - /// - /// Check project Asset Serialization and Source Control modes - /// - private static bool CheckProjectSerializationAndSourceControlModes() - { - // Check Project Asset Serialization and Visible Meta Files mode. - if (EditorSettings.serializationMode != SerializationMode.ForceText || EditorSettings.externalVersionControl != "Visible Meta Files") - { - return false; - } - - return true; - } - } - - - - public class TMP_PackageUtilities : Editor - { - - enum SaveAssetDialogueOptions { Unset = 0, Save = 1, SaveAll = 2, DoNotSave = 3 }; - - private static SerializationMode m_ProjectAssetSerializationMode; - private static string m_ProjectExternalVersionControl; - - struct AssetRemappingRecord - { - public string oldGuid; - public string newGuid; - public string assetPath; - } - - struct AssetModificationRecord - { - public string assetFilePath; - public string assetDataFile; - } - - // Create Sprite Asset Editor Window - //[MenuItem("Window/TextMeshPro/Generate New Package GUIDs", false, 1500)] - public static void GenerateNewPackageGUIDs_Menu() - { - GenerateNewPackageGUIDs(); - } - - - /// - /// - /// - [MenuItem("Window/TextMeshPro/Import TMP Essential Resources", false, 2050)] - public static void ImportProjectResourcesMenu() - { - ImportProjectResources(); - } - - - /// - /// - /// - [MenuItem("Window/TextMeshPro/Import TMP Examples and Extras", false, 2051)] - public static void ImportExamplesContentMenu() - { - ImportExtraContent(); - } - - - // Create Sprite Asset Editor Window - //[MenuItem("Window/TextMeshPro/Convert TMP Project Files to UPM", false, 1510)] - public static void ConvertProjectGUIDsMenu() - { - ConvertProjectGUIDsToUPM(); - - //GetVersionInfo(); - } - - - // Create Sprite Asset Editor Window - //[MenuItem("Window/TextMeshPro/Convert GUID (Source to DLL)", false, 2010)] - public static void ConvertGUIDFromSourceToDLLMenu() - { - //ConvertGUIDFromSourceToDLL(); - - //GetVersionInfo(); - } - - - // Create Sprite Asset Editor Window - //[MenuItem("Window/TextMeshPro/Convert GUID (DLL to Source)", false, 2020)] - public static void ConvertGUIDFromDllToSourceMenu() - { - //ConvertGUIDFromDLLToSource(); - - //GetVersionInfo(); - } - - - // Create Sprite Asset Editor Window - //[MenuItem("Window/TextMeshPro/Extract Package GUIDs", false, 1530)] - public static void ExtractPackageGUIDMenu() - { - ExtractPackageGUIDs(); - } - - - private static void GetVersionInfo() - { - string version = TMP_Settings.version; - Debug.Log("The version of this TextMesh Pro UPM package is (" + version + ")."); - } - - - /// - /// - /// - private static void ImportExtraContent() - { - string packageFullPath = EditorUtilities.TMP_EditorUtility.packageFullPath; - - AssetDatabase.ImportPackage(packageFullPath + "/Package Resources/TMP Examples & Extras.unitypackage", true); - } - - - /// - /// - /// - private static void ImportProjectResources() - { - string packageFullPath = EditorUtilities.TMP_EditorUtility.packageFullPath; - - AssetDatabase.ImportPackage(packageFullPath + "/Package Resources/TMP Essential Resources.unitypackage", true); - } - - - /// - /// - /// - private static void GenerateNewPackageGUIDs() - { - // Make sure Asset Serialization mode is set to ForceText with Visible Meta Files. - SetProjectSerializationAndSourceControlModes(); - - string projectPath = Path.GetFullPath("Assets/.."); - - // Clear existing dictionary of AssetRecords - List assetRecords = new List(); - - // Get full list of GUIDs used in the package which including folders. - string[] packageGUIDs = AssetDatabase.FindAssets("t:Object", new string[] { "Assets/Packages/com.unity.TextMeshPro" }); - - for (int i = 0; i < packageGUIDs.Length; i++) - { - // Could add a progress bar for this process (if needed) - - string guid = packageGUIDs[i]; - string assetFilePath = AssetDatabase.GUIDToAssetPath(guid); - string assetMetaFilePath = AssetDatabase.GetTextMetaFilePathFromAssetPath(assetFilePath); - //System.Type assetType = AssetDatabase.GetMainAssetTypeAtPath(assetFilePath); - - AssetRemappingRecord assetRecord; - assetRecord.oldGuid = guid; - assetRecord.assetPath = assetFilePath; - - string newGUID = GenerateUniqueGUID(); - - assetRecord.newGuid = newGUID; - - if (assetRecords.FindIndex(item => item.oldGuid == guid) != -1) - continue; - - assetRecords.Add(assetRecord); - - // Read the meta file for the given asset. - string assetMetaFile = File.ReadAllText(projectPath + "/" + assetMetaFilePath); - - assetMetaFile = assetMetaFile.Replace("guid: " + guid, "guid: " + newGUID); - - File.WriteAllText(projectPath + "/" + assetMetaFilePath, assetMetaFile); - - //Debug.Log("Asset: [" + assetFilePath + "] Type: " + assetType + " Current GUID: [" + guid + "] New GUID: [" + newGUID + "]"); - } - - AssetDatabase.Refresh(); - - // Get list of GUIDs for assets that might need references to previous GUIDs which need to be updated. - packageGUIDs = AssetDatabase.FindAssets("t:Object"); // ("t:Object", new string[] { "Assets/Asset Importer" }); - - for (int i = 0; i < packageGUIDs.Length; i++) - { - // Could add a progress bar for this process - - string guid = packageGUIDs[i]; - string assetFilePath = AssetDatabase.GUIDToAssetPath(guid); - System.Type assetType = AssetDatabase.GetMainAssetTypeAtPath(assetFilePath); - - // Filter out file types we are not interested in - if (assetType == typeof(DefaultAsset) || assetType == typeof(MonoScript) || assetType == typeof(Texture2D) || assetType == typeof(TextAsset) || assetType == typeof(Shader)) - continue; - - // Read the asset data file - string assetDataFile = File.ReadAllText(projectPath + "/" + assetFilePath); - - //Debug.Log("Searching Asset: [" + assetFilePath + "] of type: " + assetType); - - bool hasFileChanged = false; - - foreach (AssetRemappingRecord record in assetRecords) - { - if (assetDataFile.Contains(record.oldGuid)) - { - hasFileChanged = true; - - assetDataFile = assetDataFile.Replace(record.oldGuid, record.newGuid); - - Debug.Log("Replacing old GUID: [" + record.oldGuid + "] by new GUID: [" + record.newGuid + "] in asset file: [" + assetFilePath + "]."); - } - } - - if (hasFileChanged) - { - // Add file to list of changed files - File.WriteAllText(projectPath + "/" + assetFilePath, assetDataFile); - } - - } - - AssetDatabase.Refresh(); - - // Restore project Asset Serialization and Source Control modes. - RestoreProjectSerializationAndSourceControlModes(); - } - - - private static void ExtractPackageGUIDs() - { - // Make sure Asset Serialization mode is set to ForceText with Visible Meta Files. - SetProjectSerializationAndSourceControlModes(); - - string projectPath = Path.GetFullPath("Assets/.."); - - // Create new instance of AssetConversionData file - AssetConversionData data = new AssetConversionData(); - data.assetRecords = new List(); - - // Get full list of GUIDs used in the package which including folders. - string[] packageGUIDs = AssetDatabase.FindAssets("t:Object", new string[] { "Assets/Packages/com.unity.TextMeshPro" }); - - for (int i = 0; i < packageGUIDs.Length; i++) - { - // Could add a progress bar for this process (if needed) - - string guid = packageGUIDs[i]; - string assetFilePath = AssetDatabase.GUIDToAssetPath(guid); - //string assetMetaFilePath = AssetDatabase.GetTextMetaFilePathFromAssetPath(assetFilePath); - - //ObjectIdentifier[] localIdentifider = BundleBuildInterface.GetPlayerObjectIdentifiersInAsset(new GUID(guid), BuildTarget.NoTarget); - //System.Type[] types = BundleBuildInterface.GetTypeForObjects(localIdentifider); - - System.Type assetType = AssetDatabase.GetMainAssetTypeAtPath(assetFilePath); - - // Filter out file types we are not interested in - if (assetType == typeof(DefaultAsset)) - continue; - - string newGuid = GenerateUniqueGUID(); - - AssetConversionRecord record; - record.referencedResource = Path.GetFileName(assetFilePath); - record.target = "fileID: 2108210716, guid: " + newGuid; - - record.replacement = "fileID: 11500000, guid: " + guid; - - //if (m_AssetRecords.FindIndex(item => item.oldGuid == guid) != -1) - // continue; - - data.assetRecords.Add(record); - - // Read the meta file for the given asset. - //string assetMetaFile = File.ReadAllText(projectPath + "/" + assetMetaFilePath); - - //assetMetaFile = assetMetaFile.Replace("guid: " + guid, "guid: " + newGUID); - - //File.WriteAllText(projectPath + "/" + assetMetaFilePath, assetMetaFile); - - Debug.Log("Asset: [" + Path.GetFileName(assetFilePath) + "] Type: " + assetType + " Current GUID: [" + guid + "] New GUID: [" + newGuid + "]"); - } - - // Write new information into JSON file - string dataFile = JsonUtility.ToJson(data, true); - - File.WriteAllText(projectPath + "/Assets/Packages/com.unity.TextMeshPro/PackageConversionData.json", dataFile); - - // Restore project Asset Serialization and Source Control modes. - RestoreProjectSerializationAndSourceControlModes(); - } - - - /// - /// - /// - private static void ConvertProjectGUIDsToUPM() - { - // Make sure Asset Serialization mode is set to ForceText with Visible Meta Files. - SetProjectSerializationAndSourceControlModes(); - - string projectPath = Path.GetFullPath("Assets/.."); - string packageFullPath = EditorUtilities.TMP_EditorUtility.packageFullPath; - - // List containing assets that have been modified. - List modifiedAssetList = new List(); - - // Read Conversion Data from Json file. - AssetConversionData conversionData = JsonUtility.FromJson(File.ReadAllText(packageFullPath + "/PackageConversionData.json")); - - // Get list of GUIDs for assets that might contain references to previous GUIDs that require updating. - string[] projectGUIDs = AssetDatabase.FindAssets("t:Object"); - - for (int i = 0; i < projectGUIDs.Length; i++) - { - // Could add a progress bar for this process - - string guid = projectGUIDs[i]; - string assetFilePath = AssetDatabase.GUIDToAssetPath(guid); - System.Type assetType = AssetDatabase.GetMainAssetTypeAtPath(assetFilePath); - - // Filter out file types we are not interested in - if (assetType == typeof(DefaultAsset) || assetType == typeof(MonoScript) || assetType == typeof(Texture2D) || assetType == typeof(TextAsset) || assetType == typeof(Shader)) - continue; - - // Read the asset data file - string assetDataFile = File.ReadAllText(projectPath + "/" + assetFilePath); - - //Debug.Log("Searching Asset: [" + assetFilePath + "] of type: " + assetType); - - bool hasFileChanged = false; - - foreach (AssetConversionRecord record in conversionData.assetRecords) - { - if (assetDataFile.Contains(record.target)) - { - hasFileChanged = true; - - assetDataFile = assetDataFile.Replace(record.target, record.replacement); - - Debug.Log("Replacing Reference to [" + record.referencedResource + "] using [" + record.target + "] with [" + record.replacement + "] in asset file: [" + assetFilePath + "]."); - } - } - - if (hasFileChanged) - { - Debug.Log("Adding [" + assetFilePath + "] to list of assets to be modified."); - - AssetModificationRecord modifiedAsset; - modifiedAsset.assetFilePath = assetFilePath; - modifiedAsset.assetDataFile = assetDataFile; - - modifiedAssetList.Add(modifiedAsset); - } - - } - - // Scan project meta files to update GUIDs of assets whose GUID has changed. - projectGUIDs = AssetDatabase.FindAssets("t:Object"); - - for (int i = 0; i < projectGUIDs.Length; i++) - { - string guid = projectGUIDs[i]; - string assetFilePath = AssetDatabase.GUIDToAssetPath(guid); - string assetMetaFilePath = AssetDatabase.GetTextMetaFilePathFromAssetPath(assetFilePath); - - // Read the asset meta data file - string assetMetaFile = File.ReadAllText(projectPath + "/" + assetMetaFilePath); - - bool hasFileChanged = false; - - foreach (AssetConversionRecord record in conversionData.assetRecords) - { - if (assetMetaFile.Contains(record.target)) - { - hasFileChanged = true; - - assetMetaFile = assetMetaFile.Replace(record.target, record.replacement); - - Debug.Log("Replacing Reference to [" + record.referencedResource + "] using [" + record.target + "] with [" + record.replacement + "] in asset file: [" + assetMetaFilePath + "]."); - } - } - - if (hasFileChanged) - { - Debug.Log("Adding [" + assetMetaFilePath + "] to list of meta files to be modified."); - - AssetModificationRecord modifiedAsset; - modifiedAsset.assetFilePath = assetMetaFilePath; - modifiedAsset.assetDataFile = assetMetaFile; - - modifiedAssetList.Add(modifiedAsset); - } - } - - // Display dialogue to show user a list of project files that will be modified upon their consent. - if (EditorUtility.DisplayDialog("Save Modified Asset(s)?", "Are you sure you want to save all modified assets?", "YES", "NO")) - { - for (int i = 0; i < modifiedAssetList.Count; i++) - { - // Make sure all file streams that might have been opened by Unity are closed. - //AssetDatabase.ReleaseCachedFileHandles(); - - Debug.Log("Writing asset file [" + modifiedAssetList[i].assetFilePath + "]."); - - //File.WriteAllText(projectPath + "/" + modifiedAssetList[i].assetFilePath, modifiedAssetList[i].assetDataFile); - } - - } - - AssetDatabase.Refresh(); - - // Restore project Asset Serialization and Source Control modes. - RestoreProjectSerializationAndSourceControlModes(); - } - - - /// - /// - /// - /// - private static string GenerateUniqueGUID() - { - string monoGuid = System.Guid.NewGuid().ToString(); - - char[] charGuid = new char[32]; - int index = 0; - for (int i = 0; i < monoGuid.Length; i++) - { - if (monoGuid[i] != '-') - charGuid[index++] = monoGuid[i]; - } - - string guid = new string(charGuid); - - // Make sure new GUID is not already used by some other asset. - if (AssetDatabase.GUIDToAssetPath(guid) != string.Empty) - guid = GenerateUniqueGUID(); - - return guid; - } - - - /// - /// Change project asset serialization mode to ForceText (if necessary) - /// - private static void SetProjectSerializationAndSourceControlModes() - { - // Make sure Asset Serialization mode is set to ForceText with Visible Meta Files. - m_ProjectAssetSerializationMode = EditorSettings.serializationMode; - if (m_ProjectAssetSerializationMode != SerializationMode.ForceText) - UnityEditor.EditorSettings.serializationMode = SerializationMode.ForceText; - - m_ProjectExternalVersionControl = EditorSettings.externalVersionControl; - if (m_ProjectExternalVersionControl != "Visible Meta Files") - UnityEditor.EditorSettings.externalVersionControl = "Visible Meta Files"; - } - - - /// - /// Revert potential change to asset serialization mode (if necessary) - /// - private static void RestoreProjectSerializationAndSourceControlModes() - { - // Make sure Asset Serialization mode is set to ForceText with Visible Meta Files. - if (m_ProjectAssetSerializationMode != EditorSettings.serializationMode) - EditorSettings.serializationMode = m_ProjectAssetSerializationMode; - - if (m_ProjectExternalVersionControl != EditorSettings.externalVersionControl) - EditorSettings.externalVersionControl = m_ProjectExternalVersionControl; - } - - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_PackageUtilities.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_PackageUtilities.cs.meta deleted file mode 100644 index e03778cc..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_PackageUtilities.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 68eedd4e5b33b37429c02c4add0036fe -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_PostBuildProcessHandler.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_PostBuildProcessHandler.cs deleted file mode 100644 index a8b800ac..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_PostBuildProcessHandler.cs +++ /dev/null @@ -1,63 +0,0 @@ -using UnityEngine; -using UnityEditor; -using UnityEditor.Callbacks; -using System.IO; - - -namespace TMPro -{ - public class TMP_PostBuildProcessHandler - { - [PostProcessBuildAttribute(10000)] - public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject) - { - // Check if TMP Essential Resource are present in user project. - if (target == BuildTarget.iOS && File.Exists(GetEssentialProjectResourcesPath() + "/Resources/TMP Settings.asset") && TMP_Settings.enableEmojiSupport) - { - string file = Path.Combine(pathToBuiltProject, "Classes/UI/Keyboard.mm"); - string content = File.ReadAllText(file); - content = content.Replace("FILTER_EMOJIS_IOS_KEYBOARD 1", "FILTER_EMOJIS_IOS_KEYBOARD 0"); - File.WriteAllText(file, content); - } - } - - - private static string GetEssentialProjectResourcesPath() - { - // Find the potential location of the TextMesh Pro folder in the user project. - string projectPath = Path.GetFullPath("Assets/.."); - if (Directory.Exists(projectPath)) - { - // Search for default location of TMP Essential Resources - if (Directory.Exists(projectPath + "/Assets/TextMesh Pro/Resources")) - { - return "Assets/TextMesh Pro"; - } - - // Search for potential alternative locations in the user project - string[] matchingPaths = Directory.GetDirectories(projectPath, "TextMesh Pro", SearchOption.AllDirectories); - projectPath = ValidateLocation(matchingPaths, projectPath); - if (projectPath != null) return projectPath; - } - - return null; - } - - - private static string ValidateLocation(string[] paths, string projectPath) - { - for (int i = 0; i < paths.Length; i++) - { - // Check if any of the matching directories contain a GUISkins directory. - if (Directory.Exists(paths[i] + "/Resources")) - { - string folderPath = paths[i].Replace(projectPath, ""); - folderPath = folderPath.TrimStart('\\', '/'); - return folderPath; - } - } - - return null; - } - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_PostBuildProcessHandler.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_PostBuildProcessHandler.cs.meta deleted file mode 100644 index af212b86..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_PostBuildProcessHandler.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 6fdea2af3daa40fe8f88e5e9cfc17abb -timeCreated: 1479886230 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ProjectTextSettings.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ProjectTextSettings.cs deleted file mode 100644 index b8695be2..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ProjectTextSettings.cs +++ /dev/null @@ -1,43 +0,0 @@ -#if !UNITY_2018_3_OR_NEWER -using UnityEditor; - -namespace TMPro -{ - - public static class TMP_ProjectTextSettings - { - // Open Project Text Settings - [MenuItem("Edit/Project Settings/TextMeshPro Settings", false, 309)] - public static void SelectProjectTextSettings() - { - TMP_Settings textSettings = TMP_Settings.instance; - - if (textSettings) - { - Selection.activeObject = textSettings; - - // TODO: Do we want to ping the Project Text Settings asset in the Project Inspector - EditorUtility.FocusProjectWindow(); - EditorGUIUtility.PingObject(textSettings); - } - else - TMPro_EventManager.RESOURCE_LOAD_EVENT.Add(ON_RESOURCES_LOADED); - } - - - // Event received when TMP resources have been loaded. - static void ON_RESOURCES_LOADED() - { - TMPro_EventManager.RESOURCE_LOAD_EVENT.Remove(ON_RESOURCES_LOADED); - - TMP_Settings textSettings = TMP_Settings.instance; - - Selection.activeObject = textSettings; - - // TODO: Do we want to ping the Project Text Settings asset in the Project Inspector - EditorUtility.FocusProjectWindow(); - EditorGUIUtility.PingObject(textSettings); - } - } -} -#endif \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ProjectTextSettings.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ProjectTextSettings.cs.meta deleted file mode 100644 index 6d194543..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ProjectTextSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0e751e877ed14d71a6b8e63ac54949cf -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ResourcesLoader.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ResourcesLoader.cs deleted file mode 100644 index 090bd774..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ResourcesLoader.cs +++ /dev/null @@ -1,68 +0,0 @@ -using UnityEditor; -using UnityEngine; -using System.Collections; - -namespace TMPro.EditorUtilities -{ - - //[InitializeOnLoad] - class TMP_ResourcesLoader - { - - /// - /// Function to pre-load the TMP Resources - /// - public static void LoadTextMeshProResources() - { - //TMP_Settings.LoadDefaultSettings(); - //TMP_StyleSheet.LoadDefaultStyleSheet(); - } - - - static TMP_ResourcesLoader() - { - //Debug.Log("Loading TMP Resources..."); - - // Get current targetted platform - - - //string Settings = PlayerSettings.GetScriptingDefineSymbolsForGroup(BuildTargetGroup.Standalone); - //TMPro.TMP_Settings.LoadDefaultSettings(); - //TMPro.TMP_StyleSheet.LoadDefaultStyleSheet(); - } - - - - //[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)] - //static void OnBeforeSceneLoaded() - //{ - //Debug.Log("Before scene is loaded."); - - // //TMPro.TMP_Settings.LoadDefaultSettings(); - // //TMPro.TMP_StyleSheet.LoadDefaultStyleSheet(); - - // //ShaderVariantCollection collection = new ShaderVariantCollection(); - // //Shader s0 = Shader.Find("TextMeshPro/Mobile/Distance Field"); - // //ShaderVariantCollection.ShaderVariant tmp_Variant = new ShaderVariantCollection.ShaderVariant(s0, UnityEngine.Rendering.PassType.Normal, string.Empty); - - // //collection.Add(tmp_Variant); - // //collection.WarmUp(); - //} - - } - - //static class TMP_ProjectSettings - //{ - // [InitializeOnLoadMethod] - // static void SetProjectDefineSymbols() - // { - // string currentBuildSettings = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup); - - // //Check for and inject TMP_INSTALLED - // if (!currentBuildSettings.Contains("TMP_PRESENT")) - // { - // PlayerSettings.SetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup, currentBuildSettings + ";TMP_PRESENT"); - // } - // } - //} -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ResourcesLoader.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ResourcesLoader.cs.meta deleted file mode 100644 index 8b322e2f..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_ResourcesLoader.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 7241c7dc25374fc1a6ab3ef9da79c363 -timeCreated: 1465441092 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SDFShaderGUI.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SDFShaderGUI.cs deleted file mode 100644 index 2728f26f..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SDFShaderGUI.cs +++ /dev/null @@ -1,442 +0,0 @@ -using UnityEngine; -using UnityEditor; - -namespace TMPro.EditorUtilities -{ - public class TMP_SDFShaderGUI : TMP_BaseShaderGUI - { - static ShaderFeature s_OutlineFeature, s_UnderlayFeature, s_BevelFeature, s_GlowFeature, s_MaskFeature; - - static bool s_Face = true, s_Outline = true, s_Underlay, s_Lighting, s_Glow, s_Bevel, s_Light, s_Bump, s_Env; - - static string[] - s_FaceUvSpeedNames = { "_FaceUVSpeedX", "_FaceUVSpeedY" }, - s_OutlineUvSpeedNames = { "_OutlineUVSpeedX", "_OutlineUVSpeedY" }; - - static TMP_SDFShaderGUI() - { - s_OutlineFeature = new ShaderFeature() - { - undoLabel = "Outline", - keywords = new[] { "OUTLINE_ON" } - }; - - s_UnderlayFeature = new ShaderFeature() - { - undoLabel = "Underlay", - keywords = new[] { "UNDERLAY_ON", "UNDERLAY_INNER" }, - label = new GUIContent("Underlay Type"), - keywordLabels = new[] - { - new GUIContent("None"), new GUIContent("Normal"), new GUIContent("Inner") - } - }; - - s_BevelFeature = new ShaderFeature() - { - undoLabel = "Bevel", - keywords = new[] { "BEVEL_ON" } - }; - - s_GlowFeature = new ShaderFeature() - { - undoLabel = "Glow", - keywords = new[] { "GLOW_ON" } - }; - - s_MaskFeature = new ShaderFeature() - { - undoLabel = "Mask", - keywords = new[] { "MASK_HARD", "MASK_SOFT" }, - label = new GUIContent("Mask"), - keywordLabels = new[] - { - new GUIContent("Mask Off"), new GUIContent("Mask Hard"), new GUIContent("Mask Soft") - } - }; - } - - protected override void DoGUI() - { - s_Face = BeginPanel("Face", s_Face); - if (s_Face) - { - DoFacePanel(); - } - - EndPanel(); - - s_Outline = m_Material.HasProperty(ShaderUtilities.ID_OutlineTex) ? BeginPanel("Outline", s_Outline) : BeginPanel("Outline", s_OutlineFeature, s_Outline); - if (s_Outline) - { - DoOutlinePanel(); - } - - EndPanel(); - - if (m_Material.HasProperty(ShaderUtilities.ID_UnderlayColor)) - { - s_Underlay = BeginPanel("Underlay", s_UnderlayFeature, s_Underlay); - if (s_Underlay) - { - DoUnderlayPanel(); - } - - EndPanel(); - } - - if (m_Material.HasProperty("_SpecularColor")) - { - s_Lighting = BeginPanel("Lighting", s_BevelFeature, s_Lighting); - if (s_Lighting) - { - s_Bevel = BeginPanel("Bevel", s_Bevel); - if (s_Bevel) - { - DoBevelPanel(); - } - - EndPanel(); - - s_Light = BeginPanel("Local Lighting", s_Light); - if (s_Light) - { - DoLocalLightingPanel(); - } - - EndPanel(); - - s_Bump = BeginPanel("Bump Map", s_Bump); - if (s_Bump) - { - DoBumpMapPanel(); - } - - EndPanel(); - - s_Env = BeginPanel("Environment Map", s_Env); - if (s_Env) - { - DoEnvMapPanel(); - } - - EndPanel(); - } - - EndPanel(); - } - else if (m_Material.HasProperty("_SpecColor")) - { - s_Bevel = BeginPanel("Bevel", s_Bevel); - if (s_Bevel) - { - DoBevelPanel(); - } - - EndPanel(); - - s_Light = BeginPanel("Surface Lighting", s_Light); - if (s_Light) - { - DoSurfaceLightingPanel(); - } - - EndPanel(); - - s_Bump = BeginPanel("Bump Map", s_Bump); - if (s_Bump) - { - DoBumpMapPanel(); - } - - EndPanel(); - - s_Env = BeginPanel("Environment Map", s_Env); - if (s_Env) - { - DoEnvMapPanel(); - } - - EndPanel(); - } - - if (m_Material.HasProperty(ShaderUtilities.ID_GlowColor)) - { - s_Glow = BeginPanel("Glow", s_GlowFeature, s_Glow); - if (s_Glow) - { - DoGlowPanel(); - } - - EndPanel(); - } - - s_DebugExtended = BeginPanel("Debug Settings", s_DebugExtended); - if (s_DebugExtended) - { - DoDebugPanel(); - } - - EndPanel(); - } - - void DoFacePanel() - { - EditorGUI.indentLevel += 1; - DoColor("_FaceColor", "Color"); - if (m_Material.HasProperty(ShaderUtilities.ID_FaceTex)) - { - if (m_Material.HasProperty("_FaceUVSpeedX")) - { - DoTexture2D("_FaceTex", "Texture", true, s_FaceUvSpeedNames); - } - else - { - DoTexture2D("_FaceTex", "Texture", true); - } - } - - DoSlider("_OutlineSoftness", "Softness"); - DoSlider("_FaceDilate", "Dilate"); - if (m_Material.HasProperty(ShaderUtilities.ID_Shininess)) - { - DoSlider("_FaceShininess", "Gloss"); - } - - EditorGUI.indentLevel -= 1; - EditorGUILayout.Space(); - } - - void DoOutlinePanel() - { - EditorGUI.indentLevel += 1; - DoColor("_OutlineColor", "Color"); - if (m_Material.HasProperty(ShaderUtilities.ID_OutlineTex)) - { - if (m_Material.HasProperty("_OutlineUVSpeedX")) - { - DoTexture2D("_OutlineTex", "Texture", true, s_OutlineUvSpeedNames); - } - else - { - DoTexture2D("_OutlineTex", "Texture", true); - } - } - - DoSlider("_OutlineWidth", "Thickness"); - if (m_Material.HasProperty("_OutlineShininess")) - { - DoSlider("_OutlineShininess", "Gloss"); - } - - EditorGUI.indentLevel -= 1; - EditorGUILayout.Space(); - } - - void DoUnderlayPanel() - { - EditorGUI.indentLevel += 1; - s_UnderlayFeature.DoPopup(m_Editor, m_Material); - DoColor("_UnderlayColor", "Color"); - DoSlider("_UnderlayOffsetX", "Offset X"); - DoSlider("_UnderlayOffsetY", "Offset Y"); - DoSlider("_UnderlayDilate", "Dilate"); - DoSlider("_UnderlaySoftness", "Softness"); - EditorGUI.indentLevel -= 1; - EditorGUILayout.Space(); - } - - static GUIContent[] s_BevelTypeLabels = - { - new GUIContent("Outer Bevel"), - new GUIContent("Inner Bevel") - }; - - void DoBevelPanel() - { - EditorGUI.indentLevel += 1; - DoPopup("_ShaderFlags", "Type", s_BevelTypeLabels); - DoSlider("_Bevel", "Amount"); - DoSlider("_BevelOffset", "Offset"); - DoSlider("_BevelWidth", "Width"); - DoSlider("_BevelRoundness", "Roundness"); - DoSlider("_BevelClamp", "Clamp"); - EditorGUI.indentLevel -= 1; - EditorGUILayout.Space(); - } - - void DoLocalLightingPanel() - { - EditorGUI.indentLevel += 1; - DoSlider("_LightAngle", "Light Angle"); - DoColor("_SpecularColor", "Specular Color"); - DoSlider("_SpecularPower", "Specular Power"); - DoSlider("_Reflectivity", "Reflectivity Power"); - DoSlider("_Diffuse", "Diffuse Shadow"); - DoSlider("_Ambient", "Ambient Shadow"); - EditorGUI.indentLevel -= 1; - EditorGUILayout.Space(); - } - - void DoSurfaceLightingPanel() - { - EditorGUI.indentLevel += 1; - DoColor("_SpecColor", "Specular Color"); - EditorGUI.indentLevel -= 1; - EditorGUILayout.Space(); - } - - void DoBumpMapPanel() - { - EditorGUI.indentLevel += 1; - DoTexture2D("_BumpMap", "Texture"); - DoSlider("_BumpFace", "Face"); - DoSlider("_BumpOutline", "Outline"); - EditorGUI.indentLevel -= 1; - EditorGUILayout.Space(); - } - - void DoEnvMapPanel() - { - EditorGUI.indentLevel += 1; - DoColor("_ReflectFaceColor", "Face Color"); - DoColor("_ReflectOutlineColor", "Outline Color"); - DoCubeMap("_Cube", "Texture"); - DoVector3("_EnvMatrixRotation", "Rotation"); - EditorGUI.indentLevel -= 1; - EditorGUILayout.Space(); - } - - void DoGlowPanel() - { - EditorGUI.indentLevel += 1; - DoColor("_GlowColor", "Color"); - DoSlider("_GlowOffset", "Offset"); - DoSlider("_GlowInner", "Inner"); - DoSlider("_GlowOuter", "Outer"); - DoSlider("_GlowPower", "Power"); - EditorGUI.indentLevel -= 1; - EditorGUILayout.Space(); - } - - void DoDebugPanel() - { - EditorGUI.indentLevel += 1; - DoTexture2D("_MainTex", "Font Atlas"); - DoFloat("_GradientScale", "Gradient Scale"); - DoFloat("_TextureWidth", "Texture Width"); - DoFloat("_TextureHeight", "Texture Height"); - EditorGUILayout.Space(); - DoFloat("_ScaleX", "Scale X"); - DoFloat("_ScaleY", "Scale Y"); - - if (m_Material.HasProperty(ShaderUtilities.ID_Sharpness)) - DoSlider("_Sharpness", "Sharpness"); - - DoSlider("_PerspectiveFilter", "Perspective Filter"); - EditorGUILayout.Space(); - DoFloat("_VertexOffsetX", "Offset X"); - DoFloat("_VertexOffsetY", "Offset Y"); - - if (m_Material.HasProperty(ShaderUtilities.ID_MaskCoord)) - { - EditorGUILayout.Space(); - s_MaskFeature.ReadState(m_Material); - s_MaskFeature.DoPopup(m_Editor, m_Material); - if (s_MaskFeature.Active) - { - DoMaskSubgroup(); - } - - EditorGUILayout.Space(); - DoVector("_ClipRect", "Clip Rect", s_LbrtVectorLabels); - } - else if (m_Material.HasProperty("_MaskTex")) - { - DoMaskTexSubgroup(); - } - else if (m_Material.HasProperty(ShaderUtilities.ID_MaskSoftnessX)) - { - EditorGUILayout.Space(); - DoFloat("_MaskSoftnessX", "Softness X"); - DoFloat("_MaskSoftnessY", "Softness Y"); - DoVector("_ClipRect", "Clip Rect", s_LbrtVectorLabels); - } - - if (m_Material.HasProperty(ShaderUtilities.ID_StencilID)) - { - EditorGUILayout.Space(); - DoFloat("_Stencil", "Stencil ID"); - DoFloat("_StencilComp", "Stencil Comp"); - } - - EditorGUILayout.Space(); - - EditorGUI.BeginChangeCheck(); - bool useRatios = EditorGUILayout.Toggle("Use Ratios", !m_Material.IsKeywordEnabled("RATIOS_OFF")); - if (EditorGUI.EndChangeCheck()) - { - m_Editor.RegisterPropertyChangeUndo("Use Ratios"); - if (useRatios) - { - m_Material.DisableKeyword("RATIOS_OFF"); - } - else - { - m_Material.EnableKeyword("RATIOS_OFF"); - } - } - - EditorGUI.BeginDisabledGroup(true); - DoFloat("_ScaleRatioA", "Scale Ratio A"); - DoFloat("_ScaleRatioB", "Scale Ratio B"); - DoFloat("_ScaleRatioC", "Scale Ratio C"); - EditorGUI.EndDisabledGroup(); - EditorGUI.indentLevel -= 1; - EditorGUILayout.Space(); - } - - void DoMaskSubgroup() - { - DoVector("_MaskCoord", "Mask Bounds", s_XywhVectorLabels); - if (Selection.activeGameObject != null) - { - Renderer renderer = Selection.activeGameObject.GetComponent(); - if (renderer != null) - { - Rect rect = EditorGUILayout.GetControlRect(); - rect.x += EditorGUIUtility.labelWidth; - rect.width -= EditorGUIUtility.labelWidth; - if (GUI.Button(rect, "Match Renderer Bounds")) - { - FindProperty("_MaskCoord", m_Properties).vectorValue = new Vector4( - 0, - 0, - Mathf.Round(renderer.bounds.extents.x * 1000) / 1000, - Mathf.Round(renderer.bounds.extents.y * 1000) / 1000 - ); - } - } - } - - if (s_MaskFeature.State == 1) - { - DoFloat("_MaskSoftnessX", "Softness X"); - DoFloat("_MaskSoftnessY", "Softness Y"); - } - } - - void DoMaskTexSubgroup() - { - EditorGUILayout.Space(); - DoTexture2D("_MaskTex", "Mask Texture"); - DoToggle("_MaskInverse", "Inverse Mask"); - DoColor("_MaskEdgeColor", "Edge Color"); - DoSlider("_MaskEdgeSoftness", "Edge Softness"); - DoSlider("_MaskWipeControl", "Wipe Position"); - DoFloat("_MaskSoftnessX", "Softness X"); - DoFloat("_MaskSoftnessY", "Softness Y"); - DoVector("_ClipRect", "Clip Rect", s_LbrtVectorLabels); - } - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SDFShaderGUI.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SDFShaderGUI.cs.meta deleted file mode 100644 index c643afa1..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SDFShaderGUI.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 8413ca0e506d42a1a4bd9769f204ad16 -timeCreated: 1469844718 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SerializedPropertyHolder.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SerializedPropertyHolder.cs deleted file mode 100644 index 2ba34d69..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SerializedPropertyHolder.cs +++ /dev/null @@ -1,14 +0,0 @@ -using UnityEngine; -using UnityEditor; - -namespace TMPro -{ - class TMP_SerializedPropertyHolder : ScriptableObject - { - public TMP_FontAsset fontAsset; - public uint firstCharacter; - public uint secondCharacter; - - public TMP_GlyphPairAdjustmentRecord glyphPairAdjustmentRecord = new TMP_GlyphPairAdjustmentRecord(new TMP_GlyphAdjustmentRecord(), new TMP_GlyphAdjustmentRecord()); - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SerializedPropertyHolder.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SerializedPropertyHolder.cs.meta deleted file mode 100644 index cde31db9..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SerializedPropertyHolder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9c4a050f089abb04ebd4125e419f4548 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SettingsEditor.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SettingsEditor.cs deleted file mode 100644 index 571c9cd3..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SettingsEditor.cs +++ /dev/null @@ -1,341 +0,0 @@ -using System.Collections.Generic; -using UnityEngine; -using UnityEditor; -using UnityEditorInternal; - -#pragma warning disable 0414 // Disabled a few warnings for not yet implemented features. - -namespace TMPro.EditorUtilities -{ - [CustomEditor(typeof(TMP_Settings))] - public class TMP_SettingsEditor : Editor - { - internal class Styles - { - public static readonly GUIContent defaultFontAssetLabel = new GUIContent("Default Font Asset", "The Font Asset that will be assigned by default to newly created text objects when no Font Asset is specified."); - public static readonly GUIContent defaultFontAssetPathLabel = new GUIContent("Path: Resources/", "The relative path to a Resources folder where the Font Assets and Material Presets are located.\nExample \"Fonts & Materials/\""); - - public static readonly GUIContent fallbackFontAssetsLabel = new GUIContent("Fallback Font Assets", "The Font Assets that will be searched to locate and replace missing characters from a given Font Asset."); - public static readonly GUIContent fallbackFontAssetsListLabel = new GUIContent("Fallback Font Assets List", "The Font Assets that will be searched to locate and replace missing characters from a given Font Asset."); - - public static readonly GUIContent fallbackMaterialSettingsLabel = new GUIContent("Fallback Material Settings"); - public static readonly GUIContent matchMaterialPresetLabel = new GUIContent("Match Material Presets"); - - public static readonly GUIContent containerDefaultSettingsLabel = new GUIContent("Text Container Default Settings"); - - public static readonly GUIContent textMeshProLabel = new GUIContent("TextMeshPro"); - public static readonly GUIContent textMeshProUiLabel = new GUIContent("TextMeshPro UI"); - public static readonly GUIContent enableRaycastTarget = new GUIContent("Enable Raycast Target"); - public static readonly GUIContent autoSizeContainerLabel = new GUIContent("Auto Size Text Container", "Set the size of the text container to match the text."); - - public static readonly GUIContent textComponentDefaultSettingsLabel = new GUIContent("Text Component Default Settings"); - public static readonly GUIContent defaultFontSize = new GUIContent("Default Font Size"); - public static readonly GUIContent autoSizeRatioLabel = new GUIContent("Text Auto Size Ratios"); - public static readonly GUIContent minLabel = new GUIContent("Min"); - public static readonly GUIContent maxLabel = new GUIContent("Max"); - - public static readonly GUIContent wordWrappingLabel = new GUIContent("Word Wrapping"); - public static readonly GUIContent kerningLabel = new GUIContent("Kerning"); - public static readonly GUIContent extraPaddingLabel = new GUIContent("Extra Padding"); - public static readonly GUIContent tintAllSpritesLabel = new GUIContent("Tint All Sprites"); - public static readonly GUIContent parseEscapeCharactersLabel = new GUIContent("Parse Escape Sequence"); - - public static readonly GUIContent dynamicFontSystemSettingsLabel = new GUIContent("Dynamic Font System Settings"); - public static readonly GUIContent getFontFeaturesAtRuntime = new GUIContent("Get Font Features at Runtime", "Determines if Glyph Adjustment Data will be retrieved from font files at runtime when new characters and glyphs are added to font assets."); - - public static readonly GUIContent missingGlyphLabel = new GUIContent("Replacement Character", "The character to be displayed when the requested character is not found in any font asset or fallbacks."); - public static readonly GUIContent disableWarningsLabel = new GUIContent("Disable warnings", "Disable warning messages in the Console."); - - public static readonly GUIContent defaultSpriteAssetLabel = new GUIContent("Default Sprite Asset", "The Sprite Asset that will be assigned by default when using the tag when no Sprite Asset is specified."); - public static readonly GUIContent enableEmojiSupportLabel = new GUIContent("iOS Emoji Support", "Enables Emoji support for Touch Screen Keyboards on target devices."); - public static readonly GUIContent spriteAssetsPathLabel = new GUIContent("Path: Resources/", "The relative path to a Resources folder where the Sprite Assets are located.\nExample \"Sprite Assets/\""); - - public static readonly GUIContent defaultStyleSheetLabel = new GUIContent("Default Style Sheet", "The Style Sheet that will be used for all text objects in this project."); - - public static readonly GUIContent colorGradientPresetsLabel = new GUIContent("Color Gradient Presets", "The relative path to a Resources folder where the Color Gradient Presets are located.\nExample \"Color Gradient Presets/\""); - public static readonly GUIContent colorGradientsPathLabel = new GUIContent("Path: Resources/", "The relative path to a Resources folder where the Color Gradient Presets are located.\nExample \"Color Gradient Presets/\""); - - public static readonly GUIContent lineBreakingLabel = new GUIContent("Line Breaking for Asian languages", "The text assets that contain the Leading and Following characters which define the rules for line breaking with Asian languages."); - } - - SerializedProperty m_PropFontAsset; - SerializedProperty m_PropDefaultFontAssetPath; - SerializedProperty m_PropDefaultFontSize; - SerializedProperty m_PropDefaultAutoSizeMinRatio; - SerializedProperty m_PropDefaultAutoSizeMaxRatio; - SerializedProperty m_PropDefaultTextMeshProTextContainerSize; - SerializedProperty m_PropDefaultTextMeshProUITextContainerSize; - SerializedProperty m_PropAutoSizeTextContainer; - SerializedProperty m_PropEnableRaycastTarget; - - SerializedProperty m_PropSpriteAsset; - SerializedProperty m_PropSpriteAssetPath; - SerializedProperty m_PropEnableEmojiSupport; - SerializedProperty m_PropStyleSheet; - ReorderableList m_List; - - SerializedProperty m_PropColorGradientPresetsPath; - - SerializedProperty m_PropMatchMaterialPreset; - SerializedProperty m_PropWordWrapping; - SerializedProperty m_PropKerning; - SerializedProperty m_PropExtraPadding; - SerializedProperty m_PropTintAllSprites; - SerializedProperty m_PropParseEscapeCharacters; - SerializedProperty m_PropMissingGlyphCharacter; - - SerializedProperty m_GetFontFeaturesAtRuntime; - - SerializedProperty m_PropWarningsDisabled; - - SerializedProperty m_PropLeadingCharacters; - SerializedProperty m_PropFollowingCharacters; - - public void OnEnable() - { - if (target == null) - return; - - m_PropFontAsset = serializedObject.FindProperty("m_defaultFontAsset"); - m_PropDefaultFontAssetPath = serializedObject.FindProperty("m_defaultFontAssetPath"); - m_PropDefaultFontSize = serializedObject.FindProperty("m_defaultFontSize"); - m_PropDefaultAutoSizeMinRatio = serializedObject.FindProperty("m_defaultAutoSizeMinRatio"); - m_PropDefaultAutoSizeMaxRatio = serializedObject.FindProperty("m_defaultAutoSizeMaxRatio"); - m_PropDefaultTextMeshProTextContainerSize = serializedObject.FindProperty("m_defaultTextMeshProTextContainerSize"); - m_PropDefaultTextMeshProUITextContainerSize = serializedObject.FindProperty("m_defaultTextMeshProUITextContainerSize"); - m_PropAutoSizeTextContainer = serializedObject.FindProperty("m_autoSizeTextContainer"); - m_PropEnableRaycastTarget = serializedObject.FindProperty("m_EnableRaycastTarget"); - - m_PropSpriteAsset = serializedObject.FindProperty("m_defaultSpriteAsset"); - m_PropSpriteAssetPath = serializedObject.FindProperty("m_defaultSpriteAssetPath"); - m_PropEnableEmojiSupport = serializedObject.FindProperty("m_enableEmojiSupport"); - m_PropStyleSheet = serializedObject.FindProperty("m_defaultStyleSheet"); - m_PropColorGradientPresetsPath = serializedObject.FindProperty("m_defaultColorGradientPresetsPath"); - - m_List = new ReorderableList(serializedObject, serializedObject.FindProperty("m_fallbackFontAssets"), true, true, true, true); - - m_List.drawElementCallback = (rect, index, isActive, isFocused) => - { - var element = m_List.serializedProperty.GetArrayElementAtIndex(index); - rect.y += 2; - EditorGUI.PropertyField(new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight), element, GUIContent.none); - }; - - m_List.drawHeaderCallback = rect => - { - EditorGUI.LabelField(rect, Styles.fallbackFontAssetsListLabel); - }; - - m_PropMatchMaterialPreset = serializedObject.FindProperty("m_matchMaterialPreset"); - - m_PropWordWrapping = serializedObject.FindProperty("m_enableWordWrapping"); - m_PropKerning = serializedObject.FindProperty("m_enableKerning"); - m_PropExtraPadding = serializedObject.FindProperty("m_enableExtraPadding"); - m_PropTintAllSprites = serializedObject.FindProperty("m_enableTintAllSprites"); - m_PropParseEscapeCharacters = serializedObject.FindProperty("m_enableParseEscapeCharacters"); - m_PropMissingGlyphCharacter = serializedObject.FindProperty("m_missingGlyphCharacter"); - - m_PropWarningsDisabled = serializedObject.FindProperty("m_warningsDisabled"); - - m_GetFontFeaturesAtRuntime = serializedObject.FindProperty("m_GetFontFeaturesAtRuntime"); - - m_PropLeadingCharacters = serializedObject.FindProperty("m_leadingCharacters"); - m_PropFollowingCharacters = serializedObject.FindProperty("m_followingCharacters"); - } - - public override void OnInspectorGUI() - { - serializedObject.Update(); - - float labelWidth = EditorGUIUtility.labelWidth; - float fieldWidth = EditorGUIUtility.fieldWidth; - - // TextMeshPro Font Info Panel - EditorGUI.indentLevel = 0; - - // FONT ASSET - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - GUILayout.Label(Styles.defaultFontAssetLabel, EditorStyles.boldLabel); - EditorGUI.indentLevel = 1; - EditorGUILayout.PropertyField(m_PropFontAsset, Styles.defaultFontAssetLabel); - EditorGUILayout.PropertyField(m_PropDefaultFontAssetPath, Styles.defaultFontAssetPathLabel); - EditorGUI.indentLevel = 0; - - EditorGUILayout.Space(); - EditorGUILayout.EndVertical(); - - // FALLBACK FONT ASSETs - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - GUILayout.Label(Styles.fallbackFontAssetsLabel, EditorStyles.boldLabel); - m_List.DoLayoutList(); - - GUILayout.Label(Styles.fallbackMaterialSettingsLabel, EditorStyles.boldLabel); - EditorGUI.indentLevel = 1; - EditorGUILayout.PropertyField(m_PropMatchMaterialPreset, Styles.matchMaterialPresetLabel); - EditorGUI.indentLevel = 0; - - EditorGUILayout.Space(); - EditorGUILayout.EndVertical(); - - // MISSING GLYPHS - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - GUILayout.Label(Styles.dynamicFontSystemSettingsLabel, EditorStyles.boldLabel); - EditorGUI.indentLevel = 1; - EditorGUILayout.PropertyField(m_GetFontFeaturesAtRuntime, Styles.getFontFeaturesAtRuntime); - EditorGUILayout.PropertyField(m_PropMissingGlyphCharacter, Styles.missingGlyphLabel); - EditorGUILayout.PropertyField(m_PropWarningsDisabled, Styles.disableWarningsLabel); - EditorGUI.indentLevel = 0; - - EditorGUILayout.Space(); - EditorGUILayout.EndVertical(); - - // TEXT OBJECT DEFAULT PROPERTIES - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - GUILayout.Label(Styles.containerDefaultSettingsLabel, EditorStyles.boldLabel); - EditorGUI.indentLevel = 1; - - EditorGUILayout.PropertyField(m_PropDefaultTextMeshProTextContainerSize, Styles.textMeshProLabel); - EditorGUILayout.PropertyField(m_PropDefaultTextMeshProUITextContainerSize, Styles.textMeshProUiLabel); - EditorGUILayout.PropertyField(m_PropEnableRaycastTarget, Styles.enableRaycastTarget); - EditorGUILayout.PropertyField(m_PropAutoSizeTextContainer, Styles.autoSizeContainerLabel); - EditorGUI.indentLevel = 0; - - EditorGUILayout.Space(); - - GUILayout.Label(Styles.textComponentDefaultSettingsLabel, EditorStyles.boldLabel); - EditorGUI.indentLevel = 1; - EditorGUILayout.PropertyField(m_PropDefaultFontSize, Styles.defaultFontSize); - - EditorGUILayout.BeginHorizontal(); - { - EditorGUILayout.PrefixLabel(Styles.autoSizeRatioLabel); - EditorGUIUtility.labelWidth = 32; - EditorGUIUtility.fieldWidth = 10; - - EditorGUI.indentLevel = 0; - EditorGUILayout.PropertyField(m_PropDefaultAutoSizeMinRatio, Styles.minLabel); - EditorGUILayout.PropertyField(m_PropDefaultAutoSizeMaxRatio, Styles.maxLabel); - EditorGUI.indentLevel = 1; - } - EditorGUILayout.EndHorizontal(); - - EditorGUIUtility.labelWidth = labelWidth; - EditorGUIUtility.fieldWidth = fieldWidth; - - EditorGUILayout.PropertyField(m_PropWordWrapping, Styles.wordWrappingLabel); - EditorGUILayout.PropertyField(m_PropKerning, Styles.kerningLabel); - - EditorGUILayout.PropertyField(m_PropExtraPadding, Styles.extraPaddingLabel); - EditorGUILayout.PropertyField(m_PropTintAllSprites, Styles.tintAllSpritesLabel); - - EditorGUILayout.PropertyField(m_PropParseEscapeCharacters, Styles.parseEscapeCharactersLabel); - - EditorGUI.indentLevel = 0; - - EditorGUILayout.Space(); - EditorGUILayout.EndVertical(); - - // SPRITE ASSET - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - GUILayout.Label(Styles.defaultSpriteAssetLabel, EditorStyles.boldLabel); - EditorGUI.indentLevel = 1; - EditorGUILayout.PropertyField(m_PropSpriteAsset, Styles.defaultSpriteAssetLabel); - EditorGUILayout.PropertyField(m_PropEnableEmojiSupport, Styles.enableEmojiSupportLabel); - EditorGUILayout.PropertyField(m_PropSpriteAssetPath, Styles.spriteAssetsPathLabel); - EditorGUI.indentLevel = 0; - - EditorGUILayout.Space(); - EditorGUILayout.EndVertical(); - - // STYLE SHEET - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - GUILayout.Label(Styles.defaultStyleSheetLabel, EditorStyles.boldLabel); - EditorGUI.indentLevel = 1; - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(m_PropStyleSheet, Styles.defaultStyleSheetLabel); - if (EditorGUI.EndChangeCheck()) - { - serializedObject.ApplyModifiedProperties(); - TMP_StyleSheet.UpdateStyleSheet(); - } - EditorGUI.indentLevel = 0; - - EditorGUILayout.Space(); - EditorGUILayout.EndVertical(); - - // COLOR GRADIENT PRESETS - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - GUILayout.Label(Styles.colorGradientPresetsLabel, EditorStyles.boldLabel); - EditorGUI.indentLevel = 1; - EditorGUILayout.PropertyField(m_PropColorGradientPresetsPath, Styles.colorGradientsPathLabel); - EditorGUI.indentLevel = 0; - - EditorGUILayout.Space(); - EditorGUILayout.EndVertical(); - - // LINE BREAKING RULE - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - GUILayout.Label(Styles.lineBreakingLabel, EditorStyles.boldLabel); - EditorGUI.indentLevel = 1; - EditorGUILayout.PropertyField(m_PropLeadingCharacters); - EditorGUILayout.PropertyField(m_PropFollowingCharacters); - EditorGUI.indentLevel = 0; - - EditorGUILayout.Space(); - EditorGUILayout.EndVertical(); - - if (serializedObject.ApplyModifiedProperties()) - { - EditorUtility.SetDirty(target); - TMPro_EventManager.ON_TMP_SETTINGS_CHANGED(); - } - } - } - -#if UNITY_2018_3_OR_NEWER - class TMP_ResourceImporterProvider : SettingsProvider - { - TMP_PackageResourceImporter m_ResourceImporter; - - public TMP_ResourceImporterProvider() - : base("Project/TextMesh Pro", SettingsScope.Project) - { - } - - public override void OnGUI(string searchContext) - { - // Lazy creation that supports domain reload - if (m_ResourceImporter == null) - m_ResourceImporter = new TMP_PackageResourceImporter(); - - m_ResourceImporter.OnGUI(); - } - - public override void OnDeactivate() - { - if (m_ResourceImporter != null) - m_ResourceImporter.OnDestroy(); - } - - static UnityEngine.Object GetTMPSettings() - { - return Resources.Load("TMP Settings"); - } - - [SettingsProviderGroup] - static SettingsProvider[] CreateTMPSettingsProvider() - { - var providers = new List { new TMP_ResourceImporterProvider() }; - - if (GetTMPSettings() != null) - { - var provider = new AssetSettingsProvider("Project/TextMesh Pro/Settings", GetTMPSettings); - provider.PopulateSearchKeywordsFromGUIContentProperties(); - providers.Add(provider); - } - - return providers.ToArray(); - } - } -#endif -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SettingsEditor.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SettingsEditor.cs.meta deleted file mode 100644 index a719ae77..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SettingsEditor.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 0386b6eb838c47138cd51d1c1b879a35 -timeCreated: 1436658550 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteAssetEditor.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteAssetEditor.cs deleted file mode 100644 index 4df588ef..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteAssetEditor.cs +++ /dev/null @@ -1,896 +0,0 @@ -using UnityEngine; -using UnityEngine.TextCore; -using UnityEditor; -using UnityEditorInternal; -using System.Collections.Generic; - - - - -namespace TMPro.EditorUtilities -{ - - [CustomEditor(typeof(TMP_SpriteAsset))] - public class TMP_SpriteAssetEditor : Editor - { - struct UI_PanelState - { - public static bool spriteAssetInfoPanel = true; - public static bool fallbackSpriteAssetPanel = true; - public static bool spriteCharacterTablePanel; - public static bool spriteGlyphTablePanel; - } - - private static string[] s_UiStateLabel = new string[] { "(Click to collapse) ", "(Click to expand) " }; - - int m_moveToIndex; - int m_selectedElement = -1; - int m_CurrentCharacterPage; - int m_CurrentGlyphPage; - - const string k_UndoRedo = "UndoRedoPerformed"; - - string m_CharacterSearchPattern; - List m_CharacterSearchList; - bool m_IsCharacterSearchDirty; - - string m_GlyphSearchPattern; - List m_GlyphSearchList; - bool m_IsGlyphSearchDirty; - - SerializedProperty m_spriteAtlas_prop; - SerializedProperty m_material_prop; - SerializedProperty m_SpriteCharacterTableProperty; - SerializedProperty m_SpriteGlyphTableProperty; - ReorderableList m_fallbackSpriteAssetList; - - TMP_SpriteAsset m_SpriteAsset; - - bool isAssetDirty; - - float m_xOffset; - float m_yOffset; - float m_xAdvance; - float m_scale; - - public void OnEnable() - { - m_SpriteAsset = target as TMP_SpriteAsset; - - m_spriteAtlas_prop = serializedObject.FindProperty("spriteSheet"); - m_material_prop = serializedObject.FindProperty("material"); - m_SpriteCharacterTableProperty = serializedObject.FindProperty("m_SpriteCharacterTable"); - m_SpriteGlyphTableProperty = serializedObject.FindProperty("m_SpriteGlyphTable"); - - // Fallback TMP Sprite Asset list - m_fallbackSpriteAssetList = new ReorderableList(serializedObject, serializedObject.FindProperty("fallbackSpriteAssets"), true, true, true, true); - - m_fallbackSpriteAssetList.drawElementCallback = (Rect rect, int index, bool isActive, bool isFocused) => - { - var element = m_fallbackSpriteAssetList.serializedProperty.GetArrayElementAtIndex(index); - rect.y += 2; - EditorGUI.PropertyField(new Rect(rect.x, rect.y, rect.width, EditorGUIUtility.singleLineHeight), element, GUIContent.none); - }; - - m_fallbackSpriteAssetList.drawHeaderCallback = rect => - { - EditorGUI.LabelField(rect, new GUIContent("Fallback Sprite Asset List", "Select the Sprite Assets that will be searched and used as fallback when a given sprite is missing from this sprite asset.")); - }; - } - - - public override void OnInspectorGUI() - { - - //Debug.Log("OnInspectorGUI Called."); - Event currentEvent = Event.current; - string evt_cmd = currentEvent.commandName; // Get Current Event CommandName to check for Undo Events - - serializedObject.Update(); - - Rect rect; - - // TEXTMESHPRO SPRITE INFO PANEL - GUILayout.Label("Sprite Info", EditorStyles.boldLabel); - EditorGUI.indentLevel = 1; - - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(m_spriteAtlas_prop , new GUIContent("Sprite Atlas")); - if (EditorGUI.EndChangeCheck()) - { - // Assign the new sprite atlas texture to the current material - Texture2D tex = m_spriteAtlas_prop.objectReferenceValue as Texture2D; - if (tex != null) - { - Material mat = m_material_prop.objectReferenceValue as Material; - if (mat != null) - mat.mainTexture = tex; - } - } - - EditorGUILayout.PropertyField(m_material_prop, new GUIContent("Default Material")); - - EditorGUILayout.Space(); - - // FALLBACK SPRITE ASSETS - EditorGUI.indentLevel = 0; - UI_PanelState.fallbackSpriteAssetPanel = EditorGUILayout.Foldout(UI_PanelState.fallbackSpriteAssetPanel, new GUIContent("Fallback Sprite Assets", "Select the Sprite Assets that will be searched and used as fallback when a given sprite is missing from this sprite asset."), true, TMP_UIStyleManager.boldFoldout); - - if (UI_PanelState.fallbackSpriteAssetPanel) - { - m_fallbackSpriteAssetList.DoLayoutList(); - } - - // SPRITE CHARACTER TABLE - #region Display Sprite Character Table - EditorGUI.indentLevel = 0; - rect = EditorGUILayout.GetControlRect(false, 24); - - if (GUI.Button(rect, new GUIContent("Sprite Character Table", "List of sprite characters contained in this sprite asset."), TMP_UIStyleManager.sectionHeader)) - UI_PanelState.spriteCharacterTablePanel = !UI_PanelState.spriteCharacterTablePanel; - - GUI.Label(rect, (UI_PanelState.spriteCharacterTablePanel ? "" : s_UiStateLabel[1]), TMP_UIStyleManager.rightLabel); - - if (UI_PanelState.spriteCharacterTablePanel) - { - int arraySize = m_SpriteCharacterTableProperty.arraySize; - int itemsPerPage = 10; - - // Display Glyph Management Tools - EditorGUILayout.BeginVertical(EditorStyles.helpBox, GUILayout.ExpandWidth(true)); - { - // Search Bar implementation - #region DISPLAY SEARCH BAR - EditorGUILayout.BeginHorizontal(); - { - EditorGUIUtility.labelWidth = 110f; - EditorGUI.BeginChangeCheck(); - string searchPattern = EditorGUILayout.TextField("Sprite Search", m_CharacterSearchPattern, "SearchTextField"); - if (EditorGUI.EndChangeCheck() || m_IsCharacterSearchDirty) - { - if (string.IsNullOrEmpty(searchPattern) == false) - { - //GUIUtility.keyboardControl = 0; - m_CharacterSearchPattern = searchPattern.ToLower(System.Globalization.CultureInfo.InvariantCulture).Trim(); - - // Search Glyph Table for potential matches - SearchCharacterTable(m_CharacterSearchPattern, ref m_CharacterSearchList); - } - else - m_CharacterSearchPattern = null; - - m_IsCharacterSearchDirty = false; - } - - string styleName = string.IsNullOrEmpty(m_CharacterSearchPattern) ? "SearchCancelButtonEmpty" : "SearchCancelButton"; - if (GUILayout.Button(GUIContent.none, styleName)) - { - GUIUtility.keyboardControl = 0; - m_CharacterSearchPattern = string.Empty; - } - } - EditorGUILayout.EndHorizontal(); - #endregion - - // Display Page Navigation - if (!string.IsNullOrEmpty(m_CharacterSearchPattern)) - arraySize = m_CharacterSearchList.Count; - - // Display Page Navigation - DisplayPageNavigation(ref m_CurrentCharacterPage, arraySize, itemsPerPage); - } - EditorGUILayout.EndVertical(); - - if (arraySize > 0) - { - // Display each SpriteInfo entry using the SpriteInfo property drawer. - for (int i = itemsPerPage * m_CurrentCharacterPage; i < arraySize && i < itemsPerPage * (m_CurrentCharacterPage + 1); i++) - { - // Define the start of the selection region of the element. - Rect elementStartRegion = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); - - int elementIndex = i; - if (!string.IsNullOrEmpty(m_CharacterSearchPattern)) - elementIndex = m_CharacterSearchList[i]; - - SerializedProperty spriteCharacterProperty = m_SpriteCharacterTableProperty.GetArrayElementAtIndex(elementIndex); - - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - { - EditorGUI.BeginDisabledGroup(i != m_selectedElement); - { - EditorGUILayout.PropertyField(spriteCharacterProperty); - } - EditorGUI.EndDisabledGroup(); - } - EditorGUILayout.EndVertical(); - - // Define the end of the selection region of the element. - Rect elementEndRegion = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); - - // Check for Item selection - Rect selectionArea = new Rect(elementStartRegion.x, elementStartRegion.y, elementEndRegion.width, elementEndRegion.y - elementStartRegion.y); - if (DoSelectionCheck(selectionArea)) - { - if (m_selectedElement == i) - { - m_selectedElement = -1; - } - else - { - m_selectedElement = i; - GUIUtility.keyboardControl = 0; - } - } - - // Draw & Handle Section Area - if (m_selectedElement == i) - { - // Draw selection highlight - TMP_EditorUtility.DrawBox(selectionArea, 2f, new Color32(40, 192, 255, 255)); - - // Draw options to MoveUp, MoveDown, Add or Remove Sprites - Rect controlRect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight * 1f); - controlRect.width /= 8; - - // Move sprite up. - bool guiEnabled = GUI.enabled; - if (i == 0) { GUI.enabled = false; } - if (GUI.Button(controlRect, "Up")) - { - SwapCharacterElements(i, i - 1); - } - GUI.enabled = guiEnabled; - - // Move sprite down. - controlRect.x += controlRect.width; - if (i == arraySize - 1) { GUI.enabled = false; } - if (GUI.Button(controlRect, "Down")) - { - SwapCharacterElements(i, i + 1); - } - GUI.enabled = guiEnabled; - - // Move sprite to new index - controlRect.x += controlRect.width * 2; - //if (i == arraySize - 1) { GUI.enabled = false; } - m_moveToIndex = EditorGUI.IntField(controlRect, m_moveToIndex); - controlRect.x -= controlRect.width; - if (GUI.Button(controlRect, "Goto")) - { - MoveCharacterToIndex(i, m_moveToIndex); - } - //controlRect.x += controlRect.width; - GUI.enabled = guiEnabled; - - // Add new Sprite - controlRect.x += controlRect.width * 4; - if (GUI.Button(controlRect, "+")) - { - m_SpriteCharacterTableProperty.arraySize += 1; - - int index = m_SpriteCharacterTableProperty.arraySize - 1; - - SerializedProperty spriteInfo_prop = m_SpriteCharacterTableProperty.GetArrayElementAtIndex(index); - - // Copy properties of the selected element - CopyCharacterSerializedProperty(m_SpriteCharacterTableProperty.GetArrayElementAtIndex(elementIndex), ref spriteInfo_prop); - - //spriteInfo_prop.FindPropertyRelative("m_Index").intValue = index; - serializedObject.ApplyModifiedProperties(); - - m_IsCharacterSearchDirty = true; - } - - // Delete selected Sprite - controlRect.x += controlRect.width; - if (m_selectedElement == -1) GUI.enabled = false; - if (GUI.Button(controlRect, "-")) - { - m_SpriteCharacterTableProperty.DeleteArrayElementAtIndex(elementIndex); - - m_selectedElement = -1; - serializedObject.ApplyModifiedProperties(); - - m_IsCharacterSearchDirty = true; - - return; - } - - - } - } - } - - DisplayPageNavigation(ref m_CurrentCharacterPage, arraySize, itemsPerPage); - - EditorGUIUtility.labelWidth = 40f; - EditorGUIUtility.fieldWidth = 20f; - - GUILayout.Space(5f); - - // GLOBAL TOOLS - #region Global Tools - /* - GUI.enabled = true; - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - rect = EditorGUILayout.GetControlRect(false, 40); - - float width = (rect.width - 75f) / 4; - EditorGUI.LabelField(rect, "Global Offsets & Scale", EditorStyles.boldLabel); - - - rect.x += 70; - bool old_ChangedState = GUI.changed; - - GUI.changed = false; - m_xOffset = EditorGUI.FloatField(new Rect(rect.x + 5f + width * 0, rect.y + 20, width - 5f, 18), new GUIContent("OX:"), m_xOffset); - if (GUI.changed) UpdateGlobalProperty("m_HorizontalBearingX", m_xOffset); - - m_yOffset = EditorGUI.FloatField(new Rect(rect.x + 5f + width * 1, rect.y + 20, width - 5f, 18), new GUIContent("OY:"), m_yOffset); - if (GUI.changed) UpdateGlobalProperty("m_HorizontalBearingY", m_yOffset); - - m_xAdvance = EditorGUI.FloatField(new Rect(rect.x + 5f + width * 2, rect.y + 20, width - 5f, 18), new GUIContent("ADV."), m_xAdvance); - if (GUI.changed) UpdateGlobalProperty("m_HorizontalAdvance", m_xAdvance); - - m_scale = EditorGUI.FloatField(new Rect(rect.x + 5f + width * 3, rect.y + 20, width - 5f, 18), new GUIContent("SF."), m_scale); - if (GUI.changed) UpdateGlobalProperty("m_Scale", m_scale); - - EditorGUILayout.EndVertical(); - - GUI.changed = old_ChangedState; - */ - #endregion - - } - #endregion - - - // SPRITE GLYPH TABLE - #region Display Sprite Glyph Table - EditorGUI.indentLevel = 0; - rect = EditorGUILayout.GetControlRect(false, 24); - - if (GUI.Button(rect, new GUIContent("Sprite Glyph Table", "A list of the SpriteGlyphs contained in this sprite asset."), TMP_UIStyleManager.sectionHeader)) - UI_PanelState.spriteGlyphTablePanel = !UI_PanelState.spriteGlyphTablePanel; - - GUI.Label(rect, (UI_PanelState.spriteGlyphTablePanel ? "" : s_UiStateLabel[1]), TMP_UIStyleManager.rightLabel); - - if (UI_PanelState.spriteGlyphTablePanel) - { - int arraySize = m_SpriteGlyphTableProperty.arraySize; - int itemsPerPage = 10; - - // Display Glyph Management Tools - EditorGUILayout.BeginVertical(EditorStyles.helpBox, GUILayout.ExpandWidth(true)); - { - // Search Bar implementation - #region DISPLAY SEARCH BAR - EditorGUILayout.BeginHorizontal(); - { - EditorGUIUtility.labelWidth = 110f; - EditorGUI.BeginChangeCheck(); - string searchPattern = EditorGUILayout.TextField("Sprite Search", m_GlyphSearchPattern, "SearchTextField"); - if (EditorGUI.EndChangeCheck() || m_IsGlyphSearchDirty) - { - if (string.IsNullOrEmpty(searchPattern) == false) - { - //GUIUtility.keyboardControl = 0; - m_GlyphSearchPattern = searchPattern.ToLower(System.Globalization.CultureInfo.InvariantCulture).Trim(); - - // Search Glyph Table for potential matches - SearchCharacterTable(m_GlyphSearchPattern, ref m_GlyphSearchList); - } - else - m_GlyphSearchPattern = null; - - m_IsGlyphSearchDirty = false; - } - - string styleName = string.IsNullOrEmpty(m_GlyphSearchPattern) ? "SearchCancelButtonEmpty" : "SearchCancelButton"; - if (GUILayout.Button(GUIContent.none, styleName)) - { - GUIUtility.keyboardControl = 0; - m_GlyphSearchPattern = string.Empty; - } - } - EditorGUILayout.EndHorizontal(); - #endregion - - // Display Page Navigation - if (!string.IsNullOrEmpty(m_GlyphSearchPattern)) - arraySize = m_GlyphSearchList.Count; - - // Display Page Navigation - DisplayPageNavigation(ref m_CurrentGlyphPage, arraySize, itemsPerPage); - } - EditorGUILayout.EndVertical(); - - if (arraySize > 0) - { - // Display each SpriteInfo entry using the SpriteInfo property drawer. - for (int i = itemsPerPage * m_CurrentGlyphPage; i < arraySize && i < itemsPerPage * (m_CurrentGlyphPage + 1); i++) - { - // Define the start of the selection region of the element. - Rect elementStartRegion = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); - - int elementIndex = i; - if (!string.IsNullOrEmpty(m_GlyphSearchPattern)) - elementIndex = m_GlyphSearchList[i]; - - SerializedProperty spriteGlyphProperty = m_SpriteGlyphTableProperty.GetArrayElementAtIndex(elementIndex); - - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - { - EditorGUI.BeginDisabledGroup(i != m_selectedElement); - { - EditorGUILayout.PropertyField(spriteGlyphProperty); - } - EditorGUI.EndDisabledGroup(); - } - EditorGUILayout.EndVertical(); - - // Define the end of the selection region of the element. - Rect elementEndRegion = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); - - // Check for Item selection - Rect selectionArea = new Rect(elementStartRegion.x, elementStartRegion.y, elementEndRegion.width, elementEndRegion.y - elementStartRegion.y); - if (DoSelectionCheck(selectionArea)) - { - if (m_selectedElement == i) - { - m_selectedElement = -1; - } - else - { - m_selectedElement = i; - GUIUtility.keyboardControl = 0; - } - } - - // Draw & Handle Section Area - if (m_selectedElement == i) - { - // Draw selection highlight - TMP_EditorUtility.DrawBox(selectionArea, 2f, new Color32(40, 192, 255, 255)); - - // Draw options to MoveUp, MoveDown, Add or Remove Sprites - Rect controlRect = EditorGUILayout.GetControlRect(true, EditorGUIUtility.singleLineHeight * 1f); - controlRect.width /= 8; - - // Move sprite up. - bool guiEnabled = GUI.enabled; - if (i == 0) { GUI.enabled = false; } - if (GUI.Button(controlRect, "Up")) - { - SwapGlyphElements(i, i - 1); - } - GUI.enabled = guiEnabled; - - // Move sprite down. - controlRect.x += controlRect.width; - if (i == arraySize - 1) { GUI.enabled = false; } - if (GUI.Button(controlRect, "Down")) - { - SwapGlyphElements(i, i + 1); - } - GUI.enabled = guiEnabled; - - // Move sprite to new index - controlRect.x += controlRect.width * 2; - //if (i == arraySize - 1) { GUI.enabled = false; } - m_moveToIndex = EditorGUI.IntField(controlRect, m_moveToIndex); - controlRect.x -= controlRect.width; - if (GUI.Button(controlRect, "Goto")) - { - MoveGlyphToIndex(i, m_moveToIndex); - } - //controlRect.x += controlRect.width; - GUI.enabled = guiEnabled; - - // Add new Sprite - controlRect.x += controlRect.width * 4; - if (GUI.Button(controlRect, "+")) - { - m_SpriteGlyphTableProperty.arraySize += 1; - - int index = m_SpriteGlyphTableProperty.arraySize - 1; - - SerializedProperty newSpriteGlyphProperty = m_SpriteGlyphTableProperty.GetArrayElementAtIndex(index); - - // Copy properties of the selected element - CopyGlyphSerializedProperty(m_SpriteGlyphTableProperty.GetArrayElementAtIndex(elementIndex), ref newSpriteGlyphProperty); - - newSpriteGlyphProperty.FindPropertyRelative("m_Index").intValue = index; - - serializedObject.ApplyModifiedProperties(); - - m_IsGlyphSearchDirty = true; - - //m_SpriteAsset.UpdateLookupTables(); - } - - // Delete selected Sprite - controlRect.x += controlRect.width; - if (m_selectedElement == -1) GUI.enabled = false; - if (GUI.Button(controlRect, "-")) - { - SerializedProperty selectedSpriteGlyphProperty = m_SpriteGlyphTableProperty.GetArrayElementAtIndex(elementIndex); - - int selectedGlyphIndex = selectedSpriteGlyphProperty.FindPropertyRelative("m_Index").intValue; - - m_SpriteGlyphTableProperty.DeleteArrayElementAtIndex(elementIndex); - - // Remove all Sprite Characters referencing this glyph. - for (int j = 0; j < m_SpriteCharacterTableProperty.arraySize; j++) - { - int glyphIndex = m_SpriteCharacterTableProperty.GetArrayElementAtIndex(j).FindPropertyRelative("m_GlyphIndex").intValue; - - if (glyphIndex == selectedGlyphIndex) - { - // Remove character - m_SpriteCharacterTableProperty.DeleteArrayElementAtIndex(j); - } - } - - m_selectedElement = -1; - serializedObject.ApplyModifiedProperties(); - - m_IsGlyphSearchDirty = true; - - //m_SpriteAsset.UpdateLookupTables(); - - return; - } - - - } - } - } - - DisplayPageNavigation(ref m_CurrentGlyphPage, arraySize, itemsPerPage); - - EditorGUIUtility.labelWidth = 40f; - EditorGUIUtility.fieldWidth = 20f; - - GUILayout.Space(5f); - - // GLOBAL TOOLS - #region Global Tools - GUI.enabled = true; - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - rect = EditorGUILayout.GetControlRect(false, 40); - - float width = (rect.width - 75f) / 4; - EditorGUI.LabelField(rect, "Global Offsets & Scale", EditorStyles.boldLabel); - - - rect.x += 70; - bool old_ChangedState = GUI.changed; - - GUI.changed = false; - m_xOffset = EditorGUI.FloatField(new Rect(rect.x + 5f + width * 0, rect.y + 20, width - 5f, 18), new GUIContent("OX:"), m_xOffset); - if (GUI.changed) UpdateGlobalProperty("m_HorizontalBearingX", m_xOffset); - - m_yOffset = EditorGUI.FloatField(new Rect(rect.x + 5f + width * 1, rect.y + 20, width - 5f, 18), new GUIContent("OY:"), m_yOffset); - if (GUI.changed) UpdateGlobalProperty("m_HorizontalBearingY", m_yOffset); - - m_xAdvance = EditorGUI.FloatField(new Rect(rect.x + 5f + width * 2, rect.y + 20, width - 5f, 18), new GUIContent("ADV."), m_xAdvance); - if (GUI.changed) UpdateGlobalProperty("m_HorizontalAdvance", m_xAdvance); - - m_scale = EditorGUI.FloatField(new Rect(rect.x + 5f + width * 3, rect.y + 20, width - 5f, 18), new GUIContent("SF."), m_scale); - if (GUI.changed) UpdateGlobalProperty("m_Scale", m_scale); - - EditorGUILayout.EndVertical(); - #endregion - - GUI.changed = old_ChangedState; - - } - #endregion - - - if (serializedObject.ApplyModifiedProperties() || evt_cmd == k_UndoRedo || isAssetDirty) - { - if (m_SpriteAsset.m_IsSpriteAssetLookupTablesDirty || evt_cmd == k_UndoRedo) - m_SpriteAsset.UpdateLookupTables(); - - TMPro_EventManager.ON_SPRITE_ASSET_PROPERTY_CHANGED(true, m_SpriteAsset); - - isAssetDirty = false; - EditorUtility.SetDirty(target); - } - - // Clear selection if mouse event was not consumed. - GUI.enabled = true; - if (currentEvent.type == EventType.MouseDown && currentEvent.button == 0) - m_selectedElement = -1; - - } - - - /// - /// - /// - /// - /// - void DisplayPageNavigation(ref int currentPage, int arraySize, int itemsPerPage) - { - Rect pagePos = EditorGUILayout.GetControlRect(false, 20); - pagePos.width /= 3; - - int shiftMultiplier = Event.current.shift ? 10 : 1; // Page + Shift goes 10 page forward - - // Previous Page - GUI.enabled = currentPage > 0; - - if (GUI.Button(pagePos, "Previous Page")) - { - currentPage -= 1 * shiftMultiplier; - //m_isNewPage = true; - } - - // Page Counter - GUI.enabled = true; - pagePos.x += pagePos.width; - int totalPages = (int)(arraySize / (float)itemsPerPage + 0.999f); - GUI.Label(pagePos, "Page " + (currentPage + 1) + " / " + totalPages, TMP_UIStyleManager.centeredLabel); - - // Next Page - pagePos.x += pagePos.width; - GUI.enabled = itemsPerPage * (currentPage + 1) < arraySize; - - if (GUI.Button(pagePos, "Next Page")) - { - currentPage += 1 * shiftMultiplier; - //m_isNewPage = true; - } - - // Clamp page range - currentPage = Mathf.Clamp(currentPage, 0, arraySize / itemsPerPage); - - GUI.enabled = true; - } - - - /// - /// Method to update the properties of all sprites - /// - /// - /// - void UpdateGlobalProperty(string property, float value) - { - int arraySize = m_SpriteGlyphTableProperty.arraySize; - - for (int i = 0; i < arraySize; i++) - { - // Get a reference to the sprite glyph. - SerializedProperty spriteGlyphProperty = m_SpriteGlyphTableProperty.GetArrayElementAtIndex(i); - - if (property == "m_Scale") - { - spriteGlyphProperty.FindPropertyRelative(property).floatValue = value; - } - else - { - SerializedProperty glyphMetricsProperty = spriteGlyphProperty.FindPropertyRelative("m_Metrics"); - glyphMetricsProperty.FindPropertyRelative(property).floatValue = value; - } - } - - GUI.changed = false; - } - - // Check if any of the Style elements were clicked on. - private bool DoSelectionCheck(Rect selectionArea) - { - Event currentEvent = Event.current; - - switch (currentEvent.type) - { - case EventType.MouseDown: - if (selectionArea.Contains(currentEvent.mousePosition) && currentEvent.button == 0) - { - currentEvent.Use(); - return true; - } - break; - } - - return false; - } - - - /// - /// Swap the sprite item at the currently selected array index to another index. - /// - /// Selected index. - /// New index. - void SwapCharacterElements(int selectedIndex, int newIndex) - { - m_SpriteCharacterTableProperty.MoveArrayElement(selectedIndex, newIndex); - m_selectedElement = newIndex; - m_IsCharacterSearchDirty = true; - m_SpriteAsset.m_IsSpriteAssetLookupTablesDirty = true; - } - - /// - /// Move Sprite Element at selected index to another index and reorder sprite list. - /// - /// - /// - void MoveCharacterToIndex(int selectedIndex, int newIndex) - { - int arraySize = m_SpriteCharacterTableProperty.arraySize; - - if (newIndex >= arraySize) - newIndex = arraySize - 1; - - m_SpriteCharacterTableProperty.MoveArrayElement(selectedIndex, newIndex); - - m_selectedElement = newIndex; - m_IsCharacterSearchDirty = true; - m_SpriteAsset.m_IsSpriteAssetLookupTablesDirty = true; - - // TODO: Need to handle switching pages if the character or glyph is moved to a different page. - } - - /// - /// - /// - /// - /// - void SwapGlyphElements(int selectedIndex, int newIndex) - { - m_SpriteGlyphTableProperty.MoveArrayElement(selectedIndex, newIndex); - m_selectedElement = newIndex; - m_IsGlyphSearchDirty = true; - m_SpriteAsset.m_IsSpriteAssetLookupTablesDirty = true; - } - - /// - /// Move Sprite Element at selected index to another index and reorder sprite list. - /// - /// - /// - void MoveGlyphToIndex(int selectedIndex, int newIndex) - { - int arraySize = m_SpriteGlyphTableProperty.arraySize; - - if (newIndex >= arraySize) - newIndex = arraySize - 1; - - m_SpriteGlyphTableProperty.MoveArrayElement(selectedIndex, newIndex); - - m_selectedElement = newIndex; - m_IsGlyphSearchDirty = true; - m_SpriteAsset.m_IsSpriteAssetLookupTablesDirty = true; - - // TODO: Need to handle switching pages if the character or glyph is moved to a different page. - } - - - /// - /// - /// - /// - /// - void CopyCharacterSerializedProperty(SerializedProperty source, ref SerializedProperty target) - { - target.FindPropertyRelative("m_Name").stringValue = source.FindPropertyRelative("m_Name").stringValue; - target.FindPropertyRelative("m_HashCode").intValue = source.FindPropertyRelative("m_HashCode").intValue; - target.FindPropertyRelative("m_Unicode").intValue = source.FindPropertyRelative("m_Unicode").intValue; - target.FindPropertyRelative("m_GlyphIndex").intValue = source.FindPropertyRelative("m_GlyphIndex").intValue; - target.FindPropertyRelative("m_Scale").floatValue = source.FindPropertyRelative("m_Scale").floatValue; - } - - void CopyGlyphSerializedProperty(SerializedProperty srcGlyph, ref SerializedProperty dstGlyph) - { - // TODO : Should make a generic function which copies each of the properties. - - // Index - dstGlyph.FindPropertyRelative("m_Index").intValue = srcGlyph.FindPropertyRelative("m_Index").intValue; - - // GlyphMetrics - SerializedProperty srcGlyphMetrics = srcGlyph.FindPropertyRelative("m_Metrics"); - SerializedProperty dstGlyphMetrics = dstGlyph.FindPropertyRelative("m_Metrics"); - - dstGlyphMetrics.FindPropertyRelative("m_Width").floatValue = srcGlyphMetrics.FindPropertyRelative("m_Width").floatValue; - dstGlyphMetrics.FindPropertyRelative("m_Height").floatValue = srcGlyphMetrics.FindPropertyRelative("m_Height").floatValue; - dstGlyphMetrics.FindPropertyRelative("m_HorizontalBearingX").floatValue = srcGlyphMetrics.FindPropertyRelative("m_HorizontalBearingX").floatValue; - dstGlyphMetrics.FindPropertyRelative("m_HorizontalBearingY").floatValue = srcGlyphMetrics.FindPropertyRelative("m_HorizontalBearingY").floatValue; - dstGlyphMetrics.FindPropertyRelative("m_HorizontalAdvance").floatValue = srcGlyphMetrics.FindPropertyRelative("m_HorizontalAdvance").floatValue; - - // GlyphRect - SerializedProperty srcGlyphRect = srcGlyph.FindPropertyRelative("m_GlyphRect"); - SerializedProperty dstGlyphRect = dstGlyph.FindPropertyRelative("m_GlyphRect"); - - dstGlyphRect.FindPropertyRelative("m_X").intValue = srcGlyphRect.FindPropertyRelative("m_X").intValue; - dstGlyphRect.FindPropertyRelative("m_Y").intValue = srcGlyphRect.FindPropertyRelative("m_Y").intValue; - dstGlyphRect.FindPropertyRelative("m_Width").intValue = srcGlyphRect.FindPropertyRelative("m_Width").intValue; - dstGlyphRect.FindPropertyRelative("m_Height").intValue = srcGlyphRect.FindPropertyRelative("m_Height").intValue; - - dstGlyph.FindPropertyRelative("m_Scale").floatValue = srcGlyph.FindPropertyRelative("m_Scale").floatValue; - dstGlyph.FindPropertyRelative("m_AtlasIndex").intValue = srcGlyph.FindPropertyRelative("m_AtlasIndex").intValue; - } - - - /// - /// - /// - /// - /// - void SearchCharacterTable(string searchPattern, ref List searchResults) - { - if (searchResults == null) searchResults = new List(); - searchResults.Clear(); - - int arraySize = m_SpriteCharacterTableProperty.arraySize; - - for (int i = 0; i < arraySize; i++) - { - SerializedProperty sourceSprite = m_SpriteCharacterTableProperty.GetArrayElementAtIndex(i); - - // Check for potential match against array index - if (i.ToString().Contains(searchPattern)) - { - searchResults.Add(i); - continue; - } - - // Check for potential match against decimal id - int id = sourceSprite.FindPropertyRelative("m_GlyphIndex").intValue; - if (id.ToString().Contains(searchPattern)) - { - searchResults.Add(i); - continue; - } - - // Check for potential match against name - string name = sourceSprite.FindPropertyRelative("m_Name").stringValue.ToLower(System.Globalization.CultureInfo.InvariantCulture).Trim(); - if (name.Contains(searchPattern)) - { - searchResults.Add(i); - continue; - } - } - } - - void SearchGlyphTable(string searchPattern, ref List searchResults) - { - if (searchResults == null) searchResults = new List(); - searchResults.Clear(); - - int arraySize = m_SpriteGlyphTableProperty.arraySize; - - for (int i = 0; i < arraySize; i++) - { - SerializedProperty sourceSprite = m_SpriteGlyphTableProperty.GetArrayElementAtIndex(i); - - // Check for potential match against array index - if (i.ToString().Contains(searchPattern)) - { - searchResults.Add(i); - continue; - } - - // Check for potential match against decimal id - int id = sourceSprite.FindPropertyRelative("m_GlyphIndex").intValue; - if (id.ToString().Contains(searchPattern)) - { - searchResults.Add(i); - continue; - } - - // Check for potential match against name - string name = sourceSprite.FindPropertyRelative("m_Name").stringValue.ToLower(System.Globalization.CultureInfo.InvariantCulture).Trim(); - if (name.Contains(searchPattern)) - { - searchResults.Add(i); - continue; - } - } - } - - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteAssetEditor.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteAssetEditor.cs.meta deleted file mode 100644 index 9fcede33..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteAssetEditor.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: b09be1f217d34247af54863a2f5587e1 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteAssetImporter.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteAssetImporter.cs deleted file mode 100644 index dc4f0932..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteAssetImporter.cs +++ /dev/null @@ -1,232 +0,0 @@ -using UnityEngine; -using UnityEditor; -using System.IO; -using System.Collections.Generic; -using TMPro.EditorUtilities; -using TMPro.SpriteAssetUtilities; - -namespace TMPro -{ - public class TMP_SpriteAssetImporter : EditorWindow - { - // Create Sprite Asset Editor Window - [MenuItem("Window/TextMeshPro/Sprite Importer", false, 2026)] - public static void ShowFontAtlasCreatorWindow() - { - var window = GetWindow(); - window.titleContent = new GUIContent("Sprite Importer"); - window.Focus(); - } - - Texture2D m_SpriteAtlas; - SpriteAssetImportFormats m_SpriteDataFormat = SpriteAssetImportFormats.TexturePacker; - TextAsset m_JsonFile; - - string m_CreationFeedback; - - TMP_SpriteAsset m_SpriteAsset; - List m_SpriteInfoList = new List(); - - - void OnEnable() - { - // Set Editor Window Size - SetEditorWindowSize(); - } - - public void OnGUI() - { - DrawEditorPanel(); - } - - - void DrawEditorPanel() - { - // label - GUILayout.Label("Import Settings", EditorStyles.boldLabel); - - EditorGUI.BeginChangeCheck(); - - // Sprite Texture Selection - m_JsonFile = EditorGUILayout.ObjectField("Sprite Data Source", m_JsonFile, typeof(TextAsset), false) as TextAsset; - - m_SpriteDataFormat = (SpriteAssetImportFormats)EditorGUILayout.EnumPopup("Import Format", m_SpriteDataFormat); - - // Sprite Texture Selection - m_SpriteAtlas = EditorGUILayout.ObjectField("Sprite Texture Atlas", m_SpriteAtlas, typeof(Texture2D), false) as Texture2D; - - if (EditorGUI.EndChangeCheck()) - { - m_CreationFeedback = string.Empty; - } - - GUILayout.Space(10); - - GUI.enabled = m_JsonFile != null && m_SpriteAtlas != null && m_SpriteDataFormat == SpriteAssetImportFormats.TexturePacker; - - // Create Sprite Asset - if (GUILayout.Button("Create Sprite Asset")) - { - m_CreationFeedback = string.Empty; - - // Read json data file - if (m_JsonFile != null && m_SpriteDataFormat == SpriteAssetImportFormats.TexturePacker) - { - TexturePacker.SpriteDataObject sprites = JsonUtility.FromJson(m_JsonFile.text); - - if (sprites != null && sprites.frames != null && sprites.frames.Count > 0) - { - int spriteCount = sprites.frames.Count; - - // Update import results - m_CreationFeedback = "Import Results\n--------------------\n"; - m_CreationFeedback += "" + spriteCount + " Sprites were imported from file."; - - // Create sprite info list - m_SpriteInfoList = CreateSpriteInfoList(sprites); - } - } - - } - - GUI.enabled = true; - - // Creation Feedback - GUILayout.Space(5); - GUILayout.BeginVertical(EditorStyles.helpBox, GUILayout.Height(60)); - { - EditorGUILayout.LabelField(m_CreationFeedback, TMP_UIStyleManager.label); - } - GUILayout.EndVertical(); - - GUILayout.Space(5); - GUI.enabled = m_JsonFile != null && m_SpriteAtlas && m_SpriteInfoList != null && m_SpriteInfoList.Count > 0; // Enable Save Button if font_Atlas is not Null. - if (GUILayout.Button("Save Sprite Asset") && m_JsonFile != null) - { - string filePath = EditorUtility.SaveFilePanel("Save Sprite Asset File", new FileInfo(AssetDatabase.GetAssetPath(m_JsonFile)).DirectoryName, m_JsonFile.name, "asset"); - - if (filePath.Length == 0) - return; - - SaveSpriteAsset(filePath); - } - GUI.enabled = true; - } - - - /// - /// - /// - List CreateSpriteInfoList(TexturePacker.SpriteDataObject spriteDataObject) - { - List importedSprites = spriteDataObject.frames; - - List spriteInfoList = new List(); - - for (int i = 0; i < importedSprites.Count; i++) - { - TMP_Sprite sprite = new TMP_Sprite(); - - sprite.id = i; - sprite.name = Path.GetFileNameWithoutExtension(importedSprites[i].filename) ?? ""; - sprite.hashCode = TMP_TextUtilities.GetSimpleHashCode(sprite.name); - - // Attempt to extract Unicode value from name - int unicode; - int indexOfSeperator = sprite.name.IndexOf('-'); - if (indexOfSeperator != -1) - unicode = TMP_TextUtilities.StringHexToInt(sprite.name.Substring(indexOfSeperator + 1)); - else - unicode = TMP_TextUtilities.StringHexToInt(sprite.name); - - sprite.unicode = unicode; - - sprite.x = importedSprites[i].frame.x; - sprite.y = m_SpriteAtlas.height - (importedSprites[i].frame.y + importedSprites[i].frame.h); - sprite.width = importedSprites[i].frame.w; - sprite.height = importedSprites[i].frame.h; - - //Calculate sprite pivot position - sprite.pivot = importedSprites[i].pivot; - - // Properties the can be modified - sprite.xAdvance = sprite.width; - sprite.scale = 1.0f; - sprite.xOffset = 0 - (sprite.width * sprite.pivot.x); - sprite.yOffset = sprite.height - (sprite.height * sprite.pivot.y); - - spriteInfoList.Add(sprite); - } - - return spriteInfoList; - } - - - /// - /// - /// - /// - void SaveSpriteAsset(string filePath) - { - filePath = filePath.Substring(0, filePath.Length - 6); // Trim file extension from filePath. - - string dataPath = Application.dataPath; - - if (filePath.IndexOf(dataPath, System.StringComparison.InvariantCultureIgnoreCase) == -1) - { - Debug.LogError("You're saving the font asset in a directory outside of this project folder. This is not supported. Please select a directory under \"" + dataPath + "\""); - return; - } - - string relativeAssetPath = filePath.Substring(dataPath.Length - 6); - string dirName = Path.GetDirectoryName(relativeAssetPath); - string fileName = Path.GetFileNameWithoutExtension(relativeAssetPath); - string pathNoExt = dirName + "/" + fileName; - - - // Create new Sprite Asset using this texture - m_SpriteAsset = CreateInstance(); - AssetDatabase.CreateAsset(m_SpriteAsset, pathNoExt + ".asset"); - - // Compute the hash code for the sprite asset. - m_SpriteAsset.hashCode = TMP_TextUtilities.GetSimpleHashCode(m_SpriteAsset.name); - - // Assign new Sprite Sheet texture to the Sprite Asset. - m_SpriteAsset.spriteSheet = m_SpriteAtlas; - m_SpriteAsset.spriteInfoList = m_SpriteInfoList; - - // Add new default material for sprite asset. - AddDefaultMaterial(m_SpriteAsset); - } - - - /// - /// Create and add new default material to sprite asset. - /// - /// - static void AddDefaultMaterial(TMP_SpriteAsset spriteAsset) - { - Shader shader = Shader.Find("TextMeshPro/Sprite"); - Material material = new Material(shader); - material.SetTexture(ShaderUtilities.ID_MainTex, spriteAsset.spriteSheet); - - spriteAsset.material = material; - material.hideFlags = HideFlags.HideInHierarchy; - AssetDatabase.AddObjectToAsset(material, spriteAsset); - } - - - /// - /// Limits the minimum size of the editor window. - /// - void SetEditorWindowSize() - { - EditorWindow editorWindow = this; - - Vector2 currentWindowSize = editorWindow.minSize; - - editorWindow.minSize = new Vector2(Mathf.Max(230, currentWindowSize.x), Mathf.Max(300, currentWindowSize.y)); - } - - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteAssetImporter.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteAssetImporter.cs.meta deleted file mode 100644 index d60763a5..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteAssetImporter.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: f1ea944dcf8849ebab391e461b99ccb7 -timeCreated: 1480023525 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteAssetMenu.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteAssetMenu.cs deleted file mode 100644 index 5155e1a1..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteAssetMenu.cs +++ /dev/null @@ -1,329 +0,0 @@ -using UnityEngine; -using UnityEngine.TextCore; -using UnityEditor; -using System.Linq; -using System.IO; -using System.Collections; -using System.Collections.Generic; - - -namespace TMPro.EditorUtilities -{ - - public static class TMP_SpriteAssetMenu - { - // Add a Context Menu to the Sprite Asset Editor Panel to Create and Add a Default Material. - [MenuItem("CONTEXT/TMP_SpriteAsset/Add Default Material", false, 2200)] - static void CopyTexture(MenuCommand command) - { - TMP_SpriteAsset spriteAsset = (TMP_SpriteAsset)command.context; - - // Make sure the sprite asset already contains a default material - if (spriteAsset != null && spriteAsset.material == null) - { - // Add new default material for sprite asset. - AddDefaultMaterial(spriteAsset); - } - } - - // Add a Context Menu to the Sprite Asset Editor Panel to update existing sprite assets. - [MenuItem("CONTEXT/TMP_SpriteAsset/Update Sprite Asset", false, 2100)] - static void UpdateSpriteAsset(MenuCommand command) - { - TMP_SpriteAsset spriteAsset = (TMP_SpriteAsset)command.context; - - if (spriteAsset == null) - return; - - // Get a list of all the sprites contained in the texture referenced by the sprite asset. - // This only works if the texture is set to sprite mode. - string filePath = AssetDatabase.GetAssetPath(spriteAsset.spriteSheet); - - if (string.IsNullOrEmpty(filePath)) - return; - - // Get all the Sprites sorted Left to Right / Top to Bottom - Sprite[] sprites = AssetDatabase.LoadAllAssetsAtPath(filePath).Select(x => x as Sprite).Where(x => x != null).OrderByDescending(x => x.rect.y).ThenBy(x => x.rect.x).ToArray(); - - List spriteGlyphTable = spriteAsset.spriteGlyphTable; - - // Finding available glyph indexes to insert new glyphs into. - var tempGlyphTable = spriteGlyphTable.OrderBy(glyph => glyph.index).ToList(); - List availableGlyphIndexes = new List(); - - int elementIndex = 0; - for (uint i = 0; i < tempGlyphTable[tempGlyphTable.Count - 1].index; i++) - { - uint currentElementIndex = tempGlyphTable[elementIndex].index; - - if (i == currentElementIndex) - elementIndex += 1; - else - availableGlyphIndexes.Add(i); - } - - // Iterate over each of the sprites in the texture to try to match them to existing sprites in the sprite asset. - for (int i = 0; i < sprites.Length; i++) - { - int id = sprites[i].GetInstanceID(); - - int glyphIndex = spriteGlyphTable.FindIndex(item => item.sprite.GetInstanceID() == id); - - if (glyphIndex == -1) - { - // Add new Sprite Glyph to the table - Sprite sprite = sprites[i]; - - TMP_SpriteGlyph spriteGlyph = new TMP_SpriteGlyph(); - - // Get available glyph index - if (availableGlyphIndexes.Count > 0) - { - spriteGlyph.index = availableGlyphIndexes[0]; - availableGlyphIndexes.RemoveAt(0); - } - else - spriteGlyph.index = (uint)spriteGlyphTable.Count; - - spriteGlyph.metrics = new GlyphMetrics(sprite.rect.width, sprite.rect.height, -sprite.pivot.x, sprite.rect.height - sprite.pivot.y, sprite.rect.width); - spriteGlyph.glyphRect = new GlyphRect(sprite.rect); - spriteGlyph.scale = 1.0f; - spriteGlyph.sprite = sprite; - - spriteGlyphTable.Add(spriteGlyph); - - TMP_SpriteCharacter spriteCharacter = new TMP_SpriteCharacter(0, spriteGlyph); - spriteCharacter.name = sprite.name; - spriteCharacter.scale = 1.0f; - - spriteAsset.spriteCharacterTable.Add(spriteCharacter); - } - else - { - // Look for changes in existing Sprite Glyph - Sprite sprite = sprites[i]; - - TMP_SpriteGlyph spriteGlyph = spriteGlyphTable[glyphIndex]; - - // We only update changes to the sprite position / glyph rect. - if (spriteGlyph.glyphRect.x != sprite.rect.x || spriteGlyph.glyphRect.y != sprite.rect.y || spriteGlyph.glyphRect.width != sprite.rect.width || spriteGlyph.glyphRect.height != sprite.rect.height) - spriteGlyph.glyphRect = new GlyphRect(sprite.rect); - } - } - - // Sort glyph table by glyph index - spriteAsset.SortGlyphTable(); - spriteAsset.UpdateLookupTables(); - TMPro_EventManager.ON_SPRITE_ASSET_PROPERTY_CHANGED(true, spriteAsset); - } - - - [MenuItem("Assets/Create/TextMeshPro/Sprite Asset", false, 110)] - public static void CreateSpriteAsset() - { - Object target = Selection.activeObject; - - // Make sure the selection is a texture. - if (target == null || target.GetType() != typeof(Texture2D)) - { - Debug.LogWarning("A texture which contains sprites must first be selected in order to create a TextMesh Pro Sprite Asset."); - return; - } - - Texture2D sourceTex = target as Texture2D; - - // Get the path to the selected texture. - string filePathWithName = AssetDatabase.GetAssetPath(sourceTex); - string fileNameWithExtension = Path.GetFileName(filePathWithName); - string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(filePathWithName); - string filePath = filePathWithName.Replace(fileNameWithExtension, ""); - - // Check if Sprite Asset already exists - TMP_SpriteAsset spriteAsset = AssetDatabase.LoadAssetAtPath(filePath + fileNameWithoutExtension + ".asset", typeof(TMP_SpriteAsset)) as TMP_SpriteAsset; - bool isNewAsset = spriteAsset == null ? true : false; - - if (isNewAsset) - { - // Create new Sprite Asset using this texture - spriteAsset = ScriptableObject.CreateInstance(); - AssetDatabase.CreateAsset(spriteAsset, filePath + fileNameWithoutExtension + ".asset"); - - spriteAsset.version = "1.1.0"; - - // Compute the hash code for the sprite asset. - spriteAsset.hashCode = TMP_TextUtilities.GetSimpleHashCode(spriteAsset.name); - - // Assign new Sprite Sheet texture to the Sprite Asset. - spriteAsset.spriteSheet = sourceTex; - - List spriteGlyphTable = new List(); - List spriteCharacterTable = new List(); - - PopulateSpriteTables(sourceTex, ref spriteCharacterTable, ref spriteGlyphTable); - - spriteAsset.spriteCharacterTable = spriteCharacterTable; - spriteAsset.spriteGlyphTable = spriteGlyphTable; - - // Add new default material for sprite asset. - AddDefaultMaterial(spriteAsset); - } - //else - //{ - // spriteAsset.spriteInfoList = UpdateSpriteInfo(spriteAsset); - - // // Make sure the sprite asset already contains a default material - // if (spriteAsset.material == null) - // { - // // Add new default material for sprite asset. - // AddDefaultMaterial(spriteAsset); - // } - - //} - - // Update Lookup tables. - spriteAsset.UpdateLookupTables(); - - // Get the Sprites contained in the Sprite Sheet - EditorUtility.SetDirty(spriteAsset); - - //spriteAsset.sprites = sprites; - - // Set source texture back to Not Readable. - //texImporter.isReadable = false; - - - AssetDatabase.SaveAssets(); - - AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(spriteAsset)); // Re-import font asset to get the new updated version. - - //AssetDatabase.Refresh(); - } - - - private static void PopulateSpriteTables(Texture source, ref List spriteCharacterTable, ref List spriteGlyphTable) - { - //Debug.Log("Creating new Sprite Asset."); - - string filePath = AssetDatabase.GetAssetPath(source); - - // Get all the Sprites sorted by Index - Sprite[] sprites = AssetDatabase.LoadAllAssetsAtPath(filePath).Select(x => x as Sprite).Where(x => x != null).OrderByDescending(x => x.rect.y).ThenBy(x => x.rect.x).ToArray(); - - for (int i = 0; i < sprites.Length; i++) - { - Sprite sprite = sprites[i]; - - TMP_SpriteGlyph spriteGlyph = new TMP_SpriteGlyph(); - spriteGlyph.index = (uint)i; - spriteGlyph.metrics = new GlyphMetrics(sprite.rect.width, sprite.rect.height, -sprite.pivot.x, sprite.rect.height - sprite.pivot.y, sprite.rect.width); - spriteGlyph.glyphRect = new GlyphRect(sprite.rect); - spriteGlyph.scale = 1.0f; - spriteGlyph.sprite = sprite; - - spriteGlyphTable.Add(spriteGlyph); - - TMP_SpriteCharacter spriteCharacter = new TMP_SpriteCharacter(0, spriteGlyph); - spriteCharacter.name = sprite.name; - spriteCharacter.scale = 1.0f; - - spriteCharacterTable.Add(spriteCharacter); - } - } - - - /// - /// Create and add new default material to sprite asset. - /// - /// - private static void AddDefaultMaterial(TMP_SpriteAsset spriteAsset) - { - Shader shader = Shader.Find("TextMeshPro/Sprite"); - Material material = new Material(shader); - material.SetTexture(ShaderUtilities.ID_MainTex, spriteAsset.spriteSheet); - - spriteAsset.material = material; - material.hideFlags = HideFlags.HideInHierarchy; - AssetDatabase.AddObjectToAsset(material, spriteAsset); - } - - - // Update existing SpriteInfo - private static List UpdateSpriteInfo(TMP_SpriteAsset spriteAsset) - { - //Debug.Log("Updating Sprite Asset."); - - string filePath = AssetDatabase.GetAssetPath(spriteAsset.spriteSheet); - - // Get all the Sprites sorted Left to Right / Top to Bottom - Sprite[] sprites = AssetDatabase.LoadAllAssetsAtPath(filePath).Select(x => x as Sprite).Where(x => x != null).OrderByDescending(x => x.rect.y).ThenBy(x => x.rect.x).ToArray(); - - for (int i = 0; i < sprites.Length; i++) - { - Sprite sprite = sprites[i]; - - // Check if the sprite is already contained in the SpriteInfoList - int index = -1; - if (spriteAsset.spriteInfoList.Count > i && spriteAsset.spriteInfoList[i].sprite != null) - index = spriteAsset.spriteInfoList.FindIndex(item => item.sprite.GetInstanceID() == sprite.GetInstanceID()); - - // Use existing SpriteInfo if it already exists - TMP_Sprite spriteInfo = index == -1 ? new TMP_Sprite() : spriteAsset.spriteInfoList[index]; - - Rect spriteRect = sprite.rect; - spriteInfo.x = spriteRect.x; - spriteInfo.y = spriteRect.y; - spriteInfo.width = spriteRect.width; - spriteInfo.height = spriteRect.height; - - // Get Sprite Pivot - Vector2 pivot = new Vector2(0 - (sprite.bounds.min.x) / (sprite.bounds.extents.x * 2), 0 - (sprite.bounds.min.y) / (sprite.bounds.extents.y * 2)); - - // The position of the pivot influences the Offset position. - spriteInfo.pivot = new Vector2(0 - pivot.x * spriteRect.width, spriteRect.height - pivot.y * spriteRect.height); - - if (index == -1) - { - // Find the next available index for this Sprite - int[] ids = spriteAsset.spriteInfoList.Select(item => item.id).ToArray(); - - int id = 0; - for (int j = 0; j < ids.Length; j++ ) - { - if (ids[0] != 0) break; - - if (j > 0 && (ids[j] - ids[j - 1]) > 1) - { - id = ids[j - 1] + 1; - break; - } - - id = j + 1; - } - - spriteInfo.sprite = sprite; - spriteInfo.name = sprite.name; - spriteInfo.hashCode = TMP_TextUtilities.GetSimpleHashCode(spriteInfo.name); - spriteInfo.id = id; - spriteInfo.xAdvance = spriteRect.width; - spriteInfo.scale = 1.0f; - - spriteInfo.xOffset = spriteInfo.pivot.x; - spriteInfo.yOffset = spriteInfo.pivot.y; - - spriteAsset.spriteInfoList.Add(spriteInfo); - - // Sort the Sprites by ID - spriteAsset.spriteInfoList = spriteAsset.spriteInfoList.OrderBy(s => s.id).ToList(); - } - else - { - spriteAsset.spriteInfoList[index] = spriteInfo; - } - } - - return spriteAsset.spriteInfoList; - } - - - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteAssetMenu.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteAssetMenu.cs.meta deleted file mode 100644 index 850ab1f2..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteAssetMenu.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 1048a87135154606808bf2030da32d18 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteCharacterPropertyDrawer.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteCharacterPropertyDrawer.cs deleted file mode 100644 index abe49a68..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteCharacterPropertyDrawer.cs +++ /dev/null @@ -1,225 +0,0 @@ -using UnityEngine; -using UnityEngine.TextCore; -using UnityEditor; -using System.Collections; - - -namespace TMPro.EditorUtilities -{ - - [CustomPropertyDrawer(typeof(TMP_SpriteCharacter))] - public class TMP_SpriteCharacterPropertyDrawer : PropertyDrawer - { - int m_GlyphSelectedForEditing = -1; - - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) - { - SerializedProperty prop_SpriteName = property.FindPropertyRelative("m_Name"); - SerializedProperty prop_SpriteNameHashCode = property.FindPropertyRelative("m_HashCode"); - SerializedProperty prop_SpriteUnicode = property.FindPropertyRelative("m_Unicode"); - SerializedProperty prop_SpriteGlyphIndex = property.FindPropertyRelative("m_GlyphIndex"); - SerializedProperty prop_SpriteScale = property.FindPropertyRelative("m_Scale"); - - - GUIStyle style = new GUIStyle(EditorStyles.label); - style.richText = true; - - EditorGUIUtility.labelWidth = 40f; - EditorGUIUtility.fieldWidth = 50; - - Rect rect = new Rect(position.x + 60, position.y, position.width, 49); - - // Display non-editable fields - if (GUI.enabled == false) - { - // Sprite Character Index - int.TryParse(property.displayName.Split(' ')[1], out int spriteCharacterIndex); - EditorGUI.LabelField(new Rect(rect.x, rect.y, 75f, 18), new GUIContent("Index: " + spriteCharacterIndex + ""), style); - - EditorGUI.LabelField(new Rect(rect.x + 75f, rect.y, 120f, 18), new GUIContent("Unicode: 0x" + prop_SpriteUnicode.intValue.ToString("X") + ""), style); - EditorGUI.LabelField(new Rect(rect.x + 195f, rect.y, rect.width - 255, 18), new GUIContent("Name: " + prop_SpriteName.stringValue + ""), style); - - EditorGUI.LabelField(new Rect(rect.x, rect.y + 18, 120, 18), new GUIContent("Glyph ID: " + prop_SpriteGlyphIndex.intValue + ""), style); - - // Draw Sprite Glyph (if exists) - DrawSpriteGlyph(position, property); - - EditorGUI.LabelField(new Rect(rect.x, rect.y + 36, 80, 18), new GUIContent("Scale: " + prop_SpriteScale.floatValue + ""), style); - } - else // Display editable fields - { - // Get a reference to the underlying Sprite Asset - TMP_SpriteAsset spriteAsset = property.serializedObject.targetObject as TMP_SpriteAsset; - - // Sprite Character Index - int.TryParse(property.displayName.Split(' ')[1], out int spriteCharacterIndex); - - EditorGUI.LabelField(new Rect(rect.x, rect.y, 75f, 18), new GUIContent("Index: " + spriteCharacterIndex + ""), style); - - EditorGUIUtility.labelWidth = 55f; - GUI.SetNextControlName("Unicode Input"); - EditorGUI.BeginChangeCheck(); - string unicode = EditorGUI.DelayedTextField(new Rect(rect.x + 75f, rect.y, 120, 18), "Unicode:", prop_SpriteUnicode.intValue.ToString("X")); - - if (GUI.GetNameOfFocusedControl() == "Unicode Input") - { - //Filter out unwanted characters. - char chr = Event.current.character; - if ((chr < '0' || chr > '9') && (chr < 'a' || chr > 'f') && (chr < 'A' || chr > 'F')) - { - Event.current.character = '\0'; - } - } - - if (EditorGUI.EndChangeCheck()) - { - // Update Unicode value - prop_SpriteUnicode.intValue = TMP_TextUtilities.StringHexToInt(unicode); - spriteAsset.m_IsSpriteAssetLookupTablesDirty = true; - } - - EditorGUIUtility.labelWidth = 41f; - EditorGUI.BeginChangeCheck(); - EditorGUI.DelayedTextField(new Rect(rect.x + 195f, rect.y, rect.width - 255, 18), prop_SpriteName, new GUIContent("Name:")); - if (EditorGUI.EndChangeCheck()) - { - // Recompute hashCode for new name - prop_SpriteNameHashCode.intValue = TMP_TextUtilities.GetSimpleHashCode(prop_SpriteName.stringValue); - spriteAsset.m_IsSpriteAssetLookupTablesDirty = true; - } - - EditorGUIUtility.labelWidth = 59f; - EditorGUI.BeginChangeCheck(); - EditorGUI.DelayedIntField(new Rect(rect.x, rect.y + 18, 100, 18), prop_SpriteGlyphIndex, new GUIContent("Glyph ID:")); - if (EditorGUI.EndChangeCheck()) - { - spriteAsset.m_IsSpriteAssetLookupTablesDirty = true; - } - - // Draw Sprite Glyph (if exists) - DrawSpriteGlyph(position, property); - - int glyphIndex = prop_SpriteGlyphIndex.intValue; - - // Reset glyph selection if new character has been selected. - if (GUI.enabled && m_GlyphSelectedForEditing != glyphIndex) - m_GlyphSelectedForEditing = -1; - - // Display button to edit the glyph data. - if (GUI.Button(new Rect(rect.x + 120, rect.y + 18, 75, 18), new GUIContent("Edit Glyph"))) - { - if (m_GlyphSelectedForEditing == -1) - m_GlyphSelectedForEditing = glyphIndex; - else - m_GlyphSelectedForEditing = -1; - - // Button clicks should not result in potential change. - GUI.changed = false; - } - - // Show the glyph property drawer if selected - if (glyphIndex == m_GlyphSelectedForEditing && GUI.enabled) - { - if (spriteAsset != null) - { - // Lookup glyph and draw glyph (if available) - int elementIndex = spriteAsset.spriteGlyphTable.FindIndex(item => item.index == glyphIndex); - - if (elementIndex != -1) - { - // Get a reference to the Sprite Glyph Table - SerializedProperty prop_SpriteGlyphTable = property.serializedObject.FindProperty("m_SpriteGlyphTable"); - - SerializedProperty prop_SpriteGlyph = prop_SpriteGlyphTable.GetArrayElementAtIndex(elementIndex); - SerializedProperty prop_GlyphMetrics = prop_SpriteGlyph.FindPropertyRelative("m_Metrics"); - SerializedProperty prop_GlyphRect = prop_SpriteGlyph.FindPropertyRelative("m_GlyphRect"); - - Rect newRect = EditorGUILayout.GetControlRect(false, 115); - EditorGUI.DrawRect(new Rect(newRect.x + 62, newRect.y - 20, newRect.width - 62, newRect.height - 5), new Color(0.1f, 0.1f, 0.1f, 0.45f)); - EditorGUI.DrawRect(new Rect(newRect.x + 63, newRect.y - 19, newRect.width - 64, newRect.height - 7), new Color(0.3f, 0.3f, 0.3f, 0.8f)); - - // Display GlyphRect - newRect.x += 65; - newRect.y -= 18; - newRect.width += 5; - EditorGUI.PropertyField(newRect, prop_GlyphRect); - - // Display GlyphMetrics - newRect.y += 45; - EditorGUI.PropertyField(newRect, prop_GlyphMetrics); - - rect.y += 120; - } - } - } - - EditorGUIUtility.labelWidth = 39f; - EditorGUI.PropertyField(new Rect(rect.x, rect.y + 36, 80, 18), prop_SpriteScale, new GUIContent("Scale:")); - } - } - - - public override float GetPropertyHeight(SerializedProperty property, GUIContent label) - { - return 58; - } - - - void DrawSpriteGlyph(Rect position, SerializedProperty property) - { - // Get a reference to the sprite glyph table - TMP_SpriteAsset spriteAsset = property.serializedObject.targetObject as TMP_SpriteAsset; - - if (spriteAsset == null) - return; - - int glyphIndex = property.FindPropertyRelative("m_GlyphIndex").intValue; - - // Lookup glyph and draw glyph (if available) - int elementIndex = spriteAsset.spriteGlyphTable.FindIndex(item => item.index == glyphIndex); - - if (elementIndex != -1) - { - // Get a reference to the Sprite Glyph Table - SerializedProperty prop_SpriteGlyphTable = property.serializedObject.FindProperty("m_SpriteGlyphTable"); - SerializedProperty prop_SpriteGlyph = prop_SpriteGlyphTable.GetArrayElementAtIndex(elementIndex); - SerializedProperty prop_GlyphRect = prop_SpriteGlyph.FindPropertyRelative("m_GlyphRect"); - - // Get a reference to the sprite texture - Texture tex = spriteAsset.spriteSheet; - - // Return if we don't have a texture assigned to the sprite asset. - if (tex == null) - { - Debug.LogWarning("Please assign a valid Sprite Atlas texture to the [" + spriteAsset.name + "] Sprite Asset.", spriteAsset); - return; - } - - Vector2 spriteTexPosition = new Vector2(position.x, position.y); - Vector2 spriteSize = new Vector2(48, 48); - Vector2 alignmentOffset = new Vector2((58 - spriteSize.x) / 2, (58 - spriteSize.y) / 2); - - float x = prop_GlyphRect.FindPropertyRelative("m_X").intValue; - float y = prop_GlyphRect.FindPropertyRelative("m_Y").intValue; - float spriteWidth = prop_GlyphRect.FindPropertyRelative("m_Width").intValue; - float spriteHeight = prop_GlyphRect.FindPropertyRelative("m_Height").intValue; - - if (spriteWidth >= spriteHeight) - { - spriteSize.y = spriteHeight * spriteSize.x / spriteWidth; - spriteTexPosition.y += (spriteSize.x - spriteSize.y) / 2; - } - else - { - spriteSize.x = spriteWidth * spriteSize.y / spriteHeight; - spriteTexPosition.x += (spriteSize.y - spriteSize.x) / 2; - } - - // Compute the normalized texture coordinates - Rect texCoords = new Rect(x / tex.width, y / tex.height, spriteWidth / tex.width, spriteHeight / tex.height); - GUI.DrawTextureWithTexCoords(new Rect(spriteTexPosition.x + alignmentOffset.x, spriteTexPosition.y + alignmentOffset.y, spriteSize.x, spriteSize.y), tex, texCoords, true); - } - } - - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteCharacterPropertyDrawer.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteCharacterPropertyDrawer.cs.meta deleted file mode 100644 index 0733749d..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteCharacterPropertyDrawer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 37cff9f5a86ae494c8cb04423580480d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteGlyphPropertyDrawer.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteGlyphPropertyDrawer.cs deleted file mode 100644 index 06f527ec..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteGlyphPropertyDrawer.cs +++ /dev/null @@ -1,93 +0,0 @@ -using UnityEngine; -using UnityEngine.TextCore; -using UnityEditor; -using System.Collections; - - -namespace TMPro.EditorUtilities -{ - - [CustomPropertyDrawer(typeof(TMP_SpriteGlyph))] - public class TMP_SpriteGlyphPropertyDrawer : PropertyDrawer - { - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) - { - SerializedProperty prop_GlyphIndex = property.FindPropertyRelative("m_Index"); - SerializedProperty prop_GlyphMetrics = property.FindPropertyRelative("m_Metrics"); - SerializedProperty prop_GlyphRect = property.FindPropertyRelative("m_GlyphRect"); - SerializedProperty prop_Scale = property.FindPropertyRelative("m_Scale"); - SerializedProperty prop_AtlasIndex = property.FindPropertyRelative("m_AtlasIndex"); - - GUIStyle style = new GUIStyle(EditorStyles.label); - style.richText = true; - - Rect rect = new Rect(position.x + 70, position.y, position.width, 49); - - // Draw GlyphRect - EditorGUI.PropertyField(rect, prop_GlyphRect); - - // Draw GlyphMetrics - rect.y += 45; - EditorGUI.PropertyField(rect, prop_GlyphMetrics); - - EditorGUIUtility.labelWidth = 40f; - EditorGUI.PropertyField(new Rect(rect.x, rect.y + 65, 75, 18), prop_Scale, new GUIContent("Scale:")); - - EditorGUIUtility.labelWidth = 74f; - EditorGUI.PropertyField(new Rect(rect.x + 85, rect.y + 65, 95, 18), prop_AtlasIndex, new GUIContent("Atlas Index:")); - - DrawGlyph(position, property); - - int.TryParse(property.displayName.Split(' ')[1], out int spriteCharacterIndex); - float labelWidthIndex = GUI.skin.label.CalcSize(new GUIContent("#" + spriteCharacterIndex)).x; - EditorGUI.LabelField(new Rect(position.x, position.y + 5, 64f, 18f), new GUIContent("#" + spriteCharacterIndex), style); - - float labelWidthID = GUI.skin.label.CalcSize(new GUIContent("ID: " + prop_GlyphIndex.intValue)).x; - EditorGUI.LabelField(new Rect(position.x + (64 - labelWidthID) / 2, position.y + 110, 64f, 18f), new GUIContent("ID: " + prop_GlyphIndex.intValue + ""), style); - } - - void DrawGlyph(Rect position, SerializedProperty property) - { - // Get a reference to the sprite texture - Texture tex = (property.serializedObject.targetObject as TMP_SpriteAsset).spriteSheet; - - // Return if we don't have a texture assigned to the sprite asset. - if (tex == null) - { - Debug.LogWarning("Please assign a valid Sprite Atlas texture to the [" + property.serializedObject.targetObject.name + "] Sprite Asset.", property.serializedObject.targetObject); - return; - } - - Vector2 spriteTexPosition = new Vector2(position.x, position.y); - Vector2 spriteSize = new Vector2(65, 65); - - SerializedProperty prop_GlyphRect = property.FindPropertyRelative("m_GlyphRect"); - - int spriteImageX = prop_GlyphRect.FindPropertyRelative("m_X").intValue; - int spriteImageY = prop_GlyphRect.FindPropertyRelative("m_Y").intValue; - int spriteImageWidth = prop_GlyphRect.FindPropertyRelative("m_Width").intValue; - int spriteImageHeight = prop_GlyphRect.FindPropertyRelative("m_Height").intValue; - - if (spriteImageWidth >= spriteImageHeight) - { - spriteSize.y = spriteImageHeight * spriteSize.x / spriteImageWidth; - spriteTexPosition.y += (spriteSize.x - spriteSize.y) / 2; - } - else - { - spriteSize.x = spriteImageWidth * spriteSize.y / spriteImageHeight; - spriteTexPosition.x += (spriteSize.y - spriteSize.x) / 2; - } - - // Compute the normalized texture coordinates - Rect texCoords = new Rect((float)spriteImageX / tex.width, (float)spriteImageY / tex.height, (float)spriteImageWidth / tex.width, (float)spriteImageHeight / tex.height); - GUI.DrawTextureWithTexCoords(new Rect(spriteTexPosition.x + 5, spriteTexPosition.y + 32f, spriteSize.x, spriteSize.y), tex, texCoords, true); - } - - public override float GetPropertyHeight(SerializedProperty property, GUIContent label) - { - return 130f; - } - - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteGlyphPropertyDrawer.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteGlyphPropertyDrawer.cs.meta deleted file mode 100644 index 04145626..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SpriteGlyphPropertyDrawer.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 056819c66570ca54cadb72330a354050 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_StyleAssetMenu.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_StyleAssetMenu.cs deleted file mode 100644 index 0ae9c386..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_StyleAssetMenu.cs +++ /dev/null @@ -1,49 +0,0 @@ -using UnityEngine; -using UnityEditor; -using System.IO; -using System.Collections; - - -namespace TMPro.EditorUtilities -{ - - public static class TMP_StyleAssetMenu - { - - [MenuItem("Assets/Create/TextMeshPro/Style Sheet", false, 120)] - public static void CreateTextMeshProObjectPerform() - { - string filePath; - if (Selection.assetGUIDs.Length == 0) - { - // No asset selected. - filePath = "Assets"; - } - else - { - // Get the path of the selected folder or asset. - filePath = AssetDatabase.GUIDToAssetPath(Selection.assetGUIDs[0]); - - // Get the file extension of the selected asset as it might need to be removed. - string fileExtension = Path.GetExtension(filePath); - if (fileExtension != "") - { - filePath = Path.GetDirectoryName(filePath); - } - } - - - string filePathWithName = AssetDatabase.GenerateUniqueAssetPath(filePath + "/TMP StyleSheet.asset"); - - //// Create new Style Sheet Asset. - TMP_StyleSheet styleSheet = ScriptableObject.CreateInstance(); - - AssetDatabase.CreateAsset(styleSheet, filePathWithName); - - EditorUtility.SetDirty(styleSheet); - - AssetDatabase.SaveAssets(); - } - } - -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_StyleAssetMenu.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_StyleAssetMenu.cs.meta deleted file mode 100644 index cb44dc27..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_StyleAssetMenu.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 23a562f2cac6401f9f91251c68a1a794 -timeCreated: 1432690168 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_StyleSheetEditor.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_StyleSheetEditor.cs deleted file mode 100644 index 2e7f6de8..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_StyleSheetEditor.cs +++ /dev/null @@ -1,278 +0,0 @@ -using UnityEngine; -using UnityEditor; - - -namespace TMPro.EditorUtilities -{ - - [CustomPropertyDrawer(typeof(TMP_Style))] - public class StyleDrawer : PropertyDrawer - { - public static readonly float height = 95f; - - public override float GetPropertyHeight(SerializedProperty property, GUIContent label) - { - return height; - } - - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) - { - SerializedProperty nameProperty = property.FindPropertyRelative("m_Name"); - SerializedProperty hashCodeProperty = property.FindPropertyRelative("m_HashCode"); - SerializedProperty openingDefinitionProperty = property.FindPropertyRelative("m_OpeningDefinition"); - SerializedProperty closingDefinitionProperty = property.FindPropertyRelative("m_ClosingDefinition"); - SerializedProperty openingDefinitionArray = property.FindPropertyRelative("m_OpeningTagArray"); - SerializedProperty closingDefinitionArray = property.FindPropertyRelative("m_ClosingTagArray"); - - - EditorGUIUtility.labelWidth = 90; - position.height = EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing; - float labelHeight = position.height + 2f; - - EditorGUI.BeginChangeCheck(); - Rect rect0 = new Rect(position.x, position.y, (position.width) / 2 + 5, position.height); - EditorGUI.PropertyField(rect0, nameProperty); - if (EditorGUI.EndChangeCheck()) - { - // Recompute HashCode if name has changed. - hashCodeProperty.intValue = TMP_TextUtilities.GetSimpleHashCode(nameProperty.stringValue); - - property.serializedObject.ApplyModifiedProperties(); - // Dictionary needs to be updated since HashCode has changed. - TMP_StyleSheet.RefreshStyles(); - } - - // HashCode - Rect rect1 = new Rect(rect0.x + rect0.width + 5, position.y, 65, position.height); - GUI.Label(rect1, "HashCode"); - GUI.enabled = false; - rect1.x += 65; - rect1.width = position.width / 2 - 75; - EditorGUI.PropertyField(rect1, hashCodeProperty, GUIContent.none); - - GUI.enabled = true; - - // Text Tags - EditorGUI.BeginChangeCheck(); - - // Opening Tags - position.y += labelHeight; - GUI.Label(position, "Opening Tags"); - Rect textRect1 = new Rect(108, position.y, position.width - 86, 35); - openingDefinitionProperty.stringValue = EditorGUI.TextArea(textRect1, openingDefinitionProperty.stringValue); - if (EditorGUI.EndChangeCheck()) - { - // If any properties have changed, we need to update the Opening and Closing Arrays. - int size = openingDefinitionProperty.stringValue.Length; - - // Adjust array size to match new string length. - if (openingDefinitionArray.arraySize != size) openingDefinitionArray.arraySize = size; - - for (int i = 0; i < size; i++) - { - SerializedProperty element = openingDefinitionArray.GetArrayElementAtIndex(i); - element.intValue = openingDefinitionProperty.stringValue[i]; - } - } - - EditorGUI.BeginChangeCheck(); - - // Closing Tags - position.y += 38; - GUI.Label(position, "Closing Tags"); - Rect textRect2 = new Rect(108, position.y, position.width - 86, 35); - closingDefinitionProperty.stringValue = EditorGUI.TextArea(textRect2, closingDefinitionProperty.stringValue); - - if (EditorGUI.EndChangeCheck()) - { - // If any properties have changed, we need to update the Opening and Closing Arrays. - int size = closingDefinitionProperty.stringValue.Length; - - // Adjust array size to match new string length. - if (closingDefinitionArray.arraySize != size) closingDefinitionArray.arraySize = size; - - for (int i = 0; i < size; i++) - { - SerializedProperty element = closingDefinitionArray.GetArrayElementAtIndex(i); - element.intValue = closingDefinitionProperty.stringValue[i]; - } - } - - } - } - - - - [CustomEditor(typeof(TMP_StyleSheet)), CanEditMultipleObjects] - public class TMP_StyleEditor : Editor - { - - SerializedProperty m_StyleListProp; - - int m_SelectedElement = -1; - - //private Event m_CurrentEvent; - int m_Page; - - - - void OnEnable() - { - m_StyleListProp = serializedObject.FindProperty("m_StyleList"); - } - - - public override void OnInspectorGUI() - { - Event currentEvent = Event.current; - - serializedObject.Update(); - - int arraySize = m_StyleListProp.arraySize; - int itemsPerPage = (Screen.height - 178) / 111; - - if (arraySize > 0) - { - // Display each Style entry using the StyleDrawer PropertyDrawer. - for (int i = itemsPerPage * m_Page; i < arraySize && i < itemsPerPage * (m_Page + 1); i++) - { - - // Define the start of the selection region of the element. - Rect elementStartRegion = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); - - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - - SerializedProperty spriteInfo = m_StyleListProp.GetArrayElementAtIndex(i); - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(spriteInfo); - EditorGUILayout.EndVertical(); - if (EditorGUI.EndChangeCheck()) - { - // - } - - // Define the end of the selection region of the element. - Rect elementEndRegion = GUILayoutUtility.GetRect(0f, 0f, GUILayout.ExpandWidth(true)); - - // Check for Item selection - Rect selectionArea = new Rect(elementStartRegion.x, elementStartRegion.y, elementEndRegion.width, elementEndRegion.y - elementStartRegion.y); - if (DoSelectionCheck(selectionArea)) - { - if (m_SelectedElement == i) - { - m_SelectedElement = -1; - } - else - { - m_SelectedElement = i; - GUIUtility.keyboardControl = 0; - } - } - - // Handle Selection Highlighting - if (m_SelectedElement == i) - { - TMP_EditorUtility.DrawBox(selectionArea, 2f, new Color32(40, 192, 255, 255)); - } - } - } - - int shiftMultiplier = currentEvent.shift ? 10 : 1; // Page + Shift goes 10 page forward - - GUILayout.Space(-3f); - - Rect pagePos = EditorGUILayout.GetControlRect(false, 20); - pagePos.width /= 6; - - // Return if we can't display any items. - if (itemsPerPage == 0) return; - - - // Add new style. - pagePos.x += pagePos.width * 4; - if (GUI.Button(pagePos, "+")) - { - m_StyleListProp.arraySize += 1; - serializedObject.ApplyModifiedProperties(); - TMP_StyleSheet.RefreshStyles(); - } - - - // Delete selected style. - pagePos.x += pagePos.width; - if (m_SelectedElement == -1) GUI.enabled = false; - if (GUI.Button(pagePos, "-")) - { - if (m_SelectedElement != -1) - m_StyleListProp.DeleteArrayElementAtIndex(m_SelectedElement); - - m_SelectedElement = -1; - serializedObject.ApplyModifiedProperties(); - TMP_StyleSheet.RefreshStyles(); - } - - GUILayout.Space(5f); - - pagePos = EditorGUILayout.GetControlRect(false, 20); - pagePos.width /= 3; - - - // Previous Page - if (m_Page > 0) GUI.enabled = true; - else GUI.enabled = false; - - if (GUI.Button(pagePos, "Previous")) - m_Page -= 1 * shiftMultiplier; - - // PAGE COUNTER - GUI.enabled = true; - pagePos.x += pagePos.width; - int totalPages = (int)(arraySize / (float)itemsPerPage + 0.999f); - GUI.Label(pagePos, "Page " + (m_Page + 1) + " / " + totalPages, TMP_UIStyleManager.centeredLabel); - - // Next Page - pagePos.x += pagePos.width; - if (itemsPerPage * (m_Page + 1) < arraySize) GUI.enabled = true; - else GUI.enabled = false; - - if (GUI.Button(pagePos, "Next")) - m_Page += 1 * shiftMultiplier; - - // Clamp page range - m_Page = Mathf.Clamp(m_Page, 0, arraySize / itemsPerPage); - - - if (serializedObject.ApplyModifiedProperties()) - TMPro_EventManager.ON_TEXT_STYLE_PROPERTY_CHANGED(true); - - // Clear selection if mouse event was not consumed. - GUI.enabled = true; - if (currentEvent.type == EventType.MouseDown && currentEvent.button == 0) - m_SelectedElement = -1; - - - } - - - // Check if any of the Style elements were clicked on. - static bool DoSelectionCheck(Rect selectionArea) - { - Event currentEvent = Event.current; - - switch (currentEvent.type) - { - case EventType.MouseDown: - if (selectionArea.Contains(currentEvent.mousePosition) && currentEvent.button == 0) - { - currentEvent.Use(); - return true; - } - break; - } - - return false; - } - - } - -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_StyleSheetEditor.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_StyleSheetEditor.cs.meta deleted file mode 100644 index a3bff26f..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_StyleSheetEditor.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 34e2c9b9d9e44953933afe37461f44e6 -timeCreated: 1432683777 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SubMeshUI_Editor.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SubMeshUI_Editor.cs deleted file mode 100644 index 1cbea769..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SubMeshUI_Editor.cs +++ /dev/null @@ -1,98 +0,0 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace TMPro.EditorUtilities -{ - [CustomEditor(typeof(TMP_SubMeshUI)), CanEditMultipleObjects] - public class TMP_SubMeshUI_Editor : Editor - { - private struct m_foldout - { // Track Inspector foldout panel states, globally. - //public static bool textInput = true; - public static bool fontSettings = true; - //public static bool extraSettings = false; - //public static bool shadowSetting = false; - //public static bool materialEditor = true; - } - - private SerializedProperty fontAsset_prop; - private SerializedProperty spriteAsset_prop; - - private TMP_SubMeshUI m_SubMeshComponent; - - private CanvasRenderer m_canvasRenderer; - private Editor m_materialEditor; - private Material m_targetMaterial; - - - public void OnEnable() - { - fontAsset_prop = serializedObject.FindProperty("m_fontAsset"); - spriteAsset_prop = serializedObject.FindProperty("m_spriteAsset"); - - m_SubMeshComponent = target as TMP_SubMeshUI; - //m_rectTransform = m_SubMeshComponent.rectTransform; - m_canvasRenderer = m_SubMeshComponent.canvasRenderer; - - - // Create new Material Editor if one does not exists - if (m_canvasRenderer != null && m_canvasRenderer.GetMaterial() != null) - { - m_materialEditor = Editor.CreateEditor(m_canvasRenderer.GetMaterial()); - m_targetMaterial = m_canvasRenderer.GetMaterial(); - } - } - - - public void OnDisable() - { - // Destroy material editor if one exists - if (m_materialEditor != null) - { - //Debug.Log("Destroying Inline Material Editor."); - DestroyImmediate(m_materialEditor); - } - } - - - - public override void OnInspectorGUI() - { - GUI.enabled = false; - EditorGUILayout.PropertyField(fontAsset_prop); - EditorGUILayout.PropertyField(spriteAsset_prop); - GUI.enabled = true; - - EditorGUILayout.Space(); - - // If a Custom Material Editor exists, we use it. - if (m_canvasRenderer != null && m_canvasRenderer.GetMaterial() != null) - { - Material mat = m_canvasRenderer.GetMaterial(); - - //Debug.Log(mat + " " + m_targetMaterial); - - if (mat != m_targetMaterial) - { - // Destroy previous Material Instance - //Debug.Log("New Material has been assigned."); - m_targetMaterial = mat; - DestroyImmediate(m_materialEditor); - } - - - if (m_materialEditor == null) - { - m_materialEditor = Editor.CreateEditor(mat); - } - - m_materialEditor.DrawHeader(); - - - m_materialEditor.OnInspectorGUI(); - } - } - - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SubMeshUI_Editor.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SubMeshUI_Editor.cs.meta deleted file mode 100644 index b82410e5..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SubMeshUI_Editor.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 6b01141ed8f74d198965c86f25eb7040 -timeCreated: 1452757501 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SubMesh_Editor.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SubMesh_Editor.cs deleted file mode 100644 index b5a3cc7c..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SubMesh_Editor.cs +++ /dev/null @@ -1,76 +0,0 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - -namespace TMPro.EditorUtilities -{ - [CustomEditor(typeof(TMP_SubMesh)), CanEditMultipleObjects] - public class TMP_SubMesh_Editor : Editor - { - private struct m_foldout - { // Track Inspector foldout panel states, globally. - //public static bool textInput = true; - public static bool fontSettings = true; - //public static bool extraSettings = false; - //public static bool shadowSetting = false; - //public static bool materialEditor = true; - } - - private SerializedProperty fontAsset_prop; - private SerializedProperty spriteAsset_prop; - - private TMP_SubMesh m_SubMeshComponent; - private Renderer m_Renderer; - - public void OnEnable() - { - fontAsset_prop = serializedObject.FindProperty("m_fontAsset"); - spriteAsset_prop = serializedObject.FindProperty("m_spriteAsset"); - - m_SubMeshComponent = target as TMP_SubMesh; - - m_Renderer = m_SubMeshComponent.renderer; - } - - - public override void OnInspectorGUI() - { - EditorGUI.indentLevel = 0; - - GUI.enabled = false; - EditorGUILayout.PropertyField(fontAsset_prop); - EditorGUILayout.PropertyField(spriteAsset_prop); - GUI.enabled = true; - - EditorGUI.BeginChangeCheck(); - - // SORTING LAYERS - var sortingLayerNames = SortingLayerHelper.sortingLayerNames; - - // Look up the layer name using the current layer ID - string oldName = SortingLayerHelper.GetSortingLayerNameFromID(m_Renderer.sortingLayerID); - - // Use the name to look up our array index into the names list - int oldLayerIndex = System.Array.IndexOf(sortingLayerNames, oldName); - - // Show the pop-up for the names - int newLayerIndex = EditorGUILayout.Popup("Sorting Layer", oldLayerIndex, sortingLayerNames); - - // If the index changes, look up the ID for the new index to store as the new ID - if (newLayerIndex != oldLayerIndex) - { - //Undo.RecordObject(renderer, "Edit Sorting Layer"); - m_Renderer.sortingLayerID = SortingLayerHelper.GetSortingLayerIDForIndex(newLayerIndex); - //EditorUtility.SetDirty(renderer); - } - - // Expose the manual sorting order - int newSortingLayerOrder = EditorGUILayout.IntField("Order in Layer", m_Renderer.sortingOrder); - if (newSortingLayerOrder != m_Renderer.sortingOrder) - { - //Undo.RecordObject(renderer, "Edit Sorting Order"); - m_Renderer.sortingOrder = newSortingLayerOrder; - } - } - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SubMesh_Editor.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SubMesh_Editor.cs.meta deleted file mode 100644 index fd4713b3..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_SubMesh_Editor.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: dd2fe74169b54bf58fca17288513ef38 -timeCreated: 1456189048 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_TextAlignmentDrawer.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_TextAlignmentDrawer.cs deleted file mode 100644 index dbb271c5..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_TextAlignmentDrawer.cs +++ /dev/null @@ -1,119 +0,0 @@ -using UnityEngine; -using UnityEditor; - -namespace TMPro.EditorUtilities -{ - - [CustomPropertyDrawer(typeof(TextAlignmentOptions))] - public class TMP_TextAlignmentDrawer : PropertyDrawer - { - const int k_AlignmentButtonWidth = 24; - const int k_AlignmentButtonHeight = 20; - const int k_WideViewWidth = 504; - const int k_ControlsSpacing = 6; - const int k_GroupWidth = k_AlignmentButtonWidth * 6; - static readonly int k_TextAlignmentHash = "DoTextAligmentControl".GetHashCode(); - - public override float GetPropertyHeight(SerializedProperty property, GUIContent label) - { - return EditorGUIUtility.currentViewWidth > k_WideViewWidth ? k_AlignmentButtonHeight : k_AlignmentButtonHeight * 2 + 3; - } - - public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) - { - var id = GUIUtility.GetControlID(k_TextAlignmentHash, FocusType.Keyboard, position); - - EditorGUI.BeginProperty(position, label, property); - { - var controlArea = EditorGUI.PrefixLabel(position, id, label); - - var horizontalAligment = new Rect(controlArea.x, controlArea.y, k_GroupWidth, k_AlignmentButtonHeight); - var verticalAligment = new Rect(!(EditorGUIUtility.currentViewWidth > k_WideViewWidth) ? controlArea.x : horizontalAligment.xMax + k_ControlsSpacing, !(EditorGUIUtility.currentViewWidth > k_WideViewWidth) ? controlArea.y + k_AlignmentButtonHeight + 3 : controlArea.y, k_GroupWidth, k_AlignmentButtonHeight); - - EditorGUI.BeginChangeCheck(); - - var selectedHorizontal = DoHorizontalAligmentControl(horizontalAligment, property); - var selectedVertical = DoVerticalAligmentControl(verticalAligment, property); - - if (EditorGUI.EndChangeCheck()) - { - var value = (0x1 << selectedHorizontal) | (0x100 << selectedVertical); - property.intValue = value; - } - } - EditorGUI.EndProperty(); - } - - static int DoHorizontalAligmentControl(Rect position, SerializedProperty alignment) - { - var selected = TMP_EditorUtility.GetHorizontalAlignmentGridValue(alignment.intValue); - - var values = new bool[6]; - - values[selected] = true; - - if (alignment.hasMultipleDifferentValues) - { - foreach (var obj in alignment.serializedObject.targetObjects) - { - var text = obj as TMP_Text; - if (text != null) - { - values[TMP_EditorUtility.GetHorizontalAlignmentGridValue((int)text.alignment)] = true; - } - } - } - - position.width = k_AlignmentButtonWidth; - - for (var i = 0; i < values.Length; i++) - { - var oldValue = values[i]; - var newValue = TMP_EditorUtility.EditorToggle(position, oldValue, TMP_UIStyleManager.alignContentA[i], i == 0 ? TMP_UIStyleManager.alignmentButtonLeft : (i == 5 ? TMP_UIStyleManager.alignmentButtonRight : TMP_UIStyleManager.alignmentButtonMid)); - if (newValue != oldValue) - { - selected = i; - } - position.x += position.width; - } - - return selected; - } - - static int DoVerticalAligmentControl(Rect position, SerializedProperty alignment) - { - var selected = TMP_EditorUtility.GetVerticalAlignmentGridValue(alignment.intValue); - - var values = new bool[6]; - - values[selected] = true; - - if (alignment.hasMultipleDifferentValues) - { - foreach (var obj in alignment.serializedObject.targetObjects) - { - var text = obj as TMP_Text; - if (text != null) - { - values[TMP_EditorUtility.GetVerticalAlignmentGridValue((int)text.alignment)] = true; - } - } - } - - position.width = k_AlignmentButtonWidth; - - for (var i = 0; i < values.Length; i++) - { - var oldValue = values[i]; - var newValue = TMP_EditorUtility.EditorToggle(position, oldValue, TMP_UIStyleManager.alignContentB[i], i == 0 ? TMP_UIStyleManager.alignmentButtonLeft : (i == 5 ? TMP_UIStyleManager.alignmentButtonRight : TMP_UIStyleManager.alignmentButtonMid)); - if (newValue != oldValue) - { - selected = i; - } - position.x += position.width; - } - - return selected; - } - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_TextAlignmentDrawer.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_TextAlignmentDrawer.cs.meta deleted file mode 100644 index a68a2739..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_TextAlignmentDrawer.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: c55a64c7570474f47a94abe39ebfef04 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_UIStyleManager.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_UIStyleManager.cs deleted file mode 100644 index 0a94a997..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_UIStyleManager.cs +++ /dev/null @@ -1,134 +0,0 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - - -namespace TMPro.EditorUtilities -{ - - public static class TMP_UIStyleManager - { - public static GUIStyle label; - public static GUIStyle textAreaBoxWindow; - public static GUIStyle boldFoldout; - public static GUIStyle panelTitle; - public static GUIStyle sectionHeader; - public static GUIStyle centeredLabel; - public static GUIStyle rightLabel; - public static GUIStyle wrappingTextArea; - - public static GUIStyle alignmentButtonLeft; - public static GUIStyle alignmentButtonMid; - public static GUIStyle alignmentButtonRight; - - // Alignment Button Textures - public static Texture2D alignLeft; - public static Texture2D alignCenter; - public static Texture2D alignRight; - public static Texture2D alignJustified; - public static Texture2D alignFlush; - public static Texture2D alignGeoCenter; - public static Texture2D alignTop; - public static Texture2D alignMiddle; - public static Texture2D alignBottom; - public static Texture2D alignBaseline; - public static Texture2D alignMidline; - public static Texture2D alignCapline; - public static Texture2D sectionHeaderTexture; - - public static GUIContent[] alignContentA; - public static GUIContent[] alignContentB; - - static TMP_UIStyleManager() - { - // Find to location of the TextMesh Pro Asset Folder (as users may have moved it) - var tmproAssetFolderPath = TMP_EditorUtility.packageRelativePath; - - if (EditorGUIUtility.isProSkin) - { - alignLeft = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignLeft.psd", typeof(Texture2D)) as Texture2D; - alignCenter = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignCenter.psd", typeof(Texture2D)) as Texture2D; - alignRight = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignRight.psd", typeof(Texture2D)) as Texture2D; - alignJustified = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignJustified.psd", typeof(Texture2D)) as Texture2D; - alignFlush = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignFlush.psd", typeof(Texture2D)) as Texture2D; - alignGeoCenter = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignCenterGeo.psd", typeof(Texture2D)) as Texture2D; - alignTop = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignTop.psd", typeof(Texture2D)) as Texture2D; - alignMiddle = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignMiddle.psd", typeof(Texture2D)) as Texture2D; - alignBottom = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignBottom.psd", typeof(Texture2D)) as Texture2D; - alignBaseline = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignBaseLine.psd", typeof(Texture2D)) as Texture2D; - alignMidline = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignMidLine.psd", typeof(Texture2D)) as Texture2D; - alignCapline = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignCapLine.psd", typeof(Texture2D)) as Texture2D; - sectionHeaderTexture = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/SectionHeader_Dark.psd", typeof(Texture2D)) as Texture2D; - } - else - { - alignLeft = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignLeft_Light.psd", typeof(Texture2D)) as Texture2D; - alignCenter = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignCenter_Light.psd", typeof(Texture2D)) as Texture2D; - alignRight = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignRight_Light.psd", typeof(Texture2D)) as Texture2D; - alignJustified = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignJustified_Light.psd", typeof(Texture2D)) as Texture2D; - alignFlush = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignFlush_Light.psd", typeof(Texture2D)) as Texture2D; - alignGeoCenter = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignCenterGeo_Light.psd", typeof(Texture2D)) as Texture2D; - alignTop = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignTop_Light.psd", typeof(Texture2D)) as Texture2D; - alignMiddle = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignMiddle_Light.psd", typeof(Texture2D)) as Texture2D; - alignBottom = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignBottom_Light.psd", typeof(Texture2D)) as Texture2D; - alignBaseline = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignBaseLine_Light.psd", typeof(Texture2D)) as Texture2D; - alignMidline = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignMidLine_Light.psd", typeof(Texture2D)) as Texture2D; - alignCapline = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/btn_AlignCapLine_Light.psd", typeof(Texture2D)) as Texture2D; - sectionHeaderTexture = AssetDatabase.LoadAssetAtPath(tmproAssetFolderPath + "/Editor Resources/Textures/SectionHeader_Light.psd", typeof(Texture2D)) as Texture2D; - } - - label = new GUIStyle(EditorStyles.label) { richText = true, wordWrap = true, stretchWidth = true }; - textAreaBoxWindow = new GUIStyle(EditorStyles.textArea) { richText = true }; - boldFoldout = new GUIStyle(EditorStyles.foldout) { fontStyle = FontStyle.Bold }; - panelTitle = new GUIStyle(EditorStyles.label) { fontStyle = FontStyle.Bold }; - - sectionHeader = new GUIStyle(EditorStyles.label) { fixedHeight = 22, richText = true, border = new RectOffset(9, 9, 0, 0), overflow = new RectOffset(9, 0, 0, 0), padding = new RectOffset(0, 0, 4, 0) }; - sectionHeader.normal.background = sectionHeaderTexture; - - centeredLabel = new GUIStyle(EditorStyles.label) { alignment = TextAnchor.MiddleCenter}; - rightLabel = new GUIStyle(EditorStyles.label) { alignment = TextAnchor.MiddleRight, richText = true }; - - - alignmentButtonLeft = new GUIStyle(EditorStyles.miniButtonLeft); - alignmentButtonLeft.padding.left = 4; - alignmentButtonLeft.padding.right = 4; - alignmentButtonLeft.padding.top = 2; - alignmentButtonLeft.padding.bottom = 2; - - alignmentButtonMid = new GUIStyle(EditorStyles.miniButtonMid); - alignmentButtonMid.padding.left = 4; - alignmentButtonMid.padding.right = 4; - alignmentButtonLeft.padding.top = 2; - alignmentButtonLeft.padding.bottom = 2; - - alignmentButtonRight = new GUIStyle(EditorStyles.miniButtonRight); - alignmentButtonRight.padding.left = 4; - alignmentButtonRight.padding.right = 4; - alignmentButtonLeft.padding.top = 2; - alignmentButtonLeft.padding.bottom = 2; - - wrappingTextArea = new GUIStyle(EditorStyles.textArea); - wrappingTextArea.wordWrap = true; - - alignContentA = new [] - { - new GUIContent(alignLeft, "Left"), - new GUIContent(alignCenter, "Center"), - new GUIContent(alignRight, "Right"), - new GUIContent(alignJustified, "Justified"), - new GUIContent(alignFlush, "Flush"), - new GUIContent(alignGeoCenter, "Geometry Center") - }; - - alignContentB = new [] - { - new GUIContent(alignTop, "Top"), - new GUIContent(alignMiddle, "Middle"), - new GUIContent(alignBottom, "Bottom"), - new GUIContent(alignBaseline, "Baseline"), - new GUIContent(alignMidline, "Midline"), - new GUIContent(alignCapline, "Capline") - }; - } - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_UIStyleManager.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_UIStyleManager.cs.meta deleted file mode 100644 index 9c09bfa3..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_UIStyleManager.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 30a939dce2fd4073955f2f20e659d506 -timeCreated: 1426454127 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_UiEditorPanel.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_UiEditorPanel.cs deleted file mode 100644 index 87181650..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_UiEditorPanel.cs +++ /dev/null @@ -1,91 +0,0 @@ -using UnityEngine; -using UnityEngine.UI; -using UnityEditor; - -namespace TMPro.EditorUtilities -{ - - [CustomEditor(typeof(TextMeshProUGUI), true), CanEditMultipleObjects] - public class TMP_UiEditorPanel : TMP_BaseEditorPanel - { - static readonly GUIContent k_RaycastTargetLabel = new GUIContent("Raycast Target", "Whether the text blocks raycasts from the Graphic Raycaster."); - - SerializedProperty m_RaycastTargetProp; - - protected override void OnEnable() - { - base.OnEnable(); - m_RaycastTargetProp = serializedObject.FindProperty("m_RaycastTarget"); - } - - protected override void DrawExtraSettings() - { - Foldout.extraSettings = EditorGUILayout.Foldout(Foldout.extraSettings, k_ExtraSettingsLabel, true, TMP_UIStyleManager.boldFoldout); - if (Foldout.extraSettings) - { - EditorGUI.indentLevel += 1; - - DrawMargins(); - - DrawGeometrySorting(); - - DrawRichText(); - - DrawRaycastTarget(); - - DrawParsing(); - - DrawKerning(); - - DrawPadding(); - - EditorGUI.indentLevel -= 1; - } - } - - protected void DrawRaycastTarget() - { - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(m_RaycastTargetProp, k_RaycastTargetLabel); - if (EditorGUI.EndChangeCheck()) - { - // Change needs to propagate to the child sub objects. - Graphic[] graphicComponents = m_TextComponent.GetComponentsInChildren(); - for (int i = 1; i < graphicComponents.Length; i++) - graphicComponents[i].raycastTarget = m_RaycastTargetProp.boolValue; - - m_HavePropertiesChanged = true; - } - } - - // Method to handle multi object selection - protected override bool IsMixSelectionTypes() - { - GameObject[] objects = Selection.gameObjects; - if (objects.Length > 1) - { - for (int i = 0; i < objects.Length; i++) - { - if (objects[i].GetComponent() == null) - return true; - } - } - return false; - } - protected override void OnUndoRedo() - { - int undoEventId = Undo.GetCurrentGroup(); - int lastUndoEventId = s_EventId; - - if (undoEventId != lastUndoEventId) - { - for (int i = 0; i < targets.Length; i++) - { - //Debug.Log("Undo & Redo Performed detected in Editor Panel. Event ID:" + Undo.GetCurrentGroup()); - TMPro_EventManager.ON_TEXTMESHPRO_UGUI_PROPERTY_CHANGED(true, targets[i] as TextMeshProUGUI); - s_EventId = undoEventId; - } - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_UiEditorPanel.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_UiEditorPanel.cs.meta deleted file mode 100644 index ea3b36b3..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMP_UiEditorPanel.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 21c0044a7f964773be90d197a78e4703 -timeCreated: 1443571501 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_ContextMenus.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_ContextMenus.cs deleted file mode 100644 index 8d65b706..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_ContextMenus.cs +++ /dev/null @@ -1,341 +0,0 @@ -using UnityEngine; -using UnityEditor; -using System.IO; -using System.Collections; - - -namespace TMPro.EditorUtilities -{ - - public class TMP_ContextMenus : Editor - { - - private static Texture m_copiedTexture; - - private static Material m_copiedProperties; - private static Material m_copiedAtlasProperties; - - - // Add a Context Menu to the Texture Editor Panel to allow Copy / Paste of Texture. - [MenuItem("CONTEXT/Texture/Copy", false, 2000)] - static void CopyTexture(MenuCommand command) - { - m_copiedTexture = command.context as Texture; - } - - - // Select the currently assigned material or material preset. - [MenuItem("CONTEXT/Material/Select Material", false, 500)] - static void SelectMaterial(MenuCommand command) - { - Material mat = command.context as Material; - - // Select current material - EditorUtility.FocusProjectWindow(); - EditorGUIUtility.PingObject(mat); - } - - - // Add a Context Menu to allow easy duplication of the Material. - [MenuItem("CONTEXT/Material/Create Material Preset", false)] - static void DuplicateMaterial(MenuCommand command) - { - // Get the type of text object - // If material is not a base material, we get material leaks... - - Material source_Mat = (Material)command.context; - if (!EditorUtility.IsPersistent(source_Mat)) - { - Debug.LogWarning("Material is an instance and cannot be converted into a permanent asset."); - return; - } - - - string assetPath = AssetDatabase.GetAssetPath(source_Mat).Split('.')[0]; - - Material duplicate = new Material(source_Mat); - - // Need to manually copy the shader keywords - duplicate.shaderKeywords = source_Mat.shaderKeywords; - - AssetDatabase.CreateAsset(duplicate, AssetDatabase.GenerateUniqueAssetPath(assetPath + ".mat")); - - // Assign duplicate Material to selected object (if one is) - if (Selection.activeGameObject != null) - { - TMP_Text textObject = Selection.activeGameObject.GetComponent(); - if (textObject != null) - { - textObject.fontSharedMaterial = duplicate; - } - else - { - TMP_SubMesh subMeshObject = Selection.activeGameObject.GetComponent(); - - if (subMeshObject != null) - subMeshObject.sharedMaterial = duplicate; - else - { - TMP_SubMeshUI subMeshUIObject = Selection.activeGameObject.GetComponent(); - - if (subMeshUIObject != null) - subMeshUIObject.sharedMaterial = duplicate; - } - } - } - - // Ping newly created Material Preset. - EditorUtility.FocusProjectWindow(); - EditorGUIUtility.PingObject(duplicate); - } - - - //[MenuItem("CONTEXT/MaterialComponent/Copy Material Properties", false)] - [MenuItem("CONTEXT/Material/Copy Material Properties", false)] - static void CopyMaterialProperties(MenuCommand command) - { - Material mat = null; - if (command.context.GetType() == typeof(Material)) - mat = (Material)command.context; - else - { - mat = Selection.activeGameObject.GetComponent().GetMaterial(); - } - - m_copiedProperties = new Material(mat); - - m_copiedProperties.shaderKeywords = mat.shaderKeywords; - - m_copiedProperties.hideFlags = HideFlags.DontSave; - } - - - // PASTE MATERIAL - //[MenuItem("CONTEXT/MaterialComponent/Paste Material Properties", false)] - [MenuItem("CONTEXT/Material/Paste Material Properties", false)] - static void PasteMaterialProperties(MenuCommand command) - { - - if (m_copiedProperties == null) - { - Debug.LogWarning("No Material Properties to Paste. Use Copy Material Properties first."); - return; - } - - Material mat = null; - if (command.context.GetType() == typeof(Material)) - mat = (Material)command.context; - else - { - mat = Selection.activeGameObject.GetComponent().GetMaterial(); - } - - Undo.RecordObject(mat, "Paste Material"); - - ShaderUtilities.GetShaderPropertyIDs(); // Make sure we have valid Property IDs - if (mat.HasProperty(ShaderUtilities.ID_GradientScale)) - { - // Preserve unique SDF properties from destination material. - m_copiedProperties.SetTexture(ShaderUtilities.ID_MainTex, mat.GetTexture(ShaderUtilities.ID_MainTex)); - m_copiedProperties.SetFloat(ShaderUtilities.ID_GradientScale, mat.GetFloat(ShaderUtilities.ID_GradientScale)); - m_copiedProperties.SetFloat(ShaderUtilities.ID_TextureWidth, mat.GetFloat(ShaderUtilities.ID_TextureWidth)); - m_copiedProperties.SetFloat(ShaderUtilities.ID_TextureHeight, mat.GetFloat(ShaderUtilities.ID_TextureHeight)); - } - - EditorShaderUtilities.CopyMaterialProperties(m_copiedProperties, mat); - - // Copy ShaderKeywords from one material to the other. - mat.shaderKeywords = m_copiedProperties.shaderKeywords; - - // Let TextMeshPro Objects that this mat has changed. - TMPro_EventManager.ON_MATERIAL_PROPERTY_CHANGED(true, mat); - } - - - // Enable Resetting of Material properties without losing unique properties of the font atlas. - [MenuItem("CONTEXT/Material/Reset", false, 2100)] - static void ResetSettings(MenuCommand command) - { - - Material mat = null; - if (command.context.GetType() == typeof(Material)) - mat = (Material)command.context; - else - { - mat = Selection.activeGameObject.GetComponent().GetMaterial(); - } - - Undo.RecordObject(mat, "Reset Material"); - - ShaderUtilities.GetShaderPropertyIDs(); // Make sure we have valid Property IDs - if (mat.HasProperty(ShaderUtilities.ID_GradientScale)) - { - // Copy unique properties of the SDF Material - var texture = mat.GetTexture(ShaderUtilities.ID_MainTex); - var gradientScale = mat.GetFloat(ShaderUtilities.ID_GradientScale); - var texWidth = mat.GetFloat(ShaderUtilities.ID_TextureWidth); - var texHeight = mat.GetFloat(ShaderUtilities.ID_TextureHeight); - - var stencilId = 0.0f; - var stencilComp = 0.0f; - - if (mat.HasProperty(ShaderUtilities.ID_StencilID)) - { - stencilId = mat.GetFloat(ShaderUtilities.ID_StencilID); - stencilComp = mat.GetFloat(ShaderUtilities.ID_StencilComp); - } - - var normalWeight = mat.GetFloat(ShaderUtilities.ID_WeightNormal); - var boldWeight = mat.GetFloat(ShaderUtilities.ID_WeightBold); - - // Reset the material - Unsupported.SmartReset(mat); - - // Reset ShaderKeywords - mat.shaderKeywords = new string[0]; // { "BEVEL_OFF", "GLOW_OFF", "UNDERLAY_OFF" }; - - // Copy unique material properties back to the material. - mat.SetTexture(ShaderUtilities.ID_MainTex, texture); - mat.SetFloat(ShaderUtilities.ID_GradientScale, gradientScale); - mat.SetFloat(ShaderUtilities.ID_TextureWidth, texWidth); - mat.SetFloat(ShaderUtilities.ID_TextureHeight, texHeight); - - if (mat.HasProperty(ShaderUtilities.ID_StencilID)) - { - mat.SetFloat(ShaderUtilities.ID_StencilID, stencilId); - mat.SetFloat(ShaderUtilities.ID_StencilComp, stencilComp); - } - - mat.SetFloat(ShaderUtilities.ID_WeightNormal, normalWeight); - mat.SetFloat(ShaderUtilities.ID_WeightBold, boldWeight); - } - else - { - Unsupported.SmartReset(mat); - } - - TMPro_EventManager.ON_MATERIAL_PROPERTY_CHANGED(true, mat); - } - - - - //This function is used for debugging and fixing potentially broken font atlas links. - [MenuItem("CONTEXT/Material/Copy Atlas", false, 2000)] - static void CopyAtlas(MenuCommand command) - { - Material mat = command.context as Material; - - m_copiedAtlasProperties = new Material(mat); - m_copiedAtlasProperties.hideFlags = HideFlags.DontSave; - } - - - // This function is used for debugging and fixing potentially broken font atlas links - [MenuItem("CONTEXT/Material/Paste Atlas", false, 2001)] - static void PasteAtlas(MenuCommand command) - { - Material mat = command.context as Material; - - if (m_copiedAtlasProperties != null) - { - Undo.RecordObject(mat, "Paste Texture"); - - ShaderUtilities.GetShaderPropertyIDs(); // Make sure we have valid Property IDs - mat.SetTexture(ShaderUtilities.ID_MainTex, m_copiedAtlasProperties.GetTexture(ShaderUtilities.ID_MainTex)); - mat.SetFloat(ShaderUtilities.ID_GradientScale, m_copiedAtlasProperties.GetFloat(ShaderUtilities.ID_GradientScale)); - mat.SetFloat(ShaderUtilities.ID_TextureWidth, m_copiedAtlasProperties.GetFloat(ShaderUtilities.ID_TextureWidth)); - mat.SetFloat(ShaderUtilities.ID_TextureHeight, m_copiedAtlasProperties.GetFloat(ShaderUtilities.ID_TextureHeight)); - } - else if (m_copiedTexture != null) - { - Undo.RecordObject(mat, "Paste Texture"); - - mat.SetTexture(ShaderUtilities.ID_MainTex, m_copiedTexture); - } - - //DestroyImmediate(m_copiedAtlasProperties); - } - - - // Context Menus for TMPro Font Assets - //This function is used for debugging and fixing potentially broken font atlas links. - [MenuItem("CONTEXT/TMP_FontAsset/Extract Atlas", false, 2100)] - static void ExtractAtlas(MenuCommand command) - { - TMP_FontAsset font = command.context as TMP_FontAsset; - - string fontPath = AssetDatabase.GetAssetPath(font); - string texPath = Path.GetDirectoryName(fontPath) + "/" + Path.GetFileNameWithoutExtension(fontPath) + " Atlas.png"; - - // Create a Serialized Object of the texture to allow us to make it readable. - SerializedObject texprop = new SerializedObject(font.material.GetTexture(ShaderUtilities.ID_MainTex)); - texprop.FindProperty("m_IsReadable").boolValue = true; - texprop.ApplyModifiedProperties(); - - // Create a copy of the texture. - Texture2D tex = Instantiate(font.material.GetTexture(ShaderUtilities.ID_MainTex)) as Texture2D; - - // Set the texture to not readable again. - texprop.FindProperty("m_IsReadable").boolValue = false; - texprop.ApplyModifiedProperties(); - - Debug.Log(texPath); - // Saving File for Debug - var pngData = tex.EncodeToPNG(); - File.WriteAllBytes(texPath, pngData); - - AssetDatabase.Refresh(); - DestroyImmediate(tex); - } - - /// - /// - /// - /// - [MenuItem("CONTEXT/TMP_FontAsset/Update Atlas Texture...", false, 2000)] - static void RegenerateFontAsset(MenuCommand command) - { - TMP_FontAsset fontAsset = command.context as TMP_FontAsset; - - if (fontAsset != null) - { - TMPro_FontAssetCreatorWindow.ShowFontAtlasCreatorWindow(fontAsset); - } - } - - - /// - /// Clear Font Asset Data - /// - /// - [MenuItem("CONTEXT/TMP_FontAsset/Reset", false, 100)] - static void ClearFontAssetData(MenuCommand command) - { - TMP_FontAsset fontAsset = command.context as TMP_FontAsset; - - if (fontAsset != null && Selection.activeObject != fontAsset) - { - Selection.activeObject = fontAsset; - } - - fontAsset.ClearFontAssetData(true); - - TMPro_EventManager.ON_FONT_PROPERTY_CHANGED(true, fontAsset); - } - - - [MenuItem("CONTEXT/TrueTypeFontImporter/Create TMP Font Asset...", false, 200)] - static void CreateFontAsset(MenuCommand command) - { - TrueTypeFontImporter importer = command.context as TrueTypeFontImporter; - - if (importer != null) - { - Font sourceFontFile = AssetDatabase.LoadAssetAtPath(importer.assetPath); - - if (sourceFontFile) - TMPro_FontAssetCreatorWindow.ShowFontAtlasCreatorWindow(sourceFontFile); - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_ContextMenus.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_ContextMenus.cs.meta deleted file mode 100644 index f16753fe..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_ContextMenus.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 44e1d646473a40178712cb2150f54cec -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_CreateObjectMenu.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_CreateObjectMenu.cs deleted file mode 100644 index a7c1cc15..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_CreateObjectMenu.cs +++ /dev/null @@ -1,311 +0,0 @@ -using UnityEngine; -using UnityEditor; -using UnityEditor.SceneManagement; -using UnityEditor.Experimental.SceneManagement; -using UnityEngine.SceneManagement; -using UnityEngine.UI; -using UnityEngine.EventSystems; - - -namespace TMPro.EditorUtilities -{ - public static class TMPro_CreateObjectMenu - { - - /// - /// Create a TextMeshPro object that works with the Mesh Renderer - /// - /// - [MenuItem("GameObject/3D Object/Text - TextMeshPro", false, 30)] - static void CreateTextMeshProObjectPerform(MenuCommand command) - { - GameObject go = new GameObject("Text (TMP)"); - - // Add support for new prefab mode - StageUtility.PlaceGameObjectInCurrentStage(go); - - TextMeshPro textMeshPro = go.AddComponent(); - textMeshPro.text = "Sample text"; - textMeshPro.alignment = TextAlignmentOptions.TopLeft; - - Undo.RegisterCreatedObjectUndo((Object)go, "Create " + go.name); - - GameObject contextObject = command.context as GameObject; - if (contextObject != null) - { - GameObjectUtility.SetParentAndAlign(go, contextObject); - Undo.SetTransformParent(go.transform, contextObject.transform, "Parent " + go.name); - } - - Selection.activeGameObject = go; - } - - - /// - /// Create a TextMeshPro object that works with the CanvasRenderer - /// - /// - [MenuItem("GameObject/UI/Text - TextMeshPro", false, 2001)] - static void CreateTextMeshProGuiObjectPerform(MenuCommand menuCommand) - { - GameObject go = TMP_DefaultControls.CreateText(GetStandardResources()); - - // Override text color and font size - TMP_Text textComponent = go.GetComponent(); - textComponent.color = Color.white; - if (textComponent.m_isWaitingOnResourceLoad == false) - textComponent.fontSize = TMP_Settings.defaultFontSize; - - PlaceUIElementRoot(go, menuCommand); - } - - [MenuItem("GameObject/UI/Button - TextMeshPro", false, 2031)] - static public void AddButton(MenuCommand menuCommand) - { - GameObject go = TMP_DefaultControls.CreateButton(GetStandardResources()); - - // Override font size - TMP_Text textComponent = go.GetComponentInChildren(); - textComponent.fontSize = 24; - - PlaceUIElementRoot(go, menuCommand); - } - - - - [MenuItem("GameObject/UI/Input Field - TextMeshPro", false, 2037)] - static void AddTextMeshProInputField(MenuCommand menuCommand) - { - GameObject go = TMP_DefaultControls.CreateInputField(GetStandardResources()); - PlaceUIElementRoot(go, menuCommand); - } - - - [MenuItem("GameObject/UI/Dropdown - TextMeshPro", false, 2036)] - static public void AddDropdown(MenuCommand menuCommand) - { - GameObject go = TMP_DefaultControls.CreateDropdown(GetStandardResources()); - PlaceUIElementRoot(go, menuCommand); - } - - - private const string kUILayerName = "UI"; - - private const string kStandardSpritePath = "UI/Skin/UISprite.psd"; - private const string kBackgroundSpritePath = "UI/Skin/Background.psd"; - private const string kInputFieldBackgroundPath = "UI/Skin/InputFieldBackground.psd"; - private const string kKnobPath = "UI/Skin/Knob.psd"; - private const string kCheckmarkPath = "UI/Skin/Checkmark.psd"; - private const string kDropdownArrowPath = "UI/Skin/DropdownArrow.psd"; - private const string kMaskPath = "UI/Skin/UIMask.psd"; - - static private TMP_DefaultControls.Resources s_StandardResources; - - - static private TMP_DefaultControls.Resources GetStandardResources() - { - if (s_StandardResources.standard == null) - { - s_StandardResources.standard = AssetDatabase.GetBuiltinExtraResource(kStandardSpritePath); - s_StandardResources.background = AssetDatabase.GetBuiltinExtraResource(kBackgroundSpritePath); - s_StandardResources.inputField = AssetDatabase.GetBuiltinExtraResource(kInputFieldBackgroundPath); - s_StandardResources.knob = AssetDatabase.GetBuiltinExtraResource(kKnobPath); - s_StandardResources.checkmark = AssetDatabase.GetBuiltinExtraResource(kCheckmarkPath); - s_StandardResources.dropdown = AssetDatabase.GetBuiltinExtraResource(kDropdownArrowPath); - s_StandardResources.mask = AssetDatabase.GetBuiltinExtraResource(kMaskPath); - } - return s_StandardResources; - } - - - private static void SetPositionVisibleinSceneView(RectTransform canvasRTransform, RectTransform itemTransform) - { - // Find the best scene view - SceneView sceneView = SceneView.lastActiveSceneView; - if (sceneView == null && SceneView.sceneViews.Count > 0) - sceneView = SceneView.sceneViews[0] as SceneView; - - // Couldn't find a SceneView. Don't set position. - if (sceneView == null || sceneView.camera == null) - return; - - // Create world space Plane from canvas position. - Camera camera = sceneView.camera; - Vector3 position = Vector3.zero; - if (RectTransformUtility.ScreenPointToLocalPointInRectangle(canvasRTransform, new Vector2(camera.pixelWidth / 2, camera.pixelHeight / 2), camera, out Vector2 localPlanePosition)) - { - // Adjust for canvas pivot - localPlanePosition.x = localPlanePosition.x + canvasRTransform.sizeDelta.x * canvasRTransform.pivot.x; - localPlanePosition.y = localPlanePosition.y + canvasRTransform.sizeDelta.y * canvasRTransform.pivot.y; - - localPlanePosition.x = Mathf.Clamp(localPlanePosition.x, 0, canvasRTransform.sizeDelta.x); - localPlanePosition.y = Mathf.Clamp(localPlanePosition.y, 0, canvasRTransform.sizeDelta.y); - - // Adjust for anchoring - position.x = localPlanePosition.x - canvasRTransform.sizeDelta.x * itemTransform.anchorMin.x; - position.y = localPlanePosition.y - canvasRTransform.sizeDelta.y * itemTransform.anchorMin.y; - - Vector3 minLocalPosition; - minLocalPosition.x = canvasRTransform.sizeDelta.x * (0 - canvasRTransform.pivot.x) + itemTransform.sizeDelta.x * itemTransform.pivot.x; - minLocalPosition.y = canvasRTransform.sizeDelta.y * (0 - canvasRTransform.pivot.y) + itemTransform.sizeDelta.y * itemTransform.pivot.y; - - Vector3 maxLocalPosition; - maxLocalPosition.x = canvasRTransform.sizeDelta.x * (1 - canvasRTransform.pivot.x) - itemTransform.sizeDelta.x * itemTransform.pivot.x; - maxLocalPosition.y = canvasRTransform.sizeDelta.y * (1 - canvasRTransform.pivot.y) - itemTransform.sizeDelta.y * itemTransform.pivot.y; - - position.x = Mathf.Clamp(position.x, minLocalPosition.x, maxLocalPosition.x); - position.y = Mathf.Clamp(position.y, minLocalPosition.y, maxLocalPosition.y); - } - - itemTransform.anchoredPosition = position; - itemTransform.localRotation = Quaternion.identity; - itemTransform.localScale = Vector3.one; - } - - - private static void PlaceUIElementRoot(GameObject element, MenuCommand menuCommand) - { - GameObject parent = menuCommand.context as GameObject; - bool explicitParentChoice = true; - if (parent == null) - { - parent = GetOrCreateCanvasGameObject(); - explicitParentChoice = false; - - // If in Prefab Mode, Canvas has to be part of Prefab contents, - // otherwise use Prefab root instead. - PrefabStage prefabStage = PrefabStageUtility.GetCurrentPrefabStage(); - if (prefabStage != null && !prefabStage.IsPartOfPrefabContents(parent)) - parent = prefabStage.prefabContentsRoot; - } - if (parent.GetComponentInParent() == null) - { - // Create canvas under context GameObject, - // and make that be the parent which UI element is added under. - GameObject canvas = CreateNewUI(); - canvas.transform.SetParent(parent.transform, false); - parent = canvas; - } - - // Setting the element to be a child of an element already in the scene should - // be sufficient to also move the element to that scene. - // However, it seems the element needs to be already in its destination scene when the - // RegisterCreatedObjectUndo is performed; otherwise the scene it was created in is dirtied. - SceneManager.MoveGameObjectToScene(element, parent.scene); - - if (element.transform.parent == null) - { - Undo.SetTransformParent(element.transform, parent.transform, "Parent " + element.name); - } - - GameObjectUtility.EnsureUniqueNameForSibling(element); - - // We have to fix up the undo name since the name of the object was only known after reparenting it. - Undo.SetCurrentGroupName("Create " + element.name); - - GameObjectUtility.SetParentAndAlign(element, parent); - if (!explicitParentChoice) // not a context click, so center in sceneview - SetPositionVisibleinSceneView(parent.GetComponent(), element.GetComponent()); - - Undo.RegisterCreatedObjectUndo(element, "Create " + element.name); - - Selection.activeGameObject = element; - } - - - static public GameObject CreateNewUI() - { - // Root for the UI - var root = new GameObject("Canvas"); - root.layer = LayerMask.NameToLayer(kUILayerName); - Canvas canvas = root.AddComponent(); - canvas.renderMode = RenderMode.ScreenSpaceOverlay; - root.AddComponent(); - root.AddComponent(); - - // Works for all stages. - StageUtility.PlaceGameObjectInCurrentStage(root); - bool customScene = false; - PrefabStage prefabStage = PrefabStageUtility.GetCurrentPrefabStage(); - if (prefabStage != null) - { - root.transform.SetParent(prefabStage.prefabContentsRoot.transform, false); - customScene = true; - } - - Undo.RegisterCreatedObjectUndo(root, "Create " + root.name); - - // If there is no event system add one... - // No need to place event system in custom scene as these are temporary anyway. - // It can be argued for or against placing it in the user scenes, - // but let's not modify scene user is not currently looking at. - if (!customScene) - CreateEventSystem(false); - return root; - } - - - private static void CreateEventSystem(bool select) - { - CreateEventSystem(select, null); - } - - - private static void CreateEventSystem(bool select, GameObject parent) - { - var esys = Object.FindObjectOfType(); - if (esys == null) - { - var eventSystem = new GameObject("EventSystem"); - GameObjectUtility.SetParentAndAlign(eventSystem, parent); - esys = eventSystem.AddComponent(); - eventSystem.AddComponent(); - - Undo.RegisterCreatedObjectUndo(eventSystem, "Create " + eventSystem.name); - } - - if (select && esys != null) - { - Selection.activeGameObject = esys.gameObject; - } - } - - - // Helper function that returns a Canvas GameObject; preferably a parent of the selection, or other existing Canvas. - static public GameObject GetOrCreateCanvasGameObject() - { - GameObject selectedGo = Selection.activeGameObject; - - // Try to find a gameobject that is the selected GO or one if its parents. - Canvas canvas = (selectedGo != null) ? selectedGo.GetComponentInParent() : null; - if (IsValidCanvas(canvas)) - return canvas.gameObject; - - // No canvas in selection or its parents? Then use any valid canvas. - // We have to find all loaded Canvases, not just the ones in main scenes. - Canvas[] canvasArray = StageUtility.GetCurrentStageHandle().FindComponentsOfType(); - for (int i = 0; i < canvasArray.Length; i++) - if (IsValidCanvas(canvasArray[i])) - return canvasArray[i].gameObject; - - // No canvas in the scene at all? Then create a new one. - return CreateNewUI(); - } - - static bool IsValidCanvas(Canvas canvas) - { - if (canvas == null || !canvas.gameObject.activeInHierarchy) - return false; - - // It's important that the non-editable canvas from a prefab scene won't be rejected, - // but canvases not visible in the Hierarchy at all do. Don't check for HideAndDontSave. - if (EditorUtility.IsPersistent(canvas) || (canvas.hideFlags & HideFlags.HideInHierarchy) != 0) - return false; - - if (StageUtility.GetStageHandle(canvas.gameObject) != StageUtility.GetCurrentStageHandle()) - return false; - - return true; - } - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_CreateObjectMenu.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_CreateObjectMenu.cs.meta deleted file mode 100644 index be9643fd..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_CreateObjectMenu.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 7065397ff8184621aa3ca4f854491259 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_EditorShaderUtilities.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_EditorShaderUtilities.cs deleted file mode 100644 index 3d639005..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_EditorShaderUtilities.cs +++ /dev/null @@ -1,53 +0,0 @@ -using UnityEngine; -using UnityEditor; -using System.Linq; -using System.Collections; - - -namespace TMPro.EditorUtilities -{ - - public static class EditorShaderUtilities - { - - /// - /// Copy Shader properties from source to destination material. - /// - /// - /// - public static void CopyMaterialProperties(Material source, Material destination) - { - MaterialProperty[] source_prop = MaterialEditor.GetMaterialProperties(new Material[] { source }); - - for (int i = 0; i < source_prop.Length; i++) - { - int property_ID = Shader.PropertyToID(source_prop[i].name); - if (destination.HasProperty(property_ID)) - { - //Debug.Log(source_prop[i].name + " Type:" + ShaderUtil.GetPropertyType(source.shader, i)); - switch (ShaderUtil.GetPropertyType(source.shader, i)) - { - case ShaderUtil.ShaderPropertyType.Color: - destination.SetColor(property_ID, source.GetColor(property_ID)); - break; - case ShaderUtil.ShaderPropertyType.Float: - destination.SetFloat(property_ID, source.GetFloat(property_ID)); - break; - case ShaderUtil.ShaderPropertyType.Range: - destination.SetFloat(property_ID, source.GetFloat(property_ID)); - break; - case ShaderUtil.ShaderPropertyType.TexEnv: - destination.SetTexture(property_ID, source.GetTexture(property_ID)); - break; - case ShaderUtil.ShaderPropertyType.Vector: - destination.SetVector(property_ID, source.GetVector(property_ID)); - break; - } - } - } - - } - - } - -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_EditorShaderUtilities.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_EditorShaderUtilities.cs.meta deleted file mode 100644 index 89d25943..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_EditorShaderUtilities.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: aa76955fe5bb44f7915d91db8c7043c4 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs deleted file mode 100644 index 95be939d..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs +++ /dev/null @@ -1,1736 +0,0 @@ -using System; -using UnityEngine; -using UnityEditor; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.IO; -using System.Text.RegularExpressions; -using UnityEngine.TextCore; -using UnityEngine.TextCore.LowLevel; -using Object = UnityEngine.Object; - -namespace TMPro.EditorUtilities -{ - public class TMPro_FontAssetCreatorWindow : EditorWindow - { - [MenuItem("Window/TextMeshPro/Font Asset Creator", false, 2025)] - public static void ShowFontAtlasCreatorWindow() - { - var window = GetWindow(); - window.titleContent = new GUIContent("Font Asset Creator"); - window.Focus(); - - // Make sure TMP Essential Resources have been imported. - window.CheckEssentialResources(); - } - - - public static void ShowFontAtlasCreatorWindow(Font sourceFontFile) - { - var window = GetWindow(); - - window.titleContent = new GUIContent("Font Asset Creator"); - window.Focus(); - - window.ClearGeneratedData(); - window.m_LegacyFontAsset = null; - window.m_SelectedFontAsset = null; - - // Override selected font asset - window.m_SourceFontFile = sourceFontFile; - - // Make sure TMP Essential Resources have been imported. - window.CheckEssentialResources(); - } - - - public static void ShowFontAtlasCreatorWindow(TMP_FontAsset fontAsset) - { - var window = GetWindow(); - - window.titleContent = new GUIContent("Font Asset Creator"); - window.Focus(); - - // Clear any previously generated data - window.ClearGeneratedData(); - window.m_LegacyFontAsset = null; - - // Load font asset creation settings if we have valid settings - if (string.IsNullOrEmpty(fontAsset.creationSettings.sourceFontFileGUID) == false) - { - window.LoadFontCreationSettings(fontAsset.creationSettings); - - // Override settings to inject character list from font asset - window.m_CharacterSetSelectionMode = 6; - window.m_CharacterSequence = TMP_EditorUtility.GetUnicodeCharacterSequence(TMP_FontAsset.GetCharactersArray(fontAsset)); - - - window.m_ReferencedFontAsset = fontAsset; - window.m_SavedFontAtlas = fontAsset.atlasTexture; - } - else - { - window.m_WarningMessage = "Font Asset [" + fontAsset.name + "] does not contain any previous \"Font Asset Creation Settings\". This usually means [" + fontAsset.name + "] was created before this new functionality was added."; - window.m_SourceFontFile = null; - window.m_LegacyFontAsset = fontAsset; - } - - // Even if we don't have any saved generation settings, we still want to pre-select the source font file. - window.m_SelectedFontAsset = fontAsset; - - // Make sure TMP Essential Resources have been imported. - window.CheckEssentialResources(); - } - - [System.Serializable] - class FontAssetCreationSettingsContainer - { - public List fontAssetCreationSettings; - } - - FontAssetCreationSettingsContainer m_FontAssetCreationSettingsContainer; - - //static readonly string[] m_FontCreationPresets = new string[] { "Recent 1", "Recent 2", "Recent 3", "Recent 4" }; - int m_FontAssetCreationSettingsCurrentIndex = 0; - - const string k_FontAssetCreationSettingsContainerKey = "TextMeshPro.FontAssetCreator.RecentFontAssetCreationSettings.Container"; - const string k_FontAssetCreationSettingsCurrentIndexKey = "TextMeshPro.FontAssetCreator.RecentFontAssetCreationSettings.CurrentIndex"; - const float k_TwoColumnControlsWidth = 335f; - - // Diagnostics - System.Diagnostics.Stopwatch m_StopWatch; - double m_GlyphPackingGenerationTime; - double m_GlyphRenderingGenerationTime; - - string[] m_FontSizingOptions = { "Auto Sizing", "Custom Size" }; - int m_PointSizeSamplingMode; - string[] m_FontResolutionLabels = { "8", "16","32", "64", "128", "256", "512", "1024", "2048", "4096", "8192" }; - int[] m_FontAtlasResolutions = { 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192 }; - string[] m_FontCharacterSets = { "ASCII", "Extended ASCII", "ASCII Lowercase", "ASCII Uppercase", "Numbers + Symbols", "Custom Range", "Unicode Range (Hex)", "Custom Characters", "Characters from File" }; - enum FontPackingModes { Fast = 0, Optimum = 4 }; - FontPackingModes m_PackingMode = FontPackingModes.Fast; - - int m_CharacterSetSelectionMode; - - string m_CharacterSequence = ""; - string m_OutputFeedback = ""; - string m_WarningMessage; - int m_CharacterCount; - Vector2 m_ScrollPosition; - Vector2 m_OutputScrollPosition; - - bool m_IsRepaintNeeded; - - float m_AtlasGenerationProgress; - string m_AtlasGenerationProgressLabel = string.Empty; - float m_RenderingProgress; - bool m_IsRenderingDone; - bool m_IsProcessing; - bool m_IsGenerationDisabled; - bool m_IsGenerationCancelled; - - bool m_IsFontAtlasInvalid; - Object m_SourceFontFile; - TMP_FontAsset m_SelectedFontAsset; - TMP_FontAsset m_LegacyFontAsset; - TMP_FontAsset m_ReferencedFontAsset; - - TextAsset m_CharactersFromFile; - int m_PointSize; - int m_Padding = 5; - //FaceStyles m_FontStyle = FaceStyles.Normal; - //float m_FontStyleValue = 2; - - GlyphRenderMode m_GlyphRenderMode = GlyphRenderMode.SDFAA; - int m_AtlasWidth = 512; - int m_AtlasHeight = 512; - byte[] m_AtlasTextureBuffer; - Texture2D m_FontAtlasTexture; - Texture2D m_SavedFontAtlas; - - // - List m_FontGlyphTable = new List(); - List m_FontCharacterTable = new List(); - - Dictionary m_CharacterLookupMap = new Dictionary(); - Dictionary> m_GlyphLookupMap = new Dictionary>(); - - List m_GlyphsToPack = new List(); - List m_GlyphsPacked = new List(); - List m_FreeGlyphRects = new List(); - List m_UsedGlyphRects = new List(); - List m_GlyphsToRender = new List(); - List m_AvailableGlyphsToAdd = new List(); - List m_MissingCharacters = new List(); - List m_ExcludedCharacters = new List(); - - private FaceInfo m_FaceInfo; - - bool m_IncludeFontFeatures; - - - public void OnEnable() - { - // Used for Diagnostics - m_StopWatch = new System.Diagnostics.Stopwatch(); - - // Set Editor window size. - minSize = new Vector2(315, minSize.y); - - // Initialize & Get shader property IDs. - ShaderUtilities.GetShaderPropertyIDs(); - - // Load last selected preset if we are not already in the process of regenerating an existing font asset (via the Context menu) - if (EditorPrefs.HasKey(k_FontAssetCreationSettingsContainerKey)) - { - if (m_FontAssetCreationSettingsContainer == null) - m_FontAssetCreationSettingsContainer = JsonUtility.FromJson(EditorPrefs.GetString(k_FontAssetCreationSettingsContainerKey)); - - if (m_FontAssetCreationSettingsContainer.fontAssetCreationSettings != null && m_FontAssetCreationSettingsContainer.fontAssetCreationSettings.Count > 0) - { - // Load Font Asset Creation Settings preset. - if (EditorPrefs.HasKey(k_FontAssetCreationSettingsCurrentIndexKey)) - m_FontAssetCreationSettingsCurrentIndex = EditorPrefs.GetInt(k_FontAssetCreationSettingsCurrentIndexKey); - - LoadFontCreationSettings(m_FontAssetCreationSettingsContainer.fontAssetCreationSettings[m_FontAssetCreationSettingsCurrentIndex]); - } - } - - ClearGeneratedData(); - } - - - public void OnDisable() - { - //Debug.Log("TextMeshPro Editor Window has been disabled."); - - // Destroy Engine only if it has been initialized already - FontEngine.DestroyFontEngine(); - - ClearGeneratedData(); - - // Remove Glyph Report if one was created. - if (File.Exists("Assets/TextMesh Pro/Glyph Report.txt")) - { - File.Delete("Assets/TextMesh Pro/Glyph Report.txt"); - File.Delete("Assets/TextMesh Pro/Glyph Report.txt.meta"); - - AssetDatabase.Refresh(); - } - - // Save Font Asset Creation Settings Index - SaveCreationSettingsToEditorPrefs(SaveFontCreationSettings()); - EditorPrefs.SetInt(k_FontAssetCreationSettingsCurrentIndexKey, m_FontAssetCreationSettingsCurrentIndex); - - // Unregister to event - TMPro_EventManager.RESOURCE_LOAD_EVENT.Remove(ON_RESOURCES_LOADED); - - Resources.UnloadUnusedAssets(); - } - - - // Event received when TMP resources have been loaded. - void ON_RESOURCES_LOADED() - { - TMPro_EventManager.RESOURCE_LOAD_EVENT.Remove(ON_RESOURCES_LOADED); - - m_IsGenerationDisabled = false; - } - - // Make sure TMP Essential Resources have been imported. - void CheckEssentialResources() - { - if (TMP_Settings.instance == null) - { - if (m_IsGenerationDisabled == false) - TMPro_EventManager.RESOURCE_LOAD_EVENT.Add(ON_RESOURCES_LOADED); - - m_IsGenerationDisabled = true; - } - } - - - public void OnGUI() - { - GUILayout.BeginHorizontal(); - DrawControls(); - if (position.width > position.height && position.width > k_TwoColumnControlsWidth) - { - DrawPreview(); - } - GUILayout.EndHorizontal(); - } - - - public void Update() - { - if (m_IsRepaintNeeded) - { - //Debug.Log("Repainting..."); - m_IsRepaintNeeded = false; - Repaint(); - } - - // Update Progress bar is we are Rendering a Font. - if (m_IsProcessing) - { - m_AtlasGenerationProgress = FontEngine.generationProgress; - - m_IsRepaintNeeded = true; - } - - // Update Feedback Window & Create Font Texture once Rendering is done. - if (m_IsRenderingDone) - { - m_IsProcessing = false; - m_IsRenderingDone = false; - - if (m_IsGenerationCancelled == false) - { - m_AtlasGenerationProgressLabel = "Generation completed in: " + (m_GlyphPackingGenerationTime + m_GlyphRenderingGenerationTime).ToString("0.00 ms."); - - UpdateRenderFeedbackWindow(); - CreateFontAtlasTexture(); - - // If dynamic make readable ... - m_FontAtlasTexture.Apply(false, false); - } - Repaint(); - } - } - - - /// - /// Method which returns the character corresponding to a decimal value. - /// - /// - /// - static uint[] ParseNumberSequence(string sequence) - { - List unicodeList = new List(); - string[] sequences = sequence.Split(','); - - foreach (string seq in sequences) - { - string[] s1 = seq.Split('-'); - - if (s1.Length == 1) - try - { - unicodeList.Add(uint.Parse(s1[0])); - } - catch - { - Debug.Log("No characters selected or invalid format."); - } - else - { - for (uint j = uint.Parse(s1[0]); j < uint.Parse(s1[1]) + 1; j++) - { - unicodeList.Add(j); - } - } - } - - return unicodeList.ToArray(); - } - - - /// - /// Method which returns the character (decimal value) from a hex sequence. - /// - /// - /// - static uint[] ParseHexNumberSequence(string sequence) - { - List unicodeList = new List(); - string[] sequences = sequence.Split(','); - - foreach (string seq in sequences) - { - string[] s1 = seq.Split('-'); - - if (s1.Length == 1) - try - { - unicodeList.Add(uint.Parse(s1[0], NumberStyles.AllowHexSpecifier)); - } - catch - { - Debug.Log("No characters selected or invalid format."); - } - else - { - for (uint j = uint.Parse(s1[0], NumberStyles.AllowHexSpecifier); j < uint.Parse(s1[1], NumberStyles.AllowHexSpecifier) + 1; j++) - { - unicodeList.Add(j); - } - } - } - - return unicodeList.ToArray(); - } - - - void DrawControls() - { - GUILayout.Space(5f); - - if (position.width > position.height && position.width > k_TwoColumnControlsWidth) - { - m_ScrollPosition = EditorGUILayout.BeginScrollView(m_ScrollPosition, GUILayout.Width(315)); - } - else - { - m_ScrollPosition = EditorGUILayout.BeginScrollView(m_ScrollPosition); - } - - GUILayout.Space(5f); - - GUILayout.Label(m_SelectedFontAsset != null ? string.Format("Font Settings [{0}]", m_SelectedFontAsset.name) : "Font Settings", EditorStyles.boldLabel); - - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - - EditorGUIUtility.labelWidth = 125f; - EditorGUIUtility.fieldWidth = 5f; - - // Disable Options if already generating a font atlas texture. - EditorGUI.BeginDisabledGroup(m_IsProcessing); - { - // FONT TTF SELECTION - EditorGUI.BeginChangeCheck(); - m_SourceFontFile = EditorGUILayout.ObjectField("Source Font File", m_SourceFontFile, typeof(Font), false) as Font; - if (EditorGUI.EndChangeCheck()) - { - m_SelectedFontAsset = null; - m_IsFontAtlasInvalid = true; - } - - // FONT SIZING - EditorGUI.BeginChangeCheck(); - if (m_PointSizeSamplingMode == 0) - { - m_PointSizeSamplingMode = EditorGUILayout.Popup("Sampling Point Size", m_PointSizeSamplingMode, m_FontSizingOptions); - } - else - { - GUILayout.BeginHorizontal(); - m_PointSizeSamplingMode = EditorGUILayout.Popup("Sampling Point Size", m_PointSizeSamplingMode, m_FontSizingOptions, GUILayout.Width(225)); - m_PointSize = EditorGUILayout.IntField(m_PointSize); - GUILayout.EndHorizontal(); - } - if (EditorGUI.EndChangeCheck()) - { - m_IsFontAtlasInvalid = true; - } - - // FONT PADDING - EditorGUI.BeginChangeCheck(); - m_Padding = EditorGUILayout.IntField("Padding", m_Padding); - m_Padding = (int)Mathf.Clamp(m_Padding, 0f, 64f); - if (EditorGUI.EndChangeCheck()) - { - m_IsFontAtlasInvalid = true; - } - - // FONT PACKING METHOD SELECTION - EditorGUI.BeginChangeCheck(); - m_PackingMode = (FontPackingModes)EditorGUILayout.EnumPopup("Packing Method", m_PackingMode); - if (EditorGUI.EndChangeCheck()) - { - m_IsFontAtlasInvalid = true; - } - - // FONT ATLAS RESOLUTION SELECTION - GUILayout.BeginHorizontal(); - GUI.changed = false; - - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PrefixLabel("Atlas Resolution"); - m_AtlasWidth = EditorGUILayout.IntPopup(m_AtlasWidth, m_FontResolutionLabels, m_FontAtlasResolutions); - m_AtlasHeight = EditorGUILayout.IntPopup(m_AtlasHeight, m_FontResolutionLabels, m_FontAtlasResolutions); - if (EditorGUI.EndChangeCheck()) - { - m_IsFontAtlasInvalid = true; - } - - GUILayout.EndHorizontal(); - - - // FONT CHARACTER SET SELECTION - EditorGUI.BeginChangeCheck(); - bool hasSelectionChanged = false; - m_CharacterSetSelectionMode = EditorGUILayout.Popup("Character Set", m_CharacterSetSelectionMode, m_FontCharacterSets); - if (EditorGUI.EndChangeCheck()) - { - m_CharacterSequence = ""; - hasSelectionChanged = true; - m_IsFontAtlasInvalid = true; - } - - switch (m_CharacterSetSelectionMode) - { - case 0: // ASCII - //characterSequence = "32 - 126, 130, 132 - 135, 139, 145 - 151, 153, 155, 161, 166 - 167, 169 - 174, 176, 181 - 183, 186 - 187, 191, 8210 - 8226, 8230, 8240, 8242 - 8244, 8249 - 8250, 8252 - 8254, 8260, 8286"; - m_CharacterSequence = "32 - 126, 160, 8203, 8230, 9633"; - break; - - case 1: // EXTENDED ASCII - m_CharacterSequence = "32 - 126, 160 - 255, 8192 - 8303, 8364, 8482, 9633"; - // Could add 9632 for missing glyph - break; - - case 2: // Lowercase - m_CharacterSequence = "32 - 64, 91 - 126, 160"; - break; - - case 3: // Uppercase - m_CharacterSequence = "32 - 96, 123 - 126, 160"; - break; - - case 4: // Numbers & Symbols - m_CharacterSequence = "32 - 64, 91 - 96, 123 - 126, 160"; - break; - - case 5: // Custom Range - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - GUILayout.Label("Enter a sequence of decimal values to define the characters to be included in the font asset or retrieve one from another font asset.", TMP_UIStyleManager.label); - GUILayout.Space(10f); - - EditorGUI.BeginChangeCheck(); - m_ReferencedFontAsset = EditorGUILayout.ObjectField("Select Font Asset", m_ReferencedFontAsset, typeof(TMP_FontAsset), false) as TMP_FontAsset; - if (EditorGUI.EndChangeCheck() || hasSelectionChanged) - { - if (m_ReferencedFontAsset != null) - m_CharacterSequence = TMP_EditorUtility.GetDecimalCharacterSequence(TMP_FontAsset.GetCharactersArray(m_ReferencedFontAsset)); - - m_IsFontAtlasInvalid = true; - } - - // Filter out unwanted characters. - char chr = Event.current.character; - if ((chr < '0' || chr > '9') && (chr < ',' || chr > '-')) - { - Event.current.character = '\0'; - } - GUILayout.Label("Character Sequence (Decimal)", EditorStyles.boldLabel); - EditorGUI.BeginChangeCheck(); - m_CharacterSequence = EditorGUILayout.TextArea(m_CharacterSequence, TMP_UIStyleManager.textAreaBoxWindow, GUILayout.Height(120), GUILayout.ExpandWidth(true)); - if (EditorGUI.EndChangeCheck()) - { - m_IsFontAtlasInvalid = true; - } - - EditorGUILayout.EndVertical(); - break; - - case 6: // Unicode HEX Range - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - GUILayout.Label("Enter a sequence of Unicode (hex) values to define the characters to be included in the font asset or retrieve one from another font asset.", TMP_UIStyleManager.label); - GUILayout.Space(10f); - - EditorGUI.BeginChangeCheck(); - m_ReferencedFontAsset = EditorGUILayout.ObjectField("Select Font Asset", m_ReferencedFontAsset, typeof(TMP_FontAsset), false) as TMP_FontAsset; - if (EditorGUI.EndChangeCheck() || hasSelectionChanged) - { - if (m_ReferencedFontAsset != null) - m_CharacterSequence = TMP_EditorUtility.GetUnicodeCharacterSequence(TMP_FontAsset.GetCharactersArray(m_ReferencedFontAsset)); - - m_IsFontAtlasInvalid = true; - } - - // Filter out unwanted characters. - chr = Event.current.character; - if ((chr < '0' || chr > '9') && (chr < 'a' || chr > 'f') && (chr < 'A' || chr > 'F') && (chr < ',' || chr > '-')) - { - Event.current.character = '\0'; - } - GUILayout.Label("Character Sequence (Hex)", EditorStyles.boldLabel); - EditorGUI.BeginChangeCheck(); - m_CharacterSequence = EditorGUILayout.TextArea(m_CharacterSequence, TMP_UIStyleManager.textAreaBoxWindow, GUILayout.Height(120), GUILayout.ExpandWidth(true)); - if (EditorGUI.EndChangeCheck()) - { - m_IsFontAtlasInvalid = true; - } - - EditorGUILayout.EndVertical(); - break; - - case 7: // Characters from Font Asset - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - GUILayout.Label("Type the characters to be included in the font asset or retrieve them from another font asset.", TMP_UIStyleManager.label); - GUILayout.Space(10f); - - EditorGUI.BeginChangeCheck(); - m_ReferencedFontAsset = EditorGUILayout.ObjectField("Select Font Asset", m_ReferencedFontAsset, typeof(TMP_FontAsset), false) as TMP_FontAsset; - if (EditorGUI.EndChangeCheck() || hasSelectionChanged) - { - if (m_ReferencedFontAsset != null) - m_CharacterSequence = TMP_FontAsset.GetCharacters(m_ReferencedFontAsset); - - m_IsFontAtlasInvalid = true; - } - - EditorGUI.indentLevel = 0; - - GUILayout.Label("Custom Character List", EditorStyles.boldLabel); - EditorGUI.BeginChangeCheck(); - m_CharacterSequence = EditorGUILayout.TextArea(m_CharacterSequence, TMP_UIStyleManager.textAreaBoxWindow, GUILayout.Height(120), GUILayout.ExpandWidth(true)); - if (EditorGUI.EndChangeCheck()) - { - m_IsFontAtlasInvalid = true; - } - EditorGUILayout.EndVertical(); - break; - - case 8: // Character List from File - EditorGUI.BeginChangeCheck(); - m_CharactersFromFile = EditorGUILayout.ObjectField("Character File", m_CharactersFromFile, typeof(TextAsset), false) as TextAsset; - if (EditorGUI.EndChangeCheck()) - { - m_IsFontAtlasInvalid = true; - } - - if (m_CharactersFromFile != null) - { - Regex rx = new Regex(@"(? - { - if (match.Value.StartsWith("\\U")) - return char.ConvertFromUtf32(int.Parse(match.Value.Replace("\\U", ""), NumberStyles.HexNumber)); - - return char.ConvertFromUtf32(int.Parse(match.Value.Replace("\\u", ""), NumberStyles.HexNumber)); - }); - } - break; - } - - // FONT STYLE SELECTION - //GUILayout.BeginHorizontal(); - //EditorGUI.BeginChangeCheck(); - ////m_FontStyle = (FaceStyles)EditorGUILayout.EnumPopup("Font Style", m_FontStyle, GUILayout.Width(225)); - ////m_FontStyleValue = EditorGUILayout.IntField((int)m_FontStyleValue); - //if (EditorGUI.EndChangeCheck()) - //{ - // m_IsFontAtlasInvalid = true; - //} - //GUILayout.EndHorizontal(); - - // Render Mode Selection - CheckForLegacyGlyphRenderMode(); - - EditorGUI.BeginChangeCheck(); - m_GlyphRenderMode = (GlyphRenderMode)EditorGUILayout.EnumPopup("Render Mode", m_GlyphRenderMode); - if (EditorGUI.EndChangeCheck()) - { - m_IsFontAtlasInvalid = true; - } - - m_IncludeFontFeatures = EditorGUILayout.Toggle("Get Kerning Pairs", m_IncludeFontFeatures); - - EditorGUILayout.Space(); - } - - EditorGUI.EndDisabledGroup(); - - if (!string.IsNullOrEmpty(m_WarningMessage)) - { - EditorGUILayout.HelpBox(m_WarningMessage, MessageType.Warning); - } - - GUI.enabled = m_SourceFontFile != null && !m_IsProcessing && !m_IsGenerationDisabled; // Enable Preview if we are not already rendering a font. - if (GUILayout.Button("Generate Font Atlas") && GUI.enabled) - { - if (!m_IsProcessing && m_SourceFontFile != null) - { - DestroyImmediate(m_FontAtlasTexture); - m_FontAtlasTexture = null; - m_SavedFontAtlas = null; - - // Initialize font engine - FontEngineError errorCode = FontEngine.InitializeFontEngine(); - if (errorCode != FontEngineError.Success) - { - Debug.Log("Font Asset Creator - Error [" + errorCode + "] has occurred while Initializing the FreeType Library."); - } - - // Get file path of the source font file. - string fontPath = AssetDatabase.GetAssetPath(m_SourceFontFile); - - if (errorCode == FontEngineError.Success) - { - errorCode = FontEngine.LoadFontFace(fontPath); - - if (errorCode != FontEngineError.Success) - { - Debug.Log("Font Asset Creator - Error Code [" + errorCode + "] has occurred trying to load the [" + m_SourceFontFile.name + "] font file. This typically results from the use of an incompatible or corrupted font file."); - } - } - - - // Define an array containing the characters we will render. - if (errorCode == FontEngineError.Success) - { - uint[] characterSet = null; - - // Get list of characters that need to be packed and rendered to the atlas texture. - if (m_CharacterSetSelectionMode == 7 || m_CharacterSetSelectionMode == 8) - { - List char_List = new List(); - - for (int i = 0; i < m_CharacterSequence.Length; i++) - { - uint unicode = m_CharacterSequence[i]; - - // Handle surrogate pairs - if (i < m_CharacterSequence.Length - 1 && char.IsHighSurrogate((char)unicode) && char.IsLowSurrogate(m_CharacterSequence[i + 1])) - { - unicode = (uint)char.ConvertToUtf32(m_CharacterSequence[i], m_CharacterSequence[i + 1]); - i += 1; - } - - // Check to make sure we don't include duplicates - if (char_List.FindIndex(item => item == unicode) == -1) - char_List.Add(unicode); - } - - characterSet = char_List.ToArray(); - } - else if (m_CharacterSetSelectionMode == 6) - { - characterSet = ParseHexNumberSequence(m_CharacterSequence); - } - else - { - characterSet = ParseNumberSequence(m_CharacterSequence); - } - - m_CharacterCount = characterSet.Length; - - m_AtlasGenerationProgress = 0; - m_IsProcessing = true; - m_IsGenerationCancelled = false; - - GlyphLoadFlags glyphLoadFlags = ((GlyphRasterModes)m_GlyphRenderMode & GlyphRasterModes.RASTER_MODE_HINTED) == GlyphRasterModes.RASTER_MODE_HINTED ? GlyphLoadFlags.LOAD_RENDER : GlyphLoadFlags.LOAD_RENDER | GlyphLoadFlags.LOAD_NO_HINTING; - - // - AutoResetEvent autoEvent = new AutoResetEvent(false); - - // Worker thread to pack glyphs in the given texture space. - ThreadPool.QueueUserWorkItem(PackGlyphs => - { - // Start Stop Watch - m_StopWatch = System.Diagnostics.Stopwatch.StartNew(); - - // Clear the various lists used in the generation process. - m_AvailableGlyphsToAdd.Clear(); - m_MissingCharacters.Clear(); - m_ExcludedCharacters.Clear(); - m_CharacterLookupMap.Clear(); - m_GlyphLookupMap.Clear(); - m_GlyphsToPack.Clear(); - m_GlyphsPacked.Clear(); - - // Check if requested characters are available in the source font file. - for (int i = 0; i < characterSet.Length; i++) - { - uint unicode = characterSet[i]; - - if (FontEngine.TryGetGlyphIndex(unicode, out uint glyphIndex)) - { - // Skip over potential duplicate characters. - if (m_CharacterLookupMap.ContainsKey(unicode)) - continue; - - // Add character to character lookup map. - m_CharacterLookupMap.Add(unicode, glyphIndex); - - // Skip over potential duplicate glyph references. - if (m_GlyphLookupMap.ContainsKey(glyphIndex)) - { - // Add additional glyph reference for this character. - m_GlyphLookupMap[glyphIndex].Add(unicode); - continue; - } - - // Add glyph reference to glyph lookup map. - m_GlyphLookupMap.Add(glyphIndex, new List() { unicode }); - - // Add glyph index to list of glyphs to add to texture. - m_AvailableGlyphsToAdd.Add(glyphIndex); - } - else - { - // Add Unicode to list of missing characters. - m_MissingCharacters.Add(unicode); - } - } - - // Pack available glyphs in the provided texture space. - if (m_AvailableGlyphsToAdd.Count > 0) - { - int packingModifier = ((GlyphRasterModes)m_GlyphRenderMode & GlyphRasterModes.RASTER_MODE_BITMAP) == GlyphRasterModes.RASTER_MODE_BITMAP ? 0 : 1; - - if (m_PointSizeSamplingMode == 0) // Auto-Sizing Point Size Mode - { - // Estimate min / max range for auto sizing of point size. - int minPointSize = 0; - int maxPointSize = (int)Mathf.Sqrt((m_AtlasWidth * m_AtlasHeight) / m_AvailableGlyphsToAdd.Count) * 3; - - m_PointSize = (maxPointSize + minPointSize) / 2; - - bool optimumPointSizeFound = false; - for (int iteration = 0; iteration < 15 && optimumPointSizeFound == false; iteration++) - { - m_AtlasGenerationProgressLabel = "Packing glyphs - Pass (" + iteration + ")"; - - FontEngine.SetFaceSize(m_PointSize); - - m_GlyphsToPack.Clear(); - m_GlyphsPacked.Clear(); - - m_FreeGlyphRects.Clear(); - m_FreeGlyphRects.Add(new GlyphRect(0, 0, m_AtlasWidth - packingModifier, m_AtlasHeight - packingModifier)); - m_UsedGlyphRects.Clear(); - - for (int i = 0; i < m_AvailableGlyphsToAdd.Count; i++) - { - uint glyphIndex = m_AvailableGlyphsToAdd[i]; - - if (FontEngine.TryGetGlyphWithIndexValue(glyphIndex, glyphLoadFlags, out Glyph glyph)) - { - if (glyph.glyphRect.width > 0 && glyph.glyphRect.height > 0) - { - m_GlyphsToPack.Add(glyph); - } - else - { - m_GlyphsPacked.Add(glyph); - } - } - } - - FontEngine.TryPackGlyphsInAtlas(m_GlyphsToPack, m_GlyphsPacked, m_Padding, (GlyphPackingMode)m_PackingMode, m_GlyphRenderMode, m_AtlasWidth, m_AtlasHeight, m_FreeGlyphRects, m_UsedGlyphRects); - - if (m_IsGenerationCancelled) - { - DestroyImmediate(m_FontAtlasTexture); - m_FontAtlasTexture = null; - return; - } - - //Debug.Log("Glyphs remaining to add [" + m_GlyphsToAdd.Count + "]. Glyphs added [" + m_GlyphsAdded.Count + "]."); - - if (m_GlyphsToPack.Count > 0) - { - if (m_PointSize > minPointSize) - { - maxPointSize = m_PointSize; - m_PointSize = (m_PointSize + minPointSize) / 2; - - //Debug.Log("Decreasing point size from [" + maxPointSize + "] to [" + m_PointSize + "]."); - } - } - else - { - if (maxPointSize - minPointSize > 1 && m_PointSize < maxPointSize) - { - minPointSize = m_PointSize; - m_PointSize = (m_PointSize + maxPointSize) / 2; - - //Debug.Log("Increasing point size from [" + minPointSize + "] to [" + m_PointSize + "]."); - } - else - { - //Debug.Log("[" + iteration + "] iterations to find the optimum point size of : [" + m_PointSize + "]."); - optimumPointSizeFound = true; - } - } - } - } - else // Custom Point Size Mode - { - m_AtlasGenerationProgressLabel = "Packing glyphs..."; - - // Set point size - FontEngine.SetFaceSize(m_PointSize); - - m_GlyphsToPack.Clear(); - m_GlyphsPacked.Clear(); - - m_FreeGlyphRects.Clear(); - m_FreeGlyphRects.Add(new GlyphRect(0, 0, m_AtlasWidth - packingModifier, m_AtlasHeight - packingModifier)); - m_UsedGlyphRects.Clear(); - - for (int i = 0; i < m_AvailableGlyphsToAdd.Count; i++) - { - uint glyphIndex = m_AvailableGlyphsToAdd[i]; - - if (FontEngine.TryGetGlyphWithIndexValue(glyphIndex, glyphLoadFlags, out Glyph glyph)) - { - if (glyph.glyphRect.width > 0 && glyph.glyphRect.height > 0) - { - m_GlyphsToPack.Add(glyph); - } - else - { - m_GlyphsPacked.Add(glyph); - } - } - } - - FontEngine.TryPackGlyphsInAtlas(m_GlyphsToPack, m_GlyphsPacked, m_Padding, (GlyphPackingMode)m_PackingMode, m_GlyphRenderMode, m_AtlasWidth, m_AtlasHeight, m_FreeGlyphRects, m_UsedGlyphRects); - - if (m_IsGenerationCancelled) - { - DestroyImmediate(m_FontAtlasTexture); - m_FontAtlasTexture = null; - return; - } - //Debug.Log("Glyphs remaining to add [" + m_GlyphsToAdd.Count + "]. Glyphs added [" + m_GlyphsAdded.Count + "]."); - } - - } - else - { - int packingModifier = ((GlyphRasterModes)m_GlyphRenderMode & GlyphRasterModes.RASTER_MODE_BITMAP) == GlyphRasterModes.RASTER_MODE_BITMAP ? 0 : 1; - - FontEngine.SetFaceSize(m_PointSize); - - m_GlyphsToPack.Clear(); - m_GlyphsPacked.Clear(); - - m_FreeGlyphRects.Clear(); - m_FreeGlyphRects.Add(new GlyphRect(0, 0, m_AtlasWidth - packingModifier, m_AtlasHeight - packingModifier)); - m_UsedGlyphRects.Clear(); - } - - //Stop StopWatch - m_StopWatch.Stop(); - m_GlyphPackingGenerationTime = m_StopWatch.Elapsed.TotalMilliseconds; - Debug.Log("Glyph packing completed in: " + m_GlyphPackingGenerationTime.ToString("0.000 ms.")); - m_StopWatch.Reset(); - - m_FontCharacterTable.Clear(); - m_FontGlyphTable.Clear(); - m_GlyphsToRender.Clear(); - - // Add glyphs and characters successfully added to texture to their respective font tables. - foreach (Glyph glyph in m_GlyphsPacked) - { - uint glyphIndex = glyph.index; - - m_FontGlyphTable.Add(glyph); - - // Add glyphs to list of glyphs that need to be rendered. - if (glyph.glyphRect.width > 0 && glyph.glyphRect.height > 0) - m_GlyphsToRender.Add(glyph); - - foreach (uint unicode in m_GlyphLookupMap[glyphIndex]) - { - // Create new Character - m_FontCharacterTable.Add(new TMP_Character(unicode, glyph)); - } - } - - // - foreach (Glyph glyph in m_GlyphsToPack) - { - foreach (uint unicode in m_GlyphLookupMap[glyph.index]) - { - m_ExcludedCharacters.Add(unicode); - } - } - - // Get the face info for the current sampling point size. - m_FaceInfo = FontEngine.GetFaceInfo(); - - autoEvent.Set(); - }); - - // Worker thread to render glyphs in texture buffer. - ThreadPool.QueueUserWorkItem(RenderGlyphs => - { - autoEvent.WaitOne(); - - // Start Stop Watch - m_StopWatch = System.Diagnostics.Stopwatch.StartNew(); - - m_IsRenderingDone = false; - - // Allocate texture data - m_AtlasTextureBuffer = new byte[m_AtlasWidth * m_AtlasHeight]; - - m_AtlasGenerationProgressLabel = "Rendering glyphs..."; - - // Render and add glyphs to the given atlas texture. - if (m_GlyphsToRender.Count > 0) - { - FontEngine.RenderGlyphsToTexture(m_GlyphsToRender, m_Padding, m_GlyphRenderMode, m_AtlasTextureBuffer, m_AtlasWidth, m_AtlasHeight); - } - - m_IsRenderingDone = true; - - // Stop StopWatch - m_StopWatch.Stop(); - m_GlyphRenderingGenerationTime = m_StopWatch.Elapsed.TotalMilliseconds; - Debug.Log("Font Atlas generation completed in: " + m_GlyphRenderingGenerationTime.ToString("0.000 ms.")); - m_StopWatch.Reset(); - }); - } - - SaveCreationSettingsToEditorPrefs(SaveFontCreationSettings()); - } - } - - // FONT RENDERING PROGRESS BAR - GUILayout.Space(1); - Rect progressRect = EditorGUILayout.GetControlRect(false, 20); - - GUI.enabled = true; - progressRect.width -= 22; - EditorGUI.ProgressBar(progressRect, Mathf.Max(0.01f, m_AtlasGenerationProgress), m_AtlasGenerationProgressLabel); - progressRect.x = progressRect.x + progressRect.width + 2; - progressRect.y -= 1; - progressRect.width = 20; - progressRect.height = 20; - - GUI.enabled = m_IsProcessing; - if (GUI.Button(progressRect, "X")) - { - FontEngine.SendCancellationRequest(); - m_AtlasGenerationProgress = 0; - m_IsProcessing = false; - m_IsGenerationCancelled = true; - } - GUILayout.Space(5); - - // FONT STATUS & INFORMATION - GUI.enabled = true; - - GUILayout.BeginVertical(EditorStyles.helpBox, GUILayout.Height(200)); - m_OutputScrollPosition = EditorGUILayout.BeginScrollView(m_OutputScrollPosition); - EditorGUILayout.LabelField(m_OutputFeedback, TMP_UIStyleManager.label); - EditorGUILayout.EndScrollView(); - GUILayout.EndVertical(); - - // SAVE TEXTURE & CREATE and SAVE FONT XML FILE - GUI.enabled = m_FontAtlasTexture != null && !m_IsProcessing; // Enable Save Button if font_Atlas is not Null. - - EditorGUILayout.BeginHorizontal(); - - if (GUILayout.Button("Save") && GUI.enabled) - { - if (m_SelectedFontAsset == null) - { - if (m_LegacyFontAsset != null) - SaveNewFontAssetWithSameName(m_LegacyFontAsset); - else - SaveNewFontAsset(m_SourceFontFile); - } - else - { - // Save over exiting Font Asset - string filePath = Path.GetFullPath(AssetDatabase.GetAssetPath(m_SelectedFontAsset)).Replace('\\', '/'); - - if (((GlyphRasterModes)m_GlyphRenderMode & GlyphRasterModes.RASTER_MODE_BITMAP) == GlyphRasterModes.RASTER_MODE_BITMAP) - Save_Bitmap_FontAsset(filePath); - else - Save_SDF_FontAsset(filePath); - } - } - if (GUILayout.Button("Save as...") && GUI.enabled) - { - if (m_SelectedFontAsset == null) - { - SaveNewFontAsset(m_SourceFontFile); - } - else - { - SaveNewFontAssetWithSameName(m_SelectedFontAsset); - } - } - - EditorGUILayout.EndHorizontal(); - - EditorGUILayout.Space(); - - EditorGUILayout.EndVertical(); - - GUI.enabled = true; // Re-enable GUI - - if (position.height > position.width || position.width < k_TwoColumnControlsWidth) - { - DrawPreview(); - GUILayout.Space(5); - } - - EditorGUILayout.EndScrollView(); - - if (m_IsFontAtlasInvalid) - ClearGeneratedData(); - } - - - /// - /// Clear the previously generated data. - /// - void ClearGeneratedData() - { - m_IsFontAtlasInvalid = false; - - if (m_FontAtlasTexture != null && !EditorUtility.IsPersistent(m_FontAtlasTexture)) - { - DestroyImmediate(m_FontAtlasTexture); - m_FontAtlasTexture = null; - } - - m_AtlasGenerationProgressLabel = string.Empty; - m_AtlasGenerationProgress = 0; - m_SavedFontAtlas = null; - - m_OutputFeedback = string.Empty; - m_WarningMessage = string.Empty; - } - - - /// - /// Function to update the feedback window showing the results of the latest generation. - /// - void UpdateRenderFeedbackWindow() - { - m_PointSize = m_FaceInfo.pointSize; - - string missingGlyphReport = string.Empty; - - //string colorTag = m_FontCharacterTable.Count == m_CharacterCount ? "" : ""; - string colorTag2 = ""; - - missingGlyphReport = "Font: " + colorTag2 + m_FaceInfo.familyName + " Style: " + colorTag2 + m_FaceInfo.styleName + ""; - - missingGlyphReport += "\nPoint Size: " + colorTag2 + m_FaceInfo.pointSize + " SP/PD Ratio: " + colorTag2 + ((float)m_Padding / m_FaceInfo.pointSize).ToString("0.0%" + ""); - - missingGlyphReport += "\n\nCharacters included: " + m_FontCharacterTable.Count + "/" + m_CharacterCount + ""; - missingGlyphReport += "\nMissing characters: " + m_MissingCharacters.Count + ""; - missingGlyphReport += "\nExcluded characters: " + m_ExcludedCharacters.Count + ""; - - // Report characters missing from font file - missingGlyphReport += "\n\nCharacters missing from font file:"; - missingGlyphReport += "\n----------------------------------------"; - - m_OutputFeedback = missingGlyphReport; - - for (int i = 0; i < m_MissingCharacters.Count; i++) - { - missingGlyphReport += "\nID: " + m_MissingCharacters[i] + "\tHex: " + m_MissingCharacters[i].ToString("X") + "\tChar [" + (char)m_MissingCharacters[i] + "]"; - - if (missingGlyphReport.Length < 16300) - m_OutputFeedback = missingGlyphReport; - } - - // Report characters that did not fit in the atlas texture - missingGlyphReport += "\n\nCharacters excluded from packing:"; - missingGlyphReport += "\n----------------------------------------"; - - for (int i = 0; i < m_ExcludedCharacters.Count; i++) - { - missingGlyphReport += "\nID: " + m_ExcludedCharacters[i] + "\tHex: " + m_ExcludedCharacters[i].ToString("X") + "\tChar [" + (char)m_ExcludedCharacters[i] + "]"; - - if (missingGlyphReport.Length < 16300) - m_OutputFeedback = missingGlyphReport; - } - - if (missingGlyphReport.Length > 16300) - m_OutputFeedback += "\n\nReport truncated.\nSee \"TextMesh Pro\\Glyph Report.txt\""; - - // Save Missing Glyph Report file - if (Directory.Exists("Assets/TextMesh Pro")) - { - missingGlyphReport = System.Text.RegularExpressions.Regex.Replace(missingGlyphReport, @"<[^>]*>", string.Empty); - File.WriteAllText("Assets/TextMesh Pro/Glyph Report.txt", missingGlyphReport); - AssetDatabase.Refresh(); - } - } - - - void CreateFontAtlasTexture() - { - if (m_FontAtlasTexture != null) - DestroyImmediate(m_FontAtlasTexture); - - m_FontAtlasTexture = new Texture2D(m_AtlasWidth, m_AtlasHeight, TextureFormat.Alpha8, false, true); - - Color32[] colors = new Color32[m_AtlasWidth * m_AtlasHeight]; - - for (int i = 0; i < colors.Length; i++) - { - byte c = m_AtlasTextureBuffer[i]; - colors[i] = new Color32(c, c, c, c); - } - - // Clear allocation of - m_AtlasTextureBuffer = null; - - if ((m_GlyphRenderMode & GlyphRenderMode.RASTER) == GlyphRenderMode.RASTER || (m_GlyphRenderMode & GlyphRenderMode.RASTER_HINTED) == GlyphRenderMode.RASTER_HINTED) - m_FontAtlasTexture.filterMode = FilterMode.Point; - - m_FontAtlasTexture.SetPixels32(colors, 0); - m_FontAtlasTexture.Apply(false, false); - - // Saving File for Debug - //var pngData = m_FontAtlasTexture.EncodeToPNG(); - //File.WriteAllBytes("Assets/Textures/Debug Font Texture.png", pngData); - } - - - /// - /// Open Save Dialog to provide the option save the font asset using the name of the source font file. This also appends SDF to the name if using any of the SDF Font Asset creation modes. - /// - /// - void SaveNewFontAsset(Object sourceObject) - { - string filePath; - - // Save new Font Asset and open save file requester at Source Font File location. - string saveDirectory = new FileInfo(AssetDatabase.GetAssetPath(sourceObject)).DirectoryName; - - if (((GlyphRasterModes)m_GlyphRenderMode & GlyphRasterModes.RASTER_MODE_BITMAP) == GlyphRasterModes.RASTER_MODE_BITMAP) - { - filePath = EditorUtility.SaveFilePanel("Save TextMesh Pro! Font Asset File", saveDirectory, sourceObject.name, "asset"); - - if (filePath.Length == 0) - return; - - Save_Bitmap_FontAsset(filePath); - } - else - { - filePath = EditorUtility.SaveFilePanel("Save TextMesh Pro! Font Asset File", saveDirectory, sourceObject.name + " SDF", "asset"); - - if (filePath.Length == 0) - return; - - Save_SDF_FontAsset(filePath); - } - } - - - /// - /// Open Save Dialog to provide the option to save the font asset under the same name. - /// - /// - void SaveNewFontAssetWithSameName(Object sourceObject) - { - string filePath; - - // Save new Font Asset and open save file requester at Source Font File location. - string saveDirectory = new FileInfo(AssetDatabase.GetAssetPath(sourceObject)).DirectoryName; - - filePath = EditorUtility.SaveFilePanel("Save TextMesh Pro! Font Asset File", saveDirectory, sourceObject.name, "asset"); - - if (filePath.Length == 0) - return; - - if (((GlyphRasterModes)m_GlyphRenderMode & GlyphRasterModes.RASTER_MODE_BITMAP) == GlyphRasterModes.RASTER_MODE_BITMAP) - { - Save_Bitmap_FontAsset(filePath); - } - else - { - Save_SDF_FontAsset(filePath); - } - } - - - void Save_Bitmap_FontAsset(string filePath) - { - filePath = filePath.Substring(0, filePath.Length - 6); // Trim file extension from filePath. - - string dataPath = Application.dataPath; - - if (filePath.IndexOf(dataPath, System.StringComparison.InvariantCultureIgnoreCase) == -1) - { - Debug.LogError("You're saving the font asset in a directory outside of this project folder. This is not supported. Please select a directory under \"" + dataPath + "\""); - return; - } - - string relativeAssetPath = filePath.Substring(dataPath.Length - 6); - string tex_DirName = Path.GetDirectoryName(relativeAssetPath); - string tex_FileName = Path.GetFileNameWithoutExtension(relativeAssetPath); - string tex_Path_NoExt = tex_DirName + "/" + tex_FileName; - - // Check if TextMeshPro font asset already exists. If not, create a new one. Otherwise update the existing one. - TMP_FontAsset fontAsset = AssetDatabase.LoadAssetAtPath(tex_Path_NoExt + ".asset", typeof(TMP_FontAsset)) as TMP_FontAsset; - if (fontAsset == null) - { - //Debug.Log("Creating TextMeshPro font asset!"); - fontAsset = ScriptableObject.CreateInstance(); // Create new TextMeshPro Font Asset. - AssetDatabase.CreateAsset(fontAsset, tex_Path_NoExt + ".asset"); - - // Set version number of font asset - fontAsset.version = "1.1.0"; - - //Set Font Asset Type - fontAsset.atlasRenderMode = m_GlyphRenderMode; - - // Reference to the source font file GUID. - fontAsset.m_SourceFontFileGUID = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(m_SourceFontFile)); - - // Add FaceInfo to Font Asset - fontAsset.faceInfo = m_FaceInfo; - - // Add GlyphInfo[] to Font Asset - fontAsset.glyphTable = m_FontGlyphTable; - - // Add CharacterTable[] to font asset. - fontAsset.characterTable = m_FontCharacterTable; - - // Sort glyph and character tables. - fontAsset.SortGlyphAndCharacterTables(); - - // Get and Add Kerning Pairs to Font Asset - if (m_IncludeFontFeatures) - fontAsset.fontFeatureTable = GetKerningTable(); - - - // Add Font Atlas as Sub-Asset - fontAsset.atlasTextures = new Texture2D[] { m_FontAtlasTexture }; - m_FontAtlasTexture.name = tex_FileName + " Atlas"; - fontAsset.atlasWidth = m_AtlasWidth; - fontAsset.atlasHeight = m_AtlasHeight; - fontAsset.atlasPadding = m_Padding; - - AssetDatabase.AddObjectToAsset(m_FontAtlasTexture, fontAsset); - - // Create new Material and Add it as Sub-Asset - Shader default_Shader = Shader.Find("TextMeshPro/Bitmap"); // m_shaderSelection; - Material tmp_material = new Material(default_Shader); - tmp_material.name = tex_FileName + " Material"; - tmp_material.SetTexture(ShaderUtilities.ID_MainTex, m_FontAtlasTexture); - fontAsset.material = tmp_material; - - AssetDatabase.AddObjectToAsset(tmp_material, fontAsset); - - } - else - { - // Find all Materials referencing this font atlas. - Material[] material_references = TMP_EditorUtility.FindMaterialReferences(fontAsset); - - // Set version number of font asset - fontAsset.version = "1.1.0"; - - // Special handling to remove legacy font asset data - if (fontAsset.m_glyphInfoList != null && fontAsset.m_glyphInfoList.Count > 0) - fontAsset.m_glyphInfoList = null; - - // Destroy Assets that will be replaced. - if (fontAsset.atlasTextures != null && fontAsset.atlasTextures.Length > 0) - DestroyImmediate(fontAsset.atlasTextures[0], true); - - //Set Font Asset Type - fontAsset.atlasRenderMode = m_GlyphRenderMode; - - // Add FaceInfo to Font Asset - fontAsset.faceInfo = m_FaceInfo; - - // Add GlyphInfo[] to Font Asset - fontAsset.glyphTable = m_FontGlyphTable; - - // Add CharacterTable[] to font asset. - fontAsset.characterTable = m_FontCharacterTable; - - // Sort glyph and character tables. - fontAsset.SortGlyphAndCharacterTables(); - - // Get and Add Kerning Pairs to Font Asset - if (m_IncludeFontFeatures) - fontAsset.fontFeatureTable = GetKerningTable(); - - // Add Font Atlas as Sub-Asset - fontAsset.atlasTextures = new Texture2D[] { m_FontAtlasTexture }; - m_FontAtlasTexture.name = tex_FileName + " Atlas"; - fontAsset.atlasWidth = m_AtlasWidth; - fontAsset.atlasHeight = m_AtlasHeight; - fontAsset.atlasPadding = m_Padding; - - // Special handling due to a bug in earlier versions of Unity. - m_FontAtlasTexture.hideFlags = HideFlags.None; - fontAsset.material.hideFlags = HideFlags.None; - - AssetDatabase.AddObjectToAsset(m_FontAtlasTexture, fontAsset); - - // Assign new font atlas texture to the existing material. - fontAsset.material.SetTexture(ShaderUtilities.ID_MainTex, fontAsset.atlasTextures[0]); - - // Update the Texture reference on the Material - for (int i = 0; i < material_references.Length; i++) - { - material_references[i].SetTexture(ShaderUtilities.ID_MainTex, m_FontAtlasTexture); - } - } - - // Add list of GlyphRects to font asset. - fontAsset.freeGlyphRects = m_FreeGlyphRects; - fontAsset.usedGlyphRects = m_UsedGlyphRects; - - // Save Font Asset creation settings - m_SelectedFontAsset = fontAsset; - m_LegacyFontAsset = null; - fontAsset.creationSettings = SaveFontCreationSettings(); - - AssetDatabase.SaveAssets(); - - AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(fontAsset)); // Re-import font asset to get the new updated version. - - //EditorUtility.SetDirty(font_asset); - fontAsset.ReadFontAssetDefinition(); - - AssetDatabase.Refresh(); - - m_FontAtlasTexture = null; - - // NEED TO GENERATE AN EVENT TO FORCE A REDRAW OF ANY TEXTMESHPRO INSTANCES THAT MIGHT BE USING THIS FONT ASSET - TMPro_EventManager.ON_FONT_PROPERTY_CHANGED(true, fontAsset); - } - - - void Save_SDF_FontAsset(string filePath) - { - filePath = filePath.Substring(0, filePath.Length - 6); // Trim file extension from filePath. - - string dataPath = Application.dataPath; - - if (filePath.IndexOf(dataPath, System.StringComparison.InvariantCultureIgnoreCase) == -1) - { - Debug.LogError("You're saving the font asset in a directory outside of this project folder. This is not supported. Please select a directory under \"" + dataPath + "\""); - return; - } - - string relativeAssetPath = filePath.Substring(dataPath.Length - 6); - string tex_DirName = Path.GetDirectoryName(relativeAssetPath); - string tex_FileName = Path.GetFileNameWithoutExtension(relativeAssetPath); - string tex_Path_NoExt = tex_DirName + "/" + tex_FileName; - - - // Check if TextMeshPro font asset already exists. If not, create a new one. Otherwise update the existing one. - TMP_FontAsset fontAsset = AssetDatabase.LoadAssetAtPath(tex_Path_NoExt + ".asset"); - if (fontAsset == null) - { - //Debug.Log("Creating TextMeshPro font asset!"); - fontAsset = ScriptableObject.CreateInstance(); // Create new TextMeshPro Font Asset. - AssetDatabase.CreateAsset(fontAsset, tex_Path_NoExt + ".asset"); - - // Set version number of font asset - fontAsset.version = "1.1.0"; - - // Reference to source font file GUID. - fontAsset.m_SourceFontFileGUID = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(m_SourceFontFile)); - - //Set Font Asset Type - fontAsset.atlasRenderMode = m_GlyphRenderMode; - - // Add FaceInfo to Font Asset - fontAsset.faceInfo = m_FaceInfo; - - // Add GlyphInfo[] to Font Asset - fontAsset.glyphTable = m_FontGlyphTable; - - // Add CharacterTable[] to font asset. - fontAsset.characterTable = m_FontCharacterTable; - - // Sort glyph and character tables. - fontAsset.SortGlyphAndCharacterTables(); - - // Get and Add Kerning Pairs to Font Asset - if (m_IncludeFontFeatures) - fontAsset.fontFeatureTable = GetKerningTable(); - - // Add Font Atlas as Sub-Asset - fontAsset.atlasTextures = new Texture2D[] { m_FontAtlasTexture }; - m_FontAtlasTexture.name = tex_FileName + " Atlas"; - fontAsset.atlasWidth = m_AtlasWidth; - fontAsset.atlasHeight = m_AtlasHeight; - fontAsset.atlasPadding = m_Padding; - - AssetDatabase.AddObjectToAsset(m_FontAtlasTexture, fontAsset); - - // Create new Material and Add it as Sub-Asset - Shader default_Shader = Shader.Find("TextMeshPro/Distance Field"); - Material tmp_material = new Material(default_Shader); - - tmp_material.name = tex_FileName + " Material"; - tmp_material.SetTexture(ShaderUtilities.ID_MainTex, m_FontAtlasTexture); - tmp_material.SetFloat(ShaderUtilities.ID_TextureWidth, m_FontAtlasTexture.width); - tmp_material.SetFloat(ShaderUtilities.ID_TextureHeight, m_FontAtlasTexture.height); - - int spread = m_Padding + 1; - tmp_material.SetFloat(ShaderUtilities.ID_GradientScale, spread); // Spread = Padding for Brute Force SDF. - - tmp_material.SetFloat(ShaderUtilities.ID_WeightNormal, fontAsset.normalStyle); - tmp_material.SetFloat(ShaderUtilities.ID_WeightBold, fontAsset.boldStyle); - - fontAsset.material = tmp_material; - - AssetDatabase.AddObjectToAsset(tmp_material, fontAsset); - - } - else - { - // Find all Materials referencing this font atlas. - Material[] material_references = TMP_EditorUtility.FindMaterialReferences(fontAsset); - - // Destroy Assets that will be replaced. - if (fontAsset.atlasTextures != null && fontAsset.atlasTextures.Length > 0) - DestroyImmediate(fontAsset.atlasTextures[0], true); - - // Set version number of font asset - fontAsset.version = "1.1.0"; - - // Special handling to remove legacy font asset data - if (fontAsset.m_glyphInfoList != null && fontAsset.m_glyphInfoList.Count > 0) - fontAsset.m_glyphInfoList = null; - - //Set Font Asset Type - fontAsset.atlasRenderMode = m_GlyphRenderMode; - - // Add FaceInfo to Font Asset - fontAsset.faceInfo = m_FaceInfo; - - // Add GlyphInfo[] to Font Asset - fontAsset.glyphTable = m_FontGlyphTable; - - // Add CharacterTable[] to font asset. - fontAsset.characterTable = m_FontCharacterTable; - - // Sort glyph and character tables. - fontAsset.SortGlyphAndCharacterTables(); - - // Get and Add Kerning Pairs to Font Asset - // TODO: Check and preserve existing adjustment pairs. - if (m_IncludeFontFeatures) - fontAsset.fontFeatureTable = GetKerningTable(); - - // Add Font Atlas as Sub-Asset - fontAsset.atlasTextures = new Texture2D[] { m_FontAtlasTexture }; - m_FontAtlasTexture.name = tex_FileName + " Atlas"; - fontAsset.atlasWidth = m_AtlasWidth; - fontAsset.atlasHeight = m_AtlasHeight; - fontAsset.atlasPadding = m_Padding; - - // Special handling due to a bug in earlier versions of Unity. - m_FontAtlasTexture.hideFlags = HideFlags.None; - fontAsset.material.hideFlags = HideFlags.None; - - AssetDatabase.AddObjectToAsset(m_FontAtlasTexture, fontAsset); - - // Assign new font atlas texture to the existing material. - fontAsset.material.SetTexture(ShaderUtilities.ID_MainTex, fontAsset.atlasTextures[0]); - - // Update the Texture reference on the Material - for (int i = 0; i < material_references.Length; i++) - { - material_references[i].SetTexture(ShaderUtilities.ID_MainTex, m_FontAtlasTexture); - material_references[i].SetFloat(ShaderUtilities.ID_TextureWidth, m_FontAtlasTexture.width); - material_references[i].SetFloat(ShaderUtilities.ID_TextureHeight, m_FontAtlasTexture.height); - - int spread = m_Padding + 1; - material_references[i].SetFloat(ShaderUtilities.ID_GradientScale, spread); // Spread = Padding for Brute Force SDF. - - material_references[i].SetFloat(ShaderUtilities.ID_WeightNormal, fontAsset.normalStyle); - material_references[i].SetFloat(ShaderUtilities.ID_WeightBold, fontAsset.boldStyle); - } - } - - // Saving File for Debug - //var pngData = destination_Atlas.EncodeToPNG(); - //File.WriteAllBytes("Assets/Textures/Debug Distance Field.png", pngData); - - // Add list of GlyphRects to font asset. - fontAsset.freeGlyphRects = m_FreeGlyphRects; - fontAsset.usedGlyphRects = m_UsedGlyphRects; - - // Save Font Asset creation settings - m_SelectedFontAsset = fontAsset; - m_LegacyFontAsset = null; - fontAsset.creationSettings = SaveFontCreationSettings(); - - AssetDatabase.SaveAssets(); - - AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(fontAsset)); // Re-import font asset to get the new updated version. - - fontAsset.ReadFontAssetDefinition(); - - AssetDatabase.Refresh(); - - m_FontAtlasTexture = null; - - // NEED TO GENERATE AN EVENT TO FORCE A REDRAW OF ANY TEXTMESHPRO INSTANCES THAT MIGHT BE USING THIS FONT ASSET - TMPro_EventManager.ON_FONT_PROPERTY_CHANGED(true, fontAsset); - } - - - /// - /// Internal method to save the Font Asset Creation Settings - /// - /// - FontAssetCreationSettings SaveFontCreationSettings() - { - FontAssetCreationSettings settings = new FontAssetCreationSettings(); - - //settings.sourceFontFileName = m_SourceFontFile.name; - settings.sourceFontFileGUID = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(m_SourceFontFile)); - settings.pointSizeSamplingMode = m_PointSizeSamplingMode; - settings.pointSize = m_PointSize; - settings.padding = m_Padding; - settings.packingMode = (int)m_PackingMode; - settings.atlasWidth = m_AtlasWidth; - settings.atlasHeight = m_AtlasHeight; - settings.characterSetSelectionMode = m_CharacterSetSelectionMode; - settings.characterSequence = m_CharacterSequence; - settings.referencedFontAssetGUID = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(m_ReferencedFontAsset)); - settings.referencedTextAssetGUID = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(m_CharactersFromFile)); - //settings.fontStyle = (int)m_FontStyle; - //settings.fontStyleModifier = m_FontStyleValue; - settings.renderMode = (int)m_GlyphRenderMode; - settings.includeFontFeatures = m_IncludeFontFeatures; - - return settings; - } - - - /// - /// Internal method to load the Font Asset Creation Settings - /// - /// - void LoadFontCreationSettings(FontAssetCreationSettings settings) - { - m_SourceFontFile = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(settings.sourceFontFileGUID)); - m_PointSizeSamplingMode = settings.pointSizeSamplingMode; - m_PointSize = settings.pointSize; - m_Padding = settings.padding; - m_PackingMode = (FontPackingModes)settings.packingMode; - m_AtlasWidth = settings.atlasWidth; - m_AtlasHeight = settings.atlasHeight; - m_CharacterSetSelectionMode = settings.characterSetSelectionMode; - m_CharacterSequence = settings.characterSequence; - m_ReferencedFontAsset = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(settings.referencedFontAssetGUID)); - m_CharactersFromFile = AssetDatabase.LoadAssetAtPath(AssetDatabase.GUIDToAssetPath(settings.referencedTextAssetGUID)); - //m_FontStyle = (FaceStyles)settings.fontStyle; - //m_FontStyleValue = settings.fontStyleModifier; - m_GlyphRenderMode = (GlyphRenderMode)settings.renderMode; - m_IncludeFontFeatures = settings.includeFontFeatures; - } - - - /// - /// Save the latest font asset creation settings to EditorPrefs. - /// - /// - void SaveCreationSettingsToEditorPrefs(FontAssetCreationSettings settings) - { - // Create new list if one does not already exist - if (m_FontAssetCreationSettingsContainer == null) - { - m_FontAssetCreationSettingsContainer = new FontAssetCreationSettingsContainer(); - m_FontAssetCreationSettingsContainer.fontAssetCreationSettings = new List(); - } - - // Add new creation settings to the list - m_FontAssetCreationSettingsContainer.fontAssetCreationSettings.Add(settings); - - // Since list should only contain the most 4 recent settings, we remove the first element if list exceeds 4 elements. - if (m_FontAssetCreationSettingsContainer.fontAssetCreationSettings.Count > 4) - m_FontAssetCreationSettingsContainer.fontAssetCreationSettings.RemoveAt(0); - - m_FontAssetCreationSettingsCurrentIndex = m_FontAssetCreationSettingsContainer.fontAssetCreationSettings.Count - 1; - - // Serialize list to JSON - string serializedSettings = JsonUtility.ToJson(m_FontAssetCreationSettingsContainer, true); - - EditorPrefs.SetString(k_FontAssetCreationSettingsContainerKey, serializedSettings); - } - - void DrawPreview() - { - Rect pixelRect; - if (position.width > position.height && position.width > k_TwoColumnControlsWidth) - { - float minSide = Mathf.Min(position.height - 15f, position.width - k_TwoColumnControlsWidth); - - EditorGUILayout.BeginVertical(EditorStyles.helpBox, GUILayout.MaxWidth(minSide)); - - pixelRect = GUILayoutUtility.GetRect(minSide, minSide, GUILayout.ExpandHeight(false), GUILayout.ExpandWidth(false)); - } - else - { - EditorGUILayout.BeginVertical(EditorStyles.helpBox); - - pixelRect = GUILayoutUtility.GetAspectRect(1f); - } - - if (m_FontAtlasTexture != null) - { - EditorGUI.DrawTextureAlpha(pixelRect, m_FontAtlasTexture, ScaleMode.StretchToFill); - } - else if (m_SavedFontAtlas != null) - { - EditorGUI.DrawTextureAlpha(pixelRect, m_SavedFontAtlas, ScaleMode.StretchToFill); - } - - EditorGUILayout.EndVertical(); - } - - - void CheckForLegacyGlyphRenderMode() - { - // Special handling for legacy glyph render mode - if ((int)m_GlyphRenderMode < 0x100) - { - switch ((int)m_GlyphRenderMode) - { - case 0: - m_GlyphRenderMode = GlyphRenderMode.SMOOTH_HINTED; - break; - case 1: - m_GlyphRenderMode = GlyphRenderMode.SMOOTH; - break; - case 2: - m_GlyphRenderMode = GlyphRenderMode.RASTER_HINTED; - break; - case 3: - m_GlyphRenderMode = GlyphRenderMode.RASTER; - break; - case 6: - case 7: - m_GlyphRenderMode = GlyphRenderMode.SDFAA; - break; - } - } - } - - - // Get Kerning Pairs - public TMP_FontFeatureTable GetKerningTable() - { - GlyphPairAdjustmentRecord[] adjustmentRecords = FontEngine.GetGlyphPairAdjustmentTable(m_AvailableGlyphsToAdd.ToArray()); - - if (adjustmentRecords == null) - return null; - - TMP_FontFeatureTable fontFeatureTable = new TMP_FontFeatureTable(); - - for (int i = 0; i < adjustmentRecords.Length; i++) - { - fontFeatureTable.glyphPairAdjustmentRecords.Add(new TMP_GlyphPairAdjustmentRecord(adjustmentRecords[i])); - } - - fontFeatureTable.SortGlyphPairAdjustmentRecords(); - - return fontFeatureTable; - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs.meta deleted file mode 100644 index 4648857f..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 383966e89d344865a36addd5d378ffd3 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_FontPlugin.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_FontPlugin.cs deleted file mode 100644 index 3b098ff2..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_FontPlugin.cs +++ /dev/null @@ -1,115 +0,0 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; -using System; -using System.Runtime.InteropServices; - - -namespace TMPro.EditorUtilities -{ - /* - public class TMPro_FontPlugin - { - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void DebugLog(string log); - private static readonly DebugLog debugLog = DebugWrapper; - private static readonly IntPtr functionPointer = Marshal.GetFunctionPointerForDelegate(debugLog); - - private static void DebugWrapper(string log) - { - Debug.Log(log); - } - - public static void LinkDebugLog() - { - LinkDebug(functionPointer); - } - - [DllImport("TMPro_Plugin")] - private static extern void LinkDebug([MarshalAs(UnmanagedType.FunctionPtr)]IntPtr debugCall); - - [DllImport("TMPro_Plugin")] - public static extern - int Initialize_FontEngine(); - - [DllImport("TMPro_Plugin")] - public static extern - int Destroy_FontEngine(); - - [DllImport("TMPro_Plugin")] - public static extern - int Load_TrueType_Font(string fontPath); - - [DllImport("TMPro_Plugin")] - public static extern - int FT_Size_Font(int fontSize); - - [DllImport("TMPro_Plugin")] - public static extern - int Render_Character(byte[] buffer_fill, byte[] buffer_edge, int buffer_width, int buffer_height, int offset, int asc, FaceStyles style, float thickness, RenderModes rasterMode, ref FT_GlyphInfo glyphInfo); - - [DllImport("TMPro_Plugin")] - public static extern - int Render_Characters(byte[] buffer, int buffer_width, int buffer_height, int character_padding, int[] asc_set, int char_count, FaceStyles style, float style_mod, bool autoSize, RenderModes renderMode, int method, ref FT_FaceInfo fontData, FT_GlyphInfo[] Output); - - [DllImport("TMPro_Plugin")] - public static extern - int FT_GetKerningPairs(string fontPath, int[] characterSet, int setCount, FT_KerningPair[] kerningPairs); - - [DllImport("TMPro_Plugin")] - public static extern - float Check_RenderProgress(); - - [DllImport("TMPro_Plugin")] - internal static extern - void SendCancellationRequest(CancellationRequestType request); - } - - public enum FaceStyles { Normal, Bold, Italic, Bold_Italic, Outline, Bold_Sim }; - public enum RenderModes { HintedSmooth = 0, Smooth = 1, RasterHinted = 2, Raster = 3, DistanceField16 = 6, DistanceField32 = 7 }; // SignedDistanceField64 = 8 - - internal enum CancellationRequestType : byte { None = 0x0, CancelInProgess = 0x1, WindowClosed = 0x2 }; - - [StructLayout(LayoutKind.Sequential)] - public struct FT_KerningPair - { - public int ascII_Left; - public int ascII_Right; - public float xAdvanceOffset; - } - - - [StructLayout(LayoutKind.Sequential)] - public struct FT_GlyphInfo - { - public int id; - public float x; - public float y; - public float width; - public float height; - public float xOffset; - public float yOffset; - public float xAdvance; - } - - - [StructLayout(LayoutKind.Sequential)] - public struct FT_FaceInfo - { - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)] - public string name; - public int pointSize; - public int padding; - public float lineHeight; - public float baseline; - public float ascender; - public float descender; - public float centerLine; - public float underline; - public float underlineThickness; - public int characterCount; - public int atlasWidth; - public int atlasHeight; - } - */ -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_FontPlugin.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_FontPlugin.cs.meta deleted file mode 100644 index 66f3a87e..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_FontPlugin.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 9edc9283e7d6409fab242fe8fb6a822c -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_SortingLayerHelper.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_SortingLayerHelper.cs deleted file mode 100644 index 4f44c53b..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_SortingLayerHelper.cs +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2014, Nick Gravelyn. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * - * 3. This notice may not be removed or altered from any source - * distribution. - */ - -using UnityEngine; -using UnityEditor; -using System; -using System.Reflection; - -namespace TMPro -{ - // Helpers used by the different sorting layer classes. - public static class SortingLayerHelper - { - private static Type _utilityType; - private static PropertyInfo _sortingLayerNamesProperty; - private static MethodInfo _getSortingLayerUserIdMethod; - - static SortingLayerHelper() - { - _utilityType = Type.GetType("UnityEditorInternal.InternalEditorUtility, UnityEditor"); - _sortingLayerNamesProperty = _utilityType.GetProperty("sortingLayerNames", BindingFlags.Static | BindingFlags.NonPublic); - _getSortingLayerUserIdMethod = _utilityType.GetMethod("GetSortingLayerUniqueID", BindingFlags.Static | BindingFlags.NonPublic); - } - - // Gets an array of sorting layer names. - // Since this uses reflection, callers should check for 'null' which will be returned if the reflection fails. - public static string[] sortingLayerNames - { - get - { - if (_sortingLayerNamesProperty == null) - { - return null; - } - - return _sortingLayerNamesProperty.GetValue(null, null) as string[]; - } - } - - // Given the ID of a sorting layer, returns the sorting layer's name - public static string GetSortingLayerNameFromID(int id) - { - string[] names = sortingLayerNames; - if (names == null) - { - return null; - } - - for (int i = 0; i < names.Length; i++) - { - if (GetSortingLayerIDForIndex(i) == id) - { - return names[i]; - } - } - - return null; - } - - // Given the name of a sorting layer, returns the ID. - public static int GetSortingLayerIDForName(string name) - { - string[] names = sortingLayerNames; - if (names == null) - { - return 0; - } - - return GetSortingLayerIDForIndex(Array.IndexOf(names, name)); - } - - // Helper to convert from a sorting layer INDEX to a sorting layer ID. These are not the same thing. - // IDs are based on the order in which layers were created and do not change when reordering the layers. - // Thankfully there is a private helper we can call to get the ID for a layer given its index. - public static int GetSortingLayerIDForIndex(int index) - { - if (_getSortingLayerUserIdMethod == null) - { - return 0; - } - - return (int)_getSortingLayerUserIdMethod.Invoke(null, new object[] { index }); - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_SortingLayerHelper.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_SortingLayerHelper.cs.meta deleted file mode 100644 index 9d902b90..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_SortingLayerHelper.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 88ed537c17c34f339121fe9a7d6d7a0e -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_TextContainerEditor.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_TextContainerEditor.cs deleted file mode 100644 index 09fc6173..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_TextContainerEditor.cs +++ /dev/null @@ -1,235 +0,0 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - - -namespace TMPro.EditorUtilities -{ - [CustomEditor(typeof(TextContainer)), CanEditMultipleObjects] - public class TMPro_TextContainerEditor : Editor - { - - // Serialized Properties - private SerializedProperty anchorPosition_prop; - private SerializedProperty pivot_prop; - private SerializedProperty rectangle_prop; - private SerializedProperty margins_prop; - - - private TextContainer m_textContainer; - //private Transform m_transform; - //private Vector3[] m_Rect_handlePoints = new Vector3[4]; - //private Vector3[] m_Margin_handlePoints = new Vector3[4]; - - //private Vector2 m_anchorPosition; - - //private Vector3 m_mousePreviousPOS; - //private Vector2 m_previousStartPOS; - //private int m_mouseDragFlag = 0; - - //private static Transform m_visualHelper; - - - void OnEnable() - { - - // Serialized Properties - anchorPosition_prop = serializedObject.FindProperty("m_anchorPosition"); - pivot_prop = serializedObject.FindProperty("m_pivot"); - rectangle_prop = serializedObject.FindProperty("m_rect"); - margins_prop = serializedObject.FindProperty("m_margins"); - - m_textContainer = (TextContainer)target; - //m_transform = m_textContainer.transform; - - - /* - if (m_visualHelper == null) - { - m_visualHelper = GameObject.CreatePrimitive(PrimitiveType.Sphere).transform; - m_visualHelper.localScale = new Vector3(0.25f, 0.25f, 0.25f); - } - */ - } - - void OnDisable() - { - /* - if (m_visualHelper != null) - DestroyImmediate (m_visualHelper.gameObject); - */ - } - - - - - public override void OnInspectorGUI() - { - serializedObject.Update(); - - EditorGUI.BeginChangeCheck(); - EditorGUILayout.PropertyField(anchorPosition_prop); - if (anchorPosition_prop.enumValueIndex == 9) - { - EditorGUI.indentLevel += 1; - EditorGUILayout.PropertyField(pivot_prop, new GUIContent("Pivot Position")); - EditorGUI.indentLevel -= 1; - } - - - DrawDimensionProperty(rectangle_prop, "Dimensions"); - DrawMaginProperty(margins_prop, "Margins"); - if (EditorGUI.EndChangeCheck()) - { - // Re-compute pivot position when changes are made. - if (anchorPosition_prop.enumValueIndex != 9) - pivot_prop.vector2Value = GetAnchorPosition(anchorPosition_prop.enumValueIndex); - - m_textContainer.hasChanged = true; - } - - serializedObject.ApplyModifiedProperties(); - - EditorGUILayout.Space(); - } - - - private void DrawDimensionProperty(SerializedProperty property, string label) - { - float old_LabelWidth = EditorGUIUtility.labelWidth; - float old_FieldWidth = EditorGUIUtility.fieldWidth; - - Rect rect = EditorGUILayout.GetControlRect(false, 18); - Rect pos0 = new Rect(rect.x, rect.y + 2, rect.width, 18); - - float width = rect.width + 3; - pos0.width = old_LabelWidth; - GUI.Label(pos0, label); - - Rect rectangle = property.rectValue; - - float width_B = width - old_LabelWidth; - float fieldWidth = width_B / 4; - pos0.width = fieldWidth - 5; - - pos0.x = old_LabelWidth + 15; - GUI.Label(pos0, "Width"); - - pos0.x += fieldWidth; - rectangle.width = EditorGUI.FloatField(pos0, GUIContent.none, rectangle.width); - - pos0.x += fieldWidth; - GUI.Label(pos0, "Height"); - - pos0.x += fieldWidth; - rectangle.height = EditorGUI.FloatField(pos0, GUIContent.none, rectangle.height); - - property.rectValue = rectangle; - EditorGUIUtility.labelWidth = old_LabelWidth; - EditorGUIUtility.fieldWidth = old_FieldWidth; - } - - - private void DrawMaginProperty(SerializedProperty property, string label) - { - float old_LabelWidth = EditorGUIUtility.labelWidth; - float old_FieldWidth = EditorGUIUtility.fieldWidth; - - Rect rect = EditorGUILayout.GetControlRect(false, 2 * 18); - Rect pos0 = new Rect(rect.x, rect.y + 2, rect.width, 18); - - float width = rect.width + 3; - pos0.width = old_LabelWidth; - GUI.Label(pos0, label); - - //Vector4 vec = property.vector4Value; - Vector4 vec = Vector4.zero; - vec.x = property.FindPropertyRelative("x").floatValue; - vec.y = property.FindPropertyRelative("y").floatValue; - vec.z = property.FindPropertyRelative("z").floatValue; - vec.w = property.FindPropertyRelative("w").floatValue; - - - float widthB = width - old_LabelWidth; - float fieldWidth = widthB / 4; - pos0.width = fieldWidth - 5; - - // Labels - pos0.x = old_LabelWidth + 15; - GUI.Label(pos0, "Left"); - - pos0.x += fieldWidth; - GUI.Label(pos0, "Top"); - - pos0.x += fieldWidth; - GUI.Label(pos0, "Right"); - - pos0.x += fieldWidth; - GUI.Label(pos0, "Bottom"); - - pos0.y += 18; - - pos0.x = old_LabelWidth + 15; - vec.x = EditorGUI.FloatField(pos0, GUIContent.none, vec.x); - - pos0.x += fieldWidth; - vec.y = EditorGUI.FloatField(pos0, GUIContent.none, vec.y); - - pos0.x += fieldWidth; - vec.z = EditorGUI.FloatField(pos0, GUIContent.none, vec.z); - - pos0.x += fieldWidth; - vec.w = EditorGUI.FloatField(pos0, GUIContent.none, vec.w); - - //property.vector4Value = vec; - property.FindPropertyRelative("x").floatValue = vec.x; - property.FindPropertyRelative("y").floatValue = vec.y; - property.FindPropertyRelative("z").floatValue = vec.z; - property.FindPropertyRelative("w").floatValue = vec.w; - - EditorGUIUtility.labelWidth = old_LabelWidth; - EditorGUIUtility.fieldWidth = old_FieldWidth; - } - - - Vector2 GetAnchorPosition(int index) - { - Vector2 anchorPosition = Vector2.zero; - - switch (index) - { - case 0: // TOP LEFT - anchorPosition = new Vector2(0, 1); - break; - case 1: // TOP - anchorPosition = new Vector2(0.5f, 1); - break; - case 2: // TOP RIGHT - anchorPosition = new Vector2(1, 1); - break; - case 3: // LEFT - anchorPosition = new Vector2(0, 0.5f); - break; - case 4: // MIDDLE - anchorPosition = new Vector2(0.5f, 0.5f); - break; - case 5: // RIGHT - anchorPosition = new Vector2(1, 0.5f); - break; - case 6: // BOTTOM LEFT - anchorPosition = new Vector2(0, 0); - break; - case 7: // BOTTOM - anchorPosition = new Vector2(0.5f, 0); - break; - case 8: // BOTTOM RIGHT - anchorPosition = new Vector2(1, 0); - break; - } - - return anchorPosition; - } - - - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_TextContainerEditor.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_TextContainerEditor.cs.meta deleted file mode 100644 index bad78812..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_TextContainerEditor.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 02893ffb522b490a9fa28eedd2584309 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_TexturePostProcessor.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_TexturePostProcessor.cs deleted file mode 100644 index b1634094..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_TexturePostProcessor.cs +++ /dev/null @@ -1,75 +0,0 @@ -using UnityEngine; -using UnityEditor; -using System.Collections; - - -namespace TMPro.EditorUtilities -{ - - public class TMPro_TexturePostProcessor : AssetPostprocessor - { - - void OnPostprocessTexture(Texture2D texture) - { - //var importer = assetImporter as TextureImporter; - - Texture2D tex = AssetDatabase.LoadAssetAtPath(assetPath, typeof(Texture2D)) as Texture2D; - - // Send Event Sub Objects - if (tex != null) - TMPro_EventManager.ON_SPRITE_ASSET_PROPERTY_CHANGED(true, tex); - } - - } - - - //public class TMPro_PackageImportPostProcessor : AssetPostprocessor - //{ - // static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) - // { - // for (int i = 0; i < importedAssets.Length; i++) - // { - // if (importedAssets[i].Contains("TextMesh Pro/Resources/TMP Settings.asset")) - // { - // Debug.Log("New TMP Settings file was just imported."); - - // // TMP Settings file was just re-imported. - // // Check if project already contains - // } - - - // if (importedAssets[i].Contains("com.unity.TextMeshPro/Examples")) - // { - // //Debug.Log("New TMP Examples folder was just imported."); - // } - - // //Debug.Log("[" + importedAssets[i] + "] was just imported."); - // } - - - - // //for (int i = 0; i < deletedAssets.Length; i++) - // //{ - // // if (deletedAssets[i] == "Assets/TextMesh Pro") - // // { - // // //Debug.Log("Asset [" + deletedAssets[i] + "] has been deleted."); - // // string currentBuildSettings = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup); - - // // //Check for and inject TMP_PRESENT - // // if (currentBuildSettings.Contains("TMP_PRESENT;")) - // // { - // // currentBuildSettings = currentBuildSettings.Replace("TMP_PRESENT;", ""); - - // // PlayerSettings.SetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup, currentBuildSettings); - // // } - // // else if (currentBuildSettings.Contains("TMP_PRESENT")) - // // { - // // currentBuildSettings = currentBuildSettings.Replace("TMP_PRESENT", ""); - - // // PlayerSettings.SetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup, currentBuildSettings); - // // } - // // } - // //} - // } - //} -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_TexturePostProcessor.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_TexturePostProcessor.cs.meta deleted file mode 100644 index fb00b80f..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/TMPro_TexturePostProcessor.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: f4935fb862d54980b1bcbca942962642 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/Unity.TextMeshPro.Editor.asmdef b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/Unity.TextMeshPro.Editor.asmdef deleted file mode 100644 index d5df154d..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/Unity.TextMeshPro.Editor.asmdef +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "Unity.TextMeshPro.Editor", - "references": [ - "Unity.TextMeshPro", - "Unity.ugui", - "Unity.ugui.Editor" - ], - "optionalUnityReferences": [], - "includePlatforms": [ - "Editor" - ], - "excludePlatforms": [] -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/Unity.TextMeshPro.Editor.asmdef.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/Unity.TextMeshPro.Editor.asmdef.meta deleted file mode 100644 index 6ed76ad6..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Editor/Unity.TextMeshPro.Editor.asmdef.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 6546d7765b4165b40850b3667f981c26 -AssemblyDefinitionImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime.meta deleted file mode 100644 index 4b244150..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 5fc988a1d5b04aee9a5222502b201a45 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/AssemblyInfo.cs.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/AssemblyInfo.cs.cs deleted file mode 100644 index 52784935..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/AssemblyInfo.cs.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System.Runtime.CompilerServices; - -// Allow internal visibility for testing purposes. -[assembly: InternalsVisibleTo("Unity.TextCore")] - -[assembly: InternalsVisibleTo("Unity.FontEngine.Tests")] - -#if UNITY_EDITOR -[assembly: InternalsVisibleTo("Unity.TextCore.Editor")] -[assembly: InternalsVisibleTo("Unity.TextMeshPro.Editor")] -#endif diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/AssemblyInfo.cs.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/AssemblyInfo.cs.cs.meta deleted file mode 100644 index cd527067..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/AssemblyInfo.cs.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1c147d10db452eb4b854a35f84472017 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/FastAction.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/FastAction.cs deleted file mode 100644 index 0a6485ab..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/FastAction.cs +++ /dev/null @@ -1,146 +0,0 @@ -using UnityEngine; -using System.Collections; -using System.Collections.Generic; - - -namespace TMPro -{ - public class FastAction - { - - LinkedList delegates = new LinkedList(); - - Dictionary> lookup = new Dictionary>(); - - public void Add(System.Action rhs) - { - if (lookup.ContainsKey(rhs)) return; - - lookup[rhs] = delegates.AddLast(rhs); - } - - public void Remove(System.Action rhs) - { - if (lookup.TryGetValue(rhs, out LinkedListNode node)) - { - lookup.Remove(rhs); - delegates.Remove(node); - } - } - - public void Call() - { - var node = delegates.First; - while (node != null) - { - node.Value(); - node = node.Next; - } - } - } - - - public class FastAction - { - - LinkedList> delegates = new LinkedList>(); - - Dictionary, LinkedListNode>> lookup = new Dictionary, LinkedListNode>>(); - - public void Add(System.Action rhs) - { - if (lookup.ContainsKey(rhs)) return; - - lookup[rhs] = delegates.AddLast(rhs); - } - - public void Remove(System.Action rhs) - { - if (lookup.TryGetValue(rhs, out LinkedListNode> node)) - { - lookup.Remove(rhs); - delegates.Remove(node); - } - } - - public void Call(A a) - { - var node = delegates.First; - while (node != null) - { - node.Value(a); - node = node.Next; - } - } - } - - - public class FastAction - { - - LinkedList> delegates = new LinkedList>(); - - Dictionary, LinkedListNode>> lookup = new Dictionary, LinkedListNode>>(); - - public void Add(System.Action rhs) - { - if (lookup.ContainsKey(rhs)) return; - - lookup[rhs] = delegates.AddLast(rhs); - } - - public void Remove(System.Action rhs) - { - if (lookup.TryGetValue(rhs, out LinkedListNode> node)) - { - lookup.Remove(rhs); - delegates.Remove(node); - } - } - - public void Call(A a, B b) - { - var node = delegates.First; - while (node != null) - { - node.Value(a, b); - node = node.Next; - } - } - } - - - public class FastAction - { - - LinkedList> delegates = new LinkedList>(); - - Dictionary, LinkedListNode>> lookup = new Dictionary, LinkedListNode>>(); - - public void Add(System.Action rhs) - { - if (lookup.ContainsKey(rhs)) return; - - lookup[rhs] = delegates.AddLast(rhs); - } - - public void Remove(System.Action rhs) - { - if (lookup.TryGetValue(rhs, out LinkedListNode> node)) - { - lookup.Remove(rhs); - delegates.Remove(node); - } - } - - public void Call(A a, B b, C c) - { - var node = delegates.First; - while (node != null) - { - node.Value(a, b, c); - node = node.Next; - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/FastAction.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/FastAction.cs.meta deleted file mode 100644 index fcd991e5..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/FastAction.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 871f8edd56e84b8fb295b10cc3c78f36 -timeCreated: 1435956061 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/MaterialReferenceManager.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/MaterialReferenceManager.cs deleted file mode 100644 index 33709634..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/MaterialReferenceManager.cs +++ /dev/null @@ -1,644 +0,0 @@ -using UnityEngine; -using System.Collections; -using System.Collections.Generic; - - -namespace TMPro -{ - - public class MaterialReferenceManager - { - private static MaterialReferenceManager s_Instance; - - // Dictionaries used to track Asset references. - private Dictionary m_FontMaterialReferenceLookup = new Dictionary(); - private Dictionary m_FontAssetReferenceLookup = new Dictionary(); - private Dictionary m_SpriteAssetReferenceLookup = new Dictionary(); - private Dictionary m_ColorGradientReferenceLookup = new Dictionary(); - - - /// - /// Get a singleton instance of the registry - /// - public static MaterialReferenceManager instance - { - get - { - if (MaterialReferenceManager.s_Instance == null) - MaterialReferenceManager.s_Instance = new MaterialReferenceManager(); - return MaterialReferenceManager.s_Instance; - } - } - - - - /// - /// Add new font asset reference to dictionary. - /// - /// - public static void AddFontAsset(TMP_FontAsset fontAsset) - { - MaterialReferenceManager.instance.AddFontAssetInternal(fontAsset); - } - - /// - /// Add new Font Asset reference to dictionary. - /// - /// - private void AddFontAssetInternal(TMP_FontAsset fontAsset) - { - if (m_FontAssetReferenceLookup.ContainsKey(fontAsset.hashCode)) return; - - // Add reference to the font asset. - m_FontAssetReferenceLookup.Add(fontAsset.hashCode, fontAsset); - - // Add reference to the font material. - m_FontMaterialReferenceLookup.Add(fontAsset.materialHashCode, fontAsset.material); - } - - - - /// - /// Add new Sprite Asset to dictionary. - /// - /// - /// - public static void AddSpriteAsset(TMP_SpriteAsset spriteAsset) - { - MaterialReferenceManager.instance.AddSpriteAssetInternal(spriteAsset); - } - - /// - /// Internal method to add a new sprite asset to the dictionary. - /// - /// - /// - private void AddSpriteAssetInternal(TMP_SpriteAsset spriteAsset) - { - if (m_SpriteAssetReferenceLookup.ContainsKey(spriteAsset.hashCode)) return; - - // Add reference to sprite asset. - m_SpriteAssetReferenceLookup.Add(spriteAsset.hashCode, spriteAsset); - - // Adding reference to the sprite asset material as well - m_FontMaterialReferenceLookup.Add(spriteAsset.hashCode, spriteAsset.material); - } - - /// - /// Add new Sprite Asset to dictionary. - /// - /// - /// - public static void AddSpriteAsset(int hashCode, TMP_SpriteAsset spriteAsset) - { - MaterialReferenceManager.instance.AddSpriteAssetInternal(hashCode, spriteAsset); - } - - /// - /// Internal method to add a new sprite asset to the dictionary. - /// - /// - /// - private void AddSpriteAssetInternal(int hashCode, TMP_SpriteAsset spriteAsset) - { - if (m_SpriteAssetReferenceLookup.ContainsKey(hashCode)) return; - - // Add reference to Sprite Asset. - m_SpriteAssetReferenceLookup.Add(hashCode, spriteAsset); - - // Add reference to Sprite Asset using the asset hashcode. - m_FontMaterialReferenceLookup.Add(hashCode, spriteAsset.material); - - // Compatibility check - if (spriteAsset.hashCode == 0) spriteAsset.hashCode = hashCode; - } - - - /// - /// Add new Material reference to dictionary. - /// - /// - /// - public static void AddFontMaterial(int hashCode, Material material) - { - MaterialReferenceManager.instance.AddFontMaterialInternal(hashCode, material); - } - - /// - /// Add new material reference to dictionary. - /// - /// - /// - private void AddFontMaterialInternal(int hashCode, Material material) - { - // Since this function is called after checking if the material is - // contained in the dictionary, there is no need to check again. - m_FontMaterialReferenceLookup.Add(hashCode, material); - } - - - /// - /// Add new Color Gradient Preset to dictionary. - /// - /// - /// - public static void AddColorGradientPreset(int hashCode, TMP_ColorGradient spriteAsset) - { - MaterialReferenceManager.instance.AddColorGradientPreset_Internal(hashCode, spriteAsset); - } - - /// - /// Internal method to add a new Color Gradient Preset to the dictionary. - /// - /// - /// - private void AddColorGradientPreset_Internal(int hashCode, TMP_ColorGradient spriteAsset) - { - if (m_ColorGradientReferenceLookup.ContainsKey(hashCode)) return; - - // Add reference to Color Gradient Preset Asset. - m_ColorGradientReferenceLookup.Add(hashCode, spriteAsset); - } - - - - /// - /// Add new material reference and return the index of this new reference in the materialReferences array. - /// - /// - /// - /// - //public int AddMaterial(Material material, int materialHashCode, TMP_FontAsset fontAsset) - //{ - // if (!m_MaterialReferenceLookup.ContainsKey(materialHashCode)) - // { - // int index = m_MaterialReferenceLookup.Count; - - // materialReferences[index].fontAsset = fontAsset; - // materialReferences[index].material = material; - // materialReferences[index].isDefaultMaterial = material.GetInstanceID() == fontAsset.material.GetInstanceID() ? true : false; - // materialReferences[index].index = index; - // materialReferences[index].referenceCount = 0; - - // m_MaterialReferenceLookup[materialHashCode] = index; - - // // Compute Padding value and store it - // // TODO - - // int fontAssetHashCode = fontAsset.hashCode; - - // if (!m_FontAssetReferenceLookup.ContainsKey(fontAssetHashCode)) - // m_FontAssetReferenceLookup.Add(fontAssetHashCode, fontAsset); - - // m_countInternal += 1; - - // return index; - // } - // else - // { - // return m_MaterialReferenceLookup[materialHashCode]; - // } - //} - - - /// - /// Add new material reference and return the index of this new reference in the materialReferences array. - /// - /// - /// - /// - /// - //public int AddMaterial(Material material, int materialHashCode, TMP_SpriteAsset spriteAsset) - //{ - // if (!m_MaterialReferenceLookup.ContainsKey(materialHashCode)) - // { - // int index = m_MaterialReferenceLookup.Count; - - // materialReferences[index].fontAsset = materialReferences[0].fontAsset; - // materialReferences[index].spriteAsset = spriteAsset; - // materialReferences[index].material = material; - // materialReferences[index].isDefaultMaterial = true; - // materialReferences[index].index = index; - // materialReferences[index].referenceCount = 0; - - // m_MaterialReferenceLookup[materialHashCode] = index; - - // int spriteAssetHashCode = spriteAsset.hashCode; - - // if (!m_SpriteAssetReferenceLookup.ContainsKey(spriteAssetHashCode)) - // m_SpriteAssetReferenceLookup.Add(spriteAssetHashCode, spriteAsset); - - // m_countInternal += 1; - - // return index; - // } - // else - // { - // return m_MaterialReferenceLookup[materialHashCode]; - // } - //} - - - /// - /// Function to check if the font asset is already referenced. - /// - /// - /// - public bool Contains(TMP_FontAsset font) - { - if (m_FontAssetReferenceLookup.ContainsKey(font.hashCode)) - return true; - - return false; - } - - - /// - /// Function to check if the sprite asset is already referenced. - /// - /// - /// - public bool Contains(TMP_SpriteAsset sprite) - { - if (m_FontAssetReferenceLookup.ContainsKey(sprite.hashCode)) - return true; - - return false; - } - - - - /// - /// Function returning the Font Asset corresponding to the provided hash code. - /// - /// - /// - /// - public static bool TryGetFontAsset(int hashCode, out TMP_FontAsset fontAsset) - { - return MaterialReferenceManager.instance.TryGetFontAssetInternal(hashCode, out fontAsset); - } - - /// - /// Internal Function returning the Font Asset corresponding to the provided hash code. - /// - /// - /// - /// - private bool TryGetFontAssetInternal(int hashCode, out TMP_FontAsset fontAsset) - { - fontAsset = null; - - if (m_FontAssetReferenceLookup.TryGetValue(hashCode, out fontAsset)) - { - return true; - } - - return false; - } - - - - /// - /// Function returning the Sprite Asset corresponding to the provided hash code. - /// - /// - /// - /// - public static bool TryGetSpriteAsset(int hashCode, out TMP_SpriteAsset spriteAsset) - { - return MaterialReferenceManager.instance.TryGetSpriteAssetInternal(hashCode, out spriteAsset); - } - - /// - /// Internal function returning the Sprite Asset corresponding to the provided hash code. - /// - /// - /// - /// - private bool TryGetSpriteAssetInternal(int hashCode, out TMP_SpriteAsset spriteAsset) - { - spriteAsset = null; - - if (m_SpriteAssetReferenceLookup.TryGetValue(hashCode, out spriteAsset)) - { - return true; - } - - return false; - } - - - /// - /// Function returning the Color Gradient Preset corresponding to the provided hash code. - /// - /// - /// - /// - public static bool TryGetColorGradientPreset(int hashCode, out TMP_ColorGradient gradientPreset) - { - return MaterialReferenceManager.instance.TryGetColorGradientPresetInternal(hashCode, out gradientPreset); - } - - /// - /// Internal function returning the Color Gradient Preset corresponding to the provided hash code. - /// - /// - /// - /// - private bool TryGetColorGradientPresetInternal(int hashCode, out TMP_ColorGradient gradientPreset) - { - gradientPreset = null; - - if (m_ColorGradientReferenceLookup.TryGetValue(hashCode, out gradientPreset)) - { - return true; - } - - return false; - } - - - /// - /// Function returning the Font Material corresponding to the provided hash code. - /// - /// - /// - /// - public static bool TryGetMaterial(int hashCode, out Material material) - { - return MaterialReferenceManager.instance.TryGetMaterialInternal(hashCode, out material); - } - - /// - /// Internal function returning the Font Material corresponding to the provided hash code. - /// - /// - /// - /// - private bool TryGetMaterialInternal(int hashCode, out Material material) - { - material = null; - - if (m_FontMaterialReferenceLookup.TryGetValue(hashCode, out material)) - { - return true; - } - - return false; - } - - - /// - /// Function to lookup a material based on hash code and returning the MaterialReference containing this material. - /// - /// - /// - /// - //public bool TryGetMaterial(int hashCode, out MaterialReference materialReference) - //{ - // int materialIndex = -1; - - // if (m_MaterialReferenceLookup.TryGetValue(hashCode, out materialIndex)) - // { - // materialReference = materialReferences[materialIndex]; - - // return true; - // } - - // materialReference = new MaterialReference(); - - // return false; - //} - - - - /// - /// - /// - /// - /// - //public int GetMaterialIndex(TMP_FontAsset fontAsset) - //{ - // if (m_MaterialReferenceLookup.ContainsKey(fontAsset.materialHashCode)) - // return m_MaterialReferenceLookup[fontAsset.materialHashCode]; - - // return -1; - //} - - - /// - /// - /// - /// - /// - //public TMP_FontAsset GetFontAsset(int index) - //{ - // if (index >= 0 && index < materialReferences.Length) - // return materialReferences[index].fontAsset; - - // return null; - //} - - - /// - /// - /// - /// - /// - /// - //public void SetDefaultMaterial(Material material, int materialHashCode, TMP_FontAsset fontAsset) - //{ - // if (!m_MaterialReferenceLookup.ContainsKey(materialHashCode)) - // { - // materialReferences[0].fontAsset = fontAsset; - // materialReferences[0].material = material; - // materialReferences[0].index = 0; - // materialReferences[0].isDefaultMaterial = material.GetInstanceID() == fontAsset.material.GetInstanceID() ? true : false; - // materialReferences[0].referenceCount = 0; - // m_MaterialReferenceLookup[materialHashCode] = 0; - - // // Compute Padding value and store it - // // TODO - - // int fontHashCode = fontAsset.hashCode; - - // if (!m_FontAssetReferenceLookup.ContainsKey(fontHashCode)) - // m_FontAssetReferenceLookup.Add(fontHashCode, fontAsset); - // } - // else - // { - // materialReferences[0].fontAsset = fontAsset; - // materialReferences[0].material = material; - // materialReferences[0].index = 0; - // materialReferences[0].referenceCount = 0; - // m_MaterialReferenceLookup[materialHashCode] = 0; - // } - // // Compute padding - // // TODO - - // m_countInternal = 1; - //} - - - - /// - /// - /// - //public void Clear() - //{ - // //m_currentIndex = 0; - // m_MaterialReferenceLookup.Clear(); - // m_SpriteAssetReferenceLookup.Clear(); - // m_FontAssetReferenceLookup.Clear(); - //} - - - /// - /// Function to clear the reference count for each of the material references. - /// - //public void ClearReferenceCount() - //{ - // m_countInternal = 0; - - // for (int i = 0; i < materialReferences.Length; i++) - // { - // if (materialReferences[i].fontAsset == null) - // return; - - // materialReferences[i].referenceCount = 0; - // } - //} - - } - - - - public struct MaterialReference - { - - public int index; - public TMP_FontAsset fontAsset; - public TMP_SpriteAsset spriteAsset; - public Material material; - public bool isDefaultMaterial; - public bool isFallbackMaterial; - public Material fallbackMaterial; - public float padding; - public int referenceCount; - - - /// - /// Constructor for new Material Reference. - /// - /// - /// - /// - /// - /// - public MaterialReference(int index, TMP_FontAsset fontAsset, TMP_SpriteAsset spriteAsset, Material material, float padding) - { - this.index = index; - this.fontAsset = fontAsset; - this.spriteAsset = spriteAsset; - this.material = material; - this.isDefaultMaterial = material.GetInstanceID() == fontAsset.material.GetInstanceID() ? true : false; - this.isFallbackMaterial = false; - this.fallbackMaterial = null; - this.padding = padding; - this.referenceCount = 0; - } - - - /// - /// Function to check if a certain font asset is contained in the material reference array. - /// - /// - /// - /// - public static bool Contains(MaterialReference[] materialReferences, TMP_FontAsset fontAsset) - { - int id = fontAsset.GetInstanceID(); - - for (int i = 0; i < materialReferences.Length && materialReferences[i].fontAsset != null; i++) - { - if (materialReferences[i].fontAsset.GetInstanceID() == id) - return true; - } - - return false; - } - - - /// - /// Function to add a new material reference and returning its index in the material reference array. - /// - /// - /// - /// - /// - /// - public static int AddMaterialReference(Material material, TMP_FontAsset fontAsset, MaterialReference[] materialReferences, Dictionary materialReferenceIndexLookup) - { - int materialID = material.GetInstanceID(); - - if (materialReferenceIndexLookup.TryGetValue(materialID, out int index)) - { - return index; - } - else - { - index = materialReferenceIndexLookup.Count; - - // Add new reference index - materialReferenceIndexLookup[materialID] = index; - - materialReferences[index].index = index; - materialReferences[index].fontAsset = fontAsset; - materialReferences[index].spriteAsset = null; - materialReferences[index].material = material; - materialReferences[index].isDefaultMaterial = materialID == fontAsset.material.GetInstanceID() ? true : false; - //materialReferences[index].padding = 0; - materialReferences[index].referenceCount = 0; - - return index; - } - } - - - /// - /// - /// - /// - /// - /// - /// - /// - public static int AddMaterialReference(Material material, TMP_SpriteAsset spriteAsset, MaterialReference[] materialReferences, Dictionary materialReferenceIndexLookup) - { - int materialID = material.GetInstanceID(); - - if (materialReferenceIndexLookup.TryGetValue(materialID, out int index)) - { - return index; - } - else - { - index = materialReferenceIndexLookup.Count; - - // Add new reference index - materialReferenceIndexLookup[materialID] = index; - - materialReferences[index].index = index; - materialReferences[index].fontAsset = materialReferences[0].fontAsset; - materialReferences[index].spriteAsset = spriteAsset; - materialReferences[index].material = material; - materialReferences[index].isDefaultMaterial = true; - //materialReferences[index].padding = 0; - materialReferences[index].referenceCount = 0; - - return index; - } - } - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/MaterialReferenceManager.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/MaterialReferenceManager.cs.meta deleted file mode 100644 index 17ad5664..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/MaterialReferenceManager.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 11a6a034ab84493cbed6af5ae7aae78b -timeCreated: 1449743129 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Asset.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Asset.cs deleted file mode 100644 index a0ff4971..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Asset.cs +++ /dev/null @@ -1,26 +0,0 @@ -using UnityEngine; - -namespace TMPro -{ - - // Base class inherited by the various TextMeshPro Assets. - [System.Serializable] - public class TMP_Asset : ScriptableObject - { - /// - /// HashCode based on the name of the asset. - /// - public int hashCode; - - /// - /// The material used by this asset. - /// - public Material material; - - /// - /// HashCode based on the name of the material assigned to this asset. - /// - public int materialHashCode; - - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Asset.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Asset.cs.meta deleted file mode 100644 index 62e9ee7a..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Asset.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 3bda1886f58f4e0ab1139400b160c3ee -timeCreated: 1459318952 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Character.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Character.cs deleted file mode 100644 index 8fc161ec..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Character.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using UnityEngine.TextCore; - -namespace TMPro -{ - /// - /// A basic element of text. - /// - [Serializable] - public class TMP_Character : TMP_TextElement - { - /// - /// Default constructor. - /// - public TMP_Character() - { - m_ElementType = TextElementType.Character; - this.scale = 1.0f; - } - - /// - /// Constructor for new character - /// - /// Unicode value. - /// Glyph - public TMP_Character(uint unicode, Glyph glyph) - { - m_ElementType = TextElementType.Character; - - this.unicode = unicode; - this.glyph = glyph; - this.glyphIndex = glyph.index; - this.scale = 1.0f; - } - - /// - /// Constructor for new character - /// - /// Unicode value. - /// Glyph index. - internal TMP_Character(uint unicode, uint glyphIndex) - { - m_ElementType = TextElementType.Character; - - this.unicode = unicode; - this.glyph = null; - this.glyphIndex = glyphIndex; - this.scale = 1.0f; - } - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Character.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Character.cs.meta deleted file mode 100644 index 55aea1b6..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_Character.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4ac5b6a65aaeb59478e3b78660e9f134 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CharacterInfo.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CharacterInfo.cs deleted file mode 100644 index e15c46af..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CharacterInfo.cs +++ /dev/null @@ -1,73 +0,0 @@ -using UnityEngine; -using UnityEngine.TextCore; - -namespace TMPro -{ - public struct TMP_Vertex - { - public Vector3 position; - public Vector2 uv; - public Vector2 uv2; - public Vector2 uv4; - public Color32 color; - - //public Vector3 normal; - //public Vector4 tangent; - } - - /// - /// Structure containing information about individual text elements (character or sprites). - /// - public struct TMP_CharacterInfo - { - public char character; // Should be changed to an int to handle UTF 32 - /// - /// Index of the character in the raw string. - /// - public int index; // Index of the character in the input string. - public int stringLength; - public TMP_TextElementType elementType; - - public TMP_TextElement textElement; - public TMP_FontAsset fontAsset; - public TMP_SpriteAsset spriteAsset; - public int spriteIndex; - public Material material; - public int materialReferenceIndex; - public bool isUsingAlternateTypeface; - - public float pointSize; - - //public short wordNumber; - public int lineNumber; - //public short charNumber; - public int pageNumber; - - - public int vertexIndex; - public TMP_Vertex vertex_BL; - public TMP_Vertex vertex_TL; - public TMP_Vertex vertex_TR; - public TMP_Vertex vertex_BR; - - public Vector3 topLeft; - public Vector3 bottomLeft; - public Vector3 topRight; - public Vector3 bottomRight; - public float origin; - public float ascender; - public float baseLine; - public float descender; - - public float xAdvance; - public float aspectRatio; - public float scale; - public Color32 color; - public Color32 underlineColor; - public Color32 strikethroughColor; - public Color32 highlightColor; - public FontStyles style; - public bool isVisible; - //public bool isIgnoringAlignment; - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CharacterInfo.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CharacterInfo.cs.meta deleted file mode 100644 index 9367a16e..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CharacterInfo.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 90fe1c65e6bb3bc4e90862df7297719e -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_ColorGradient.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_ColorGradient.cs deleted file mode 100644 index 0730adaf..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_ColorGradient.cs +++ /dev/null @@ -1,68 +0,0 @@ -using UnityEngine; -using System.Collections; - -namespace TMPro -{ - public enum ColorMode - { - Single, - HorizontalGradient, - VerticalGradient, - FourCornersGradient - } - - [System.Serializable] - public class TMP_ColorGradient : ScriptableObject - { - public ColorMode colorMode = ColorMode.FourCornersGradient; - - public Color topLeft; - public Color topRight; - public Color bottomLeft; - public Color bottomRight; - - const ColorMode k_DefaultColorMode = ColorMode.FourCornersGradient; - static readonly Color k_DefaultColor = Color.white; - - /// - /// Default Constructor which sets each of the colors as white. - /// - public TMP_ColorGradient() - { - colorMode = k_DefaultColorMode; - topLeft = k_DefaultColor; - topRight = k_DefaultColor; - bottomLeft = k_DefaultColor; - bottomRight = k_DefaultColor; - } - - /// - /// Constructor allowing to set the default color of the Color Gradient. - /// - /// - public TMP_ColorGradient(Color color) - { - colorMode = k_DefaultColorMode; - topLeft = color; - topRight = color; - bottomLeft = color; - bottomRight = color; - } - - /// - /// The vertex colors at the corners of the characters. - /// - /// Top left color. - /// Top right color. - /// Bottom left color. - /// Bottom right color. - public TMP_ColorGradient(Color color0, Color color1, Color color2, Color color3) - { - colorMode = k_DefaultColorMode; - this.topLeft = color0; - this.topRight = color1; - this.bottomLeft = color2; - this.bottomRight = color3; - } - } -} diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_ColorGradient.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_ColorGradient.cs.meta deleted file mode 100644 index 1d79d010..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_ColorGradient.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 54d21f6ece3b46479f0c328f8c6007e0 -timeCreated: 1468187202 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CoroutineTween.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CoroutineTween.cs deleted file mode 100644 index bec1f54e..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CoroutineTween.cs +++ /dev/null @@ -1,246 +0,0 @@ -using UnityEngine; -using UnityEngine.Events; -using System.Collections; - - -namespace TMPro -{ - // Base interface for tweeners, - // using an interface instead of - // an abstract class as we want the - // tweens to be structs. - internal interface ITweenValue - { - void TweenValue(float floatPercentage); - bool ignoreTimeScale { get; } - float duration { get; } - bool ValidTarget(); - } - - // Color tween class, receives the - // TweenValue callback and then sets - // the value on the target. - internal struct ColorTween : ITweenValue - { - public enum ColorTweenMode - { - All, - RGB, - Alpha - } - - public class ColorTweenCallback : UnityEvent { } - - private ColorTweenCallback m_Target; - private Color m_StartColor; - private Color m_TargetColor; - private ColorTweenMode m_TweenMode; - - private float m_Duration; - private bool m_IgnoreTimeScale; - - public Color startColor - { - get { return m_StartColor; } - set { m_StartColor = value; } - } - - public Color targetColor - { - get { return m_TargetColor; } - set { m_TargetColor = value; } - } - - public ColorTweenMode tweenMode - { - get { return m_TweenMode; } - set { m_TweenMode = value; } - } - - public float duration - { - get { return m_Duration; } - set { m_Duration = value; } - } - - public bool ignoreTimeScale - { - get { return m_IgnoreTimeScale; } - set { m_IgnoreTimeScale = value; } - } - - public void TweenValue(float floatPercentage) - { - if (!ValidTarget()) - return; - - var newColor = Color.Lerp(m_StartColor, m_TargetColor, floatPercentage); - - if (m_TweenMode == ColorTweenMode.Alpha) - { - newColor.r = m_StartColor.r; - newColor.g = m_StartColor.g; - newColor.b = m_StartColor.b; - } - else if (m_TweenMode == ColorTweenMode.RGB) - { - newColor.a = m_StartColor.a; - } - m_Target.Invoke(newColor); - } - - public void AddOnChangedCallback(UnityAction callback) - { - if (m_Target == null) - m_Target = new ColorTweenCallback(); - - m_Target.AddListener(callback); - } - - public bool GetIgnoreTimescale() - { - return m_IgnoreTimeScale; - } - - public float GetDuration() - { - return m_Duration; - } - - public bool ValidTarget() - { - return m_Target != null; - } - } - - // Float tween class, receives the - // TweenValue callback and then sets - // the value on the target. - internal struct FloatTween : ITweenValue - { - public class FloatTweenCallback : UnityEvent { } - - private FloatTweenCallback m_Target; - private float m_StartValue; - private float m_TargetValue; - - private float m_Duration; - private bool m_IgnoreTimeScale; - - public float startValue - { - get { return m_StartValue; } - set { m_StartValue = value; } - } - - public float targetValue - { - get { return m_TargetValue; } - set { m_TargetValue = value; } - } - - public float duration - { - get { return m_Duration; } - set { m_Duration = value; } - } - - public bool ignoreTimeScale - { - get { return m_IgnoreTimeScale; } - set { m_IgnoreTimeScale = value; } - } - - public void TweenValue(float floatPercentage) - { - if (!ValidTarget()) - return; - - var newValue = Mathf.Lerp(m_StartValue, m_TargetValue, floatPercentage); - m_Target.Invoke(newValue); - } - - public void AddOnChangedCallback(UnityAction callback) - { - if (m_Target == null) - m_Target = new FloatTweenCallback(); - - m_Target.AddListener(callback); - } - - public bool GetIgnoreTimescale() - { - return m_IgnoreTimeScale; - } - - public float GetDuration() - { - return m_Duration; - } - - public bool ValidTarget() - { - return m_Target != null; - } - } - - // Tween runner, executes the given tween. - // The coroutine will live within the given - // behaviour container. - internal class TweenRunner where T : struct, ITweenValue - { - protected MonoBehaviour m_CoroutineContainer; - protected IEnumerator m_Tween; - - // utility function for starting the tween - private static IEnumerator Start(T tweenInfo) - { - if (!tweenInfo.ValidTarget()) - yield break; - - var elapsedTime = 0.0f; - while (elapsedTime < tweenInfo.duration) - { - elapsedTime += tweenInfo.ignoreTimeScale ? Time.unscaledDeltaTime : Time.deltaTime; - var percentage = Mathf.Clamp01(elapsedTime / tweenInfo.duration); - tweenInfo.TweenValue(percentage); - yield return null; - } - tweenInfo.TweenValue(1.0f); - } - - public void Init(MonoBehaviour coroutineContainer) - { - m_CoroutineContainer = coroutineContainer; - } - - public void StartTween(T info) - { - if (m_CoroutineContainer == null) - { - Debug.LogWarning("Coroutine container not configured... did you forget to call Init?"); - return; - } - - StopTween(); - - if (!m_CoroutineContainer.gameObject.activeInHierarchy) - { - info.TweenValue(1.0f); - return; - } - - m_Tween = Start(info); - m_CoroutineContainer.StartCoroutine(m_Tween); - } - - public void StopTween() - { - if (m_Tween != null) - { - m_CoroutineContainer.StopCoroutine(m_Tween); - m_Tween = null; - } - } - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CoroutineTween.cs.meta b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CoroutineTween.cs.meta deleted file mode 100644 index 01cf5eb3..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_CoroutineTween.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 658c1fb149e7498aa072b0c0f3bf13f0 -timeCreated: 1464850953 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_DefaultControls.cs b/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_DefaultControls.cs deleted file mode 100644 index 7bc6f97e..00000000 --- a/Library/PackageCache/com.unity.textmeshpro@2.0.1/Scripts/Runtime/TMP_DefaultControls.cs +++ /dev/null @@ -1,385 +0,0 @@ -using UnityEngine; -using System.Collections; -using UnityEngine.UI; - - -namespace TMPro -{ - - public static class TMP_DefaultControls - { - public struct Resources - { - public Sprite standard; - public Sprite background; - public Sprite inputField; - public Sprite knob; - public Sprite checkmark; - public Sprite dropdown; - public Sprite mask; - } - - private const float kWidth = 160f; - private const float kThickHeight = 30f; - private const float kThinHeight = 20f; - private static Vector2 s_ThickElementSize = new Vector2(kWidth, kThickHeight); - private static Vector2 s_ThinElementSize = new Vector2(kWidth, kThinHeight); - //private static Vector2 s_ImageElementSize = new Vector2(100f, 100f); - private static Color s_DefaultSelectableColor = new Color(1f, 1f, 1f, 1f); - //private static Color s_PanelColor = new Color(1f, 1f, 1f, 0.392f); - private static Color s_TextColor = new Color(50f / 255f, 50f / 255f, 50f / 255f, 1f); - - - private static GameObject CreateUIElementRoot(string name, Vector2 size) - { - GameObject child = new GameObject(name); - RectTransform rectTransform = child.AddComponent(); - rectTransform.sizeDelta = size; - return child; - } - - static GameObject CreateUIObject(string name, GameObject parent) - { - GameObject go = new GameObject(name); - go.AddComponent(); - SetParentAndAlign(go, parent); - return go; - } - - private static void SetDefaultTextValues(TMP_Text lbl) - { - // Set text values we want across UI elements in default controls. - // Don't set values which are the same as the default values for the Text component, - // since there's no point in that, and it's good to keep them as consistent as possible. - lbl.color = s_TextColor; - lbl.fontSize = 14; - } - - private static void SetDefaultColorTransitionValues(Selectable slider) - { - ColorBlock colors = slider.colors; - colors.highlightedColor = new Color(0.882f, 0.882f, 0.882f); - colors.pressedColor = new Color(0.698f, 0.698f, 0.698f); - colors.disabledColor = new Color(0.521f, 0.521f, 0.521f); - } - - private static void SetParentAndAlign(GameObject child, GameObject parent) - { - if (parent == null) - return; - - child.transform.SetParent(parent.transform, false); - SetLayerRecursively(child, parent.layer); - } - - private static void SetLayerRecursively(GameObject go, int layer) - { - go.layer = layer; - Transform t = go.transform; - for (int i = 0; i < t.childCount; i++) - SetLayerRecursively(t.GetChild(i).gameObject, layer); - } - - // Actual controls - - public static GameObject CreateScrollbar(Resources resources) - { - // Create GOs Hierarchy - GameObject scrollbarRoot = CreateUIElementRoot("Scrollbar", s_ThinElementSize); - - GameObject sliderArea = CreateUIObject("Sliding Area", scrollbarRoot); - GameObject handle = CreateUIObject("Handle", sliderArea); - - Image bgImage = scrollbarRoot.AddComponent(); - bgImage.sprite = resources.background; - bgImage.type = Image.Type.Sliced; - bgImage.color = s_DefaultSelectableColor; - - Image handleImage = handle.AddComponent(); - handleImage.sprite = resources.standard; - handleImage.type = Image.Type.Sliced; - handleImage.color = s_DefaultSelectableColor; - - RectTransform sliderAreaRect = sliderArea.GetComponent(); - sliderAreaRect.sizeDelta = new Vector2(-20, -20); - sliderAreaRect.anchorMin = Vector2.zero; - sliderAreaRect.anchorMax = Vector2.one; - - RectTransform handleRect = handle.GetComponent(); - handleRect.sizeDelta = new Vector2(20, 20); - - Scrollbar scrollbar = scrollbarRoot.AddComponent(); - scrollbar.handleRect = handleRect; - scrollbar.targetGraphic = handleImage; - SetDefaultColorTransitionValues(scrollbar); - - return scrollbarRoot; - } - - public static GameObject CreateButton(Resources resources) - { - GameObject buttonRoot = CreateUIElementRoot("Button", s_ThickElementSize); - - GameObject childText = new GameObject("Text (TMP)"); - childText.AddComponent(); - SetParentAndAlign(childText, buttonRoot); - - Image image = buttonRoot.AddComponent(); - image.sprite = resources.standard; - image.type = Image.Type.Sliced; - image.color = s_DefaultSelectableColor; - - Button bt = buttonRoot.AddComponent