diff --git a/.gitignore b/.gitignore index 95da3cef8cb4748d9d4221fb23367eaf14de6a15..1d09f24a6ecf29e5154d709f2c42e047f23e2acb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,63 @@ -/harkka3/tarja/ \ No newline at end of file +/harkka3/tarja/ +# This .gitignore file should be placed at the root of your Unity project directory +# +# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore +# +/[Ll]ibrary/ +/[Tt]emp/ +/[Oo]bj/ +/[Bb]uild/ +/[Bb]uilds/ +/[Ll]ogs/ + +# MemoryCaptures can get excessive in size. +# They also could contain extremely sensitive data +/[Mm]emoryCaptures/ + +# Asset meta data should only be ignored when the corresponding asset is also ignored +!/[Aa]ssets/**/*.meta + +# Uncomment this line if you wish to ignore the asset store tools plugin +# /[Aa]ssets/AssetStoreTools* + +# Autogenerated Jetbrains Rider plugin +/[Aa]ssets/Plugins/Editor/JetBrains* + +# Visual Studio cache directory +.vs/ + +# Gradle cache directory +.gradle/ + +# Autogenerated VS/MD/Consulo solution and project files +ExportedObj/ +.consulo/ +*.csproj +*.unityproj +*.sln +*.suo +*.tmp +*.user +*.userprefs +*.pidb +*.booproj +*.svd +*.pdb +*.mdb +*.opendb +*.VC.db + +# Unity3D generated meta files +*.pidb.meta +*.pdb.meta +*.mdb.meta + +# Unity3D generated file on crash reports +sysinfo.txt + +# Builds +*.apk +*.unitypackage + +# Crashlytics generated file +crashlytics-build.properties \ No newline at end of file diff --git a/Roll a Ball/Assets/Materials.meta b/Roll a Ball/Assets/Materials.meta new file mode 100644 index 0000000000000000000000000000000000000000..ca0de3bb4b415050443d3c0421c4428e79189687 --- /dev/null +++ b/Roll a Ball/Assets/Materials.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b456c9352c572254eb167422d3d67e8d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Assets/Materials/Background.mat b/Roll a Ball/Assets/Materials/Background.mat new file mode 100644 index 0000000000000000000000000000000000000000..44bfcca83c2dafe1841762951438a50ecca8d834 --- /dev/null +++ b/Roll a Ball/Assets/Materials/Background.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Background + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0.7924528, g: 0, b: 0, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Roll a Ball/Assets/Materials/Background.mat.meta b/Roll a Ball/Assets/Materials/Background.mat.meta new file mode 100644 index 0000000000000000000000000000000000000000..92986ed67f26c5668b9c898d4cf1d566ba5804d6 --- /dev/null +++ b/Roll a Ball/Assets/Materials/Background.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: eb5df0f4f4165454aa8d4a4d338f0eff +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Assets/Materials/PickUp.mat b/Roll a Ball/Assets/Materials/PickUp.mat new file mode 100644 index 0000000000000000000000000000000000000000..3959f55e72d16a41fe8711252ff5f5a1f1449536 --- /dev/null +++ b/Roll a Ball/Assets/Materials/PickUp.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: PickUp + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0.15821035, g: 0.7921569, b: 0, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Roll a Ball/Assets/Materials/PickUp.mat.meta b/Roll a Ball/Assets/Materials/PickUp.mat.meta new file mode 100644 index 0000000000000000000000000000000000000000..3417142a51ab1b6870fc504ad19860622f90e37f --- /dev/null +++ b/Roll a Ball/Assets/Materials/PickUp.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cc16b487af8ff9c4898d48ae2f4a5b30 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Assets/Materials/Walls.mat b/Roll a Ball/Assets/Materials/Walls.mat new file mode 100644 index 0000000000000000000000000000000000000000..03cf55af4d512c8ae2925c3a498817a7ae4c4cb4 --- /dev/null +++ b/Roll a Ball/Assets/Materials/Walls.mat @@ -0,0 +1,77 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 6 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Walls + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 0.7703157, g: 0.7921569, b: 0, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Roll a Ball/Assets/Materials/Walls.mat.meta b/Roll a Ball/Assets/Materials/Walls.mat.meta new file mode 100644 index 0000000000000000000000000000000000000000..ee2d6f09c78a57d771f946a860da599f7490755f --- /dev/null +++ b/Roll a Ball/Assets/Materials/Walls.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 336d6395d0228d64e87d76fe616a31b7 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Assets/Prefabs.meta b/Roll a Ball/Assets/Prefabs.meta new file mode 100644 index 0000000000000000000000000000000000000000..cbe12cb700dffbdebec4c22c7de879e8a54e7697 --- /dev/null +++ b/Roll a Ball/Assets/Prefabs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 191a2a53e28fd314c98eb818f59e3b96 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Assets/Prefabs/PickUp.prefab b/Roll a Ball/Assets/Prefabs/PickUp.prefab new file mode 100644 index 0000000000000000000000000000000000000000..f1e2cf23f9382ef7e94f64ede8a7f10348eccee6 --- /dev/null +++ b/Roll a Ball/Assets/Prefabs/PickUp.prefab @@ -0,0 +1,123 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &875044402655083534 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 875044402655083637} + - component: {fileID: 875044402655083530} + - component: {fileID: 875044402655083531} + - component: {fileID: 875044402655083528} + - component: {fileID: 875044402655083529} + - component: {fileID: 54740221680748904} + m_Layer: 0 + m_Name: PickUp + m_TagString: PickUp + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &875044402655083637 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 875044402655083534} + m_LocalRotation: {x: 0.46193978, y: 0.19134173, z: 0.19134173, w: 0.84462327} + m_LocalPosition: {x: 0, y: 0.5, z: 0} + m_LocalScale: {x: 0.5, y: 0.50000006, z: 0.50000024} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 45, y: 45, z: 45} +--- !u!33 &875044402655083530 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 875044402655083534} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &875044402655083531 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 875044402655083534} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: cc16b487af8ff9c4898d48ae2f4a5b30, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &875044402655083528 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 875044402655083534} + m_Material: {fileID: 0} + m_IsTrigger: 1 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!114 &875044402655083529 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 875044402655083534} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c1615df4b22758c48b07b9ca96c5aab7, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!54 &54740221680748904 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 875044402655083534} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 1 + m_IsKinematic: 1 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 diff --git a/Roll a Ball/Assets/Prefabs/PickUp.prefab.meta b/Roll a Ball/Assets/Prefabs/PickUp.prefab.meta new file mode 100644 index 0000000000000000000000000000000000000000..e8b6cd478eac6d33ca13e949aa8ed66938c408b5 --- /dev/null +++ b/Roll a Ball/Assets/Prefabs/PickUp.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 29e279dd35192ab4a8145d74356b893b +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Assets/Scenes.meta b/Roll a Ball/Assets/Scenes.meta new file mode 100644 index 0000000000000000000000000000000000000000..378e4ff51a4689f348c0aaf517228d53623969d3 --- /dev/null +++ b/Roll a Ball/Assets/Scenes.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5fa87e412ea970a4f8af53db4e1aed67 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Assets/Scenes/MiniGame.unity b/Roll a Ball/Assets/Scenes/MiniGame.unity new file mode 100644 index 0000000000000000000000000000000000000000..e6c4fb555d5d31184e42f8be4d448af97eb140cc --- /dev/null +++ b/Roll a Ball/Assets/Scenes/MiniGame.unity @@ -0,0 +1,2115 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 170076734} + m_IndirectSpecularColor: {r: 0.44657993, g: 0.49641424, b: 0.57481825, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 10 + m_Resolution: 2 + m_BakeResolution: 10 + m_AtlasSize: 512 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 256 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1001 &26256212 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 696576552} + m_Modifications: + - target: {fileID: 875044402655083534, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_Name + value: PickUp (9) + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.x + value: -4.89 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.z + value: -4.32 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.x + value: 0.46193978 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.z + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.84462327 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_RootOrder + value: 9 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.y + value: 0.50000006 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.z + value: 0.50000024 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 29e279dd35192ab4a8145d74356b893b, type: 3} +--- !u!4 &29510464 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + m_PrefabInstance: {fileID: 875044402659161909} + m_PrefabAsset: {fileID: 0} +--- !u!4 &63960074 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + m_PrefabInstance: {fileID: 26256212} + m_PrefabAsset: {fileID: 0} +--- !u!1 &170076733 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 170076735} + - component: {fileID: 170076734} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &170076734 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 170076733} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &170076735 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 170076733} + m_LocalRotation: {x: 0.36599812, y: 0.45315394, z: -0.2113091, w: 0.78488564} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 50, y: 60, z: 0} +--- !u!4 &181704385 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + m_PrefabInstance: {fileID: 503822857} + m_PrefabAsset: {fileID: 0} +--- !u!4 &187386769 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + m_PrefabInstance: {fileID: 789181905} + m_PrefabAsset: {fileID: 0} +--- !u!4 &424028697 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + m_PrefabInstance: {fileID: 756445157} + m_PrefabAsset: {fileID: 0} +--- !u!4 &496237228 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + m_PrefabInstance: {fileID: 1656785633} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &503822857 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 696576552} + m_Modifications: + - target: {fileID: 875044402655083534, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_Name + value: PickUp (1) + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.x + value: 3.05 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.z + value: 4.72 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.x + value: 0.46193978 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.z + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.84462327 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.y + value: 0.50000006 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.z + value: 0.50000024 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 29e279dd35192ab4a8145d74356b893b, type: 3} +--- !u!1001 &534292040 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 696576552} + m_Modifications: + - target: {fileID: 875044402655083534, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_Name + value: PickUp (3) + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.x + value: 6.17 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.z + value: 0.65 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.x + value: 0.46193978 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.z + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.84462327 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.y + value: 0.50000006 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.z + value: 0.50000024 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 29e279dd35192ab4a8145d74356b893b, type: 3} +--- !u!1 &534669902 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 534669905} + - component: {fileID: 534669904} + - component: {fileID: 534669903} + - component: {fileID: 534669906} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &534669903 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 534669902} + m_Enabled: 1 +--- !u!20 &534669904 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 534669902} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_GateFitMode: 2 + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &534669905 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 534669902} + m_LocalRotation: {x: 0.38268343, y: -0, z: -0, w: 0.92387956} + m_LocalPosition: {x: 0, y: 10, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 45, y: 0, z: 0} +--- !u!114 &534669906 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 534669902} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: b8ecd0c93f4708542a22dde86bcc4421, type: 3} + m_Name: + m_EditorClassIdentifier: + player: {fileID: 705844361} +--- !u!1 &637744362 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 637744363} + - component: {fileID: 637744366} + - component: {fileID: 637744365} + - component: {fileID: 637744364} + m_Layer: 0 + m_Name: EastWall + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &637744363 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 637744362} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 10, y: 0, z: 0} + m_LocalScale: {x: 0.5, y: 2, z: 20.5} + m_Children: [] + m_Father: {fileID: 1033017006} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &637744364 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 637744362} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &637744365 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 637744362} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 336d6395d0228d64e87d76fe616a31b7, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &637744366 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 637744362} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &696576551 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 696576552} + m_Layer: 0 + m_Name: PickUps + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &696576552 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 696576551} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 29510464} + - {fileID: 181704385} + - {fileID: 1467531254} + - {fileID: 859832050} + - {fileID: 909155800} + - {fileID: 1762987776} + - {fileID: 187386769} + - {fileID: 787552875} + - {fileID: 424028697} + - {fileID: 63960074} + - {fileID: 496237228} + - {fileID: 1265029710} + - {fileID: 1232013160} + - {fileID: 1934565629} + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &705844361 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 705844365} + - component: {fileID: 705844364} + - component: {fileID: 705844363} + - component: {fileID: 705844362} + - component: {fileID: 705844367} + - component: {fileID: 705844366} + m_Layer: 0 + m_Name: Player + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!135 &705844362 +SphereCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 705844361} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &705844363 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 705844361} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &705844364 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 705844361} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &705844365 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 705844361} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0.5, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &705844366 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 705844361} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eeeb4a12456c270409ed1a0786284f65, type: 3} + m_Name: + m_EditorClassIdentifier: + speed: 10 +--- !u!54 &705844367 +Rigidbody: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 705844361} + serializedVersion: 2 + m_Mass: 1 + m_Drag: 0 + m_AngularDrag: 0.05 + m_UseGravity: 1 + m_IsKinematic: 0 + m_Interpolate: 0 + m_Constraints: 0 + m_CollisionDetection: 0 +--- !u!1001 &756445157 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 696576552} + m_Modifications: + - target: {fileID: 875044402655083534, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_Name + value: PickUp (8) + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.x + value: -2.59 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.z + value: -5.55 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.x + value: 0.46193978 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.z + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.84462327 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_RootOrder + value: 8 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.y + value: 0.50000006 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.z + value: 0.50000024 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 29e279dd35192ab4a8145d74356b893b, type: 3} +--- !u!1 &760448240 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 760448244} + - component: {fileID: 760448243} + - component: {fileID: 760448242} + - component: {fileID: 760448241} + m_Layer: 0 + m_Name: Ground + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!64 &760448241 +MeshCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 760448240} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Convex: 0 + m_CookingOptions: 14 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!23 &760448242 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 760448240} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: eb5df0f4f4165454aa8d4a4d338f0eff, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &760448243 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 760448240} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &760448244 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 760448240} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 2, y: 1, z: 2} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &787552875 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + m_PrefabInstance: {fileID: 1098288699} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &789181905 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 696576552} + m_Modifications: + - target: {fileID: 875044402655083534, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_Name + value: PickUp (6) + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.x + value: 3.21 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.z + value: -6.06 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.x + value: 0.46193978 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.z + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.84462327 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_RootOrder + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.y + value: 0.50000006 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.z + value: 0.50000024 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 29e279dd35192ab4a8145d74356b893b, type: 3} +--- !u!4 &859832050 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + m_PrefabInstance: {fileID: 534292040} + m_PrefabAsset: {fileID: 0} +--- !u!4 &909155800 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + m_PrefabInstance: {fileID: 2020396799} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &981303722 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 696576552} + m_Modifications: + - target: {fileID: 875044402655083534, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_Name + value: PickUp (13) + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.x + value: -3.28 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.z + value: 5.18 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.x + value: 0.46193978 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.z + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.84462327 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_RootOrder + value: 13 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.y + value: 0.50000006 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.z + value: 0.50000024 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 29e279dd35192ab4a8145d74356b893b, type: 3} +--- !u!1001 &1019274559 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 696576552} + m_Modifications: + - target: {fileID: 875044402655083534, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_Name + value: PickUp (12) + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.x + value: -5.01 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.z + value: 3.41 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.x + value: 0.46193978 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.z + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.84462327 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_RootOrder + value: 12 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.y + value: 0.50000006 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.z + value: 0.50000024 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 29e279dd35192ab4a8145d74356b893b, type: 3} +--- !u!1 &1033017005 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1033017006} + m_Layer: 0 + m_Name: Walls + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1033017006 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1033017005} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 2034535337} + - {fileID: 637744363} + - {fileID: 1979216960} + - {fileID: 1872597653} + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1098288699 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 696576552} + m_Modifications: + - target: {fileID: 875044402655083534, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_Name + value: PickUp (7) + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.x + value: -0.23 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.z + value: -6.5 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.x + value: 0.46193978 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.z + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.84462327 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_RootOrder + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.y + value: 0.50000006 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.z + value: 0.50000024 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 29e279dd35192ab4a8145d74356b893b, type: 3} +--- !u!1001 &1099740522 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 696576552} + m_Modifications: + - target: {fileID: 875044402655083534, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_Name + value: PickUp (2) + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.x + value: 4.91 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.z + value: 2.95 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.x + value: 0.46193978 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.z + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.84462327 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.y + value: 0.50000006 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.z + value: 0.50000024 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 29e279dd35192ab4a8145d74356b893b, type: 3} +--- !u!1001 &1214084846 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 696576552} + m_Modifications: + - target: {fileID: 875044402655083534, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_Name + value: PickUp (11) + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.x + value: -6.27 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.z + value: 0.95 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.x + value: 0.46193978 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.z + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.84462327 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_RootOrder + value: 11 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.y + value: 0.50000006 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.z + value: 0.50000024 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 29e279dd35192ab4a8145d74356b893b, type: 3} +--- !u!4 &1232013160 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + m_PrefabInstance: {fileID: 1019274559} + m_PrefabAsset: {fileID: 0} +--- !u!4 &1265029710 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + m_PrefabInstance: {fileID: 1214084846} + m_PrefabAsset: {fileID: 0} +--- !u!4 &1467531254 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + m_PrefabInstance: {fileID: 1099740522} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1601709512 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 696576552} + m_Modifications: + - target: {fileID: 875044402655083534, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_Name + value: PickUp (5) + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.x + value: 5.51 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.z + value: -4.61 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.x + value: 0.46193978 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.z + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.84462327 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 45 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 29e279dd35192ab4a8145d74356b893b, type: 3} +--- !u!1001 &1656785633 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 696576552} + m_Modifications: + - target: {fileID: 875044402655083534, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_Name + value: PickUp (10) + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.x + value: -6.43 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.z + value: -1.86 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.x + value: 0.46193978 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.z + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.84462327 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_RootOrder + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.y + value: 0.50000006 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.z + value: 0.50000024 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 29e279dd35192ab4a8145d74356b893b, type: 3} +--- !u!4 &1762987776 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + m_PrefabInstance: {fileID: 1601709512} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1872597652 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1872597653} + - component: {fileID: 1872597656} + - component: {fileID: 1872597655} + - component: {fileID: 1872597654} + m_Layer: 0 + m_Name: SouthWall + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1872597653 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1872597652} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -10} + m_LocalScale: {x: 20.5, y: 2, z: 0.5} + m_Children: [] + m_Father: {fileID: 1033017006} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &1872597654 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1872597652} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1872597655 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1872597652} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 336d6395d0228d64e87d76fe616a31b7, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &1872597656 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1872597652} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1934565629 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + m_PrefabInstance: {fileID: 981303722} + m_PrefabAsset: {fileID: 0} +--- !u!1 &1979216959 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1979216960} + - component: {fileID: 1979216963} + - component: {fileID: 1979216962} + - component: {fileID: 1979216961} + m_Layer: 0 + m_Name: NorthWall + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1979216960 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1979216959} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 10} + m_LocalScale: {x: 20.5, y: 2, z: 0.5} + m_Children: [] + m_Father: {fileID: 1033017006} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &1979216961 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1979216959} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &1979216962 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1979216959} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 336d6395d0228d64e87d76fe616a31b7, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &1979216963 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1979216959} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1001 &2020396799 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 696576552} + m_Modifications: + - target: {fileID: 875044402655083534, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_Name + value: PickUp (4) + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.x + value: 6.55 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.z + value: -1.84 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.x + value: 0.46193978 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.z + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.84462327 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.y + value: 0.50000006 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.z + value: 0.50000024 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 29e279dd35192ab4a8145d74356b893b, type: 3} +--- !u!1 &2034535336 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2034535337} + - component: {fileID: 2034535340} + - component: {fileID: 2034535339} + - component: {fileID: 2034535338} + m_Layer: 0 + m_Name: WestWall + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2034535337 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2034535336} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -10, y: 0, z: 0} + m_LocalScale: {x: 0.5, y: 2, z: 20.5} + m_Children: [] + m_Father: {fileID: 1033017006} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!65 &2034535338 +BoxCollider: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2034535336} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!23 &2034535339 +MeshRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2034535336} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_RenderingLayerMask: 1 + m_RendererPriority: 0 + m_Materials: + - {fileID: 2100000, guid: 336d6395d0228d64e87d76fe616a31b7, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!33 &2034535340 +MeshFilter: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2034535336} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1001 &875044402659161909 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 696576552} + m_Modifications: + - target: {fileID: 875044402655083534, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_Name + value: PickUp + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalPosition.z + value: 5.8 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.x + value: 0.46193978 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.z + value: 0.19134173 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.84462327 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 45 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.y + value: 0.50000006 + objectReference: {fileID: 0} + - target: {fileID: 875044402655083637, guid: 29e279dd35192ab4a8145d74356b893b, + type: 3} + propertyPath: m_LocalScale.z + value: 0.50000024 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 29e279dd35192ab4a8145d74356b893b, type: 3} diff --git a/Roll a Ball/Assets/Scenes/MiniGame.unity.meta b/Roll a Ball/Assets/Scenes/MiniGame.unity.meta new file mode 100644 index 0000000000000000000000000000000000000000..b53dba56d0fc0a72e86ae862c407c36e09b739a4 --- /dev/null +++ b/Roll a Ball/Assets/Scenes/MiniGame.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bdb9800e7f8ad874d81a3d32ea20c370 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Assets/Scenes/SampleScene.unity b/Roll a Ball/Assets/Scenes/SampleScene.unity new file mode 100644 index 0000000000000000000000000000000000000000..114459f65b7a165bfd45df3c649f528c1a1a296a --- /dev/null +++ b/Roll a Ball/Assets/Scenes/SampleScene.unity @@ -0,0 +1,259 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 0 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 170076734} + m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 1 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 10 + m_Resolution: 2 + m_BakeResolution: 10 + m_AtlasSize: 512 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 256 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ShowResolutionOverlay: 1 + m_LightingDataAsset: {fileID: 0} + m_UseShadowmask: 1 +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &170076733 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 170076735} + - component: {fileID: 170076734} + m_Layer: 0 + m_Name: Directional Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!108 &170076734 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 170076733} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_CookieSize: 10 + m_Shadows: + m_Type: 2 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_Lightmapping: 1 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &170076735 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 170076733} + m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &534669902 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 534669905} + - component: {fileID: 534669904} + - component: {fileID: 534669903} + m_Layer: 0 + m_Name: Main Camera + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &534669903 +AudioListener: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 534669902} + m_Enabled: 1 +--- !u!20 &534669904 +Camera: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 534669902} + m_Enabled: 1 + serializedVersion: 2 + m_ClearFlags: 1 + m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} + m_projectionMatrixMode: 1 + m_SensorSize: {x: 36, y: 24} + m_LensShift: {x: 0, y: 0} + m_GateFitMode: 2 + m_FocalLength: 50 + m_NormalizedViewPortRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + near clip plane: 0.3 + far clip plane: 1000 + field of view: 60 + orthographic: 0 + orthographic size: 5 + m_Depth: -1 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingPath: -1 + m_TargetTexture: {fileID: 0} + m_TargetDisplay: 0 + m_TargetEye: 3 + m_HDR: 1 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &534669905 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 534669902} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Roll a Ball/Assets/Scenes/SampleScene.unity.meta b/Roll a Ball/Assets/Scenes/SampleScene.unity.meta new file mode 100644 index 0000000000000000000000000000000000000000..188dbe5f3147767240f9e53ac6cd51e593d8f39e --- /dev/null +++ b/Roll a Ball/Assets/Scenes/SampleScene.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 4aef0654412f5724581bb426d35a9949 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Assets/Scripts.meta b/Roll a Ball/Assets/Scripts.meta new file mode 100644 index 0000000000000000000000000000000000000000..3cfcb32f5756e7977031696d70baaea1138c61a4 --- /dev/null +++ b/Roll a Ball/Assets/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4aed8adb6a5c5464287b996ec7ba74a8 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Assets/Scripts/CameraController.cs b/Roll a Ball/Assets/Scripts/CameraController.cs new file mode 100644 index 0000000000000000000000000000000000000000..b3788b76f3bf8ffc8ec26917bcf28ad44cb47e77 --- /dev/null +++ b/Roll a Ball/Assets/Scripts/CameraController.cs @@ -0,0 +1,21 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class CameraController : MonoBehaviour +{ + public GameObject player; + + private Vector3 offset; + + void Start() + { + offset = transform.position - player.transform.position; + } + + // Update is called once per frame + void LateUpdate() + { + transform.position = player.transform.position + offset; + } +} diff --git a/Roll a Ball/Assets/Scripts/CameraController.cs.meta b/Roll a Ball/Assets/Scripts/CameraController.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..6c46f942c4b03fa499539349b9e8104d32b84457 --- /dev/null +++ b/Roll a Ball/Assets/Scripts/CameraController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b8ecd0c93f4708542a22dde86bcc4421 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Assets/Scripts/PlayerController.cs b/Roll a Ball/Assets/Scripts/PlayerController.cs new file mode 100644 index 0000000000000000000000000000000000000000..b499517ac725bbe4071b8cbb365d3937213c5e4e --- /dev/null +++ b/Roll a Ball/Assets/Scripts/PlayerController.cs @@ -0,0 +1,34 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class PlayerController : MonoBehaviour +{ + + public float speed; + + private Rigidbody rb; + + void Start() + { + rb = GetComponent<Rigidbody>(); + } + + void FixedUpdate() + { + float moveHorizontal = Input.GetAxis("Horizontal"); + float moveVertical = Input.GetAxis("Vertical"); + + Vector3 movement = new Vector3(moveHorizontal, 0, moveVertical); + + rb.AddForce(movement * speed); + } + + void OnTriggerEnter(Collider other) + { + if (other.gameObject.CompareTag("PickUp")) + { + other.gameObject.SetActive(false); + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Assets/Scripts/PlayerController.cs.meta b/Roll a Ball/Assets/Scripts/PlayerController.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..58854391c0e3e61576f37d90625264823f863341 --- /dev/null +++ b/Roll a Ball/Assets/Scripts/PlayerController.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: eeeb4a12456c270409ed1a0786284f65 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Assets/Scripts/Rotator.cs b/Roll a Ball/Assets/Scripts/Rotator.cs new file mode 100644 index 0000000000000000000000000000000000000000..51ac9b9b0ddc0904e42995b98b6126f6d974803d --- /dev/null +++ b/Roll a Ball/Assets/Scripts/Rotator.cs @@ -0,0 +1,12 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class Rotator : MonoBehaviour +{ + // Update is called once per frame + void Update() + { + transform.Rotate(new Vector3(15, 30, 45) * Time.deltaTime); + } +} diff --git a/Roll a Ball/Assets/Scripts/Rotator.cs.meta b/Roll a Ball/Assets/Scripts/Rotator.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..f5ce2fde1020d2c7b2cf4dcdd9a0e33514c76392 --- /dev/null +++ b/Roll a Ball/Assets/Scripts/Rotator.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c1615df4b22758c48b07b9ca96c5aab7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/AnnotationManager b/Roll a Ball/Library/AnnotationManager new file mode 100644 index 0000000000000000000000000000000000000000..8a65c0f7d5a34a13360fac58cebb7def2a3dad08 Binary files /dev/null and b/Roll a Ball/Library/AnnotationManager differ diff --git a/Roll a Ball/Library/AssetImportState b/Roll a Ball/Library/AssetImportState new file mode 100644 index 0000000000000000000000000000000000000000..715f58c16092d64b188a66835991d58f9be7e1ee --- /dev/null +++ b/Roll a Ball/Library/AssetImportState @@ -0,0 +1 @@ +19;0;4;0;0 \ No newline at end of file diff --git a/Roll a Ball/Library/BuildPlayer.prefs b/Roll a Ball/Library/BuildPlayer.prefs new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/Roll a Ball/Library/BuildSettings.asset b/Roll a Ball/Library/BuildSettings.asset new file mode 100644 index 0000000000000000000000000000000000000000..b203d73d7890346131a1bd9454da89a9c45f5c78 Binary files /dev/null and b/Roll a Ball/Library/BuildSettings.asset differ diff --git a/Roll a Ball/Library/CurrentLayout.dwlt b/Roll a Ball/Library/CurrentLayout.dwlt new file mode 100644 index 0000000000000000000000000000000000000000..45f85ad1a38ff4314b24103254223aed7bd4d955 --- /dev/null +++ b/Roll a Ball/Library/CurrentLayout.dwlt @@ -0,0 +1,711 @@ +%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: 8 + y: 51 + width: 2544 + height: 1341 + m_ShowMode: 4 + m_Title: + m_RootView: {fileID: 6} + m_MinSize: {x: 950, y: 548} + m_MaxSize: {x: 10000, y: 10000} + m_Maximized: 0 +--- !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: 12010, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: + - {fileID: 9} + - {fileID: 3} + m_Position: + serializedVersion: 2 + x: 0 + y: 30 + width: 2544 + height: 1291 + m_MinSize: {x: 681, y: 498} + m_MaxSize: {x: 14002, y: 14048} + vertical: 0 + controlID: 88 +--- !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: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 2028 + y: 0 + width: 516 + height: 1291 + m_MinSize: {x: 275, y: 50} + m_MaxSize: {x: 4000, y: 4000} + m_ActualView: {fileID: 14} + m_Panes: + - {fileID: 14} + m_Selected: 0 + m_LastSelected: 0 +--- !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: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 502 + height: 780 + m_MinSize: {x: 200, y: 200} + m_MaxSize: {x: 4000, y: 4000} + m_ActualView: {fileID: 15} + m_Panes: + - {fileID: 15} + m_Selected: 0 + m_LastSelected: 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: 12006, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 0 + y: 780 + width: 2028 + height: 511 + m_MinSize: {x: 232, y: 274} + m_MaxSize: {x: 10002, y: 10024} + m_ActualView: {fileID: 13} + m_Panes: + - {fileID: 13} + - {fileID: 18} + - {fileID: 17} + m_Selected: 0 + m_LastSelected: 2 +--- !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: 12008, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: + - {fileID: 7} + - {fileID: 2} + - {fileID: 8} + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 2544 + height: 1341 + m_MinSize: {x: 950, y: 548} + m_MaxSize: {x: 10000, y: 10000} +--- !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: 12011, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 2544 + height: 30 + m_MinSize: {x: 0, y: 0} + m_MaxSize: {x: 0, y: 0} + m_LastLoadedLayoutName: +--- !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: 12042, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: [] + m_Position: + serializedVersion: 2 + x: 0 + y: 1321 + width: 2544 + height: 20 + m_MinSize: {x: 0, y: 0} + m_MaxSize: {x: 0, y: 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: 12010, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: + - {fileID: 10} + - {fileID: 5} + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 2028 + height: 1291 + m_MinSize: {x: 406, y: 498} + m_MaxSize: {x: 10002, y: 14048} + vertical: 1 + controlID: 101 +--- !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: 12010, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_Children: + - {fileID: 4} + - {fileID: 11} + m_Position: + serializedVersion: 2 + x: 0 + y: 0 + width: 2028 + height: 780 + m_MinSize: {x: 406, y: 224} + m_MaxSize: {x: 8006, y: 4024} + vertical: 0 + controlID: 102 +--- !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: 502 + y: 0 + width: 1526 + height: 780 + m_MinSize: {x: 204, y: 224} + m_MaxSize: {x: 4004, y: 4024} + m_ActualView: {fileID: 16} + m_Panes: + - {fileID: 16} + - {fileID: 12} + 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: 12111, guid: 0000000000000000e000000000000000, type: 0} + m_Name: + m_EditorClassIdentifier: + m_MinSize: {x: 400, y: 100} + m_MaxSize: {x: 2048, y: 2048} + m_TitleContent: + m_Text: Asset Store + m_Image: {fileID: 357073275683767465, guid: 0000000000000000d000000000000000, + type: 0} + m_Tooltip: + m_Pos: + serializedVersion: 2 + x: 468 + y: 181 + width: 973 + height: 501 + m_PersistentViewDataDictionary: {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: 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: 8 + y: 861 + width: 2026 + height: 491 + m_PersistentViewDataDictionary: {fileID: 0} + m_SearchFilter: + m_NameFilter: + m_ClassNames: [] + m_AssetLabels: [] + m_AssetBundleNames: [] + m_VersionControlStates: [] + m_SoftLockControlStates: [] + m_ReferencingInstanceIDs: + m_SceneHandles: + m_ShowAllHits: 0 + m_SearchArea: 1 + m_Folders: + - Assets/Prefabs + m_ViewMode: 1 + m_StartGridSize: 64 + m_LastFolders: + - Assets/Prefabs + m_LastFoldersGridSize: -1 + m_LastProjectPath: D:\Peliohjelmointi\Roll a Ball + m_LockTracker: + m_IsLocked: 0 + m_FolderTreeState: + scrollPos: {x: 0, y: 0} + m_SelectedIDs: 52330000 + m_LastClickedID: 13138 + m_ExpandedIDs: 00000000702e0000 + 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_AssetTreeState: + 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: 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: 0 + m_ExpandedInstanceIDs: c6230000 + 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: 5} + 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: 64 + m_DirectoriesAreaWidth: 115 +--- !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: 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: 2036 + y: 81 + width: 514 + height: 1271 + m_PersistentViewDataDictionary: {fileID: 0} + m_ObjectsLockedBeforeSerialization: [] + m_InstanceIDsLockedBeforeSerialization: + m_LockTracker: + m_IsLocked: 0 + m_PreviewResizer: + m_CachedPref: 160 + m_ControlHash: -371814159 + m_PrefName: Preview_InspectorPreview + m_PreviewWindow: {fileID: 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: 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: 8 + y: 81 + width: 500 + height: 760 + m_PersistentViewDataDictionary: {fileID: 0} + m_SceneHierarchy: + m_TreeViewState: + scrollPos: {x: 0, y: 0} + m_SelectedIDs: b2330000 + m_LastClickedID: 0 + m_ExpandedIDs: ecb3ffff94cbffff5ee9ffff9cf0ffff + 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: 4} + m_SearchString: + m_ExpandedScenes: [] + m_CurrenRootInstanceID: 0 + m_LockTracker: + m_IsLocked: 0 + m_CurrentSortingName: TransformSorting + m_WindowGUID: 8f55b39bad0156044875e0b4e7f376a0 +--- !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: 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: 510 + y: 81 + width: 1522 + height: 760 + m_PersistentViewDataDictionary: {fileID: 0} + m_WindowGUID: 6d541fc9590db594aba6dca3d57c73a8 + m_SceneLighting: 1 + m_2DMode: 0 + m_isRotationLocked: 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_SceneViewState: + showFog: 1 + showMaterialUpdate: 0 + showSkybox: 1 + showFlares: 1 + showImageEffects: 1 + showParticleSystems: 1 + grid: + xGrid: + m_Target: 0 + speed: 2 + m_Value: 0 + yGrid: + m_Target: 0 + speed: 2 + m_Value: 0 + zGrid: + m_Target: 0 + speed: 2 + m_Value: 0 + m_Rotation: + m_Target: {x: 0.31407943, y: 0.00854447, z: -0.002826796, w: 0.94935405} + speed: 2 + m_Value: {x: 0.31407943, y: 0.00854447, z: -0.002826796, w: 0.94935405} + m_Size: + m_Target: 29.047747 + speed: 2 + m_Value: 29.047747 + m_Ortho: + m_Target: 0 + speed: 2 + m_Value: 0 + m_ShowGlobalGrid: 1 + m_LastSceneViewRotation: {x: 0, y: 0, z: 0, w: 0} + m_LastSceneViewOrtho: 0 + m_ReplacementShader: {fileID: 0} + m_ReplacementString: + m_LastLockedObject: {fileID: 0} + m_ViewIsLockedToObject: 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: 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: 8 + y: 861 + width: 2026 + height: 491 + m_PersistentViewDataDictionary: {fileID: 0} + m_MaximizeOnPlay: 0 + m_Gizmos: 0 + m_Stats: 0 + m_SelectedSizes: 00000000000000000000000000000000000000000000000000000000000000000000000000000000 + m_TargetDisplay: 0 + m_ZoomArea: + m_HRangeLocked: 0 + m_VRangeLocked: 0 + hZoomLockedByDefault: 0 + vZoomLockedByDefault: 0 + m_HBaseRangeMin: -1013 + m_HBaseRangeMax: 1013 + m_VBaseRangeMin: -237 + m_VBaseRangeMax: 237 + 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: 0 + m_EnableSliderZoomHorizontal: 0 + m_EnableSliderZoomVertical: 0 + m_UniformScale: 1 + m_UpDirection: 1 + m_DrawArea: + serializedVersion: 2 + x: 0 + y: 17 + width: 2026 + height: 474 + m_Scale: {x: 1, y: 1} + m_Translation: {x: 1013, y: 237} + m_MarginLeft: 0 + m_MarginRight: 0 + m_MarginTop: 0 + m_MarginBottom: 0 + m_LastShownAreaInsideMargins: + serializedVersion: 2 + x: -1013 + y: -237 + width: 2026 + height: 474 + m_MinimalGUI: 1 + m_defaultScale: 1 + m_TargetTexture: {fileID: 0} + m_CurrentColorSpace: 0 + m_LastWindowPixelSize: {x: 2026, y: 491} + m_ClearInEditMode: 1 + m_NoCameraWarning: 1 + m_LowResolutionForAspectRatios: 01000000000000000000 + m_XRRenderMode: 0 +--- !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: 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: 861 + width: 2026 + height: 491 + m_PersistentViewDataDictionary: {fileID: 0} diff --git a/Roll a Ball/Library/EditorOnlyScriptingUserSettings.json b/Roll a Ball/Library/EditorOnlyScriptingUserSettings.json new file mode 100644 index 0000000000000000000000000000000000000000..278d630c48fb33ef26c98e1b8159c23f5b3c3868 --- /dev/null +++ b/Roll a Ball/Library/EditorOnlyScriptingUserSettings.json @@ -0,0 +1 @@ +{"m_ScriptingRuntimeVersion":1,"m_DefineSymbols":[],"m_AllowUnsafeCode":false} \ No newline at end of file diff --git a/Roll a Ball/Library/EditorUserBuildSettings.asset b/Roll a Ball/Library/EditorUserBuildSettings.asset new file mode 100644 index 0000000000000000000000000000000000000000..e8413c42652ed4e40bf73b1df0a9bc2bb0a58dee Binary files /dev/null and b/Roll a Ball/Library/EditorUserBuildSettings.asset differ diff --git a/Roll a Ball/Library/EditorUserSettings.asset b/Roll a Ball/Library/EditorUserSettings.asset new file mode 100644 index 0000000000000000000000000000000000000000..066603cd874a3b1bfa490a1cc4ab4ef177f17c04 Binary files /dev/null and b/Roll a Ball/Library/EditorUserSettings.asset differ diff --git a/Roll a Ball/Library/InspectorExpandedItems.asset b/Roll a Ball/Library/InspectorExpandedItems.asset new file mode 100644 index 0000000000000000000000000000000000000000..caa2cf41d8c41f6b2e18eb539090a2c32ff3280a Binary files /dev/null and b/Roll a Ball/Library/InspectorExpandedItems.asset differ diff --git a/Roll a Ball/Library/LastSceneManagerSetup.txt b/Roll a Ball/Library/LastSceneManagerSetup.txt new file mode 100644 index 0000000000000000000000000000000000000000..86623ddc2707c348fefb6cbb919966875f57f7a5 --- /dev/null +++ b/Roll a Ball/Library/LastSceneManagerSetup.txt @@ -0,0 +1,4 @@ +sceneSetups: +- path: Assets/Scenes/MiniGame.unity + isLoaded: 1 + isActive: 1 diff --git a/Roll a Ball/Library/LibraryFormatVersion.txt b/Roll a Ball/Library/LibraryFormatVersion.txt new file mode 100644 index 0000000000000000000000000000000000000000..6185f096e02c28d375d59d03684dbd44950f9dab --- /dev/null +++ b/Roll a Ball/Library/LibraryFormatVersion.txt @@ -0,0 +1,2 @@ +unityRebuildLibraryVersion: 11 +unityForwardCompatibleVersion: 40 diff --git a/Roll a Ball/Library/MonoManager.asset b/Roll a Ball/Library/MonoManager.asset new file mode 100644 index 0000000000000000000000000000000000000000..c07e4b51dfbf7f1f7fb23fa284b0f47bec059e39 Binary files /dev/null and b/Roll a Ball/Library/MonoManager.asset differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/CHANGELOG.md b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..ceaa426414eea2c62ac440691241f487fe737b7f --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/CHANGELOG.md @@ -0,0 +1,37 @@ + +[1.0.1] + +Adding Readme file +Adding local plugin importer callbacks. +Removing Bintray references in package.json + +[2.0.3] + +Fix bug where importing the asset store ads package would cause duiplicate symbols, +and removing the asset store ads package would cause missing symbols. + +[2.0.4] + +Added new description string to package.json +Fixed art assets to use no compression (fixes issue switching between iOS and PC builds) + +[2.0.5] - 2018-03-29 + +Fix for https://fogbugz.unity3d.com/f/cases/1011363 +Fixes an incorrect guid that the importer used to include/exclude the runtime assembly from the build. + +[2.0.6] - 2018-03-29 + +Update changelog for this and 2.0.5 + +[2.0.7] - 2018-04-06 + +Fix editor assembly project file to include the importer script. + +[2.0.8] - 2018-05-01 + +Add call to SetShouldOverridePredicate to exclude package dll when asset store dlls are present. +Update unity version attribute to support 2017.4 LTS + +Fix an issue with the editor assembly to add back in some iOS platform specific code that was removed +via conditionals (which is fine for source packages, but doesn't work with precompiled assemblies) diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/CHANGELOG.md.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/CHANGELOG.md.meta new file mode 100644 index 0000000000000000000000000000000000000000..5d2eb24c1ba718ab3ee4d97acc16a86a2f564c2a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/CHANGELOG.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 35b4e72ca46f44581b85082c4dc21d13 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor.meta new file mode 100644 index 0000000000000000000000000000000000000000..575303a2ebf142bf5299a1945d379ea959dc7dae --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a37e18887fa954edf92bc36bc353b879 +folderAsset: yes +timeCreated: 1491945644 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources.meta new file mode 100644 index 0000000000000000000000000000000000000000..aae7f602d5e2c4dd3cc46354428705c642f14ba3 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7c3a5d6e39b874f468b2691537168513 +folderAsset: yes +timeCreated: 1491258568 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Android.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Android.meta new file mode 100644 index 0000000000000000000000000000000000000000..45b8bb6e93c3d6a54847876acae7f04e891e06e5 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Android.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 48986928cc2a449dbaecdd1654bc9bf6 +folderAsset: yes +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Android/builds.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Android/builds.meta new file mode 100644 index 0000000000000000000000000000000000000000..826840efd31736c28aa681963bc4f2e4ddcc8281 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Android/builds.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f28fcced5af094cf78eb4e1109a71981 +folderAsset: yes +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Android/builds/unity-ads.aar b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Android/builds/unity-ads.aar new file mode 100644 index 0000000000000000000000000000000000000000..a05fc299a0f687a09a74eb6ed5f612d5d9d86a20 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Android/builds/unity-ads.aar differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Android/builds/unity-ads.aar.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Android/builds/unity-ads.aar.meta new file mode 100644 index 0000000000000000000000000000000000000000..6ba354b62d00c491b6026100ef8b2a9b7139ac72 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Android/builds/unity-ads.aar.meta @@ -0,0 +1,21 @@ +fileFormatVersion: 2 +guid: b32abd1c9d73a4cce8389f084ac12b11 +timeCreated: 1491258710 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + data: + enabled: 0 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor.meta new file mode 100644 index 0000000000000000000000000000000000000000..8defda5c4ff15956bf1de2307c5f77fc84094966 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 99ddb49592ff84811804420a1910cb89 +folderAsset: yes +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor/landscape.jpg b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor/landscape.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4fa7f2805e295cc939225450c15e8a4e8f7a4248 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor/landscape.jpg differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor/landscape.jpg.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor/landscape.jpg.meta new file mode 100644 index 0000000000000000000000000000000000000000..ce5a605c50687a07cfd7430a417cacdbe1c7ea8b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor/landscape.jpg.meta @@ -0,0 +1,105 @@ +fileFormatVersion: 2 +guid: 10bf81265ad87424d946598c575f45a0 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + 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} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + 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: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 2048 + 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: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor/portrait.jpg b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor/portrait.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5d8fb0b96f778183a25ee9448808023cbe46a445 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor/portrait.jpg differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor/portrait.jpg.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor/portrait.jpg.meta new file mode 100644 index 0000000000000000000000000000000000000000..ff78850d4db4d307e7adf318116c8e7fc20f171e --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/Editor/portrait.jpg.meta @@ -0,0 +1,105 @@ +fileFormatVersion: 2 +guid: 1b32bcce201b4494ea8848326290c5d5 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + 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} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + 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: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 0 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 2048 + 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: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS.meta new file mode 100644 index 0000000000000000000000000000000000000000..a44e61b438c42d68d46ba084885db866d27d89f5 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 4f234578336894dc081edf696f2ff5f2 +folderAsset: yes +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds.meta new file mode 100644 index 0000000000000000000000000000000000000000..f37efbe6d26bc885d170a1ff016d954d610c0af2 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2d4d46c70fdd242668a56e99799e8540 +folderAsset: yes +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework.meta new file mode 100644 index 0000000000000000000000000000000000000000..c83ed20c36b16704f1f591d8a8324d6443c1f697 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: eeed6954b3c264ca0b28a92aa6289bf0 +folderAsset: yes +timeCreated: 1491258705 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + data: + enabled: 0 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers.meta new file mode 100644 index 0000000000000000000000000000000000000000..fab0de2bb671d0a342ef5f940b546e208b076a97 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6e7c8cfeedae74eb3a562055e069e441 +folderAsset: yes +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSInAppPurchaseMetaData.h b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSInAppPurchaseMetaData.h new file mode 100644 index 0000000000000000000000000000000000000000..8edc8c14b4047f1206298b73b669745fb69d8c1a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSInAppPurchaseMetaData.h @@ -0,0 +1,11 @@ +#import "UADSMetaData.h" + +@interface UADSInAppPurchaseMetaData : UADSMetaData + +- (void)setProductId:(NSString *)productId; +- (void)setPrice:(NSNumber *)price; +- (void)setCurrency:(NSString *)currency; +- (void)setReceiptPurchaseData:(NSString *)receiptPurchaseData; +- (void)setSignature:(NSString *)signature; + +@end diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSInAppPurchaseMetaData.h.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSInAppPurchaseMetaData.h.meta new file mode 100644 index 0000000000000000000000000000000000000000..98aa83910bcdbc6bdf707e1ff1699ee56a031d87 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSInAppPurchaseMetaData.h.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7927683d1fc5848b5abfb54ebb1028ec +timeCreated: 1493316657 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSJsonStorage.h b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSJsonStorage.h new file mode 100644 index 0000000000000000000000000000000000000000..1ed3c43109d16745f14544584a56f64151ee37a3 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSJsonStorage.h @@ -0,0 +1,13 @@ +@interface UADSJsonStorage : NSObject + +@property (nonatomic, strong) NSMutableDictionary *storageContents; + +- (BOOL)set:(NSString *)key value:(id)value; +- (id)getValueForKey:(NSString *)key; +- (BOOL)deleteKey:(NSString *)key; +- (NSArray *)getKeys:(NSString *)key recursive:(BOOL)recursive; +- (void)clearData; +- (BOOL)initData; +- (BOOL)hasData; + +@end diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSJsonStorage.h.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSJsonStorage.h.meta new file mode 100644 index 0000000000000000000000000000000000000000..9b923496bee51c11eabd49f210cf24fe128084d4 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSJsonStorage.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1322fd896bbb15bb6e335591b766ae62 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSMediationMetaData.h b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSMediationMetaData.h new file mode 100644 index 0000000000000000000000000000000000000000..5f49a285502769cb37a7d687e49b2dc5631448b1 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSMediationMetaData.h @@ -0,0 +1,9 @@ +#import "UADSMetaData.h" + +@interface UADSMediationMetaData : UADSMetaData + +- (void)setName:(NSString *)mediationNetworkName; +- (void)setVersion:(NSString *)mediationSdkVersion; +- (void)setOrdinal:(int)mediationOrdinal; + +@end \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSMediationMetaData.h.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSMediationMetaData.h.meta new file mode 100644 index 0000000000000000000000000000000000000000..cd75153c0effcd0a3229bf206229acfd3c27fab3 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSMediationMetaData.h.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b52e557db2c2b4eebb10444f1d582029 +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSMetaData.h b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSMetaData.h new file mode 100644 index 0000000000000000000000000000000000000000..791d3138b769b15a146f5875f1b0095fcd4073af --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSMetaData.h @@ -0,0 +1,12 @@ + + +@interface UADSMetaData : NSObject + +@property (nonatomic, strong) NSString *category; +@property (nonatomic, strong) NSMutableDictionary *entries; + +- (instancetype)initWithCategory:(NSString *)category; +- (void)set:(NSString *)key value:(id)value; +- (void)commit; + +@end \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSMetaData.h.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSMetaData.h.meta new file mode 100644 index 0000000000000000000000000000000000000000..1710ad25ff9b6261b5b5d73a38ab8660ea64439c --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSMetaData.h.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 86c008322e7c647149878156c5b81940 +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSPlayerMetaData.h b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSPlayerMetaData.h new file mode 100644 index 0000000000000000000000000000000000000000..5d0db483c1e0d9d9c3c7a38b5d4ffd86bb046971 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSPlayerMetaData.h @@ -0,0 +1,7 @@ +#import "UADSMetaData.h" + +@interface UADSPlayerMetaData : UADSMetaData + +- (void)setServerId:(NSString *)serverId; + +@end \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSPlayerMetaData.h.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSPlayerMetaData.h.meta new file mode 100644 index 0000000000000000000000000000000000000000..92fe5059872c245ffd5c7fe180ba8e5930b361a1 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UADSPlayerMetaData.h.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 453f100e6bdae4dfd9e655927819dc85 +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAds.h b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAds.h new file mode 100644 index 0000000000000000000000000000000000000000..8e1ccfda8f094954b785236d401aee3ad30406e4 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAds.h @@ -0,0 +1,255 @@ +#import <UIKit/UIKit.h> + +#import <UnityAds/UADSMediationMetaData.h> +#import <UnityAds/UADSPlayerMetaData.h> + +/** + * An enumerate that describes the state of `UnityAds` placements. + * @note All placement states, other than `kUnityAdsPlacementStateReady`, indicate that the placement is not currently ready to show ads. + */ +typedef NS_ENUM(NSInteger, UnityAdsPlacementState) { + /** + * A state that indicates that the placement is ready to show an ad. The `show:` selector can be called. + */ + kUnityAdsPlacementStateReady, + /** + * A state that indicates that no state is information is available. + * @warning This state can that UnityAds is not initialized or that the placement is not correctly configured in the Unity Ads admin tool. + */ + kUnityAdsPlacementStateNotAvailable, + /** + * A state that indicates that the placement is currently disabled. The placement can be enabled in the Unity Ads admin tools. + */ + kUnityAdsPlacementStateDisabled, + /** + * A state that indicates that the placement is not currently ready, but will be in the future. + * @note This state most likely indicates that the ad content is currently caching. + */ + kUnityAdsPlacementStateWaiting, + /** + * A state that indicates that the placement is properly configured, but there are currently no ads available for the placement. + */ + kUnityAdsPlacementStateNoFill +}; + +/** + * An enumeration for the completion state of an ad. + */ +typedef NS_ENUM(NSInteger, UnityAdsFinishState) { + /** + * A state that indicates that the ad did not successfully display. + */ + kUnityAdsFinishStateError, + /** + * A state that indicates that the user skipped the ad. + */ + kUnityAdsFinishStateSkipped, + /** + * A state that indicates that the ad was played entirely. + */ + kUnityAdsFinishStateCompleted +}; + +/** + * An enumeration for the various errors that can be emitted through the `UnityAdsDelegate` `unityAdsDidError:withMessage:` method. + */ +typedef NS_ENUM(NSInteger, UnityAdsError) { + /** + * An error that indicates failure due to `UnityAds` currently being uninitialized. + */ + kUnityAdsErrorNotInitialized = 0, + /** + * An error that indicates failure due to a failure in the initialization process. + */ + kUnityAdsErrorInitializedFailed, + /** + * An error that indicates failure due to attempting to initialize `UnityAds` with invalid parameters. + */ + kUnityAdsErrorInvalidArgument, + /** + * An error that indicates failure of the video player. + */ + kUnityAdsErrorVideoPlayerError, + /** + * An error that indicates failure due to having attempted to initialize the `UnityAds` class in an invalid environment. + */ + kUnityAdsErrorInitSanityCheckFail, + /** + * An error that indicates failure due to the presence of an ad blocker. + */ + kUnityAdsErrorAdBlockerDetected, + /** + * An error that indicates failure due to inability to read or write a file. + */ + kUnityAdsErrorFileIoError, + /** + * An error that indicates failure due to a bad device identifier. + */ + kUnityAdsErrorDeviceIdError, + /** + * An error that indicates a failure when attempting to show an ad. + */ + kUnityAdsErrorShowError, + /** + * An error that indicates an internal failure in `UnityAds`. + */ + kUnityAdsErrorInternalError, +}; + +/** + * The `UnityAdsDelegate` protocol defines the required methods for receiving messages from UnityAds. + * Must be implemented by the hosting app. + * The unityAdsReady: method is called when it's possible to show an ad. + * All other methods are used to provide notifications of events of the ad lifecycle. + * @note On initialization, there are ready (or error) callbacks for each placement attached to the game identifier. + */ +NS_ASSUME_NONNULL_BEGIN +@protocol UnityAdsDelegate <NSObject> +/** + * Called when `UnityAds` is ready to show an ad. After this callback you can call the `UnityAds` `show:` method for this placement. + * Note that sometimes placement might no longer be ready due to exceptional reasons. These situations will give no new callbacks. + * + * @warning To avoid error situations, it is always best to check `isReady` method status before calling show. + * @param placementId The ID of the placement that is ready to show, as defined in Unity Ads admin tools. + */ +- (void)unityAdsReady:(NSString *)placementId; +/** + * Called when `UnityAds` encounters an error. All errors will be logged but this method can be used as an additional debugging aid. This callback can also be used for collecting statistics from different error scenarios. + * + * @param error A `UnityAdsError` error enum value indicating the type of error encountered. + * @param message A human readable string indicating the type of error encountered. + */ +- (void)unityAdsDidError:(UnityAdsError)error withMessage:(NSString *)message; +/** + * Called on a successful start of advertisement after calling the `UnityAds` `show:` method. + * + * @warning If there are errors in starting the advertisement, this method may never be called. Unity Ads will directly call `unityAdsDidFinish:withFinishState:` with error status. + * + * @param placementId The ID of the placement that has started, as defined in Unity Ads admin tools. + */ +- (void)unityAdsDidStart:(NSString *)placementId; +/** + * Called after the ad has closed. + * + * @param placementId The ID of the placement that has finished, as defined in Unity Ads admin tools. + * @param state An enum value indicating the finish state of the ad. Possible values are `Completed`, `Skipped`, and `Error`. + */ +- (void)unityAdsDidFinish:(NSString *)placementId + withFinishState:(UnityAdsFinishState)state; +@end + +/** + * `UnityAds` is a static class with methods for preparing and showing ads. + * + * @warning In order to ensure expected behaviour, the delegate must always be set. + */ + +@interface UnityAds : NSObject + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)initialize NS_UNAVAILABLE; + +/** + * Initializes UnityAds. UnityAds should be initialized when app starts. + * + * @param gameId Unique identifier for a game, given by Unity Ads admin tools or Unity editor. + * @param delegate delegate for UnityAdsDelegate callbacks + */ ++ (void)initialize:(NSString *)gameId + delegate:(nullable id<UnityAdsDelegate>)delegate; +/** + * Initializes UnityAds. UnityAds should be initialized when app starts. + * + * @param gameId Unique identifier for a game, given by Unity Ads admin tools or Unity editor. + * @param delegate delegate for UnityAdsDelegate callbacks + * @param testMode Set this flag to `YES` to indicate test mode and show only test ads. + */ ++ (void)initialize:(NSString *)gameId + delegate:(nullable id<UnityAdsDelegate>)delegate + testMode:(BOOL)testMode; +/** + * Show an ad using the defaul placement. + * + * @param viewController The `UIViewController` that is to present the ad view controller. + */ ++ (void)show:(UIViewController *)viewController; +/** + * Show an ad using the provided placement ID. + * + * @param viewController The `UIViewController` that is to present the ad view controller. + * @param placementId The placement ID, as defined in Unity Ads admin tools. + */ ++ (void)show:(UIViewController *)viewController placementId:(NSString *)placementId; +/** + * Provides the currently assigned `UnityAdsDelegate`. + * + * @return The current `UnityAdsDelegate`. + */ ++ (id<UnityAdsDelegate>)getDelegate; +/** + * Allows the delegate to be reassigned after UnityAds has already been initialized. + * + * @param delegate The new `UnityAdsDelegate' for UnityAds to send callbacks to. + */ ++ (void)setDelegate:(id<UnityAdsDelegate>)delegate; +/** + * Get the current debug status of `UnityAds`. + * + * @return If `YES`, `UnityAds` will provide verbose logs. + */ ++ (BOOL)getDebugMode; +/** + * Set the logging verbosity of `UnityAds`. Debug mode indicates verbose logging. + * @warning Does not relate to test mode for ad content. + * @param enableDebugMode `YES` for verbose logging. + */ ++ (void)setDebugMode:(BOOL)enableDebugMode; +/** + * Check to see if the current device supports using Unity Ads. + * + * @return If `NO`, the current device cannot initialize `UnityAds` or show ads. + */ ++ (BOOL)isSupported; +/** + * Check if the default placement is ready to show an ad. + * + * @return If `YES`, the default placement is ready to show an ad. + */ ++ (BOOL)isReady; +/** + * Check if a particular placement is ready to show an ad. + * + * @param placementId The placement ID being checked. + * + * @return If `YES`, the placement is ready to show an ad. + */ ++ (BOOL)isReady:(NSString *)placementId; +/** + * Check the current state of the default placement. + * + * @return If this is `kUnityAdsPlacementStateReady`, the placement is ready to show ads. Other states represent errors. + */ ++ (UnityAdsPlacementState)getPlacementState; +/** + * Check the current state of a placement. + * + * @param placementId The placement ID, as defined in Unity Ads admin tools. + * + * @return If this is `kUnityAdsPlacementStateReady`, the placement is ready to show ads. Other states represent errors. + */ ++ (UnityAdsPlacementState)getPlacementState:(NSString *)placementId; +/** + * Check the version of this `UnityAds` SDK + * + * @return String representing the current version name. + */ ++ (NSString *)getVersion; +/** + * Check that `UnityAds` has been initialized. This might be useful for debugging initialization problems. + * + * @return If `YES`, Unity Ads has been successfully initialized. + */ ++ (BOOL)isInitialized; + +@end +NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAds.h.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAds.h.meta new file mode 100644 index 0000000000000000000000000000000000000000..e4b7c0bcb1fabb1cf382c22cdf9977ec9ebd584a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAds.h.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c99bfe4fc4e5c4dc3917c14075acd117 +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAdsExtended.h b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAdsExtended.h new file mode 100644 index 0000000000000000000000000000000000000000..1435037bf597647a2d6f78d9e473346ea214c2d5 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAdsExtended.h @@ -0,0 +1,21 @@ +#import "UnityAds.h" + +NS_ASSUME_NONNULL_BEGIN +@protocol UnityAdsExtendedDelegate <UnityAdsDelegate> +/** + * Called when a click event happens. + * + * @param placementId The ID of the placement that was clicked. + */ +- (void)unityAdsDidClick:(NSString *)placementId; + +/** + * Called when a placement changes state. + * + * @param placementId The ID of the placement that changed state. + * @param oldState The state before the change. + * @param newState The state after the change. + */ +- (void)unityAdsPlacementStateChanged:(NSString *)placementId oldState:(UnityAdsPlacementState)oldState newState:(UnityAdsPlacementState)newState; +@end +NS_ASSUME_NONNULL_END diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAdsExtended.h.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAdsExtended.h.meta new file mode 100644 index 0000000000000000000000000000000000000000..9840de15e336edd75fdca8fa2e7456cca0833c08 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAdsExtended.h.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a6842a74831964edc8fefa1c0aed89dc +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAdsUnityDelegate.h b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAdsUnityDelegate.h new file mode 100644 index 0000000000000000000000000000000000000000..0fa6e3629ad49bf015235d920a0a88752f9ddaea --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAdsUnityDelegate.h @@ -0,0 +1,11 @@ +#import "UnityAds.h" +NS_ASSUME_NONNULL_BEGIN +@protocol UnityAdsUnityDelegate <UnityAdsDelegate> +/** + * Called when an in-app purchase is initiated from an ad. + * + * @param eventString The string provided via the ad. + */ +- (void)unityAdsDidInitiatePurchase:(NSString *)eventString; +@end +NS_ASSUME_NONNULL_END diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAdsUnityDelegate.h.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAdsUnityDelegate.h.meta new file mode 100644 index 0000000000000000000000000000000000000000..19ec6df7713c4774cdccebcab05c10ce1b16fc07 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAdsUnityDelegate.h.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ce4395ccdb12cf62fca756358be1a892 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Info.plist b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Info.plist new file mode 100644 index 0000000000000000000000000000000000000000..31b037972a95a6e83c078b3576f73a88f39ef4d5 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Info.plist differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Info.plist.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Info.plist.meta new file mode 100644 index 0000000000000000000000000000000000000000..e4e0148d4fa505b32a914074f1f7a08245010b47 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Info.plist.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cc1b50b5501f748da8bec762294d9136 +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Modules.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Modules.meta new file mode 100644 index 0000000000000000000000000000000000000000..6ba1dcb95b4647ded13b2445a5f1caa79940a7ff --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Modules.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3cebe1a96232b44388b30b2f72dde434 +folderAsset: yes +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Modules/module.modulemap b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Modules/module.modulemap new file mode 100644 index 0000000000000000000000000000000000000000..9b448d572a217f83ff4b11232a20f9ee3e0d37f0 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Modules/module.modulemap @@ -0,0 +1,7 @@ +framework module UnityAds { + umbrella header "UnityAds.h" + header "UnityAdsExtended.h" + + export * + module * { export * } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Modules/module.modulemap.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Modules/module.modulemap.meta new file mode 100644 index 0000000000000000000000000000000000000000..13ea2e99741341f5d4a8a0386796067639a4197a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/Modules/module.modulemap.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c5ba7626a737840ff88a3bd84b100482 +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/UnityAds b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/UnityAds new file mode 100644 index 0000000000000000000000000000000000000000..53184164d6c7096455e2d0f93a90ebbfd17f3539 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/UnityAds differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/UnityAds.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/UnityAds.meta new file mode 100644 index 0000000000000000000000000000000000000000..a311b834dc9e7fc1bc28eb5741b12abe86a910a8 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/Resources/iOS/builds/UnityAds.framework/UnityAds.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d1c1a2d988f5148fd9ab17b2460d271e +timeCreated: 1491258705 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll new file mode 100644 index 0000000000000000000000000000000000000000..77409dde77edb607d36316488e4ce53580faa89d Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll.meta new file mode 100644 index 0000000000000000000000000000000000000000..ede66537aecee40090a969f2ca20f8a1891403e4 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/Editor/UnityEditor.Advertisements.dll.meta @@ -0,0 +1,25 @@ +fileFormatVersion: 2 +guid: a342381d77833427fa10621e38fbae10 +timeCreated: 1491945648 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + data: + enabled: 0 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/License.md b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/License.md new file mode 100644 index 0000000000000000000000000000000000000000..27c17ac40d9d229c9ba20d9aafa47f6c8cc820d7 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/License.md @@ -0,0 +1,32 @@ +**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/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/License.md.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/License.md.meta new file mode 100644 index 0000000000000000000000000000000000000000..308e13bcf92e9c47776162e43e5395909b5d8113 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/License.md.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4c6fe94acbb24417c988bab18cbd5209 +timeCreated: 1504642506 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/README.md b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9ed6019f5bee2149f3d669c19bf425905732ef5e --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/README.md @@ -0,0 +1,4 @@ +# Unity Ads + +Implementation of the Unity Ads API. + diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/README.md.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/README.md.meta new file mode 100644 index 0000000000000000000000000000000000000000..26e726c9a915e477bd1f4a1d7386ae5724dedd92 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/README.md.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 62772aad98ed04f0d955b7d20de61f7f +timeCreated: 1493316656 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/UnityEngine.Advertisements.dll b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/UnityEngine.Advertisements.dll new file mode 100644 index 0000000000000000000000000000000000000000..e9486522b9f55d9d6bc3cb853b9d883f9d2d41d7 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/UnityEngine.Advertisements.dll differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/UnityEngine.Advertisements.dll.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/UnityEngine.Advertisements.dll.meta new file mode 100644 index 0000000000000000000000000000000000000000..823a117dfe843925a751d3f121535c7bbe470cbe --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/UnityEngine.Advertisements.dll.meta @@ -0,0 +1,121 @@ +fileFormatVersion: 2 +guid: 3b07d432cba2a4c4f8a2fdea984620b8 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + '': Any + second: + enabled: 0 + settings: + Exclude Android: 0 + Exclude Editor: 0 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude OSXIntel: 1 + Exclude OSXIntel64: 1 + Exclude OSXUniversal: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 0 + - first: + Android: Android + second: + enabled: 1 + settings: + CPU: ARMv7 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Linux + second: + enabled: 0 + settings: + CPU: x86 + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: x86_64 + - first: + Standalone: LinuxUniversal + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: OSXIntel + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: OSXIntel64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + iPhone: iOS + second: + enabled: 1 + settings: + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/package.json b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/package.json new file mode 100644 index 0000000000000000000000000000000000000000..881daf2caeb44320242e5fe2af1634bfaad53064 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/package.json @@ -0,0 +1,17 @@ +{ + "category": "AssetStore/Unity", + "description": "Unity Ads is a video ad network for iOS and Android that allows you to quickly and effectively monetize your games.", + "gitHead": "0d2114387a99011be685886f8ea902242e323e70", + "keywords": [ + "ads", + "unity" + ], + "name": "com.unity.ads", + "repoPackagePath": "build/install/com.unity.ads", + "repository": { + "type": "git", + "url": "ssh://git@github.com/Unity-Technologies/com.unity.ads.git" + }, + "unity": "2017.4", + "version": "2.0.8" +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/package.json.meta b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/package.json.meta new file mode 100644 index 0000000000000000000000000000000000000000..38201ff4e0ab470043c74a0fcb732d49920dd3b0 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.ads@2.0.8/package.json.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: dced8f6ea9f964e8e8e61574ea889d21 +timeCreated: 1491258710 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/CHANGELOG.md b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..207f10a7d8b61a204f05da6178d144ab553467c2 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/CHANGELOG.md @@ -0,0 +1,57 @@ +## [3.2.2] - 2018-11-02 +- Removed FetchOptOutStatus and Initialize call. All application of opt out + status will be handled by the engine. The Analytics/Data Privacy package still + provides FetchPrivacyUrl to provide a URL from which to opt out. + +## [3.2.1] - 2018-10-25 +- Move editor and playmode tests to be packed within the package. + +## [3.2.0] - 2018-10-11 +- Prevent double-registration of standard events. +- Fixed build error on platforms that don't support analytics. +- Update package docs so they can be built and published and be accessible from + the Package Manager UI. +- Fixed a crash occurring on iOS device when the device has cellular capability + but was never configured with any carrier service. +- Fixed an android build failure occurring due to conflicting install referrer + AIDL files. + +## [3.1.1] - 2018-08-21 +- Add DataPrivacy plugin into package. +- Fixed an issue where Android project build would fail when proguard is enabled + in publishing settings. +- Fixed an issue where iOS product archive would fail because bitcode was not + enabled. + +## [3.0.9] - 2018-07-31 +- Fixing issue with NullReferenceException during editor playmode + +## [3.0.8] - 2018-07-26 +- Fixing linking issue when building Android il2cpp + +## [3.0.7] - 2018-07-10 +- Adding in continuous events for signal strength, battery level, battery + temperature, memory usage, available storage + +## [3.0.6] - 2018-06-01 +- Reorganizing platformInfo event around session start/resume/pause + +## [3.0.5] - 2018-05-29 +- Fixing cellular signal strength incorrect array format + +## [3.0.4] - 2018-05-04 +- Breaking change to only work with 2018.2 (change name of whitelisted dll's in + engine to conform to PackageManager standard) +- Changed name of old Analytics dll to the Unity.Analytics.Tracker.dll and + replaced the old one with the new platform information package. +- Changed naming convention of dlls to the PackageManager Standard: + Unity.Analytics.dll, Unity.Analytics.Editor.dll, Unity.Analytics.Tracker.dll, + Unity.Analytics.StandardEvents.dll. +- Deprecated old Analytics tracker and removed it from the add component menu. +- Merged Standardevents package into Analytics package. + +## [2.0.14] - 2018-02-08 +- Added proper documentation and better description text. + +## [2.0.5] - +- Update analytics tracker to 2.0 (1.0 version is still available) diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/CHANGELOG.md.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/CHANGELOG.md.meta new file mode 100644 index 0000000000000000000000000000000000000000..80fcec7f2890a255f2a28ce0294117f6f59eafb4 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/CHANGELOG.md.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bcd27da1c9ae94d2cafe094482a20792 +timeCreated: 1511216857 +licenseType: Pro +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy.meta new file mode 100644 index 0000000000000000000000000000000000000000..80f7551f382c05afdb8f5b20a7693f4d884faedf --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8aafd27f78c12564281bac0d0067df8d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/AssemblyInfo.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/AssemblyInfo.cs new file mode 100644 index 0000000000000000000000000000000000000000..a97f27472ef79a2b728e1efe1f428e367e05fa20 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/AssemblyInfo.cs @@ -0,0 +1,4 @@ +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Unity.Analytics.DataPrivacy.Tests")] +[assembly: InternalsVisibleTo("Unity.Analytics.DataPrivacy.WebRequest.Tests")] diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/AssemblyInfo.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/AssemblyInfo.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..bee8db4f67e8b971bd53cda98513e5407d248912 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/AssemblyInfo.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7aad9e80c95b4991a1f4d017c8caf386 +timeCreated: 1526477558 \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacy.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacy.cs new file mode 100644 index 0000000000000000000000000000000000000000..f48eb13130115a6b768e2bc1e27b57fc7a07402b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacy.cs @@ -0,0 +1,132 @@ +#if ENABLE_CLOUD_SERVICES_ANALYTICS +using System; +using System.Text; +using UnityEngine.Networking; + +namespace UnityEngine.Analytics +{ + public class DataPrivacy + { + [Serializable] + internal struct UserPostData + { + public string appid; + public string userid; + public long sessionid; + public string platform; + public UInt32 platformid; + public string sdk_ver; + public bool debug_device; + public string deviceid; + public string plugin_ver; + } + + [Serializable] + internal struct TokenData + { + public string url; + public string token; + } + + const string kVersion = "3.0.0"; + const string kVersionString = "DataPrivacyPackage/" + kVersion; + + internal const string kBaseUrl = "https://data-optout-service.uca.cloud.unity3d.com"; + const string kTokenUrl = kBaseUrl + "/token"; + + internal static UserPostData GetUserData() + { + var postData = new UserPostData + { + appid = Application.cloudProjectId, + userid = AnalyticsSessionInfo.userId, + sessionid = AnalyticsSessionInfo.sessionId, + platform = Application.platform.ToString(), + platformid = (UInt32)Application.platform, + sdk_ver = Application.unityVersion, + debug_device = Debug.isDebugBuild, + deviceid = SystemInfo.deviceUniqueIdentifier, + plugin_ver = kVersionString + }; + + return postData; + } + + static string GetUserAgent() + { + var message = "UnityPlayer/{0} ({1}/{2}{3} {4})"; + return String.Format(message, + Application.unityVersion, + Application.platform.ToString(), + (UInt32)Application.platform, + Debug.isDebugBuild ? "-dev" : "", + kVersionString); + } + + static String getErrorString(UnityWebRequest www) + { + var json = www.downloadHandler.text; + var error = www.error; + if (String.IsNullOrEmpty(error)) + { + // 5.5 sometimes fails to parse an error response, and the only clue will be + // in www.responseHeadersString, which isn't accessible. + error = "Empty response"; + } + + if (!String.IsNullOrEmpty(json)) + { + error += ": " + json; + } + + return error; + } + + public static void FetchPrivacyUrl(Action<string> success, Action<string> failure = null) + { + string postJson = JsonUtility.ToJson(GetUserData()); + byte[] bytes = Encoding.UTF8.GetBytes(postJson); + var uploadHandler = new UploadHandlerRaw(bytes); + uploadHandler.contentType = "application/json"; + + var www = UnityWebRequest.Post(kTokenUrl, ""); + www.uploadHandler = uploadHandler; +#if !UNITY_WEBGL + www.SetRequestHeader("User-Agent", GetUserAgent()); +#endif + var async = www.SendWebRequest(); + + async.completed += (AsyncOperation async2) => + { + var json = www.downloadHandler.text; + if (!String.IsNullOrEmpty(www.error) || String.IsNullOrEmpty(json)) + { + var error = getErrorString(www); + if (failure != null) + { + failure(error); + } + } + else + { + TokenData tokenData; + tokenData.url = ""; // Just to quell "possibly unassigned" error + try + { + tokenData = JsonUtility.FromJson<TokenData>(json); + } + catch (Exception e) + { + if (failure != null) + { + failure(e.ToString()); + } + } + + success(tokenData.url); + } + }; + } + } +} +#endif //ENABLE_CLOUD_SERVICES_ANALYTICS diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacy.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacy.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..0559a4b04227a54947b07b21f392c67047136e5f --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacy.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bff25ea4cf0d3d841b6787b9f649f21b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacyButton.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacyButton.cs new file mode 100644 index 0000000000000000000000000000000000000000..412b430c6edde04fc52cadf6f0486c38aef3e345 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacyButton.cs @@ -0,0 +1,52 @@ +#if ENABLE_CLOUD_SERVICES_ANALYTICS +using System; +using UnityEngine.UI; + +namespace UnityEngine.Analytics +{ + public class DataPrivacyButton : Button + { + bool urlOpened = false; + + DataPrivacyButton() + { + onClick.AddListener(OpenDataPrivacyUrl); + } + + void OnFailure(string reason) + { + interactable = true; + Debug.LogWarning(String.Format("Failed to get data privacy url: {0}", reason)); + } + + void OpenUrl(string url) + { + interactable = true; + urlOpened = true; + + #if UNITY_WEBGL && !UNITY_EDITOR + Application.ExternalEval("window.open(\"" + url + "\",\"_blank\")"); + #else + Application.OpenURL(url); + #endif + } + + void OpenDataPrivacyUrl() + { + interactable = false; + DataPrivacy.FetchPrivacyUrl(OpenUrl, OnFailure); + } + + void OnApplicationFocus(bool hasFocus) + { + if (hasFocus && urlOpened) + { + urlOpened = false; + // Immediately refresh the remote config so new privacy settings can be enabled + // as soon as possible if they have changed. + RemoteSettings.ForceUpdate(); + } + } + } +} +#endif //ENABLE_CLOUD_SERVICES_ANALYTICS diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacyButton.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacyButton.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..444ade1e6dadd4404acac98250819691796c0033 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacyButton.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a5ebb11c6fc3a2f498bd89593f7744aa +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacyButton.prefab b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacyButton.prefab new file mode 100644 index 0000000000000000000000000000000000000000..53543550f814358b2b173d49926721c8aef20968 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacyButton.prefab @@ -0,0 +1,246 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &109074 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22409074} + - 222: {fileID: 22209074} + - 114: {fileID: 11409072} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &109076 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22409076} + - 222: {fileID: 22209076} + - 114: {fileID: 11409074} + - 114: {fileID: 11409076} + m_Layer: 5 + m_Name: DataPrivacyButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &109078 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 4 + m_Component: + - 224: {fileID: 22409078} + - 222: {fileID: 22209078} + - 114: {fileID: 11409078} + m_Layer: 0 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &11409072 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109074} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: .196078405, g: .196078405, b: .196078405, a: 1} + m_Sprite: {fileID: 21300000, guid: 599a5fd92bab81a4ab02e52d0b1b1c60, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11409074 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109076} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &11409076 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109076} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a5ebb11c6fc3a2f498bd89593f7744aa, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: .960784316, g: .960784316, b: .960784316, a: 1} + m_PressedColor: {r: .784313738, g: .784313738, b: .784313738, a: 1} + m_DisabledColor: {r: .784313738, g: .784313738, b: .784313738, a: .501960814} + m_ColorMultiplier: 1 + m_FadeDuration: .100000001 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 11409074} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &11409078 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109078} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: .196078405, g: .196078405, b: .196078405, a: 1} + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 14 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 10 + m_MaxSize: 40 + m_Alignment: 4 + m_RichText: 0 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Open Data Privacy Page +--- !u!222 &22209074 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109074} +--- !u!222 &22209076 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109076} +--- !u!222 &22209078 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109078} +--- !u!224 &22409074 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109074} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22409076} + m_RootOrder: 1 + m_AnchorMin: {x: 1, y: .5} + m_AnchorMax: {x: 1, y: .5} + m_AnchoredPosition: {x: -8, y: 0} + m_SizeDelta: {x: 20, y: 20} + m_Pivot: {x: 1, y: .5} +--- !u!224 &22409076 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109076} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 22409078} + - {fileID: 22409074} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_AnchorMin: {x: .5, y: .5} + m_AnchorMax: {x: .5, y: .5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 200, y: 30} + m_Pivot: {x: .5, y: .5} +--- !u!224 &22409078 +RectTransform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 109078} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 22409076} + m_RootOrder: 0 + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: .850000024, y: 1} + m_AnchoredPosition: {x: 8, y: 0} + m_SizeDelta: {x: -12, y: 0} + m_Pivot: {x: 0, y: .5} +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 0} + m_RootGameObject: {fileID: 109076} + m_IsPrefabParent: 1 + m_IsExploded: 1 diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacyButton.prefab.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacyButton.prefab.meta new file mode 100644 index 0000000000000000000000000000000000000000..4eaf22f2b7bbdcca44b510df4f01e680ecc7af4e --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacyButton.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 71b11355001648444b41d17fd36c150d +NativeFormatImporter: + userData: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacyIcon.png b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacyIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..564b374b0cce88e07e0f305242aae50b82fff218 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacyIcon.png differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacyIcon.png.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacyIcon.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..58ce1082b90a3200df2fdc65e8b964fe688d371b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/DataPrivacyIcon.png.meta @@ -0,0 +1,48 @@ +fileFormatVersion: 2 +guid: 599a5fd92bab81a4ab02e52d0b1b1c60 +TextureImporter: + fileIDToRecycleName: + 664227380: ImportLogs + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + 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 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 256 + textureSettings: + filterMode: -1 + aniso: 16 + mipBias: -1 + wrapMode: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + 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: 8 + buildTargetSettings: [] + spriteSheet: + sprites: [] + spritePackingTag: + userData: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/Unity.Analytics.DataPrivacy.asmdef b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/Unity.Analytics.DataPrivacy.asmdef new file mode 100644 index 0000000000000000000000000000000000000000..c47ab217d18e32e6d802a0cd4e2f18d8f1cab01b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/Unity.Analytics.DataPrivacy.asmdef @@ -0,0 +1,8 @@ +{ + "name": "Unity.Analytics.DataPrivacy", + "references": [], + "optionalUnityReferences": [], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/Unity.Analytics.DataPrivacy.asmdef.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/Unity.Analytics.DataPrivacy.asmdef.meta new file mode 100644 index 0000000000000000000000000000000000000000..787823b6d07c46fa2481123e8d0678d52b33a9c8 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/DataPrivacy/Unity.Analytics.DataPrivacy.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0fda7ebe61ab2164383d10e32efb9c6e +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Documentation~/analytics.md b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Documentation~/analytics.md new file mode 100644 index 0000000000000000000000000000000000000000..21782ac38bcd9a8b842268fef50552cebb8178f4 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Documentation~/analytics.md @@ -0,0 +1,51 @@ +# About the Analytics Package + +This Analytics package supports the following Unity Analytics features: + +* [Standard Events](https://docs.unity3d.com/Manual/UnityAnalyticsStandardEvents.html) +* [Analytics Event Tracker](https://docs.unity3d.com/Manual/class-AnalyticsEventTracker.html) +* [Unity Analytics Data Privacy Plug-in](https://docs.unity3d.com/Manual/UnityAnalyticsDataPrivacy.html) + +For instructions on using the features in the Analytics package, refer to the [Analytics section of +the Unity Manual](https://docs.unity3d.com/Manual/UnityAnalytics.html). + +The package is supported by Unity 2018.3+ and includes functionality previously included in +earlier Unity Asset Store and Package Manager packages. When upgrading existing projects to +2018.3 or later, older, redundant packages should be removed from the project. + + +## Installing the Analytics Package + +The Analytics package is built into the Unity Editor and enabled automatically. Use the Unity +Package Manager (menu: **Window** > **Package Manager**) to disable or enable the package. +The Analytics package is listed under the built-in packages. + + +<a name="UsingAnalytics"></a> +## Using the Analytics Package + +For instructions on using the features in the Analytics package, refer to the Unity Manual: + +* [Standard Events](https://docs.unity3d.com/Manual/UnityAnalyticsStandardEvents.html) +* [Analytics Event Tracker](https://docs.unity3d.com/Manual/class-AnalyticsEventTracker.html) +* [Unity Analytics Data Privacy Plug-in](https://docs.unity3d.com/Manual/UnityAnalyticsDataPrivacy.html) + + +## Package contents + +The following table indicates the major classes, components, and files included in the Analytics package: + +|Item|Description| +|---|---| +|[`AnalyticsEvent` class](https://docs.unity3d.com/2018.3/Documentation/ScriptReference/Analytics.AnalyticsEvent.html) | The primary class for sending Standard and Custom analytics events to the Unity Analytics service.| +|[Analytics Event Tracker component](https://docs.unity3d.com/Manual/class-AnalyticsEventTracker.html) | A Unity component that you can use to send Standard and Custom analytics events (without writing code).| +|[DataPrivacy class](https://docs.unity3d.com/Manual/UnityAnalyticsDataPrivacyAPI.html)| A utility class that helps applications using Unity Analytics comply with the EU General Data Protection Regulation (GDPR).| +|`Packages/Analytics Library/DataPrivacy/DataPrivacyButton`| A Prefab GameObject you can use when building a user interface to allow players to opt out of Analytics data collection.| +|`Packages/Analytics Library/DataPrivacy/DataPrivacyIcon`| An icon graphic you can use when creating your own opt-out button or control.| + + +## Document revision history + +|Date|Reason| +|---|---| +|October 5, 2018|Document created. Matches package version 3.2.0.| diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Editor.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Editor.meta new file mode 100644 index 0000000000000000000000000000000000000000..d29d133a789c957ab9c9cf150d8608d3c22b47ee --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Editor.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 7fd5e77e7e7ea4eea8198138cd9cc814 +folderAsset: yes +timeCreated: 1491256195 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Editor/AnalyticsEventTracker icon.png b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Editor/AnalyticsEventTracker icon.png new file mode 100644 index 0000000000000000000000000000000000000000..23763936e1b15c7a40e628106cc314a22e3fb75a Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Editor/AnalyticsEventTracker icon.png differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Editor/AnalyticsEventTracker icon.png.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Editor/AnalyticsEventTracker icon.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..124e6e949f212f0f7f532c861627f5615e5812d5 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Editor/AnalyticsEventTracker icon.png.meta @@ -0,0 +1,57 @@ +fileFormatVersion: 2 +guid: 5e7c9ab97e5884e4eaa5967e9024f39d +timeCreated: 1492409422 +licenseType: Free +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: 2048 + 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/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/License.md b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/License.md new file mode 100644 index 0000000000000000000000000000000000000000..27c17ac40d9d229c9ba20d9aafa47f6c8cc820d7 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/License.md @@ -0,0 +1,32 @@ +**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/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/License.md.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/License.md.meta new file mode 100644 index 0000000000000000000000000000000000000000..51c396874b7d6086f9ec3a13470f23626a4979c6 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/License.md.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 15bf9c691b85b41a39c18bee2f87e21b +timeCreated: 1504642560 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/README.md b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9d6fd499e087fb25368cc5265aa9c4fcfc25fea6 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/README.md @@ -0,0 +1,14 @@ +Unity Analytics: Tracker +------------------------------ +Please visit the following URL to see documentation for the Analytics Event Tracker. + +https://docs.google.com/document/d/1glh4zEk0KQ_FhOgk95H-VOubcdzrVGyu5BYCmhFQCh0/edit# + +Please note, the documentation at this URL is considered a "living" document and subject to change. + + +Unity Analytics: Standard Events +------------------------------ +Track player behavior specific to your game + +Standard Events are a set of curated custom events focused on player experience. diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/README.md.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/README.md.meta new file mode 100644 index 0000000000000000000000000000000000000000..f874e1826c985a821f4fbd71ca9fc24b838c74f9 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/README.md.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 884f8f0e4025a420893d3a8d1d3063e1 +timeCreated: 1511217314 +licenseType: Pro +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests.meta new file mode 100644 index 0000000000000000000000000000000000000000..8f14a0b99fcd66692de99230cbfe45df8ffb1463 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7a573b834e2608c4f982daf527bdb47a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/.tests.json b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/.tests.json new file mode 100644 index 0000000000000000000000000000000000000000..327abb29e523ac0bf5338190d4ca6c9a765838bc --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/.tests.json @@ -0,0 +1,3 @@ +{ + "createSeparatePackage": false +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor.meta new file mode 100644 index 0000000000000000000000000000000000000000..64435dd99d02de9d086a86812ff0fd1f88158f4b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 931f3395378214a6c94333853bd0659b +folderAsset: yes +timeCreated: 1489179043 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents.meta new file mode 100644 index 0000000000000000000000000000000000000000..733defc0ade89d1e56b0aaedcd36532ed4b786aa --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b6295675042094715ad9cc104210aeb7 +folderAsset: yes +timeCreated: 1489733951 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementStepTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementStepTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..f4c1af3e2dbc6ef89f91aa3ea537afa0100844b3 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementStepTests.cs @@ -0,0 +1,48 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void AchievementStep_StepIndexTest( + [Values(-1, 0, 1)] int stepIndex + ) + { + var achievementId = "unit_tester"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AchievementStep(stepIndex, achievementId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AchievementStep_AchievementIdTest( + [Values("unit_tester", "", null)] string achievementId + ) + { + var stepIndex = 0; + + if (string.IsNullOrEmpty(achievementId)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.AchievementStep(stepIndex, achievementId)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AchievementStep(stepIndex, achievementId)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void AchievementStep_CustomDataTest() + { + var stepIndex = 0; + var achievementId = "unit_tester"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AchievementStep(stepIndex, achievementId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementStepTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementStepTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..9ca9a73499f39b6f45854541d54ae46fcf23d038 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementStepTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a592d27ead6884163839d4f8da3977ef +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementUnlockedTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementUnlockedTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..4cb4c4bd3e4f31707f48435f56313216c5b95623 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementUnlockedTests.cs @@ -0,0 +1,34 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void AchievementUnlocked_AchievementIdTest( + [Values("unit_tester", "", null)] string achievementId + ) + { + if (string.IsNullOrEmpty(achievementId)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.AchievementUnlocked(achievementId)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AchievementUnlocked(achievementId)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void AchievementUnlocked_CustomDataTest() + { + var achievementId = "unit_tester"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AchievementUnlocked(achievementId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementUnlockedTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementUnlockedTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..3d3f40e19e234264f2af434b9448709c83acb976 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AchievementUnlockedTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d1114812d620342e1a4ad3eaae7e220c +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AdCompleteTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AdCompleteTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..5efd551afc1e09a1e834eed9214f8b79ba2c88d7 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AdCompleteTests.cs @@ -0,0 +1,62 @@ +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void AdComplete_RewardedTest( + [Values(true, false)] bool rewarded + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdComplete(rewarded)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdComplete_NetworkStringTest( + [Values("unityads", "", null)] string network + ) + { + var rewarded = true; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdComplete(rewarded, network)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdComplete_NetworkEnumTest( + [Values(AdvertisingNetwork.UnityAds, AdvertisingNetwork.None)] AdvertisingNetwork network + ) + { + var rewarded = true; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdComplete(rewarded, network)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdComplete_PlacementIdTest( + [Values("rewardedVideo", "", null)] string placementId + ) + { + var rewarded = true; + var network = AdvertisingNetwork.UnityAds; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdComplete(rewarded, network, placementId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdComplete_CustomDataTest() + { + var rewarded = true; + var network = AdvertisingNetwork.UnityAds; + var placementId = "rewardedVideo"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdComplete(rewarded, network, placementId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AdCompleteTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AdCompleteTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..eb1155c389aadc9c27f351a887d1e75f14e686bc --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AdCompleteTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9405b416c158444b19157040fd664533 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AdOfferTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AdOfferTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..c5dfedb4fb34e315d851dbb224d2815c5809d9ab --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AdOfferTests.cs @@ -0,0 +1,62 @@ +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void AdOffer_RewardedTest( + [Values(true, false)] bool rewarded + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdOffer(rewarded)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdOffer_NetworkStringTest( + [Values("unityads", "", null)] string network + ) + { + var rewarded = true; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdOffer(rewarded, network)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdOffer_NetworkEnumTest( + [Values(AdvertisingNetwork.UnityAds, AdvertisingNetwork.None)] AdvertisingNetwork network + ) + { + var rewarded = true; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdOffer(rewarded, network)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdOffer_PlacementIdTest( + [Values("rewardedVideo", "", null)] string placementId + ) + { + var rewarded = true; + var network = AdvertisingNetwork.UnityAds; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdOffer(rewarded, network, placementId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdOffer_CustomDataTest() + { + var rewarded = true; + var network = AdvertisingNetwork.UnityAds; + var placementId = "rewardedVideo"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdOffer(rewarded, network, placementId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AdOfferTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AdOfferTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..f9845981447f38bcc4a2c93f74a2b7a0167518af --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AdOfferTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 96626a3e271e94e76a848c68828fbbac +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AdSkipTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AdSkipTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..8c554b6549121b5aeecaba38b453502888b97c31 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AdSkipTests.cs @@ -0,0 +1,62 @@ +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void AdSkip_RewardedTest( + [Values(true, false)] bool rewarded + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdSkip(rewarded)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdSkip_NetworkStringTest( + [Values("unityads", "", null)] string network + ) + { + var rewarded = true; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdSkip(rewarded, network)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdSkip_NetworkEnumTest( + [Values(AdvertisingNetwork.UnityAds, AdvertisingNetwork.None)] AdvertisingNetwork network + ) + { + var rewarded = true; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdSkip(rewarded, network)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdSkip_PlacementIdTest( + [Values("rewardedVideo", "", null)] string placementId + ) + { + var rewarded = true; + var network = AdvertisingNetwork.UnityAds; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdSkip(rewarded, network, placementId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdSkip_CustomDataTest() + { + var rewarded = true; + var network = AdvertisingNetwork.UnityAds; + var placementId = "rewardedVideo"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdSkip(rewarded, network, placementId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AdSkipTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AdSkipTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..186be883673bcf9eb09d3c442848d4caca640de4 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AdSkipTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c09652e660b34484cb10d35ed2206df5 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AdStartTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AdStartTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..ae104d8895750c7e35d1ab2ef6fda9547f7c420e --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AdStartTests.cs @@ -0,0 +1,62 @@ +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void AdStart_RewardedTest( + [Values(true, false)] bool rewarded + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdStart(rewarded)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdStart_NetworkStringTest( + [Values("unityads", "", null)] string network + ) + { + var rewarded = true; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdStart(rewarded, network)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdStart_NetworkEnumTest( + [Values(AdvertisingNetwork.UnityAds, AdvertisingNetwork.None)] AdvertisingNetwork network + ) + { + var rewarded = true; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdStart(rewarded, network)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdStart_PlacementIdTest( + [Values("rewardedVideo", "", null)] string placementId + ) + { + var rewarded = true; + var network = AdvertisingNetwork.UnityAds; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdStart(rewarded, network, placementId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void AdStart_CustomDataTest() + { + var rewarded = true; + var network = AdvertisingNetwork.UnityAds; + var placementId = "rewardedVideo"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.AdStart(rewarded, network, placementId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AdStartTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AdStartTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..98f15871f821ba062bbca65cbf16b07ab9ca0e2b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AdStartTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 589b3ddef1e4d44cea68e0144bd95434 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AnalyticsEventTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AnalyticsEventTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..e24c6919548e1afd7c1abad9ba7e4e5471a66f08 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AnalyticsEventTests.cs @@ -0,0 +1,115 @@ +#pragma warning disable 0612, 0618 + +using System; +using System.Collections.Generic; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + [TestFixture, Category("Standard Event SDK")] + public partial class AnalyticsEventTests + { + readonly Dictionary<string, object> m_CustomData = new Dictionary<string, object>(); + AnalyticsResult m_Result = AnalyticsResult.Ok; + + [SetUp] + public void TestCaseSetUp() + { + m_Result = AnalyticsResult.Ok; + + m_CustomData.Clear(); + m_CustomData.Add("custom_param", "test"); + } + + [Test] + public void SdkVersion_FormatTest() + { + int major, minor, patch; + var versions = AnalyticsEvent.sdkVersion.Split('.'); + + Assert.AreEqual(3, versions.Length, "Number of integer fields in version format"); + + Assert.IsTrue(int.TryParse(versions[0], out major), "Major version is an integer"); + Assert.IsTrue(int.TryParse(versions[1], out minor), "Minor version is an integer"); + Assert.IsTrue(int.TryParse(versions[2], out patch), "Patch version is an integer"); + + Assert.LessOrEqual(0, major, "Major version"); + Assert.LessOrEqual(0, minor, "Minor version"); + Assert.LessOrEqual(0, patch, "Patch version"); + } + + [Test] + public void Custom_EventNameTest( + [Values("custom_event", "", null)] string eventName + ) + { + if (string.IsNullOrEmpty(eventName)) + { + Assert.Throws<ArgumentException>(() => m_Result = AnalyticsEvent.Custom(eventName)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.Custom(eventName)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void Custom_EventDataTest() + { + var eventName = "custom_event"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.Custom(eventName, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void Custom_RegisterUnregisterUnnamedTest() + { + Action<IDictionary<string, object>> myAction = + eventData => eventData.Add("my_key", "my_value"); + + AnalyticsEvent.Register(myAction); // Registering for a named AnalyticsEvent + + var eventName = "custom_event"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.Custom(eventName, m_CustomData)); + + EvaluateRegisteredCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + + AnalyticsEvent.Unregister(myAction); + } + + /// Normal. Unregistered. + public static void EvaluateCustomData(IDictionary<string, object> customData) + { + Assert.AreEqual(1, customData.Count, "Custom param count"); + } + + /// For Registered case. + public static void EvaluateRegisteredCustomData(IDictionary<string, object> customData) + { + Assert.AreEqual(2, customData.Count, "Custom param count"); + } + + public static void EvaluateAnalyticsResult(AnalyticsResult result) + { + switch (result) + { + case AnalyticsResult.Ok: + break; + case AnalyticsResult.InvalidData: + Assert.Fail("Event data is invalid."); + break; + case AnalyticsResult.TooManyItems: + Assert.Fail("Event data consists of too many parameters."); + break; + default: + Debug.LogFormat("A result of {0} is passable for the purpose of this test.", result); + break; + } + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AnalyticsEventTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AnalyticsEventTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..bb75d13ea187eed1c339f4aabc035a0b5e47b92e --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/AnalyticsEventTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b5366b8adc0f44b3c9cb261a3f752d7a +timeCreated: 1492730660 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/ChatMessageSentTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/ChatMessageSentTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..56496550d652f327a27c9ab496814e78c2a20739 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/ChatMessageSentTests.cs @@ -0,0 +1,22 @@ +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void ChatMessageSent_NoArgsTest() + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ChatMessageSent()); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ChatMessageSent_CustomDataTest() + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ChatMessageSent(m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/ChatMessageSentTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/ChatMessageSentTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..16cb7f8d5b5cddc749b3a45371e8303c65e57014 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/ChatMessageSentTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7b186a0d29a784d81809e8a5471d155e +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/CutsceneSkipTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/CutsceneSkipTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..4b3cfd35d2ba2671113765745c3db54ee13b8df2 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/CutsceneSkipTests.cs @@ -0,0 +1,34 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void CutsceneSkip_CutsceneNameTest( + [Values("test_cutscene", "", null)] string name + ) + { + if (string.IsNullOrEmpty(name)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.CutsceneSkip(name)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.CutsceneSkip(name)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void CutsceneSkip_CustomDataTest() + { + var name = "test_cutscene"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.CutsceneSkip(name, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/CutsceneSkipTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/CutsceneSkipTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..3722ed813f796842da7096242624cd16f7a91bd8 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/CutsceneSkipTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f03b3e03b69e74ef9bd0f20377217a73 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/CutsceneStartTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/CutsceneStartTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..508cc790f40421dc32db54573359bda4f0005a1a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/CutsceneStartTests.cs @@ -0,0 +1,34 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void CutsceneStart_CutsceneNameTest( + [Values("test_cutscene", "", null)] string name + ) + { + if (string.IsNullOrEmpty(name)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.CutsceneStart(name)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.CutsceneStart(name)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void CutsceneStart_CustomDataTest() + { + var name = "test_cutscene"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.CutsceneStart(name, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/CutsceneStartTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/CutsceneStartTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..47f3e96753913c651e2027341a4c932f421869fa --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/CutsceneStartTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: edf97aac6cc5a437ebf600a06a2e5ac7 +timeCreated: 1492896816 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/FirstInteractionTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/FirstInteractionTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..a5cc844286800a12c4b9fcd74885ef80147a0630 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/FirstInteractionTests.cs @@ -0,0 +1,33 @@ +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void FirstInteraction_NoArgsTest() + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.FirstInteraction()); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void FirstInteraction_ActionIdTest( + [Values("test_user_action", "", null)] string actionId + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.FirstInteraction(actionId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void FirstInteraction_CustomDataTest() + { + var actionId = "test_user_action"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.FirstInteraction(actionId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/FirstInteractionTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/FirstInteractionTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..d913d1026e28d828b0d97639253e7c795035696c --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/FirstInteractionTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 78759e25237a7430587982cd92a2a0d8 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/GameOverTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/GameOverTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..8e88f4456006af3ad2b2aa39439e92282b95c964 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/GameOverTests.cs @@ -0,0 +1,58 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void GameOver_NoArgsTest() + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.GameOver()); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void GameOver_LevelIndexTest( + [Values(-1, 0, 1)] int levelIndex + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.GameOver(levelIndex)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void GameOver_LevelNameTest( + [Values("test_level", "", null)] string levelName + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.GameOver(levelName)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void GameOver_LevelIndex_LevelNameTest( + [Values(0)] int levelIndex, + [Values("test_level", "", null)] string levelName + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.GameOver(levelIndex, levelName)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void GameOver_CustomDataTest() + { + var levelIndex = 0; + var levelName = "test_level"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.GameOver(levelName, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.GameOver(levelIndex, levelName, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/GameOverTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/GameOverTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..60aa2a1945a24ca7bbeb088906bae68b9f7446e2 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/GameOverTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a30e59ca9f68d46db88323ac18f49e31 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/GameStartTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/GameStartTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..18749c7cb7500f2a8de9de92cabe90acd3dd75a2 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/GameStartTests.cs @@ -0,0 +1,22 @@ +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void GameStart_NoArgsTest() + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.GameStart()); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void GameStart_CustomDataTest() + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.GameStart(m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/GameStartTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/GameStartTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..e17c1ba114ddfc373ee73f4421c61ef09956d62f --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/GameStartTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2b2be9ee9f41a4b2db6b502697ba31b1 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/IAPTransactionTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/IAPTransactionTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..439d4e77bcb1dd602d2f7ac0f789ee5e6a88ea73 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/IAPTransactionTests.cs @@ -0,0 +1,111 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void IAPTransaction_ContextTest( + [Values("test", "", null)] string context) + { + var price = 1f; + var itemId = "test_item"; + + if (string.IsNullOrEmpty(context)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.IAPTransaction(context, price, itemId)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.IAPTransaction(context, price, itemId)); + } + + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void IAPTransaction_PriceTest( + [Values(-1f, 0f, 1f)] float price) + { + var context = "test"; + var itemId = "test_item"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.IAPTransaction(context, price, itemId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void IAPTransaction_ItemIdTest( + [Values("test_item", "", null)] string itemId) + { + var context = "test"; + var price = 1f; + + if (string.IsNullOrEmpty(itemId)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.IAPTransaction(context, price, itemId)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.IAPTransaction(context, price, itemId)); + } + + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void IAPTransaction_ItemTypeTest( + [Values("test_type", "", null)] string itemType) + { + var context = "test"; + var price = 1f; + var itemId = "test_item"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.IAPTransaction(context, price, itemId, itemType)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void IAPTransaction_LevelTest( + [Values("test_level", "", null)] string level) + { + var context = "test"; + var price = 1f; + var itemId = "test_item"; + var itemType = "test_type"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.IAPTransaction(context, price, itemId, itemType, level)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void IAPTransaction_TransactionIdTest( + [Values("test_id", "", null)] string transactionId) + { + var context = "test"; + var price = 1f; + var itemId = "test_item"; + var itemType = "test_type"; + var level = "test_level"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.IAPTransaction(context, price, itemId, itemType, level, transactionId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void IAPTransaction_CustomDataTest() + { + var context = "test"; + var price = 1f; + var itemId = "test_item"; + var itemType = "test_type"; + var level = "test_level"; + var transactionId = "test_id"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.IAPTransaction(context, price, itemId, itemType, level, transactionId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/IAPTransactionTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/IAPTransactionTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..a9cb068c67bd4385a7d80a4eeebcbf398a507f8a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/IAPTransactionTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8b4a8234f532f4b34aba0ab70400d90d +timeCreated: 1497539738 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/ItemAcquiredTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/ItemAcquiredTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..ec2b6683b6744e9377b6c9d8c4e1597e7b8fd8a7 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/ItemAcquiredTests.cs @@ -0,0 +1,176 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void ItemAcquired_CurrencyTypeTest( + [Values(AcquisitionType.Premium, AcquisitionType.Soft)] AcquisitionType currencyType) + { + var context = "test"; + var amount = 1f; + var itemId = "test_item"; + var balance = 1f; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ItemAcquired_ContextTest( + [Values("test", "", null)] string context) + { + var currencyType = AcquisitionType.Soft; + var amount = 1f; + var itemId = "test_item"; + var balance = 1f; + + if (string.IsNullOrEmpty(context)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId)); + Assert.Throws<ArgumentException>(() => AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void ItemAcquired_AmountTest( + [Values(-1f, 0f, 1f)] float amount) + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var itemId = "test_item"; + var balance = 1f; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ItemAcquired_ItemIdTest( + [Values("test_item", "", null)] string itemId) + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var amount = 1f; + var balance = 1f; + + if (string.IsNullOrEmpty(itemId)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId)); + Assert.Throws<ArgumentException>(() => AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void ItemAcquired_BalanceTest( + [Values(-1f, 0, 1f)] float balance) + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var amount = 1f; + var itemId = "test_item"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ItemAcquired_ItemTypeTest( + [Values("test_type", "", null)] string itemType) + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var amount = 1f; + var itemId = "test_item"; + var balance = 1f; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, itemType)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance, itemType)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ItemAcquired_LevelTest( + [Values("test_level", "", null)] string level) + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var amount = 1f; + var itemId = "test_item"; + var balance = 1f; + var itemType = "test_type"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, itemType, level)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance, itemType, level)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ItemAcquired_TransactionIdTest( + [Values("test_id", "", null)] string transactionId) + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var amount = 1f; + var itemId = "test_item"; + var balance = 1f; + var itemType = "test_type"; + var level = "test_level"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, itemType, level, transactionId)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance, itemType, level, transactionId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ItemAcquired_CustomDataTest() + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var amount = 1f; + var itemId = "test_item"; + var balance = 1f; + var itemType = "test_type"; + var level = "test_level"; + var transactionId = "test_id"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, itemType, level, transactionId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemAcquired(currencyType, context, amount, itemId, balance, itemType, level, transactionId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/ItemAcquiredTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/ItemAcquiredTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..72834076ecd9d0d625c398e48dfb99c022cfd702 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/ItemAcquiredTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5e7a49a6952af4d4ab2c3b038be68141 +timeCreated: 1497539770 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/ItemSpentTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/ItemSpentTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..52ee942272f432455275ae3327e60a580735a08d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/ItemSpentTests.cs @@ -0,0 +1,176 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void ItemSpent_CurrencyTypeTest( + [Values(AcquisitionType.Premium, AcquisitionType.Soft)] AcquisitionType currencyType) + { + var context = "test"; + var amount = 1f; + var itemId = "test_item"; + var balance = 1f; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ItemSpent_ContextTest( + [Values("test", "", null)] string context) + { + var currencyType = AcquisitionType.Soft; + var amount = 1f; + var itemId = "test_item"; + var balance = 1f; + + if (string.IsNullOrEmpty(context)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId)); + Assert.Throws<ArgumentException>(() => AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void ItemSpent_AmountTest( + [Values(-1f, 0f, 1f)] float amount) + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var itemId = "test_item"; + var balance = 1f; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ItemSpent_ItemIdTest( + [Values("test_item", "", null)] string itemId) + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var amount = 1f; + var balance = 1f; + + if (string.IsNullOrEmpty(itemId)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId)); + Assert.Throws<ArgumentException>(() => AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void ItemSpent_BalanceTest( + [Values(-1f, 0, 1f)] float balance) + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var amount = 1f; + var itemId = "test_item"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ItemSpent_ItemTypeTest( + [Values("test_type", "", null)] string itemType) + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var amount = 1f; + var itemId = "test_item"; + var balance = 1f; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, itemType)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance, itemType)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ItemSpent_LevelTest( + [Values("test_level", "", null)] string level) + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var amount = 1f; + var itemId = "test_item"; + var balance = 1f; + var itemType = "test_type"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, itemType, level)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance, itemType, level)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ItemSpent_TransactionIdTest( + [Values("test_id", "", null)] string transactionId) + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var amount = 1f; + var itemId = "test_item"; + var balance = 1f; + var itemType = "test_type"; + var level = "test_level"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, itemType, level, transactionId)); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance, itemType, level, transactionId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ItemSpent_CustomDataTest() + { + var currencyType = AcquisitionType.Soft; + var context = "test"; + var amount = 1f; + var itemId = "test_item"; + var balance = 1f; + var itemType = "test_type"; + var level = "test_level"; + var transactionId = "test_id"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, itemType, level, transactionId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ItemSpent(currencyType, context, amount, itemId, balance, itemType, level, transactionId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/ItemSpentTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/ItemSpentTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..ab3b390a8883beaa3beccac6c9e6a05241c9bd83 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/ItemSpentTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 00ed25e3298ac440eb327c706a964e3a +timeCreated: 1497539780 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelCompleteTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelCompleteTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..274e37c4f1c7fa8d736bf575a5679258f9979a77 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelCompleteTests.cs @@ -0,0 +1,58 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void LevelComplete_LevelIndexTest( + [Values(-1, 0, 1)] int levelIndex + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelComplete(levelIndex)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void LevelComplete_LevelNameTest( + [Values("test_level", "", null)] string levelName + ) + { + if (string.IsNullOrEmpty(levelName)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.LevelComplete(levelName)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelComplete(levelName)); + EvaluateAnalyticsResult(m_Result); + } + } + + // [Test] + // public void LevelComplete_LevelIndex_LevelNameTest ( + // [Values(0)] int levelIndex, + // [Values("test_level", "", null)] string levelName + // ) + // { + // Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelComplete(levelIndex, levelName)); + // EvaluateAnalyticsResult(m_Result); + // } + + [Test] + public void LevelComplete_CustomDataTest() + { + var levelIndex = 0; + var levelName = "test_level"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelComplete(levelName, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelComplete(levelIndex, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelCompleteTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelCompleteTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..70202cf9f5e9bbc171525053988f30ebd4b08e0b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelCompleteTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: fa4ff09b6aaaa4df29a884efa38bce56 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelFailTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelFailTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..fece2eade29f4db81cec5fca6998f6391e2c2c06 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelFailTests.cs @@ -0,0 +1,58 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void LevelFail_LevelIndexTest( + [Values(-1, 0, 1)] int levelIndex + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelFail(levelIndex)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void LevelFail_LevelNameTest( + [Values("test_level", "", null)] string levelName + ) + { + if (string.IsNullOrEmpty(levelName)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.LevelFail(levelName)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelFail(levelName)); + EvaluateAnalyticsResult(m_Result); + } + } + + // [Test] + // public void LevelFail_LevelIndex_LevelNameTest ( + // [Values(-1, 0, 1)] int levelIndex, + // [Values("test_level", "", null)] string levelName + // ) + // { + // Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelFail(levelIndex, levelName)); + // EvaluateAnalyticsResult(m_Result); + // } + + [Test] + public void LevelFail_CustomDataTest() + { + var levelIndex = 0; + var levelName = "test_level"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelFail(levelName, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelFail(levelIndex, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelFailTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelFailTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..05b52fdb83d67088184208f370f88a5278ae0fd2 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelFailTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 036d03e26977243fa9a2d7af48e51e08 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelQuitTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelQuitTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..e4859aba98fe79e2b1017018183369adb2d436db --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelQuitTests.cs @@ -0,0 +1,58 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void LevelQuit_LevelIndexTest( + [Values(-1, 0, 1)] int levelIndex + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelQuit(levelIndex)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void LevelQuit_LevelNameTest( + [Values("test_level", "", null)] string levelName + ) + { + if (string.IsNullOrEmpty(levelName)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.LevelQuit(levelName)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelQuit(levelName)); + EvaluateAnalyticsResult(m_Result); + } + } + + // [Test] + // public void LevelQuit_LevelIndex_LevelNameTest ( + // [Values(-1, 0, 1)] int levelIndex, + // [Values("test_level", "", null)] string levelName + // ) + // { + // Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelQuit(levelIndex, levelName)); + // EvaluateAnalyticsResult(m_Result); + // } + + [Test] + public void LevelQuit_CustomDataTest() + { + var levelIndex = 0; + var levelName = "test_level"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelQuit(levelName, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelQuit(levelIndex, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelQuitTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelQuitTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..0b0c0f7700282dd8e66345beb3c11a94698f3f1c --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelQuitTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 617202f4e2bed4ef8acccfd6c1ecd6fa +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelSkipTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelSkipTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..fcbe9eb6284692ada4fa6d90a3ae567d5be4b18f --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelSkipTests.cs @@ -0,0 +1,58 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void LevelSkip_LevelIndexTest( + [Values(-1, 0, 1)] int levelIndex + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelSkip(levelIndex)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void LevelSkip_LevelNameTest( + [Values("test_level", "", null)] string levelName + ) + { + if (string.IsNullOrEmpty(levelName)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.LevelSkip(levelName)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelSkip(levelName)); + EvaluateAnalyticsResult(m_Result); + } + } + + // [Test] + // public void LevelSkip_LevelIndex_LevelNameTest ( + // [Values(-1, 0, 1)] int levelIndex, + // [Values("test_level", "", null)] string levelName + // ) + // { + // Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelSkip(levelIndex, levelName)); + // EvaluateAnalyticsResult(m_Result); + // } + + [Test] + public void LevelSkip_CustomDataTest() + { + var levelIndex = 0; + var levelName = "test_level"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelSkip(levelName, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelSkip(levelIndex, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelSkipTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelSkipTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..5d5b103cd9b5f02edd6c3767674977d55849f244 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelSkipTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 93f7ca1a9c5c945a89e884f9611c70f0 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelStartTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelStartTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..ff4ef4341d4921b03660e9235790be590bbada51 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelStartTests.cs @@ -0,0 +1,58 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void LevelStart_LevelIndexTest( + [Values(-1, 0, 1)] int levelIndex + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelStart(levelIndex)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void LevelStart_LevelNameTest( + [Values("test_level", "", null)] string levelName + ) + { + if (string.IsNullOrEmpty(levelName)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.LevelStart(levelName)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelStart(levelName)); + EvaluateAnalyticsResult(m_Result); + } + } + + // [Test] + // public void LevelStart_LevelIndex_LevelNameTest ( + // [Values(0)] int levelIndex, + // [Values("test_level", "", null)] string levelName + // ) + // { + // Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelStart(levelIndex, levelName)); + // EvaluateAnalyticsResult(m_Result); + // } + + [Test] + public void LevelStart_CustomDataTest() + { + var levelIndex = 0; + var levelName = "test_level"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelStart(levelName, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelStart(levelIndex, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelStartTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelStartTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..121018d8a01869430d152ab48bce1f689b172dff --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelStartTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 876d47a520ae34f81a97792e1afed14b +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelUpTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelUpTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..96578a71039ee74786d26d3b0af697406186146b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelUpTests.cs @@ -0,0 +1,58 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void LevelUp_LevelIndexTest( + [Values(0, 1, 2)] int newLevelIndex + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelUp(newLevelIndex)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void LevelUp_LevelNameTest( + [Values("new_test_level", "", null)] string newLevelName + ) + { + if (string.IsNullOrEmpty(newLevelName)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.LevelUp(newLevelName)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelUp(newLevelName)); + EvaluateAnalyticsResult(m_Result); + } + } + + // [Test] + // public void LevelUp_LevelIndex_LevelNameTest ( + // [Values(1)] int newLevelIndex, + // [Values("new_test_level", "", null)] string newLevelName + // ) + // { + // Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelUp(newLevelIndex, newLevelName)); + // EvaluateAnalyticsResult(m_Result); + // } + + [Test] + public void LevelUp_CustomDataTest() + { + var newLevelIndex = 1; + var newLevelName = "new_test_level"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelUp(newLevelName, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.LevelUp(newLevelIndex, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelUpTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelUpTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..1d650da1b936781f05497d87cb085a57a04d6269 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/LevelUpTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b0bb2afc5cd494e6f9b44455a0fc22f8 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/PostAdActionTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/PostAdActionTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..80ffa6df1618c89c49c31717211b422552e8491f --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/PostAdActionTests.cs @@ -0,0 +1,62 @@ +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void PostAdAction_RewardedTest( + [Values(true, false)] bool rewarded + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PostAdAction(rewarded)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void PostAdAction_NetworkStringTest( + [Values("unityads", "", null)] string network + ) + { + var rewarded = true; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PostAdAction(rewarded, network)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void PostAdAction_NetworkEnumTest( + [Values(AdvertisingNetwork.UnityAds, AdvertisingNetwork.None)] AdvertisingNetwork network + ) + { + var rewarded = true; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PostAdAction(rewarded, network)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void PostAdAction_PlacementIdTest( + [Values("rewardedVideo", "", null)] string placementId + ) + { + var rewarded = true; + var network = AdvertisingNetwork.UnityAds; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PostAdAction(rewarded, network, placementId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void PostAdAction_CustomDataTest() + { + var rewarded = true; + var network = AdvertisingNetwork.UnityAds; + var placementId = "rewardedVideo"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PostAdAction(rewarded, network, placementId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/PostAdActionTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/PostAdActionTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..405d01195b87207705f3ee7b9af527e82702a2f8 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/PostAdActionTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 293182c4d29604c05b6724ae00fd121a +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/PushNotificationClickTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/PushNotificationClickTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..5923cedd8ab8af0ef3e88a327c6425e8f78b630b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/PushNotificationClickTests.cs @@ -0,0 +1,34 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void PushNotificationClick_MessageIdTest( + [Values("test_message", "", null)] string messageId + ) + { + if (string.IsNullOrEmpty(messageId)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.PushNotificationClick(messageId)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PushNotificationClick(messageId)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void PushNotificationClick_CustomDataTest() + { + var messageId = "test_message"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PushNotificationClick(messageId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/PushNotificationClickTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/PushNotificationClickTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..1ee5e1f948cc2f4a07653d3f7e1c4a3403162957 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/PushNotificationClickTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 240551e3142f04b0ca801ce8eb645ba2 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/PushNotificationEnableTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/PushNotificationEnableTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..2e842bdc73cd16961145304c64e27b1565971c2c --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/PushNotificationEnableTests.cs @@ -0,0 +1,22 @@ +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void PushNotificationEnable_NoArgsTest() + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PushNotificationEnable()); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void PushNotificationEnable_CustomDataTest() + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.PushNotificationEnable(m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/PushNotificationEnableTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/PushNotificationEnableTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..285653d9da0facb346d2cf7b8c196cdb7d66fdba --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/PushNotificationEnableTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a10564aae782c458cbf1de024f4870f7 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/ScreenVisitTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/ScreenVisitTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..97a60fcc07c39fbef3792b5c8d0eaca1e91bc713 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/ScreenVisitTests.cs @@ -0,0 +1,43 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void ScreenVisit_ScreenNameStringTest( + [Values("test_screen", "", null)] string screenName + ) + { + if (string.IsNullOrEmpty(screenName)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.ScreenVisit(screenName)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ScreenVisit(screenName)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void ScreenVisit_ScreenNameEnumTest( + [Values(ScreenName.CrossPromo, ScreenName.IAPPromo, ScreenName.None)] ScreenName screenName + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ScreenVisit(screenName)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void ScreenVisit_CustomDataTest() + { + var screenName = ScreenName.MainMenu; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.ScreenVisit(screenName, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/ScreenVisitTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/ScreenVisitTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..6327d182526dd525a4746b93dbee82697b61bb99 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/ScreenVisitTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 768d77435df35443bad74aedc993c0cf +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/SocialShareAcceptTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/SocialShareAcceptTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..7cb38a1dc6844014691546c1e65bd8daf98c9fd5 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/SocialShareAcceptTests.cs @@ -0,0 +1,110 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void SocialShareAccept_ShareTypeStringTest( + [Values("test_share", "", null)] string shareType + ) + { + var socialNetwork = SocialNetwork.Facebook; + + if (string.IsNullOrEmpty(shareType)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.SocialShare(shareType, socialNetwork)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.SocialShareAccept(shareType, socialNetwork)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void SocialShareAccept_ShareTypeEnumTest( + [Values(ShareType.TextOnly, ShareType.Image, ShareType.None)] ShareType shareType + ) + { + var socialNetwork = SocialNetwork.Twitter; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.SocialShareAccept(shareType, socialNetwork)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void SocialShareAccept_SocialNetworkStringTest( + [Values("test_network", "", null)] string socialNetwork + ) + { + var shareType = ShareType.Image; + + if (string.IsNullOrEmpty(socialNetwork)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.SocialShare(shareType, socialNetwork)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.SocialShareAccept(shareType, socialNetwork)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void SocialShareAccept_SocialNetworkEnumTest( + [Values(SocialNetwork.GooglePlus, SocialNetwork.OK_ru, SocialNetwork.None)] SocialNetwork socialNetwork + ) + { + var shareType = ShareType.Video; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.SocialShareAccept(shareType, socialNetwork)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void SocialShareAccept_SenderIdTest( + [Values("test_sender", "", null)] string senderId + ) + { + var shareType = ShareType.TextOnly; + var socialNetwork = SocialNetwork.Twitter; + + Assert.DoesNotThrow( + () => m_Result = AnalyticsEvent.SocialShareAccept(shareType, socialNetwork, senderId) + ); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void SocialShareAccept_RecipientIdTest( + [Values("test_recipient", "", null)] string recipientId + ) + { + var shareType = ShareType.TextOnly; + var socialNetwork = SocialNetwork.Twitter; + var senderId = "test_sender"; + + Assert.DoesNotThrow( + () => m_Result = AnalyticsEvent.SocialShareAccept(shareType, socialNetwork, senderId, recipientId) + ); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void SocialShareAccept_CustomDataTest() + { + var shareType = ShareType.TextOnly; + var socialNetwork = SocialNetwork.Twitter; + var senderId = "test_sender"; + var recipientId = "test_recipient"; + + Assert.DoesNotThrow( + () => m_Result = AnalyticsEvent.SocialShareAccept(shareType, socialNetwork, senderId, recipientId, m_CustomData) + ); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/SocialShareAcceptTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/SocialShareAcceptTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..e491cf296846ce3da95805320b2f2f3ab5c16582 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/SocialShareAcceptTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 138961c4434d141a987d96df1f8d7342 +timeCreated: 1492896446 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/SocialShareTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/SocialShareTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..0809d04ad56f4100d76031f20dbc827c754bcdb2 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/SocialShareTests.cs @@ -0,0 +1,110 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void SocialShare_ShareTypeStringTest( + [Values("test_share", "", null)] string shareType + ) + { + var socialNetwork = SocialNetwork.Facebook; + + if (string.IsNullOrEmpty(shareType)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.SocialShare(shareType, socialNetwork)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.SocialShare(shareType, socialNetwork)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void SocialShare_ShareTypeEnumTest( + [Values(ShareType.TextOnly, ShareType.Image, ShareType.None)] ShareType shareType + ) + { + var socialNetwork = SocialNetwork.Twitter; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.SocialShare(shareType, socialNetwork)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void SocialShare_SocialNetworkStringTest( + [Values("test_network", "", null)] string socialNetwork + ) + { + var shareType = ShareType.Image; + + if (string.IsNullOrEmpty(socialNetwork)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.SocialShare(shareType, socialNetwork)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.SocialShare(shareType, socialNetwork)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void SocialShare_SocialNetworkEnumTest( + [Values(SocialNetwork.GooglePlus, SocialNetwork.OK_ru, SocialNetwork.None)] SocialNetwork socialNetwork + ) + { + var shareType = ShareType.Video; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.SocialShare(shareType, socialNetwork)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void SocialShare_SenderIdTest( + [Values("test_sender", "", null)] string senderId + ) + { + var shareType = ShareType.TextOnly; + var socialNetwork = SocialNetwork.Twitter; + + Assert.DoesNotThrow( + () => m_Result = AnalyticsEvent.SocialShare(shareType, socialNetwork, senderId) + ); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void SocialShare_RecipientIdTest( + [Values("test_recipient", "", null)] string recipientId + ) + { + var shareType = ShareType.TextOnly; + var socialNetwork = SocialNetwork.Twitter; + var senderId = "test_sender"; + + Assert.DoesNotThrow( + () => m_Result = AnalyticsEvent.SocialShare(shareType, socialNetwork, senderId, recipientId) + ); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void SocialShare_CustomDataTest() + { + var shareType = ShareType.TextOnly; + var socialNetwork = SocialNetwork.Twitter; + var senderId = "test_sender"; + var recipientId = "test_recipient"; + + Assert.DoesNotThrow( + () => m_Result = AnalyticsEvent.SocialShare(shareType, socialNetwork, senderId, recipientId, m_CustomData) + ); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/SocialShareTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/SocialShareTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..bc9978d33f08d1e4551efc7bb9f65a79a8a92b1a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/SocialShareTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 811f7f1f5920641c0a9233503492c9ba +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/StoreItemClickTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/StoreItemClickTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..367a4599b14bcab4d172768357069ce77b1201c8 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/StoreItemClickTests.cs @@ -0,0 +1,75 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void StoreItemClick_StoreTypeTest( + [Values(StoreType.Premium, StoreType.Soft)] StoreType storeType + ) + { + var itemId = "test_item"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.StoreItemClick(storeType, itemId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void StoreItemClick_ItemIdTest( + [Values("test_item", "", null)] string itemId + ) + { + var storeType = StoreType.Soft; + + if (string.IsNullOrEmpty(itemId)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.StoreItemClick(storeType, itemId)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.StoreItemClick(storeType, itemId)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void StoreItemClick_ItemId_ItemNameTest( + [Values("test_item_id", "", null)] string itemId, + [Values("Test Item Name", "", null)] string itemName + ) + { + var storeType = StoreType.Soft; + + if (string.IsNullOrEmpty(itemId) && string.IsNullOrEmpty(itemName)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.StoreItemClick(storeType, itemId)); + } + else + { + if (string.IsNullOrEmpty(itemId)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.StoreItemClick(storeType, itemId)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.StoreItemClick(storeType, itemId, itemName)); + EvaluateAnalyticsResult(m_Result); + } + } + } + + [Test] + public void StoreItemClick_CustomDataTest() + { + var storeType = StoreType.Soft; + var itemId = "test_item"; + var itemName = "Test Item"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.StoreItemClick(storeType, itemId, itemName, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/StoreItemClickTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/StoreItemClickTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..182b9d1d1690d68566fb11bf02d43ed8339f4f14 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/StoreItemClickTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c786248494be6489bbfa006bdf59c773 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/StoreOpenedTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/StoreOpenedTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..489188720331a1353e459aee94aff1f3aa52653e --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/StoreOpenedTests.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void StoreOpened_StoreTypeTest( + [Values(StoreType.Premium, StoreType.Soft)] StoreType storeType + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.StoreOpened(storeType)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void StoreOpened_CustomDataTest() + { + var storeType = StoreType.Soft; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.StoreOpened(storeType, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/StoreOpenedTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/StoreOpenedTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..65bf472227bafe0c242191b28167ea3c728cccbf --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/StoreOpenedTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f4c7193663918411c8f78e3cf844cb9e +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialCompleteTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialCompleteTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..3e166af23a3a3acfa9bc180f87f2b4e1d33e9d87 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialCompleteTests.cs @@ -0,0 +1,26 @@ +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void TutorialComplete_TutorialIdTest( + [Values("test_tutorial", "", null)] string tutorialId + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialComplete(tutorialId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void TutorialComplete_CustomDataTest() + { + var tutorialId = "test_tutorial"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialComplete(tutorialId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialCompleteTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialCompleteTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..b2067fea08ceb4d7997106624e4677d17910349a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialCompleteTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b025f6f8a47be46418bcb0ed1050cfb4 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialSkipTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialSkipTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..9b413edaf9782e999894b6c9c9473f574644e7be --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialSkipTests.cs @@ -0,0 +1,26 @@ +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void TutorialSkip_TutorialIdTest( + [Values("test_tutorial", "", null)] string tutorialId + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialSkip(tutorialId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void TutorialSkip_CustomDataTest() + { + var tutorialId = "test_tutorial"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialSkip(tutorialId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialSkipTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialSkipTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..b700e0ed6a99b1bdeab9ceec6304a43246f50823 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialSkipTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3ab6e6972ecb54e2cbd505692415a7ba +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialStartTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialStartTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..425f27736e806a2fe5e2582e691c1ba0cf23513a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialStartTests.cs @@ -0,0 +1,26 @@ +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void TutorialStart_TutorialIdTest( + [Values("test_tutorial", "", null)] string tutorialId + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialStart(tutorialId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void TutorialStart_CustomDataTest() + { + var tutorialId = "test_tutorial"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialStart(tutorialId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialStartTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialStartTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..bfa7a294fefde11bbd7e981e03413df7c47b6d17 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialStartTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2622838afa3284cc882c48ceea4c8220 +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialStepTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialStepTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..524d8195d345db756b5c1976fae624312c2b2aaa --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialStepTests.cs @@ -0,0 +1,39 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void TutorialStep_StepIndexTest( + [Values(-1, 0, 1)] int stepIndex + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialStep(stepIndex)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void TutorialStep_TutorialIdTest( + [Values("test_tutorial", "", null)] string tutorialId + ) + { + var stepIndex = 0; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialStep(stepIndex, tutorialId)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void TutorialStep_CustomDataTest() + { + var stepIndex = 0; + var tutorialId = "test_tutorial"; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.TutorialStep(stepIndex, tutorialId, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialStepTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialStepTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..54ebcfa2289b2ec0e814f9f231abef0c0dc02a74 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/TutorialStepTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a571de1bea3cb4c9784493c6f1b0b76c +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/Unity.Analytics.StandardEvents.EditorTests.asmdef b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/Unity.Analytics.StandardEvents.EditorTests.asmdef new file mode 100644 index 0000000000000000000000000000000000000000..eeceedd86620979293e01256928e298c3eb83c21 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/Unity.Analytics.StandardEvents.EditorTests.asmdef @@ -0,0 +1,12 @@ +{ + "name": "Unity.Analytics.StandardEvents.EditorTests", + "references": [], + "optionalUnityReferences": [ + "TestAssemblies" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/Unity.Analytics.StandardEvents.EditorTests.asmdef.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/Unity.Analytics.StandardEvents.EditorTests.asmdef.meta new file mode 100644 index 0000000000000000000000000000000000000000..074fd4746691067748ed85fb90df0e3c398e8682 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/Unity.Analytics.StandardEvents.EditorTests.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: adee0c1377ef8b2489060e152dd0d119 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/UserSignupTests.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/UserSignupTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..56920a63d12f5f9b18561c6b376553569cbad84b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/UserSignupTests.cs @@ -0,0 +1,43 @@ +using System; +using NUnit.Framework; + +namespace UnityEngine.Analytics.Tests +{ + public partial class AnalyticsEventTests + { + [Test] + public void UserSignup_AuthorizationNetworkStringTest( + [Values("test_network", "", null)] string network + ) + { + if (string.IsNullOrEmpty(network)) + { + Assert.Throws<ArgumentException>(() => AnalyticsEvent.UserSignup(network)); + } + else + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.UserSignup(network)); + EvaluateAnalyticsResult(m_Result); + } + } + + [Test] + public void UserSignup_AuthorizationNetworkEnumTest( + [Values(AuthorizationNetwork.Facebook, AuthorizationNetwork.GameCenter, AuthorizationNetwork.None)] AuthorizationNetwork network + ) + { + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.UserSignup(network)); + EvaluateAnalyticsResult(m_Result); + } + + [Test] + public void UserSignup_CustomDataTest() + { + var network = AuthorizationNetwork.Internal; + + Assert.DoesNotThrow(() => m_Result = AnalyticsEvent.UserSignup(network, m_CustomData)); + EvaluateCustomData(m_CustomData); + EvaluateAnalyticsResult(m_Result); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/UserSignupTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/UserSignupTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..3441ed8be97bb33198fb70e74df9854f9b2b9aae --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Editor/Unity.Analytics.StandardEvents/UserSignupTests.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8b0f0c8689876421c90e7b60f096325a +timeCreated: 1489734081 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Runtime.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Runtime.meta new file mode 100644 index 0000000000000000000000000000000000000000..a17b3d13221cf8caf1c516aab2a0161c2c951033 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4f5362359d4548b44a34a45f19efb4bf +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Runtime/DataPrivacy.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Runtime/DataPrivacy.meta new file mode 100644 index 0000000000000000000000000000000000000000..279b827c66d0dc2e65b430d5e5abc485e8a76798 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Runtime/DataPrivacy.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f2233ba26b028cc4b9e58681e7a22dac +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Runtime/DataPrivacy/JsonSerialization.cs b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Runtime/DataPrivacy/JsonSerialization.cs new file mode 100644 index 0000000000000000000000000000000000000000..921976a58735f7361b301ffbba568002cdce7260 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Runtime/DataPrivacy/JsonSerialization.cs @@ -0,0 +1,24 @@ +using System; +using NUnit.Framework; +using UnityEngine; +using UnityEngine.Analytics; + +public class JsonSerialization +{ + // This test was create to verifiy JsonUtility could properly deserialize the nested + // structs used for opt-out status. That process is now handled with remote config so + // now we just verify that the expected response from the token API can be deserialized. + + const string kTokenJson = "{" + + "\"url\": \"https://analytics.cloud.unity3d.com/optout?token=24a96770b5c4420a4f930dbb4b72fbb83erfg3edf3ert4r1/\"," + + "\"token\": \"24a96770b5c4420a4f930dbb4b72fbb83erfg3edf3ert4r1\"" + + "}"; + + [Test] + public void TestTokenStruct_JsonUtility() + { + var tokenData = JsonUtility.FromJson<DataPrivacy.TokenData>(kTokenJson); + Assert.AreEqual("https://analytics.cloud.unity3d.com/optout?token=24a96770b5c4420a4f930dbb4b72fbb83erfg3edf3ert4r1/", tokenData.url); + Assert.AreEqual("24a96770b5c4420a4f930dbb4b72fbb83erfg3edf3ert4r1", tokenData.token); + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Runtime/DataPrivacy/JsonSerialization.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Runtime/DataPrivacy/JsonSerialization.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..feafedcf09f23700907cea3521a6feb3519c6517 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Runtime/DataPrivacy/JsonSerialization.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0fe4c527c3aa3eb42912a1caafbbc6a0 +timeCreated: 1526476500 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Runtime/DataPrivacy/Unity.Analytics.DataPrivacy.Tests.asmdef b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Runtime/DataPrivacy/Unity.Analytics.DataPrivacy.Tests.asmdef new file mode 100644 index 0000000000000000000000000000000000000000..54d317a06341695f77e3eccf728ec701e6a464fa --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Runtime/DataPrivacy/Unity.Analytics.DataPrivacy.Tests.asmdef @@ -0,0 +1,12 @@ +{ + "name": "Unity.Analytics.DataPrivacy.Tests", + "references": [ + "Unity.Analytics.DataPrivacy" + ], + "optionalUnityReferences": [ + "TestAssemblies" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Runtime/DataPrivacy/Unity.Analytics.DataPrivacy.Tests.asmdef.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Runtime/DataPrivacy/Unity.Analytics.DataPrivacy.Tests.asmdef.meta new file mode 100644 index 0000000000000000000000000000000000000000..5d4c3c4faaa524b2c94af4b8c0db914daadc88da --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Tests/Runtime/DataPrivacy/Unity.Analytics.DataPrivacy.Tests.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 015812e983113a84b95773e55f3cec13 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Unity.Analytics.Editor.dll b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Unity.Analytics.Editor.dll new file mode 100644 index 0000000000000000000000000000000000000000..28c50822a181ac3df99135aa3d468519d565a2a8 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Unity.Analytics.Editor.dll differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Unity.Analytics.Editor.dll.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Unity.Analytics.Editor.dll.meta new file mode 100644 index 0000000000000000000000000000000000000000..6611ac13a710bf015078dde9f31092f4a5cc6197 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Unity.Analytics.Editor.dll.meta @@ -0,0 +1,102 @@ +fileFormatVersion: 2 +guid: 224ede67b4f3a4109bfec4d5cb161b05 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 1 + platformData: + - first: + '': Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux: 1 + Exclude Linux64: 1 + Exclude LinuxUniversal: 1 + Exclude OSXUniversal: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 1 + - first: + '': first + second: + enabled: 0 + settings: {} + - first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 + - first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Facebook: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Facebook: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Linux + second: + enabled: 0 + settings: + CPU: x86 + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: x86_64 + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + iPhone: iOS + second: + enabled: 0 + settings: + AddToEmbeddedBinaries: false + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Unity.Analytics.StandardEvents.dll b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Unity.Analytics.StandardEvents.dll new file mode 100644 index 0000000000000000000000000000000000000000..b8e7ea791e2a61daf289a0ba6ce50b93b10d0e47 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Unity.Analytics.StandardEvents.dll differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Unity.Analytics.StandardEvents.dll.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Unity.Analytics.StandardEvents.dll.meta new file mode 100644 index 0000000000000000000000000000000000000000..b4342b7f72f3488e83b7fef6a8d1dc5292db8fb5 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Unity.Analytics.StandardEvents.dll.meta @@ -0,0 +1,37 @@ +fileFormatVersion: 2 +guid: dce91326f102345f3ba2f0987c0679c2 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + '': Any + second: + enabled: 0 + settings: + Exclude N3DS: 1 + Exclude PS4: 1 + Exclude PSP2: 1 + Exclude Switch: 1 + Exclude WiiU: 1 + Exclude XboxOne: 1 + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Unity.Analytics.Tracker.dll b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Unity.Analytics.Tracker.dll new file mode 100644 index 0000000000000000000000000000000000000000..21975ccfe38402c56b348058424376873435bd29 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Unity.Analytics.Tracker.dll differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Unity.Analytics.Tracker.dll.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Unity.Analytics.Tracker.dll.meta new file mode 100644 index 0000000000000000000000000000000000000000..7f95e23e29373b9edc36d57578f50c1a11f77d3f --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/Unity.Analytics.Tracker.dll.meta @@ -0,0 +1,38 @@ +fileFormatVersion: 2 +guid: 220224b43fc464c28bc0e8de8f54a432 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + - first: + '': Any + second: + enabled: 0 + settings: + Exclude N3DS: 1 + Exclude PS4: 1 + Exclude PSP2: 1 + Exclude Switch: 1 + Exclude WiiU: 1 + Exclude XboxOne: 1 + - first: + Any: + second: + enabled: 1 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + userData: + assetBundleName: + assetBundleVariant: + diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/package.json b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/package.json new file mode 100644 index 0000000000000000000000000000000000000000..554d9af9bedc82a2343e1b4d3b9a0319e18a286a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/package.json @@ -0,0 +1,18 @@ +{ + "description": "The Unity Analytics Library contains the Analytics Event Tracker component, the Data Privacy plug-in, and the Standard Events API.", + "displayName": "Analytics Library", + "keywords": [ + "analytics", + "unity" + ], + "name": "com.unity.analytics", + "readme": "Unity Analytics", + "repoPackagePath": "build/install/com.unity.analytics", + "repository": { + "revision": "f6830e2decdab13b9a19d8bf39509a8f0a8d349e", + "type": "git", + "url": "git@gitlab.cds.internal.unity3d.com:upm-packages/analytics/com.unity.analytics.git" + }, + "unity": "2018.3", + "version": "3.2.2" +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/package.json.meta b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/package.json.meta new file mode 100644 index 0000000000000000000000000000000000000000..83b0f788b16a4ee394c43af79619ef13f954ea3c --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.analytics@3.2.2/package.json.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 510d1d319d2754ea4a47c6dd8c421ea0 +timeCreated: 1491258762 +licenseType: Pro +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/CHANGELOG.md b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..7dfff7caec221c71a6562077caef6c37b0625e23 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/CHANGELOG.md @@ -0,0 +1,28 @@ +# 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.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/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/CHANGELOG.md.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/CHANGELOG.md.meta new file mode 100644 index 0000000000000000000000000000000000000000..38274a690cb5171a178a6353cb0a59fee084a482 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/CHANGELOG.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 782c49e6e68074dc7ba12c95537825ce +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/DEPENDENCIES.md b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/DEPENDENCIES.md new file mode 100644 index 0000000000000000000000000000000000000000..57808d565e584ba0e3adaa28af19fbe28db8454b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/DEPENDENCIES.md @@ -0,0 +1,9 @@ +<?xml version="1.0"?> +<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd"> + <metadata> + <id>Unity.CollabProxy.Dependencies</id> + <version>1.1.0-experimental</version> + <authors>Rohit Garg</authors> + <description>Dependencies for the CollabProxy package</description> + </metadata> +</package> diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/DEPENDENCIES.md.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/DEPENDENCIES.md.meta new file mode 100644 index 0000000000000000000000000000000000000000..24e45c2f674eb5bcd25bad5eeceeb5e7d18acf4a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/DEPENDENCIES.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 470530e667ad4475786b28fa3187ce95 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Documentation~/collab-proxy.md b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Documentation~/collab-proxy.md new file mode 100644 index 0000000000000000000000000000000000000000..c1800d6a23d5b6c9f99515fb2fe57ca7e70eedb8 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Documentation~/collab-proxy.md @@ -0,0 +1,5 @@ +# 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/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor.meta new file mode 100644 index 0000000000000000000000000000000000000000..b54ca871fcbfac68e2febc0038bef398085e3ffa --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d31e5d760880a4e52a3a75322481d0d2 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/AssemblyInfo.cs b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/AssemblyInfo.cs new file mode 100644 index 0000000000000000000000000000000000000000..d7266b636a3ddc7e53f93e98a83bcba5765b564c --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/AssemblyInfo.cs @@ -0,0 +1,4 @@ +using System.Runtime.CompilerServices; +using UnityEngine; + +[assembly: InternalsVisibleTo("Unity.CollabProxy.EditorTests")] diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/AssemblyInfo.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/AssemblyInfo.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..e384b31861e079aef3b4b3d7fb22d6013daeb862 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/AssemblyInfo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d4ef26aa386b44923b61c9c4b505a67c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab.meta new file mode 100644 index 0000000000000000000000000000000000000000..694fc4ea1b077e9f25c67f9946801d5451b5cc19 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c18cb9388313e4287ad5895ee735c47d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Bootstrap.cs b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Bootstrap.cs new file mode 100644 index 0000000000000000000000000000000000000000..029ce1c76371f042e526be20ac565ea34a4bfac4 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Bootstrap.cs @@ -0,0 +1,24 @@ +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/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Bootstrap.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Bootstrap.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..641d54b788861b6794ca333dcb89423122589177 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Bootstrap.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8aa8171e088f94069bbd1978a053f7dd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabAnalytics.cs b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabAnalytics.cs new file mode 100644 index 0000000000000000000000000000000000000000..c7f90aa14b0c28201575ea0c3801b92ca1306b76 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabAnalytics.cs @@ -0,0 +1,21 @@ +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/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabAnalytics.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabAnalytics.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..2f46e9bcde065443eb74ec81cdcc10b9709f3e69 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabAnalytics.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f944311c8fff2479fa3ba741f6039fc8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabHistoryWindow.cs b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabHistoryWindow.cs new file mode 100644 index 0000000000000000000000000000000000000000..b855bce3e96e7bb738c5c335c4ad53dc2a04cdca --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabHistoryWindow.cs @@ -0,0 +1,330 @@ +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<CollabHistoryWindow>(kWindowTitle); + } + + [MenuItem("Window/Asset Management/Collab History", true)] + public static bool ValidateShowHistoryWindow() + { + return Collab.instance.IsCollabEnabledForCurrentProject(); + } + + CollabHistoryPresenter m_Presenter; + Dictionary<HistoryState, VisualElement> m_Views; + List<CollabHistoryItem> m_HistoryItems = new List<CollabHistoryItem>(); + 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, VisualElement>() + { + {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<RevisionData> datas, string tip, int totalRevisions, int currentPage) + { + var elements = new List<VisualElement>(); + 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/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabHistoryWindow.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabHistoryWindow.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..74358d4067f1956806fb29d975596c3426debfff --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabHistoryWindow.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fed9dda667cab45d398d06402bba03f4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarButton.cs b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarButton.cs new file mode 100644 index 0000000000000000000000000000000000000000..eebe4aca553232cca0737f48e099d2097dcff045 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarButton.cs @@ -0,0 +1,297 @@ +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<CollabToolbarContent, GUIContent> m_CollabIcons; + + public CollabToolbarState RegisteredForState + { + get { return m_state; } + } + + public GUIContent GuiContent + { + get + { + if (m_CollabIcons == null) + { + m_CollabIcons = new Dictionary<CollabToolbarContent, GUIContent>(); + } + + 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/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarButton.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarButton.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..949d8db94900880052f8ef8ff6f2fbce6faa46eb --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarButton.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 882f1a4147a284f028899b9c018e63eb +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarWindow.cs b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarWindow.cs new file mode 100644 index 0000000000000000000000000000000000000000..279387502b172d22f97855ba09ddeaaea8340163 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarWindow.cs @@ -0,0 +1,137 @@ +using UnityEngine; +using UnityEditor.Collaboration; +using UnityEditor.Web; +using UnityEditor.Connect; + +namespace UnityEditor +{ + [InitializeOnLoad] + internal class WebViewStatic : ScriptableSingleton<WebViewStatic> + { + [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<CollabToolbarWindow>()) + 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<CollabToolbarWindow>(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<CollabToolbarWindow>() 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/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarWindow.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarWindow.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..b08bf2aad726842cb2cd0b4246e4fba031d902dd --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/CollabToolbarWindow.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6f516f1ec21a54a59a92bf99db2d9535 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Presenters.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Presenters.meta new file mode 100644 index 0000000000000000000000000000000000000000..91331532fd2a7c37783b7c7cdb68b9e7d0fcd0ac --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Presenters.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d437fe60bb34f45728664a5d930c1635 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Presenters/CollabHistoryPresenter.cs b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Presenters/CollabHistoryPresenter.cs new file mode 100644 index 0000000000000000000000000000000000000000..91d500be7bf37702afdfe2195ca834e4549cc8bc --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Presenters/CollabHistoryPresenter.cs @@ -0,0 +1,228 @@ +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<RevisionData> 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/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Presenters/CollabHistoryPresenter.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Presenters/CollabHistoryPresenter.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..9c37ecd8326c303bc2cc7840d3caf261a88e8b3e --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Presenters/CollabHistoryPresenter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a7c91a123806d41a0873fcdcb629b1c4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views.meta new file mode 100644 index 0000000000000000000000000000000000000000..f62ac6be15f32b70769d2c762f12f94ee62ba434 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fd0a39b4d296d4d509b4f1dbd08d0630 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/BuildStatusButton.cs b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/BuildStatusButton.cs new file mode 100644 index 0000000000000000000000000000000000000000..ac3754d2b766b89f4c0538752d9dab6ae807ec67 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/BuildStatusButton.cs @@ -0,0 +1,53 @@ +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/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/BuildStatusButton.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/BuildStatusButton.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..d74a58aff8353d675950f8449d01113aa5ab8afa --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/BuildStatusButton.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0217a80286f79419daa202f69409f19b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryDropDown.cs b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryDropDown.cs new file mode 100644 index 0000000000000000000000000000000000000000..e3bb05a68588af022c0354557f7e385659790ab2 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryDropDown.cs @@ -0,0 +1,78 @@ +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<ChangeData> 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/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryDropDown.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryDropDown.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..513b66bf651515d17bddabd3cfa9588b629f7400 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryDropDown.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a483595b0257945278dc75c5ff7d82ee +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryDropDownItem.cs b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryDropDownItem.cs new file mode 100644 index 0000000000000000000000000000000000000000..3ad43f23ae92a55f4f4e9cba477d58f78212853f --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryDropDownItem.cs @@ -0,0 +1,53 @@ +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/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryDropDownItem.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryDropDownItem.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..10bf40eb45e8aeea9b4225db6a48855779d0b8b3 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryDropDownItem.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d912d4873af534bd4a9d44bf1b52f14e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryItem.cs b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryItem.cs new file mode 100644 index 0000000000000000000000000000000000000000..24e5d1ddf7db83f6f176184488972f85189e1aa9 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryItem.cs @@ -0,0 +1,229 @@ +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/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryItem.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryItem.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..290bd28e5d5ba089d38d94a30700335e23629ed9 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryItem.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c4c1445ee948a4124bfa9fb818a17e36 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryItemFactory.cs b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryItemFactory.cs new file mode 100644 index 0000000000000000000000000000000000000000..e7d7aa6cd268dbcda6eed06b4b1c7d37119fd933 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryItemFactory.cs @@ -0,0 +1,121 @@ +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<RevisionData> GenerateElements(IEnumerable<Revision> 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<string, ChangeData>(); + 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/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryItemFactory.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryItemFactory.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..3250d9664f4bf84c09d8495239eed9fec4dc76c0 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryItemFactory.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fc46f91ea1e8e4ca2ab693fef9156dbe +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryRevisionLine.cs b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryRevisionLine.cs new file mode 100644 index 0000000000000000000000000000000000000000..2b8fe65209b2ff1cb49f63cc982c5dc144e9bed4 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryRevisionLine.cs @@ -0,0 +1,94 @@ +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/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryRevisionLine.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryRevisionLine.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..2659a3c369eda325434d4f63f8615cda3fa05a9f --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/CollabHistoryRevisionLine.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3c737f7a9d78541d1ab25f28f045dd32 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/HistoryProgressSpinner.cs b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/HistoryProgressSpinner.cs new file mode 100644 index 0000000000000000000000000000000000000000..fad3b824866567682726459685401ed91bb751fd --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/HistoryProgressSpinner.cs @@ -0,0 +1,69 @@ +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/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/HistoryProgressSpinner.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/HistoryProgressSpinner.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..0ded4e8a0ffca141b02d923fef37b0c738f08d48 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/HistoryProgressSpinner.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cf6aca931950a4a6a886e214e9e649c4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/ICollabHistoryItemFactory.cs b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/ICollabHistoryItemFactory.cs new file mode 100644 index 0000000000000000000000000000000000000000..03239a33ee61fc860433a2c75609c8a1d7f09485 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/ICollabHistoryItemFactory.cs @@ -0,0 +1,17 @@ +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<RevisionData> GenerateElements(IEnumerable<Revision> revsRevisions, int mTotalRevisions, int startIndex, string tipRev, string inProgressRevision, bool revisionActionsEnabled, bool buildServiceEnabled, string currentUser); + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/ICollabHistoryItemFactory.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/ICollabHistoryItemFactory.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..08e908561c0206d5b8abb7eab0b982e76415c41a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/ICollabHistoryItemFactory.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 821f5482c5a3f4389885f4432433f56f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/PagedListView.cs b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/PagedListView.cs new file mode 100644 index 0000000000000000000000000000000000000000..472a70e741abd1016f18a026e2f02ee5a6aa38e7 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/PagedListView.cs @@ -0,0 +1,192 @@ +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<VisualElement> m_Items; + int m_TotalItems; + int m_CurPage; + + public int pageSize + { + set { m_PageSize = value; } + } + + public IEnumerable<VisualElement> 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<VisualElement>(); + + 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/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/PagedListView.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/PagedListView.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..565f7a2e9f65af1e7f615322f1c34efe6f1d8848 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/PagedListView.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 50de529b6a28f4a7093045e08810a5df +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/StatusView.cs b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/StatusView.cs new file mode 100644 index 0000000000000000000000000000000000000000..9b50e7a53d19f2b7064b67a8cc700e8c160812a3 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/StatusView.cs @@ -0,0 +1,88 @@ +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/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/StatusView.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/StatusView.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..bb634b1937607759931958d185a2951f07684f33 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Collab/Views/StatusView.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 08e9894bdf0834710b22d3c0aa245ac0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources.meta new file mode 100644 index 0000000000000000000000000000000000000000..01229c29e42c3c1b447dc2799a00d1d115d04381 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a6ab6fd2b91214e8a9c8ec2224a528de +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles.meta new file mode 100644 index 0000000000000000000000000000000000000000..0ff038244ab5d3b7e2ea7450b194ae66792060d6 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6b1ae1e78552c459d9ce27048ff51c7f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryCommon.uss b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryCommon.uss new file mode 100644 index 0000000000000000000000000000000000000000..3968493332ae8b52fd698aded0ec8b1ae27badb5 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryCommon.uss @@ -0,0 +1,259 @@ +.unity-button { + min-height:unset; + -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:6 px; + padding-top:2 px; + padding-right:6 px; + padding-bottom:3 px; +} + +.unity-label { + overflow: hidden; + margin-left:4px; + margin-top:2px; + margin-right:4px; + margin-bottom:2px; + padding-left:2 px; + padding-top:1 px; + min-height: unset; +} + +#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: 2; +} + +#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: 24; + 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:unset; + padding-top:unset; + padding-right:unset; + padding-bottom:unset; +} + +BuildStatusButton.unity-button .unity-label { + padding-left: 2px; +} + diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryCommon.uss.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryCommon.uss.meta new file mode 100644 index 0000000000000000000000000000000000000000..035b66217eb13b772f8a4ebe2737ec7b2517034a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryCommon.uss.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 3a2d94c8977984b67984caeff9fa666e +ScriptedImporter: + fileIDToRecycleName: + 11400000: stylesheet + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryDark.uss b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryDark.uss new file mode 100644 index 0000000000000000000000000000000000000000..de436f89f4c7fbe82fe7444feedb2cd1d8854772 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryDark.uss @@ -0,0 +1,86 @@ +#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/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryDark.uss.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryDark.uss.meta new file mode 100644 index 0000000000000000000000000000000000000000..35a7d097a875a4211e3aa21ad434d7ae935f56b4 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryDark.uss.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 70d4d75a2877243758b0750cbc75b6eb +ScriptedImporter: + fileIDToRecycleName: + 11400000: stylesheet + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryLight.uss b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryLight.uss new file mode 100644 index 0000000000000000000000000000000000000000..3f9b85f309a177385c1d0fa2fabd1adfd35e9ab8 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryLight.uss @@ -0,0 +1,86 @@ +#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/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryLight.uss.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryLight.uss.meta new file mode 100644 index 0000000000000000000000000000000000000000..28c860e53ddfac7fe81fa38ee4e6b0353c082f08 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Resources/Styles/CollabHistoryLight.uss.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b52bde26a83564960bcb90217f72b910 +ScriptedImporter: + fileIDToRecycleName: + 11400000: stylesheet + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Unity.CollabProxy.Editor.asmdef b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Unity.CollabProxy.Editor.asmdef new file mode 100644 index 0000000000000000000000000000000000000000..66511e1dbaddfafa73801c268f75573a9305ccd5 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Unity.CollabProxy.Editor.asmdef @@ -0,0 +1,7 @@ +{ + "name": "Unity.CollabProxy.Editor", + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [] +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Unity.CollabProxy.Editor.asmdef.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Unity.CollabProxy.Editor.asmdef.meta new file mode 100644 index 0000000000000000000000000000000000000000..03ebeca0dd1d353feda7e8c046f3a18f452243e1 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Editor/Unity.CollabProxy.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 645165c8169474bfbbeb8fb0bcfd26f5 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/LICENSE.md b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..31bde4e47efb13591068afa2c5733ad48ca6f3af --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/LICENSE.md @@ -0,0 +1,31 @@ +**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/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/LICENSE.md.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/LICENSE.md.meta new file mode 100644 index 0000000000000000000000000000000000000000..30f5c3a68ed000e3df56559ba7261bc4dfcaa450 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/LICENSE.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c754112a02f354a6696fa4f2b99e95a5 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/README.md b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/README.md new file mode 100644 index 0000000000000000000000000000000000000000..5cfbd88aca55090dbfa2962883f7445610f7d108 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/README.md @@ -0,0 +1,16 @@ +# 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/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/README.md.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/README.md.meta new file mode 100644 index 0000000000000000000000000000000000000000..b3ad9937271a12f09d89db2f41b8d3afcab1eda0 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/README.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ac281230df7b14becb40b3c479f1b429 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests.meta new file mode 100644 index 0000000000000000000000000000000000000000..f43ddd351e8950ed68460f3bacd2906b12024c71 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1369382d2c5e64dc5b2ec0b6b0a94531 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor.meta new file mode 100644 index 0000000000000000000000000000000000000000..b80cefdb3ccc8bbc50b104c3aa7fa60b437944f3 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4506ac79f5b274cb1b249ed7f4abfb9a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor/HistoryTests.cs b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor/HistoryTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..ba79a2049eef5389f959a91eb27ceeb7f2b7fa05 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor/HistoryTests.cs @@ -0,0 +1,583 @@ +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<Revision>() + { + 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<Revision>() + { + 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<Revision>() + { + 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<Revision>() + { + 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<Revision>() + { + 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<Revision>() + { + 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<Revision>() + { + 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<Revision>() + { + 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<Revision>() + { + 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<Revision>() + { + 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<Revision>() + { + 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<Revision>() + { + 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<Revision>() + { + 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<Revision>() + { + 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<Revision>() + { + 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<Revision>() + { + 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<Revision>() + { + 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<Revision>() + { + 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<Revision>() + { + 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<Revision>() + { + 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<Revision>() + { + 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<Revision>() + { + 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<Revision>() + { + 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<RevisionData> 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<RevisionData> items, string tip, int totalRevisions, int currPage) + { + this.items = items; + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor/HistoryTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor/HistoryTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..d648a7ff5a5774f0428df6f2865786168b75eb21 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor/HistoryTests.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 23a56a19774ed42b6b65646af08a003c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor/Unity.CollabProxy.EditorTests.asmdef b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor/Unity.CollabProxy.EditorTests.asmdef new file mode 100644 index 0000000000000000000000000000000000000000..3467a9ed66cbd7a5668d7aafd601705c7bd7f985 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor/Unity.CollabProxy.EditorTests.asmdef @@ -0,0 +1,13 @@ +{ + "name": "Unity.CollabProxy.EditorTests", + "references": [ + "Unity.CollabProxy.Editor" + ], + "optionalUnityReferences": [ + "TestAssemblies" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [] +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor/Unity.CollabProxy.EditorTests.asmdef.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor/Unity.CollabProxy.EditorTests.asmdef.meta new file mode 100644 index 0000000000000000000000000000000000000000..57db5c7d8ec7d6acb5394ee7e997dca644b7800d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/Tests/Editor/Unity.CollabProxy.EditorTests.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 782de34c17796430ba8d0ceddb60944e +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/package.json b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/package.json new file mode 100644 index 0000000000000000000000000000000000000000..473c78213738b4103e5f5bb65ea6e0defb83d9e7 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/package.json @@ -0,0 +1,21 @@ +{ + "name": "com.unity.collab-proxy", + "displayName": "Unity Collaborate", + "version": "1.2.15", + "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": "95a78b0bc11f99338fc2bd037a817aa69d199b56" + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/package.json.meta b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/package.json.meta new file mode 100644 index 0000000000000000000000000000000000000000..c52d0c603d9fad0b0cc95e8f0ff0380e82e24cb4 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.collab-proxy@1.2.15/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 57b0c806ba25b48aa8a6ecb3345a4a9b +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/CHANGELOG.md b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..fcb248a74fa8210c4fef3844d8cec4bc9f6a7da8 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/CHANGELOG.md @@ -0,0 +1,140 @@ +# 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). + +## [2.0.8] - 2019-09-17 +- Open offline documentations when online documentations are not accessible. + +## [2.0.7] - 2019-03-06 +- Fix version parse for .NET 3.5 + +## [2.0.4] - 2018-12-02 +- Fix version conversion to support different CultureInfos + +## [2.0.3] - 2018-10-10 +- When a preview package is installed, keep showing updates even if "Show Preview Packages" is not checked +- When user as not already choose to show or hide Preview Packages: + - If a preview package is already installed, "Show Preview Packages" is checked + - If no preview packages are installed, "Show Preview Packages" is not checked + +## [2.0.2] - 2018-10-04 +- Documentation Update +- Update dialog title to "Unity Package Manager" + +## [2.0.1] - 2018-09-14 +- Move undesired public classes to internal +- Minor fix to the documentation + +## [2.0.0] - 2018-09-10 +- Always mark a package as up to date when it's not installed +- Add "Advanced" menu +- Hide preview packages by default +- Labelled packages with major version '0' as preview +- Fixed cropped error message +- Disabled downgrading Package Manager UI to incompatible versions +- Updated docs to reflect the new UI +- Fix incorrect verified tag on preview packages +- UI Fixes: + - Change mouse cursor when hovering over links + - Tweak UI layout for better alignment +- Fixed dropdown to work with 2018.3 editor +- Updated style to reflect changes in VisualElements +- Added packages serialization to avoid unnecessary refreshes +- Enable "View Documentation" Button on built-in packages, and make it point to the url contained in the description string +- Added persistent error icon when there are package add or remove errors +- Filter by name, category, version and release tag +- Show All Package by default +- MenuDropdown for All packages/In project/Built-in +- UI redesign +- Remove sentence "This package is installed for..." and all other sentence regarding status of the package +- Hide buttons for embedded, git and local packages +- Display "No results for "" + +## [1.9.9] - 2018-05-09 +- Only show user visible versions in the UI + +## [1.9.8] - 2018-05-01 +- Fixed package to work with 2018.3 +- Deprecated 2018.1 because of its inability to update without error + +## [1.9.6] - 2018-04-10 +- Added ability to choose a package version +- Added loading indicator when retrieving package lists + +## [1.9.5] - 2018-03-28 +- Optimize packages list loading +- Fixes for UXML factories changes in Unity +- UI Fixes: + - "View changes" update position and label should say "View Changelog" + - Packages list should not have padding + - preview and verified tags should be lower case everywhere + - the package displayed name should stay on 1 line + +## [1.9.3] - 2018-03-11 +- Added caching for faster UI response time +- Exposed APIs for the Package Manager UI extension mechanism + +## [1.8.2] - 2018-03-02 +- Modified Tags to reflect new package workflow (Preview -> Released(no tag) -> Verified) + +## [1.8.1] - 2018-02-23 +- Removed Recommended tag if package version is alpha, beta or experimental + +## [1.8.0] - 2018-02-16 +- Removed support built-in packages +- Fixed packages sorting in All tab +- Fixed error reporting with an invalid manifest + +## [1.7.2] - 2018-02-08 +- Fixed errors when an exception is thrown during an operation +- Changed to only show "View Changes" when there is an update button +- Fixed typos in dialog when updating package manager ui + +## [1.7.0] - 2018-02-05 +- Added 'View Documentation' link to package details +- Added 'View changes' link to package details + +## [1.6.1] - 2018-01-30 +### Fixes +- When updating from 1.5.1, ask user to confirm close of window prior to update +- Made window dockable +- Reworked UI styles +- Enhanced keyboard navigation + +## [1.5.1] - 2018-01-18 +### Fixes +- Replaced VisualContainer by VisualElement in code and templates +- Moved "Project->Packages->Manage" menu item to "Window->Package Manager" +- Showed the latest version and description in tab "Install" instead of the current version +- Added "Recommended" tag properly +- Added "Go back to" when latest version is less than current one +- Removed "Update to" when current version is greater than latest one. (case for embedded or local packages) +- Replaced packages action button label: + - "Install" instead of "Add" for packages + - "Enable/Disable" instead of "Add/Remove" for built-in packages +- Added "alpha", "beta", "experimental" and "recommended" tags support +- Added loading progress while opening window +- Added package description and display name update +- Added extra messaging on package state +- Performed Documentation update + +## [1.3.0] - 2017-12-12 +### Changes +- Added assembly definition files +- Forced SemVer to use .NetStandard +- Fixed ValidationSuiteTests tests +- Handled compatible versions returned in PackageInfo + +## [1.2.0] - 2017-11-16 +### Fixes +- Fixed flickering test When_Default_FirstPackageUIElement_HasSelectedClass, use package only +- Fixed documentation +- Added Doxygen configuration file +- Removed unused fields in package.json +- Changed 'Modules' for 'Built In Packages' +- Removed version display for Built In Packages + +## [1.0.0] - 2017-11-10 +### This is the first release of *Unity Package Manager UI*. diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/CHANGELOG.md.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/CHANGELOG.md.meta new file mode 100644 index 0000000000000000000000000000000000000000..abc6762f893022dd9e80ce9b11b593f5c18960d4 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/CHANGELOG.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6277a751c6c9f46359fc7004b3ee12f0 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-DetailsPane.png b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-DetailsPane.png new file mode 100644 index 0000000000000000000000000000000000000000..e1c8fc9e61fb0414701d605795d58410e07d5972 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-DetailsPane.png differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-DocSite.png b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-DocSite.png new file mode 100644 index 0000000000000000000000000000000000000000..25b4fb94ee4dc8cd01c2b18cabdfebd17f8d7e8a Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-DocSite.png differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-ExternalPackageButton.png b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-ExternalPackageButton.png new file mode 100644 index 0000000000000000000000000000000000000000..df69fdf75ea0f5422f9adb221cfba8613546adb8 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-ExternalPackageButton.png differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-Main.png b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-Main.png new file mode 100644 index 0000000000000000000000000000000000000000..c9e1803a701d232338a9b461af904323486244f4 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-Main.png differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-SearchResults.png b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-SearchResults.png new file mode 100644 index 0000000000000000000000000000000000000000..ad43b6b08fa6c19c16c58a168d137f8665f3e259 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-SearchResults.png differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-StatusBar_Network.png b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-StatusBar_Network.png new file mode 100644 index 0000000000000000000000000000000000000000..e276b57cca27f39dc589f241c6db789d5da1fe6e Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-StatusBar_Network.png differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-StatusBar_Update.png b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-StatusBar_Update.png new file mode 100644 index 0000000000000000000000000000000000000000..62757a818e251aa17babb230e5f0227134d223e8 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-StatusBar_Update.png differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-checkmark.png b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-checkmark.png new file mode 100644 index 0000000000000000000000000000000000000000..05dbce91ec4d755a882632f4d44a2d31e5baf79d Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-checkmark.png differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-downloadicon.png b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-downloadicon.png new file mode 100644 index 0000000000000000000000000000000000000000..4393f6740bf063cfcca0d5aaf1f98cce3af814bc Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-downloadicon.png differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-errorflag.png b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-errorflag.png new file mode 100644 index 0000000000000000000000000000000000000000..a7fa0ef745bd9713e0d192af76c2ca721b980f0e Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/Images/PackageManagerUI-errorflag.png differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/package-manager-ui.md b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/package-manager-ui.md new file mode 100644 index 0000000000000000000000000000000000000000..3c969cb1cd05dbf4fb9fb75d6c4a12c13c5ea023 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Documentation~/package-manager-ui.md @@ -0,0 +1,372 @@ +# Unity Package Manager + +A package is a container that holds any combination of Assets, Shaders, Textures, plug-ins, icons, and scripts that enhance various parts of your Project, including Unity modules (such as Physics or Animation). Unity packages are newer, more tightly integrated versions of Asset Store packages, able to deliver a wide range of enhancements to Unity. + +Use the Unity Package Manager (in Unity’s top menu: __Window__ > __Package Manager__) to view which packages are available for installation or already installed in your Project. In addition, you can use this window to see [which versions are available](#VersionList), and [install](#PackManInstall), [remove](#PackManRemove), [disable](#PackManDisable), or [update](#PackManUpdate) packages for each Project. + + + +The Packages window displays: + +- (A) The [package scope drop-down menu](#scope), which allows you to filter which packages appear in the list. +- (B) The [Advanced button](#advanced), which allows you to display preview packages in addition to packages that have been verified to work with Unity. +- (C) The [search box](#searchText), which allows you to look for packages by name. +- (D) The [packages list view](#PackManLists), which displays all packages that match the filter and search parameters you specify. +- (E) The [package-specific detail view](#PackManDetails), which displays information specific to the package selected in the list. +- (F) The [status bar](#statusbar), which displays messages about the package load status and warnings about the network. +- (G) The [Add package from disk button](#extpkg), which allows you to specify the location of an external package. + +<a name="PackManLists"></a> +## Finding packages + +The Packages window displays the following types of Unity packages: + +- **Read-only packages** + + These are packages which the Package Manager downloads from the [Unity package registry](#PackManRegistry) as needed. They are not bundled with the Project source and may have dependencies on other packages in external Projects. This type is typical of most Unity packages. + +- **Local packages** + + These are packages that you saved on your computer in an [external](#extpkg) location outside of your current Unity Project. + +- **Built-in packages** + + These represent some of the core Unity features. You can use these packages to [turn Unity modules on and off](#PackManDisable). + +**Note**: You can find out more about what each module implements in the [Unity Scripting API](https://docs.unity3d.com/ScriptReference/). Each module assembly page lists which APIs the built-in package implements. + +By default, the Packages window displays the list of all packages either registered in the [package registry](#PackManRegistry) or installed [locally](#extpkg). + +The following icons show you package status: + + A check mark indicates that the package is already [installed](#PackManInstall) or [enabled](#PackManDisable). + + The download icon indicates that the installed packages has [an available update](#PackManUpdate). + + An error icon indicates that something went wrong during installation or loading. For more advice on resolving errors, see [Error messages](#troubleshooting) below. + +You can [filter](#scope) the list to display only packages installed in your Project (including [local](#extpkg) packages), or display only built-in Unity packages. You can also [search](#searchText) for a specific package by package name, tag, or package version number. + +<a name="scope"></a> +### Filtering the list + +To change which packages appear in the list, select the scope you want from the drop-down menu in the left hand corner of the Packages window. + +You can select from these options: + +- The **All packages** scope (the default) displays all packages on the [package registry](#PackManRegistry), regardless of whether they are already installed in your Project. This also includes [local](#extpkg) packages (which are always installed). +- The **In Project** scope displays all packages currently installed in your Project, including [local](#extpkg) packages. +- The **Built-in packages** scope displays only built-in Unity packages. + +When you select a new scope, your choice appears on the package scope drop-down menu and the list displays the packages matching your choice. + +**Note:** If you entered any text in the [search box](#searchText), the list only displays packages which match both the scope and the search criteria. + +<a name="advanced"></a> +### Advanced button + +The **Advanced** button opens a drop-down menu that allows you to show preview packages. Preview package are not verified to work with Unity and might be unstable. They are not not supported in production environments. + +To show the preview packages that are available, click the **Advanced** button, then click the **Show preview packages** menu item. + +<a name="searchText"></a> +### Searching for packages + +You can use the search box at the top of the Packages window to find any packages that match the text you enter. The Package Manager updates the package list as you enter text, displaying every package within the current scope that matches. For example, if you enter `web` in the search box, the list displays different results depending on whether you chose the **Built-in packages** scope or the **All packages** scope: + + + +You can look for a package by its [package name](#PackManManifestsPackage), its [tag name](#version_tags), or its [package version number](#VersionList). The Package Manager analyzes the text that you enter to detect which method you are using and updates the list of packages dynamically. + +**Package name** + +You can search for either the display name as it appears in the Packages window, or the registered package name that begins with `com.unity`. + +Your search text could match the beginning, middle, or end of the package's name. + +**Tag name** + +To search by tag name, enter one of the package version tags. For example, if you enter `verified` in the search box, only packages with a verified tag appear, regardless of their package name. + +**Version number** + +Enter the [version number](#VersionList) in version order (`MAJOR.MINOR.PATCH`). For example, typing `1` returns all packages with versions matching `1.x.x` (for example, `1.0.0`, `1.3.2`, and `1.10.1` all match but not `0.1.0` ). + +<a name="statusbar"></a> +### Status bar + +The Package Manager displays messages in the status bar at the bottom left of the Packages window. + +There are typically three status messages that you might see. The **Loading packages** message appears briefly the first time you open Packman UI in a new Project. However, if the Package Manager [detects a problem](#troubleshooting), such as a missing network connection, the Package Manager displays a warning in the status bar: + + + +You will also often see a message informing you when the last update occurred: + + + +<a name="PackManDetails"></a> +## Viewing package details + +The pane on the right side of the Packages window displays details about the selected package. + + + +These details include the following information: + - (A) The display name + - (B) The [version number](#VersionList) (and [tag](#version_tags), if available) + - \(C\) The [links](#links) to open the package documentation page, the package change log (if available), and the license information. + - (D) The official package name from the [registry](#PackManRegistry) starting with `com.unity.` + - (E) The author + - (F) A brief description + - (G) Buttons to [install](#PackManInstall) or [update](#PackManUpdate) a package (or the **Up to date** message if the selected version is already installed) + - (H) The package version drop-down menu + - (I) Buttons to [remove](#PackManRemove) or [disable](#PackManDisable) the package + +<a name="VersionList"></a> +### List of versions + +You can view the list of versions available for the current package by clicking the version drop-down menu beside the **Update to** or **Install** button in the upper right of the Package specific detail view. + +- (A) The main menu displays the current version, the latest version (even if it is a preview), and the verified version. +- (B) The submenu displays all available versions. + +You can select any of these versions for the current package and install that specific version using the **Install** or **Update to** button. + +<a name="version_tags"></a> +### Version tags + +Some packages display tags next to the version number. These tags convey information about that version of the package. + +The Package Manager uses the following values: + +| **Tag** | **Meaning** | +|--|--| +| `Verified` | This package has been verified by Unity's Quality Assurance team to work with a specific version of the Editor. | +| `Preview` | This package is at an early stage of the release cycle and may not have been documented and fully validated by either the development team or Unity's Quality Assurance team. | +| `Local` | This package is located on your local disk but is external to your Unity Project folder. | +| *(no tag)* | This package is considered production quality, which means it is fully validated, documented, supported, and incrementally updated. | + + +<a name="links"></a> +### Finding more information + +You can find out more about a package by viewing its documentation, changelog, or license information. + +To access any of these pages, click the **View documentation**, **View changelog**, or **View licences** links. + +The package page opens in your default browser. + + + +To switch back and forth between the *Manual* documentation, the *Scripting API* documentation, the *Changelog*, and the *License* information for this package, click the corresponding link at the top of the page. + +<a name="PackManOpen"></a> +## Installing, removing, disabling, and updating packages +You can perform a variety of tasks through the Packages window: + + - [Install a new package](#PackManInstall) + - [Remove an installed package](#PackManRemove) + - [Disable a built-in package](#PackManDisable) + - [Update an installed package](#PackManUpdate) + - [Specify an external package location](#extpkg) + +### Accessing the Packages window + +To open the Packages window, navigate to Unity's main menu and go to **Window** > **Package Manager**. + +<a name="PackManInstall"></a> +### Installing a new package + +To install a new package: + +1. Open the Packages window and select **All packages** from the [package scope](#scope) drop-down menu. +2. Select the package you want to install from the [list of packages](#PackManLists). The package information appears in the [details pane](#PackManDetails). +3. Select the version you want from the [version drop-down menu](#VersionList). +4. Click the **Install** button. When the progress bar finishes, the new package is ready to use. + +<a name="PackManRemove"></a> +### Removing an installed package + +You can only remove packages which are not required by another package. + +When you remove a package, any Editor or run-time functionality which it implemented is no longer available. + +To remove an installed package: + +1. Open the Packages window and select **In Project** (or **All packages**) from the [package scope](#scope) drop-down menu. +2. Select the package you want to remove from the [list of packages](#PackManLists). The package information appears in the [details pane](#PackManDetails). +3. Click the **Remove** button. When the progress bar finishes, the package disappears from the list. + +You can restore a removed package from the list when you are in the **All packages** scope. + +<a name="PackManDisable"></a> +### Disabling a built-in package + +You can disable a built-in package if you don't need some modules and you want to save resources. However, when you disable a built-in package, the corresponding Unity functionality is no longer available. This results in the following: + +- If you use a Scripting API implemented by a disabled package, you get compiler errors. +- Components implemented by the disabled built-in package are also disabled, which means you cannot add them to any GameObjects. If you have a GameObject that already has one of these components, Unity ignores them in Play mode. You can see them in the Inspector window but they are greyed out to indicate that they are not available. +- When building a game, Unity strips all disabled components. For build targets which support engine code stripping (like WebGL, iOS, and Android), Unity doesn't add any code from a disabled built-in package. + +To disable a built-in package: + 1. Open the Packages window and select **Built-in packages** from the [package scope](#scope) drop-down menu. + 2. Select the package you want to remove from the [list of packages](#PackManLists). Its information appears in the Details pane. + 3. Click the **Disable** button. When the progress bar finishes, the check mark no longer appears next to the built-in package and the **Disable** button becomes an **Enable** button. + +To re-enable a disabled built-in package, click the **Enable** button. + +<a name="PackManUpdate"></a> +### Updating an installed package + +You can update a package while in either the **In Project** or **All** mode: + +1. Open the Packages window. An arrow indicator appears next to any packages that have updates available. +2. Select the package you want to update from the [list of packages](#PackManLists). The package information appears in the [details pane](#PackManDetails). +3. Select the version you want from the [version drop-down menu](#VersionList). +4. Click the **Update to** button. + +When the progress bar finishes, the new package version information appears in the Details pane, and any new functionality is immediately available. + +<a name="extpkg"></a> +### Specifying a local package location + +The Package Manager can load a package from anywhere on your computer even if you saved it outside your Unity Project folder. For example, if you have a package called `com.unity.my-local-package` and you save it on the `Desktop` but your Unity Project is under the `Documents` folder. + +To load a package from your local disk: + +1. Click the plus (`+`) icon in the status bar. + + The **Add package from disk** button appears. + +  + +2. Click the **Add package from disk** button to bring up a file browser. +3. Navigate to the folder root of your local package. +4. Double-click the `package.json` file in the file browser. + + The file browser closes and the package now appears in the [package list](#PackManLists) with the `local` tag. + +<a name="troubleshooting"></a> +## Error messages + +The Package Manager displays error indicators when it encounters problems: + +- **System-wide issues** + + Error messages that appear in the [status bar](#statusbar) indicate the Package Manager has detected an issue that is not related to a specific package. For example, if the Package Manager cannot access the [package registry server](#PackManRegistry), it displays this message in the status bar: + +  + + If your network cannot reach the package registry server, it is probably because there is a connection problem with the network. When you or your system administrator fix the network error, the status bar clears. + +- **Package-specific issues** + + If a specific package has a problem when loading or installing, the error icon () appears in the [package list](#PackManLists) next to the compromised package. To find out what the problem is, open the compromised package's [details pane](#PackManDetails). + +## Understanding how packages work + +In addition to its contents (Assets, Shaders, Textures, plug-ins, icons, and scripts), a Unity package contains a [package manifest file](#PackManManifestsPackage). The package manifest tells Unity how to display its information page in the Packages window, and how to install the package in the Project. + +It also contains several files that help manage package deployment, including the tests, samples, license, changelog, and documentation. + +<a name="PackManManifests"></a> +### Manifests + +There are two types of manifest files: [Project](#PackManManifestsProject) manifests (`manifest.json`), and [package](#PackManManifestsPackage) manifests (`package.json`). Both files use JSON (JavaScript Object Notation) syntax to communicate with the Package Manager, by describing which packages are available for each Project, and what each package contains. + +<a name="PackManManifestsProject"></a> +#### Project manifests + +Project manifests (`manifest.json`) tell the Package Manager which packages and versions are available to the Project. + +Project manifests support the following value: + +| Key | JSON Type | Description | +|--|--|--| +| `dependencies` | Object |List of packages for the Package Manager to load. These are usually packages officially registered with Unity, but may also include [local packages that are external](#extpkg) to your Unity project. | + + +Example of a `manifest.json` file: + + { + "dependencies": { + "com.unity.package-1": "1.0.0", + "com.unity.package-2": "2.0.0", + "com.unity.package-3": "3.0.0", + "com.unity.my-local-package": "file:/<external_path>/com.unity.my-local-package" + } + } + +Unity stores each Project manifest in the `[your_Project_root_folder]/Packages/manifest.json` file. + +<a name="PackManManifestsPackage"></a> +#### Package manifests + +The Package Manager uses package manifests (`package.json`) to determine which version of the package to load, and what information to display in the Packages window. + +Package manifests support the following values: + +| Key | JSON Type | Description | +|--|--|--| +| `name` | String |The officially registered package name, following this naming convention: `"com.unity.[package name]"`. For example, `"com.unity.resourcemanager"` | +| `displayName` | String |The package name as it appears in the Packages window. For example, `"Resource Manager"` | +| `version` | String |The package version `"MAJOR.MINOR.PATCH"`. Unity packages follow the [Semantic Versioning](https://semver.org) system. For example, `"1.3.0"`. | +| `unity` | String |The Unity version that supports this package. For example, `"2018.1"` indicates compatibility starting with Unity version 2018.1. | +| `description` | String |A brief description of the package. This is the text that appears on the Details pane of the Packages window. Some special formatting character codes are supported, such as line breaks (`\n`) and bullets (`\u25AA`). | +| `category` | String |The category this packages is in. For example, `"Forces"`. | +| `dependencies` | Object |A list of packages that this package depends on, expressed as a JSON dictionary where the key is the package name and the value is the version number. Unity downloads all dependencies and loads them into the project alongside this package. | + +Example of a `package.json` file: + + { + "name": "com.unity.package-4", + "displayName": "Package Number 4", + "version": "2.5.1", + "unity": "2018.2", + "description": "This package provides X, Y, and Z. \n\nTo find out more, click the \"View documentation\" link.", + "keywords": ["key X", "key Y", "key Z"], + "category": "Controllers", + "dependencies": { + "com.unity.package-1": "1.0.0", + "com.unity.package-2": "2.0.0", + "com.unity.package-3": "3.0.0" + } + } + +Unity stores each package manifest in the `[package_root_folder]/package.json` file. + +<a name="PackManRegistry"></a> +### Package registry + +Unity maintains a central registry of official packages that are available for distribution. When Unity loads, the Package Manager communicates with the registry, checks the Project manifest file, and displays the status of each available package in the Packages window. + +When you remove a package from the Project, the Package Manager updates the Project manifest to exclude that package from the list when in **In Project** mode but it is still available in **All packages** mode because it is still in the registry. + +When you install or update a package, the Package Manager downloads the package from the registry. + +# Technical details + +## Requirements + +This version of Unity Package Manager is compatible with the following versions of the Unity Editor: + +* 2018.3 and later (recommended) + +## Documentation revision history +|Date|Reason| +|---|---| +|October 3, 2018|Documentation updated. Image updates and minor corrections.| +|September 14, 2018|Documentation updated. Matches package version 2.0.1.| +|June 4, 2018|Documentation updated. Matches package version 2.0.0.| +|May 25, 2018|Documentation updated. Matches package version 1.9.9.| +|May 4, 2018|Documentation updated. Matches package version 1.9.8.| +|March 19, 2018|Documentation updated. Matches package version 1.9.0.| +|Feb 8, 2018|Documentation updated. Matches package version 1.7.0.| +|Feb 6, 2018|Documentation cleaned up. Matches package version 1.6.1.| +|Jan 31, 2018|Documentation updated (developmental review)| +|Jan 29, 2018|Document updated. Matches package version 1.6.0.| +|Jan 18, 2018|Document updated. Matches package version 1.5.1.| +|Jan 17, 2018|Document updated. Matches package version 1.5.0.| +|Jan 12, 2018|Document updated. Matches package version 1.4.0.| +|Nov 7, 2017|Document created. Matches package version 1.0.0.| \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor.meta new file mode 100644 index 0000000000000000000000000000000000000000..33f59435e6f7d1d54b27fdd07a9bc2839c0706c9 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 797cf0c5f1b7e4e1ab17481bd9b698eb +folderAsset: yes +timeCreated: 1501783286 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/AssemblyInfo.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/AssemblyInfo.cs new file mode 100644 index 0000000000000000000000000000000000000000..3aaf347a84127d9ba816bfd2f133994b00eab6dc --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/AssemblyInfo.cs @@ -0,0 +1,8 @@ +using System.Runtime.CompilerServices; +using UnityEditor.Experimental.UIElements; + +[assembly: InternalsVisibleTo("Unity.PackageManagerCaptain.Editor")] +[assembly: InternalsVisibleTo("Unity.PackageManagerUI.EditorTests")] +#if UNITY_2018_3_OR_NEWER +[assembly: UxmlNamespacePrefix("UnityEditor.PackageManager.UI", "upm")] +#endif diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/AssemblyInfo.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/AssemblyInfo.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..986a6967a12b476d35cae0fa1504bcd8b05495e9 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/AssemblyInfo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ca53a6f1e29564d528bb56b92e0f181c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources.meta new file mode 100644 index 0000000000000000000000000000000000000000..837bded3862b69d718f4d799f487e0d2e2593f78 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b0c12f0066bd444a1b3a900679169f30 +folderAsset: yes +timeCreated: 1501783300 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images.meta new file mode 100644 index 0000000000000000000000000000000000000000..70921ee34c68b535e658bda4ba77520bea9d5cb7 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: da0b41deddf0a4414b09681018c171f1 +folderAsset: yes +timeCreated: 1502292048 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Dark.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Dark.meta new file mode 100644 index 0000000000000000000000000000000000000000..fb0032ce7d0752bcbdeac4382fd821a145d86977 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Dark.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8c25f8b5c9da143328c516248414b95d +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Dark/download.png b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Dark/download.png new file mode 100644 index 0000000000000000000000000000000000000000..13e377b7b819365c77af6ee29d5095161143df7b Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Dark/download.png differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Dark/download.png.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Dark/download.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..9769775dfa0b14584eb2eaaba345dcdaf1b5329a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Dark/download.png.meta @@ -0,0 +1,105 @@ +fileFormatVersion: 2 +guid: 4dfd3f5da88944ec6ac5977d676c30c6 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + 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 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + 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/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Dark/error.png b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Dark/error.png new file mode 100644 index 0000000000000000000000000000000000000000..a6e1c0973466cc6a66edfaade91e165f7e2cd7ab Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Dark/error.png differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Dark/error.png.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Dark/error.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..ef50b34f9d7a765c86a4739ede616ab328b8e83b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Dark/error.png.meta @@ -0,0 +1,97 @@ +fileFormatVersion: 2 +guid: acc34040a66fe4170bc8885268860cfe +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 6 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + 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: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + 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: 8 + 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 + - serializedVersion: 2 + buildTarget: Standalone + 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/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Dark/loading.png b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Dark/loading.png new file mode 100644 index 0000000000000000000000000000000000000000..fd36a035266647092327af1890f6871a5955c2f1 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Dark/loading.png differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Dark/loading.png.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Dark/loading.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..0f1828e079705455a1d88f72901df8808b5f4af3 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Dark/loading.png.meta @@ -0,0 +1,105 @@ +fileFormatVersion: 2 +guid: 3cf132d4fa07f4f0cb2883499c5c7dd0 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + 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 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + 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: 66120540d98c346bab32966fe3676afd + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Light.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Light.meta new file mode 100644 index 0000000000000000000000000000000000000000..eee80319f109726be78e178be9f55fcf34511852 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Light.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 907731821455c4fa989ac14278e02251 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Light/download.png b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Light/download.png new file mode 100644 index 0000000000000000000000000000000000000000..0af6af8db7f9318a83c34abd855b2ffd1f6aad1b Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Light/download.png differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Light/download.png.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Light/download.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..5cfce239ec78baa21f9a01d58953e1cba959fffe --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Light/download.png.meta @@ -0,0 +1,105 @@ +fileFormatVersion: 2 +guid: f8eca3a711f4842eba0c52ea9885ef7f +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + 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 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + 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/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Light/error.png b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Light/error.png new file mode 100644 index 0000000000000000000000000000000000000000..a6e1c0973466cc6a66edfaade91e165f7e2cd7ab Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Light/error.png differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Light/error.png.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Light/error.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..5de6c97a1646222260a1dcedb1fc7a554bd432bf --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Light/error.png.meta @@ -0,0 +1,97 @@ +fileFormatVersion: 2 +guid: 4c433abcdb28444ebb7bd395ba5c76fc +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 6 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + 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: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + 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: 8 + 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 + - serializedVersion: 2 + buildTarget: Standalone + 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/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Light/loading.png b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Light/loading.png new file mode 100644 index 0000000000000000000000000000000000000000..f3828db9d68fec22f44fa4642a9d889f11bd458d Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Light/loading.png differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Light/loading.png.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Light/loading.png.meta new file mode 100644 index 0000000000000000000000000000000000000000..29433252304eb5e2c074c9ee242b6513af9cbfb3 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Images/Light/loading.png.meta @@ -0,0 +1,105 @@ +fileFormatVersion: 2 +guid: 01e02995805eb483690380a911a657e2 +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 5 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + 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 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapU: 1 + wrapV: 1 + wrapW: -1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + 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 + - serializedVersion: 2 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + 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: f6ebd98fa3a904bd4bb57dae59f0a4ce + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles.meta new file mode 100644 index 0000000000000000000000000000000000000000..a8c0801e02a99af7e2e2e1d34e7edcb56cbc3730 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: fe684bbd80eab45778b9eb316893ff7c +folderAsset: yes +timeCreated: 1502132899 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/Main_Dark.scss b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/Main_Dark.scss new file mode 100644 index 0000000000000000000000000000000000000000..1e4b87b29150ff95a3c6d3bfd17589da06059bd6 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/Main_Dark.scss @@ -0,0 +1,74 @@ +/*************************************************************************************************** + + *** Auto-Generated - Do not modify .uss File *** + + Only Modify Main.scss + +***************************************************************************************************/ + +//-------------------------------------------------------------------------------------------------- +// Pure theme colors +//-------------------------------------------------------------------------------------------------- + +$unity-text-color: #b4b4b4; +$unity-list-hover-background: #484848; +$unity-list-selected-background: #3e5f96; +$unity-background: #383838; + +//-------------------------------------------------------------------------------------------------- +// Custom colors +//-------------------------------------------------------------------------------------------------- + +$unity-background-light-contrast: #3c3c3c; // For dark contrast, use: #404040 and #232323 +$unity-background-dark-contrast: #707070; // $ +$unity-text-color-highlight: #f4f4f4; + +$unity-installed-color-highlight: rgba(255,255,254,0.4); +$not-installed-package-background-color: #424242; + +$package-tag-color: #ffa44e; +$package-tag-recommended-color: #e4e4e4; + +$caret-text-color: #646464; + +$link-text-color: #4F80F8; + +//-------------------------------------------------------------------------------------------------- +// Custom backgrounds +//-------------------------------------------------------------------------------------------------- +$installed-package-background: resource("Builtin Skins/DarkSkin/Images/MenuItemOn.png"); + +$background-left-button: resource("Builtin Skins/DarkSkin/Images/btn left.png"); +$background-left-button-selected: resource("Builtin Skins/DarkSkin/Images/btn left on.png");; +$background-mid-button: resource("Builtin Skins/DarkSkin/Images/btn mid.png"); +$background-mid-button-selected: resource("Builtin Skins/DarkSkin/Images/btn mid on.png"); +$background-right-button: resource("Builtin Skins/DarkSkin/Images/btn right.png"); +$background-right-button-selected: resource("Builtin Skins/DarkSkin/Images/btn right on.png"); + +$background-button-slice-right: 0; +$background-button-slice-left: 0; +$background-button-slice-middle: 1; + +$background-status-outdated: resource("Images/Dark/download"); +$background-status-error: resource("Images/Dark/error"); + +$background-spinner-normal: resource("Images/Dark/loading"); +$background-spinner-large: resource("Images/Dark/loading"); + +$popup-background: resource("Builtin Skins/DarkSkin/Images/mini popup.png"); + +$toolbar-background: resource("Builtin Skins/DarkSkin/Images/Toolbar.png"); +$toolbar-button-background: resource("Builtin Skins/DarkSkin/Images/toolbar button.png"); +$toolbar-button-active-background: resource("Builtin Skins/DarkSkin/Images/toolbar button act.png"); +$toolbar-button-pulldown-background: resource("Builtin Skins/DarkSkin/Images/toolbar pulldown.png"); +$toolbar-button-popup-background: resource("Builtin Skins/DarkSkin/Images/toolbar popup.png"); +$toolbar-search-textfield-background: resource("Builtin Skins/DarkSkin/Images/toolbarsearch.png"); +$toolbar-search-textfield-focus-background: resource("Builtin Skins/DarkSkin/Images/toolbarsearch focused.png"); +$toolbar-search-cancel-background: resource("Builtin Skins/DarkSkin/Images/toolbarsearchCancelButton.png"); +$toolbar-search-cancel-active-background: resource("Builtin Skins/DarkSkin/Images/toolbarsearchCancelButtonActive.png"); +$toolbar-search-cancel-off-background: resource("Builtin Skins/DarkSkin/Images/toolbarsearchCancelButtonOff.png"); + +//-------------------------------------------------------------------------------------------------- +// Common stylesheet +//-------------------------------------------------------------------------------------------------- +@import "common"; diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/Main_Dark.scss.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/Main_Dark.scss.meta new file mode 100644 index 0000000000000000000000000000000000000000..75616f4fa5cce0af8bf74fdc5b88f952713372fc --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/Main_Dark.scss.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 880f2fc52037c4fe09edb80cfe84ac7c +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/Main_Dark.uss b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/Main_Dark.uss new file mode 100644 index 0000000000000000000000000000000000000000..c7aa8316cac269fca8b68f97d650be11ffae620b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/Main_Dark.uss @@ -0,0 +1,1038 @@ +/*************************************************************************************************** + + *** Auto-Generated - Do not modify .uss File *** + + Only Modify Main.scss + +***************************************************************************************************/ +#container { + -unity-position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; +} + +.display-none { + position: absolute; + overflow: hidden; + border-radius: 0; + width: 0; + height: 0; + min-height: 0; + max-height: 0; + min-width: 0; + max-width: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; +} + +.row, #detailListView .combo, #detailListView #detailView .detail #detailActions, #detailListView #detailView .detail .detailActions, #detailListView #detailView .detail .versionContainer { + flex: 1 0 0; + flex-direction: row; +} + +.column, #detailListView .emptyArea, #detailListView #packageListGroup #listContainerOuter, #detailListView #packageListGroup #packageList, #detailListView #packageListGroup #listContainer, #detailListView #packageListGroup #listGroups, #detailListView #packageListGroup #scrollView { + flex: 1 0 0; + flex-direction: column; +} + +.tag { + border-top-width: 1; + border-left-width: 1; + border-bottom-width: 1; + border-right-width: 1; + padding-top: 1; + padding-left: 3; + padding-bottom: 1; + padding-right: 3; + font-size: 9; + border-radius: 5; + -unity-text-align: middle-center; + border-color: #000000; + color: #000000; +} + +#toolbarContainer { + flex: 0 0 auto; + flex-direction: row; + align-items: flex-start; + height: 18; +} +#toolbarContainer #toolbarView { + flex: 1 0 0; + flex-direction: row; + align-items: flex-start; + background-image: resource("Builtin Skins/DarkSkin/Images/Toolbar.png"); + margin-top: -1; + -unity-slice-top: 1; + -unity-slice-left: 1; + -unity-slice-bottom: 1; + -unity-slice-right: 1; +} +#toolbarContainer #toolbarView .toolbarButton { + flex: 1 0 0; + font-size: 9; + -unity-text-align: middle-center; + background-image: resource("Builtin Skins/DarkSkin/Images/toolbar button.png"); + flex: 0 0 auto; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + -unity-slice-top: 4; + -unity-slice-left: 6; + -unity-slice-bottom: 4; + -unity-slice-right: 6; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: -1; + padding-top: 0; + padding-left: 5; + padding-bottom: 0; + padding-right: 5; + height: 19; +} +#toolbarContainer #toolbarView .toolbarButton.display-none { + position: absolute; + border-radius: 0; + width: 0; + height: 0; + min-height: 0; + max-height: 0; + min-width: 0; + max-width: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + min-width: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + -unity-slice-top: 0; + -unity-slice-left: 0; + -unity-slice-bottom: 0; + -unity-slice-right: 0; + visibility: hidden; +} +#toolbarContainer #toolbarView .toolbarButton:hover { + color: #b4b4b4; +} +#toolbarContainer #toolbarView .toolbarButton.space { + margin-left: 7; +} +#toolbarContainer #toolbarView .toolbarButton.active { + background-image: resource("Builtin Skins/DarkSkin/Images/toolbar button act.png"); +} +#toolbarContainer #toolbarView .toolbarButton.pulldown:active { + background-image: resource("Builtin Skins/DarkSkin/Images/toolbar button.png"); +} +#toolbarContainer #toolbarView #toolbarLeft { + flex: 0 0 auto; + flex-direction: row; + align-items: flex-start; +} +#toolbarContainer #toolbarView #toolbarRight { + flex: 1 0 0; + flex-direction: row; + justify-content: flex-end; +} +#toolbarContainer #toolbarView #toolbarRight #toolbarSearch { + flex: 1 0 0; + height: 18; + max-width: 500; + flex-direction: row; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 5; +} + +#searchContainer { + flex: 1 0 0; + flex-direction: row; + align-items: center; + justify-content: flex-start; + height: 14; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; +} +#searchContainer #searchTextField { + flex: 1 0 0; + font-size: 9; + background-image: resource("Builtin Skins/DarkSkin/Images/toolbarsearch.png"); + margin-top: 2; + margin-left: 5; + margin-bottom: 1; + margin-right: 5; + padding-top: 2; + padding-left: 17; + padding-bottom: 1; + padding-right: 17; + -unity-slice-top: 1; + -unity-slice-left: 14; + -unity-slice-bottom: 1; + -unity-slice-right: 0; + height: 14; +} +#searchContainer #searchTextField:focus { + background-image: resource("Builtin Skins/DarkSkin/Images/toolbarsearch focused.png"); +} +#searchContainer #searchTextField.placeholder { + color: #707070; +} +#searchContainer #searchCancelButton { + width: 14; + height: 15; + background-image: resource("Builtin Skins/DarkSkin/Images/toolbarsearchCancelButtonOff.png"); + flex: 0 0 auto; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + -unity-slice-top: 4; + -unity-slice-left: 6; + -unity-slice-bottom: 4; + -unity-slice-right: 6; + -unity-slice-top: 1; + -unity-slice-left: 0; + -unity-slice-bottom: 1; + -unity-slice-right: 14; + margin-top: 3; + margin-left: -10; + margin-bottom: 2; + margin-right: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; +} +#searchContainer #searchCancelButton.display-none { + position: absolute; + border-radius: 0; + width: 0; + height: 0; + min-height: 0; + max-height: 0; + min-width: 0; + max-width: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + min-width: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + -unity-slice-top: 0; + -unity-slice-left: 0; + -unity-slice-bottom: 0; + -unity-slice-right: 0; + visibility: hidden; +} +#searchContainer #searchCancelButton:hover { + color: #b4b4b4; +} +#searchContainer #searchCancelButton.on { + background-image: resource("Builtin Skins/DarkSkin/Images/toolbarsearchCancelButton.png"); +} +#searchContainer #searchCancelButton:active { + background-image: resource("Builtin Skins/DarkSkin/Images/toolbarsearchCancelButtonActive.png"); +} + +#detailListView { + flex: 1 0 0; + flex-direction: row; +} +#detailListView .link { + color: #4F80F8; + background: rgba(0, 0, 0, 0); + background-image: none; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + cursor: link; +} +#detailListView .emptyArea { + flex: 1 0 0; +} +#detailListView .emptyArea .title { + -unity-text-align: middle-center; + font-size: 14; +} +#detailListView .emptyArea .loading { + -unity-position: relative; + top: 7; + left: 7; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + -unity-slice-top: 0; + -unity-slice-left: 0; + -unity-slice-bottom: 0; + -unity-slice-right: 0; + width: 14; + height: 14; + max-width: 14; + max-height: 14; +} +#detailListView #headerTitle { + flex: 1 0 0; + font-size: 12; + -unity-font-style: bold; + color: #b4b4b4; +} +#detailListView #headerCaret { + flex: 0 0 auto; + font-size: 12; + -unity-font-style: bold; + color: #b4b4b4; + min-width: 16; +} +#detailListView #spinnerContainer { + -unity-position: absolute; + top: 3; + left: 2; + right: 0; + width: 14; + flex: 0.1 0 0; + flex-direction: column; + align-items: center; +} +#detailListView .loading { + -unity-position: relative; + top: 7; + left: 7; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + -unity-slice-top: 0; + -unity-slice-left: 0; + -unity-slice-bottom: 0; + -unity-slice-right: 0; + width: 14; + height: 14; + max-width: 14; + max-height: 14; +} +#detailListView .combo { + margin-top: 3; + margin-left: 3; + margin-bottom: 3; + margin-right: 3; + padding-top: 3; + padding-left: 3; + padding-bottom: 3; + padding-right: 3; +} +#detailListView .combo .popup { + padding-top: 0; + padding-left: 8; + padding-bottom: 0; + padding-right: 0; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + border-top-width-left-radius: 0; + border-bottom-width-left-radius: 0; +} +#detailListView .combo .button { + flex: 1 0 0; + font-size: 12; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + padding-top: 2; + padding-left: 6; + padding-bottom: 3; + padding-right: 6; + -unity-slice-top: 4; + -unity-slice-left: 1; + -unity-slice-bottom: 4; + -unity-slice-right: 1; + -unity-text-align: middle-center; + border-left-width: 0; + border-top-width: 0; + border-right-width: 0; + border-bottom-width: 0; + background-image: resource("Builtin Skins/DarkSkin/Images/btn mid.png"); + border-top-width-right-radius: 0; + border-bottom-width-right-radius: 0; + border-top-width-left-radius: 0; + border-bottom-width-left-radius: 0; +} +#detailListView .combo .button.selected { + background-image: resource("Builtin Skins/DarkSkin/Images/btn mid on.png"); + color: #f4f4f4; +} +#detailListView .combo .button.first { + -unity-slice-top: 4; + -unity-slice-left: 6; + -unity-slice-bottom: 4; + -unity-slice-right: 0; + background-image: resource("Builtin Skins/DarkSkin/Images/btn left.png"); +} +#detailListView .combo .button.first.selected { + background-image: resource("Builtin Skins/DarkSkin/Images/btn left on.png"); +} +#detailListView .combo .button.last { + -unity-slice-top: 4; + -unity-slice-left: 0; + -unity-slice-bottom: 4; + -unity-slice-right: 6; + background-image: resource("Builtin Skins/DarkSkin/Images/btn right.png"); +} +#detailListView .combo .button.last.selected { + background-image: resource("Builtin Skins/DarkSkin/Images/btn right on.png"); +} +#detailListView .combo .button.small { + flex: 0.5 0 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; +} +#detailListView #packageListGroup { + width: 270; +} +#detailListView #packageListGroup #groupContainerOuter #headerContainer { + flex: 1 0 0; + flex-direction: row; + align-items: center; + border-color: rgba(0, 0, 0, 0.5); +} +#detailListView #packageListGroup #groupContainerOuter #headerContainer #headerTitle { + height: 0; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; +} +#detailListView #packageListGroup #groupContainerOuter #groupContainer { + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; +} +#detailListView #packageListGroup #scrollView #VerticalScroller { + bottom: 0; +} +#detailListView #packageListGroup #scrollView #HorizontalScroller { + height: 0; +} +#detailListView #packageListGroup #scrollView #ContentViewport { + bottom: 0; +} +#detailListView #packageListGroup #scrollView #ContentViewport #ContentView { + right: 0; + left: 0; +} +#detailListView #packageListGroup #noResult #noResultText { + -unity-word-wrap: true; +} +#detailListView .package { + flex: 1 0 0; + flex-direction: row; + align-items: center; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + border-color: rgba(0, 0, 0, 0.5); + border-bottom-width: 1; +} +#detailListView .package.selected { + background-color: #3e5f96; + color: #f4f4f4; +} +#detailListView .package.selected #packageName, #detailListView .package.selected #packageVersion { + color: #f4f4f4; +} +#detailListView .package .status { + flex: 0 0 14; + width: 14; + height: 14; + margin-left: 2; + margin-right: 0; +} +#detailListView .package .status.installed { + background-image: resource("Builtin Skins/DarkSkin/Images/MenuItemOn.png"); +} +#detailListView .package .status.installed.no-icon { + background-image: none; +} +#detailListView .package .status.outdated { + background-image: resource("Images/Dark/download"); +} +#detailListView .package .status.outdated.no-icon { + background-image: none; +} +#detailListView .package .status.inprogress { + background-image: none; +} +#detailListView .package .status.error { + background-image: resource("Images/Dark/error"); +} +#detailListView .package .name { + flex: 1 0 0; + font-size: 12; + margin-left: 0; + margin-right: 5; + overflow: hidden; +} +#detailListView .package .version { + flex: 0 0 auto; + margin-left: 0; + margin-right: 5; + font-size: 9; +} +#detailListView #detailsGroup { + flex: 1 0 0; + border-left-width: 1px; + border-color: rgba(0, 0, 0, 0.5); +} +#detailListView #detailsGroup #detailsContainer { + flex: 1 0 0; + flex-direction: column; + -unity-position: relative; +} +#detailListView #detailView { + flex: 1 0 0; +} +#detailListView #detailView #VerticalScroller { + bottom: 0; +} +#detailListView #detailView #ContentViewport #ContentView { + -unity-position: absolute; + top: 0; + left: 0; + right: 0; +} +#detailListView #detailView .detail { + flex: 1 0 0; + flex-direction: column; + padding-top: 5; + padding-left: 5; + padding-bottom: 5; + padding-right: 5; +} +#detailListView #detailView .detail .header { + flex: 1 0 0; + flex-direction: row; + align-items: flex-start; + margin-bottom: 8; +} +#detailListView #detailView .detail .header #titleContainer { + flex: 0.9 0 0; +} +#detailListView #detailView .detail .header #titleContainer #detailTitle { + font-size: 18; + -unity-font-style: bold; + -unity-word-wrap: true; + margin-top: 0; + margin-left: 4; + margin-bottom: 0; + margin-right: 0; +} +#detailListView #detailView .detail .header #detailsControls { + flex: 1 0 0; + height: 19; + flex-direction: row; + align-items: center; + flex-wrap: wrap; + margin-top: 3; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; +} +#detailListView #detailView .detail .header #updateCombo { + flex: 1 0 0; + height: 19; + align-items: center; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; +} +#detailListView #detailView .detail .header #updateCombo #update { + flex: 0 0 auto; +} +#detailListView #detailView .detail .header #updateCombo #updateDropdownContainer { + min-width: 65; + max-width: 150; + height: 19; + flex: 0 0 auto; +} +#detailListView #detailView .detail .header #updateCombo #updateDropdownContainer .popup { + font-size: 12; + height: 19; +} +#detailListView #detailView .detail .header #updateCombo #updateDropdownContainer .popup:focus { + background-image: resource("Builtin Skins/DarkSkin/Images/mini popup.png"); +} +#detailListView #detailView .detail .header #updateCombo #updateDropdownContainer .popup:hover .textElement { + color: #b4b4b4; +} +#detailListView #detailView .detail .header #updateCombo #updateDropdownContainer .popup .textElement { + margin-top: 2; +} +#detailListView #detailView .detail .header #updateCombo .action { + flex: 0 0 auto; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + font-size: 12; + padding-top: 2; + padding-left: 4; + padding-bottom: 3; + padding-right: 4; + right: -3; +} +#detailListView #detailView .detail .header #updateCombo .action:hover { + color: #b4b4b4; +} +#detailListView #detailView .detail .header #updateContainer { + height: 19; + flex: 1 0 0; + align-items: flex-end; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; +} +#detailListView #detailView .detail .header .button { + height: 19; + font-size: 12; + flex: 0 0 auto; + padding-top: 3; + padding-left: 3; + padding-bottom: 4; + padding-right: 3; + -unity-slice-top: 4; + -unity-slice-left: 6; + -unity-slice-bottom: 4; + -unity-slice-right: 6; +} +#detailListView #detailView .detail .header .button.display-none { + position: absolute; + border-radius: 0; + width: 0; + height: 0; + min-height: 0; + max-height: 0; + min-width: 0; + max-width: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + min-width: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + -unity-slice-top: 0; + -unity-slice-left: 0; + -unity-slice-bottom: 0; + -unity-slice-right: 0; + visibility: hidden; +} +#detailListView #detailView .detail .header .button:hover { + color: #b4b4b4; +} +#detailListView #detailView .detail #detailVersion { + font-size: 16; + max-height: 30; +} +#detailListView #detailView .detail #detailName { + flex: 1 0 0; + max-height: 20; + -unity-font-style: italic; +} +#detailListView #detailView .detail #detailPackageStatus { + flex: 1 0 0; + -unity-font-style: bold; + -unity-word-wrap: true; +} +#detailListView #detailView .detail #detailTag { + width: 60; + font-size: 12; + border-radius: 5; + border-color: #b4b4b4; + border-top-width: 2; + border-left-width: 2; + border-bottom-width: 2; + border-right-width: 2; + -unity-text-align: middle-center; +} +#detailListView #detailView .detail #detailDesc, #detailListView #detailView .detail #detailModuleReference { + flex: 1 0 0; + font-size: 12; + -unity-word-wrap: true; +} +#detailListView #detailView .detail #detailDesc.empty, #detailListView #detailView .detail #detailModuleReference.empty { + -unity-font-style: italic; +} +#detailListView #detailView .detail #detailAuthor { + flex: 1 0 0; + font-size: 12; + -unity-word-wrap: true; +} +#detailListView #detailView .detail #detailCategory { + flex: 1 0 0; + font-size: 12; + -unity-word-wrap: true; + margin-bottom: 5; +} +#detailListView #detailView .detail #changeLogContainer, #detailListView #detailView .detail #viewLicensesContainer { + flex: 0 0 auto; + flex-direction: row; +} +#detailListView #detailView .detail #detailActions, #detailListView #detailView .detail .detailActions { + flex: 0 0 auto; + flex-direction: row; + margin-left: 2; +} +#detailListView #detailView .detail #detailActions .detailAction, #detailListView #detailView .detail .detailActions .detailAction { + margin-left: 0; + margin-right: 0; + padding-left: 2; + padding-right: 2; + border-left-width: 2; + border-right-width: 2; +} +#detailListView #detailView .detail #detailActions .detailActionSeparator, #detailListView #detailView .detail .detailActions .detailActionSeparator { + margin-left: 0; + margin-right: 0; + padding-left: 0; + padding-right: 0; + border-left-width: 0; + border-right-width: 0; +} +#detailListView #detailView .detail #detailActions #thirdPartyNoticeLabel, #detailListView #detailView .detail .detailActions #thirdPartyNoticeLabel { + margin-top: 4; + margin-left: 0; + margin-bottom: 4; + margin-right: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + -unity-word-wrap: true; +} +#detailListView #detailView .detail #detailActions #viewThirdParty, #detailListView #detailView .detail .detailActions #viewThirdParty { + border-right-width: 0; +} +#detailListView #detailView .detail .versionContainer { + align-items: center; + justify-content: flex-start; +} +#detailListView #detailView .detail .versionContainer #detailVersion { + flex: 0 0 auto; +} +#detailListView #detailView .detail .tag { + border-color: #ffa44e; + color: #ffa44e; +} +#detailListView #detailView .detail .tag.verified { + border-color: #e4e4e4; + color: #e4e4e4; +} +#detailListView #detailView .detail .tagLine { + flex: 0 0 auto; + flex-direction: row; +} +#detailListView #detailError { + -unity-position: absolute; + top: 5; + left: 5; + right: 5; + min-height: 200; + -unity-word-wrap: true; +} +#detailListView #detailError.display-none { + top: 0; + left: 0; + bottom: 0; + right: 0; + width: 0; + height: 0; + min-height: 0; + max-height: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; +} +#detailListView #packageStatusBar { + -unity-position: relative; + flex: 0 0 auto; + margin-top: 2; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + border-color: rgba(0, 0, 0, 0.5); + border-top-width: 1; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; +} +#detailListView #statusBarContainer { + flex-direction: row; + align-items: center; + justify-content: space-between; +} +#detailListView #statusBarContainer #loadingContainer { + flex-direction: row; + align-items: center; + justify-content: flex-start; + margin-left: 2; +} +#detailListView #statusBarContainer #loadingContainer #loadingIcon { + background-image: resource("Images/Dark/error"); + width: 16; + height: 16; + margin-left: -12; + margin-right: 0; +} +#detailListView #statusBarContainer #loadingContainer #loadingText { + padding-left: 2; + -unity-font-style: italic; +} +#detailListView #statusBarContainer #loadingContainer #loadingText.icon { + margin-left: 0; +} +#detailListView #statusBarContainer #moreAddOptionsButton { + font-size: 16; + background-image: none; + margin-top: 0; + margin-left: 0; + margin-bottom: -2; + margin-right: 0; + padding-top: 3; + padding-left: 6; + padding-bottom: 6; + padding-right: 6; + border-color: rgba(0, 0, 0, 0.5); + border-top-width: 0; + border-left-width: 1; + border-bottom-width: 0; + border-right-width: 0; +} +#detailListView #packageAddFromUrlField { + -unity-position: absolute; + top: -35; + left: 0; + bottom: 0; + right: 0; +} +#detailListView #addFromUrlFieldContainer { + border-color: rgba(0, 0, 0, 0.5); + border-top-width: 1; + border-left-width: 0; + border-bottom-width: 1; + border-right-width: 0; + flex-direction: row; + justify-content: space-between; + align-items: center; + height: 35; + background-color: #383838; +} +#detailListView #addFromUrlFieldContainer #urlTextField { + flex: 1 0 0; + height: 20; + -unity-text-align: middle-left; +} +#detailListView #addFromUrlFieldContainer #addFromUrlButton { + flex: 0 0 auto; + height: 20; +} + +.alert { + background-color: rgba(200, 0, 0, 0.8); + border-color: #FF0000; + flex-direction: row; + border-top-width: 1; + border-left-width: 1; + border-bottom-width: 1; + border-right-width: 1; + padding-top: 5; + padding-left: 10; + padding-bottom: 5; + padding-right: 10; +} +.alert #alertMessage { + flex: 1 0 0; + color: #f4f4f4; + -unity-word-wrap: true; + overflow: hidden; +} +.alert #close { + flex: 0 0 auto; + max-height: 30; + left: 5; + flex: 0 0 auto; + padding-top: 3; + padding-left: 3; + padding-bottom: 4; + padding-right: 3; + -unity-slice-top: 4; + -unity-slice-left: 6; + -unity-slice-bottom: 4; + -unity-slice-right: 6; +} +.alert #close.display-none { + position: absolute; + border-radius: 0; + width: 0; + height: 0; + min-height: 0; + max-height: 0; + min-width: 0; + max-width: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + min-width: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + -unity-slice-top: 0; + -unity-slice-left: 0; + -unity-slice-bottom: 0; + -unity-slice-right: 0; + visibility: hidden; +} +.alert #close:hover { + color: #b4b4b4; +} + +.spinner { + flex: 0 0 auto; + top: -7; + left: -7; + min-width: 14; + min-height: 14; + max-width: 14; + max-height: 14; + background-image: resource("Images/Dark/loading"); +} + +.largeSpinner { + flex: 0 0 auto; + top: -16; + left: -16; + min-width: 32; + min-height: 32; + max-width: 32; + max-height: 32; + background-image: resource("Images/Dark/loading"); +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/Main_Dark.uss.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/Main_Dark.uss.meta new file mode 100644 index 0000000000000000000000000000000000000000..efb671094bd57ecf057f386749119685986b72e1 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/Main_Dark.uss.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: c7559cdbc33f04af1a5a42d2aa5b40a5 +ScriptedImporter: + fileIDToRecycleName: + 11400000: stylesheet + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/Main_Light.scss b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/Main_Light.scss new file mode 100644 index 0000000000000000000000000000000000000000..85d6b0708dec3b3757e946ddc6264277a791c736 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/Main_Light.scss @@ -0,0 +1,74 @@ +/*************************************************************************************************** + + *** Auto-Generated - Do not modify .uss File *** + + Only Modify Main.scss + +***************************************************************************************************/ + +//-------------------------------------------------------------------------------------------------- +// Pure theme colors +//-------------------------------------------------------------------------------------------------- + +$unity-text-color: #000000; +$unity-list-hover-background: #8f8f8f; +$unity-list-selected-background: #3e7de7; +$unity-background: #c2c2c2; + +//-------------------------------------------------------------------------------------------------- +// Custom colors +//-------------------------------------------------------------------------------------------------- + +$unity-background-light-contrast: #D5D5D5; +$unity-background-dark-contrast: #6C6C6C; +$unity-text-color-highlight: #f4f4f4; + +$unity-installed-color-highlight: rgba(1,0,0,0.3); +$not-installed-package-background-color: #d1d1d1; + +$package-tag-color: #d25a00; +$package-tag-recommended-color: #000; + +$caret-text-color: #646464; + +$link-text-color: #0808FC; + +//-------------------------------------------------------------------------------------------------- +// Custom backgrounds +//-------------------------------------------------------------------------------------------------- +$installed-package-background: resource("Builtin Skins/LightSkin/Images/MenuItemOn.png"); + +$background-left-button: resource("Builtin Skins/LightSkin/Images/btn left.png"); +$background-left-button-selected: resource("Builtin Skins/LightSkin/Images/btn left on.png");; +$background-mid-button: resource("Builtin Skins/LightSkin/Images/btn mid.png"); +$background-mid-button-selected: resource("Builtin Skins/LightSkin/Images/btn mid on.png"); +$background-right-button: resource("Builtin Skins/LightSkin/Images/btn right.png"); +$background-right-button-selected: resource("Builtin Skins/LightSkin/Images/btn right on.png"); + +$background-button-slice-right: 6; +$background-button-slice-left: 6; +$background-button-slice-middle: 1; + +$background-status-outdated: resource("Images/Light/download"); +$background-status-error: resource("Images/Dark/error"); + +$background-spinner-normal: resource("Images/Light/loading"); +$background-spinner-large: resource("Images/Light/loading"); + +$popup-background: resource("Builtin Skins/LightSkin/Images/mini popup.png"); + +$toolbar-background: resource("Builtin Skins/LightSkin/Images/Toolbar.png"); +$toolbar-button-background: resource("Builtin Skins/LightSkin/Images/toolbar button.png"); +$toolbar-button-active-background: resource("Builtin Skins/LightSkin/Images/toolbar button act.png"); +$toolbar-button-pulldown-background: resource("Builtin Skins/LightSkin/Images/toolbar pulldown.png"); +$toolbar-button-popup-background: resource("Builtin Skins/LightSkin/Images/toolbar popup.png"); +$toolbar-search-textfield-background: resource("Builtin Skins/LightSkin/Images/toolbarsearch.png"); +$toolbar-search-textfield-focus-background: resource("Builtin Skins/LightSkin/Images/toolbarsearch focused.png"); +$toolbar-search-cancel-background: resource("Builtin Skins/LightSkin/Images/toolbarsearchCancelButton.png"); +$toolbar-search-cancel-active-background: resource("Builtin Skins/LightSkin/Images/toolbarsearchCancelButtonActive.png"); +$toolbar-search-cancel-off-background: resource("Builtin Skins/LightSkin/Images/toolbarsearchCancelButtonOff.png"); + +//-------------------------------------------------------------------------------------------------- +// Common stylesheet +//-------------------------------------------------------------------------------------------------- +@import "common"; diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/Main_Light.scss.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/Main_Light.scss.meta new file mode 100644 index 0000000000000000000000000000000000000000..066475b7624ca5f3677c9063d5ddba9405ae91ae --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/Main_Light.scss.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f1687bb24464840ae9e1d253685ae0f6 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/Main_Light.uss b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/Main_Light.uss new file mode 100644 index 0000000000000000000000000000000000000000..5f2ec80fab46b395edd7780872739a9c8d00dac3 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/Main_Light.uss @@ -0,0 +1,1038 @@ +/*************************************************************************************************** + + *** Auto-Generated - Do not modify .uss File *** + + Only Modify Main.scss + +***************************************************************************************************/ +#container { + -unity-position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; +} + +.display-none { + position: absolute; + overflow: hidden; + border-radius: 0; + width: 0; + height: 0; + min-height: 0; + max-height: 0; + min-width: 0; + max-width: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; +} + +.row, #detailListView .combo, #detailListView #detailView .detail #detailActions, #detailListView #detailView .detail .detailActions, #detailListView #detailView .detail .versionContainer { + flex: 1 0 0; + flex-direction: row; +} + +.column, #detailListView .emptyArea, #detailListView #packageListGroup #listContainerOuter, #detailListView #packageListGroup #packageList, #detailListView #packageListGroup #listContainer, #detailListView #packageListGroup #listGroups, #detailListView #packageListGroup #scrollView { + flex: 1 0 0; + flex-direction: column; +} + +.tag { + border-top-width: 1; + border-left-width: 1; + border-bottom-width: 1; + border-right-width: 1; + padding-top: 1; + padding-left: 3; + padding-bottom: 1; + padding-right: 3; + font-size: 9; + border-radius: 5; + -unity-text-align: middle-center; + border-color: #000000; + color: #000000; +} + +#toolbarContainer { + flex: 0 0 auto; + flex-direction: row; + align-items: flex-start; + height: 18; +} +#toolbarContainer #toolbarView { + flex: 1 0 0; + flex-direction: row; + align-items: flex-start; + background-image: resource("Builtin Skins/LightSkin/Images/Toolbar.png"); + margin-top: -1; + -unity-slice-top: 1; + -unity-slice-left: 1; + -unity-slice-bottom: 1; + -unity-slice-right: 1; +} +#toolbarContainer #toolbarView .toolbarButton { + flex: 1 0 0; + font-size: 9; + -unity-text-align: middle-center; + background-image: resource("Builtin Skins/LightSkin/Images/toolbar button.png"); + flex: 0 0 auto; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + -unity-slice-top: 4; + -unity-slice-left: 6; + -unity-slice-bottom: 4; + -unity-slice-right: 6; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: -1; + padding-top: 0; + padding-left: 5; + padding-bottom: 0; + padding-right: 5; + height: 19; +} +#toolbarContainer #toolbarView .toolbarButton.display-none { + position: absolute; + border-radius: 0; + width: 0; + height: 0; + min-height: 0; + max-height: 0; + min-width: 0; + max-width: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + min-width: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + -unity-slice-top: 0; + -unity-slice-left: 0; + -unity-slice-bottom: 0; + -unity-slice-right: 0; + visibility: hidden; +} +#toolbarContainer #toolbarView .toolbarButton:hover { + color: #000000; +} +#toolbarContainer #toolbarView .toolbarButton.space { + margin-left: 7; +} +#toolbarContainer #toolbarView .toolbarButton.active { + background-image: resource("Builtin Skins/LightSkin/Images/toolbar button act.png"); +} +#toolbarContainer #toolbarView .toolbarButton.pulldown:active { + background-image: resource("Builtin Skins/LightSkin/Images/toolbar button.png"); +} +#toolbarContainer #toolbarView #toolbarLeft { + flex: 0 0 auto; + flex-direction: row; + align-items: flex-start; +} +#toolbarContainer #toolbarView #toolbarRight { + flex: 1 0 0; + flex-direction: row; + justify-content: flex-end; +} +#toolbarContainer #toolbarView #toolbarRight #toolbarSearch { + flex: 1 0 0; + height: 18; + max-width: 500; + flex-direction: row; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 5; +} + +#searchContainer { + flex: 1 0 0; + flex-direction: row; + align-items: center; + justify-content: flex-start; + height: 14; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; +} +#searchContainer #searchTextField { + flex: 1 0 0; + font-size: 9; + background-image: resource("Builtin Skins/LightSkin/Images/toolbarsearch.png"); + margin-top: 2; + margin-left: 5; + margin-bottom: 1; + margin-right: 5; + padding-top: 2; + padding-left: 17; + padding-bottom: 1; + padding-right: 17; + -unity-slice-top: 1; + -unity-slice-left: 14; + -unity-slice-bottom: 1; + -unity-slice-right: 0; + height: 14; +} +#searchContainer #searchTextField:focus { + background-image: resource("Builtin Skins/LightSkin/Images/toolbarsearch focused.png"); +} +#searchContainer #searchTextField.placeholder { + color: #6C6C6C; +} +#searchContainer #searchCancelButton { + width: 14; + height: 15; + background-image: resource("Builtin Skins/LightSkin/Images/toolbarsearchCancelButtonOff.png"); + flex: 0 0 auto; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + -unity-slice-top: 4; + -unity-slice-left: 6; + -unity-slice-bottom: 4; + -unity-slice-right: 6; + -unity-slice-top: 1; + -unity-slice-left: 0; + -unity-slice-bottom: 1; + -unity-slice-right: 14; + margin-top: 3; + margin-left: -10; + margin-bottom: 2; + margin-right: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; +} +#searchContainer #searchCancelButton.display-none { + position: absolute; + border-radius: 0; + width: 0; + height: 0; + min-height: 0; + max-height: 0; + min-width: 0; + max-width: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + min-width: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + -unity-slice-top: 0; + -unity-slice-left: 0; + -unity-slice-bottom: 0; + -unity-slice-right: 0; + visibility: hidden; +} +#searchContainer #searchCancelButton:hover { + color: #000000; +} +#searchContainer #searchCancelButton.on { + background-image: resource("Builtin Skins/LightSkin/Images/toolbarsearchCancelButton.png"); +} +#searchContainer #searchCancelButton:active { + background-image: resource("Builtin Skins/LightSkin/Images/toolbarsearchCancelButtonActive.png"); +} + +#detailListView { + flex: 1 0 0; + flex-direction: row; +} +#detailListView .link { + color: #0808FC; + background: rgba(0, 0, 0, 0); + background-image: none; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + cursor: link; +} +#detailListView .emptyArea { + flex: 1 0 0; +} +#detailListView .emptyArea .title { + -unity-text-align: middle-center; + font-size: 14; +} +#detailListView .emptyArea .loading { + -unity-position: relative; + top: 7; + left: 7; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + -unity-slice-top: 0; + -unity-slice-left: 0; + -unity-slice-bottom: 0; + -unity-slice-right: 0; + width: 14; + height: 14; + max-width: 14; + max-height: 14; +} +#detailListView #headerTitle { + flex: 1 0 0; + font-size: 12; + -unity-font-style: bold; + color: #000000; +} +#detailListView #headerCaret { + flex: 0 0 auto; + font-size: 12; + -unity-font-style: bold; + color: #000000; + min-width: 16; +} +#detailListView #spinnerContainer { + -unity-position: absolute; + top: 3; + left: 2; + right: 0; + width: 14; + flex: 0.1 0 0; + flex-direction: column; + align-items: center; +} +#detailListView .loading { + -unity-position: relative; + top: 7; + left: 7; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + -unity-slice-top: 0; + -unity-slice-left: 0; + -unity-slice-bottom: 0; + -unity-slice-right: 0; + width: 14; + height: 14; + max-width: 14; + max-height: 14; +} +#detailListView .combo { + margin-top: 3; + margin-left: 3; + margin-bottom: 3; + margin-right: 3; + padding-top: 3; + padding-left: 3; + padding-bottom: 3; + padding-right: 3; +} +#detailListView .combo .popup { + padding-top: 0; + padding-left: 8; + padding-bottom: 0; + padding-right: 0; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + border-top-width-left-radius: 0; + border-bottom-width-left-radius: 0; +} +#detailListView .combo .button { + flex: 1 0 0; + font-size: 12; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + padding-top: 2; + padding-left: 6; + padding-bottom: 3; + padding-right: 6; + -unity-slice-top: 4; + -unity-slice-left: 1; + -unity-slice-bottom: 4; + -unity-slice-right: 1; + -unity-text-align: middle-center; + border-left-width: 0; + border-top-width: 0; + border-right-width: 0; + border-bottom-width: 0; + background-image: resource("Builtin Skins/LightSkin/Images/btn mid.png"); + border-top-width-right-radius: 0; + border-bottom-width-right-radius: 0; + border-top-width-left-radius: 0; + border-bottom-width-left-radius: 0; +} +#detailListView .combo .button.selected { + background-image: resource("Builtin Skins/LightSkin/Images/btn mid on.png"); + color: #f4f4f4; +} +#detailListView .combo .button.first { + -unity-slice-top: 4; + -unity-slice-left: 6; + -unity-slice-bottom: 4; + -unity-slice-right: 6; + background-image: resource("Builtin Skins/LightSkin/Images/btn left.png"); +} +#detailListView .combo .button.first.selected { + background-image: resource("Builtin Skins/LightSkin/Images/btn left on.png"); +} +#detailListView .combo .button.last { + -unity-slice-top: 4; + -unity-slice-left: 6; + -unity-slice-bottom: 4; + -unity-slice-right: 6; + background-image: resource("Builtin Skins/LightSkin/Images/btn right.png"); +} +#detailListView .combo .button.last.selected { + background-image: resource("Builtin Skins/LightSkin/Images/btn right on.png"); +} +#detailListView .combo .button.small { + flex: 0.5 0 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; +} +#detailListView #packageListGroup { + width: 270; +} +#detailListView #packageListGroup #groupContainerOuter #headerContainer { + flex: 1 0 0; + flex-direction: row; + align-items: center; + border-color: rgba(0, 0, 0, 0.5); +} +#detailListView #packageListGroup #groupContainerOuter #headerContainer #headerTitle { + height: 0; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; +} +#detailListView #packageListGroup #groupContainerOuter #groupContainer { + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; +} +#detailListView #packageListGroup #scrollView #VerticalScroller { + bottom: 0; +} +#detailListView #packageListGroup #scrollView #HorizontalScroller { + height: 0; +} +#detailListView #packageListGroup #scrollView #ContentViewport { + bottom: 0; +} +#detailListView #packageListGroup #scrollView #ContentViewport #ContentView { + right: 0; + left: 0; +} +#detailListView #packageListGroup #noResult #noResultText { + -unity-word-wrap: true; +} +#detailListView .package { + flex: 1 0 0; + flex-direction: row; + align-items: center; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + border-color: rgba(0, 0, 0, 0.5); + border-bottom-width: 1; +} +#detailListView .package.selected { + background-color: #3e7de7; + color: #f4f4f4; +} +#detailListView .package.selected #packageName, #detailListView .package.selected #packageVersion { + color: #f4f4f4; +} +#detailListView .package .status { + flex: 0 0 14; + width: 14; + height: 14; + margin-left: 2; + margin-right: 0; +} +#detailListView .package .status.installed { + background-image: resource("Builtin Skins/LightSkin/Images/MenuItemOn.png"); +} +#detailListView .package .status.installed.no-icon { + background-image: none; +} +#detailListView .package .status.outdated { + background-image: resource("Images/Light/download"); +} +#detailListView .package .status.outdated.no-icon { + background-image: none; +} +#detailListView .package .status.inprogress { + background-image: none; +} +#detailListView .package .status.error { + background-image: resource("Images/Dark/error"); +} +#detailListView .package .name { + flex: 1 0 0; + font-size: 12; + margin-left: 0; + margin-right: 5; + overflow: hidden; +} +#detailListView .package .version { + flex: 0 0 auto; + margin-left: 0; + margin-right: 5; + font-size: 9; +} +#detailListView #detailsGroup { + flex: 1 0 0; + border-left-width: 1px; + border-color: rgba(0, 0, 0, 0.5); +} +#detailListView #detailsGroup #detailsContainer { + flex: 1 0 0; + flex-direction: column; + -unity-position: relative; +} +#detailListView #detailView { + flex: 1 0 0; +} +#detailListView #detailView #VerticalScroller { + bottom: 0; +} +#detailListView #detailView #ContentViewport #ContentView { + -unity-position: absolute; + top: 0; + left: 0; + right: 0; +} +#detailListView #detailView .detail { + flex: 1 0 0; + flex-direction: column; + padding-top: 5; + padding-left: 5; + padding-bottom: 5; + padding-right: 5; +} +#detailListView #detailView .detail .header { + flex: 1 0 0; + flex-direction: row; + align-items: flex-start; + margin-bottom: 8; +} +#detailListView #detailView .detail .header #titleContainer { + flex: 0.9 0 0; +} +#detailListView #detailView .detail .header #titleContainer #detailTitle { + font-size: 18; + -unity-font-style: bold; + -unity-word-wrap: true; + margin-top: 0; + margin-left: 4; + margin-bottom: 0; + margin-right: 0; +} +#detailListView #detailView .detail .header #detailsControls { + flex: 1 0 0; + height: 19; + flex-direction: row; + align-items: center; + flex-wrap: wrap; + margin-top: 3; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; +} +#detailListView #detailView .detail .header #updateCombo { + flex: 1 0 0; + height: 19; + align-items: center; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; +} +#detailListView #detailView .detail .header #updateCombo #update { + flex: 0 0 auto; +} +#detailListView #detailView .detail .header #updateCombo #updateDropdownContainer { + min-width: 65; + max-width: 150; + height: 19; + flex: 0 0 auto; +} +#detailListView #detailView .detail .header #updateCombo #updateDropdownContainer .popup { + font-size: 12; + height: 19; +} +#detailListView #detailView .detail .header #updateCombo #updateDropdownContainer .popup:focus { + background-image: resource("Builtin Skins/LightSkin/Images/mini popup.png"); +} +#detailListView #detailView .detail .header #updateCombo #updateDropdownContainer .popup:hover .textElement { + color: #000000; +} +#detailListView #detailView .detail .header #updateCombo #updateDropdownContainer .popup .textElement { + margin-top: 2; +} +#detailListView #detailView .detail .header #updateCombo .action { + flex: 0 0 auto; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + font-size: 12; + padding-top: 2; + padding-left: 4; + padding-bottom: 3; + padding-right: 4; + right: -3; +} +#detailListView #detailView .detail .header #updateCombo .action:hover { + color: #000000; +} +#detailListView #detailView .detail .header #updateContainer { + height: 19; + flex: 1 0 0; + align-items: flex-end; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; +} +#detailListView #detailView .detail .header .button { + height: 19; + font-size: 12; + flex: 0 0 auto; + padding-top: 3; + padding-left: 3; + padding-bottom: 4; + padding-right: 3; + -unity-slice-top: 4; + -unity-slice-left: 6; + -unity-slice-bottom: 4; + -unity-slice-right: 6; +} +#detailListView #detailView .detail .header .button.display-none { + position: absolute; + border-radius: 0; + width: 0; + height: 0; + min-height: 0; + max-height: 0; + min-width: 0; + max-width: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + min-width: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + -unity-slice-top: 0; + -unity-slice-left: 0; + -unity-slice-bottom: 0; + -unity-slice-right: 0; + visibility: hidden; +} +#detailListView #detailView .detail .header .button:hover { + color: #000000; +} +#detailListView #detailView .detail #detailVersion { + font-size: 16; + max-height: 30; +} +#detailListView #detailView .detail #detailName { + flex: 1 0 0; + max-height: 20; + -unity-font-style: italic; +} +#detailListView #detailView .detail #detailPackageStatus { + flex: 1 0 0; + -unity-font-style: bold; + -unity-word-wrap: true; +} +#detailListView #detailView .detail #detailTag { + width: 60; + font-size: 12; + border-radius: 5; + border-color: #b4b4b4; + border-top-width: 2; + border-left-width: 2; + border-bottom-width: 2; + border-right-width: 2; + -unity-text-align: middle-center; +} +#detailListView #detailView .detail #detailDesc, #detailListView #detailView .detail #detailModuleReference { + flex: 1 0 0; + font-size: 12; + -unity-word-wrap: true; +} +#detailListView #detailView .detail #detailDesc.empty, #detailListView #detailView .detail #detailModuleReference.empty { + -unity-font-style: italic; +} +#detailListView #detailView .detail #detailAuthor { + flex: 1 0 0; + font-size: 12; + -unity-word-wrap: true; +} +#detailListView #detailView .detail #detailCategory { + flex: 1 0 0; + font-size: 12; + -unity-word-wrap: true; + margin-bottom: 5; +} +#detailListView #detailView .detail #changeLogContainer, #detailListView #detailView .detail #viewLicensesContainer { + flex: 0 0 auto; + flex-direction: row; +} +#detailListView #detailView .detail #detailActions, #detailListView #detailView .detail .detailActions { + flex: 0 0 auto; + flex-direction: row; + margin-left: 2; +} +#detailListView #detailView .detail #detailActions .detailAction, #detailListView #detailView .detail .detailActions .detailAction { + margin-left: 0; + margin-right: 0; + padding-left: 2; + padding-right: 2; + border-left-width: 2; + border-right-width: 2; +} +#detailListView #detailView .detail #detailActions .detailActionSeparator, #detailListView #detailView .detail .detailActions .detailActionSeparator { + margin-left: 0; + margin-right: 0; + padding-left: 0; + padding-right: 0; + border-left-width: 0; + border-right-width: 0; +} +#detailListView #detailView .detail #detailActions #thirdPartyNoticeLabel, #detailListView #detailView .detail .detailActions #thirdPartyNoticeLabel { + margin-top: 4; + margin-left: 0; + margin-bottom: 4; + margin-right: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + -unity-word-wrap: true; +} +#detailListView #detailView .detail #detailActions #viewThirdParty, #detailListView #detailView .detail .detailActions #viewThirdParty { + border-right-width: 0; +} +#detailListView #detailView .detail .versionContainer { + align-items: center; + justify-content: flex-start; +} +#detailListView #detailView .detail .versionContainer #detailVersion { + flex: 0 0 auto; +} +#detailListView #detailView .detail .tag { + border-color: #d25a00; + color: #d25a00; +} +#detailListView #detailView .detail .tag.verified { + border-color: #000; + color: #000; +} +#detailListView #detailView .detail .tagLine { + flex: 0 0 auto; + flex-direction: row; +} +#detailListView #detailError { + -unity-position: absolute; + top: 5; + left: 5; + right: 5; + min-height: 200; + -unity-word-wrap: true; +} +#detailListView #detailError.display-none { + top: 0; + left: 0; + bottom: 0; + right: 0; + width: 0; + height: 0; + min-height: 0; + max-height: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; +} +#detailListView #packageStatusBar { + -unity-position: relative; + flex: 0 0 auto; + margin-top: 2; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + border-color: rgba(0, 0, 0, 0.5); + border-top-width: 1; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; +} +#detailListView #statusBarContainer { + flex-direction: row; + align-items: center; + justify-content: space-between; +} +#detailListView #statusBarContainer #loadingContainer { + flex-direction: row; + align-items: center; + justify-content: flex-start; + margin-left: 2; +} +#detailListView #statusBarContainer #loadingContainer #loadingIcon { + background-image: resource("Images/Dark/error"); + width: 16; + height: 16; + margin-left: -12; + margin-right: 0; +} +#detailListView #statusBarContainer #loadingContainer #loadingText { + padding-left: 2; + -unity-font-style: italic; +} +#detailListView #statusBarContainer #loadingContainer #loadingText.icon { + margin-left: 0; +} +#detailListView #statusBarContainer #moreAddOptionsButton { + font-size: 16; + background-image: none; + margin-top: 0; + margin-left: 0; + margin-bottom: -2; + margin-right: 0; + padding-top: 3; + padding-left: 6; + padding-bottom: 6; + padding-right: 6; + border-color: rgba(0, 0, 0, 0.5); + border-top-width: 0; + border-left-width: 1; + border-bottom-width: 0; + border-right-width: 0; +} +#detailListView #packageAddFromUrlField { + -unity-position: absolute; + top: -35; + left: 0; + bottom: 0; + right: 0; +} +#detailListView #addFromUrlFieldContainer { + border-color: rgba(0, 0, 0, 0.5); + border-top-width: 1; + border-left-width: 0; + border-bottom-width: 1; + border-right-width: 0; + flex-direction: row; + justify-content: space-between; + align-items: center; + height: 35; + background-color: #c2c2c2; +} +#detailListView #addFromUrlFieldContainer #urlTextField { + flex: 1 0 0; + height: 20; + -unity-text-align: middle-left; +} +#detailListView #addFromUrlFieldContainer #addFromUrlButton { + flex: 0 0 auto; + height: 20; +} + +.alert { + background-color: rgba(200, 0, 0, 0.8); + border-color: #FF0000; + flex-direction: row; + border-top-width: 1; + border-left-width: 1; + border-bottom-width: 1; + border-right-width: 1; + padding-top: 5; + padding-left: 10; + padding-bottom: 5; + padding-right: 10; +} +.alert #alertMessage { + flex: 1 0 0; + color: #f4f4f4; + -unity-word-wrap: true; + overflow: hidden; +} +.alert #close { + flex: 0 0 auto; + max-height: 30; + left: 5; + flex: 0 0 auto; + padding-top: 3; + padding-left: 3; + padding-bottom: 4; + padding-right: 3; + -unity-slice-top: 4; + -unity-slice-left: 6; + -unity-slice-bottom: 4; + -unity-slice-right: 6; +} +.alert #close.display-none { + position: absolute; + border-radius: 0; + width: 0; + height: 0; + min-height: 0; + max-height: 0; + min-width: 0; + max-width: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + min-width: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + padding-top: 0; + padding-left: 0; + padding-bottom: 0; + padding-right: 0; + margin-top: 0; + margin-left: 0; + margin-bottom: 0; + margin-right: 0; + -unity-slice-top: 0; + -unity-slice-left: 0; + -unity-slice-bottom: 0; + -unity-slice-right: 0; + visibility: hidden; +} +.alert #close:hover { + color: #000000; +} + +.spinner { + flex: 0 0 auto; + top: -7; + left: -7; + min-width: 14; + min-height: 14; + max-width: 14; + max-height: 14; + background-image: resource("Images/Light/loading"); +} + +.largeSpinner { + flex: 0 0 auto; + top: -16; + left: -16; + min-width: 32; + min-height: 32; + max-width: 32; + max-height: 32; + background-image: resource("Images/Light/loading"); +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/Main_Light.uss.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/Main_Light.uss.meta new file mode 100644 index 0000000000000000000000000000000000000000..cb382d66ea8ced7c3510252b107cb73c1028e193 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/Main_Light.uss.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: abdc053b8e3644f299aedc641d609a84 +ScriptedImporter: + fileIDToRecycleName: + 11400000: stylesheet + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/_common.scss b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/_common.scss new file mode 100644 index 0000000000000000000000000000000000000000..a896ed29d69339f9b9e8b71f8e8647084fbf4826 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/_common.scss @@ -0,0 +1,960 @@ +// If you are using IntelliJ Rider, you can simply turn on the SCSS compiler, otherwise here is how to convert scss to uss +// # Install Sass +// gem install sass +// +// # Convert +// sass --sourcemap=none --style=expanded --scss --no-cache Main_Dark.scss Main_Dark.uss +// sass --sourcemap=none --style=expanded --scss --no-cache Main_Light.scss Main_Light.uss +// +// # Watch +// sass --watch --sourcemap=none --style=expanded --scss --no-cache Main_Light.scss:Main_Light.uss Main_Dark.scss:Main_Dark.uss +// +// Sass to Uss Notes +// - Sass converts rgb(0,0,0) to css 'black'. Uss doesn't support named colors. The workaround is to set the color in sass as #000000 +// +// Uss Notes +// Runtime\UIElements\Managed\StyleSheets\StyleSheetCache.cs:50 to see which properties are available (until there is a doc) + +//-------------------------------------------------------------------------------------------------- +// Helper Mixins +//-------------------------------------------------------------------------------------------------- + +@mixin border($top, $right, $bottom, $left) { + @if $top != 'auto' {border-top-width: $top;} + @if $left != 'auto' {border-left-width: $right;} + @if $bottom != 'auto' {border-bottom-width: $bottom;} + @if $right != 'auto' {border-right-width: $left;} +} + +@mixin border-box($width: 1) { + @include border($width, $width, $width, $width); +} + +@mixin padding($top, $right, $bottom, $left) { + @if $top != 'auto' {padding-top: $top;} + @if $left != 'auto' {padding-left: $left;} + @if $bottom != 'auto' {padding-bottom: $bottom;} + @if $right != 'auto' {padding-right: $right;} +} + +@mixin padding-box($size) { + @include padding($size, $size, $size, $size); +} + +@mixin margin($top, $right, $bottom, $left) { + @if $top != 'auto' {margin-top: $top;} + @if $left != 'auto' {margin-left: $left;} + @if $bottom != 'auto' {margin-bottom: $bottom;} + @if $right != 'auto' {margin-right: $right;} +} + +@mixin margin-box($size) { + @include margin($size, $size, $size, $size); +} + +@mixin slice($top, $right, $bottom, $left) { + @if $top != 'auto' {-unity-slice-top: $top;} + @if $left != 'auto' {-unity-slice-left: $left;} + @if $bottom != 'auto' {-unity-slice-bottom: $bottom;} + @if $right != 'auto' {-unity-slice-right: $right;} +} + +@mixin slice-box($size) { + @include slice($size, $size, $size, $size); +} + +@mixin position($top, $right, $bottom, $left) { + @if $top != 'auto' {top: $top;} + @if $left != 'auto' {left: $left;} + @if $bottom != 'auto' {bottom: $bottom;} + @if $right != 'auto' {right: $right;} +} + +@mixin text-clip() { + overflow: hidden; +} + +@mixin selected-element() { + background-color: $unity-list-selected-background; + color: $unity-text-color-highlight; +} + +@mixin active-tab() { + background-color: $unity-background-dark-contrast; + color: $unity-text-color-highlight; +} + +@mixin inactive-tab() { + background-color: $unity-background-light-contrast; + color: $unity-text-color; +} + +@mixin button($top, $right, $bottom, $left) { + flex: 0 0 auto; + + @include padding($top, $right, $bottom, $left); + @include slice(4, 6, 4, 6); + + &.display-none { + position: absolute; + border-radius: 0; + width: 0; + height: 0; + min-height: 0; + max-height: 0; + min-width: 0; + max-width: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + min-width: 0; + @include border-box(0); + @include padding-box(0); + @include margin-box(0); + @include slice-box(0); + visibility: hidden; + } + + &:hover { + color: $unity-text-color; + } +} + +@mixin button-box($size) { + @include button($size, $size, $size, $size); +} + +//-------------------------------------------------------------------------------------------------- +// Font +//-------------------------------------------------------------------------------------------------- + +@mixin font-small() { + font-size: 9; +} + +@mixin font-normal() { + font-size: 12; +} + +//-------------------------------------------------------------------------------------------------- +// Styles +//-------------------------------------------------------------------------------------------------- + +#container { + -unity-position: absolute; + @include position(0, 0, 0, 0); +} + +.display-none { + position: absolute; + overflow: hidden; + border-radius: 0; + width: 0; + height: 0; + min-height: 0; + max-height: 0; + min-width: 0; + max-width: 0; + border-top-width: 0; + border-left-width: 0; + border-bottom-width: 0; + border-right-width: 0; + @include border-box(0); + @include padding-box(0); + @include margin-box(0); +} + +.row { + flex: 1 0 0; + flex-direction: row; +} + +.column { + flex: 1 0 0; + flex-direction: column; +} + +.tag { + @include border-box(1); + @include padding(1, 3, 1, 3); + @include font-small(); + border-radius: 5; + -unity-text-align: middle-center; + + border-color: #000000; + color: #000000; +} + +$spinner-large-size: 32; +$spinner-large-half-size: 16; +$spinner-normal-size: 14; +$spinner-normal-half-size: 7; +$toolbar-height: 18; + +#toolbarContainer { + flex: 0 0 auto; + flex-direction: row; + align-items: flex-start; + height: $toolbar-height; + + #toolbarView { + flex: 1 0 0; + flex-direction: row; + align-items: flex-start; + background-image: $toolbar-background; + margin-top: -1; + @include slice(1, 1, 1, 1); + + .toolbarButton { + flex: 1 0 0; + font-size: 9; + -unity-text-align: middle-center; + background-image: $toolbar-button-background; + @include button-box(0); + @include margin(0, -1, 0, 0); + @include padding(0, 5, 0, 5); + height: 19; + + &.space { + margin-left: 7; + } + + &.active { + background-image: $toolbar-button-active-background; + } + + &.pulldown { + + &:active { + background-image: $toolbar-button-background; + } + } + } + + #toolbarLeft { + flex: 0 0 auto; + flex-direction: row; + align-items: flex-start; + } + + #toolbarRight { + flex: 1 0 0; + flex-direction: row; + justify-content: flex-end; + + #toolbarSearch { + flex: 1 0 0; + height: $toolbar-height; + max-width: 500; + flex-direction: row; + @include margin(0, 5, 0, 0); + } + } + } +} + +#searchContainer { + flex: 1 0 0; + flex-direction: row; + align-items: center; + justify-content: flex-start; + height: 14; + @include margin(0, 0, 0, 0); + + #searchTextField { + flex: 1 0 0; + font-size: 9; + background-image: $toolbar-search-textfield-background; + @include margin(2, 5, 1, 5); + @include padding(2, 17, 1, 17); + @include slice(1, 0, 1, 14); + height: 14; + + &:focus { + background-image: $toolbar-search-textfield-focus-background; + } + + &.placeholder { + color: $unity-background-dark-contrast; + } + } + + #searchCancelButton { + width: 14; + height: 15; + background-image: $toolbar-search-cancel-off-background; + @include button-box(0); + @include slice(1, 14, 1, 0); + @include margin(3, 0, 2, -10); + @include padding-box(0); + @include border-box(0); + + &.on { + background-image: $toolbar-search-cancel-background; + } + + &:active { + background-image: $toolbar-search-cancel-active-background; + } + } +} + +#detailListView { + flex: 1 0 0; + flex-direction: row; + + .link { + color: $link-text-color; + background: rgba(0, 0, 0, 0); + background-image: none; + @include margin-box(0); + @include padding-box(0); + cursor: link; + } + + .emptyArea { + flex: 1 0 0; + @extend .column; + + .title { + -unity-text-align: middle-center; + font-size: 14; + } + + .loading { + -unity-position: relative; + @include position($spinner-normal-half-size, auto, auto, $spinner-normal-half-size); + + @include border-box(0); + @include padding-box(0); + @include margin-box(0); + @include slice-box(0); + + width: $spinner-normal-size; + height: $spinner-normal-size; + max-width: $spinner-normal-size; + max-height: $spinner-normal-size; + } + } + + #headerTitle { + flex: 1 0 0; + font-size: 12; + -unity-font-style: bold; + color: $unity-text-color; + } + + #headerCaret { + flex: 0 0 auto; + font-size: 12; + -unity-font-style: bold; + color: $unity-text-color; + min-width: 16; + } + + #spinnerContainer { + -unity-position: absolute; + @include position(3, 0, auto, 2); + width: 14; + + flex: 0.1 0 0; + flex-direction: column; + align-items: center; + } + + .loading { + -unity-position: relative; + @include position($spinner-normal-half-size, auto, auto, $spinner-normal-half-size); + + @include border-box(0); + @include padding-box(0); + @include margin-box(0); + @include slice-box(0); + + width: $spinner-normal-size; + height: $spinner-normal-size; + max-width: $spinner-normal-size; + max-height: $spinner-normal-size; + } + + .combo { + @extend .row; + @include margin-box(3); + @include padding-box(3); + + .popup { + @include padding(0, 0, 0, 8); + @include margin-box(0); + border-top-width-left-radius: 0; + border-bottom-width-left-radius: 0; + } + + .button { + flex: 1 0 0; // Make buttons take all the parent's free space + + @include font-normal(); + @include border-box(0); + @include margin-box(0); + @include padding(2, 6, 3, 6); + @include slice(4, $background-button-slice-middle, 4, $background-button-slice-middle); + + -unity-text-align: middle-center; + border-left-width: 0; + border-top-width: 0; + border-right-width: 0; + border-bottom-width: 0; + background-image: $background-mid-button; + + border-top-width-right-radius: 0; + border-bottom-width-right-radius: 0; + border-top-width-left-radius: 0; + border-bottom-width-left-radius: 0; + + &.selected { + background-image: $background-mid-button-selected; + color: $unity-text-color-highlight; + } + + &.first { + @include slice(4, $background-button-slice-right, 4, 6); + background-image: $background-left-button; + + &.selected { + background-image: $background-left-button-selected; + } + } + + &.last { + @include slice(4, 6, 4, $background-button-slice-left); + background-image: $background-right-button; + + &.selected { + background-image: $background-right-button-selected; + } + } + + + &.small { + flex: 0.5 0 0; + @include padding(0, 0, 0, 0); + } + } + } + + //-------------------------------------------------------------------------------------------------- + // Package List + //-------------------------------------------------------------------------------------------------- + #packageListGroup { + width: 270; + + #listContainerOuter { + @extend .column; + } + + #groupContainerOuter { + + #headerContainer { + flex: 1 0 0; + flex-direction: row; + align-items: center; + border-color: rgba(0,0,0, 0.5); + + #headerTitle { + height: 0; + @include margin-box(0); + @include padding-box(0); + @include border-box(0); + } + } + + #groupContainer { + @include margin(0, 0, 0, 0); + } + } + + #packageList, #listContainer, #listGroups { + @extend .column; + } + + #scrollView { + @extend .column; + + #VerticalScroller { + bottom: 0; + } + + #HorizontalScroller { + height: 0; + } + + #ContentViewport { + bottom: 0; + + #ContentView { + right: 0; + left: 0; + } + } + } + + #noResult { + #noResultText { + -unity-word-wrap: true; + } + } + } + + //-------------------------------------------------------------------------------------------------- + // Package Item + //-------------------------------------------------------------------------------------------------- + .package { + flex: 1 0 0; + flex-direction: row; + align-items: center; + @include margin(0, 0, 0, 0); + border-color: rgba(0,0,0, 0.5); + border-bottom-width: 1; + + &.selected { + @include selected-element(); + + #packageName, #packageVersion { + color: $unity-text-color-highlight; + } + } + + .status { + flex: 0 0 14; + width: 14; + height: 14; + @include margin(auto, 0, auto, 2); + + &.installed { + background-image: $installed-package-background; + &.no-icon { + background-image: none; + } + } + + &.outdated { + background-image: $background-status-outdated; + &.no-icon { + background-image: none; + } + } + + &.inprogress { + background-image: none; + } + + &.error { + background-image: $background-status-error; + } + } + + .name { + flex: 1 0 0; + @include font-normal(); + @include margin(auto, 5, auto, 0); + @include text-clip(); + } + + .version { + flex: 0 0 auto; + @include margin(auto, 5, auto, 0); + @include font-small; + } + } + + //-------------------------------------------------------------------------------------------------- + // Package Details + //-------------------------------------------------------------------------------------------------- + #detailsGroup { + flex: 1 0 0; + border-left-width: 1px; + border-color: rgba(0,0,0, 0.5); + + #detailsContainer { + flex: 1 0 0; + flex-direction: column; + -unity-position: relative; + } + } + + #detailView { + flex: 1 0 0; + + #VerticalScroller { + bottom: 0; + } + + #ContentViewport { + + #ContentView { + -unity-position: absolute; + @include position(0, 0, auto, 0); + } + } + + .detail { + flex: 1 0 0; + flex-direction: column; + @include padding-box(5); + + .header { + flex: 1 0 0; + flex-direction: row; + align-items: flex-start; + + margin-bottom: 8; + + #titleContainer { + flex: 0.9 0 0; + + #detailTitle { + font-size: 18; + -unity-font-style: bold; + -unity-word-wrap: true; + @include margin(0, 0, 0, 4); + } + } + + $controls-height: 19; + #detailsControls { + flex: 1 0 0; + height: $controls-height; + flex-direction: row; + align-items: center; + flex-wrap: wrap; + @include margin(3, 0, 0, 0); + } + + #updateCombo { + flex: 1 0 0; + height: $controls-height; + align-items: center; + @include margin(0, 0, 0, 0); + @include padding(0, 0, 0, 0); + + #update { + flex: 0 0 auto; + } + + #updateDropdownContainer { + min-width: 65; + max-width: 150; + height: $controls-height; + flex: 0 0 auto; + + .popup { + @include font-normal(); + height: $controls-height; + + &:focus { + background-image: $popup-background; + } + + &:hover { + .textElement { + color: $unity-text-color; + } + } + + .textElement { + margin-top: 2; + } + } + } + + .action { + flex: 0 0 auto; + @include margin-box(0); + @include font-normal(); + @include padding(2, 4, 3, 4); + right: -3; + &:hover { + color: $unity-text-color; + } + } + } + + #updateContainer { + height: $controls-height; + flex: 1 0 0; + align-items: flex-end; + + @include padding-box(0); + } + + + + .button { + height: $controls-height; + @include font-normal(); + @include button(3,3,4,3); + } + } + + #detailVersion { + font-size: 16; + max-height: 30; + } + + #detailName { + flex: 1 0 0; + max-height: 20; + -unity-font-style: italic; + } + + #detailPackageStatus { + flex: 1 0 0; + -unity-font-style: bold; + -unity-word-wrap: true; + } + + #detailTag { + width: 60; + @include font-normal(); + border-radius: 5; + border-color: rgb(180, 180, 180); + @include border-box(2); + -unity-text-align: middle-center; + } + + #detailDesc, #detailModuleReference { + flex: 1 0 0; + @include font-normal(); + -unity-word-wrap: true; + + &.empty { + -unity-font-style: italic; + } + } + + #detailAuthor { + flex: 1 0 0; + @include font-normal(); + -unity-word-wrap: true; + } + + #detailCategory { + flex: 1 0 0; + @include font-normal(); + -unity-word-wrap: true; + + @include margin(auto, auto, 5, auto); + } + + #changeLogContainer, #viewLicensesContainer { + flex: 0 0 auto; + flex-direction: row; + } + + #detailActions, .detailActions { + flex: 0 0 auto; + flex-direction: row; + margin-left: 2; + + @extend .row; + + .detailAction { + @include margin(auto, 0, auto, 0); + @include padding(auto, 2, auto, 2); + border-left-width: 2; + border-right-width: 2; + } + + .detailActionSeparator { + @include margin(auto, 0, auto, 0); + @include padding(auto, 0, auto, 0); + border-left-width: 0; + border-right-width: 0; + } + + #thirdPartyNoticeLabel { + @include margin(4, 0, 4, 0); + @include padding-box(0); + -unity-word-wrap: true; + } + + #viewThirdParty { + border-right-width: 0; + } + } + + .versionContainer { + @extend .row; + align-items: center; + justify-content: flex-start; + + #detailVersion { + flex: 0 0 auto; + } + } + + .tag { + border-color: $package-tag-color; + color: $package-tag-color; + + &.verified { + border-color: $package-tag-recommended-color; + color: $package-tag-recommended-color; + } + } + + .tagLines { + } + + .tagLine { + flex: 0 0 auto; + flex-direction: row; + } + + .tagContainer { + } + } + } + + #detailError { + -unity-position: absolute; + @include position(5, 5, auto, 5); + min-height: 200; + -unity-word-wrap: true; + + &.display-none { + @include position(0, 0, 0, 0); + width: 0; + height: 0; + min-height: 0; + max-height: 0; + @include border-box(0); + @include padding-box(0); + @include margin-box(0); + } + } + + #packageStatusBar { + -unity-position: relative; + + flex: 0 0 auto; + @include margin(2, 0, 0, 0); + + border-color: rgba(0, 0, 0, 0.5); + @include border(1, 0, 0, 0); + } + + #statusBarContainer { + flex-direction: row; + align-items: center; + justify-content: space-between; + + #loadingContainer{ + + flex-direction: row; + align-items: center; + justify-content: flex-start; + + margin-left: 2; + + #loadingIcon { + background-image: $background-status-error; + width: 16; + height: 16; + margin-left: -12; + margin-right: 0; + } + + #loadingText { + padding-left: 2; + -unity-font-style: italic; + + &.icon { + margin-left: 0; + } + } + } + + #moreAddOptionsButton { + font-size: 16; + background-image: none; + @include margin(0, 0, -2, 0); + @include padding(3, 6, 6, 6); + border-color: rgba(0, 0, 0, 0.5); + @include border(0, 1, 0, 0); + } + } + + #packageAddFromUrlField { + -unity-position: absolute; + @include position(-35, 0, 0, 0); + } + + #addFromUrlFieldContainer { + border-color: rgba(0, 0, 0, 0.5); + @include border(1, 0, 1, 0); + + flex-direction: row; + justify-content: space-between; + align-items: center; + + height: 35; + background-color: $unity-background; + + #urlTextField { + flex: 1 0 0; + height: 20; + -unity-text-align: middle-left; + } + + #addFromUrlButton { + flex: 0 0 auto; + height: 20; + } + } +} + +.alert { + background-color: rgba(200,0,0,0.8); + border-color: #FF0000; + flex-direction: row; + + @include border-box(1); + @include padding(5, 10, 5, 10); + + #alertMessage { + flex: 1 0 0; + color: $unity-text-color-highlight; + -unity-word-wrap: true; + @include text-clip(); + } + + #close { + flex: 0 0 auto; + max-height: 30; + @include position(auto, auto, auto, 5); + @include button(3,3,4,3); + } +} + +.spinner { + flex: 0 0 auto; + @include position(-$spinner-normal-half-size, auto, auto, -$spinner-normal-half-size); + + min-width: $spinner-normal-size; + min-height: $spinner-normal-size; + max-width: $spinner-normal-size; + max-height: $spinner-normal-size; + background-image: $background-spinner-normal; +} + +.largeSpinner { + flex: 0 0 auto; + @include position(-$spinner-large-half-size, auto, auto, -$spinner-large-half-size); + + min-width: $spinner-large-size; + min-height: $spinner-large-size; + max-width: $spinner-large-size; + max-height: $spinner-large-size; + background-image: $background-spinner-large; +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/_common.scss.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/_common.scss.meta new file mode 100644 index 0000000000000000000000000000000000000000..8acfd266c5fdbd89eca861fd9254b1c3c5a6df60 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Styles/_common.scss.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e45f79867376940b7ba31502238d8efa +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates.meta new file mode 100644 index 0000000000000000000000000000000000000000..79b2a2dc86fd1a125f59685f48453e717e449af3 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 1cf679539c5e5499e8856aaacf1fc32f +folderAsset: yes +timeCreated: 1502292048 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/Alert.uxml b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/Alert.uxml new file mode 100644 index 0000000000000000000000000000000000000000..1eb924840c5ab1777ebbd4a05f3db31163566464 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/Alert.uxml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<engine:UXML + xmlns:engine="UnityEngine.Experimental.UIElements" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="UnityEngine.Experimental.UIElements UIElementsSchema/UnityEngine.Experimental.UIElements.xsd"> + <engine:VisualElement name="alertContainer" class="alert"> + <engine:Label name="alertMessage"/> + <engine:Button name="close" text="Close" class="button"/> + </engine:VisualElement> +</engine:UXML> diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/Alert.uxml.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/Alert.uxml.meta new file mode 100644 index 0000000000000000000000000000000000000000..291949aeb78aa4a1654165832346e12592b442ed --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/Alert.uxml.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4f768b64e6c37495699fffe3007e4379 +ScriptedImporter: + fileIDToRecycleName: + 11400000: tree + 11400002: inlineStyle + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageAddFromUrlField.uxml b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageAddFromUrlField.uxml new file mode 100644 index 0000000000000000000000000000000000000000..84a52309830e5ebaedbbd66fe63b0c71ff750fff --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageAddFromUrlField.uxml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<engine:UXML + xmlns:engine="UnityEngine.Experimental.UIElements" + xmlns:upm="UnityEditor.PackageManager.UI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="UnityEngine.Experimental.UIElements UIElementsSchema/UnityEngine.Experimental.UIElements.xsd + UnityEditor.PackageManager.UI UIElementsSchema/UnityEditor.PackageManager.UI.xsd"> + <engine:VisualElement name="addFromUrlFieldContainer" focus-index="0"> + <engine:TextField name="urlTextField"/> + <engine:Button name="addFromUrlButton" text="Add"/> + </engine:VisualElement> +</engine:UXML> + diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageAddFromUrlField.uxml.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageAddFromUrlField.uxml.meta new file mode 100644 index 0000000000000000000000000000000000000000..f186736783d87a130559630244ef32af0d1ec376 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageAddFromUrlField.uxml.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 97dff1b5ae41ee84886ae7a80ae21499 +ScriptedImporter: + fileIDToRecycleName: + 11400000: tree + 11400002: inlineStyle + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageDetails.uxml b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageDetails.uxml new file mode 100644 index 0000000000000000000000000000000000000000..709bddd328b16d7e471bd2f28594b4c5bdd098e0 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageDetails.uxml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="utf-8"?> +<engine:UXML + xmlns:engine="UnityEngine.Experimental.UIElements" + xmlns:upm="UnityEditor.PackageManager.UI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="UnityEngine.Experimental.UIElements UIElementsSchema/UnityEngine.Experimental.UIElements.xsd + UnityEditor.PackageManager.UI UIElementsSchema/UnityEditor.PackageManager.UI.xsd"> + <engine:VisualElement name="detailsContainer"> + <engine:ScrollView name="detailView"> + <engine:VisualElement name="detail" class="detail"> + <engine:VisualElement class="header"> + <engine:VisualElement name="titleContainer"> + <engine:Label name="detailTitle"/> + </engine:VisualElement> + <engine:VisualElement name="detailsControls"> + <engine:VisualElement name="updateContainer"> + <engine:VisualElement name="updateCombo" class="combo"> + <engine:Button name="update" text="Update" class="action"/> + <engine:VisualElement name="updateDropdownContainer" class="button last"/> + </engine:VisualElement> + </engine:VisualElement> + <engine:Button name="updateBuiltIn" text="Enable" class="button"/> + <engine:Button name="remove" text="Remove" class="button"/> + </engine:VisualElement> + </engine:VisualElement> + <engine:VisualElement class="versionContainer"> + <engine:Label name="detailVersion"/> + <engine:VisualElement name="tag-inDevelopment" class="tagLine display-none"> + <engine:Label name="tag" class="tag" text="in development"/> + </engine:VisualElement> + <engine:VisualElement name="tag-local" class="tagLine display-none"> + <engine:Label name="tag" class="tag" text="local"/> + </engine:VisualElement> + <engine:VisualElement name="tag-preview" class="tagLine display-none"> + <engine:Label name="tag" class="tag" text="preview"/> + </engine:VisualElement> + <engine:VisualElement name="tag-verified" class="tagLine display-none"> + <engine:Label name="tagVerify" class="tag verified" text="verified"/> + </engine:VisualElement> + </engine:VisualElement> + + <engine:VisualElement name="detailCustomContainer" class="display-none"/> + + <engine:VisualElement name="documentationContainer" class="display-none"> + <engine:VisualElement name="detailActions"> + <engine:Button name="viewDocumentation" class="detailAction link" text="View documentation"/> + <engine:VisualElement name="changeLogContainer"> + <engine:Label name="changelogSeparator" class="detailActionSeparator" text="-"/> + <engine:Button name="viewChangelog" class="detailAction link" text="View changelog"/> + </engine:VisualElement> + <engine:VisualElement name="viewLicensesContainer"> + <engine:Label name="thirdPartySeparator" class="detailActionSeparator" text="-"/> + <engine:Button name="viewLicenses" class="link" text="View licenses"/> + </engine:VisualElement> + </engine:VisualElement> + </engine:VisualElement> + + <engine:Label name="detailName"/> + <engine:Label name="detailAuthor"/> + <engine:Label name="detailModuleReference"/> + <engine:Label name="detailDesc"/> + + </engine:VisualElement> + </engine:ScrollView> + <upm:Alert name="detailError" class="display-none"/> + </engine:VisualElement> +</engine:UXML> diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageDetails.uxml.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageDetails.uxml.meta new file mode 100644 index 0000000000000000000000000000000000000000..f9bfba14c5c0539484b791c737e01f495a54707c --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageDetails.uxml.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 93c1370867fcb45079592da39e0994c5 +ScriptedImporter: + fileIDToRecycleName: + 11400000: tree + 11400002: inlineStyle + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageGroup.uxml b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageGroup.uxml new file mode 100644 index 0000000000000000000000000000000000000000..15a9e7746b2ac70a0555707b2b9bd11790c191b7 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageGroup.uxml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-8"?> +<engine:UXML + xmlns:engine="UnityEngine.Experimental.UIElements" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="UnityEngine.Experimental.UIElements UIElementsSchema/UnityEngine.Experimental.UIElements.xsd"> + <engine:VisualElement name="groupContainerOuter"> + <engine:VisualElement name="headerContainer"> + <engine:Label name="headerTitle" text="Default" /> + </engine:VisualElement> + + <engine:VisualElement name="groupContainer" /> + </engine:VisualElement> +</engine:UXML> diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageGroup.uxml.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageGroup.uxml.meta new file mode 100644 index 0000000000000000000000000000000000000000..31eed0fba6121ef371da6a8104c81ce96d4f387d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageGroup.uxml.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 25ebe415cc14c4f4ea15c34a796b75bb +ScriptedImporter: + fileIDToRecycleName: + 11400000: tree + 11400002: inlineStyle + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageItem.uxml b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageItem.uxml new file mode 100644 index 0000000000000000000000000000000000000000..499aa31e349b7cb023a4adbe2a5d2e9f22a5dbb9 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageItem.uxml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<engine:UXML + xmlns:engine="UnityEngine.Experimental.UIElements" + xmlns:upm="UnityEditor.PackageManager.UI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="UnityEngine.Experimental.UIElements UIElementsSchema/UnityEngine.Experimental.UIElements.xsd + UnityEditor.PackageManager.UI UIElementsSchema/UnityEditor.PackageManager.UI.xsd"> + <engine:VisualElement name="packageContainer" class="package"> + <engine:VisualElement name="spinnerContainer"> + <engine:VisualElement name="loadingSpinnerContainer" class="loading"> + <upm:LoadingSpinner name="packageSpinner" class="spinner"/> + </engine:VisualElement> + </engine:VisualElement> + <engine:Label name="packageState" class="status" /> + <engine:Label name="packageName" class="name" /> + <engine:Label name="packageVersion" class="version"/> + </engine:VisualElement> +</engine:UXML> diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageItem.uxml.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageItem.uxml.meta new file mode 100644 index 0000000000000000000000000000000000000000..1102a59f7caa9d17bc8f93df77fa0304ff09ff78 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageItem.uxml.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 10145f279f90346bbb61712ff585828b +ScriptedImporter: + fileIDToRecycleName: + 11400000: tree + 11400002: inlineStyle + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageList.uxml b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageList.uxml new file mode 100644 index 0000000000000000000000000000000000000000..05956ed6d2bff2e5a1e9c4b3e352447ffd56e4ad --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageList.uxml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<engine:UXML + xmlns:engine="UnityEngine.Experimental.UIElements" + xmlns:upm="UnityEditor.PackageManager.UI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="UnityEngine.Experimental.UIElements UIElementsSchema/UnityEngine.Experimental.UIElements.xsd + UnityEditor.PackageManager.UI UIElementsSchema/UnityEditor.PackageManager.UI.xsd"> + <engine:VisualElement name="listContainerOuter"> + <engine:VisualElement name="listContainer"> + <!-- Specifying the vertical page size a workaround for https://fogbugz.unity3d.com/f/cases/1029430/ --> + <engine:ScrollView name="scrollView" vertical-page-size="10"/> + <engine:VisualElement name="emptyArea" class="list emptyArea"> + <engine:Label class="title" text="There are no packages."/> + </engine:VisualElement> + <engine:VisualElement name="noResult" class="list emptyArea"> + <engine:Label name="noResultText" class="title"/> + </engine:VisualElement> + </engine:VisualElement> + </engine:VisualElement> +</engine:UXML> diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageList.uxml.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageList.uxml.meta new file mode 100644 index 0000000000000000000000000000000000000000..3092d2119d8118847c9f5c83f66ebb6e08e99312 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageList.uxml.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 46c02d8d6499b4309ac1ec5d0b818585 +ScriptedImporter: + fileIDToRecycleName: + 11400000: tree + 11400002: inlineStyle + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageManagerToolbar.uxml b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageManagerToolbar.uxml new file mode 100644 index 0000000000000000000000000000000000000000..0283a3383653a9d4cf6a5f53c60da8037d6e3e54 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageManagerToolbar.uxml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<engine:UXML + xmlns:engine="UnityEngine.Experimental.UIElements" + xmlns:upm="UnityEditor.PackageManager.UI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="UnityEngine.Experimental.UIElements UIElementsSchema/UnityEngine.Experimental.UIElements.xsd + UnityEditor.PackageManager.UI UIElementsSchema/UnityEditor.PackageManager.UI.xsd"> + <engine:VisualElement name="toolbarView"> + <engine:VisualElement name="toolbarLeft"> + <engine:Label name="toolbarFilterButton" class="toolbarButton space pulldown" text="All Packages â–¾"/> + <engine:Label class="toolbarButton"/> + </engine:VisualElement> + <engine:VisualElement name="toolbarRight"> + <engine:Label name="toolbarAdvancedButton" class="toolbarButton pulldown" text="Advanced â–¾"/> + <upm:PackageSearchToolbar name="toolbarSearch"/> + </engine:VisualElement> + </engine:VisualElement> +</engine:UXML> diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageManagerToolbar.uxml.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageManagerToolbar.uxml.meta new file mode 100644 index 0000000000000000000000000000000000000000..00894beb4009d6f97cdb7f356d50dfbe42859c0a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageManagerToolbar.uxml.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3aba9fe1ad29b42ffb0eea781318a626 +ScriptedImporter: + fileIDToRecycleName: + 11400000: tree + 11400002: inlineStyle + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageManagerWindow.uxml b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageManagerWindow.uxml new file mode 100644 index 0000000000000000000000000000000000000000..12d15040d1b17984f1f8c940298f78211492b98e --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageManagerWindow.uxml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<engine:UXML + xmlns:engine="UnityEngine.Experimental.UIElements" + xmlns:upm="UnityEditor.PackageManager.UI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="UnityEngine.Experimental.UIElements UIElementsSchema/UnityEngine.Experimental.UIElements.xsd + UnityEditor.PackageManager.UI UIElementsSchema/UnityEditor.PackageManager.UI.xsd"> + <engine:VisualElement name="container"> + <upm:PackageManagerToolbar name="toolbarContainer"/> + <engine:VisualElement name="detailListView"> + <engine:VisualElement name="packageListGroup"> + <upm:PackageList name="packageList" /> + <upm:PackageStatusBar name="packageStatusBar" /> + </engine:VisualElement> + <upm:PackageDetails name="detailsGroup" /> + </engine:VisualElement> + </engine:VisualElement> +</engine:UXML> diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageManagerWindow.uxml.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageManagerWindow.uxml.meta new file mode 100644 index 0000000000000000000000000000000000000000..1dcb82aba45deb7f1e1b55df87fe6b29d01029b1 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageManagerWindow.uxml.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a8d9e44eff3f447db9448925617ccb44 +ScriptedImporter: + fileIDToRecycleName: + 11400000: tree + 11400002: inlineStyle + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageSearchToolbar.uxml b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageSearchToolbar.uxml new file mode 100644 index 0000000000000000000000000000000000000000..322403898c71e489a12d82aeb5376489dabea1c5 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageSearchToolbar.uxml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<engine:UXML + xmlns:engine="UnityEngine.Experimental.UIElements" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="UnityEngine.Experimental.UIElements UIElementsSchema/UnityEngine.Experimental.UIElements.xsd"> + <engine:VisualElement name="searchContainer"> + <engine:TextField name="searchTextField"/> + <engine:Button name="searchCancelButton"/> + </engine:VisualElement> +</engine:UXML> diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageSearchToolbar.uxml.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageSearchToolbar.uxml.meta new file mode 100644 index 0000000000000000000000000000000000000000..272fe81f89f809a4618a90cb68ca62ad1d07454b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageSearchToolbar.uxml.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: cd44c1bc0fa624a39aa784af44c62180 +ScriptedImporter: + fileIDToRecycleName: + 11400000: tree + 11400002: inlineStyle + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageStatusBar.uxml b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageStatusBar.uxml new file mode 100644 index 0000000000000000000000000000000000000000..2a37506d7e7df7da8f5b707712738abd83a7ac93 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageStatusBar.uxml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<engine:UXML + xmlns:engine="UnityEngine.Experimental.UIElements" + xmlns:upm="UnityEditor.PackageManager.UI" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="UnityEngine.Experimental.UIElements UIElementsSchema/UnityEngine.Experimental.UIElements.xsd + UnityEditor.PackageManager.UI UIElementsSchema/UnityEditor.PackageManager.UI.xsd"> + <engine:VisualElement name="statusBarContainer"> + <engine:VisualElement name="loadingContainer"> + <engine:VisualElement name="loadingSpinnerContainer" class="loading"> + <upm:LoadingSpinner name="packageSpinner" class="spinner"/> + </engine:VisualElement> + <engine:Label name="loadingIcon"/> + <engine:Label name="loadingText"/> + </engine:VisualElement> + <engine:Button name="moreAddOptionsButton" text="+"/> + </engine:VisualElement> + <upm:PackageAddFromUrlField name="packageAddFromUrlField"/> +</engine:UXML> + diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageStatusBar.uxml.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageStatusBar.uxml.meta new file mode 100644 index 0000000000000000000000000000000000000000..9a037be174871db7f1f664b5c4588e5c510ff4f5 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/PackageStatusBar.uxml.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: bbec1324b05a54939ad2fea2d7e11063 +ScriptedImporter: + fileIDToRecycleName: + 11400000: tree + 11400002: inlineStyle + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: + script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema.meta new file mode 100644 index 0000000000000000000000000000000000000000..89278cd326da1bb3e60ec8d6add432e9985d96d2 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3a2bf0128e2dd664f91dfba49e36a012 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema/UIElements.xsd b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema/UIElements.xsd new file mode 100644 index 0000000000000000000000000000000000000000..58841e7470b5c67979ea56cb2183caf981cb8766 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema/UIElements.xsd @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<xs:schema xmlns:upm="UnityEditor.PackageManager.UI" xmlns:engine="UnityEngine.Experimental.UIElements" xmlns:editor="UnityEditor.Experimental.UIElements" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:import schemaLocation="UnityEngine.Experimental.UIElements.xsd" namespace="UnityEngine.Experimental.UIElements" /> + <xs:import schemaLocation="UnityEditor.PackageManager.UI.xsd" namespace="UnityEditor.PackageManager.UI" /> + <xs:import schemaLocation="UnityEditor.Experimental.UIElements.xsd" namespace="UnityEditor.Experimental.UIElements" /> +</xs:schema> \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema/UIElements.xsd.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema/UIElements.xsd.meta new file mode 100644 index 0000000000000000000000000000000000000000..7bd10ba317d4fda4d0d73a4b6e0e6962e6e50ee9 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema/UIElements.xsd.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7d22934bf84ccd14082fd2d5a9f5951e +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema/UnityEditor.Experimental.UIElements.xsd b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema/UnityEditor.Experimental.UIElements.xsd new file mode 100644 index 0000000000000000000000000000000000000000..4b11a3a58e096e139817f19dd7cfc0d6984b5b94 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema/UnityEditor.Experimental.UIElements.xsd @@ -0,0 +1,173 @@ +<?xml version="1.0" encoding="utf-8"?> +<xs:schema xmlns:upm="UnityEditor.PackageManager.UI" xmlns:engine="UnityEngine.Experimental.UIElements" xmlns:editor="UnityEditor.Experimental.UIElements" elementFormDefault="qualified" targetNamespace="UnityEditor.Experimental.UIElements" xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:import schemaLocation="UnityEngine.Experimental.UIElements.xsd" namespace="UnityEngine.Experimental.UIElements" /> + <xs:complexType name="DoubleFieldType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" /> + <xs:attribute default="" name="text" type="xs:string" use="optional" /> + <xs:attribute default="0" name="maxLength" type="xs:int" use="optional" /> + <xs:attribute default="false" name="password" type="xs:boolean" use="optional" /> + <xs:attribute default="" name="maskCharacter" type="xs:string" use="optional" /> + <xs:attribute default="0" name="value" type="xs:float" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="DoubleField" substitutionGroup="engine:VisualElement" type="editor:DoubleFieldType" /> + <xs:complexType name="IntegerFieldType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" /> + <xs:attribute default="" name="text" type="xs:string" use="optional" /> + <xs:attribute default="0" name="maxLength" type="xs:int" use="optional" /> + <xs:attribute default="false" name="password" type="xs:boolean" use="optional" /> + <xs:attribute default="" name="maskCharacter" type="xs:string" use="optional" /> + <xs:attribute default="0" name="value" type="xs:int" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="IntegerField" substitutionGroup="engine:VisualElement" type="editor:IntegerFieldType" /> + <xs:complexType name="CurveFieldType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="CurveField" substitutionGroup="engine:VisualElement" type="editor:CurveFieldType" /> + <xs:complexType name="ObjectFieldType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" /> + <xs:attribute default="true" name="allowSceneObjects" type="xs:boolean" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="ObjectField" substitutionGroup="engine:VisualElement" type="editor:ObjectFieldType" /> + <xs:complexType name="ColorFieldType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" /> + <xs:attribute default="RGBA(0.000, 0.000, 0.000, 1.000)" name="value" type="xs:string" use="optional" /> + <xs:attribute default="true" name="showEyeDropper" type="xs:boolean" use="optional" /> + <xs:attribute default="true" name="showAlpha" type="xs:boolean" use="optional" /> + <xs:attribute default="false" name="hdr" type="xs:boolean" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="ColorField" substitutionGroup="engine:VisualElement" type="editor:ColorFieldType" /> + <xs:complexType name="EnumFieldType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" /> + <xs:attribute default="" name="text" type="xs:string" use="optional" /> + <xs:attribute name="type" type="xs:string" use="required" /> + <xs:attribute default="" name="value" type="xs:string" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="EnumField" substitutionGroup="engine:VisualElement" type="editor:EnumFieldType" /> + <xs:complexType name="GradientFieldType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="GradientField" substitutionGroup="engine:VisualElement" type="editor:GradientFieldType" /> + <xs:complexType name="RectFieldType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" /> + <xs:attribute default="0" name="x" type="xs:float" use="optional" /> + <xs:attribute default="0" name="y" type="xs:float" use="optional" /> + <xs:attribute default="0" name="w" type="xs:float" use="optional" /> + <xs:attribute default="0" name="h" type="xs:float" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="RectField" substitutionGroup="engine:VisualElement" type="editor:RectFieldType" /> + <xs:complexType name="Vector2FieldType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" /> + <xs:attribute default="0" name="x" type="xs:float" use="optional" /> + <xs:attribute default="0" name="y" type="xs:float" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="Vector2Field" substitutionGroup="engine:VisualElement" type="editor:Vector2FieldType" /> + <xs:complexType name="Vector3FieldType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" /> + <xs:attribute default="0" name="x" type="xs:float" use="optional" /> + <xs:attribute default="0" name="y" type="xs:float" use="optional" /> + <xs:attribute default="0" name="z" type="xs:float" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="Vector3Field" substitutionGroup="engine:VisualElement" type="editor:Vector3FieldType" /> + <xs:complexType name="Vector4FieldType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" /> + <xs:attribute default="0" name="x" type="xs:float" use="optional" /> + <xs:attribute default="0" name="y" type="xs:float" use="optional" /> + <xs:attribute default="0" name="z" type="xs:float" use="optional" /> + <xs:attribute default="0" name="w" type="xs:float" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="Vector4Field" substitutionGroup="engine:VisualElement" type="editor:Vector4FieldType" /> + <xs:complexType name="BoundsFieldType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" /> + <xs:attribute default="0" name="cx" type="xs:float" use="optional" /> + <xs:attribute default="0" name="cy" type="xs:float" use="optional" /> + <xs:attribute default="0" name="cz" type="xs:float" use="optional" /> + <xs:attribute default="0" name="ex" type="xs:float" use="optional" /> + <xs:attribute default="0" name="ey" type="xs:float" use="optional" /> + <xs:attribute default="0" name="ez" type="xs:float" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="BoundsField" substitutionGroup="engine:VisualElement" type="editor:BoundsFieldType" /> +</xs:schema> \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema/UnityEditor.Experimental.UIElements.xsd.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema/UnityEditor.Experimental.UIElements.xsd.meta new file mode 100644 index 0000000000000000000000000000000000000000..315df546fb94bb4d146780fcae90fefbb13eebd3 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema/UnityEditor.Experimental.UIElements.xsd.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 86d0242b70e6ab24aaf5a0e67edf2a61 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema/UnityEditor.PackageManager.UI.xsd b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema/UnityEditor.PackageManager.UI.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c0200c5b6af115664ab26d780ccfd369d5927440 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema/UnityEditor.PackageManager.UI.xsd @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="utf-8"?> +<xs:schema xmlns:upm="UnityEditor.PackageManager.UI" xmlns:engine="UnityEngine.Experimental.UIElements" xmlns:editor="UnityEditor.Experimental.UIElements" elementFormDefault="qualified" targetNamespace="UnityEditor.PackageManager.UI" xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:import schemaLocation="UnityEngine.Experimental.UIElements.xsd" namespace="UnityEngine.Experimental.UIElements" /> + <xs:complexType name="AlertType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:sequence minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="engine:VisualElement" /> + </xs:sequence> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" /> + <xs:attribute default="" name="text" type="xs:string" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="Alert" substitutionGroup="engine:VisualElement" type="upm:AlertType" /> + <xs:complexType name="LoadingSpinnerType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="LoadingSpinner" substitutionGroup="engine:VisualElement" type="upm:LoadingSpinnerType" /> + <xs:complexType name="PackageDetailsType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:sequence minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="engine:VisualElement" /> + </xs:sequence> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="PackageDetails" substitutionGroup="engine:VisualElement" type="upm:PackageDetailsType" /> + <xs:complexType name="PackageGroupType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:sequence minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="engine:VisualElement" /> + </xs:sequence> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="PackageGroup" substitutionGroup="engine:VisualElement" type="upm:PackageGroupType" /> + <xs:complexType name="PackageItemType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:sequence minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="engine:VisualElement" /> + </xs:sequence> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="PackageItem" substitutionGroup="engine:VisualElement" type="upm:PackageItemType" /> + <xs:complexType name="PackageListType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:sequence minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="engine:VisualElement" /> + </xs:sequence> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="PackageList" substitutionGroup="engine:VisualElement" type="upm:PackageListType" /> + <xs:complexType name="PackageSearchFilterTabsType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:sequence minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="engine:VisualElement" /> + </xs:sequence> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="PackageSearchFilterTabs" substitutionGroup="engine:VisualElement" type="upm:PackageSearchFilterTabsType" /> +</xs:schema> \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema/UnityEditor.PackageManager.UI.xsd.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema/UnityEditor.PackageManager.UI.xsd.meta new file mode 100644 index 0000000000000000000000000000000000000000..964349cb43c53ae199eb0884d7b62a4673b1f76f --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema/UnityEditor.PackageManager.UI.xsd.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3abc8faab9f5cbe4db0336c99fef85ca +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema/UnityEngine.Experimental.UIElements.xsd b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema/UnityEngine.Experimental.UIElements.xsd new file mode 100644 index 0000000000000000000000000000000000000000..59b13379f56883fb33f2f428fd33fb9223803499 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema/UnityEngine.Experimental.UIElements.xsd @@ -0,0 +1,269 @@ +<?xml version="1.0" encoding="utf-8"?> +<xs:schema xmlns:upm="UnityEditor.PackageManager.UI" xmlns:engine="UnityEngine.Experimental.UIElements" xmlns:editor="UnityEditor.Experimental.UIElements" elementFormDefault="qualified" targetNamespace="UnityEngine.Experimental.UIElements" xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:complexType name="UXMLType"> + <xs:complexContent mixed="false"> + <xs:restriction base="xs:anyType"> + <xs:sequence minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="engine:VisualElement" /> + </xs:sequence> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="UXML" type="engine:UXMLType" /> + <xs:simpleType name="VisualElement_pickingMode_Type"> + <xs:restriction base="xs:string"> + <xs:enumeration value="Position" /> + <xs:enumeration value="Ignore" /> + </xs:restriction> + </xs:simpleType> + <xs:complexType name="VisualElementType"> + <xs:complexContent mixed="false"> + <xs:restriction base="xs:anyType"> + <xs:sequence minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="engine:VisualElement" /> + </xs:sequence> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="VisualElement" type="engine:VisualElementType" /> + <xs:complexType name="IMGUIContainerType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="IMGUIContainer" substitutionGroup="engine:VisualElement" type="engine:IMGUIContainerType" /> + <xs:complexType name="ImageType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="Image" substitutionGroup="engine:VisualElement" type="engine:ImageType" /> + <xs:complexType name="LabelType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" /> + <xs:attribute default="" name="text" type="xs:string" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="Label" substitutionGroup="engine:VisualElement" type="engine:LabelType" /> + <xs:complexType name="RepeatButtonType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" /> + <xs:attribute default="" name="text" type="xs:string" use="optional" /> + <xs:attribute default="0" name="delay" type="xs:long" use="optional" /> + <xs:attribute default="0" name="interval" type="xs:long" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="RepeatButton" substitutionGroup="engine:VisualElement" type="engine:RepeatButtonType" /> + <xs:complexType name="ScrollerButtonType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" /> + <xs:attribute default="0" name="delay" type="xs:long" use="optional" /> + <xs:attribute default="0" name="interval" type="xs:long" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="ScrollerButton" substitutionGroup="engine:VisualElement" type="engine:ScrollerButtonType" /> + <xs:complexType name="ScrollViewType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:sequence minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="engine:VisualElement" /> + </xs:sequence> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" /> + <xs:attribute default="false" name="showHorizontalScroller" type="xs:boolean" use="optional" /> + <xs:attribute default="false" name="showVerticalScroller" type="xs:boolean" use="optional" /> + <xs:attribute default="0" name="horizontalLowValue" type="xs:float" use="optional" /> + <xs:attribute default="0" name="horizontalHighValue" type="xs:float" use="optional" /> + <xs:attribute default="0" name="horizontalPageSize" type="xs:float" use="optional" /> + <xs:attribute default="0" name="horizontalValue" type="xs:float" use="optional" /> + <xs:attribute default="0" name="verticalLowValue" type="xs:float" use="optional" /> + <xs:attribute default="0" name="verticalHighValue" type="xs:float" use="optional" /> + <xs:attribute default="0" name="verticalPageSize" type="xs:float" use="optional" /> + <xs:attribute default="0" name="verticalValue" type="xs:float" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="ScrollView" substitutionGroup="engine:VisualElement" type="engine:ScrollViewType" /> + <xs:simpleType name="Scroller_direction_Type"> + <xs:restriction base="xs:string"> + <xs:enumeration value="Horizontal" /> + <xs:enumeration value="Vertical" /> + </xs:restriction> + </xs:simpleType> + <xs:complexType name="ScrollerType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" /> + <xs:attribute default="0" name="lowValue" type="xs:float" use="optional" /> + <xs:attribute default="0" name="highValue" type="xs:float" use="optional" /> + <xs:attribute default="Vertical" name="direction" type="engine:Scroller_direction_Type" use="optional" /> + <xs:attribute default="0" name="value" type="xs:float" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="Scroller" substitutionGroup="engine:VisualElement" type="engine:ScrollerType" /> + <xs:simpleType name="Slider_direction_Type"> + <xs:restriction base="xs:string"> + <xs:enumeration value="Horizontal" /> + <xs:enumeration value="Vertical" /> + </xs:restriction> + </xs:simpleType> + <xs:complexType name="SliderType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" /> + <xs:attribute default="0" name="lowValue" type="xs:float" use="optional" /> + <xs:attribute default="0" name="highValue" type="xs:float" use="optional" /> + <xs:attribute default="0" name="pageSize" type="xs:float" use="optional" /> + <xs:attribute default="Vertical" name="direction" type="engine:Slider_direction_Type" use="optional" /> + <xs:attribute default="0" name="value" type="xs:float" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="Slider" substitutionGroup="engine:VisualElement" type="engine:SliderType" /> + <xs:complexType name="TextFieldType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="0" name="focusIndex" type="xs:int" use="optional" /> + <xs:attribute default="" name="text" type="xs:string" use="optional" /> + <xs:attribute default="0" name="maxLength" type="xs:int" use="optional" /> + <xs:attribute default="false" name="password" type="xs:boolean" use="optional" /> + <xs:attribute default="" name="maskCharacter" type="xs:string" use="optional" /> + <xs:attribute default="false" name="multiline" type="xs:boolean" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="TextField" substitutionGroup="engine:VisualElement" type="engine:TextFieldType" /> + <xs:complexType name="ToggleType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" /> + <xs:attribute default="" name="text" type="xs:string" use="optional" /> + <xs:attribute default="false" name="value" type="xs:boolean" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="Toggle" substitutionGroup="engine:VisualElement" type="engine:ToggleType" /> + <xs:complexType name="VisualContainerType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:sequence minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="engine:VisualElement" /> + </xs:sequence> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="VisualContainer" substitutionGroup="engine:VisualElement" type="engine:VisualContainerType" /> + <xs:complexType name="TemplateContainerType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" /> + <xs:attribute name="template" type="xs:string" use="required" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="TemplateContainer" substitutionGroup="engine:VisualElement" type="engine:TemplateContainerType" /> + <xs:complexType name="BoxType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:sequence minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="engine:VisualElement" /> + </xs:sequence> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="Box" substitutionGroup="engine:VisualElement" type="engine:BoxType" /> + <xs:complexType name="PopupWindowType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:sequence minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="engine:VisualElement" /> + </xs:sequence> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" /> + <xs:attribute default="" name="text" type="xs:string" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="PopupWindow" substitutionGroup="engine:VisualElement" type="engine:PopupWindowType" /> + <xs:complexType name="ListViewType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" /> + <xs:attribute default="30" name="itemHeight" type="xs:int" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="ListView" substitutionGroup="engine:VisualElement" type="engine:ListViewType" /> + <xs:complexType name="ButtonType"> + <xs:complexContent mixed="false"> + <xs:restriction base="engine:VisualElementType"> + <xs:attribute default="" name="name" type="xs:string" use="optional" /> + <xs:attribute default="Position" name="pickingMode" type="engine:VisualElement_pickingMode_Type" use="optional" /> + <xs:attribute default="-1" name="focusIndex" type="xs:int" use="optional" /> + <xs:attribute default="" name="text" type="xs:string" use="optional" /> + <xs:anyAttribute processContents="lax" /> + </xs:restriction> + </xs:complexContent> + </xs:complexType> + <xs:element name="Button" substitutionGroup="engine:VisualElement" type="engine:ButtonType" /> +</xs:schema> \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema/UnityEngine.Experimental.UIElements.xsd.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema/UnityEngine.Experimental.UIElements.xsd.meta new file mode 100644 index 0000000000000000000000000000000000000000..1239813fe194db9878faeb7af1edaee79fba298d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Resources/Templates/UIElementsSchema/UnityEngine.Experimental.UIElements.xsd.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9da568db70dafa345a908282554b3672 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources.meta new file mode 100644 index 0000000000000000000000000000000000000000..a5126eda1976db102ec960b994ddd2cad31f7f6a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 3c61c79a991f84470843243e9710743e +folderAsset: yes +timeCreated: 1502224504 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/External.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/External.meta new file mode 100644 index 0000000000000000000000000000000000000000..4d6fb4820d66077a55b1663b25731413fc2e557e --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/External.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 06b575597b644fe8ba88495149d01b66 +timeCreated: 1503684160 \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/External/SemVersion.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/External/SemVersion.cs new file mode 100644 index 0000000000000000000000000000000000000000..d27d9e4134b961be98bcb3823b90a45e0673eb55 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/External/SemVersion.cs @@ -0,0 +1,563 @@ +/* +Copyright (c) 2013 Max Hauser + +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. + +From: https://github.com/maxhauser/semver +*/ + +using System; +#if !NETSTANDARD +using System.Globalization; +using System.Runtime.Serialization; +using System.Security.Permissions; +#endif +using System.Text.RegularExpressions; + +namespace Semver +{ + /// <summary> + /// A semantic version implementation. + /// Conforms to v2.0.0 of http://semver.org/ + /// </summary> +#if NETSTANDARD + public sealed class SemVersion : IComparable<SemVersion>, IComparable +#else + [Serializable] + internal sealed class SemVersion : IComparable<SemVersion>, IComparable, ISerializable +#endif + { + static Regex parseEx = + new Regex(@"^(?<major>\d+)" + + @"(\.(?<minor>\d+))?" + + @"(\.(?<patch>\d+))?" + + @"(\-(?<pre>[0-9A-Za-z\-\.]+))?" + + @"(\+(?<build>[0-9A-Za-z\-\.]+))?$", +#if NETSTANDARD + RegexOptions.CultureInvariant | RegexOptions.ExplicitCapture); +#else + RegexOptions.CultureInvariant | RegexOptions.Compiled | RegexOptions.ExplicitCapture); +#endif + +#if !NETSTANDARD + /// <summary> + /// Initializes a new instance of the <see cref="SemVersion" /> class. + /// </summary> + /// <param name="info"></param> + /// <param name="context"></param> + /// <exception cref="ArgumentNullException"></exception> + private SemVersion(SerializationInfo info, StreamingContext context) + { + if (info == null) throw new ArgumentNullException("info"); + var semVersion = Parse(info.GetString("SemVersion")); + Major = semVersion.Major; + Minor = semVersion.Minor; + Patch = semVersion.Patch; + Prerelease = semVersion.Prerelease; + Build = semVersion.Build; + } +#endif + + /// <summary> + /// Initializes a new instance of the <see cref="SemVersion" /> class. + /// </summary> + /// <param name="major">The major version.</param> + /// <param name="minor">The minor version.</param> + /// <param name="patch">The patch version.</param> + /// <param name="prerelease">The prerelease version (eg. "alpha").</param> + /// <param name="build">The build eg ("nightly.232").</param> + public SemVersion(int major, int minor = 0, int patch = 0, string prerelease = "", string build = "") + { + this.Major = major; + this.Minor = minor; + this.Patch = patch; + + this.Prerelease = prerelease ?? ""; + this.Build = build ?? ""; + } + + /// <summary> + /// Initializes a new instance of the <see cref="SemVersion"/> class. + /// </summary> + /// <param name="version">The <see cref="System.Version"/> that is used to initialize + /// the Major, Minor, Patch and Build properties.</param> + public SemVersion(Version version) + { + if (version == null) + throw new ArgumentNullException("version"); + + this.Major = version.Major; + this.Minor = version.Minor; + + if (version.Revision >= 0) + { + this.Patch = version.Revision; + } + + this.Prerelease = String.Empty; + + if (version.Build > 0) + { + this.Build = version.Build.ToString(); + } + else + { + this.Build = String.Empty; + } + } + + /// <summary> + /// Parses the specified string to a semantic version. + /// </summary> + /// <param name="version">The version string.</param> + /// <param name="strict">If set to <c>true</c> minor and patch version are required, else they default to 0.</param> + /// <returns>The SemVersion object.</returns> + /// <exception cref="System.InvalidOperationException">When a invalid version string is passed.</exception> + public static SemVersion Parse(string version, bool strict = false) + { + var match = parseEx.Match(version); + if (!match.Success) + { + return new SemVersion(0); + } + +#if NETSTANDARD + var major = int.Parse(match.Groups["major"].Value); +#else + var major = int.Parse(match.Groups["major"].Value, CultureInfo.InvariantCulture); +#endif + + var minorMatch = match.Groups["minor"]; + int minor = 0; + if (minorMatch.Success) + { +#if NETSTANDARD + minor = int.Parse(minorMatch.Value); +#else + minor = int.Parse(minorMatch.Value, CultureInfo.InvariantCulture); +#endif + } + else if (strict) + { + throw new InvalidOperationException("Invalid version (no minor version given in strict mode)"); + } + + var patchMatch = match.Groups["patch"]; + int patch = 0; + if (patchMatch.Success) + { +#if NETSTANDARD + patch = int.Parse(patchMatch.Value); +#else + patch = int.Parse(patchMatch.Value, CultureInfo.InvariantCulture); +#endif + } + else if (strict) + { + throw new InvalidOperationException("Invalid version (no patch version given in strict mode)"); + } + + var prerelease = match.Groups["pre"].Value; + var build = match.Groups["build"].Value; + + return new SemVersion(major, minor, patch, prerelease, build); + } + + /// <summary> + /// Parses the specified string to a semantic version. + /// </summary> + /// <param name="version">The version string.</param> + /// <param name="semver">When the method returns, contains a SemVersion instance equivalent + /// to the version string passed in, if the version string was valid, or <c>null</c> if the + /// version string was not valid.</param> + /// <param name="strict">If set to <c>true</c> minor and patch version are required, else they default to 0.</param> + /// <returns><c>False</c> when a invalid version string is passed, otherwise <c>true</c>.</returns> + public static bool TryParse(string version, out SemVersion semver, bool strict = false) + { + try + { + semver = Parse(version, strict); + return true; + } + catch (Exception) + { + semver = null; + return false; + } + } + + /// <summary> + /// Tests the specified versions for equality. + /// </summary> + /// <param name="versionA">The first version.</param> + /// <param name="versionB">The second version.</param> + /// <returns>If versionA is equal to versionB <c>true</c>, else <c>false</c>.</returns> + public static bool Equals(SemVersion versionA, SemVersion versionB) + { + if (ReferenceEquals(versionA, null)) + return ReferenceEquals(versionB, null); + return versionA.Equals(versionB); + } + + /// <summary> + /// Compares the specified versions. + /// </summary> + /// <param name="versionA">The version to compare to.</param> + /// <param name="versionB">The version to compare against.</param> + /// <returns>If versionA < versionB <c>< 0</c>, if versionA > versionB <c>> 0</c>, + /// if versionA is equal to versionB <c>0</c>.</returns> + public static int Compare(SemVersion versionA, SemVersion versionB) + { + if (ReferenceEquals(versionA, null)) + return ReferenceEquals(versionB, null) ? 0 : -1; + return versionA.CompareTo(versionB); + } + + /// <summary> + /// Make a copy of the current instance with optional altered fields. + /// </summary> + /// <param name="major">The major version.</param> + /// <param name="minor">The minor version.</param> + /// <param name="patch">The patch version.</param> + /// <param name="prerelease">The prerelease text.</param> + /// <param name="build">The build text.</param> + /// <returns>The new version object.</returns> + public SemVersion Change(int? major = null, int? minor = null, int? patch = null, + string prerelease = null, string build = null) + { + return new SemVersion( + major ?? this.Major, + minor ?? this.Minor, + patch ?? this.Patch, + prerelease ?? this.Prerelease, + build ?? this.Build); + } + + /// <summary> + /// Gets the major version. + /// </summary> + /// <value> + /// The major version. + /// </value> + public int Major { get; private set; } + + /// <summary> + /// Gets the minor version. + /// </summary> + /// <value> + /// The minor version. + /// </value> + public int Minor { get; private set; } + + /// <summary> + /// Gets the patch version. + /// </summary> + /// <value> + /// The patch version. + /// </value> + public int Patch { get; private set; } + + /// <summary> + /// Gets the pre-release version. + /// </summary> + /// <value> + /// The pre-release version. + /// </value> + public string Prerelease { get; private set; } + + /// <summary> + /// Gets the build version. + /// </summary> + /// <value> + /// The build version. + /// </value> + public string Build { get; private set; } + + /// <summary> + /// Returns a <see cref="System.String" /> that represents this instance. + /// </summary> + /// <returns> + /// A <see cref="System.String" /> that represents this instance. + /// </returns> + public override string ToString() + { + var version = "" + Major + "." + Minor + "." + Patch; + if (!String.IsNullOrEmpty(Prerelease)) + version += "-" + Prerelease; + if (!String.IsNullOrEmpty(Build)) + version += "+" + Build; + return version; + } + + /// <summary> + /// Compares the current instance with another object of the same type and returns an integer that indicates + /// whether the current instance precedes, follows, or occurs in the same position in the sort order as the + /// other object. + /// </summary> + /// <param name="obj">An object to compare with this instance.</param> + /// <returns> + /// A value that indicates the relative order of the objects being compared. + /// The return value has these meanings: Value Meaning Less than zero + /// This instance precedes <paramref name="obj" /> in the sort order. + /// Zero This instance occurs in the same position in the sort order as <paramref name="obj" />. i + /// Greater than zero This instance follows <paramref name="obj" /> in the sort order. + /// </returns> + public int CompareTo(object obj) + { + return CompareTo((SemVersion)obj); + } + + /// <summary> + /// Compares the current instance with another object of the same type and returns an integer that indicates + /// whether the current instance precedes, follows, or occurs in the same position in the sort order as the + /// other object. + /// </summary> + /// <param name="other">An object to compare with this instance.</param> + /// <returns> + /// A value that indicates the relative order of the objects being compared. + /// The return value has these meanings: Value Meaning Less than zero + /// This instance precedes <paramref name="other" /> in the sort order. + /// Zero This instance occurs in the same position in the sort order as <paramref name="other" />. i + /// Greater than zero This instance follows <paramref name="other" /> in the sort order. + /// </returns> + public int CompareTo(SemVersion other) + { + if (ReferenceEquals(other, null)) + return 1; + + var r = this.CompareByPrecedence(other); + if (r != 0) + return r; + + r = CompareComponent(this.Build, other.Build); + return r; + } + + /// <summary> + /// Compares to semantic versions by precedence. This does the same as a Equals, but ignores the build information. + /// </summary> + /// <param name="other">The semantic version.</param> + /// <returns><c>true</c> if the version precedence matches.</returns> + public bool PrecedenceMatches(SemVersion other) + { + return CompareByPrecedence(other) == 0; + } + + /// <summary> + /// Compares to semantic versions by precedence. This does the same as a Equals, but ignores the build information. + /// </summary> + /// <param name="other">The semantic version.</param> + /// <returns> + /// A value that indicates the relative order of the objects being compared. + /// The return value has these meanings: Value Meaning Less than zero + /// This instance precedes <paramref name="other" /> in the version precedence. + /// Zero This instance has the same precedence as <paramref name="other" />. i + /// Greater than zero This instance has creater precedence as <paramref name="other" />. + /// </returns> + public int CompareByPrecedence(SemVersion other) + { + if (ReferenceEquals(other, null)) + return 1; + + var r = this.Major.CompareTo(other.Major); + if (r != 0) return r; + + r = this.Minor.CompareTo(other.Minor); + if (r != 0) return r; + + r = this.Patch.CompareTo(other.Patch); + if (r != 0) return r; + + r = CompareComponent(this.Prerelease, other.Prerelease, true); + return r; + } + + static int CompareComponent(string a, string b, bool lower = false) + { + var aEmpty = String.IsNullOrEmpty(a); + var bEmpty = String.IsNullOrEmpty(b); + if (aEmpty && bEmpty) + return 0; + + if (aEmpty) + return lower ? 1 : -1; + if (bEmpty) + return lower ? -1 : 1; + + var aComps = a.Split('.'); + var bComps = b.Split('.'); + + var minLen = Math.Min(aComps.Length, bComps.Length); + for (int i = 0; i < minLen; i++) + { + var ac = aComps[i]; + var bc = bComps[i]; + int anum, bnum; + var isanum = Int32.TryParse(ac, out anum); + var isbnum = Int32.TryParse(bc, out bnum); + int r; + if (isanum && isbnum) + { + r = anum.CompareTo(bnum); + if (r != 0) return anum.CompareTo(bnum); + } + else + { + if (isanum) + return -1; + if (isbnum) + return 1; + r = String.CompareOrdinal(ac, bc); + if (r != 0) + return r; + } + } + + return aComps.Length.CompareTo(bComps.Length); + } + + /// <summary> + /// Determines whether the specified <see cref="System.Object" /> is equal to this instance. + /// </summary> + /// <param name="obj">The <see cref="System.Object" /> to compare with this instance.</param> + /// <returns> + /// <c>true</c> if the specified <see cref="System.Object" /> is equal to this instance; otherwise, <c>false</c>. + /// </returns> + public override bool Equals(object obj) + { + if (ReferenceEquals(obj, null)) + return false; + + if (ReferenceEquals(this, obj)) + return true; + + var other = (SemVersion)obj; + + return this.Major == other.Major && + this.Minor == other.Minor && + this.Patch == other.Patch && + string.Equals(this.Prerelease, other.Prerelease, StringComparison.Ordinal) && + string.Equals(this.Build, other.Build, StringComparison.Ordinal); + } + + /// <summary> + /// Returns a hash code for this instance. + /// </summary> + /// <returns> + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + /// </returns> + public override int GetHashCode() + { + unchecked + { + int result = this.Major.GetHashCode(); + result = result * 31 + this.Minor.GetHashCode(); + result = result * 31 + this.Patch.GetHashCode(); + result = result * 31 + this.Prerelease.GetHashCode(); + result = result * 31 + this.Build.GetHashCode(); + return result; + } + } + +#if !NETSTANDARD + [SecurityPermission(SecurityAction.Demand, SerializationFormatter = true)] + public void GetObjectData(SerializationInfo info, StreamingContext context) + { + if (info == null) throw new ArgumentNullException("info"); + info.AddValue("SemVersion", ToString()); + } +#endif + + /// <summary> + /// Implicit conversion from string to SemVersion. + /// </summary> + /// <param name="version">The semantic version.</param> + /// <returns>The SemVersion object.</returns> + public static implicit operator SemVersion(string version) + { + return SemVersion.Parse(version); + } + + /// <summary> + /// The override of the equals operator. + /// </summary> + /// <param name="left">The left value.</param> + /// <param name="right">The right value.</param> + /// <returns>If left is equal to right <c>true</c>, else <c>false</c>.</returns> + public static bool operator ==(SemVersion left, SemVersion right) + { + return SemVersion.Equals(left, right); + } + + /// <summary> + /// The override of the un-equal operator. + /// </summary> + /// <param name="left">The left value.</param> + /// <param name="right">The right value.</param> + /// <returns>If left is not equal to right <c>true</c>, else <c>false</c>.</returns> + public static bool operator !=(SemVersion left, SemVersion right) + { + return !SemVersion.Equals(left, right); + } + + /// <summary> + /// The override of the greater operator. + /// </summary> + /// <param name="left">The left value.</param> + /// <param name="right">The right value.</param> + /// <returns>If left is greater than right <c>true</c>, else <c>false</c>.</returns> + public static bool operator >(SemVersion left, SemVersion right) + { + return SemVersion.Compare(left, right) > 0; + } + + /// <summary> + /// The override of the greater than or equal operator. + /// </summary> + /// <param name="left">The left value.</param> + /// <param name="right">The right value.</param> + /// <returns>If left is greater than or equal to right <c>true</c>, else <c>false</c>.</returns> + public static bool operator >=(SemVersion left, SemVersion right) + { + return left == right || left > right; + } + + /// <summary> + /// The override of the less operator. + /// </summary> + /// <param name="left">The left value.</param> + /// <param name="right">The right value.</param> + /// <returns>If left is less than right <c>true</c>, else <c>false</c>.</returns> + public static bool operator <(SemVersion left, SemVersion right) + { + return SemVersion.Compare(left, right) < 0; + } + + /// <summary> + /// The override of the less than or equal operator. + /// </summary> + /// <param name="left">The left value.</param> + /// <param name="right">The right value.</param> + /// <returns>If left is less than or equal to right <c>true</c>, else <c>false</c>.</returns> + public static bool operator <=(SemVersion left, SemVersion right) + { + return left == right || left < right; + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/External/SemVersion.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/External/SemVersion.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..1734b505400b59eb1125723b03ae0c6e7ab4c30b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/External/SemVersion.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 5075cb5aa3254b099b11b2840d7cd46e +timeCreated: 1503684176 \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/External/SemVersionExtension.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/External/SemVersionExtension.cs new file mode 100644 index 0000000000000000000000000000000000000000..4dd8aef6ad880f3568cf51ae818f95942fc17d0d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/External/SemVersionExtension.cs @@ -0,0 +1,15 @@ +namespace Semver +{ + internal static class SemVersionExtension + { + public static string VersionOnly(this SemVersion version) + { + return "" + version.Major + "." + version.Minor + "." + version.Patch; + } + + public static string ShortVersion(this SemVersion version) + { + return version.Major + "." + version.Minor; + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/External/SemVersionExtension.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/External/SemVersionExtension.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..0022e01f4d1bd5a78db601a11c667d5646fb46e8 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/External/SemVersionExtension.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9f17a0688211d476f8d8c9742bb9f992 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services.meta new file mode 100644 index 0000000000000000000000000000000000000000..27cc5fd27ed3cfb29c2ae60f4983e464832787fd --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: afd7697844f4142f9aa91471c1fba506 +folderAsset: yes +timeCreated: 1502224642 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common.meta new file mode 100644 index 0000000000000000000000000000000000000000..d59dbe646d6b4169f377abc14e710059ae9eadc0 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 1067213df0c64b319bc81e73be809b1a +timeCreated: 1505249387 \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common/ApplicationUtil.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common/ApplicationUtil.cs new file mode 100644 index 0000000000000000000000000000000000000000..12691d3334c5bacc63ab1226ea774c127d130bc4 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common/ApplicationUtil.cs @@ -0,0 +1,17 @@ +using System.Linq; +using UnityEngine; + +namespace UnityEditor.PackageManager.UI +{ + class ApplicationUtil + { + public static bool IsPreReleaseVersion + { + get + { + var lastToken = Application.unityVersion.Split('.').LastOrDefault(); + return lastToken.Contains("a") || lastToken.Contains("b"); + } + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common/ApplicationUtil.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common/ApplicationUtil.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..0f1a76701a167c925cf50f29be98ccd3e5a1d483 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common/ApplicationUtil.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7ed48dcc992234c659018e00590315b7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common/OperationSignal.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common/OperationSignal.cs new file mode 100644 index 0000000000000000000000000000000000000000..512c71862c5cf64d6fbfcdb44def9d8b1355088d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common/OperationSignal.cs @@ -0,0 +1,30 @@ +using System; + +namespace UnityEditor.PackageManager.UI +{ + [Serializable] + internal class OperationSignal<T> where T: IBaseOperation + { + public event Action<T> OnOperation = delegate { }; + + public T Operation { get; set; } + + public void SetOperation(T operation) + { + Operation = operation; + OnOperation(operation); + } + + public void WhenOperation(Action<T> callback) + { + if (Operation != null) + callback(Operation); + OnOperation += callback; + } + + internal void ResetEvents() + { + OnOperation = delegate { }; + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common/OperationSignal.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common/OperationSignal.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..a58af903b91d2c6852326d076a36af59c9d9622d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common/OperationSignal.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7da0c11c52b4044de81c175887699282 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common/Resources.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common/Resources.cs new file mode 100644 index 0000000000000000000000000000000000000000..f9cf6e49e59ef6d764103cef112832e6d9fb1b1e --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common/Resources.cs @@ -0,0 +1,19 @@ +using UnityEngine.Experimental.UIElements; + +namespace UnityEditor.PackageManager.UI +{ + internal static class Resources + { + private static string TemplateRoot { get { return PackageManagerWindow.ResourcesPath + "Templates"; } } + + private static string TemplatePath(string filename) + { + return string.Format("{0}/{1}", TemplateRoot, filename); + } + + public static VisualElement GetTemplate(string templateFilename) + { + return AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(TemplatePath(templateFilename)).CloneTree(null); + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common/Resources.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common/Resources.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..0f999a70d4a71bf880389fb79bd7d2797ca9a831 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common/Resources.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d6a708dbb74414a6dbd60e07d9513c1c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common/ThreadedDelay.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common/ThreadedDelay.cs new file mode 100644 index 0000000000000000000000000000000000000000..650375395dd2cd45d16eb128457debc689002e9d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common/ThreadedDelay.cs @@ -0,0 +1,35 @@ +using System.Threading; + +namespace UnityEditor.PackageManager.UI +{ + internal class ThreadedDelay + { + public int Length { get; set; } // In milliseconds + public bool IsDone { get; private set; } + + public ThreadedDelay(int length = 0) + { + Length = length; + IsDone = false; + } + + public void Start() + { + if (Length <= 0) + { + IsDone = true; + return; + } + + IsDone = false; + + Thread newThread = new Thread(() => + { + Thread.Sleep(Length); + IsDone = true; + }); + + newThread.Start(); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common/ThreadedDelay.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common/ThreadedDelay.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..543d2281092e463a5ba5d56aff89d6a809a29cd6 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Common/ThreadedDelay.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 490fe93dbc954e3ba3651b7f55eaba70 +timeCreated: 1505249395 \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces.meta new file mode 100644 index 0000000000000000000000000000000000000000..96397a4c67b4547ca9578ac1dca0803425165ad5 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 3385f7527e5be4c65b3a5294e8995ff8 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IAddOperation.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IAddOperation.cs new file mode 100644 index 0000000000000000000000000000000000000000..40c39fdbe4c31f28082ccf0ad469711ee7a7eca4 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IAddOperation.cs @@ -0,0 +1,13 @@ +using System; + +namespace UnityEditor.PackageManager.UI +{ + internal interface IAddOperation : IBaseOperation + { + event Action<PackageInfo> OnOperationSuccess; + + PackageInfo PackageInfo { get; } + + void AddPackageAsync(PackageInfo packageInfo, Action<PackageInfo> doneCallbackAction = null, Action<Error> errorCallbackAction = null); + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IAddOperation.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IAddOperation.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..d84d4b026a6cd4f229251efeedcbbf2889968a89 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IAddOperation.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 3dcbbc060dea46168ffc09a580836240 +timeCreated: 1504191596 \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IBaseOperation.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IBaseOperation.cs new file mode 100644 index 0000000000000000000000000000000000000000..4c22b28e74ed3c8f08fe4e1f8937509af78dcb52 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IBaseOperation.cs @@ -0,0 +1,14 @@ +using System; + +namespace UnityEditor.PackageManager.UI +{ + internal interface IBaseOperation + { + event Action<Error> OnOperationError; + event Action OnOperationFinalized; + + bool IsCompleted { get; } + + void Cancel(); + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IBaseOperation.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IBaseOperation.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..4c59885eb16bafc78307938b5d06b3ab5acae5a0 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IBaseOperation.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 2f1849b9179b464381598f68663790d3 +timeCreated: 1507041169 \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IListOperation.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IListOperation.cs new file mode 100644 index 0000000000000000000000000000000000000000..00ba1fa19639482f70e39f7932f9295fdd9e409c --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IListOperation.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; + +namespace UnityEditor.PackageManager.UI +{ + internal interface IListOperation : IBaseOperation + { + bool OfflineMode { get; set; } + void GetPackageListAsync(Action<IEnumerable<PackageInfo>> doneCallbackAction, Action<Error> errorCallbackAction = null); + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IListOperation.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IListOperation.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..9bc2553bead6de163bd3c1aa13db4e0ad6fd5b7f --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IListOperation.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: b7e8a8fb69eacee439474914ea54bf9b +timeCreated: 1502913188 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IOperationFactory.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IOperationFactory.cs new file mode 100644 index 0000000000000000000000000000000000000000..1d10304e9b41ca4ce2a3c176025b507dc359c498 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IOperationFactory.cs @@ -0,0 +1,14 @@ +namespace UnityEditor.PackageManager.UI +{ + /// <summary> + /// This is the Interface we will use to create the facade we need for testing. + /// In the case of the Fake factory, we can create fake operations with doctored data we use for our tests. + /// </summary> + internal interface IOperationFactory + { + IListOperation CreateListOperation(bool offlineMode = false); + ISearchOperation CreateSearchOperation(); + IAddOperation CreateAddOperation(); + IRemoveOperation CreateRemoveOperation(); + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IOperationFactory.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IOperationFactory.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..d718f50bdeedcde3ef6d03054064a07b87630345 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IOperationFactory.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 0a1161a2ab6569948a0aa7899197218c +timeCreated: 1502915478 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IRemoveOperation.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IRemoveOperation.cs new file mode 100644 index 0000000000000000000000000000000000000000..211c992f7cbc3d522e080c0508725e2c92f59ea2 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IRemoveOperation.cs @@ -0,0 +1,11 @@ +using System; + +namespace UnityEditor.PackageManager.UI +{ + internal interface IRemoveOperation : IBaseOperation + { + event Action<PackageInfo> OnOperationSuccess; + + void RemovePackageAsync(PackageInfo package, Action<PackageInfo> doneCallbackAction = null, Action<Error> errorCallbackAction = null); + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IRemoveOperation.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IRemoveOperation.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..05060134bff1e7efb670ff7916884970ba8d7216 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/IRemoveOperation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 54e5fc61925bc4ca3b2c1e82dfb35eb5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/ISearchOperation.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/ISearchOperation.cs new file mode 100644 index 0000000000000000000000000000000000000000..b3b6a90aeac204f72d412498ccc7896c99045104 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/ISearchOperation.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; + +namespace UnityEditor.PackageManager.UI +{ + internal interface ISearchOperation : IBaseOperation + { + void GetAllPackageAsync(Action<IEnumerable<PackageInfo>> doneCallbackAction = null, Action<Error> errorCallbackAction = null); + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/ISearchOperation.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/ISearchOperation.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..0b2741ae7769e2166b1ab6cc018cdeaec5cc3d27 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Interfaces/ISearchOperation.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 85dba6b2d7204a7f9a1f976eb0a6b4d2 +timeCreated: 1508160206 \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/OperationFactory.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/OperationFactory.cs new file mode 100644 index 0000000000000000000000000000000000000000..9e07fc39beaa47498285b198f00999ee44c0138d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/OperationFactory.cs @@ -0,0 +1,24 @@ +namespace UnityEditor.PackageManager.UI +{ + internal static class OperationFactory + { + private static IOperationFactory _instance; + + public static IOperationFactory Instance + { + get { + if (_instance == null) + _instance = new UpmOperationFactory (); + return _instance; + } + internal set { + _instance = value; + } + } + + internal static void Reset() + { + _instance = null; + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/OperationFactory.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/OperationFactory.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..5d7e9943aada7df8a532fbcd3b4d742bc261d823 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/OperationFactory.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9ec5dc72125424af38a9bfaca532acc8 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages.meta new file mode 100644 index 0000000000000000000000000000000000000000..c0acdbcb6098ffc6a47a0465bb181f3035b2d9ed --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: e53bc96d2d054b8cbc811f0d73e761eb +timeCreated: 1504191702 \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/Package.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/Package.cs new file mode 100644 index 0000000000000000000000000000000000000000..5c366dd42d0551a2cc05d6010a58e62cd674853a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/Package.cs @@ -0,0 +1,222 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using UnityEngine; + +namespace UnityEditor.PackageManager.UI +{ + // History of a single package + internal class Package : IEquatable<Package> + { + static public bool ShouldProposeLatestVersions + { + get + { + // Until we figure out a way to test this properly, alway show standard behavior + // return InternalEditorUtility.IsUnityBeta() && !Unsupported.IsDeveloperMode(); + return false; + } + } + + // There can only be one package add/remove operation. + private static IBaseOperation addRemoveOperationInstance; + + public static bool AddRemoveOperationInProgress + { + get { return addRemoveOperationInstance != null && !addRemoveOperationInstance.IsCompleted; } + } + + internal const string packageManagerUIName = "com.unity.package-manager-ui"; + private readonly string packageName; + private IEnumerable<PackageInfo> source; + + internal Package(string packageName, IEnumerable<PackageInfo> infos) + { + if (string.IsNullOrEmpty(packageName)) + throw new ArgumentException("Cannot be empty or null", "packageName"); + + if (!infos.Any()) + throw new ArgumentException("Cannot be empty", "infos"); + + this.packageName = packageName; + UpdateSource(infos); + } + + internal void UpdateSource(IEnumerable<PackageInfo> source) + { + this.source = source; +#if UNITY_2018_3_OR_NEWER + if (IsPackageManagerUI) + this.source = this.source.Where(p => p != null && p.Version.Major >= 2); +#endif + } + + public PackageInfo Current { get { return Versions.FirstOrDefault(package => package.IsCurrent); } } + + // This is the latest verified or official release (eg: 1.3.2). Not necessarily the latest verified release (eg: 1.2.4) or that latest candidate (eg: 1.4.0-beta) + public PackageInfo LatestUpdate + { + get + { + // We want to show the absolute latest when in beta mode + if (ShouldProposeLatestVersions) + return Latest; + + // Override with current when it's version locked + var current = Current; + if (current != null && current.IsVersionLocked) + return current; + + // Get all the candidates versions (verified, release, preview) that are newer than current + var verified = Verified; + var latestRelease = LatestRelease; + var latestPreview = Versions.LastOrDefault(package => package.IsPreview); + var candidates = new List<PackageInfo> + { + verified, + latestRelease, + latestPreview, + }.Where(package => package != null && (current == null || current == package || current.Version < package.Version)).ToList(); + + if (candidates.Contains(verified)) + return verified; + if ((current == null || !current.IsVerified ) && candidates.Contains(latestRelease)) + return latestRelease; + if ((current == null || current.IsPreview) && candidates.Contains(latestPreview)) + return latestPreview; + + // Show current if it exists, otherwise latest user visible, and then otherwise show the absolute latest + return current ?? Latest; + } + } + + public PackageInfo LatestPatch + { + get + { + if (Current == null) + return null; + + // Get all version that have the same Major/Minor + var versions = Versions.Where(package => package.Version.Major == Current.Version.Major && package.Version.Minor == Current.Version.Minor); + + return versions.LastOrDefault(); + } + } + + // This is the very latest version, including pre-releases (eg: 1.4.0-beta). + internal PackageInfo Latest { get { return Versions.FirstOrDefault(package => package.IsLatest) ?? Versions.LastOrDefault(); } } + + // Returns the current version if it exist, otherwise returns the latest user visible version. + internal PackageInfo VersionToDisplay { get { return Current ?? LatestUpdate; } } + + // Every version available for this package + internal IEnumerable<PackageInfo> Versions { get { return source.OrderBy(package => package.Version); } } + + // Every version that's not a pre-release (eg: not beta/alpha/preview). + internal IEnumerable<PackageInfo> ReleaseVersions + { + get { return Versions.Where(package => !package.IsPreRelease); } + } + + internal PackageInfo LatestRelease { get {return ReleaseVersions.LastOrDefault();}} + internal PackageInfo Verified { get {return Versions.FirstOrDefault(package => package.IsVerified);}} + + internal bool IsAfterCurrentVersion(PackageInfo packageInfo) { return Current == null || (packageInfo != null && packageInfo.Version > Current.Version); } + + internal bool IsBuiltIn {get { return Versions.Any() && Versions.First().IsBuiltIn; }} + + public string Name { get { return packageName; } } + + public bool IsPackageManagerUI + { + get { return Name == packageManagerUIName; } + } + + public bool Equals(Package other) + { + if (other == null) + return false; + + return packageName == other.packageName; + } + + public override int GetHashCode() + { + return packageName.GetHashCode(); + } + + [SerializeField] + internal readonly OperationSignal<IAddOperation> AddSignal = new OperationSignal<IAddOperation>(); + + private Action OnAddOperationFinalizedEvent; + + internal void Add(PackageInfo packageInfo) + { + if (packageInfo == Current || AddRemoveOperationInProgress) + return; + + var operation = OperationFactory.Instance.CreateAddOperation(); + addRemoveOperationInstance = operation; + OnAddOperationFinalizedEvent = () => + { + AddSignal.Operation = null; + operation.OnOperationFinalized -= OnAddOperationFinalizedEvent; + PackageCollection.Instance.FetchListOfflineCache(true); + }; + + operation.OnOperationFinalized += OnAddOperationFinalizedEvent; + + AddSignal.SetOperation(operation); + operation.AddPackageAsync(packageInfo); + } + + internal void Update() + { + Add(Latest); + } + + internal static void AddFromLocalDisk(string path) + { + if (AddRemoveOperationInProgress) + return; + + var packageJson = PackageJsonHelper.Load(path); + if (null == packageJson) + { + Debug.LogError(string.Format("Invalid package path: cannot find \"{0}\".", path)); + return; + } + + var operation = OperationFactory.Instance.CreateAddOperation(); + addRemoveOperationInstance = operation; + operation.AddPackageAsync(packageJson.PackageInfo); + } + + [SerializeField] + internal readonly OperationSignal<IRemoveOperation> RemoveSignal = new OperationSignal<IRemoveOperation>(); + + private Action OnRemoveOperationFinalizedEvent; + + public void Remove() + { + if (Current == null || AddRemoveOperationInProgress) + return; + + var operation = OperationFactory.Instance.CreateRemoveOperation(); + addRemoveOperationInstance = operation; + OnRemoveOperationFinalizedEvent = () => + { + RemoveSignal.Operation = null; + operation.OnOperationFinalized -= OnRemoveOperationFinalizedEvent; + PackageCollection.Instance.FetchListOfflineCache(true); + }; + + operation.OnOperationFinalized += OnRemoveOperationFinalizedEvent; + RemoveSignal.SetOperation(operation); + + operation.RemovePackageAsync(Current); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/Package.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/Package.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..e777649ecd3aa0b4b78f61b47a98f992835f24c1 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/Package.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: f499e12eaeb145bf9022f581c0b7fa5b +timeCreated: 1505740170 \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageAssetPostprocessor.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageAssetPostprocessor.cs new file mode 100644 index 0000000000000000000000000000000000000000..6820ec6e097a7c5cd36f1951b80d2e9fdf5f4aa4 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageAssetPostprocessor.cs @@ -0,0 +1,21 @@ +using System.Linq; + +namespace UnityEditor.PackageManager.UI +{ + internal class PackageAssetPostprocessor : AssetPostprocessor + { + static bool IsPackageJsonAsset(string path) + { + var pathComponents = (path ?? "").Split('/'); + return pathComponents.Length == 3 && pathComponents[0] == "Packages" && pathComponents[2] == "package.json"; + } + + static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) + { + if (PackageCollection.Instance != null && (importedAssets.Any(IsPackageJsonAsset) || deletedAssets.Any(IsPackageJsonAsset) || movedAssets.Any(IsPackageJsonAsset))) + { + PackageCollection.Instance.FetchListOfflineCache(true); + } + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageAssetPostprocessor.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageAssetPostprocessor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..9f0fe82e9ca12a506510d059ca06308ce5ac57f5 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageAssetPostprocessor.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 63e8a6023745e4347bb661e87a9be1d9 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageCollection.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageCollection.cs new file mode 100644 index 0000000000000000000000000000000000000000..6401088442ae28f019bb15a9de655b18819a5e31 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageCollection.cs @@ -0,0 +1,284 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +namespace UnityEditor.PackageManager.UI +{ + [Serializable] + internal class PackageCollection + { + private static PackageCollection instance = new PackageCollection(); + public static PackageCollection Instance { get { return instance; } } + + public event Action<IEnumerable<Package>> OnPackagesChanged = delegate { }; + public event Action<PackageFilter> OnFilterChanged = delegate { }; + + private readonly Dictionary<string, Package> packages; + + private PackageFilter filter; + + private string selectedListPackage; + private string selectedSearchPackage; + + internal string lastUpdateTime; + private List<PackageInfo> listPackagesOffline; + private List<PackageInfo> listPackages; + private List<PackageInfo> searchPackages; + + private List<PackageError> packageErrors; + + private int listPackagesVersion; + private int listPackagesOfflineVersion; + + private bool searchOperationOngoing; + private bool listOperationOngoing; + private bool listOperationOfflineOngoing; + + private IListOperation listOperationOffline; + private IListOperation listOperation; + private ISearchOperation searchOperation; + + public readonly OperationSignal<ISearchOperation> SearchSignal = new OperationSignal<ISearchOperation>(); + public readonly OperationSignal<IListOperation> ListSignal = new OperationSignal<IListOperation>(); + + public static void InitInstance(ref PackageCollection value) + { + if (value == null) // UI window opened + { + value = instance; + + Instance.OnPackagesChanged = delegate { }; + Instance.OnFilterChanged = delegate { }; + Instance.SearchSignal.ResetEvents(); + Instance.ListSignal.ResetEvents(); + + Instance.FetchListOfflineCache(true); + Instance.FetchListCache(true); + Instance.FetchSearchCache(true); + } + else // Domain reload + { + instance = value; + + Instance.RebuildPackageDictionary(); + + // Resume operations interrupted by domain reload + Instance.FetchListOfflineCache(Instance.listOperationOfflineOngoing); + Instance.FetchListCache(Instance.listOperationOngoing); + Instance.FetchSearchCache(Instance.searchOperationOngoing); + } + } + + public PackageFilter Filter + { + get { return filter; } + + // For public usage, use SetFilter() instead + private set + { + var changed = value != filter; + filter = value; + + if (changed) + OnFilterChanged(filter); + } + } + + public List<PackageInfo> LatestListPackages + { + get { return listPackagesVersion > listPackagesOfflineVersion? listPackages : listPackagesOffline; } + } + + public List<PackageInfo> LatestSearchPackages { get { return searchPackages; } } + + public string SelectedPackage + { + get { return PackageFilter.All == Filter ? selectedSearchPackage : selectedListPackage; } + set + { + if (PackageFilter.All == Filter) + selectedSearchPackage = value; + else + selectedListPackage = value; + } + } + + private PackageCollection() + { + packages = new Dictionary<string, Package>(); + + listPackagesOffline = new List<PackageInfo>(); + listPackages = new List<PackageInfo>(); + searchPackages = new List<PackageInfo>(); + + packageErrors = new List<PackageError>(); + + listPackagesVersion = 0; + listPackagesOfflineVersion = 0; + + searchOperationOngoing = false; + listOperationOngoing = false; + listOperationOfflineOngoing = false; + + Filter = PackageFilter.All; + } + + public bool SetFilter(PackageFilter value, bool refresh = true) + { + if (value == Filter) + return false; + + Filter = value; + if (refresh) + { + UpdatePackageCollection(); + } + return true; + } + + public void UpdatePackageCollection(bool rebuildDictionary = false) + { + if (rebuildDictionary) + { + lastUpdateTime = DateTime.Now.ToString("HH:mm"); + RebuildPackageDictionary(); + } + if (packages.Any()) + OnPackagesChanged(OrderedPackages()); + } + + internal void FetchListOfflineCache(bool forceRefetch = false) + { + if (!forceRefetch && (listOperationOfflineOngoing || listPackagesOffline.Any())) return; + if (listOperationOffline != null) + listOperationOffline.Cancel(); + listOperationOfflineOngoing = true; + listOperationOffline = OperationFactory.Instance.CreateListOperation(true); + listOperationOffline.OnOperationFinalized += () => + { + listOperationOfflineOngoing = false; + UpdatePackageCollection(true); + }; + listOperationOffline.GetPackageListAsync( + infos => + { + var version = listPackagesVersion; + UpdateListPackageInfosOffline(infos, version); + }, + error => { Debug.LogError("Error fetching package list (offline mode)."); }); + } + + internal void FetchListCache(bool forceRefetch = false) + { + if (!forceRefetch && (listOperationOngoing || listPackages.Any())) return; + if (listOperation != null) + listOperation.Cancel(); + listOperationOngoing = true; + listOperation = OperationFactory.Instance.CreateListOperation(); + listOperation.OnOperationFinalized += () => + { + listOperationOngoing = false; + UpdatePackageCollection(true); + }; + listOperation.GetPackageListAsync(UpdateListPackageInfos, + error => { Debug.LogError("Error fetching package list."); }); + ListSignal.SetOperation(listOperation); + } + + internal void FetchSearchCache(bool forceRefetch = false) + { + if (!forceRefetch && (searchOperationOngoing || searchPackages.Any())) return; + if (searchOperation != null) + searchOperation.Cancel(); + searchOperationOngoing = true; + searchOperation = OperationFactory.Instance.CreateSearchOperation(); + searchOperation.OnOperationFinalized += () => + { + searchOperationOngoing = false; + UpdatePackageCollection(true); + }; + searchOperation.GetAllPackageAsync(UpdateSearchPackageInfos, + error => { Debug.LogError("Error searching packages online."); }); + SearchSignal.SetOperation(searchOperation); + } + + private void UpdateListPackageInfosOffline(IEnumerable<PackageInfo> newInfos, int version) + { + listPackagesOfflineVersion = version; + listPackagesOffline = newInfos.Where(p => p.IsUserVisible).ToList(); + } + + private void UpdateListPackageInfos(IEnumerable<PackageInfo> newInfos) + { + // Each time we fetch list packages, the cache for offline mode will be updated + // We keep track of the list packages version so that we know which version of cache + // we are getting with the offline fetch operation. + listPackagesVersion++; + listPackages = newInfos.Where(p => p.IsUserVisible).ToList(); + listPackagesOffline = listPackages; + } + + private void UpdateSearchPackageInfos(IEnumerable<PackageInfo> newInfos) + { + searchPackages = newInfos.Where(p => p.IsUserVisible).ToList(); + } + + private IEnumerable<Package> OrderedPackages() + { + return packages.Values.OrderBy(pkg => pkg.Versions.LastOrDefault() == null ? pkg.Name : pkg.Versions.Last().DisplayName).AsEnumerable(); + } + + public Package GetPackageByName(string name) + { + Package package; + packages.TryGetValue(name, out package); + return package; + } + + public Error GetPackageError(Package package) + { + if (null == package) return null; + var firstMatchingError = packageErrors.FirstOrDefault(p => p.PackageName == package.Name); + return firstMatchingError != null ? firstMatchingError.Error : null; + } + + public void AddPackageError(Package package, Error error) + { + if (null == package || null == error) return; + packageErrors.Add(new PackageError(package.Name, error)); + } + + public void RemovePackageErrors(Package package) + { + if (null == package) return; + packageErrors.RemoveAll(p => p.PackageName == package.Name); + } + + private void RebuildPackageDictionary() + { + // Merge list & search packages + var allPackageInfos = new List<PackageInfo>(LatestListPackages); + var installedPackageIds = new HashSet<string>(allPackageInfos.Select(p => p.PackageId)); + allPackageInfos.AddRange(searchPackages.Where(p => !installedPackageIds.Contains(p.PackageId))); + + if (!PackageManagerPrefs.ShowPreviewPackages) + { + allPackageInfos = allPackageInfos.Where(p => !p.IsPreRelease || installedPackageIds.Contains(p.PackageId)).ToList(); + } + + // Rebuild packages dictionary + packages.Clear(); + foreach (var p in allPackageInfos) + { + var packageName = p.Name; + if (packages.ContainsKey(packageName)) + continue; + + var packageQuery = from pkg in allPackageInfos where pkg.Name == packageName select pkg; + var package = new Package(packageName, packageQuery); + packages[packageName] = package; + } + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageCollection.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageCollection.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..642cef2478d60c4ecf8a1260483238ef58ef7d7c --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageCollection.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 61d72cb49da3040d5ade3edfd6eccfc1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageError.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageError.cs new file mode 100644 index 0000000000000000000000000000000000000000..dff3c13acfa440bece3f4a543178d9172152ab2f --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageError.cs @@ -0,0 +1,17 @@ +using System; + +namespace UnityEditor.PackageManager.UI +{ + [Serializable] + internal class PackageError + { + public string PackageName; + public Error Error; + + public PackageError(string packageName, Error error) + { + PackageName = packageName; + Error = error; + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageError.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageError.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..18d4165e8b0b7d990c543b8db3485571f11e8343 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageError.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b7c10e584b708734ba6141e7d4797931 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageFilter.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageFilter.cs new file mode 100644 index 0000000000000000000000000000000000000000..2c0e524e9a07a18c48032c0626f64f71541c9d58 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageFilter.cs @@ -0,0 +1,13 @@ +using System; + +namespace UnityEditor.PackageManager.UI +{ + [Serializable] + internal enum PackageFilter + { + None, + All, + Local, + Modules + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageFilter.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageFilter.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..26ce6a0bcb1af5f8f94ae326ea75d0bf28543b11 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageFilter.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 03ffb9844f8d40e8a2f59dd2aff561eb +timeCreated: 1508251051 \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageGroupOrigins.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageGroupOrigins.cs new file mode 100644 index 0000000000000000000000000000000000000000..66703320a30a21291d8b1a4088f02a74603545c2 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageGroupOrigins.cs @@ -0,0 +1,8 @@ +namespace UnityEditor.PackageManager.UI +{ + internal enum PackageGroupOrigins + { + Packages, + BuiltInPackages + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageGroupOrigins.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageGroupOrigins.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..dbdf42593fa7f610ebf5c153b9c74ac20f2e1be0 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageGroupOrigins.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0e372f1bbea04aa9bd68055d4105bd84 +timeCreated: 1508855779 \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageInfo.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageInfo.cs new file mode 100644 index 0000000000000000000000000000000000000000..6db9fc29f14152dc260c650adf2dfdd8eac5fa69 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageInfo.cs @@ -0,0 +1,227 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Semver; +using System.IO; + +namespace UnityEditor.PackageManager.UI +{ + [Serializable] + internal class PackageInfo : IEquatable<PackageInfo> + { + // Module package.json files contain a documentation url embedded in the description. + // We parse that to have the "View Documentation" button direct to it, instead of showing + // the link in the description text. + private const string builtinPackageDocsUrlKey = "Scripting API: "; + + public string Name; + public string DisplayName; + private string _PackageId; + public SemVersion Version; + public string Description; + public string Category; + public PackageState State; + public bool IsCurrent; + public bool IsLatest; + public string Group; + public PackageSource Origin; + public List<Error> Errors; + public bool IsVerified; + public string Author; + + public PackageManager.PackageInfo Info { get; set; } + + public string PackageId { + get + { + if (!string.IsNullOrEmpty(_PackageId )) + return _PackageId; + return string.Format("{0}@{1}", Name.ToLower(), Version); + } + set + { + _PackageId = value; + } + } + + // This will always be <name>@<version>, even for an embedded package. + public string VersionId { get { return string.Format("{0}@{1}", Name.ToLower(), Version); } } + public string ShortVersionId { get { return string.Format("{0}@{1}", Name.ToLower(), Version.ShortVersion()); } } + + public string BuiltInDescription { get { + if (IsBuiltIn) + return string.Format("This built in package controls the presence of the {0} module.", DisplayName); + else + return Description.Split(new[] {builtinPackageDocsUrlKey}, StringSplitOptions.None)[0]; + } } + + private static Version ParseShortVersion(string shortVersionId) + { + try + { + var versionToken = shortVersionId.Split('@')[1]; + return new Version(versionToken); + } + catch (Exception) + { + // Keep default version 0.0 on exception + return new Version(); + } + } + + // Method content must be matched in package manager UI + public static string GetPackageUrlRedirect(string packageName, string shortVersionId) + { + var redirectUrl = ""; + if (packageName == "com.unity.ads") + redirectUrl = "https://docs.unity3d.com/Manual/UnityAds.html"; + else if (packageName == "com.unity.analytics") + { + if (ParseShortVersion(shortVersionId) < new Version(3, 2)) + redirectUrl = "https://docs.unity3d.com/Manual/UnityAnalytics.html"; + } + else if (packageName == "com.unity.purchasing") + redirectUrl = "https://docs.unity3d.com/Manual/UnityIAP.html"; + else if (packageName == "com.unity.standardevents") + redirectUrl = "https://docs.unity3d.com/Manual/UnityAnalyticsStandardEvents.html"; + else if (packageName == "com.unity.xiaomi") + redirectUrl = "https://unity3d.com/cn/partners/xiaomi/guide"; + else if (packageName == "com.unity.shadergraph") + { + if (ParseShortVersion(shortVersionId) < new Version(4, 1)) + redirectUrl = "https://github.com/Unity-Technologies/ShaderGraph/wiki"; + } + + return redirectUrl; + } + + public bool RedirectsToManual(PackageInfo packageInfo) + { + return !string.IsNullOrEmpty(GetPackageUrlRedirect(packageInfo.Name, packageInfo.ShortVersionId)); + } + + public bool HasChangelog(PackageInfo packageInfo) + { + // Packages with no docs have no third party notice + return !RedirectsToManual(packageInfo); + } + + public string GetDocumentationUrl() + { + if (IsBuiltIn) + { + if (!string.IsNullOrEmpty(Description)) + { + var split = Description.Split(new[] {builtinPackageDocsUrlKey}, StringSplitOptions.None); + if (split.Length > 1) + return split[1]; + } + } + return string.Format("http://docs.unity3d.com/Packages/{0}/index.html", ShortVersionId); + } + + public string GetOfflineDocumentationUrl() + { + var docsFolder = Path.Combine(Info.resolvedPath, "Documentation~"); + if (!Directory.Exists(docsFolder)) + docsFolder = Path.Combine(Info.resolvedPath, "Documentation"); + if (Directory.Exists(docsFolder)) + { + var mdFiles = Directory.GetFiles(docsFolder, "*.md", SearchOption.TopDirectoryOnly); + var docsMd = mdFiles.FirstOrDefault(d => Path.GetFileName(d).ToLower() == "index.md") + ?? mdFiles.FirstOrDefault(d => Path.GetFileName(d).ToLower() == "tableofcontents.md") ?? mdFiles.FirstOrDefault(); + if (!string.IsNullOrEmpty(docsMd)) + return new Uri(docsMd).AbsoluteUri; + } + return string.Empty; + } + + public string GetChangelogUrl() + { + return string.Format("http://docs.unity3d.com/Packages/{0}/changelog/CHANGELOG.html", ShortVersionId); + } + + public string GetOfflineChangelogUrl() + { + var changelogFile = Path.Combine(Info.resolvedPath, "CHANGELOG.md"); + return File.Exists(changelogFile) ? new Uri(changelogFile).AbsoluteUri : string.Empty; + } + + public string GetLicensesUrl() + { + var url = string.Format("http://docs.unity3d.com/Packages/{0}/license/index.html", ShortVersionId); + if (RedirectsToManual(this)) + url = "https://unity3d.com/legal/licenses/Unity_Companion_License"; + + return url; + } + + public string GetOfflineLicensesUrl() + { + var licenseFile = Path.Combine(Info.resolvedPath, "LICENSE.md"); + return File.Exists(licenseFile) ? new Uri(licenseFile).AbsoluteUri : string.Empty; + } + + public bool Equals(PackageInfo other) + { + if (other == null) + return false; + if (other == this) + return true; + + return Name == other.Name && Version == other.Version; + } + + public override int GetHashCode() + { + return PackageId.GetHashCode(); + } + + public bool HasVersionTag(string tag) + { + if (string.IsNullOrEmpty(Version.Prerelease)) + return false; + + return String.Equals(Version.Prerelease.Split('.').First(), tag, StringComparison.CurrentCultureIgnoreCase); + } + + public bool HasVersionTag(PackageTag tag) + { + return HasVersionTag(tag.ToString()); + } + + // Is it a pre-release (alpha/beta/experimental/preview)? + // Current logic is any tag is considered pre-release, except recommended + public bool IsPreRelease + { + get { return !string.IsNullOrEmpty(Version.Prerelease) || Version.Major == 0; } + } + + public bool IsPreview + { + get { return HasVersionTag(PackageTag.preview) || Version.Major == 0; } + } + + // A version is user visible if it has a supported tag (or no tag at all) + public bool IsUserVisible + { + get { return IsCurrent || string.IsNullOrEmpty(Version.Prerelease) || HasVersionTag(PackageTag.preview) || IsVerified; } + } + + public bool IsInDevelopment { get { return Origin == PackageSource.Embedded; } } + public bool IsLocal { get { return Origin == PackageSource.Local; } } + public bool IsBuiltIn { get { return Origin == PackageSource.BuiltIn; } } + + public string VersionWithoutTag { get { return Version.VersionOnly(); } } + + public bool IsVersionLocked + { + get { return Origin == PackageSource.Embedded || Origin == PackageSource.Git || Origin == PackageSource.BuiltIn; } + } + + public bool CanBeRemoved + { + get { return Origin == PackageSource.Registry || Origin == PackageSource.BuiltIn || Origin == PackageSource.Local; } + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageInfo.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageInfo.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..e416489e0e277efbbcf8e08acbfc926a10f8650e --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageInfo.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: b9f324f08cd904ec986357c98dd9eaa6 +timeCreated: 1502224642 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageInfoListExtensions.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageInfoListExtensions.cs new file mode 100644 index 0000000000000000000000000000000000000000..f7b798c1f425f6b946c0a82b36f78abbafadcf4b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageInfoListExtensions.cs @@ -0,0 +1,37 @@ +using System.Collections.Generic; +using System.Linq; + +namespace UnityEditor.PackageManager.UI +{ + internal static class PackageInfoListExtensions + { + public static IEnumerable<PackageInfo> ByName(this IEnumerable<PackageInfo> list, string name) + { + return from package in list where package.Name == name select package; + } + + public static void SetCurrent(this IEnumerable<PackageInfo> list, bool current = true) + { + foreach (var package in list) + { + package.IsCurrent = current; + } + } + + public static void SetLatest(this IEnumerable<PackageInfo> list, bool latest = true) + { + foreach (var package in list) + { + package.IsLatest = latest; + } + } + + public static void SetGroup(this IEnumerable<PackageInfo> list, string group) + { + foreach (var package in list) + { + package.Group = group; + } + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageInfoListExtensions.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageInfoListExtensions.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..3ccc63f9ee0448a0232b40c162aba210d3cb264e --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageInfoListExtensions.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: a7b89acd74e047778b42209a7a733d39 +timeCreated: 1505740214 \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageJsonHelper.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageJsonHelper.cs new file mode 100644 index 0000000000000000000000000000000000000000..ec062ccc5f3cd98d575106616760a46ffbeda36a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageJsonHelper.cs @@ -0,0 +1,34 @@ +using System.IO; +using UnityEngine; + +namespace UnityEditor.PackageManager.UI +{ + internal class PackageJsonHelper + { + [SerializeField] + private string name = string.Empty; + + private string path = string.Empty; + + public static string GetPackagePath(string jsonPath) + { + return Path.GetDirectoryName(jsonPath).Replace("\\", "/"); + } + + public static PackageJsonHelper Load(string path) + { + // If the path is a directory, find the `package.json` file path + var jsonPath = Directory.Exists(path) ? Path.Combine(path, "package.json") : path; + if (!File.Exists(jsonPath)) + return null; + var packageJson = JsonUtility.FromJson<PackageJsonHelper>(File.ReadAllText(jsonPath)); + packageJson.path = GetPackagePath(jsonPath); + return string.IsNullOrEmpty(packageJson.name) ? null : packageJson; + } + + public PackageInfo PackageInfo + { + get { return new PackageInfo {PackageId = string.Format("{0}@file:{1}", name, path)}; } + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageJsonHelper.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageJsonHelper.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..42da9eb131513d5d77567262f5f1632ab668bb54 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageJsonHelper.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b9374526debed24449d75f8cc6d0103f +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageListExtensions.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageListExtensions.cs new file mode 100644 index 0000000000000000000000000000000000000000..caa200431dec4b02a0c054e704520b5fb9d15c93 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageListExtensions.cs @@ -0,0 +1,13 @@ +using System.Collections.Generic; +using System.Linq; + +namespace UnityEditor.PackageManager.UI +{ + internal static class PackageListExtensions + { + public static IEnumerable<Package> Current(this IEnumerable<Package> list) + { + return (from package in list where package.Current != null select package); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageListExtensions.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageListExtensions.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..ae09c6ba8c91d42b9d39b02e1c3291772a513108 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageListExtensions.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 7a74094b34f74992a5121c0586ccf6ea +timeCreated: 1506458921 \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageOrigin.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageOrigin.cs new file mode 100644 index 0000000000000000000000000000000000000000..14d9ac04df848f08e47c7df5d01d259c55496033 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageOrigin.cs @@ -0,0 +1,9 @@ +namespace UnityEditor.PackageManager.UI +{ + internal enum PackageOrigin + { + Unknown, + Builtin, + Registry + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageOrigin.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageOrigin.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..36ef852c664a800d4439a69378ba89067e177c7c --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageOrigin.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a98bc92072da64d49a393088e55ce2a0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageSearchFilter.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageSearchFilter.cs new file mode 100644 index 0000000000000000000000000000000000000000..c3b5a139ee623ffbdf57647cf322f1e0e2ef16b3 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageSearchFilter.cs @@ -0,0 +1,26 @@ +using System; + +namespace UnityEditor.PackageManager.UI +{ + [Serializable] + internal class PackageSearchFilter + { + private static PackageSearchFilter instance = new PackageSearchFilter(); + public static PackageSearchFilter Instance { get { return instance; } } + + public string SearchText { get; set; } + + public static void InitInstance(ref PackageSearchFilter value) + { + if (value == null) // UI window opened + value = instance; + else // Domain reload + instance = value; + } + + public void ResetSearch() + { + SearchText = string.Empty; + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageSearchFilter.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageSearchFilter.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..b20fdf2b74f711f3d9ea72200dd3e6e1906d8e98 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageSearchFilter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8d65a43500ec84d9186cb6d9ab681277 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageState.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageState.cs new file mode 100644 index 0000000000000000000000000000000000000000..f295773bbb2081fea5cfc4aebd28ecdf7092972b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageState.cs @@ -0,0 +1,9 @@ +namespace UnityEditor.PackageManager.UI +{ + internal enum PackageState { + UpToDate, + Outdated, + InProgress, + Error + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageState.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageState.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..c9e87ffd7cf7388ceb8bb8fffa393e158e1e40df --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageState.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0a822dba3d5c4c85b150866e5442a5ec +timeCreated: 1505740158 \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageTag.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageTag.cs new file mode 100644 index 0000000000000000000000000000000000000000..6b282f684c30b5cb11f01a0adad277004190d305 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageTag.cs @@ -0,0 +1,10 @@ +namespace UnityEditor.PackageManager.UI +{ + internal enum PackageTag + { + preview, + verified, + inDevelopment, + local + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageTag.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageTag.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..5a52800428baee493b241946045c43bda39788b1 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Packages/PackageTag.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2a3f4f8c4e2df41108f55825c24ff694 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm.meta new file mode 100644 index 0000000000000000000000000000000000000000..a579b8fb78ebbd9372e84132555630c6ff7199cc --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 669717f3193a457b9bad9665ebcae836 +timeCreated: 1504191654 \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmAddOperation.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmAddOperation.cs new file mode 100644 index 0000000000000000000000000000000000000000..d40046fcdbee774ff0a1005490aca96c9a63e5e4 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmAddOperation.cs @@ -0,0 +1,34 @@ +using System; +using UnityEditor.PackageManager.Requests; +using System.Linq; + +namespace UnityEditor.PackageManager.UI +{ + internal class UpmAddOperation : UpmBaseOperation, IAddOperation + { + public PackageInfo PackageInfo { get; protected set; } + + public event Action<PackageInfo> OnOperationSuccess = delegate { }; + + public void AddPackageAsync(PackageInfo packageInfo, Action<PackageInfo> doneCallbackAction = null, Action<Error> errorCallbackAction = null) + { + PackageInfo = packageInfo; + OnOperationError += errorCallbackAction; + OnOperationSuccess += doneCallbackAction; + + Start(); + } + + protected override Request CreateRequest() + { + return Client.Add(PackageInfo.PackageId); + } + + protected override void ProcessData() + { + var request = CurrentRequest as AddRequest; + var package = FromUpmPackageInfo(request.Result).First(); + OnOperationSuccess(package); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmAddOperation.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmAddOperation.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..115ed81f8732330ce898f14c531c73de135cda46 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmAddOperation.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 9f091dea68a1452cb6c04a6dfa73d5f5 +timeCreated: 1504190581 \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmBaseOperation.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmBaseOperation.cs new file mode 100644 index 0000000000000000000000000000000000000000..ea441cd467f6729fd6478452fc2cb1f21bb3eaa6 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmBaseOperation.cs @@ -0,0 +1,229 @@ +using System; +using System.Globalization; +using System.Collections.Generic; +using System.Linq; +using Semver; +using UnityEngine; +using UnityEditor.PackageManager.Requests; + +namespace UnityEditor.PackageManager.UI +{ + internal abstract class UpmBaseOperation : IBaseOperation + { + public static string GroupName(PackageSource origin) + { + var group = PackageGroupOrigins.Packages.ToString(); + if (origin == PackageSource.BuiltIn) + group = PackageGroupOrigins.BuiltInPackages.ToString(); + + return group; + } + + protected static IEnumerable<PackageInfo> FromUpmPackageInfo(PackageManager.PackageInfo info, bool isCurrent=true) + { + var packages = new List<PackageInfo>(); + var displayName = info.displayName; + if (string.IsNullOrEmpty(displayName)) + { + displayName = info.name.Replace("com.unity.modules.", ""); + displayName = displayName.Replace("com.unity.", ""); + displayName = new CultureInfo("en-US").TextInfo.ToTitleCase(displayName); + } + + string author = info.author.name; + if (string.IsNullOrEmpty(info.author.name) && info.name.StartsWith("com.unity.")) + author = "Unity Technologies Inc."; + + var lastCompatible = info.versions.latestCompatible; + var versions = new List<string>(); + versions.AddRange(info.versions.compatible); + if (versions.FindIndex(version => version == info.version) == -1) + { + versions.Add(info.version); + + versions.Sort((left, right) => + { + if (left == null || right == null) return 0; + + SemVersion leftVersion = left; + SemVersion righVersion = right; + return leftVersion.CompareByPrecedence(righVersion); + }); + + SemVersion packageVersion = info.version; + if (!string.IsNullOrEmpty(lastCompatible)) + { + SemVersion lastCompatibleVersion = + string.IsNullOrEmpty(lastCompatible) ? (SemVersion) null : lastCompatible; + if (packageVersion != null && string.IsNullOrEmpty(packageVersion.Prerelease) && + packageVersion.CompareByPrecedence(lastCompatibleVersion) > 0) + lastCompatible = info.version; + } + else + { + if (packageVersion != null && string.IsNullOrEmpty(packageVersion.Prerelease)) + lastCompatible = info.version; + } + } + + foreach(var version in versions) + { + var isVersionCurrent = version == info.version && isCurrent; + var isBuiltIn = info.source == PackageSource.BuiltIn; + var isVerified = string.IsNullOrEmpty(SemVersion.Parse(version).Prerelease) && version == info.versions.recommended; + var state = (isBuiltIn || info.version == lastCompatible || !isCurrent ) ? PackageState.UpToDate : PackageState.Outdated; + + // Happens mostly when using a package that hasn't been in production yet. + if (info.versions.all.Length <= 0) + state = PackageState.UpToDate; + + if (info.errors.Length > 0) + state = PackageState.Error; + + var packageInfo = new PackageInfo + { + Name = info.name, + DisplayName = displayName, + PackageId = version == info.version ? info.packageId : null, + Version = version, + Description = info.description, + Category = info.category, + IsCurrent = isVersionCurrent, + IsLatest = version == lastCompatible, + IsVerified = isVerified, + Errors = info.errors.ToList(), + Group = GroupName(info.source), + State = state, + Origin = isBuiltIn || isVersionCurrent ? info.source : PackageSource.Registry, + Author = author, + Info = info + }; + + packages.Add(packageInfo); + } + + return packages; + } + + public static event Action<UpmBaseOperation> OnOperationStart = delegate { }; + + public event Action<Error> OnOperationError = delegate { }; + public event Action OnOperationFinalized = delegate { }; + + public Error ForceError { get; set; } // Allow external component to force an error on the requests (eg: testing) + public Error Error { get; protected set; } // Keep last error + + public bool IsCompleted { get; private set; } + + protected abstract Request CreateRequest(); + + [SerializeField] + protected Request CurrentRequest; + public readonly ThreadedDelay Delay = new ThreadedDelay(); + + protected abstract void ProcessData(); + + protected void Start() + { + Error = null; + OnOperationStart(this); + + Delay.Start(); + + if (TryForcedError()) + return; + + EditorApplication.update += Progress; + } + + // Common progress code for all classes + private void Progress() + { + if (!Delay.IsDone) + return; + + // Create the request after the delay + if (CurrentRequest == null) + { + CurrentRequest = CreateRequest(); + } + + // Since CurrentRequest's error property is private, we need to simulate + // an error instead of just setting it. + if (TryForcedError()) + return; + + if (CurrentRequest.IsCompleted) + { + if (CurrentRequest.Status == StatusCode.Success) + OnDone(); + else if (CurrentRequest.Status >= StatusCode.Failure) + OnError(CurrentRequest.Error); + else + Debug.LogError("Unsupported progress state " + CurrentRequest.Status); + } + } + + private void OnError(Error error) + { + try + { + Error = error; + + var message = "Cannot perform upm operation."; + if (error != null) + message = "Cannot perform upm operation: " + Error.message + " [" + Error.errorCode + "]"; + + Debug.LogError(message); + + OnOperationError(Error); + } + catch (Exception exception) + { + Debug.LogError("Package Manager Window had an error while reporting an error in an operation: " + exception); + } + + FinalizeOperation(); + } + + private void OnDone() + { + try + { + ProcessData(); + } + catch (Exception error) + { + Debug.LogError("Package Manager Window had an error while completing an operation: " + error); + } + + FinalizeOperation(); + } + + private void FinalizeOperation() + { + EditorApplication.update -= Progress; + OnOperationFinalized(); + IsCompleted = true; + } + + public void Cancel() + { + EditorApplication.update -= Progress; + OnOperationError = delegate { }; + OnOperationFinalized = delegate { }; + IsCompleted = true; + } + + private bool TryForcedError() + { + if (ForceError != null) + { + OnError(ForceError); + return true; + } + + return false; + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmBaseOperation.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmBaseOperation.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..785c839a62d6921d73971dafec367bc3b8e91bd8 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmBaseOperation.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 4e830e2dbc3315b4b97cd5311a54e4fe +timeCreated: 1502918867 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmListOperation.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmListOperation.cs new file mode 100644 index 0000000000000000000000000000000000000000..cebc294e0cab1773484adddb2941cb6c07d0d36a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmListOperation.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor.PackageManager.Requests; + +namespace UnityEditor.PackageManager.UI +{ + internal class UpmListOperation : UpmBaseOperation, IListOperation + { + [SerializeField] + private Action<IEnumerable<PackageInfo>> _doneCallbackAction; + + public UpmListOperation(bool offlineMode) : base() + { + OfflineMode = offlineMode; + } + + public bool OfflineMode { get; set; } + + public void GetPackageListAsync(Action<IEnumerable<PackageInfo>> doneCallbackAction, Action<Error> errorCallbackAction = null) + { + this._doneCallbackAction = doneCallbackAction; + OnOperationError += errorCallbackAction; + + Start(); + } + + protected override Request CreateRequest() + { + return Client.List(OfflineMode); + } + + protected override void ProcessData() + { + var request = CurrentRequest as ListRequest; + var packages = new List<PackageInfo>(); + foreach (var upmPackage in request.Result) + { + var packageInfos = FromUpmPackageInfo(upmPackage); + packages.AddRange(packageInfos); + } + + _doneCallbackAction(packages); + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmListOperation.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmListOperation.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..3c49034d9c3479623d2e09141ced30f9ed28c898 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmListOperation.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 9a2c874c382e2419184b302497279dd9 +timeCreated: 1502224642 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmOperationFactory.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmOperationFactory.cs new file mode 100644 index 0000000000000000000000000000000000000000..9397e5909add4785993efed9e48d252d93393430 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmOperationFactory.cs @@ -0,0 +1,25 @@ +namespace UnityEditor.PackageManager.UI +{ + internal class UpmOperationFactory : IOperationFactory + { + public IListOperation CreateListOperation(bool offlineMode = false) + { + return new UpmListOperation(offlineMode); + } + + public ISearchOperation CreateSearchOperation() + { + return new UpmSearchOperation(); + } + + public IAddOperation CreateAddOperation() + { + return new UpmAddOperation(); + } + + public IRemoveOperation CreateRemoveOperation() + { + return new UpmRemoveOperation(); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmOperationFactory.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmOperationFactory.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..7911c3bb443b05813a98ceb4c38de9a872355ac9 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmOperationFactory.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: e6925bb38494e6a43ba0921e65e424fe +timeCreated: 1502915478 +licenseType: Free +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmRemoveOperation.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmRemoveOperation.cs new file mode 100644 index 0000000000000000000000000000000000000000..254c51bbb8e509acdd5157fd032a867c94fbc154 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmRemoveOperation.cs @@ -0,0 +1,33 @@ +using System; +using UnityEngine; +using UnityEditor.PackageManager.Requests; + +namespace UnityEditor.PackageManager.UI +{ + internal class UpmRemoveOperation : UpmBaseOperation, IRemoveOperation + { + [SerializeField] + private PackageInfo _package; + + public event Action<PackageInfo> OnOperationSuccess = delegate { }; + + public void RemovePackageAsync(PackageInfo package, Action<PackageInfo> doneCallbackAction = null, Action<Error> errorCallbackAction = null) + { + _package = package; + OnOperationError += errorCallbackAction; + OnOperationSuccess += doneCallbackAction; + + Start(); + } + + protected override Request CreateRequest() + { + return Client.Remove(_package.Name); + } + + protected override void ProcessData() + { + OnOperationSuccess(_package); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmRemoveOperation.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmRemoveOperation.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..58430b057db466c0f4cef12fc3a48c36e9c0c22f --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmRemoveOperation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d5a61f8cc87394b28aec6b88b4083217 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmSearchOperation.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmSearchOperation.cs new file mode 100644 index 0000000000000000000000000000000000000000..7e6615f715b6a935ee9eced4da66fc9637e50176 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmSearchOperation.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEditor.PackageManager.Requests; + +namespace UnityEditor.PackageManager.UI +{ + internal class UpmSearchOperation : UpmBaseOperation, ISearchOperation + { + [SerializeField] + private Action<IEnumerable<PackageInfo>> _doneCallbackAction; + + public void GetAllPackageAsync(Action<IEnumerable<PackageInfo>> doneCallbackAction = null, Action<Error> errorCallbackAction = null) + { + _doneCallbackAction = doneCallbackAction; + OnOperationError += errorCallbackAction; + + Start(); + } + + protected override Request CreateRequest() + { + return Client.SearchAll(); + } + + protected override void ProcessData() + { + var request = CurrentRequest as SearchRequest; + var packages = new List<PackageInfo>(); + foreach (var upmPackage in request.Result) + { + var packageInfos = FromUpmPackageInfo(upmPackage, false); + packages.AddRange(packageInfos); + } + _doneCallbackAction(packages); + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmSearchOperation.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmSearchOperation.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..4fcf5176ffb147a46c19b9b12a3f1a05dec3c19c --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/Services/Upm/UpmSearchOperation.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: ef5a2781610c4f12a79939f717f789cf +timeCreated: 1508160183 \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI.meta new file mode 100644 index 0000000000000000000000000000000000000000..81a8a07529708efeb0de1f13bfe0ce8ca96dc11d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 301fbaa0e62e44fd2a7383bd338a2898 +folderAsset: yes +timeCreated: 1502224642 +licenseType: Pro +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common.meta new file mode 100644 index 0000000000000000000000000000000000000000..43dc78270277072bea21982b03cd9139fffd5521 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 42064bc130be4c44b288d249a44b356f +timeCreated: 1504191962 \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/Alert.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/Alert.cs new file mode 100644 index 0000000000000000000000000000000000000000..12604728b2be3709b6935d57270a6b0e1b2bfaec --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/Alert.cs @@ -0,0 +1,74 @@ +using System; +using UnityEngine.Experimental.UIElements; + +namespace UnityEditor.PackageManager.UI +{ +#if !UNITY_2018_3_OR_NEWER + internal class AlertFactory : UxmlFactory<Alert> + { + protected override Alert DoCreate(IUxmlAttributes bag, CreationContext cc) + { + return new Alert(); + } + } +#endif + + internal class Alert : VisualElement + { +#if UNITY_2018_3_OR_NEWER + internal new class UxmlFactory : UxmlFactory<Alert> { } +#endif + + private const string TemplatePath = PackageManagerWindow.ResourcesPath + "Templates/Alert.uxml"; + private readonly VisualElement root; + private const float originalPositionRight = 5.0f; + private const float positionRightWithScroll = 12.0f; + + public Action OnCloseError; + + public Alert() + { + UIUtils.SetElementDisplay(this, false); + + root = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(TemplatePath).CloneTree(null); + Add(root); + root.StretchToParentSize(); + + CloseButton.clickable.clicked += () => + { + if (null != OnCloseError) + OnCloseError(); + ClearError(); + }; + } + + public void SetError(Error error) + { + var message = "An error occured."; + if (error != null) + message = error.message ?? string.Format("An error occurred ({0})", error.errorCode.ToString()); + + AlertMessage.text = message; + UIUtils.SetElementDisplay(this, true); + } + + public void ClearError() + { + UIUtils.SetElementDisplay(this, false); + AdjustSize(false); + AlertMessage.text = ""; + OnCloseError = null; + } + + public void AdjustSize(bool verticalScrollerVisible) + { + if (verticalScrollerVisible) + style.positionRight = originalPositionRight + positionRightWithScroll; + else + style.positionRight = originalPositionRight; + } + + private Label AlertMessage { get { return root.Q<Label>("alertMessage"); } } + private Button CloseButton { get { return root.Q<Button>("close"); } } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/Alert.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/Alert.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..d53730695c5d73a4c34b6cc477fd1fb779cb1edd --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/Alert.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b274f3d1ea05d4bd8a13f4556f7797d2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/LoadingSpinner.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/LoadingSpinner.cs new file mode 100644 index 0000000000000000000000000000000000000000..f0f2168a347d445e1e8e1fd44dd5c06a6e9597a8 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/LoadingSpinner.cs @@ -0,0 +1,87 @@ +using UnityEngine; +using UnityEngine.Experimental.UIElements; + +namespace UnityEditor.PackageManager.UI +{ +#if !UNITY_2018_3_OR_NEWER + internal class LoadingSpinnerFactory : UxmlFactory<LoadingSpinner> + { + protected override LoadingSpinner DoCreate(IUxmlAttributes bag, CreationContext cc) + { + return new LoadingSpinner(); + } + } +#endif + + internal class LoadingSpinner : VisualElement + { +#if UNITY_2018_3_OR_NEWER + internal new class UxmlFactory : UxmlFactory<LoadingSpinner, UxmlTraits> + { + } + + // This works around an issue with UXML instantiation + // See https://fogbugz.unity3d.com/f/cases/1046459/ + internal new class UxmlTraits : VisualElement.UxmlTraits + { + public override void Init(VisualElement ve, IUxmlAttributes bag, CreationContext cc) + { + base.Init(ve, bag, cc); + UIUtils.SetElementDisplay(ve, false); + } + } +#endif + + public bool InvertColor { get; set; } + public bool Started { get; private set; } + + private int rotation; + + public LoadingSpinner() + { + InvertColor = false; + Started = false; + UIUtils.SetElementDisplay(this, false); + } + + private void UpdateProgress() + { + if (parent == null) + return; + + parent.transform.rotation = Quaternion.Euler(0, 0, rotation); + rotation += 3; + if (rotation > 360) + rotation -= 360; + } + + public void Start() + { + if (Started) + return; + + // Weird hack to make sure loading spinner doesn't generate an error every frame. + // Cannot put in constructor as it give really strange result. + if (parent != null && parent.parent != null) + parent.parent.clippingOptions = ClippingOptions.ClipAndCacheContents; + + rotation = 0; + + EditorApplication.update += UpdateProgress; + + Started = true; + UIUtils.SetElementDisplay(this, true); + } + + public void Stop() + { + if (!Started) + return; + + EditorApplication.update -= UpdateProgress; + + Started = false; + UIUtils.SetElementDisplay(this, false); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/LoadingSpinner.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/LoadingSpinner.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..d369d6bd642fe71c6cb5890034da91fb4c81f2c7 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/LoadingSpinner.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 06f8e3404d534cab82fe852ff33dad77 +timeCreated: 1504191988 \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/PopupField.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/PopupField.cs new file mode 100644 index 0000000000000000000000000000000000000000..bcb09627affaab220e1aed9b375b7c88b3ea0517 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/PopupField.cs @@ -0,0 +1,186 @@ +using System; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Experimental.UIElements; + +namespace UnityEditor.PackageManager.UI +{ +#if UNITY_2018_3_OR_NEWER + internal class PopupField<T> : Experimental.UIElements.PopupField<T> + { + private Func<T, string> m_Callback; + + public override T value + { + get { return base.value; } + set + { + base.value = value; + if (m_Callback != null) + m_TextElement.text = m_Callback(m_Value); + else + m_TextElement.text = m_Value.ToString(); + } + } + + /// <summary> + /// Callback that will return the string to be set in the field's label. + /// </summary> + /// <param name="callback"></param> + public void SetLabelCallback(Func<T, string> callback) + { + m_Callback = callback; + } + + public PopupField(List<T> choices, T defaultValue) : + base(choices, defaultValue) + { + } + + public PopupField(List<T> choices, int defaultIndex) : + base(choices, defaultIndex) + { + } + } +#else + internal class PopupField<T> : BaseTextElement, INotifyValueChanged<T> + { + private readonly List<T> m_PossibleValues; + private Func<T, string> m_Callback; + private EventCallback<ChangeEvent<T>> m_valueCallback; + private T m_Value; + public T value + { + get { return m_Value; } + set + { + if (EqualityComparer<T>.Default.Equals(m_Value, value)) + return; + + if (!m_PossibleValues.Contains(value)) + throw new ArgumentException(string.Format("Value {0} is not present in the list of possible values", value)); + + m_Value = value; + m_Index = m_PossibleValues.IndexOf(m_Value); + if (m_Callback != null) + text = m_Callback(m_Value); + else + text = m_Value.ToString(); + +#if UNITY_2018_3_OR_NEWER + MarkDirtyRepaint(); +#else + Dirty(ChangeType.Repaint); +#endif + } + } + + private int m_Index = -1; + public int index + { + get { return m_Index; } + set + { + if (value != m_Index) + { + if (value >= m_PossibleValues.Count || value < 0) + throw new ArgumentException(string.Format("Index {0} is beyond the scope of possible value", value)); + m_Index = value; + this.value = m_PossibleValues[m_Index]; + } + } + } + + /// <summary> + /// Callback that will return the string to be set in the field's label. + /// </summary> + /// <param name="callback"></param> + public void SetLabelCallback(Func<T, string> callback) + { + m_Callback = callback; + } + + private PopupField(List<T> possibleValues) + { + if (possibleValues == null) + throw new ArgumentNullException("possibleValues can't be null"); + + m_PossibleValues = possibleValues; + + AddToClassList("popupField"); + } + + public PopupField(List<T> possibleValues, T defaultValue) : + this(possibleValues) + { + if (defaultValue == null) + throw new ArgumentNullException("defaultValue can't be null"); + + if (!m_PossibleValues.Contains(defaultValue)) + throw new ArgumentException(string.Format("Default value {0} is not present in the list of possible values", defaultValue)); + + // note: idx will be set when setting value + value = defaultValue; + } + + public PopupField(List<T> possibleValues, int defaultIndex) : + this(possibleValues) + { + if (defaultIndex >= m_PossibleValues.Count || defaultIndex < 0) + throw new ArgumentException(string.Format("Default Index {0} is beyond the scope of possible value", value)); + + // note: value will be set when setting idx + index = defaultIndex; + } + + public void SetValueAndNotify(T newValue) + { + if (!EqualityComparer<T>.Default.Equals(newValue, value)) + { + using (ChangeEvent<T> evt = ChangeEvent<T>.GetPooled(value, newValue)) + { + value = newValue; + if (m_valueCallback != null) + m_valueCallback(evt); + } + } + } + + public void OnValueChanged(EventCallback<ChangeEvent<T>> callback) + { + m_valueCallback = callback; + RegisterCallback(callback); + } + + protected override void ExecuteDefaultAction(EventBase evt) + { + base.ExecuteDefaultAction(evt); + + if (evt.GetEventTypeId() == MouseDownEvent.TypeId()) + OnMouseDown(); + } + + private void OnMouseDown() + { + var menu = new GenericMenu(); + + foreach (T item in m_PossibleValues) + { + bool isSelected = EqualityComparer<T>.Default.Equals(item, value); + menu.AddItem(new GUIContent(item.ToString()), isSelected, + () => ChangeValueFromMenu(item)); + } + + var menuPosition = new Vector2(0.0f, layout.height); + menuPosition = this.LocalToWorld(menuPosition); + var menuRect = new Rect(menuPosition, Vector2.zero); + menu.DropDown(menuRect); + } + + private void ChangeValueFromMenu(T menuItem) + { + SetValueAndNotify(menuItem); + } + } +#endif +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/PopupField.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/PopupField.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..bdc3df8662f8a6b0c34dfe58b0616dc73e4356d0 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/PopupField.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9e69df8ff024a4dc1a9e5c22725e4863 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/UIUtils.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/UIUtils.cs new file mode 100644 index 0000000000000000000000000000000000000000..88b95d851623da137f135a252db23f44dbdcac82 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/UIUtils.cs @@ -0,0 +1,55 @@ +using UnityEngine.Experimental.UIElements; + +namespace UnityEditor.PackageManager.UI +{ + internal static class UIUtils + { + private const string DisplayNone = "display-none"; + + public static void SetElementDisplay(VisualElement element, bool value) + { + if (element == null) + return; + + if (value) + element.RemoveFromClassList(DisplayNone); + else + element.AddToClassList(DisplayNone); + + element.visible = value; + } + + public static void SetElementDisplayNonEmpty(Label element) + { + if (element == null) + return; + + var empty = string.IsNullOrEmpty(element.text); + if (empty) + element.AddToClassList(DisplayNone); + else + element.RemoveFromClassList(DisplayNone); + + element.visible = !empty; + } + + public static void SetElementDisplayNonEmpty(Button element) + { + if (element == null) + return; + + var empty = string.IsNullOrEmpty(element.text); + if (empty) + element.AddToClassList(DisplayNone); + else + element.RemoveFromClassList(DisplayNone); + + element.visible = !empty; + } + + public static bool IsElementVisible(VisualElement element) + { + return element.visible && !element.ClassListContains(DisplayNone); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/UIUtils.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/UIUtils.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..5e106c182aa3098de49e2c2a89434104d807ca27 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/UIUtils.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 0edd86f97b0648f685604a5582cff608 +timeCreated: 1508956933 \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/VersionItem.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/VersionItem.cs new file mode 100644 index 0000000000000000000000000000000000000000..eea04a2c392593408e85dc606e0b6afa8fb7ee2d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/VersionItem.cs @@ -0,0 +1,66 @@ +namespace UnityEditor.PackageManager.UI +{ + internal class VersionItem + { + internal PackageInfo Version; + + public string MenuName { get; set; } + + // Base label + public string Label + { + get + { + if (Version == null) + return MenuName; + + var label = Version.VersionWithoutTag; + + return label; + } + } + + public string DropdownLabel + { + get + { + if (Version == null) + return MenuName; + + var label = MenuName + Label; + + if (Version.IsLocal) + label += " - local"; + if (Version.IsCurrent) + label += " - current"; + if (Version.IsVerified) + label += " - verified"; + else if (!string.IsNullOrEmpty(Version.Version.Prerelease)) + label += string.Format(" - {0}", Version.Version.Prerelease); + else if (Version.IsPreview) + label += " - preview"; + + return label; + } + } + + public override string ToString() + { + return DropdownLabel; + } + + public override bool Equals(object obj) + { + if (ReferenceEquals(obj, null)) return false; + if (ReferenceEquals(this, obj)) return true; + + var other = (VersionItem)obj; + return Version == other.Version; + } + + public override int GetHashCode() + { + return Version.GetHashCode(); + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/VersionItem.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/VersionItem.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..b0b1f2492a2e720bb1114fa7d6088220250ec070 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Common/VersionItem.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 3877b2be7ee07495d8918dc8937e6de2 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Interfaces.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Interfaces.meta new file mode 100644 index 0000000000000000000000000000000000000000..97228337c735a592f43dc38fe33e9c4bc9ff5698 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Interfaces.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bfd715cd54ab84c22b128149c12b516c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Interfaces/IPackageManagerExtension.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Interfaces/IPackageManagerExtension.cs new file mode 100644 index 0000000000000000000000000000000000000000..e785700e2617cb49cba2825be55d90b65347dc1e --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Interfaces/IPackageManagerExtension.cs @@ -0,0 +1,34 @@ +using UnityEngine.Experimental.UIElements; + +namespace UnityEditor.PackageManager.UI +{ + /// <summary> + /// Interface for Package Manager UI Extension + /// </summary> + public interface IPackageManagerExtension + { + /// <summary> + /// Creates the extension UI visual element. + /// </summary> + /// <returns>A visual element that represents the UI or null if none</returns> + VisualElement CreateExtensionUI(); + + /// <summary> + /// Called by the Package Manager UI when the package selection changed. + /// </summary> + /// <param name="packageInfo">The newly selected package information (can be null)</param> + void OnPackageSelectionChange(PackageManager.PackageInfo packageInfo); + + /// <summary> + /// Called by the Package Manager UI when a package is added or updated. + /// </summary> + /// <param name="packageInfo">The package information</param> + void OnPackageAddedOrUpdated(PackageManager.PackageInfo packageInfo); + + /// <summary> + /// Called by the Package Manager UI when a package is removed. + /// </summary> + /// <param name="packageInfo">The package information</param> + void OnPackageRemoved(PackageManager.PackageInfo packageInfo); + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Interfaces/IPackageManagerExtension.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Interfaces/IPackageManagerExtension.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..ca2abe91cb28794ba49b68cbb606d514d0768f51 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/Interfaces/IPackageManagerExtension.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 66083b7f6dc2e433eae33f3244b2ce88 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageAddFromUrlField.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageAddFromUrlField.cs new file mode 100644 index 0000000000000000000000000000000000000000..5e8048c93afe26857e0c103815faf365955a677a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageAddFromUrlField.cs @@ -0,0 +1,134 @@ +using UnityEngine; +using UnityEngine.Experimental.UIElements; + +namespace UnityEditor.PackageManager.UI +{ +#if !UNITY_2018_3_OR_NEWER + internal class PackageAddFromUrlFieldFactory : UxmlFactory<PackageAddFromUrlField> + { + protected override PackageAddFromUrlField DoCreate(IUxmlAttributes bag, CreationContext cc) + { + return new PackageAddFromUrlField(); + } + } +#endif + + internal class PackageAddFromUrlField : VisualElement + { +#if UNITY_2018_3_OR_NEWER + internal new class UxmlFactory : UxmlFactory<PackageAddFromUrlField> { } +#endif + private string urlText; + + private readonly VisualElement root; + + public PackageAddFromUrlField() + { + root = Resources.GetTemplate("PackageAddFromUrlField.uxml"); + Add(root); + + UrlTextField.value = urlText; + + AddButton.SetEnabled(!string.IsNullOrEmpty(urlText)); + AddButton.clickable.clicked += OnAddButtonClick; + + RegisterCallback<AttachToPanelEvent>(OnEnterPanel); + RegisterCallback<DetachFromPanelEvent>(OnLeavePanel); + } + + private void OnUrlTextFieldChange(ChangeEvent<string> evt) + { + urlText = evt.newValue; + AddButton.SetEnabled(!string.IsNullOrEmpty(urlText)); + } + + private void OnUrlTextFieldFocus(FocusEvent evt) + { + Show(); + } + + private void OnUrlTextFieldFocusOut(FocusOutEvent evt) + { + Hide(); + } + + private void OnContainerFocus(FocusEvent evt) + { + UrlTextField.Focus(); + } + + private void OnContainerFocusOut(FocusOutEvent evt) + { + Hide(); + } + + private void OnEnterPanel(AttachToPanelEvent evt) + { + AddFromUrlFieldContainer.RegisterCallback<FocusEvent>(OnContainerFocus); + AddFromUrlFieldContainer.RegisterCallback<FocusOutEvent>(OnContainerFocusOut); + UrlTextField.RegisterCallback<FocusEvent>(OnUrlTextFieldFocus); + UrlTextField.RegisterCallback<FocusOutEvent>(OnUrlTextFieldFocusOut); + UrlTextField.RegisterCallback<ChangeEvent<string>>(OnUrlTextFieldChange); + UrlTextField.RegisterCallback<KeyDownEvent>(OnKeyDownShortcut); + Hide(); + } + + private void OnLeavePanel(DetachFromPanelEvent evt) + { + AddFromUrlFieldContainer.UnregisterCallback<FocusEvent>(OnContainerFocus); + AddFromUrlFieldContainer.UnregisterCallback<FocusOutEvent>(OnContainerFocusOut); + UrlTextField.UnregisterCallback<FocusEvent>(OnUrlTextFieldFocus); + UrlTextField.UnregisterCallback<FocusOutEvent>(OnUrlTextFieldFocusOut); + UrlTextField.UnregisterCallback<ChangeEvent<string>>(OnUrlTextFieldChange); + UrlTextField.UnregisterCallback<KeyDownEvent>(OnKeyDownShortcut); + } + + private void OnKeyDownShortcut(KeyDownEvent evt) + { + switch (evt.keyCode) + { + case KeyCode.Escape: + Hide(); + break; + case KeyCode.Return: + case KeyCode.KeypadEnter: + OnAddButtonClick(); + break; + } + } + + private void OnAddButtonClick() + { + var path = urlText; + if (!string.IsNullOrEmpty(path) && !Package.AddRemoveOperationInProgress) + { + Package.AddFromLocalDisk(path); + Hide(); + } + } + + internal void Hide() + { + UIUtils.SetElementDisplay(this, false); + } + + internal void Show(bool reset = false) + { + if (reset) + Reset(); + UIUtils.SetElementDisplay(this, true); + } + + private void Reset() + { + UrlTextField.value = string.Empty; + urlText = string.Empty; + AddButton.SetEnabled(false); + UrlTextField.Focus(); + } + + private VisualElement AddFromUrlFieldContainer { get { return root.Q<VisualElement>("addFromUrlFieldContainer"); }} + private TextField UrlTextField { get { return root.Q<TextField>("urlTextField"); } } + private Button AddButton{ get { return root.Q<Button>("addFromUrlButton"); }} + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageAddFromUrlField.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageAddFromUrlField.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..c1b03b5d7e8946e242b27993debc7af5cc689967 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageAddFromUrlField.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 40f980217d9196e4baa9ebd2ac1328af +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageDetails.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageDetails.cs new file mode 100644 index 0000000000000000000000000000000000000000..21f481bee95eb8ae029e5d4731f9e9c3a9db6c79 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageDetails.cs @@ -0,0 +1,662 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Semver; +using UnityEngine; +using UnityEngine.Networking; +using UnityEngine.Experimental.UIElements; + +namespace UnityEditor.PackageManager.UI +{ +#if !UNITY_2018_3_OR_NEWER + internal class PackageDetailsFactory : UxmlFactory<PackageDetails> + { + protected override PackageDetails DoCreate(IUxmlAttributes bag, CreationContext cc) + { + return new PackageDetails(); + } + } +#endif + + internal class PackageDetails : VisualElement + { +#if UNITY_2018_3_OR_NEWER + internal new class UxmlFactory : UxmlFactory<PackageDetails> { } +#endif + + private readonly VisualElement root; + private Package package; + private const string emptyDescriptionClass = "empty"; + private List<VersionItem> VersionItems; + internal PopupField<VersionItem> VersionPopup; + private PackageInfo DisplayPackage; + + private PackageInfo SelectedPackage + { + get { return VersionPopup.value.Version != null ? VersionPopup.value.Version : null; } + } + + internal enum PackageAction + { + Add, + Remove, + Update, + Downgrade, + Enable, + Disable, + UpToDate, + Current, + Local, + Git, + Embedded + } + + private static readonly VersionItem EmptyVersion = new VersionItem {Version = null}; + internal static readonly string[] PackageActionVerbs = { "Install", "Remove", "Update to", "Update to", "Enable", "Disable", "Up to date", "Current", "Local", "Git", "Embedded" }; + internal static readonly string[] PackageActionInProgressVerbs = { "Installing", "Removing", "Updating to", "Updating to", "Enabling", "Disabling", "Up to date", "Current", "Local", "Git", "Embedded" }; + + public PackageDetails() + { + UIUtils.SetElementDisplay(this, false); + + root = Resources.GetTemplate("PackageDetails.uxml"); + Add(root); + + foreach (var extension in PackageManagerExtensions.Extensions) + CustomContainer.Add(extension.CreateExtensionUI()); + + root.StretchToParentSize(); + + SetUpdateVisibility(false); + RemoveButton.visible = false; + UpdateBuiltIn.visible = false; + + UpdateButton.clickable.clicked += UpdateClick; + UpdateBuiltIn.clickable.clicked += UpdateClick; + RemoveButton.clickable.clicked += RemoveClick; + ViewDocButton.clickable.clicked += ViewDocClick; + ViewChangelogButton.clickable.clicked += ViewChangelogClick; + ViewLicenses.clickable.clicked += ViewLicensesClick; + + VersionItems = new List<VersionItem> {EmptyVersion}; + VersionPopup = new PopupField<VersionItem>(VersionItems, 0); + VersionPopup.SetLabelCallback(VersionSelectionSetLabel); + VersionPopup.AddToClassList("popup"); + VersionPopup.OnValueChanged(VersionSelectionChanged); + + if (VersionItems.Count == 1) + VersionPopup.SetEnabled(false); + + UpdateDropdownContainer.Add(VersionPopup); + VersionPopup.StretchToParentSize(); + + + // Fix button on dark skin but overlapping edge pixel perfectly + if (EditorGUIUtility.isProSkin) + { + VersionPopup.style.positionLeft = -1; + UpdateDropdownContainer.style.sliceLeft = 4; + } + } + + private string VersionSelectionSetLabel(VersionItem item) + { + return item.Label; + } + + private void VersionSelectionChanged(ChangeEvent<VersionItem> e) + { + RefreshAddButton(); + } + + private void SetUpdateVisibility(bool value) + { + if (UpdateContainer != null) + UIUtils.SetElementDisplay(UpdateContainer, value); + } + + internal void SetDisplayPackage(PackageInfo packageInfo) + { + DisplayPackage = packageInfo; + + var detailVisible = true; + Error error = null; + + if (package == null || DisplayPackage == null) + { + detailVisible = false; + UIUtils.SetElementDisplay(DocumentationContainer, false); + UIUtils.SetElementDisplay(CustomContainer, false); + UIUtils.SetElementDisplay(UpdateBuiltIn, false); + + foreach (var extension in PackageManagerExtensions.Extensions) + extension.OnPackageSelectionChange(null); + } + else + { + SetUpdateVisibility(true); + UIUtils.SetElementDisplay(ViewDocButton, true); + RemoveButton.visible = true; + + if (string.IsNullOrEmpty(DisplayPackage.Description)) + { + DetailDesc.text = "There is no description for this package."; + DetailDesc.AddToClassList(emptyDescriptionClass); + } + else + { + DetailDesc.text = DisplayPackage.Description; + DetailDesc.RemoveFromClassList(emptyDescriptionClass); + } + + root.Q<Label>("detailTitle").text = DisplayPackage.DisplayName; + DetailVersion.text = "Version " + DisplayPackage.VersionWithoutTag; + + if (DisplayPackage.IsInDevelopment || DisplayPackage.HasVersionTag(PackageTag.preview)) + UIUtils.SetElementDisplay(GetTag(PackageTag.verified), false); + else + { + var unityVersionParts = Application.unityVersion.Split('.'); + var unityVersion = string.Format("{0}.{1}", unityVersionParts[0], unityVersionParts[1]); + VerifyLabel.text = unityVersion + " verified"; + UIUtils.SetElementDisplay(GetTag(PackageTag.verified), DisplayPackage.IsVerified); + } + + UIUtils.SetElementDisplay(GetTag(PackageTag.inDevelopment), DisplayPackage.IsInDevelopment); + UIUtils.SetElementDisplay(GetTag(PackageTag.local), DisplayPackage.IsLocal); + UIUtils.SetElementDisplay(GetTag(PackageTag.preview), DisplayPackage.IsPreview); + + UIUtils.SetElementDisplay(DocumentationContainer, DisplayPackage.Origin != PackageSource.BuiltIn); + UIUtils.SetElementDisplay(ChangelogContainer, DisplayPackage.HasChangelog(DisplayPackage)); + + root.Q<Label>("detailName").text = DisplayPackage.Name; + root.Q<ScrollView>("detailView").scrollOffset = new Vector2(0, 0); + + DetailModuleReference.text = ""; + var isBuiltIn = DisplayPackage.IsBuiltIn; + if (isBuiltIn) + DetailModuleReference.text = DisplayPackage.BuiltInDescription; + + DetailAuthor.text = ""; + if (!string.IsNullOrEmpty(DisplayPackage.Author)) + DetailAuthor.text = string.Format("Author: {0}", DisplayPackage.Author); + + UIUtils.SetElementDisplay(DetailDesc, !isBuiltIn); + UIUtils.SetElementDisplay(DetailVersion, !isBuiltIn); + UIUtils.SetElementDisplayNonEmpty(DetailModuleReference); + UIUtils.SetElementDisplayNonEmpty(DetailAuthor); + + if (DisplayPackage.Errors.Count > 0) + error = DisplayPackage.Errors.First(); + + RefreshAddButton(); + RefreshRemoveButton(); + UIUtils.SetElementDisplay(CustomContainer, true); + + package.AddSignal.OnOperation += OnAddOperation; + package.RemoveSignal.OnOperation += OnRemoveOperation; + foreach (var extension in PackageManagerExtensions.Extensions) + extension.OnPackageSelectionChange(DisplayPackage.Info); + } + + // Set visibility + root.Q<VisualElement>("detail").visible = detailVisible; + + if (null == error) + error = PackageCollection.Instance.GetPackageError(package); + + if (error != null) + SetError(error); + else + DetailError.ClearError(); + } + + private void ResetVersionItems(PackageInfo displayPackage) + { + VersionItems.Clear(); + VersionPopup.SetEnabled(true); + + if (displayPackage == null) + return; + + // + // Get key versions -- Latest, Verified, LatestPatch, Current. + var keyVersions = new List<PackageInfo>(); + if (package.LatestRelease != null) keyVersions.Add(package.LatestRelease); + if (package.Current != null) keyVersions.Add(package.Current); + if (package.Verified != null && package.Verified != package.Current) keyVersions.Add(package.Verified); + if (package.LatestPatch != null && package.IsAfterCurrentVersion(package.LatestPatch)) keyVersions.Add(package.LatestPatch); + if (package.Current == null && package.LatestRelease == null && package.Latest != null) keyVersions.Add(package.Latest); + if (Package.ShouldProposeLatestVersions && package.Latest != package.LatestRelease && package.Latest != null) keyVersions.Add(package.Latest); + keyVersions.Add(package.LatestUpdate); // Make sure LatestUpdate is always in the list. + + foreach (var version in keyVersions.OrderBy(package => package.Version).Reverse()) + { + var item = new VersionItem {Version = version}; + VersionItems.Add(item); + + if (version == package.LatestUpdate) + VersionPopup.value = item; + } + + // + // Add all versions + foreach (var version in package.Versions.Reverse()) + { + var item = new VersionItem {Version = version}; + item.MenuName = "All Versions/"; + VersionItems.Add(item); + } + + if (VersionItems.Count == 0) + { + VersionItems.Add(EmptyVersion); + VersionPopup.value = EmptyVersion; + VersionPopup.SetEnabled(false); + } + } + + public void SetPackage(Package package) + { + if (this.package != null) + { + if (this.package.AddSignal.Operation != null) + { + this.package.AddSignal.Operation.OnOperationError -= OnAddOperationError; + this.package.AddSignal.Operation.OnOperationSuccess -= OnAddOperationSuccess; + } + this.package.AddSignal.ResetEvents(); + + if (this.package.RemoveSignal.Operation != null) + { + this.package.RemoveSignal.Operation.OnOperationSuccess -= OnRemoveOperationSuccess; + this.package.RemoveSignal.Operation.OnOperationError -= OnRemoveOperationError; + } + this.package.RemoveSignal.ResetEvents(); + } + + UIUtils.SetElementDisplay(this, true); + + this.package = package; + var displayPackage = package != null ? package.VersionToDisplay : null; + ResetVersionItems(displayPackage); + SetDisplayPackage(displayPackage); + } + + private void SetError(Error error) + { + DetailError.AdjustSize(DetailView.verticalScroller.visible); + DetailError.SetError(error); + DetailError.OnCloseError = () => + { + PackageCollection.Instance.RemovePackageErrors(package); + PackageCollection.Instance.UpdatePackageCollection(); + }; + } + + private void OnAddOperation(IAddOperation operation) + { + operation.OnOperationError += OnAddOperationError; + operation.OnOperationSuccess += OnAddOperationSuccess; + } + + private void OnAddOperationError(Error error) + { + if (package != null && package.AddSignal.Operation != null) + { + package.AddSignal.Operation.OnOperationSuccess -= OnAddOperationSuccess; + package.AddSignal.Operation.OnOperationError -= OnAddOperationError; + package.AddSignal.Operation = null; + } + + PackageCollection.Instance.AddPackageError(package, error); + + SetError(error); + if (package != null) + ResetVersionItems(package.VersionToDisplay); + PackageCollection.Instance.UpdatePackageCollection(); + } + + private void OnAddOperationSuccess(PackageInfo packageInfo) + { + if (package != null && package.AddSignal.Operation != null) + { + package.AddSignal.Operation.OnOperationSuccess -= OnAddOperationSuccess; + package.AddSignal.Operation.OnOperationError -= OnAddOperationError; + package.AddSignal.Operation = null; + } + + foreach (var extension in PackageManagerExtensions.Extensions) + extension.OnPackageAddedOrUpdated(packageInfo.Info); + } + + private void OnRemoveOperation(IRemoveOperation operation) + { + // Make sure we are not already registered + operation.OnOperationError -= OnRemoveOperationError; + operation.OnOperationSuccess -= OnRemoveOperationSuccess; + + operation.OnOperationError += OnRemoveOperationError; + operation.OnOperationSuccess += OnRemoveOperationSuccess; + } + + private void OnRemoveOperationError(Error error) + { + if (package != null && package.RemoveSignal.Operation != null) + { + package.RemoveSignal.Operation.OnOperationSuccess -= OnRemoveOperationSuccess; + package.RemoveSignal.Operation.OnOperationError -= OnRemoveOperationError; + package.RemoveSignal.Operation = null; + } + + PackageCollection.Instance.AddPackageError(package, error); + + SetError(error); + PackageCollection.Instance.UpdatePackageCollection(); + } + + private void OnRemoveOperationSuccess(PackageInfo packageInfo) + { + if (package != null && package.RemoveSignal.Operation != null) + { + package.RemoveSignal.Operation.OnOperationSuccess -= OnRemoveOperationSuccess; + package.RemoveSignal.Operation.OnOperationError -= OnRemoveOperationError; + package.RemoveSignal.Operation = null; + } + + foreach (var extension in PackageManagerExtensions.Extensions) + extension.OnPackageRemoved(packageInfo.Info); + } + + private void RefreshAddButton() + { + if (package.Current != null && package.Current.IsInDevelopment) + { + UIUtils.SetElementDisplay(UpdateBuiltIn, false); + UIUtils.SetElementDisplay(UpdateCombo, false); + UIUtils.SetElementDisplay(UpdateButton, false); + return; + } + + var targetVersion = SelectedPackage; + if (targetVersion == null) + return; + + var enableButton = !Package.AddRemoveOperationInProgress; + var enableVersionButton = true; + + var action = PackageAction.Update; + var inprogress = false; + var isBuiltIn = package.IsBuiltIn; + SemVersion version = null; + + if (package.AddSignal.Operation != null) + { + if (isBuiltIn) + { + action = PackageAction.Enable; + inprogress = true; + enableButton = false; + } + else + { + var addOperationVersion = package.AddSignal.Operation.PackageInfo.Version; + if (package.Current == null) + { + action = PackageAction.Add; + inprogress = true; + } + else + { + action = addOperationVersion.CompareByPrecedence(package.Current.Version) >= 0 + ? PackageAction.Update : PackageAction.Downgrade; + inprogress = true; + } + + enableButton = false; + enableVersionButton = false; + } + } + else + { + if (package.Current != null) + { + // Installed + if (package.Current.IsVersionLocked) + { + if (package.Current.Origin == PackageSource.Embedded) + action = PackageAction.Embedded; + else if (package.Current.Origin == PackageSource.Git) + action = PackageAction.Git; + + enableButton = false; + enableVersionButton = false; + } + else + { + if (targetVersion.IsCurrent) + { + if (targetVersion == package.LatestUpdate) + action = PackageAction.UpToDate; + else + action = PackageAction.Current; + + enableButton = false; + } + else + { + action = targetVersion.Version.CompareByPrecedence(package.Current.Version) >= 0 + ? PackageAction.Update : PackageAction.Downgrade; + } + } + } + else + { + // Not Installed + if (package.Versions.Any()) + { + if (isBuiltIn) + action = PackageAction.Enable; + else + action = PackageAction.Add; + } + } + } + + if (package.RemoveSignal.Operation != null) + enableButton = false; + + if (EditorApplication.isCompiling) + { + enableButton = false; + enableVersionButton = false; + + EditorApplication.update -= CheckCompilationStatus; + EditorApplication.update += CheckCompilationStatus; + } + + var button = isBuiltIn ? UpdateBuiltIn : UpdateButton; + button.SetEnabled(enableButton); + VersionPopup.SetEnabled(enableVersionButton); + button.text = GetButtonText(action, inprogress, version); + + var visibleFlag = !(package.Current != null && package.Current.IsVersionLocked); + UIUtils.SetElementDisplay(UpdateBuiltIn, isBuiltIn && visibleFlag); + UIUtils.SetElementDisplay(UpdateCombo, !isBuiltIn && visibleFlag); + UIUtils.SetElementDisplay(UpdateButton, !isBuiltIn && visibleFlag); + } + + private void RefreshRemoveButton() + { + var visibleFlag = false; + + var current = package.Current; + + // Show only if there is a current package installed + if (current != null) + { + visibleFlag = current.CanBeRemoved && !package.IsPackageManagerUI; + + var action = current.IsBuiltIn ? PackageAction.Disable : PackageAction.Remove; + var inprogress = package.RemoveSignal.Operation != null; + + var enableButton = visibleFlag && !EditorApplication.isCompiling && !inprogress && !Package.AddRemoveOperationInProgress; + + if (EditorApplication.isCompiling) + { + EditorApplication.update -= CheckCompilationStatus; + EditorApplication.update += CheckCompilationStatus; + } + + RemoveButton.SetEnabled(enableButton); + RemoveButton.text = GetButtonText(action, inprogress); + } + + UIUtils.SetElementDisplay(RemoveButton, visibleFlag); + } + + private void CheckCompilationStatus() + { + if (EditorApplication.isCompiling) + return; + + RefreshAddButton(); + RefreshRemoveButton(); + EditorApplication.update -= CheckCompilationStatus; + } + + private static string GetButtonText(PackageAction action, bool inProgress = false, SemVersion version = null) + { + return version == null ? + string.Format("{0}", inProgress ? PackageActionInProgressVerbs[(int) action] : PackageActionVerbs[(int) action]) : + string.Format("{0} {1}", inProgress ? PackageActionInProgressVerbs[(int) action] : PackageActionVerbs[(int) action], version); + } + + private void UpdateClick() + { + if (package.IsPackageManagerUI) + { + // Let's not allow updating of the UI if there are build errrors, as for now, that will prevent the UI from reloading properly. + if (EditorUtility.scriptCompilationFailed) + { + EditorUtility.DisplayDialog("Unity Package Manager", "The Package Manager UI cannot be updated while there are script compilation errors in your project. Please fix the errors and try again.", "Ok"); + return; + } + + if (!EditorUtility.DisplayDialog("Unity Package Manager", "Updating this package will close the Package Manager window. You will have to re-open it after the update is done. Do you want to continue?", "Yes", "No")) + return; + + if (package.AddSignal.Operation != null) + { + package.AddSignal.Operation.OnOperationSuccess -= OnAddOperationSuccess; + package.AddSignal.Operation.OnOperationError -= OnAddOperationError; + package.AddSignal.ResetEvents(); + package.AddSignal.Operation = null; + } + + DetailError.ClearError(); + EditorApplication.update += CloseAndUpdate; + + return; + } + + DetailError.ClearError(); + package.Add(SelectedPackage); + RefreshAddButton(); + RefreshRemoveButton(); + } + + private void CloseAndUpdate() + { + EditorApplication.update -= CloseAndUpdate; + package.Add(SelectedPackage); + + var windows = UnityEngine.Resources.FindObjectsOfTypeAll<PackageManagerWindow>(); + if (windows.Length > 0) + { + windows[0].Close(); + } + } + + + private void RemoveClick() + { + DetailError.ClearError(); + package.Remove(); + RefreshRemoveButton(); + RefreshAddButton(); + } + + private static void ViewOfflineUrl(Func<string> getOfflineUrl, string messageOnNotFound) + { + var offlineUrl = getOfflineUrl(); + if (!string.IsNullOrEmpty(offlineUrl)) + Application.OpenURL(offlineUrl); + else + EditorUtility.DisplayDialog("Unity Package Manager", messageOnNotFound, "Ok"); + } + + private static void ViewUrl(Func<string> getUrl, Func<string> getOfflineUrl, string messageOnNotFound) + { + if (Application.internetReachability != NetworkReachability.NotReachable) + { + var onlineUrl = getUrl(); + var request = UnityWebRequest.Head(onlineUrl); + var operation = request.SendWebRequest(); + operation.completed += (op) => + { + if (request.responseCode != 404) + { + Application.OpenURL(onlineUrl); + } + else + { + ViewOfflineUrl(getOfflineUrl, messageOnNotFound); + } + }; + } + else + + { + ViewOfflineUrl(getOfflineUrl, messageOnNotFound); + } + } + + private void ViewDocClick() + { + ViewUrl(DisplayPackage.GetDocumentationUrl, DisplayPackage.GetOfflineDocumentationUrl, "Unable to find documentation."); + } + + private void ViewChangelogClick() + { + ViewUrl(DisplayPackage.GetChangelogUrl, DisplayPackage.GetOfflineChangelogUrl, "Unable to find changelog."); + } + + private void ViewLicensesClick() + { + ViewUrl(DisplayPackage.GetLicensesUrl, DisplayPackage.GetOfflineLicensesUrl, "Unable to find licenses."); + } + + private Label DetailDesc { get { return root.Q<Label>("detailDesc"); } } + internal Button UpdateButton { get { return root.Q<Button>("update"); } } + private Button RemoveButton { get { return root.Q<Button>("remove"); } } + private Button ViewDocButton { get { return root.Q<Button>("viewDocumentation"); } } + private VisualElement DocumentationContainer { get { return root.Q<VisualElement>("documentationContainer"); } } + private Button ViewChangelogButton { get { return root.Q<Button>("viewChangelog"); } } + private VisualElement ChangelogContainer { get { return root.Q<VisualElement>("changeLogContainer"); } } + private VisualElement ViewLicensesContainer { get { return root.Q<VisualElement>("viewLicensesContainer"); } } + private Button ViewLicenses { get { return root.Q<Button>("viewLicenses"); } } + private VisualElement UpdateContainer { get { return root.Q<VisualElement>("updateContainer"); } } + private Alert DetailError { get { return root.Q<Alert>("detailError"); } } + private ScrollView DetailView { get { return root.Q<ScrollView>("detailView"); } } + private Label DetailModuleReference { get { return root.Q<Label>("detailModuleReference"); } } + private Label DetailVersion { get { return root.Q<Label>("detailVersion"); }} + private Label DetailAuthor { get { return root.Q<Label>("detailAuthor"); }} + private Label VerifyLabel { get { return root.Q<Label>("tagVerify"); } } + private VisualElement CustomContainer { get { return root.Q<VisualElement>("detailCustomContainer"); } } + internal VisualElement GetTag(PackageTag tag) {return root.Q<VisualElement>("tag-" + tag); } + private VisualElement UpdateDropdownContainer { get { return root.Q<VisualElement>("updateDropdownContainer"); } } + internal VisualElement UpdateCombo { get { return root.Q<VisualElement>("updateCombo"); } } + internal Button UpdateBuiltIn { get { return root.Q<Button>("updateBuiltIn"); } } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageDetails.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageDetails.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..dd97dbf751450aaf630cdbdcb415ccf6bde50106 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageDetails.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 3f3e22b18940a4e828a5170574a3617e +timeCreated: 1502224642 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageFiltering.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageFiltering.cs new file mode 100644 index 0000000000000000000000000000000000000000..17fa1a9ca139de9c28a1f00af26b50a4e2d40016 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageFiltering.cs @@ -0,0 +1,96 @@ +using System; +using System.Text.RegularExpressions; +using UnityEngine.Experimental.UIElements; + +namespace UnityEditor.PackageManager.UI +{ + internal static class PackageFiltering + { + private static bool FilterByText(PackageInfo info, string text) + { + if (info == null) + return false; + + if (info.Name.IndexOf(text, StringComparison.CurrentCultureIgnoreCase) >= 0) + return true; + + if (!string.IsNullOrEmpty(info.DisplayName) && info.DisplayName.IndexOf(text, StringComparison.CurrentCultureIgnoreCase) >= 0) + return true; + + if (!info.IsBuiltIn) + { + var prerelease = text.StartsWith("-") ? text.Substring(1) : text; + if (info.Version != null && info.Version.Prerelease.IndexOf(prerelease, StringComparison.CurrentCultureIgnoreCase) >= 0) + return true; + + if (info.VersionWithoutTag.StartsWith(text, StringComparison.CurrentCultureIgnoreCase)) + return true; + + if (info.IsPreview) + { + if (PackageTag.preview.ToString().IndexOf(text, StringComparison.CurrentCultureIgnoreCase) >= 0) + return true; + } + + if (info.IsVerified) + { + if (PackageTag.verified.ToString().IndexOf(text, StringComparison.CurrentCultureIgnoreCase) >= 0) + return true; + } + } + + return false; + } + + internal static bool FilterByText(Package package, string text) + { + if (string.IsNullOrEmpty(text)) + return true; + + var trimText = text.Trim(' ', '\t'); + trimText = Regex.Replace(trimText, @"[ ]{2,}", " "); + return string.IsNullOrEmpty(trimText) || FilterByText(package.Current ?? package.Latest, trimText); + } + + private static bool FilterByText(PackageItem item, string text) + { + return item.package != null && FilterByText(item.package, text); + } + + public static void FilterPackageList(PackageList packageList) + { + PackageItem firstItem = null; + PackageItem lastItem = null; + var selectedItemInFilter = false; + var selectedItem = packageList.selectedItem; + var packageItems = packageList.Query<PackageItem>().ToList(); + foreach (var item in packageItems) + { + if (FilterByText(item, PackageSearchFilter.Instance.SearchText)) + { + if (firstItem == null) + firstItem = item; + if (item == selectedItem) + selectedItemInFilter = true; + + UIUtils.SetElementDisplay(item, true); + + if (lastItem != null) + lastItem.nextItem = item; + + item.previousItem = lastItem; + item.nextItem = null; + + lastItem = item; + } + else + UIUtils.SetElementDisplay(item, false); + } + + if (firstItem == null) + packageList.ShowNoResults(); + else + packageList.ShowResults(selectedItemInFilter ? selectedItem : firstItem); + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageFiltering.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageFiltering.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..c7183a9e723cac0a8aeeeb333909e3774ad1e779 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageFiltering.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5ffd2adf615994485991e37bacbf735c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageGroup.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageGroup.cs new file mode 100644 index 0000000000000000000000000000000000000000..1749ce670445f0ae4281bfa258351d88b978b9df --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageGroup.cs @@ -0,0 +1,75 @@ +using System.Linq; +using UnityEngine.Experimental.UIElements; + +namespace UnityEditor.PackageManager.UI +{ +#if !UNITY_2018_3_OR_NEWER + internal class PackageGroupFactory : UxmlFactory<PackageGroup> + { + protected override PackageGroup DoCreate(IUxmlAttributes bag, CreationContext cc) + { + return new PackageGroup(bag.GetPropertyString("name")); + } + } +#endif + + internal class PackageGroup : VisualElement + { +#if UNITY_2018_3_OR_NEWER + internal new class UxmlFactory : UxmlFactory<PackageGroup> { } +#endif + + private readonly VisualElement root; + internal readonly PackageGroupOrigins Origin; + + public PackageGroup previousGroup; + public PackageGroup nextGroup; + + public PackageItem firstPackage; + public PackageItem lastPackage; + + public PackageGroup() : this(string.Empty) + { + } + + public PackageGroup(string groupName) + { + name = groupName; + root = Resources.GetTemplate("PackageGroup.uxml"); + Add(root); + + if (string.IsNullOrEmpty(groupName) || groupName != PackageGroupOrigins.BuiltInPackages.ToString()) + { + HeaderTitle.text = "Packages"; + Origin = PackageGroupOrigins.Packages; + } + else + { + HeaderTitle.text = "Built In Packages"; + Origin = PackageGroupOrigins.BuiltInPackages; + } + } + + internal PackageItem AddPackage(Package package) + { + var packageItem = new PackageItem(package) {packageGroup = this}; + var lastItem = List.Children().LastOrDefault() as PackageItem; + if (lastItem != null) + { + lastItem.nextItem = packageItem; + packageItem.previousItem = lastItem; + packageItem.nextItem = null; + } + + List.Add(packageItem); + + if (firstPackage == null) firstPackage = packageItem; + lastPackage = packageItem; + + return packageItem; + } + + private VisualElement List { get { return root.Q<VisualElement>("groupContainer"); } } + private Label HeaderTitle { get { return root.Q<Label>("headerTitle"); } } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageGroup.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageGroup.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..c81e217d40b36c3a5380bd0ec8fa853a3bfb18ff --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageGroup.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 760934a36e5f490db3c9fcaf497625a4 +timeCreated: 1508509771 \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageItem.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageItem.cs new file mode 100644 index 0000000000000000000000000000000000000000..1ec9dbf298906fcb11cb1d7a644635f7d1ab45ec --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageItem.cs @@ -0,0 +1,150 @@ +using UnityEngine.Experimental.UIElements; +using System; + +namespace UnityEditor.PackageManager.UI +{ +#if !UNITY_2018_3_OR_NEWER + internal class PackageItemFactory : UxmlFactory<PackageItem> + { + protected override PackageItem DoCreate(IUxmlAttributes bag, CreationContext cc) + { + return new PackageItem(); + } + } +#endif + + internal class PackageItem : VisualElement + { +#if UNITY_2018_3_OR_NEWER + internal new class UxmlFactory : UxmlFactory<PackageItem> { } +#endif + + public static string SelectedClassName = "selected"; + + public event Action<PackageItem> OnSelected = delegate { }; + + private readonly VisualElement root; + private string currentStateClass; + public Package package { get; private set; } + + public PackageItem previousItem; + public PackageItem nextItem; + + public PackageGroup packageGroup; + + public PackageItem() : this(null) + { + } + + public PackageItem(Package package) + { + root = Resources.GetTemplate("PackageItem.uxml"); + Add(root); + + root.AddManipulator(new Clickable(Select)); + SetItem(package); + } + + private void Select() + { + OnSelected(this); + } + + public void SetSelected(bool value) + { + if (value) + PackageContainer.AddToClassList(SelectedClassName); + else + PackageContainer.RemoveFromClassList(SelectedClassName); + + Spinner.InvertColor = value; + } + + private void SetItem(Package package) + { + var displayPackage = package != null ? package.VersionToDisplay : null; + if (displayPackage == null) + return; + + this.package = package; + OnPackageChanged(); + this.package.AddSignal.WhenOperation(OnPackageAdd); + this.package.RemoveSignal.WhenOperation(OnPackageRemove); + } + + private void OnPackageRemove(IRemoveOperation operation) + { + operation.OnOperationError += error => StopSpinner(); + OnPackageUpdate(); + } + + private void OnPackageAdd(IAddOperation operation) + { + operation.OnOperationError += error => StopSpinner(); + OnPackageUpdate(); + } + + private void OnPackageChanged() + { + var displayPackage = package != null ? package.VersionToDisplay : null; + if (displayPackage == null) + return; + + NameLabel.text = displayPackage.DisplayName; + VersionLabel.text = displayPackage.Version.ToString(); + + var stateClass = GetIconStateId(displayPackage); + if (displayPackage.State == PackageState.Outdated && package.LatestUpdate == package.Current) + stateClass = GetIconStateId(PackageState.UpToDate); + if (PackageCollection.Instance.GetPackageError(package) != null) + stateClass = GetIconStateId(PackageState.Error); + if (stateClass == GetIconStateId(PackageState.UpToDate) && package.Current != null) + stateClass = "installed"; + + StateLabel.RemoveFromClassList(currentStateClass); + StateLabel.AddToClassList(stateClass); + + UIUtils.SetElementDisplay(VersionLabel, !displayPackage.IsBuiltIn); + + currentStateClass = stateClass; + if (displayPackage.State != PackageState.InProgress && Spinner.Started) + StopSpinner(); + } + + private void OnPackageUpdate() + { + StartSpinner(); + } + + private void StartSpinner() + { + Spinner.Start(); + StateLabel.AddToClassList("no-icon"); + } + + private void StopSpinner() + { + Spinner.Stop(); + StateLabel.RemoveFromClassList("no-icon"); + } + + private Label NameLabel { get { return root.Q<Label>("packageName"); } } + private Label StateLabel { get { return root.Q<Label>("packageState"); } } + private Label VersionLabel { get { return root.Q<Label>("packageVersion"); } } + private VisualElement PackageContainer { get { return root.Q<VisualElement>("packageContainer"); } } + private LoadingSpinner Spinner { get { return root.Q<LoadingSpinner>("packageSpinner"); } } + + public static string GetIconStateId(PackageInfo packageInfo) + { + if (packageInfo == null) + return ""; + + return GetIconStateId(packageInfo.State); + } + + public static string GetIconStateId(PackageState state) + { + return state.ToString().ToLower(); + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageItem.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageItem.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..5a40e58405f6b48184936301e02d016926b7119c --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageItem.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: c68ba5b432ef64e67ae0bf74960908a8 +timeCreated: 1502224642 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageList.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageList.cs new file mode 100644 index 0000000000000000000000000000000000000000..096f42be23e55354b8d8456184db99b6445b158d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageList.cs @@ -0,0 +1,408 @@ +using UnityEngine.Experimental.UIElements; +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine; + +namespace UnityEditor.PackageManager.UI +{ +#if !UNITY_2018_3_OR_NEWER + internal class PackageListFactory : UxmlFactory<PackageList> + { + protected override PackageList DoCreate(IUxmlAttributes bag, CreationContext cc) + { + return new PackageList(); + } + } +#endif + + internal class PackageList : VisualElement + { +#if UNITY_2018_3_OR_NEWER + internal new class UxmlFactory : UxmlFactory<PackageList> { } +#endif + + public event Action<Package> OnSelected = delegate { }; + public event Action OnLoaded = delegate { }; + public event Action OnFocusChange = delegate { }; + + private readonly VisualElement root; + internal PackageItem selectedItem; + private List<PackageGroup> Groups; + + public PackageList() + { + Groups = new List<PackageGroup>(); + + root = Resources.GetTemplate("PackageList.uxml"); + Add(root); + root.StretchToParentSize(); + + UIUtils.SetElementDisplay(Empty, false); + UIUtils.SetElementDisplay(NoResult, false); + + PackageCollection.Instance.OnPackagesChanged += SetPackages; + + RegisterCallback<AttachToPanelEvent>(OnEnterPanel); + RegisterCallback<DetachFromPanelEvent>(OnLeavePanel); + + Reload(); + } + + public void GrabFocus() + { + if (selectedItem == null) + return; + + selectedItem.Focus(); + } + + public void ShowResults(PackageItem item) + { + NoResultText.text = string.Empty; + UIUtils.SetElementDisplay(NoResult, false); + + Select(item); + + EditorApplication.delayCall += ScrollIfNeeded; + + UpdateGroups(); + } + + public void ShowNoResults() + { + NoResultText.text = string.Format("No results for \"{0}\"", PackageSearchFilter.Instance.SearchText); + UIUtils.SetElementDisplay(NoResult, true); + foreach (var group in Groups) + { + UIUtils.SetElementDisplay(group, false); + } + Select(null); + OnSelected(null); + } + + private void UpdateGroups() + { + foreach (var group in Groups) + { + PackageItem firstPackage = null; + PackageItem lastPackage = null; + + var listGroup = group.Query<PackageItem>().ToList(); + foreach (var item in listGroup) + { + if (!item.visible) + continue; + + if (firstPackage == null) firstPackage = item; + lastPackage = item; + } + + if (firstPackage == null && lastPackage == null) + { + UIUtils.SetElementDisplay(group, false); + } + else + { + UIUtils.SetElementDisplay(group, true); + group.firstPackage = firstPackage; + group.lastPackage = lastPackage; + } + } + } + + private void OnEnterPanel(AttachToPanelEvent e) + { + panel.visualTree.RegisterCallback<KeyDownEvent>(OnKeyDownShortcut); + } + + private void OnLeavePanel(DetachFromPanelEvent e) + { + panel.visualTree.UnregisterCallback<KeyDownEvent>(OnKeyDownShortcut); + } + + private void ScrollIfNeeded() + { + EditorApplication.delayCall -= ScrollIfNeeded; + + if (selectedItem == null) + return; + + var minY = List.worldBound.yMin; + var maxY = List.worldBound.yMax; + var itemMinY = selectedItem.worldBound.yMin; + var itemMaxY = selectedItem.worldBound.yMax; + var scroll = List.scrollOffset; + + if (itemMinY < minY) + { + scroll.y -= minY - itemMinY; + if (scroll.y <= minY) + scroll.y = 0; + List.scrollOffset = scroll; + } + else if (itemMaxY > maxY) + { + scroll.y += itemMaxY - maxY; + List.scrollOffset = scroll; + } + } + + private void OnKeyDownShortcut(KeyDownEvent evt) + { + if (selectedItem == null) + return; + + if (evt.keyCode == KeyCode.Tab) + { + OnFocusChange(); + evt.StopPropagation(); + return; + } + + if (evt.keyCode == KeyCode.UpArrow) + { + if (selectedItem.previousItem != null) + { + Select(selectedItem.previousItem); + ScrollIfNeeded(); + } + else if (selectedItem.packageGroup.previousGroup != null && selectedItem.packageGroup.previousGroup.visible) + { + Select(selectedItem.packageGroup.previousGroup.lastPackage); + ScrollIfNeeded(); + } + evt.StopPropagation(); + return; + } + + if (evt.keyCode == KeyCode.DownArrow) + { + if (selectedItem.nextItem != null) + { + Select(selectedItem.nextItem); + ScrollIfNeeded(); + } + else if (selectedItem.packageGroup.nextGroup != null && selectedItem.packageGroup.nextGroup.visible) + { + Select(selectedItem.packageGroup.nextGroup.firstPackage); + ScrollIfNeeded(); + } + evt.StopPropagation(); + return; + } + + if (evt.keyCode == KeyCode.PageUp) + { + if (selectedItem.packageGroup != null) + { + if (selectedItem == selectedItem.packageGroup.lastPackage && selectedItem != selectedItem.packageGroup.firstPackage) + { + Select(selectedItem.packageGroup.firstPackage); + ScrollIfNeeded(); + } + else if (selectedItem == selectedItem.packageGroup.firstPackage && selectedItem.packageGroup.previousGroup != null && selectedItem.packageGroup.previousGroup.visible) + { + Select(selectedItem.packageGroup.previousGroup.lastPackage); + ScrollIfNeeded(); + } + else if (selectedItem != selectedItem.packageGroup.lastPackage && selectedItem != selectedItem.packageGroup.firstPackage) + { + Select(selectedItem.packageGroup.firstPackage); + ScrollIfNeeded(); + } + } + evt.StopPropagation(); + return; + } + + if (evt.keyCode == KeyCode.PageDown) + { + if (selectedItem.packageGroup != null) + { + if (selectedItem == selectedItem.packageGroup.firstPackage && selectedItem != selectedItem.packageGroup.lastPackage) + { + Select(selectedItem.packageGroup.lastPackage); + ScrollIfNeeded(); + } + else if (selectedItem == selectedItem.packageGroup.lastPackage && selectedItem.packageGroup.nextGroup != null && selectedItem.packageGroup.nextGroup.visible) + { + Select(selectedItem.packageGroup.nextGroup.firstPackage); + ScrollIfNeeded(); + } + else if (selectedItem != selectedItem.packageGroup.firstPackage && selectedItem != selectedItem.packageGroup.lastPackage) + { + Select(selectedItem.packageGroup.lastPackage); + ScrollIfNeeded(); + } + } + evt.StopPropagation(); + } + } + + private void Reload() + { + // Force a re-init to initial condition + PackageCollection.Instance.UpdatePackageCollection(); + SelectLastSelection(); + } + + private void ClearAll() + { + List.Clear(); + Groups.Clear(); + + UIUtils.SetElementDisplay(Empty, false); + UIUtils.SetElementDisplay(NoResult, false); + } + + private void SetPackages(IEnumerable<Package> packages) + { + if (PackageCollection.Instance.Filter == PackageFilter.Modules) + { + packages = packages.Where(pkg => pkg.IsBuiltIn); + } + else if (PackageCollection.Instance.Filter== PackageFilter.All) + { + packages = packages.Where(pkg => !pkg.IsBuiltIn); + } + else + { + packages = packages.Where(pkg => !pkg.IsBuiltIn); + packages = packages.Where(pkg => pkg.Current != null); + } + + OnLoaded(); + ClearAll(); + + var packagesGroup = new PackageGroup(PackageGroupOrigins.Packages.ToString()); + Groups.Add(packagesGroup); + List.Add(packagesGroup); + packagesGroup.previousGroup = null; + + var builtInGroup = new PackageGroup(PackageGroupOrigins.BuiltInPackages.ToString()); + Groups.Add(builtInGroup); + List.Add(builtInGroup); + + if ((PackageCollection.Instance.Filter & PackageFilter.Modules) == PackageFilter.Modules) + { + packagesGroup.nextGroup = builtInGroup; + builtInGroup.previousGroup = packagesGroup; + builtInGroup.nextGroup = null; + } + else + { + packagesGroup.nextGroup = null; + UIUtils.SetElementDisplay(builtInGroup, false); + } + + var lastSelection = PackageCollection.Instance.SelectedPackage; + Select(null); + + PackageItem defaultSelection = null; + + foreach (var package in packages.OrderBy(pkg => pkg.Versions.FirstOrDefault() == null ? pkg.Name : pkg.Versions.FirstOrDefault().DisplayName)) + { + var item = AddPackage(package); + + if (null == selectedItem && defaultSelection == null) + defaultSelection = item; + + if (null == selectedItem && !string.IsNullOrEmpty(lastSelection) && package.Name.Equals(lastSelection)) + Select(item); + } + + if (selectedItem == null) + Select(defaultSelection); + + PackageFiltering.FilterPackageList(this); + } + + public void SelectLastSelection() + { + var lastSelection = PackageCollection.Instance.SelectedPackage; + if (lastSelection == null) + return; + + var list = List.Query<PackageItem>().ToList(); + PackageItem defaultSelection = null; + + foreach (var item in list) + { + if (defaultSelection == null) + defaultSelection = item; + + if (!string.IsNullOrEmpty(lastSelection) && item.package.Name.Equals(lastSelection)) + { + defaultSelection = item; + break; + } + } + + selectedItem = null; + Select(defaultSelection); + } + + private PackageItem AddPackage(Package package) + { + var groupName = package.Latest != null ? package.Latest.Group : package.Current.Group; + var group = GetOrCreateGroup(groupName); + var packageItem = group.AddPackage(package); + + packageItem.OnSelected += Select; + + return packageItem; + } + + private PackageGroup GetOrCreateGroup(string groupName) + { + foreach (var g in Groups) + { + if (g.name == groupName) + return g; + } + + var group = new PackageGroup(groupName); + var latestGroup = Groups.LastOrDefault(); + Groups.Add(group); + List.Add(group); + + group.previousGroup = null; + if (latestGroup != null) + { + latestGroup.nextGroup = group; + group.previousGroup = latestGroup; + group.nextGroup = null; + } + return group; + } + + private void Select(PackageItem packageItem) + { + if (packageItem == selectedItem) + return; + + var selectedPackageName = packageItem != null ? packageItem.package.Name : null; + PackageCollection.Instance.SelectedPackage = selectedPackageName; + + if (selectedItem != null) + selectedItem.SetSelected(false); // Clear Previous selection + + selectedItem = packageItem; + if (selectedItem == null) + { + OnSelected(null); + return; + } + + selectedItem.SetSelected(true); + ScrollIfNeeded(); + OnSelected(selectedItem.package); + } + + private ScrollView List { get { return root.Q<ScrollView>("scrollView"); } } + private VisualElement Empty { get { return root.Q<VisualElement>("emptyArea"); } } + private VisualElement NoResult { get { return root.Q<VisualElement>("noResult"); } } + private Label NoResultText { get { return root.Q<Label>("noResultText"); } } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageList.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageList.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..49c064ab56ce42a790afca56a148202be727c404 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageList.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 2d77b2d58287d46a6a61f12c861bfc2f +timeCreated: 1502224642 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageManagerExtensions.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageManagerExtensions.cs new file mode 100644 index 0000000000000000000000000000000000000000..44bcfcfd27701f151fbd703e9dc72c0fe6b401fc --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageManagerExtensions.cs @@ -0,0 +1,25 @@ +using System.Collections.Generic; + +namespace UnityEditor.PackageManager.UI +{ + /// <summary> + /// Package Manager UI Extensions + /// </summary> + public static class PackageManagerExtensions + { + internal static List<IPackageManagerExtension> Extensions { get { return extensions ?? (extensions = new List<IPackageManagerExtension>()); } } + private static List<IPackageManagerExtension> extensions; + + /// <summary> + /// Registers a new Package Manager UI extension + /// </summary> + /// <param name="extension">A Package Manager UI extension</param> + public static void RegisterExtension(IPackageManagerExtension extension) + { + if (extension == null) + return; + + Extensions.Add(extension); + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageManagerExtensions.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageManagerExtensions.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..5fbcfc095ba87ed979622508be7328a1bee6d31d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageManagerExtensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 20a8ca0a6d82545f6bfd6f2d898d61f7 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageManagerPrefs.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageManagerPrefs.cs new file mode 100644 index 0000000000000000000000000000000000000000..ccd67c0bc997cec70530be5bd0c4a13609dd6a25 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageManagerPrefs.cs @@ -0,0 +1,41 @@ +using System.Linq; + +namespace UnityEditor.PackageManager.UI +{ + internal static class PackageManagerPrefs + { + private const string kShowPreviewPackagesPrefKeyPrefix = "PackageManager.ShowPreviewPackages_"; + private const string kShowPreviewPackagesWarningPrefKey = "PackageManager.ShowPreviewPackagesWarning"; + + private static string GetProjectIdentifier() + { + // PlayerSettings.productGUID is already used as LocalProjectID by Analytics, so we use it too + return PlayerSettings.productGUID.ToString(); + } + + public static bool ShowPreviewPackages + { + get + { + var key = kShowPreviewPackagesPrefKeyPrefix + GetProjectIdentifier(); + + // If user manually choose to show or not preview packages, use this value + if (EditorPrefs.HasKey(key)) + return EditorPrefs.GetBool(key); + + // Returns true if at least one preview package is installed, false otherwise + return PackageCollection.Instance.LatestListPackages.Any(p => p.IsPreview && p.IsCurrent); + } + set + { + EditorPrefs.SetBool(kShowPreviewPackagesPrefKeyPrefix + GetProjectIdentifier(), value); + } + } + + public static bool ShowPreviewPackagesWarning + { + get { return EditorPrefs.GetBool(kShowPreviewPackagesWarningPrefKey, true); } + set { EditorPrefs.SetBool(kShowPreviewPackagesWarningPrefKey, value); } + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageManagerPrefs.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageManagerPrefs.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..9b474da90ed53854f2627f6e4b84571fd1abaaee --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageManagerPrefs.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 566f8bae715954c65a2a7a4b5818fc7a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageManagerToolbar.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageManagerToolbar.cs new file mode 100644 index 0000000000000000000000000000000000000000..715427b2bd35797ad76aba2752d6a9c9912e6958 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageManagerToolbar.cs @@ -0,0 +1,164 @@ +using System.Linq; +using UnityEngine; +using UnityEngine.Experimental.UIElements; + +namespace UnityEditor.PackageManager.UI +{ +#if !UNITY_2018_3_OR_NEWER + internal class PackageManangerToolbarFactory : UxmlFactory<PackageManagerToolbar> + { + protected override PackageManagerToolbar DoCreate(IUxmlAttributes bag, CreationContext cc) + { + return new PackageManagerToolbar(); + } + } +#endif + + internal class PackageManagerToolbar : VisualElement + { +#if UNITY_2018_3_OR_NEWER + internal new class UxmlFactory : UxmlFactory<PackageManagerToolbar> { } +#endif + private readonly VisualElement root; + + [SerializeField] + private PackageFilter selectedFilter = PackageFilter.All; + + public PackageManagerToolbar() + { + root = Resources.GetTemplate("PackageManagerToolbar.uxml"); + Add(root); + root.StretchToParentSize(); + + SetFilter(PackageCollection.Instance.Filter); + + RegisterCallback<AttachToPanelEvent>(OnEnterPanel); + RegisterCallback<DetachFromPanelEvent>(OnLeavePanel); + } + + public void GrabFocus() + { + SearchToolbar.GrabFocus(); + } + + public new void SetEnabled(bool enable) + { + base.SetEnabled(enable); + FilterButton.SetEnabled(enable); + AdvancedButton.SetEnabled(enable); + SearchToolbar.SetEnabled(enable); + } + + private static string GetFilterDisplayName(PackageFilter filter) + { + switch (filter) + { + case PackageFilter.All: + return "All packages"; + case PackageFilter.Local: + return "In Project"; + case PackageFilter.Modules: + return "Built-in packages"; + case PackageFilter.None: + return "None"; + default: + return filter.ToString(); + } + } + + private void SetFilter(object obj) + { + var previouSelectedFilter = selectedFilter; + selectedFilter = (PackageFilter) obj; + FilterButton.text = string.Format("{0} â–¾", GetFilterDisplayName(selectedFilter)); + + if (selectedFilter != previouSelectedFilter) + PackageCollection.Instance.SetFilter(selectedFilter); + } + + private void OnFilterButtonMouseDown(MouseDownEvent evt) + { + if (evt.propagationPhase != PropagationPhase.AtTarget) + return; + + var menu = new GenericMenu(); + menu.AddItem(new GUIContent(GetFilterDisplayName(PackageFilter.All)), + selectedFilter == PackageFilter.All, + SetFilter, PackageFilter.All); + menu.AddItem(new GUIContent(GetFilterDisplayName(PackageFilter.Local)), + selectedFilter == PackageFilter.Local, + SetFilter, PackageFilter.Local); + menu.AddSeparator(""); + menu.AddItem(new GUIContent(GetFilterDisplayName(PackageFilter.Modules)), + selectedFilter == PackageFilter.Modules, + SetFilter, PackageFilter.Modules); + var menuPosition = new Vector2(FilterButton.layout.xMin, FilterButton.layout.center.y); + menuPosition = this.LocalToWorld(menuPosition); + var menuRect = new Rect(menuPosition, Vector2.zero); + menu.DropDown(menuRect); + } + + private void OnAdvancedButtonMouseDown(MouseDownEvent evt) + { + if (evt.propagationPhase != PropagationPhase.AtTarget) + return; + + var menu = new GenericMenu(); + + menu.AddItem(new GUIContent("Show preview packages"), PackageManagerPrefs.ShowPreviewPackages, TogglePreviewPackages); + //menu.AddItem(new GUIContent("Reset to defaults"), false, ResetToDefaultsClick); + + var menuPosition = new Vector2(AdvancedButton.layout.xMax + 30, AdvancedButton.layout.center.y); + menuPosition = this.LocalToWorld(menuPosition); + var menuRect = new Rect(menuPosition, Vector2.zero); + menu.DropDown(menuRect); + } + + private static void TogglePreviewPackages() + { + var showPreviewPackages = PackageManagerPrefs.ShowPreviewPackages; + if (!showPreviewPackages && PackageManagerPrefs.ShowPreviewPackagesWarning) + { + const string message = "Preview packages are not verified with Unity, may be unstable, and are unsupported in production. Are you sure you want to show preview packages?"; + if (!EditorUtility.DisplayDialog("Unity Package Manager", message, "Yes", "No")) + return; + PackageManagerPrefs.ShowPreviewPackagesWarning = false; + } + PackageManagerPrefs.ShowPreviewPackages = !showPreviewPackages; + PackageCollection.Instance.UpdatePackageCollection(true); + } + + private void ResetToDefaultsClick() + { + if (!EditorUtility.DisplayDialog("Unity Package Manager", "Operation will reset all your packages to Editor defaults. Do you want to continue?", "Yes", "No")) + return; + + // Registered on callback + AssemblyReloadEvents.beforeAssemblyReload += PackageManagerWindow.ShowPackageManagerWindow; + + Client.ResetToEditorDefaults(); + + var windows = UnityEngine.Resources.FindObjectsOfTypeAll<PackageManagerWindow>(); + if (windows.Length > 0) + { + windows[0].Close(); + } + } + + private void OnEnterPanel(AttachToPanelEvent evt) + { + FilterButton.RegisterCallback<MouseDownEvent>(OnFilterButtonMouseDown); + AdvancedButton.RegisterCallback<MouseDownEvent>(OnAdvancedButtonMouseDown); + } + + private void OnLeavePanel(DetachFromPanelEvent evt) + { + FilterButton.UnregisterCallback<MouseDownEvent>(OnFilterButtonMouseDown); + AdvancedButton.UnregisterCallback<MouseDownEvent>(OnAdvancedButtonMouseDown); + } + + private Label FilterButton { get { return root.Q<Label>("toolbarFilterButton"); } } + private Label AdvancedButton { get { return root.Q<Label>("toolbarAdvancedButton"); } } + internal PackageSearchToolbar SearchToolbar { get { return root.Q<PackageSearchToolbar>("toolbarSearch"); } } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageManagerToolbar.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageManagerToolbar.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..60bfd847d60f147f3e3318ace3bd447a0abc500d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageManagerToolbar.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b6d1682724bab428496b2bd2d8c7b194 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageManagerWindow.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageManagerWindow.cs new file mode 100644 index 0000000000000000000000000000000000000000..af9706020c8db87f91b86d796354f09abd92ca04 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageManagerWindow.cs @@ -0,0 +1,131 @@ +using System.Linq; +using UnityEngine; +using UnityEngine.Experimental.UIElements; +using UnityEditor.Experimental.UIElements; + +namespace UnityEditor.PackageManager.UI +{ + internal class PackageManagerWindow : EditorWindow + { + public const string PackagePath = "Packages/com.unity.package-manager-ui/"; + public const string ResourcesPath = PackagePath + "Editor/Resources/"; + private const string TemplatePath = ResourcesPath + "Templates/PackageManagerWindow.uxml"; + private const string DarkStylePath = ResourcesPath + "Styles/Main_Dark.uss"; + private const string LightStylePath = ResourcesPath + "Styles/Main_Light.uss"; + + private const double targetVersionNumber = 2018.1; + + public PackageCollection Collection; + public PackageSearchFilter SearchFilter; + +#if UNITY_2018_1_OR_NEWER + + public void OnEnable() + { + PackageCollection.InitInstance(ref Collection); + PackageSearchFilter.InitInstance(ref SearchFilter); + + this.GetRootVisualContainer().AddStyleSheetPath(EditorGUIUtility.isProSkin ? DarkStylePath : LightStylePath); + + var windowResource = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(TemplatePath); + if (windowResource != null) + { + var template = windowResource.CloneTree(null); + this.GetRootVisualContainer().Add(template); + template.StretchToParentSize(); + + PackageList.OnSelected += OnPackageSelected; + PackageList.OnLoaded += OnPackagesLoaded; + PackageList.OnFocusChange += OnListFocusChange; + + PackageManagerToolbar.SearchToolbar.OnSearchChange += OnSearchChange; + PackageManagerToolbar.SearchToolbar.OnFocusChange += OnToolbarFocusChange; + + // Disable filter while fetching first results + if (!PackageCollection.Instance.LatestListPackages.Any()) + PackageManagerToolbar.SetEnabled(false); + else + PackageList.SelectLastSelection(); + } + } + + private void OnListFocusChange() + { + PackageManagerToolbar.GrabFocus(); + } + + private void OnToolbarFocusChange() + { + PackageList.GrabFocus(); + } + + private void OnSearchChange(string searchText) + { + PackageSearchFilter.Instance.SearchText = searchText; + PackageFiltering.FilterPackageList(PackageList); + } + + public void OnDisable() + { + // Package list item may not be valid here. + if (PackageList != null) + { + PackageList.OnSelected -= OnPackageSelected; + PackageList.OnLoaded -= OnPackagesLoaded; + } + + if (PackageManagerToolbar != null) + { + PackageManagerToolbar.SearchToolbar.OnSearchChange -= OnSearchChange; + PackageManagerToolbar.SearchToolbar.OnFocusChange -= OnToolbarFocusChange; + } + } + + public void OnDestroy() + { + PackageSearchFilter.Instance.ResetSearch(); + PackageCollection.Instance.SetFilter(PackageFilter.All, false); + } + + private void OnPackageSelected(Package package) + { + PackageDetails.SetPackage(package); + } + + private void OnPackagesLoaded() + { + PackageManagerToolbar.SetEnabled(true); + } + + private PackageList PackageList + { + get {return this.GetRootVisualContainer().Q<PackageList>("packageList");} + } + + private PackageDetails PackageDetails + { + get {return this.GetRootVisualContainer().Q<PackageDetails>("detailsGroup");} + } + + private PackageManagerToolbar PackageManagerToolbar + { + get {return this.GetRootVisualContainer().Q<PackageManagerToolbar>("toolbarContainer");} + } + + internal Alert ErrorBanner { get { return this.GetRootVisualContainer().Q<Alert>("errorBanner"); } } + +#endif + + [MenuItem("Window/Package Manager", priority = 1500)] + internal static void ShowPackageManagerWindow() + { +#if UNITY_2018_1_OR_NEWER + var window = GetWindow<PackageManagerWindow>(false, "Packages", true); + window.minSize = new Vector2(700, 250); + window.Show(); +#else + EditorUtility.DisplayDialog("Unsupported Unity Version", string.Format("The Package Manager requires Unity Version {0} or higher to operate.", targetVersionNumber), "Ok"); +#endif + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageManagerWindow.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageManagerWindow.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..bceb03391612684a10564042d9db14252f3c61b4 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageManagerWindow.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 650ea1d167b834d0f86d94e1e8c3b80f +timeCreated: 1502224642 +licenseType: Pro +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageSearchToolbar.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageSearchToolbar.cs new file mode 100644 index 0000000000000000000000000000000000000000..da07baed96cc6ec4052cc235a2665ade3b7b386c --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageSearchToolbar.cs @@ -0,0 +1,153 @@ +using System; +using UnityEngine; +using UnityEngine.Experimental.UIElements; + +namespace UnityEditor.PackageManager.UI +{ +#if !UNITY_2018_3_OR_NEWER + internal class PackageSearchToolbarFactory : UxmlFactory<PackageSearchToolbar> + { + protected override PackageSearchToolbar DoCreate(IUxmlAttributes bag, CreationContext cc) + { + return new PackageSearchToolbar(); + } + } +#endif + + internal class PackageSearchToolbar : VisualElement + { +#if UNITY_2018_3_OR_NEWER + internal new class UxmlFactory : UxmlFactory<PackageSearchToolbar> { } +#endif + private const string kPlaceHolder = "Search by package name, verified, preview or version number..."; + + public event Action OnFocusChange = delegate { }; + public event Action<string> OnSearchChange = delegate { }; + + private string searchText; + private bool showingPlaceHolder; + + private readonly VisualElement root; + + public PackageSearchToolbar() + { + root = Resources.GetTemplate("PackageSearchToolbar.uxml"); + Add(root); + root.StretchToParentSize(); + + SearchTextField.value = searchText; + SearchTextField.maxLength = 54; + SearchCancelButton.clickable.clicked += SearchCancelButtonClick; + + RegisterCallback<AttachToPanelEvent>(OnEnterPanel); + RegisterCallback<DetachFromPanelEvent>(OnLeavePanel); + + searchText = PackageSearchFilter.Instance.SearchText; + + if (string.IsNullOrEmpty(searchText)) + { + showingPlaceHolder = true; + SearchTextField.value = kPlaceHolder; + SearchTextField.AddToClassList("placeholder"); + } + else + { + showingPlaceHolder = false; + SearchTextField.value = searchText; + SearchTextField.RemoveFromClassList("placeholder"); + } + } + + public void GrabFocus() + { + SearchTextField.Focus(); + } + + public new void SetEnabled(bool enable) + { + base.SetEnabled(enable); + SearchTextField.SetEnabled(enable); + SearchCancelButton.SetEnabled(enable); + } + + private void OnSearchTextFieldChange(ChangeEvent<string> evt) + { + if (showingPlaceHolder && evt.newValue == kPlaceHolder) + return; + if (!string.IsNullOrEmpty(evt.newValue)) + SearchCancelButton.AddToClassList("on"); + else + SearchCancelButton.RemoveFromClassList("on"); + + searchText = evt.newValue; + OnSearchChange(searchText); + } + + private void OnSearchTextFieldFocus(FocusEvent evt) + { + if (showingPlaceHolder) + { + SearchTextField.value = string.Empty; + SearchTextField.RemoveFromClassList("placeholder"); + showingPlaceHolder = false; + } + } + + private void OnSearchTextFieldFocusOut(FocusOutEvent evt) + { + if (string.IsNullOrEmpty(searchText)) + { + showingPlaceHolder = true; + SearchTextField.AddToClassList("placeholder"); + SearchTextField.value = kPlaceHolder; + } + } + + private void SearchCancelButtonClick() + { + if (!string.IsNullOrEmpty(SearchTextField.value)) + { + SearchTextField.value = string.Empty; + } + + showingPlaceHolder = true; + SearchTextField.AddToClassList("placeholder"); + SearchTextField.value = kPlaceHolder; + } + + private void OnEnterPanel(AttachToPanelEvent evt) + { + SearchTextField.RegisterCallback<FocusEvent>(OnSearchTextFieldFocus); + SearchTextField.RegisterCallback<FocusOutEvent>(OnSearchTextFieldFocusOut); + SearchTextField.RegisterCallback<ChangeEvent<string>>(OnSearchTextFieldChange); + SearchTextField.RegisterCallback<KeyDownEvent>(OnKeyDownShortcut); + } + + private void OnLeavePanel(DetachFromPanelEvent evt) + { + SearchTextField.UnregisterCallback<FocusEvent>(OnSearchTextFieldFocus); + SearchTextField.UnregisterCallback<FocusOutEvent>(OnSearchTextFieldFocusOut); + SearchTextField.UnregisterCallback<ChangeEvent<string>>(OnSearchTextFieldChange); + SearchTextField.UnregisterCallback<KeyDownEvent>(OnKeyDownShortcut); + } + + private void OnKeyDownShortcut(KeyDownEvent evt) + { + if (evt.keyCode == KeyCode.Escape) + { + SearchCancelButtonClick(); + SearchCancelButton.Focus(); + evt.StopImmediatePropagation(); + return; + } + + if (evt.keyCode == KeyCode.Tab) + { + OnFocusChange(); + evt.StopImmediatePropagation(); + } + } + private TextField SearchTextField { get { return root.Q<TextField>("searchTextField"); } } + private Button SearchCancelButton { get { return root.Q<Button>("searchCancelButton"); } } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageSearchToolbar.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageSearchToolbar.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..38292f40d2109a87f3735753143603cf346d8348 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageSearchToolbar.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f74142ec8a4cd4fb1b0ff6cf5c3075af +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageStatusBar.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageStatusBar.cs new file mode 100644 index 0000000000000000000000000000000000000000..432ad27864cda5c35b6e414cb1465897f37e2a6b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageStatusBar.cs @@ -0,0 +1,150 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine; +using UnityEngine.Experimental.UIElements; + +namespace UnityEditor.PackageManager.UI +{ +#if !UNITY_2018_3_OR_NEWER + internal class PackageStatusBarFactory : UxmlFactory<PackageStatusBar> + { + protected override PackageStatusBar DoCreate(IUxmlAttributes bag, CreationContext cc) + { + return new PackageStatusBar(); + } + } +#endif + + internal class PackageStatusBar : VisualElement + { +#if UNITY_2018_3_OR_NEWER + internal new class UxmlFactory : UxmlFactory<PackageStatusBar> { } +#endif + + private readonly VisualElement root; + private string LastErrorMessage; + + private List<IBaseOperation> operationsInProgress; + + private enum StatusType {Normal, Loading, Error}; + + public PackageStatusBar() + { + root = Resources.GetTemplate("PackageStatusBar.uxml"); + Add(root); + + MoreAddOptionsButton.clickable.clicked += OnMoreAddOptionsButtonClick; + + LastErrorMessage = string.Empty; + operationsInProgress = new List<IBaseOperation>(); + + SetDefaultMessage(); + + PackageCollection.Instance.ListSignal.WhenOperation(OnListOrSearchOperation); + PackageCollection.Instance.SearchSignal.WhenOperation(OnListOrSearchOperation); + } + + private void SetDefaultMessage() + { + if(!string.IsNullOrEmpty(PackageCollection.Instance.lastUpdateTime)) + SetStatusMessage(StatusType.Normal, "Last update " + PackageCollection.Instance.lastUpdateTime); + else + SetStatusMessage(StatusType.Normal, string.Empty); + } + + private void OnListOrSearchOperation(IBaseOperation operation) + { + if (operation == null || operation.IsCompleted) + return; + operationsInProgress.Add(operation); + operation.OnOperationFinalized += () => { OnOperationFinalized(operation); }; + operation.OnOperationError += OnOperationError; + + SetStatusMessage(StatusType.Loading, "Loading packages..."); + } + + private void OnOperationFinalized(IBaseOperation operation) + { + operationsInProgress.Remove(operation); + + if (operationsInProgress.Any()) return; + + var errorMessage = LastErrorMessage; + + if (Application.internetReachability == NetworkReachability.NotReachable) + { + EditorApplication.update -= CheckInternetReachability; + EditorApplication.update += CheckInternetReachability; + + errorMessage = "You seem to be offline."; + } + + if (!string.IsNullOrEmpty(errorMessage)) + SetStatusMessage(StatusType.Error, errorMessage); + else + SetDefaultMessage(); + } + + private void OnOperationError(Error error) + { + LastErrorMessage = "Cannot load packages, see console."; + } + + private void CheckInternetReachability() + { + if (Application.internetReachability == NetworkReachability.NotReachable) return; + + PackageCollection.Instance.FetchListCache(true); + PackageCollection.Instance.FetchSearchCache(true); + EditorApplication.update -= CheckInternetReachability; + } + + private void SetStatusMessage(StatusType status, string message) + { + if (status == StatusType.Loading) + LoadingSpinner.Start(); + else + LoadingSpinner.Stop(); + + UIUtils.SetElementDisplay(LoadingIcon, status == StatusType.Error); + if (status == StatusType.Error) + LoadingText.AddToClassList("icon"); + else + LoadingText.RemoveFromClassList("icon"); + + LoadingText.text = message; + } + + private void OnMoreAddOptionsButtonClick() + { + var menu = new GenericMenu(); + + var addPackageFromDiskItem = new GUIContent("Add package from disk..."); + + /* // Disable adding from url field before the feature is ready + var addPackageFromUrlItem = new GUIContent("Add package from URL..."); + menu.AddItem(addPackageFromUrlItem, false, delegate + { + AddFromUrlField.Show(true); + }); + */ + + menu.AddItem(addPackageFromDiskItem, false, delegate + { + var path = EditorUtility.OpenFilePanelWithFilters("Select package on disk", "", new[] { "package.json file", "json" }); + if (!string.IsNullOrEmpty(path) && !Package.AddRemoveOperationInProgress) + Package.AddFromLocalDisk(path); + }); + var menuPosition = MoreAddOptionsButton.LocalToWorld(new Vector2(MoreAddOptionsButton.layout.width, 0)); + var menuRect = new Rect(menuPosition, Vector2.zero); + menu.DropDown(menuRect); + } + + private PackageAddFromUrlField AddFromUrlField { get { return root.Q<PackageAddFromUrlField>("packageAddFromUrlField"); }} + private VisualElement LoadingSpinnerContainer { get { return root.Q<VisualElement>("loadingSpinnerContainer"); }} + private LoadingSpinner LoadingSpinner { get { return root.Q<LoadingSpinner>("packageSpinner"); }} + private Label LoadingIcon { get { return root.Q<Label>("loadingIcon"); }} + private Label LoadingText { get { return root.Q<Label>("loadingText"); }} + private Button MoreAddOptionsButton{ get { return root.Q<Button>("moreAddOptionsButton"); }} + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageStatusBar.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageStatusBar.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..b9a9b19be4cb6751c2e2b4c598ea288492cfc191 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Sources/UI/PackageStatusBar.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f34f5fa2437664b2a81b4a7f34df87ad +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Unity.PackageManagerUI.Editor.asmdef b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Unity.PackageManagerUI.Editor.asmdef new file mode 100644 index 0000000000000000000000000000000000000000..a5db520758e14732c7c2f54a6db990381e3f6276 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Unity.PackageManagerUI.Editor.asmdef @@ -0,0 +1,9 @@ +{ + "name": "Unity.PackageManagerUI.Editor", + "references": [], + "optionalUnityReferences": [], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [] +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Unity.PackageManagerUI.Editor.asmdef.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Unity.PackageManagerUI.Editor.asmdef.meta new file mode 100644 index 0000000000000000000000000000000000000000..53a545ff5f354892cc7775ea0428b1e83a5c5e01 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Editor/Unity.PackageManagerUI.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 15a615c733aa240909fe0b28b0d5143c +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/LICENSE.md b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..bff9ef84ac88b43f310998c81a5bb04c0a85501c --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/LICENSE.md @@ -0,0 +1,31 @@ +**Unity Companion License ("_License_")** + +Software Copyright © 2018 Unity Technologies ApS** ** + +Unity Technologies ApS ("**_Unity_**") 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 under 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 content authoring and rendering 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, and in no event may the Software be used for competitive analysis or to develop a competing product or service. + +2. *No Modification of Engine License*. Neither this License nor any exercise of the license granted herein modifies the Engine License in any way. + +3. *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. + +4. *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). + +5. *Notices & Third-Party Rights*. This License, including the copyright notice associated with the Software, 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. + +6. *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. + +7. *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. + +8. *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. + +9. *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. + +10. *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/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/LICENSE.md.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/LICENSE.md.meta new file mode 100644 index 0000000000000000000000000000000000000000..846adcd01ddd1b2fa98cc4c97f6006ffb1cf5e58 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/LICENSE.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2b3002c18d29d41b0898ab58bc6ee10d +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/README.md b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/README.md new file mode 100644 index 0000000000000000000000000000000000000000..b7db7bbddd931b429367700c48806f729790bbbf --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/README.md @@ -0,0 +1,5 @@ +# Unity Package Manager UI + +[](https://badges.cds.internal.unity3d.com/packages/com.unity.package-manager-ui/build-info?branch=2018.3%2Fstaging) [](https://badges.cds.internal.unity3d.com/packages/com.unity.package-manager-ui/dependencies-info?branch=2018.3%2Fstaging) [](https://badges.cds.internal.unity3d.com/packages/com.unity.package-manager-ui/dependants-info)   + +Unity Package Manager UI as a Unity Package diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/README.md.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/README.md.meta new file mode 100644 index 0000000000000000000000000000000000000000..927878a42d7ec4fe8cc3abbf08340525bc4bdb0c --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/README.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 23805a7a1623842b0b7b21158066bd90 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests.meta new file mode 100644 index 0000000000000000000000000000000000000000..5f5c2e6baec234a8ebe165ea62857ab9fcb45f97 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ab866bd39382069418f5c179c1e1ab3e +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor.meta new file mode 100644 index 0000000000000000000000000000000000000000..312fb970ce9fe333309c8f28506fda94e303d17d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bac185a28e198c1419b649ca946942ea +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/AssemblyInfo.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/AssemblyInfo.cs new file mode 100644 index 0000000000000000000000000000000000000000..42899bc0552a4ac062abb8308ffb65384756d626 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/AssemblyInfo.cs @@ -0,0 +1,3 @@ +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Unity.PackageManagerCaptain.Editor")] diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/AssemblyInfo.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/AssemblyInfo.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..a17ac41b3be0c14baea907ff7fa981a881eb67d2 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/AssemblyInfo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5941c79cb78c34a0d9c677ece9784f15 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Common.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Common.meta new file mode 100644 index 0000000000000000000000000000000000000000..d6f3ec1c544897006b4fd94ddff1602541d1eba8 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Common.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 87738e82a4f047cc947cff8a2ccea594 +timeCreated: 1507838883 \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Common/PackageSets.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Common/PackageSets.cs new file mode 100644 index 0000000000000000000000000000000000000000..ea571723faf6f5fbaa6e2281fbbd73d1f20a4bac --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Common/PackageSets.cs @@ -0,0 +1,281 @@ +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace UnityEditor.PackageManager.UI.Tests +{ + internal class PackageSets + { + private static readonly PackageSets _instance = new PackageSets(); + public static PackageSets Instance { get { return _instance; } } + + private static readonly System.Random Random = new System.Random(1); + private static string RandomString(int length) + { + const string chars = "abcdefghijklmnopqrstuvwxyz"; + return new string(Enumerable.Repeat(chars, length) + .Select(s => s[Random.Next(s.Length)]).ToArray()); + } + + private static readonly string[] Words = new[] { "lorem", "ipsum", "dolor", "sit", "amet", "consectetuer", + "adipiscing", "elit", "sed", "diam", "nonummy", "nibh", "euismod", + "tincidunt", "ut", "laoreet", "dolore", "magna", "aliquam", "erat" }; + + private static string LoremIpsum(int numParagraphs, int minSentences, int maxSentences, int minWords, int maxWords) + { + var result = new StringBuilder(); + + for (var p = 0; p < numParagraphs; p++) + { + var numSentences = Random.Next(maxSentences - minSentences) + minSentences + 1; + for (var s = 0; s < numSentences; s++) + { + var numWords = Random.Next(maxWords - minWords) + minWords + 1; + for (var w = 0; w < numWords; w++) + { + if (p == 0 && s == 0 && w == 0) + { + result.Append("Lorem ipsum dolor sit"); + } + else + { + if (w == 0) + { + var firstWord = Words [Random.Next (Words.Length)]; + firstWord = char.ToUpper (firstWord [0]) + firstWord.Substring (1); + result.Append (firstWord); + } + else + { + result.Append (" "); + result.Append (Words [Random.Next (Words.Length)]); + } + } + } + result.Append(". "); + } + result.Append(System.Environment.NewLine); + result.Append(System.Environment.NewLine); + } + + return result.ToString(); + } + + private int _count = 0; + + public PackageInfo Single(string name = null, string version = null) + { + var type = Random.NextDouble() > 0.5 ? PackageSource.Unknown : PackageSource.Registry; + return Single(type, name, version); + } + + public PackageInfo Single(PackageSource type, string name = null, string version = null, bool isCurrent = true, bool isVerified = false) + { + if (name == null) + name = RandomString(Random.Next(5, 10)); + if (version == null) + { + version = string.Format("1.0.{0}", _count); + if (Random.NextDouble() > 0.5) + version += "-preview"; + } + + var group = UpmBaseOperation.GroupName(type); + var package = new PackageInfo + { + DisplayName = char.ToUpper(name[0]) + name.Substring(1), + Name = string.Format("com.unity.{0}", name), + Description = LoremIpsum(Random.Next(3,5), 2, 10, 5, 20), + PackageId = string.Format("com.unity.{0}@{1}", name, version), + State = PackageState.UpToDate, + Group = group, + Version = version, + IsVerified = isVerified, + IsCurrent = isCurrent, + IsLatest = false, + Origin = type, + Category = null, + Errors = new List<Error>() + }; + + _count++; + + return package; + } + + public List<PackageInfo> Many(int count, bool onlyPackageGroup = false) + { + return Many(null, count, onlyPackageGroup); + } + + public List<PackageInfo> Many(string name, int count, bool onlyPackageGroup = false) + { + var packages = new List<PackageInfo>(); + for (var i = 0; i < count; i++) + { + var package = Single(name); + packages.Add(package); + } + + // At least one is set to a module and one to a package + if (packages.Count > 1) + { + packages[0].Group = PackageGroupOrigins.Packages.ToString(); + packages[1].Group = PackageGroupOrigins.BuiltInPackages.ToString(); + } + + if (onlyPackageGroup) + packages.SetGroup(PackageGroupOrigins.Packages.ToString()); + + if (name != null) + { + packages.SetCurrent(false); + packages.SetLatest(false); + + if (count > 1) + { + packages.First().IsCurrent = true; + packages.First().IsLatest = false; + packages.Last().IsCurrent = false; + packages.Last().IsLatest = true; + } + else + { + packages.First().IsCurrent = true; + packages.First().IsLatest = true; + } + } + + return packages.OrderBy(p => p.DisplayName).ToList(); + } + + public List<PackageInfo> TestData() + { + var packages = Many(5); + packages[0].State = PackageState.UpToDate; + packages[1].State = PackageState.Outdated; + packages[2].State = PackageState.InProgress; + packages[3].State = PackageState.Error; + + return packages; + } + + // Package that actually exist. Useful when using test package that will be added to manifest + public List<PackageInfo> RealPackages() + { + var packages = new List<PackageInfo>(); + + // Don't add this package if it exists + if (PackageCollection.Instance.GetPackageByName("a") == null) + { + var package = new PackageInfo + { + DisplayName = "A", + Name = "a", + Description = LoremIpsum(Random.Next(3, 5), 2, 10, 5, 20), + PackageId = "a@1.0.1", + State = PackageState.UpToDate, + Version = "1.0.1", + Group = PackageGroupOrigins.Packages.ToString(), + IsCurrent = true, + IsLatest = true, + Errors = new List<Error>() + }; + packages.Add(package); + } + + if (PackageCollection.Instance.GetPackageByName("b") == null) + { + var package = new PackageInfo + { + DisplayName = "B", + Name = "b", + Description = LoremIpsum(Random.Next(3, 5), 2, 10, 5, 20), + PackageId = "b@1.0.1", + State = PackageState.UpToDate, + Version = "1.0.1", + Group = PackageGroupOrigins.Packages.ToString(), + IsCurrent = true, + IsLatest = true, + Errors = new List<Error>() + }; + packages.Add(package); + } + + if (PackageCollection.Instance.GetPackageByName("c") == null) + { + var package = new PackageInfo + { + DisplayName = "C", + Name = "c", + Description = LoremIpsum(Random.Next(3, 5), 2, 10, 5, 20), + PackageId = "c@1.0.1", + State = PackageState.UpToDate, + Version = "1.0.1", + Group = PackageGroupOrigins.Packages.ToString(), + IsCurrent = true, + IsLatest = true, + Errors = new List<Error>() + }; + packages.Add(package); + } + + if (PackageCollection.Instance.GetPackageByName("d") == null) + { + var package = new PackageInfo + { + DisplayName = "NonExistingVersion(d)", + Name = "d", + Description = "Non existing package", //LoremIpsum(Random.Next(3, 5), 2, 10, 5, 20), + PackageId = "d@4.0.0", + State = PackageState.UpToDate, + Version = "4.0.0", + Group = PackageGroupOrigins.Packages.ToString(), + IsCurrent = true, + IsLatest = true, + Errors = new List<Error>() + }; + packages.Add(package); + } + + if (PackageCollection.Instance.GetPackageByName("nonexistingpackage") == null) + { + var package = new PackageInfo + { + DisplayName = "NonExistingPackage", + Name = "nonexistingpackage", + Description = LoremIpsum(Random.Next(3, 5), 2, 10, 5, 20), + PackageId = "nonexistingpackage@0.0.1", + State = PackageState.UpToDate, + Version = "0.0.1", + Group = PackageGroupOrigins.Packages.ToString(), + IsCurrent = true, + IsLatest = true, + Errors = new List<Error>() + }; + packages.Add(package); + } + + return packages; + } + + public List<PackageInfo> Outdated() + { + const string name = "TestOutdated"; + + var packageA = Single(PackageSource.Registry, name, "1.0.1"); + var packageB = Single(PackageSource.Registry, name, "1.0.2"); + packageA.State = PackageState.Outdated; + packageB.IsCurrent = true; + packageB.IsLatest = false; + + packageB.State = PackageState.UpToDate; + packageB.IsCurrent = false; + packageB.IsLatest = true; + + var packages = new List<PackageInfo> {packageA, packageB}; + + return packages; + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Common/PackageSets.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Common/PackageSets.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..022c04050492275acb0d58adebabba6cb71d9465 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Common/PackageSets.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: a5edd19845e0e426eb775477a7988a4a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Common/UITests.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Common/UITests.cs new file mode 100644 index 0000000000000000000000000000000000000000..cf73defe6aa5e40fd9c63a166bc61f17b7022728 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Common/UITests.cs @@ -0,0 +1,55 @@ +using System.Collections.Generic; +using NUnit.Framework; +using UnityEditor.Experimental.UIElements; +using UnityEngine; +using UnityEngine.Experimental.UIElements; + +namespace UnityEditor.PackageManager.UI.Tests +{ + internal abstract class UITests<TWindow> where TWindow : EditorWindow + { + private TWindow Window { get; set; } + protected VisualElement Container { get { return Window.GetRootVisualContainer(); } } + protected MockOperationFactory Factory { get; private set; } + + [OneTimeSetUp] + protected void OneTimeSetUp() + { + Factory = new MockOperationFactory(); + OperationFactory.Instance = Factory; + + Window = EditorWindow.GetWindow<TWindow>(); + Window.Show(); + } + + [OneTimeTearDown] + protected void OneTimeTearDown() + { + OperationFactory.Reset(); + Window = null; + + if (TestContext.CurrentContext.Result.FailCount <= 0) + { + PackageCollection.Instance.UpdatePackageCollection(true); + } + } + + protected void SetSearchPackages(IEnumerable<PackageInfo> packages) + { + Factory.SearchOperation = new MockSearchOperation(Factory, packages); + PackageCollection.Instance.FetchSearchCache(true); + } + + protected void SetListPackages(IEnumerable<PackageInfo> packages) + { + Factory.Packages = packages; + PackageCollection.Instance.FetchListCache(true); + } + + protected static Error MakeError(ErrorCode code, string message) + { + var error = "{\"errorCode\" : " + (uint)code + ", \"message\" : \"" + message + "\"}"; + return JsonUtility.FromJson<Error>(error); + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Common/UITests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Common/UITests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..4e60f9213a8238daa6810f7c6d5ec6abc3735c67 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Common/UITests.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 76078ddafb924ce19edc6034201cb15b +timeCreated: 1507838870 \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services.meta new file mode 100644 index 0000000000000000000000000000000000000000..33def5efefcc1d9065b22eff2fe806326a3cae3c --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 005c4d80949154e5c87348bb9f5d15eb +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock.meta new file mode 100644 index 0000000000000000000000000000000000000000..639ff769b5be54f58abd4f397d7b8eddaeb83a58 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f851ca8f9604f442aafccf60a6713ce9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockAddOperation.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockAddOperation.cs new file mode 100644 index 0000000000000000000000000000000000000000..b9cd056d56797b762f5215a45a22c5420811623e --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockAddOperation.cs @@ -0,0 +1,58 @@ +using System; +using System.Linq; + +namespace UnityEditor.PackageManager.UI.Tests +{ + internal class MockAddOperation : MockOperation, IAddOperation + { + public new event Action<Error> OnOperationError = delegate { }; + public new event Action OnOperationFinalized = delegate { }; + public event Action<PackageInfo> OnOperationSuccess = delegate { }; + + public PackageInfo PackageInfo { get; set; } + + public MockAddOperation(MockOperationFactory factory, PackageInfo packageInfo = null) : base(factory) + { + PackageInfo = packageInfo; + } + + public void AddPackageAsync(PackageInfo packageInfo, Action<PackageInfo> doneCallbackAction = null, + Action<Error> errorCallbackAction = null) + { + if (ForceError != null) + { + if (errorCallbackAction != null) + errorCallbackAction(ForceError); + + IsCompleted = true; + OnOperationError(ForceError); + } + else + { + // on add package success, add the package to the list and set it to current + var list = Factory.Packages.ToList(); + list.RemoveAll(p => p.PackageId.ToLower() == packageInfo.PackageId.ToLower()); + list.Add(packageInfo); + Factory.Packages = list; + + Factory.Packages.ByName(packageInfo.Name).SetCurrent(false); + packageInfo.IsCurrent = true; + + if (doneCallbackAction != null) + doneCallbackAction(PackageInfo); + + IsCompleted = true; + OnOperationSuccess(PackageInfo); + } + + OnOperationFinalized(); + } + + internal void ResetEvents() + { + OnOperationError = delegate { }; + OnOperationFinalized = delegate { }; + OnOperationSuccess = delegate { }; + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockAddOperation.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockAddOperation.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..0a4ad88a01ff3b39a83c109ea5f262bec8b95d61 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockAddOperation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e426a33061f184a9785cd5d82f9fb486 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockListOperation.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockListOperation.cs new file mode 100644 index 0000000000000000000000000000000000000000..669552171edd349ec2f17711b09ad7c6a20349f6 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockListOperation.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; + +namespace UnityEditor.PackageManager.UI.Tests +{ + internal class MockListOperation : MockOperation, IListOperation + { + public new event Action<Error> OnOperationError = delegate { }; + public new event Action OnOperationFinalized = delegate { }; + + public bool OfflineMode { get; set; } + + public MockListOperation(MockOperationFactory factory) : base(factory) + { + } + + public void GetPackageListAsync(Action<IEnumerable<PackageInfo>> doneCallbackAction, + Action<Error> errorCallbackAction = null) + { + if (ForceError != null) + { + if (errorCallbackAction != null) + errorCallbackAction(ForceError); + + IsCompleted = true; + OnOperationError(ForceError); + } + else + { + if (doneCallbackAction != null) + doneCallbackAction(Factory.Packages); + + IsCompleted = true; + } + + OnOperationFinalized(); + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockListOperation.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockListOperation.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..2a8cabf83b794e6567dd63e36af33dfef9acf2f7 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockListOperation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fea24dc53b50441a9b2a8f9473fede33 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockOperation.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockOperation.cs new file mode 100644 index 0000000000000000000000000000000000000000..dc113098d3ab4977b4f4e243428d7f5baedec0c3 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockOperation.cs @@ -0,0 +1,28 @@ +using System; + +namespace UnityEditor.PackageManager.UI.Tests +{ + internal class MockOperation : IBaseOperation + { + public event Action<Error> OnOperationError { add { } remove { } } + public event Action OnOperationFinalized { add { } remove { } } + public event Action<string> OnOperationFailure { add { } remove { } } + + public bool IsCompleted { get; protected set; } + public bool RequireNetwork { get; set; } + + public Error ForceError { protected get; set; } // Allow external component to force an error on the requests (eg: testing) + + protected readonly MockOperationFactory Factory; + + protected MockOperation(MockOperationFactory factory) + { + RequireNetwork = false; + Factory = factory; + } + + public void Cancel() + { + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockOperation.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockOperation.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..b88b65d6927e0fefdd855a2df90db9c260e31a1d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockOperation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4fc12201ddc4b4d45b9bdecdf7f00ea5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockRemoveOperation.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockRemoveOperation.cs new file mode 100644 index 0000000000000000000000000000000000000000..2af87c27985d5b69ebc7d5b972c257a46333e3d1 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockRemoveOperation.cs @@ -0,0 +1,50 @@ +using System; +using System.Linq; + +namespace UnityEditor.PackageManager.UI.Tests +{ + internal class MockRemoveOperation : MockOperation, IRemoveOperation + { + public new event Action<Error> OnOperationError = delegate { }; + public new event Action OnOperationFinalized = delegate { }; + public event Action<PackageInfo> OnOperationSuccess = delegate { }; + + public PackageInfo PackageInfo { get; set; } + + public MockRemoveOperation(MockOperationFactory factory) : base(factory) + { + } + + public void RemovePackageAsync(PackageInfo packageInfo, Action<PackageInfo> doneCallbackAction, Action<Error> errorCallbackAction = null) + { + if (ForceError != null) + { + if (errorCallbackAction != null) + errorCallbackAction(ForceError); + + IsCompleted = true; + OnOperationError(ForceError); + OnOperationFinalized(); + return; + } + + Factory.Packages = (from package in Factory.Packages + where package.PackageId.ToLower() != packageInfo.PackageId.ToLower() + select package); + + if (doneCallbackAction != null) + doneCallbackAction(packageInfo); + + IsCompleted = true; + OnOperationSuccess(packageInfo); + OnOperationFinalized(); + } + + internal void ResetEvents() + { + OnOperationError = delegate { }; + OnOperationFinalized = delegate { }; + OnOperationSuccess = delegate { }; + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockRemoveOperation.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockRemoveOperation.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..f0e652e27564d2ad7783e6f68399adca324ae7c8 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockRemoveOperation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: fd382b8abbd6145c29e32af0e2a26d88 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockSearchOperation.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockSearchOperation.cs new file mode 100644 index 0000000000000000000000000000000000000000..76393cc800a7dbe82ac04fb2fc951ac0c3f7d353 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockSearchOperation.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; + +namespace UnityEditor.PackageManager.UI.Tests +{ + internal class MockSearchOperation : MockOperation, ISearchOperation + { + public new event Action<Error> OnOperationError = delegate { }; + public new event Action OnOperationFinalized = delegate { }; + + public IEnumerable<PackageInfo> Packages { get; set; } + + public MockSearchOperation(MockOperationFactory factory, IEnumerable<PackageInfo> packages) : base(factory) + { + Packages = packages; + } + + public void GetAllPackageAsync(Action<IEnumerable<PackageInfo>> doneCallbackAction = null, Action<Error> errorCallbackAction = null) + { + if (ForceError != null) + { + if (errorCallbackAction != null) + errorCallbackAction(ForceError); + IsCompleted = true; + OnOperationError(ForceError); + } + else + { + if (doneCallbackAction != null) + doneCallbackAction(Packages); + + IsCompleted = true; + } + + OnOperationFinalized(); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockSearchOperation.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockSearchOperation.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..3114715688ec5df63d16473e2f500a058253fa9d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Mock/MockSearchOperation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0a2c7bcbdfe0a438999cb0653789cdf4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/MockOperationFactory.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/MockOperationFactory.cs new file mode 100644 index 0000000000000000000000000000000000000000..221ffb06bbf6fb99e33a971ec2353bb29c1354c8 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/MockOperationFactory.cs @@ -0,0 +1,51 @@ +using System.Collections.Generic; +using System.Linq; + +namespace UnityEditor.PackageManager.UI.Tests +{ + internal class MockOperationFactory : IOperationFactory + { + public IEnumerable<PackageInfo> Packages { get; set; } + public MockAddOperation AddOperation { get; set; } + public MockSearchOperation SearchOperation { private get; set; } + public MockRemoveOperation RemoveOperation { private get; set; } + + public MockOperationFactory() + { + Packages = Enumerable.Empty<PackageInfo>(); + } + + public void ResetOperations() + { + if (AddOperation != null) + AddOperation.ResetEvents(); + AddOperation = null; + + if (RemoveOperation != null) + RemoveOperation.ResetEvents(); + RemoveOperation = null; + + SearchOperation = null; + } + + public IListOperation CreateListOperation(bool offlineMode = false) + { + return new MockListOperation(this); + } + + public ISearchOperation CreateSearchOperation() + { + return SearchOperation ?? new MockSearchOperation(this, Packages); + } + + public IAddOperation CreateAddOperation() + { + return AddOperation ?? new MockAddOperation(this, Packages.First()); + } + + public IRemoveOperation CreateRemoveOperation() + { + return RemoveOperation ?? new MockRemoveOperation(this); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/MockOperationFactory.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/MockOperationFactory.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..624dc0fb31d44d244aa7614cedadfb074096cd10 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/MockOperationFactory.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 75938f72739584ed9925bf4ae8989079 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages.meta new file mode 100644 index 0000000000000000000000000000000000000000..f3e04f86ae796f625555a4cda425b9792ce2b7a3 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f68d88b9933cd4204925b22192bf15b4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageBaseTests.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageBaseTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..e31dd12aae0965517295d21d146fbb1a47213c33 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageBaseTests.cs @@ -0,0 +1,24 @@ +using NUnit.Framework; + +namespace UnityEditor.PackageManager.UI.Tests +{ + internal class PackageBaseTests + { + protected MockOperationFactory Factory; + protected const string kPackageTestName = "com.unity.test"; + + + [OneTimeSetUp] + public void OneTimeSetup() + { + Factory = new MockOperationFactory(); + OperationFactory.Instance = Factory; + } + + [OneTimeTearDown] + public void OneTimeTearDown() + { + OperationFactory.Reset(); + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageBaseTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageBaseTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..68d83b67f94f88088fa2a01df7130315f2bc6401 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageBaseTests.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 983d491088dbb4db8b83c926939a08c5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageCollectionTests.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageCollectionTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..6a1ede18669736560d29ecee09c37e0580b2719d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageCollectionTests.cs @@ -0,0 +1,157 @@ +using System; +using System.Collections.Generic; +using NUnit.Framework; + +namespace UnityEditor.PackageManager.UI.Tests +{ + internal class PackageCollectionTests : PackageBaseTests + { + private Action<PackageFilter> OnFilterChangeEvent; + private Action<IEnumerable<Package>> OnPackagesChangeEvent; + + [SetUp] + public void Setup() + { + PackageCollection.Instance.SetFilter(PackageFilter.Local); + } + + [TearDown] + public void TearDown() + { + PackageCollection.Instance.OnFilterChanged -= OnFilterChangeEvent; + PackageCollection.Instance.OnPackagesChanged -= OnPackagesChangeEvent; + } + + [Test] + public void Constructor_Instance_FilterIsLocal() + { + Assert.AreEqual(PackageFilter.Local, PackageCollection.Instance.Filter); + } + + [Test] + public void SetFilter_WhenFilterChange_FilterChangeEventIsPropagated() + { + var wasCalled = false; + OnFilterChangeEvent = filter => + { + wasCalled = true; + }; + + PackageCollection.Instance.OnFilterChanged += OnFilterChangeEvent; + PackageCollection.Instance.SetFilter(PackageFilter.All, false); + Assert.IsTrue(wasCalled); + } + + [Test] + public void SetFilter_WhenNoFilterChange_FilterChangeEventIsNotPropagated() + { + var wasCalled = false; + OnFilterChangeEvent = filter => + { + wasCalled = true; + }; + + PackageCollection.Instance.OnFilterChanged += OnFilterChangeEvent; + PackageCollection.Instance.SetFilter(PackageFilter.Local, false); + Assert.IsFalse(wasCalled); + } + + [Test] + public void SetFilter_WhenFilterChange_FilterIsChanged() + { + PackageCollection.Instance.SetFilter(PackageFilter.All, false); + Assert.AreEqual(PackageFilter.All, PackageCollection.Instance.Filter); + } + + [Test] + public void SetFilter_WhenNoFilterChangeRefresh_PackagesChangeEventIsNotPropagated() + { + var wasCalled = false; + OnPackagesChangeEvent = packages => + { + wasCalled = true; + }; + + PackageCollection.Instance.OnPackagesChanged += OnPackagesChangeEvent; + PackageCollection.Instance.SetFilter(PackageFilter.Local); + Assert.IsFalse(wasCalled); + } + + [Test] + public void SetFilter_WhenFilterChangeNoRefresh_PackagesChangeEventIsNotPropagated() + { + var wasCalled = false; + OnPackagesChangeEvent = packages => + { + wasCalled = true; + }; + + PackageCollection.Instance.OnPackagesChanged += OnPackagesChangeEvent; + PackageCollection.Instance.SetFilter(PackageFilter.All, false); + Assert.IsFalse(wasCalled); + } + + [Test] + public void SetFilter_WhenNoFilterChangeNoRefresh_PackagesChangeEventIsNotPropagated() + { + var wasCalled = false; + OnPackagesChangeEvent = packages => + { + wasCalled = true; + }; + + PackageCollection.Instance.OnPackagesChanged += OnPackagesChangeEvent; + PackageCollection.Instance.SetFilter(PackageFilter.Local, false); + Assert.IsFalse(wasCalled); + } + + [Test] + public void FetchListCache_PackagesChangeEventIsPropagated() + { + var wasCalled = false; + OnPackagesChangeEvent = packages => + { + wasCalled = true; + }; + + PackageCollection.Instance.OnPackagesChanged += OnPackagesChangeEvent; + Factory.Packages = PackageSets.Instance.Many(5); + PackageCollection.Instance.FetchListCache(true); + + Assert.IsTrue(wasCalled); + } + + + [Test] + public void FetchListOfflineCache_PackagesChangeEventIsPropagated() + { + var wasCalled = false; + OnPackagesChangeEvent = packages => + { + wasCalled = true; + }; + PackageCollection.Instance.OnPackagesChanged += OnPackagesChangeEvent; + + Factory.Packages = PackageSets.Instance.Many(5); + PackageCollection.Instance.FetchListOfflineCache(true); + + Assert.IsTrue(wasCalled); + } + + [Test] + public void FetchSearchCache_PackagesChangeEventIsPropagated() + { + var wasCalled = false; + OnPackagesChangeEvent = packages => + { + wasCalled = true; + }; + PackageCollection.Instance.OnPackagesChanged += OnPackagesChangeEvent; + + Factory.SearchOperation = new MockSearchOperation(Factory, PackageSets.Instance.Many(5)); + PackageCollection.Instance.FetchSearchCache(true); + + Assert.IsTrue(wasCalled); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageCollectionTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageCollectionTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..1de3a06bcef5f00cc5b13869ed64473c8303696f --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageCollectionTests.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 01cd264c206ae482393dc9d04b26eca0 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageInfoTests.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageInfoTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..9cf3d1d7bbb12b3736087f2de6ce4eef56dee3dd --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageInfoTests.cs @@ -0,0 +1,60 @@ +using NUnit.Framework; +using Semver; + +namespace UnityEditor.PackageManager.UI.Tests +{ + internal class PackageInfoTests : PackageBaseTests + { + [Test] + public void HasTag_WhenPreReleasePackageVersionTagWithPreReleaseName_ReturnsTrue() + { + var tag = PackageTag.preview.ToString(); + + var info = new PackageInfo() + { + PackageId = kPackageTestName, + Version = new SemVersion(1, 0, 0, tag) + }; + + Assert.IsTrue(info.HasVersionTag(tag)); + } + + [Test] + public void HasTag_WhenPackageVersionTagIsAnyCase_ReturnsTrue() + { + var tag = "pREview"; + + var info = new PackageInfo() + { + PackageId = kPackageTestName, + Version = new SemVersion(1, 0, 0, tag) + }; + + Assert.IsTrue(info.HasVersionTag(tag)); + } + + [Test] + public void VersionWithoutTag_WhenVersionContainsTag_ReturnsVersionOnly() + { + var info = new PackageInfo() + { + PackageId = kPackageTestName, + Version = new SemVersion(1, 0, 0, PackageTag.preview.ToString()) + }; + + Assert.AreEqual("1.0.0", info.VersionWithoutTag); + } + + [Test] + public void VersionWithoutTag_WhenVersionDoesNotContainTag_ReturnsVersionOnly() + { + var info = new PackageInfo() + { + PackageId = kPackageTestName, + Version = new SemVersion(1) + }; + + Assert.AreEqual("1.0.0", info.VersionWithoutTag); + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageInfoTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageInfoTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..4a464ac1ad2ab2e97369a42ba3a0c10968726074 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageInfoTests.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2f1d33abb004b44cb90ec83a2bfe872e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageSearchTests.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageSearchTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..c5aedb5f8c8e9e9f368c7db9ad0b806205dcd3f1 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageSearchTests.cs @@ -0,0 +1,146 @@ +using System.Collections.Generic; +using NUnit.Framework; + +namespace UnityEditor.PackageManager.UI.Tests +{ + internal class PackageSearchTests : PackageBaseTests + { + private const string kName = "Test-Package"; + + private const string kCurrentVersion = "3.0.0"; + private const string kPrerelease = "preview"; + private const string kUpperPrerelease = "PREVIEW"; + private const string kMixedPrerelease = "pReViEw"; + + private Package testPackage; + + [SetUp] + public void Setup() + { + testPackage = new Package(kName, new List<PackageInfo> + { + PackageSets.Instance.Single(PackageSource.Registry, kName, kCurrentVersion + "-" + kPrerelease, true, true) + }); + } + + [TestCase(null)] + [TestCase("")] + [TestCase("\t")] + [TestCase(" ")] + [TestCase(" ")] + public void MatchCriteria_NullOrEmptyCriteria_ReturnsTrue(string criteria) + { + Assert.IsTrue(PackageFiltering.FilterByText(testPackage, criteria)); + } + + [TestCaseSource("GetAllPartialName")] + public void MatchCriteria_CriteriaMatchDisplayNamePartially_ReturnsTrue(string criteria) + { + Assert.IsTrue(PackageFiltering.FilterByText(testPackage, criteria)); + } + + [TestCaseSource("GetAllPartialVersions")] + public void MatchCriteria_CriteriaMatchCurrentVersion_ReturnsTrue(string criteria) + { + Assert.IsTrue(PackageFiltering.FilterByText(testPackage, criteria)); + } + + [TestCase(kPrerelease)] + [TestCase(kUpperPrerelease)] + [TestCase(kMixedPrerelease)] + public void MatchCriteria_CriteriaMatchCurrentVersionPreRelease_ReturnsTrue(string criteria) + { + Assert.IsTrue(PackageFiltering.FilterByText(testPackage, criteria)); + } + + [TestCase("p")] + [TestCase("pr")] + [TestCase("pre")] + [TestCase("prev")] + [TestCase("view")] + [TestCase("vie")] + [TestCase("vi")] + public void MatchCriteria_CriteriaPartialMatchCurrentVersionPreRelease_ReturnsTrue(string criteria) + { + Assert.IsTrue(PackageFiltering.FilterByText(testPackage, criteria)); + } + + [TestCase("-p")] + [TestCase("-pr")] + [TestCase("-pre")] + [TestCase("-prev")] + [TestCase("-previ")] + [TestCase("-previe")] + [TestCase("-preview")] + public void MatchCriteria_CriteriaPartialMatchCurrentVersionPreReleaseLeadingDash_ReturnsTrue(string criteria) + { + Assert.IsTrue(PackageFiltering.FilterByText(testPackage, criteria)); + } + + [TestCase("veri")] + [TestCase("verif")] + [TestCase("verifie")] + [TestCase("verified")] + [TestCase("erified")] + [TestCase("rified")] + [TestCase("ified")] + public void MatchCriteria_CriteriaPartialMatchVerified_ReturnsTrue(string criteria) + { + Assert.IsTrue(PackageFiltering.FilterByText(testPackage, criteria)); + } + + [TestCase("Test Package")] + [TestCase("Test -Package")] + [TestCase("Test - Package")] + [TestCase("Test- Package")] + [TestCase("NotFound")] + [TestCase("1.0.0-preview")] + [TestCase("5.0.0")] + [TestCase("beta")] + [TestCase("previewed")] + [TestCase("verify")] + [TestCase("experimental")] + public void MatchCriteria_CriteriaDoesntMatch_ReturnsFalse(string criteria) + { + Assert.IsFalse(PackageFiltering.FilterByText(testPackage, criteria)); + } + + private static IEnumerable<string> GetAllPartialVersions() + { + var versions = new List<string>(); + for (var i = 1; i <= kCurrentVersion.Length; i++) + { + versions.Add(kCurrentVersion.Substring(0, i)); + } + return versions; + } + + private static IEnumerable<string> GetAllPartial(string str) + { + var names = new List<string>(); + for (var i = 0; i < str.Length; i++) + { + var s1 = str.Substring(0, i + 1); + var s2 = str.Substring(i, str.Length - i); + names.Add(s1); + names.Add(s1.ToLower()); + names.Add(s1.ToUpper()); + names.Add(" " + s1); + names.Add(s1 + " "); + names.Add(" " + s1 + " "); + names.Add(s2); + names.Add(s2.ToLower()); + names.Add(s2.ToUpper()); + names.Add(" " + s2); + names.Add(s2 + " "); + names.Add(" " + s2 + " "); + } + return names; + } + + private static IEnumerable<string> GetAllPartialName() + { + return GetAllPartial(kName); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageSearchTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageSearchTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..734401dd37403fd44e46fb0c7e27fabcf2fd9c94 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageSearchTests.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 448aaa781aea44811a5d66e3edac37e4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageTests.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..a117fa0567a77efbe33cc4d2d1e061f9ac3e2ddd --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageTests.cs @@ -0,0 +1,521 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using NUnit.Framework; +using Semver; + +namespace UnityEditor.PackageManager.UI.Tests +{ + internal class PackageTests : PackageBaseTests + { + private Action<IAddOperation> OnAddOperation; + private Action<IRemoveOperation> OnRemoveOperation; + + // Package version to display + public PackageInfo Display(Package package) + { + return PackageCollection.Instance.Filter == PackageFilter.All || package.Current == null ? package.Latest : package.Current; + } + + [SetUp] + public void Setup() + { + PackageCollection.Instance.SetFilter(PackageFilter.Local); + } + + [TearDown] + public void TearDown() + { + Factory.ResetOperations(); + Factory.Packages = Enumerable.Empty<PackageInfo>(); + } + + [Test] + public void Constructor_WithNullPackageName_ThrowsException() + { + var packages = PackageSets.Instance.Many(kPackageTestName, 1, true); + Assert.Throws<ArgumentException>(() => + { + new Package(null, packages); + }); + } + + [Test] + public void Constructor_WithEmptyPackageName_ThrowsException() + { + var packages = PackageSets.Instance.Many(kPackageTestName, 1, true); + Assert.Throws<ArgumentException>(() => + { + new Package("", packages); + }); + } + + [Test] + public void Constructor_WithNullPackageInfos_ThrowsException() + { + Assert.Throws<ArgumentNullException>(() => + { + new Package(kPackageTestName, null); + }); + } + + [Test] + public void Constructor_WithEmptyPackageInfos_ThrowsException() + { + var packages = Enumerable.Empty<PackageInfo>(); + Assert.Throws<ArgumentException>(() => + { + new Package(kPackageTestName, packages); + }); + } + + [Test] + public void Constructor_WithOnePackageInfo_CurrentIsFirstVersion() + { + var packages = PackageSets.Instance.Many(kPackageTestName, 1, true); + var package = new Package(kPackageTestName, packages); + + Assert.AreEqual(package.Current, package.Versions.First()); + Assert.IsTrue(package.Current.IsCurrent); + } + + [Test] + public void Constructor_WithOnePackageInfo_LatestIsLastVersion() + { + var packages = PackageSets.Instance.Many(kPackageTestName, 1, true); + var package = new Package(kPackageTestName, packages); + + Assert.AreEqual(package.Latest, package.Versions.Last()); + Assert.IsTrue(package.Latest.IsCurrent); + } + + [Test] + public void Constructor_WithOnePackageInfo_LatestAndCurrentAreEqual() + { + var packages = PackageSets.Instance.Many(kPackageTestName, 1, true); + var package = new Package(kPackageTestName, packages); + + Assert.AreEqual(package.Current, package.Latest); + } + + [Test] + public void Constructor_WithTwoPackageInfos_CurrentIsFirstVersion() + { + var packages = PackageSets.Instance.Many(kPackageTestName, 2, true); + var package = new Package(kPackageTestName, packages); + + Assert.AreEqual(package.Current, package.Versions.First()); + Assert.IsTrue(package.Current.IsCurrent); + } + + [Test] + public void Constructor_WithTwoPackageInfos_LatestIsLastVersion() + { + var packages = PackageSets.Instance.Many(kPackageTestName, 2, true); + var package = new Package(kPackageTestName, packages); + + Assert.AreEqual(package.Latest, package.Versions.Last()); + Assert.IsFalse(package.Latest.IsCurrent); + } + + [Test] + public void Constructor_WithTwoPackagesInfo_LatestAndCurrentAreNotEqual() + { + var packages = PackageSets.Instance.Many(kPackageTestName, 2, true); + var package = new Package(kPackageTestName, packages); + + Assert.AreNotEqual(package.Current, package.Latest); + } + + [Test] + public void Constructor_WithMultiplePackagesInfo_VersionsCorrespond() + { + var packages = PackageSets.Instance.Many(kPackageTestName, 5, true); + var package = new Package(kPackageTestName, packages); + + Assert.AreEqual(packages, package.Versions); + } + + [Test] + public void Add_WhenPackageInfoIsCurrent_AddOperationIsNotCalled() + { + var packages = PackageSets.Instance.Many(kPackageTestName, 3, true); + Factory.Packages = packages; + var package = new Package(kPackageTestName, packages); + var addOperationCalled = false; + + OnAddOperation = operation => + { + addOperationCalled = true; + }; + + package.AddSignal.OnOperation += OnAddOperation; + package.Add(packages.First()); + package.AddSignal.OnOperation -= OnAddOperation; + + Assert.IsFalse(addOperationCalled); + } + + [Test] + public void Add_WhenPackageInfoIsNotCurrent_AddOperationIsCalled() + { + var packages = PackageSets.Instance.Many(kPackageTestName, 3, true); + Factory.Packages = packages; + Factory.AddOperation = new MockAddOperation(Factory, packages[1]); + var package = new Package(kPackageTestName, packages); + var addOperationCalled = false; + + OnAddOperation = operation => + { + addOperationCalled = true; + }; + + package.AddSignal.OnOperation += OnAddOperation; + package.Add(packages[1]); + package.AddSignal.OnOperation -= OnAddOperation; + + Assert.IsTrue(addOperationCalled); + } + [Test] + public void Update_WhenCurrentIsLatest_AddOperationIsNotCalled() + { + var packages = PackageSets.Instance.Many(kPackageTestName, 1, true); + Factory.Packages = packages; + var package = new Package(kPackageTestName, packages); + var addOperationCalled = false; + + OnAddOperation = operation => + { + addOperationCalled = true; + }; + + package.AddSignal.OnOperation += OnAddOperation; + package.Update(); + package.AddSignal.OnOperation -= OnAddOperation; + + Assert.IsFalse(addOperationCalled); + } + + [Test] + public void Update_WhenCurrentIsNotLatest_AddOperationIsCalled() + { + var packages = PackageSets.Instance.Many(kPackageTestName, 2, true); + Factory.Packages = packages; + Factory.AddOperation = new MockAddOperation(Factory, packages.Last()); + var package = new Package(kPackageTestName, packages); + var addOperationCalled = false; + + OnAddOperation = operation => + { + addOperationCalled = true; + }; + + package.AddSignal.OnOperation += OnAddOperation; + package.Update(); + package.AddSignal.OnOperation -= OnAddOperation; + + Assert.IsTrue(addOperationCalled); + } + + [Test] + public void Remove_RemoveOperationIsCalled() + { + var packages = PackageSets.Instance.Many(kPackageTestName, 1, true); + Factory.Packages = packages; + var package = new Package(kPackageTestName, packages); + var removeOperationCalled = false; + + OnRemoveOperation = operation => + { + removeOperationCalled = true; + }; + + package.RemoveSignal.OnOperation += OnRemoveOperation; + package.Remove(); + package.RemoveSignal.OnOperation -= OnRemoveOperation; + + Assert.IsTrue(removeOperationCalled); + } + + [Test] + public void IsPackageManagerUI_WhenPackageManagerUIPackage_ReturnsTrue() + { + var packages = new List<PackageInfo> + { + PackageSets.Instance.Single(PackageSource.Unknown, Package.packageManagerUIName, "1.0.0") + }; + var package = new Package(Package.packageManagerUIName, packages); + + Assert.IsTrue(package.IsPackageManagerUI); + } + + [Test] + public void IsPackageManagerUI_WhenNotPackageManagerUIPackage_ReturnsFalse() + { + var packages = PackageSets.Instance.Many(kPackageTestName, 1, true); + var package = new Package(kPackageTestName, packages); + + Assert.IsFalse(package.IsPackageManagerUI); + } + + [Test] + public void Name_ReturnsExpectedValue() + { + var packages = PackageSets.Instance.Many(kPackageTestName, 1, true); + var package = new Package(kPackageTestName, packages); + + Assert.AreEqual(kPackageTestName, package.Name); + } + + [Test] + public void Display_WhenCurrentIsNotNull_ReturnsCurrent() + { + var packages = PackageSets.Instance.Many(kPackageTestName, 2, true); + var package = new Package(kPackageTestName, packages); + + Assert.AreEqual(package.Current, Display(package)); + } + + [Test] + public void Display_WhenCurrentIsNull_ReturnsLatest() + { + var packages = PackageSets.Instance.Many(kPackageTestName, 2, true); + packages[0].IsCurrent = false; + var package = new Package(kPackageTestName, packages); + + Assert.AreEqual(package.Latest, Display(package)); + } + + [Test] + public void Display_WhenCurrentAndLatest_ReturnsLatest() + { + var packages = PackageSets.Instance.Many(kPackageTestName, 2, true); + packages[0].IsCurrent = false; + var package = new Package(kPackageTestName, packages); + var answer = packages.Max(x => x.Version); + + Assert.AreEqual(Display(package).Version, answer); + } + + [Test] + public void Versions_WhenOrderedPackageInfo_ReturnsOrderedValues() + { + var packages = PackageSets.Instance.Many(kPackageTestName, 5, true); + var package = new Package(kPackageTestName, packages); + + Assert.AreEqual(packages, package.Versions); + } + + [Test] + public void Versions_WhenUnorderedPackageInfo_ReturnsOrderedValues() + { + var packages = PackageSets.Instance.Many(kPackageTestName, 5, true); + packages[0].Version = new SemVersion(1); + packages[1].Version = new SemVersion(4); + packages[2].Version = new SemVersion(2); + packages[3].Version = new SemVersion(5); + packages[4].Version = new SemVersion(3); + + var orderPackages = packages.OrderBy(p => p.Version); + + var package = new Package(kPackageTestName, packages); + + Assert.AreEqual(orderPackages, package.Versions); + } + + // + // Version Comparison tests + // + private static string name = "test"; + + [Test] + public void VersionUpdate_Current_lessthen_Verified() + { + var package = new Package(name, new List<PackageInfo> + { + PackageSets.Instance.Single(PackageSource.Registry, name, "1.0.0", true), + PackageSets.Instance.Single(PackageSource.Registry, name, "2.0.0", false, true), // Verified + PackageSets.Instance.Single(PackageSource.Registry, name, "3.0.0", false) + }); + + Assert.IsTrue(package.LatestUpdate.Version == "2.0.0"); + } + + [Test] + public void VersionUpdate_Current_equalto_Verified() + { + var package = new Package(name, new List<PackageInfo> + { + PackageSets.Instance.Single(PackageSource.Registry, name, "2.0.0", true, true), // Verified + PackageSets.Instance.Single(PackageSource.Registry, name, "3.0.0", false) + }); + + Assert.IsTrue(package.LatestUpdate.Version == "2.0.0"); + } + + [Test] + public void VersionUpdate_Current_greaterthen_Verified() + { + var package = new Package(name, new List<PackageInfo> + { + PackageSets.Instance.Single(PackageSource.Registry, name, "3.0.0", true), + PackageSets.Instance.Single(PackageSource.Registry, name, "2.0.0", false, true), // Verified + }); + + Assert.IsTrue(package.LatestUpdate.Version == "3.0.0"); + } + + [Test] + public void VersionUpdate_Current_greaterthen_Verified_WithLatest() + { + var package = new Package(name, new List<PackageInfo> + { + PackageSets.Instance.Single(PackageSource.Registry, name, "3.0.0", true), + PackageSets.Instance.Single(PackageSource.Registry, name, "2.0.0", false, true), // Verified + PackageSets.Instance.Single(PackageSource.Registry, name, "4.0.0", false) + }); + + Assert.IsTrue(package.LatestUpdate.Version == "4.0.0"); + } + + [Test] + public void VersionUpdate_NoVerified_Current_lessthen_Latest() + { + var package = new Package(name, new List<PackageInfo> + { + PackageSets.Instance.Single(PackageSource.Registry, name, "1.0.0", true), + PackageSets.Instance.Single(PackageSource.Registry, name, "2.0.0", false), + PackageSets.Instance.Single(PackageSource.Registry, name, "3.0.0", false) + }); + + Assert.IsTrue(package.LatestUpdate.Version == "3.0.0"); + } + + [Test] + public void VersionUpdate_NoVerified_Current_equalto_Latest() + { + var package = new Package(name, new List<PackageInfo> + { + PackageSets.Instance.Single(PackageSource.Registry, name, "0.0.0", false), + PackageSets.Instance.Single(PackageSource.Registry, name, "1.0.0", true) + }); + + Assert.IsTrue(package.LatestUpdate.Version == "1.0.0"); + } + + [Test] + public void VersionUpdate_NoCurrent_WithVerified() + { + var package = new Package(name, new List<PackageInfo> + { + PackageSets.Instance.Single(PackageSource.Registry, name, "1.0.0", false, true), // verified + PackageSets.Instance.Single(PackageSource.Registry, name, "2.0.0", false) + }); + + Assert.IsTrue(package.LatestUpdate.Version == "1.0.0"); + } + + [Test] + public void VersionUpdate_NoCurrent_Latest() + { + var package = new Package(name, new List<PackageInfo> + { + PackageSets.Instance.Single(PackageSource.Registry, name, "1.0.0", false), + PackageSets.Instance.Single(PackageSource.Registry, name, "2.0.0", false) + }); + + Assert.IsTrue(package.LatestUpdate.Version == "2.0.0"); + } + + [Test] + public void VersionUpdate_NoCurrent_Latest_WithPreview() + { + var package = new Package(name, new List<PackageInfo> + { + PackageSets.Instance.Single(PackageSource.Registry, name, "1.0.0", false), + PackageSets.Instance.Single(PackageSource.Registry, name, "2.0.0", false), + PackageSets.Instance.Single(PackageSource.Registry, name, "3.0.0-preview", false) + }); + + Assert.IsTrue(package.LatestUpdate.Version == "2.0.0"); + } + + [Test] + public void VersionUpdate_NoCurrent_Verified_WithPreview() + { + var package = new Package(name, new List<PackageInfo> + { + PackageSets.Instance.Single(PackageSource.Registry, name, "1.0.0", false, true), // verified + PackageSets.Instance.Single(PackageSource.Registry, name, "2.0.0", false), + PackageSets.Instance.Single(PackageSource.Registry, name, "3.0.0-preview", false) + }); + + Assert.IsTrue(package.LatestUpdate.Version == "1.0.0"); + } + + [Test] + public void VersionUpdate_NoCurrent_OnlyPreviews() + { + var package = new Package(name, new List<PackageInfo> + { + PackageSets.Instance.Single(PackageSource.Registry, name, "1.0.0-preview", false), + PackageSets.Instance.Single(PackageSource.Registry, name, "2.0.0-preview", false) + }); + + Assert.IsTrue(package.LatestUpdate.Version == "2.0.0-preview"); + } + + [Test] + public void VersionUpdate_CurrentPreview_WithVerified() + { + var package = new Package(name, new List<PackageInfo> + { + PackageSets.Instance.Single(PackageSource.Registry, name, "1.0.0", false, true), // verified + PackageSets.Instance.Single(PackageSource.Registry, name, "2.0.0", false), + PackageSets.Instance.Single(PackageSource.Registry, name, "3.0.0-preview", true) // current + }); + + Assert.IsTrue(package.LatestUpdate.Version == "3.0.0-preview"); + } + + [Test] + public void VersionUpdate_CurrentPreview_WithLatestPreview() + { + var package = new Package(name, new List<PackageInfo> + { + PackageSets.Instance.Single(PackageSource.Registry, name, "1.0.0", false, true), // verified + PackageSets.Instance.Single(PackageSource.Registry, name, "2.0.0", false), + PackageSets.Instance.Single(PackageSource.Registry, name, "3.0.0-preview", true), // current + PackageSets.Instance.Single(PackageSource.Registry, name, "4.0.0-preview", false) + }); + + Assert.IsTrue(package.LatestUpdate.Version == "4.0.0-preview"); + } + + [Test] + public void VersionUpdate_CurrentPreview_WithLatestPreviewNoVerified() + { + var package = new Package(name, new List<PackageInfo> + { + PackageSets.Instance.Single(PackageSource.Registry, name, "1.0.0", false), + PackageSets.Instance.Single(PackageSource.Registry, name, "2.0.0", false), + PackageSets.Instance.Single(PackageSource.Registry, name, "3.0.0-preview", true), // current + PackageSets.Instance.Single(PackageSource.Registry, name, "4.0.0-preview", false) + }); + + Assert.IsTrue(package.LatestUpdate.Version == "4.0.0-preview"); + } + + [Test] + public void VersionUpdate_CurrentEmbedded() + { + var package = new Package(name, new List<PackageInfo> + { + PackageSets.Instance.Single(PackageSource.Embedded, name, "1.0.0", true), + PackageSets.Instance.Single(PackageSource.Registry, name, "2.0.0", false, true), // verified + }); + + Assert.IsTrue(package.LatestUpdate.Version == "1.0.0"); + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..5e884505e483cc66efa14cea07411f2f35adc6db --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Services/Packages/PackageTests.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 78e267bad6d564d49803ba3e9c13ff2e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/UI.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/UI.meta new file mode 100644 index 0000000000000000000000000000000000000000..d0b86000cbb236d9d8cb07799a9a3a6eb6fe17e5 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/UI.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 7b87dac66d6e74d5f848d26f169bbe89 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/UI/PackageDetailsTests.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/UI/PackageDetailsTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..eabf39fb01d4f71dc04622f1ccaeb82afd4b8d39 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/UI/PackageDetailsTests.cs @@ -0,0 +1,122 @@ +using System.Collections.Generic; +using System.Linq; +using UnityEngine.Experimental.UIElements; +using NUnit.Framework; + +namespace UnityEditor.PackageManager.UI.Tests +{ + internal class PackageDetailsTests : UITests<PackageManagerWindow> + { + [SetUp] + public void Setup() + { + PackageCollection.Instance.SetFilter(PackageFilter.Local); + PackageCollection.Instance.UpdatePackageCollection(true); + SetSearchPackages(Enumerable.Empty<PackageInfo>()); + SetListPackages(Enumerable.Empty<PackageInfo>()); + Factory.ResetOperations(); + } + + [Test] + public void Show_CorrectTag() + { + var packageInfo = PackageSets.Instance.Single(); + foreach (var tag in new List<string> + { + PackageTag.preview.ToString(), + PackageTag.verified.ToString(), + "usertag" // Any other unsupported tag a user might use + }) + { + packageInfo.IsVerified = PackageTag.verified.ToString() == tag; + packageInfo.Version = packageInfo.Version.Change(null, null, null, tag); + var package = new Package(packageInfo.Name, new List<PackageInfo> {packageInfo}); + var details = Container.Q<PackageDetails>("detailsGroup"); + details.SetPackage(package); + + // Check for every UI-supported tags that visibility is correct + Assert.IsTrue(UIUtils.IsElementVisible(details.GetTag(PackageTag.preview)) == packageInfo.IsPreview); + Assert.IsTrue(UIUtils.IsElementVisible(details.GetTag(PackageTag.verified)) == packageInfo.IsVerified); + Assert.IsTrue(UIUtils.IsElementVisible(details.GetTag(PackageTag.local)) == packageInfo.IsLocal); + Assert.IsTrue(UIUtils.IsElementVisible(details.GetTag(PackageTag.inDevelopment)) == packageInfo.IsInDevelopment); + } + } + + [Test] + public void Show_CorrectLabel_UpToDate() + { + SetListPackages(new List<PackageInfo> {PackageSets.Instance.Single(PackageSource.Registry, "name", "1.0.0", true)}); + + var details = Container.Q<PackageDetails>("detailsGroup"); + Assert.IsTrue(details.UpdateButton.text == PackageDetails.PackageActionVerbs[(int)PackageDetails.PackageAction.UpToDate]); + Assert.IsFalse(details.UpdateButton.enabledSelf); + Assert.IsTrue(details.VersionPopup.enabledSelf); + } + + [Test] + public void Show_CorrectLabel_Install() + { + SetListPackages(new List<PackageInfo> {PackageSets.Instance.Single(PackageSource.Registry, "name", "1.0.0", false)}); + + PackageCollection.Instance.SetFilter(PackageFilter.All); + + var details = Container.Q<PackageDetails>("detailsGroup"); + Assert.IsTrue(details.UpdateButton.text == PackageDetails.PackageActionVerbs[(int)PackageDetails.PackageAction.Add]); + Assert.IsTrue(details.UpdateButton.enabledSelf); + Assert.IsTrue(details.VersionPopup.enabledSelf); + } + + [Test] + public void Show_CorrectLabel_UpdateTo() + { + SetListPackages(new List<PackageInfo> + { + PackageSets.Instance.Single(PackageSource.Registry, "name", "1.0.0", true), + PackageSets.Instance.Single(PackageSource.Registry, "name", "2.0.0", false) + }); + + var details = Container.Q<PackageDetails>("detailsGroup"); + Assert.IsTrue(details.UpdateButton.text == PackageDetails.PackageActionVerbs[(int)PackageDetails.PackageAction.Update]); + Assert.IsTrue(details.UpdateButton.enabledSelf); + Assert.IsTrue(details.VersionPopup.enabledSelf); + } + + [Test] + public void Show_HideLabel_Embedded() + { + SetListPackages(new List<PackageInfo> + { + PackageSets.Instance.Single(PackageSource.Embedded, "name", "1.0.0", true), + PackageSets.Instance.Single(PackageSource.Registry, "name", "2.0.0", false) + }); + + var details = Container.Q<PackageDetails>("detailsGroup"); + Assert.IsFalse(details.UpdateBuiltIn.visible); + Assert.IsFalse(details.UpdateCombo.visible); + Assert.IsFalse(details.UpdateButton.visible); + } + + [Test] + public void Show_CorrectLabel_LocalFolder() + { + SetListPackages(new List<PackageInfo> {PackageSets.Instance.Single(PackageSource.Local, "name", "1.0.0")}); + + var details = Container.Q<PackageDetails>("detailsGroup"); + Assert.IsTrue(details.UpdateButton.text == PackageDetails.PackageActionVerbs[(int)PackageDetails.PackageAction.UpToDate]); + Assert.IsFalse(details.UpdateButton.enabledSelf); + Assert.IsTrue(details.VersionPopup.enabledSelf); + } + + [Test] + public void Show_CorrectLabel_Git() + { + SetListPackages(new List<PackageInfo> {PackageSets.Instance.Single(PackageSource.Git, "name", "1.0.0")}); + + var details = Container.Q<PackageDetails>("detailsGroup"); + Assert.IsTrue(details.UpdateButton.text == PackageDetails.PackageActionVerbs[(int)PackageDetails.PackageAction.Git]); + Assert.IsFalse(details.UpdateButton.enabledSelf); + Assert.IsFalse(details.VersionPopup.enabledSelf); + } + + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/UI/PackageDetailsTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/UI/PackageDetailsTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..15cc05a8ba96e97d961c9a1c84b69c578c6ba9a7 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/UI/PackageDetailsTests.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d028fbbad11524d13a069f495ddcf01c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/UI/PackageManagerWindowTests.cs b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/UI/PackageManagerWindowTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..a0562fce1902f41024af74c0a1e9ef5f625cb585 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/UI/PackageManagerWindowTests.cs @@ -0,0 +1,211 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using UnityEngine.Experimental.UIElements; +using NUnit.Framework; + +namespace UnityEditor.PackageManager.UI.Tests +{ + internal class PackageManagerWindowTests : UITests<PackageManagerWindow> + { + // Filter change shows correct result + private Action<IEnumerable<Package>> onPackageChangedEvent; // TODO: We need to have a discussion on event de-registration + private bool showPreviewPackagesPreviousValue; + + [SetUp] + public void Setup() + { + showPreviewPackagesPreviousValue = PackageManagerPrefs.ShowPreviewPackages; + PackageManagerPrefs.ShowPreviewPackages = true; + PackageCollection.Instance.SetFilter(PackageFilter.Local); + SetListPackages(Enumerable.Empty<PackageInfo>()); + SetSearchPackages(Enumerable.Empty<PackageInfo>()); + Factory.ResetOperations(); + } + + [TearDown] + public void TearDown() + { + PackageCollection.Instance.OnPackagesChanged -= onPackageChangedEvent; + PackageManagerPrefs.ShowPreviewPackages = showPreviewPackagesPreviousValue; + } + + [Test] + public void When_Default_FirstPackageUIElement_HasSelectedClass() + { + onPackageChangedEvent = packages => + { + var package = Container.Query(null, "package").First(); + + Assert.NotNull(package); + Assert.IsTrue(package.ClassListContains(PackageItem.SelectedClassName)); + }; + + PackageCollection.Instance.OnPackagesChanged += onPackageChangedEvent; + SetListPackages(PackageSets.Instance.Many(5, true)); + } + + [Test] + public void When_PackageCollection_Updates_PackageList_Updates() + { + var packages = PackageSets.Instance.Outdated(); + var current = packages.ToList().First(); + var latest = packages.ToList().Last(); + + SetListPackages(packages); + Factory.AddOperation = new MockAddOperation(Factory, latest); + + var package = PackageCollection.Instance.GetPackageByName(current.Name); + + onPackageChangedEvent = newpackages => + { + package = PackageCollection.Instance.GetPackageByName(current.Name); + + Assert.IsTrue(package.Current.PackageId == latest.PackageId); + + var packageItem = Container.Query(null, "package").Build().First(); + var label = packageItem.Q<Label>("packageName"); + var version = packageItem.Q<Label>("packageVersion"); + var state = packageItem.Q<Label>("packageState"); + var hasOutdatedClass = state.ClassListContains(PackageItem.GetIconStateId(PackageState.Outdated)); + Assert.IsTrue(latest.Name == string.Format("com.unity.{0}", label.text)); + Assert.IsTrue(latest.Version == version.text); + Assert.IsFalse(hasOutdatedClass); + }; + + package.AddSignal.OnOperation += operation => + { + operation.OnOperationSuccess += packageInfo => + { + PackageCollection.Instance.OnPackagesChanged += onPackageChangedEvent; + }; + }; + + package.Update(); + } + + [Test] + public void When_PackageCollection_Update_Fails_Package_Stay_Current() + { + var packages = PackageSets.Instance.Outdated(); + var current = packages.ToList().First(); + var latest = packages.ToList().Last(); + + SetListPackages(packages); + + var error = MakeError(ErrorCode.Unknown, "Fake error"); + Factory.AddOperation = new MockAddOperation(Factory, latest); + Factory.AddOperation.ForceError = error; + + var package = PackageCollection.Instance.GetPackageByName(current.Name); + + package.AddSignal.OnOperation += operation => + { + operation.OnOperationError += operationError => { Assert.IsTrue(error == operationError); }; + operation.OnOperationFinalized += () => + { + Assert.IsTrue(package.Current.PackageId == + current.PackageId); // Make sure package hasn't been upgraded + + var packageItem = Container.Query(null, "package").Build().First(); + var label = packageItem.Q<Label>("packageName"); + var version = packageItem.Q<Label>("packageVersion"); + var state = packageItem.Q<Label>("packageState"); + var hasErrorClass = state.ClassListContains(PackageItem.GetIconStateId(PackageState.Error)); + Assert.IsTrue(current.Name == string.Format("com.unity.{0}", label.text)); + Assert.IsTrue(current.Version == version.text); + Assert.IsTrue(hasErrorClass); + }; + }; + + package.Update(); + } + + [Test] + public void When_PackageCollection_Remove_PackageLists_Updated() + { + var packages = PackageSets.Instance.Many(5); + var current = packages.ToList().First(); + + SetListPackages(packages); + var package = PackageCollection.Instance.GetPackageByName(current.Name); + Assert.IsNotNull(package); + + onPackageChangedEvent = allPackages => + { + package = PackageCollection.Instance.GetPackageByName(current.Name); + Assert.IsNull(package); + }; + + PackageCollection.Instance.OnPackagesChanged += onPackageChangedEvent; + + package.Remove(); + PackageCollection.Instance.FetchListOfflineCache(true); + } + + [Test] + public void When_PackageCollection_Remove_Fails_PackageLists_NotUpdated() + { + var packages = PackageSets.Instance.Many(5); + var current = packages.ToList().First(); + + var error = MakeError(ErrorCode.Unknown, "Fake error"); + Factory.RemoveOperation = new MockRemoveOperation(Factory) {ForceError = error}; + SetListPackages(packages); + var package = PackageCollection.Instance.GetPackageByName(current.Name); + Assert.IsNotNull(package); + + package.RemoveSignal.OnOperation += operation => + { + operation.OnOperationError += operationError => { Assert.AreEqual(error, operationError); }; + operation.OnOperationFinalized += () => + { + package = PackageCollection.Instance.GetPackageByName(current.Name); + Assert.IsNotNull(package); + }; + }; + + package.Remove(); + } + + [Test] + public void When_Filter_Changes_Shows_Correct_List() + { + var packagesLocal = PackageSets.Instance.Many(2); + var packagesAll = PackageSets.Instance.Many(5); + + SetListPackages(packagesLocal); + SetSearchPackages(packagesAll); + + onPackageChangedEvent = packages => + { + foreach (var package in packagesAll) + { + Assert.IsTrue(packages.Any(updatePackage => updatePackage.Current == package)); + } + }; + + PackageCollection.Instance.OnPackagesChanged += onPackageChangedEvent; + + PackageCollection.Instance.SetFilter(PackageFilter.All); + } + + [Test] + public void ListPackages_UsesCache() + { + PackageCollection.Instance.SetFilter(PackageFilter.Local); // Set filter to use list + SetListPackages(PackageSets.Instance.Many(2)); + + Assert.IsTrue(PackageCollection.Instance.LatestListPackages.Any()); // Make sure packages are cached + } + + [Test] + public void SearchPackages_UsesCache() + { + PackageCollection.Instance.SetFilter(PackageFilter.All); // Set filter to use search + SetSearchPackages(PackageSets.Instance.Many(2)); + + Assert.IsTrue(PackageCollection.Instance.LatestSearchPackages.Any()); // Make sure packages are cached + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/UI/PackageManagerWindowTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/UI/PackageManagerWindowTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..487aa14cfed27b0b02321732937c56f457dd24e0 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/UI/PackageManagerWindowTests.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 063b1587caa4a47f396741f4e69d108c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Unity.PackageManagerUI.EditorTests.asmdef b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Unity.PackageManagerUI.EditorTests.asmdef new file mode 100644 index 0000000000000000000000000000000000000000..bc291f04367f834f9c473c91d3a5e5377783fab7 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Unity.PackageManagerUI.EditorTests.asmdef @@ -0,0 +1,13 @@ +{ + "name": "Unity.PackageManagerUI.EditorTests", + "references": [ + "Unity.PackageManagerUI.Editor" + ], + "optionalUnityReferences": [ + "TestAssemblies" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [] +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Unity.PackageManagerUI.EditorTests.asmdef.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Unity.PackageManagerUI.EditorTests.asmdef.meta new file mode 100644 index 0000000000000000000000000000000000000000..b59c94f88ff4b487dd685b73655ec24f7501b0c0 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Tests/Editor/Unity.PackageManagerUI.EditorTests.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5afb9687033af4bca957216add3fe854 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Third Party Notices.md b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Third Party Notices.md new file mode 100644 index 0000000000000000000000000000000000000000..dd76f73c89ba7a839ce7646d268e8023994dfc35 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Third Party Notices.md @@ -0,0 +1,7 @@ +This package contains third-party software components governed by the license(s) indicated below: + +Component Name: Semver + +License Type: "MIT" + +[SemVer License](https://github.com/maxhauser/semver/blob/master/License.txt) diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Third Party Notices.md.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Third Party Notices.md.meta new file mode 100644 index 0000000000000000000000000000000000000000..ad2d342683ea2afef24056e711e8363c2a53d991 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/Third Party Notices.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 536c0048c80e8407084e29942e15685b +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/package.json b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/package.json new file mode 100644 index 0000000000000000000000000000000000000000..4902ca76122d4048e2d9c695d1141580ff69f448 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/package.json @@ -0,0 +1,13 @@ +{ + "name": "com.unity.package-manager-ui", + "displayName": "Package Manager UI", + "version": "2.0.8", + "unity": "2018.3", + "description": "Use the Unity Package Manager user interface to manage a Project's packages and discover new packages.\n\nFor more information, click the 'View documentation' link above. ", + "dependencies": {}, + "repository": { + "type": "git", + "url": "git@github.cds.internal.unity3d.com:unity/com.unity.package-manager-ui.git", + "revision": "cf3d6baaa1e1750beae1757866ccd075239e89a3" + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/package.json.meta b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/package.json.meta new file mode 100644 index 0000000000000000000000000000000000000000..121ac00025cbdbd69a11bc20329fe4c02cce6761 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.package-manager-ui@2.0.8/package.json.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6d6f82a762acb4417b895d3babc790f9 +timeCreated: 1501782804 +licenseType: Pro +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/CHANGELOG.md b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..7f29e450a0fffd9fc21af7803f7302a482be16e6 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/CHANGELOG.md @@ -0,0 +1,13 @@ +[2.0.0] 2018-02-07 +Fixed issue with IAP_PURCHASING flag not set on project load + +[2.0.1] 2018-02-14 +Fixed issue where importing the asset store package would fail due to importer settings. + +[2.0.2] 2018-06-12 +Fixed issue where TypeLoadException occured while using "UnityEngine.Purchasing" because SimpleJson was not found. fogbugzId: 1035663/ + +[2.0.3] 2018-06-14 +Fixed issue related to 2.0.2 that caused new projects to not compile in the editor. +Engine dll is enabled for editor by default. +Removed meta data that disabled engine dll for windows store. diff --git a/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/CHANGELOG.md.meta b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/CHANGELOG.md.meta new file mode 100644 index 0000000000000000000000000000000000000000..d24120480e38d05690cd36ea988d26e0a0d936ba --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/CHANGELOG.md.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bb15697a279504a90b825c44dc355047 +timeCreated: 1518046607 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/Documentation.meta b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/Documentation.meta new file mode 100644 index 0000000000000000000000000000000000000000..5d83eb85d3628a1650aa73814e9cd6adb9e2d673 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/Documentation.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 30aa3194afbe44a72aa7ec76cb2bab8a +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/Documentation/IAP.md b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/Documentation/IAP.md new file mode 100644 index 0000000000000000000000000000000000000000..b64496cb805a00e622243351fa054007c7586530 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/Documentation/IAP.md @@ -0,0 +1,16 @@ +# Unity In-App Purchasing (IAP) + +Unity IAP makes it easy to implement in-app purchases in your application across the most popular App stores. + +Supported platforms include: + +* iOS App Store +* Mac App Store +* Google Play +* Universal Windows Platform +* Amazon Appstore +* Samsung Galaxy Apps +* Tizen Store +* CloudMoolah Store +* Facebook Gameroom +* Xiaomi Mi Game Pay \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/Documentation/IAP.md.meta b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/Documentation/IAP.md.meta new file mode 100644 index 0000000000000000000000000000000000000000..c58134d4ad641e5172cd9e91c5a2ef598acaea4f --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/Documentation/IAP.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: be4b06d1ee51e4ac2a01a0e499d4c214 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/Editor.meta b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/Editor.meta new file mode 100644 index 0000000000000000000000000000000000000000..fa8ed063d8208a2eb20d299785e405c03801e1aa --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d929147d9f78c487397abb40f2c257b0 +folderAsset: yes +timeCreated: 1492551707 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/Editor/UnityEditor.Purchasing.dll b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/Editor/UnityEditor.Purchasing.dll new file mode 100644 index 0000000000000000000000000000000000000000..de3e3b42a3fd6c1a5381e9c464334a0373845f21 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/Editor/UnityEditor.Purchasing.dll differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/Editor/UnityEditor.Purchasing.dll.meta b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/Editor/UnityEditor.Purchasing.dll.meta new file mode 100644 index 0000000000000000000000000000000000000000..a9664b7a0992aaa86e73952b74dcb6c0ce6d7097 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/Editor/UnityEditor.Purchasing.dll.meta @@ -0,0 +1,25 @@ +fileFormatVersion: 2 +guid: f1045c695c5bf4fb7b8509687bc60fc0 +timeCreated: 1492551710 +licenseType: Pro +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Any: + enabled: 0 + settings: {} + Editor: + enabled: 1 + settings: + DefaultValueInitialized: true + WindowsStoreApps: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/License.md b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/License.md new file mode 100644 index 0000000000000000000000000000000000000000..27c17ac40d9d229c9ba20d9aafa47f6c8cc820d7 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/License.md @@ -0,0 +1,32 @@ +**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/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/License.md.meta b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/License.md.meta new file mode 100644 index 0000000000000000000000000000000000000000..a183744e2ccfa1a3922a109a0a5b4c60a53603ab --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/License.md.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 65d58d50c3db54f979b1ffae3777d74b +timeCreated: 1504642585 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/README.md b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/README.md new file mode 100644 index 0000000000000000000000000000000000000000..bfc2ab8dd4693ba3753f4c12f35f39e5e5692696 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/README.md @@ -0,0 +1,9 @@ +# Unity In App Purchasing + +Implementation of the Unity In App Purchasing API. + +## Release Notes + +- Adding Readme file +- Adding local plugin importer callbacks. +- Removing Bintray references in package.json \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/README.md.meta b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/README.md.meta new file mode 100644 index 0000000000000000000000000000000000000000..8a63b28b760ef5bf39ea750a19e07ff3dbf2e927 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/README.md.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 90791303b72ec4ae198f99d637dfdf6c +timeCreated: 1493316726 +licenseType: Pro +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/UnityEngine.Purchasing.dll b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/UnityEngine.Purchasing.dll new file mode 100644 index 0000000000000000000000000000000000000000..2131fff7fbe6189291da0f4fc48d1d7a977fb238 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/UnityEngine.Purchasing.dll differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/UnityEngine.Purchasing.dll.meta b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/UnityEngine.Purchasing.dll.meta new file mode 100644 index 0000000000000000000000000000000000000000..ec8ee090943dd8efd827cf8250aa9eb03e76e366 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/UnityEngine.Purchasing.dll.meta @@ -0,0 +1,27 @@ +fileFormatVersion: 2 +guid: b5f4343795a0e4626ac1fe4a9e6fce59 +timeCreated: 1491256195 +licenseType: Pro +PluginImporter: + serializedVersion: 2 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 1 + platformData: + data: + first: + Any: + second: + enabled: 1 + settings: {} + data: + first: + Editor: Editor + second: + enabled: 1 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/package.json b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/package.json new file mode 100644 index 0000000000000000000000000000000000000000..55d9f7d8bb34e0c06cc297724b1e43e49f8925cc --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/package.json @@ -0,0 +1,13 @@ +{ + "name": "com.unity.purchasing", + "displayName": "In App Purchasing", + "version": "2.0.3", + "unity": "2018.1", + "description": "Unity IAP supports the iOS, Mac, tvOS, Google Play, Facebook Gameroom, Windows, Amazon, Samsung Galaxy, Tizen, Cloud Moolah MOO, Xiaomi Mi Game Pay App Stores.\n\nWith Unity IAP, setting up in-app purchases for your game across multiple app stores has never been easier.\n\nUse one common API to access all stores for free. With just a few lines of code, you can fully understand and optimize your in-game economy.\n\nUnity IAP automatically couples with Unity Analytics enabling you to monitor and act on trends in your revenue and purchase data across multiple platforms.\n\nIncludes client-side receipt validation for Apple, Google Play, and Xiaomi Mi Game Pay.", + "keywords": [ + "purchasing", + "iap", + "unity" + ], + "license" : "Unity Companion Package License v1.0" +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/package.json.meta b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/package.json.meta new file mode 100644 index 0000000000000000000000000000000000000000..c291d8550ce509106a6931700d7b70795154e538 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.purchasing@2.0.3/package.json.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 44f39a74ca5ee4bf5936b17e901f251c +timeCreated: 1491258786 +licenseType: Pro +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/.gitlab-ci.yml b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..45a43a13b1c3da8465033532dfcd0b56f2ad113f --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/.gitlab-ci.yml @@ -0,0 +1,12 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/CHANGELOG.md b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..ddd61f4cc80b27031583a8854033577f909e9954 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/CHANGELOG.md @@ -0,0 +1,171 @@ +# 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 + +## [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 <TextMeshPro> 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/CHANGELOG.md.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/CHANGELOG.md.meta new file mode 100644 index 0000000000000000000000000000000000000000..edf5c3279a498216ee712ad880e645fad22a7864 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/CHANGELOG.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 22464cf7ab0243a6bf9c79851183b002 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Documentation~/TextMeshPro.md b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Documentation~/TextMeshPro.md new file mode 100644 index 0000000000000000000000000000000000000000..8f8c09260fff39d097f546f8685648d5f6685e26 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Documentation~/TextMeshPro.md @@ -0,0 +1,35 @@ +# **_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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Documentation~/TextMeshPro.md.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Documentation~/TextMeshPro.md.meta new file mode 100644 index 0000000000000000000000000000000000000000..8c72f725584c84d05172be1292fa9cba7066f006 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Documentation~/TextMeshPro.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ca77d26d10b9455ca5a4b22c93be2a31 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources.meta new file mode 100644 index 0000000000000000000000000000000000000000..7c07b0070aa1530e77c0e1c8d371532570e82c65 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d1a0a27327b54c3bac52a08929c33f81 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos.meta new file mode 100644 index 0000000000000000000000000000000000000000..f2596c789ed19b773124bf37a109e8a38a63bfd7 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e93ec7eb6de342aabd156833e253f838 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Dropdown Icon.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Dropdown Icon.psd new file mode 100644 index 0000000000000000000000000000000000000000..93f5a2cba4edda006da1d1611ce610dfd6d1c55f Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Dropdown Icon.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Dropdown Icon.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Dropdown Icon.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..7bdb473e3d381d59d2d3fa9cd099abc5282b443b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Dropdown Icon.psd.meta @@ -0,0 +1,143 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Font Asset Icon.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Font Asset Icon.psd new file mode 100644 index 0000000000000000000000000000000000000000..2fb1164dc57a10989f156c22d43ac8e7fd4c71ed Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Font Asset Icon.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Font Asset Icon.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Font Asset Icon.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..bd64ad7dedaa00a257c3b10e7e0b16ca8a91dbe2 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Font Asset Icon.psd.meta @@ -0,0 +1,57 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Input Field Icon.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Input Field Icon.psd new file mode 100644 index 0000000000000000000000000000000000000000..f0360d349d07234742b64e274c4c2d6ae2d17554 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Input Field Icon.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Input Field Icon.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Input Field Icon.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..eb2e1ce240c7554dd178a963c60efcd77148ec8c --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Input Field Icon.psd.meta @@ -0,0 +1,57 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Sprite Asset Icon.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Sprite Asset Icon.psd new file mode 100644 index 0000000000000000000000000000000000000000..7036296ea5331b80315ac29da27250ee2ad38572 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Sprite Asset Icon.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Sprite Asset Icon.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Sprite Asset Icon.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..a22cdf1c9fe724c47d21221d3de38b94f56d4b13 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Sprite Asset Icon.psd.meta @@ -0,0 +1,57 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Text Component Icon.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Text Component Icon.psd new file mode 100644 index 0000000000000000000000000000000000000000..3cc41630a761fd8ff6f789a03b443350be9970c4 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Text Component Icon.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Text Component Icon.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Text Component Icon.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..623993d2f6b96cb8e28514da51e6d878a7717eab --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Gizmos/TMP - Text Component Icon.psd.meta @@ -0,0 +1,53 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Shaders.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Shaders.meta new file mode 100644 index 0000000000000000000000000000000000000000..95efe2ba9a8506a1a77a37beac403932c2b4681e --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Shaders.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2da27f5fe80a3a549ac7331d9f52f5f0 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Shaders/TMP_Properties.cginc b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Shaders/TMP_Properties.cginc new file mode 100644 index 0000000000000000000000000000000000000000..2e962588cf965bdfa3cf1e0fe578d2797b9342cd --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Shaders/TMP_Properties.cginc @@ -0,0 +1,85 @@ +// 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Shaders/TMP_Properties.cginc.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Shaders/TMP_Properties.cginc.meta new file mode 100644 index 0000000000000000000000000000000000000000..e6dcc0a08503a4c7bc7e3d00b3da0d77d588da6e --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Shaders/TMP_Properties.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3c6c403084eacec478a1129ce20061ea +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Shaders/TMP_SDF Internal SSD.shader b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Shaders/TMP_SDF Internal SSD.shader new file mode 100644 index 0000000000000000000000000000000000000000..7e28d7453c09c90162ebc02f653d61a7efa575b1 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Shaders/TMP_SDF Internal SSD.shader @@ -0,0 +1,126 @@ +// 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Shaders/TMP_SDF Internal SSD.shader.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Shaders/TMP_SDF Internal SSD.shader.meta new file mode 100644 index 0000000000000000000000000000000000000000..7845e119410058684a52474111a5585806a04663 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Shaders/TMP_SDF Internal SSD.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ce4ec0f498d1b1a4f90fe94e115b6f9a +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures.meta new file mode 100644 index 0000000000000000000000000000000000000000..d6754b05dc2ffa15b75c1d4d8a521e9c1d517275 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f8e6a2d47aba4c6c9b3c5a72d9f48da5 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/SectionHeader_Dark.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/SectionHeader_Dark.psd new file mode 100644 index 0000000000000000000000000000000000000000..8ebaa27aa4aa698b57764149516a0fbdf37dcba2 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/SectionHeader_Dark.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/SectionHeader_Dark.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/SectionHeader_Dark.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..ed7250a7b0c27494b2fa2f99804fcddd858bfe4a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/SectionHeader_Dark.psd.meta @@ -0,0 +1,53 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/SectionHeader_Light.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/SectionHeader_Light.psd new file mode 100644 index 0000000000000000000000000000000000000000..e598e6d9575f5dafc1c76950e476469c2cf580b6 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/SectionHeader_Light.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/SectionHeader_Light.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/SectionHeader_Light.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..1e747b22af0c6f8636038ff231d89d427f57ec7e --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/SectionHeader_Light.psd.meta @@ -0,0 +1,53 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignBaseLine.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignBaseLine.psd new file mode 100644 index 0000000000000000000000000000000000000000..3da358a124a74236076524bcc158c646d9004205 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignBaseLine.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignBaseLine.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignBaseLine.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..09deb3c829638e2ed28336d6078e5cb8ad690f09 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignBaseLine.psd.meta @@ -0,0 +1,53 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignBaseLine_Light.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignBaseLine_Light.psd new file mode 100644 index 0000000000000000000000000000000000000000..cf49b6cb024072d87361899040ef58f45cf43679 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignBaseLine_Light.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignBaseLine_Light.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignBaseLine_Light.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..78e14cbacd30e080dd0ad45445cb0bacb9c7861b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignBaseLine_Light.psd.meta @@ -0,0 +1,53 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignBottom.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignBottom.psd new file mode 100644 index 0000000000000000000000000000000000000000..1f35779e7b6a348c682fc7b90c9c64217c8a2dd8 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignBottom.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignBottom.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignBottom.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..8e79b489d68784417fc78df1732a1ad9c8516e9e --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignBottom.psd.meta @@ -0,0 +1,53 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignBottom_Light.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignBottom_Light.psd new file mode 100644 index 0000000000000000000000000000000000000000..d8af55bdf7fb23f0a6426ece47a055c00662a81c Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignBottom_Light.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignBottom_Light.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignBottom_Light.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..9c9a6fc01f2f314760a1c8254956a790e8e797a2 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignBottom_Light.psd.meta @@ -0,0 +1,53 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCapLine.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCapLine.psd new file mode 100644 index 0000000000000000000000000000000000000000..7eefe6b2e535cce1ec014aed5919d728044e8fbb Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCapLine.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCapLine.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCapLine.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..0455a2fc9e5f2dd449d136fec836c512956dfcb0 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCapLine.psd.meta @@ -0,0 +1,58 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCapLine_Light.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCapLine_Light.psd new file mode 100644 index 0000000000000000000000000000000000000000..f08bb6cecccd3eb5ae47f40377c6ef52b6e144e1 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCapLine_Light.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCapLine_Light.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCapLine_Light.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..dfd05a11e35e9928a758d26fd099ef47e3c4c174 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCapLine_Light.psd.meta @@ -0,0 +1,58 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCenter.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCenter.psd new file mode 100644 index 0000000000000000000000000000000000000000..939bc6dc3e3671e679fb9cb52efba8601852cbe8 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCenter.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCenter.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCenter.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..d189fc277c7cac8ddd057b89cfa1ac1bb779007f --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCenter.psd.meta @@ -0,0 +1,53 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCenterGeo.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCenterGeo.psd new file mode 100644 index 0000000000000000000000000000000000000000..f9ce9a8b3455eda1d2ade85749fee73100ca5d40 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCenterGeo.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCenterGeo.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCenterGeo.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..555bb1bb15a46992d2a90f0807dfbb865f18bc84 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCenterGeo.psd.meta @@ -0,0 +1,56 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCenterGeo_Light.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCenterGeo_Light.psd new file mode 100644 index 0000000000000000000000000000000000000000..e37b2e2558d13363f395557e913458dd1a3bb77a Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCenterGeo_Light.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCenterGeo_Light.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCenterGeo_Light.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..044d0c2176b7e74a14ac6b52e5ec63b7baaac694 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCenterGeo_Light.psd.meta @@ -0,0 +1,56 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCenter_Light.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCenter_Light.psd new file mode 100644 index 0000000000000000000000000000000000000000..7274887f0002217dd1850f641074a743563db700 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCenter_Light.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCenter_Light.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCenter_Light.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..d98d37720a2fb5e497aa76382223d62fa8cc0ecc --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignCenter_Light.psd.meta @@ -0,0 +1,53 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignFlush.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignFlush.psd new file mode 100644 index 0000000000000000000000000000000000000000..eeeea67be6eb648c505085d768dac6b56afa16a1 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignFlush.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignFlush.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignFlush.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..84ed28c0341cba3bc642a65c8e47ebc24785e633 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignFlush.psd.meta @@ -0,0 +1,53 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignFlush_Light.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignFlush_Light.psd new file mode 100644 index 0000000000000000000000000000000000000000..b69f6a2eff7afcfee728011a5ecf733083dbc325 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignFlush_Light.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignFlush_Light.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignFlush_Light.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..b9e61247bf84da5b9e8ed0398506d749274a4775 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignFlush_Light.psd.meta @@ -0,0 +1,53 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignJustified.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignJustified.psd new file mode 100644 index 0000000000000000000000000000000000000000..3ce55c4960e080920c0239406c7c2e8ec98c47bf Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignJustified.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignJustified.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignJustified.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..f8a90b4244340e5534802c5db9442c6716c889fd --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignJustified.psd.meta @@ -0,0 +1,59 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignJustified_Light.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignJustified_Light.psd new file mode 100644 index 0000000000000000000000000000000000000000..d7fd5c82cffbea742f63d50527777d8a1e88cd25 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignJustified_Light.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignJustified_Light.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignJustified_Light.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..e5b5aa85cd550a06e5734ab72179cf578be31c42 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignJustified_Light.psd.meta @@ -0,0 +1,59 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignLeft.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignLeft.psd new file mode 100644 index 0000000000000000000000000000000000000000..fc7e10b254cfe51ed074203cc581660612922d46 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignLeft.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignLeft.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignLeft.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..8023379e81edc16e59a9aae61d33c0817c7b3e8a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignLeft.psd.meta @@ -0,0 +1,53 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignLeft_Light.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignLeft_Light.psd new file mode 100644 index 0000000000000000000000000000000000000000..5522c37387e5c5cc571a7465c74276af6f7af043 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignLeft_Light.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignLeft_Light.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignLeft_Light.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..aaa8b81d80b003b0ba78ab6ab03097428120abe2 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignLeft_Light.psd.meta @@ -0,0 +1,53 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignMidLine.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignMidLine.psd new file mode 100644 index 0000000000000000000000000000000000000000..14d28a2d0c17a8776abd98e4515c12b4bc135fce Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignMidLine.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignMidLine.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignMidLine.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..e481463b26aab30cc4885147bf6dc3e4e331e1f1 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignMidLine.psd.meta @@ -0,0 +1,58 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignMiddle.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignMiddle.psd new file mode 100644 index 0000000000000000000000000000000000000000..c4483dbd6e6375d5d966095afd5375c5b8089967 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignMiddle.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignMiddle.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignMiddle.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..d1ec5285c54c557ebda8175f0d53f9fa1315d1f7 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignMiddle.psd.meta @@ -0,0 +1,53 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignMiddle_Light.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignMiddle_Light.psd new file mode 100644 index 0000000000000000000000000000000000000000..4263bf9b3cf5c760ddfffdefc453ffbaac1848fe Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignMiddle_Light.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignMiddle_Light.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignMiddle_Light.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..7cda20b74a59f28b621405d3d0f8c6146c7a8a99 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignMiddle_Light.psd.meta @@ -0,0 +1,53 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignMidline_Light.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignMidline_Light.psd new file mode 100644 index 0000000000000000000000000000000000000000..a5bed37158b92f2d109d4625bbe21e4088fa5ab5 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignMidline_Light.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignMidline_Light.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignMidline_Light.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..6fabec54843e798d82dd08c8d83615b2f610e6d5 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignMidline_Light.psd.meta @@ -0,0 +1,58 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignRight.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignRight.psd new file mode 100644 index 0000000000000000000000000000000000000000..4ef1998b6ed24472f2dcaaaa747ef6f32de292d8 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignRight.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignRight.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignRight.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..cf5c7649cdf5033ff2857d34152c538f70f7b93d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignRight.psd.meta @@ -0,0 +1,53 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignRight_Light.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignRight_Light.psd new file mode 100644 index 0000000000000000000000000000000000000000..bdeff41364cfc18e989fb22c200fb614d8c4b803 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignRight_Light.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignRight_Light.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignRight_Light.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..dab7997c64359a9f89556c027a4205be33dda2cf --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignRight_Light.psd.meta @@ -0,0 +1,53 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignTop.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignTop.psd new file mode 100644 index 0000000000000000000000000000000000000000..b00d45855e41f442a81d79d77fe498520adf4a79 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignTop.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignTop.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignTop.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..74931bf8462c256a676d6b672ef61d90aa4ef529 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignTop.psd.meta @@ -0,0 +1,53 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignTop_Light.psd b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignTop_Light.psd new file mode 100644 index 0000000000000000000000000000000000000000..84f0e61cf5b5e9e6b414b1cc20922f2d12328e52 Binary files /dev/null and b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignTop_Light.psd differ diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignTop_Light.psd.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignTop_Light.psd.meta new file mode 100644 index 0000000000000000000000000000000000000000..bbd509d1aaabd3df146bd9a8dedb71492b031153 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Editor Resources/Textures/btn_AlignTop_Light.psd.meta @@ -0,0 +1,53 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/LICENSE.md b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/LICENSE.md new file mode 100644 index 0000000000000000000000000000000000000000..37d06155d67e2862e239016747838b6512fef1bf --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/LICENSE.md @@ -0,0 +1,5 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/LICENSE.md.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/LICENSE.md.meta new file mode 100644 index 0000000000000000000000000000000000000000..1df9555612ae4aecd27ce4fa31ad08c028937d1e --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/LICENSE.md.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0d2d0f36e67d4518a07df76235e91f9a +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Package Resources.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Package Resources.meta new file mode 100644 index 0000000000000000000000000000000000000000..e8a96b823c24afe4b5089d2906a8a7554672b016 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Package Resources.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5ec95f4d5b2d1f14e9ff8682562553f9 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Package Resources/TMP Essential Resources.unitypackage.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Package Resources/TMP Essential Resources.unitypackage.meta new file mode 100644 index 0000000000000000000000000000000000000000..bc49ab305d547db63e9add43995d7b88bf0a5a92 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Package Resources/TMP Essential Resources.unitypackage.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ce4ff17ca867d2b48b5c8a4181611901 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Package Resources/TMP Examples & Extras.unitypackage.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Package Resources/TMP Examples & Extras.unitypackage.meta new file mode 100644 index 0000000000000000000000000000000000000000..aaf21f78b8aa4cbc973af27d83ce46a3b9a5ec57 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Package Resources/TMP Examples & Extras.unitypackage.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bc00e25696e4132499f56528d3fed2e3 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/PackageConversionData.json b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/PackageConversionData.json new file mode 100644 index 0000000000000000000000000000000000000000..05c193e25059da0e3c570449447b52b36f41227f --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/PackageConversionData.json @@ -0,0 +1,654 @@ +{ + "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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/PackageConversionData.json.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/PackageConversionData.json.meta new file mode 100644 index 0000000000000000000000000000000000000000..a7a2790c1bf2e2c662651e8447c67d9080ea3fab --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/PackageConversionData.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 05f5bfd584002f948982a1498890f9a9 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/PackageConversionData_Assets.json b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/PackageConversionData_Assets.json new file mode 100644 index 0000000000000000000000000000000000000000..f07aa23f47b7b3aad1f13cd15da25ba6fd635983 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/PackageConversionData_Assets.json @@ -0,0 +1,184 @@ +{ + "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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/PackageConversionData_Assets.json.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/PackageConversionData_Assets.json.meta new file mode 100644 index 0000000000000000000000000000000000000000..f534ac147b17212033d6f36030d7fe2e3e37ba37 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/PackageConversionData_Assets.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0e0afa652c0031c48896a97b424d027b +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts.meta new file mode 100644 index 0000000000000000000000000000000000000000..3c2e4cf7e5433b91523c27a75a2f1f251b7a8b16 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: e6a1d1e3d2384453a7371b4a07a41ca4 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor.meta new file mode 100644 index 0000000000000000000000000000000000000000..af509a3a7dcb9a28a355b1af4fc1d3df204d05b4 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b5d6c28ed7b94775be9e2560f300247c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/DropdownOptionListDrawer.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/DropdownOptionListDrawer.cs new file mode 100644 index 0000000000000000000000000000000000000000..2b7dc854af8dd5a7677ec3fcdb910c0644458d60 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/DropdownOptionListDrawer.cs @@ -0,0 +1,60 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/DropdownOptionListDrawer.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/DropdownOptionListDrawer.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..f7f4c565bc4c83f5f475df15fc187e279ed907a8 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/DropdownOptionListDrawer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 9545c9eb3bf94265810463794fec8334 +timeCreated: 1464818008 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/GlyphInfoDrawer.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/GlyphInfoDrawer.cs new file mode 100644 index 0000000000000000000000000000000000000000..0936dc755127369af84145ae024407d2f23c6f24 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/GlyphInfoDrawer.cs @@ -0,0 +1,61 @@ +/* +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: <color=#FFFF80>" + prop_id.intValue + "</color>"), TMP_UIStyleManager.label); + EditorGUI.LabelField(new Rect(rect.x + 90f, rect.y, 80f, 18), new GUIContent("Hex: <color=#FFFF80>" + prop_id.intValue.ToString("X") + "</color>"), TMP_UIStyleManager.label); + EditorGUI.LabelField(new Rect(rect.x + 170f, rect.y, 80, 18), "Char: [ <color=#FFFF80>" + (char)prop_id.intValue + "</color> ]", 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/GlyphInfoDrawer.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/GlyphInfoDrawer.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..10ed151e71a4e6c938f06f75939abf502efe5f07 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/GlyphInfoDrawer.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 900f1a451c764dc3bdcc0de815a15935 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/GlyphMetricsPropertyDrawer.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/GlyphMetricsPropertyDrawer.cs new file mode 100644 index 0000000000000000000000000000000000000000..1e1f4d18c58ffba54b37f0956abd93a8b3232fa1 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/GlyphMetricsPropertyDrawer.cs @@ -0,0 +1,53 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/GlyphMetricsPropertyDrawer.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/GlyphMetricsPropertyDrawer.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..d91f5791bb6c75f6791da253da7c6d45b92bce7b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/GlyphMetricsPropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: e3882522a08b6f5459b4dea6f8791278 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/GlyphRectPropertyDrawer.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/GlyphRectPropertyDrawer.cs new file mode 100644 index 0000000000000000000000000000000000000000..87ecf0cc6c36127f34cd758479f6ec54d83f08f8 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/GlyphRectPropertyDrawer.cs @@ -0,0 +1,44 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/GlyphRectPropertyDrawer.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/GlyphRectPropertyDrawer.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..93232794c3faf41acc98ed77d4d70d9c62a57f87 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/GlyphRectPropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 8bc2b083b068f3546a9509c805e0541c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_BaseEditorPanel.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_BaseEditorPanel.cs new file mode 100644 index 0000000000000000000000000000000000000000..c4a55bafc2c1221892dd290e7f8acada682db371 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_BaseEditorPanel.cs @@ -0,0 +1,1116 @@ +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 <color> 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 <color> and <font>."); + 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 <sprite=\"Sprite Asset Name\">."); + + 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; + } + } + + /// <summary> + /// Method to retrieve the material presets that match the currently selected font asset. + /// </summary> + 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_BaseEditorPanel.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_BaseEditorPanel.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..87bd7391e6e5dd1ba979677d11703fa0045e870b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_BaseEditorPanel.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 91950f78729ab144aa36e94690b28fad +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_BaseShaderGUI.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_BaseShaderGUI.cs new file mode 100644 index 0000000000000000000000000000000000000000..ed87b504c0f5d44fb64d9114c7558352741f5380 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_BaseShaderGUI.cs @@ -0,0 +1,534 @@ +using UnityEngine; +using UnityEditor; + +namespace TMPro.EditorUtilities +{ + /// <summary>Base class for TextMesh Pro shader GUIs.</summary> + public abstract class TMP_BaseShaderGUI : ShaderGUI + { + /// <summary>Representation of a #pragma shader_feature.</summary> + /// <description>It is assumed that the first feature option is for no keyword (underscores).</description> + protected class ShaderFeature + { + public string undoLabel; + + public GUIContent label; + + /// <summary>The keyword labels, for display. Include the no-keyword as the first option.</summary> + public GUIContent[] keywordLabels; + + /// <summary>The shader keywords. Exclude the no-keyword option.</summary> + 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(); + } + + /// <summary>Override this method to create the specific shader GUI.</summary> + protected abstract void DoGUI(); + + static string[] s_PanelStateLabel = new string[] { "\t- <i>Click to collapse</i> -", "\t- <i>Click to expand</i> -" }; + + 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<TMP_Text>(); + 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_BaseShaderGUI.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_BaseShaderGUI.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..f07bd856c562c49c438346398adb61605cca57f0 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_BaseShaderGUI.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 438efd46088d408d8a53f707fa68d976 +timeCreated: 1469844810 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_BitmapShaderGUI.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_BitmapShaderGUI.cs new file mode 100644 index 0000000000000000000000000000000000000000..d35d539272b8524877c3bac6870db66c270316b8 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_BitmapShaderGUI.cs @@ -0,0 +1,85 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_BitmapShaderGUI.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_BitmapShaderGUI.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..6d0e0529cc79f1e17fa2b59c66c8bd0ad6b37ddb --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_BitmapShaderGUI.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 806de5a9211448c8b65c8435ebb48dd4 +timeCreated: 1469998850 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_CharacterPropertyDrawer.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_CharacterPropertyDrawer.cs new file mode 100644 index 0000000000000000000000000000000000000000..c1f5fb9993e7eea7a04c83b92fec50c0afc48477 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_CharacterPropertyDrawer.cs @@ -0,0 +1,237 @@ +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: <color=#FFFF80>0x" + unicode.ToString("X") + "</color>"), style); + EditorGUI.LabelField(new Rect(rect.x + 115, rect.y, 120f, 18), unicode <= 0xFFFF ? new GUIContent("UTF16: <color=#FFFF80>\\u" + unicode.ToString("X4") + "</color>") : new GUIContent("UTF32: <color=#FFFF80>\\U" + unicode.ToString("X8") + "</color>"), style); + EditorGUI.LabelField(new Rect(rect.x, rect.y + 18, 120, 18), new GUIContent("Glyph ID: <color=#FFFF80>" + prop_GlyphIndex.intValue + "</color>"), style); + EditorGUI.LabelField(new Rect(rect.x, rect.y + 36, 80, 18), new GUIContent("Scale: <color=#FFFF80>" + prop_Scale.floatValue + "</color>"), 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_CharacterPropertyDrawer.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_CharacterPropertyDrawer.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..3bf78921f57d358f10c275a3c3b1d84f639a5a35 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_CharacterPropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 01ada73c4792aba4c937ff5d92cce866 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_ColorGradientAssetMenu.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_ColorGradientAssetMenu.cs new file mode 100644 index 0000000000000000000000000000000000000000..ccfd3676f06598de0b6bf110e07383718dcef8c2 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_ColorGradientAssetMenu.cs @@ -0,0 +1,51 @@ +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<TMP_ColorGradient>(); + + // Create Asset + AssetDatabase.CreateAsset(colorGradient, filePath); + + //EditorUtility.SetDirty(colorGradient); + + AssetDatabase.SaveAssets(); + + AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(colorGradient)); + + EditorUtility.FocusProjectWindow(); + Selection.activeObject = colorGradient; + + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_ColorGradientAssetMenu.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_ColorGradientAssetMenu.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..a2201ee6d57c0d1fb7ee5d258e46d340f4581abb --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_ColorGradientAssetMenu.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: d9647b571c5e44729b71d756b3d55317 +timeCreated: 1468187791 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_ColorGradientEditor.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_ColorGradientEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..4dddbfb0334e76daf8fc2df446d3d87d43717d97 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_ColorGradientEditor.cs @@ -0,0 +1,146 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_ColorGradientEditor.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_ColorGradientEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..dc58116c1ae29c6bcd2205d23e7accc00c4c7117 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_ColorGradientEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: fcc60c1d6bb544d9b712b652f418ff3a +timeCreated: 1468400050 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_DropdownEditor.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_DropdownEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..b8e96135a987506a9de6bbadc72d40d102559a64 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_DropdownEditor.cs @@ -0,0 +1,51 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_DropdownEditor.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_DropdownEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..75030cfdb37b15b98862a6ca4a275fa928a3a4d9 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_DropdownEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6dbcf248c987476181a37f01a1814975 +timeCreated: 1446377461 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_EditorCoroutine.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_EditorCoroutine.cs new file mode 100644 index 0000000000000000000000000000000000000000..e0056039ec73663e2365be4e198b2713cf577694 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_EditorCoroutine.cs @@ -0,0 +1,96 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEditor; +using UnityEngine; + + +namespace TMPro.EditorUtilities +{ + /// <summary> + /// Simple implementation of coroutine working in the Unity Editor. + /// </summary> + public class TMP_EditorCoroutine + { + //private static Dictionary<int, EditorCoroutine> s_ActiveCoroutines; + + readonly IEnumerator coroutine; + + /// <summary> + /// Constructor + /// </summary> + /// <param name="routine"></param> + TMP_EditorCoroutine(IEnumerator routine) + { + this.coroutine = routine; + } + + + /// <summary> + /// Starts a new EditorCoroutine. + /// </summary> + /// <param name="newCoroutine">Coroutine</param> + /// <returns>new EditorCoroutine</returns> + 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<int, EditorCoroutine>(); + + // Add new instance of editor coroutine to dictionary. + //s_ActiveCoroutines.Add(coroutine.GetHashCode(), coroutine); + + return coroutine; + } + + + /// <summary> + /// Clear delegate list + /// </summary> + //public static void StopAllEditorCoroutines() + //{ + // EditorApplication.update = null; + //} + + + /// <summary> + /// Register callback for editor updates + /// </summary> + void Start() + { + EditorApplication.update += EditorUpdate; + } + + + /// <summary> + /// Unregister callback for editor updates. + /// </summary> + public void Stop() + { + if (EditorApplication.update != null) + EditorApplication.update -= EditorUpdate; + + //s_ActiveCoroutines.Remove(this.GetHashCode()); + } + + + /// <summary> + /// Delegate function called on editor updates. + /// </summary> + 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_EditorCoroutine.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_EditorCoroutine.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..16e03fa8f63e7636066122f9dba90c8662a4bea6 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_EditorCoroutine.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 27a0335dab59ec542aadd6636a5b4ebd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_EditorPanel.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_EditorPanel.cs new file mode 100644 index 0000000000000000000000000000000000000000..bf961c6d0137e2acc5a42873ce4f7e5c0d25745a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_EditorPanel.cs @@ -0,0 +1,153 @@ +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<Renderer>(); + } + + 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<TextMeshPro>() == 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_EditorPanel.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_EditorPanel.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..54fd804878cea2f9d4e4c945b3c1eb47d7138aaa --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_EditorPanel.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 34f6695d37a94370a3697f6b068f5d5e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_EditorUtility.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_EditorUtility.cs new file mode 100644 index 0000000000000000000000000000000000000000..a2ac7a02a52d5c1dc82fb497acf0fefec54ddc0c --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_EditorUtility.cs @@ -0,0 +1,452 @@ +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 + { + /// <summary> + /// Returns the relative path of the package. + /// </summary> + public static string packageRelativePath + { + get + { + if (string.IsNullOrEmpty(m_PackagePath)) + m_PackagePath = GetPackageRelativePath(); + + return m_PackagePath; + } + } + [SerializeField] + private static string m_PackagePath; + + /// <summary> + /// Returns the fully qualified path of the package. + /// </summary> + 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(); + } + + + /// <summary> + /// Create and return a new asset in a smart location based on the current selection and then select it. + /// </summary> + /// <param name="name"> + /// Name of the new asset. Do not include the .asset extension. + /// </param> + /// <returns> + /// The new asset. + /// </returns> + public static T CreateAsset<T>(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<T>(); + 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<Material> refs = new List<Material>(); + 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<Material>(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<TMP_FontAsset>(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; + } + + + /// <summary> + /// Method to validate the location of the asset folder by making sure the GUISkins folder exists. + /// </summary> + /// <param name="paths"></param> + /// <returns></returns> + 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; + } + + + /// <summary> + /// Function which returns a string containing a sequence of Decimal character ranges. + /// </summary> + /// <param name="characterSet"></param> + /// <returns></returns> + 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; + } + + + /// <summary> + /// Function which returns a string containing a sequence of Unicode (Hex) character ranges. + /// </summary> + /// <param name="characterSet"></param> + /// <returns></returns> + 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; + } + + + /// <summary> + /// + /// </summary> + /// <param name="rect"></param> + /// <param name="thickness"></param> + /// <param name="color"></param> + 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); + } + + + /// <summary> + /// Function to return the horizontal alignment grid value. + /// </summary> + /// <param name="value"></param> + /// <returns></returns> + 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; + } + + /// <summary> + /// Function to return the vertical alignment grid value. + /// </summary> + /// <param name="value"></param> + /// <returns></returns> + 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()) + { + Color color; + + if (ColorUtility.TryParseHtmlString(colorString, out 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_EditorUtility.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_EditorUtility.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..5088b1bd52bc57a1b9a842bd6eb884fd2c32513f --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_EditorUtility.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 2300e75732d74890b38a8ff257a3ae15 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_FontAssetEditor.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_FontAssetEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..65541ce9b06435d2c81f0181b1603dc59593a39a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_FontAssetEditor.cs @@ -0,0 +1,1718 @@ +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; + } + + /// <summary> + /// Material used to display SDF glyphs in the Character and Glyph tables. + /// </summary> + 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; + + /// <summary> + /// Material used to display Bitmap glyphs in the Character and Glyph tables. + /// </summary> + 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[] { "<i>(Click to collapse)</i> ", "<i>(Click to expand)</i> " }; + 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 = "<i>New Unicode (Hex)</i>"; + private string m_unicodeHexLabel = k_placeholderUnicodeHex; + private const string k_placeholderGlyphID = "<i>New Glyph ID</i>"; + 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<int> m_GlyphSearchList; + + private string m_CharacterSearchPattern; + private List<int> m_CharacterSearchList; + + private string m_KerningTableSearchPattern; + private List<int> 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<TMP_SerializedPropertyHolder>(); + 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<int>(); + m_KerningTableSearchList = new List<int>(); + } + + + 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("<b>Face Info</b> - 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("<b>Generation Settings</b>"), 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("<b>Atlas & Material</b>"), 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("<b>Font Weights</b>", "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("<b>Fallback Font Assets</b>", "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("<b>Character Table</b>", "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("<b>Glyph Table</b>", "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; + int dstGlyphID; + + // Convert Hex Value to Decimal + int.TryParse(m_dstGlyphID, out 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("<b>Glyph Adjustment Table</b>", "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; + } + + TMP_Character character; + + // Add glyphs and characters + uint firstCharacter = m_SerializedPropertyHolder.firstCharacter; + if (!m_fontAsset.characterLookupTable.ContainsKey(firstCharacter)) + m_fontAsset.TryAddCharacterInternal(firstCharacter, out character); + + uint secondCharacter = m_SerializedPropertyHolder.secondCharacter; + if (!m_fontAsset.characterLookupTable.ContainsKey(secondCharacter)) + m_fontAsset.TryAddCharacterInternal(secondCharacter, out 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 <color=#ffff00>exists!</color>", 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; + } + + + /// <summary> + /// + /// </summary> + /// <param name="srcGlyphID"></param> + /// <param name="dstGlyphID"></param> + 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; + } + + /// <summary> + /// + /// </summary> + /// <param name="glyphID"></param> + 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(); + } + + /// <summary> + /// + /// </summary> + /// <param name="srcGlyph"></param> + /// <param name="dstGlyph"></param> + 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; + } + + + /// <summary> + /// + /// </summary> + /// <param name="searchPattern"></param> + /// <returns></returns> + void SearchGlyphTable (string searchPattern, ref List<int> searchResults) + { + if (searchResults == null) searchResults = new List<int>(); + + 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<int> searchResults) + { + if (searchResults == null) searchResults = new List<int>(); + + 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<int> searchResults) + { + if (searchResults == null) searchResults = new List<int>(); + + searchResults.Clear(); + + // Lookup glyph index of potential characters contained in the search pattern. + uint firstGlyphIndex = 0; + TMP_Character firstCharacterSearch; + + if (searchPattern.Length > 0 && m_fontAsset.characterLookupTable.TryGetValue(searchPattern[0], out firstCharacterSearch)) + firstGlyphIndex = firstCharacterSearch.glyphIndex; + + uint secondGlyphIndex = 0; + TMP_Character secondCharacterSearch; + + if (searchPattern.Length > 1 && m_fontAsset.characterLookupTable.TryGetValue(searchPattern[1], out 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_FontAssetEditor.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_FontAssetEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..9b26bae55b2d1c733424ee0598111d6a32a60427 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_FontAssetEditor.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 96b44f7d98314b139324a8a87eb66067 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_FontAsset_CreationMenu.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_FontAsset_CreationMenu.cs new file mode 100644 index 0000000000000000000000000000000000000000..1e432331e9efa8c212b6cf3dca3c0f081e2269e5 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_FontAsset_CreationMenu.cs @@ -0,0 +1,190 @@ +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<TMP_FontAsset>(); + 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<GlyphRect>() { new GlyphRect(0, 0, atlasWidth - packingModifier, atlasHeight - packingModifier) }; + fontAsset.m_UsedGlyphRects = new List<GlyphRect>(); + + // 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<TMP_FontAsset>(); + 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<GlyphRect>() { new GlyphRect(0, 0, atlasWidth - packingModifier, atlasHeight - packingModifier) }; + fontAsset.usedGlyphRects = new List<GlyphRect>(); + + // 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_FontAsset_CreationMenu.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_FontAsset_CreationMenu.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..57a3fceaed423dfd13d04cca49b58fa8fef53d23 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_FontAsset_CreationMenu.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7496af95dfe67cf429ac65edaaf99106 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_GlyphPairAdjustmentRecordPropertyDrawer.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_GlyphPairAdjustmentRecordPropertyDrawer.cs new file mode 100644 index 0000000000000000000000000000000000000000..fd4eb3ea8cf4722e6296929ffa9b8372cc4f41a7 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_GlyphPairAdjustmentRecordPropertyDrawer.cs @@ -0,0 +1,384 @@ +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: <color=#FFFF80>" + prop_FirstGlyphIndex.intValue + "</color>"), 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: <color=#FFFF80>" + prop_SecondGlyphIndex.intValue + "</color>"), 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; + + Glyph glyph; + + // Check if glyph currently exists in the atlas texture. + if (!fontAsset.glyphLookupTable.TryGetValue(glyphIndex, out 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_GlyphPairAdjustmentRecordPropertyDrawer.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_GlyphPairAdjustmentRecordPropertyDrawer.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..b95203f5b931f9103fc6d070758a717079cec009 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_GlyphPairAdjustmentRecordPropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: d256fa541faf5d4409992c631adb98a1 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_GlyphPropertyDrawer.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_GlyphPropertyDrawer.cs new file mode 100644 index 0000000000000000000000000000000000000000..b92dfd66f50c9fc39f1e7aa5325cd71bf9067a2d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_GlyphPropertyDrawer.cs @@ -0,0 +1,118 @@ + 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: <color=#FFFF80>" + prop_GlyphIndex.intValue + "</color>"), 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: <color=#FFFF80>" + prop_Scale.floatValue + "</color>"), 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: <color=#FFFF80>" + prop_AtlasIndex.intValue + "</color>"), 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_GlyphPropertyDrawer.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_GlyphPropertyDrawer.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..ce08447f90e879b599e8a4f0dc8ea87a79f50e0c --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_GlyphPropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: c4777500b5da6094e956c3d4f04de4db +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_InputFieldEditor.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_InputFieldEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..d50dc585bb172158cac111073457d56a551c2e3a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_InputFieldEditor.cs @@ -0,0 +1,283 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_InputFieldEditor.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_InputFieldEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..eeb62d8c1808c9b813526274f0056d12d2600021 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_InputFieldEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: aa160f27c3fe4052a5850e21108811b6 +timeCreated: 1457861621 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_MeshRendererEditor.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_MeshRendererEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..83d19f8c8c6e60eec63e610e33fecd4efd58339b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_MeshRendererEditor.cs @@ -0,0 +1,76 @@ +// 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<TMP_Text>(); + + 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_MeshRendererEditor.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_MeshRendererEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..d6b133fd967b6c072bde40b29150070c59557179 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_MeshRendererEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6d437b997e074079b4b2f6e395394f4b +timeCreated: 1462864011 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_PackageUtilities.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_PackageUtilities.cs new file mode 100644 index 0000000000000000000000000000000000000000..364c4e72ef11c450d65cc4482e6b08909d52966e --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_PackageUtilities.cs @@ -0,0 +1,919 @@ +using UnityEngine; +using UnityEditor; +using System; +using System.IO; +using System.Linq; +using System.Collections; +using System.Collections.Generic; +using System.Threading; +using TMPro.EditorUtilities; + + +namespace TMPro +{ + /// <summary> + /// 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. + /// </summary> + [System.Serializable] + struct AssetConversionRecord + { + public string referencedResource; + public string target; + public string replacement; + } + + + /// <summary> + /// 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. + /// </summary> + [System.Serializable] + class AssetConversionData + { + public List<AssetConversionRecord> 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<TMP_ProjectConversionUtility>(); + window.titleContent = new GUIContent("Conversion Tool"); + window.Focus(); + } + + private static HashSet<Type> m_IgnoreAssetTypes = new HashSet<Type>() + { + 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), + }; + + /// <summary> + /// + /// </summary> + 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 = "<color=#FFFF80><b>Project Scan Results</b></color>\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<AssetModificationRecord> m_ModifiedAssetList = new List<AssetModificationRecord>(); + + + 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 <i>Scan Project Files</i> 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 <i>Save Modified Project Files</i> button will update the files in the <i>Project Scan Results</i> listed above. <color=#FFFF80>Please make sure that you have created a backup of your project first</color> 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(); + } + + + /// <summary> + /// Limits the minimum size of the editor window. + /// </summary> + void SetEditorWindowSize() + { + EditorWindow editorWindow = this; + + Vector2 currentWindowSize = editorWindow.minSize; + + editorWindow.minSize = new Vector2(Mathf.Max(640, currentWindowSize.x), Mathf.Max(420, currentWindowSize.y)); + } + + + /// <summary> + /// + /// </summary> + /// <param name="filePath"></param> + /// <returns></returns> + 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<AssetConversionData>(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 = "<b>Phase 1 - Filtering:</b> "; + m_ScanningTotalFiles = guids.Length; + m_ScanningCurrentFileIndex = 0; + + List<AssetFileRecord> projectFilesToScan = new List<AssetFileRecord>(); + + 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 = "<b>Phase 2 - Scanning:</b> "; + + for (int i = 0; i < m_ScanningTotalFiles; i++) + { + if (m_CancelScanProcess) + break; + + AssetFileRecord fileRecord = projectFilesToScan[i]; + + ThreadPool.QueueUserWorkItem(Task => + { + 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"; + } + } + + + /// <summary> + /// + /// </summary> + private static void ResetScanProcess() + { + m_IsAlreadyScanningProject = false; + m_ScanningCurrentFileName = string.Empty; + m_ProgressPercentage = 0; + m_ScanningCurrentFileIndex = 0; + m_ScanningTotalFiles = 0; + } + + + /// <summary> + /// + /// </summary> + 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; + } + + + /// <summary> + /// Check project Asset Serialization and Source Control modes + /// </summary> + 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(); + } + + + /// <summary> + /// + /// </summary> + [MenuItem("Window/TextMeshPro/Import TMP Essential Resources", false, 2050)] + public static void ImportProjectResourcesMenu() + { + ImportProjectResources(); + } + + + /// <summary> + /// + /// </summary> + [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 + ")."); + } + + + /// <summary> + /// + /// </summary> + private static void ImportExtraContent() + { + string packageFullPath = EditorUtilities.TMP_EditorUtility.packageFullPath; + + AssetDatabase.ImportPackage(packageFullPath + "/Package Resources/TMP Examples & Extras.unitypackage", true); + } + + + /// <summary> + /// + /// </summary> + private static void ImportProjectResources() + { + string packageFullPath = EditorUtilities.TMP_EditorUtility.packageFullPath; + + AssetDatabase.ImportPackage(packageFullPath + "/Package Resources/TMP Essential Resources.unitypackage", true); + } + + + /// <summary> + /// + /// </summary> + 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<AssetRemappingRecord> assetRecords = new List<AssetRemappingRecord>(); + + // 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<AssetConversionRecord>(); + + // 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(); + } + + + /// <summary> + /// + /// </summary> + 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<AssetModificationRecord> modifiedAssetList = new List<AssetModificationRecord>(); + + // Read Conversion Data from Json file. + AssetConversionData conversionData = JsonUtility.FromJson<AssetConversionData>(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(); + } + + + /// <summary> + /// + /// </summary> + /// <returns></returns> + 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; + } + + + /// <summary> + /// Change project asset serialization mode to ForceText (if necessary) + /// </summary> + 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"; + } + + + /// <summary> + /// Revert potential change to asset serialization mode (if necessary) + /// </summary> + 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_PackageUtilities.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_PackageUtilities.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..e03778ccaf81840f8deaef1b29ec32b4572a7371 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_PackageUtilities.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 68eedd4e5b33b37429c02c4add0036fe +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_PostBuildProcessHandler.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_PostBuildProcessHandler.cs new file mode 100644 index 0000000000000000000000000000000000000000..a8b800ac50ff1c9022f427507a0bef345d8f6d15 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_PostBuildProcessHandler.cs @@ -0,0 +1,63 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_PostBuildProcessHandler.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_PostBuildProcessHandler.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..af212b86231e110dc160e217619ed36fa23b6251 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_PostBuildProcessHandler.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6fdea2af3daa40fe8f88e5e9cfc17abb +timeCreated: 1479886230 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_ProjectTextSettings.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_ProjectTextSettings.cs new file mode 100644 index 0000000000000000000000000000000000000000..b8695be2f09d2f72aae956ed51e99f06ebce7a4a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_ProjectTextSettings.cs @@ -0,0 +1,43 @@ +#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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_ProjectTextSettings.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_ProjectTextSettings.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..6d194543082906d812c0acc61b684fb92cd61e88 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_ProjectTextSettings.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0e751e877ed14d71a6b8e63ac54949cf +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_ResourcesLoader.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_ResourcesLoader.cs new file mode 100644 index 0000000000000000000000000000000000000000..090bd7747c7cdc281c36fa2994e83997800e8336 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_ResourcesLoader.cs @@ -0,0 +1,68 @@ +using UnityEditor; +using UnityEngine; +using System.Collections; + +namespace TMPro.EditorUtilities +{ + + //[InitializeOnLoad] + class TMP_ResourcesLoader + { + + /// <summary> + /// Function to pre-load the TMP Resources + /// </summary> + 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_ResourcesLoader.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_ResourcesLoader.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..8b322e2fb1dc75e92f4134dd2566fc5176976889 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_ResourcesLoader.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 7241c7dc25374fc1a6ab3ef9da79c363 +timeCreated: 1465441092 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SDFShaderGUI.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SDFShaderGUI.cs new file mode 100644 index 0000000000000000000000000000000000000000..2728f26f2c75601b960b379dcf2e8dc554b623db --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SDFShaderGUI.cs @@ -0,0 +1,442 @@ +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<Renderer>(); + 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SDFShaderGUI.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SDFShaderGUI.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..c643afa13989210f6c0ea7a6eb21d6ccc607b362 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SDFShaderGUI.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8413ca0e506d42a1a4bd9769f204ad16 +timeCreated: 1469844718 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SerializedPropertyHolder.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SerializedPropertyHolder.cs new file mode 100644 index 0000000000000000000000000000000000000000..2ba34d69cd04130d0a2318837db00117067f9aa8 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SerializedPropertyHolder.cs @@ -0,0 +1,14 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SerializedPropertyHolder.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SerializedPropertyHolder.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..cde31db91833cfaaf90f6debf68649cb424fc44f --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SerializedPropertyHolder.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9c4a050f089abb04ebd4125e419f4548 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SettingsEditor.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SettingsEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..571c9cd3414004d52cbd7266ed7a76fb4d0d4945 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SettingsEditor.cs @@ -0,0 +1,341 @@ +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 <sprite> 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>("TMP Settings"); + } + + [SettingsProviderGroup] + static SettingsProvider[] CreateTMPSettingsProvider() + { + var providers = new List<SettingsProvider> { new TMP_ResourceImporterProvider() }; + + if (GetTMPSettings() != null) + { + var provider = new AssetSettingsProvider("Project/TextMesh Pro/Settings", GetTMPSettings); + provider.PopulateSearchKeywordsFromGUIContentProperties<TMP_SettingsEditor.Styles>(); + providers.Add(provider); + } + + return providers.ToArray(); + } + } +#endif +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SettingsEditor.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SettingsEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..a719ae77400d8625a06aedefbfd4f5cb54c987da --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SettingsEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0386b6eb838c47138cd51d1c1b879a35 +timeCreated: 1436658550 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteAssetEditor.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteAssetEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..4df588ef7769980f1d252bf6f21a4ad5ba7bb78b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteAssetEditor.cs @@ -0,0 +1,896 @@ +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[] { "<i>(Click to collapse)</i> ", "<i>(Click to expand)</i> " }; + + int m_moveToIndex; + int m_selectedElement = -1; + int m_CurrentCharacterPage; + int m_CurrentGlyphPage; + + const string k_UndoRedo = "UndoRedoPerformed"; + + string m_CharacterSearchPattern; + List<int> m_CharacterSearchList; + bool m_IsCharacterSearchDirty; + + string m_GlyphSearchPattern; + List<int> 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("<b>Sprite Character Table</b>", "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("<b>Sprite Glyph Table</b>", "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; + + } + + + /// <summary> + /// + /// </summary> + /// <param name="arraySize"></param> + /// <param name="itemsPerPage"></param> + 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; + } + + + /// <summary> + /// Method to update the properties of all sprites + /// </summary> + /// <param name="property"></param> + /// <param name="value"></param> + 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; + } + + + /// <summary> + /// Swap the sprite item at the currently selected array index to another index. + /// </summary> + /// <param name="selectedIndex">Selected index.</param> + /// <param name="newIndex">New index.</param> + void SwapCharacterElements(int selectedIndex, int newIndex) + { + m_SpriteCharacterTableProperty.MoveArrayElement(selectedIndex, newIndex); + m_selectedElement = newIndex; + m_IsCharacterSearchDirty = true; + m_SpriteAsset.m_IsSpriteAssetLookupTablesDirty = true; + } + + /// <summary> + /// Move Sprite Element at selected index to another index and reorder sprite list. + /// </summary> + /// <param name="selectedIndex"></param> + /// <param name="newIndex"></param> + 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. + } + + /// <summary> + /// + /// </summary> + /// <param name="selectedIndex"></param> + /// <param name="newIndex"></param> + void SwapGlyphElements(int selectedIndex, int newIndex) + { + m_SpriteGlyphTableProperty.MoveArrayElement(selectedIndex, newIndex); + m_selectedElement = newIndex; + m_IsGlyphSearchDirty = true; + m_SpriteAsset.m_IsSpriteAssetLookupTablesDirty = true; + } + + /// <summary> + /// Move Sprite Element at selected index to another index and reorder sprite list. + /// </summary> + /// <param name="selectedIndex"></param> + /// <param name="newIndex"></param> + 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. + } + + + /// <summary> + /// + /// </summary> + /// <param name="source"></param> + /// <param name="target"></param> + 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; + } + + + /// <summary> + /// + /// </summary> + /// <param name="searchPattern"></param> + /// <returns></returns> + void SearchCharacterTable(string searchPattern, ref List<int> searchResults) + { + if (searchResults == null) searchResults = new List<int>(); + 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<int> searchResults) + { + if (searchResults == null) searchResults = new List<int>(); + 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteAssetEditor.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteAssetEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..9fcede3317cbd9b427931f4a145d018bc2f7c067 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteAssetEditor.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: b09be1f217d34247af54863a2f5587e1 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteAssetImporter.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteAssetImporter.cs new file mode 100644 index 0000000000000000000000000000000000000000..dc4f09323f11c1e3ed1e5d307aacff71346404b4 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteAssetImporter.cs @@ -0,0 +1,232 @@ +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<TMP_SpriteAssetImporter>(); + 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<TMP_Sprite> m_SpriteInfoList = new List<TMP_Sprite>(); + + + 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<TexturePacker.SpriteDataObject>(m_JsonFile.text); + + if (sprites != null && sprites.frames != null && sprites.frames.Count > 0) + { + int spriteCount = sprites.frames.Count; + + // Update import results + m_CreationFeedback = "<b>Import Results</b>\n--------------------\n"; + m_CreationFeedback += "<color=#C0ffff><b>" + spriteCount + "</b></color> 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; + } + + + /// <summary> + /// + /// </summary> + List<TMP_Sprite> CreateSpriteInfoList(TexturePacker.SpriteDataObject spriteDataObject) + { + List<TexturePacker.SpriteData> importedSprites = spriteDataObject.frames; + + List<TMP_Sprite> spriteInfoList = new List<TMP_Sprite>(); + + 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; + } + + + /// <summary> + /// + /// </summary> + /// <param name="filePath"></param> + 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<TMP_SpriteAsset>(); + 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); + } + + + /// <summary> + /// Create and add new default material to sprite asset. + /// </summary> + /// <param name="spriteAsset"></param> + 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); + } + + + /// <summary> + /// Limits the minimum size of the editor window. + /// </summary> + 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteAssetImporter.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteAssetImporter.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..d60763a5477775138e93fca88b85068714a4cf35 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteAssetImporter.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f1ea944dcf8849ebab391e461b99ccb7 +timeCreated: 1480023525 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteAssetMenu.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteAssetMenu.cs new file mode 100644 index 0000000000000000000000000000000000000000..5155e1a1305db424101b032fb8dcc5a00bfde643 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteAssetMenu.cs @@ -0,0 +1,329 @@ +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<TMP_SpriteGlyph> spriteGlyphTable = spriteAsset.spriteGlyphTable; + + // Finding available glyph indexes to insert new glyphs into. + var tempGlyphTable = spriteGlyphTable.OrderBy(glyph => glyph.index).ToList(); + List<uint> availableGlyphIndexes = new List<uint>(); + + 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<TMP_SpriteAsset>(); + 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<TMP_SpriteGlyph> spriteGlyphTable = new List<TMP_SpriteGlyph>(); + List<TMP_SpriteCharacter> spriteCharacterTable = new List<TMP_SpriteCharacter>(); + + 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<TMP_SpriteCharacter> spriteCharacterTable, ref List<TMP_SpriteGlyph> 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); + } + } + + + /// <summary> + /// Create and add new default material to sprite asset. + /// </summary> + /// <param name="spriteAsset"></param> + 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<TMP_Sprite> 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteAssetMenu.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteAssetMenu.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..850ab1f227c4f7d505ba4719580a466d5328cad4 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteAssetMenu.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 1048a87135154606808bf2030da32d18 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteCharacterPropertyDrawer.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteCharacterPropertyDrawer.cs new file mode 100644 index 0000000000000000000000000000000000000000..855fcd1e2a741042cc581ecb35b69bd0d172dcd7 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteCharacterPropertyDrawer.cs @@ -0,0 +1,228 @@ +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) + { + int spriteCharacterIndex; + + // Sprite Character Index + int.TryParse(property.displayName.Split(' ')[1], out spriteCharacterIndex); + EditorGUI.LabelField(new Rect(rect.x, rect.y, 75f, 18), new GUIContent("Index: <color=#FFFF80>" + spriteCharacterIndex + "</color>"), style); + + EditorGUI.LabelField(new Rect(rect.x + 75f, rect.y, 120f, 18), new GUIContent("Unicode: <color=#FFFF80>0x" + prop_SpriteUnicode.intValue.ToString("X") + "</color>"), style); + EditorGUI.LabelField(new Rect(rect.x + 195f, rect.y, rect.width - 255, 18), new GUIContent("Name: <color=#FFFF80>" + prop_SpriteName.stringValue + "</color>"), style); + + EditorGUI.LabelField(new Rect(rect.x, rect.y + 18, 120, 18), new GUIContent("Glyph ID: <color=#FFFF80>" + prop_SpriteGlyphIndex.intValue + "</color>"), style); + + // Draw Sprite Glyph (if exists) + DrawSpriteGlyph(position, property); + + EditorGUI.LabelField(new Rect(rect.x, rect.y + 36, 80, 18), new GUIContent("Scale: <color=#FFFF80>" + prop_SpriteScale.floatValue + "</color>"), style); + } + else // Display editable fields + { + // Get a reference to the underlying Sprite Asset + TMP_SpriteAsset spriteAsset = property.serializedObject.targetObject as TMP_SpriteAsset; + int spriteCharacterIndex; + + // Sprite Character Index + int.TryParse(property.displayName.Split(' ')[1], out spriteCharacterIndex); + + EditorGUI.LabelField(new Rect(rect.x, rect.y, 75f, 18), new GUIContent("Index: <color=#FFFF80>" + spriteCharacterIndex + "</color>"), 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteCharacterPropertyDrawer.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteCharacterPropertyDrawer.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..0733749d9b7fe344b4053ca58fdee482e8eb3b4b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteCharacterPropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 37cff9f5a86ae494c8cb04423580480d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteGlyphPropertyDrawer.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteGlyphPropertyDrawer.cs new file mode 100644 index 0000000000000000000000000000000000000000..db9c70ede442d3c874598a5880363c50f4d0f511 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteGlyphPropertyDrawer.cs @@ -0,0 +1,94 @@ +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 spriteCharacterIndex; + + int.TryParse(property.displayName.Split(' ')[1], out spriteCharacterIndex); + 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: <color=#FFFF80>" + prop_GlyphIndex.intValue + "</color>"), 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteGlyphPropertyDrawer.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteGlyphPropertyDrawer.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..0414562606aef434c980e8da06fa508892199369 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SpriteGlyphPropertyDrawer.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 056819c66570ca54cadb72330a354050 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_StyleAssetMenu.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_StyleAssetMenu.cs new file mode 100644 index 0000000000000000000000000000000000000000..0ae9c386d2121ef7f3044c7bf961b586f03c1c2a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_StyleAssetMenu.cs @@ -0,0 +1,49 @@ +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<TMP_StyleSheet>(); + + AssetDatabase.CreateAsset(styleSheet, filePathWithName); + + EditorUtility.SetDirty(styleSheet); + + AssetDatabase.SaveAssets(); + } + } + +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_StyleAssetMenu.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_StyleAssetMenu.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..cb44dc277cf599a6fa95c4078e127b335ac88aa7 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_StyleAssetMenu.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 23a562f2cac6401f9f91251c68a1a794 +timeCreated: 1432690168 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_StyleSheetEditor.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_StyleSheetEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..2e7f6de8e0f85803946bc7af0e011ae73253fee2 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_StyleSheetEditor.cs @@ -0,0 +1,278 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_StyleSheetEditor.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_StyleSheetEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..a3bff26f94e3e45acf47c64cbe562dec5019d0ef --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_StyleSheetEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 34e2c9b9d9e44953933afe37461f44e6 +timeCreated: 1432683777 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SubMeshUI_Editor.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SubMeshUI_Editor.cs new file mode 100644 index 0000000000000000000000000000000000000000..1cbea769f6811a7c231dd2c1900104b01f7f6da3 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SubMeshUI_Editor.cs @@ -0,0 +1,98 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SubMeshUI_Editor.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SubMeshUI_Editor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..b82410e56bd7b536dbd99b78c11f8350ed3f216d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SubMeshUI_Editor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6b01141ed8f74d198965c86f25eb7040 +timeCreated: 1452757501 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SubMesh_Editor.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SubMesh_Editor.cs new file mode 100644 index 0000000000000000000000000000000000000000..b5a3cc7cf7353bdedc5b6e3537d799bd970dbf75 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SubMesh_Editor.cs @@ -0,0 +1,76 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SubMesh_Editor.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SubMesh_Editor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..fd4713b34da0ca727a795666279730fa66da62d5 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_SubMesh_Editor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: dd2fe74169b54bf58fca17288513ef38 +timeCreated: 1456189048 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_TextAlignmentDrawer.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_TextAlignmentDrawer.cs new file mode 100644 index 0000000000000000000000000000000000000000..dbb271c534a444d990fda99ffe569b236299f6da --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_TextAlignmentDrawer.cs @@ -0,0 +1,119 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_TextAlignmentDrawer.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_TextAlignmentDrawer.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..a68a27392770e2e9864c00257caa1b565f62a856 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_TextAlignmentDrawer.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: c55a64c7570474f47a94abe39ebfef04 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_UIStyleManager.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_UIStyleManager.cs new file mode 100644 index 0000000000000000000000000000000000000000..0a94a99781ff643bab660114e85425cb09662d2d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_UIStyleManager.cs @@ -0,0 +1,134 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_UIStyleManager.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_UIStyleManager.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..9c09bfa39360d9ce2e1a83bc53fda2820be3fb55 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_UIStyleManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 30a939dce2fd4073955f2f20e659d506 +timeCreated: 1426454127 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_UiEditorPanel.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_UiEditorPanel.cs new file mode 100644 index 0000000000000000000000000000000000000000..87181650da4a1c984b644546e3ed59d23c396c08 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_UiEditorPanel.cs @@ -0,0 +1,91 @@ +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<Graphic>(); + 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<TextMeshProUGUI>() == 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_UiEditorPanel.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_UiEditorPanel.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..ea3b36b3d32458936434b6e114d5de9833d37eaa --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMP_UiEditorPanel.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 21c0044a7f964773be90d197a78e4703 +timeCreated: 1443571501 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_ContextMenus.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_ContextMenus.cs new file mode 100644 index 0000000000000000000000000000000000000000..8d65b706bf9541f215c417eaad65dc9034eaf2f6 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_ContextMenus.cs @@ -0,0 +1,341 @@ +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<TMP_Text>(); + if (textObject != null) + { + textObject.fontSharedMaterial = duplicate; + } + else + { + TMP_SubMesh subMeshObject = Selection.activeGameObject.GetComponent<TMP_SubMesh>(); + + if (subMeshObject != null) + subMeshObject.sharedMaterial = duplicate; + else + { + TMP_SubMeshUI subMeshUIObject = Selection.activeGameObject.GetComponent<TMP_SubMeshUI>(); + + 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<CanvasRenderer>().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<CanvasRenderer>().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<CanvasRenderer>().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); + } + + /// <summary> + /// + /// </summary> + /// <param name="command"></param> + [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); + } + } + + + /// <summary> + /// Clear Font Asset Data + /// </summary> + /// <param name="command"></param> + [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<Font>(importer.assetPath); + + if (sourceFontFile) + TMPro_FontAssetCreatorWindow.ShowFontAtlasCreatorWindow(sourceFontFile); + } + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_ContextMenus.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_ContextMenus.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..f16753fe04ed97ae25206041cef44baf268cf65c --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_ContextMenus.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 44e1d646473a40178712cb2150f54cec +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_CreateObjectMenu.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_CreateObjectMenu.cs new file mode 100644 index 0000000000000000000000000000000000000000..eaf84e3ba036225f085717eb0604cb58ee4901c8 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_CreateObjectMenu.cs @@ -0,0 +1,313 @@ +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 + { + + /// <summary> + /// Create a TextMeshPro object that works with the Mesh Renderer + /// </summary> + /// <param name="command"></param> + [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>(); + 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; + } + + + /// <summary> + /// Create a TextMeshPro object that works with the CanvasRenderer + /// </summary> + /// <param name="command"></param> + [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<TMP_Text>(); + 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<TMP_Text>(); + 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<Sprite>(kStandardSpritePath); + s_StandardResources.background = AssetDatabase.GetBuiltinExtraResource<Sprite>(kBackgroundSpritePath); + s_StandardResources.inputField = AssetDatabase.GetBuiltinExtraResource<Sprite>(kInputFieldBackgroundPath); + s_StandardResources.knob = AssetDatabase.GetBuiltinExtraResource<Sprite>(kKnobPath); + s_StandardResources.checkmark = AssetDatabase.GetBuiltinExtraResource<Sprite>(kCheckmarkPath); + s_StandardResources.dropdown = AssetDatabase.GetBuiltinExtraResource<Sprite>(kDropdownArrowPath); + s_StandardResources.mask = AssetDatabase.GetBuiltinExtraResource<Sprite>(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; + Vector2 localPlanePosition; + + if (RectTransformUtility.ScreenPointToLocalPointInRectangle(canvasRTransform, new Vector2(camera.pixelWidth / 2, camera.pixelHeight / 2), camera, out 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<Canvas>() == 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<RectTransform>(), element.GetComponent<RectTransform>()); + + 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>(); + canvas.renderMode = RenderMode.ScreenSpaceOverlay; + root.AddComponent<CanvasScaler>(); + root.AddComponent<GraphicRaycaster>(); + + // 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<EventSystem>(); + if (esys == null) + { + var eventSystem = new GameObject("EventSystem"); + GameObjectUtility.SetParentAndAlign(eventSystem, parent); + esys = eventSystem.AddComponent<EventSystem>(); + eventSystem.AddComponent<StandaloneInputModule>(); + + 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<Canvas>() : 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<Canvas>(); + 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_CreateObjectMenu.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_CreateObjectMenu.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..be9643fddee4f9f16c33ae1e2b3f577d24b22aa1 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_CreateObjectMenu.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 7065397ff8184621aa3ca4f854491259 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_EditorShaderUtilities.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_EditorShaderUtilities.cs new file mode 100644 index 0000000000000000000000000000000000000000..3d639005bb34bb65c7af8c058e0a6796de3ead4e --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_EditorShaderUtilities.cs @@ -0,0 +1,53 @@ +using UnityEngine; +using UnityEditor; +using System.Linq; +using System.Collections; + + +namespace TMPro.EditorUtilities +{ + + public static class EditorShaderUtilities + { + + /// <summary> + /// Copy Shader properties from source to destination material. + /// </summary> + /// <param name="source"></param> + /// <returns></returns> + 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_EditorShaderUtilities.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_EditorShaderUtilities.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..89d25943bdf9894abdd76a6e8184ac7fc7ee2de6 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_EditorShaderUtilities.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: aa76955fe5bb44f7915d91db8c7043c4 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs new file mode 100644 index 0000000000000000000000000000000000000000..9ab1b329c4a265de6ae464c27b53790f4d495bbd --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs @@ -0,0 +1,1739 @@ +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<TMPro_FontAssetCreatorWindow>(); + 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<TMPro_FontAssetCreatorWindow>(); + + 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<TMPro_FontAssetCreatorWindow>(); + + 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> 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<Glyph> m_FontGlyphTable = new List<Glyph>(); + List<TMP_Character> m_FontCharacterTable = new List<TMP_Character>(); + + Dictionary<uint, uint> m_CharacterLookupMap = new Dictionary<uint, uint>(); + Dictionary<uint, List<uint>> m_GlyphLookupMap = new Dictionary<uint, List<uint>>(); + + List<Glyph> m_GlyphsToPack = new List<Glyph>(); + List<Glyph> m_GlyphsPacked = new List<Glyph>(); + List<GlyphRect> m_FreeGlyphRects = new List<GlyphRect>(); + List<GlyphRect> m_UsedGlyphRects = new List<GlyphRect>(); + List<Glyph> m_GlyphsToRender = new List<Glyph>(); + List<uint> m_AvailableGlyphsToAdd = new List<uint>(); + List<uint> m_MissingCharacters = new List<uint>(); + List<uint> m_ExcludedCharacters = new List<uint>(); + + 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<FontAssetCreationSettingsContainer>(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(); + } + } + + + /// <summary> + /// Method which returns the character corresponding to a decimal value. + /// </summary> + /// <param name="sequence"></param> + /// <returns></returns> + static uint[] ParseNumberSequence(string sequence) + { + List<uint> unicodeList = new List<uint>(); + 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(); + } + + + /// <summary> + /// Method which returns the character (decimal value) from a hex sequence. + /// </summary> + /// <param name="sequence"></param> + /// <returns></returns> + static uint[] ParseHexNumberSequence(string sequence) + { + List<uint> unicodeList = new List<uint>(); + 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(@"(?<!\\)(?:\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8})"); + + m_CharacterSequence = rx.Replace(m_CharactersFromFile.text, + match => + { + 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<uint> char_List = new List<uint>(); + + 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]; + uint glyphIndex; + + if (FontEngine.TryGetGlyphIndex(unicode, out 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<uint>() { 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]; + Glyph glyph; + + if (FontEngine.TryGetGlyphWithIndexValue(glyphIndex, glyphLoadFlags, out 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]; + Glyph glyph; + + if (FontEngine.TryGetGlyphWithIndexValue(glyphIndex, glyphLoadFlags, out 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(); + } + + + /// <summary> + /// Clear the previously generated data. + /// </summary> + 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; + } + + + /// <summary> + /// Function to update the feedback window showing the results of the latest generation. + /// </summary> + void UpdateRenderFeedbackWindow() + { + m_PointSize = m_FaceInfo.pointSize; + + string missingGlyphReport = string.Empty; + + //string colorTag = m_FontCharacterTable.Count == m_CharacterCount ? "<color=#C0ffff>" : "<color=#ffff00>"; + string colorTag2 = "<color=#C0ffff>"; + + missingGlyphReport = "Font: <b>" + colorTag2 + m_FaceInfo.familyName + "</color></b> Style: <b>" + colorTag2 + m_FaceInfo.styleName + "</color></b>"; + + missingGlyphReport += "\nPoint Size: <b>" + colorTag2 + m_FaceInfo.pointSize + "</color></b> SP/PD Ratio: <b>" + colorTag2 + ((float)m_Padding / m_FaceInfo.pointSize).ToString("0.0%" + "</color></b>"); + + missingGlyphReport += "\n\nCharacters included: <color=#ffff00><b>" + m_FontCharacterTable.Count + "/" + m_CharacterCount + "</b></color>"; + missingGlyphReport += "\nMissing characters: <color=#ffff00><b>" + m_MissingCharacters.Count + "</b></color>"; + missingGlyphReport += "\nExcluded characters: <color=#ffff00><b>" + m_ExcludedCharacters.Count + "</b></color>"; + + // Report characters missing from font file + missingGlyphReport += "\n\n<b><color=#ffff00>Characters missing from font file:</color></b>"; + missingGlyphReport += "\n----------------------------------------"; + + m_OutputFeedback = missingGlyphReport; + + for (int i = 0; i < m_MissingCharacters.Count; i++) + { + missingGlyphReport += "\nID: <color=#C0ffff>" + m_MissingCharacters[i] + "\t</color>Hex: <color=#C0ffff>" + m_MissingCharacters[i].ToString("X") + "\t</color>Char [<color=#C0ffff>" + (char)m_MissingCharacters[i] + "</color>]"; + + if (missingGlyphReport.Length < 16300) + m_OutputFeedback = missingGlyphReport; + } + + // Report characters that did not fit in the atlas texture + missingGlyphReport += "\n\n<b><color=#ffff00>Characters excluded from packing:</color></b>"; + missingGlyphReport += "\n----------------------------------------"; + + for (int i = 0; i < m_ExcludedCharacters.Count; i++) + { + missingGlyphReport += "\nID: <color=#C0ffff>" + m_ExcludedCharacters[i] + "\t</color>Hex: <color=#C0ffff>" + m_ExcludedCharacters[i].ToString("X") + "\t</color>Char [<color=#C0ffff>" + (char)m_ExcludedCharacters[i] + "</color>]"; + + if (missingGlyphReport.Length < 16300) + m_OutputFeedback = missingGlyphReport; + } + + if (missingGlyphReport.Length > 16300) + m_OutputFeedback += "\n\n<color=#ffff00>Report truncated.</color>\n<color=#c0ffff>See</color> \"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); + } + + + /// <summary> + /// 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. + /// </summary> + /// <param name="sourceObject"></param> + 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); + } + } + + + /// <summary> + /// Open Save Dialog to provide the option to save the font asset under the same name. + /// </summary> + /// <param name="sourceObject"></param> + 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<TMP_FontAsset>(); // 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<TMP_FontAsset>(tex_Path_NoExt + ".asset"); + if (fontAsset == null) + { + //Debug.Log("Creating TextMeshPro font asset!"); + fontAsset = ScriptableObject.CreateInstance<TMP_FontAsset>(); // 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); + } + + + /// <summary> + /// Internal method to save the Font Asset Creation Settings + /// </summary> + /// <returns></returns> + 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; + } + + + /// <summary> + /// Internal method to load the Font Asset Creation Settings + /// </summary> + /// <param name="settings"></param> + void LoadFontCreationSettings(FontAssetCreationSettings settings) + { + m_SourceFontFile = AssetDatabase.LoadAssetAtPath<Font>(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<TMP_FontAsset>(AssetDatabase.GUIDToAssetPath(settings.referencedFontAssetGUID)); + m_CharactersFromFile = AssetDatabase.LoadAssetAtPath<TextAsset>(AssetDatabase.GUIDToAssetPath(settings.referencedTextAssetGUID)); + //m_FontStyle = (FaceStyles)settings.fontStyle; + //m_FontStyleValue = settings.fontStyleModifier; + m_GlyphRenderMode = (GlyphRenderMode)settings.renderMode; + m_IncludeFontFeatures = settings.includeFontFeatures; + } + + + /// <summary> + /// Save the latest font asset creation settings to EditorPrefs. + /// </summary> + /// <param name="settings"></param> + 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<FontAssetCreationSettings>(); + } + + // 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..4648857f3d8231d6ebf71a4f7172754d18e6341d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_FontAssetCreatorWindow.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 383966e89d344865a36addd5d378ffd3 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_FontPlugin.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_FontPlugin.cs new file mode 100644 index 0000000000000000000000000000000000000000..3b098ff24278f3d0d6ec1a92e9f87d1847a69202 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_FontPlugin.cs @@ -0,0 +1,115 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_FontPlugin.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_FontPlugin.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..66f3a87e29b0a42acc62b7286c22b60759c11cec --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_FontPlugin.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 9edc9283e7d6409fab242fe8fb6a822c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_SortingLayerHelper.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_SortingLayerHelper.cs new file mode 100644 index 0000000000000000000000000000000000000000..4f44c53b5df73051ee2c87eaa5b1dab6ee53b1a8 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_SortingLayerHelper.cs @@ -0,0 +1,105 @@ +/* + * 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_SortingLayerHelper.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_SortingLayerHelper.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..9d902b90cf909143f9ed9a04e583cede41cfed4d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_SortingLayerHelper.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 88ed537c17c34f339121fe9a7d6d7a0e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_TextContainerEditor.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_TextContainerEditor.cs new file mode 100644 index 0000000000000000000000000000000000000000..09fc6173f3b4dad5e857e5b3909062d3339ac1e8 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_TextContainerEditor.cs @@ -0,0 +1,235 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_TextContainerEditor.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_TextContainerEditor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..bad788129c6bb61ab4362ea6cd40ac33d473363a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_TextContainerEditor.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 02893ffb522b490a9fa28eedd2584309 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_TexturePostProcessor.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_TexturePostProcessor.cs new file mode 100644 index 0000000000000000000000000000000000000000..b16340946c27232b2d79f915dd22a5bf122de382 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_TexturePostProcessor.cs @@ -0,0 +1,75 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_TexturePostProcessor.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_TexturePostProcessor.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..fb00b80f3d08632102cb13bf87849e919a72bcab --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/TMPro_TexturePostProcessor.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: f4935fb862d54980b1bcbca942962642 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/Unity.TextMeshPro.Editor.asmdef b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/Unity.TextMeshPro.Editor.asmdef new file mode 100644 index 0000000000000000000000000000000000000000..437e22150e3dec4ac6264ce7b9ca84f3eecbfab4 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/Unity.TextMeshPro.Editor.asmdef @@ -0,0 +1,11 @@ +{ + "name": "Unity.TextMeshPro.Editor", + "references": [ + "Unity.TextMeshPro" + ], + "optionalUnityReferences": [], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [] +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/Unity.TextMeshPro.Editor.asmdef.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/Unity.TextMeshPro.Editor.asmdef.meta new file mode 100644 index 0000000000000000000000000000000000000000..6ed76ad64617a287ac12f00058d6dc90c4b1cc65 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Editor/Unity.TextMeshPro.Editor.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6546d7765b4165b40850b3667f981c26 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime.meta new file mode 100644 index 0000000000000000000000000000000000000000..4b244150b1d81e6a042ec7d2056d03210e1a4eb5 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5fc988a1d5b04aee9a5222502b201a45 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/AssemblyInfo.cs.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/AssemblyInfo.cs.cs new file mode 100644 index 0000000000000000000000000000000000000000..527849355e2daedb7af6dee039d2800f85657ad4 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/AssemblyInfo.cs.cs @@ -0,0 +1,11 @@ +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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/AssemblyInfo.cs.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/AssemblyInfo.cs.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..cd527067f4f4a1dbe0d32ef701c3346cbf3aa5b1 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/AssemblyInfo.cs.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1c147d10db452eb4b854a35f84472017 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/FastAction.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/FastAction.cs new file mode 100644 index 0000000000000000000000000000000000000000..4ae2ea5fead8e99dbdc1ad420f45c32a51c62218 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/FastAction.cs @@ -0,0 +1,154 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + + +namespace TMPro +{ + public class FastAction + { + + LinkedList<System.Action> delegates = new LinkedList<System.Action>(); + + Dictionary<System.Action, LinkedListNode<System.Action>> lookup = new Dictionary<System.Action, LinkedListNode<System.Action>>(); + + public void Add(System.Action rhs) + { + if (lookup.ContainsKey(rhs)) return; + + lookup[rhs] = delegates.AddLast(rhs); + } + + public void Remove(System.Action rhs) + { + LinkedListNode<System.Action> node; + + if (lookup.TryGetValue(rhs, out 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<A> + { + + LinkedList<System.Action<A>> delegates = new LinkedList<System.Action<A>>(); + + Dictionary<System.Action<A>, LinkedListNode<System.Action<A>>> lookup = new Dictionary<System.Action<A>, LinkedListNode<System.Action<A>>>(); + + public void Add(System.Action<A> rhs) + { + if (lookup.ContainsKey(rhs)) return; + + lookup[rhs] = delegates.AddLast(rhs); + } + + public void Remove(System.Action<A> rhs) + { + LinkedListNode<System.Action<A>> node; + + if (lookup.TryGetValue(rhs, out 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<A, B> + { + + LinkedList<System.Action<A, B>> delegates = new LinkedList<System.Action<A, B>>(); + + Dictionary<System.Action<A, B>, LinkedListNode<System.Action<A, B>>> lookup = new Dictionary<System.Action<A, B>, LinkedListNode<System.Action<A, B>>>(); + + public void Add(System.Action<A, B> rhs) + { + if (lookup.ContainsKey(rhs)) return; + + lookup[rhs] = delegates.AddLast(rhs); + } + + public void Remove(System.Action<A, B> rhs) + { + LinkedListNode<System.Action<A, B>> node; + + if (lookup.TryGetValue(rhs, out 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<A, B, C> + { + + LinkedList<System.Action<A, B, C>> delegates = new LinkedList<System.Action<A, B, C>>(); + + Dictionary<System.Action<A, B, C>, LinkedListNode<System.Action<A, B, C>>> lookup = new Dictionary<System.Action<A, B, C>, LinkedListNode<System.Action<A, B, C>>>(); + + public void Add(System.Action<A, B, C> rhs) + { + if (lookup.ContainsKey(rhs)) return; + + lookup[rhs] = delegates.AddLast(rhs); + } + + public void Remove(System.Action<A, B, C> rhs) + { + LinkedListNode<System.Action<A, B, C>> node; + + if (lookup.TryGetValue(rhs, out 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/FastAction.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/FastAction.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..fcd991e575248e9e65f6d8610270b19aeca13571 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/FastAction.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 871f8edd56e84b8fb295b10cc3c78f36 +timeCreated: 1435956061 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/MaterialReferenceManager.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/MaterialReferenceManager.cs new file mode 100644 index 0000000000000000000000000000000000000000..dd2fe92b4c5d5203bff556c937f7b748d6468e20 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/MaterialReferenceManager.cs @@ -0,0 +1,646 @@ +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<int, Material> m_FontMaterialReferenceLookup = new Dictionary<int, Material>(); + private Dictionary<int, TMP_FontAsset> m_FontAssetReferenceLookup = new Dictionary<int, TMP_FontAsset>(); + private Dictionary<int, TMP_SpriteAsset> m_SpriteAssetReferenceLookup = new Dictionary<int, TMP_SpriteAsset>(); + private Dictionary<int, TMP_ColorGradient> m_ColorGradientReferenceLookup = new Dictionary<int, TMP_ColorGradient>(); + + + /// <summary> + /// Get a singleton instance of the registry + /// </summary> + public static MaterialReferenceManager instance + { + get + { + if (MaterialReferenceManager.s_Instance == null) + MaterialReferenceManager.s_Instance = new MaterialReferenceManager(); + return MaterialReferenceManager.s_Instance; + } + } + + + + /// <summary> + /// Add new font asset reference to dictionary. + /// </summary> + /// <param name="fontAsset"></param> + public static void AddFontAsset(TMP_FontAsset fontAsset) + { + MaterialReferenceManager.instance.AddFontAssetInternal(fontAsset); + } + + /// <summary> + /// Add new Font Asset reference to dictionary. + /// </summary> + /// <param name="fontAsset"></param> + 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); + } + + + + /// <summary> + /// Add new Sprite Asset to dictionary. + /// </summary> + /// <param name="hashCode"></param> + /// <param name="spriteAsset"></param> + public static void AddSpriteAsset(TMP_SpriteAsset spriteAsset) + { + MaterialReferenceManager.instance.AddSpriteAssetInternal(spriteAsset); + } + + /// <summary> + /// Internal method to add a new sprite asset to the dictionary. + /// </summary> + /// <param name="hashCode"></param> + /// <param name="spriteAsset"></param> + 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); + } + + /// <summary> + /// Add new Sprite Asset to dictionary. + /// </summary> + /// <param name="hashCode"></param> + /// <param name="spriteAsset"></param> + public static void AddSpriteAsset(int hashCode, TMP_SpriteAsset spriteAsset) + { + MaterialReferenceManager.instance.AddSpriteAssetInternal(hashCode, spriteAsset); + } + + /// <summary> + /// Internal method to add a new sprite asset to the dictionary. + /// </summary> + /// <param name="hashCode"></param> + /// <param name="spriteAsset"></param> + 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; + } + + + /// <summary> + /// Add new Material reference to dictionary. + /// </summary> + /// <param name="hashCode"></param> + /// <param name="material"></param> + public static void AddFontMaterial(int hashCode, Material material) + { + MaterialReferenceManager.instance.AddFontMaterialInternal(hashCode, material); + } + + /// <summary> + /// Add new material reference to dictionary. + /// </summary> + /// <param name="hashCode"></param> + /// <param name="material"></param> + 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); + } + + + /// <summary> + /// Add new Color Gradient Preset to dictionary. + /// </summary> + /// <param name="hashCode"></param> + /// <param name="spriteAsset"></param> + public static void AddColorGradientPreset(int hashCode, TMP_ColorGradient spriteAsset) + { + MaterialReferenceManager.instance.AddColorGradientPreset_Internal(hashCode, spriteAsset); + } + + /// <summary> + /// Internal method to add a new Color Gradient Preset to the dictionary. + /// </summary> + /// <param name="hashCode"></param> + /// <param name="spriteAsset"></param> + 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); + } + + + + /// <summary> + /// Add new material reference and return the index of this new reference in the materialReferences array. + /// </summary> + /// <param name="material"></param> + /// <param name="materialHashCode"></param> + /// <param name="fontAsset"></param> + //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]; + // } + //} + + + /// <summary> + /// Add new material reference and return the index of this new reference in the materialReferences array. + /// </summary> + /// <param name="material"></param> + /// <param name="materialHashCode"></param> + /// <param name="spriteAsset"></param> + /// <returns></returns> + //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]; + // } + //} + + + /// <summary> + /// Function to check if the font asset is already referenced. + /// </summary> + /// <param name="font"></param> + /// <returns></returns> + public bool Contains(TMP_FontAsset font) + { + if (m_FontAssetReferenceLookup.ContainsKey(font.hashCode)) + return true; + + return false; + } + + + /// <summary> + /// Function to check if the sprite asset is already referenced. + /// </summary> + /// <param name="font"></param> + /// <returns></returns> + public bool Contains(TMP_SpriteAsset sprite) + { + if (m_FontAssetReferenceLookup.ContainsKey(sprite.hashCode)) + return true; + + return false; + } + + + + /// <summary> + /// Function returning the Font Asset corresponding to the provided hash code. + /// </summary> + /// <param name="hashCode"></param> + /// <param name="fontAsset"></param> + /// <returns></returns> + public static bool TryGetFontAsset(int hashCode, out TMP_FontAsset fontAsset) + { + return MaterialReferenceManager.instance.TryGetFontAssetInternal(hashCode, out fontAsset); + } + + /// <summary> + /// Internal Function returning the Font Asset corresponding to the provided hash code. + /// </summary> + /// <param name="hashCode"></param> + /// <param name="fontAsset"></param> + /// <returns></returns> + private bool TryGetFontAssetInternal(int hashCode, out TMP_FontAsset fontAsset) + { + fontAsset = null; + + if (m_FontAssetReferenceLookup.TryGetValue(hashCode, out fontAsset)) + { + return true; + } + + return false; + } + + + + /// <summary> + /// Function returning the Sprite Asset corresponding to the provided hash code. + /// </summary> + /// <param name="hashCode"></param> + /// <param name="spriteAsset"></param> + /// <returns></returns> + public static bool TryGetSpriteAsset(int hashCode, out TMP_SpriteAsset spriteAsset) + { + return MaterialReferenceManager.instance.TryGetSpriteAssetInternal(hashCode, out spriteAsset); + } + + /// <summary> + /// Internal function returning the Sprite Asset corresponding to the provided hash code. + /// </summary> + /// <param name="hashCode"></param> + /// <param name="fontAsset"></param> + /// <returns></returns> + private bool TryGetSpriteAssetInternal(int hashCode, out TMP_SpriteAsset spriteAsset) + { + spriteAsset = null; + + if (m_SpriteAssetReferenceLookup.TryGetValue(hashCode, out spriteAsset)) + { + return true; + } + + return false; + } + + + /// <summary> + /// Function returning the Color Gradient Preset corresponding to the provided hash code. + /// </summary> + /// <param name="hashCode"></param> + /// <param name="gradientPreset"></param> + /// <returns></returns> + public static bool TryGetColorGradientPreset(int hashCode, out TMP_ColorGradient gradientPreset) + { + return MaterialReferenceManager.instance.TryGetColorGradientPresetInternal(hashCode, out gradientPreset); + } + + /// <summary> + /// Internal function returning the Color Gradient Preset corresponding to the provided hash code. + /// </summary> + /// <param name="hashCode"></param> + /// <param name="fontAsset"></param> + /// <returns></returns> + private bool TryGetColorGradientPresetInternal(int hashCode, out TMP_ColorGradient gradientPreset) + { + gradientPreset = null; + + if (m_ColorGradientReferenceLookup.TryGetValue(hashCode, out gradientPreset)) + { + return true; + } + + return false; + } + + + /// <summary> + /// Function returning the Font Material corresponding to the provided hash code. + /// </summary> + /// <param name="hashCode"></param> + /// <param name="material"></param> + /// <returns></returns> + public static bool TryGetMaterial(int hashCode, out Material material) + { + return MaterialReferenceManager.instance.TryGetMaterialInternal(hashCode, out material); + } + + /// <summary> + /// Internal function returning the Font Material corresponding to the provided hash code. + /// </summary> + /// <param name="hashCode"></param> + /// <param name="material"></param> + /// <returns></returns> + private bool TryGetMaterialInternal(int hashCode, out Material material) + { + material = null; + + if (m_FontMaterialReferenceLookup.TryGetValue(hashCode, out material)) + { + return true; + } + + return false; + } + + + /// <summary> + /// Function to lookup a material based on hash code and returning the MaterialReference containing this material. + /// </summary> + /// <param name="hashCode"></param> + /// <param name="material"></param> + /// <returns></returns> + //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; + //} + + + + /// <summary> + /// + /// </summary> + /// <param name="fontAsset"></param> + /// <returns></returns> + //public int GetMaterialIndex(TMP_FontAsset fontAsset) + //{ + // if (m_MaterialReferenceLookup.ContainsKey(fontAsset.materialHashCode)) + // return m_MaterialReferenceLookup[fontAsset.materialHashCode]; + + // return -1; + //} + + + /// <summary> + /// + /// </summary> + /// <param name="index"></param> + /// <returns></returns> + //public TMP_FontAsset GetFontAsset(int index) + //{ + // if (index >= 0 && index < materialReferences.Length) + // return materialReferences[index].fontAsset; + + // return null; + //} + + + /// <summary> + /// + /// </summary> + /// <param name="material"></param> + /// <param name="materialHashCode"></param> + /// <param name="fontAsset"></param> + //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; + //} + + + + /// <summary> + /// + /// </summary> + //public void Clear() + //{ + // //m_currentIndex = 0; + // m_MaterialReferenceLookup.Clear(); + // m_SpriteAssetReferenceLookup.Clear(); + // m_FontAssetReferenceLookup.Clear(); + //} + + + /// <summary> + /// Function to clear the reference count for each of the material references. + /// </summary> + //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; + + + /// <summary> + /// Constructor for new Material Reference. + /// </summary> + /// <param name="index"></param> + /// <param name="fontAsset"></param> + /// <param name="spriteAsset"></param> + /// <param name="material"></param> + /// <param name="padding"></param> + 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; + } + + + /// <summary> + /// Function to check if a certain font asset is contained in the material reference array. + /// </summary> + /// <param name="materialReferences"></param> + /// <param name="fontAsset"></param> + /// <returns></returns> + 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; + } + + + /// <summary> + /// Function to add a new material reference and returning its index in the material reference array. + /// </summary> + /// <param name="material"></param> + /// <param name="fontAsset"></param> + /// <param name="materialReferences"></param> + /// <param name="materialReferenceIndexLookup"></param> + /// <returns></returns> + public static int AddMaterialReference(Material material, TMP_FontAsset fontAsset, MaterialReference[] materialReferences, Dictionary<int, int> materialReferenceIndexLookup) + { + int materialID = material.GetInstanceID(); + int index; + + if (materialReferenceIndexLookup.TryGetValue(materialID, out 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; + } + } + + + /// <summary> + /// + /// </summary> + /// <param name="material"></param> + /// <param name="spriteAsset"></param> + /// <param name="materialReferences"></param> + /// <param name="materialReferenceIndexLookup"></param> + /// <returns></returns> + public static int AddMaterialReference(Material material, TMP_SpriteAsset spriteAsset, MaterialReference[] materialReferences, Dictionary<int, int> materialReferenceIndexLookup) + { + int materialID = material.GetInstanceID(); + int index; + + if (materialReferenceIndexLookup.TryGetValue(materialID, out 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/MaterialReferenceManager.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/MaterialReferenceManager.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..17ad5664ad3ae5f91876afeeada76b54f819659d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/MaterialReferenceManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 11a6a034ab84493cbed6af5ae7aae78b +timeCreated: 1449743129 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Asset.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Asset.cs new file mode 100644 index 0000000000000000000000000000000000000000..a0ff4971f62477462c6854a2bc73207fdce4ee49 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Asset.cs @@ -0,0 +1,26 @@ +using UnityEngine; + +namespace TMPro +{ + + // Base class inherited by the various TextMeshPro Assets. + [System.Serializable] + public class TMP_Asset : ScriptableObject + { + /// <summary> + /// HashCode based on the name of the asset. + /// </summary> + public int hashCode; + + /// <summary> + /// The material used by this asset. + /// </summary> + public Material material; + + /// <summary> + /// HashCode based on the name of the material assigned to this asset. + /// </summary> + public int materialHashCode; + + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Asset.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Asset.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..62e9ee7a1b0ccabbe9f411f06c57c91882b8a479 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Asset.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3bda1886f58f4e0ab1139400b160c3ee +timeCreated: 1459318952 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Character.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Character.cs new file mode 100644 index 0000000000000000000000000000000000000000..8fc161ec146e823b3af38c02aaf1f1b0831f48f3 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Character.cs @@ -0,0 +1,51 @@ +using System; +using UnityEngine.TextCore; + +namespace TMPro +{ + /// <summary> + /// A basic element of text. + /// </summary> + [Serializable] + public class TMP_Character : TMP_TextElement + { + /// <summary> + /// Default constructor. + /// </summary> + public TMP_Character() + { + m_ElementType = TextElementType.Character; + this.scale = 1.0f; + } + + /// <summary> + /// Constructor for new character + /// </summary> + /// <param name="unicode">Unicode value.</param> + /// <param name="glyph">Glyph</param> + 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; + } + + /// <summary> + /// Constructor for new character + /// </summary> + /// <param name="unicode">Unicode value.</param> + /// <param name="glyphIndex">Glyph index.</param> + 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Character.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Character.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..55aea1b60f9db718fed3bb7efab1e2a18e948678 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Character.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4ac5b6a65aaeb59478e3b78660e9f134 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_CharacterInfo.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_CharacterInfo.cs new file mode 100644 index 0000000000000000000000000000000000000000..e15c46af7d895909f8205f0137ac651a3be7f135 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_CharacterInfo.cs @@ -0,0 +1,73 @@ +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; + } + + /// <summary> + /// Structure containing information about individual text elements (character or sprites). + /// </summary> + public struct TMP_CharacterInfo + { + public char character; // Should be changed to an int to handle UTF 32 + /// <summary> + /// Index of the character in the raw string. + /// </summary> + 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_CharacterInfo.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_CharacterInfo.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..9367a16e7537cc65ed58f1b3de80f8df5c969a7b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_CharacterInfo.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 90fe1c65e6bb3bc4e90862df7297719e +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ColorGradient.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ColorGradient.cs new file mode 100644 index 0000000000000000000000000000000000000000..0730adaf7669101ffe8f363a8ba4b5fe762cc39d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ColorGradient.cs @@ -0,0 +1,68 @@ +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; + + /// <summary> + /// Default Constructor which sets each of the colors as white. + /// </summary> + public TMP_ColorGradient() + { + colorMode = k_DefaultColorMode; + topLeft = k_DefaultColor; + topRight = k_DefaultColor; + bottomLeft = k_DefaultColor; + bottomRight = k_DefaultColor; + } + + /// <summary> + /// Constructor allowing to set the default color of the Color Gradient. + /// </summary> + /// <param name="color"></param> + public TMP_ColorGradient(Color color) + { + colorMode = k_DefaultColorMode; + topLeft = color; + topRight = color; + bottomLeft = color; + bottomRight = color; + } + + /// <summary> + /// The vertex colors at the corners of the characters. + /// </summary> + /// <param name="color0">Top left color.</param> + /// <param name="color1">Top right color.</param> + /// <param name="color2">Bottom left color.</param> + /// <param name="color3">Bottom right color.</param> + 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ColorGradient.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ColorGradient.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..1d79d010f6d3dbaa9181e2bab5359c4078ba57d9 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ColorGradient.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 54d21f6ece3b46479f0c328f8c6007e0 +timeCreated: 1468187202 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_CoroutineTween.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_CoroutineTween.cs new file mode 100644 index 0000000000000000000000000000000000000000..bec1f54e96c6462dff5694199faaab50d1a1c0b1 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_CoroutineTween.cs @@ -0,0 +1,246 @@ +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<Color> { } + + 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<Color> 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<float> { } + + 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<float> 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<T> 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/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_CoroutineTween.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_CoroutineTween.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..01cf5eb39281ca252ce45fadef2ef160b1e8b6f3 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_CoroutineTween.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 658c1fb149e7498aa072b0c0f3bf13f0 +timeCreated: 1464850953 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_DefaultControls.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_DefaultControls.cs new file mode 100644 index 0000000000000000000000000000000000000000..7bc6f97efa3135008cf42e4be271e2a0b536b7f7 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_DefaultControls.cs @@ -0,0 +1,385 @@ +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>(); + rectTransform.sizeDelta = size; + return child; + } + + static GameObject CreateUIObject(string name, GameObject parent) + { + GameObject go = new GameObject(name); + go.AddComponent<RectTransform>(); + 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<Image>(); + bgImage.sprite = resources.background; + bgImage.type = Image.Type.Sliced; + bgImage.color = s_DefaultSelectableColor; + + Image handleImage = handle.AddComponent<Image>(); + handleImage.sprite = resources.standard; + handleImage.type = Image.Type.Sliced; + handleImage.color = s_DefaultSelectableColor; + + RectTransform sliderAreaRect = sliderArea.GetComponent<RectTransform>(); + sliderAreaRect.sizeDelta = new Vector2(-20, -20); + sliderAreaRect.anchorMin = Vector2.zero; + sliderAreaRect.anchorMax = Vector2.one; + + RectTransform handleRect = handle.GetComponent<RectTransform>(); + handleRect.sizeDelta = new Vector2(20, 20); + + Scrollbar scrollbar = scrollbarRoot.AddComponent<Scrollbar>(); + 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<RectTransform>(); + SetParentAndAlign(childText, buttonRoot); + + Image image = buttonRoot.AddComponent<Image>(); + image.sprite = resources.standard; + image.type = Image.Type.Sliced; + image.color = s_DefaultSelectableColor; + + Button bt = buttonRoot.AddComponent<Button>(); + SetDefaultColorTransitionValues(bt); + + TextMeshProUGUI text = childText.AddComponent<TextMeshProUGUI>(); + text.text = "Button"; + text.alignment = TextAlignmentOptions.Center; + SetDefaultTextValues(text); + + RectTransform textRectTransform = childText.GetComponent<RectTransform>(); + textRectTransform.anchorMin = Vector2.zero; + textRectTransform.anchorMax = Vector2.one; + textRectTransform.sizeDelta = Vector2.zero; + + return buttonRoot; + } + + public static GameObject CreateText(Resources resources) + { + GameObject go = CreateUIElementRoot("Text (TMP)", s_ThickElementSize); + + TextMeshProUGUI lbl = go.AddComponent<TextMeshProUGUI>(); + lbl.text = "New Text"; + SetDefaultTextValues(lbl); + + return go; + } + + + public static GameObject CreateInputField(Resources resources) + { + GameObject root = CreateUIElementRoot("InputField (TMP)", s_ThickElementSize); + + GameObject textArea = CreateUIObject("Text Area", root); + GameObject childPlaceholder = CreateUIObject("Placeholder", textArea); + GameObject childText = CreateUIObject("Text", textArea); + + Image image = root.AddComponent<Image>(); + image.sprite = resources.inputField; + image.type = Image.Type.Sliced; + image.color = s_DefaultSelectableColor; + + TMP_InputField inputField = root.AddComponent<TMP_InputField>(); + SetDefaultColorTransitionValues(inputField); + + // Use UI.Mask for Unity 5.0 - 5.1 and 2D RectMask for Unity 5.2 and up + textArea.AddComponent<RectMask2D>(); + + RectTransform textAreaRectTransform = textArea.GetComponent<RectTransform>(); + textAreaRectTransform.anchorMin = Vector2.zero; + textAreaRectTransform.anchorMax = Vector2.one; + textAreaRectTransform.sizeDelta = Vector2.zero; + textAreaRectTransform.offsetMin = new Vector2(10, 6); + textAreaRectTransform.offsetMax = new Vector2(-10, -7); + + + TextMeshProUGUI text = childText.AddComponent<TextMeshProUGUI>(); + text.text = ""; + text.enableWordWrapping = false; + text.extraPadding = true; + text.richText = true; + SetDefaultTextValues(text); + + TextMeshProUGUI placeholder = childPlaceholder.AddComponent<TextMeshProUGUI>(); + placeholder.text = "Enter text..."; + placeholder.fontSize = 14; + placeholder.fontStyle = FontStyles.Italic; + placeholder.enableWordWrapping = false; + placeholder.extraPadding = true; + + // Make placeholder color half as opaque as normal text color. + Color placeholderColor = text.color; + placeholderColor.a *= 0.5f; + placeholder.color = placeholderColor; + + RectTransform textRectTransform = childText.GetComponent<RectTransform>(); + textRectTransform.anchorMin = Vector2.zero; + textRectTransform.anchorMax = Vector2.one; + textRectTransform.sizeDelta = Vector2.zero; + textRectTransform.offsetMin = new Vector2(0, 0); + textRectTransform.offsetMax = new Vector2(0, 0); + + RectTransform placeholderRectTransform = childPlaceholder.GetComponent<RectTransform>(); + placeholderRectTransform.anchorMin = Vector2.zero; + placeholderRectTransform.anchorMax = Vector2.one; + placeholderRectTransform.sizeDelta = Vector2.zero; + placeholderRectTransform.offsetMin = new Vector2(0, 0); + placeholderRectTransform.offsetMax = new Vector2(0, 0); + + inputField.textViewport = textAreaRectTransform; + inputField.textComponent = text; + inputField.placeholder = placeholder; + inputField.fontAsset = text.font; + + return root; + } + + public static GameObject CreateDropdown(Resources resources) + { + GameObject root = CreateUIElementRoot("Dropdown", s_ThickElementSize); + + GameObject label = CreateUIObject("Label", root); + GameObject arrow = CreateUIObject("Arrow", root); + GameObject template = CreateUIObject("Template", root); + GameObject viewport = CreateUIObject("Viewport", template); + GameObject content = CreateUIObject("Content", viewport); + GameObject item = CreateUIObject("Item", content); + GameObject itemBackground = CreateUIObject("Item Background", item); + GameObject itemCheckmark = CreateUIObject("Item Checkmark", item); + GameObject itemLabel = CreateUIObject("Item Label", item); + + // Sub controls. + + GameObject scrollbar = CreateScrollbar(resources); + scrollbar.name = "Scrollbar"; + SetParentAndAlign(scrollbar, template); + + Scrollbar scrollbarScrollbar = scrollbar.GetComponent<Scrollbar>(); + scrollbarScrollbar.SetDirection(Scrollbar.Direction.BottomToTop, true); + + RectTransform vScrollbarRT = scrollbar.GetComponent<RectTransform>(); + vScrollbarRT.anchorMin = Vector2.right; + vScrollbarRT.anchorMax = Vector2.one; + vScrollbarRT.pivot = Vector2.one; + vScrollbarRT.sizeDelta = new Vector2(vScrollbarRT.sizeDelta.x, 0); + + // Setup item UI components. + + TextMeshProUGUI itemLabelText = itemLabel.AddComponent<TextMeshProUGUI>(); + SetDefaultTextValues(itemLabelText); + itemLabelText.alignment = TextAlignmentOptions.Left; + + Image itemBackgroundImage = itemBackground.AddComponent<Image>(); + itemBackgroundImage.color = new Color32(245, 245, 245, 255); + + Image itemCheckmarkImage = itemCheckmark.AddComponent<Image>(); + itemCheckmarkImage.sprite = resources.checkmark; + + Toggle itemToggle = item.AddComponent<Toggle>(); + itemToggle.targetGraphic = itemBackgroundImage; + itemToggle.graphic = itemCheckmarkImage; + itemToggle.isOn = true; + + // Setup template UI components. + + Image templateImage = template.AddComponent<Image>(); + templateImage.sprite = resources.standard; + templateImage.type = Image.Type.Sliced; + + ScrollRect templateScrollRect = template.AddComponent<ScrollRect>(); + templateScrollRect.content = (RectTransform)content.transform; + templateScrollRect.viewport = (RectTransform)viewport.transform; + templateScrollRect.horizontal = false; + templateScrollRect.movementType = ScrollRect.MovementType.Clamped; + templateScrollRect.verticalScrollbar = scrollbarScrollbar; + templateScrollRect.verticalScrollbarVisibility = ScrollRect.ScrollbarVisibility.AutoHideAndExpandViewport; + templateScrollRect.verticalScrollbarSpacing = -3; + + Mask scrollRectMask = viewport.AddComponent<Mask>(); + scrollRectMask.showMaskGraphic = false; + + Image viewportImage = viewport.AddComponent<Image>(); + viewportImage.sprite = resources.mask; + viewportImage.type = Image.Type.Sliced; + + // Setup dropdown UI components. + + TextMeshProUGUI labelText = label.AddComponent<TextMeshProUGUI>(); + SetDefaultTextValues(labelText); + labelText.alignment = TextAlignmentOptions.Left; + + Image arrowImage = arrow.AddComponent<Image>(); + arrowImage.sprite = resources.dropdown; + + Image backgroundImage = root.AddComponent<Image>(); + backgroundImage.sprite = resources.standard; + backgroundImage.color = s_DefaultSelectableColor; + backgroundImage.type = Image.Type.Sliced; + + TMP_Dropdown dropdown = root.AddComponent<TMP_Dropdown>(); + dropdown.targetGraphic = backgroundImage; + SetDefaultColorTransitionValues(dropdown); + dropdown.template = template.GetComponent<RectTransform>(); + dropdown.captionText = labelText; + dropdown.itemText = itemLabelText; + + // Setting default Item list. + itemLabelText.text = "Option A"; + dropdown.options.Add(new TMP_Dropdown.OptionData {text = "Option A" }); + dropdown.options.Add(new TMP_Dropdown.OptionData {text = "Option B" }); + dropdown.options.Add(new TMP_Dropdown.OptionData {text = "Option C" }); + dropdown.RefreshShownValue(); + + // Set up RectTransforms. + + RectTransform labelRT = label.GetComponent<RectTransform>(); + labelRT.anchorMin = Vector2.zero; + labelRT.anchorMax = Vector2.one; + labelRT.offsetMin = new Vector2(10, 6); + labelRT.offsetMax = new Vector2(-25, -7); + + RectTransform arrowRT = arrow.GetComponent<RectTransform>(); + arrowRT.anchorMin = new Vector2(1, 0.5f); + arrowRT.anchorMax = new Vector2(1, 0.5f); + arrowRT.sizeDelta = new Vector2(20, 20); + arrowRT.anchoredPosition = new Vector2(-15, 0); + + RectTransform templateRT = template.GetComponent<RectTransform>(); + templateRT.anchorMin = new Vector2(0, 0); + templateRT.anchorMax = new Vector2(1, 0); + templateRT.pivot = new Vector2(0.5f, 1); + templateRT.anchoredPosition = new Vector2(0, 2); + templateRT.sizeDelta = new Vector2(0, 150); + + RectTransform viewportRT = viewport.GetComponent<RectTransform>(); + viewportRT.anchorMin = new Vector2(0, 0); + viewportRT.anchorMax = new Vector2(1, 1); + viewportRT.sizeDelta = new Vector2(-18, 0); + viewportRT.pivot = new Vector2(0, 1); + + RectTransform contentRT = content.GetComponent<RectTransform>(); + contentRT.anchorMin = new Vector2(0f, 1); + contentRT.anchorMax = new Vector2(1f, 1); + contentRT.pivot = new Vector2(0.5f, 1); + contentRT.anchoredPosition = new Vector2(0, 0); + contentRT.sizeDelta = new Vector2(0, 28); + + RectTransform itemRT = item.GetComponent<RectTransform>(); + itemRT.anchorMin = new Vector2(0, 0.5f); + itemRT.anchorMax = new Vector2(1, 0.5f); + itemRT.sizeDelta = new Vector2(0, 20); + + RectTransform itemBackgroundRT = itemBackground.GetComponent<RectTransform>(); + itemBackgroundRT.anchorMin = Vector2.zero; + itemBackgroundRT.anchorMax = Vector2.one; + itemBackgroundRT.sizeDelta = Vector2.zero; + + RectTransform itemCheckmarkRT = itemCheckmark.GetComponent<RectTransform>(); + itemCheckmarkRT.anchorMin = new Vector2(0, 0.5f); + itemCheckmarkRT.anchorMax = new Vector2(0, 0.5f); + itemCheckmarkRT.sizeDelta = new Vector2(20, 20); + itemCheckmarkRT.anchoredPosition = new Vector2(10, 0); + + RectTransform itemLabelRT = itemLabel.GetComponent<RectTransform>(); + itemLabelRT.anchorMin = Vector2.zero; + itemLabelRT.anchorMax = Vector2.one; + itemLabelRT.offsetMin = new Vector2(20, 1); + itemLabelRT.offsetMax = new Vector2(-10, -2); + + template.SetActive(false); + + return root; + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_DefaultControls.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_DefaultControls.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..7d4ac6f7faa693530c0a4714f5945da82d21a3da --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_DefaultControls.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 322392995be44d23a3c86cfd972f838f +timeCreated: 1446378357 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Dropdown.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Dropdown.cs new file mode 100644 index 0000000000000000000000000000000000000000..4d32213e17f0e1d252585473fde7e9cfb6abe41b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Dropdown.cs @@ -0,0 +1,1059 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.Events; +using UnityEngine.EventSystems; +using UnityEngine.UI.CoroutineTween; + +namespace TMPro +{ + [AddComponentMenu("UI/Dropdown - TextMeshPro", 35)] + [RequireComponent(typeof(RectTransform))] + /// <summary> + /// A standard dropdown that presents a list of options when clicked, of which one can be chosen. + /// </summary> + /// <remarks> + /// The dropdown component is a Selectable. When an option is chosen, the label and/or image of the control changes to show the chosen option. + /// + /// When a dropdown event occurs a callback is sent to any registered listeners of onValueChanged. + /// </remarks> + public class TMP_Dropdown : Selectable, IPointerClickHandler, ISubmitHandler, ICancelHandler + { + protected internal class DropdownItem : MonoBehaviour, IPointerEnterHandler, ICancelHandler + { + [SerializeField] + private TMP_Text m_Text; + [SerializeField] + private Image m_Image; + [SerializeField] + private RectTransform m_RectTransform; + [SerializeField] + private Toggle m_Toggle; + + public TMP_Text text { get { return m_Text; } set { m_Text = value; } } + public Image image { get { return m_Image; } set { m_Image = value; } } + public RectTransform rectTransform { get { return m_RectTransform; } set { m_RectTransform = value; } } + public Toggle toggle { get { return m_Toggle; } set { m_Toggle = value; } } + + public virtual void OnPointerEnter(PointerEventData eventData) + { + EventSystem.current.SetSelectedGameObject(gameObject); + } + + public virtual void OnCancel(BaseEventData eventData) + { + TMP_Dropdown dropdown = GetComponentInParent<TMP_Dropdown>(); + if (dropdown) + dropdown.Hide(); + } + } + + [Serializable] + /// <summary> + /// Class to store the text and/or image of a single option in the dropdown list. + /// </summary> + public class OptionData + { + [SerializeField] + private string m_Text; + [SerializeField] + private Sprite m_Image; + + /// <summary> + /// The text associated with the option. + /// </summary> + public string text { get { return m_Text; } set { m_Text = value; } } + + /// <summary> + /// The image associated with the option. + /// </summary> + public Sprite image { get { return m_Image; } set { m_Image = value; } } + + public OptionData() { } + + public OptionData(string text) + { + this.text = text; + } + + public OptionData(Sprite image) + { + this.image = image; + } + + /// <summary> + /// Create an object representing a single option for the dropdown list. + /// </summary> + /// <param name="text">Optional text for the option.</param> + /// <param name="image">Optional image for the option.</param> + public OptionData(string text, Sprite image) + { + this.text = text; + this.image = image; + } + } + + [Serializable] + /// <summary> + /// Class used internally to store the list of options for the dropdown list. + /// </summary> + /// <remarks> + /// The usage of this class is not exposed in the runtime API. It's only relevant for the PropertyDrawer drawing the list of options. + /// </remarks> + public class OptionDataList + { + [SerializeField] + private List<OptionData> m_Options; + + /// <summary> + /// The list of options for the dropdown list. + /// </summary> + public List<OptionData> options { get { return m_Options; } set { m_Options = value; } } + + + public OptionDataList() + { + options = new List<OptionData>(); + } + } + + [Serializable] + /// <summary> + /// UnityEvent callback for when a dropdown current option is changed. + /// </summary> + public class DropdownEvent : UnityEvent<int> { } + + // Template used to create the dropdown. + [SerializeField] + private RectTransform m_Template; + + /// <summary> + /// The Rect Transform of the template for the dropdown list. + /// </summary> + public RectTransform template { get { return m_Template; } set { m_Template = value; RefreshShownValue(); } } + + // Text to be used as a caption for the current value. It's not required, but it's kept here for convenience. + [SerializeField] + private TMP_Text m_CaptionText; + + /// <summary> + /// The Text component to hold the text of the currently selected option. + /// </summary> + public TMP_Text captionText { get { return m_CaptionText; } set { m_CaptionText = value; RefreshShownValue(); } } + + [SerializeField] + private Image m_CaptionImage; + + /// <summary> + /// The Image component to hold the image of the currently selected option. + /// </summary> + public Image captionImage { get { return m_CaptionImage; } set { m_CaptionImage = value; RefreshShownValue(); } } + + [Space] + + [SerializeField] + private TMP_Text m_ItemText; + + /// <summary> + /// The Text component to hold the text of the item. + /// </summary> + public TMP_Text itemText { get { return m_ItemText; } set { m_ItemText = value; RefreshShownValue(); } } + + [SerializeField] + private Image m_ItemImage; + + /// <summary> + /// The Image component to hold the image of the item + /// </summary> + public Image itemImage { get { return m_ItemImage; } set { m_ItemImage = value; RefreshShownValue(); } } + + [Space] + + [SerializeField] + private int m_Value; + + [Space] + + // Items that will be visible when the dropdown is shown. + // We box this into its own class so we can use a Property Drawer for it. + [SerializeField] + private OptionDataList m_Options = new OptionDataList(); + + /// <summary> + /// The list of possible options. A text string and an image can be specified for each option. + /// </summary> + /// <remarks> + /// This is the list of options within the Dropdown. Each option contains Text and/or image data that you can specify using UI.Dropdown.OptionData before adding to the Dropdown list. + /// This also unlocks the ability to edit the Dropdown, including the insertion, removal, and finding of options, as well as other useful tools + /// </remarks> + /// /// <example> + /// <code> + /// //Create a new Dropdown GameObject by going to the Hierarchy and clicking Create>UI>Dropdown - TextMeshPro. Attach this script to the Dropdown GameObject. + /// + /// using UnityEngine; + /// using UnityEngine.UI; + /// using System.Collections.Generic; + /// using TMPro; + /// + /// public class Example : MonoBehaviour + /// { + /// //Use these for adding options to the Dropdown List + /// TMP_Dropdown.OptionData m_NewData, m_NewData2; + /// //The list of messages for the Dropdown + /// List<TMP_Dropdown.OptionData> m_Messages = new List<TMP_Dropdown.OptionData>(); + /// + /// + /// //This is the Dropdown + /// TMP_Dropdown m_Dropdown; + /// string m_MyString; + /// int m_Index; + /// + /// void Start() + /// { + /// //Fetch the Dropdown GameObject the script is attached to + /// m_Dropdown = GetComponent<TMP_Dropdown>(); + /// //Clear the old options of the Dropdown menu + /// m_Dropdown.ClearOptions(); + /// + /// //Create a new option for the Dropdown menu which reads "Option 1" and add to messages List + /// m_NewData = new TMP_Dropdown.OptionData(); + /// m_NewData.text = "Option 1"; + /// m_Messages.Add(m_NewData); + /// + /// //Create a new option for the Dropdown menu which reads "Option 2" and add to messages List + /// m_NewData2 = new TMP_Dropdown.OptionData(); + /// m_NewData2.text = "Option 2"; + /// m_Messages.Add(m_NewData2); + /// + /// //Take each entry in the message List + /// foreach (TMP_Dropdown.OptionData message in m_Messages) + /// { + /// //Add each entry to the Dropdown + /// m_Dropdown.options.Add(message); + /// //Make the index equal to the total number of entries + /// m_Index = m_Messages.Count - 1; + /// } + /// } + /// + /// //This OnGUI function is used here for a quick demonstration. See the [[wiki:UISystem|UI Section]] for more information about setting up your own UI. + /// void OnGUI() + /// { + /// //TextField for user to type new entry to add to Dropdown + /// m_MyString = GUI.TextField(new Rect(0, 40, 100, 40), m_MyString); + /// + /// //Press the "Add" Button to add a new entry to the Dropdown + /// if (GUI.Button(new Rect(0, 0, 100, 40), "Add")) + /// { + /// //Make the index the last number of entries + /// m_Index = m_Messages.Count; + /// //Create a temporary option + /// TMP_Dropdown.OptionData temp = new TMP_Dropdown.OptionData(); + /// //Make the option the data from the TextField + /// temp.text = m_MyString; + /// + /// //Update the messages list with the TextField data + /// m_Messages.Add(temp); + /// + /// //Add the Textfield data to the Dropdown + /// m_Dropdown.options.Insert(m_Index, temp); + /// } + /// + /// //Press the "Remove" button to delete the selected option + /// if (GUI.Button(new Rect(110, 0, 100, 40), "Remove")) + /// { + /// //Remove the current selected item from the Dropdown from the messages List + /// m_Messages.RemoveAt(m_Dropdown.value); + /// //Remove the current selection from the Dropdown + /// m_Dropdown.options.RemoveAt(m_Dropdown.value); + /// } + /// } + /// } + /// </code> + /// </example> + public List<OptionData> options + { + get { return m_Options.options; } + set { m_Options.options = value; RefreshShownValue(); } + } + + [Space] + + // Notification triggered when the dropdown changes. + [SerializeField] + private DropdownEvent m_OnValueChanged = new DropdownEvent(); + + /// <summary> + /// A UnityEvent that is invoked when a user has clicked one of the options in the dropdown list. + /// </summary> + /// <remarks> + /// Use this to detect when a user selects one or more options in the Dropdown. Add a listener to perform an action when this UnityEvent detects a selection by the user. See https://unity3d.com/learn/tutorials/topics/scripting/delegates for more information on delegates. + /// </remarks> + /// <example> + /// <code> + /// //Create a new Dropdown GameObject by going to the Hierarchy and clicking Create>UI>Dropdown - TextMeshPro. Attach this script to the Dropdown GameObject. + /// //Set your own Text in the Inspector window + /// + /// using UnityEngine; + /// using UnityEngine.UI; + /// using TMPro; + /// + /// public class Example : MonoBehaviour + /// { + /// TMP_Dropdown m_Dropdown; + /// public Text m_Text; + /// + /// void Start() + /// { + /// //Fetch the Dropdown GameObject + /// m_Dropdown = GetComponent<TMP_Dropdown>(); + /// //Add listener for when the value of the Dropdown changes, to take action + /// m_Dropdown.onValueChanged.AddListener(delegate { + /// DropdownValueChanged(m_Dropdown); + /// }); + /// + /// //Initialize the Text to say the first value of the Dropdown + /// m_Text.text = "First Value : " + m_Dropdown.value; + /// } + /// + /// //Output the new value of the Dropdown into Text + /// void DropdownValueChanged(TMP_Dropdown change) + /// { + /// m_Text.text = "New Value : " + change.value; + /// } + /// } + /// </code> + /// </example> + public DropdownEvent onValueChanged { get { return m_OnValueChanged; } set { m_OnValueChanged = value; } } + + private GameObject m_Dropdown; + private GameObject m_Blocker; + private List<DropdownItem> m_Items = new List<DropdownItem>(); + private TweenRunner<FloatTween> m_AlphaTweenRunner; + private bool validTemplate = false; + + private static OptionData s_NoOptionData = new OptionData(); + + /// <summary> + /// The Value is the index number of the current selection in the Dropdown. 0 is the first option in the Dropdown, 1 is the second, and so on. + /// </summary> + /// <example> + /// <code> + /// //Create a new Dropdown GameObject by going to the Hierarchy and clicking Create>UI>Dropdown - TextMeshPro. Attach this script to the Dropdown GameObject. + /// //Set your own Text in the Inspector window + /// + /// using UnityEngine; + /// using UnityEngine.UI; + /// using TMPro; + /// + /// public class Example : MonoBehaviour + /// { + /// //Attach this script to a Dropdown GameObject + /// TMP_Dropdown m_Dropdown; + /// //This is the string that stores the current selection m_Text of the Dropdown + /// string m_Message; + /// //This Text outputs the current selection to the screen + /// public Text m_Text; + /// //This is the index value of the Dropdown + /// int m_DropdownValue; + /// + /// void Start() + /// { + /// //Fetch the DropDown component from the GameObject + /// m_Dropdown = GetComponent<TMP_Dropdown>(); + /// //Output the first Dropdown index value + /// Debug.Log("Starting Dropdown Value : " + m_Dropdown.value); + /// } + /// + /// void Update() + /// { + /// //Keep the current index of the Dropdown in a variable + /// m_DropdownValue = m_Dropdown.value; + /// //Change the message to say the name of the current Dropdown selection using the value + /// m_Message = m_Dropdown.options[m_DropdownValue].text; + /// //Change the on screen Text to reflect the current Dropdown selection + /// m_Text.text = m_Message; + /// } + /// } + /// </code> + /// </example> + public int value + { + get + { + return m_Value; + } + set + { + SetValue(value); + } + } + + /// <summary> + /// Set index number of the current selection in the Dropdown without invoking onValueChanged callback. + /// </summary> + /// <param name="input">The new index for the current selection.</param> + public void SetValueWithoutNotify(int input) + { + SetValue(input, false); + } + + void SetValue(int value, bool sendCallback = true) + { + if (Application.isPlaying && (value == m_Value || options.Count == 0)) + return; + + m_Value = Mathf.Clamp(value, 0, options.Count - 1); + RefreshShownValue(); + + if (sendCallback) + { + // Notify all listeners + UISystemProfilerApi.AddMarker("Dropdown.value", this); + m_OnValueChanged.Invoke(m_Value); + } + } + + public bool IsExpanded { get { return m_Dropdown != null; } } + + protected TMP_Dropdown() { } + + protected override void Awake() + { + #if UNITY_EDITOR + if (!Application.isPlaying) + return; + #endif + + m_AlphaTweenRunner = new TweenRunner<FloatTween>(); + m_AlphaTweenRunner.Init(this); + + if (m_CaptionImage) + m_CaptionImage.enabled = (m_CaptionImage.sprite != null); + + if (m_Template) + m_Template.gameObject.SetActive(false); + } + + protected override void Start() + { + base.Start(); + + RefreshShownValue(); + } + + #if UNITY_EDITOR + protected override void OnValidate() + { + base.OnValidate(); + + if (!IsActive()) + return; + + RefreshShownValue(); + } + #endif + + protected override void OnDisable() + { + //Destroy dropdown and blocker in case user deactivates the dropdown when they click an option (case 935649) + ImmediateDestroyDropdownList(); + + if (m_Blocker != null) + DestroyBlocker(m_Blocker); + m_Blocker = null; + } + + /// <summary> + /// Refreshes the text and image (if available) of the currently selected option. + /// </summary> + /// <remarks> + /// If you have modified the list of options, you should call this method afterwards to ensure that the visual state of the dropdown corresponds to the updated options. + /// </remarks> + public void RefreshShownValue() + { + OptionData data = s_NoOptionData; + + if (options.Count > 0) + data = options[Mathf.Clamp(m_Value, 0, options.Count - 1)]; + + if (m_CaptionText) + { + if (data != null && data.text != null) + m_CaptionText.text = data.text; + else + m_CaptionText.text = ""; + } + + if (m_CaptionImage) + { + if (data != null) + m_CaptionImage.sprite = data.image; + else + m_CaptionImage.sprite = null; + m_CaptionImage.enabled = (m_CaptionImage.sprite != null); + } + } + + /// <summary> + /// Add multiple options to the options of the Dropdown based on a list of OptionData objects. + /// </summary> + /// <param name="options">The list of OptionData to add.</param> + /// /// <remarks> + /// See AddOptions(List<string> options) for code example of usages. + /// </remarks> + public void AddOptions(List<OptionData> options) + { + this.options.AddRange(options); + RefreshShownValue(); + } + + /// <summary> + /// Add multiple text-only options to the options of the Dropdown based on a list of strings. + /// </summary> + /// <remarks> + /// Add a List of string messages to the Dropdown. The Dropdown shows each member of the list as a separate option. + /// </remarks> + /// <param name="options">The list of text strings to add.</param> + /// <example> + /// <code> + /// //Create a new Dropdown GameObject by going to the Hierarchy and clicking Create>UI>Dropdown - TextMeshPro. Attach this script to the Dropdown GameObject. + /// + /// using System.Collections.Generic; + /// using UnityEngine; + /// using UnityEngine.UI; + /// using TMPro; + /// + /// public class Example : MonoBehaviour + /// { + /// //Create a List of new Dropdown options + /// List<string> m_DropOptions = new List<string> { "Option 1", "Option 2"}; + /// //This is the Dropdown + /// TMP_Dropdown m_Dropdown; + /// + /// void Start() + /// { + /// //Fetch the Dropdown GameObject the script is attached to + /// m_Dropdown = GetComponent<TMP_Dropdown>(); + /// //Clear the old options of the Dropdown menu + /// m_Dropdown.ClearOptions(); + /// //Add the options created in the List above + /// m_Dropdown.AddOptions(m_DropOptions); + /// } + /// } + /// </code> + /// </example> + public void AddOptions(List<string> options) + { + for (int i = 0; i < options.Count; i++) + this.options.Add(new OptionData(options[i])); + + RefreshShownValue(); + } + + /// <summary> + /// Add multiple image-only options to the options of the Dropdown based on a list of Sprites. + /// </summary> + /// <param name="options">The list of Sprites to add.</param> + /// <remarks> + /// See AddOptions(List<string> options) for code example of usages. + /// </remarks> + public void AddOptions(List<Sprite> options) + { + for (int i = 0; i < options.Count; i++) + this.options.Add(new OptionData(options[i])); + + RefreshShownValue(); + } + + /// <summary> + /// Clear the list of options in the Dropdown. + /// </summary> + public void ClearOptions() + { + options.Clear(); + m_Value = 0; + RefreshShownValue(); + } + + private void SetupTemplate() + { + validTemplate = false; + + if (!m_Template) + { + Debug.LogError("The dropdown template is not assigned. The template needs to be assigned and must have a child GameObject with a Toggle component serving as the item.", this); + return; + } + + GameObject templateGo = m_Template.gameObject; + templateGo.SetActive(true); + Toggle itemToggle = m_Template.GetComponentInChildren<Toggle>(); + + validTemplate = true; + if (!itemToggle || itemToggle.transform == template) + { + validTemplate = false; + Debug.LogError("The dropdown template is not valid. The template must have a child GameObject with a Toggle component serving as the item.", template); + } + else if (!(itemToggle.transform.parent is RectTransform)) + { + validTemplate = false; + Debug.LogError("The dropdown template is not valid. The child GameObject with a Toggle component (the item) must have a RectTransform on its parent.", template); + } + else if (itemText != null && !itemText.transform.IsChildOf(itemToggle.transform)) + { + validTemplate = false; + Debug.LogError("The dropdown template is not valid. The Item Text must be on the item GameObject or children of it.", template); + } + else if (itemImage != null && !itemImage.transform.IsChildOf(itemToggle.transform)) + { + validTemplate = false; + Debug.LogError("The dropdown template is not valid. The Item Image must be on the item GameObject or children of it.", template); + } + + if (!validTemplate) + { + templateGo.SetActive(false); + return; + } + + DropdownItem item = itemToggle.gameObject.AddComponent<DropdownItem>(); + item.text = m_ItemText; + item.image = m_ItemImage; + item.toggle = itemToggle; + item.rectTransform = (RectTransform)itemToggle.transform; + + Canvas popupCanvas = GetOrAddComponent<Canvas>(templateGo); + popupCanvas.overrideSorting = true; + popupCanvas.sortingOrder = 30000; + + GetOrAddComponent<GraphicRaycaster>(templateGo); + GetOrAddComponent<CanvasGroup>(templateGo); + templateGo.SetActive(false); + + validTemplate = true; + } + + private static T GetOrAddComponent<T>(GameObject go) where T : Component + { + T comp = go.GetComponent<T>(); + if (!comp) + comp = go.AddComponent<T>(); + return comp; + } + + /// <summary> + /// Handling for when the dropdown is initially 'clicked'. Typically shows the dropdown + /// </summary> + /// <param name="eventData">The associated event data.</param> + public virtual void OnPointerClick(PointerEventData eventData) + { + Show(); + } + + /// <summary> + /// Handling for when the dropdown is selected and a submit event is processed. Typically shows the dropdown + /// </summary> + /// <param name="eventData">The associated event data.</param> + public virtual void OnSubmit(BaseEventData eventData) + { + Show(); + } + + /// <summary> + /// This will hide the dropdown list. + /// </summary> + /// <remarks> + /// Called by a BaseInputModule when a Cancel event occurs. + /// </remarks> + /// <param name="eventData">The associated event data.</param> + public virtual void OnCancel(BaseEventData eventData) + { + Hide(); + } + + /// <summary> + /// Show the dropdown. + /// + /// Plan for dropdown scrolling to ensure dropdown is contained within screen. + /// + /// We assume the Canvas is the screen that the dropdown must be kept inside. + /// This is always valid for screen space canvas modes. + /// For world space canvases we don't know how it's used, but it could be e.g. for an in-game monitor. + /// We consider it a fair constraint that the canvas must be big enough to contain dropdowns. + /// </summary> + public void Show() + { + if (!IsActive() || !IsInteractable() || m_Dropdown != null) + return; + + // Get root Canvas. + var list = TMP_ListPool<Canvas>.Get(); + gameObject.GetComponentsInParent(false, list); + if (list.Count == 0) + return; + + Canvas rootCanvas = list[list.Count - 1]; + for (int i = 0; i < list.Count; i++) + { + if (list[i].isRootCanvas) + { + rootCanvas = list[i]; + break; + } + } + + TMP_ListPool<Canvas>.Release(list); + + if (!validTemplate) + { + SetupTemplate(); + if (!validTemplate) + return; + } + + m_Template.gameObject.SetActive(true); + + // popupCanvas used to assume the root canvas had the default sorting Layer, next line fixes (case 958281 - [UI] Dropdown list does not copy the parent canvas layer when the panel is opened) + m_Template.GetComponent<Canvas>().sortingLayerID = rootCanvas.sortingLayerID; + + // Instantiate the drop-down template + m_Dropdown = CreateDropdownList(m_Template.gameObject); + m_Dropdown.name = "Dropdown List"; + m_Dropdown.SetActive(true); + + // Make drop-down RectTransform have same values as original. + RectTransform dropdownRectTransform = m_Dropdown.transform as RectTransform; + dropdownRectTransform.SetParent(m_Template.transform.parent, false); + + // Instantiate the drop-down list items + + // Find the dropdown item and disable it. + DropdownItem itemTemplate = m_Dropdown.GetComponentInChildren<DropdownItem>(); + + GameObject content = itemTemplate.rectTransform.parent.gameObject; + RectTransform contentRectTransform = content.transform as RectTransform; + itemTemplate.rectTransform.gameObject.SetActive(true); + + // Get the rects of the dropdown and item + Rect dropdownContentRect = contentRectTransform.rect; + Rect itemTemplateRect = itemTemplate.rectTransform.rect; + + // Calculate the visual offset between the item's edges and the background's edges + Vector2 offsetMin = itemTemplateRect.min - dropdownContentRect.min + (Vector2)itemTemplate.rectTransform.localPosition; + Vector2 offsetMax = itemTemplateRect.max - dropdownContentRect.max + (Vector2)itemTemplate.rectTransform.localPosition; + Vector2 itemSize = itemTemplateRect.size; + + m_Items.Clear(); + + Toggle prev = null; + for (int i = 0; i < options.Count; ++i) + { + OptionData data = options[i]; + DropdownItem item = AddItem(data, value == i, itemTemplate, m_Items); + if (item == null) + continue; + + // Automatically set up a toggle state change listener + item.toggle.isOn = value == i; + item.toggle.onValueChanged.AddListener(x => OnSelectItem(item.toggle)); + + // Select current option + if (item.toggle.isOn) + item.toggle.Select(); + + // Automatically set up explicit navigation + if (prev != null) + { + Navigation prevNav = prev.navigation; + Navigation toggleNav = item.toggle.navigation; + prevNav.mode = Navigation.Mode.Explicit; + toggleNav.mode = Navigation.Mode.Explicit; + + prevNav.selectOnDown = item.toggle; + prevNav.selectOnRight = item.toggle; + toggleNav.selectOnLeft = prev; + toggleNav.selectOnUp = prev; + + prev.navigation = prevNav; + item.toggle.navigation = toggleNav; + } + prev = item.toggle; + } + + // Reposition all items now that all of them have been added + Vector2 sizeDelta = contentRectTransform.sizeDelta; + sizeDelta.y = itemSize.y * m_Items.Count + offsetMin.y - offsetMax.y; + contentRectTransform.sizeDelta = sizeDelta; + + float extraSpace = dropdownRectTransform.rect.height - contentRectTransform.rect.height; + if (extraSpace > 0) + dropdownRectTransform.sizeDelta = new Vector2(dropdownRectTransform.sizeDelta.x, dropdownRectTransform.sizeDelta.y - extraSpace); + + // Invert anchoring and position if dropdown is partially or fully outside of canvas rect. + // Typically this will have the effect of placing the dropdown above the button instead of below, + // but it works as inversion regardless of initial setup. + Vector3[] corners = new Vector3[4]; + dropdownRectTransform.GetWorldCorners(corners); + + RectTransform rootCanvasRectTransform = rootCanvas.transform as RectTransform; + Rect rootCanvasRect = rootCanvasRectTransform.rect; + for (int axis = 0; axis < 2; axis++) + { + bool outside = false; + for (int i = 0; i < 4; i++) + { + Vector3 corner = rootCanvasRectTransform.InverseTransformPoint(corners[i]); + if ((corner[axis] < rootCanvasRect.min[axis] && !Mathf.Approximately(corner[axis], rootCanvasRect.min[axis])) || + (corner[axis] > rootCanvasRect.max[axis] && !Mathf.Approximately(corner[axis], rootCanvasRect.max[axis]))) + { + outside = true; + break; + } + } + if (outside) + RectTransformUtility.FlipLayoutOnAxis(dropdownRectTransform, axis, false, false); + } + + for (int i = 0; i < m_Items.Count; i++) + { + RectTransform itemRect = m_Items[i].rectTransform; + itemRect.anchorMin = new Vector2(itemRect.anchorMin.x, 0); + itemRect.anchorMax = new Vector2(itemRect.anchorMax.x, 0); + itemRect.anchoredPosition = new Vector2(itemRect.anchoredPosition.x, offsetMin.y + itemSize.y * (m_Items.Count - 1 - i) + itemSize.y * itemRect.pivot.y); + itemRect.sizeDelta = new Vector2(itemRect.sizeDelta.x, itemSize.y); + } + + // Fade in the popup + AlphaFadeList(0.15f, 0f, 1f); + + // Make drop-down template and item template inactive + m_Template.gameObject.SetActive(false); + itemTemplate.gameObject.SetActive(false); + + m_Blocker = CreateBlocker(rootCanvas); + } + + /// <summary> + /// Create a blocker that blocks clicks to other controls while the dropdown list is open. + /// </summary> + /// <remarks> + /// Override this method to implement a different way to obtain a blocker GameObject. + /// </remarks> + /// <param name="rootCanvas">The root canvas the dropdown is under.</param> + /// <returns>The created blocker object</returns> + protected virtual GameObject CreateBlocker(Canvas rootCanvas) + { + // Create blocker GameObject. + GameObject blocker = new GameObject("Blocker"); + + // Setup blocker RectTransform to cover entire root canvas area. + RectTransform blockerRect = blocker.AddComponent<RectTransform>(); + blockerRect.SetParent(rootCanvas.transform, false); + blockerRect.anchorMin = Vector3.zero; + blockerRect.anchorMax = Vector3.one; + blockerRect.sizeDelta = Vector2.zero; + + // Make blocker be in separate canvas in same layer as dropdown and in layer just below it. + Canvas blockerCanvas = blocker.AddComponent<Canvas>(); + blockerCanvas.overrideSorting = true; + Canvas dropdownCanvas = m_Dropdown.GetComponent<Canvas>(); + blockerCanvas.sortingLayerID = dropdownCanvas.sortingLayerID; + blockerCanvas.sortingOrder = dropdownCanvas.sortingOrder - 1; + + // Add raycaster since it's needed to block. + blocker.AddComponent<GraphicRaycaster>(); + + // Add image since it's needed to block, but make it clear. + Image blockerImage = blocker.AddComponent<Image>(); + blockerImage.color = Color.clear; + + // Add button since it's needed to block, and to close the dropdown when blocking area is clicked. + Button blockerButton = blocker.AddComponent<Button>(); + blockerButton.onClick.AddListener(Hide); + + return blocker; + } + + /// <summary> + /// Convenience method to explicitly destroy the previously generated blocker object + /// </summary> + /// <remarks> + /// Override this method to implement a different way to dispose of a blocker GameObject that blocks clicks to other controls while the dropdown list is open. + /// </remarks> + /// <param name="blocker">The blocker object to destroy.</param> + protected virtual void DestroyBlocker(GameObject blocker) + { + Destroy(blocker); + } + + /// <summary> + /// Create the dropdown list to be shown when the dropdown is clicked. The dropdown list should correspond to the provided template GameObject, equivalent to instantiating a copy of it. + /// </summary> + /// <remarks> + /// Override this method to implement a different way to obtain a dropdown list GameObject. + /// </remarks> + /// <param name="template">The template to create the dropdown list from.</param> + /// <returns>The created drop down list gameobject.</returns> + protected virtual GameObject CreateDropdownList(GameObject template) + { + return (GameObject)Instantiate(template); + } + + /// <summary> + /// Convenience method to explicitly destroy the previously generated dropdown list + /// </summary> + /// <remarks> + /// Override this method to implement a different way to dispose of a dropdown list GameObject. + /// </remarks> + /// <param name="dropdownList">The dropdown list GameObject to destroy</param> + protected virtual void DestroyDropdownList(GameObject dropdownList) + { + Destroy(dropdownList); + } + + /// <summary> + /// Create a dropdown item based upon the item template. + /// </summary> + /// <remarks> + /// Override this method to implement a different way to obtain an option item. + /// The option item should correspond to the provided template DropdownItem and its GameObject, equivalent to instantiating a copy of it. + /// </remarks> + /// <param name="itemTemplate">e template to create the option item from.</param> + /// <returns>The created dropdown item component</returns> + protected virtual DropdownItem CreateItem(DropdownItem itemTemplate) + { + return (DropdownItem)Instantiate(itemTemplate); + } + + /// <summary> + /// Convenience method to explicitly destroy the previously generated Items. + /// </summary> + /// <remarks> + /// Override this method to implement a different way to dispose of an option item. + /// Likely no action needed since destroying the dropdown list destroys all contained items as well. + /// </remarks> + /// <param name="item">The Item to destroy.</param> + protected virtual void DestroyItem(DropdownItem item) { } + + // Add a new drop-down list item with the specified values. + private DropdownItem AddItem(OptionData data, bool selected, DropdownItem itemTemplate, List<DropdownItem> items) + { + // Add a new item to the dropdown. + DropdownItem item = CreateItem(itemTemplate); + item.rectTransform.SetParent(itemTemplate.rectTransform.parent, false); + + item.gameObject.SetActive(true); + item.gameObject.name = "Item " + items.Count + (data.text != null ? ": " + data.text : ""); + + if (item.toggle != null) + { + item.toggle.isOn = false; + } + + // Set the item's data + if (item.text) + item.text.text = data.text; + if (item.image) + { + item.image.sprite = data.image; + item.image.enabled = (item.image.sprite != null); + } + + items.Add(item); + return item; + } + + private void AlphaFadeList(float duration, float alpha) + { + CanvasGroup group = m_Dropdown.GetComponent<CanvasGroup>(); + AlphaFadeList(duration, group.alpha, alpha); + } + + private void AlphaFadeList(float duration, float start, float end) + { + if (end.Equals(start)) + return; + + FloatTween tween = new FloatTween { duration = duration, startValue = start, targetValue = end }; + tween.AddOnChangedCallback(SetAlpha); + tween.ignoreTimeScale = true; + m_AlphaTweenRunner.StartTween(tween); + } + + private void SetAlpha(float alpha) + { + if (!m_Dropdown) + return; + CanvasGroup group = m_Dropdown.GetComponent<CanvasGroup>(); + group.alpha = alpha; + } + + /// <summary> + /// Hide the dropdown list. I.e. close it. + /// </summary> + public void Hide() + { + if (m_Dropdown != null) + { + AlphaFadeList(0.15f, 0f); + + // User could have disabled the dropdown during the OnValueChanged call. + if (IsActive()) + StartCoroutine(DelayedDestroyDropdownList(0.15f)); + } + if (m_Blocker != null) + DestroyBlocker(m_Blocker); + m_Blocker = null; + Select(); + } + + private IEnumerator DelayedDestroyDropdownList(float delay) + { + yield return new WaitForSecondsRealtime(delay); + ImmediateDestroyDropdownList(); + } + + private void ImmediateDestroyDropdownList() + { + for (int i = 0; i < m_Items.Count; i++) + { + if (m_Items[i] != null) + DestroyItem(m_Items[i]); + } + m_Items.Clear(); + + if (m_Dropdown != null) + DestroyDropdownList(m_Dropdown); + m_Dropdown = null; + } + + // Change the value and hide the dropdown. + private void OnSelectItem(Toggle toggle) + { + if (!toggle.isOn) + toggle.isOn = true; + + int selectedIndex = -1; + Transform tr = toggle.transform; + Transform parent = tr.parent; + for (int i = 0; i < parent.childCount; i++) + { + if (parent.GetChild(i) == tr) + { + // Subtract one to account for template child. + selectedIndex = i - 1; + break; + } + } + + if (selectedIndex < 0) + return; + + value = selectedIndex; + Hide(); + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Dropdown.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Dropdown.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..9b8a861096cbed00c7ca49ab4335920fa68af51e --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Dropdown.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7b743370ac3e4ec2a1668f5455a8ef8a +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: a7ec9e7ad8b847b7ae4510af83c5d868, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_EditorResourceManager.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_EditorResourceManager.cs new file mode 100644 index 0000000000000000000000000000000000000000..cbe4871e1524dd37865eef48bca67ea29574f107 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_EditorResourceManager.cs @@ -0,0 +1,142 @@ +#if UNITY_EDITOR + +using System.Collections.Generic; +using UnityEngine; +using UnityEditor; + + +namespace TMPro +{ + public class TMP_EditorResourceManager + { + private static TMP_EditorResourceManager s_Instance; + + private readonly List<Object> m_ObjectUpdateQueue = new List<Object>(); + private Dictionary<int, int> m_ObjectUpdateQueueLookup = new Dictionary<int, int>(); + + private readonly List<Object> m_ObjectReImportQueue = new List<Object>(); + private Dictionary<int, int> m_ObjectReImportQueueLookup = new Dictionary<int, int>(); + + /// <summary> + /// Get a singleton instance of the manager. + /// </summary> + public static TMP_EditorResourceManager instance + { + get + { + if (s_Instance == null) + s_Instance = new TMP_EditorResourceManager(); + + return s_Instance; + } + } + + /// <summary> + /// Register to receive rendering callbacks. + /// </summary> + private TMP_EditorResourceManager() + { + Camera.onPostRender += OnCameraPostRender; + } + + + void OnCameraPostRender(Camera cam) + { + // Exclude the PreRenderCamera + if (cam.cameraType == CameraType.Preview) + return; + + DoUpdates(); + } + + /// <summary> + /// Register resource for re-import. + /// </summary> + /// <param name="obj"></param> + internal static void RegisterResourceForReimport(Object obj) + { + instance.InternalRegisterResourceForReimport(obj); + } + + private void InternalRegisterResourceForReimport(Object obj) + { + int id = obj.GetInstanceID(); + + if (m_ObjectReImportQueueLookup.ContainsKey(id)) + return; + + m_ObjectReImportQueueLookup[id] = id; + m_ObjectReImportQueue.Add(obj); + + return; + } + + /// <summary> + /// Register resource to be updated. + /// </summary> + /// <param name="textObject"></param> + internal static void RegisterResourceForUpdate(Object obj) + { + instance.InternalRegisterResourceForUpdate(obj); + } + + private void InternalRegisterResourceForUpdate(Object obj) + { + int id = obj.GetInstanceID(); + + if (m_ObjectUpdateQueueLookup.ContainsKey(id)) + return; + + m_ObjectUpdateQueueLookup[id] = id; + m_ObjectUpdateQueue.Add(obj); + + return; + } + + + void DoUpdates() + { + // Handle objects that need updating + int objUpdateCount = m_ObjectUpdateQueue.Count; + + for (int i = 0; i < objUpdateCount; i++) + { + Object obj = m_ObjectUpdateQueue[i]; + if (obj != null) + { + EditorUtility.SetDirty(obj); + } + } + + if (objUpdateCount > 0) + { + //Debug.Log("Saving assets"); + //AssetDatabase.SaveAssets(); + + m_ObjectUpdateQueue.Clear(); + m_ObjectUpdateQueueLookup.Clear(); + } + + // Handle objects that need re-importing + int objReImportCount = m_ObjectReImportQueue.Count; + + for (int i = 0; i < objReImportCount; i++) + { + Object obj = m_ObjectReImportQueue[i]; + if (obj != null) + { + //Debug.Log("Re-importing [" + obj.name + "]"); + AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(obj)); + } + } + + if (objReImportCount > 0) + { + m_ObjectReImportQueue.Clear(); + m_ObjectReImportQueueLookup.Clear(); + } + } + + } +} +#endif diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_EditorResourceManager.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_EditorResourceManager.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..0759a53a8df3b3aa45fd874121f6ec357a184fb9 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_EditorResourceManager.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6b259c4003a802847b9ada90744e34c5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontAsset.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontAsset.cs new file mode 100644 index 0000000000000000000000000000000000000000..aef3087fc18d437c9da322a19a982e82f817fa7e --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontAsset.cs @@ -0,0 +1,1974 @@ +using System; +using UnityEngine; +using UnityEngine.Serialization; +using UnityEngine.TextCore; +using UnityEngine.TextCore.LowLevel; +using UnityEngine.Profiling; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + + +namespace TMPro +{ + public enum AtlasPopulationMode + { + Static = 0x0, + Dynamic = 0x1, + } + + + [Serializable] + public class TMP_FontAsset : TMP_Asset + { + /// <summary> + /// The version of the font asset class. + /// Version 1.1.0 adds support for the new TextCore.FontEngine and Dynamic SDF system. + /// </summary> + public string version + { + get { return m_Version; } + internal set { m_Version = value; } + } + [SerializeField] + private string m_Version; + + /// <summary> + /// This field is set when the font asset is first created. + /// </summary> + [SerializeField] + internal string m_SourceFontFileGUID; + + #if UNITY_EDITOR + /// <summary> + /// Persistent reference to the source font file maintained in the editor. + /// </summary> + [SerializeField] + internal Font m_SourceFontFile_EditorRef; + #endif + + /// <summary> + /// Source font file when atlas population mode is set to dynamic. Null when the atlas population mode is set to static. + /// </summary> + public Font sourceFontFile + { + get { return m_SourceFontFile; } + internal set { m_SourceFontFile = value; } + } + [SerializeField] + private Font m_SourceFontFile; + + public AtlasPopulationMode atlasPopulationMode + { + get { return m_AtlasPopulationMode; } + + set + { + m_AtlasPopulationMode = value; + + #if UNITY_EDITOR + if (m_AtlasPopulationMode == AtlasPopulationMode.Static) + m_SourceFontFile = null; + else if (m_AtlasPopulationMode == AtlasPopulationMode.Dynamic) + m_SourceFontFile = m_SourceFontFile_EditorRef; + #endif + } + } + [SerializeField] + private AtlasPopulationMode m_AtlasPopulationMode; + + + /// <summary> + /// Information about the font face. + /// </summary> + public FaceInfo faceInfo + { + get { return m_FaceInfo; } + internal set { m_FaceInfo = value; } + } + [SerializeField] + private FaceInfo m_FaceInfo; + + + /// <summary> + /// List of glyphs contained in the font asset. + /// </summary> + public List<Glyph> glyphTable + { + get { return m_GlyphTable; } + internal set { m_GlyphTable = value; } + } + [SerializeField] + private List<Glyph> m_GlyphTable = new List<Glyph>(); + + /// <summary> + /// Dictionary used to lookup glyphs contained in the font asset by their index. + /// </summary> + public Dictionary<uint, Glyph> glyphLookupTable + { + get + { + if (m_GlyphLookupDictionary == null) + ReadFontAssetDefinition(); + + return m_GlyphLookupDictionary; + } + } + private Dictionary<uint, Glyph> m_GlyphLookupDictionary; + + + /// <summary> + /// List containing the characters of the given font asset. + /// </summary> + public List<TMP_Character> characterTable + { + get { return m_CharacterTable; } + internal set { m_CharacterTable = value; } + } + [SerializeField] + private List<TMP_Character> m_CharacterTable = new List<TMP_Character>(); + + /// <summary> + /// Dictionary used to lookup characters contained in the font asset by their unicode values. + /// </summary> + public Dictionary<uint, TMP_Character> characterLookupTable + { + get + { + if (m_CharacterLookupDictionary == null) + ReadFontAssetDefinition(); + + + return m_CharacterLookupDictionary; + } + } + private Dictionary<uint, TMP_Character> m_CharacterLookupDictionary; + + + /// <summary> + /// The font atlas used by this font asset. + /// This is always the texture at index [0] of the fontAtlasTextures. + /// </summary> + public Texture2D atlasTexture + { + get + { + if (m_AtlasTexture == null) + { + m_AtlasTexture = atlasTextures[0]; + } + + return m_AtlasTexture; + } + } + private Texture2D m_AtlasTexture; + + /// <summary> + /// Array of atlas textures that contain the glyphs used by this font asset. + /// </summary> + public Texture2D[] atlasTextures + { + get + { + if (m_AtlasTextures == null) + { + // + } + + return m_AtlasTextures; + } + + set + { + m_AtlasTextures = value; + } + } + [SerializeField] + private Texture2D[] m_AtlasTextures; + + /// <summary> + /// Index of the font atlas texture that still has available space to add new glyphs. + /// </summary> + [SerializeField] + internal int m_AtlasTextureIndex; + + /// <summary> + /// List of spaces occupied by glyphs in a given texture. + /// </summary> + internal List<GlyphRect> usedGlyphRects + { + get { return m_UsedGlyphRects; } + set { m_UsedGlyphRects = value; } + } + [SerializeField] + private List<GlyphRect> m_UsedGlyphRects; + + /// <summary> + /// List of spaces available in a given texture to add new glyphs. + /// </summary> + internal List<GlyphRect> freeGlyphRects + { + get { return m_FreeGlyphRects; } + set { m_FreeGlyphRects = value; } + } + [SerializeField] + private List<GlyphRect> m_FreeGlyphRects; + + /// <summary> + /// The general information about the font. + /// This property and FaceInfo_Legacy type are not longer used in version 1.1.0 of the font asset. + /// </summary> + [Obsolete("The fontInfo property and underlying type is now obsolete. Please use the faceInfo property and FaceInfo type instead.")] + public FaceInfo_Legacy fontInfo + { + get { return m_fontInfo; } + } + + [SerializeField] + private FaceInfo_Legacy m_fontInfo = null; + + /// <summary> + /// + /// </summary> + [SerializeField] + public Texture2D atlas; // Should add a property to make this read-only. + + /// <summary> + /// The width of the atlas texture(s) used by this font asset. + /// </summary> + public int atlasWidth + { + get { return m_AtlasWidth; } + internal set { m_AtlasWidth = value; } + } + [SerializeField] + private int m_AtlasWidth; + + /// <summary> + /// The height of the atlas texture(s) used by this font asset. + /// </summary> + public int atlasHeight + { + get { return m_AtlasHeight; } + internal set { m_AtlasHeight = value; } + } + [SerializeField] + private int m_AtlasHeight; + + /// <summary> + /// The padding used between glyphs contained in the atlas texture(s) used by this font asset. + /// </summary> + public int atlasPadding + { + get { return m_AtlasPadding; } + internal set { m_AtlasPadding = value; } + } + [SerializeField] + private int m_AtlasPadding; + + public GlyphRenderMode atlasRenderMode + { + get { return m_AtlasRenderMode; } + internal set { m_AtlasRenderMode = value; } + } + [SerializeField] + private GlyphRenderMode m_AtlasRenderMode; + + // Legacy field that will eventually be removed. + [SerializeField] + internal List<TMP_Glyph> m_glyphInfoList; + + [SerializeField] + [FormerlySerializedAs("m_kerningInfo")] + internal KerningTable m_KerningTable = new KerningTable(); + + /// <summary> + /// Table containing the various font features of this font asset. + /// </summary> + public TMP_FontFeatureTable fontFeatureTable + { + get { return m_FontFeatureTable; } + internal set { m_FontFeatureTable = value; } + } + [SerializeField] + private TMP_FontFeatureTable m_FontFeatureTable = new TMP_FontFeatureTable(); + + // Legacy field that will eventually be removed + [SerializeField] + #pragma warning disable 0649 + private List<TMP_FontAsset> fallbackFontAssets; + + /// <summary> + /// List containing the Fallback font assets for this font. + /// </summary> + public List<TMP_FontAsset> fallbackFontAssetTable + { + get { return m_FallbackFontAssetTable; } + set { m_FallbackFontAssetTable = value; } + } + [SerializeField] + public List<TMP_FontAsset> m_FallbackFontAssetTable; + + /// <summary> + /// The settings used in the Font Asset Creator when this font asset was created or edited. + /// </summary> + public FontAssetCreationSettings creationSettings + { + get { return m_CreationSettings; } + set { m_CreationSettings = value; } + } + [SerializeField] + internal FontAssetCreationSettings m_CreationSettings; + + /// <summary> + /// Array containing font assets to be used as alternative typefaces for the various potential font weights of this font asset. + /// </summary> + public TMP_FontWeightPair[] fontWeightTable + { + get { return m_FontWeightTable; } + internal set { m_FontWeightTable = value; } + } + [SerializeField] + private TMP_FontWeightPair[] m_FontWeightTable = new TMP_FontWeightPair[10]; + + // FONT WEIGHTS + /// <summary> + /// Font weights used by font asset prior to version 1.1.0. + /// This is legacy and will be removed at some point in the future. + /// </summary> + [SerializeField] + private TMP_FontWeightPair[] fontWeights = null; + + //private int[] m_characterSet; // Array containing all the characters in this font asset. + + /// <summary> + /// Defines the dilation of the text when using regular style. + /// </summary> + public float normalStyle = 0; + + /// <summary> + /// The spacing between characters when using regular style. + /// </summary> + public float normalSpacingOffset = 0; + + /// <summary> + /// Defines the dilation of the text when using bold style. + /// </summary> + public float boldStyle = 0.75f; + + /// <summary> + /// The spacing between characters when using regular style. + /// </summary> + public float boldSpacing = 7f; + + /// <summary> + /// Defines the slant of the text when using italic style. + /// </summary> + public byte italicStyle = 35; + + public byte tabSize = 10; + + private byte m_oldTabSize; + internal bool m_IsFontAssetLookupTablesDirty = false; + + /// <summary> + /// Create new instance of a font asset using default settings. + /// </summary> + /// <param name="font"></param> + /// <returns></returns> + public static TMP_FontAsset CreateFontAsset(Font font) + { + return CreateFontAsset(font, 90, 9, GlyphRenderMode.SDFAA, 1024, 1024, AtlasPopulationMode.Dynamic); + } + + /// <summary> + /// Create new instance of a font asset. + /// </summary> + /// <param name="font">The source font file.</param> + /// <param name="samplingPointSize">The sampling point size.</param> + /// <param name="atlasPadding">The padding / spread between individual glyphs in the font asset.</param> + /// <param name="renderMode"></param> + /// <param name="atlasWidth">The atlas texture width.</param> + /// <param name="atlasHeight">The atlas texture height.</param> + /// <param name="atlasPopulationMode"></param> + /// <returns></returns> + public static TMP_FontAsset CreateFontAsset(Font font, int samplingPointSize, int atlasPadding, GlyphRenderMode renderMode, int atlasWidth, int atlasHeight, AtlasPopulationMode atlasPopulationMode = AtlasPopulationMode.Dynamic) + { + TMP_FontAsset fontAsset = ScriptableObject.CreateInstance<TMP_FontAsset>(); + + fontAsset.m_Version = "1.1.0"; + + // Set face information + FontEngine.InitializeFontEngine(); + FontEngine.LoadFontFace(font, samplingPointSize); + + fontAsset.faceInfo = FontEngine.GetFaceInfo(); + + // Set font reference and GUID + if (atlasPopulationMode == AtlasPopulationMode.Dynamic) + fontAsset.sourceFontFile = font; + + // Set persistent reference to source font file in the Editor only. + #if UNITY_EDITOR + string guid; + long localID; + + UnityEditor.AssetDatabase.TryGetGUIDAndLocalFileIdentifier(font, out guid, out localID); + fontAsset.m_SourceFontFileGUID = guid; + fontAsset.m_SourceFontFile_EditorRef = font; + #endif + + fontAsset.atlasPopulationMode = atlasPopulationMode; + + fontAsset.atlasWidth = atlasWidth; + fontAsset.atlasHeight = atlasHeight; + fontAsset.atlasPadding = atlasPadding; + fontAsset.atlasRenderMode = renderMode; + + // Initialize array for the font atlas textures. + fontAsset.atlasTextures = new Texture2D[1]; + + // Create and add font atlas texture. + Texture2D texture = new Texture2D(0, 0, TextureFormat.Alpha8, false); + + //texture.name = assetName + " Atlas"; + fontAsset.atlasTextures[0] = texture; + + // Add free rectangle of the size of the texture. + int packingModifier; + if (((GlyphRasterModes)renderMode & GlyphRasterModes.RASTER_MODE_BITMAP) == GlyphRasterModes.RASTER_MODE_BITMAP) + { + packingModifier = 0; + + // Optimize by adding static ref to shader. + Material tmp_material = new Material(ShaderUtilities.ShaderRef_MobileBitmap); + + //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); + + fontAsset.material = tmp_material; + } + else + { + packingModifier = 1; + + // Optimize by adding static ref to shader. + Material tmp_material = new Material(ShaderUtilities.ShaderRef_MobileSDF); + + //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; + } + + fontAsset.freeGlyphRects = new List<GlyphRect>() { new GlyphRect(0, 0, atlasWidth - packingModifier, atlasHeight - packingModifier) }; + fontAsset.usedGlyphRects = new List<GlyphRect>(); + + // TODO: Consider adding support for extracting glyph positioning data + + fontAsset.ReadFontAssetDefinition(); + + return fontAsset; + } + + + void Awake() + { + //Debug.Log("TMP Font Asset [" + this.name + "] with Version #" + m_Version + " has been enabled!"); + + // Check version number of font asset to see if it needs to be upgraded. + if (this.material != null && string.IsNullOrEmpty(m_Version)) + UpgradeFontAsset(); + } + + + #if UNITY_EDITOR + void OnValidate() + { + //if (m_oldTabSize != tabSize) + //{ + // m_oldTabSize = tabSize; + // ReadFontAssetDefinition(); + //} + + // Handle changes to atlas population mode + //if (m_AtlasPopulationMode == AtlasPopulationMode.Static) + // m_SourceFontFile = null; + //else + //{ + // string path = UnityEditor.AssetDatabase.GUIDToAssetPath(m_SourceFontFileGUID); + + // if (path != string.Empty) + // m_SourceFontFile = UnityEditor.AssetDatabase.LoadAssetAtPath<Font>(path); + //} + } + #endif + + /// <summary> + /// Read the various data tables of the font asset to populate its different dictionaries to allow for faster lookup of related font asset data. + /// </summary> + internal void InitializeDictionaryLookupTables() + { + // Create new instance of the glyph lookup dictionary or clear the existing one. + if (m_GlyphLookupDictionary == null) + m_GlyphLookupDictionary = new Dictionary<uint, Glyph>(); + else + m_GlyphLookupDictionary.Clear(); + + int glyphCount = m_GlyphTable.Count; + + // Initialize glyph index array or clear the existing one. + if (m_GlyphIndexList == null) + m_GlyphIndexList = new List<uint>(); + else + m_GlyphIndexList.Clear(); + + // Add the characters contained in the character table into the dictionary for faster lookup. + for (int i = 0; i < glyphCount; i++) + { + Glyph glyph = m_GlyphTable[i]; + + uint index = glyph.index; + + // TODO: Not sure it is necessary to check here. + if (m_GlyphLookupDictionary.ContainsKey(index) == false) + { + m_GlyphLookupDictionary.Add(index, glyph); + m_GlyphIndexList.Add(index); + } + } + + // Create new instance of the character lookup dictionary or clear the existing one. + if (m_CharacterLookupDictionary == null) + m_CharacterLookupDictionary = new Dictionary<uint, TMP_Character>(); + else + m_CharacterLookupDictionary.Clear(); + + // Add the characters contained in the character table into the dictionary for faster lookup. + for (int i = 0; i < m_CharacterTable.Count; i++) + { + TMP_Character character = m_CharacterTable[i]; + + uint unicode = character.unicode; + uint glyphIndex = character.glyphIndex; + + if (m_CharacterLookupDictionary.ContainsKey(unicode) == false) + m_CharacterLookupDictionary.Add(unicode, character); + + if (m_GlyphLookupDictionary.ContainsKey(glyphIndex)) + { + character.glyph = m_GlyphLookupDictionary[glyphIndex]; + } + } + + // Upgrade Glyph Adjustment Table to the new Font Feature table and Glyph Pair Adjustment Records + if (m_KerningTable != null && m_KerningTable.kerningPairs != null && m_KerningTable.kerningPairs.Count > 0) + UpgradeGlyphAdjustmentTableToFontFeatureTable(); + + // Read Font Features which will include kerning data. + if (m_FontFeatureTable.m_GlyphPairAdjustmentRecordLookupDictionary == null) + m_FontFeatureTable.m_GlyphPairAdjustmentRecordLookupDictionary = new Dictionary<long, TMP_GlyphPairAdjustmentRecord>(); + else + m_FontFeatureTable.m_GlyphPairAdjustmentRecordLookupDictionary.Clear(); + + List<TMP_GlyphPairAdjustmentRecord> glyphPairAdjustmentRecords = m_FontFeatureTable.m_GlyphPairAdjustmentRecords; + if (glyphPairAdjustmentRecords != null) + { + for (int i = 0; i < glyphPairAdjustmentRecords.Count; i++) + { + TMP_GlyphPairAdjustmentRecord record = glyphPairAdjustmentRecords[i]; + + long key = new GlyphPairKey(record).key; + + m_FontFeatureTable.m_GlyphPairAdjustmentRecordLookupDictionary.Add(key, record); + } + } + } + + + /// <summary> + /// + /// </summary> + public void ReadFontAssetDefinition() + { + //Debug.Log("Reading Font Definition for " + this.name + "."); + + // Check version number of font asset to see if it needs to be upgraded. + if (this.material != null && string.IsNullOrEmpty(m_Version)) + UpgradeFontAsset(); + + // Initialize lookup tables for characters and glyphs. + InitializeDictionaryLookupTables(); + + // Add Tab char(9) to Dictionary. + if (m_CharacterLookupDictionary.ContainsKey(9) == false) + { + Glyph glyph = new Glyph(0, new GlyphMetrics(0, 0, 0, 0, m_FaceInfo.tabWidth * tabSize), GlyphRect.zero, 1.0f, 0); + m_CharacterLookupDictionary.Add(9, new TMP_Character(9, glyph)); + } + + // Add Linefeed LF char(10) and Carriage Return CR char(13) + if (m_CharacterLookupDictionary.ContainsKey(10) == false) + { + Glyph glyph = new Glyph(0, new GlyphMetrics(10, 0, 0, 0, 0), GlyphRect.zero, 1.0f, 0); + m_CharacterLookupDictionary.Add(10, new TMP_Character(10, glyph)); + + if (!m_CharacterLookupDictionary.ContainsKey(13)) + m_CharacterLookupDictionary.Add(13, new TMP_Character(13, glyph)); + } + + // Add Zero Width Space 8203 (0x200B) + if (m_CharacterLookupDictionary.ContainsKey(8203) == false) + { + Glyph glyph = new Glyph(0, new GlyphMetrics(0, 0, 0, 0, 0), GlyphRect.zero, 1.0f, 0); + m_CharacterLookupDictionary.Add(8203, new TMP_Character(8203, glyph)); + } + + // Add Zero Width Non-Breaking Space 8288 (0x2060) + if (m_CharacterLookupDictionary.ContainsKey(8288) == false) + { + Glyph glyph = new Glyph(0, new GlyphMetrics(0, 0, 0, 0, 0), GlyphRect.zero, 1.0f, 0); + m_CharacterLookupDictionary.Add(8288, new TMP_Character(8288, glyph)); + } + + // Add Non-Breaking Hyphen 8209 (0x2011) + if (m_CharacterLookupDictionary.ContainsKey(8209) == false) + { + TMP_Character character; + + if (m_CharacterLookupDictionary.TryGetValue(45, out character)) + m_CharacterLookupDictionary.Add(8209, new TMP_Character(8209, character.glyph)); + } + + + // Set Cap Height + if (m_FaceInfo.capLine == 0 && m_CharacterLookupDictionary.ContainsKey(72)) + { + uint glyphIndex = m_CharacterLookupDictionary[72].glyphIndex; + m_FaceInfo.capLine = m_GlyphLookupDictionary[glyphIndex].metrics.horizontalBearingY; + } + + // Adjust Font Scale for compatibility reasons + if (m_FaceInfo.scale == 0) + m_FaceInfo.scale = 1.0f; + + // Set Strikethrough Offset (if needed) + if (m_FaceInfo.strikethroughOffset == 0) + m_FaceInfo.strikethroughOffset = m_FaceInfo.capLine / 2.5f; + + // Set Padding value for legacy font assets. + if (m_AtlasPadding == 0) + { + if (material.HasProperty(ShaderUtilities.ID_GradientScale)) + m_AtlasPadding = (int)material.GetFloat(ShaderUtilities.ID_GradientScale) - 1; + } + + // Compute Hashcode for the font asset name + hashCode = TMP_TextUtilities.GetSimpleHashCode(this.name); + + // Compute Hashcode for the material name + materialHashCode = TMP_TextUtilities.GetSimpleHashCode(material.name); + + m_IsFontAssetLookupTablesDirty = false; + } + + + /// <summary> + /// Sort the Character table by Unicode values. + /// </summary> + internal void SortCharacterTable() + { + if (m_CharacterTable != null && m_CharacterTable.Count > 0) + m_CharacterTable = m_CharacterTable.OrderBy(c => c.unicode).ToList(); + } + + /// <summary> + /// Sort the Glyph table by index values. + /// </summary> + internal void SortGlyphTable() + { + if (m_GlyphTable != null && m_GlyphTable.Count > 0) + m_GlyphTable = m_GlyphTable.OrderBy(c => c.index).ToList(); + } + + /// <summary> + /// Sort both glyph and character tables. + /// </summary> + internal void SortGlyphAndCharacterTables() + { + SortGlyphTable(); + SortCharacterTable(); + } + + + /// <summary> + /// Function to check if a certain character exists in the font asset. + /// </summary> + /// <param name="character"></param> + /// <returns></returns> + public bool HasCharacter(int character) + { + if (m_CharacterLookupDictionary == null) + return false; + + if (m_CharacterLookupDictionary.ContainsKey((uint)character)) + return true; + + return false; + } + + + /// <summary> + /// Function to check if a certain character exists in the font asset. + /// </summary> + /// <param name="character"></param> + /// <returns></returns> + public bool HasCharacter(char character) + { + if (m_CharacterLookupDictionary == null) + return false; + + if (m_CharacterLookupDictionary.ContainsKey(character)) + return true; + + return false; + } + + + /// <summary> + /// Function to check if a character is contained in the font asset with the option to also check through fallback font assets. + /// </summary> + /// <param name="character"></param> + /// <param name="searchFallbacks"></param> + /// <returns></returns> + public bool HasCharacter(char character, bool searchFallbacks) + { + // Read font asset definition if it hasn't already been done. + if (m_CharacterLookupDictionary == null) + { + ReadFontAssetDefinition(); + + if (m_CharacterLookupDictionary == null) + return false; + } + + // Check font asset + if (m_CharacterLookupDictionary.ContainsKey(character)) + return true; + + // Check if font asset is dynamic and if so try to add the requested character to it. + if (m_AtlasPopulationMode == AtlasPopulationMode.Dynamic) + { + TMP_Character returnedCharacter; + + if (TryAddCharacterInternal(character, out returnedCharacter)) + return true; + } + + if (searchFallbacks) + { + // Check font asset fallbacks + if (fallbackFontAssetTable != null && fallbackFontAssetTable.Count > 0) + { + for (int i = 0; i < fallbackFontAssetTable.Count && fallbackFontAssetTable[i] != null; i++) + { + if (fallbackFontAssetTable[i].HasCharacter_Internal(character, searchFallbacks)) + return true; + } + } + + // Check general fallback font assets. + if (TMP_Settings.fallbackFontAssets != null && TMP_Settings.fallbackFontAssets.Count > 0) + { + for (int i = 0; i < TMP_Settings.fallbackFontAssets.Count && TMP_Settings.fallbackFontAssets[i] != null; i++) + { + if (TMP_Settings.fallbackFontAssets[i].m_CharacterLookupDictionary == null) + TMP_Settings.fallbackFontAssets[i].ReadFontAssetDefinition(); + + if (TMP_Settings.fallbackFontAssets[i].m_CharacterLookupDictionary != null && TMP_Settings.fallbackFontAssets[i].HasCharacter_Internal(character, searchFallbacks)) + return true; + } + } + + // Check TMP Settings Default Font Asset + if (TMP_Settings.defaultFontAsset != null) + { + if (TMP_Settings.defaultFontAsset.m_CharacterLookupDictionary == null) + TMP_Settings.defaultFontAsset.ReadFontAssetDefinition(); + + if (TMP_Settings.defaultFontAsset.m_CharacterLookupDictionary != null && TMP_Settings.defaultFontAsset.HasCharacter_Internal(character, searchFallbacks)) + return true; + } + } + + return false; + } + + + /// <summary> + /// Function to check if a character is contained in a font asset with the option to also check through fallback font assets. + /// This private implementation does not search the fallback font asset in the TMP Settings file. + /// </summary> + /// <param name="character"></param> + /// <param name="searchFallbacks"></param> + /// <returns></returns> + bool HasCharacter_Internal(char character, bool searchFallbacks) + { + // Read font asset definition if it hasn't already been done. + if (m_CharacterLookupDictionary == null) + { + ReadFontAssetDefinition(); + + if (m_CharacterLookupDictionary == null) + return false; + } + + // Check font asset + if (m_CharacterLookupDictionary.ContainsKey(character)) + return true; + + if (searchFallbacks) + { + // Check Font Asset Fallback fonts. + if (fallbackFontAssetTable != null && fallbackFontAssetTable.Count > 0) + { + for (int i = 0; i < fallbackFontAssetTable.Count && fallbackFontAssetTable[i] != null; i++) + { + if (fallbackFontAssetTable[i].HasCharacter_Internal(character, searchFallbacks)) + return true; + } + } + } + + return false; + } + + + /// <summary> + /// Function to check if certain characters exists in the font asset. Function returns a list of missing characters. + /// </summary> + /// <param name="character"></param> + /// <returns></returns> + public bool HasCharacters(string text, out List<char> missingCharacters) + { + if (m_CharacterLookupDictionary == null) + { + missingCharacters = null; + return false; + } + + missingCharacters = new List<char>(); + + for (int i = 0; i < text.Length; i++) + { + if (!m_CharacterLookupDictionary.ContainsKey(text[i])) + missingCharacters.Add(text[i]); + } + + if (missingCharacters.Count == 0) + return true; + + return false; + } + + + /// <summary> + /// Function to check if certain characters exists in the font asset. Function returns false if any characters are missing. + /// </summary> + /// <param name="text">String containing the characters to check</param> + /// <returns></returns> + public bool HasCharacters(string text) + { + if (m_CharacterLookupDictionary == null) + return false; + + for (int i = 0; i < text.Length; i++) + { + if (!m_CharacterLookupDictionary.ContainsKey(text[i])) + return false; + } + + return true; + } + + + /// <summary> + /// Function to extract all the characters from a font asset. + /// </summary> + /// <param name="fontAsset"></param> + /// <returns></returns> + public static string GetCharacters(TMP_FontAsset fontAsset) + { + string characters = string.Empty; + + for (int i = 0; i < fontAsset.characterTable.Count; i++) + { + characters += (char)fontAsset.characterTable[i].unicode; + } + + return characters; + } + + + /// <summary> + /// Function which returns an array that contains all the characters from a font asset. + /// </summary> + /// <param name="fontAsset"></param> + /// <returns></returns> + public static int[] GetCharactersArray(TMP_FontAsset fontAsset) + { + int[] characters = new int[fontAsset.characterTable.Count]; + + for (int i = 0; i < fontAsset.characterTable.Count; i++) + { + characters[i] = (int)fontAsset.characterTable[i].unicode; + } + + return characters; + } + + + // ================================================================================ + // Properties and functions related to character and glyph additions as well as + // tacking glyphs that need to be added to various font asset atlas textures. + // ================================================================================ + + /// <summary> + /// Determines if the font asset is already registered to be updated. + /// </summary> + //private bool m_IsAlreadyRegisteredForUpdate; + + /// <summary> + /// List of glyphs that need to be added / packed in atlas texture. + /// </summary> + private List<Glyph> m_GlyphsToPack = new List<Glyph>(); + + /// <summary> + /// List of glyphs that have been packed in the atlas texture and ready to be rendered. + /// </summary> + private List<Glyph> m_GlyphsPacked = new List<Glyph>(); + + /// <summary> + /// + /// </summary> + private List<Glyph> m_GlyphsToRender = new List<Glyph>(); + + /// <summary> + /// List used in the process of adding new glyphs to the atlas texture. + /// </summary> + private List<uint> m_GlyphIndexList = new List<uint>(); + private List<TMP_Character> m_CharactersToAdd = new List<TMP_Character>(); + + /// <summary> + /// Internal static array used to avoid allocations when using the GetGlyphPairAdjustmentTable(). + /// </summary> + internal static uint[] s_GlyphIndexArray = new uint[16]; + + /// <summary> + /// Internal static list used to track characters that could not be added to the font asset. + /// </summary> + internal static List<uint> s_MissingCharacterList = new List<uint>(16); + + /// <summary> + /// Try adding the characters from the provided string to the font asset. + /// </summary> + /// <param name="unicodes">Array that contains the characters to add to the font asset.</param> + /// <returns>Returns true if all the characters were successfully added to the font asset. Return false otherwise.</returns> + public bool TryAddCharacters(uint[] unicodes) + { + uint[] missingUnicodes; + + return TryAddCharacters(unicodes, out missingUnicodes); + } + + /// <summary> + /// Try adding the characters from the provided string to the font asset. + /// </summary> + /// <param name="unicodes">Array that contains the characters to add to the font asset.</param> + /// <param name="missingUnicodes">Array containing the characters that could not be added to the font asset.</param> + /// <returns>Returns true if all the characters were successfully added to the font asset. Return false otherwise.</returns> + public bool TryAddCharacters(uint[] unicodes, out uint[] missingUnicodes) + { + s_MissingCharacterList.Clear(); + + // Make sure font asset is set to dynamic and that we have a valid list of characters. + if (unicodes == null || unicodes.Length == 0 || m_AtlasPopulationMode == AtlasPopulationMode.Static) + { + if (m_AtlasPopulationMode == AtlasPopulationMode.Static) + Debug.LogWarning("Unable to add characters to font asset [" + this.name + "] because its AtlasPopulationMode is set to Static.", this); + else + { + Debug.LogWarning("Unable to add characters to font asset [" + this.name + "] because the provided Unicode list is Null or Empty.", this); + } + + missingUnicodes = unicodes.ToArray(); + return false; + } + + Profiler.BeginSample("TMP.TryAddCharacter"); + + // Load font face. + if (FontEngine.LoadFontFace(m_SourceFontFile, m_FaceInfo.pointSize) != FontEngineError.Success) + { + Profiler.EndSample(); + + missingUnicodes = unicodes.ToArray(); + return false; + } + + // Clear data structures used to track which glyph needs to be added to atlas texture. + m_GlyphIndexList.Clear(); + m_CharactersToAdd.Clear(); + + bool isMissingCharacters = false; + int unicodeCount = unicodes.Length; + + for (int i = 0; i < unicodeCount; i++) + { + uint unicode = unicodes[i]; + + // Check if character is already contained in the character table. + if (m_CharacterLookupDictionary.ContainsKey(unicode)) + continue; + + // Get the index of the glyph for this unicode value. + uint glyphIndex = FontEngine.GetGlyphIndex(unicode); + + if (glyphIndex == 0) + { + isMissingCharacters = true; + continue; + } + + TMP_Character character = new TMP_Character(unicode, glyphIndex); + + // Check if glyph is already contained in the font asset as the same glyph might be referenced by multiple characters. + if (m_GlyphLookupDictionary.ContainsKey(glyphIndex)) + { + character.glyph = m_GlyphLookupDictionary[glyphIndex]; + m_CharacterTable.Add(character); + m_CharacterLookupDictionary.Add(unicode, character); + + continue; + } + + m_GlyphIndexList.Add(glyphIndex); + m_CharactersToAdd.Add(character); + } + + if (m_GlyphIndexList.Count == 0) + { + //Debug.LogWarning("No characters will be added to font asset [" + this.name + "] either because they are already present in the font asset or missing from the font file."); + Profiler.EndSample(); + + missingUnicodes = unicodes.ToArray(); + return false; + } + + // Resize the Atlas Texture to the appropriate size + if (m_AtlasTextures[m_AtlasTextureIndex].width == 0 || m_AtlasTextures[m_AtlasTextureIndex].height == 0) + { + //Debug.Log("Setting initial size of atlas texture used by font asset [" + this.name + "]."); + m_AtlasTextures[m_AtlasTextureIndex].Resize(m_AtlasWidth, m_AtlasHeight); + FontEngine.ResetAtlasTexture(m_AtlasTextures[m_AtlasTextureIndex]); + } + + Glyph[] glyphs; + + bool allCharactersAdded = FontEngine.TryAddGlyphsToTexture(m_GlyphIndexList, m_AtlasPadding, GlyphPackingMode.BestShortSideFit, m_FreeGlyphRects, m_UsedGlyphRects, m_AtlasRenderMode, m_AtlasTextures[m_AtlasTextureIndex], out glyphs); + + // Add new glyphs to relevant data structures. + for (int i = 0; i < glyphs.Length; i++) + { + Glyph glyph = glyphs[i]; + uint glyphIndex = glyph.index; + + // Add new glyph to glyph table. + m_GlyphTable.Add(glyph); + m_GlyphLookupDictionary.Add(glyphIndex, glyph); + } + + // Add new characters to relevant data structures. + for (int i = 0; i < m_CharactersToAdd.Count; i++) + { + TMP_Character character = m_CharactersToAdd[i]; + Glyph glyph; + + if (m_GlyphLookupDictionary.TryGetValue(character.glyphIndex, out glyph) == false) + { + s_MissingCharacterList.Add(character.unicode); + continue; + } + + character.glyph = glyph; + m_CharacterTable.Add(character); + m_CharacterLookupDictionary.Add(character.unicode, character); + } + + #if UNITY_EDITOR + // Makes the changes to the font asset persistent. + if (UnityEditor.EditorUtility.IsPersistent(this)) + { + TMP_EditorResourceManager.RegisterResourceForUpdate(this); + } + #endif + + Profiler.EndSample(); + + missingUnicodes = null; + + if (s_MissingCharacterList.Count > 0) + missingUnicodes = s_MissingCharacterList.ToArray(); + + return allCharactersAdded && !isMissingCharacters; + } + + /// <summary> + /// Try adding the characters from the provided string to the font asset. + /// </summary> + /// <param name="characters">String containing the characters to add to the font asset.</param> + /// <returns>Returns true if all the characters were successfully added to the font asset. Return false otherwise.</returns> + public bool TryAddCharacters(string characters) + { + string missingCharacters; + + return TryAddCharacters(characters, out missingCharacters); + } + + + /// <summary> + /// Try adding the characters from the provided string to the font asset. + /// </summary> + /// <param name="characters">String containing the characters to add to the font asset.</param> + /// <param name="missingCharacters">String containing the characters that could not be added to the font asset.</param> + /// <returns>Returns true if all the characters were successfully added to the font asset. Return false otherwise.</returns> + public bool TryAddCharacters(string characters, out string missingCharacters) + { + // Make sure font asset is set to dynamic and that we have a valid list of characters. + if (string.IsNullOrEmpty(characters) || m_AtlasPopulationMode == AtlasPopulationMode.Static) + { + if (m_AtlasPopulationMode == AtlasPopulationMode.Static) + Debug.LogWarning("Unable to add characters to font asset [" + this.name + "] because its AtlasPopulationMode is set to Static.", this); + else + { + Debug.LogWarning("Unable to add characters to font asset [" + this.name + "] because the provided character list is Null or Empty.", this); + } + + missingCharacters = characters; + return false; + } + + // Load font face. + if (FontEngine.LoadFontFace(m_SourceFontFile, m_FaceInfo.pointSize) != FontEngineError.Success) + { + missingCharacters = characters; + return false; + } + + // Clear data structures used to track which glyph needs to be added to atlas texture. + m_GlyphIndexList.Clear(); + m_CharactersToAdd.Clear(); + + bool isMissingCharacters = false; + int characterCount = characters.Length; + + // Iterate over each of the requested characters. + for (int i = 0; i < characterCount; i++) + { + uint unicode = characters[i]; + + // Check if character is already contained in the character table. + if (m_CharacterLookupDictionary.ContainsKey(unicode)) + continue; + + // Get the index of the glyph for this unicode value. + uint glyphIndex = FontEngine.GetGlyphIndex(unicode); + + // Skip missing glyphs + if (glyphIndex == 0) + { + // Might want to keep track and report the missing characters. + isMissingCharacters = true; + continue; + } + + TMP_Character character = new TMP_Character(unicode, glyphIndex); + + // Check if glyph is already contained in the font asset as the same glyph might be referenced by multiple characters. + if (m_GlyphLookupDictionary.ContainsKey(glyphIndex)) + { + character.glyph = m_GlyphLookupDictionary[glyphIndex]; + m_CharacterTable.Add(character); + m_CharacterLookupDictionary.Add(unicode, character); + + continue; + } + + // Add glyph to list of glyphs to add and glyph lookup map. + m_GlyphIndexList.Add(glyphIndex); + m_CharactersToAdd.Add(character); + } + + if (m_GlyphIndexList.Count == 0) + { + missingCharacters = characters; + return false; + } + + // Resize the Atlas Texture to the appropriate size + if (m_AtlasTextures[m_AtlasTextureIndex].width == 0 || m_AtlasTextures[m_AtlasTextureIndex].height == 0) + { + //Debug.Log("Setting initial size of atlas texture used by font asset [" + this.name + "]."); + m_AtlasTextures[m_AtlasTextureIndex].Resize(m_AtlasWidth, m_AtlasHeight); + FontEngine.ResetAtlasTexture(m_AtlasTextures[m_AtlasTextureIndex]); + } + + Glyph[] glyphs; + + bool allCharactersAdded = FontEngine.TryAddGlyphsToTexture(m_GlyphIndexList, m_AtlasPadding, GlyphPackingMode.BestShortSideFit, m_FreeGlyphRects, m_UsedGlyphRects, m_AtlasRenderMode, m_AtlasTextures[m_AtlasTextureIndex], out glyphs); + + for (int i = 0; i < glyphs.Length; i++) + { + Glyph glyph = glyphs[i]; + uint glyphIndex = glyph.index; + + // Add new glyph to glyph table. + m_GlyphTable.Add(glyph); + m_GlyphLookupDictionary.Add(glyphIndex, glyph); + } + + missingCharacters = string.Empty; + + // Add new characters to relevant data structures. + for (int i = 0; i < m_CharactersToAdd.Count; i++) + { + TMP_Character character = m_CharactersToAdd[i]; + Glyph glyph; + + if (m_GlyphLookupDictionary.TryGetValue(character.glyphIndex, out glyph) == false) + { + // TODO: Revise to avoid string concatenation. + missingCharacters += (char)character.unicode; + continue; + } + + character.glyph = glyph; + m_CharacterTable.Add(character); + m_CharacterLookupDictionary.Add(character.unicode, character); + } + + #if UNITY_EDITOR + // Makes the changes to the font asset persistent. + if (UnityEditor.EditorUtility.IsPersistent(this)) + { + TMP_EditorResourceManager.RegisterResourceForUpdate(this); + } + #endif + + return allCharactersAdded && !isMissingCharacters; + } + + + /// <summary> + /// NOT USED CURRENTLY - Try adding character using Unicode value to font asset. + /// </summary> + /// <param name="unicode">The Unicode value of the character.</param> + /// <param name="character">The character data if successfully added to the font asset. Null otherwise.</param> + /// <returns>Returns true if the character has been added. False otherwise.</returns> + internal bool TryAddCharacter_Internal(uint unicode) + { + TMP_Character character = null; + + // Check if character is already contained in the character table. + if (m_CharacterLookupDictionary.ContainsKey(unicode)) + return true; + + uint glyphIndex = FontEngine.GetGlyphIndex(unicode); + if (glyphIndex == 0) + return false; + + // Check if glyph is already contained in the font asset as the same glyph might be referenced by multiple characters. + if (m_GlyphLookupDictionary.ContainsKey(glyphIndex)) + { + character = new TMP_Character(unicode, m_GlyphLookupDictionary[glyphIndex]); + m_CharacterTable.Add(character); + m_CharacterLookupDictionary.Add(unicode, character); + + //#if UNITY_EDITOR + // Makes the changes to the font asset persistent. + // OPTIMIZATION: This could be handled when exiting Play mode if we added any new characters to the asset. + // Could also add some update registry to handle this. + //SortGlyphTable(); + //UnityEditor.EditorUtility.SetDirty(this); + //#endif + + return true; + } + + // Resize the Atlas Texture to the appropriate size + if (m_AtlasTextures[m_AtlasTextureIndex].width == 0 || m_AtlasTextures[m_AtlasTextureIndex].height == 0) + { + //Debug.Log("Setting initial size of atlas texture used by font asset [" + this.name + "]."); + m_AtlasTextures[m_AtlasTextureIndex].Resize(m_AtlasWidth, m_AtlasHeight); + FontEngine.ResetAtlasTexture(m_AtlasTextures[m_AtlasTextureIndex]); + } + + Glyph glyph; + + if (FontEngine.TryAddGlyphToTexture(glyphIndex, m_AtlasPadding, GlyphPackingMode.BestShortSideFit, m_FreeGlyphRects, m_UsedGlyphRects, m_AtlasRenderMode, m_AtlasTextures[m_AtlasTextureIndex], out glyph)) + { + // Add new glyph to glyph table. + m_GlyphTable.Add(glyph); + m_GlyphLookupDictionary.Add(glyphIndex, glyph); + + // Add new character + character = new TMP_Character(unicode, glyph); + m_CharacterTable.Add(character); + m_CharacterLookupDictionary.Add(unicode, character); + + //#if UNITY_EDITOR + // Makes the changes to the font asset persistent. + // OPTIMIZATION: This could be handled when exiting Play mode if we added any new characters to the asset. + // Could also add some update registry to handle this. + //SortGlyphTable(); + //UnityEditor.EditorUtility.SetDirty(this); + //#endif + + return true; + } + + return false; + } + + + /// <summary> + /// To be removed. + /// </summary> + /// <param name="unicode"></param> + /// <param name="glyph"></param> + internal TMP_Character AddCharacter_Internal(uint unicode, Glyph glyph) + { + // Check if character is already contained in the character table. + if (m_CharacterLookupDictionary.ContainsKey(unicode)) + return m_CharacterLookupDictionary[unicode]; + + uint glyphIndex = glyph.index; + + // Resize the Atlas Texture to the appropriate size + if (m_AtlasTextures[m_AtlasTextureIndex].width == 0 || m_AtlasTextures[m_AtlasTextureIndex].height == 0) + { + //Debug.Log("Setting initial size of atlas texture used by font asset [" + this.name + "]."); + m_AtlasTextures[m_AtlasTextureIndex].Resize(m_AtlasWidth, m_AtlasHeight); + FontEngine.ResetAtlasTexture(m_AtlasTextures[m_AtlasTextureIndex]); + } + + // Check if glyph is already contained in the glyph table. + if (m_GlyphLookupDictionary.ContainsKey(glyphIndex) == false) + { + if (glyph.glyphRect.width == 0 || glyph.glyphRect.width == 0) + { + // Glyphs with zero width and / or height can be automatically added to font asset. + m_GlyphTable.Add(glyph); + } + else + { + // Try packing new glyph + if (FontEngine.TryPackGlyphInAtlas(glyph, m_AtlasPadding, GlyphPackingMode.ContactPointRule, m_AtlasRenderMode, m_AtlasWidth, m_AtlasHeight, m_FreeGlyphRects, m_UsedGlyphRects) == false) + { + // TODO: Add handling to create new atlas texture to fit glyph. + + return null; + } + + m_GlyphsToRender.Add(glyph); + } + } + + // Add character to font asset. + TMP_Character character = new TMP_Character(unicode, glyph); + m_CharacterTable.Add(character); + m_CharacterLookupDictionary.Add(unicode, character); + + //Debug.Log("Adding character [" + (char)unicode + "] with Unicode (" + unicode + ") to [" + this.name + "] font asset."); + + // Schedule glyph to be added to the font atlas texture + //TM_FontAssetUpdateManager.RegisterFontAssetForUpdate(this); + UpdateAtlasTexture(); // Temporary until callback system is revised. + + //#if UNITY_EDITOR + // Makes the changes to the font asset persistent. + // OPTIMIZATION: This could be handled when exiting Play mode if we added any new characters to the asset. + // Could also add some update registry to handle this. + //SortGlyphTable(); + //UnityEditor.EditorUtility.SetDirty(this); + //#endif + + return character; + } + + + /// <summary> + /// Try adding character using Unicode value to font asset. + /// Function assumes internal user has already checked to make sure the character is not already contained in the font asset. + /// </summary> + /// <param name="unicode">The Unicode value of the character.</param> + /// <param name="character">The character data if successfully added to the font asset. Null otherwise.</param> + /// <returns>Returns true if the character has been added. False otherwise.</returns> + internal bool TryAddCharacterInternal(uint unicode, out TMP_Character character) + { + character = null; + + // Load font face. + if (FontEngine.LoadFontFace(sourceFontFile, m_FaceInfo.pointSize) != FontEngineError.Success) + return false; + + uint glyphIndex = FontEngine.GetGlyphIndex(unicode); + if (glyphIndex == 0) + return false; + + Profiler.BeginSample("TMP.TryAddCharacter"); + + // Check if glyph is already contained in the font asset as the same glyph might be referenced by multiple characters. + if (m_GlyphLookupDictionary.ContainsKey(glyphIndex)) + { + character = new TMP_Character(unicode, m_GlyphLookupDictionary[glyphIndex]); + m_CharacterTable.Add(character); + m_CharacterLookupDictionary.Add(unicode, character); + + if (TMP_Settings.getFontFeaturesAtRuntime) + UpdateGlyphAdjustmentRecords(unicode, glyphIndex); + + #if UNITY_EDITOR + // Makes the changes to the font asset persistent. + // OPTIMIZATION: This could be handled when exiting Play mode if we added any new characters to the asset. + // Could also add some update registry to handle this. + //SortGlyphTable(); + if (UnityEditor.EditorUtility.IsPersistent(this)) + { + TMP_EditorResourceManager.RegisterResourceForUpdate(this); + } + #endif + + Profiler.EndSample(); + + return true; + } + + // Resize the Atlas Texture to the appropriate size + if (m_AtlasTextures[m_AtlasTextureIndex].width == 0 || m_AtlasTextures[m_AtlasTextureIndex].height == 0) + { + // TODO: Need texture to be readable. + if (m_AtlasTextures[m_AtlasTextureIndex].isReadable == false) + { + Debug.LogWarning("Unable to add the requested character to font asset [" + this.name + "]'s atlas texture. Please make the texture [" + m_AtlasTextures[m_AtlasTextureIndex].name + "] readable.", m_AtlasTextures[m_AtlasTextureIndex]); + + Profiler.EndSample(); + return false; + } + + m_AtlasTextures[m_AtlasTextureIndex].Resize(m_AtlasWidth, m_AtlasHeight); + FontEngine.ResetAtlasTexture(m_AtlasTextures[m_AtlasTextureIndex]); + } + + Glyph glyph; + + if (FontEngine.TryAddGlyphToTexture(glyphIndex, m_AtlasPadding, GlyphPackingMode.BestShortSideFit, m_FreeGlyphRects, m_UsedGlyphRects, m_AtlasRenderMode, m_AtlasTextures[m_AtlasTextureIndex], out glyph)) + { + // Add new glyph to glyph table. + m_GlyphTable.Add(glyph); + m_GlyphLookupDictionary.Add(glyphIndex, glyph); + + // Add new character + character = new TMP_Character(unicode, glyph); + m_CharacterTable.Add(character); + m_CharacterLookupDictionary.Add(unicode, character); + + m_GlyphIndexList.Add(glyphIndex); + + if (TMP_Settings.getFontFeaturesAtRuntime) + UpdateGlyphAdjustmentRecords(unicode, glyphIndex); + + #if UNITY_EDITOR + // Makes the changes to the font asset persistent. + // OPTIMIZATION: This could be handled when exiting Play mode if we added any new characters to the asset. + // Could also add some update registry to handle this. + //SortGlyphTable(); + if (UnityEditor.EditorUtility.IsPersistent(this)) + { + TMP_EditorResourceManager.RegisterResourceForUpdate(this); + } + #endif + + Profiler.EndSample(); + + return true; + } + + Profiler.EndSample(); + + return false; + } + + + /// <summary> + /// Internal function used to get the glyph index for the given unicode. + /// </summary> + /// <param name="unicode"></param> + /// <returns></returns> + internal uint GetGlyphIndex(uint unicode) + { + // Load font face. + if (FontEngine.LoadFontFace(sourceFontFile, m_FaceInfo.pointSize) != FontEngineError.Success) + return 0; + + return FontEngine.GetGlyphIndex(unicode); + } + + + internal void UpdateAtlasTexture() + { + // Return if we don't have any glyphs to add to atlas texture. + // This is possible if UpdateAtlasTexture() was called manually. + //if (m_GlyphsToPack.Count == 0) + // return; + + if (m_GlyphsToRender.Count == 0) + return; + + //Debug.Log("Updating [" + this.name + "]'s atlas texture."); + + // Pack glyphs in the given atlas texture size. + // TODO: Packing and glyph render modes should be defined in the font asset. + //FontEngine.PackGlyphsInAtlas(m_GlyphsToPack, m_GlyphsPacked, m_AtlasPadding, GlyphPackingMode.ContactPointRule, GlyphRenderMode.SDFAA, m_AtlasWidth, m_AtlasHeight, m_FreeGlyphRects, m_UsedGlyphRects); + //FontEngine.RenderGlyphsToTexture(m_GlyphsPacked, m_AtlasPadding, GlyphRenderMode.SDFAA, m_AtlasTextures[m_AtlasTextureIndex]); + + // Resize the Atlas Texture to the appropriate size + if (m_AtlasTextures[m_AtlasTextureIndex].width == 0 || m_AtlasTextures[m_AtlasTextureIndex].height == 0) + { + //Debug.Log("Setting initial size of atlas texture used by font asset [" + this.name + "]."); + m_AtlasTextures[m_AtlasTextureIndex].Resize(m_AtlasWidth, m_AtlasHeight); + FontEngine.ResetAtlasTexture(m_AtlasTextures[m_AtlasTextureIndex]); + } + + FontEngine.RenderGlyphsToTexture(m_GlyphsToRender, m_AtlasPadding, m_AtlasRenderMode, m_AtlasTextures[m_AtlasTextureIndex]); + + // Apply changes to atlas texture + m_AtlasTextures[m_AtlasTextureIndex].Apply(false, false); + + // Add glyphs that were successfully packed to the glyph table. + for (int i = 0; i < m_GlyphsToRender.Count /* m_GlyphsPacked.Count */; i++) + { + Glyph glyph = m_GlyphsToRender[i]; // m_GlyphsPacked[i]; + + // Update atlas texture index + glyph.atlasIndex = m_AtlasTextureIndex; + + m_GlyphTable.Add(glyph); + m_GlyphLookupDictionary.Add(glyph.index, glyph); + } + + // Clear list of glyphs + m_GlyphsPacked.Clear(); + m_GlyphsToRender.Clear(); + + // Add any remaining glyphs into new atlas texture if multi texture support if enabled. + if (m_GlyphsToPack.Count > 0) + { + /* + // Create new atlas texture + Texture2D tex = new Texture2D(m_AtlasWidth, m_AtlasHeight, TextureFormat.Alpha8, false, true); + tex.SetPixels32(new Color32[m_AtlasWidth * m_AtlasHeight]); + tex.Apply(); + + m_AtlasTextureIndex++; + + if (m_AtlasTextures.Length == m_AtlasTextureIndex) + Array.Resize(ref m_AtlasTextures, Mathf.NextPowerOfTwo(m_AtlasTextureIndex + 1)); + + m_AtlasTextures[m_AtlasTextureIndex] = tex; + */ + } + + #if UNITY_EDITOR + // Makes the changes to the font asset persistent. + SortGlyphAndCharacterTables(); + TMP_EditorResourceManager.RegisterResourceForUpdate(this); + #endif + } + + + internal void UpdateGlyphAdjustmentRecords(uint unicode, uint glyphIndex) + { + Profiler.BeginSample("TMP.UpdateGlyphAdjustmentRecords"); + + int glyphCount = m_GlyphIndexList.Count; + + if (s_GlyphIndexArray.Length <= glyphCount) + s_GlyphIndexArray = new uint[Mathf.NextPowerOfTwo(glyphCount + 1)]; + + for (int i = 0; i < glyphCount; i++) + s_GlyphIndexArray[i] = m_GlyphIndexList[i]; + + // Clear unused array elements + Array.Clear(s_GlyphIndexArray, glyphCount, s_GlyphIndexArray.Length - glyphCount); + + // Get glyph pair adjustment records from font file. + // TODO: Revise FontEngine bindings to use a more efficient function where only the new glyph index is passed. + GlyphPairAdjustmentRecord[] pairAdjustmentRecords = FontEngine.GetGlyphPairAdjustmentTable(s_GlyphIndexArray); + + if (pairAdjustmentRecords == null || pairAdjustmentRecords.Length == 0) + { + Profiler.EndSample(); + return; + } + + if (m_FontFeatureTable == null) + m_FontFeatureTable = new TMP_FontFeatureTable(); + + for (int i = 0; i < pairAdjustmentRecords.Length && pairAdjustmentRecords[i].firstAdjustmentRecord.glyphIndex != 0; i++) + { + long pairKey = (long)pairAdjustmentRecords[i].secondAdjustmentRecord.glyphIndex << 32 | pairAdjustmentRecords[i].firstAdjustmentRecord.glyphIndex; + + // Check if table already contains a pair adjustment record for this key. + if (m_FontFeatureTable.m_GlyphPairAdjustmentRecordLookupDictionary.ContainsKey(pairKey)) + continue; + + TMP_GlyphPairAdjustmentRecord record = new TMP_GlyphPairAdjustmentRecord(pairAdjustmentRecords[i]); + + m_FontFeatureTable.m_GlyphPairAdjustmentRecords.Add(record); + m_FontFeatureTable.m_GlyphPairAdjustmentRecordLookupDictionary.Add(pairKey, record); + } + + #if UNITY_EDITOR + m_FontFeatureTable.SortGlyphPairAdjustmentRecords(); + #endif + + Profiler.EndSample(); + } + + + /// <summary> + /// Clears font asset data including the glyph and character tables and textures. + /// Function might be changed to Internal and only used in tests. + /// </summary> + /// <param name="setAtlasSizeToZero">Will set the atlas texture size to zero width and height if true.</param> + public void ClearFontAssetData(bool setAtlasSizeToZero = false) + { + #if UNITY_EDITOR + // Record full object undo in the Editor. + //UnityEditor.Undo.RecordObjects(new UnityEngine.Object[] { this, this.atlasTexture }, "Resetting Font Asset"); + #endif + + // Clear glyph and character tables + if (m_GlyphTable != null) + m_GlyphTable.Clear(); + + if (m_CharacterTable != null) + m_CharacterTable.Clear(); + + // Clear glyph rectangles + if (m_UsedGlyphRects != null) + m_UsedGlyphRects.Clear(); + + if (m_FreeGlyphRects != null) + { + int packingModifier = ((GlyphRasterModes)m_AtlasRenderMode & GlyphRasterModes.RASTER_MODE_BITMAP) == GlyphRasterModes.RASTER_MODE_BITMAP ? 0 : 1; + m_FreeGlyphRects = new List<GlyphRect>() { new GlyphRect(0, 0, m_AtlasWidth - packingModifier, m_AtlasHeight - packingModifier) }; + } + + if (m_GlyphsToPack != null) + m_GlyphsToPack.Clear(); + + if (m_GlyphsPacked != null) + m_GlyphsPacked.Clear(); + + // Clear Glyph Adjustment Table + if (m_FontFeatureTable != null && m_FontFeatureTable.m_GlyphPairAdjustmentRecords != null) + m_FontFeatureTable.glyphPairAdjustmentRecords.Clear(); + + m_AtlasTextureIndex = 0; + + // Clear atlas textures + if (m_AtlasTextures != null) + { + for (int i = 0; i < m_AtlasTextures.Length; i++) + { + Texture2D texture = m_AtlasTextures[i]; + + if (i > 0) + DestroyImmediate(texture, true); + + if (texture == null) + continue; + + // TODO: Need texture to be readable. + if (m_AtlasTextures[i].isReadable == false) + { + Debug.LogWarning("Unable to reset font asset [" + this.name + "]'s atlas texture. Please make the texture [" + m_AtlasTextures[i].name + "] readable.", m_AtlasTextures[i]); + continue; + } + + if (setAtlasSizeToZero) + { + texture.Resize(0, 0, TextureFormat.Alpha8, false); + } + else if (texture.width != m_AtlasWidth || texture.height != m_AtlasHeight) + { + texture.Resize(m_AtlasWidth, m_AtlasHeight, TextureFormat.Alpha8, false); + } + + // Clear texture atlas + FontEngine.ResetAtlasTexture(texture); + texture.Apply(); + + if (i == 0) + m_AtlasTexture = texture; + + m_AtlasTextures[i] = texture; + } + } + + #if UNITY_EDITOR + if (UnityEditor.EditorUtility.IsPersistent(this)) + { + TMP_EditorResourceManager.RegisterResourceForReimport(this); + } + #endif + + ReadFontAssetDefinition(); + } + + + + /// <summary> + /// Internal method used to upgrade font asset to support Dynamic SDF. + /// </summary> + private void UpgradeFontAsset() + { + m_Version = "1.1.0"; + + Debug.Log("Upgrading font asset [" + this.name + "] to version " + m_Version + ".", this); + + m_FaceInfo.familyName = m_fontInfo.Name; + m_FaceInfo.styleName = string.Empty; + + m_FaceInfo.pointSize = (int)m_fontInfo.PointSize; + m_FaceInfo.scale = m_fontInfo.Scale; + + m_FaceInfo.lineHeight = m_fontInfo.LineHeight; + m_FaceInfo.ascentLine = m_fontInfo.Ascender; + m_FaceInfo.capLine = m_fontInfo.CapHeight; + m_FaceInfo.meanLine = m_fontInfo.CenterLine; + m_FaceInfo.baseline = m_fontInfo.Baseline; + m_FaceInfo.descentLine = m_fontInfo.Descender; + + m_FaceInfo.superscriptOffset = m_fontInfo.SuperscriptOffset; + m_FaceInfo.superscriptSize = m_fontInfo.SubSize; + m_FaceInfo.subscriptOffset = m_fontInfo.SubscriptOffset; + m_FaceInfo.subscriptSize = m_fontInfo.SubSize; + + m_FaceInfo.underlineOffset = m_fontInfo.Underline; + m_FaceInfo.underlineThickness = m_fontInfo.UnderlineThickness; + m_FaceInfo.strikethroughOffset = m_fontInfo.strikethrough; + m_FaceInfo.strikethroughThickness = m_fontInfo.strikethroughThickness; + + m_FaceInfo.tabWidth = m_fontInfo.TabWidth; + + if (m_AtlasTextures == null || m_AtlasTextures.Length == 0) + m_AtlasTextures = new Texture2D[1]; + + m_AtlasTextures[0] = atlas; + + //atlas = null; + + m_AtlasWidth = (int)m_fontInfo.AtlasWidth; + m_AtlasHeight = (int)m_fontInfo.AtlasHeight; + m_AtlasPadding = (int)m_fontInfo.Padding; + + switch(m_CreationSettings.renderMode) + { + case 0: + m_AtlasRenderMode = GlyphRenderMode.SMOOTH_HINTED; + break; + case 1: + m_AtlasRenderMode = GlyphRenderMode.SMOOTH; + break; + case 2: + m_AtlasRenderMode = GlyphRenderMode.RASTER_HINTED; + break; + case 3: + m_AtlasRenderMode = GlyphRenderMode.RASTER; + break; + case 6: + m_AtlasRenderMode = GlyphRenderMode.SDF16; + break; + case 7: + m_AtlasRenderMode = GlyphRenderMode.SDF32; + break; + } + + //m_fontInfo = null; + + // Convert font weight table + if (fontWeights != null) + { + m_FontWeightTable[4] = fontWeights[4]; + m_FontWeightTable[7] = fontWeights[7]; + + // Clear old fontWeight + //fontWeights = null; + } + + // Convert font fallbacks + if (fallbackFontAssets != null && fallbackFontAssets.Count > 0) + { + if (m_FallbackFontAssetTable == null) + m_FallbackFontAssetTable = new List<TMP_FontAsset>(fallbackFontAssets.Count); + + for (int i = 0; i < fallbackFontAssets.Count; i++) + m_FallbackFontAssetTable.Add(fallbackFontAssets[i]); + + // Clear old fallbackFontAssets list + //fallbackFontAssets = null; + } + + // Check if font asset creation settings contains a reference to the source font file GUID + if (m_CreationSettings.sourceFontFileGUID != null || m_CreationSettings.sourceFontFileGUID != string.Empty) + { + m_SourceFontFileGUID = m_CreationSettings.sourceFontFileGUID; + } + else + { + Debug.LogWarning("Font asset [" + this.name + "] doesn't have a reference to its source font file. Please assign the appropriate source font file for this asset in the Font Atlas & Material section of font asset inspector.", this); + } + + // Convert legacy glyph and character tables to new format + m_GlyphTable.Clear(); + m_CharacterTable.Clear(); + + //#if UNITY_EDITOR + // TODO: This is causing a crash in Unity and related to AssetDatabase.LoadAssetAtPath and Resources.Load() + // Load font to allow us to get the glyph index. + //string path = UnityEditor.AssetDatabase.GUIDToAssetPath(m_SourceFontFileGUID); + + //if (path != string.Empty) + //{ + //m_SourceFontFile_EditorRef = UnityEditor.AssetDatabase.LoadAssetAtPath<Font>(path); + //FontEngine.LoadFontFace(m_SourceFontFile_EditorRef); + //} + //#endif + + bool isSpaceCharacterPresent = false; + for (int i = 0; i < m_glyphInfoList.Count; i++) + { + TMP_Glyph oldGlyph = m_glyphInfoList[i]; + + Glyph glyph = new Glyph(); + + uint glyphIndex = (uint)i + 1; + + //#if UNITY_EDITOR + //if (m_SourceFontFile_EditorRef != null) + // glyphIndex = FontEngine.GetGlyphIndex((uint)oldGlyph.id); + //#endif + + glyph.index = glyphIndex; + glyph.glyphRect = new GlyphRect((int)oldGlyph.x, m_AtlasHeight - (int)(oldGlyph.y + oldGlyph.height + 0.5f), (int)(oldGlyph.width + 0.5f), (int)(oldGlyph.height + 0.5f)); + glyph.metrics = new GlyphMetrics(oldGlyph.width, oldGlyph.height, oldGlyph.xOffset, oldGlyph.yOffset, oldGlyph.xAdvance); + glyph.scale = oldGlyph.scale; + glyph.atlasIndex = 0; + + m_GlyphTable.Add(glyph); + + TMP_Character character = new TMP_Character((uint)oldGlyph.id, glyph); + + if (oldGlyph.id == 32) + isSpaceCharacterPresent = true; + + m_CharacterTable.Add(character); + } + + // Special handling for the synthesized space character + if (!isSpaceCharacterPresent) + { + Debug.Log("Synthesizing Space for [" + this.name + "]"); + Glyph glyph = new Glyph(0, new GlyphMetrics(0, 0, 0, 0, m_FaceInfo.ascentLine / 5), GlyphRect.zero, 1.0f, 0); + m_GlyphTable.Add(glyph); + m_CharacterTable.Add(new TMP_Character(32, glyph)); + } + + // Clear legacy glyph info list. + //m_glyphInfoList.Clear(); + + ReadFontAssetDefinition(); + + // Convert atlas textures data to new format + // TODO + #if UNITY_EDITOR + if (UnityEditor.EditorUtility.IsPersistent(this)) + { + TMP_EditorResourceManager.RegisterResourceForUpdate(this); + } + #endif + } + + /// <summary> + /// + /// </summary> + void UpgradeGlyphAdjustmentTableToFontFeatureTable() + { + Debug.Log("Upgrading font asset [" + this.name + "] Glyph Adjustment Table.", this); + + if (m_FontFeatureTable == null) + m_FontFeatureTable = new TMP_FontFeatureTable(); + + int pairCount = m_KerningTable.kerningPairs.Count; + + m_FontFeatureTable.m_GlyphPairAdjustmentRecords = new List<TMP_GlyphPairAdjustmentRecord>(pairCount); + + for (int i = 0; i < pairCount; i++) + { + KerningPair pair = m_KerningTable.kerningPairs[i]; + + uint firstGlyphIndex = 0; + TMP_Character firstCharacter; + + if (m_CharacterLookupDictionary.TryGetValue(pair.firstGlyph, out firstCharacter)) + firstGlyphIndex = firstCharacter.glyphIndex; + + uint secondGlyphIndex = 0; + TMP_Character secondCharacter; + + if (m_CharacterLookupDictionary.TryGetValue(pair.secondGlyph, out secondCharacter)) + secondGlyphIndex = secondCharacter.glyphIndex; + + TMP_GlyphAdjustmentRecord firstAdjustmentRecord = new TMP_GlyphAdjustmentRecord(firstGlyphIndex, new TMP_GlyphValueRecord(pair.firstGlyphAdjustments.xPlacement, pair.firstGlyphAdjustments.yPlacement, pair.firstGlyphAdjustments.xAdvance, pair.firstGlyphAdjustments.yAdvance)); + TMP_GlyphAdjustmentRecord secondAdjustmentRecord = new TMP_GlyphAdjustmentRecord(secondGlyphIndex, new TMP_GlyphValueRecord(pair.secondGlyphAdjustments.xPlacement, pair.secondGlyphAdjustments.yPlacement, pair.secondGlyphAdjustments.xAdvance, pair.secondGlyphAdjustments.yAdvance)); + TMP_GlyphPairAdjustmentRecord record = new TMP_GlyphPairAdjustmentRecord(firstAdjustmentRecord, secondAdjustmentRecord); + + m_FontFeatureTable.m_GlyphPairAdjustmentRecords.Add(record); + } + + // TODO: Should clear legacy kerning table. + m_KerningTable.kerningPairs = null; + m_KerningTable = null; + + #if UNITY_EDITOR + if (UnityEditor.EditorUtility.IsPersistent(this)) + { + TMP_EditorResourceManager.RegisterResourceForUpdate(this); + } + #endif + } + + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontAsset.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontAsset.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..3d84d8baadb9293d4eb69f125ebcf3aa20bed1cc --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontAsset.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 71c1514a6bd24e1e882cebbe1904ce04 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: ee148e281f3c41c5b4ff5f8a5afe5a6c, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontAssetCommon.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontAssetCommon.cs new file mode 100644 index 0000000000000000000000000000000000000000..0c092aa9cbd20d7a2553cbc575273d2fb986b335 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontAssetCommon.cs @@ -0,0 +1,456 @@ +using UnityEngine; +using UnityEngine.Serialization; +using UnityEngine.TextCore; +using UnityEngine.TextCore.LowLevel; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + + +namespace TMPro +{ + /// <summary> + /// Class that contains the basic information about the font. + /// </summary> + [Serializable] + public class FaceInfo_Legacy + { + public string Name; + public float PointSize; + public float Scale; + + public int CharacterCount; + + public float LineHeight; + public float Baseline; + public float Ascender; + public float CapHeight; + public float Descender; + public float CenterLine; + + public float SuperscriptOffset; + public float SubscriptOffset; + public float SubSize; + + public float Underline; + public float UnderlineThickness; + + public float strikethrough; + public float strikethroughThickness; + + public float TabWidth; + + public float Padding; + public float AtlasWidth; + public float AtlasHeight; + } + + + // Class which contains the Glyph Info / Character definition for each character contained in the font asset. + [Serializable] + public class TMP_Glyph : TMP_TextElement_Legacy + { + /// <summary> + /// Function to create a deep copy of a GlyphInfo. + /// </summary> + /// <param name="source"></param> + /// <returns></returns> + public static TMP_Glyph Clone(TMP_Glyph source) + { + TMP_Glyph copy = new TMP_Glyph(); + + copy.id = source.id; + copy.x = source.x; + copy.y = source.y; + copy.width = source.width; + copy.height = source.height; + copy.xOffset = source.xOffset; + copy.yOffset = source.yOffset; + copy.xAdvance = source.xAdvance; + copy.scale = source.scale; + + return copy; + } + } + + + // Structure which holds the font creation settings + [Serializable] + public struct FontAssetCreationSettings + { + public string sourceFontFileName; + public string sourceFontFileGUID; + public int pointSizeSamplingMode; + public int pointSize; + public int padding; + public int packingMode; + public int atlasWidth; + public int atlasHeight; + public int characterSetSelectionMode; + public string characterSequence; + public string referencedFontAssetGUID; + public string referencedTextAssetGUID; + public int fontStyle; + public float fontStyleModifier; + public int renderMode; + public bool includeFontFeatures; + + internal FontAssetCreationSettings(string sourceFontFileGUID, int pointSize, int pointSizeSamplingMode, int padding, int packingMode, int atlasWidth, int atlasHeight, int characterSelectionMode, string characterSet, int renderMode) + { + this.sourceFontFileName = string.Empty; + this.sourceFontFileGUID = sourceFontFileGUID; + this.pointSize = pointSize; + this.pointSizeSamplingMode = pointSizeSamplingMode; + this.padding = padding; + this.packingMode = packingMode; + this.atlasWidth = atlasWidth; + this.atlasHeight = atlasHeight; + this.characterSequence = characterSet; + this.characterSetSelectionMode = characterSelectionMode; + this.renderMode = renderMode; + + this.referencedFontAssetGUID = string.Empty; + this.referencedTextAssetGUID = string.Empty; + this.fontStyle = 0; + this.fontStyleModifier = 0; + this.includeFontFeatures = false; + } + } + + /// <summary> + /// Contains the font assets for the regular and italic styles associated with a given font weight. + /// </summary> + [Serializable] + public struct TMP_FontWeightPair + { + public TMP_FontAsset regularTypeface; + public TMP_FontAsset italicTypeface; + } + + + public struct KerningPairKey + { + public uint ascii_Left; + public uint ascii_Right; + public uint key; + + public KerningPairKey(uint ascii_left, uint ascii_right) + { + ascii_Left = ascii_left; + ascii_Right = ascii_right; + key = (ascii_right << 16) + ascii_left; + } + } + + /// <summary> + /// Positional adjustments of a glyph + /// </summary> + [Serializable] + public struct GlyphValueRecord_Legacy + { + public float xPlacement; + public float yPlacement; + public float xAdvance; + public float yAdvance; + + internal GlyphValueRecord_Legacy(UnityEngine.TextCore.LowLevel.GlyphValueRecord valueRecord) + { + this.xPlacement = valueRecord.xPlacement; + this.yPlacement = valueRecord.yPlacement; + this.xAdvance = valueRecord.xAdvance; + this.yAdvance = valueRecord.yAdvance; + } + + public static GlyphValueRecord_Legacy operator +(GlyphValueRecord_Legacy a, GlyphValueRecord_Legacy b) + { + GlyphValueRecord_Legacy c; + c.xPlacement = a.xPlacement + b.xPlacement; + c.yPlacement = a.yPlacement + b.yPlacement; + c.xAdvance = a.xAdvance + b.xAdvance; + c.yAdvance = a.yAdvance + b.yAdvance; + + return c; + } + } + + [Serializable] + public class KerningPair + { + /// <summary> + /// The first glyph part of a kerning pair. + /// </summary> + public uint firstGlyph + { + get { return m_FirstGlyph; } + set { m_FirstGlyph = value; } + } + [FormerlySerializedAs("AscII_Left")] + [SerializeField] + private uint m_FirstGlyph; + + /// <summary> + /// The positional adjustment of the first glyph. + /// </summary> + public GlyphValueRecord_Legacy firstGlyphAdjustments + { + get { return m_FirstGlyphAdjustments; } + } + [SerializeField] + private GlyphValueRecord_Legacy m_FirstGlyphAdjustments; + + /// <summary> + /// The second glyph part of a kerning pair. + /// </summary> + public uint secondGlyph + { + get { return m_SecondGlyph; } + set { m_SecondGlyph = value; } + } + [FormerlySerializedAs("AscII_Right")] + [SerializeField] + private uint m_SecondGlyph; + + /// <summary> + /// The positional adjustment of the second glyph. + /// </summary> + public GlyphValueRecord_Legacy secondGlyphAdjustments + { + get { return m_SecondGlyphAdjustments; } + } + [SerializeField] + private GlyphValueRecord_Legacy m_SecondGlyphAdjustments; + + [FormerlySerializedAs("XadvanceOffset")] + public float xOffset; + + internal static KerningPair empty = new KerningPair(0, new GlyphValueRecord_Legacy(), 0, new GlyphValueRecord_Legacy()); + + /// <summary> + /// Determines if the Character Spacing property of the text object will affect the kerning pair. + /// This is mostly relevant when using Diacritical marks to prevent Character Spacing from altering the + /// </summary> + public bool ignoreSpacingAdjustments + { + get { return m_IgnoreSpacingAdjustments; } + } + [SerializeField] + private bool m_IgnoreSpacingAdjustments = false; + + public KerningPair() + { + m_FirstGlyph = 0; + m_FirstGlyphAdjustments = new GlyphValueRecord_Legacy(); + + m_SecondGlyph = 0; + m_SecondGlyphAdjustments = new GlyphValueRecord_Legacy(); + } + + public KerningPair(uint left, uint right, float offset) + { + firstGlyph = left; + m_SecondGlyph = right; + xOffset = offset; + } + + public KerningPair(uint firstGlyph, GlyphValueRecord_Legacy firstGlyphAdjustments, uint secondGlyph, GlyphValueRecord_Legacy secondGlyphAdjustments) + { + m_FirstGlyph = firstGlyph; + m_FirstGlyphAdjustments = firstGlyphAdjustments; + m_SecondGlyph = secondGlyph; + m_SecondGlyphAdjustments = secondGlyphAdjustments; + } + + internal void ConvertLegacyKerningData() + { + m_FirstGlyphAdjustments.xAdvance = xOffset; + //xOffset = 0; + } + + } + + [Serializable] + public class KerningTable + { + public List<KerningPair> kerningPairs; + + public KerningTable() + { + kerningPairs = new List<KerningPair>(); + } + + + public void AddKerningPair() + { + if (kerningPairs.Count == 0) + { + kerningPairs.Add(new KerningPair(0, 0, 0)); + } + else + { + uint left = kerningPairs.Last().firstGlyph; + uint right = kerningPairs.Last().secondGlyph; + float xoffset = kerningPairs.Last().xOffset; + + kerningPairs.Add(new KerningPair(left, right, xoffset)); + } + } + + + /// <summary> + /// Add Kerning Pair + /// </summary> + /// <param name="first">First glyph</param> + /// <param name="second">Second glyph</param> + /// <param name="offset">xAdvance value</param> + /// <returns></returns> + public int AddKerningPair(uint first, uint second, float offset) + { + int index = kerningPairs.FindIndex(item => item.firstGlyph == first && item.secondGlyph == second); + + if (index == -1) + { + kerningPairs.Add(new KerningPair(first, second, offset)); + return 0; + } + + // Return -1 if Kerning Pair already exists. + return -1; + } + + /// <summary> + /// Add Glyph pair adjustment record + /// </summary> + /// <param name="firstGlyph">The first glyph</param> + /// <param name="firstGlyphAdjustments">Adjustment record for the first glyph</param> + /// <param name="secondGlyph">The second glyph</param> + /// <param name="secondGlyphAdjustments">Adjustment record for the second glyph</param> + /// <returns></returns> + public int AddGlyphPairAdjustmentRecord(uint first, GlyphValueRecord_Legacy firstAdjustments, uint second, GlyphValueRecord_Legacy secondAdjustments) + { + int index = kerningPairs.FindIndex(item => item.firstGlyph == first && item.secondGlyph == second); + + if (index == -1) + { + kerningPairs.Add(new KerningPair(first, firstAdjustments, second, secondAdjustments)); + return 0; + } + + // Return -1 if Kerning Pair already exists. + return -1; + } + + public void RemoveKerningPair(int left, int right) + { + int index = kerningPairs.FindIndex(item => item.firstGlyph == left && item.secondGlyph == right); + + if (index != -1) + kerningPairs.RemoveAt(index); + } + + + public void RemoveKerningPair(int index) + { + kerningPairs.RemoveAt(index); + } + + + public void SortKerningPairs() + { + // Sort List of Kerning Info + if (kerningPairs.Count > 0) + kerningPairs = kerningPairs.OrderBy(s => s.firstGlyph).ThenBy(s => s.secondGlyph).ToList(); + } + } + + + public static class TMP_FontUtilities + { + private static List<int> k_searchedFontAssets; + + /// <summary> + /// Search through the given font and its fallbacks for the specified character. + /// </summary> + /// <param name="font">The font asset to search for the given character.</param> + /// <param name="unicode">The character to find.</param> + /// <param name="character">out parameter containing the glyph for the specified character (if found).</param> + /// <returns></returns> + public static TMP_FontAsset SearchForCharacter(TMP_FontAsset font, uint unicode, out TMP_Character character) + { + if (k_searchedFontAssets == null) + k_searchedFontAssets = new List<int>(); + + k_searchedFontAssets.Clear(); + + return SearchForCharacterInternal(font, unicode, out character); + } + + + /// <summary> + /// Search through the given list of fonts and their possible fallbacks for the specified character. + /// </summary> + /// <param name="fonts"></param> + /// <param name="unicode"></param> + /// <param name="character"></param> + /// <returns></returns> + public static TMP_FontAsset SearchForCharacter(List<TMP_FontAsset> fonts, uint unicode, out TMP_Character character) + { + return SearchForCharacterInternal(fonts, unicode, out character); + } + + + private static TMP_FontAsset SearchForCharacterInternal(TMP_FontAsset font, uint unicode, out TMP_Character character) + { + character = null; + + if (font == null) return null; + + if (font.characterLookupTable.TryGetValue(unicode, out character)) + { + return font; + } + else if (font.fallbackFontAssetTable != null && font.fallbackFontAssetTable.Count > 0) + { + for (int i = 0; i < font.fallbackFontAssetTable.Count && character == null; i++) + { + TMP_FontAsset temp = font.fallbackFontAssetTable[i]; + if (temp == null) continue; + + int id = temp.GetInstanceID(); + + // Skip over the fallback font asset in the event it is null or if already searched. + if (k_searchedFontAssets.Contains(id)) continue; + + // Add to list of font assets already searched. + k_searchedFontAssets.Add(id); + + temp = SearchForCharacterInternal(temp, unicode, out character); + + if (temp != null) + return temp; + } + } + + return null; + } + + + private static TMP_FontAsset SearchForCharacterInternal(List<TMP_FontAsset> fonts, uint unicode, out TMP_Character character) + { + character = null; + + if (fonts != null && fonts.Count > 0) + { + for (int i = 0; i < fonts.Count; i++) + { + TMP_FontAsset fontAsset = SearchForCharacterInternal(fonts[i], unicode, out character); + + if (fontAsset != null) + return fontAsset; + } + } + + return null; + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontAssetCommon.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontAssetCommon.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..84e3688442825b80b4223e416dae24c377d2e4a1 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontAssetCommon.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: f695b5f9415c40b39ae877eaff41c96e +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontAssetUtilities.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontAssetUtilities.cs new file mode 100644 index 0000000000000000000000000000000000000000..0ccc130aa84be8431448bf9086b1d933ddaaf3d1 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontAssetUtilities.cs @@ -0,0 +1,360 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.TextCore; +using UnityEngine.TextCore.LowLevel; + + +namespace TMPro +{ + public class TMP_FontAssetUtilities + { + private static readonly TMP_FontAssetUtilities s_Instance = new TMP_FontAssetUtilities(); + + /// <summary> + /// Default constructor + /// </summary> + static TMP_FontAssetUtilities() { } + + + /// <summary> + /// Get a singleton instance of the Font Asset Utilities class. + /// </summary> + public static TMP_FontAssetUtilities instance + { + get { return s_Instance; } + } + + + /// <summary> + /// List containing instance ID of font assets already searched. + /// </summary> + private static List<int> k_SearchedFontAssets; + + + /// <summary> + /// Returns the text element (character) for the given unicode value taking into consideration the requested font style and weight. + /// Function searches the source font asset, its list of font assets assigned as alternative typefaces and potentially its fallbacks. + /// The font asset out parameter contains a reference to the font asset containing the character. + /// The typeface type indicates whether the returned font asset is the source font asset, an alternative typeface or fallback font asset. + /// </summary> + /// <param name="unicode">The unicode value of the requested character</param> + /// <param name="sourceFontAsset">The font asset to be searched</param> + /// <param name="includeFallbacks">Include the fallback font assets in the search</param> + /// <param name="fontStyle">The font style</param> + /// <param name="fontWeight">The font weight</param> + /// <param name="type">Indicates if the OUT font asset is an alternative typeface or fallback font asset</param> + /// <param name="fontAsset">The font asset that contains the requested character</param> + /// <returns></returns> + public static TMP_Character GetCharacterFromFontAsset(uint unicode, TMP_FontAsset sourceFontAsset, bool includeFallbacks, FontStyles fontStyle, FontWeight fontWeight, out bool isAlternativeTypeface, out TMP_FontAsset fontAsset) + { + if (includeFallbacks) + { + if (k_SearchedFontAssets == null) + k_SearchedFontAssets = new List<int>(); + else + k_SearchedFontAssets.Clear(); + } + + return GetCharacterFromFontAsset_Internal(unicode, sourceFontAsset, includeFallbacks, fontStyle, fontWeight, out isAlternativeTypeface, out fontAsset); + } + + + /// <summary> + /// Internal function returning the text element character for the given unicode value taking into consideration the font style and weight. + /// Function searches the source font asset, list of font assets assigned as alternative typefaces and list of fallback font assets. + /// </summary> + private static TMP_Character GetCharacterFromFontAsset_Internal(uint unicode, TMP_FontAsset sourceFontAsset, bool includeFallbacks, FontStyles fontStyle, FontWeight fontWeight, out bool isAlternativeTypeface, out TMP_FontAsset fontAsset) + { + fontAsset = null; + isAlternativeTypeface = false; + TMP_Character characterData = null; + + #region FONT WEIGHT AND FONT STYLE HANDLING + // Determine if a font weight or style is used. If so check if an alternative typeface is assigned for the given weight and / or style. + bool isItalic = (fontStyle & FontStyles.Italic) == FontStyles.Italic; + + if (isItalic || fontWeight != FontWeight.Regular) + { + // Get reference to the font weight pairs of the given font asset. + TMP_FontWeightPair[] fontWeights = sourceFontAsset.fontWeightTable; + + int fontWeightIndex = 4; + switch (fontWeight) + { + case FontWeight.Thin: + fontWeightIndex = 1; + break; + case FontWeight.ExtraLight: + fontWeightIndex = 2; + break; + case FontWeight.Light: + fontWeightIndex = 3; + break; + case FontWeight.Regular: + fontWeightIndex = 4; + break; + case FontWeight.Medium: + fontWeightIndex = 5; + break; + case FontWeight.SemiBold: + fontWeightIndex = 6; + break; + case FontWeight.Bold: + fontWeightIndex = 7; + break; + case FontWeight.Heavy: + fontWeightIndex = 8; + break; + case FontWeight.Black: + fontWeightIndex = 9; + break; + } + + fontAsset = isItalic ? fontWeights[fontWeightIndex].italicTypeface : fontWeights[fontWeightIndex].regularTypeface; + + if (fontAsset != null) + { + if (fontAsset.characterLookupTable.TryGetValue(unicode, out characterData)) + { + isAlternativeTypeface = true; + + return characterData; + } + else if (fontAsset.atlasPopulationMode == AtlasPopulationMode.Dynamic) + { + if (fontAsset.TryAddCharacterInternal(unicode, out characterData)) + { + isAlternativeTypeface = true; + + return characterData; + } + + // Check if the source font file contains the requested character. + //if (TryGetCharacterFromFontFile(unicode, fontAsset, out characterData)) + //{ + // isAlternativeTypeface = true; + + // return characterData; + //} + + // If we find the requested character, we add it to the font asset character table + // and return its character data. + // We also add this character to the list of characters we will need to add to the font atlas. + // We assume the font atlas has room otherwise this font asset should not be marked as dynamic. + // Alternatively, we could also add multiple pages of font atlas textures (feature consideration). + } + + // At this point, we were not able to find the requested character in the alternative typeface + // so we check the source font asset and its potential fallbacks. + } + + } + #endregion + + // Search the source font asset for the requested character. + if (sourceFontAsset.characterLookupTable.TryGetValue(unicode, out characterData)) + { + // We were able to locate the requested character in the given font asset. + fontAsset = sourceFontAsset; + + return characterData; + } + else if (sourceFontAsset.atlasPopulationMode == AtlasPopulationMode.Dynamic) + { + if (sourceFontAsset.TryAddCharacterInternal(unicode, out characterData)) + { + fontAsset = sourceFontAsset; + + return characterData; + } + + //// Check if the source font file contains the requested character. + //if (TryGetCharacterFromFontFile(unicode, sourceFontAsset, out characterData)) + //{ + // fontAsset = sourceFontAsset; + + // //fontAsset.AddCharacterToRasterList(unicode); + + // return characterData; + //} + + // If we find the requested character, we add it to the font asset character table + // and return its character data. + // We also add this character to the list of characters we will need to add to the font atlas. + // We assume the font atlas has room otherwise this font asset should not be marked as dynamic. + // Alternatively, we could also add multiple pages of font atlas textures (feature consideration) + } + + // Search fallback font assets if we still don't have a valid character and include fallback is set to true. + if (characterData == null && includeFallbacks && sourceFontAsset.fallbackFontAssetTable != null) + { + // Get reference to the list of fallback font assets. + List<TMP_FontAsset> fallbackFontAssets = sourceFontAsset.fallbackFontAssetTable; + int fallbackCount = fallbackFontAssets.Count; + + if (fallbackFontAssets != null && fallbackCount > 0) + { + for (int i = 0; i < fallbackCount && characterData == null; i++) + { + TMP_FontAsset temp = fallbackFontAssets[i]; + + if (temp == null) continue; + + int id = temp.GetInstanceID(); + + // Skip over the fallback font asset in the event it is null or if already searched. + if (k_SearchedFontAssets.Contains(id)) + continue; + + // Add to list of font assets already searched. + k_SearchedFontAssets.Add(id); + + characterData = GetCharacterFromFontAsset_Internal(unicode, temp, includeFallbacks, fontStyle, fontWeight, out isAlternativeTypeface, out fontAsset); + + if (characterData != null) + { + return characterData; + } + } + } + + } + + return null; + } + + + /// <summary> + /// Returns the text element (character) for the given unicode value taking into consideration the requested font style and weight. + /// Function searches the provided list of font assets, the list of font assets assigned as alternative typefaces to them as well as their fallbacks. + /// The font asset out parameter contains a reference to the font asset containing the character. + /// The typeface type indicates whether the returned font asset is the source font asset, an alternative typeface or fallback font asset. + /// </summary> + /// <param name="unicode">The unicode value of the requested character</param> + /// <param name="fontAssets">The list of font assets to search</param> + /// <param name="includeFallbacks">Determines if the fallback of each font assets on the list will be searched</param> + /// <param name="fontStyle">The font style</param> + /// <param name="fontWeight">The font weight</param> + /// <param name="type">Determines if the OUT font asset is an alternative typeface or fallback font asset</param> + /// <param name="fontAsset">The font asset that contains the requested character</param> + /// <returns></returns> + public static TMP_Character GetCharacterFromFontAssets(uint unicode, List<TMP_FontAsset> fontAssets, bool includeFallbacks, FontStyles fontStyle, FontWeight fontWeight, out bool isAlternativeTypeface, out TMP_FontAsset fontAsset) + { + isAlternativeTypeface = false; + + // Make sure font asset list is valid + if (fontAssets == null || fontAssets.Count == 0) + { + fontAsset = null; + return null; + } + + if (includeFallbacks) + { + if (k_SearchedFontAssets == null) + k_SearchedFontAssets = new List<int>(); + else + k_SearchedFontAssets.Clear(); + } + + int fontAssetCount = fontAssets.Count; + + for (int i = 0; i < fontAssetCount; i++) + { + if (fontAssets[i] == null) continue; + + TMP_Character characterData = GetCharacterFromFontAsset_Internal(unicode, fontAssets[i], includeFallbacks, fontStyle, fontWeight, out isAlternativeTypeface, out fontAsset); + + if (characterData != null) + return characterData; + } + + fontAsset = null; + + return null; + } + + + // ===================================================================== + // FONT ENGINE & FONT FILE MANAGEMENT - Fields, Properties and Functions + // ===================================================================== + + private static bool k_IsFontEngineInitialized; + + + private static bool TryGetCharacterFromFontFile(uint unicode, TMP_FontAsset fontAsset, out TMP_Character character) + { + character = null; + + // Initialize Font Engine library if not already initialized + if (k_IsFontEngineInitialized == false) + { + FontEngineError error = FontEngine.InitializeFontEngine(); + + if (error == 0) + k_IsFontEngineInitialized = true; + } + + // Load the font face for the given font asset. + // TODO: Add manager to keep track of which font faces are currently loaded. + FontEngine.LoadFontFace(fontAsset.sourceFontFile, fontAsset.faceInfo.pointSize); + + Glyph glyph = null; + uint glyphIndex = FontEngine.GetGlyphIndex(unicode); + + // Check if glyph is already contained in the font asset as the same glyph might be referenced by multiple character. + if (fontAsset.glyphLookupTable.TryGetValue(glyphIndex, out glyph)) + { + character = fontAsset.AddCharacter_Internal(unicode, glyph); + + return true; + } + + GlyphLoadFlags glyphLoadFlags = ((GlyphRasterModes)fontAsset.atlasRenderMode & GlyphRasterModes.RASTER_MODE_HINTED) == GlyphRasterModes.RASTER_MODE_HINTED ? GlyphLoadFlags.LOAD_RENDER : GlyphLoadFlags.LOAD_RENDER | GlyphLoadFlags.LOAD_NO_HINTING; + + if (FontEngine.TryGetGlyphWithUnicodeValue(unicode, glyphLoadFlags, out glyph)) + { + // Add new character to font asset (if needed) + character = fontAsset.AddCharacter_Internal(unicode, glyph); + + return true; + } + + return false; + } + + + public static bool TryGetGlyphFromFontFile(uint glyphIndex, TMP_FontAsset fontAsset, out Glyph glyph) + { + glyph = null; + + // Initialize Font Engine library if not already initialized + if (k_IsFontEngineInitialized == false) + { + FontEngineError error = FontEngine.InitializeFontEngine(); + + if (error == 0) + k_IsFontEngineInitialized = true; + } + + // Load the font face for the given font asset. + // TODO: Add manager to keep track of which font faces are currently loaded. + FontEngine.LoadFontFace(fontAsset.sourceFontFile, fontAsset.faceInfo.pointSize); + + GlyphLoadFlags glyphLoadFlags = ((GlyphRasterModes)fontAsset.atlasRenderMode & GlyphRasterModes.RASTER_MODE_HINTED) == GlyphRasterModes.RASTER_MODE_HINTED ? GlyphLoadFlags.LOAD_RENDER : GlyphLoadFlags.LOAD_RENDER | GlyphLoadFlags.LOAD_NO_HINTING; + + if (FontEngine.TryGetGlyphWithIndexValue(glyphIndex, glyphLoadFlags, out glyph)) + { + // Add new glyph to font asset (if needed) + //fontAsset.AddGlyph_Internal(glyph); + + return true; + } + + return false; + } + + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontAssetUtilities.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontAssetUtilities.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..8c48f2a985f4c5541f969af1d9688e24b7b9c60c --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontAssetUtilities.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 0a017569bfe174e4890797b4d64cbabc +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontFeatureTable.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontFeatureTable.cs new file mode 100644 index 0000000000000000000000000000000000000000..a56a4fffb330a5a8c3e2e63b87995be55bc31b83 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontFeatureTable.cs @@ -0,0 +1,55 @@ +using System; +using System.Linq; +using System.Collections.Generic; +using UnityEngine; + + +namespace TMPro +{ + /// <summary> + /// Table that contains the various font features available for the given font asset. + /// </summary> + [Serializable] + public class TMP_FontFeatureTable + { + /// <summary> + /// List that contains the glyph pair adjustment records. + /// </summary> + internal List<TMP_GlyphPairAdjustmentRecord> glyphPairAdjustmentRecords + { + get { return m_GlyphPairAdjustmentRecords; } + set { m_GlyphPairAdjustmentRecords = value; } + } + [SerializeField] + internal List<TMP_GlyphPairAdjustmentRecord> m_GlyphPairAdjustmentRecords; + + /// <summary> + /// + /// </summary> + internal Dictionary<long, TMP_GlyphPairAdjustmentRecord> m_GlyphPairAdjustmentRecordLookupDictionary; + + // ============================================= + // Constructor(s) + // ============================================= + + public TMP_FontFeatureTable() + { + m_GlyphPairAdjustmentRecords = new List<TMP_GlyphPairAdjustmentRecord>(); + m_GlyphPairAdjustmentRecordLookupDictionary = new Dictionary<long, TMP_GlyphPairAdjustmentRecord>(); + } + + // ============================================= + // Utility Functions + // ============================================= + + /// <summary> + /// Sort the glyph pair adjustment records by glyph index. + /// </summary> + public void SortGlyphPairAdjustmentRecords() + { + // Sort List of Kerning Info + if (m_GlyphPairAdjustmentRecords.Count > 0) + m_GlyphPairAdjustmentRecords = m_GlyphPairAdjustmentRecords.OrderBy(s => s.firstAdjustmentRecord.glyphIndex).ThenBy(s => s.secondAdjustmentRecord.glyphIndex).ToList(); + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontFeatureTable.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontFeatureTable.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..39f3111551b11fb378a0d5db0fdeffce26e9a29b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontFeatureTable.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5ea9f573d4b800a49b9d83a1f61c0a88 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontFeaturesCommon.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontFeaturesCommon.cs new file mode 100644 index 0000000000000000000000000000000000000000..b30a74ac363e85c3429bb902b52b1a2033fe4bc9 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontFeaturesCommon.cs @@ -0,0 +1,223 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.TextCore.LowLevel; + + +namespace TMPro +{ + public enum FontFeatureLookupFlags + { + IgnoreLigatures = 0x004, + IgnoreSpacingAdjustments = 0x100, + } + + /// <summary> + /// The values used to adjust the position of a glyph or set of glyphs. + /// </summary> + [Serializable] + public struct TMP_GlyphValueRecord + { + /// <summary> + /// The positional adjustment affecting the horizontal bearing X of the glyph. + /// </summary> + public float xPlacement { get { return m_XPlacement; } set { m_XPlacement = value; } } + + /// <summary> + /// The positional adjustment affecting the horizontal bearing Y of the glyph. + /// </summary> + public float yPlacement { get { return m_YPlacement; } set { m_YPlacement = value; } } + + /// <summary> + /// The positional adjustment affecting the horizontal advance of the glyph. + /// </summary> + public float xAdvance { get { return m_XAdvance; } set { m_XAdvance = value; } } + + /// <summary> + /// The positional adjustment affecting the vertical advance of the glyph. + /// </summary> + public float yAdvance { get { return m_YAdvance; } set { m_YAdvance = value; } } + + // ============================================= + // Private backing fields for public properties. + // ============================================= + + [SerializeField] + private float m_XPlacement; + + [SerializeField] + private float m_YPlacement; + + [SerializeField] + private float m_XAdvance; + + [SerializeField] + private float m_YAdvance; + + + /// <summary> + /// Constructor + /// </summary> + /// <param name="xPlacement">The positional adjustment affecting the horizontal bearing X of the glyph.</param> + /// <param name="yPlacement">The positional adjustment affecting the horizontal bearing Y of the glyph.</param> + /// <param name="xAdvance">The positional adjustment affecting the horizontal advance of the glyph.</param> + /// <param name="yAdvance">The positional adjustment affecting the vertical advance of the glyph.</param> + public TMP_GlyphValueRecord(float xPlacement, float yPlacement, float xAdvance, float yAdvance) + { + m_XPlacement = xPlacement; + m_YPlacement = yPlacement; + m_XAdvance = xAdvance; + m_YAdvance = yAdvance; + } + + internal TMP_GlyphValueRecord(GlyphValueRecord_Legacy valueRecord) + { + m_XPlacement = valueRecord.xPlacement; + m_YPlacement = valueRecord.yPlacement; + m_XAdvance = valueRecord.xAdvance; + m_YAdvance = valueRecord.yAdvance; + } + + internal TMP_GlyphValueRecord(GlyphValueRecord valueRecord) + { + m_XPlacement = valueRecord.xPlacement; + m_YPlacement = valueRecord.yPlacement; + m_XAdvance = valueRecord.xAdvance; + m_YAdvance = valueRecord.yAdvance; + } + + public static TMP_GlyphValueRecord operator +(TMP_GlyphValueRecord a, TMP_GlyphValueRecord b) + { + TMP_GlyphValueRecord c; + c.m_XPlacement = a.xPlacement + b.xPlacement; + c.m_YPlacement = a.yPlacement + b.yPlacement; + c.m_XAdvance = a.xAdvance + b.xAdvance; + c.m_YAdvance = a.yAdvance + b.yAdvance; + + return c; + } + } + + /// <summary> + /// The positional adjustment values of a glyph. + /// </summary> + [Serializable] + public struct TMP_GlyphAdjustmentRecord + { + /// <summary> + /// The index of the glyph in the source font file. + /// </summary> + public uint glyphIndex { get { return m_GlyphIndex; } set { m_GlyphIndex = value; } } + + /// <summary> + /// The GlyphValueRecord contains the positional adjustments of the glyph. + /// </summary> + public TMP_GlyphValueRecord glyphValueRecord { get { return m_GlyphValueRecord; } set { m_GlyphValueRecord = value; } } + + // ============================================= + // Private backing fields for public properties. + // ============================================= + + [SerializeField] + private uint m_GlyphIndex; + + [SerializeField] + private TMP_GlyphValueRecord m_GlyphValueRecord; + + /// <summary> + /// Constructor + /// </summary> + /// <param name="glyphIndex">The index of the glyph in the source font file.</param> + /// <param name="glyphValueRecord">The GlyphValueRecord contains the positional adjustments of the glyph.</param> + public TMP_GlyphAdjustmentRecord(uint glyphIndex, TMP_GlyphValueRecord glyphValueRecord) + { + m_GlyphIndex = glyphIndex; + m_GlyphValueRecord = glyphValueRecord; + } + + internal TMP_GlyphAdjustmentRecord(GlyphAdjustmentRecord adjustmentRecord) + { + m_GlyphIndex = adjustmentRecord.glyphIndex; + m_GlyphValueRecord = new TMP_GlyphValueRecord(adjustmentRecord.glyphValueRecord); + } + } + + /// <summary> + /// The positional adjustment values for a pair of glyphs. + /// </summary> + [Serializable] + public class TMP_GlyphPairAdjustmentRecord + { + /// <summary> + /// Contains the positional adjustment values for the first glyph. + /// </summary> + public TMP_GlyphAdjustmentRecord firstAdjustmentRecord { get { return m_FirstAdjustmentRecord; } set { m_FirstAdjustmentRecord = value; } } + + /// <summary> + /// Contains the positional adjustment values for the second glyph. + /// </summary> + public TMP_GlyphAdjustmentRecord secondAdjustmentRecord { get { return m_SecondAdjustmentRecord; } set { m_SecondAdjustmentRecord = value; } } + + /// <summary> + /// + /// </summary> + public FontFeatureLookupFlags featureLookupFlags { get { return m_FeatureLookupFlags; } set { m_FeatureLookupFlags = value; } } + + // ============================================= + // Private backing fields for public properties. + // ============================================= + + [SerializeField] + private TMP_GlyphAdjustmentRecord m_FirstAdjustmentRecord; + + [SerializeField] + private TMP_GlyphAdjustmentRecord m_SecondAdjustmentRecord; + + [SerializeField] + private FontFeatureLookupFlags m_FeatureLookupFlags; + + /// <summary> + /// Constructor + /// </summary> + /// <param name="firstAdjustmentRecord">First glyph adjustment record.</param> + /// <param name="secondAdjustmentRecord">Second glyph adjustment record.</param> + public TMP_GlyphPairAdjustmentRecord(TMP_GlyphAdjustmentRecord firstAdjustmentRecord, TMP_GlyphAdjustmentRecord secondAdjustmentRecord) + { + m_FirstAdjustmentRecord = firstAdjustmentRecord; + m_SecondAdjustmentRecord = secondAdjustmentRecord; + } + + /// <summary> + /// Internal constructor + /// </summary> + /// <param name="firstAdjustmentRecord"></param> + /// <param name="secondAdjustmentRecord"></param> + internal TMP_GlyphPairAdjustmentRecord(GlyphPairAdjustmentRecord glyphPairAdjustmentRecord) + { + m_FirstAdjustmentRecord = new TMP_GlyphAdjustmentRecord(glyphPairAdjustmentRecord.firstAdjustmentRecord); + m_SecondAdjustmentRecord = new TMP_GlyphAdjustmentRecord(glyphPairAdjustmentRecord.secondAdjustmentRecord); + } + } + + public struct GlyphPairKey + { + public uint firstGlyphIndex; + public uint secondGlyphIndex; + public long key; + + public GlyphPairKey(uint firstGlyphIndex, uint secondGlyphIndex) + { + this.firstGlyphIndex = firstGlyphIndex; + this.secondGlyphIndex = secondGlyphIndex; + key = (long)secondGlyphIndex << 32 | firstGlyphIndex; + } + + internal GlyphPairKey(TMP_GlyphPairAdjustmentRecord record) + { + firstGlyphIndex = record.firstAdjustmentRecord.glyphIndex; + secondGlyphIndex = record.secondAdjustmentRecord.glyphIndex; + key = (long)secondGlyphIndex << 32 | firstGlyphIndex; + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontFeaturesCommon.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontFeaturesCommon.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..ad2b50201acc2cfb7903542bad8cd62e3ab8a79b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_FontFeaturesCommon.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 27df3b12f30d0b74a9b10a3968c402ff +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_InputField.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_InputField.cs new file mode 100644 index 0000000000000000000000000000000000000000..6cacfa268167cd2fcf5f542789792b7f32b5eb3a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_InputField.cs @@ -0,0 +1,4155 @@ +//#define TMP_DEBUG_MODE + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.Text.RegularExpressions; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.Events; +using UnityEngine.EventSystems; +using UnityEngine.Serialization; + + +namespace TMPro +{ + /// <summary> + /// Editable text input field. + /// </summary> + [AddComponentMenu("UI/TextMeshPro - Input Field", 11)] + public class TMP_InputField : Selectable, + IUpdateSelectedHandler, + IBeginDragHandler, + IDragHandler, + IEndDragHandler, + IPointerClickHandler, + ISubmitHandler, + ICanvasElement, + ILayoutElement, + IScrollHandler + { + + // Setting the content type acts as a shortcut for setting a combination of InputType, CharacterValidation, LineType, and TouchScreenKeyboardType + public enum ContentType + { + Standard, + Autocorrected, + IntegerNumber, + DecimalNumber, + Alphanumeric, + Name, + EmailAddress, + Password, + Pin, + Custom + } + + public enum InputType + { + Standard, + AutoCorrect, + Password, + } + + public enum CharacterValidation + { + None, + Digit, + Integer, + Decimal, + Alphanumeric, + Name, + Regex, + EmailAddress, + CustomValidator + } + + public enum LineType + { + SingleLine, + MultiLineSubmit, + MultiLineNewline + } + + public delegate char OnValidateInput(string text, int charIndex, char addedChar); + + [Serializable] + public class SubmitEvent : UnityEvent<string> { } + + [Serializable] + public class OnChangeEvent : UnityEvent<string> { } + + [Serializable] + public class SelectionEvent : UnityEvent<string> { } + + [Serializable] + public class TextSelectionEvent : UnityEvent<string, int, int> { } + + [Serializable] + public class TouchScreenKeyboardEvent : UnityEvent<TouchScreenKeyboard.Status> { } + + protected TouchScreenKeyboard m_SoftKeyboard; + static private readonly char[] kSeparators = { ' ', '.', ',', '\t', '\r', '\n' }; + + #region Exposed properties + /// <summary> + /// Text Text used to display the input's value. + /// </summary> + + [SerializeField] + protected RectTransform m_TextViewport; + + //Vector3[] m_ViewportCorners = new Vector3[4]; + + [SerializeField] + protected TMP_Text m_TextComponent; + + protected RectTransform m_TextComponentRectTransform; + + [SerializeField] + protected Graphic m_Placeholder; + + [SerializeField] + protected Scrollbar m_VerticalScrollbar; + + [SerializeField] + protected TMP_ScrollbarEventHandler m_VerticalScrollbarEventHandler; + //private bool m_ForceDeactivation; + + private bool m_IsDrivenByLayoutComponents = false; + + /// <summary> + /// Used to keep track of scroll position + /// </summary> + private float m_ScrollPosition; + + /// <summary> + /// + /// </summary> + [SerializeField] + protected float m_ScrollSensitivity = 1.0f; + + //[SerializeField] + //protected TMP_Text m_PlaceholderTextComponent; + + [SerializeField] + private ContentType m_ContentType = ContentType.Standard; + + /// <summary> + /// Type of data expected by the input field. + /// </summary> + [SerializeField] + private InputType m_InputType = InputType.Standard; + + /// <summary> + /// The character used to hide text in password field. + /// </summary> + [SerializeField] + private char m_AsteriskChar = '*'; + + /// <summary> + /// Keyboard type applies to mobile keyboards that get shown. + /// </summary> + [SerializeField] + private TouchScreenKeyboardType m_KeyboardType = TouchScreenKeyboardType.Default; + + [SerializeField] + private LineType m_LineType = LineType.SingleLine; + + /// <summary> + /// Should hide mobile input field part of the virtual keyboard. + /// </summary> + [SerializeField] + private bool m_HideMobileInput = false; + + /// <summary> + /// Should hide soft / virtual keyboard. + /// </summary> + [SerializeField] + private bool m_HideSoftKeyboard = false; + + /// <summary> + /// What kind of validation to use with the input field's data. + /// </summary> + [SerializeField] + private CharacterValidation m_CharacterValidation = CharacterValidation.None; + + /// <summary> + /// The Regex expression used for validating the text input. + /// </summary> + [SerializeField] + private string m_RegexValue = string.Empty; + + /// <summary> + /// The point sized used by the placeholder and input text object. + /// </summary> + [SerializeField] + private float m_GlobalPointSize = 14; + + /// <summary> + /// Maximum number of characters allowed before input no longer works. + /// </summary> + [SerializeField] + private int m_CharacterLimit = 0; + + /// <summary> + /// Event delegates triggered when the input field submits its data. + /// </summary> + [SerializeField] + private SubmitEvent m_OnEndEdit = new SubmitEvent(); + + /// <summary> + /// Event delegates triggered when the input field submits its data. + /// </summary> + [SerializeField] + private SubmitEvent m_OnSubmit = new SubmitEvent(); + + /// <summary> + /// Event delegates triggered when the input field is focused. + /// </summary> + [SerializeField] + private SelectionEvent m_OnSelect = new SelectionEvent(); + + /// <summary> + /// Event delegates triggered when the input field focus is lost. + /// </summary> + [SerializeField] + private SelectionEvent m_OnDeselect = new SelectionEvent(); + + /// <summary> + /// Event delegates triggered when the text is selected / highlighted. + /// </summary> + [SerializeField] + private TextSelectionEvent m_OnTextSelection = new TextSelectionEvent(); + + /// <summary> + /// Event delegates triggered when text is no longer select / highlighted. + /// </summary> + [SerializeField] + private TextSelectionEvent m_OnEndTextSelection = new TextSelectionEvent(); + + /// <summary> + /// Event delegates triggered when the input field changes its data. + /// </summary> + [SerializeField] + private OnChangeEvent m_OnValueChanged = new OnChangeEvent(); + + /// <summary> + /// Event delegates triggered when the status of the TouchScreenKeyboard changes. + /// </summary> + [SerializeField] + private TouchScreenKeyboardEvent m_OnTouchScreenKeyboardStatusChanged = new TouchScreenKeyboardEvent(); + + /// <summary> + /// Custom validation callback. + /// </summary> + [SerializeField] + private OnValidateInput m_OnValidateInput; + + [SerializeField] + private Color m_CaretColor = new Color(50f / 255f, 50f / 255f, 50f / 255f, 1f); + + [SerializeField] + private bool m_CustomCaretColor = false; + + [SerializeField] + private Color m_SelectionColor = new Color(168f / 255f, 206f / 255f, 255f / 255f, 192f / 255f); + + /// <summary> + /// Input field's value. + /// </summary> + + [SerializeField] + [TextArea(5, 10)] + protected string m_Text = string.Empty; + + [SerializeField] + [Range(0f, 4f)] + private float m_CaretBlinkRate = 0.85f; + + [SerializeField] + [Range(1, 5)] + private int m_CaretWidth = 1; + + [SerializeField] + private bool m_ReadOnly = false; + + [SerializeField] + private bool m_RichText = true; + + #endregion + + protected int m_StringPosition = 0; + protected int m_StringSelectPosition = 0; + protected int m_CaretPosition = 0; + protected int m_CaretSelectPosition = 0; + + private RectTransform caretRectTrans = null; + protected UIVertex[] m_CursorVerts = null; + private CanvasRenderer m_CachedInputRenderer; + private Vector2 m_LastPosition; + + [NonSerialized] + protected Mesh m_Mesh; + private bool m_AllowInput = false; + //bool m_HasLostFocus = false; + private bool m_ShouldActivateNextUpdate = false; + private bool m_UpdateDrag = false; + private bool m_DragPositionOutOfBounds = false; + private const float kHScrollSpeed = 0.05f; + private const float kVScrollSpeed = 0.10f; + protected bool m_CaretVisible; + private Coroutine m_BlinkCoroutine = null; + private float m_BlinkStartTime = 0.0f; + private Coroutine m_DragCoroutine = null; + private string m_OriginalText = ""; + private bool m_WasCanceled = false; + private bool m_HasDoneFocusTransition = false; + private WaitForSecondsRealtime m_WaitForSecondsRealtime; + private bool m_PreventCallback = false; + + private bool m_TouchKeyboardAllowsInPlaceEditing = false; + + private bool m_IsTextComponentUpdateRequired = false; + private bool m_IsScrollbarUpdateRequired = false; + private bool m_IsUpdatingScrollbarValues = false; + + private bool m_isLastKeyBackspace = false; + private float m_PointerDownClickStartTime; + private float m_KeyDownStartTime; + private float m_DoubleClickDelay = 0.5f; + + // Doesn't include dot and @ on purpose! See usage for details. + const string kEmailSpecialCharacters = "!#$%&'*+-/=?^_`{|}~"; + + private BaseInput inputSystem + { + get + { + if (EventSystem.current && EventSystem.current.currentInputModule) + return EventSystem.current.currentInputModule.input; + return null; + } + } + + private string compositionString + { + get { return inputSystem != null ? inputSystem.compositionString : Input.compositionString; } + } + + + + protected TMP_InputField() + { + SetTextComponentWrapMode(); + } + + protected Mesh mesh + { + get + { + if (m_Mesh == null) + m_Mesh = new Mesh(); + return m_Mesh; + } + } + + /// <summary> + /// Should the mobile keyboard input be hidden. + /// </summary> + public bool shouldHideMobileInput + { + get + { + switch (Application.platform) + { + case RuntimePlatform.Android: + case RuntimePlatform.IPhonePlayer: + case RuntimePlatform.tvOS: + return m_HideMobileInput; + default: + return true; + } + } + + set + { + switch(Application.platform) + { + case RuntimePlatform.Android: + case RuntimePlatform.IPhonePlayer: + case RuntimePlatform.tvOS: + SetPropertyUtility.SetStruct(ref m_HideMobileInput, value); + break; + default: + m_HideMobileInput = true; + break; + } + } + } + + public bool shouldHideSoftKeyboard + { + get + { + switch (Application.platform) + { + case RuntimePlatform.Android: + case RuntimePlatform.IPhonePlayer: + case RuntimePlatform.tvOS: + case RuntimePlatform.WSAPlayerX86: + case RuntimePlatform.WSAPlayerX64: + case RuntimePlatform.WSAPlayerARM: + return m_HideSoftKeyboard; + default: + return true; + } + } + + set + { + switch (Application.platform) + { + case RuntimePlatform.Android: + case RuntimePlatform.IPhonePlayer: + case RuntimePlatform.tvOS: + case RuntimePlatform.WSAPlayerX86: + case RuntimePlatform.WSAPlayerX64: + case RuntimePlatform.WSAPlayerARM: + SetPropertyUtility.SetStruct(ref m_HideSoftKeyboard, value); + break; + default: + m_HideSoftKeyboard = true; + break; + } + + if (m_HideSoftKeyboard == true && m_SoftKeyboard != null && TouchScreenKeyboard.isSupported && m_SoftKeyboard.active) + { + m_SoftKeyboard.active = false; + m_SoftKeyboard = null; + } + } + } + + private bool isKeyboardUsingEvents() + { + switch (Application.platform) + { + case RuntimePlatform.Android: + case RuntimePlatform.IPhonePlayer: + case RuntimePlatform.tvOS: + return false; + default: + return true; + } + } + + /// <summary> + /// Input field's current text value. This is not necessarily the same as what is visible on screen. + /// </summary> + /// <remarks> + /// Note that null is invalid value for InputField.text. + /// </remarks> + /// <example> + /// <code> + /// using UnityEngine; + /// using System.Collections; + /// using UnityEngine.UI; // Required when Using UI elements. + /// + /// public class Example : MonoBehaviour + /// { + /// public InputField mainInputField; + /// + /// public void Start() + /// { + /// mainInputField.text = "Enter Text Here..."; + /// } + /// } + /// </code> + /// </example> + public string text + { + get + { + return m_Text; + } + set + { + SetText(value); + } + } + + /// <summary> + /// Set Input field's current text value without invoke onValueChanged. This is not necessarily the same as what is visible on screen. + /// </summary> + public void SetTextWithoutNotify(string input) + { + SetText(input, false); + } + + void SetText(string value, bool sendCallback = true) + { + if (this.text == value) + return; + + if (value == null) + value = ""; + + value = value.Replace("\0", string.Empty); // remove embedded nulls + + m_Text = value; + + /* + if (m_LineType == LineType.SingleLine) + value = value.Replace("\n", "").Replace("\t", ""); + + // If we have an input validator, validate the input and apply the character limit at the same time. + if (onValidateInput != null || characterValidation != CharacterValidation.None) + { + m_Text = ""; + OnValidateInput validatorMethod = onValidateInput ?? Validate; + m_CaretPosition = m_CaretSelectPosition = value.Length; + int charactersToCheck = characterLimit > 0 ? Math.Min(characterLimit, value.Length) : value.Length; + for (int i = 0; i < charactersToCheck; ++i) + { + char c = validatorMethod(m_Text, m_Text.Length, value[i]); + if (c != 0) + m_Text += c; + } + } + else + { + m_Text = characterLimit > 0 && value.Length > characterLimit ? value.Substring(0, characterLimit) : value; + } + */ + + #if UNITY_EDITOR + if (!Application.isPlaying) + { + SendOnValueChangedAndUpdateLabel(); + return; + } + #endif + + if (m_SoftKeyboard != null) + m_SoftKeyboard.text = m_Text; + + if (m_StringPosition > m_Text.Length) + m_StringPosition = m_StringSelectPosition = m_Text.Length; + else if (m_StringSelectPosition > m_Text.Length) + m_StringSelectPosition = m_Text.Length; + + // Set RectTransform relative position to top of viewport. + AdjustTextPositionRelativeToViewport(0); + + m_forceRectTransformAdjustment = true; + + m_IsTextComponentUpdateRequired = true; + UpdateLabel(); + + if (sendCallback) + SendOnValueChanged(); + } + + + public bool isFocused + { + get { return m_AllowInput; } + } + + public float caretBlinkRate + { + get { return m_CaretBlinkRate; } + set + { + if (SetPropertyUtility.SetStruct(ref m_CaretBlinkRate, value)) + { + if (m_AllowInput) + SetCaretActive(); + } + } + } + + public int caretWidth { get { return m_CaretWidth; } set { if (SetPropertyUtility.SetStruct(ref m_CaretWidth, value)) MarkGeometryAsDirty(); } } + + public RectTransform textViewport { get { return m_TextViewport; } set { SetPropertyUtility.SetClass(ref m_TextViewport, value); } } + + public TMP_Text textComponent + { + get { return m_TextComponent; } + set + { + if (SetPropertyUtility.SetClass(ref m_TextComponent, value)) + { + SetTextComponentWrapMode(); + } + } + } + + //public TMP_Text placeholderTextComponent { get { return m_PlaceholderTextComponent; } set { SetPropertyUtility.SetClass(ref m_PlaceholderTextComponent, value); } } + + public Graphic placeholder { get { return m_Placeholder; } set { SetPropertyUtility.SetClass(ref m_Placeholder, value); } } + + public Scrollbar verticalScrollbar + { + get { return m_VerticalScrollbar; } + set + { + if (m_VerticalScrollbar != null) + m_VerticalScrollbar.onValueChanged.RemoveListener(OnScrollbarValueChange); + + SetPropertyUtility.SetClass(ref m_VerticalScrollbar, value); + + if (m_VerticalScrollbar) + { + m_VerticalScrollbar.onValueChanged.AddListener(OnScrollbarValueChange); + + } + } + } + + public float scrollSensitivity { get { return m_ScrollSensitivity; } set { if (SetPropertyUtility.SetStruct(ref m_ScrollSensitivity, value)) MarkGeometryAsDirty(); } } + + public Color caretColor { get { return customCaretColor ? m_CaretColor : textComponent.color; } set { if (SetPropertyUtility.SetColor(ref m_CaretColor, value)) MarkGeometryAsDirty(); } } + + public bool customCaretColor { get { return m_CustomCaretColor; } set { if (m_CustomCaretColor != value) { m_CustomCaretColor = value; MarkGeometryAsDirty(); } } } + + public Color selectionColor { get { return m_SelectionColor; } set { if (SetPropertyUtility.SetColor(ref m_SelectionColor, value)) MarkGeometryAsDirty(); } } + + public SubmitEvent onEndEdit { get { return m_OnEndEdit; } set { SetPropertyUtility.SetClass(ref m_OnEndEdit, value); } } + + public SubmitEvent onSubmit { get { return m_OnSubmit; } set { SetPropertyUtility.SetClass(ref m_OnSubmit, value); } } + + public SelectionEvent onSelect { get { return m_OnSelect; } set { SetPropertyUtility.SetClass(ref m_OnSelect, value); } } + + public SelectionEvent onDeselect { get { return m_OnDeselect; } set { SetPropertyUtility.SetClass(ref m_OnDeselect, value); } } + + public TextSelectionEvent onTextSelection { get { return m_OnTextSelection; } set { SetPropertyUtility.SetClass(ref m_OnTextSelection, value); } } + + public TextSelectionEvent onEndTextSelection { get { return m_OnEndTextSelection; } set { SetPropertyUtility.SetClass(ref m_OnEndTextSelection, value); } } + + public OnChangeEvent onValueChanged { get { return m_OnValueChanged; } set { SetPropertyUtility.SetClass(ref m_OnValueChanged, value); } } + + public TouchScreenKeyboardEvent onTouchScreenKeyboardStatusChanged { get { return m_OnTouchScreenKeyboardStatusChanged; } set { SetPropertyUtility.SetClass(ref m_OnTouchScreenKeyboardStatusChanged, value); } } + + public OnValidateInput onValidateInput { get { return m_OnValidateInput; } set { SetPropertyUtility.SetClass(ref m_OnValidateInput, value); } } + + public int characterLimit + { + get { return m_CharacterLimit; } + set + { + if (SetPropertyUtility.SetStruct(ref m_CharacterLimit, Math.Max(0, value))) + { + UpdateLabel(); + if (m_SoftKeyboard != null) + m_SoftKeyboard.characterLimit = value; + } + } + } + + //public bool isInteractableControl { set { if ( } } + + /// <summary> + /// Set the point size on both Placeholder and Input text object. + /// </summary> + public float pointSize + { + get { return m_GlobalPointSize; } + set { + if (SetPropertyUtility.SetStruct(ref m_GlobalPointSize, Math.Max(0, value))) + { + SetGlobalPointSize(m_GlobalPointSize); + UpdateLabel(); + } + } + } + + /// <summary> + /// Sets the Font Asset on both Placeholder and Input child objects. + /// </summary> + public TMP_FontAsset fontAsset + { + get { return m_GlobalFontAsset; } + set + { + if (SetPropertyUtility.SetClass(ref m_GlobalFontAsset, value)) + { + SetGlobalFontAsset(m_GlobalFontAsset); + UpdateLabel(); + } + } + } + [SerializeField] + protected TMP_FontAsset m_GlobalFontAsset; + + /// <summary> + /// Determines if the whole text will be selected when focused. + /// </summary> + public bool onFocusSelectAll + { + get { return m_OnFocusSelectAll; } + set { m_OnFocusSelectAll = value; } + } + [SerializeField] + protected bool m_OnFocusSelectAll = true; + protected bool m_isSelectAll; + + /// <summary> + /// Determines if the text and caret position as well as selection will be reset when the input field is deactivated. + /// </summary> + public bool resetOnDeActivation + { + get { return m_ResetOnDeActivation; } + set { m_ResetOnDeActivation = value; } + } + [SerializeField] + protected bool m_ResetOnDeActivation = true; + private bool m_SelectionStillActive = false; + private bool m_ReleaseSelection = false; + + private GameObject m_SelectedObject; + + /// <summary> + /// Controls whether the original text is restored when pressing "ESC". + /// </summary> + public bool restoreOriginalTextOnEscape + { + get { return m_RestoreOriginalTextOnEscape; } + set { m_RestoreOriginalTextOnEscape = value; } + } + [SerializeField] + private bool m_RestoreOriginalTextOnEscape = true; + + /// <summary> + /// Is Rich Text editing allowed? + /// </summary> + public bool isRichTextEditingAllowed + { + get { return m_isRichTextEditingAllowed; } + set { m_isRichTextEditingAllowed = value; } + } + [SerializeField] + protected bool m_isRichTextEditingAllowed = false; + + + // Content Type related + public ContentType contentType { get { return m_ContentType; } set { if (SetPropertyUtility.SetStruct(ref m_ContentType, value)) EnforceContentType(); } } + + public LineType lineType + { + get { return m_LineType; } + set + { + if (SetPropertyUtility.SetStruct(ref m_LineType, value)) + { + SetToCustomIfContentTypeIsNot(ContentType.Standard, ContentType.Autocorrected); + SetTextComponentWrapMode(); + } + } + } + + /// <summary> + /// Limits the number of lines of text in the Input Field. + /// </summary> + public int lineLimit + { + get { return m_LineLimit; } + set + { + if (m_LineType == LineType.SingleLine) + m_LineLimit = 1; + else + SetPropertyUtility.SetStruct(ref m_LineLimit, value); + + } + } + [SerializeField] + protected int m_LineLimit = 0; + + public InputType inputType { get { return m_InputType; } set { if (SetPropertyUtility.SetStruct(ref m_InputType, value)) SetToCustom(); } } + + public TouchScreenKeyboardType keyboardType + { + get { return m_KeyboardType; } + set + { + if (SetPropertyUtility.SetStruct(ref m_KeyboardType, value)) + SetToCustom(); + } + } + + public CharacterValidation characterValidation { get { return m_CharacterValidation; } set { if (SetPropertyUtility.SetStruct(ref m_CharacterValidation, value)) SetToCustom(); } } + + /// <summary> + /// Sets the Input Validation to use a Custom Input Validation script. + /// </summary> + public TMP_InputValidator inputValidator + { + get { return m_InputValidator; } + set { if (SetPropertyUtility.SetClass(ref m_InputValidator, value)) SetToCustom(CharacterValidation.CustomValidator); } + } + [SerializeField] + protected TMP_InputValidator m_InputValidator = null; + + public bool readOnly { get { return m_ReadOnly; } set { m_ReadOnly = value; } } + + public bool richText { get { return m_RichText; } set { m_RichText = value; SetTextComponentRichTextMode(); } } + + // Derived property + public bool multiLine { get { return m_LineType == LineType.MultiLineNewline || lineType == LineType.MultiLineSubmit; } } + // Not shown in Inspector. + public char asteriskChar { get { return m_AsteriskChar; } set { if (SetPropertyUtility.SetStruct(ref m_AsteriskChar, value)) UpdateLabel(); } } + public bool wasCanceled { get { return m_WasCanceled; } } + + + protected void ClampStringPos(ref int pos) + { + if (pos < 0) + pos = 0; + else if (pos > text.Length) + pos = text.Length; + } + + protected void ClampCaretPos(ref int pos) + { + if (pos < 0) + pos = 0; + else if (pos > m_TextComponent.textInfo.characterCount - 1) + pos = m_TextComponent.textInfo.characterCount - 1; + } + + /// <summary> + /// Current position of the cursor. + /// Getters are public Setters are protected + /// </summary> + + protected int caretPositionInternal { get { return m_CaretPosition + compositionString.Length; } set { m_CaretPosition = value; ClampCaretPos(ref m_CaretPosition); } } + protected int stringPositionInternal { get { return m_StringPosition + compositionString.Length; } set { m_StringPosition = value; ClampStringPos(ref m_StringPosition); } } + + protected int caretSelectPositionInternal { get { return m_CaretSelectPosition + compositionString.Length; } set { m_CaretSelectPosition = value; ClampCaretPos(ref m_CaretSelectPosition); } } + protected int stringSelectPositionInternal { get { return m_StringSelectPosition + compositionString.Length; } set { m_StringSelectPosition = value; ClampStringPos(ref m_StringSelectPosition); } } + + private bool hasSelection { get { return stringPositionInternal != stringSelectPositionInternal; } } + private bool m_isSelected; + private bool m_IsStringPositionDirty; + private bool m_IsCaretPositionDirty; + private bool m_forceRectTransformAdjustment; + + /// <summary> + /// Get: Returns the focus position as thats the position that moves around even during selection. + /// Set: Set both the anchor and focus position such that a selection doesn't happen + /// </summary> + public int caretPosition + { + get { return caretSelectPositionInternal; } + set { selectionAnchorPosition = value; selectionFocusPosition = value; m_IsStringPositionDirty = true; } + } + + /// <summary> + /// Get: Returns the fixed position of selection + /// Set: If compositionString is 0 set the fixed position + /// </summary> + public int selectionAnchorPosition + { + get + { + return caretPositionInternal; + } + + set + { + if (compositionString.Length != 0) + return; + + caretPositionInternal = value; + m_IsStringPositionDirty = true; + } + } + + /// <summary> + /// Get: Returns the variable position of selection + /// Set: If compositionString is 0 set the variable position + /// </summary> + public int selectionFocusPosition + { + get + { + return caretSelectPositionInternal; + } + set + { + if (compositionString.Length != 0) + return; + + caretSelectPositionInternal = value; + m_IsStringPositionDirty = true; + } + } + + + /// <summary> + /// + /// </summary> + public int stringPosition + { + get { return stringSelectPositionInternal; } + set { selectionStringAnchorPosition = value; selectionStringFocusPosition = value; m_IsCaretPositionDirty = true; } + } + + + /// <summary> + /// The fixed position of the selection in the raw string which may contains rich text. + /// </summary> + public int selectionStringAnchorPosition + { + get + { + return stringPositionInternal; + } + + set + { + if (compositionString.Length != 0) + return; + + stringPositionInternal = value; + m_IsCaretPositionDirty = true; + } + } + + + /// <summary> + /// The variable position of the selection in the raw string which may contains rich text. + /// </summary> + public int selectionStringFocusPosition + { + get + { + return stringSelectPositionInternal; + } + set + { + if (compositionString.Length != 0) + return; + + stringSelectPositionInternal = value; + m_IsCaretPositionDirty = true; + } + } + + + #if UNITY_EDITOR + // Remember: This is NOT related to text validation! + // This is Unity's own OnValidate method which is invoked when changing values in the Inspector. + protected override void OnValidate() + { + base.OnValidate(); + EnforceContentType(); + + m_CharacterLimit = Math.Max(0, m_CharacterLimit); + + //This can be invoked before OnEnabled is called. So we shouldn't be accessing other objects, before OnEnable is called. + if (!IsActive()) + return; + + SetTextComponentRichTextMode(); + + UpdateLabel(); + if (m_AllowInput) + SetCaretActive(); + } + #endif + + protected override void OnEnable() + { + //Debug.Log("*** OnEnable() *** - " + this.name); + + base.OnEnable(); + + if (m_Text == null) + m_Text = string.Empty; + + if (Application.isPlaying) + { + if (m_CachedInputRenderer == null && m_TextComponent != null) + { + // Check if Input Field is driven by any layout components + m_IsDrivenByLayoutComponents = GetComponent<ILayoutController>() != null ? true : false; + + GameObject go = new GameObject(transform.name + " Input Caret", typeof(RectTransform)); + + // Add MaskableGraphic Component + TMP_SelectionCaret caret = go.AddComponent<TMP_SelectionCaret>(); + caret.raycastTarget = false; + caret.color = Color.clear; + + go.hideFlags = HideFlags.DontSave; + go.transform.SetParent(m_TextComponent.transform.parent); + go.transform.SetAsFirstSibling(); + go.layer = gameObject.layer; + + caretRectTrans = go.GetComponent<RectTransform>(); + m_CachedInputRenderer = go.GetComponent<CanvasRenderer>(); + m_CachedInputRenderer.SetMaterial(Graphic.defaultGraphicMaterial, Texture2D.whiteTexture); + + // Needed as if any layout is present we want the caret to always be the same as the text area. + go.AddComponent<LayoutElement>().ignoreLayout = true; + + AssignPositioningIfNeeded(); + } + } + + // If we have a cached renderer then we had OnDisable called so just restore the material. + if (m_CachedInputRenderer != null) + m_CachedInputRenderer.SetMaterial(Graphic.defaultGraphicMaterial, Texture2D.whiteTexture); + + if (m_TextComponent != null) + { + m_TextComponent.RegisterDirtyVerticesCallback(MarkGeometryAsDirty); + m_TextComponent.RegisterDirtyVerticesCallback(UpdateLabel); + //m_TextComponent.ignoreRectMaskCulling = multiLine; + + //m_DefaultTransformPosition = m_TextComponent.rectTransform.localPosition; + + // Cache reference to Vertical Scrollbar RectTransform and add listener. + if (m_VerticalScrollbar != null) + { + m_TextComponent.ignoreRectMaskCulling = true; + m_VerticalScrollbar.onValueChanged.AddListener(OnScrollbarValueChange); + } + + UpdateLabel(); + } + + // Subscribe to event fired when text object has been regenerated. + TMPro_EventManager.TEXT_CHANGED_EVENT.Add(ON_TEXT_CHANGED); + } + + protected override void OnDisable() + { + // the coroutine will be terminated, so this will ensure it restarts when we are next activated + m_BlinkCoroutine = null; + + DeactivateInputField(); + if (m_TextComponent != null) + { + m_TextComponent.UnregisterDirtyVerticesCallback(MarkGeometryAsDirty); + m_TextComponent.UnregisterDirtyVerticesCallback(UpdateLabel); + + if (m_VerticalScrollbar != null) + m_VerticalScrollbar.onValueChanged.RemoveListener(OnScrollbarValueChange); + + } + CanvasUpdateRegistry.UnRegisterCanvasElementForRebuild(this); + + // Clear needs to be called otherwise sync never happens as the object is disabled. + if (m_CachedInputRenderer != null) + m_CachedInputRenderer.Clear(); + + if (m_Mesh != null) + DestroyImmediate(m_Mesh); + m_Mesh = null; + + // Unsubscribe to event triggered when text object has been regenerated + TMPro_EventManager.TEXT_CHANGED_EVENT.Remove(ON_TEXT_CHANGED); + + base.OnDisable(); + } + + + /// <summary> + /// Method used to update the tracking of the caret position when the text object has been regenerated. + /// </summary> + /// <param name="obj"></param> + private void ON_TEXT_CHANGED(UnityEngine.Object obj) + { + if (obj == m_TextComponent && Application.isPlaying && compositionString.Length == 0) + { + caretPositionInternal = GetCaretPositionFromStringIndex(stringPositionInternal); + caretSelectPositionInternal = GetCaretPositionFromStringIndex(stringSelectPositionInternal); + + #if TMP_DEBUG_MODE + Debug.Log("Caret Position: " + caretPositionInternal + " Selection Position: " + caretSelectPositionInternal + " String Position: " + stringPositionInternal + " String Select Position: " + stringSelectPositionInternal); + #endif + } + } + + + IEnumerator CaretBlink() + { + // Always ensure caret is initially visible since it can otherwise be confusing for a moment. + m_CaretVisible = true; + yield return null; + + while ((isFocused || m_SelectionStillActive) && m_CaretBlinkRate > 0) + { + // the blink rate is expressed as a frequency + float blinkPeriod = 1f / m_CaretBlinkRate; + + // the caret should be ON if we are in the first half of the blink period + bool blinkState = (Time.unscaledTime - m_BlinkStartTime) % blinkPeriod < blinkPeriod / 2; + if (m_CaretVisible != blinkState) + { + m_CaretVisible = blinkState; + if (!hasSelection) + MarkGeometryAsDirty(); + } + + // Then wait again. + yield return null; + } + m_BlinkCoroutine = null; + } + + void SetCaretVisible() + { + if (!m_AllowInput) + return; + + m_CaretVisible = true; + m_BlinkStartTime = Time.unscaledTime; + SetCaretActive(); + } + + // SetCaretActive will not set the caret immediately visible - it will wait for the next time to blink. + // However, it will handle things correctly if the blink speed changed from zero to non-zero or non-zero to zero. + void SetCaretActive() + { + if (!m_AllowInput) + return; + + if (m_CaretBlinkRate > 0.0f) + { + if (m_BlinkCoroutine == null) + m_BlinkCoroutine = StartCoroutine(CaretBlink()); + } + else + { + m_CaretVisible = true; + } + } + + protected void OnFocus() + { + if (m_OnFocusSelectAll) + SelectAll(); + } + + protected void SelectAll() + { + m_isSelectAll = true; + stringPositionInternal = text.Length; + stringSelectPositionInternal = 0; + } + + /// <summary> + /// Move to the end of the text. + /// </summary> + /// <param name="shift"></param> + public void MoveTextEnd(bool shift) + { + if (m_isRichTextEditingAllowed) + { + int position = text.Length; + + if (shift) + { + stringSelectPositionInternal = position; + } + else + { + stringPositionInternal = position; + stringSelectPositionInternal = stringPositionInternal; + } + } + else + { + int position = m_TextComponent.textInfo.characterCount - 1; + + if (shift) + { + caretSelectPositionInternal = position; + stringSelectPositionInternal = GetStringIndexFromCaretPosition(position); + } + else + { + caretPositionInternal = caretSelectPositionInternal = position; + stringSelectPositionInternal = stringPositionInternal = GetStringIndexFromCaretPosition(position); + } + } + + UpdateLabel(); + } + + /// <summary> + /// Move to the start of the text. + /// </summary> + /// <param name="shift"></param> + public void MoveTextStart(bool shift) + { + if (m_isRichTextEditingAllowed) + { + int position = 0; + + if (shift) + { + stringSelectPositionInternal = position; + } + else + { + stringPositionInternal = position; + stringSelectPositionInternal = stringPositionInternal; + } + } + else + { + int position = 0; + + if (shift) + { + caretSelectPositionInternal = position; + stringSelectPositionInternal = GetStringIndexFromCaretPosition(position); + } + else + { + caretPositionInternal = caretSelectPositionInternal = position; + stringSelectPositionInternal = stringPositionInternal = GetStringIndexFromCaretPosition(position); + } + } + + UpdateLabel(); + } + + + /// <summary> + /// Move to the end of the current line of text. + /// </summary> + /// <param name="shift"></param> + public void MoveToEndOfLine(bool shift, bool ctrl) + { + // Get the line the caret is currently located on. + int currentLine = m_TextComponent.textInfo.characterInfo[caretPositionInternal].lineNumber; + + // Get the last character of the given line. + int characterIndex = ctrl == true ? m_TextComponent.textInfo.characterCount - 1 : m_TextComponent.textInfo.lineInfo[currentLine].lastCharacterIndex; + + int position = m_TextComponent.textInfo.characterInfo[characterIndex].index; + + if (shift) + { + stringSelectPositionInternal = position; + + caretSelectPositionInternal = characterIndex; + } + else + { + stringPositionInternal = position; + stringSelectPositionInternal = stringPositionInternal; + + caretSelectPositionInternal = caretPositionInternal = characterIndex; + } + + UpdateLabel(); + } + + /// <summary> + /// Move to the start of the current line of text. + /// </summary> + /// <param name="shift"></param> + public void MoveToStartOfLine(bool shift, bool ctrl) + { + // Get the line the caret is currently located on. + int currentLine = m_TextComponent.textInfo.characterInfo[caretPositionInternal].lineNumber; + + // Get the first character of the given line. + int characterIndex = ctrl == true ? 0 : m_TextComponent.textInfo.lineInfo[currentLine].firstCharacterIndex; + + int position = 0; + if (characterIndex > 0) + position = m_TextComponent.textInfo.characterInfo[characterIndex - 1].index + m_TextComponent.textInfo.characterInfo[characterIndex - 1].stringLength; + + if (shift) + { + stringSelectPositionInternal = position; + + caretSelectPositionInternal = characterIndex; + } + else + { + stringPositionInternal = position; + stringSelectPositionInternal = stringPositionInternal; + + caretSelectPositionInternal = caretPositionInternal = characterIndex; + } + + UpdateLabel(); + } + + + static string clipboard + { + get + { + return GUIUtility.systemCopyBuffer; + } + set + { + GUIUtility.systemCopyBuffer = value; + } + } + + private bool InPlaceEditing() + { + if (m_TouchKeyboardAllowsInPlaceEditing || (TouchScreenKeyboard.isSupported && (Application.platform == RuntimePlatform.WSAPlayerX86 || Application.platform == RuntimePlatform.WSAPlayerX64 || Application.platform == RuntimePlatform.WSAPlayerARM))) + return true; + + if (TouchScreenKeyboard.isSupported && shouldHideSoftKeyboard) + return true; + + if (TouchScreenKeyboard.isSupported && shouldHideSoftKeyboard == false && shouldHideMobileInput == false) + return false; + + return true; + } + + void UpdateStringPositionFromKeyboard() + { + // TODO: Might want to add null check here. + var selectionRange = m_SoftKeyboard.selection; + + if (selectionRange.start == 0 && selectionRange.length == 0) + return; + + var selectionStart = selectionRange.start; + var selectionEnd = selectionRange.end; + + var stringPositionChanged = false; + + if (stringPositionInternal != selectionStart) + { + stringPositionChanged = true; + stringPositionInternal = selectionStart; + + caretPositionInternal = GetCaretPositionFromStringIndex(stringPositionInternal); + } + + if (stringSelectPositionInternal != selectionEnd) + { + stringSelectPositionInternal = selectionEnd; + stringPositionChanged = true; + + caretSelectPositionInternal = GetCaretPositionFromStringIndex(stringSelectPositionInternal); + } + + if (stringPositionChanged) + { + m_BlinkStartTime = Time.unscaledTime; + + UpdateLabel(); + } + } + + /// <summary> + /// Update the text based on input. + /// </summary> + // TODO: Make LateUpdate a coroutine instead. Allows us to control the update to only be when the field is active. + protected virtual void LateUpdate() + { + // Only activate if we are not already activated. + if (m_ShouldActivateNextUpdate) + { + if (!isFocused) + { + ActivateInputFieldInternal(); + m_ShouldActivateNextUpdate = false; + return; + } + + // Reset as we are already activated. + m_ShouldActivateNextUpdate = false; + } + + // Update Scrollbar if needed + if (m_IsScrollbarUpdateRequired) + { + UpdateScrollbar(); + m_IsScrollbarUpdateRequired = false; + } + + // Handle double click to reset / deselect Input Field when ResetOnActivation is false. + if (!isFocused && m_SelectionStillActive) + { + GameObject selectedObject = EventSystem.current != null ? EventSystem.current.currentSelectedGameObject : null; + + if (selectedObject != null && selectedObject != this.gameObject) + { + if (selectedObject != m_SelectedObject) + { + m_SelectedObject = selectedObject; + + // Check if object has a TMP Input Field + if (selectedObject.GetComponent<TMP_InputField>() != null) + { + // Release selection + m_SelectionStillActive = false; + MarkGeometryAsDirty(); + m_SelectedObject = null; + } + } + + return; + } + + if (Input.GetKeyDown(KeyCode.Mouse0)) + { + // Check for Double Click + bool isDoubleClick = false; + float timeStamp = Time.unscaledTime; + + if (m_KeyDownStartTime + m_DoubleClickDelay > timeStamp) + isDoubleClick = true; + + m_KeyDownStartTime = timeStamp; + + if (isDoubleClick) + { + //m_StringPosition = m_StringSelectPosition = 0; + //m_CaretPosition = m_CaretSelectPosition = 0; + //m_TextComponent.rectTransform.localPosition = m_DefaultTransformPosition; + + //if (caretRectTrans != null) + // caretRectTrans.localPosition = Vector3.zero; + + m_SelectionStillActive = false; + + MarkGeometryAsDirty(); + + return; + } + } + } + + if (InPlaceEditing() && isKeyboardUsingEvents() || !isFocused) + { + return; + } + + AssignPositioningIfNeeded(); + + if (m_SoftKeyboard == null || m_SoftKeyboard.status != TouchScreenKeyboard.Status.Visible) + { + if (m_SoftKeyboard != null) + { + if (!m_ReadOnly) + text = m_SoftKeyboard.text; + + if (m_SoftKeyboard.status == TouchScreenKeyboard.Status.LostFocus) + SendTouchScreenKeyboardStatusChanged(); + + if (m_SoftKeyboard.status == TouchScreenKeyboard.Status.Canceled) + { + m_ReleaseSelection = true; + m_WasCanceled = true; + SendTouchScreenKeyboardStatusChanged(); + } + + if (m_SoftKeyboard.status == TouchScreenKeyboard.Status.Done) + { + m_ReleaseSelection = true; + OnSubmit(null); + SendTouchScreenKeyboardStatusChanged(); + } + } + + OnDeselect(null); + return; + } + + string val = m_SoftKeyboard.text; + + if (m_Text != val) + { + if (m_ReadOnly) + { + m_SoftKeyboard.text = m_Text; + } + else + { + m_Text = ""; + + for (int i = 0; i < val.Length; ++i) + { + char c = val[i]; + + if (c == '\r' || (int)c == 3) + c = '\n'; + + if (onValidateInput != null) + c = onValidateInput(m_Text, m_Text.Length, c); + else if (characterValidation != CharacterValidation.None) + c = Validate(m_Text, m_Text.Length, c); + + if (lineType == LineType.MultiLineSubmit && c == '\n') + { + m_SoftKeyboard.text = m_Text; + + OnSubmit(null); + OnDeselect(null); + return; + } + + if (c != 0) + m_Text += c; + } + + if (characterLimit > 0 && m_Text.Length > characterLimit) + m_Text = m_Text.Substring(0, characterLimit); + + UpdateStringPositionFromKeyboard(); + + // Set keyboard text before updating label, as we might have changed it with validation + // and update label will take the old value from keyboard if we don't change it here + if (m_Text != val) + m_SoftKeyboard.text = m_Text; + + SendOnValueChangedAndUpdateLabel(); + } + } + else if (m_HideMobileInput && Application.platform == RuntimePlatform.Android) + { + UpdateStringPositionFromKeyboard(); + } + + //else if (m_HideMobileInput) // m_Keyboard.canSetSelection + //{ + // int length = stringPositionInternal < stringSelectPositionInternal ? stringSelectPositionInternal - stringPositionInternal : stringPositionInternal - stringSelectPositionInternal; + // m_SoftKeyboard.selection = new RangeInt(stringPositionInternal < stringSelectPositionInternal ? stringPositionInternal : stringSelectPositionInternal, length); + //} + //else if (!m_HideMobileInput) // m_Keyboard.canGetSelection) + //{ + // UpdateStringPositionFromKeyboard(); + //} + + if (m_SoftKeyboard.status != TouchScreenKeyboard.Status.Visible) + { + if (m_SoftKeyboard.status == TouchScreenKeyboard.Status.Canceled) + m_WasCanceled = true; + + OnDeselect(null); + } + } + + + private bool MayDrag(PointerEventData eventData) + { + return IsActive() && + IsInteractable() && + eventData.button == PointerEventData.InputButton.Left && + m_TextComponent != null && + (m_SoftKeyboard == null || shouldHideSoftKeyboard || shouldHideMobileInput); + } + + public virtual void OnBeginDrag(PointerEventData eventData) + { + if (!MayDrag(eventData)) + return; + + m_UpdateDrag = true; + } + + public virtual void OnDrag(PointerEventData eventData) + { + if (!MayDrag(eventData)) + return; + + CaretPosition insertionSide; + + int insertionIndex = TMP_TextUtilities.GetCursorIndexFromPosition(m_TextComponent, eventData.position, eventData.pressEventCamera, out insertionSide); + + if (m_isRichTextEditingAllowed) + { + if (insertionSide == CaretPosition.Left) + { + stringSelectPositionInternal = m_TextComponent.textInfo.characterInfo[insertionIndex].index; + } + else if (insertionSide == CaretPosition.Right) + { + stringSelectPositionInternal = m_TextComponent.textInfo.characterInfo[insertionIndex].index + m_TextComponent.textInfo.characterInfo[insertionIndex].stringLength; + } + } + else + { + if (insertionSide == CaretPosition.Left) + { + stringSelectPositionInternal = insertionIndex == 0 + ? m_TextComponent.textInfo.characterInfo[0].index + : m_TextComponent.textInfo.characterInfo[insertionIndex - 1].index + m_TextComponent.textInfo.characterInfo[insertionIndex - 1].stringLength; + } + else if (insertionSide == CaretPosition.Right) + { + stringSelectPositionInternal = m_TextComponent.textInfo.characterInfo[insertionIndex].index + m_TextComponent.textInfo.characterInfo[insertionIndex].stringLength; + } + } + + caretSelectPositionInternal = GetCaretPositionFromStringIndex(stringSelectPositionInternal); + + MarkGeometryAsDirty(); + + m_DragPositionOutOfBounds = !RectTransformUtility.RectangleContainsScreenPoint(textViewport, eventData.position, eventData.pressEventCamera); + if (m_DragPositionOutOfBounds && m_DragCoroutine == null) + m_DragCoroutine = StartCoroutine(MouseDragOutsideRect(eventData)); + + eventData.Use(); + + #if TMP_DEBUG_MODE + Debug.Log("Caret Position: " + caretPositionInternal + " Selection Position: " + caretSelectPositionInternal + " String Position: " + stringPositionInternal + " String Select Position: " + stringSelectPositionInternal); + #endif + } + + IEnumerator MouseDragOutsideRect(PointerEventData eventData) + { + while (m_UpdateDrag && m_DragPositionOutOfBounds) + { + Vector2 localMousePos; + + RectTransformUtility.ScreenPointToLocalPointInRectangle(textViewport, eventData.position, eventData.pressEventCamera, out localMousePos); + + Rect rect = textViewport.rect; + + if (multiLine) + { + if (localMousePos.y > rect.yMax) + MoveUp(true, true); + else if (localMousePos.y < rect.yMin) + MoveDown(true, true); + } + else + { + if (localMousePos.x < rect.xMin) + MoveLeft(true, false); + else if (localMousePos.x > rect.xMax) + MoveRight(true, false); + } + + UpdateLabel(); + + float delay = multiLine ? kVScrollSpeed : kHScrollSpeed; + + if (m_WaitForSecondsRealtime == null) + m_WaitForSecondsRealtime = new WaitForSecondsRealtime(delay); + else + m_WaitForSecondsRealtime.waitTime = delay; + + yield return m_WaitForSecondsRealtime; + } + m_DragCoroutine = null; + } + + public virtual void OnEndDrag(PointerEventData eventData) + { + if (!MayDrag(eventData)) + return; + + m_UpdateDrag = false; + } + + public override void OnPointerDown(PointerEventData eventData) + { + if (!MayDrag(eventData)) + return; + + EventSystem.current.SetSelectedGameObject(gameObject, eventData); + + bool hadFocusBefore = m_AllowInput; + base.OnPointerDown(eventData); + + if (InPlaceEditing() == false) + { + if (m_SoftKeyboard == null || !m_SoftKeyboard.active) + { + OnSelect(eventData); + return; + } + } + + bool shift = Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift); + + // Check for Double Click + bool isDoubleClick = false; + float timeStamp = Time.unscaledTime; + + if (m_PointerDownClickStartTime + m_DoubleClickDelay > timeStamp) + isDoubleClick = true; + + m_PointerDownClickStartTime = timeStamp; + + // Only set caret position if we didn't just get focus now. + // Otherwise it will overwrite the select all on focus. + if (hadFocusBefore || !m_OnFocusSelectAll) + { + CaretPosition insertionSide; + + int insertionIndex = TMP_TextUtilities.GetCursorIndexFromPosition(m_TextComponent, eventData.position, eventData.pressEventCamera, out insertionSide); + + if (shift) + { + if (m_isRichTextEditingAllowed) + { + if (insertionSide == CaretPosition.Left) + { + stringSelectPositionInternal = m_TextComponent.textInfo.characterInfo[insertionIndex].index; + } + else if (insertionSide == CaretPosition.Right) + { + stringSelectPositionInternal = m_TextComponent.textInfo.characterInfo[insertionIndex].index + m_TextComponent.textInfo.characterInfo[insertionIndex].stringLength; + } + } + else + { + if (insertionSide == CaretPosition.Left) + { + stringSelectPositionInternal = insertionIndex == 0 + ? m_TextComponent.textInfo.characterInfo[0].index + : m_TextComponent.textInfo.characterInfo[insertionIndex - 1].index + m_TextComponent.textInfo.characterInfo[insertionIndex - 1].stringLength; + } + else if (insertionSide == CaretPosition.Right) + { + stringSelectPositionInternal = m_TextComponent.textInfo.characterInfo[insertionIndex].index + m_TextComponent.textInfo.characterInfo[insertionIndex].stringLength; + } + } + } + else + { + if (m_isRichTextEditingAllowed) + { + if (insertionSide == CaretPosition.Left) + { + stringPositionInternal = stringSelectPositionInternal = m_TextComponent.textInfo.characterInfo[insertionIndex].index; + } + else if (insertionSide == CaretPosition.Right) + { + stringPositionInternal = stringSelectPositionInternal = m_TextComponent.textInfo.characterInfo[insertionIndex].index + m_TextComponent.textInfo.characterInfo[insertionIndex].stringLength; + } + } + else + { + if (insertionSide == CaretPosition.Left) + { + stringPositionInternal = stringSelectPositionInternal = insertionIndex == 0 + ? m_TextComponent.textInfo.characterInfo[0].index + : m_TextComponent.textInfo.characterInfo[insertionIndex - 1].index + m_TextComponent.textInfo.characterInfo[insertionIndex - 1].stringLength; + } + else if (insertionSide == CaretPosition.Right) + { + stringPositionInternal = stringSelectPositionInternal = m_TextComponent.textInfo.characterInfo[insertionIndex].index + m_TextComponent.textInfo.characterInfo[insertionIndex].stringLength; + } + } + } + + + if (isDoubleClick) + { + int wordIndex = TMP_TextUtilities.FindIntersectingWord(m_TextComponent, eventData.position, eventData.pressEventCamera); + + if (wordIndex != -1) + { + // TODO: Should behavior be different if rich text editing is enabled or not? + + // Select current word + caretPositionInternal = m_TextComponent.textInfo.wordInfo[wordIndex].firstCharacterIndex; + caretSelectPositionInternal = m_TextComponent.textInfo.wordInfo[wordIndex].lastCharacterIndex + 1; + + stringPositionInternal = m_TextComponent.textInfo.characterInfo[caretPositionInternal].index; + stringSelectPositionInternal = m_TextComponent.textInfo.characterInfo[caretSelectPositionInternal - 1].index + m_TextComponent.textInfo.characterInfo[caretSelectPositionInternal - 1].stringLength; + } + else + { + // Select current character + caretPositionInternal = insertionIndex; + caretSelectPositionInternal = caretPositionInternal + 1; + + stringPositionInternal = m_TextComponent.textInfo.characterInfo[insertionIndex].index; + stringSelectPositionInternal = stringPositionInternal + m_TextComponent.textInfo.characterInfo[insertionIndex].stringLength; + } + } + else + { + caretPositionInternal = caretSelectPositionInternal = GetCaretPositionFromStringIndex(stringPositionInternal); + } + } + + UpdateLabel(); + eventData.Use(); + + #if TMP_DEBUG_MODE + Debug.Log("Caret Position: " + caretPositionInternal + " Selection Position: " + caretSelectPositionInternal + " String Position: " + stringPositionInternal + " String Select Position: " + stringSelectPositionInternal); + #endif + } + + protected enum EditState + { + Continue, + Finish + } + + protected EditState KeyPressed(Event evt) + { + var currentEventModifiers = evt.modifiers; + bool ctrl = SystemInfo.operatingSystemFamily == OperatingSystemFamily.MacOSX ? (currentEventModifiers & EventModifiers.Command) != 0 : (currentEventModifiers & EventModifiers.Control) != 0; + bool shift = (currentEventModifiers & EventModifiers.Shift) != 0; + bool alt = (currentEventModifiers & EventModifiers.Alt) != 0; + bool ctrlOnly = ctrl && !alt && !shift; + + switch (evt.keyCode) + { + case KeyCode.Backspace: + { + Backspace(); + return EditState.Continue; + } + + case KeyCode.Delete: + { + DeleteKey(); + return EditState.Continue; + } + + case KeyCode.Home: + { + MoveToStartOfLine(shift, ctrl); + return EditState.Continue; + } + + case KeyCode.End: + { + MoveToEndOfLine(shift, ctrl); + return EditState.Continue; + } + + // Select All + case KeyCode.A: + { + if (ctrlOnly) + { + SelectAll(); + return EditState.Continue; + } + break; + } + + // Copy + case KeyCode.C: + { + if (ctrlOnly) + { + if (inputType != InputType.Password) + clipboard = GetSelectedString(); + else + clipboard = ""; + return EditState.Continue; + } + break; + } + + // Paste + case KeyCode.V: + { + if (ctrlOnly) + { + Append(clipboard); + return EditState.Continue; + } + break; + } + + // Cut + case KeyCode.X: + { + if (ctrlOnly) + { + if (inputType != InputType.Password) + clipboard = GetSelectedString(); + else + clipboard = ""; + Delete(); + UpdateTouchKeyboardFromEditChanges(); + SendOnValueChangedAndUpdateLabel(); + return EditState.Continue; + } + break; + } + + case KeyCode.LeftArrow: + { + MoveLeft(shift, ctrl); + return EditState.Continue; + } + + case KeyCode.RightArrow: + { + MoveRight(shift, ctrl); + return EditState.Continue; + } + + case KeyCode.UpArrow: + { + MoveUp(shift); + return EditState.Continue; + } + + case KeyCode.DownArrow: + { + MoveDown(shift); + return EditState.Continue; + } + + case KeyCode.PageUp: + { + MovePageUp(shift); + return EditState.Continue; + } + + case KeyCode.PageDown: + { + MovePageDown(shift); + return EditState.Continue; + } + + // Submit + case KeyCode.Return: + case KeyCode.KeypadEnter: + { + if (lineType != LineType.MultiLineNewline) + { + m_ReleaseSelection = true; + return EditState.Finish; + } + break; + } + + case KeyCode.Escape: + { + m_ReleaseSelection = true; + m_WasCanceled = true; + return EditState.Finish; + } + } + + char c = evt.character; + + // Don't allow return chars or tabulator key to be entered into single line fields. + if (!multiLine && (c == '\t' || c == '\r' || c == 10)) + return EditState.Continue; + + // Convert carriage return and end-of-text characters to newline. + if (c == '\r' || (int)c == 3) + c = '\n'; + + if (IsValidChar(c)) + { + Append(c); + } + + if (c == 0) + { + if (compositionString.Length > 0) + { + UpdateLabel(); + } + } + return EditState.Continue; + } + + protected virtual bool IsValidChar(char c) + { + // Delete key on mac + if ((int)c == 127) + return false; + // Accept newline and tab + if (c == '\t' || c == '\n') + return true; + + return true; + + // With the addition of Dynamic support, I think this will best be handled by the text component. + //return m_TextComponent.font.HasCharacter(c, true); + } + + /// <summary> + /// Handle the specified event. + /// </summary> + private Event m_ProcessingEvent = new Event(); + + public void ProcessEvent(Event e) + { + KeyPressed(e); + } + + + /// <summary> + /// + /// </summary> + /// <param name="eventData"></param> + public virtual void OnUpdateSelected(BaseEventData eventData) + { + if (!isFocused) + return; + + bool consumedEvent = false; + while (Event.PopEvent(m_ProcessingEvent)) + { + if (m_ProcessingEvent.rawType == EventType.KeyDown) + { + //Debug.Log("Event: " + m_ProcessingEvent.ToString()); + + consumedEvent = true; + var shouldContinue = KeyPressed(m_ProcessingEvent); + if (shouldContinue == EditState.Finish) + { + SendOnSubmit(); + DeactivateInputField(); + break; + } + } + + switch (m_ProcessingEvent.type) + { + case EventType.ValidateCommand: + case EventType.ExecuteCommand: + switch (m_ProcessingEvent.commandName) + { + case "SelectAll": + SelectAll(); + consumedEvent = true; + break; + } + break; + } + } + + if (consumedEvent) + UpdateLabel(); + + eventData.Use(); + } + + + /// <summary> + /// + /// </summary> + /// <param name="eventData"></param> + public virtual void OnScroll(PointerEventData eventData) + { + if (m_TextComponent.preferredHeight < m_TextViewport.rect.height) return; + + float scrollDirection = -eventData.scrollDelta.y; + + m_ScrollPosition = m_ScrollPosition + (1f / m_TextComponent.textInfo.lineCount) * scrollDirection * m_ScrollSensitivity; + + m_ScrollPosition = Mathf.Clamp01(m_ScrollPosition); + + AdjustTextPositionRelativeToViewport(m_ScrollPosition); + + // Disable focus until user re-selected the input field. + m_AllowInput = false; + + if (m_VerticalScrollbar) + { + m_IsUpdatingScrollbarValues = true; + m_VerticalScrollbar.value = m_ScrollPosition; + } + + //Debug.Log("Scroll Position:" + m_ScrollPosition); + } + + + private string GetSelectedString() + { + if (!hasSelection) + return ""; + + int startPos = stringPositionInternal; + int endPos = stringSelectPositionInternal; + + // Ensure pos is always less then selPos to make the code simpler + if (startPos > endPos) + { + int temp = startPos; + startPos = endPos; + endPos = temp; + } + + //for (int i = m_CaretPosition; i < m_CaretSelectPosition; i++) + //{ + // Debug.Log("Character [" + m_TextComponent.textInfo.characterInfo[i].character + "] using Style [" + m_TextComponent.textInfo.characterInfo[i].style + "] has been selected."); + //} + + + return text.Substring(startPos, endPos - startPos); + } + + private int FindNextWordBegin() + { + if (stringSelectPositionInternal + 1 >= text.Length) + return text.Length; + + int spaceLoc = text.IndexOfAny(kSeparators, stringSelectPositionInternal + 1); + + if (spaceLoc == -1) + spaceLoc = text.Length; + else + spaceLoc++; + + return spaceLoc; + } + + private void MoveRight(bool shift, bool ctrl) + { + if (hasSelection && !shift) + { + // By convention, if we have a selection and move right without holding shift, + // we just place the cursor at the end. + stringPositionInternal = stringSelectPositionInternal = Mathf.Max(stringPositionInternal, stringSelectPositionInternal); + caretPositionInternal = caretSelectPositionInternal = GetCaretPositionFromStringIndex(stringSelectPositionInternal); + + #if TMP_DEBUG_MODE + Debug.Log("Caret Position: " + caretPositionInternal + " Selection Position: " + caretSelectPositionInternal + " String Position: " + stringPositionInternal + " String Select Position: " + stringSelectPositionInternal); + #endif + return; + } + + int position; + if (ctrl) + position = FindNextWordBegin(); + else + { + if (m_isRichTextEditingAllowed) + { + // Special handling for Surrogate pairs and Diacritical marks. + if (stringSelectPositionInternal < text.Length && char.IsHighSurrogate(text[stringSelectPositionInternal])) + position = stringSelectPositionInternal + 2; + else + position = stringSelectPositionInternal + 1; + } + else + { + position = m_TextComponent.textInfo.characterInfo[caretSelectPositionInternal].index + m_TextComponent.textInfo.characterInfo[caretSelectPositionInternal].stringLength; + } + + } + + if (shift) + { + stringSelectPositionInternal = position; + caretSelectPositionInternal = GetCaretPositionFromStringIndex(stringSelectPositionInternal); + } + else + { + stringSelectPositionInternal = stringPositionInternal = position; + + // Only increase caret position as we cross character boundary. + if (stringPositionInternal >= m_TextComponent.textInfo.characterInfo[caretPositionInternal].index + m_TextComponent.textInfo.characterInfo[caretPositionInternal].stringLength) + caretSelectPositionInternal = caretPositionInternal = GetCaretPositionFromStringIndex(stringSelectPositionInternal); + } + + #if TMP_DEBUG_MODE + Debug.Log("Caret Position: " + caretPositionInternal + " Selection Position: " + caretSelectPositionInternal + " String Position: " + stringPositionInternal + " String Select Position: " + stringSelectPositionInternal); + #endif + } + + private int FindPrevWordBegin() + { + if (stringSelectPositionInternal - 2 < 0) + return 0; + + int spaceLoc = text.LastIndexOfAny(kSeparators, stringSelectPositionInternal - 2); + + if (spaceLoc == -1) + spaceLoc = 0; + else + spaceLoc++; + + return spaceLoc; + } + + private void MoveLeft(bool shift, bool ctrl) + { + if (hasSelection && !shift) + { + // By convention, if we have a selection and move left without holding shift, + // we just place the cursor at the start. + stringPositionInternal = stringSelectPositionInternal = Mathf.Min(stringPositionInternal, stringSelectPositionInternal); + caretPositionInternal = caretSelectPositionInternal = GetCaretPositionFromStringIndex(stringSelectPositionInternal); + + #if TMP_DEBUG_MODE + Debug.Log("Caret Position: " + caretPositionInternal + " Selection Position: " + caretSelectPositionInternal + " String Position: " + stringPositionInternal + " String Select Position: " + stringSelectPositionInternal); + #endif + return; + } + + int position; + if (ctrl) + position = FindPrevWordBegin(); + else + { + if (m_isRichTextEditingAllowed) + { + // Special handling for Surrogate pairs and Diacritical marks. + if (stringSelectPositionInternal > 0 && char.IsLowSurrogate(text[stringSelectPositionInternal - 1])) + position = stringSelectPositionInternal - 2; + else + position = stringSelectPositionInternal - 1; + } + else + { + //position = GetStringIndexFromCaretPosition(caretSelectPositionInternal - 1); + position = caretSelectPositionInternal < 2 + ? m_TextComponent.textInfo.characterInfo[0].index + : m_TextComponent.textInfo.characterInfo[caretSelectPositionInternal - 2].index + m_TextComponent.textInfo.characterInfo[caretSelectPositionInternal - 2].stringLength; + } + } + + if (shift) + { + stringSelectPositionInternal = position; + caretSelectPositionInternal = GetCaretPositionFromStringIndex(stringSelectPositionInternal); + } + else + { + stringSelectPositionInternal = stringPositionInternal = position; + + // Only decrease caret position as we cross character boundary. + if (caretPositionInternal > 0 && stringPositionInternal <= m_TextComponent.textInfo.characterInfo[caretPositionInternal - 1].index) + caretSelectPositionInternal = caretPositionInternal = GetCaretPositionFromStringIndex(stringSelectPositionInternal); + } + + #if TMP_DEBUG_MODE + Debug.Log("Caret Position: " + caretPositionInternal + " Selection Position: " + caretSelectPositionInternal + " String Position: " + stringPositionInternal + " String Select Position: " + stringSelectPositionInternal); + #endif + } + + + private int LineUpCharacterPosition(int originalPos, bool goToFirstChar) + { + if (originalPos >= m_TextComponent.textInfo.characterCount) + originalPos -= 1; + + TMP_CharacterInfo originChar = m_TextComponent.textInfo.characterInfo[originalPos]; + int originLine = originChar.lineNumber; + + // We are on the first line return first character + if (originLine - 1 < 0) + return goToFirstChar ? 0 : originalPos; + + int endCharIdx = m_TextComponent.textInfo.lineInfo[originLine].firstCharacterIndex - 1; + + int closest = -1; + float distance = TMP_Math.FLOAT_MAX; + float range = 0; + + for (int i = m_TextComponent.textInfo.lineInfo[originLine - 1].firstCharacterIndex; i < endCharIdx; ++i) + { + TMP_CharacterInfo currentChar = m_TextComponent.textInfo.characterInfo[i]; + + float d = originChar.origin - currentChar.origin; + float r = d / (currentChar.xAdvance - currentChar.origin); + + if (r >= 0 && r <= 1) + { + if (r < 0.5f) + return i; + else + return i + 1; + } + + d = Mathf.Abs(d); + + if (d < distance) + { + closest = i; + distance = d; + range = r; + } + } + + if (closest == -1) return endCharIdx; + + //Debug.Log("Returning nearest character with Range = " + range); + + if (range < 0.5f) + return closest; + else + return closest + 1; + } + + + private int LineDownCharacterPosition(int originalPos, bool goToLastChar) + { + if (originalPos >= m_TextComponent.textInfo.characterCount) + return m_TextComponent.textInfo.characterCount - 1; // text.Length; + + TMP_CharacterInfo originChar = m_TextComponent.textInfo.characterInfo[originalPos]; + int originLine = originChar.lineNumber; + + //// We are on the last line return last character + if (originLine + 1 >= m_TextComponent.textInfo.lineCount) + return goToLastChar ? m_TextComponent.textInfo.characterCount - 1 : originalPos; + + // Need to determine end line for next line. + int endCharIdx = m_TextComponent.textInfo.lineInfo[originLine + 1].lastCharacterIndex; + + int closest = -1; + float distance = TMP_Math.FLOAT_MAX; + float range = 0; + + for (int i = m_TextComponent.textInfo.lineInfo[originLine + 1].firstCharacterIndex; i < endCharIdx; ++i) + { + TMP_CharacterInfo currentChar = m_TextComponent.textInfo.characterInfo[i]; + + float d = originChar.origin - currentChar.origin; + float r = d / (currentChar.xAdvance - currentChar.origin); + + if (r >= 0 && r <= 1) + { + if (r < 0.5f) + return i; + else + return i + 1; + } + + d = Mathf.Abs(d); + + if (d < distance) + { + closest = i; + distance = d; + range = r; + } + } + + if (closest == -1) return endCharIdx; + + //Debug.Log("Returning nearest character with Range = " + range); + + if (range < 0.5f) + return closest; + else + return closest + 1; + } + + + private int PageUpCharacterPosition(int originalPos, bool goToFirstChar) + { + if (originalPos >= m_TextComponent.textInfo.characterCount) + originalPos -= 1; + + TMP_CharacterInfo originChar = m_TextComponent.textInfo.characterInfo[originalPos]; + int originLine = originChar.lineNumber; + + // We are on the first line return first character + if (originLine - 1 < 0) + return goToFirstChar ? 0 : originalPos; + + float viewportHeight = m_TextViewport.rect.height; + + int newLine = originLine - 1; + // Iterate through each subsequent line to find the first baseline that is not visible in the viewport. + for (; newLine > 0; newLine--) + { + if (m_TextComponent.textInfo.lineInfo[newLine].baseline > m_TextComponent.textInfo.lineInfo[originLine].baseline + viewportHeight) + break; + } + + int endCharIdx = m_TextComponent.textInfo.lineInfo[newLine].lastCharacterIndex; + + int closest = -1; + float distance = TMP_Math.FLOAT_MAX; + float range = 0; + + for (int i = m_TextComponent.textInfo.lineInfo[newLine].firstCharacterIndex; i < endCharIdx; ++i) + { + TMP_CharacterInfo currentChar = m_TextComponent.textInfo.characterInfo[i]; + + float d = originChar.origin - currentChar.origin; + float r = d / (currentChar.xAdvance - currentChar.origin); + + if (r >= 0 && r <= 1) + { + if (r < 0.5f) + return i; + else + return i + 1; + } + + d = Mathf.Abs(d); + + if (d < distance) + { + closest = i; + distance = d; + range = r; + } + } + + if (closest == -1) return endCharIdx; + + //Debug.Log("Returning nearest character with Range = " + range); + + if (range < 0.5f) + return closest; + else + return closest + 1; + } + + + private int PageDownCharacterPosition(int originalPos, bool goToLastChar) + { + if (originalPos >= m_TextComponent.textInfo.characterCount) + return m_TextComponent.textInfo.characterCount - 1; + + TMP_CharacterInfo originChar = m_TextComponent.textInfo.characterInfo[originalPos]; + int originLine = originChar.lineNumber; + + // We are on the last line return last character + if (originLine + 1 >= m_TextComponent.textInfo.lineCount) + return goToLastChar ? m_TextComponent.textInfo.characterCount - 1 : originalPos; + + float viewportHeight = m_TextViewport.rect.height; + + int newLine = originLine + 1; + // Iterate through each subsequent line to find the first baseline that is not visible in the viewport. + for (; newLine < m_TextComponent.textInfo.lineCount - 1; newLine++) + { + if (m_TextComponent.textInfo.lineInfo[newLine].baseline < m_TextComponent.textInfo.lineInfo[originLine].baseline - viewportHeight) + break; + } + + // Need to determine end line for next line. + int endCharIdx = m_TextComponent.textInfo.lineInfo[newLine].lastCharacterIndex; + + int closest = -1; + float distance = TMP_Math.FLOAT_MAX; + float range = 0; + + for (int i = m_TextComponent.textInfo.lineInfo[newLine].firstCharacterIndex; i < endCharIdx; ++i) + { + TMP_CharacterInfo currentChar = m_TextComponent.textInfo.characterInfo[i]; + + float d = originChar.origin - currentChar.origin; + float r = d / (currentChar.xAdvance - currentChar.origin); + + if (r >= 0 && r <= 1) + { + if (r < 0.5f) + return i; + else + return i + 1; + } + + d = Mathf.Abs(d); + + if (d < distance) + { + closest = i; + distance = d; + range = r; + } + } + + if (closest == -1) return endCharIdx; + + if (range < 0.5f) + return closest; + else + return closest + 1; + } + + + private void MoveDown(bool shift) + { + MoveDown(shift, true); + } + + + private void MoveDown(bool shift, bool goToLastChar) + { + if (hasSelection && !shift) + { + // If we have a selection and press down without shift, + // set caret to end of selection before we move it down. + caretPositionInternal = caretSelectPositionInternal = Mathf.Max(caretPositionInternal, caretSelectPositionInternal); + } + + int position = multiLine ? LineDownCharacterPosition(caretSelectPositionInternal, goToLastChar) : m_TextComponent.textInfo.characterCount - 1; // text.Length; + + if (shift) + { + caretSelectPositionInternal = position; + stringSelectPositionInternal = GetStringIndexFromCaretPosition(caretSelectPositionInternal); + } + else + { + caretSelectPositionInternal = caretPositionInternal = position; + stringSelectPositionInternal = stringPositionInternal = GetStringIndexFromCaretPosition(caretSelectPositionInternal); + } + + #if TMP_DEBUG_MODE + Debug.Log("Caret Position: " + caretPositionInternal + " Selection Position: " + caretSelectPositionInternal + " String Position: " + stringPositionInternal + " String Select Position: " + stringSelectPositionInternal); + #endif + } + + private void MoveUp(bool shift) + { + MoveUp(shift, true); + } + + + private void MoveUp(bool shift, bool goToFirstChar) + { + if (hasSelection && !shift) + { + // If we have a selection and press up without shift, + // set caret position to start of selection before we move it up. + caretPositionInternal = caretSelectPositionInternal = Mathf.Min(caretPositionInternal, caretSelectPositionInternal); + } + + int position = multiLine ? LineUpCharacterPosition(caretSelectPositionInternal, goToFirstChar) : 0; + + if (shift) + { + caretSelectPositionInternal = position; + stringSelectPositionInternal = GetStringIndexFromCaretPosition(caretSelectPositionInternal); + } + else + { + caretSelectPositionInternal = caretPositionInternal = position; + stringSelectPositionInternal = stringPositionInternal = GetStringIndexFromCaretPosition(caretSelectPositionInternal); + } + + #if TMP_DEBUG_MODE + Debug.Log("Caret Position: " + caretPositionInternal + " Selection Position: " + caretSelectPositionInternal + " String Position: " + stringPositionInternal + " String Select Position: " + stringSelectPositionInternal); + #endif + } + + + private void MovePageUp(bool shift) + { + MovePageUp(shift, true); + } + + private void MovePageUp(bool shift, bool goToFirstChar) + { + if (hasSelection && !shift) + { + // If we have a selection and press up without shift, + // set caret position to start of selection before we move it up. + caretPositionInternal = caretSelectPositionInternal = Mathf.Min(caretPositionInternal, caretSelectPositionInternal); + } + + int position = multiLine ? PageUpCharacterPosition(caretSelectPositionInternal, goToFirstChar) : 0; + + if (shift) + { + caretSelectPositionInternal = position; + stringSelectPositionInternal = GetStringIndexFromCaretPosition(caretSelectPositionInternal); + } + else + { + caretSelectPositionInternal = caretPositionInternal = position; + stringSelectPositionInternal = stringPositionInternal = GetStringIndexFromCaretPosition(caretSelectPositionInternal); + } + + + // Scroll to top of viewport + //int currentLine = m_TextComponent.textInfo.characterInfo[position].lineNumber; + //float lineAscender = m_TextComponent.textInfo.lineInfo[currentLine].ascender; + + // Adjust text area up or down if not in single line mode. + if (m_LineType != LineType.SingleLine) + { + float offset = m_TextViewport.rect.height; // m_TextViewport.rect.yMax - (m_TextComponent.rectTransform.anchoredPosition.y + lineAscender); + + float topTextBounds = m_TextComponent.rectTransform.position.y + m_TextComponent.textBounds.max.y; + float topViewportBounds = m_TextViewport.position.y + m_TextViewport.rect.yMax; + + offset = topViewportBounds > topTextBounds + offset ? offset : topViewportBounds - topTextBounds; + + m_TextComponent.rectTransform.anchoredPosition += new Vector2(0, offset); + AssignPositioningIfNeeded(); + m_IsScrollbarUpdateRequired = true; + } + + #if TMP_DEBUG_MODE + Debug.Log("Caret Position: " + caretPositionInternal + " Selection Position: " + caretSelectPositionInternal + " String Position: " + stringPositionInternal + " String Select Position: " + stringSelectPositionInternal); + #endif + + } + + + private void MovePageDown(bool shift) + { + MovePageDown(shift, true); + } + + private void MovePageDown(bool shift, bool goToLastChar) + { + if (hasSelection && !shift) + { + // If we have a selection and press down without shift, + // set caret to end of selection before we move it down. + caretPositionInternal = caretSelectPositionInternal = Mathf.Max(caretPositionInternal, caretSelectPositionInternal); + } + + int position = multiLine ? PageDownCharacterPosition(caretSelectPositionInternal, goToLastChar) : m_TextComponent.textInfo.characterCount - 1; + + if (shift) + { + caretSelectPositionInternal = position; + stringSelectPositionInternal = GetStringIndexFromCaretPosition(caretSelectPositionInternal); + } + else + { + caretSelectPositionInternal = caretPositionInternal = position; + stringSelectPositionInternal = stringPositionInternal = GetStringIndexFromCaretPosition(caretSelectPositionInternal); + } + + // Scroll to top of viewport + //int currentLine = m_TextComponent.textInfo.characterInfo[position].lineNumber; + //float lineAscender = m_TextComponent.textInfo.lineInfo[currentLine].ascender; + + // Adjust text area up or down if not in single line mode. + if (m_LineType != LineType.SingleLine) + { + float offset = m_TextViewport.rect.height; // m_TextViewport.rect.yMax - (m_TextComponent.rectTransform.anchoredPosition.y + lineAscender); + + float bottomTextBounds = m_TextComponent.rectTransform.position.y + m_TextComponent.textBounds.min.y; + float bottomViewportBounds = m_TextViewport.position.y + m_TextViewport.rect.yMin; + + offset = bottomViewportBounds > bottomTextBounds + offset ? offset : bottomViewportBounds - bottomTextBounds; + + m_TextComponent.rectTransform.anchoredPosition += new Vector2(0, offset); + AssignPositioningIfNeeded(); + m_IsScrollbarUpdateRequired = true; + } + + #if TMP_DEBUG_MODE + Debug.Log("Caret Position: " + caretPositionInternal + " Selection Position: " + caretSelectPositionInternal + " String Position: " + stringPositionInternal + " String Select Position: " + stringSelectPositionInternal); + #endif + + } + + private void Delete() + { + if (m_ReadOnly) + return; + + if (stringPositionInternal == stringSelectPositionInternal) + return; + + if (m_isRichTextEditingAllowed || m_isSelectAll) + { + // Handling of Delete when Rich Text is allowed. + if (stringPositionInternal < stringSelectPositionInternal) + { + m_Text = text.Remove(stringPositionInternal, stringSelectPositionInternal - stringPositionInternal); + stringSelectPositionInternal = stringPositionInternal; + } + else + { + m_Text = text.Remove(stringSelectPositionInternal, stringPositionInternal - stringSelectPositionInternal); + stringPositionInternal = stringSelectPositionInternal; + } + + m_isSelectAll = false; + } + else + { + if (caretPositionInternal < caretSelectPositionInternal) + { + stringPositionInternal = m_TextComponent.textInfo.characterInfo[caretPositionInternal].index; + stringSelectPositionInternal = m_TextComponent.textInfo.characterInfo[caretSelectPositionInternal - 1].index + m_TextComponent.textInfo.characterInfo[caretSelectPositionInternal - 1].stringLength; + + m_Text = text.Remove(stringPositionInternal, stringSelectPositionInternal - stringPositionInternal); + + stringSelectPositionInternal = stringPositionInternal; + caretSelectPositionInternal = caretPositionInternal; + } + else + { + stringPositionInternal = m_TextComponent.textInfo.characterInfo[caretPositionInternal - 1].index + m_TextComponent.textInfo.characterInfo[caretPositionInternal - 1].stringLength; + stringSelectPositionInternal = m_TextComponent.textInfo.characterInfo[caretSelectPositionInternal].index; + + m_Text = text.Remove(stringSelectPositionInternal, stringPositionInternal - stringSelectPositionInternal); + + stringPositionInternal = stringSelectPositionInternal; + caretPositionInternal = caretSelectPositionInternal; + } + } + + #if TMP_DEBUG_MODE + Debug.Log("Caret Position: " + caretPositionInternal + " Selection Position: " + caretSelectPositionInternal + " String Position: " + stringPositionInternal + " String Select Position: " + stringSelectPositionInternal); + #endif + } + + /// <summary> + /// Handling of DEL key + /// </summary> + private void DeleteKey() + { + if (m_ReadOnly) + return; + + if (hasSelection) + { + Delete(); + UpdateTouchKeyboardFromEditChanges(); + SendOnValueChangedAndUpdateLabel(); + } + else + { + if (m_isRichTextEditingAllowed) + { + if (stringPositionInternal < text.Length) + { + // Special handling for Surrogate Pairs + if (char.IsHighSurrogate(text[stringPositionInternal])) + m_Text = text.Remove(stringPositionInternal, 2); + else + m_Text = text.Remove(stringPositionInternal, 1); + + UpdateTouchKeyboardFromEditChanges(); + SendOnValueChangedAndUpdateLabel(); + } + } + else + { + if (caretPositionInternal < m_TextComponent.textInfo.characterCount - 1) + { + int numberOfCharactersToRemove = m_TextComponent.textInfo.characterInfo[caretPositionInternal].stringLength; + + // Adjust string position to skip any potential rich text tags. + int nextCharacterStringPosition = m_TextComponent.textInfo.characterInfo[caretPositionInternal].index; + + m_Text = text.Remove(nextCharacterStringPosition, numberOfCharactersToRemove); + + SendOnValueChangedAndUpdateLabel(); + } + } + } + + #if TMP_DEBUG_MODE + Debug.Log("Caret Position: " + caretPositionInternal + " Selection Position: " + caretSelectPositionInternal + " String Position: " + stringPositionInternal + " String Select Position: " + stringSelectPositionInternal); + #endif + } + + /// <summary> + /// Handling of Backspace key + /// </summary> + private void Backspace() + { + if (m_ReadOnly) + return; + + if (hasSelection) + { + Delete(); + UpdateTouchKeyboardFromEditChanges(); + SendOnValueChangedAndUpdateLabel(); + } + else + { + if (m_isRichTextEditingAllowed) + { + if (stringPositionInternal > 0) + { + int numberOfCharactersToRemove = 1; + + // Special handling for Surrogate pairs and Diacritical marks + if (char.IsLowSurrogate(text[stringPositionInternal - 1])) + numberOfCharactersToRemove = 2; + + stringSelectPositionInternal = stringPositionInternal = stringPositionInternal - numberOfCharactersToRemove; + + m_Text = text.Remove(stringPositionInternal, numberOfCharactersToRemove); + + caretSelectPositionInternal = caretPositionInternal = caretPositionInternal - 1; + + m_isLastKeyBackspace = true; + + UpdateTouchKeyboardFromEditChanges(); + SendOnValueChangedAndUpdateLabel(); + } + } + else + { + if (caretPositionInternal > 0) + { + int numberOfCharactersToRemove = m_TextComponent.textInfo.characterInfo[caretPositionInternal - 1].stringLength; + + // Delete the previous character + m_Text = text.Remove(m_TextComponent.textInfo.characterInfo[caretPositionInternal - 1].index, numberOfCharactersToRemove); + + // Get new adjusted string position + stringSelectPositionInternal = stringPositionInternal = caretPositionInternal < 2 + ? m_TextComponent.textInfo.characterInfo[0].index + : m_TextComponent.textInfo.characterInfo[caretPositionInternal - 2].index + m_TextComponent.textInfo.characterInfo[caretPositionInternal - 2].stringLength; + + caretSelectPositionInternal = caretPositionInternal = caretPositionInternal - 1; + } + + m_isLastKeyBackspace = true; + + UpdateTouchKeyboardFromEditChanges(); + SendOnValueChangedAndUpdateLabel(); + } + + } + + #if TMP_DEBUG_MODE + Debug.Log("Caret Position: " + caretPositionInternal + " Selection Position: " + caretSelectPositionInternal + " String Position: " + stringPositionInternal + " String Select Position: " + stringSelectPositionInternal); + #endif + } + + + /// <summary> + /// Append the specified text to the end of the current. + /// </summary> + protected virtual void Append(string input) + { + if (m_ReadOnly) + return; + + if (InPlaceEditing() == false) + return; + + for (int i = 0, imax = input.Length; i < imax; ++i) + { + char c = input[i]; + + if (c >= ' ' || c == '\t' || c == '\r' || c == 10 || c == '\n') + { + Append(c); + } + } + } + + protected virtual void Append(char input) + { + if (m_ReadOnly) + return; + + if (InPlaceEditing() == false) + return; + + // If we have an input validator, validate the input first + if (onValidateInput != null) + input = onValidateInput(text, stringPositionInternal, input); + else if (characterValidation == CharacterValidation.CustomValidator) + { + input = Validate(text, stringPositionInternal, input); + + if (input == 0) return; + + SendOnValueChanged(); + UpdateLabel(); + + return; + } + else if (characterValidation != CharacterValidation.None) + input = Validate(text, stringPositionInternal, input); + + // If the input is invalid, skip it + if (input == 0) + return; + + // Append the character and update the label + Insert(input); + } + + + // Insert the character and update the label. + private void Insert(char c) + { + if (m_ReadOnly) + return; + + string replaceString = c.ToString(); + Delete(); + + // Can't go past the character limit + if (characterLimit > 0 && text.Length >= characterLimit) + return; + + m_Text = text.Insert(m_StringPosition, replaceString); + + if (!char.IsHighSurrogate(c)) + caretSelectPositionInternal = caretPositionInternal += 1; + + stringSelectPositionInternal = stringPositionInternal += 1; + + UpdateTouchKeyboardFromEditChanges(); + SendOnValueChanged(); + + #if TMP_DEBUG_MODE + Debug.Log("Caret Position: " + caretPositionInternal + " Selection Position: " + caretSelectPositionInternal + " String Position: " + stringPositionInternal + " String Select Position: " + stringSelectPositionInternal); + #endif + } + + private void UpdateTouchKeyboardFromEditChanges() + { + // Update the TouchKeyboard's text from edit changes + // if in-place editing is allowed + if (m_SoftKeyboard != null && InPlaceEditing()) + { + m_SoftKeyboard.text = m_Text; + } + } + + private void SendOnValueChangedAndUpdateLabel() + { + UpdateLabel(); + SendOnValueChanged(); + } + + private void SendOnValueChanged() + { + if (onValueChanged != null) + onValueChanged.Invoke(text); + } + + /// <summary> + /// Submit the input field's text. + /// </summary> + + protected void SendOnEndEdit() + { + if (onEndEdit != null) + onEndEdit.Invoke(m_Text); + } + + protected void SendOnSubmit() + { + if (onSubmit != null) + onSubmit.Invoke(m_Text); + } + + protected void SendOnFocus() + { + if (onSelect != null) + onSelect.Invoke(m_Text); + } + + protected void SendOnFocusLost() + { + if (onDeselect != null) + onDeselect.Invoke(m_Text); + } + + protected void SendOnTextSelection() + { + m_isSelected = true; + + if (onTextSelection != null) + onTextSelection.Invoke(m_Text, stringPositionInternal, stringSelectPositionInternal); + } + + protected void SendOnEndTextSelection() + { + if (!m_isSelected) return; + + if (onEndTextSelection != null) + onEndTextSelection.Invoke(m_Text, stringPositionInternal, stringSelectPositionInternal); + + m_isSelected = false; + } + + protected void SendTouchScreenKeyboardStatusChanged() + { + if (onTouchScreenKeyboardStatusChanged != null) + onTouchScreenKeyboardStatusChanged.Invoke(m_SoftKeyboard.status); + } + + + /// <summary> + /// Update the visual text Text. + /// </summary> + + protected void UpdateLabel() + { + if (m_TextComponent != null && m_TextComponent.font != null && m_PreventCallback == false) + { + // Prevent callback from the text component as we assign new text. This is to prevent a recursive call. + m_PreventCallback = true; + + string fullText; + if (compositionString.Length > 0) + { + fullText = text.Substring(0, m_StringPosition) + compositionString + text.Substring(m_StringPosition); + + // Should adjust caret position + //Debug.Log("Handling IME Input... [" + compositionString + "] of length [" + compositionString.Length + "] at StringPosition [" + m_StringPosition + "]"); + //for (int i = 0; i < compositionString.Length; i++) + // Debug.Log((uint)compositionString[i]); + } + else + { + fullText = text; + //Debug.Log("Handling Input... [" + text + "]"); + } + + string processed; + if (inputType == InputType.Password) + processed = new string(asteriskChar, fullText.Length); + else + processed = fullText; + + bool isEmpty = string.IsNullOrEmpty(fullText); + + if (m_Placeholder != null) + m_Placeholder.enabled = isEmpty; + + if (!isEmpty) + { + SetCaretVisible(); + } + + m_TextComponent.text = processed + "\u200B"; // Extra space is added for Caret tracking. + + // Special handling to limit the number of lines of text in the Input Field. + if (m_LineLimit > 0) + { + m_TextComponent.ForceMeshUpdate(); + + // Check if text exceeds maximum number of lines. + if (m_TextComponent.textInfo.lineCount > m_LineLimit) + { + int lastValidCharacterIndex = m_TextComponent.textInfo.lineInfo[m_LineLimit - 1].lastCharacterIndex; + int characterStringIndex = m_TextComponent.textInfo.characterInfo[lastValidCharacterIndex].index + m_TextComponent.textInfo.characterInfo[lastValidCharacterIndex].stringLength; + text = processed.Remove(characterStringIndex, processed.Length - characterStringIndex); + m_TextComponent.text = text + "\u200B"; + } + } + + if (m_IsTextComponentUpdateRequired) + { + m_IsTextComponentUpdateRequired = false; + m_TextComponent.ForceMeshUpdate(); + } + + MarkGeometryAsDirty(); + + // Scrollbar should be updated. + m_IsScrollbarUpdateRequired = true; + + m_PreventCallback = false; + } + } + + void UpdateScrollbar() + { + // Update Scrollbar + if (m_VerticalScrollbar) + { + float size = m_TextViewport.rect.height / m_TextComponent.preferredHeight; + + m_IsUpdatingScrollbarValues = true; + + m_VerticalScrollbar.size = size; + + m_ScrollPosition = m_VerticalScrollbar.value = m_TextComponent.rectTransform.anchoredPosition.y / (m_TextComponent.preferredHeight - m_TextViewport.rect.height); + + //m_VerticalScrollbar.numberOfSteps = (int)(m_TextComponent.textInfo.lineCount / 0.25f); // Replace by scroll sensitivity. + + //Debug.Log("Updating Scrollbar... Value: " + m_VerticalScrollbar.value); + } + } + + + /// <summary> + /// Function to update the vertical position of the text container when OnValueChanged event is received from the Scrollbar. + /// </summary> + /// <param name="value"></param> + void OnScrollbarValueChange(float value) + { + if (m_IsUpdatingScrollbarValues) { m_IsUpdatingScrollbarValues = false; return; } + + if (value < 0 || value > 1) return; + + AdjustTextPositionRelativeToViewport(value); + + m_ScrollPosition = value; + + //Debug.Log("Scrollbar value is: " + value + " Transform POS: " + m_TextComponent.rectTransform.anchoredPosition); + } + + /// <summary> + /// Adjusts the relative position of the body of the text relative to the viewport. + /// </summary> + /// <param name="relativePosition"></param> + void AdjustTextPositionRelativeToViewport (float relativePosition) + { + //Debug.Log("- Adjusting vertical text position to " + relativePosition); + if (m_TextViewport == null) + return; + + TMP_TextInfo textInfo = m_TextComponent.textInfo; + + // Check to make sure we have valid data and lines to query. + if (textInfo == null || textInfo.lineInfo == null || textInfo.lineCount == 0 || textInfo.lineCount > textInfo.lineInfo.Length) return; + + //m_TextComponent.rectTransform.anchoredPosition = new Vector2(m_TextComponent.rectTransform.anchoredPosition.x, (textHeight - viewportHeight) * relativePosition); + m_TextComponent.rectTransform.anchoredPosition = new Vector2(m_TextComponent.rectTransform.anchoredPosition.x, (m_TextComponent.preferredHeight - m_TextViewport.rect.height) * relativePosition); + + AssignPositioningIfNeeded(); + + //Debug.Log("Text height: " + m_TextComponent.preferredHeight + " Viewport height: " + m_TextViewport.rect.height + " Adjusted RectTransform anchordedPosition:" + m_TextComponent.rectTransform.anchoredPosition + " Text Bounds: " + m_TextComponent.bounds.ToString("f3")); + } + + + private int GetCaretPositionFromStringIndex(int stringIndex) + { + int count = m_TextComponent.textInfo.characterCount; + + for (int i = 0; i < count; i++) + { + if (m_TextComponent.textInfo.characterInfo[i].index >= stringIndex) + return i; + } + + return count; + } + + /// <summary> + /// Returns / places the caret before the given character at the string index. + /// </summary> + /// <param name="stringIndex"></param> + /// <returns></returns> + private int GetMinCaretPositionFromStringIndex(int stringIndex) + { + int count = m_TextComponent.textInfo.characterCount; + + for (int i = 0; i < count; i++) + { + if (stringIndex < m_TextComponent.textInfo.characterInfo[i].index + m_TextComponent.textInfo.characterInfo[i].stringLength) + return i; + } + + return count; + } + + /// <summary> + /// Returns / places the caret after the given character at the string index. + /// </summary> + /// <param name="stringIndex"></param> + /// <returns></returns> + private int GetMaxCaretPositionFromStringIndex(int stringIndex) + { + int count = m_TextComponent.textInfo.characterCount; + + for (int i = 0; i < count; i++) + { + if (m_TextComponent.textInfo.characterInfo[i].index >= stringIndex) + return i; + } + + return count; + } + + private int GetStringIndexFromCaretPosition(int caretPosition) + { + // Clamp values between 0 and character count. + ClampCaretPos(ref caretPosition); + + return m_TextComponent.textInfo.characterInfo[caretPosition].index; + } + + + public void ForceLabelUpdate() + { + UpdateLabel(); + } + + private void MarkGeometryAsDirty() + { + #if UNITY_EDITOR + #if UNITY_2018_3_OR_NEWER + if (!Application.isPlaying || UnityEditor.PrefabUtility.IsPartOfPrefabAsset(this)) + return; + #else + if (!Application.isPlaying || UnityEditor.PrefabUtility.GetPrefabObject(gameObject) != null) + return; + #endif + #endif + + CanvasUpdateRegistry.RegisterCanvasElementForGraphicRebuild(this); + } + + public virtual void Rebuild(CanvasUpdate update) + { + switch (update) + { + case CanvasUpdate.LatePreRender: + UpdateGeometry(); + break; + } + } + + public virtual void LayoutComplete() + { } + + public virtual void GraphicUpdateComplete() + { } + + private void UpdateGeometry() + { + #if UNITY_EDITOR + if (!Application.isPlaying) + return; + #endif + + // No need to draw a cursor on mobile as its handled by the devices keyboard. + if (InPlaceEditing() == false) + return; + + if (m_CachedInputRenderer == null) + return; + + OnFillVBO(mesh); + + m_CachedInputRenderer.SetMesh(mesh); + } + + + /// <summary> + /// Method to keep the Caret RectTransform properties in sync with the text object's RectTransform + /// </summary> + private void AssignPositioningIfNeeded() + { + if (m_TextComponent != null && caretRectTrans != null && + (caretRectTrans.localPosition != m_TextComponent.rectTransform.localPosition || + caretRectTrans.localRotation != m_TextComponent.rectTransform.localRotation || + caretRectTrans.localScale != m_TextComponent.rectTransform.localScale || + caretRectTrans.anchorMin != m_TextComponent.rectTransform.anchorMin || + caretRectTrans.anchorMax != m_TextComponent.rectTransform.anchorMax || + caretRectTrans.anchoredPosition != m_TextComponent.rectTransform.anchoredPosition || + caretRectTrans.sizeDelta != m_TextComponent.rectTransform.sizeDelta || + caretRectTrans.pivot != m_TextComponent.rectTransform.pivot)) + { + caretRectTrans.localPosition = m_TextComponent.rectTransform.localPosition; + caretRectTrans.localRotation = m_TextComponent.rectTransform.localRotation; + caretRectTrans.localScale = m_TextComponent.rectTransform.localScale; + caretRectTrans.anchorMin = m_TextComponent.rectTransform.anchorMin; + caretRectTrans.anchorMax = m_TextComponent.rectTransform.anchorMax; + caretRectTrans.anchoredPosition = m_TextComponent.rectTransform.anchoredPosition; + caretRectTrans.sizeDelta = m_TextComponent.rectTransform.sizeDelta; + caretRectTrans.pivot = m_TextComponent.rectTransform.pivot; + + // Get updated world corners of viewport. + //m_TextViewport.GetLocalCorners(m_ViewportCorners); + } + } + + + private void OnFillVBO(Mesh vbo) + { + using (var helper = new VertexHelper()) + { + if (!isFocused && !m_SelectionStillActive) + { + helper.FillMesh(vbo); + return; + } + + if (m_IsStringPositionDirty) + { + stringPositionInternal = GetStringIndexFromCaretPosition(m_CaretPosition); + stringSelectPositionInternal = GetStringIndexFromCaretPosition(m_CaretSelectPosition); + m_IsStringPositionDirty = false; + } + + if (m_IsCaretPositionDirty) + { + caretPositionInternal = GetCaretPositionFromStringIndex(stringPositionInternal); + caretSelectPositionInternal = GetCaretPositionFromStringIndex(stringSelectPositionInternal); + m_IsCaretPositionDirty = false; + } + + if (!hasSelection && !m_ReadOnly) + { + GenerateCaret(helper, Vector2.zero); + SendOnEndTextSelection(); + } + else + { + GenerateHightlight(helper, Vector2.zero); + SendOnTextSelection(); + } + + helper.FillMesh(vbo); + } + } + + + private void GenerateCaret(VertexHelper vbo, Vector2 roundingOffset) + { + if (!m_CaretVisible) + return; + + if (m_CursorVerts == null) + { + CreateCursorVerts(); + } + + float width = m_CaretWidth; + + // TODO: Optimize to only update the caret position when needed. + + Vector2 startPosition = Vector2.zero; + float height = 0; + TMP_CharacterInfo currentCharacter; + + int currentLine = m_TextComponent.textInfo.characterInfo[caretPositionInternal].lineNumber; + + // Caret is positioned at the origin for the first character of each lines and at the advance for subsequent characters. + if (caretPositionInternal == m_TextComponent.textInfo.lineInfo[currentLine].firstCharacterIndex) + { + currentCharacter = m_TextComponent.textInfo.characterInfo[caretPositionInternal]; + startPosition = new Vector2(currentCharacter.origin, currentCharacter.descender); + height = currentCharacter.ascender - currentCharacter.descender; + } + else + { + currentCharacter = m_TextComponent.textInfo.characterInfo[caretPositionInternal - 1]; + startPosition = new Vector2(currentCharacter.xAdvance, currentCharacter.descender); + height = currentCharacter.ascender - currentCharacter.descender; + } + + if (m_SoftKeyboard != null) + m_SoftKeyboard.selection = new RangeInt(stringPositionInternal, 0); + + // Adjust the position of the RectTransform based on the caret position in the viewport (only if we have focus). + if (isFocused && startPosition != m_LastPosition || m_forceRectTransformAdjustment) + AdjustRectTransformRelativeToViewport(startPosition, height, currentCharacter.isVisible); + + m_LastPosition = startPosition; + + // Clamp Caret height + float top = startPosition.y + height; + float bottom = top - height; + + // Minor tweak to address caret potentially being too thin based on canvas scaler values. + float scale = m_TextComponent.canvas.scaleFactor; + + m_CursorVerts[0].position = new Vector3(startPosition.x, bottom, 0.0f); + m_CursorVerts[1].position = new Vector3(startPosition.x, top, 0.0f); + m_CursorVerts[2].position = new Vector3(startPosition.x + (width + 1) / scale, top, 0.0f); + m_CursorVerts[3].position = new Vector3(startPosition.x + (width + 1) / scale, bottom, 0.0f); + + // Set Vertex Color for the caret color. + m_CursorVerts[0].color = caretColor; + m_CursorVerts[1].color = caretColor; + m_CursorVerts[2].color = caretColor; + m_CursorVerts[3].color = caretColor; + + vbo.AddUIVertexQuad(m_CursorVerts); + + int screenHeight = Screen.height; + // Removed multiple display support until it supports none native resolutions(case 741751) + //int displayIndex = m_TextComponent.canvas.targetDisplay; + //if (Screen.fullScreen && displayIndex < Display.displays.Length) + // screenHeight = Display.displays[displayIndex].renderingHeight; + + startPosition.y = screenHeight - startPosition.y; + inputSystem.compositionCursorPos = startPosition; + + //#if TMP_DEBUG_MODE + //Debug.Log("Caret position updated at frame: " + Time.frameCount); + //#endif + } + + + private void CreateCursorVerts() + { + m_CursorVerts = new UIVertex[4]; + + for (int i = 0; i < m_CursorVerts.Length; i++) + { + m_CursorVerts[i] = UIVertex.simpleVert; + m_CursorVerts[i].uv0 = Vector2.zero; + } + } + + + private void GenerateHightlight(VertexHelper vbo, Vector2 roundingOffset) + { + TMP_TextInfo textInfo = m_TextComponent.textInfo; + + caretPositionInternal = m_CaretPosition = GetCaretPositionFromStringIndex(stringPositionInternal); + caretSelectPositionInternal = m_CaretSelectPosition = GetCaretPositionFromStringIndex(stringSelectPositionInternal); + + if (m_SoftKeyboard != null) + { + int stringPosition = caretPositionInternal < caretSelectPositionInternal ? textInfo.characterInfo[caretPositionInternal].index : textInfo.characterInfo[caretSelectPositionInternal].index; + int length = caretPositionInternal < caretSelectPositionInternal ? stringSelectPositionInternal - stringPosition : stringPositionInternal - stringPosition; + m_SoftKeyboard.selection = new RangeInt(stringPosition, length); + } + + // Adjust text RectTranform position to make sure it is visible in viewport. + Vector2 caretPosition; + float height = 0; + if (caretSelectPositionInternal < textInfo.characterCount) + { + caretPosition = new Vector2(textInfo.characterInfo[caretSelectPositionInternal].origin, textInfo.characterInfo[caretSelectPositionInternal].descender); + height = textInfo.characterInfo[caretSelectPositionInternal].ascender - textInfo.characterInfo[caretSelectPositionInternal].descender; + } + else + { + caretPosition = new Vector2(textInfo.characterInfo[caretSelectPositionInternal - 1].xAdvance, textInfo.characterInfo[caretSelectPositionInternal - 1].descender); + height = textInfo.characterInfo[caretSelectPositionInternal - 1].ascender - textInfo.characterInfo[caretSelectPositionInternal - 1].descender; + } + + // TODO: Don't adjust the position of the RectTransform if Reset On Deactivation is disabled + // and we just selected the Input Field again. + AdjustRectTransformRelativeToViewport(caretPosition, height, true); + + int startChar = Mathf.Max(0, caretPositionInternal); + int endChar = Mathf.Max(0, caretSelectPositionInternal); + + // Ensure pos is always less then selPos to make the code simpler + if (startChar > endChar) + { + int temp = startChar; + startChar = endChar; + endChar = temp; + } + + endChar -= 1; + + //Debug.Log("Updating Highlight... Caret Position: " + startChar + " Caret Select POS: " + endChar); + + + int currentLineIndex = textInfo.characterInfo[startChar].lineNumber; + int nextLineStartIdx = textInfo.lineInfo[currentLineIndex].lastCharacterIndex; + + UIVertex vert = UIVertex.simpleVert; + vert.uv0 = Vector2.zero; + vert.color = selectionColor; + + int currentChar = startChar; + while (currentChar <= endChar && currentChar < textInfo.characterCount) + { + if (currentChar == nextLineStartIdx || currentChar == endChar) + { + TMP_CharacterInfo startCharInfo = textInfo.characterInfo[startChar]; + TMP_CharacterInfo endCharInfo = textInfo.characterInfo[currentChar]; + + // Extra check to handle Carriage Return + if (currentChar > 0 && endCharInfo.character == 10 && textInfo.characterInfo[currentChar - 1].character == 13) + endCharInfo = textInfo.characterInfo[currentChar - 1]; + + Vector2 startPosition = new Vector2(startCharInfo.origin, textInfo.lineInfo[currentLineIndex].ascender); + Vector2 endPosition = new Vector2(endCharInfo.xAdvance, textInfo.lineInfo[currentLineIndex].descender); + + var startIndex = vbo.currentVertCount; + vert.position = new Vector3(startPosition.x, endPosition.y, 0.0f); + vbo.AddVert(vert); + + vert.position = new Vector3(endPosition.x, endPosition.y, 0.0f); + vbo.AddVert(vert); + + vert.position = new Vector3(endPosition.x, startPosition.y, 0.0f); + vbo.AddVert(vert); + + vert.position = new Vector3(startPosition.x, startPosition.y, 0.0f); + vbo.AddVert(vert); + + vbo.AddTriangle(startIndex, startIndex + 1, startIndex + 2); + vbo.AddTriangle(startIndex + 2, startIndex + 3, startIndex + 0); + + startChar = currentChar + 1; + currentLineIndex++; + + if (currentLineIndex < textInfo.lineCount) + nextLineStartIdx = textInfo.lineInfo[currentLineIndex].lastCharacterIndex; + } + currentChar++; + } + + // Scrollbar should be updated. + m_IsScrollbarUpdateRequired = true; + + //#if TMP_DEBUG_MODE + // Debug.Log("Text selection updated at frame: " + Time.frameCount); + //#endif + } + + + /// <summary> + /// + /// </summary> + /// <param name="startPosition"></param> + /// <param name="height"></param> + /// <param name="isCharVisible"></param> + private void AdjustRectTransformRelativeToViewport(Vector2 startPosition, float height, bool isCharVisible) + { + //Debug.Log("Adjusting transform position relative to viewport."); + + if (m_TextViewport == null || m_IsDrivenByLayoutComponents) + return; + + float viewportMin = m_TextViewport.rect.xMin; + float viewportMax = m_TextViewport.rect.xMax; + + //Debug.Log("Viewport Rect: " + viewportMax + " Start Position: " + startPosition); + // Adjust the position of the RectTransform based on the caret position in the viewport. + float rightOffset = viewportMax - (m_TextComponent.rectTransform.anchoredPosition.x + startPosition.x + m_TextComponent.margin.z + m_CaretWidth); + if (rightOffset < 0f) + { + if (!multiLine || (multiLine && isCharVisible)) + { + //Debug.Log("Shifting text to the right by " + rightOffset.ToString("f3")); + m_TextComponent.rectTransform.anchoredPosition += new Vector2(rightOffset, 0); + + AssignPositioningIfNeeded(); + } + } + + float leftOffset = (m_TextComponent.rectTransform.anchoredPosition.x + startPosition.x - m_TextComponent.margin.x) - viewportMin; + if (leftOffset < 0f) + { + //Debug.Log("Shifting text to the left by " + leftOffset.ToString("f3")); + m_TextComponent.rectTransform.anchoredPosition += new Vector2(-leftOffset, 0); + AssignPositioningIfNeeded(); + } + + + // Adjust text area up or down if not in single line mode. + if (m_LineType != LineType.SingleLine) + { + float topOffset = m_TextViewport.rect.yMax - (m_TextComponent.rectTransform.anchoredPosition.y + startPosition.y + height); + if (topOffset < -0.0001f) + { + m_TextComponent.rectTransform.anchoredPosition += new Vector2(0, topOffset); + AssignPositioningIfNeeded(); + m_IsScrollbarUpdateRequired = true; + } + + float bottomOffset = (m_TextComponent.rectTransform.anchoredPosition.y + startPosition.y) - m_TextViewport.rect.yMin; + if (bottomOffset < 0f) + { + m_TextComponent.rectTransform.anchoredPosition -= new Vector2(0, bottomOffset); + AssignPositioningIfNeeded(); + m_IsScrollbarUpdateRequired = true; + } + } + + // Special handling of backspace + if (m_isLastKeyBackspace) + { + float firstCharPosition = m_TextComponent.rectTransform.anchoredPosition.x + m_TextComponent.textInfo.characterInfo[0].origin - m_TextComponent.margin.x; + float lastCharPosition = m_TextComponent.rectTransform.anchoredPosition.x + m_TextComponent.textInfo.characterInfo[m_TextComponent.textInfo.characterCount - 1].origin + m_TextComponent.margin.z; + + // Check if caret is at the left most position of the viewport + if (m_TextComponent.rectTransform.anchoredPosition.x + startPosition.x <= viewportMin + 0.0001f) + { + if (firstCharPosition < viewportMin) + { + float offset = Mathf.Min((viewportMax - viewportMin) / 2, viewportMin - firstCharPosition); + m_TextComponent.rectTransform.anchoredPosition += new Vector2(offset, 0); + AssignPositioningIfNeeded(); + } + } + else if (lastCharPosition < viewportMax && firstCharPosition < viewportMin) + { + float offset = Mathf.Min(viewportMax - lastCharPosition, viewportMin - firstCharPosition); + + m_TextComponent.rectTransform.anchoredPosition += new Vector2(offset, 0); + AssignPositioningIfNeeded(); + } + + m_isLastKeyBackspace = false; + } + + m_forceRectTransformAdjustment = false; + } + + /// <summary> + /// Validate the specified input. + /// </summary> + protected char Validate(string text, int pos, char ch) + { + // Validation is disabled + if (characterValidation == CharacterValidation.None || !enabled) + return ch; + + if (characterValidation == CharacterValidation.Integer || characterValidation == CharacterValidation.Decimal) + { + // Integer and decimal + bool cursorBeforeDash = (pos == 0 && text.Length > 0 && text[0] == '-'); + bool selectionAtStart = stringPositionInternal == 0 || stringSelectPositionInternal == 0; + if (!cursorBeforeDash) + { + if (ch >= '0' && ch <= '9') return ch; + if (ch == '-' && (pos == 0 || selectionAtStart)) return ch; + if (ch == '.' && characterValidation == CharacterValidation.Decimal && !text.Contains(".")) return ch; + } + } + else if (characterValidation == CharacterValidation.Digit) + { + if (ch >= '0' && ch <= '9') return ch; + } + else if (characterValidation == CharacterValidation.Alphanumeric) + { + // All alphanumeric characters + if (ch >= 'A' && ch <= 'Z') return ch; + if (ch >= 'a' && ch <= 'z') return ch; + if (ch >= '0' && ch <= '9') return ch; + } + else if (characterValidation == CharacterValidation.Name) + { + char lastChar = (text.Length > 0) ? text[Mathf.Clamp(pos, 0, text.Length - 1)] : ' '; + char nextChar = (text.Length > 0) ? text[Mathf.Clamp(pos + 1, 0, text.Length - 1)] : '\n'; + + if (char.IsLetter(ch)) + { + // Space followed by a letter -- make sure it's capitalized + if (char.IsLower(ch) && lastChar == ' ') + return char.ToUpper(ch); + + // Uppercase letters are only allowed after spaces (and apostrophes) + if (char.IsUpper(ch) && lastChar != ' ' && lastChar != '\'') + return char.ToLower(ch); + + // If character was already in correct case, return it as-is. + // Also, letters that are neither upper nor lower case are always allowed. + return ch; + } + else if (ch == '\'') + { + // Don't allow more than one apostrophe + if (lastChar != ' ' && lastChar != '\'' && nextChar != '\'' && !text.Contains("'")) + return ch; + } + else if (ch == ' ') + { + // Don't allow more than one space in a row + if (lastChar != ' ' && lastChar != '\'' && nextChar != ' ' && nextChar != '\'') + return ch; + } + } + else if (characterValidation == CharacterValidation.EmailAddress) + { + // From StackOverflow about allowed characters in email addresses: + // Uppercase and lowercase English letters (a-z, A-Z) + // Digits 0 to 9 + // Characters ! # $ % & ' * + - / = ? ^ _ ` { | } ~ + // Character . (dot, period, full stop) provided that it is not the first or last character, + // and provided also that it does not appear two or more times consecutively. + + if (ch >= 'A' && ch <= 'Z') return ch; + if (ch >= 'a' && ch <= 'z') return ch; + if (ch >= '0' && ch <= '9') return ch; + if (ch == '@' && text.IndexOf('@') == -1) return ch; + if (kEmailSpecialCharacters.IndexOf(ch) != -1) return ch; + if (ch == '.') + { + char lastChar = (text.Length > 0) ? text[Mathf.Clamp(pos, 0, text.Length - 1)] : ' '; + char nextChar = (text.Length > 0) ? text[Mathf.Clamp(pos + 1, 0, text.Length - 1)] : '\n'; + if (lastChar != '.' && nextChar != '.') + return ch; + } + } + else if (characterValidation == CharacterValidation.Regex) + { + // Regex expression + if (Regex.IsMatch(ch.ToString(), m_RegexValue)) + { + return ch; + } + } + else if (characterValidation == CharacterValidation.CustomValidator) + { + if (m_InputValidator != null) + { + char c = m_InputValidator.Validate(ref text, ref pos, ch); + m_Text = text; + stringSelectPositionInternal = stringPositionInternal = pos; + return c; + } + } + return (char)0; + } + + public void ActivateInputField() + { + if (m_TextComponent == null || m_TextComponent.font == null || !IsActive() || !IsInteractable()) + return; + + if (isFocused) + { + if (m_SoftKeyboard != null && !m_SoftKeyboard.active) + { + m_SoftKeyboard.active = true; + m_SoftKeyboard.text = m_Text; + } + } + + m_ShouldActivateNextUpdate = true; + } + + private void ActivateInputFieldInternal() + { + if (EventSystem.current == null) + return; + + if (EventSystem.current.currentSelectedGameObject != gameObject) + EventSystem.current.SetSelectedGameObject(gameObject); + + if (TouchScreenKeyboard.isSupported && shouldHideSoftKeyboard == false) + { + if (inputSystem.touchSupported) + { + TouchScreenKeyboard.hideInput = shouldHideMobileInput; + } + + if (shouldHideSoftKeyboard == false && m_ReadOnly == false && contentType != ContentType.Custom) + { + m_SoftKeyboard = (inputType == InputType.Password) ? + TouchScreenKeyboard.Open(m_Text, keyboardType, false, multiLine, true, false, "", characterLimit) : + TouchScreenKeyboard.Open(m_Text, keyboardType, inputType == InputType.AutoCorrect, multiLine, false, false, "", characterLimit); + + if (shouldHideMobileInput == false) + { + MoveTextEnd(false); + } + else + { + OnFocus(); + + // Opening the soft keyboard sets its selection to the end of the text. + // As such, we set the selection to match the Input Field's internal selection. + if (m_SoftKeyboard != null) + { + int length = stringPositionInternal < stringSelectPositionInternal ? stringSelectPositionInternal - stringPositionInternal : stringPositionInternal - stringSelectPositionInternal; + m_SoftKeyboard.selection = new RangeInt(stringPositionInternal < stringSelectPositionInternal ? stringPositionInternal : stringSelectPositionInternal, length); + } + } + } + + // Cache the value of isInPlaceEditingAllowed, because on UWP this involves calling into native code + // The value only needs to be updated once when the TouchKeyboard is opened. + #if UNITY_2019_1_OR_NEWER + m_TouchKeyboardAllowsInPlaceEditing = TouchScreenKeyboard.isInPlaceEditingAllowed; + #endif + } + else + { + if (!TouchScreenKeyboard.isSupported) + inputSystem.imeCompositionMode = IMECompositionMode.On; + + OnFocus(); + } + + m_AllowInput = true; + m_OriginalText = text; + m_WasCanceled = false; + SetCaretVisible(); + UpdateLabel(); + } + + public override void OnSelect(BaseEventData eventData) + { + //Debug.Log("OnSelect()"); + + base.OnSelect(eventData); + SendOnFocus(); + + ActivateInputField(); + } + + public virtual void OnPointerClick(PointerEventData eventData) + { + //Debug.Log("Pointer Click Event..."); + + if (eventData.button != PointerEventData.InputButton.Left) + return; + + ActivateInputField(); + } + + public void OnControlClick() + { + //Debug.Log("Input Field control click..."); + } + + public void ReleaseSelection() + { + m_SelectionStillActive = false; + MarkGeometryAsDirty(); + } + + public void DeactivateInputField(bool clearSelection = false) + { + //Debug.Log("Deactivate Input Field..."); + + // Not activated do nothing. + if (!m_AllowInput) + return; + + m_HasDoneFocusTransition = false; + m_AllowInput = false; + + if (m_Placeholder != null) + m_Placeholder.enabled = string.IsNullOrEmpty(m_Text); + + if (m_TextComponent != null && IsInteractable()) + { + if (m_WasCanceled && m_RestoreOriginalTextOnEscape) + text = m_OriginalText; + + if (m_SoftKeyboard != null) + { + m_SoftKeyboard.active = false; + m_SoftKeyboard = null; + } + + m_SelectionStillActive = true; + + if (m_ResetOnDeActivation || m_ReleaseSelection) + { + //m_StringPosition = m_StringSelectPosition = 0; + //m_CaretPosition = m_CaretSelectPosition = 0; + //m_TextComponent.rectTransform.localPosition = m_DefaultTransformPosition; + + //if (caretRectTrans != null) + // caretRectTrans.localPosition = Vector3.zero; + + m_SelectionStillActive = false; + m_ReleaseSelection = false; + m_SelectedObject = null; + } + + SendOnEndEdit(); + SendOnEndTextSelection(); + + inputSystem.imeCompositionMode = IMECompositionMode.Auto; + } + + MarkGeometryAsDirty(); + + // Scrollbar should be updated. + m_IsScrollbarUpdateRequired = true; + } + + public override void OnDeselect(BaseEventData eventData) + { + DeactivateInputField(); + + base.OnDeselect(eventData); + SendOnFocusLost(); + } + + public virtual void OnSubmit(BaseEventData eventData) + { + //Debug.Log("OnSubmit()"); + + if (!IsActive() || !IsInteractable()) + return; + + if (!isFocused) + m_ShouldActivateNextUpdate = true; + + SendOnSubmit(); + } + + //public virtual void OnLostFocus(BaseEventData eventData) + //{ + // if (!IsActive() || !IsInteractable()) + // return; + //} + + private void EnforceContentType() + { + switch (contentType) + { + case ContentType.Standard: + { + // Don't enforce line type for this content type. + m_InputType = InputType.Standard; + m_KeyboardType = TouchScreenKeyboardType.Default; + m_CharacterValidation = CharacterValidation.None; + break; + } + case ContentType.Autocorrected: + { + // Don't enforce line type for this content type. + m_InputType = InputType.AutoCorrect; + m_KeyboardType = TouchScreenKeyboardType.Default; + m_CharacterValidation = CharacterValidation.None; + break; + } + case ContentType.IntegerNumber: + { + m_LineType = LineType.SingleLine; + m_InputType = InputType.Standard; + m_KeyboardType = TouchScreenKeyboardType.NumberPad; + m_CharacterValidation = CharacterValidation.Integer; + break; + } + case ContentType.DecimalNumber: + { + m_LineType = LineType.SingleLine; + m_InputType = InputType.Standard; + m_KeyboardType = TouchScreenKeyboardType.NumbersAndPunctuation; + m_CharacterValidation = CharacterValidation.Decimal; + break; + } + case ContentType.Alphanumeric: + { + m_LineType = LineType.SingleLine; + m_InputType = InputType.Standard; + m_KeyboardType = TouchScreenKeyboardType.ASCIICapable; + m_CharacterValidation = CharacterValidation.Alphanumeric; + break; + } + case ContentType.Name: + { + m_LineType = LineType.SingleLine; + m_InputType = InputType.Standard; + m_KeyboardType = TouchScreenKeyboardType.Default; + m_CharacterValidation = CharacterValidation.Name; + break; + } + case ContentType.EmailAddress: + { + m_LineType = LineType.SingleLine; + m_InputType = InputType.Standard; + m_KeyboardType = TouchScreenKeyboardType.EmailAddress; + m_CharacterValidation = CharacterValidation.EmailAddress; + break; + } + case ContentType.Password: + { + m_LineType = LineType.SingleLine; + m_InputType = InputType.Password; + m_KeyboardType = TouchScreenKeyboardType.Default; + m_CharacterValidation = CharacterValidation.None; + break; + } + case ContentType.Pin: + { + m_LineType = LineType.SingleLine; + m_InputType = InputType.Password; + m_KeyboardType = TouchScreenKeyboardType.NumberPad; + m_CharacterValidation = CharacterValidation.Digit; + break; + } + default: + { + // Includes Custom type. Nothing should be enforced. + break; + } + } + + SetTextComponentWrapMode(); + } + + void SetTextComponentWrapMode() + { + if (m_TextComponent == null) + return; + + if (multiLine) + m_TextComponent.enableWordWrapping = true; + else + m_TextComponent.enableWordWrapping = false; + } + + // Control Rich Text option on the text component. + void SetTextComponentRichTextMode() + { + if (m_TextComponent == null) + return; + + m_TextComponent.richText = m_RichText; + } + + void SetToCustomIfContentTypeIsNot(params ContentType[] allowedContentTypes) + { + if (contentType == ContentType.Custom) + return; + + for (int i = 0; i < allowedContentTypes.Length; i++) + if (contentType == allowedContentTypes[i]) + return; + + contentType = ContentType.Custom; + } + + void SetToCustom() + { + if (contentType == ContentType.Custom) + return; + + contentType = ContentType.Custom; + } + + void SetToCustom(CharacterValidation characterValidation) + { + if (contentType == ContentType.Custom) + { + characterValidation = CharacterValidation.CustomValidator; + return; + } + + contentType = ContentType.Custom; + characterValidation = CharacterValidation.CustomValidator; + } + + + protected override void DoStateTransition(SelectionState state, bool instant) + { + if (m_HasDoneFocusTransition) + state = SelectionState.Highlighted; + else if (state == SelectionState.Pressed) + m_HasDoneFocusTransition = true; + + base.DoStateTransition(state, instant); + } + + + /// <summary> + /// See ILayoutElement.CalculateLayoutInputHorizontal. + /// </summary> + public virtual void CalculateLayoutInputHorizontal() + { } + + /// <summary> + /// See ILayoutElement.CalculateLayoutInputVertical. + /// </summary> + public virtual void CalculateLayoutInputVertical() + { } + + /// <summary> + /// See ILayoutElement.minWidth. + /// </summary> + public virtual float minWidth { get { return 0; } } + + /// <summary> + /// Get the displayed with of all input characters. + /// </summary> + public virtual float preferredWidth + { + get + { + if (textComponent == null) + return 0; + + return m_TextComponent.preferredWidth + 16 + m_CaretWidth + 1; + } + } + + /// <summary> + /// See ILayoutElement.flexibleWidth. + /// </summary> + public virtual float flexibleWidth { get { return -1; } } + + /// <summary> + /// See ILayoutElement.minHeight. + /// </summary> + public virtual float minHeight { get { return 0; } } + + /// <summary> + /// Get the height of all the text if constrained to the height of the RectTransform. + /// </summary> + public virtual float preferredHeight + { + get + { + if (textComponent == null) + return 0; + + return m_TextComponent.preferredHeight + 16; + } + } + + /// <summary> + /// See ILayoutElement.flexibleHeight. + /// </summary> + public virtual float flexibleHeight { get { return -1; } } + + /// <summary> + /// See ILayoutElement.layoutPriority. + /// </summary> + public virtual int layoutPriority { get { return 1; } } + + + /// <summary> + /// Function to conveniently set the point size of both Placeholder and Input Field text object. + /// </summary> + /// <param name="pointSize"></param> + public void SetGlobalPointSize(float pointSize) + { + TMP_Text placeholderTextComponent = m_Placeholder as TMP_Text; + + if (placeholderTextComponent != null) placeholderTextComponent.fontSize = pointSize; + textComponent.fontSize = pointSize; + } + + /// <summary> + /// Function to conveniently set the Font Asset of both Placeholder and Input Field text object. + /// </summary> + /// <param name="fontAsset"></param> + public void SetGlobalFontAsset(TMP_FontAsset fontAsset) + { + TMP_Text placeholderTextComponent = m_Placeholder as TMP_Text; + + if (placeholderTextComponent != null) placeholderTextComponent.font = fontAsset; + textComponent.font = fontAsset; + + } + + } + + + static class SetPropertyUtility + { + public static bool SetColor(ref Color currentValue, Color newValue) + { + if (currentValue.r == newValue.r && currentValue.g == newValue.g && currentValue.b == newValue.b && currentValue.a == newValue.a) + return false; + + currentValue = newValue; + return true; + } + + public static bool SetEquatableStruct<T>(ref T currentValue, T newValue) where T : IEquatable<T> + { + if (currentValue.Equals(newValue)) + return false; + + currentValue = newValue; + return true; + } + + public static bool SetStruct<T>(ref T currentValue, T newValue) where T : struct + { + if (currentValue.Equals(newValue)) + return false; + + currentValue = newValue; + return true; + } + + public static bool SetClass<T>(ref T currentValue, T newValue) where T : class + { + if ((currentValue == null && newValue == null) || (currentValue != null && currentValue.Equals(newValue))) + return false; + + currentValue = newValue; + return true; + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_InputField.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_InputField.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..d05a16b9a93bf3220b1395d03ef17a05ab34f784 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_InputField.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 2da0c512f12947e489f739169773d7ca +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 3ee40aa79cd242a5b53b0b0ca4f13f0f, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_InputValidator.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_InputValidator.cs new file mode 100644 index 0000000000000000000000000000000000000000..026766a22b7421055aa12ecb7dc7ecf66fd32aeb --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_InputValidator.cs @@ -0,0 +1,15 @@ +using UnityEngine; +using System.Collections; + + +namespace TMPro +{ + /// <summary> + /// Custom text input validator where user can implement their own custom character validation. + /// </summary> + [System.Serializable] + public abstract class TMP_InputValidator : ScriptableObject + { + public abstract char Validate(ref string text, ref int pos, char ch); + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_InputValidator.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_InputValidator.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..0ce769ef0523ac75ee57962510b5daf882944b4a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_InputValidator.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 79ff392d1bde4ad78a3836a4a480392d +timeCreated: 1473021069 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_LineInfo.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_LineInfo.cs new file mode 100644 index 0000000000000000000000000000000000000000..c1794b1ed5d91ce47067e907b52100473a754f98 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_LineInfo.cs @@ -0,0 +1,52 @@ +namespace TMPro +{ + + /// <summary> + /// Structure which contains information about the individual lines of text. + /// </summary> + public struct TMP_LineInfo + { + internal int controlCharacterCount; + + public int characterCount; + public int visibleCharacterCount; + public int spaceCount; + public int wordCount; + public int firstCharacterIndex; + public int firstVisibleCharacterIndex; + public int lastCharacterIndex; + public int lastVisibleCharacterIndex; + + public float length; + public float lineHeight; + public float ascender; + public float baseline; + public float descender; + public float maxAdvance; + + public float width; + public float marginLeft; + public float marginRight; + + public TextAlignmentOptions alignment; + public Extents lineExtents; + + + /// <summary> + /// Function returning the current line of text. + /// </summary> + /// <returns></returns> + //public string GetLineText() + //{ + // string word = string.Empty; + // TMP_CharacterInfo[] charInfo = textComponent.textInfo.characterInfo; + + // for (int i = firstCharacterIndex; i < lastCharacterIndex + 1; i++) + // { + // word += charInfo[i].character; + // } + + // return word; + //} + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_LineInfo.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_LineInfo.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..53225c565b6ccebf88a2af371eee3799517ad914 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_LineInfo.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b6e75d7f429a4e7e9e1ffb4f85cff49f +timeCreated: 1464310403 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ListPool.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ListPool.cs new file mode 100644 index 0000000000000000000000000000000000000000..50874520ff3551f55da51136f674e86957c8a453 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ListPool.cs @@ -0,0 +1,21 @@ +using System.Collections.Generic; + + +namespace TMPro +{ + internal static class TMP_ListPool<T> + { + // Object pool to avoid allocations. + private static readonly TMP_ObjectPool<List<T>> s_ListPool = new TMP_ObjectPool<List<T>>(null, l => l.Clear()); + + public static List<T> Get() + { + return s_ListPool.Get(); + } + + public static void Release(List<T> toRelease) + { + s_ListPool.Release(toRelease); + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ListPool.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ListPool.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..aaa86f7ce65c1174d15d765a08d77fb232055b47 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ListPool.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 28375447bcea455c9b51a6650b10c9d7 +timeCreated: 1458521386 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_MaterialManager.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_MaterialManager.cs new file mode 100644 index 0000000000000000000000000000000000000000..e34e44355e145862d34b1a8f3033eceed4f641a5 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_MaterialManager.cs @@ -0,0 +1,633 @@ +//#define TMP_DEBUG_MODE + +using UnityEngine; +using System.Collections.Generic; + +using UnityEngine.UI; + + +namespace TMPro +{ + + public static class TMP_MaterialManager + { + private static List<MaskingMaterial> m_materialList = new List<MaskingMaterial>(); + + private static Dictionary<long, FallbackMaterial> m_fallbackMaterials = new Dictionary<long, FallbackMaterial>(); + private static Dictionary<int, long> m_fallbackMaterialLookup = new Dictionary<int, long>(); + private static List<FallbackMaterial> m_fallbackCleanupList = new List<FallbackMaterial>(); + + private static bool isFallbackListDirty; + + static TMP_MaterialManager() + { + Camera.onPreRender += new Camera.CameraCallback(OnPreRender); + Canvas.willRenderCanvases += new Canvas.WillRenderCanvases(OnPreRenderCanvas); + } + + + static void OnPreRender(Camera cam) + { + if (isFallbackListDirty) + { + //Debug.Log("1 - Cleaning up Fallback Materials."); + CleanupFallbackMaterials(); + isFallbackListDirty = false; + } + } + + static void OnPreRenderCanvas() + { + if (isFallbackListDirty) + { + //Debug.Log("2 - Cleaning up Fallback Materials."); + CleanupFallbackMaterials(); + isFallbackListDirty = false; + } + } + + /// <summary> + /// Create a Masking Material Instance for the given ID + /// </summary> + /// <param name="baseMaterial"></param> + /// <param name="stencilID"></param> + /// <returns></returns> + public static Material GetStencilMaterial(Material baseMaterial, int stencilID) + { + // Check if Material supports masking + if (!baseMaterial.HasProperty(ShaderUtilities.ID_StencilID)) + { + Debug.LogWarning("Selected Shader does not support Stencil Masking. Please select the Distance Field or Mobile Distance Field Shader."); + return baseMaterial; + } + + int baseMaterialID = baseMaterial.GetInstanceID(); + + // If baseMaterial already has a corresponding masking material, return it. + for (int i = 0; i < m_materialList.Count; i++) + { + if (m_materialList[i].baseMaterial.GetInstanceID() == baseMaterialID && m_materialList[i].stencilID == stencilID) + { + m_materialList[i].count += 1; + + #if TMP_DEBUG_MODE + ListMaterials(); + #endif + + return m_materialList[i].stencilMaterial; + } + } + + // No matching masking material found. Create and return a new one. + + Material stencilMaterial; + + //Create new Masking Material Instance for this Base Material + stencilMaterial = new Material(baseMaterial); + stencilMaterial.hideFlags = HideFlags.HideAndDontSave; + + #if UNITY_EDITOR + stencilMaterial.name += " Masking ID:" + stencilID; + #endif + + stencilMaterial.shaderKeywords = baseMaterial.shaderKeywords; + + // Set Stencil Properties + ShaderUtilities.GetShaderPropertyIDs(); + stencilMaterial.SetFloat(ShaderUtilities.ID_StencilID, stencilID); + //stencilMaterial.SetFloat(ShaderUtilities.ID_StencilOp, 0); + stencilMaterial.SetFloat(ShaderUtilities.ID_StencilComp, 4); + //stencilMaterial.SetFloat(ShaderUtilities.ID_StencilReadMask, stencilID); + //stencilMaterial.SetFloat(ShaderUtilities.ID_StencilWriteMask, 0); + + MaskingMaterial temp = new MaskingMaterial(); + temp.baseMaterial = baseMaterial; + temp.stencilMaterial = stencilMaterial; + temp.stencilID = stencilID; + temp.count = 1; + + m_materialList.Add(temp); + + #if TMP_DEBUG_MODE + ListMaterials(); + #endif + + return stencilMaterial; + } + + + /// <summary> + /// Function to release the stencil material. + /// </summary> + /// <param name="stencilMaterial"></param> + public static void ReleaseStencilMaterial(Material stencilMaterial) + { + int stencilMaterialID = stencilMaterial.GetInstanceID(); + + for (int i = 0; i < m_materialList.Count; i++) + { + if (m_materialList[i].stencilMaterial.GetInstanceID() == stencilMaterialID) + { + if (m_materialList[i].count > 1) + m_materialList[i].count -= 1; + else + { + Object.DestroyImmediate(m_materialList[i].stencilMaterial); + m_materialList.RemoveAt(i); + stencilMaterial = null; + } + + break; + } + } + + + #if TMP_DEBUG_MODE + ListMaterials(); + #endif + } + + + // Function which returns the base material associated with a Masking Material + public static Material GetBaseMaterial(Material stencilMaterial) + { + // Check if maskingMaterial already has a base material associated with it. + int index = m_materialList.FindIndex(item => item.stencilMaterial == stencilMaterial); + + if (index == -1) + return null; + else + return m_materialList[index].baseMaterial; + + } + + + /// <summary> + /// Function to set the Material Stencil ID + /// </summary> + /// <param name="material"></param> + /// <param name="stencilID"></param> + /// <returns></returns> + public static Material SetStencil(Material material, int stencilID) + { + material.SetFloat(ShaderUtilities.ID_StencilID, stencilID); + + if (stencilID == 0) + material.SetFloat(ShaderUtilities.ID_StencilComp, 8); + else + material.SetFloat(ShaderUtilities.ID_StencilComp, 4); + + return material; + } + + + public static void AddMaskingMaterial(Material baseMaterial, Material stencilMaterial, int stencilID) + { + // Check if maskingMaterial already has a base material associated with it. + int index = m_materialList.FindIndex(item => item.stencilMaterial == stencilMaterial); + + if (index == -1) + { + MaskingMaterial temp = new MaskingMaterial(); + temp.baseMaterial = baseMaterial; + temp.stencilMaterial = stencilMaterial; + temp.stencilID = stencilID; + temp.count = 1; + + m_materialList.Add(temp); + } + else + { + stencilMaterial = m_materialList[index].stencilMaterial; + m_materialList[index].count += 1; + } + } + + + + public static void RemoveStencilMaterial(Material stencilMaterial) + { + // Check if maskingMaterial is already on the list. + int index = m_materialList.FindIndex(item => item.stencilMaterial == stencilMaterial); + + if (index != -1) + { + m_materialList.RemoveAt(index); + } + + #if TMP_DEBUG_MODE + ListMaterials(); + #endif + } + + + + public static void ReleaseBaseMaterial(Material baseMaterial) + { + // Check if baseMaterial already has a masking material associated with it. + int index = m_materialList.FindIndex(item => item.baseMaterial == baseMaterial); + + if (index == -1) + { + Debug.Log("No Masking Material exists for " + baseMaterial.name); + } + else + { + if (m_materialList[index].count > 1) + { + m_materialList[index].count -= 1; + Debug.Log("Removed (1) reference to " + m_materialList[index].stencilMaterial.name + ". There are " + m_materialList[index].count + " references left."); + } + else + { + Debug.Log("Removed last reference to " + m_materialList[index].stencilMaterial.name + " with ID " + m_materialList[index].stencilMaterial.GetInstanceID()); + Object.DestroyImmediate(m_materialList[index].stencilMaterial); + m_materialList.RemoveAt(index); + } + } + + #if TMP_DEBUG_MODE + ListMaterials(); + #endif + } + + + public static void ClearMaterials() + { + if (m_materialList.Count == 0) + { + Debug.Log("Material List has already been cleared."); + return; + } + + for (int i = 0; i < m_materialList.Count; i++) + { + //Material baseMaterial = m_materialList[i].baseMaterial; + Material stencilMaterial = m_materialList[i].stencilMaterial; + + Object.DestroyImmediate(stencilMaterial); + m_materialList.RemoveAt(i); + } + } + + + /// <summary> + /// Function to get the Stencil ID + /// </summary> + /// <param name="obj"></param> + /// <returns></returns> + public static int GetStencilID(GameObject obj) + { + // Implementation is almost copied from Unity UI + + var count = 0; + + var transform = obj.transform; + var stopAfter = FindRootSortOverrideCanvas(transform); + if (transform == stopAfter) + return count; + + var t = transform.parent; + var components = TMP_ListPool<Mask>.Get(); + while (t != null) + { + t.GetComponents<Mask>(components); + for (var i = 0; i < components.Count; ++i) + { + var mask = components[i]; + if (mask != null && mask.MaskEnabled() && mask.graphic.IsActive()) + { + ++count; + break; + } + } + + if (t == stopAfter) + break; + + t = t.parent; + } + TMP_ListPool<Mask>.Release(components); + + return Mathf.Min((1 << count) - 1, 255); + } + + + public static Material GetMaterialForRendering(MaskableGraphic graphic, Material baseMaterial) + { + if (baseMaterial == null) + return null; + + var modifiers = TMP_ListPool<IMaterialModifier>.Get(); + graphic.GetComponents(modifiers); + + var result = baseMaterial; + for (int i = 0; i < modifiers.Count; i++) + result = modifiers[i].GetModifiedMaterial(result); + + TMP_ListPool<IMaterialModifier>.Release(modifiers); + + return result; + } + + private static Transform FindRootSortOverrideCanvas(Transform start) + { + // Implementation is copied from Unity UI + + var canvasList = TMP_ListPool<Canvas>.Get(); + start.GetComponentsInParent(false, canvasList); + Canvas canvas = null; + + for (int i = 0; i < canvasList.Count; ++i) + { + canvas = canvasList[i]; + + // We found the canvas we want to use break + if (canvas.overrideSorting) + break; + } + TMP_ListPool<Canvas>.Release(canvasList); + + return canvas != null ? canvas.transform : null; + } + + + /// <summary> + /// This function returns a material instance using the material properties of a previous material but using the font atlas texture of the new font asset. + /// </summary> + /// <param name="sourceMaterial">The material containing the source material properties to be copied to the new material.</param> + /// <param name="targetMaterial">The font atlas texture that should be assigned to the new material.</param> + /// <returns></returns> + public static Material GetFallbackMaterial (Material sourceMaterial, Material targetMaterial) + { + int sourceID = sourceMaterial.GetInstanceID(); + Texture tex = targetMaterial.GetTexture(ShaderUtilities.ID_MainTex); + int texID = tex.GetInstanceID(); + long key = (long)sourceID << 32 | (long)(uint)texID; + FallbackMaterial fallback; + + if (m_fallbackMaterials.TryGetValue(key, out fallback)) + { + //Debug.Log("Material [" + fallback.fallbackMaterial.name + "] already exists."); + return fallback.fallbackMaterial; + } + + // Create new material from the source material and copy properties if using distance field shaders. + Material fallbackMaterial = null; + if (sourceMaterial.HasProperty(ShaderUtilities.ID_GradientScale) && targetMaterial.HasProperty(ShaderUtilities.ID_GradientScale)) + { + fallbackMaterial = new Material(sourceMaterial); + fallbackMaterial.hideFlags = HideFlags.HideAndDontSave; + + #if UNITY_EDITOR + fallbackMaterial.name += " + " + tex.name; + //Debug.Log("Creating new fallback material for " + fallbackMaterial.name); + #endif + + fallbackMaterial.SetTexture(ShaderUtilities.ID_MainTex, tex); + // Retain material properties unique to target material. + fallbackMaterial.SetFloat(ShaderUtilities.ID_GradientScale, targetMaterial.GetFloat(ShaderUtilities.ID_GradientScale)); + fallbackMaterial.SetFloat(ShaderUtilities.ID_TextureWidth, targetMaterial.GetFloat(ShaderUtilities.ID_TextureWidth)); + fallbackMaterial.SetFloat(ShaderUtilities.ID_TextureHeight, targetMaterial.GetFloat(ShaderUtilities.ID_TextureHeight)); + fallbackMaterial.SetFloat(ShaderUtilities.ID_WeightNormal, targetMaterial.GetFloat(ShaderUtilities.ID_WeightNormal)); + fallbackMaterial.SetFloat(ShaderUtilities.ID_WeightBold, targetMaterial.GetFloat(ShaderUtilities.ID_WeightBold)); + } + else + { + fallbackMaterial = new Material(targetMaterial); + } + + fallback = new FallbackMaterial(); + fallback.baseID = sourceID; + fallback.baseMaterial = sourceMaterial; + fallback.fallbackID = key; + fallback.fallbackMaterial = fallbackMaterial; + fallback.count = 0; + + m_fallbackMaterials.Add(key, fallback); + m_fallbackMaterialLookup.Add(fallbackMaterial.GetInstanceID(), key); + + #if TMP_DEBUG_MODE + ListFallbackMaterials(); + #endif + + return fallbackMaterial; + } + + + /// <summary> + /// + /// </summary> + /// <param name="targetMaterial"></param> + public static void AddFallbackMaterialReference(Material targetMaterial) + { + if (targetMaterial == null) return; + + int sourceID = targetMaterial.GetInstanceID(); + long key; + FallbackMaterial fallback; + + // Lookup key to retrieve + if (m_fallbackMaterialLookup.TryGetValue(sourceID, out key)) + { + if (m_fallbackMaterials.TryGetValue(key, out fallback)) + { + //Debug.Log("Adding Fallback material " + fallback.fallbackMaterial.name + " with reference count of " + (fallback.count + 1)); + fallback.count += 1; + } + } + } + + + /// <summary> + /// + /// </summary> + /// <param name="targetMaterial"></param> + public static void RemoveFallbackMaterialReference(Material targetMaterial) + { + if (targetMaterial == null) return; + + int sourceID = targetMaterial.GetInstanceID(); + long key; + FallbackMaterial fallback; + + // Lookup key to retrieve + if (m_fallbackMaterialLookup.TryGetValue(sourceID, out key)) + { + if (m_fallbackMaterials.TryGetValue(key, out fallback)) + { + fallback.count -= 1; + + if (fallback.count < 1) + m_fallbackCleanupList.Add(fallback); + } + } + } + + + /// <summary> + /// + /// </summary> + public static void CleanupFallbackMaterials() + { + // Return if the list is empty. + if (m_fallbackCleanupList.Count == 0) return; + + for (int i = 0; i < m_fallbackCleanupList.Count; i++) + { + FallbackMaterial fallback = m_fallbackCleanupList[i]; + + if (fallback.count < 1) + { + //Debug.Log("Cleaning up " + fallback.fallbackMaterial.name); + + Material mat = fallback.fallbackMaterial; + m_fallbackMaterials.Remove(fallback.fallbackID); + m_fallbackMaterialLookup.Remove(mat.GetInstanceID()); + Object.DestroyImmediate(mat); + mat = null; + } + } + + m_fallbackCleanupList.Clear(); + } + + + /// <summary> + /// Function to release the fallback material. + /// </summary> + /// <param name="fallackMaterial"></param> + public static void ReleaseFallbackMaterial(Material fallackMaterial) + { + if (fallackMaterial == null) return; + + int materialID = fallackMaterial.GetInstanceID(); + long key; + FallbackMaterial fallback; + + if (m_fallbackMaterialLookup.TryGetValue(materialID, out key)) + { + if (m_fallbackMaterials.TryGetValue(key, out fallback)) + { + //Debug.Log("Releasing Fallback material " + fallback.fallbackMaterial.name + " with remaining reference count of " + (fallback.count - 1)); + + fallback.count -= 1; + + if (fallback.count < 1) + m_fallbackCleanupList.Add(fallback); + } + } + + isFallbackListDirty = true; + + #if TMP_DEBUG_MODE + ListFallbackMaterials(); + #endif + } + + + private class FallbackMaterial + { + public int baseID; + public Material baseMaterial; + public long fallbackID; + public Material fallbackMaterial; + public int count; + } + + + private class MaskingMaterial + { + public Material baseMaterial; + public Material stencilMaterial; + public int count; + public int stencilID; + } + + + /// <summary> + /// Function to copy the properties of a source material preset to another while preserving the unique font asset properties of the destination material. + /// </summary> + /// <param name="source"></param> + /// <param name="destination"></param> + public static void CopyMaterialPresetProperties(Material source, Material destination) + { + if (!source.HasProperty(ShaderUtilities.ID_GradientScale) || !destination.HasProperty(ShaderUtilities.ID_GradientScale)) + return; + + // Save unique material properties + Texture dst_texture = destination.GetTexture(ShaderUtilities.ID_MainTex); + float dst_gradientScale = destination.GetFloat(ShaderUtilities.ID_GradientScale); + float dst_texWidth = destination.GetFloat(ShaderUtilities.ID_TextureWidth); + float dst_texHeight = destination.GetFloat(ShaderUtilities.ID_TextureHeight); + float dst_weightNormal = destination.GetFloat(ShaderUtilities.ID_WeightNormal); + float dst_weightBold = destination.GetFloat(ShaderUtilities.ID_WeightBold); + + // Copy all material properties + destination.CopyPropertiesFromMaterial(source); + + // Copy shader keywords + destination.shaderKeywords = source.shaderKeywords; + + // Restore unique material properties + destination.SetTexture(ShaderUtilities.ID_MainTex, dst_texture); + destination.SetFloat(ShaderUtilities.ID_GradientScale, dst_gradientScale); + destination.SetFloat(ShaderUtilities.ID_TextureWidth, dst_texWidth); + destination.SetFloat(ShaderUtilities.ID_TextureHeight, dst_texHeight); + destination.SetFloat(ShaderUtilities.ID_WeightNormal, dst_weightNormal); + destination.SetFloat(ShaderUtilities.ID_WeightBold, dst_weightBold); + } + + + #if TMP_DEBUG_MODE + /// <summary> + /// + /// </summary> + public static void ListMaterials() + { + + if (m_materialList.Count() == 0) + { + Debug.Log("Material List is empty."); + return; + } + + //Debug.Log("List contains " + m_materialList.Count() + " items."); + + for (int i = 0; i < m_materialList.Count(); i++) + { + Material baseMaterial = m_materialList[i].baseMaterial; + Material stencilMaterial = m_materialList[i].stencilMaterial; + + Debug.Log("Item #" + (i + 1) + " - Base Material is [" + baseMaterial.name + "] with ID " + baseMaterial.GetInstanceID() + " is associated with [" + (stencilMaterial != null ? stencilMaterial.name : "Null") + "] Stencil ID " + m_materialList[i].stencilID + " with ID " + (stencilMaterial != null ? stencilMaterial.GetInstanceID() : 0) + " and is referenced " + m_materialList[i].count + " time(s)."); + } + } + + + /// <summary> + /// + /// </summary> + public static void ListFallbackMaterials() + { + + if (m_fallbackMaterialList.Count() == 0) + { + Debug.Log("Material List is empty."); + return; + } + + Debug.Log("List contains " + m_fallbackMaterialList.Count() + " items."); + + for (int i = 0; i < m_fallbackMaterialList.Count(); i++) + { + Material baseMaterial = m_fallbackMaterialList[i].baseMaterial; + Material fallbackMaterial = m_fallbackMaterialList[i].fallbackMaterial; + + Debug.Log("Item #" + (i + 1) + " - Base Material is [" + baseMaterial.name + "] with ID " + baseMaterial.GetInstanceID() + " is associated with [" + (fallbackMaterial != null ? fallbackMaterial.name : "Null") + "] with ID " + (fallbackMaterial != null ? fallbackMaterial.GetInstanceID() : 0) + " and is referenced " + m_fallbackMaterialList[i].count + " time(s)."); + } + } + #endif + } + +} + diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_MaterialManager.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_MaterialManager.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..c4893509ec2875ddd8132b8f00c9aa53ae7de443 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_MaterialManager.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 6d9df2bc198c417db00037803568139c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_MeshInfo.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_MeshInfo.cs new file mode 100644 index 0000000000000000000000000000000000000000..33dc81c72e99e6524816a57418fbe0203c64bf01 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_MeshInfo.cs @@ -0,0 +1,668 @@ +using UnityEngine; +using System; +using System.Linq; +using System.Collections; +using System.Collections.Generic; + + +namespace TMPro +{ + public enum VertexSortingOrder { Normal, Reverse }; + + /// <summary> + /// Structure which contains the vertex attributes (geometry) of the text object. + /// </summary> + public struct TMP_MeshInfo + { + private static readonly Color32 s_DefaultColor = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); + private static readonly Vector3 s_DefaultNormal = new Vector3(0.0f, 0.0f, -1f); + private static readonly Vector4 s_DefaultTangent = new Vector4(-1f, 0.0f, 0.0f, 1f); + private static readonly Bounds s_DefaultBounds = new Bounds(); + + public Mesh mesh; + public int vertexCount; + + public Vector3[] vertices; + public Vector3[] normals; + public Vector4[] tangents; + + public Vector2[] uvs0; + public Vector2[] uvs2; + //public Vector2[] uvs4; + public Color32[] colors32; + public int[] triangles; + + + /// <summary> + /// Function to pre-allocate vertex attributes for a mesh of size X. + /// </summary> + /// <param name="mesh"></param> + /// <param name="size"></param> + public TMP_MeshInfo(Mesh mesh, int size) + { + // Reference to the TMP Text Component. + //this.textComponent = null; + + // Clear existing mesh data + if (mesh == null) + mesh = new Mesh(); + else + mesh.Clear(); + + this.mesh = mesh; + + // Limit the mesh to less than 65535 vertices which is the limit for Unity's Mesh. + size = Mathf.Min(size, 16383); + + int sizeX4 = size * 4; + int sizeX6 = size * 6; + + this.vertexCount = 0; + + this.vertices = new Vector3[sizeX4]; + this.uvs0 = new Vector2[sizeX4]; + this.uvs2 = new Vector2[sizeX4]; + //this.uvs4 = new Vector2[sizeX4]; // SDF scale data + this.colors32 = new Color32[sizeX4]; + + this.normals = new Vector3[sizeX4]; + this.tangents = new Vector4[sizeX4]; + + this.triangles = new int[sizeX6]; + + int index_X6 = 0; + int index_X4 = 0; + while (index_X4 / 4 < size) + { + for (int i = 0; i < 4; i++) + { + this.vertices[index_X4 + i] = Vector3.zero; + this.uvs0[index_X4 + i] = Vector2.zero; + this.uvs2[index_X4 + i] = Vector2.zero; + //this.uvs4[index_X4 + i] = Vector2.zero; + this.colors32[index_X4 + i] = s_DefaultColor; + this.normals[index_X4 + i] = s_DefaultNormal; + this.tangents[index_X4 + i] = s_DefaultTangent; + } + + this.triangles[index_X6 + 0] = index_X4 + 0; + this.triangles[index_X6 + 1] = index_X4 + 1; + this.triangles[index_X6 + 2] = index_X4 + 2; + this.triangles[index_X6 + 3] = index_X4 + 2; + this.triangles[index_X6 + 4] = index_X4 + 3; + this.triangles[index_X6 + 5] = index_X4 + 0; + + index_X4 += 4; + index_X6 += 6; + } + + // Pre-assign base vertex attributes. + this.mesh.vertices = this.vertices; + this.mesh.normals = this.normals; + this.mesh.tangents = this.tangents; + this.mesh.triangles = this.triangles; + this.mesh.bounds = s_DefaultBounds; + } + + + /// <summary> + /// Function to pre-allocate vertex attributes for a mesh of size X. + /// </summary> + /// <param name="mesh"></param> + /// <param name="size"></param> + /// <param name="isVolumetric"></param> + public TMP_MeshInfo(Mesh mesh, int size, bool isVolumetric) + { + // Reference to the TMP Text Component. + //this.textComponent = null; + + // Clear existing mesh data + if (mesh == null) + mesh = new Mesh(); + else + mesh.Clear(); + + this.mesh = mesh; + + int s0 = !isVolumetric ? 4 : 8; + int s1 = !isVolumetric ? 6 : 36; + + // Limit the mesh to less than 65535 vertices which is the limit for Unity's Mesh. + size = Mathf.Min(size, 65532 / s0); + + int size_x_s0 = size * s0; + int size_x_s1 = size * s1; + + this.vertexCount = 0; + + this.vertices = new Vector3[size_x_s0]; + this.uvs0 = new Vector2[size_x_s0]; + this.uvs2 = new Vector2[size_x_s0]; + //this.uvs4 = new Vector2[sizeX8]; // SDF scale data + this.colors32 = new Color32[size_x_s0]; + + this.normals = new Vector3[size_x_s0]; + this.tangents = new Vector4[size_x_s0]; + + this.triangles = new int[size_x_s1]; + + int index_x_s0 = 0; + int index_x_s1 = 0; + while (index_x_s0 / s0 < size) + { + for (int i = 0; i < s0; i++) + { + this.vertices[index_x_s0 + i] = Vector3.zero; + this.uvs0[index_x_s0 + i] = Vector2.zero; + this.uvs2[index_x_s0 + i] = Vector2.zero; + //this.uvs4[index_X4 + i] = Vector2.zero; + this.colors32[index_x_s0 + i] = s_DefaultColor; + this.normals[index_x_s0 + i] = s_DefaultNormal; + this.tangents[index_x_s0 + i] = s_DefaultTangent; + } + + // Front Face + this.triangles[index_x_s1 + 0] = index_x_s0 + 0; + this.triangles[index_x_s1 + 1] = index_x_s0 + 1; + this.triangles[index_x_s1 + 2] = index_x_s0 + 2; + this.triangles[index_x_s1 + 3] = index_x_s0 + 2; + this.triangles[index_x_s1 + 4] = index_x_s0 + 3; + this.triangles[index_x_s1 + 5] = index_x_s0 + 0; + + if (isVolumetric) + { + // Left Face + this.triangles[index_x_s1 + 6] = index_x_s0 + 4; + this.triangles[index_x_s1 + 7] = index_x_s0 + 5; + this.triangles[index_x_s1 + 8] = index_x_s0 + 1; + this.triangles[index_x_s1 + 9] = index_x_s0 + 1; + this.triangles[index_x_s1 + 10] = index_x_s0 + 0; + this.triangles[index_x_s1 + 11] = index_x_s0 + 4; + + // Right Face + this.triangles[index_x_s1 + 12] = index_x_s0 + 3; + this.triangles[index_x_s1 + 13] = index_x_s0 + 2; + this.triangles[index_x_s1 + 14] = index_x_s0 + 6; + this.triangles[index_x_s1 + 15] = index_x_s0 + 6; + this.triangles[index_x_s1 + 16] = index_x_s0 + 7; + this.triangles[index_x_s1 + 17] = index_x_s0 + 3; + + // Top Face + this.triangles[index_x_s1 + 18] = index_x_s0 + 1; + this.triangles[index_x_s1 + 19] = index_x_s0 + 5; + this.triangles[index_x_s1 + 20] = index_x_s0 + 6; + this.triangles[index_x_s1 + 21] = index_x_s0 + 6; + this.triangles[index_x_s1 + 22] = index_x_s0 + 2; + this.triangles[index_x_s1 + 23] = index_x_s0 + 1; + + // Bottom Face + this.triangles[index_x_s1 + 24] = index_x_s0 + 4; + this.triangles[index_x_s1 + 25] = index_x_s0 + 0; + this.triangles[index_x_s1 + 26] = index_x_s0 + 3; + this.triangles[index_x_s1 + 27] = index_x_s0 + 3; + this.triangles[index_x_s1 + 28] = index_x_s0 + 7; + this.triangles[index_x_s1 + 29] = index_x_s0 + 4; + + // Back Face + this.triangles[index_x_s1 + 30] = index_x_s0 + 7; + this.triangles[index_x_s1 + 31] = index_x_s0 + 6; + this.triangles[index_x_s1 + 32] = index_x_s0 + 5; + this.triangles[index_x_s1 + 33] = index_x_s0 + 5; + this.triangles[index_x_s1 + 34] = index_x_s0 + 4; + this.triangles[index_x_s1 + 35] = index_x_s0 + 7; + } + + index_x_s0 += s0; + index_x_s1 += s1; + } + + // Pre-assign base vertex attributes. + this.mesh.vertices = this.vertices; + this.mesh.normals = this.normals; + this.mesh.tangents = this.tangents; + this.mesh.triangles = this.triangles; + this.mesh.bounds = s_DefaultBounds; + } + + + /// <summary> + /// Function to resized the content of MeshData and re-assign normals, tangents and triangles. + /// </summary> + /// <param name="meshData"></param> + /// <param name="size"></param> + public void ResizeMeshInfo(int size) + { + // Limit the mesh to less than 65535 vertices which is the limit for Unity's Mesh. + size = Mathf.Min(size, 16383); + + int size_X4 = size * 4; + int size_X6 = size * 6; + + int previousSize = this.vertices.Length / 4; + + Array.Resize(ref this.vertices, size_X4); + Array.Resize(ref this.normals, size_X4); + Array.Resize(ref this.tangents, size_X4); + + Array.Resize(ref this.uvs0, size_X4); + Array.Resize(ref this.uvs2, size_X4); + //Array.Resize(ref this.uvs4, size_X4); + + Array.Resize(ref this.colors32, size_X4); + + Array.Resize(ref this.triangles, size_X6); + + + // Re-assign Normals, Tangents and Triangles + if (size <= previousSize) + { + this.mesh.triangles = this.triangles; + this.mesh.vertices = this.vertices; + this.mesh.normals = this.normals; + this.mesh.tangents = this.tangents; + + return; + } + + for (int i = previousSize; i < size; i++) + { + int index_X4 = i * 4; + int index_X6 = i * 6; + + this.normals[0 + index_X4] = s_DefaultNormal; + this.normals[1 + index_X4] = s_DefaultNormal; + this.normals[2 + index_X4] = s_DefaultNormal; + this.normals[3 + index_X4] = s_DefaultNormal; + + this.tangents[0 + index_X4] = s_DefaultTangent; + this.tangents[1 + index_X4] = s_DefaultTangent; + this.tangents[2 + index_X4] = s_DefaultTangent; + this.tangents[3 + index_X4] = s_DefaultTangent; + + // Setup Triangles + this.triangles[0 + index_X6] = 0 + index_X4; + this.triangles[1 + index_X6] = 1 + index_X4; + this.triangles[2 + index_X6] = 2 + index_X4; + this.triangles[3 + index_X6] = 2 + index_X4; + this.triangles[4 + index_X6] = 3 + index_X4; + this.triangles[5 + index_X6] = 0 + index_X4; + } + + this.mesh.vertices = this.vertices; + this.mesh.normals = this.normals; + this.mesh.tangents = this.tangents; + this.mesh.triangles = this.triangles; + } + + + /// <summary> + /// Function to resized the content of MeshData and re-assign normals, tangents and triangles. + /// </summary> + /// <param name="size"></param> + /// <param name="isVolumetric"></param> + public void ResizeMeshInfo(int size, bool isVolumetric) + { + int s0 = !isVolumetric ? 4 : 8; + int s1 = !isVolumetric ? 6 : 36; + + // Limit the mesh to less than 65535 vertices which is the limit for Unity's Mesh. + size = Mathf.Min(size, 65532 / s0); + + int size_X4 = size * s0; + int size_X6 = size * s1; + + int previousSize = this.vertices.Length / s0; + + Array.Resize(ref this.vertices, size_X4); + Array.Resize(ref this.normals, size_X4); + Array.Resize(ref this.tangents, size_X4); + + Array.Resize(ref this.uvs0, size_X4); + Array.Resize(ref this.uvs2, size_X4); + //Array.Resize(ref this.uvs4, size_X4); + + Array.Resize(ref this.colors32, size_X4); + + Array.Resize(ref this.triangles, size_X6); + + + // Re-assign Normals, Tangents and Triangles + if (size <= previousSize) + { + this.mesh.triangles = this.triangles; + this.mesh.vertices = this.vertices; + this.mesh.normals = this.normals; + this.mesh.tangents = this.tangents; + + return; + } + + for (int i = previousSize; i < size; i++) + { + int index_X4 = i * s0; + int index_X6 = i * s1; + + this.normals[0 + index_X4] = s_DefaultNormal; + this.normals[1 + index_X4] = s_DefaultNormal; + this.normals[2 + index_X4] = s_DefaultNormal; + this.normals[3 + index_X4] = s_DefaultNormal; + + this.tangents[0 + index_X4] = s_DefaultTangent; + this.tangents[1 + index_X4] = s_DefaultTangent; + this.tangents[2 + index_X4] = s_DefaultTangent; + this.tangents[3 + index_X4] = s_DefaultTangent; + + if (isVolumetric) + { + this.normals[4 + index_X4] = s_DefaultNormal; + this.normals[5 + index_X4] = s_DefaultNormal; + this.normals[6 + index_X4] = s_DefaultNormal; + this.normals[7 + index_X4] = s_DefaultNormal; + + this.tangents[4 + index_X4] = s_DefaultTangent; + this.tangents[5 + index_X4] = s_DefaultTangent; + this.tangents[6 + index_X4] = s_DefaultTangent; + this.tangents[7 + index_X4] = s_DefaultTangent; + } + + // Setup Triangles + this.triangles[0 + index_X6] = 0 + index_X4; + this.triangles[1 + index_X6] = 1 + index_X4; + this.triangles[2 + index_X6] = 2 + index_X4; + this.triangles[3 + index_X6] = 2 + index_X4; + this.triangles[4 + index_X6] = 3 + index_X4; + this.triangles[5 + index_X6] = 0 + index_X4; + + if (isVolumetric) + { + // Left Face + this.triangles[index_X6 + 6] = index_X4 + 4; + this.triangles[index_X6 + 7] = index_X4 + 5; + this.triangles[index_X6 + 8] = index_X4 + 1; + this.triangles[index_X6 + 9] = index_X4 + 1; + this.triangles[index_X6 + 10] = index_X4 + 0; + this.triangles[index_X6 + 11] = index_X4 + 4; + + // Right Face + this.triangles[index_X6 + 12] = index_X4 + 3; + this.triangles[index_X6 + 13] = index_X4 + 2; + this.triangles[index_X6 + 14] = index_X4 + 6; + this.triangles[index_X6 + 15] = index_X4 + 6; + this.triangles[index_X6 + 16] = index_X4 + 7; + this.triangles[index_X6 + 17] = index_X4 + 3; + + // Top Face + this.triangles[index_X6 + 18] = index_X4 + 1; + this.triangles[index_X6 + 19] = index_X4 + 5; + this.triangles[index_X6 + 20] = index_X4 + 6; + this.triangles[index_X6 + 21] = index_X4 + 6; + this.triangles[index_X6 + 22] = index_X4 + 2; + this.triangles[index_X6 + 23] = index_X4 + 1; + + // Bottom Face + this.triangles[index_X6 + 24] = index_X4 + 4; + this.triangles[index_X6 + 25] = index_X4 + 0; + this.triangles[index_X6 + 26] = index_X4 + 3; + this.triangles[index_X6 + 27] = index_X4 + 3; + this.triangles[index_X6 + 28] = index_X4 + 7; + this.triangles[index_X6 + 29] = index_X4 + 4; + + // Back Face + this.triangles[index_X6 + 30] = index_X4 + 7; + this.triangles[index_X6 + 31] = index_X4 + 6; + this.triangles[index_X6 + 32] = index_X4 + 5; + this.triangles[index_X6 + 33] = index_X4 + 5; + this.triangles[index_X6 + 34] = index_X4 + 4; + this.triangles[index_X6 + 35] = index_X4 + 7; + } + } + + this.mesh.vertices = this.vertices; + this.mesh.normals = this.normals; + this.mesh.tangents = this.tangents; + this.mesh.triangles = this.triangles; + } + + + /// <summary> + /// Function to clear the vertices while preserving the Triangles, Normals and Tangents. + /// </summary> + public void Clear() + { + if (this.vertices == null) return; + + Array.Clear(this.vertices, 0, this.vertices.Length); + this.vertexCount = 0; + + if (this.mesh != null) + this.mesh.vertices = this.vertices; + } + + + /// <summary> + /// Function to clear the vertices while preserving the Triangles, Normals and Tangents. + /// </summary> + public void Clear(bool uploadChanges) + { + if (this.vertices == null) return; + + Array.Clear(this.vertices, 0, this.vertices.Length); + this.vertexCount = 0; + + if (uploadChanges && this.mesh != null) + this.mesh.vertices = this.vertices; + + if (this.mesh != null) + this.mesh.bounds = s_DefaultBounds; + } + + + /// <summary> + /// Function to clear the vertices while preserving the Triangles, Normals and Tangents. + /// </summary> + public void ClearUnusedVertices() + { + int length = vertices.Length - vertexCount; + + if (length > 0) + Array.Clear(vertices, vertexCount, length); + } + + + /// <summary> + /// Function used to mark unused vertices as degenerate. + /// </summary> + /// <param name="startIndex"></param> + public void ClearUnusedVertices(int startIndex) + { + int length = this.vertices.Length - startIndex; + + if (length > 0) + Array.Clear(this.vertices, startIndex, length); + } + + + /// <summary> + /// Function used to mark unused vertices as degenerate an upload resulting data to the mesh. + /// </summary> + /// <param name="startIndex"></param> + public void ClearUnusedVertices(int startIndex, bool updateMesh) + { + int length = this.vertices.Length - startIndex; + + if (length > 0) + Array.Clear(this.vertices, startIndex, length); + + if (updateMesh && mesh != null) + this.mesh.vertices = this.vertices; + } + + + public void SortGeometry (VertexSortingOrder order) + { + switch (order) + { + case VertexSortingOrder.Normal: + // Do nothing + break; + case VertexSortingOrder.Reverse: + int size = vertexCount / 4; + for (int i = 0; i < size; i++) + { + int src = i * 4; + int dst = (size - i - 1) * 4; + + if (src < dst) + SwapVertexData(src, dst); + + } + break; + //case VertexSortingOrder.Depth: + // break; + + } + } + + + /// <summary> + /// Function to rearrange the quads of the text object to change their rendering order. + /// </summary> + /// <param name="sortingOrder"></param> + public void SortGeometry(IList<int> sortingOrder) + { + // Make sure the sorting order array is not larger than the vertices array. + int indexCount = sortingOrder.Count; + + if (indexCount * 4 > vertices.Length) return; + + int src_index; + + for (int dst_index = 0; dst_index < indexCount; dst_index++) + { + src_index = sortingOrder[dst_index]; + + while (src_index < dst_index) + { + src_index = sortingOrder[src_index]; + } + + // Swap items + if (src_index != dst_index) + SwapVertexData(src_index * 4, dst_index * 4); + + //Debug.Log("Swap element [" + dst_index + "] with [" + src_index + "]. Vertex[" + dst_index + "] is " + vertices[dst_index * 4].z); + } + } + + + /// <summary> + /// Method to swap the vertex attributes between src and dst quads. + /// </summary> + /// <param name="src">Index of the first vertex attribute of the source character / quad.</param> + /// <param name="dst">Index of the first vertex attribute of the destination character / quad.</param> + public void SwapVertexData(int src, int dst) + { + int src_Index = src; // * 4; + int dst_Index = dst; // * 4; + + // Swap vertices + Vector3 vertex; + vertex = vertices[dst_Index + 0]; + vertices[dst_Index + 0] = vertices[src_Index + 0]; + vertices[src_Index + 0] = vertex; + + vertex = vertices[dst_Index + 1]; + vertices[dst_Index + 1] = vertices[src_Index + 1]; + vertices[src_Index + 1] = vertex; + + vertex = vertices[dst_Index + 2]; + vertices[dst_Index + 2] = vertices[src_Index + 2]; + vertices[src_Index + 2] = vertex; + + vertex = vertices[dst_Index + 3]; + vertices[dst_Index + 3] = vertices[src_Index + 3]; + vertices[src_Index + 3] = vertex; + + + //Swap UVs0 + Vector2 uvs; + uvs = uvs0[dst_Index + 0]; + uvs0[dst_Index + 0] = uvs0[src_Index + 0]; + uvs0[src_Index + 0] = uvs; + + uvs = uvs0[dst_Index + 1]; + uvs0[dst_Index + 1] = uvs0[src_Index + 1]; + uvs0[src_Index + 1] = uvs; + + uvs = uvs0[dst_Index + 2]; + uvs0[dst_Index + 2] = uvs0[src_Index + 2]; + uvs0[src_Index + 2] = uvs; + + uvs = uvs0[dst_Index + 3]; + uvs0[dst_Index + 3] = uvs0[src_Index + 3]; + uvs0[src_Index + 3] = uvs; + + // Swap UVs2 + uvs = uvs2[dst_Index + 0]; + uvs2[dst_Index + 0] = uvs2[src_Index + 0]; + uvs2[src_Index + 0] = uvs; + + uvs = uvs2[dst_Index + 1]; + uvs2[dst_Index + 1] = uvs2[src_Index + 1]; + uvs2[src_Index + 1] = uvs; + + uvs = uvs2[dst_Index + 2]; + uvs2[dst_Index + 2] = uvs2[src_Index + 2]; + uvs2[src_Index + 2] = uvs; + + uvs = uvs2[dst_Index + 3]; + uvs2[dst_Index + 3] = uvs2[src_Index + 3]; + uvs2[src_Index + 3] = uvs; + + // Vertex Colors + Color32 color; + color = colors32[dst_Index + 0]; + colors32[dst_Index + 0] = colors32[src_Index + 0]; + colors32[src_Index + 0] = color; + + color = colors32[dst_Index + 1]; + colors32[dst_Index + 1] = colors32[src_Index + 1]; + colors32[src_Index + 1] = color; + + color = colors32[dst_Index + 2]; + colors32[dst_Index + 2] = colors32[src_Index + 2]; + colors32[src_Index + 2] = color; + + color = colors32[dst_Index + 3]; + colors32[dst_Index + 3] = colors32[src_Index + 3]; + colors32[src_Index + 3] = color; + } + + + //int Partition (int start, int end) + //{ + // float pivot = vertices[end].z; + + // int partitionIndex = start; + // for (int i = start; i < end; i++) + // { + // if (vertices[i].z <= pivot) + // { + // Swap(vertices[i], vertices[partitionIndex]); + // partitionIndex += 1; + // } + // } + // Swap(vertices[partitionIndex], vertices[end]); + // return partitionIndex; + //} + + + //void Swap(Vector3 a, Vector3 b) + //{ + // Vector3 temp = a; + // a = b; + // b = a; + //} + + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_MeshInfo.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_MeshInfo.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..bdf872f0cbbb678899ad2d56aa01c3a3d75a1f29 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_MeshInfo.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e21bec35f48a44298911b25ead550ce3 +timeCreated: 1462398762 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ObjectPool.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ObjectPool.cs new file mode 100644 index 0000000000000000000000000000000000000000..ea857f1b5b82779382e248c9ff9b7f77af6d5185 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ObjectPool.cs @@ -0,0 +1,51 @@ +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Events; + + +namespace TMPro +{ + + internal class TMP_ObjectPool<T> where T : new() + { + private readonly Stack<T> m_Stack = new Stack<T>(); + private readonly UnityAction<T> m_ActionOnGet; + private readonly UnityAction<T> m_ActionOnRelease; + + public int countAll { get; private set; } + public int countActive { get { return countAll - countInactive; } } + public int countInactive { get { return m_Stack.Count; } } + + public TMP_ObjectPool(UnityAction<T> actionOnGet, UnityAction<T> actionOnRelease) + { + m_ActionOnGet = actionOnGet; + m_ActionOnRelease = actionOnRelease; + } + + public T Get() + { + T element; + if (m_Stack.Count == 0) + { + element = new T(); + countAll++; + } + else + { + element = m_Stack.Pop(); + } + if (m_ActionOnGet != null) + m_ActionOnGet(element); + return element; + } + + public void Release(T element) + { + if (m_Stack.Count > 0 && ReferenceEquals(m_Stack.Peek(), element)) + Debug.LogError("Internal error. Trying to destroy object that is already released to pool."); + if (m_ActionOnRelease != null) + m_ActionOnRelease(element); + m_Stack.Push(element); + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ObjectPool.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ObjectPool.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..98d159172a0798002eed758e2ad1cd770728b75a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ObjectPool.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e69259f6ff914146ad610be5491eb44a +timeCreated: 1458521389 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_PackageResourceImporter.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_PackageResourceImporter.cs new file mode 100644 index 0000000000000000000000000000000000000000..0d962de5994641d687d079b8110c66d8de48f623 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_PackageResourceImporter.cs @@ -0,0 +1,212 @@ +#if UNITY_EDITOR + +using System; +using System.IO; +using UnityEngine; +using UnityEditor; + + +namespace TMPro +{ + [System.Serializable] + public class TMP_PackageResourceImporter + { + bool m_EssentialResourcesImported; + bool m_ExamplesAndExtrasResourcesImported; + internal bool m_IsImportingExamples; + + public TMP_PackageResourceImporter() { } + + public void OnDestroy() + { + } + + public void OnGUI() + { + // Check if the resources state has changed. + m_EssentialResourcesImported = Directory.Exists("Assets/TextMesh Pro"); + m_ExamplesAndExtrasResourcesImported = Directory.Exists("Assets/TextMesh Pro/Examples & Extras"); + + GUILayout.BeginVertical(); + { + // Display options to import Essential resources + GUILayout.BeginVertical(EditorStyles.helpBox); + { + GUILayout.Label("TMP Essentials", EditorStyles.boldLabel); + GUILayout.Label("This appears to be the first time you access TextMesh Pro, as such we need to add resources to your project that are essential for using TextMesh Pro. These new resources will be placed at the root of your project in the \"TextMesh Pro\" folder.", new GUIStyle(EditorStyles.label) { wordWrap = true } ); + GUILayout.Space(5f); + + GUI.enabled = !m_EssentialResourcesImported; + if (GUILayout.Button("Import TMP Essentials")) + { + AssetDatabase.importPackageCompleted += ImportCallback; + + string packageFullPath = GetPackageFullPath(); + AssetDatabase.ImportPackage(packageFullPath + "/Package Resources/TMP Essential Resources.unitypackage", false); + } + GUILayout.Space(5f); + GUI.enabled = true; + } + GUILayout.EndVertical(); + + // Display options to import Examples & Extras + GUILayout.BeginVertical(EditorStyles.helpBox); + { + GUILayout.Label("TMP Examples & Extras", EditorStyles.boldLabel); + GUILayout.Label("The Examples & Extras package contains addition resources and examples that will make discovering and learning about TextMesh Pro's powerful features easier. These additional resources will be placed in the same folder as the TMP essential resources.", new GUIStyle(EditorStyles.label) { wordWrap = true }); + GUILayout.Space(5f); + + GUI.enabled = m_EssentialResourcesImported && !m_ExamplesAndExtrasResourcesImported; + if (GUILayout.Button("Import TMP Examples & Extras")) + { + // Set flag to get around importing scripts as per of this package which results in an assembly reload which in turn prevents / clears any callbacks. + m_IsImportingExamples = true; + + var packageFullPath = GetPackageFullPath(); + AssetDatabase.ImportPackage(packageFullPath + "/Package Resources/TMP Examples & Extras.unitypackage", false); + } + GUILayout.Space(5f); + GUI.enabled = true; + } + GUILayout.EndVertical(); + } + GUILayout.EndVertical(); + GUILayout.Space(5f); + } + + internal void RegisterResourceImportCallback() + { + AssetDatabase.importPackageCompleted += ImportCallback; + } + + /// <summary> + /// + /// </summary> + /// <param name="packageName"></param> + void ImportCallback(string packageName) + { + if (packageName == "TMP Essential Resources") + { + m_EssentialResourcesImported = true; + TMPro_EventManager.ON_RESOURCES_LOADED(); + + #if UNITY_2018_3_OR_NEWER + SettingsService.NotifySettingsProviderChanged(); + #endif + } + else if (packageName == "TMP Examples & Extras") + { + m_ExamplesAndExtrasResourcesImported = true; + m_IsImportingExamples = false; + } + + Debug.Log("[" + packageName + "] have been imported."); + + AssetDatabase.importPackageCompleted -= ImportCallback; + } + + 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; + } + + static string ValidateLocation(string[] paths, string projectPath) + { + for (int i = 0; i < paths.Length; i++) + { + // Check if the Editor Resources folder exists. + if (Directory.Exists(paths[i] + "/Editor Resources")) + { + string folderPath = paths[i].Replace(projectPath, ""); + folderPath = folderPath.TrimStart('\\', '/'); + return folderPath; + } + } + + return null; + } + } + + public class TMP_PackageResourceImporterWindow : EditorWindow + { + [SerializeField] + TMP_PackageResourceImporter m_ResourceImporter; + + public static void ShowPackageImporterWindow() + { + var window = GetWindow<TMP_PackageResourceImporterWindow>(); + window.titleContent = new GUIContent("TMP Importer"); + window.Focus(); + } + + void OnEnable() + { + // Set Editor Window Size + SetEditorWindowSize(); + + if (m_ResourceImporter == null) + m_ResourceImporter = new TMP_PackageResourceImporter(); + + if (m_ResourceImporter.m_IsImportingExamples) + m_ResourceImporter.RegisterResourceImportCallback(); + } + + void OnDestroy() + { + m_ResourceImporter.OnDestroy(); + } + + void OnGUI() + { + m_ResourceImporter.OnGUI(); + } + + void OnInspectorUpdate() + { + Repaint(); + } + + /// <summary> + /// Limits the minimum size of the editor window. + /// </summary> + void SetEditorWindowSize() + { + EditorWindow editorWindow = this; + + Vector2 windowSize = new Vector2(640, 210); + editorWindow.minSize = windowSize; + editorWindow.maxSize = windowSize; + } + } + +} + +#endif diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_PackageResourceImporter.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_PackageResourceImporter.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..1243ebfd60fced578ff857dd3f690023bdb75ea4 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_PackageResourceImporter.cs.meta @@ -0,0 +1,16 @@ +fileFormatVersion: 2 +guid: cf1fe50a641faac4691bf49eb32ce333 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: + - m_PersistentViewDataDictionary: {instanceID: 0} + - LightSkin: {fileID: 11400000, guid: 0c156a7b2f4d450da1716b1625b5441d, type: 2} + - DarkSkin: {fileID: 11400000, guid: 9d345c3252c147c89e8b61a249a46a9d, type: 2} + - TMPEssentials: {fileID: 102900000, guid: ce4ff17ca867d2b48b5c8a4181611901, type: 3} + - TMPExamples: {fileID: 102900000, guid: bc00e25696e4132499f56528d3fed2e3, type: 3} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_RichTextTagStack.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_RichTextTagStack.cs new file mode 100644 index 0000000000000000000000000000000000000000..2567a28d8b3d9637376ed41d84bdc27f5a86002c --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_RichTextTagStack.cs @@ -0,0 +1,278 @@ +namespace TMPro +{ + /// <summary> + /// Structure used to track basic XML tags which are binary (on / off) + /// </summary> + public struct TMP_FontStyleStack + { + public byte bold; + public byte italic; + public byte underline; + public byte strikethrough; + public byte highlight; + public byte superscript; + public byte subscript; + public byte uppercase; + public byte lowercase; + public byte smallcaps; + + /// <summary> + /// Clear the basic XML tag stack. + /// </summary> + public void Clear() + { + bold = 0; + italic = 0; + underline = 0; + strikethrough = 0; + highlight = 0; + superscript = 0; + subscript = 0; + uppercase = 0; + lowercase = 0; + smallcaps = 0; + } + + public byte Add(FontStyles style) + { + switch (style) + { + case FontStyles.Bold: + bold++; + return bold; + case FontStyles.Italic: + italic++; + return italic; + case FontStyles.Underline: + underline++; + return underline; + case FontStyles.Strikethrough: + strikethrough++; + return strikethrough; + case FontStyles.Superscript: + superscript++; + return superscript; + case FontStyles.Subscript: + subscript++; + return subscript; + case FontStyles.Highlight: + highlight++; + return highlight; + } + + return 0; + } + + public byte Remove(FontStyles style) + { + switch (style) + { + case FontStyles.Bold: + if (bold > 1) + bold--; + else + bold = 0; + return bold; + case FontStyles.Italic: + if (italic > 1) + italic--; + else + italic = 0; + return italic; + case FontStyles.Underline: + if (underline > 1) + underline--; + else + underline = 0; + return underline; + case FontStyles.Strikethrough: + if (strikethrough > 1) + strikethrough--; + else + strikethrough = 0; + return strikethrough; + case FontStyles.Highlight: + if (highlight > 1) + highlight--; + else + highlight = 0; + return highlight; + case FontStyles.Superscript: + if (superscript > 1) + superscript--; + else + superscript = 0; + return superscript; + case FontStyles.Subscript: + if (subscript > 1) + subscript--; + else + subscript = 0; + return subscript; + } + + return 0; + } + } + + + /// <summary> + /// Structure used to track XML tags of various types. + /// </summary> + /// <typeparam name="T"></typeparam> + public struct TMP_RichTextTagStack<T> + { + public T[] m_ItemStack; + public int m_Index; + private int m_Capacity; + + private T m_DefaultItem; + + private const int k_DefaultCapacity = 4; + //static readonly T[] m_EmptyStack = new T[0]; + + /// <summary> + /// Constructor to create a new item stack. + /// </summary> + /// <param name="tagStack"></param> + public TMP_RichTextTagStack(T[] tagStack) + { + m_ItemStack = tagStack; + m_Capacity = tagStack.Length; + m_Index = 0; + + m_DefaultItem = default(T); + } + + /// <summary> + /// Constructor for a new item stack with the given capacity. + /// </summary> + /// <param name="capacity"></param> + public TMP_RichTextTagStack(int capacity) + { + m_ItemStack = new T[capacity]; + m_Capacity = capacity; + m_Index = 0; + + m_DefaultItem = default(T); + } + + + /// <summary> + /// Function to clear and reset stack to first item. + /// </summary> + public void Clear() + { + m_Index = 0; + } + + + /// <summary> + /// Function to set the first item on the stack and reset index. + /// </summary> + /// <param name="item"></param> + public void SetDefault(T item) + { + m_ItemStack[0] = item; + m_Index = 1; + } + + + /// <summary> + /// Function to add a new item to the stack. + /// </summary> + /// <param name="item"></param> + public void Add(T item) + { + if (m_Index < m_ItemStack.Length) + { + m_ItemStack[m_Index] = item; + m_Index += 1; + } + } + + + /// <summary> + /// Function to retrieve an item from the stack. + /// </summary> + /// <returns></returns> + public T Remove() + { + m_Index -= 1; + + if (m_Index <= 0) + { + m_Index = 1; + return m_ItemStack[0]; + + } + + return m_ItemStack[m_Index - 1]; + } + + public void Push(T item) + { + if (m_Index == m_Capacity) + { + m_Capacity *= 2; + if (m_Capacity == 0) + m_Capacity = k_DefaultCapacity; + + System.Array.Resize(ref m_ItemStack, m_Capacity); + } + + m_ItemStack[m_Index] = item; + m_Index += 1; + } + + public T Pop() + { + if (m_Index == 0) + return default(T); + + m_Index -= 1; + T item = m_ItemStack[m_Index]; + m_ItemStack[m_Index] = m_DefaultItem; + + return item; + } + + /// <summary> + /// + /// </summary> + /// <returns></returns> + public T Peek() + { + if (m_Index == 0) + return m_DefaultItem; + + return m_ItemStack[m_Index - 1]; + } + + + /// <summary> + /// Function to retrieve the current item from the stack. + /// </summary> + /// <returns>itemStack <T></returns> + public T CurrentItem() + { + if (m_Index > 0) + return m_ItemStack[m_Index - 1]; + + return m_ItemStack[0]; + } + + + /// <summary> + /// Function to retrieve the previous item without affecting the stack. + /// </summary> + /// <returns></returns> + public T PreviousItem() + { + if (m_Index > 1) + return m_ItemStack[m_Index - 2]; + + return m_ItemStack[0]; + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_RichTextTagStack.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_RichTextTagStack.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..c1ba7179be052418d6d9fee748076eab917ae1d5 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_RichTextTagStack.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 20a9b557a46149dfbfa04a3a7080f5aa +timeCreated: 1448242247 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_RichTextTagsCommon.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_RichTextTagsCommon.cs new file mode 100644 index 0000000000000000000000000000000000000000..912ec8889466da15d395c63aaa178aa56b963c12 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_RichTextTagsCommon.cs @@ -0,0 +1,113 @@ +using System; +using UnityEngine.Bindings; + + +namespace TMPro +{ + /// <summary> + /// Rich Text Tags and Attribute definitions and their respective HashCode values. + /// </summary> + enum RichTextTag : uint + { + // Rich Text Tags + BOLD = 66, // <b> + SLASH_BOLD = 1613, // </b> + ITALIC = 73, // <i> + SLASH_ITALIC = 1606, // </i> + UNDERLINE = 85, // <u> + SLASH_UNDERLINE = 1626, // </u> + STRIKETHROUGH = 83, // <s> + SLASH_STRIKETHROUGH = 1628, // </s> + COLOR = 81999901, // <color> + SLASH_COLOR = 1909026194, // </color> + SIZE = 3061285, // <size> + SLASH_SIZE = 58429962, // </size> + SPRITE = 3303439849, // <sprite> + BR = 2256, // <br> + STYLE = 100252951, // <style> + SLASH_STYLE = 1927738392, // </style> + FONT = 2586451, // <font> + SLASH_FONT = 57747708, // </font> + LINK = 2656128, // <link> + SLASH_LINK = 57686191, // </link> + FONT_WEIGHT = 2405071134, // <font-weight=xxx> + SLASH_FONT_WEIGHT = 3536990865, // </font-weight> + + + // Font Features + LIGA = 2655971, // <liga> + SLASH_LIGA = 57686604, // </liga> + FRAC = 2598518, // <frac> + SLASH_FRAC = 57774681, // </frac> + + // Attributes + NAME = 2875623, // <sprite name="Name of Sprite"> + INDEX = 84268030, // <sprite index=7> + TINT = 2960519, // <tint=bool> + ANIM = 2283339, // <anim="first frame, last frame, frame rate"> + MATERIAL = 825491659, // <font="Name of font asset" material="Name of material"> + + // Named Colors + RED = 91635, + GREEN = 87065851, + BLUE = 2457214, + YELLOW = 3412522628, + ORANGE = 3186379376, + + // Prefix and Unit suffix + PLUS = 43, + MINUS = 45, + PX = 2568, + PLUS_PX = 49507, + MINUS_PX = 47461, + EM = 2216, + PLUS_EM = 49091, + MINUS_EM = 46789, + PCT = 85031, + PLUS_PCT = 1634348, + MINUS_PCT = 1567082, + PERCENTAGE = 37, + PLUS_PERCENTAGE = 1454, + MINUS_PERCENTAGE = 1512, + + TRUE = 2932022, + FALSE = 85422813, + + DEFAULT = 3673993291, // <font="Default"> + + }; + + /// <summary> + /// Defines the type of value used by a rich text tag or tag attribute. + /// </summary> + public enum TagValueType + { + None = 0x0, + NumericalValue = 0x1, + StringValue = 0x2, + ColorValue = 0x4, + } + + public enum TagUnitType + { + Pixels = 0x0, + FontUnits = 0x1, + Percentage = 0x2, + } + + /// <summary> + /// Commonly referenced Unicode characters in the text generation process. + /// </summary> + enum UnicodeCharacter : uint + { + HYPHEN_MINUS = 0x2D, + SOFT_HYPHEN = 0xAD, + HYPHEN = 0x2010, + NON_BREAKING_HYPHEN = 0x2011, + ZERO_WIDTH_SPACE = 0x200B, + RIGHT_SINGLE_QUOTATION = 0x2019, + APOSTROPHE = 0x27, + WORD_JOINER = 0x2060, // Prohibits line break. + + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_RichTextTagsCommon.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_RichTextTagsCommon.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..8fe5ec41c444014cc51b0893298890b23e8259fc --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_RichTextTagsCommon.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: b458b2c7f196bdc4581b2f9fd6a5d931 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ScrollbarEventHandler.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ScrollbarEventHandler.cs new file mode 100644 index 0000000000000000000000000000000000000000..a24e2aaa1f6293399cb56f79ac2c0965b3e58b25 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ScrollbarEventHandler.cs @@ -0,0 +1,31 @@ +using UnityEngine; +using UnityEngine.Events; +using UnityEngine.EventSystems; +using System; + + +namespace TMPro +{ + + public class TMP_ScrollbarEventHandler : MonoBehaviour, IPointerClickHandler, ISelectHandler, IDeselectHandler + { + public bool isSelected; + + public void OnPointerClick(PointerEventData eventData) + { + Debug.Log("Scrollbar click..."); + } + + public void OnSelect(BaseEventData eventData) + { + Debug.Log("Scrollbar selected"); + isSelected = true; + } + + public void OnDeselect(BaseEventData eventData) + { + Debug.Log("Scrollbar De-Selected"); + isSelected = false; + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ScrollbarEventHandler.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ScrollbarEventHandler.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..e283d82e202498e34df23bc120e68f1e424e08cb --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ScrollbarEventHandler.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 34e150112c1c42ac83170b52d898e322 +timeCreated: 1484171293 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SelectionCaret.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SelectionCaret.cs new file mode 100644 index 0000000000000000000000000000000000000000..9a48e238b54f1179af82764791afb0f1b7ce4932 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SelectionCaret.cs @@ -0,0 +1,23 @@ +using UnityEngine; +using UnityEngine.UI; + + +namespace TMPro +{ + /// <summary> + /// A simple component that can be added to a newly created object where inheriting from MaskableGraphic is needed. + /// </summary> + public class TMP_SelectionCaret : MaskableGraphic + { + + /// <summary> + /// Override to Cull function of MaskableGraphic to prevent Culling. + /// </summary> + /// <param name="clipRect"></param> + /// <param name="validRect"></param> + public override void Cull(Rect clipRect, bool validRect) + { + //base.Cull(clipRect, validRect); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SelectionCaret.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SelectionCaret.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..ad26005a4e4da0d5e567bd5eb29b31a1a6579bfd --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SelectionCaret.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ca819640f53b48919bf7774744f7f15e +timeCreated: 1477609203 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Settings.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Settings.cs new file mode 100644 index 0000000000000000000000000000000000000000..43f1f7ab7bd3101ebcea6c35d536a03d8c619934 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Settings.cs @@ -0,0 +1,440 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + + +#pragma warning disable 0649 // Disabled warnings related to serialized fields not assigned in this script but used in the editor. + +namespace TMPro +{ + [System.Serializable] + public class TMP_Settings : ScriptableObject + { + private static TMP_Settings s_Instance; + + /// <summary> + /// Returns the release version of the product. + /// </summary> + public static string version + { + get { return "1.4.0"; } + } + + /// <summary> + /// Controls if Word Wrapping will be enabled on newly created text objects by default. + /// </summary> + public static bool enableWordWrapping + { + get { return instance.m_enableWordWrapping; } + } + [SerializeField] + private bool m_enableWordWrapping; + + /// <summary> + /// Controls if Kerning is enabled on newly created text objects by default. + /// </summary> + public static bool enableKerning + { + get { return instance.m_enableKerning; } + } + [SerializeField] + private bool m_enableKerning; + + /// <summary> + /// Controls if Extra Padding is enabled on newly created text objects by default. + /// </summary> + public static bool enableExtraPadding + { + get { return instance.m_enableExtraPadding; } + } + [SerializeField] + private bool m_enableExtraPadding; + + /// <summary> + /// Controls if TintAllSprites is enabled on newly created text objects by default. + /// </summary> + public static bool enableTintAllSprites + { + get { return instance.m_enableTintAllSprites; } + } + [SerializeField] + private bool m_enableTintAllSprites; + + /// <summary> + /// Controls if Escape Characters will be parsed in the Text Input Box on newly created text objects. + /// </summary> + public static bool enableParseEscapeCharacters + { + get { return instance.m_enableParseEscapeCharacters; } + } + [SerializeField] + private bool m_enableParseEscapeCharacters; + + /// <summary> + /// Controls if Raycast Target is enabled by default on newly created text objects. + /// </summary> + public static bool enableRaycastTarget + { + get { return instance.m_EnableRaycastTarget; } + } + [SerializeField] + private bool m_EnableRaycastTarget = true; + + /// <summary> + /// Determines if OpenType Font Features should be retrieved at runtime from the source font file. + /// </summary> + public static bool getFontFeaturesAtRuntime + { + get { return instance.m_GetFontFeaturesAtRuntime; } + } + [SerializeField] + private bool m_GetFontFeaturesAtRuntime = true; + + /// <summary> + /// The character that will be used as a replacement for missing glyphs in a font asset. + /// </summary> + public static int missingGlyphCharacter + { + get { return instance.m_missingGlyphCharacter; } + set { instance.m_missingGlyphCharacter = value; } + } + [SerializeField] + private int m_missingGlyphCharacter; + + /// <summary> + /// Controls the display of warning message in the console. + /// </summary> + public static bool warningsDisabled + { + get { return instance.m_warningsDisabled; } + } + [SerializeField] + private bool m_warningsDisabled; + + /// <summary> + /// Returns the Default Font Asset to be used by newly created text objects. + /// </summary> + public static TMP_FontAsset defaultFontAsset + { + get { return instance.m_defaultFontAsset; } + } + [SerializeField] + private TMP_FontAsset m_defaultFontAsset; + + /// <summary> + /// The relative path to a Resources folder in the project. + /// </summary> + public static string defaultFontAssetPath + { + get { return instance.m_defaultFontAssetPath; } + } + [SerializeField] + private string m_defaultFontAssetPath; + + /// <summary> + /// The Default Point Size of newly created text objects. + /// </summary> + public static float defaultFontSize + { + get { return instance.m_defaultFontSize; } + } + [SerializeField] + private float m_defaultFontSize; + + /// <summary> + /// The multiplier used to computer the default Min point size when Text Auto Sizing is used. + /// </summary> + public static float defaultTextAutoSizingMinRatio + { + get { return instance.m_defaultAutoSizeMinRatio; } + } + [SerializeField] + private float m_defaultAutoSizeMinRatio; + + /// <summary> + /// The multiplier used to computer the default Max point size when Text Auto Sizing is used. + /// </summary> + public static float defaultTextAutoSizingMaxRatio + { + get { return instance.m_defaultAutoSizeMaxRatio; } + } + [SerializeField] + private float m_defaultAutoSizeMaxRatio; + + /// <summary> + /// The Default Size of the Text Container of a TextMeshPro object. + /// </summary> + public static Vector2 defaultTextMeshProTextContainerSize + { + get { return instance.m_defaultTextMeshProTextContainerSize; } + } + [SerializeField] + private Vector2 m_defaultTextMeshProTextContainerSize; + + /// <summary> + /// The Default Width of the Text Container of a TextMeshProUI object. + /// </summary> + public static Vector2 defaultTextMeshProUITextContainerSize + { + get { return instance.m_defaultTextMeshProUITextContainerSize; } + } + [SerializeField] + private Vector2 m_defaultTextMeshProUITextContainerSize; + + /// <summary> + /// Set the size of the text container of newly created text objects to match the size of the text. + /// </summary> + public static bool autoSizeTextContainer + { + get { return instance.m_autoSizeTextContainer; } + } + [SerializeField] + private bool m_autoSizeTextContainer; + + /// <summary> + /// Returns the list of Fallback Fonts defined in the TMP Settings file. + /// </summary> + public static List<TMP_FontAsset> fallbackFontAssets + { + get { return instance.m_fallbackFontAssets; } + } + [SerializeField] + private List<TMP_FontAsset> m_fallbackFontAssets; + + /// <summary> + /// Controls whether or not TMP will create a matching material preset or use the default material of the fallback font asset. + /// </summary> + public static bool matchMaterialPreset + { + get { return instance.m_matchMaterialPreset; } + } + [SerializeField] + private bool m_matchMaterialPreset; + + /// <summary> + /// The Default Sprite Asset to be used by default. + /// </summary> + public static TMP_SpriteAsset defaultSpriteAsset + { + get { return instance.m_defaultSpriteAsset; } + } + [SerializeField] + private TMP_SpriteAsset m_defaultSpriteAsset; + + /// <summary> + /// The relative path to a Resources folder in the project. + /// </summary> + public static string defaultSpriteAssetPath + { + get { return instance.m_defaultSpriteAssetPath; } + } + [SerializeField] + private string m_defaultSpriteAssetPath; + + /// <summary> + /// The relative path to a Resources folder in the project that contains Color Gradient Presets. + /// </summary> + public static string defaultColorGradientPresetsPath + { + get { return instance.m_defaultColorGradientPresetsPath; } + } + [SerializeField] + private string m_defaultColorGradientPresetsPath; + + /// <summary> + /// Determines if Emoji support is enabled in the Input Field TouchScreenKeyboard. + /// </summary> + public static bool enableEmojiSupport + { + get { return instance.m_enableEmojiSupport; } + set { instance.m_enableEmojiSupport = value; } + } + [SerializeField] + private bool m_enableEmojiSupport; + + /// <summary> + /// The Default Style Sheet used by the text objects. + /// </summary> + public static TMP_StyleSheet defaultStyleSheet + { + get { return instance.m_defaultStyleSheet; } + } + [SerializeField] + private TMP_StyleSheet m_defaultStyleSheet; + + /// <summary> + /// Text file that contains the leading characters used for line breaking for Asian languages. + /// </summary> + public static TextAsset leadingCharacters + { + get { return instance.m_leadingCharacters; } + } + [SerializeField] + private TextAsset m_leadingCharacters; + + /// <summary> + /// Text file that contains the following characters used for line breaking for Asian languages. + /// </summary> + public static TextAsset followingCharacters + { + get { return instance.m_followingCharacters; } + } + [SerializeField] + private TextAsset m_followingCharacters; + + /// <summary> + /// + /// </summary> + public static LineBreakingTable linebreakingRules + { + get + { + if (instance.m_linebreakingRules == null) + LoadLinebreakingRules(); + + return instance.m_linebreakingRules; + } + } + [SerializeField] + private LineBreakingTable m_linebreakingRules; + + /// <summary> + /// Get a singleton instance of the settings class. + /// </summary> + public static TMP_Settings instance + { + get + { + if (TMP_Settings.s_Instance == null) + { + TMP_Settings.s_Instance = Resources.Load<TMP_Settings>("TMP Settings"); + + #if UNITY_EDITOR + // Make sure TextMesh Pro UPM packages resources have been added to the user project + if (TMP_Settings.s_Instance == null) + { + // Open TMP Resources Importer + TMP_PackageResourceImporterWindow.ShowPackageImporterWindow(); + } + #endif + } + + return TMP_Settings.s_Instance; + } + } + + + /// <summary> + /// Static Function to load the TMP Settings file. + /// </summary> + /// <returns></returns> + public static TMP_Settings LoadDefaultSettings() + { + if (s_Instance == null) + { + // Load settings from TMP_Settings file + TMP_Settings settings = Resources.Load<TMP_Settings>("TMP Settings"); + if (settings != null) + s_Instance = settings; + } + + return s_Instance; + } + + + /// <summary> + /// Returns the Sprite Asset defined in the TMP Settings file. + /// </summary> + /// <returns></returns> + public static TMP_Settings GetSettings() + { + if (TMP_Settings.instance == null) return null; + + return TMP_Settings.instance; + } + + + /// <summary> + /// Returns the Font Asset defined in the TMP Settings file. + /// </summary> + /// <returns></returns> + public static TMP_FontAsset GetFontAsset() + { + if (TMP_Settings.instance == null) return null; + + return TMP_Settings.instance.m_defaultFontAsset; + } + + + /// <summary> + /// Returns the Sprite Asset defined in the TMP Settings file. + /// </summary> + /// <returns></returns> + public static TMP_SpriteAsset GetSpriteAsset() + { + if (TMP_Settings.instance == null) return null; + + return TMP_Settings.instance.m_defaultSpriteAsset; + } + + + /// <summary> + /// Returns the Sprite Asset defined in the TMP Settings file. + /// </summary> + /// <returns></returns> + public static TMP_StyleSheet GetStyleSheet() + { + if (TMP_Settings.instance == null) return null; + + return TMP_Settings.instance.m_defaultStyleSheet; + } + + + public static void LoadLinebreakingRules() + { + //Debug.Log("Loading Line Breaking Rules for Asian Languages."); + + if (TMP_Settings.instance == null) return; + + if (s_Instance.m_linebreakingRules == null) + s_Instance.m_linebreakingRules = new LineBreakingTable(); + + s_Instance.m_linebreakingRules.leadingCharacters = GetCharacters(s_Instance.m_leadingCharacters); + s_Instance.m_linebreakingRules.followingCharacters = GetCharacters(s_Instance.m_followingCharacters); + } + + + /// <summary> + /// Get the characters from the line breaking files + /// </summary> + /// <param name="file"></param> + /// <returns></returns> + private static Dictionary<int, char> GetCharacters(TextAsset file) + { + Dictionary<int, char> dict = new Dictionary<int, char>(); + string text = file.text; + + for (int i = 0; i < text.Length; i++) + { + char c = text[i]; + // Check to make sure we don't include duplicates + if (dict.ContainsKey((int)c) == false) + { + dict.Add((int)c, c); + //Debug.Log("Adding [" + (int)c + "] to dictionary."); + } + //else + // Debug.Log("Character [" + text[i] + "] is a duplicate."); + } + + return dict; + } + + + public class LineBreakingTable + { + public Dictionary<int, char> leadingCharacters; + public Dictionary<int, char> followingCharacters; + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Settings.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Settings.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..4d929ffaf135979c311562d236bef40e22c389cf --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Settings.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2705215ac5b84b70bacc50632be6e391 +timeCreated: 1457654851 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ShaderUtilities.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ShaderUtilities.cs new file mode 100644 index 0000000000000000000000000000000000000000..18b9852aff03be5bab7e43061958e467519bc848 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ShaderUtilities.cs @@ -0,0 +1,563 @@ +using UnityEngine; +using System.Linq; +using System.Collections; + + +namespace TMPro +{ + public static class ShaderUtilities + { + // Shader Property IDs + public static int ID_MainTex; + + public static int ID_FaceTex; + public static int ID_FaceColor; + public static int ID_FaceDilate; + public static int ID_Shininess; + + public static int ID_UnderlayColor; + public static int ID_UnderlayOffsetX; + public static int ID_UnderlayOffsetY; + public static int ID_UnderlayDilate; + public static int ID_UnderlaySoftness; + + public static int ID_WeightNormal; + public static int ID_WeightBold; + + public static int ID_OutlineTex; + public static int ID_OutlineWidth; + public static int ID_OutlineSoftness; + public static int ID_OutlineColor; + + public static int ID_Padding; + public static int ID_GradientScale; + public static int ID_ScaleX; + public static int ID_ScaleY; + public static int ID_PerspectiveFilter; + public static int ID_Sharpness; + + public static int ID_TextureWidth; + public static int ID_TextureHeight; + + public static int ID_BevelAmount; + + public static int ID_GlowColor; + public static int ID_GlowOffset; + public static int ID_GlowPower; + public static int ID_GlowOuter; + + public static int ID_LightAngle; + + public static int ID_EnvMap; + public static int ID_EnvMatrix; + public static int ID_EnvMatrixRotation; + + //public static int ID_MaskID; + public static int ID_MaskCoord; + public static int ID_ClipRect; + public static int ID_MaskSoftnessX; + public static int ID_MaskSoftnessY; + public static int ID_VertexOffsetX; + public static int ID_VertexOffsetY; + public static int ID_UseClipRect; + + public static int ID_StencilID; + public static int ID_StencilOp; + public static int ID_StencilComp; + public static int ID_StencilReadMask; + public static int ID_StencilWriteMask; + + public static int ID_ShaderFlags; + public static int ID_ScaleRatio_A; + public static int ID_ScaleRatio_B; + public static int ID_ScaleRatio_C; + + public static string Keyword_Bevel = "BEVEL_ON"; + public static string Keyword_Glow = "GLOW_ON"; + public static string Keyword_Underlay = "UNDERLAY_ON"; + public static string Keyword_Ratios = "RATIOS_OFF"; + //public static string Keyword_MASK_OFF = "MASK_OFF"; + public static string Keyword_MASK_SOFT = "MASK_SOFT"; + public static string Keyword_MASK_HARD = "MASK_HARD"; + public static string Keyword_MASK_TEX = "MASK_TEX"; + public static string Keyword_Outline = "OUTLINE_ON"; + + public static string ShaderTag_ZTestMode = "unity_GUIZTestMode"; + public static string ShaderTag_CullMode = "_CullMode"; + + private static float m_clamp = 1.0f; + public static bool isInitialized = false; + + + /// <summary> + /// Returns a reference to the mobile distance field shader. + /// </summary> + internal static Shader ShaderRef_MobileSDF + { + get + { + if (k_ShaderRef_MobileSDF == null) + k_ShaderRef_MobileSDF = Shader.Find("TextMeshPro/Mobile/Distance Field"); + + return k_ShaderRef_MobileSDF; + } + } + static Shader k_ShaderRef_MobileSDF; + + /// <summary> + /// Returns a reference to the mobile bitmap shader. + /// </summary> + internal static Shader ShaderRef_MobileBitmap + { + get + { + if (k_ShaderRef_MobileBitmap == null) + k_ShaderRef_MobileBitmap = Shader.Find("TextMeshPro/Mobile/Bitmap"); + + return k_ShaderRef_MobileBitmap; + } + } + static Shader k_ShaderRef_MobileBitmap; + + + /// <summary> + /// + /// </summary> + static ShaderUtilities() + { + GetShaderPropertyIDs(); + } + + /// <summary> + /// + /// </summary> + public static void GetShaderPropertyIDs() + { + if (isInitialized == false) + { + //Debug.Log("Getting Shader property IDs"); + isInitialized = true; + + ID_MainTex = Shader.PropertyToID("_MainTex"); + + ID_FaceTex = Shader.PropertyToID("_FaceTex"); + ID_FaceColor = Shader.PropertyToID("_FaceColor"); + ID_FaceDilate = Shader.PropertyToID("_FaceDilate"); + ID_Shininess = Shader.PropertyToID("_FaceShininess"); + + ID_UnderlayColor = Shader.PropertyToID("_UnderlayColor"); + ID_UnderlayOffsetX = Shader.PropertyToID("_UnderlayOffsetX"); + ID_UnderlayOffsetY = Shader.PropertyToID("_UnderlayOffsetY"); + ID_UnderlayDilate = Shader.PropertyToID("_UnderlayDilate"); + ID_UnderlaySoftness = Shader.PropertyToID("_UnderlaySoftness"); + + ID_WeightNormal = Shader.PropertyToID("_WeightNormal"); + ID_WeightBold = Shader.PropertyToID("_WeightBold"); + + ID_OutlineTex = Shader.PropertyToID("_OutlineTex"); + ID_OutlineWidth = Shader.PropertyToID("_OutlineWidth"); + ID_OutlineSoftness = Shader.PropertyToID("_OutlineSoftness"); + ID_OutlineColor = Shader.PropertyToID("_OutlineColor"); + + ID_Padding = Shader.PropertyToID("_Padding"); + ID_GradientScale = Shader.PropertyToID("_GradientScale"); + ID_ScaleX = Shader.PropertyToID("_ScaleX"); + ID_ScaleY = Shader.PropertyToID("_ScaleY"); + ID_PerspectiveFilter = Shader.PropertyToID("_PerspectiveFilter"); + ID_Sharpness = Shader.PropertyToID("_Sharpness"); + + ID_TextureWidth = Shader.PropertyToID("_TextureWidth"); + ID_TextureHeight = Shader.PropertyToID("_TextureHeight"); + + ID_BevelAmount = Shader.PropertyToID("_Bevel"); + + ID_LightAngle = Shader.PropertyToID("_LightAngle"); + + ID_EnvMap = Shader.PropertyToID("_Cube"); + ID_EnvMatrix = Shader.PropertyToID("_EnvMatrix"); + ID_EnvMatrixRotation = Shader.PropertyToID("_EnvMatrixRotation"); + + + ID_GlowColor = Shader.PropertyToID("_GlowColor"); + ID_GlowOffset = Shader.PropertyToID("_GlowOffset"); + ID_GlowPower = Shader.PropertyToID("_GlowPower"); + ID_GlowOuter = Shader.PropertyToID("_GlowOuter"); + + //ID_MaskID = Shader.PropertyToID("_MaskID"); + ID_MaskCoord = Shader.PropertyToID("_MaskCoord"); + ID_ClipRect = Shader.PropertyToID("_ClipRect"); + ID_UseClipRect = Shader.PropertyToID("_UseClipRect"); + ID_MaskSoftnessX = Shader.PropertyToID("_MaskSoftnessX"); + ID_MaskSoftnessY = Shader.PropertyToID("_MaskSoftnessY"); + ID_VertexOffsetX = Shader.PropertyToID("_VertexOffsetX"); + ID_VertexOffsetY = Shader.PropertyToID("_VertexOffsetY"); + + ID_StencilID = Shader.PropertyToID("_Stencil"); + ID_StencilOp = Shader.PropertyToID("_StencilOp"); + ID_StencilComp = Shader.PropertyToID("_StencilComp"); + ID_StencilReadMask = Shader.PropertyToID("_StencilReadMask"); + ID_StencilWriteMask = Shader.PropertyToID("_StencilWriteMask"); + + ID_ShaderFlags = Shader.PropertyToID("_ShaderFlags"); + ID_ScaleRatio_A = Shader.PropertyToID("_ScaleRatioA"); + ID_ScaleRatio_B = Shader.PropertyToID("_ScaleRatioB"); + ID_ScaleRatio_C = Shader.PropertyToID("_ScaleRatioC"); + + // Set internal shader references + if (k_ShaderRef_MobileSDF == null) + k_ShaderRef_MobileSDF = Shader.Find("TextMeshPro/Mobile/Distance Field"); + + if (k_ShaderRef_MobileBitmap == null) + k_ShaderRef_MobileBitmap = Shader.Find("TextMeshPro/Mobile/Bitmap"); + } + } + + + + // Scale Ratios to ensure property ranges are optimum in Material Editor + public static void UpdateShaderRatios(Material mat) + { + //Debug.Log("UpdateShaderRatios() called."); + + float ratio_A = 1; + float ratio_B = 1; + float ratio_C = 1; + + bool isRatioEnabled = !mat.shaderKeywords.Contains(Keyword_Ratios); + + // Compute Ratio A + float scale = mat.GetFloat(ID_GradientScale); + float faceDilate = mat.GetFloat(ID_FaceDilate); + float outlineThickness = mat.GetFloat(ID_OutlineWidth); + float outlineSoftness = mat.GetFloat(ID_OutlineSoftness); + + float weight = Mathf.Max(mat.GetFloat(ID_WeightNormal), mat.GetFloat(ID_WeightBold)) / 4.0f; + + float t = Mathf.Max(1, weight + faceDilate + outlineThickness + outlineSoftness); + + ratio_A = isRatioEnabled ? (scale - m_clamp) / (scale * t) : 1; + + //float ratio_A_old = mat.GetFloat(ID_ScaleRatio_A); + + // Only set the ratio if it has changed. + //if (ratio_A != ratio_A_old) + mat.SetFloat(ID_ScaleRatio_A, ratio_A); + + // Compute Ratio B + if (mat.HasProperty(ID_GlowOffset)) + { + float glowOffset = mat.GetFloat(ID_GlowOffset); + float glowOuter = mat.GetFloat(ID_GlowOuter); + + float range = (weight + faceDilate) * (scale - m_clamp); + + t = Mathf.Max(1, glowOffset + glowOuter); + + ratio_B = isRatioEnabled ? Mathf.Max(0, scale - m_clamp - range) / (scale * t) : 1; + //float ratio_B_old = mat.GetFloat(ID_ScaleRatio_B); + + // Only set the ratio if it has changed. + //if (ratio_B != ratio_B_old) + mat.SetFloat(ID_ScaleRatio_B, ratio_B); + } + + // Compute Ratio C + if (mat.HasProperty(ID_UnderlayOffsetX)) + { + float underlayOffsetX = mat.GetFloat(ID_UnderlayOffsetX); + float underlayOffsetY = mat.GetFloat(ID_UnderlayOffsetY); + float underlayDilate = mat.GetFloat(ID_UnderlayDilate); + float underlaySoftness = mat.GetFloat(ID_UnderlaySoftness); + + float range = (weight + faceDilate) * (scale - m_clamp); + + t = Mathf.Max(1, Mathf.Max(Mathf.Abs(underlayOffsetX), Mathf.Abs(underlayOffsetY)) + underlayDilate + underlaySoftness); + + ratio_C = isRatioEnabled ? Mathf.Max(0, scale - m_clamp - range) / (scale * t) : 1; + //float ratio_C_old = mat.GetFloat(ID_ScaleRatio_C); + + // Only set the ratio if it has changed. + //if (ratio_C != ratio_C_old) + mat.SetFloat(ID_ScaleRatio_C, ratio_C); + } + } + + + + // Function to calculate padding required for Outline Width & Dilation for proper text alignment + public static Vector4 GetFontExtent(Material material) + { + // Revised implementation where style no longer affects alignment + return Vector4.zero; + + /* + if (material == null || !material.HasProperty(ShaderUtilities.ID_GradientScale)) + return Vector4.zero; // We are using an non SDF Shader. + + float scaleRatioA = material.GetFloat(ID_ScaleRatio_A); + float faceDilate = material.GetFloat(ID_FaceDilate) * scaleRatioA; + float outlineThickness = material.GetFloat(ID_OutlineWidth) * scaleRatioA; + + float extent = Mathf.Min(1, faceDilate + outlineThickness); + extent *= material.GetFloat(ID_GradientScale); + + return new Vector4(extent, extent, extent, extent); + */ + } + + + // Function to check if Masking is enabled + public static bool IsMaskingEnabled(Material material) + { + if (material == null || !material.HasProperty(ShaderUtilities.ID_ClipRect)) + return false; + + if (material.shaderKeywords.Contains(ShaderUtilities.Keyword_MASK_SOFT) || material.shaderKeywords.Contains(ShaderUtilities.Keyword_MASK_HARD) || material.shaderKeywords.Contains(ShaderUtilities.Keyword_MASK_TEX)) + return true; + + return false; + } + + + // Function to determine how much extra padding is required as a result of material properties like dilate, outline thickness, softness, glow, etc... + public static float GetPadding(Material material, bool enableExtraPadding, bool isBold) + { + //Debug.Log("GetPadding() called."); + + if (isInitialized == false) + GetShaderPropertyIDs(); + + // Return if Material is null + if (material == null) return 0; + + int extraPadding = enableExtraPadding ? 4 : 0; + + // Check if we are using a non Distance Field Shader + if (material.HasProperty(ID_GradientScale) == false) + { + if (material.HasProperty(ID_Padding)) + extraPadding += (int)material.GetFloat(ID_Padding); + + return extraPadding; + } + + Vector4 padding = Vector4.zero; + Vector4 maxPadding = Vector4.zero; + + //float weight = 0; + float faceDilate = 0; + float faceSoftness = 0; + float outlineThickness = 0; + float scaleRatio_A = 0; + float scaleRatio_B = 0; + float scaleRatio_C = 0; + + float glowOffset = 0; + float glowOuter = 0; + + float uniformPadding = 0; + // Iterate through each of the assigned materials to find the max values to set the padding. + + // Update Shader Ratios prior to computing padding + UpdateShaderRatios(material); + + string[] shaderKeywords = material.shaderKeywords; + + if (material.HasProperty(ID_ScaleRatio_A)) + scaleRatio_A = material.GetFloat(ID_ScaleRatio_A); + + //weight = 0; // Mathf.Max(material.GetFloat(ID_WeightNormal), material.GetFloat(ID_WeightBold)) / 2.0f * scaleRatio_A; + + if (material.HasProperty(ID_FaceDilate)) + faceDilate = material.GetFloat(ID_FaceDilate) * scaleRatio_A; + + if (material.HasProperty(ID_OutlineSoftness)) + faceSoftness = material.GetFloat(ID_OutlineSoftness) * scaleRatio_A; + + if (material.HasProperty(ID_OutlineWidth)) + outlineThickness = material.GetFloat(ID_OutlineWidth) * scaleRatio_A; + + uniformPadding = outlineThickness + faceSoftness + faceDilate; + + // Glow padding contribution + if (material.HasProperty(ID_GlowOffset) && shaderKeywords.Contains(Keyword_Glow)) // Generates GC + { + if (material.HasProperty(ID_ScaleRatio_B)) + scaleRatio_B = material.GetFloat(ID_ScaleRatio_B); + + glowOffset = material.GetFloat(ID_GlowOffset) * scaleRatio_B; + glowOuter = material.GetFloat(ID_GlowOuter) * scaleRatio_B; + } + + uniformPadding = Mathf.Max(uniformPadding, faceDilate + glowOffset + glowOuter); + + // Underlay padding contribution + if (material.HasProperty(ID_UnderlaySoftness) && shaderKeywords.Contains(Keyword_Underlay)) // Generates GC + { + if (material.HasProperty(ID_ScaleRatio_C)) + scaleRatio_C = material.GetFloat(ID_ScaleRatio_C); + + float offsetX = material.GetFloat(ID_UnderlayOffsetX) * scaleRatio_C; + float offsetY = material.GetFloat(ID_UnderlayOffsetY) * scaleRatio_C; + float dilate = material.GetFloat(ID_UnderlayDilate) * scaleRatio_C; + float softness = material.GetFloat(ID_UnderlaySoftness) * scaleRatio_C; + + padding.x = Mathf.Max(padding.x, faceDilate + dilate + softness - offsetX); + padding.y = Mathf.Max(padding.y, faceDilate + dilate + softness - offsetY); + padding.z = Mathf.Max(padding.z, faceDilate + dilate + softness + offsetX); + padding.w = Mathf.Max(padding.w, faceDilate + dilate + softness + offsetY); + } + + padding.x = Mathf.Max(padding.x, uniformPadding); + padding.y = Mathf.Max(padding.y, uniformPadding); + padding.z = Mathf.Max(padding.z, uniformPadding); + padding.w = Mathf.Max(padding.w, uniformPadding); + + padding.x += extraPadding; + padding.y += extraPadding; + padding.z += extraPadding; + padding.w += extraPadding; + + padding.x = Mathf.Min(padding.x, 1); + padding.y = Mathf.Min(padding.y, 1); + padding.z = Mathf.Min(padding.z, 1); + padding.w = Mathf.Min(padding.w, 1); + + maxPadding.x = maxPadding.x < padding.x ? padding.x : maxPadding.x; + maxPadding.y = maxPadding.y < padding.y ? padding.y : maxPadding.y; + maxPadding.z = maxPadding.z < padding.z ? padding.z : maxPadding.z; + maxPadding.w = maxPadding.w < padding.w ? padding.w : maxPadding.w; + + float gradientScale = material.GetFloat(ID_GradientScale); + padding *= gradientScale; + + // Set UniformPadding to the maximum value of any of its components. + uniformPadding = Mathf.Max(padding.x, padding.y); + uniformPadding = Mathf.Max(padding.z, uniformPadding); + uniformPadding = Mathf.Max(padding.w, uniformPadding); + + return uniformPadding + 1.25f; + } + + + + + // Function to determine how much extra padding is required as a result of material properties like dilate, outline thickness, softness, glow, etc... + public static float GetPadding(Material[] materials, bool enableExtraPadding, bool isBold) + { + //Debug.Log("GetPadding() called."); + + if (isInitialized == false) + GetShaderPropertyIDs(); + + // Return if Material is null + if (materials == null) return 0; + + int extraPadding = enableExtraPadding ? 4 : 0; + + // Check if we are using a Bitmap Shader + if (materials[0].HasProperty(ID_Padding)) + return extraPadding + materials[0].GetFloat(ID_Padding); + + Vector4 padding = Vector4.zero; + Vector4 maxPadding = Vector4.zero; + + float faceDilate = 0; + float faceSoftness = 0; + float outlineThickness = 0; + float scaleRatio_A = 0; + float scaleRatio_B = 0; + float scaleRatio_C = 0; + + float glowOffset = 0; + float glowOuter = 0; + + float uniformPadding = 0; + // Iterate through each of the assigned materials to find the max values to set the padding. + for (int i = 0; i < materials.Length; i++) + { + // Update Shader Ratios prior to computing padding + ShaderUtilities.UpdateShaderRatios(materials[i]); + + string[] shaderKeywords = materials[i].shaderKeywords; + + if (materials[i].HasProperty(ShaderUtilities.ID_ScaleRatio_A)) + scaleRatio_A = materials[i].GetFloat(ShaderUtilities.ID_ScaleRatio_A); + + if (materials[i].HasProperty(ShaderUtilities.ID_FaceDilate)) + faceDilate = materials[i].GetFloat(ShaderUtilities.ID_FaceDilate) * scaleRatio_A; + + if (materials[i].HasProperty(ShaderUtilities.ID_OutlineSoftness)) + faceSoftness = materials[i].GetFloat(ShaderUtilities.ID_OutlineSoftness) * scaleRatio_A; + + if (materials[i].HasProperty(ShaderUtilities.ID_OutlineWidth)) + outlineThickness = materials[i].GetFloat(ShaderUtilities.ID_OutlineWidth) * scaleRatio_A; + + uniformPadding = outlineThickness + faceSoftness + faceDilate; + + // Glow padding contribution + if (materials[i].HasProperty(ShaderUtilities.ID_GlowOffset) && shaderKeywords.Contains(ShaderUtilities.Keyword_Glow)) + { + if (materials[i].HasProperty(ShaderUtilities.ID_ScaleRatio_B)) + scaleRatio_B = materials[i].GetFloat(ShaderUtilities.ID_ScaleRatio_B); + + glowOffset = materials[i].GetFloat(ShaderUtilities.ID_GlowOffset) * scaleRatio_B; + glowOuter = materials[i].GetFloat(ShaderUtilities.ID_GlowOuter) * scaleRatio_B; + } + + uniformPadding = Mathf.Max(uniformPadding, faceDilate + glowOffset + glowOuter); + + // Underlay padding contribution + if (materials[i].HasProperty(ShaderUtilities.ID_UnderlaySoftness) && shaderKeywords.Contains(ShaderUtilities.Keyword_Underlay)) + { + if (materials[i].HasProperty(ShaderUtilities.ID_ScaleRatio_C)) + scaleRatio_C = materials[i].GetFloat(ShaderUtilities.ID_ScaleRatio_C); + + float offsetX = materials[i].GetFloat(ShaderUtilities.ID_UnderlayOffsetX) * scaleRatio_C; + float offsetY = materials[i].GetFloat(ShaderUtilities.ID_UnderlayOffsetY) * scaleRatio_C; + float dilate = materials[i].GetFloat(ShaderUtilities.ID_UnderlayDilate) * scaleRatio_C; + float softness = materials[i].GetFloat(ShaderUtilities.ID_UnderlaySoftness) * scaleRatio_C; + + padding.x = Mathf.Max(padding.x, faceDilate + dilate + softness - offsetX); + padding.y = Mathf.Max(padding.y, faceDilate + dilate + softness - offsetY); + padding.z = Mathf.Max(padding.z, faceDilate + dilate + softness + offsetX); + padding.w = Mathf.Max(padding.w, faceDilate + dilate + softness + offsetY); + } + + padding.x = Mathf.Max(padding.x, uniformPadding); + padding.y = Mathf.Max(padding.y, uniformPadding); + padding.z = Mathf.Max(padding.z, uniformPadding); + padding.w = Mathf.Max(padding.w, uniformPadding); + + padding.x += extraPadding; + padding.y += extraPadding; + padding.z += extraPadding; + padding.w += extraPadding; + + padding.x = Mathf.Min(padding.x, 1); + padding.y = Mathf.Min(padding.y, 1); + padding.z = Mathf.Min(padding.z, 1); + padding.w = Mathf.Min(padding.w, 1); + + maxPadding.x = maxPadding.x < padding.x ? padding.x : maxPadding.x; + maxPadding.y = maxPadding.y < padding.y ? padding.y : maxPadding.y; + maxPadding.z = maxPadding.z < padding.z ? padding.z : maxPadding.z; + maxPadding.w = maxPadding.w < padding.w ? padding.w : maxPadding.w; + + } + + float gradientScale = materials[0].GetFloat(ShaderUtilities.ID_GradientScale); + padding *= gradientScale; + + // Set UniformPadding to the maximum value of any of its components. + uniformPadding = Mathf.Max(padding.x, padding.y); + uniformPadding = Mathf.Max(padding.z, uniformPadding); + uniformPadding = Mathf.Max(padding.w, uniformPadding); + + return uniformPadding + 0.25f; + } + + + } + +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ShaderUtilities.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ShaderUtilities.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..a16b9630a97c16a2e9ed634bdac0b99a1075b577 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_ShaderUtilities.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: fea49a0730244a98bf1087f7ca9410a8 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Sprite.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Sprite.cs new file mode 100644 index 0000000000000000000000000000000000000000..0d118e997768c75befddec94ddc7585e49dfe9a0 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Sprite.cs @@ -0,0 +1,31 @@ +using UnityEngine; +using System; +using System.Collections; +using System.Collections.Generic; + + +namespace TMPro +{ + + // Class which contains the Sprite Info for each sprite contained in the sprite asset. + [Serializable] + public class TMP_Sprite : TMP_TextElement_Legacy + { + //public int fileID; + //public int id; + public string name; + public int hashCode; + public int unicode; + //public float x; + //public float y; + //public float width; + //public float height; + public Vector2 pivot; + //public float xOffset; // Pivot X + //public float yOffset; // Pivot Y + //public float xAdvance; + //public float scale; + + public Sprite sprite; + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Sprite.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Sprite.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..c3a9106aef1d5508aac32c4adc8a1491d2a2199f --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Sprite.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 968a09f153574430a6e15ae975145768 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteAnimator.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteAnimator.cs new file mode 100644 index 0000000000000000000000000000000000000000..87703cfa9964c27a8d43ecbf7f6a9b71d6cf5b26 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteAnimator.cs @@ -0,0 +1,149 @@ +using UnityEngine; +using UnityEngine.TextCore; +using System.Collections; +using System.Collections.Generic; + +namespace TMPro +{ + [DisallowMultipleComponent] + public class TMP_SpriteAnimator : MonoBehaviour + { + private Dictionary<int, bool> m_animations = new Dictionary<int, bool>(16); + //private bool isPlaying = false; + + private TMP_Text m_TextComponent; + + + void Awake() + { + m_TextComponent = GetComponent<TMP_Text>(); + } + + + + + void OnEnable() + { + //m_playAnimations = true; + } + + + void OnDisable() + { + //m_playAnimations = false; + } + + + public void StopAllAnimations() + { + StopAllCoroutines(); + m_animations.Clear(); + } + + + + public void DoSpriteAnimation(int currentCharacter, TMP_SpriteAsset spriteAsset, int start, int end, int framerate) + { + bool isPlaying; + + // Need to add tracking of coroutines that have been lunched for this text object. + if (!m_animations.TryGetValue(currentCharacter, out isPlaying)) + { + StartCoroutine(DoSpriteAnimationInternal(currentCharacter, spriteAsset, start, end, framerate)); + m_animations.Add(currentCharacter, true); + } + } + + + IEnumerator DoSpriteAnimationInternal(int currentCharacter, TMP_SpriteAsset spriteAsset, int start, int end, int framerate) + { + if (m_TextComponent == null) yield break; + + // We yield otherwise this gets called before the sprite has rendered. + yield return null; + + int currentFrame = start; + + // Make sure end frame does not exceed the number of sprites in the sprite asset. + if (end > spriteAsset.spriteCharacterTable.Count) + end = spriteAsset.spriteCharacterTable.Count - 1; + + // Get a reference to the geometry of the current character. + TMP_CharacterInfo charInfo = m_TextComponent.textInfo.characterInfo[currentCharacter]; + + int materialIndex = charInfo.materialReferenceIndex; + int vertexIndex = charInfo.vertexIndex; + + TMP_MeshInfo meshInfo = m_TextComponent.textInfo.meshInfo[materialIndex]; + + float elapsedTime = 0; + float targetTime = 1f / Mathf.Abs(framerate); + + while (true) + { + if (elapsedTime > targetTime) + { + elapsedTime = 0; + + // Get a reference to the current sprite + TMP_SpriteCharacter spriteCharacter = spriteAsset.spriteCharacterTable[currentFrame]; + + // Update the vertices for the new sprite + Vector3[] vertices = meshInfo.vertices; + + Vector2 origin = new Vector2(charInfo.origin, charInfo.baseLine); + float spriteScale = charInfo.fontAsset.faceInfo.ascentLine / spriteCharacter.glyph.metrics.height * spriteCharacter.scale * charInfo.scale; + + Vector3 bl = new Vector3(origin.x + spriteCharacter.glyph.metrics.horizontalBearingX * spriteScale, origin.y + (spriteCharacter.glyph.metrics.horizontalBearingY - spriteCharacter.glyph.metrics.height) * spriteScale); + Vector3 tl = new Vector3(bl.x, origin.y + spriteCharacter.glyph.metrics.horizontalBearingY * spriteScale); + Vector3 tr = new Vector3(origin.x + (spriteCharacter.glyph.metrics.horizontalBearingX + spriteCharacter.glyph.metrics.width) * spriteScale, tl.y); + Vector3 br = new Vector3(tr.x, bl.y); + + vertices[vertexIndex + 0] = bl; + vertices[vertexIndex + 1] = tl; + vertices[vertexIndex + 2] = tr; + vertices[vertexIndex + 3] = br; + + // Update the UV to point to the new sprite + Vector2[] uvs0 = meshInfo.uvs0; + + Vector2 uv0 = new Vector2((float)spriteCharacter.glyph.glyphRect.x / spriteAsset.spriteSheet.width, (float)spriteCharacter.glyph.glyphRect.y / spriteAsset.spriteSheet.height); + Vector2 uv1 = new Vector2(uv0.x, (float)(spriteCharacter.glyph.glyphRect.y + spriteCharacter.glyph.glyphRect.height) / spriteAsset.spriteSheet.height); + Vector2 uv2 = new Vector2((float)(spriteCharacter.glyph.glyphRect.x + spriteCharacter.glyph.glyphRect.width) / spriteAsset.spriteSheet.width, uv1.y); + Vector2 uv3 = new Vector2(uv2.x, uv0.y); + + uvs0[vertexIndex + 0] = uv0; + uvs0[vertexIndex + 1] = uv1; + uvs0[vertexIndex + 2] = uv2; + uvs0[vertexIndex + 3] = uv3; + + // Update the modified vertex attributes + meshInfo.mesh.vertices = vertices; + meshInfo.mesh.uv = uvs0; + m_TextComponent.UpdateGeometry(meshInfo.mesh, materialIndex); + + + if (framerate > 0) + { + if (currentFrame < end) + currentFrame += 1; + else + currentFrame = start; + } + else + { + if (currentFrame > start) + currentFrame -= 1; + else + currentFrame = end; + } + } + + elapsedTime += Time.deltaTime; + + yield return null; + } + } + + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteAnimator.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteAnimator.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..e3cbbb484a2b9c78b3569637940c1efb83253b45 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteAnimator.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6366ee97f6b541449155028b9487355a +timeCreated: 1471590333 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteAsset.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteAsset.cs new file mode 100644 index 0000000000000000000000000000000000000000..7af0bdb1d726e3ee308146bd033a78dda61d10e9 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteAsset.cs @@ -0,0 +1,508 @@ +using UnityEngine; +using UnityEngine.TextCore; +using System.Collections.Generic; +using System.Linq; + + +namespace TMPro +{ + + public class TMP_SpriteAsset : TMP_Asset + { + internal Dictionary<uint, int> m_UnicodeLookup; + internal Dictionary<int, int> m_NameLookup; + internal Dictionary<uint, int> m_GlyphIndexLookup; + + /// <summary> + /// The version of the sprite asset class. + /// Version 1.1.0 updates the asset data structure to be compatible with new font asset structure. + /// </summary> + public string version + { + get { return m_Version; } + internal set { m_Version = value; } + } + [SerializeField] + private string m_Version; + + // The texture which contains the sprites. + public Texture spriteSheet; + + public List<TMP_SpriteCharacter> spriteCharacterTable + { + get + { + if (m_GlyphIndexLookup == null) + UpdateLookupTables(); + + return m_SpriteCharacterTable; + } + internal set { m_SpriteCharacterTable = value; } + } + [SerializeField] + private List<TMP_SpriteCharacter> m_SpriteCharacterTable = new List<TMP_SpriteCharacter>(); + + + public List<TMP_SpriteGlyph> spriteGlyphTable + { + get { return m_SpriteGlyphTable; } + internal set { m_SpriteGlyphTable = value; } + } + [SerializeField] + private List<TMP_SpriteGlyph> m_SpriteGlyphTable = new List<TMP_SpriteGlyph>(); + + // List which contains the SpriteInfo for the sprites contained in the sprite sheet. + public List<TMP_Sprite> spriteInfoList; + + /// <summary> + /// Dictionary used to lookup the index of a given sprite based on a Unicode value. + /// </summary> + //private Dictionary<int, int> m_SpriteUnicodeLookup; + + + /// <summary> + /// List which contains the Fallback font assets for this font. + /// </summary> + [SerializeField] + public List<TMP_SpriteAsset> fallbackSpriteAssets; + + internal bool m_IsSpriteAssetLookupTablesDirty = false; + + void Awake() + { + // Check version number of sprite asset to see if it needs to be upgraded. + if (this.material != null && string.IsNullOrEmpty(m_Version)) + UpgradeSpriteAsset(); + } + + + #if UNITY_EDITOR + /// <summary> + /// + /// </summary> + void OnValidate() + { + //Debug.Log("Sprite Asset [" + name + "] has changed."); + + //UpdateLookupTables(); + + //TMPro_EventManager.ON_SPRITE_ASSET_PROPERTY_CHANGED(true, this); + } + #endif + + + /// <summary> + /// Create a material for the sprite asset. + /// </summary> + /// <returns></returns> + Material GetDefaultSpriteMaterial() + { + //isEditingAsset = true; + ShaderUtilities.GetShaderPropertyIDs(); + + // Add a new material + Shader shader = Shader.Find("TextMeshPro/Sprite"); + Material tempMaterial = new Material(shader); + tempMaterial.SetTexture(ShaderUtilities.ID_MainTex, spriteSheet); + tempMaterial.hideFlags = HideFlags.HideInHierarchy; + + #if UNITY_EDITOR + UnityEditor.AssetDatabase.AddObjectToAsset(tempMaterial, this); + UnityEditor.AssetDatabase.ImportAsset(UnityEditor.AssetDatabase.GetAssetPath(this)); + #endif + //isEditingAsset = false; + + return tempMaterial; + } + + + /// <summary> + /// Function to update the sprite name and unicode lookup tables. + /// This function should be called when a sprite's name or unicode value changes or when a new sprite is added. + /// </summary> + public void UpdateLookupTables() + { + //Debug.Log("Updating [" + this.name + "] Lookup tables."); + + // Check version number of sprite asset to see if it needs to be upgraded. + if (this.material != null && string.IsNullOrEmpty(m_Version)) + UpgradeSpriteAsset(); + + // Initialize / Clear glyph index lookup dictionary. + if (m_GlyphIndexLookup == null) + m_GlyphIndexLookup = new Dictionary<uint, int>(); + else + m_GlyphIndexLookup.Clear(); + + for (int i = 0; i < m_SpriteGlyphTable.Count; i++) + { + uint glyphIndex = m_SpriteGlyphTable[i].index; + + if (m_GlyphIndexLookup.ContainsKey(glyphIndex) == false) + m_GlyphIndexLookup.Add(glyphIndex, i); + } + + if (m_NameLookup == null) + m_NameLookup = new Dictionary<int, int>(); + else + m_NameLookup.Clear(); + + if (m_UnicodeLookup == null) + m_UnicodeLookup = new Dictionary<uint, int>(); + else + m_UnicodeLookup.Clear(); + + for (int i = 0; i < m_SpriteCharacterTable.Count; i++) + { + int nameHashCode = m_SpriteCharacterTable[i].hashCode; + + if (m_NameLookup.ContainsKey(nameHashCode) == false) + m_NameLookup.Add(nameHashCode, i); + + uint unicode = m_SpriteCharacterTable[i].unicode; + + if (m_UnicodeLookup.ContainsKey(unicode) == false) + m_UnicodeLookup.Add(unicode, i); + + // Update glyph reference which is not serialized + uint glyphIndex = m_SpriteCharacterTable[i].glyphIndex; + int index; + + if (m_GlyphIndexLookup.TryGetValue(glyphIndex, out index)) + m_SpriteCharacterTable[i].glyph = m_SpriteGlyphTable[index]; + } + + m_IsSpriteAssetLookupTablesDirty = false; + } + + + /// <summary> + /// Function which returns the sprite index using the hashcode of the name + /// </summary> + /// <param name="hashCode"></param> + /// <returns></returns> + public int GetSpriteIndexFromHashcode(int hashCode) + { + if (m_NameLookup == null) + UpdateLookupTables(); + + int index; + + if (m_NameLookup.TryGetValue(hashCode, out index)) + return index; + + return -1; + } + + + /// <summary> + /// Returns the index of the sprite for the given unicode value. + /// </summary> + /// <param name="unicode"></param> + /// <returns></returns> + public int GetSpriteIndexFromUnicode (uint unicode) + { + if (m_UnicodeLookup == null) + UpdateLookupTables(); + + int index; + + if (m_UnicodeLookup.TryGetValue(unicode, out index)) + return index; + + return -1; + } + + + /// <summary> + /// Returns the index of the sprite for the given name. + /// </summary> + /// <param name="name"></param> + /// <returns></returns> + public int GetSpriteIndexFromName (string name) + { + if (m_NameLookup == null) + UpdateLookupTables(); + + int hashCode = TMP_TextUtilities.GetSimpleHashCode(name); + + return GetSpriteIndexFromHashcode(hashCode); + } + + + /// <summary> + /// Used to keep track of which Sprite Assets have been searched. + /// </summary> + private static List<int> k_searchedSpriteAssets; + + /// <summary> + /// Search through the given sprite asset and its fallbacks for the specified sprite matching the given unicode character. + /// </summary> + /// <param name="spriteAsset">The font asset to search for the given character.</param> + /// <param name="unicode">The character to find.</param> + /// <param name="glyph">out parameter containing the glyph for the specified character (if found).</param> + /// <returns></returns> + public static TMP_SpriteAsset SearchForSpriteByUnicode(TMP_SpriteAsset spriteAsset, uint unicode, bool includeFallbacks, out int spriteIndex) + { + // Check to make sure sprite asset is not null + if (spriteAsset == null) { spriteIndex = -1; return null; } + + // Get sprite index for the given unicode + spriteIndex = spriteAsset.GetSpriteIndexFromUnicode(unicode); + if (spriteIndex != -1) + return spriteAsset; + + // Initialize list to track instance of Sprite Assets that have already been searched. + if (k_searchedSpriteAssets == null) + k_searchedSpriteAssets = new List<int>(); + + k_searchedSpriteAssets.Clear(); + + // Get instance ID of sprite asset and add to list. + int id = spriteAsset.GetInstanceID(); + k_searchedSpriteAssets.Add(id); + + // Search potential fallback sprite assets if includeFallbacks is true. + if (includeFallbacks && spriteAsset.fallbackSpriteAssets != null && spriteAsset.fallbackSpriteAssets.Count > 0) + return SearchForSpriteByUnicodeInternal(spriteAsset.fallbackSpriteAssets, unicode, includeFallbacks, out spriteIndex); + + // Search default sprite asset potentially assigned in the TMP Settings. + if (includeFallbacks && TMP_Settings.defaultSpriteAsset != null) + return SearchForSpriteByUnicodeInternal(TMP_Settings.defaultSpriteAsset, unicode, includeFallbacks, out spriteIndex); + + spriteIndex = -1; + return null; + } + + + /// <summary> + /// Search through the given list of sprite assets and fallbacks for a sprite whose unicode value matches the target unicode. + /// </summary> + /// <param name="spriteAssets"></param> + /// <param name="unicode"></param> + /// <param name="includeFallbacks"></param> + /// <param name="spriteIndex"></param> + /// <returns></returns> + private static TMP_SpriteAsset SearchForSpriteByUnicodeInternal(List<TMP_SpriteAsset> spriteAssets, uint unicode, bool includeFallbacks, out int spriteIndex) + { + for (int i = 0; i < spriteAssets.Count; i++) + { + TMP_SpriteAsset temp = spriteAssets[i]; + if (temp == null) continue; + + int id = temp.GetInstanceID(); + + // Skip over the fallback sprite asset if it has already been searched. + if (k_searchedSpriteAssets.Contains(id)) continue; + + // Add to list of font assets already searched. + k_searchedSpriteAssets.Add(id); + + temp = SearchForSpriteByUnicodeInternal(temp, unicode, includeFallbacks, out spriteIndex); + + if (temp != null) + return temp; + } + + spriteIndex = -1; + return null; + } + + + /// <summary> + /// Search the given sprite asset and fallbacks for a sprite whose unicode value matches the target unicode. + /// </summary> + /// <param name="spriteAsset"></param> + /// <param name="unicode"></param> + /// <param name="includeFallbacks"></param> + /// <param name="spriteIndex"></param> + /// <returns></returns> + private static TMP_SpriteAsset SearchForSpriteByUnicodeInternal(TMP_SpriteAsset spriteAsset, uint unicode, bool includeFallbacks, out int spriteIndex) + { + // Get sprite index for the given unicode + spriteIndex = spriteAsset.GetSpriteIndexFromUnicode(unicode); + if (spriteIndex != -1) + return spriteAsset; + + if (includeFallbacks && spriteAsset.fallbackSpriteAssets != null && spriteAsset.fallbackSpriteAssets.Count > 0) + return SearchForSpriteByUnicodeInternal(spriteAsset.fallbackSpriteAssets, unicode, includeFallbacks, out spriteIndex); + + spriteIndex = -1; + return null; + } + + + /// <summary> + /// Search the given sprite asset and fallbacks for a sprite whose hash code value of its name matches the target hash code. + /// </summary> + /// <param name="spriteAsset">The Sprite Asset to search for the given sprite whose name matches the hashcode value</param> + /// <param name="hashCode">The hash code value matching the name of the sprite</param> + /// <param name="includeFallbacks">Include fallback sprite assets in the search</param> + /// <param name="spriteIndex">The index of the sprite matching the provided hash code</param> + /// <returns>The Sprite Asset that contains the sprite</returns> + public static TMP_SpriteAsset SearchForSpriteByHashCode(TMP_SpriteAsset spriteAsset, int hashCode, bool includeFallbacks, out int spriteIndex) + { + // Make sure sprite asset is not null + if (spriteAsset == null) { spriteIndex = -1; return null; } + + spriteIndex = spriteAsset.GetSpriteIndexFromHashcode(hashCode); + if (spriteIndex != -1) + return spriteAsset; + + // Initialize list to track instance of Sprite Assets that have already been searched. + if (k_searchedSpriteAssets == null) + k_searchedSpriteAssets = new List<int>(); + + k_searchedSpriteAssets.Clear(); + + int id = spriteAsset.GetInstanceID(); + // Add to list of font assets already searched. + k_searchedSpriteAssets.Add(id); + + if (includeFallbacks && spriteAsset.fallbackSpriteAssets != null && spriteAsset.fallbackSpriteAssets.Count > 0) + return SearchForSpriteByHashCodeInternal(spriteAsset.fallbackSpriteAssets, hashCode, includeFallbacks, out spriteIndex); + + // Search default sprite asset potentially assigned in the TMP Settings. + if (includeFallbacks && TMP_Settings.defaultSpriteAsset != null) + return SearchForSpriteByHashCodeInternal(TMP_Settings.defaultSpriteAsset, hashCode, includeFallbacks, out spriteIndex); + + spriteIndex = -1; + return null; + } + + + /// <summary> + /// Search through the given list of sprite assets and fallbacks for a sprite whose hash code value of its name matches the target hash code. + /// </summary> + /// <param name="spriteAssets"></param> + /// <param name="hashCode"></param> + /// <param name="searchFallbacks"></param> + /// <param name="spriteIndex"></param> + /// <returns></returns> + private static TMP_SpriteAsset SearchForSpriteByHashCodeInternal(List<TMP_SpriteAsset> spriteAssets, int hashCode, bool searchFallbacks, out int spriteIndex) + { + // Search through the list of sprite assets + for (int i = 0; i < spriteAssets.Count; i++) + { + TMP_SpriteAsset temp = spriteAssets[i]; + if (temp == null) continue; + + int id = temp.GetInstanceID(); + + // Skip over the fallback sprite asset if it has already been searched. + if (k_searchedSpriteAssets.Contains(id)) continue; + + // Add to list of font assets already searched. + k_searchedSpriteAssets.Add(id); + + temp = SearchForSpriteByHashCodeInternal(temp, hashCode, searchFallbacks, out spriteIndex); + + if (temp != null) + return temp; + } + + spriteIndex = -1; + return null; + } + + + /// <summary> + /// Search through the given sprite asset and fallbacks for a sprite whose hash code value of its name matches the target hash code. + /// </summary> + /// <param name="spriteAsset"></param> + /// <param name="hashCode"></param> + /// <param name="searchFallbacks"></param> + /// <param name="spriteIndex"></param> + /// <returns></returns> + private static TMP_SpriteAsset SearchForSpriteByHashCodeInternal(TMP_SpriteAsset spriteAsset, int hashCode, bool searchFallbacks, out int spriteIndex) + { + // Get the sprite for the given hash code. + spriteIndex = spriteAsset.GetSpriteIndexFromHashcode(hashCode); + if (spriteIndex != -1) + return spriteAsset; + + if (searchFallbacks && spriteAsset.fallbackSpriteAssets != null && spriteAsset.fallbackSpriteAssets.Count > 0) + return SearchForSpriteByHashCodeInternal(spriteAsset.fallbackSpriteAssets, hashCode, searchFallbacks, out spriteIndex); + + spriteIndex = -1; + return null; + } + + + /// <summary> + /// Sort the sprite glyph table by glyph index. + /// </summary> + public void SortGlyphTable() + { + if (m_SpriteGlyphTable == null || m_SpriteGlyphTable.Count == 0) return; + + m_SpriteGlyphTable = m_SpriteGlyphTable.OrderBy(item => item.index).ToList(); + } + + /// <summary> + /// Sort the sprite character table by Unicode values. + /// </summary> + internal void SortCharacterTable() + { + if (m_SpriteCharacterTable != null && m_SpriteCharacterTable.Count > 0) + m_SpriteCharacterTable = m_SpriteCharacterTable.OrderBy(c => c.unicode).ToList(); + } + + /// <summary> + /// Sort both sprite glyph and character tables. + /// </summary> + internal void SortGlyphAndCharacterTables() + { + SortGlyphTable(); + SortCharacterTable(); + } + + + /// <summary> + /// Internal method used to upgrade sprite asset. + /// </summary> + private void UpgradeSpriteAsset() + { + m_Version = "1.1.0"; + + Debug.Log("Upgrading sprite asset [" + this.name + "] to version " + m_Version + ".", this); + + // Convert legacy glyph and character tables to new format + m_SpriteCharacterTable.Clear(); + m_SpriteGlyphTable.Clear(); + + for (int i = 0; i < spriteInfoList.Count; i++) + { + TMP_Sprite oldSprite = spriteInfoList[i]; + + TMP_SpriteGlyph spriteGlyph = new TMP_SpriteGlyph(); + spriteGlyph.index = (uint)i; + spriteGlyph.sprite = oldSprite.sprite; + spriteGlyph.metrics = new GlyphMetrics(oldSprite.width, oldSprite.height, oldSprite.xOffset, oldSprite.yOffset, oldSprite.xAdvance); + spriteGlyph.glyphRect = new GlyphRect((int)oldSprite.x, (int)oldSprite.y, (int)oldSprite.width, (int)oldSprite.height); + + spriteGlyph.scale = 1.0f; + spriteGlyph.atlasIndex = 0; + + m_SpriteGlyphTable.Add(spriteGlyph); + + TMP_SpriteCharacter spriteCharacter = new TMP_SpriteCharacter((uint)oldSprite.unicode, spriteGlyph); + spriteCharacter.name = oldSprite.name; + spriteCharacter.scale = oldSprite.scale; + + m_SpriteCharacterTable.Add(spriteCharacter); + } + + // Clear legacy glyph info list. + //spriteInfoList.Clear(); + + UpdateLookupTables(); + + #if UNITY_EDITOR + UnityEditor.EditorUtility.SetDirty(this); + UnityEditor.AssetDatabase.SaveAssets(); + #endif + } + + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteAsset.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteAsset.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..4f9abe140529a645ca4e6bd9cb93f630151483ca --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteAsset.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 84a92b25f83d49b9bc132d206b370281 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: ec7c645d93308c04d8840982af12101e, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteAssetImportFormats.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteAssetImportFormats.cs new file mode 100644 index 0000000000000000000000000000000000000000..3968f9a319069e5650ccc36188364038558a0936 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteAssetImportFormats.cs @@ -0,0 +1,61 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; + + +namespace TMPro.SpriteAssetUtilities +{ + public enum SpriteAssetImportFormats { None = 0, TexturePacker = 0x1 }; + + public class TexturePacker + { + [System.Serializable] + public struct SpriteFrame + { + public float x; + public float y; + public float w; + public float h; + + public override string ToString() + { + string s = "x: " + x.ToString("f2") + " y: " + y.ToString("f2") + " h: " + h.ToString("f2") + " w: " + w.ToString("f2"); + return s; + } + } + + [System.Serializable] + public struct SpriteSize + { + public float w; + public float h; + + public override string ToString() + { + string s = "w: " + w.ToString("f2") + " h: " + h.ToString("f2"); + return s; + } + } + + [System.Serializable] + public struct SpriteData + { + public string filename; + public SpriteFrame frame; + public bool rotated; + public bool trimmed; + public SpriteFrame spriteSourceSize; + public SpriteSize sourceSize; + public Vector2 pivot; + + } + + [System.Serializable] + public class SpriteDataObject + { + public List<SpriteData> frames; + } + + + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteAssetImportFormats.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteAssetImportFormats.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..5e066415cef30b1e1941509474cd965e98362c07 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteAssetImportFormats.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e4e0b1de1aee400d81ed4273141e7823 +timeCreated: 1480042510 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteCharacter.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteCharacter.cs new file mode 100644 index 0000000000000000000000000000000000000000..fa9169083996f3ea9ac4a0180b781e10b36d1736 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteCharacter.cs @@ -0,0 +1,74 @@ +using System; +using UnityEngine; + +namespace TMPro +{ + /// <summary> + /// A basic element of text representing a pictograph, image, sprite or emoji. + /// </summary> + [Serializable] + public class TMP_SpriteCharacter : TMP_TextElement + { + /// <summary> + /// The name of the sprite element. + /// </summary> + public string name + { + get { return m_Name; } + set + { + if (value == m_Name) + return; + + m_Name = value; + m_HashCode = TMP_TextParsingUtilities.GetHashCodeCaseSensitive(m_Name); + } + } + + /// <summary> + /// The hashcode value which is computed from the name of the sprite element. + /// This value is read-only and updated when the name of the text sprite is changed. + /// </summary> + public int hashCode { get { return m_HashCode; } } + + + // ============================================= + // Private backing fields for public properties. + // ============================================= + + [SerializeField] + private string m_Name; + + [SerializeField] + private int m_HashCode; + + + // ******************** + // CONSTRUCTORS + // ******************** + + /// <summary> + /// Default constructor. + /// </summary> + public TMP_SpriteCharacter() + { + m_ElementType = TextElementType.Sprite; + } + + /// <summary> + /// Constructor for new sprite character. + /// </summary> + /// <param name="unicode">Unicode value of the sprite character.</param> + /// <param name="glyph">Glyph used by the sprite character.</param> + public TMP_SpriteCharacter(uint unicode, TMP_SpriteGlyph glyph) + { + m_ElementType = TextElementType.Sprite; + + this.unicode = unicode; + this.glyphIndex = glyph.index; + this.glyph = glyph; + this.scale = 1.0f; + } + + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteCharacter.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteCharacter.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..2b7c8d6668bebc96a4cfb300d406e6e744abf476 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteCharacter.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 202d758d102b6854a9710c8b93db742c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteGlyph.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteGlyph.cs new file mode 100644 index 0000000000000000000000000000000000000000..589843ab10e8faa3d0b7b99d945cb0ae8a1166b6 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteGlyph.cs @@ -0,0 +1,61 @@ +using System; +using UnityEngine; +using UnityEngine.TextCore; + +namespace TMPro +{ + /// <summary> + /// The visual representation of the sprite character using this glyph. + /// </summary> + [Serializable] + public class TMP_SpriteGlyph : Glyph + { + /// <summary> + /// An optional reference to the underlying sprite used to create this glyph. + /// </summary> + public Sprite sprite; + + + // ******************** + // CONSTRUCTORS + // ******************** + + public TMP_SpriteGlyph() { } + + /// <summary> + /// Constructor for new sprite glyph. + /// </summary> + /// <param name="index">Index of the sprite glyph.</param> + /// <param name="metrics">Metrics which define the position of the glyph in the context of text layout.</param> + /// <param name="glyphRect">GlyphRect which defines the coordinates of the glyph in the atlas texture.</param> + /// <param name="scale">Scale of the glyph.</param> + /// <param name="atlasIndex">Index of the atlas texture that contains the glyph.</param> + public TMP_SpriteGlyph(uint index, GlyphMetrics metrics, GlyphRect glyphRect, float scale, int atlasIndex) + { + this.index = index; + this.metrics = metrics; + this.glyphRect = glyphRect; + this.scale = scale; + this.atlasIndex = atlasIndex; + } + + /// <summary> + /// Constructor for new sprite glyph. + /// </summary> + /// <param name="index">>Index of the sprite glyph.</param> + /// <param name="metrics">Metrics which define the position of the glyph in the context of text layout.</param> + /// <param name="glyphRect">GlyphRect which defines the coordinates of the glyph in the atlas texture.</param> + /// <param name="scale">Scale of the glyph.</param> + /// <param name="atlasIndex">Index of the atlas texture that contains the glyph.</param> + /// <param name="sprite">A reference to the Unity Sprite representing this sprite glyph.</param> + public TMP_SpriteGlyph(uint index, GlyphMetrics metrics, GlyphRect glyphRect, float scale, int atlasIndex, Sprite sprite) + { + this.index = index; + this.metrics = metrics; + this.glyphRect = glyphRect; + this.scale = scale; + this.atlasIndex = atlasIndex; + this.sprite = sprite; + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteGlyph.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteGlyph.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..386ebb54bea83d8f8c22c17f9d3f538d0d11438b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SpriteGlyph.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 5b5c6a576605b3c4aab7d27193785f27 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Style.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Style.cs new file mode 100644 index 0000000000000000000000000000000000000000..7ce5a0739f1d6fcdf9f3ec67b928395dc5af54c8 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Style.cs @@ -0,0 +1,95 @@ +using UnityEngine; +using System.Collections; + +#pragma warning disable 0649 // Disabled warnings. + +namespace TMPro +{ + + [System.Serializable] + public class TMP_Style + { + // PUBLIC PROPERTIES + + /// <summary> + /// The name identifying this style. ex. <style="name">. + /// </summary> + public string name + { get { return m_Name; } set { if (value != m_Name) m_Name = value; } } + + /// <summary> + /// The hash code corresponding to the name of this style. + /// </summary> + public int hashCode + { get { return m_HashCode; } set { if (value != m_HashCode) m_HashCode = value; } } + + /// <summary> + /// The initial definition of the style. ex. <b> <u>. + /// </summary> + public string styleOpeningDefinition + { get { return m_OpeningDefinition; } } + + /// <summary> + /// The closing definition of the style. ex. </b> </u>. + /// </summary> + public string styleClosingDefinition + { get { return m_ClosingDefinition; } } + + + public int[] styleOpeningTagArray + { get { return m_OpeningTagArray; } } + + + public int[] styleClosingTagArray + { get { return m_ClosingTagArray; } } + + + // PRIVATE FIELDS + [SerializeField] + private string m_Name; + + [SerializeField] + private int m_HashCode; + + [SerializeField] + private string m_OpeningDefinition; + + [SerializeField] + private string m_ClosingDefinition; + + [SerializeField] + private int[] m_OpeningTagArray; + + [SerializeField] + private int[] m_ClosingTagArray; + + + //public TMP_Style() + //{ + //Debug.Log("New Style with Name: " + m_Name + " was created. ID: "); + //} + + + /// <summary> + /// Function to update the content of the int[] resulting from changes to OpeningDefinition & ClosingDefinition. + /// </summary> + public void RefreshStyle() + { + m_HashCode = TMP_TextUtilities.GetSimpleHashCode(m_Name); + + m_OpeningTagArray = new int[m_OpeningDefinition.Length]; + for (int i = 0; i < m_OpeningDefinition.Length; i++) + m_OpeningTagArray[i] = m_OpeningDefinition[i]; + + m_ClosingTagArray = new int[m_ClosingDefinition.Length]; + for (int i = 0; i < m_ClosingDefinition.Length; i++) + m_ClosingTagArray[i] = m_ClosingDefinition[i]; + +#if UNITY_EDITOR + // Event to update objects when styles are changed in the editor. + TMPro_EventManager.ON_TEXT_STYLE_PROPERTY_CHANGED(true); +#endif + } + + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Style.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Style.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..9c025a95bfd3a26766d6fc4cfff845d12ae62dc5 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Style.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 30bed781e402439ab8ce4e3357708115 +timeCreated: 1432681409 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_StyleSheet.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_StyleSheet.cs new file mode 100644 index 0000000000000000000000000000000000000000..e9040308219ab10be6c32a49b3f11e8d933997b6 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_StyleSheet.cs @@ -0,0 +1,133 @@ +using UnityEngine; +using System; +using System.Collections.Generic; + + +namespace TMPro +{ + + [Serializable] + public class TMP_StyleSheet : ScriptableObject + { + private static TMP_StyleSheet s_Instance; + + [SerializeField] + private List<TMP_Style> m_StyleList = new List<TMP_Style>(1); + private Dictionary<int, TMP_Style> m_StyleDictionary = new Dictionary<int, TMP_Style>(); + + + /// <summary> + /// Get a singleton instance of the TMP_StyleSheet + /// </summary> + public static TMP_StyleSheet instance + { + get + { + if (s_Instance == null) + { + s_Instance = TMP_Settings.defaultStyleSheet; + + if (s_Instance == null) + s_Instance = Resources.Load<TMP_StyleSheet>("Style Sheets/Default Style Sheet"); + + if (s_Instance == null) return null; + + // Load the style dictionary. + s_Instance.LoadStyleDictionaryInternal(); + } + + return s_Instance; + } + } + + + /// <summary> + /// Static Function to load the Default Style Sheet. + /// </summary> + /// <returns></returns> + public static TMP_StyleSheet LoadDefaultStyleSheet() + { + return instance; + } + + + /// <summary> + /// Function to retrieve the Style matching the HashCode. + /// </summary> + /// <param name="hashCode"></param> + /// <returns></returns> + public static TMP_Style GetStyle(int hashCode) + { + return instance.GetStyleInternal(hashCode); + } + + + /// <summary> + /// Internal method to retrieve the Style matching the Hashcode. + /// </summary> + /// <param name="hashCode"></param> + /// <returns></returns> + private TMP_Style GetStyleInternal(int hashCode) + { + TMP_Style style; + + if (m_StyleDictionary.TryGetValue(hashCode, out style)) + { + return style; + } + + return null; + } + + + public void UpdateStyleDictionaryKey(int old_key, int new_key) + { + if (m_StyleDictionary.ContainsKey(old_key)) + { + TMP_Style style = m_StyleDictionary[old_key]; + m_StyleDictionary.Add(new_key, style); + m_StyleDictionary.Remove(old_key); + } + } + + + /// <summary> + /// Function to update the internal reference to a newly assigned style sheet in the TMP Settings. + /// </summary> + public static void UpdateStyleSheet() + { + // Reset instance + s_Instance = null; + + RefreshStyles(); + } + + + /// <summary> + /// Function to refresh the Style Dictionary. + /// </summary> + public static void RefreshStyles() + { + instance.LoadStyleDictionaryInternal(); + } + + + /// <summary> + /// + /// </summary> + private void LoadStyleDictionaryInternal() + { + m_StyleDictionary.Clear(); + + // Read Styles from style list and store them into dictionary for faster access. + for (int i = 0; i < m_StyleList.Count; i++) + { + m_StyleList[i].RefreshStyle(); + + if (!m_StyleDictionary.ContainsKey(m_StyleList[i].hashCode)) + m_StyleDictionary.Add(m_StyleList[i].hashCode, m_StyleList[i]); + } + } + } + +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_StyleSheet.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_StyleSheet.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..412dff874059b112badfdc3e7cf161fd0cd1ab12 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_StyleSheet.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: ab2114bdc8544297b417dfefe9f1e410 +timeCreated: 1436650317 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: + - StyleSheet: {fileID: 11400000, guid: cab1ac28c8e6be24e995befe0c36d7c1, type: 2} + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SubMesh.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SubMesh.cs new file mode 100644 index 0000000000000000000000000000000000000000..2b31f57c10e53ac3bf0c36e3000dd4963442d7ad --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SubMesh.cs @@ -0,0 +1,580 @@ +using UnityEngine; +using System; +using System.Collections; + +#pragma warning disable 0109 // Disable warning due to conflict between Unity Editor DLL and Runtime DLL related to .renderer property being available in one but not the other. + +namespace TMPro +{ + [RequireComponent(typeof(MeshRenderer))] + [RequireComponent(typeof(MeshFilter))] + [ExecuteAlways] + public class TMP_SubMesh : MonoBehaviour + { + /// <summary> + /// The TMP Font Asset assigned to this sub text object. + /// </summary> + public TMP_FontAsset fontAsset + { + get { return m_fontAsset; } + set { m_fontAsset = value; } + } + [SerializeField] + private TMP_FontAsset m_fontAsset; + + + /// <summary> + /// The TMP Sprite Asset assigned to this sub text object. + /// </summary> + public TMP_SpriteAsset spriteAsset + { + get { return m_spriteAsset; } + set { m_spriteAsset = value; } + } + [SerializeField] + private TMP_SpriteAsset m_spriteAsset; + + + /// <summary> + /// The material to be assigned to this object. Returns an instance of the material. + /// </summary> + public Material material + { + // Return a new Instance of the Material if none exists. Otherwise return the current Material Instance. + get { return GetMaterial(m_sharedMaterial); } + + // Assign new font material + set + { + if (m_sharedMaterial.GetInstanceID() == value.GetInstanceID()) + return; + + m_sharedMaterial = m_material = value; + + m_padding = GetPaddingForMaterial(); + + SetVerticesDirty(); + SetMaterialDirty(); + } + } + [SerializeField] + private Material m_material; + + + /// <summary> + /// The material to be assigned to this text object. + /// </summary> + public Material sharedMaterial + { + get { return m_sharedMaterial; } + set { SetSharedMaterial(value); } + } + [SerializeField] + private Material m_sharedMaterial; + + + /// <summary> + /// The fallback material created from the properties of the fallback source material. + /// </summary> + public Material fallbackMaterial + { + get { return m_fallbackMaterial; } + set + { + if (m_fallbackMaterial == value) return; + + if (m_fallbackMaterial != null && m_fallbackMaterial != value) + TMP_MaterialManager.ReleaseFallbackMaterial(m_fallbackMaterial); + + m_fallbackMaterial = value; + TMP_MaterialManager.AddFallbackMaterialReference(m_fallbackMaterial); + + SetSharedMaterial(m_fallbackMaterial); + } + } + private Material m_fallbackMaterial; + + + /// <summary> + /// The source material used by the fallback font + /// </summary> + public Material fallbackSourceMaterial + { + get { return m_fallbackSourceMaterial; } + set { m_fallbackSourceMaterial = value; } + } + private Material m_fallbackSourceMaterial; + + + /// <summary> + /// Is the text object using the default font asset material. + /// </summary> + public bool isDefaultMaterial + { + get { return m_isDefaultMaterial; } + set { m_isDefaultMaterial = value; } + } + [SerializeField] + private bool m_isDefaultMaterial; + + + /// <summary> + /// Padding value resulting for the property settings on the material. + /// </summary> + public float padding + { + get { return m_padding; } + set { m_padding = value; } + } + [SerializeField] + private float m_padding; + + + /// <summary> + /// The Mesh Renderer of this text sub object. + /// </summary> + public new Renderer renderer + { + get { if (m_renderer == null) m_renderer = GetComponent<Renderer>(); + + return m_renderer; + } + } + [SerializeField] + private Renderer m_renderer; + + + /// <summary> + /// The MeshFilter of this text sub object. + /// </summary> + public MeshFilter meshFilter + { + get { if (m_meshFilter == null) m_meshFilter = GetComponent<MeshFilter>(); + return m_meshFilter; + } + } + [SerializeField] + private MeshFilter m_meshFilter; + + + /// <summary> + /// The Mesh of this text sub object. + /// </summary> + public Mesh mesh + { + get + { + if (m_mesh == null) + { + m_mesh = new Mesh(); + m_mesh.hideFlags = HideFlags.HideAndDontSave; + this.meshFilter.mesh = m_mesh; + } + + return m_mesh; + } + set { m_mesh = value; } + } + private Mesh m_mesh; + + /// <summary> + /// + /// </summary> + //public BoxCollider boxCollider + //{ + // get + // { + // if (m_boxCollider == null) + // { + // // + // m_boxCollider = GetComponent<BoxCollider>(); + // if (m_boxCollider == null) + // { + // m_boxCollider = gameObject.AddComponent<BoxCollider>(); + // gameObject.AddComponent<Rigidbody>(); + // } + // } + + // return m_boxCollider; + // } + //} + //[SerializeField] + //private BoxCollider m_boxCollider; + + [SerializeField] + private TextMeshPro m_TextComponent; + + [NonSerialized] + private bool m_isRegisteredForEvents; + + + void OnEnable() + { + // Register Callbacks for various events. + if (!m_isRegisteredForEvents) + { + #if UNITY_EDITOR + TMPro_EventManager.MATERIAL_PROPERTY_EVENT.Add(ON_MATERIAL_PROPERTY_CHANGED); + TMPro_EventManager.FONT_PROPERTY_EVENT.Add(ON_FONT_PROPERTY_CHANGED); + //TMPro_EventManager.TEXTMESHPRO_PROPERTY_EVENT.Add(ON_TEXTMESHPRO_PROPERTY_CHANGED); + TMPro_EventManager.DRAG_AND_DROP_MATERIAL_EVENT.Add(ON_DRAG_AND_DROP_MATERIAL); + //TMPro_EventManager.TEXT_STYLE_PROPERTY_EVENT.Add(ON_TEXT_STYLE_CHANGED); + TMPro_EventManager.SPRITE_ASSET_PROPERTY_EVENT.Add(ON_SPRITE_ASSET_PROPERTY_CHANGED); + //TMPro_EventManager.TMP_SETTINGS_PROPERTY_EVENT.Add(ON_TMP_SETTINGS_CHANGED); + #endif + + m_isRegisteredForEvents = true; + } + + // Make the geometry visible when the object is enabled. + meshFilter.sharedMesh = mesh; + + // Update _ClipRect values + if (m_sharedMaterial != null) + m_sharedMaterial.SetVector(ShaderUtilities.ID_ClipRect, new Vector4(-32767, -32767, 32767, 32767)); + } + + + void OnDisable() + { + // Hide the geometry when the object is disabled. + m_meshFilter.sharedMesh = null; + + if (m_fallbackMaterial != null) + { + TMP_MaterialManager.ReleaseFallbackMaterial(m_fallbackMaterial); + m_fallbackMaterial = null; + } + + + } + + + void OnDestroy() + { + // Destroy Mesh + if (m_mesh != null) DestroyImmediate(m_mesh); + + if (m_fallbackMaterial != null) + { + TMP_MaterialManager.ReleaseFallbackMaterial(m_fallbackMaterial); + m_fallbackMaterial = null; + } + + #if UNITY_EDITOR + // Unregister the event this object was listening to + TMPro_EventManager.MATERIAL_PROPERTY_EVENT.Remove(ON_MATERIAL_PROPERTY_CHANGED); + TMPro_EventManager.FONT_PROPERTY_EVENT.Remove(ON_FONT_PROPERTY_CHANGED); + //TMPro_EventManager.TEXTMESHPRO_PROPERTY_EVENT.Remove(ON_TEXTMESHPRO_PROPERTY_CHANGED); + TMPro_EventManager.DRAG_AND_DROP_MATERIAL_EVENT.Remove(ON_DRAG_AND_DROP_MATERIAL); + //TMPro_EventManager.TEXT_STYLE_PROPERTY_EVENT.Remove(ON_TEXT_STYLE_CHANGED); + TMPro_EventManager.SPRITE_ASSET_PROPERTY_EVENT.Remove(ON_SPRITE_ASSET_PROPERTY_CHANGED); + //TMPro_EventManager.TMP_SETTINGS_PROPERTY_EVENT.Remove(ON_TMP_SETTINGS_CHANGED); + #endif + m_isRegisteredForEvents = false; + } + + + + #if UNITY_EDITOR + // Event received when custom material editor properties are changed. + void ON_MATERIAL_PROPERTY_CHANGED(bool isChanged, Material mat) + { + //Debug.Log("*** ON_MATERIAL_PROPERTY_CHANGED ***"); + int targetMaterialID = mat.GetInstanceID(); + int sharedMaterialID = m_sharedMaterial.GetInstanceID(); + int fallbackSourceMaterialID = m_fallbackSourceMaterial == null ? 0 : m_fallbackSourceMaterial.GetInstanceID(); + + // Filter events and return if the affected material is not this object's material. + if (targetMaterialID != sharedMaterialID) + { + // Check if event applies to the source fallback material + if (m_fallbackMaterial != null && fallbackSourceMaterialID == targetMaterialID) + TMP_MaterialManager.CopyMaterialPresetProperties(mat, m_fallbackMaterial); + else + return; + } + + if (m_TextComponent == null) m_TextComponent = GetComponentInParent<TextMeshPro>(); + + m_padding = GetPaddingForMaterial(); + + m_TextComponent.havePropertiesChanged = true; + m_TextComponent.SetVerticesDirty(); + } + + + // Event to Track Material Changed resulting from Drag-n-drop. + void ON_DRAG_AND_DROP_MATERIAL(GameObject obj, Material currentMaterial, Material newMaterial) + { + // Check if event applies to this current object + #if UNITY_2018_2_OR_NEWER + if (obj == gameObject || UnityEditor.PrefabUtility.GetCorrespondingObjectFromSource(gameObject) == obj) + #else + if (obj == gameObject || UnityEditor.PrefabUtility.GetPrefabParent(gameObject) == obj) + #endif + { + if (!m_isDefaultMaterial) return; + + // Make sure we have a valid reference to the renderer. + if (m_renderer == null) m_renderer = GetComponent<Renderer>(); + + UnityEditor.Undo.RecordObject(this, "Material Assignment"); + UnityEditor.Undo.RecordObject(m_renderer, "Material Assignment"); + + SetSharedMaterial(newMaterial); + m_TextComponent.havePropertiesChanged = true; + } + } + + + // Event received when font asset properties are changed in Font Inspector + void ON_SPRITE_ASSET_PROPERTY_CHANGED(bool isChanged, UnityEngine.Object obj) + { + //if (spriteSheet != null && (obj as TMP_SpriteAsset == m_spriteAsset || obj as Texture2D == m_spriteAsset.spriteSheet)) + //{ + if (m_TextComponent != null) + { + m_TextComponent.havePropertiesChanged = true; + //m_TextComponent.SetVerticesDirty(); + } + + //} + } + + // Event received when font asset properties are changed in Font Inspector + void ON_FONT_PROPERTY_CHANGED(bool isChanged, TMP_FontAsset font) + { + if (m_fontAsset != null && font.GetInstanceID() == m_fontAsset.GetInstanceID()) + { + // Copy Normal and Bold Weight + if (m_fallbackMaterial != null) + { + m_fallbackMaterial.SetFloat(ShaderUtilities.ID_WeightNormal, m_fontAsset.normalStyle); + m_fallbackMaterial.SetFloat(ShaderUtilities.ID_WeightBold, m_fontAsset.boldStyle); + } + } + } + + /// <summary> + /// Event received when the TMP Settings are changed. + /// </summary> + void ON_TMP_SETTINGS_CHANGED() + { + // //Debug.Log("TMP Setting have changed."); + // //SetVerticesDirty(); + // SetMaterialDirty(); + } + #endif + + + + public static TMP_SubMesh AddSubTextObject(TextMeshPro textComponent, MaterialReference materialReference) + { + GameObject go = new GameObject("TMP SubMesh [" + materialReference.material.name + "]", typeof(TMP_SubMesh)); + + TMP_SubMesh subMesh = go.GetComponent<TMP_SubMesh>(); + + go.transform.SetParent(textComponent.transform, false); + go.transform.localPosition = Vector3.zero; + go.transform.localRotation = Quaternion.identity; + go.transform.localScale = Vector3.one; + go.layer = textComponent.gameObject.layer; + + subMesh.m_meshFilter = go.GetComponent<MeshFilter>(); + + subMesh.m_TextComponent = textComponent; + subMesh.m_fontAsset = materialReference.fontAsset; + subMesh.m_spriteAsset = materialReference.spriteAsset; + subMesh.m_isDefaultMaterial = materialReference.isDefaultMaterial; + subMesh.SetSharedMaterial(materialReference.material); + + subMesh.renderer.sortingLayerID = textComponent.renderer.sortingLayerID; + subMesh.renderer.sortingOrder = textComponent.renderer.sortingOrder; + + return subMesh; + } + + + public void DestroySelf() + { + Destroy(this.gameObject, 1f); + } + + // Function called internally when a new material is assigned via the fontMaterial property. + Material GetMaterial(Material mat) + { + // Check in case Object is disabled. If so, we don't have a valid reference to the Renderer. + // This can occur when the Duplicate Material Context menu is used on an inactive object. + if (m_renderer == null) + m_renderer = GetComponent<Renderer>(); + + // Create Instance Material only if the new material is not the same instance previously used. + if (m_material == null || m_material.GetInstanceID() != mat.GetInstanceID()) + m_material = CreateMaterialInstance(mat); + + m_sharedMaterial = m_material; + + // Compute and Set new padding values for this new material. + m_padding = GetPaddingForMaterial(); + + SetVerticesDirty(); + SetMaterialDirty(); + + return m_sharedMaterial; + } + + + /// <summary> + /// Method used to create an instance of the material + /// </summary> + /// <param name="source"></param> + /// <returns></returns> + Material CreateMaterialInstance(Material source) + { + Material mat = new Material(source); + mat.shaderKeywords = source.shaderKeywords; + mat.name += " (Instance)"; + + return mat; + } + + + /// <summary> + /// Method returning the shared material assigned to the text object. + /// </summary> + /// <returns></returns> + Material GetSharedMaterial() + { + if (m_renderer == null) + m_renderer = GetComponent<Renderer>(); + + return m_renderer.sharedMaterial; + } + + + /// <summary> + /// Method to set the shared material. + /// </summary> + /// <param name="mat"></param> + void SetSharedMaterial(Material mat) + { + //Debug.Log("*** SetSharedMaterial() *** FRAME (" + Time.frameCount + ")"); + + // Assign new material. + m_sharedMaterial = mat; + + // Compute and Set new padding values for this new material. + m_padding = GetPaddingForMaterial(); + + SetMaterialDirty(); + + #if UNITY_EDITOR + if (m_sharedMaterial != null) + gameObject.name = "TMP SubMesh [" + m_sharedMaterial.name + "]"; + #endif + } + + + /// <summary> + /// Function called when the padding value for the material needs to be re-calculated. + /// </summary> + /// <returns></returns> + public float GetPaddingForMaterial() + { + float padding = ShaderUtilities.GetPadding(m_sharedMaterial, m_TextComponent.extraPadding, m_TextComponent.isUsingBold); + + return padding; + } + + + /// <summary> + /// Function to update the padding values of the object. + /// </summary> + /// <param name="isExtraPadding"></param> + /// <param name="isBold"></param> + public void UpdateMeshPadding(bool isExtraPadding, bool isUsingBold) + { + m_padding = ShaderUtilities.GetPadding(m_sharedMaterial, isExtraPadding, isUsingBold); + } + + + /// <summary> + /// + /// </summary> + public void SetVerticesDirty() + { + if (!this.enabled) + return; + + // This is called on the parent TextMeshPro component. + if (m_TextComponent != null) + { + m_TextComponent.havePropertiesChanged = true; + m_TextComponent.SetVerticesDirty(); + } + } + + + /// <summary> + /// + /// </summary> + public void SetMaterialDirty() + { + //if (!this.enabled) + // return; + + UpdateMaterial(); + + //m_materialDirty = true; + //TMP_UpdateRegistry.RegisterCanvasElementForGraphicRebuild((ICanvasElement)this); + } + + + /// <summary> + /// + /// </summary> + protected void UpdateMaterial() + { + //Debug.Log("*** STO - UpdateMaterial() *** FRAME (" + Time.frameCount + ")"); + + //if (!this.enabled) + // return; + + if (m_renderer == null) m_renderer = this.renderer; + + m_renderer.sharedMaterial = m_sharedMaterial; + + #if UNITY_EDITOR + if (m_sharedMaterial != null && gameObject.name != "TMP SubMesh [" + m_sharedMaterial.name + "]") + gameObject.name = "TMP SubMesh [" + m_sharedMaterial.name + "]"; + #endif + } + + /// <summary> + /// + /// </summary> + //public void UpdateColliders(int vertexCount) + //{ + // if (this.boxCollider == null) return; + + // Vector2 bl = TMP_Math.MAX_16BIT; + // Vector2 tr = TMP_Math.MIN_16BIT; + // // Compute the bounds of the sub text object mesh (excluding the transform position). + // for (int i = 0; i < vertexCount; i++) + // { + // bl.x = Mathf.Min(bl.x, m_mesh.vertices[i].x); + // bl.y = Mathf.Min(bl.y, m_mesh.vertices[i].y); + + // tr.x = Mathf.Max(tr.x, m_mesh.vertices[i].x); + // tr.y = Mathf.Max(tr.y, m_mesh.vertices[i].y); + // } + + // Vector3 center = (bl + tr) / 2; + // Vector3 size = tr - bl; + // size.z = .1f; + // this.boxCollider.center = center; + // this.boxCollider.size = size; + //} + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SubMesh.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SubMesh.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..eef9ab030fc47a8eb218442d4c77902c23532be6 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SubMesh.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 07994bfe8b0e4adb97d706de5dea48d5 +timeCreated: 1454709708 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SubMeshUI.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SubMeshUI.cs new file mode 100644 index 0000000000000000000000000000000000000000..88ecd9f2dda19dd88d834bec0a86e7a6b39fbd75 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SubMeshUI.cs @@ -0,0 +1,807 @@ +using UnityEngine; +using UnityEngine.UI; +using System.Collections; +using System.Collections.Generic; + +#pragma warning disable 0414 // Disabled a few warnings related to serialized variables not used in this script but used in the editor. + +namespace TMPro +{ + [ExecuteAlways] + public class TMP_SubMeshUI : MaskableGraphic, IClippable, IMaskable, IMaterialModifier + { + /// <summary> + /// The TMP Font Asset assigned to this sub text object. + /// </summary> + public TMP_FontAsset fontAsset + { + get { return m_fontAsset; } + set { m_fontAsset = value; } + } + [SerializeField] + private TMP_FontAsset m_fontAsset; + + + /// <summary> + /// The TMP Sprite Asset assigned to this sub text object. + /// </summary> + public TMP_SpriteAsset spriteAsset + { + get { return m_spriteAsset; } + set { m_spriteAsset = value; } + } + [SerializeField] + private TMP_SpriteAsset m_spriteAsset; + + + /// <summary> + /// + /// </summary> + public override Texture mainTexture + { + get + { + if (this.sharedMaterial != null) + return this.sharedMaterial.GetTexture(ShaderUtilities.ID_MainTex); + + + return null; + } + } + + + /// <summary> + /// The material to be assigned to this object. Returns an instance of the material. + /// </summary> + public override Material material + { + // Return a new Instance of the Material if none exists. Otherwise return the current Material Instance. + get { return GetMaterial(m_sharedMaterial); } + + // Assign new font material + set + { + if (m_sharedMaterial != null && m_sharedMaterial.GetInstanceID() == value.GetInstanceID()) + return; + + m_sharedMaterial = m_material = value; + + m_padding = GetPaddingForMaterial(); + + SetVerticesDirty(); + SetMaterialDirty(); + } + } + [SerializeField] + private Material m_material; + + + /// <summary> + /// The material to be assigned to this text object. + /// </summary> + public Material sharedMaterial + { + get { return m_sharedMaterial; } + set { SetSharedMaterial(value); } + } + [SerializeField] + private Material m_sharedMaterial; + + + /// <summary> + /// + /// </summary> + public Material fallbackMaterial + { + get { return m_fallbackMaterial; } + set + { + if (m_fallbackMaterial == value) return; + + if (m_fallbackMaterial != null && m_fallbackMaterial != value) + TMP_MaterialManager.ReleaseFallbackMaterial(m_fallbackMaterial); + + m_fallbackMaterial = value; + TMP_MaterialManager.AddFallbackMaterialReference(m_fallbackMaterial); + + SetSharedMaterial(m_fallbackMaterial); + } + } + private Material m_fallbackMaterial; + + + /// <summary> + /// The source material used by the fallback font + /// </summary> + public Material fallbackSourceMaterial + { + get { return m_fallbackSourceMaterial; } + set { m_fallbackSourceMaterial = value; } + } + private Material m_fallbackSourceMaterial; + + + /// <summary> + /// Get the material that will be used for rendering. + /// </summary> + public override Material materialForRendering + { + get + { + return TMP_MaterialManager.GetMaterialForRendering(this, m_sharedMaterial); + } + } + + + /// <summary> + /// Is the text object using the default font asset material. + /// </summary> + public bool isDefaultMaterial + { + get { return m_isDefaultMaterial; } + set { m_isDefaultMaterial = value; } + } + [SerializeField] + private bool m_isDefaultMaterial; + + + /// <summary> + /// Padding value resulting for the property settings on the material. + /// </summary> + public float padding + { + get { return m_padding; } + set { m_padding = value; } + } + [SerializeField] + private float m_padding; + + + /// <summary> + /// The Mesh Renderer of this text sub object. + /// </summary> + public new CanvasRenderer canvasRenderer + { + get { if (m_canvasRenderer == null) m_canvasRenderer = GetComponent<CanvasRenderer>(); + + return m_canvasRenderer; + } + } + [SerializeField] + private CanvasRenderer m_canvasRenderer; + + + /// <summary> + /// The Mesh of this text sub object. + /// </summary> + public Mesh mesh + { + get + { + if (m_mesh == null) + { + m_mesh = new Mesh(); + m_mesh.hideFlags = HideFlags.HideAndDontSave; + } + + return m_mesh; + } + set { m_mesh = value; } + } + private Mesh m_mesh; + + + [SerializeField] + private TextMeshProUGUI m_TextComponent; + + + [System.NonSerialized] + private bool m_isRegisteredForEvents; + private bool m_materialDirty; + [SerializeField] + private int m_materialReferenceIndex; + + + + /// <summary> + /// Function to add a new sub text object. + /// </summary> + /// <param name="textComponent"></param> + /// <param name="materialReference"></param> + /// <returns></returns> + public static TMP_SubMeshUI AddSubTextObject(TextMeshProUGUI textComponent, MaterialReference materialReference) + { + GameObject go = new GameObject("TMP UI SubObject [" + materialReference.material.name + "]", typeof(RectTransform)); + + go.transform.SetParent(textComponent.transform, false); + go.layer = textComponent.gameObject.layer; + + RectTransform rectTransform = go.GetComponent<RectTransform>(); + rectTransform.anchorMin = Vector2.zero; + rectTransform.anchorMax = Vector2.one; + rectTransform.sizeDelta = Vector2.zero; + rectTransform.pivot = textComponent.rectTransform.pivot; + + TMP_SubMeshUI subMesh = go.AddComponent<TMP_SubMeshUI>(); + + subMesh.m_canvasRenderer = subMesh.canvasRenderer; + subMesh.m_TextComponent = textComponent; + + subMesh.m_materialReferenceIndex = materialReference.index; + subMesh.m_fontAsset = materialReference.fontAsset; + subMesh.m_spriteAsset = materialReference.spriteAsset; + subMesh.m_isDefaultMaterial = materialReference.isDefaultMaterial; + subMesh.SetSharedMaterial(materialReference.material); + + return subMesh; + } + + + + /// <summary> + /// + /// </summary> + protected override void OnEnable() + { + //Debug.Log("*** SubObject OnEnable() ***"); + + // Register Callbacks for various events. + if (!m_isRegisteredForEvents) + { + + #if UNITY_EDITOR + TMPro_EventManager.MATERIAL_PROPERTY_EVENT.Add(ON_MATERIAL_PROPERTY_CHANGED); + TMPro_EventManager.FONT_PROPERTY_EVENT.Add(ON_FONT_PROPERTY_CHANGED); + //TMPro_EventManager.TEXTMESHPRO_PROPERTY_EVENT.Add(ON_TEXTMESHPRO_PROPERTY_CHANGED); + TMPro_EventManager.DRAG_AND_DROP_MATERIAL_EVENT.Add(ON_DRAG_AND_DROP_MATERIAL); + //TMPro_EventManager.TEXT_STYLE_PROPERTY_EVENT.Add(ON_TEXT_STYLE_CHANGED); + TMPro_EventManager.SPRITE_ASSET_PROPERTY_EVENT.Add(ON_SPRITE_ASSET_PROPERTY_CHANGED); + //TMPro_EventManager.TMP_SETTINGS_PROPERTY_EVENT.Add(ON_TMP_SETTINGS_CHANGED); + #endif + + m_isRegisteredForEvents = true; + } + + m_ShouldRecalculateStencil = true; + RecalculateClipping(); + RecalculateMasking(); + + //SetAllDirty(); + } + + + protected override void OnDisable() + { + //Debug.Log("*** SubObject OnDisable() ***"); + + //m_canvasRenderer.Clear(); + TMP_UpdateRegistry.UnRegisterCanvasElementForRebuild(this); + + if (m_MaskMaterial != null) + { + TMP_MaterialManager.ReleaseStencilMaterial(m_MaskMaterial); + m_MaskMaterial = null; + } + + if (m_fallbackMaterial != null) + { + TMP_MaterialManager.ReleaseFallbackMaterial(m_fallbackMaterial); + m_fallbackMaterial = null; + } + + base.OnDisable(); + } + + + protected override void OnDestroy() + { + //Debug.Log("*** OnDestroy() ***"); + + // Destroy Mesh + if (m_mesh != null) DestroyImmediate(m_mesh); + + if (m_MaskMaterial != null) + TMP_MaterialManager.ReleaseStencilMaterial(m_MaskMaterial); + + if (m_fallbackMaterial != null) + { + TMP_MaterialManager.ReleaseFallbackMaterial(m_fallbackMaterial); + m_fallbackMaterial = null; + } + +#if UNITY_EDITOR + // Unregister the event this object was listening to + TMPro_EventManager.MATERIAL_PROPERTY_EVENT.Remove(ON_MATERIAL_PROPERTY_CHANGED); + TMPro_EventManager.FONT_PROPERTY_EVENT.Remove(ON_FONT_PROPERTY_CHANGED); + //TMPro_EventManager.TEXTMESHPRO_PROPERTY_EVENT.Remove(ON_TEXTMESHPRO_PROPERTY_CHANGED); + TMPro_EventManager.DRAG_AND_DROP_MATERIAL_EVENT.Remove(ON_DRAG_AND_DROP_MATERIAL); + //TMPro_EventManager.TEXT_STYLE_PROPERTY_EVENT.Remove(ON_TEXT_STYLE_CHANGED); + TMPro_EventManager.SPRITE_ASSET_PROPERTY_EVENT.Remove(ON_SPRITE_ASSET_PROPERTY_CHANGED); + //TMPro_EventManager.TMP_SETTINGS_PROPERTY_EVENT.Remove(ON_TMP_SETTINGS_CHANGED); + #endif + + m_isRegisteredForEvents = false; + + RecalculateClipping(); + } + + + +#if UNITY_EDITOR + // Event received when custom material editor properties are changed. + void ON_MATERIAL_PROPERTY_CHANGED(bool isChanged, Material mat) + { + //Debug.Log("*** ON_MATERIAL_PROPERTY_CHANGED ***"); + + int targetMaterialID = mat.GetInstanceID(); + int sharedMaterialID = m_sharedMaterial.GetInstanceID(); + int maskingMaterialID = m_MaskMaterial == null ? 0 : m_MaskMaterial.GetInstanceID(); + int fallbackSourceMaterialID = m_fallbackSourceMaterial == null ? 0 : m_fallbackSourceMaterial.GetInstanceID(); + + // Filter events and return if the affected material is not this object's material. + //if (targetMaterialID != sharedMaterialID && targetMaterialID != maskingMaterialID) return; + + // Filter events and return if the affected material is not this object's material. + if (m_fallbackMaterial != null && fallbackSourceMaterialID == targetMaterialID) + TMP_MaterialManager.CopyMaterialPresetProperties(mat, m_fallbackMaterial); + + if (m_TextComponent == null) m_TextComponent = GetComponentInParent<TextMeshProUGUI>(); + + // Make sure material properties are synchronized between the assigned material and masking material. + if (m_MaskMaterial != null) + { + UnityEditor.Undo.RecordObject(m_MaskMaterial, "Material Property Changes"); + UnityEditor.Undo.RecordObject(m_sharedMaterial, "Material Property Changes"); + + if (targetMaterialID == sharedMaterialID) + { + //Debug.Log("Copy base material properties to masking material if not null."); + float stencilID = m_MaskMaterial.GetFloat(ShaderUtilities.ID_StencilID); + float stencilComp = m_MaskMaterial.GetFloat(ShaderUtilities.ID_StencilComp); + m_MaskMaterial.CopyPropertiesFromMaterial(mat); + m_MaskMaterial.shaderKeywords = mat.shaderKeywords; + + m_MaskMaterial.SetFloat(ShaderUtilities.ID_StencilID, stencilID); + m_MaskMaterial.SetFloat(ShaderUtilities.ID_StencilComp, stencilComp); + } + else if (targetMaterialID == maskingMaterialID) + { + // Update the padding + GetPaddingForMaterial(mat); + + m_sharedMaterial.CopyPropertiesFromMaterial(mat); + m_sharedMaterial.shaderKeywords = mat.shaderKeywords; + m_sharedMaterial.SetFloat(ShaderUtilities.ID_StencilID, 0); + m_sharedMaterial.SetFloat(ShaderUtilities.ID_StencilComp, 8); + } + else if (fallbackSourceMaterialID == targetMaterialID) + { + float stencilID = m_MaskMaterial.GetFloat(ShaderUtilities.ID_StencilID); + float stencilComp = m_MaskMaterial.GetFloat(ShaderUtilities.ID_StencilComp); + m_MaskMaterial.CopyPropertiesFromMaterial(m_fallbackMaterial); + m_MaskMaterial.shaderKeywords = m_fallbackMaterial.shaderKeywords; + + m_MaskMaterial.SetFloat(ShaderUtilities.ID_StencilID, stencilID); + m_MaskMaterial.SetFloat(ShaderUtilities.ID_StencilComp, stencilComp); + } + } + + m_padding = GetPaddingForMaterial(); + + SetVerticesDirty(); + m_ShouldRecalculateStencil = true; + RecalculateClipping(); + RecalculateMasking(); + } + + + // Event to Track Material Changed resulting from Drag-n-drop. + void ON_DRAG_AND_DROP_MATERIAL(GameObject obj, Material currentMaterial, Material newMaterial) + { + // Check if event applies to this current object + #if UNITY_2018_2_OR_NEWER + if (obj == gameObject || UnityEditor.PrefabUtility.GetCorrespondingObjectFromSource(gameObject) == obj) + #else + if (obj == gameObject || UnityEditor.PrefabUtility.GetPrefabParent(gameObject) == obj) + #endif + { + if (!m_isDefaultMaterial) return; + + // Make sure we have a valid reference to the renderer. + if (m_canvasRenderer == null) m_canvasRenderer = GetComponent<CanvasRenderer>(); + + UnityEditor.Undo.RecordObject(this, "Material Assignment"); + UnityEditor.Undo.RecordObject(m_canvasRenderer, "Material Assignment"); + + SetSharedMaterial(newMaterial); + m_TextComponent.havePropertiesChanged = true; + } + } + + // Event received when font asset properties are changed in Font Inspector + void ON_SPRITE_ASSET_PROPERTY_CHANGED(bool isChanged, UnityEngine.Object obj) + { + //if (spriteSheet != null && (obj as TMP_SpriteAsset == m_spriteAsset || obj as Texture2D == m_spriteAsset.spriteSheet)) + //{ + if (m_TextComponent != null) + { + m_TextComponent.havePropertiesChanged = true; + //m_TextComponent.SetVerticesDirty(); + } + + //} + } + + // Event received when font asset properties are changed in Font Inspector + void ON_FONT_PROPERTY_CHANGED(bool isChanged, TMP_FontAsset font) + { + if (m_fontAsset != null && font.GetInstanceID() == m_fontAsset.GetInstanceID()) + { + // Copy Normal and Bold Weight + if (m_fallbackMaterial != null) + { + m_fallbackMaterial.SetFloat(ShaderUtilities.ID_WeightNormal, m_fontAsset.normalStyle); + m_fallbackMaterial.SetFloat(ShaderUtilities.ID_WeightBold, m_fontAsset.boldStyle); + } + } + } + + /// <summary> + /// Event received when the TMP Settings are changed. + /// </summary> + void ON_TMP_SETTINGS_CHANGED() + { + //Debug.Log("TMP Setting have changed."); + //SetVerticesDirty(); + //SetMaterialDirty(); + } +#endif + + /// <summary> + /// + /// </summary> + protected override void OnTransformParentChanged() + { + if (!this.IsActive()) + return; + + m_ShouldRecalculateStencil = true; + RecalculateClipping(); + RecalculateMasking(); + } + + + /// <summary> + /// Function returning the modified material for masking if necessary. + /// </summary> + /// <param name="baseMaterial"></param> + /// <returns></returns> + public override Material GetModifiedMaterial(Material baseMaterial) + { + Material mat = baseMaterial; + + if (m_ShouldRecalculateStencil) + { + m_StencilValue = TMP_MaterialManager.GetStencilID(gameObject); + m_ShouldRecalculateStencil = false; + } + + if (m_StencilValue > 0) + { + mat = TMP_MaterialManager.GetStencilMaterial(baseMaterial, m_StencilValue); + if (m_MaskMaterial != null) + TMP_MaterialManager.ReleaseStencilMaterial(m_MaskMaterial); + + m_MaskMaterial = mat; + } + + return mat; + } + + + /// <summary> + /// Function called when the padding value for the material needs to be re-calculated. + /// </summary> + /// <returns></returns> + public float GetPaddingForMaterial() + { + float padding = ShaderUtilities.GetPadding(m_sharedMaterial, m_TextComponent.extraPadding, m_TextComponent.isUsingBold); + + return padding; + } + + + /// <summary> + /// Function called when the padding value for the material needs to be re-calculated. + /// </summary> + /// <returns></returns> + public float GetPaddingForMaterial(Material mat) + { + float padding = ShaderUtilities.GetPadding(mat, m_TextComponent.extraPadding, m_TextComponent.isUsingBold); + + return padding; + } + + + /// <summary> + /// + /// </summary> + /// <param name="isExtraPadding"></param> + /// <param name="isBold"></param> + public void UpdateMeshPadding(bool isExtraPadding, bool isUsingBold) + { + m_padding = ShaderUtilities.GetPadding(m_sharedMaterial, isExtraPadding, isUsingBold); + } + + + /// <summary> + /// + /// </summary> + public override void SetAllDirty() + { + //SetLayoutDirty(); + //SetVerticesDirty(); + //SetMaterialDirty(); + } + + + /// <summary> + /// + /// </summary> + public override void SetVerticesDirty() + { + if (!this.IsActive()) + return; + + // This is called on the parent TextMeshPro component. + if (m_TextComponent != null) + { + m_TextComponent.havePropertiesChanged = true; + m_TextComponent.SetVerticesDirty(); + } + } + + + /// <summary> + /// + /// </summary> + public override void SetLayoutDirty() + { + + } + + + /// <summary> + /// + /// </summary> + public override void SetMaterialDirty() + { + //Debug.Log("*** STO-UI - SetMaterialDirty() *** FRAME (" + Time.frameCount + ")"); + + //if (!this.IsActive()) + // return; + + m_materialDirty = true; + + UpdateMaterial(); + + if (m_OnDirtyMaterialCallback != null) + m_OnDirtyMaterialCallback(); + + //TMP_ITextElementUpdateManager.RegisterTextElementForGraphicRebuild(this); + + //TMP_UpdateRegistry.RegisterCanvasElementForGraphicRebuild((ICanvasElement)this); + //m_TextComponent.SetMaterialDirty(); + } + + + /// <summary> + /// + /// </summary> + public void SetPivotDirty() + { + if (!this.IsActive()) + return; + + this.rectTransform.pivot = m_TextComponent.rectTransform.pivot; + } + + + /// <summary> + /// Override to Cull function of MaskableGraphic to prevent Culling. + /// </summary> + /// <param name="clipRect"></param> + /// <param name="validRect"></param> + public override void Cull(Rect clipRect, bool validRect) + { + if (m_TextComponent.ignoreRectMaskCulling) return; + + base.Cull(clipRect, validRect); + } + + + /// <summary> + /// + /// </summary> + protected override void UpdateGeometry() + { + // Need to override to prevent Unity from changing the geometry of the object. + Debug.Log("UpdateGeometry()"); + } + + + /// <summary> + /// + /// </summary> + /// <param name="update"></param> + public override void Rebuild(CanvasUpdate update) + { + if (update == CanvasUpdate.PreRender) + { + if (!m_materialDirty) return; + + UpdateMaterial(); + m_materialDirty = false; + } + } + + + /// <summary> + /// Function to update the material from the parent text object. + /// </summary> + public void RefreshMaterial() + { + UpdateMaterial(); + } + + + /// <summary> + /// + /// </summary> + protected override void UpdateMaterial() + { + //Debug.Log("*** STO-UI - UpdateMaterial() *** FRAME (" + Time.frameCount + ")"); + + //if (!this.IsActive()) + // return; + + if (m_canvasRenderer == null) m_canvasRenderer = this.canvasRenderer; + + m_canvasRenderer.materialCount = 1; + m_canvasRenderer.SetMaterial(materialForRendering, 0); + m_canvasRenderer.SetTexture(mainTexture); + + #if UNITY_EDITOR + if (m_sharedMaterial != null && gameObject.name != "TMP SubMeshUI [" + m_sharedMaterial.name + "]") + gameObject.name = "TMP SubMeshUI [" + m_sharedMaterial.name + "]"; + #endif + } + + + // IClippable implementation + /// <summary> + /// Method called when the state of a parent changes. + /// </summary> + public override void RecalculateClipping() + { + //Debug.Log("*** RecalculateClipping() ***"); + base.RecalculateClipping(); + } + + + /// <summary> + /// + /// </summary> + public override void RecalculateMasking() + { + //Debug.Log("RecalculateMasking()"); + + this.m_ShouldRecalculateStencil = true; + SetMaterialDirty(); + } + + + + /// <summary> + /// Method which returns an instance of the shared material + /// </summary> + /// <returns></returns> + Material GetMaterial() + { + // Make sure we have a valid reference to the renderer. + //if (m_renderer == null) m_renderer = GetComponent<Renderer>(); + + //if (m_material == null || m_isNewSharedMaterial) + //{ + // m_renderer.material = m_sharedMaterial; + // m_material = m_renderer.material; + // m_sharedMaterial = m_material; + // m_padding = ShaderUtilities.GetPadding(m_sharedMaterial, m_TextMeshPro.extraPadding, false); + // m_isNewSharedMaterial = false; + //} + + return m_sharedMaterial; + } + + + // Function called internally when a new material is assigned via the fontMaterial property. + Material GetMaterial(Material mat) + { + // Check in case Object is disabled. If so, we don't have a valid reference to the Renderer. + // This can occur when the Duplicate Material Context menu is used on an inactive object. + //if (m_renderer == null) + // m_renderer = GetComponent<Renderer>(); + + // Create Instance Material only if the new material is not the same instance previously used. + if (m_material == null || m_material.GetInstanceID() != mat.GetInstanceID()) + m_material = CreateMaterialInstance(mat); + + m_sharedMaterial = m_material; + + // Compute and Set new padding values for this new material. + m_padding = GetPaddingForMaterial(); + + SetVerticesDirty(); + SetMaterialDirty(); + + return m_sharedMaterial; + } + + + /// <summary> + /// Method used to create an instance of the material + /// </summary> + /// <param name="source"></param> + /// <returns></returns> + Material CreateMaterialInstance(Material source) + { + Material mat = new Material(source); + mat.shaderKeywords = source.shaderKeywords; + mat.name += " (Instance)"; + + return mat; + } + + + /// <summary> + /// Method returning the shared material assigned to the text object. + /// </summary> + /// <returns></returns> + Material GetSharedMaterial() + { + if (m_canvasRenderer == null) + m_canvasRenderer = GetComponent<CanvasRenderer>(); + + return m_canvasRenderer.GetMaterial(); + } + + + /// <summary> + /// Method to set the shared material. + /// </summary> + /// <param name="mat"></param> + void SetSharedMaterial(Material mat) + { + //Debug.Log("*** SetSharedMaterial UI() *** FRAME (" + Time.frameCount + ")"); + + // Assign new material. + m_sharedMaterial = mat; + m_Material = m_sharedMaterial; + + //m_isDefaultMaterial = false; + //if (mat.GetInstanceID() == m_fontAsset.material.GetInstanceID()) + // m_isDefaultMaterial = true; + + // Compute and Set new padding values for this new material. + m_padding = GetPaddingForMaterial(); + + //SetVerticesDirty(); + SetMaterialDirty(); + +#if UNITY_EDITOR + //if (m_sharedMaterial != null) + // gameObject.name = "TMP SubMesh [" + m_sharedMaterial.name + "]"; +#endif + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SubMeshUI.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SubMeshUI.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..614f42d6a110df98f1beb6fc9317cb8f17a3a5c5 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_SubMeshUI.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 058cba836c1846c3aa1c5fd2e28aea77 +timeCreated: 1454709708 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Text.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Text.cs new file mode 100644 index 0000000000000000000000000000000000000000..44cc7f0ddc4a58bd7df93e50890d6604bcb5bb76 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Text.cs @@ -0,0 +1,7630 @@ +#define TMP_PRESENT + +using UnityEngine; +using UnityEngine.TextCore; +using UnityEngine.UI; +using UnityEngine.Events; +using UnityEngine.EventSystems; +using System; +using System.Text; +using System.Collections; +using System.Collections.Generic; + + +namespace TMPro +{ + public interface ITextElement + { + Material sharedMaterial { get; } + + void Rebuild(CanvasUpdate update); + int GetInstanceID(); + } + + public enum TextAlignmentOptions + { + TopLeft = _HorizontalAlignmentOptions.Left | _VerticalAlignmentOptions.Top, + Top = _HorizontalAlignmentOptions.Center | _VerticalAlignmentOptions.Top, + TopRight = _HorizontalAlignmentOptions.Right | _VerticalAlignmentOptions.Top, + TopJustified = _HorizontalAlignmentOptions.Justified | _VerticalAlignmentOptions.Top, + TopFlush = _HorizontalAlignmentOptions.Flush | _VerticalAlignmentOptions.Top, + TopGeoAligned = _HorizontalAlignmentOptions.Geometry | _VerticalAlignmentOptions.Top, + + Left = _HorizontalAlignmentOptions.Left | _VerticalAlignmentOptions.Middle, + Center = _HorizontalAlignmentOptions.Center | _VerticalAlignmentOptions.Middle, + Right = _HorizontalAlignmentOptions.Right | _VerticalAlignmentOptions.Middle, + Justified = _HorizontalAlignmentOptions.Justified | _VerticalAlignmentOptions.Middle, + Flush = _HorizontalAlignmentOptions.Flush | _VerticalAlignmentOptions.Middle, + CenterGeoAligned = _HorizontalAlignmentOptions.Geometry | _VerticalAlignmentOptions.Middle, + + BottomLeft = _HorizontalAlignmentOptions.Left | _VerticalAlignmentOptions.Bottom, + Bottom = _HorizontalAlignmentOptions.Center | _VerticalAlignmentOptions.Bottom, + BottomRight = _HorizontalAlignmentOptions.Right | _VerticalAlignmentOptions.Bottom, + BottomJustified = _HorizontalAlignmentOptions.Justified | _VerticalAlignmentOptions.Bottom, + BottomFlush = _HorizontalAlignmentOptions.Flush | _VerticalAlignmentOptions.Bottom, + BottomGeoAligned = _HorizontalAlignmentOptions.Geometry | _VerticalAlignmentOptions.Bottom, + + BaselineLeft = _HorizontalAlignmentOptions.Left | _VerticalAlignmentOptions.Baseline, + Baseline = _HorizontalAlignmentOptions.Center | _VerticalAlignmentOptions.Baseline, + BaselineRight = _HorizontalAlignmentOptions.Right | _VerticalAlignmentOptions.Baseline, + BaselineJustified = _HorizontalAlignmentOptions.Justified | _VerticalAlignmentOptions.Baseline, + BaselineFlush = _HorizontalAlignmentOptions.Flush | _VerticalAlignmentOptions.Baseline, + BaselineGeoAligned = _HorizontalAlignmentOptions.Geometry | _VerticalAlignmentOptions.Baseline, + + MidlineLeft = _HorizontalAlignmentOptions.Left | _VerticalAlignmentOptions.Geometry, + Midline = _HorizontalAlignmentOptions.Center | _VerticalAlignmentOptions.Geometry, + MidlineRight = _HorizontalAlignmentOptions.Right | _VerticalAlignmentOptions.Geometry, + MidlineJustified = _HorizontalAlignmentOptions.Justified | _VerticalAlignmentOptions.Geometry, + MidlineFlush = _HorizontalAlignmentOptions.Flush | _VerticalAlignmentOptions.Geometry, + MidlineGeoAligned = _HorizontalAlignmentOptions.Geometry | _VerticalAlignmentOptions.Geometry, + + CaplineLeft = _HorizontalAlignmentOptions.Left | _VerticalAlignmentOptions.Capline, + Capline = _HorizontalAlignmentOptions.Center | _VerticalAlignmentOptions.Capline, + CaplineRight = _HorizontalAlignmentOptions.Right | _VerticalAlignmentOptions.Capline, + CaplineJustified = _HorizontalAlignmentOptions.Justified | _VerticalAlignmentOptions.Capline, + CaplineFlush = _HorizontalAlignmentOptions.Flush | _VerticalAlignmentOptions.Capline, + CaplineGeoAligned = _HorizontalAlignmentOptions.Geometry | _VerticalAlignmentOptions.Capline + }; + + /// <summary> + /// Internal horizontal text alignment options. + /// </summary> + public enum _HorizontalAlignmentOptions + { + Left = 0x1, Center = 0x2, Right = 0x4, Justified = 0x8, Flush = 0x10, Geometry = 0x20 + } + + /// <summary> + /// Internal vertical text alignment options. + /// </summary> + public enum _VerticalAlignmentOptions + { + Top = 0x100, Middle = 0x200, Bottom = 0x400, Baseline = 0x800, Geometry = 0x1000, Capline = 0x2000, + } + + + /// <summary> + /// Flags controlling what vertex data gets pushed to the mesh. + /// </summary> + public enum TextRenderFlags + { + DontRender = 0x0, + Render = 0xFF + }; + + public enum TMP_TextElementType { Character, Sprite }; + public enum MaskingTypes { MaskOff = 0, MaskHard = 1, MaskSoft = 2 }; //, MaskTex = 4 }; + public enum TextOverflowModes { Overflow = 0, Ellipsis = 1, Masking = 2, Truncate = 3, ScrollRect = 4, Page = 5, Linked = 6 }; + public enum MaskingOffsetMode { Percentage = 0, Pixel = 1 }; + public enum TextureMappingOptions { Character = 0, Line = 1, Paragraph = 2, MatchAspect = 3 }; + + public enum FontStyles { Normal = 0x0, Bold = 0x1, Italic = 0x2, Underline = 0x4, LowerCase = 0x8, UpperCase = 0x10, SmallCaps = 0x20, Strikethrough = 0x40, Superscript = 0x80, Subscript = 0x100, Highlight = 0x200 }; + public enum FontWeight { Thin = 100, ExtraLight = 200, Light = 300, Regular = 400, Medium = 500, SemiBold = 600, Bold = 700, Heavy = 800, Black = 900 }; + + /// <summary> + /// Base class which contains common properties and functions shared between the TextMeshPro and TextMeshProUGUI component. + /// </summary> + public abstract class TMP_Text : MaskableGraphic + { + /// <summary> + /// A string containing the text to be displayed. + /// </summary> + public string text + { + get { return m_text; } + set { if (m_text == value) return; m_text = old_text = value; m_inputSource = TextInputSources.String; m_havePropertiesChanged = true; m_isCalculateSizeRequired = true; m_isInputParsingRequired = true; SetVerticesDirty(); SetLayoutDirty(); } + } + [SerializeField] + [TextArea(5, 10)] + protected string m_text; + + + /// <summary> + /// + /// </summary> + public bool isRightToLeftText + { + get { return m_isRightToLeft; } + set { if (m_isRightToLeft == value) return; m_isRightToLeft = value; m_havePropertiesChanged = true; m_isCalculateSizeRequired = true; m_isInputParsingRequired = true; SetVerticesDirty(); SetLayoutDirty(); } + } + [SerializeField] + protected bool m_isRightToLeft = false; + + + /// <summary> + /// The Font Asset to be assigned to this text object. + /// </summary> + public TMP_FontAsset font + { + get { return m_fontAsset; } + set { if (m_fontAsset == value) return; m_fontAsset = value; LoadFontAsset(); m_havePropertiesChanged = true; m_isCalculateSizeRequired = true; m_isInputParsingRequired = true; SetVerticesDirty(); SetLayoutDirty(); } + } + [SerializeField] + protected TMP_FontAsset m_fontAsset; + protected TMP_FontAsset m_currentFontAsset; + protected bool m_isSDFShader; + + + /// <summary> + /// The material to be assigned to this text object. + /// </summary> + public virtual Material fontSharedMaterial + { + get { return m_sharedMaterial; } + set { if (m_sharedMaterial == value) return; SetSharedMaterial(value); m_havePropertiesChanged = true; m_isInputParsingRequired = true; SetVerticesDirty(); SetMaterialDirty(); } + } + [SerializeField] + protected Material m_sharedMaterial; + protected Material m_currentMaterial; + protected MaterialReference[] m_materialReferences = new MaterialReference[32]; + protected Dictionary<int, int> m_materialReferenceIndexLookup = new Dictionary<int, int>(); + + protected TMP_RichTextTagStack<MaterialReference> m_materialReferenceStack = new TMP_RichTextTagStack<MaterialReference>(new MaterialReference[16]); + protected int m_currentMaterialIndex; + //protected int m_sharedMaterialHashCode; + + + /// <summary> + /// An array containing the materials used by the text object. + /// </summary> + public virtual Material[] fontSharedMaterials + { + get { return GetSharedMaterials(); } + set { SetSharedMaterials(value); m_havePropertiesChanged = true; m_isInputParsingRequired = true; SetVerticesDirty(); SetMaterialDirty(); } + } + [SerializeField] + protected Material[] m_fontSharedMaterials; + + + /// <summary> + /// The material to be assigned to this text object. An instance of the material will be assigned to the object's renderer. + /// </summary> + public Material fontMaterial + { + // Return an Instance of the current material. + get { return GetMaterial(m_sharedMaterial); } + + // Assign new font material + set + { + if (m_sharedMaterial != null && m_sharedMaterial.GetInstanceID() == value.GetInstanceID()) return; + + m_sharedMaterial = value; + + m_padding = GetPaddingForMaterial(); + m_havePropertiesChanged = true; + m_isInputParsingRequired = true; + + SetVerticesDirty(); + SetMaterialDirty(); + } + } + [SerializeField] + protected Material m_fontMaterial; + + + /// <summary> + /// The materials to be assigned to this text object. An instance of the materials will be assigned. + /// </summary> + public virtual Material[] fontMaterials + { + get { return GetMaterials(m_fontSharedMaterials); } + + set { SetSharedMaterials(value); m_havePropertiesChanged = true; m_isInputParsingRequired = true; SetVerticesDirty(); SetMaterialDirty(); } + } + [SerializeField] + protected Material[] m_fontMaterials; + + protected bool m_isMaterialDirty; + + + /// <summary> + /// This is the default vertex color assigned to each vertices. Color tags will override vertex colors unless the overrideColorTags is set. + /// </summary> + public override Color color + { + get { return m_fontColor; } + set { if (m_fontColor == value) return; m_havePropertiesChanged = true; m_fontColor = value; SetVerticesDirty(); } + } + //[UnityEngine.Serialization.FormerlySerializedAs("m_fontColor")] // Required for backwards compatibility with pre-Unity 4.6 releases. + [SerializeField] + protected Color32 m_fontColor32 = Color.white; + [SerializeField] + protected Color m_fontColor = Color.white; + protected static Color32 s_colorWhite = new Color32(255, 255, 255, 255); + protected Color32 m_underlineColor = s_colorWhite; + protected Color32 m_strikethroughColor = s_colorWhite; + protected Color32 m_highlightColor = s_colorWhite; + protected Vector4 m_highlightPadding = Vector4.zero; + + + /// <summary> + /// Sets the vertex color alpha value. + /// </summary> + public float alpha + { + get { return m_fontColor.a; } + set { if (m_fontColor.a == value) return; m_fontColor.a = value; m_havePropertiesChanged = true; SetVerticesDirty(); } + } + + + /// <summary> + /// Determines if Vertex Color Gradient should be used + /// </summary> + /// <value><c>true</c> if enable vertex gradient; otherwise, <c>false</c>.</value> + public bool enableVertexGradient + { + get { return m_enableVertexGradient; } + set { if (m_enableVertexGradient == value) return; m_havePropertiesChanged = true; m_enableVertexGradient = value; SetVerticesDirty(); } + } + [SerializeField] + protected bool m_enableVertexGradient; + + [SerializeField] + protected ColorMode m_colorMode = ColorMode.FourCornersGradient; + + /// <summary> + /// Sets the vertex colors for each of the 4 vertices of the character quads. + /// </summary> + /// <value>The color gradient.</value> + public VertexGradient colorGradient + { + get { return m_fontColorGradient; } + set { m_havePropertiesChanged = true; m_fontColorGradient = value; SetVerticesDirty(); } + } + [SerializeField] + protected VertexGradient m_fontColorGradient = new VertexGradient(Color.white); + + + /// <summary> + /// Set the vertex colors of the 4 vertices of each character quads. + /// </summary> + public TMP_ColorGradient colorGradientPreset + { + get { return m_fontColorGradientPreset; } + set { m_havePropertiesChanged = true; m_fontColorGradientPreset = value; SetVerticesDirty(); } + } + [SerializeField] + protected TMP_ColorGradient m_fontColorGradientPreset; + + + /// <summary> + /// Default Sprite Asset used by the text object. + /// </summary> + public TMP_SpriteAsset spriteAsset + { + get { return m_spriteAsset; } + set { m_spriteAsset = value; m_havePropertiesChanged = true; m_isInputParsingRequired = true; m_isCalculateSizeRequired = true; SetVerticesDirty(); SetLayoutDirty(); } + } + [SerializeField] + protected TMP_SpriteAsset m_spriteAsset; + + + /// <summary> + /// Determines whether or not the sprite color is multiplies by the vertex color of the text. + /// </summary> + public bool tintAllSprites + { + get { return m_tintAllSprites; } + set { if (m_tintAllSprites == value) return; m_tintAllSprites = value; m_havePropertiesChanged = true; SetVerticesDirty(); } + } + [SerializeField] + protected bool m_tintAllSprites; + protected bool m_tintSprite; + protected Color32 m_spriteColor; + + + /// <summary> + /// This overrides the color tags forcing the vertex colors to be the default font color. + /// </summary> + public bool overrideColorTags + { + get { return m_overrideHtmlColors; } + set { if (m_overrideHtmlColors == value) return; m_havePropertiesChanged = true; m_overrideHtmlColors = value; SetVerticesDirty(); } + } + [SerializeField] + protected bool m_overrideHtmlColors = false; + + + /// <summary> + /// Sets the color of the _FaceColor property of the assigned material. Changing face color will result in an instance of the material. + /// </summary> + public Color32 faceColor + { + get + { + if (m_sharedMaterial == null) return m_faceColor; + + m_faceColor = m_sharedMaterial.GetColor(ShaderUtilities.ID_FaceColor); + return m_faceColor; + } + + set { if (m_faceColor.Compare(value)) return; SetFaceColor(value); m_havePropertiesChanged = true; m_faceColor = value; SetVerticesDirty(); SetMaterialDirty(); } + } + [SerializeField] + protected Color32 m_faceColor = Color.white; + + + /// <summary> + /// Sets the color of the _OutlineColor property of the assigned material. Changing outline color will result in an instance of the material. + /// </summary> + public Color32 outlineColor + { + get + { + if (m_sharedMaterial == null) return m_outlineColor; + + m_outlineColor = m_sharedMaterial.GetColor(ShaderUtilities.ID_OutlineColor); + return m_outlineColor; + } + + set { if (m_outlineColor.Compare(value)) return; SetOutlineColor(value); m_havePropertiesChanged = true; m_outlineColor = value; SetVerticesDirty(); } + } + [SerializeField] + protected Color32 m_outlineColor = Color.black; + + + /// <summary> + /// Sets the thickness of the outline of the font. Setting this value will result in an instance of the material. + /// </summary> + public float outlineWidth + { + get + { + if (m_sharedMaterial == null) return m_outlineWidth; + + m_outlineWidth = m_sharedMaterial.GetFloat(ShaderUtilities.ID_OutlineWidth); + return m_outlineWidth; + } + set { if (m_outlineWidth == value) return; SetOutlineThickness(value); m_havePropertiesChanged = true; m_outlineWidth = value; SetVerticesDirty(); } + } + protected float m_outlineWidth = 0.0f; + + + /// <summary> + /// The point size of the font. + /// </summary> + public float fontSize + { + get { return m_fontSize; } + set { if (m_fontSize == value) return; m_havePropertiesChanged = true; m_isCalculateSizeRequired = true; m_fontSize = value; if (!m_enableAutoSizing) m_fontSizeBase = m_fontSize; SetVerticesDirty(); SetLayoutDirty(); } + } + [SerializeField] + protected float m_fontSize = 36; // Font Size + protected float m_currentFontSize; // Temporary Font Size affected by tags + [SerializeField] + protected float m_fontSizeBase = 36; + protected TMP_RichTextTagStack<float> m_sizeStack = new TMP_RichTextTagStack<float>(16); + + + /// <summary> + /// The scale of the current text. + /// </summary> + public float fontScale + { + get { return m_fontScale; } + } + + + /// <summary> + /// Control the weight of the font if an alternative font asset is assigned for the given weight in the font asset editor. + /// </summary> + public FontWeight fontWeight + { + get { return m_fontWeight; } + set { if (m_fontWeight == value) return; m_fontWeight = value; m_havePropertiesChanged = true; m_isCalculateSizeRequired = true; m_isInputParsingRequired = true; SetVerticesDirty(); SetLayoutDirty(); } + } + [SerializeField] + protected FontWeight m_fontWeight = FontWeight.Regular; + protected FontWeight m_FontWeightInternal = FontWeight.Regular; + protected TMP_RichTextTagStack<FontWeight> m_FontWeightStack = new TMP_RichTextTagStack<FontWeight>(8); + + /// <summary> + /// + /// </summary> + public float pixelsPerUnit + { + get + { + var localCanvas = canvas; + if (!localCanvas) + return 1; + // For dynamic fonts, ensure we use one pixel per pixel on the screen. + if (!font) + return localCanvas.scaleFactor; + // For non-dynamic fonts, calculate pixels per unit based on specified font size relative to font object's own font size. + if (m_currentFontAsset == null || m_currentFontAsset.faceInfo.pointSize <= 0 || m_fontSize <= 0) + return 1; + return m_fontSize / m_currentFontAsset.faceInfo.pointSize; + } + } + + + /// <summary> + /// Enable text auto-sizing + /// </summary> + public bool enableAutoSizing + { + get { return m_enableAutoSizing; } + set { if (m_enableAutoSizing == value) return; m_enableAutoSizing = value; SetVerticesDirty(); SetLayoutDirty(); } + } + [SerializeField] + protected bool m_enableAutoSizing; + protected float m_maxFontSize; // Used in conjunction with auto-sizing + protected float m_minFontSize; // Used in conjunction with auto-sizing + + + /// <summary> + /// Minimum point size of the font when text auto-sizing is enabled. + /// </summary> + public float fontSizeMin + { + get { return m_fontSizeMin; } + set { if (m_fontSizeMin == value) return; m_fontSizeMin = value; SetVerticesDirty(); SetLayoutDirty(); } + } + [SerializeField] + protected float m_fontSizeMin = 0; // Text Auto Sizing Min Font Size. + + + /// <summary> + /// Maximum point size of the font when text auto-sizing is enabled. + /// </summary> + public float fontSizeMax + { + get { return m_fontSizeMax; } + set { if (m_fontSizeMax == value) return; m_fontSizeMax = value; SetVerticesDirty(); SetLayoutDirty(); } + } + [SerializeField] + protected float m_fontSizeMax = 0; // Text Auto Sizing Max Font Size. + + + /// <summary> + /// The style of the text + /// </summary> + public FontStyles fontStyle + { + get { return m_fontStyle; } + set { if (m_fontStyle == value) return; m_fontStyle = value; m_havePropertiesChanged = true; m_isCalculateSizeRequired = true; m_isInputParsingRequired = true; SetVerticesDirty(); SetLayoutDirty(); } + } + [SerializeField] + protected FontStyles m_fontStyle = FontStyles.Normal; + protected FontStyles m_FontStyleInternal = FontStyles.Normal; + protected TMP_FontStyleStack m_fontStyleStack; + + /// <summary> + /// Property used in conjunction with padding calculation for the geometry. + /// </summary> + public bool isUsingBold { get { return m_isUsingBold; } } + protected bool m_isUsingBold = false; // Used to ensure GetPadding & Ratios take into consideration bold characters. + + + /// <summary> + /// Text alignment options + /// </summary> + public TextAlignmentOptions alignment + { + get { return m_textAlignment; } + set { if (m_textAlignment == value) return; m_havePropertiesChanged = true; m_textAlignment = value; SetVerticesDirty(); } + } + [SerializeField] + [UnityEngine.Serialization.FormerlySerializedAs("m_lineJustification")] + protected TextAlignmentOptions m_textAlignment = TextAlignmentOptions.TopLeft; + protected TextAlignmentOptions m_lineJustification; + protected TMP_RichTextTagStack<TextAlignmentOptions> m_lineJustificationStack = new TMP_RichTextTagStack<TextAlignmentOptions>(new TextAlignmentOptions[16]); + protected Vector3[] m_textContainerLocalCorners = new Vector3[4]; + + /// <summary> + /// Use the extents of the text geometry for alignment instead of font metrics. + /// </summary> + //public bool alignByGeometry + //{ + // get { return m_alignByGeometry; } + // set { if (m_alignByGeometry == value) return; m_havePropertiesChanged = true; m_alignByGeometry = value; SetVerticesDirty(); } + //} + //[SerializeField] + //protected bool m_alignByGeometry; + + + /// <summary> + /// The amount of additional spacing between characters. + /// </summary> + public float characterSpacing + { + get { return m_characterSpacing; } + set { if (m_characterSpacing == value) return; m_havePropertiesChanged = true; m_isCalculateSizeRequired = true; m_characterSpacing = value; SetVerticesDirty(); SetLayoutDirty(); } + } + [SerializeField] + protected float m_characterSpacing = 0; + protected float m_cSpacing = 0; + protected float m_monoSpacing = 0; + + /// <summary> + /// The amount of additional spacing between words. + /// </summary> + public float wordSpacing + { + get { return m_wordSpacing; } + set { if (m_wordSpacing == value) return; m_havePropertiesChanged = true; m_isCalculateSizeRequired = true; m_wordSpacing = value; SetVerticesDirty(); SetLayoutDirty(); } + } + [SerializeField] + protected float m_wordSpacing = 0; + + /// <summary> + /// The amount of additional spacing to add between each lines of text. + /// </summary> + public float lineSpacing + { + get { return m_lineSpacing; } + set { if (m_lineSpacing == value) return; m_havePropertiesChanged = true; m_isCalculateSizeRequired = true; m_lineSpacing = value; SetVerticesDirty(); SetLayoutDirty(); } + } + [SerializeField] + protected float m_lineSpacing = 0; + protected float m_lineSpacingDelta = 0; // Used with Text Auto Sizing feature + protected float m_lineHeight = TMP_Math.FLOAT_UNSET; // Used with the <line-height=xx.x> tag. + + + /// <summary> + /// The amount of potential line spacing adjustment before text auto sizing kicks in. + /// </summary> + public float lineSpacingAdjustment + { + get { return m_lineSpacingMax; } + set { if (m_lineSpacingMax == value) return; m_havePropertiesChanged = true; m_isCalculateSizeRequired = true; m_lineSpacingMax = value; SetVerticesDirty(); SetLayoutDirty(); } + } + [SerializeField] + protected float m_lineSpacingMax = 0; // Text Auto Sizing Max Line spacing reduction. + //protected bool m_forceLineBreak; + + /// <summary> + /// The amount of additional spacing to add between each lines of text. + /// </summary> + public float paragraphSpacing + { + get { return m_paragraphSpacing; } + set { if (m_paragraphSpacing == value) return; m_havePropertiesChanged = true; m_isCalculateSizeRequired = true; m_paragraphSpacing = value; SetVerticesDirty(); SetLayoutDirty(); } + } + [SerializeField] + protected float m_paragraphSpacing = 0; + + + /// <summary> + /// Percentage the width of characters can be adjusted before text auto-sizing begins to reduce the point size. + /// </summary> + public float characterWidthAdjustment + { + get { return m_charWidthMaxAdj; } + set { if (m_charWidthMaxAdj == value) return; m_havePropertiesChanged = true; m_isCalculateSizeRequired = true; m_charWidthMaxAdj = value; SetVerticesDirty(); SetLayoutDirty(); } + } + [SerializeField] + protected float m_charWidthMaxAdj = 0f; // Text Auto Sizing Max Character Width reduction. + protected float m_charWidthAdjDelta = 0; + + + /// <summary> + /// Controls whether or not word wrapping is applied. When disabled, the text will be displayed on a single line. + /// </summary> + public bool enableWordWrapping + { + get { return m_enableWordWrapping; } + set { if (m_enableWordWrapping == value) return; m_havePropertiesChanged = true; m_isInputParsingRequired = true; m_isCalculateSizeRequired = true; m_enableWordWrapping = value; SetVerticesDirty(); SetLayoutDirty(); } + } + [SerializeField] + protected bool m_enableWordWrapping = false; + protected bool m_isCharacterWrappingEnabled = false; + protected bool m_isNonBreakingSpace = false; + protected bool m_isIgnoringAlignment; + + /// <summary> + /// Controls the blending between using character and word spacing to fill-in the space for justified text. + /// </summary> + public float wordWrappingRatios + { + get { return m_wordWrappingRatios; } + set { if (m_wordWrappingRatios == value) return; m_wordWrappingRatios = value; m_havePropertiesChanged = true; m_isCalculateSizeRequired = true; SetVerticesDirty(); SetLayoutDirty(); } + } + [SerializeField] + protected float m_wordWrappingRatios = 0.4f; // Controls word wrapping ratios between word or characters. + + + /// <summary> + /// + /// </summary> + //public bool enableAdaptiveJustification + //{ + // get { return m_enableAdaptiveJustification; } + // set { if (m_enableAdaptiveJustification == value) return; m_enableAdaptiveJustification = value; m_havePropertiesChanged = true; m_isCalculateSizeRequired = true; SetVerticesDirty(); SetLayoutDirty(); } + //} + //[SerializeField] + //protected bool m_enableAdaptiveJustification; + //protected float m_adaptiveJustificationThreshold = 10.0f; + + + /// <summary> + /// Controls the Text Overflow Mode + /// </summary> + public TextOverflowModes overflowMode + { + get { return m_overflowMode; } + set { if (m_overflowMode == value) return; m_overflowMode = value; m_havePropertiesChanged = true; m_isCalculateSizeRequired = true; SetVerticesDirty(); SetLayoutDirty(); } + } + [SerializeField] + protected TextOverflowModes m_overflowMode = TextOverflowModes.Overflow; + + + /// <summary> + /// Indicates if the text exceeds the vertical bounds of its text container. + /// </summary> + public bool isTextOverflowing + { + get { if (m_firstOverflowCharacterIndex != -1) return true; return false; } + } + + + /// <summary> + /// The first character which exceeds the vertical bounds of its text container. + /// </summary> + public int firstOverflowCharacterIndex + { + get { return m_firstOverflowCharacterIndex; } + } + [SerializeField] + protected int m_firstOverflowCharacterIndex = -1; + + + /// <summary> + /// The linked text component used for flowing the text from one text component to another. + /// </summary> + public TMP_Text linkedTextComponent + { + get { return m_linkedTextComponent; } + + set + { + if (m_linkedTextComponent != value) + { + // Release previously linked text component. + if (m_linkedTextComponent != null) + { + m_linkedTextComponent.overflowMode = TextOverflowModes.Overflow; + m_linkedTextComponent.linkedTextComponent = null; + m_linkedTextComponent.isLinkedTextComponent = false; + } + + m_linkedTextComponent = value; + + if (m_linkedTextComponent != null) + m_linkedTextComponent.isLinkedTextComponent = true; + } + + m_havePropertiesChanged = true; + m_isCalculateSizeRequired = true; + SetVerticesDirty(); + SetLayoutDirty(); + } + } + [SerializeField] + protected TMP_Text m_linkedTextComponent; + + + /// <summary> + /// Indicates whether this text component is linked to another. + /// </summary> + public bool isLinkedTextComponent + { + get { return m_isLinkedTextComponent; } + + set + { + m_isLinkedTextComponent = value; + + if (m_isLinkedTextComponent == false) + m_firstVisibleCharacter = 0; + + m_havePropertiesChanged = true; + m_isCalculateSizeRequired = true; + SetVerticesDirty(); + SetLayoutDirty(); + } + } + [SerializeField] + protected bool m_isLinkedTextComponent; + + + /// <summary> + /// Property indicating whether the text is Truncated or using Ellipsis. + /// </summary> + public bool isTextTruncated { get { return m_isTextTruncated; } } + [SerializeField] + protected bool m_isTextTruncated; + + + /// <summary> + /// Determines if kerning is enabled or disabled. + /// </summary> + public bool enableKerning + { + get { return m_enableKerning; } + set { if (m_enableKerning == value) return; m_havePropertiesChanged = true; m_isCalculateSizeRequired = true; m_enableKerning = value; SetVerticesDirty(); SetLayoutDirty(); } + } + [SerializeField] + protected bool m_enableKerning; + + + /// <summary> + /// Adds extra padding around each character. This may be necessary when the displayed text is very small to prevent clipping. + /// </summary> + public bool extraPadding + { + get { return m_enableExtraPadding; } + set { if (m_enableExtraPadding == value) return; m_havePropertiesChanged = true; m_enableExtraPadding = value; UpdateMeshPadding(); /* m_isCalculateSizeRequired = true;*/ SetVerticesDirty(); /* SetLayoutDirty();*/ } + } + [SerializeField] + protected bool m_enableExtraPadding = false; + [SerializeField] + protected bool checkPaddingRequired; + + + /// <summary> + /// Enables or Disables Rich Text Tags + /// </summary> + public bool richText + { + get { return m_isRichText; } + set { if (m_isRichText == value) return; m_isRichText = value; m_havePropertiesChanged = true; m_isCalculateSizeRequired = true; m_isInputParsingRequired = true; SetVerticesDirty(); SetLayoutDirty(); } + } + [SerializeField] + protected bool m_isRichText = true; // Used to enable or disable Rich Text. + + + /// <summary> + /// Enables or Disables parsing of CTRL characters in input text. + /// </summary> + public bool parseCtrlCharacters + { + get { return m_parseCtrlCharacters; } + set { if (m_parseCtrlCharacters == value) return; m_parseCtrlCharacters = value; m_havePropertiesChanged = true; m_isCalculateSizeRequired = true; m_isInputParsingRequired = true; SetVerticesDirty(); SetLayoutDirty(); } + } + [SerializeField] + protected bool m_parseCtrlCharacters = true; + + + /// <summary> + /// Sets the RenderQueue along with Ztest to force the text to be drawn last and on top of scene elements. + /// </summary> + public bool isOverlay + { + get { return m_isOverlay; } + set { if (m_isOverlay == value) return; m_isOverlay = value; SetShaderDepth(); m_havePropertiesChanged = true; SetVerticesDirty(); } + } + protected bool m_isOverlay = false; + + + /// <summary> + /// Sets Perspective Correction to Zero for Orthographic Camera mode & 0.875f for Perspective Camera mode. + /// </summary> + public bool isOrthographic + { + get { return m_isOrthographic; } + set { if (m_isOrthographic == value) return; m_havePropertiesChanged = true; m_isOrthographic = value; SetVerticesDirty(); } + } + [SerializeField] + protected bool m_isOrthographic = false; + + + /// <summary> + /// Sets the culling on the shaders. Note changing this value will result in an instance of the material. + /// </summary> + public bool enableCulling + { + get { return m_isCullingEnabled; } + set { if (m_isCullingEnabled == value) return; m_isCullingEnabled = value; SetCulling(); m_havePropertiesChanged = true; } + } + [SerializeField] + protected bool m_isCullingEnabled = false; + + /// <summary> + /// Controls whether or not the text object will be culled when using a 2D Rect Mask. + /// </summary> + public bool ignoreRectMaskCulling + { + get { return m_ignoreRectMaskCulling; } + set { if (m_ignoreRectMaskCulling == value) return; m_ignoreRectMaskCulling = value; m_havePropertiesChanged = true; } + } + [SerializeField] + protected bool m_ignoreRectMaskCulling; + + + /// <summary> + /// Forces objects that are not visible to get refreshed. + /// </summary> + public bool ignoreVisibility + { + get { return m_ignoreCulling; } + set { if (m_ignoreCulling == value) return; m_havePropertiesChanged = true; m_ignoreCulling = value; } + } + [SerializeField] + protected bool m_ignoreCulling = true; // Not implemented yet. + + + /// <summary> + /// Controls how the face and outline textures will be applied to the text object. + /// </summary> + public TextureMappingOptions horizontalMapping + { + get { return m_horizontalMapping; } + set { if (m_horizontalMapping == value) return; m_havePropertiesChanged = true; m_horizontalMapping = value; SetVerticesDirty(); } + } + [SerializeField] + protected TextureMappingOptions m_horizontalMapping = TextureMappingOptions.Character; + + + /// <summary> + /// Controls how the face and outline textures will be applied to the text object. + /// </summary> + public TextureMappingOptions verticalMapping + { + get { return m_verticalMapping; } + set { if (m_verticalMapping == value) return; m_havePropertiesChanged = true; m_verticalMapping = value; SetVerticesDirty(); } + } + [SerializeField] + protected TextureMappingOptions m_verticalMapping = TextureMappingOptions.Character; + + + /// <summary> + /// Controls the UV Offset for the various texture mapping mode on the text object. + /// </summary> + //public Vector2 mappingUvOffset + //{ + // get { return m_uvOffset; } + // set { if (m_uvOffset == value) return; m_havePropertiesChanged = true; m_uvOffset = value; SetVerticesDirty(); } + //} + //[SerializeField] + //protected Vector2 m_uvOffset = Vector2.zero; // Used to offset UV on Texturing + + + /// <summary> + /// Controls the horizontal offset of the UV of the texture mapping mode for each line of the text object. + /// </summary> + public float mappingUvLineOffset + { + get { return m_uvLineOffset; } + set { if (m_uvLineOffset == value) return; m_havePropertiesChanged = true; m_uvLineOffset = value; SetVerticesDirty(); } + } + [SerializeField] + protected float m_uvLineOffset = 0.0f; // Used for UV line offset per line + + + /// <summary> + /// Determines if the Mesh will be rendered. + /// </summary> + public TextRenderFlags renderMode + { + get { return m_renderMode; } + set { if (m_renderMode == value) return; m_renderMode = value; m_havePropertiesChanged = true; } + } + protected TextRenderFlags m_renderMode = TextRenderFlags.Render; + + + /// <summary> + /// Determines the sorting order of the geometry of the text object. + /// </summary> + public VertexSortingOrder geometrySortingOrder + { + get { return m_geometrySortingOrder; } + + set { m_geometrySortingOrder = value; m_havePropertiesChanged = true; SetVerticesDirty(); } + + } + [SerializeField] + protected VertexSortingOrder m_geometrySortingOrder; + + /// <summary> + /// Determines if the data structures allocated to contain the geometry of the text object will be reduced in size if the number of characters required to display the text is reduced by more than 256 characters. + /// This reduction has the benefit of reducing the amount of vertex data being submitted to the graphic device but results in GC when it occurs. + /// </summary> + public bool vertexBufferAutoSizeReduction + { + get { return m_VertexBufferAutoSizeReduction; } + set { m_VertexBufferAutoSizeReduction = value; m_havePropertiesChanged = true; SetVerticesDirty(); } + } + [SerializeField] + protected bool m_VertexBufferAutoSizeReduction = true; + + /// <summary> + /// The first character which should be made visible in conjunction with the Text Overflow Linked mode. + /// </summary> + public int firstVisibleCharacter + { + get { return m_firstVisibleCharacter; } + set { if (m_firstVisibleCharacter == value) return; m_havePropertiesChanged = true; m_firstVisibleCharacter = value; SetVerticesDirty(); } + } + [SerializeField] + protected int m_firstVisibleCharacter; + + /// <summary> + /// Allows to control how many characters are visible from the input. + /// </summary> + public int maxVisibleCharacters + { + get { return m_maxVisibleCharacters; } + set { if (m_maxVisibleCharacters == value) return; m_havePropertiesChanged = true; m_maxVisibleCharacters = value; SetVerticesDirty(); } + } + protected int m_maxVisibleCharacters = 99999; + + + /// <summary> + /// Allows to control how many words are visible from the input. + /// </summary> + public int maxVisibleWords + { + get { return m_maxVisibleWords; } + set { if (m_maxVisibleWords == value) return; m_havePropertiesChanged = true; m_maxVisibleWords = value; SetVerticesDirty(); } + } + protected int m_maxVisibleWords = 99999; + + + /// <summary> + /// Allows control over how many lines of text are displayed. + /// </summary> + public int maxVisibleLines + { + get { return m_maxVisibleLines; } + set { if (m_maxVisibleLines == value) return; m_havePropertiesChanged = true; m_isInputParsingRequired = true; m_maxVisibleLines = value; SetVerticesDirty(); } + } + protected int m_maxVisibleLines = 99999; + + + /// <summary> + /// Determines if the text's vertical alignment will be adjusted based on visible descender of the text. + /// </summary> + public bool useMaxVisibleDescender + { + get { return m_useMaxVisibleDescender; } + set { if (m_useMaxVisibleDescender == value) return; m_havePropertiesChanged = true; m_isInputParsingRequired = true; SetVerticesDirty(); } + } + [SerializeField] + protected bool m_useMaxVisibleDescender = true; + + + /// <summary> + /// Controls which page of text is shown + /// </summary> + public int pageToDisplay + { + get { return m_pageToDisplay; } + set { if (m_pageToDisplay == value) return; m_havePropertiesChanged = true; m_pageToDisplay = value; SetVerticesDirty(); } + } + [SerializeField] + protected int m_pageToDisplay = 1; + protected bool m_isNewPage = false; + + /// <summary> + /// The margins of the text object. + /// </summary> + public virtual Vector4 margin + { + get { return m_margin; } + set { if (m_margin == value) return; m_margin = value; ComputeMarginSize(); m_havePropertiesChanged = true; SetVerticesDirty(); } + } + [SerializeField] + protected Vector4 m_margin = new Vector4(0, 0, 0, 0); + protected float m_marginLeft; + protected float m_marginRight; + protected float m_marginWidth; // Width of the RectTransform minus left and right margins. + protected float m_marginHeight; // Height of the RectTransform minus top and bottom margins. + protected float m_width = -1; + + + /// <summary> + /// Returns data about the text object which includes information about each character, word, line, link, etc. + /// </summary> + public TMP_TextInfo textInfo + { + get { return m_textInfo; } + } + [SerializeField] + protected TMP_TextInfo m_textInfo; // Class which holds information about the Text object such as characters, lines, mesh data as well as metrics. + + /// <summary> + /// Property tracking if any of the text properties have changed. Flag is set before the text is regenerated. + /// </summary> + public bool havePropertiesChanged + { + get { return m_havePropertiesChanged; } + set { if (m_havePropertiesChanged == value) return; m_havePropertiesChanged = value; m_isInputParsingRequired = true; SetAllDirty(); } + } + //[SerializeField] + protected bool m_havePropertiesChanged; // Used to track when properties of the text object have changed. + + + /// <summary> + /// Property to handle legacy animation component. + /// </summary> + public bool isUsingLegacyAnimationComponent + { + get { return m_isUsingLegacyAnimationComponent; } + set { m_isUsingLegacyAnimationComponent = value; } + } + [SerializeField] + protected bool m_isUsingLegacyAnimationComponent; + + + /// <summary> + /// Returns are reference to the Transform + /// </summary> + public new Transform transform + { + get + { + if (m_transform == null) + m_transform = GetComponent<Transform>(); + return m_transform; + } + } + protected Transform m_transform; + + + /// <summary> + /// Returns are reference to the RectTransform + /// </summary> + public new RectTransform rectTransform + { + get + { + if (m_rectTransform == null) + m_rectTransform = GetComponent<RectTransform>(); + return m_rectTransform; + } + } + protected RectTransform m_rectTransform; + + + /// <summary> + /// Enables control over setting the size of the text container to match the text object. + /// </summary> + public virtual bool autoSizeTextContainer + { + get; + set; + } + protected bool m_autoSizeTextContainer; + + + /// <summary> + /// The mesh used by the font asset and material assigned to the text object. + /// </summary> + public virtual Mesh mesh + { + get { return m_mesh; } + } + protected Mesh m_mesh; + + + /// <summary> + /// Determines if the geometry of the characters will be quads or volumetric (cubes). + /// </summary> + public bool isVolumetricText + { + get { return m_isVolumetricText; } + set { if (m_isVolumetricText == value) return; m_havePropertiesChanged = value; m_textInfo.ResetVertexLayout(value); m_isInputParsingRequired = true; SetVerticesDirty(); SetLayoutDirty(); } + } + [SerializeField] + protected bool m_isVolumetricText; + + /// <summary> + /// Returns the bounds of the mesh of the text object in world space. + /// </summary> + public Bounds bounds + { + get + { + if (m_mesh == null) return new Bounds(); + + return GetCompoundBounds(); + } + } + + /// <summary> + /// Returns the bounds of the text of the text object. + /// </summary> + public Bounds textBounds + { + get + { + if (m_textInfo == null) return new Bounds(); + + return GetTextBounds(); + } + } + + // *** Unity Event Handling *** + + //[Serializable] + //public class TextChangedEvent : UnityEvent { } + + ///// <summary> + ///// Event delegate triggered when text has changed and been rendered. + ///// </summary> + //public TextChangedEvent onTextChanged + //{ + // get { return m_OnTextChanged; } + // set { m_OnTextChanged = value; } + //} + //[SerializeField] + //private TextChangedEvent m_OnTextChanged = new TextChangedEvent(); + + //protected void SendOnTextChanged() + //{ + // if (onTextChanged != null) + // onTextChanged.Invoke(); + //} + + + // *** SPECIAL COMPONENTS *** + + /// <summary> + /// Component used to control wrapping of text following some arbitrary shape. + /// </summary> + //public MarginShaper marginShaper + //{ + // get + // { + // if (m_marginShaper == null) m_marginShaper = GetComponent<MarginShaper>(); + + // return m_marginShaper; + // } + //} + //[SerializeField] + //protected MarginShaper m_marginShaper; + + + /// <summary> + /// Component used to control and animate sprites in the text object. + /// </summary> + protected TMP_SpriteAnimator spriteAnimator + { + get + { + if (m_spriteAnimator == null) + { + m_spriteAnimator = GetComponent<TMP_SpriteAnimator>(); + if (m_spriteAnimator == null) m_spriteAnimator = gameObject.AddComponent<TMP_SpriteAnimator>(); + } + + return m_spriteAnimator; + } + + } + [SerializeField] + protected TMP_SpriteAnimator m_spriteAnimator; + + + /// <summary> + /// + /// </summary> + //public TMP_TextShaper textShaper + //{ + // get + // { + // if (m_textShaper == null) + // m_textShaper = GetComponent<TMP_TextShaper>(); + + // return m_textShaper; + // } + //} + //[SerializeField] + //protected TMP_TextShaper m_textShaper; + + // *** PROPERTIES RELATED TO UNITY LAYOUT SYSTEM *** + /// <summary> + /// + /// </summary> + public float flexibleHeight { get { return m_flexibleHeight; } } + protected float m_flexibleHeight = -1f; + + /// <summary> + /// + /// </summary> + public float flexibleWidth { get { return m_flexibleWidth; } } + protected float m_flexibleWidth = -1f; + + /// <summary> + /// + /// </summary> + public float minWidth { get { return m_minWidth; } } + protected float m_minWidth; + + /// <summary> + /// + /// </summary> + public float minHeight { get { return m_minHeight; } } + protected float m_minHeight; + + /// <summary> + /// + /// </summary> + public float maxWidth { get { return m_maxWidth; } } + protected float m_maxWidth; + + /// <summary> + /// + /// </summary> + public float maxHeight { get { return m_maxHeight; } } + protected float m_maxHeight; + + /// <summary> + /// + /// </summary> + protected LayoutElement layoutElement + { + get + { + if (m_LayoutElement == null) + { + m_LayoutElement = GetComponent<LayoutElement>(); + } + + return m_LayoutElement; + } + } + protected LayoutElement m_LayoutElement; + + /// <summary> + /// Computed preferred width of the text object. + /// </summary> + public virtual float preferredWidth { get { if (!m_isPreferredWidthDirty) return m_preferredWidth; m_preferredWidth = GetPreferredWidth(); return m_preferredWidth; } } + protected float m_preferredWidth; + protected float m_renderedWidth; + protected bool m_isPreferredWidthDirty; + + /// <summary> + /// Computed preferred height of the text object. + /// </summary> + public virtual float preferredHeight { get { if (!m_isPreferredHeightDirty) return m_preferredHeight; m_preferredHeight = GetPreferredHeight(); return m_preferredHeight; } } + protected float m_preferredHeight; + protected float m_renderedHeight; + protected bool m_isPreferredHeightDirty; + + protected bool m_isCalculatingPreferredValues; + private int m_recursiveCount; + + /// <summary> + /// Compute the rendered width of the text object. + /// </summary> + public virtual float renderedWidth { get { return GetRenderedWidth(); } } + + + /// <summary> + /// Compute the rendered height of the text object. + /// </summary> + public virtual float renderedHeight { get { return GetRenderedHeight(); } } + + + /// <summary> + /// + /// </summary> + public int layoutPriority { get { return m_layoutPriority; } } + protected int m_layoutPriority = 0; + + protected bool m_isCalculateSizeRequired = false; + protected bool m_isLayoutDirty; + + protected bool m_verticesAlreadyDirty; + protected bool m_layoutAlreadyDirty; + + protected bool m_isAwake; + internal bool m_isWaitingOnResourceLoad; + + internal bool m_isInputParsingRequired = false; // Used to determine if the input text needs to be re-parsed. + + // Protected Fields + internal enum TextInputSources { Text = 0, SetText = 1, SetCharArray = 2, String = 3 }; + //[SerializeField] + internal TextInputSources m_inputSource; + protected string old_text; // Used by SetText to determine if the text has changed. + //protected float old_arg0, old_arg1, old_arg2; // Used by SetText to determine if the args have changed. + + + protected float m_fontScale; // Scaling of the font based on Atlas true Font Size and Rendered Font Size. + protected float m_fontScaleMultiplier; // Used for handling of superscript and subscript. + + protected char[] m_htmlTag = new char[128]; // Maximum length of rich text tag. This is preallocated to avoid GC. + protected RichTextTagAttribute[] m_xmlAttribute = new RichTextTagAttribute[8]; + + protected float[] m_attributeParameterValues = new float[16]; + + protected float tag_LineIndent = 0; + protected float tag_Indent = 0; + protected TMP_RichTextTagStack<float> m_indentStack = new TMP_RichTextTagStack<float>(new float[16]); + protected bool tag_NoParsing; + //protected TMP_LinkInfo tag_LinkInfo = new TMP_LinkInfo(); + + protected bool m_isParsingText; + protected Matrix4x4 m_FXMatrix; + protected bool m_isFXMatrixSet; + + + protected UnicodeChar[] m_TextParsingBuffer; // This array holds the characters to be processed by GenerateMesh(); + + protected struct UnicodeChar + { + public int unicode; + public int stringIndex; + public int length; + } + //protected UnicodeChar[] m_InternalParsingBuffer; + + private TMP_CharacterInfo[] m_internalCharacterInfo; // Used by functions to calculate preferred values. + protected char[] m_input_CharArray = new char[256]; // This array hold the characters from the SetText(); + private int m_charArray_Length = 0; + protected int m_totalCharacterCount; + + // Structures used to save the state of the text layout in conjunction with line breaking / word wrapping. + protected WordWrapState m_SavedWordWrapState = new WordWrapState(); + protected WordWrapState m_SavedLineState = new WordWrapState(); + //protected WordWrapState m_SavedAlignment = new WordWrapState (); + + + // Fields whose state is saved in conjunction with text parsing and word wrapping. + protected int m_characterCount; + //protected int m_visibleCharacterCount; + //protected int m_visibleSpriteCount; + protected int m_firstCharacterOfLine; + protected int m_firstVisibleCharacterOfLine; + protected int m_lastCharacterOfLine; + protected int m_lastVisibleCharacterOfLine; + protected int m_lineNumber; + protected int m_lineVisibleCharacterCount; + protected int m_pageNumber; + protected float m_maxAscender; + protected float m_maxCapHeight; + protected float m_maxDescender; + protected float m_maxLineAscender; + protected float m_maxLineDescender; + protected float m_startOfLineAscender; + //protected float m_maxFontScale; + protected float m_lineOffset; + protected Extents m_meshExtents; + + + // Fields used for vertex colors + protected Color32 m_htmlColor = new Color(255, 255, 255, 128); + protected TMP_RichTextTagStack<Color32> m_colorStack = new TMP_RichTextTagStack<Color32>(new Color32[16]); + protected TMP_RichTextTagStack<Color32> m_underlineColorStack = new TMP_RichTextTagStack<Color32>(new Color32[16]); + protected TMP_RichTextTagStack<Color32> m_strikethroughColorStack = new TMP_RichTextTagStack<Color32>(new Color32[16]); + protected TMP_RichTextTagStack<Color32> m_highlightColorStack = new TMP_RichTextTagStack<Color32>(new Color32[16]); + + protected TMP_ColorGradient m_colorGradientPreset; + protected TMP_RichTextTagStack<TMP_ColorGradient> m_colorGradientStack = new TMP_RichTextTagStack<TMP_ColorGradient>(new TMP_ColorGradient[16]); + + protected float m_tabSpacing = 0; + protected float m_spacing = 0; + + + //protected bool IsRectTransformDriven; + + + // STYLE TAGS + protected TMP_RichTextTagStack<int> m_styleStack = new TMP_RichTextTagStack<int>(new int[16]); + protected TMP_RichTextTagStack<int> m_actionStack = new TMP_RichTextTagStack<int>(new int[16]); + + protected float m_padding = 0; + protected float m_baselineOffset; // Used for superscript and subscript. + protected TMP_RichTextTagStack<float> m_baselineOffsetStack = new TMP_RichTextTagStack<float>(new float[16]); + protected float m_xAdvance; // Tracks x advancement from character to character. + + protected TMP_TextElementType m_textElementType; + protected TMP_TextElement m_cached_TextElement; // Glyph / Character information is cached into this variable which is faster than having to fetch from the Dictionary multiple times. + protected TMP_Character m_cached_Underline_Character; // Same as above but for the underline character which is used for Underline. + protected TMP_Character m_cached_Ellipsis_Character; + + protected TMP_SpriteAsset m_defaultSpriteAsset; + protected TMP_SpriteAsset m_currentSpriteAsset; + protected int m_spriteCount = 0; + protected int m_spriteIndex; + protected int m_spriteAnimationID; + //protected TMP_XmlTagStack<int> m_spriteAnimationStack = new TMP_XmlTagStack<int>(new int[16]); + + + /// <summary> + /// Method which derived classes need to override to load Font Assets. + /// </summary> + protected virtual void LoadFontAsset() { } + + /// <summary> + /// Function called internally when a new shared material is assigned via the fontSharedMaterial property. + /// </summary> + /// <param name="mat"></param> + protected virtual void SetSharedMaterial(Material mat) { } + + /// <summary> + /// Function called internally when a new material is assigned via the fontMaterial property. + /// </summary> + protected virtual Material GetMaterial(Material mat) { return null; } + + /// <summary> + /// Function called internally when assigning a new base material. + /// </summary> + /// <param name="mat"></param> + protected virtual void SetFontBaseMaterial(Material mat) { } + + /// <summary> + /// Method which returns an array containing the materials used by the text object. + /// </summary> + /// <returns></returns> + protected virtual Material[] GetSharedMaterials() { return null; } + + /// <summary> + /// + /// </summary> + protected virtual void SetSharedMaterials(Material[] materials) { } + + /// <summary> + /// Method returning instances of the materials used by the text object. + /// </summary> + /// <returns></returns> + protected virtual Material[] GetMaterials(Material[] mats) { return null; } + + /// <summary> + /// Method to set the materials of the text and sub text objects. + /// </summary> + /// <param name="mats"></param> + //protected virtual void SetMaterials (Material[] mats) { } + + /// <summary> + /// Function used to create an instance of the material + /// </summary> + /// <param name="source"></param> + /// <returns></returns> + protected virtual Material CreateMaterialInstance(Material source) + { + Material mat = new Material(source); + mat.shaderKeywords = source.shaderKeywords; + mat.name += " (Instance)"; + + return mat; + } + + protected void SetVertexColorGradient(TMP_ColorGradient gradient) + { + if (gradient == null) return; + + m_fontColorGradient.bottomLeft = gradient.bottomLeft; + m_fontColorGradient.bottomRight = gradient.bottomRight; + m_fontColorGradient.topLeft = gradient.topLeft; + m_fontColorGradient.topRight = gradient.topRight; + + SetVerticesDirty(); + } + + /// <summary> + /// Function to control the sorting of the geometry of the text object. + /// </summary> + protected void SetTextSortingOrder(VertexSortingOrder order) + { + + } + + /// <summary> + /// Function to sort the geometry of the text object in accordance to the provided order. + /// </summary> + /// <param name="order"></param> + protected void SetTextSortingOrder(int[] order) + { + + } + + /// <summary> + /// Function called internally to set the face color of the material. This will results in an instance of the material. + /// </summary> + /// <param name="color"></param> + protected virtual void SetFaceColor(Color32 color) { } + + /// <summary> + /// Function called internally to set the outline color of the material. This will results in an instance of the material. + /// </summary> + /// <param name="color"></param> + protected virtual void SetOutlineColor(Color32 color) { } + + /// <summary> + /// Function called internally to set the outline thickness property of the material. This will results in an instance of the material. + /// </summary> + /// <param name="thickness"></param> + protected virtual void SetOutlineThickness(float thickness) { } + + /// <summary> + /// Set the Render Queue and ZTest mode on the current material + /// </summary> + protected virtual void SetShaderDepth() { } + + /// <summary> + /// Set the culling mode on the material. + /// </summary> + protected virtual void SetCulling() { } + + /// <summary> + /// Get the padding value for the currently assigned material + /// </summary> + /// <returns></returns> + protected virtual float GetPaddingForMaterial() { return 0; } + + + /// <summary> + /// Get the padding value for the given material + /// </summary> + /// <returns></returns> + protected virtual float GetPaddingForMaterial(Material mat) { return 0; } + + + /// <summary> + /// Method to return the local corners of the Text Container or RectTransform. + /// </summary> + /// <returns></returns> + protected virtual Vector3[] GetTextContainerLocalCorners() { return null; } + + + // PUBLIC FUNCTIONS + protected bool m_ignoreActiveState; + /// <summary> + /// Function to force the regeneration of the text object. + /// </summary> + public virtual void ForceMeshUpdate() { } + + + /// <summary> + /// Method used for resetting vertex layout when switching to and from Volumetric Text mode. + /// </summary> + /// <param name="updateMesh"></param> + //protected virtual void ResetVertexLayout() { } + + + /// <summary> + /// Function to force the regeneration of the text object. + /// </summary> + /// <param name="ignoreActiveState">If set to true, the text object will be regenerated regardless of is active state.</param> + public virtual void ForceMeshUpdate(bool ignoreActiveState) { } + + + /// <summary> + /// Internal function used by the Text Input Field to populate TMP_TextInfo data. + /// </summary> + internal void SetTextInternal(string text) + { + m_text = text; + m_renderMode = TextRenderFlags.DontRender; + m_isInputParsingRequired = true; + ForceMeshUpdate(); + m_renderMode = TextRenderFlags.Render; + } + + /// <summary> + /// Function to force the regeneration of the text object. + /// </summary> + /// <param name="flags"> Flags to control which portions of the geometry gets uploaded.</param> + //public virtual void ForceMeshUpdate(TMP_VertexDataUpdateFlags flags) { } + + + /// <summary> + /// Function to update the geometry of the main and sub text objects. + /// </summary> + /// <param name="mesh"></param> + /// <param name="index"></param> + public virtual void UpdateGeometry(Mesh mesh, int index) { } + + + /// <summary> + /// Function to push the updated vertex data into the mesh and renderer. + /// </summary> + public virtual void UpdateVertexData(TMP_VertexDataUpdateFlags flags) { } + + + /// <summary> + /// Function to push the updated vertex data into the mesh and renderer. + /// </summary> + public virtual void UpdateVertexData() { } + + + /// <summary> + /// Function to push a new set of vertices to the mesh. + /// </summary> + /// <param name="vertices"></param> + public virtual void SetVertices(Vector3[] vertices) { } + + + /// <summary> + /// Function to be used to force recomputing of character padding when Shader / Material properties have been changed via script. + /// </summary> + public virtual void UpdateMeshPadding() { } + + + /// <summary> + /// + /// </summary> + //public virtual new void UpdateGeometry() { } + + + /// <summary> + /// Tweens the CanvasRenderer color associated with this Graphic. + /// </summary> + /// <param name="targetColor">Target color.</param> + /// <param name="duration">Tween duration.</param> + /// <param name="ignoreTimeScale">Should ignore Time.scale?</param> + /// <param name="useAlpha">Should also Tween the alpha channel?</param> + public override void CrossFadeColor(Color targetColor, float duration, bool ignoreTimeScale, bool useAlpha) + { + base.CrossFadeColor(targetColor, duration, ignoreTimeScale, useAlpha); + InternalCrossFadeColor(targetColor, duration, ignoreTimeScale, useAlpha); + } + + + /// <summary> + /// Tweens the alpha of the CanvasRenderer color associated with this Graphic. + /// </summary> + /// <param name="alpha">Target alpha.</param> + /// <param name="duration">Duration of the tween in seconds.</param> + /// <param name="ignoreTimeScale">Should ignore Time.scale?</param> + public override void CrossFadeAlpha(float alpha, float duration, bool ignoreTimeScale) + { + base.CrossFadeAlpha(alpha, duration, ignoreTimeScale); + InternalCrossFadeAlpha(alpha, duration, ignoreTimeScale); + } + + + /// <summary> + /// + /// </summary> + /// <param name="targetColor"></param> + /// <param name="duration"></param> + /// <param name="ignoreTimeScale"></param> + /// <param name="useAlpha"></param> + /// <param name="useRGB"></param> + protected virtual void InternalCrossFadeColor(Color targetColor, float duration, bool ignoreTimeScale, bool useAlpha) { } + + + /// <summary> + /// + /// </summary> + /// <param name="alpha"></param> + /// <param name="duration"></param> + /// <param name="ignoreTimeScale"></param> + protected virtual void InternalCrossFadeAlpha(float alpha, float duration, bool ignoreTimeScale) { } + + + /// <summary> + /// Method to parse the input text based on its source + /// </summary> + protected void ParseInputText() + { + //Debug.Log("Re-parsing Text."); + ////Profiler.BeginSample("ParseInputText()"); + + m_isInputParsingRequired = false; + + switch (m_inputSource) + { + case TextInputSources.String: + case TextInputSources.Text: + StringToCharArray(m_text, ref m_TextParsingBuffer); + break; + case TextInputSources.SetText: + SetTextArrayToCharArray(m_input_CharArray, ref m_TextParsingBuffer); + break; + case TextInputSources.SetCharArray: + break; + } + + SetArraySizes(m_TextParsingBuffer); + ////Profiler.EndSample(); + } + + + /// <summary> + /// + /// </summary> + /// <param name="text"></param> + public void SetText(string text) + { + SetText(text, true); + } + + + /// <summary> + /// + /// </summary> + /// <param name="text"></param> + public void SetText(string text, bool syncTextInputBox) + { + //if (text == old_text) return; + + //old_text = text; + + m_inputSource = TextInputSources.SetCharArray; + + StringToCharArray(text, ref m_TextParsingBuffer); + + #if UNITY_EDITOR + // Set the text in the Text Input Box in the Unity Editor only. + // TODO: Could revise to convert to string literal + if (syncTextInputBox) + m_text = text; + #endif + + m_isInputParsingRequired = true; + m_havePropertiesChanged = true; + m_isCalculateSizeRequired = true; + + SetVerticesDirty(); + SetLayoutDirty(); + } + + + /// <summary> + /// <para>Formatted string containing a pattern and a value representing the text to be rendered.</para> + /// <para>ex. TextMeshPro.SetText ("Number is {0:1}.", 5.56f);</para> + /// </summary> + /// <typeparam name="T"></typeparam> + /// <param name="text">String containing the pattern."</param> + /// <param name="arg0">Value is a float.</param> + public void SetText(string text, float arg0) + { + SetText(text, arg0, 255, 255); + } + + /// <summary> + /// <para>Formatted string containing a pattern and a value representing the text to be rendered.</para> + /// <para>ex. TextMeshPro.SetText ("First number is {0} and second is {1:2}.", 10, 5.756f);</para> + /// </summary> + /// <typeparam name="T"></typeparam> + /// <param name="text">String containing the pattern."</param> + /// <param name="arg0">Value is a float.</param> + /// <param name="arg1">Value is a float.</param> + public void SetText(string text, float arg0, float arg1) + { + SetText(text, arg0, arg1, 255); + } + + /// <summary> + /// <para>Formatted string containing a pattern and a value representing the text to be rendered.</para> + /// <para>ex. TextMeshPro.SetText ("A = {0}, B = {1} and C = {2}.", 2, 5, 7);</para> + /// </summary> + /// <typeparam name="T"></typeparam> + /// <param name="text">String containing the pattern."</param> + /// <param name="arg0">Value is a float.</param> + /// <param name="arg1">Value is a float.</param> + /// <param name="arg2">Value is a float.</param> + public void SetText(string text, float arg0, float arg1, float arg2) + { + int decimalPrecision = 0; + int index = 0; + + for (int i = 0; i < text.Length; i++) + { + char c = text[i]; + + if (c == 123) // '{' + { + // Check if user is requesting some decimal precision. Format is {0:2} + if (text[i + 2] == 58) // ':' + { + decimalPrecision = text[i + 3] - 48; + } + + switch (text[i + 1] - 48) + { + case 0: // 1st Arg + AddFloatToCharArray(arg0, ref index, decimalPrecision); + break; + case 1: // 2nd Arg + AddFloatToCharArray(arg1, ref index, decimalPrecision); + break; + case 2: // 3rd Arg + AddFloatToCharArray(arg2, ref index, decimalPrecision); + break; + } + + if (text[i + 2] == 58) + i += 4; + else + i += 2; + + continue; + } + m_input_CharArray[index] = c; + index += 1; + } + + m_input_CharArray[index] = (char)0; + m_charArray_Length = index; // Set the length to where this '0' termination is. + + #if UNITY_EDITOR + // Create new string to be displayed in the Input Text Box of the Editor Panel. + m_text = new string(m_input_CharArray, 0, index); + #endif + + m_inputSource = TextInputSources.SetText; + m_isInputParsingRequired = true; + m_havePropertiesChanged = true; + m_isCalculateSizeRequired = true; + + SetVerticesDirty(); + SetLayoutDirty(); + } + + + /// <summary> + /// Set the text using a StringBuilder. + /// </summary> + /// <description> + /// Using a StringBuilder instead of concatenating strings prevents memory pollution with temporary objects. + /// </description> + /// <param name="text">StringBuilder with text to display.</param> + public void SetText(StringBuilder text) + { + m_inputSource = TextInputSources.SetCharArray; + + #if UNITY_EDITOR + // Set the text in the Text Input Box in the Unity Editor only. + m_text = text.ToString(); + #endif + + StringBuilderToIntArray(text, ref m_TextParsingBuffer); + + m_isInputParsingRequired = true; + m_havePropertiesChanged = true; + m_isCalculateSizeRequired = true; + + SetVerticesDirty(); + SetLayoutDirty(); + } + + + /// <summary> + /// Character array containing the text to be displayed. + /// </summary> + /// <param name="sourceText"></param> + public void SetCharArray(char[] sourceText) + { + // Initialize internal character buffer if necessary + if (m_TextParsingBuffer == null) m_TextParsingBuffer = new UnicodeChar[8]; + + #if UNITY_EDITOR + // Create new string to be displayed in the Input Text Box of the Editor Panel. + if (sourceText == null || sourceText.Length == 0) + m_text = string.Empty; + else + m_text = new string(sourceText); + #endif + + // Clear the Style stack. + m_styleStack.Clear(); + + int writeIndex = 0; + + for (int i = 0; sourceText != null && i < sourceText.Length; i++) + { + if (sourceText[i] == 92 && i < sourceText.Length - 1) + { + switch ((int)sourceText[i + 1]) + { + case 110: // \n LineFeed + if (writeIndex == m_TextParsingBuffer.Length) ResizeInternalArray(ref m_TextParsingBuffer); + + m_TextParsingBuffer[writeIndex].unicode = 10; + i += 1; + writeIndex += 1; + continue; + case 114: // \r LineFeed + if (writeIndex == m_TextParsingBuffer.Length) ResizeInternalArray(ref m_TextParsingBuffer); + + m_TextParsingBuffer[writeIndex].unicode = 13; + i += 1; + writeIndex += 1; + continue; + case 116: // \t Tab + if (writeIndex == m_TextParsingBuffer.Length) ResizeInternalArray(ref m_TextParsingBuffer); + + m_TextParsingBuffer[writeIndex].unicode = 9; + i += 1; + writeIndex += 1; + continue; + } + } + + // Handle inline replacement of <stlye> and <br> tags. + if (sourceText[i] == 60) + { + if (IsTagName(ref sourceText, "<BR>", i)) + { + if (writeIndex == m_TextParsingBuffer.Length) ResizeInternalArray(ref m_TextParsingBuffer); + + m_TextParsingBuffer[writeIndex].unicode = 10; ; + writeIndex += 1; + i += 3; + + continue; + } + else if (IsTagName(ref sourceText, "<STYLE=", i)) + { + int srcOffset; + + if (ReplaceOpeningStyleTag(ref sourceText, i, out srcOffset, ref m_TextParsingBuffer, ref writeIndex)) + { + i = srcOffset; + continue; + } + } + else if (IsTagName(ref sourceText, "</STYLE>", i)) + { + ReplaceClosingStyleTag(ref sourceText, i, ref m_TextParsingBuffer, ref writeIndex); + + // Strip </style> even if style is invalid. + i += 7; + continue; + } + } + + if (writeIndex == m_TextParsingBuffer.Length) ResizeInternalArray(ref m_TextParsingBuffer); + + m_TextParsingBuffer[writeIndex].unicode = sourceText[i]; + writeIndex += 1; + } + + if (writeIndex == m_TextParsingBuffer.Length) ResizeInternalArray(ref m_TextParsingBuffer); + + m_TextParsingBuffer[writeIndex].unicode = 0; + + m_inputSource = TextInputSources.SetCharArray; + m_isInputParsingRequired = true; + m_havePropertiesChanged = true; + m_isCalculateSizeRequired = true; + + SetVerticesDirty(); + SetLayoutDirty(); + } + + + /// <summary> + /// Character array containing the text to be displayed. + /// </summary> + /// <param name="sourceText"></param> + public void SetCharArray(char[] sourceText, int start, int length) + { + // Initialize internal character buffer if necessary + if (m_TextParsingBuffer == null) m_TextParsingBuffer = new UnicodeChar[8]; + + #if UNITY_EDITOR + // Create new string to be displayed in the Input Text Box of the Editor Panel. + if (sourceText == null || sourceText.Length == 0 || length == 0) + { + m_text = string.Empty; + start = 0; + length = 0; + } + else + { + // TODO: Add potential range check on start + length relative to array size. + m_text = new string(sourceText, start, length); + } + #endif + + // Clear the Style stack. + m_styleStack.Clear(); + + int writeIndex = 0; + + int i = start; + int end = start + length; + for (; i < end; i++) + { + if (sourceText[i] == 92 && i < length - 1) + { + switch ((int)sourceText[i + 1]) + { + case 110: // \n LineFeed + if (writeIndex == m_TextParsingBuffer.Length) ResizeInternalArray(ref m_TextParsingBuffer); + + m_TextParsingBuffer[writeIndex].unicode = 10; + i += 1; + writeIndex += 1; + continue; + case 114: // \r LineFeed + if (writeIndex == m_TextParsingBuffer.Length) ResizeInternalArray(ref m_TextParsingBuffer); + + m_TextParsingBuffer[writeIndex].unicode = 13; + i += 1; + writeIndex += 1; + continue; + case 116: // \t Tab + if (writeIndex == m_TextParsingBuffer.Length) ResizeInternalArray(ref m_TextParsingBuffer); + + m_TextParsingBuffer[writeIndex].unicode = 9; + i += 1; + writeIndex += 1; + continue; + } + } + + // Handle inline replacement of <stlye> and <br> tags. + if (sourceText[i] == 60) + { + if (IsTagName(ref sourceText, "<BR>", i)) + { + if (writeIndex == m_TextParsingBuffer.Length) ResizeInternalArray(ref m_TextParsingBuffer); + + m_TextParsingBuffer[writeIndex].unicode = 10; + writeIndex += 1; + i += 3; + + continue; + } + else if (IsTagName(ref sourceText, "<STYLE=", i)) + { + int srcOffset; + + if (ReplaceOpeningStyleTag(ref sourceText, i, out srcOffset, ref m_TextParsingBuffer, ref writeIndex)) + { + i = srcOffset; + continue; + } + } + else if (IsTagName(ref sourceText, "</STYLE>", i)) + { + ReplaceClosingStyleTag(ref sourceText, i, ref m_TextParsingBuffer, ref writeIndex); + + // Strip </style> even if style is invalid. + i += 7; + continue; + } + } + + if (writeIndex == m_TextParsingBuffer.Length) ResizeInternalArray(ref m_TextParsingBuffer); + + m_TextParsingBuffer[writeIndex].unicode = sourceText[i]; + writeIndex += 1; + } + + if (writeIndex == m_TextParsingBuffer.Length) ResizeInternalArray(ref m_TextParsingBuffer); + + m_TextParsingBuffer[writeIndex].unicode = 0; + + m_inputSource = TextInputSources.SetCharArray; + m_havePropertiesChanged = true; + m_isInputParsingRequired = true; + m_isCalculateSizeRequired = true; + + SetVerticesDirty(); + SetLayoutDirty(); + } + + + /// <summary> + /// Character array containing the text to be displayed. + /// </summary> + /// <param name="sourceText"></param> + public void SetCharArray(int[] sourceText, int start, int length) + { + // Initialize internal character buffer if necessary + if (m_TextParsingBuffer == null) m_TextParsingBuffer = new UnicodeChar[8]; + + #if UNITY_EDITOR + // Create new string to be displayed in the Input Text Box of the Editor Panel. + if (sourceText == null || sourceText.Length == 0 || length == 0) + { + m_text = string.Empty; + start = 0; + length = 0; + } + else + { + m_text = sourceText.IntToString(start, length); + } + #endif + + // Clear the Style stack. + m_styleStack.Clear(); + + int writeIndex = 0; + + int end = start + length; + for (int i = start; i < end && i < sourceText.Length; i++) + { + if (sourceText[i] == 92 && i < length - 1) + { + switch ((int)sourceText[i + 1]) + { + case 110: // \n LineFeed + if (writeIndex == m_TextParsingBuffer.Length) ResizeInternalArray(ref m_TextParsingBuffer); + + m_TextParsingBuffer[writeIndex].unicode = 10; + i += 1; + writeIndex += 1; + continue; + case 114: // \r LineFeed + if (writeIndex == m_TextParsingBuffer.Length) ResizeInternalArray(ref m_TextParsingBuffer); + + m_TextParsingBuffer[writeIndex].unicode = 13; + i += 1; + writeIndex += 1; + continue; + case 116: // \t Tab + if (writeIndex == m_TextParsingBuffer.Length) ResizeInternalArray(ref m_TextParsingBuffer); + + m_TextParsingBuffer[writeIndex].unicode = 9; + i += 1; + writeIndex += 1; + continue; + } + } + + // Handle inline replacement of <stlye> and <br> tags. + if (sourceText[i] == 60) + { + if (IsTagName(ref sourceText, "<BR>", i)) + { + if (writeIndex == m_TextParsingBuffer.Length) ResizeInternalArray(ref m_TextParsingBuffer); + + m_TextParsingBuffer[writeIndex].unicode = 10; + writeIndex += 1; + i += 3; + + continue; + } + else if (IsTagName(ref sourceText, "<STYLE=", i)) + { + int srcOffset; + + if (ReplaceOpeningStyleTag(ref sourceText, i, out srcOffset, ref m_TextParsingBuffer, ref writeIndex)) + { + i = srcOffset; + continue; + } + } + else if (IsTagName(ref sourceText, "</STYLE>", i)) + { + ReplaceClosingStyleTag(ref sourceText, i, ref m_TextParsingBuffer, ref writeIndex); + + // Strip </style> even if style is invalid. + i += 7; + continue; + } + } + + if (writeIndex == m_TextParsingBuffer.Length) ResizeInternalArray(ref m_TextParsingBuffer); + + m_TextParsingBuffer[writeIndex].unicode = sourceText[i]; + writeIndex += 1; + } + + if (writeIndex == m_TextParsingBuffer.Length) ResizeInternalArray(ref m_TextParsingBuffer); + + m_TextParsingBuffer[writeIndex].unicode = 0; + + m_inputSource = TextInputSources.SetCharArray; + m_havePropertiesChanged = true; + m_isInputParsingRequired = true; + m_isCalculateSizeRequired = true; + + SetVerticesDirty(); + SetLayoutDirty(); + } + + + /// <summary> + /// Copies Content of formatted SetText() to charBuffer. + /// </summary> + /// <param name="sourceText"></param> + /// <param name="charBuffer"></param> + protected void SetTextArrayToCharArray(char[] sourceText, ref UnicodeChar[] charBuffer) + { + //Debug.Log("SetText Array to Char called."); + if (sourceText == null || m_charArray_Length == 0) + return; + + if (charBuffer == null) charBuffer = new UnicodeChar[8]; + + // Clear the Style stack. + m_styleStack.Clear(); + + int writeIndex = 0; + + for (int i = 0; i < m_charArray_Length; i++) + { + // Handle UTF-32 in the input text (string). + if (char.IsHighSurrogate(sourceText[i]) && char.IsLowSurrogate(sourceText[i + 1])) + { + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = char.ConvertToUtf32(sourceText[i], sourceText[i + 1]); + i += 1; + writeIndex += 1; + continue; + } + + // Handle inline replacement of <stlye> and <br> tags. + if (sourceText[i] == 60) + { + if (IsTagName(ref sourceText, "<BR>", i)) + { + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = 10; + writeIndex += 1; + i += 3; + + continue; + } + else if (IsTagName(ref sourceText, "<STYLE=", i)) + { + int srcOffset; + + if (ReplaceOpeningStyleTag(ref sourceText, i, out srcOffset, ref charBuffer, ref writeIndex)) + { + i = srcOffset; + continue; + } + } + else if (IsTagName(ref sourceText, "</STYLE>", i)) + { + ReplaceClosingStyleTag(ref sourceText, i, ref charBuffer, ref writeIndex); + + // Strip </style> even if style is invalid. + i += 7; + continue; + } + } + + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = sourceText[i]; + writeIndex += 1; + } + + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = 0; + } + + + /// <summary> + /// Method to store the content of a string into an integer array. + /// </summary> + /// <param name="sourceText"></param> + /// <param name="charBuffer"></param> + protected void StringToCharArray(string sourceText, ref UnicodeChar[] charBuffer) + { + if (sourceText == null) + { + charBuffer[0].unicode = 0; + return; + } + + if (charBuffer == null) charBuffer = new UnicodeChar[8]; + + // Clear the Style stack. + m_styleStack.SetDefault(0); + + int writeIndex = 0; + + for (int i = 0; i < sourceText.Length; i++) + { + if (m_inputSource == TextInputSources.Text && sourceText[i] == 92 && sourceText.Length > i + 1) + { + switch ((int)sourceText[i + 1]) + { + case 85: // \U00000000 for UTF-32 Unicode + if (sourceText.Length > i + 9) + { + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = GetUTF32(sourceText, i + 2); + charBuffer[writeIndex].stringIndex = i; + charBuffer[writeIndex].length = 10; + + i += 9; + writeIndex += 1; + continue; + } + break; + case 92: // \ escape + if (!m_parseCtrlCharacters) break; + + if (sourceText.Length <= i + 2) break; + + if (writeIndex + 2 > charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = sourceText[i + 1]; + charBuffer[writeIndex + 1].unicode = sourceText[i + 2]; + i += 2; + writeIndex += 2; + continue; + case 110: // \n LineFeed + if (!m_parseCtrlCharacters) break; + + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = 10; + charBuffer[writeIndex].stringIndex = i; + charBuffer[writeIndex].length = 1; + + i += 1; + writeIndex += 1; + continue; + case 114: // \r + if (!m_parseCtrlCharacters) break; + + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = 13; + charBuffer[writeIndex].stringIndex = i; + charBuffer[writeIndex].length = 1; + + i += 1; + writeIndex += 1; + continue; + case 116: // \t Tab + if (!m_parseCtrlCharacters) break; + + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = 9; + charBuffer[writeIndex].stringIndex = i; + charBuffer[writeIndex].length = 1; + + i += 1; + writeIndex += 1; + continue; + case 117: // \u0000 for UTF-16 Unicode + if (sourceText.Length > i + 5) + { + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = GetUTF16(sourceText, i + 2); + charBuffer[writeIndex].stringIndex = i; + charBuffer[writeIndex].length = 6; + + i += 5; + writeIndex += 1; + continue; + } + break; + } + } + + // Handle UTF-32 in the input text (string). // Not sure this is needed // + if (char.IsHighSurrogate(sourceText[i]) && char.IsLowSurrogate(sourceText[i + 1])) + { + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = char.ConvertToUtf32(sourceText[i], sourceText[i + 1]); + charBuffer[writeIndex].stringIndex = i; + charBuffer[writeIndex].length = 2; + + i += 1; + writeIndex += 1; + continue; + } + + //// Handle inline replacement of <stlye> and <br> tags. + if (sourceText[i] == 60 && m_isRichText) + { + if (IsTagName(ref sourceText, "<BR>", i)) + { + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = 10; + charBuffer[writeIndex].stringIndex = i; + charBuffer[writeIndex].length = 1; + + writeIndex += 1; + i += 3; + + continue; + } + else if (IsTagName(ref sourceText, "<STYLE=", i)) + { + int srcOffset; + + if (ReplaceOpeningStyleTag(ref sourceText, i, out srcOffset, ref charBuffer, ref writeIndex)) + { + i = srcOffset; + continue; + } + } + else if (IsTagName(ref sourceText, "</STYLE>", i)) + { + ReplaceClosingStyleTag(ref sourceText, i, ref charBuffer, ref writeIndex); + + // Strip </style> even if style is invalid. + i += 7; + continue; + } + } + + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = sourceText[i]; + charBuffer[writeIndex].stringIndex = i; + charBuffer[writeIndex].length = 1; + + writeIndex += 1; + } + + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = 0; + } + + + /// <summary> + /// Copy contents of StringBuilder into int array. + /// </summary> + /// <param name="sourceText">Text to copy.</param> + /// <param name="charBuffer">Array to store contents.</param> + protected void StringBuilderToIntArray(StringBuilder sourceText, ref UnicodeChar[] charBuffer) + { + if (sourceText == null) + { + charBuffer[0].unicode = 0; + return; + } + + if (charBuffer == null) charBuffer = new UnicodeChar[8]; + + // Clear the Style stack. + m_styleStack.Clear(); + + #if UNITY_EDITOR + // Create new string to be displayed in the Input Text Box of the Editor Panel. + m_text = sourceText.ToString(); + #endif + + int writeIndex = 0; + + for (int i = 0; i < sourceText.Length; i++) + { + if (m_parseCtrlCharacters && sourceText[i] == 92 && sourceText.Length > i + 1) + { + switch ((int)sourceText[i + 1]) + { + case 85: // \U00000000 for UTF-32 Unicode + if (sourceText.Length > i + 9) + { + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = GetUTF32(sourceText, i + 2); + i += 9; + writeIndex += 1; + continue; + } + break; + case 92: // \ escape + if (sourceText.Length <= i + 2) break; + + if (writeIndex + 2 > charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = sourceText[i + 1]; + charBuffer[writeIndex + 1].unicode = sourceText[i + 2]; + i += 2; + writeIndex += 2; + continue; + case 110: // \n LineFeed + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = 10; + i += 1; + writeIndex += 1; + continue; + case 114: // \r + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = 13; + i += 1; + writeIndex += 1; + continue; + case 116: // \t Tab + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = 9; + i += 1; + writeIndex += 1; + continue; + case 117: // \u0000 for UTF-16 Unicode + if (sourceText.Length > i + 5) + { + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = GetUTF16(sourceText, i + 2); + i += 5; + writeIndex += 1; + continue; + } + break; + } + } + + // Handle UTF-32 in the input text (string). + if (char.IsHighSurrogate(sourceText[i]) && char.IsLowSurrogate(sourceText[i + 1])) + { + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = char.ConvertToUtf32(sourceText[i], sourceText[i + 1]); + i += 1; + writeIndex += 1; + continue; + } + + // Handle inline replacement of <stlye> and <br> tags. + if (sourceText[i] == 60) + { + if (IsTagName(ref sourceText, "<BR>", i)) + { + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = 10; + writeIndex += 1; + i += 3; + + continue; + } + else if (IsTagName(ref sourceText, "<STYLE=", i)) + { + int srcOffset; + + if (ReplaceOpeningStyleTag(ref sourceText, i, out srcOffset, ref charBuffer, ref writeIndex)) + { + i = srcOffset; + continue; + } + } + else if (IsTagName(ref sourceText, "</STYLE>", i)) + { + ReplaceClosingStyleTag(ref sourceText, i, ref charBuffer, ref writeIndex); + + // Strip </style> even if style is invalid. + i += 7; + continue; + } + } + + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = sourceText[i]; + writeIndex += 1; + } + + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = 0; + } + + + /// <summary> + /// Method to handle inline replacement of style tag by opening style definition. + /// </summary> + /// <param name="sourceText"></param> + /// <param name="srcIndex"></param> + /// <param name="srcOffset"></param> + /// <param name="charBuffer"></param> + /// <param name="writeIndex"></param> + /// <returns></returns> + bool ReplaceOpeningStyleTag(ref string sourceText, int srcIndex, out int srcOffset, ref UnicodeChar[] charBuffer, ref int writeIndex) + { + // Validate <style> tag. + int hashCode = GetTagHashCode(ref sourceText, srcIndex + 7, out srcOffset); + + TMP_Style style = TMP_StyleSheet.GetStyle(hashCode); + + // Return if we don't have a valid style. + if (style == null || srcOffset == 0) return false; + + m_styleStack.Add(style.hashCode); + + int styleLength = style.styleOpeningTagArray.Length; + + // Replace <style> tag with opening definition + int[] openingTagArray = style.styleOpeningTagArray; + + for (int i = 0; i < styleLength; i++) + { + int c = openingTagArray[i]; + + if (c == 60) + { + if (IsTagName(ref openingTagArray, "<BR>", i)) + { + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = 10; + writeIndex += 1; + i += 3; + + continue; + } + else if (IsTagName(ref openingTagArray, "<STYLE=", i)) + { + int offset; + + if (ReplaceOpeningStyleTag(ref openingTagArray, i, out offset, ref charBuffer, ref writeIndex)) + { + i = offset; + continue; + } + } + else if (IsTagName(ref openingTagArray, "</STYLE>", i)) + { + ReplaceClosingStyleTag(ref openingTagArray, i, ref charBuffer, ref writeIndex); + + // Strip </style> even if style is invalid. + i += 7; + continue; + } + } + + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = c; + writeIndex += 1; + } + + return true; + } + + + /// <summary> + /// Method to handle inline replacement of style tag by opening style definition. + /// </summary> + /// <param name="sourceText"></param> + /// <param name="srcIndex"></param> + /// <param name="srcOffset"></param> + /// <param name="charBuffer"></param> + /// <param name="writeIndex"></param> + /// <returns></returns> + bool ReplaceOpeningStyleTag(ref int[] sourceText, int srcIndex, out int srcOffset, ref UnicodeChar[] charBuffer, ref int writeIndex) + { + // Validate <style> tag. + int hashCode = GetTagHashCode(ref sourceText, srcIndex + 7, out srcOffset); + + TMP_Style style = TMP_StyleSheet.GetStyle(hashCode); + + // Return if we don't have a valid style. + if (style == null || srcOffset == 0) return false; + + m_styleStack.Add(style.hashCode); + + int styleLength = style.styleOpeningTagArray.Length; + + // Replace <style> tag with opening definition + int[] openingTagArray = style.styleOpeningTagArray; + + for (int i = 0; i < styleLength; i++) + { + int c = openingTagArray[i]; + + if (c == 60) + { + if (IsTagName(ref openingTagArray, "<BR>", i)) + { + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = 10; + writeIndex += 1; + i += 3; + + continue; + } + else if (IsTagName(ref openingTagArray, "<STYLE=", i)) + { + int offset; + + if (ReplaceOpeningStyleTag(ref openingTagArray, i, out offset, ref charBuffer, ref writeIndex)) + { + i = offset; + continue; + } + } + else if (IsTagName(ref openingTagArray, "</STYLE>", i)) + { + ReplaceClosingStyleTag(ref openingTagArray, i, ref charBuffer, ref writeIndex); + + // Strip </style> even if style is invalid. + i += 7; + continue; + } + } + + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = c; + writeIndex += 1; + } + + return true; + } + + + /// <summary> + /// Method to handle inline replacement of style tag by opening style definition. + /// </summary> + /// <param name="sourceText"></param> + /// <param name="srcIndex"></param> + /// <param name="srcOffset"></param> + /// <param name="charBuffer"></param> + /// <param name="writeIndex"></param> + /// <returns></returns> + bool ReplaceOpeningStyleTag(ref char[] sourceText, int srcIndex, out int srcOffset, ref UnicodeChar[] charBuffer, ref int writeIndex) + { + // Validate <style> tag. + int hashCode = GetTagHashCode(ref sourceText, srcIndex + 7, out srcOffset); + + TMP_Style style = TMP_StyleSheet.GetStyle(hashCode); + + // Return if we don't have a valid style. + if (style == null || srcOffset == 0) return false; + + m_styleStack.Add(style.hashCode); + + int styleLength = style.styleOpeningTagArray.Length; + + // Replace <style> tag with opening definition + int[] openingTagArray = style.styleOpeningTagArray; + + for (int i = 0; i < styleLength; i++) + { + int c = openingTagArray[i]; + + if (c == 60) + { + if (IsTagName(ref openingTagArray, "<BR>", i)) + { + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = 10; + writeIndex += 1; + i += 3; + + continue; + } + else if (IsTagName(ref openingTagArray, "<STYLE=", i)) + { + int offset; + + if (ReplaceOpeningStyleTag(ref openingTagArray, i, out offset, ref charBuffer, ref writeIndex)) + { + i = offset; + continue; + } + } + else if (IsTagName(ref openingTagArray, "</STYLE>", i)) + { + ReplaceClosingStyleTag(ref openingTagArray, i, ref charBuffer, ref writeIndex); + + // Strip </style> even if style is invalid. + i += 7; + continue; + } + } + + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = c; + writeIndex += 1; + } + + return true; + } + + + /// <summary> + /// Method to handle inline replacement of style tag by opening style definition. + /// </summary> + /// <param name="sourceText"></param> + /// <param name="srcIndex"></param> + /// <param name="srcOffset"></param> + /// <param name="charBuffer"></param> + /// <param name="writeIndex"></param> + /// <returns></returns> + bool ReplaceOpeningStyleTag(ref StringBuilder sourceText, int srcIndex, out int srcOffset, ref UnicodeChar[] charBuffer, ref int writeIndex) + { + // Validate <style> tag. + int hashCode = GetTagHashCode(ref sourceText, srcIndex + 7, out srcOffset); + + TMP_Style style = TMP_StyleSheet.GetStyle(hashCode); + + // Return if we don't have a valid style. + if (style == null || srcOffset == 0) return false; + + m_styleStack.Add(style.hashCode); + + int styleLength = style.styleOpeningTagArray.Length; + + // Replace <style> tag with opening definition + int[] openingTagArray = style.styleOpeningTagArray; + + for (int i = 0; i < styleLength; i++) + { + int c = openingTagArray[i]; + + if (c == 60) + { + if (IsTagName(ref openingTagArray, "<BR>", i)) + { + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = 10; + writeIndex += 1; + i += 3; + + continue; + } + else if (IsTagName(ref openingTagArray, "<STYLE=", i)) + { + int offset; + + if (ReplaceOpeningStyleTag(ref openingTagArray, i, out offset, ref charBuffer, ref writeIndex)) + { + i = offset; + continue; + } + } + else if (IsTagName(ref openingTagArray, "</STYLE>", i)) + { + ReplaceClosingStyleTag(ref openingTagArray, i, ref charBuffer, ref writeIndex); + + // Strip </style> even if style is invalid. + i += 7; + continue; + } + } + + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = c; + writeIndex += 1; + } + + return true; + } + + + /// <summary> + /// Method to handle inline replacement of style tag by closing style definition. + /// </summary> + /// <param name="sourceText"></param> + /// <param name="srcIndex"></param> + /// <param name="charBuffer"></param> + /// <param name="writeIndex"></param> + /// <returns></returns> + bool ReplaceClosingStyleTag(ref string sourceText, int srcIndex, ref UnicodeChar[] charBuffer, ref int writeIndex) + { + // Get style from the Style Stack + int hashCode = m_styleStack.CurrentItem(); + TMP_Style style = TMP_StyleSheet.GetStyle(hashCode); + + m_styleStack.Remove(); + + // Return if we don't have a valid style. + if (style == null) return false; + + int styleLength = style.styleClosingTagArray.Length; + + // Replace <style> tag with opening definition + int[] closingTagArray = style.styleClosingTagArray; + + for (int i = 0; i < styleLength; i++) + { + int c = closingTagArray[i]; + + if (c == 60) + { + if (IsTagName(ref closingTagArray, "<BR>", i)) + { + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = 10; + writeIndex += 1; + i += 3; + + continue; + } + else if (IsTagName(ref closingTagArray, "<STYLE=", i)) + { + int offset; + + if (ReplaceOpeningStyleTag(ref closingTagArray, i, out offset, ref charBuffer, ref writeIndex)) + { + i = offset; + continue; + } + } + else if (IsTagName(ref closingTagArray, "</STYLE>", i)) + { + ReplaceClosingStyleTag(ref closingTagArray, i, ref charBuffer, ref writeIndex); + + // Strip </style> even if style is invalid. + i += 7; + continue; + } + } + + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = c; + writeIndex += 1; + } + + return true; + } + + + /// <summary> + /// Method to handle inline replacement of style tag by closing style definition. + /// </summary> + /// <param name="sourceText"></param> + /// <param name="srcIndex"></param> + /// <param name="charBuffer"></param> + /// <param name="writeIndex"></param> + /// <returns></returns> + bool ReplaceClosingStyleTag(ref int[] sourceText, int srcIndex, ref UnicodeChar[] charBuffer, ref int writeIndex) + { + // Get style from the Style Stack + int hashCode = m_styleStack.CurrentItem(); + TMP_Style style = TMP_StyleSheet.GetStyle(hashCode); + + m_styleStack.Remove(); + + // Return if we don't have a valid style. + if (style == null) return false; + + int styleLength = style.styleClosingTagArray.Length; + + // Replace <style> tag with opening definition + int[] closingTagArray = style.styleClosingTagArray; + + for (int i = 0; i < styleLength; i++) + { + int c = closingTagArray[i]; + + if (c == 60) + { + if (IsTagName(ref closingTagArray, "<BR>", i)) + { + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = 10; + writeIndex += 1; + i += 3; + + continue; + } + else if (IsTagName(ref closingTagArray, "<STYLE=", i)) + { + int offset; + + if (ReplaceOpeningStyleTag(ref closingTagArray, i, out offset, ref charBuffer, ref writeIndex)) + { + i = offset; + continue; + } + } + else if (IsTagName(ref closingTagArray, "</STYLE>", i)) + { + ReplaceClosingStyleTag(ref closingTagArray, i, ref charBuffer, ref writeIndex); + + // Strip </style> even if style is invalid. + i += 7; + continue; + } + } + + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = c; + writeIndex += 1; + } + + return true; + } + + + /// <summary> + /// Method to handle inline replacement of style tag by closing style definition. + /// </summary> + /// <param name="sourceText"></param> + /// <param name="srcIndex"></param> + /// <param name="charBuffer"></param> + /// <param name="writeIndex"></param> + /// <returns></returns> + bool ReplaceClosingStyleTag(ref char[] sourceText, int srcIndex, ref UnicodeChar[] charBuffer, ref int writeIndex) + { + // Get style from the Style Stack + int hashCode = m_styleStack.CurrentItem(); + TMP_Style style = TMP_StyleSheet.GetStyle(hashCode); + + m_styleStack.Remove(); + + // Return if we don't have a valid style. + if (style == null) return false; + + int styleLength = style.styleClosingTagArray.Length; + + // Replace <style> tag with opening definition + int[] closingTagArray = style.styleClosingTagArray; + + for (int i = 0; i < styleLength; i++) + { + int c = closingTagArray[i]; + + if (c == 60) + { + if (IsTagName(ref closingTagArray, "<BR>", i)) + { + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = 10; + writeIndex += 1; + i += 3; + + continue; + } + else if (IsTagName(ref closingTagArray, "<STYLE=", i)) + { + int offset; + + if (ReplaceOpeningStyleTag(ref closingTagArray, i, out offset, ref charBuffer, ref writeIndex)) + { + i = offset; + continue; + } + } + else if (IsTagName(ref closingTagArray, "</STYLE>", i)) + { + ReplaceClosingStyleTag(ref closingTagArray, i, ref charBuffer, ref writeIndex); + + // Strip </style> even if style is invalid. + i += 7; + continue; + } + } + + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = c; + writeIndex += 1; + } + + return true; + } + + /// <summary> + /// Method to handle inline replacement of style tag by closing style definition. + /// </summary> + /// <param name="sourceText"></param> + /// <param name="srcIndex"></param> + /// <param name="charBuffer"></param> + /// <param name="writeIndex"></param> + /// <returns></returns> + bool ReplaceClosingStyleTag(ref StringBuilder sourceText, int srcIndex, ref UnicodeChar[] charBuffer, ref int writeIndex) + { + // Get style from the Style Stack + int hashCode = m_styleStack.CurrentItem(); + TMP_Style style = TMP_StyleSheet.GetStyle(hashCode); + + m_styleStack.Remove(); + + // Return if we don't have a valid style. + if (style == null) return false; + + int styleLength = style.styleClosingTagArray.Length; + + // Replace <style> tag with opening definition + int[] closingTagArray = style.styleClosingTagArray; + + for (int i = 0; i < styleLength; i++) + { + int c = closingTagArray[i]; + + if (c == 60) + { + if (IsTagName(ref closingTagArray, "<BR>", i)) + { + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = 10; + writeIndex += 1; + i += 3; + + continue; + } + else if (IsTagName(ref closingTagArray, "<STYLE=", i)) + { + int offset; + + if (ReplaceOpeningStyleTag(ref closingTagArray, i, out offset, ref charBuffer, ref writeIndex)) + { + i = offset; + continue; + } + } + else if (IsTagName(ref closingTagArray, "</STYLE>", i)) + { + ReplaceClosingStyleTag(ref closingTagArray, i, ref charBuffer, ref writeIndex); + + // Strip </style> even if style is invalid. + i += 7; + continue; + } + } + + if (writeIndex == charBuffer.Length) ResizeInternalArray(ref charBuffer); + + charBuffer[writeIndex].unicode = c; + writeIndex += 1; + } + + return true; + } + + + /// <summary> + /// Method to check for a matching rich text tag. + /// </summary> + /// <param name="text"></param> + /// <param name="tag"></param> + /// <param name="index"></param> + /// <returns></returns> + bool IsTagName (ref string text, string tag, int index) + { + if (text.Length < index + tag.Length) return false; + + for (int i = 0; i < tag.Length; i++) + { + if (TMP_TextUtilities.ToUpperFast(text[index + i]) != tag[i]) return false; + } + + return true; + } + + /// <summary> + /// Method to check for a matching rich text tag. + /// </summary> + /// <param name="text"></param> + /// <param name="tag"></param> + /// <param name="index"></param> + /// <returns></returns> + bool IsTagName(ref char[] text, string tag, int index) + { + if (text.Length < index + tag.Length) return false; + + for (int i = 0; i < tag.Length; i++) + { + if (TMP_TextUtilities.ToUpperFast(text[index + i]) != tag[i]) return false; + } + + return true; + } + + /// <summary> + /// Method to check for a matching rich text tag. + /// </summary> + /// <param name="text"></param> + /// <param name="tag"></param> + /// <param name="index"></param> + /// <returns></returns> + bool IsTagName(ref int[] text, string tag, int index) + { + if (text.Length < index + tag.Length) return false; + + for (int i = 0; i < tag.Length; i++) + { + if (TMP_TextUtilities.ToUpperFast((char)text[index + i]) != tag[i]) return false; + } + + return true; + } + + /// <summary> + /// Method to check for a matching rich text tag. + /// </summary> + /// <param name="text"></param> + /// <param name="tag"></param> + /// <param name="index"></param> + /// <returns></returns> + bool IsTagName(ref StringBuilder text, string tag, int index) + { + if (text.Length < index + tag.Length) return false; + + for (int i = 0; i < tag.Length; i++) + { + if (TMP_TextUtilities.ToUpperFast(text[index + i]) != tag[i]) return false; + } + + return true; + } + + /// <summary> + /// Get Hashcode for a given tag. + /// </summary> + /// <param name="text"></param> + /// <param name="index"></param> + /// <param name="closeIndex"></param> + /// <returns></returns> + int GetTagHashCode(ref string text, int index, out int closeIndex) + { + int hashCode = 0; + closeIndex = 0; + + for (int i = index; i < text.Length; i++) + { + // Skip quote '"' character + if (text[i] == 34) continue; + + // Break at '>' + if (text[i] == 62) { closeIndex = i; break; } + + hashCode = (hashCode << 5) + hashCode ^ text[i]; + } + + return hashCode; + } + + /// <summary> + /// Get Hashcode for a given tag. + /// </summary> + /// <param name="text"></param> + /// <param name="index"></param> + /// <param name="closeIndex"></param> + /// <returns></returns> + int GetTagHashCode(ref char[] text, int index, out int closeIndex) + { + int hashCode = 0; + closeIndex = 0; + + for (int i = index; i < text.Length; i++) + { + // Skip quote '"' character + if (text[i] == 34) continue; + + // Break at '>' + if (text[i] == 62) { closeIndex = i; break; } + + hashCode = (hashCode << 5) + hashCode ^ text[i]; + } + + return hashCode; + } + + /// <summary> + /// Get Hashcode for a given tag. + /// </summary> + /// <param name="text"></param> + /// <param name="index"></param> + /// <param name="closeIndex"></param> + /// <returns></returns> + int GetTagHashCode(ref int[] text, int index, out int closeIndex) + { + int hashCode = 0; + closeIndex = 0; + + for (int i = index; i < text.Length; i++) + { + // Skip quote '"' character + if (text[i] == 34) continue; + + // Break at '>' + if (text[i] == 62) { closeIndex = i; break; } + + hashCode = (hashCode << 5) + hashCode ^ text[i]; + } + + return hashCode; + } + + /// <summary> + /// Get Hashcode for a given tag. + /// </summary> + /// <param name="text"></param> + /// <param name="index"></param> + /// <param name="closeIndex"></param> + /// <returns></returns> + int GetTagHashCode(ref StringBuilder text, int index, out int closeIndex) + { + int hashCode = 0; + closeIndex = 0; + + for (int i = index; i < text.Length; i++) + { + // Skip quote '"' character + if (text[i] == 34) continue; + + // Break at '>' + if (text[i] == 62) { closeIndex = i; break; } + + hashCode = (hashCode << 5) + hashCode ^ text[i]; + } + + return hashCode; + } + + /// <summary> + /// + /// </summary> + void ResizeInternalArray <T>(ref T[] array) + { + int size = Mathf.NextPowerOfTwo(array.Length + 1); + + System.Array.Resize(ref array, size); + } + + + private readonly float[] k_Power = { 5e-1f, 5e-2f, 5e-3f, 5e-4f, 5e-5f, 5e-6f, 5e-7f, 5e-8f, 5e-9f, 5e-10f }; // Used by FormatText to enable rounding and avoid using Mathf.Pow. + + /// <summary> + /// Function used in conjunction with SetText() + /// </summary> + /// <param name="number"></param> + /// <param name="index"></param> + /// <param name="precision"></param> + protected void AddFloatToCharArray(double number, ref int index, int precision) + { + if (number < 0) + { + m_input_CharArray[index++] = '-'; + number = -number; + } + + number += k_Power[Mathf.Min(9, precision)]; + + double integer = Math.Truncate(number); + + AddIntToCharArray(integer, ref index, precision); + + if (precision > 0) + { + // Add the decimal point + m_input_CharArray[index++] = '.'; + + number -= integer; + for (int p = 0; p < precision; p++) + { + number *= 10; + long d = (long)(number); + + m_input_CharArray[index++] = (char)(d + 48); + number -= d; + } + } + } + + + /// <summary> + /// // Function used in conjunction with SetText() + /// </summary> + /// <param name="number"></param> + /// <param name="index"></param> + /// <param name="precision"></param> + protected void AddIntToCharArray(double number, ref int index, int precision) + { + if (number < 0) + { + m_input_CharArray[index++] = '-'; + number = -number; + } + + int i = index; + do + { + m_input_CharArray[i++] = (char)(number % 10 + 48); + number /= 10; + } while (number > 0.999d); + + int lastIndex = i; + + // Reverse string + while (index + 1 < i) + { + i -= 1; + char t = m_input_CharArray[index]; + m_input_CharArray[index] = m_input_CharArray[i]; + m_input_CharArray[i] = t; + index += 1; + } + index = lastIndex; + } + + + /// <summary> + /// Method used to determine the number of visible characters and required buffer allocations. + /// </summary> + /// <param name="chars"></param> + /// <returns></returns> + protected virtual int SetArraySizes(UnicodeChar[] chars) { return 0; } + + + /// <summary> + /// Method which parses the text input, does the layout of the text as well as generating the geometry. + /// </summary> + protected virtual void GenerateTextMesh() { } + + + /// <summary> + /// Function to Calculate the Preferred Width and Height of the text object. + /// </summary> + /// <returns></returns> + public Vector2 GetPreferredValues() + { + if (m_isInputParsingRequired || m_isTextTruncated) + { + m_isCalculatingPreferredValues = true; + ParseInputText(); + } + + // CALCULATE PREFERRED WIDTH + float preferredWidth = GetPreferredWidth(); + + // CALCULATE PREFERRED HEIGHT + float preferredHeight = GetPreferredHeight(); + + return new Vector2(preferredWidth, preferredHeight); + } + + + /// <summary> + /// Function to Calculate the Preferred Width and Height of the text object given the provided width and height. + /// </summary> + /// <returns></returns> + public Vector2 GetPreferredValues(float width, float height) + { + if (m_isInputParsingRequired || m_isTextTruncated) + { + m_isCalculatingPreferredValues = true; + ParseInputText(); + } + + Vector2 margin = new Vector2(width, height); + + // CALCULATE PREFERRED WIDTH + float preferredWidth = GetPreferredWidth(margin); + + // CALCULATE PREFERRED HEIGHT + float preferredHeight = GetPreferredHeight(margin); + + return new Vector2(preferredWidth, preferredHeight); + } + + + /// <summary> + /// Function to Calculate the Preferred Width and Height of the text object given a certain string. + /// </summary> + /// <param name="text"></param> + /// <returns></returns> + public Vector2 GetPreferredValues(string text) + { + m_isCalculatingPreferredValues = true; + + StringToCharArray(text, ref m_TextParsingBuffer); + SetArraySizes(m_TextParsingBuffer); + + Vector2 margin = k_LargePositiveVector2; + + // CALCULATE PREFERRED WIDTH + float preferredWidth = GetPreferredWidth(margin); + + // CALCULATE PREFERRED HEIGHT + float preferredHeight = GetPreferredHeight(margin); + + return new Vector2(preferredWidth, preferredHeight); + } + + + /// <summary> + /// Function to Calculate the Preferred Width and Height of the text object given a certain string and size of text container. + /// </summary> + /// <param name="text"></param> + /// <returns></returns> + public Vector2 GetPreferredValues(string text, float width, float height) + { + m_isCalculatingPreferredValues = true; + + StringToCharArray(text, ref m_TextParsingBuffer); + SetArraySizes(m_TextParsingBuffer); + + Vector2 margin = new Vector2(width, height); + + // CALCULATE PREFERRED WIDTH + float preferredWidth = GetPreferredWidth(margin); + + // CALCULATE PREFERRED HEIGHT + float preferredHeight = GetPreferredHeight(margin); + + return new Vector2(preferredWidth, preferredHeight); + } + + + /// <summary> + /// Method to calculate the preferred width of a text object. + /// </summary> + /// <returns></returns> + protected float GetPreferredWidth() + { + if (TMP_Settings.instance == null) return 0; + + float fontSize = m_enableAutoSizing ? m_fontSizeMax : m_fontSize; + + // Reset auto sizing point size bounds + m_minFontSize = m_fontSizeMin; + m_maxFontSize = m_fontSizeMax; + m_charWidthAdjDelta = 0; + + // Set Margins to Infinity + Vector2 margin = k_LargePositiveVector2; + + if (m_isInputParsingRequired || m_isTextTruncated) + { + m_isCalculatingPreferredValues = true; + ParseInputText(); + } + + m_recursiveCount = 0; + float preferredWidth = CalculatePreferredValues(fontSize, margin, true).x; + + m_isPreferredWidthDirty = false; + + //Debug.Log("GetPreferredWidth() Called at frame " + Time.frameCount + ". Returning width of " + preferredWidth); + + return preferredWidth; + } + + + /// <summary> + /// Method to calculate the preferred width of a text object. + /// </summary> + /// <param name="margin"></param> + /// <returns></returns> + protected float GetPreferredWidth(Vector2 margin) + { + float fontSize = m_enableAutoSizing ? m_fontSizeMax : m_fontSize; + + // Reset auto sizing point size bounds + m_minFontSize = m_fontSizeMin; + m_maxFontSize = m_fontSizeMax; + m_charWidthAdjDelta = 0; + + m_recursiveCount = 0; + float preferredWidth = CalculatePreferredValues(fontSize, margin, true).x; + + //Debug.Log("GetPreferredWidth() Called. Returning width of " + preferredWidth); + + return preferredWidth; + } + + + /// <summary> + /// Method to calculate the preferred height of a text object. + /// </summary> + /// <returns></returns> + protected float GetPreferredHeight() + { + if (TMP_Settings.instance == null) return 0; + + float fontSize = m_enableAutoSizing ? m_fontSizeMax : m_fontSize; + + // Reset auto sizing point size bounds + m_minFontSize = m_fontSizeMin; + m_maxFontSize = m_fontSizeMax; + m_charWidthAdjDelta = 0; + + Vector2 margin = new Vector2(m_marginWidth != 0 ? m_marginWidth : k_LargePositiveFloat, k_LargePositiveFloat); + + if (m_isInputParsingRequired || m_isTextTruncated) + { + m_isCalculatingPreferredValues = true; + ParseInputText(); + } + + m_recursiveCount = 0; + float preferredHeight = CalculatePreferredValues(fontSize, margin, !m_enableAutoSizing).y; + + m_isPreferredHeightDirty = false; + + //Debug.Log("GetPreferredHeight() Called. Returning height of " + preferredHeight); + + return preferredHeight; + } + + + /// <summary> + /// Method to calculate the preferred height of a text object. + /// </summary> + /// <param name="margin"></param> + /// <returns></returns> + protected float GetPreferredHeight(Vector2 margin) + { + float fontSize = m_enableAutoSizing ? m_fontSizeMax : m_fontSize; + + // Reset auto sizing point size bounds + m_minFontSize = m_fontSizeMin; + m_maxFontSize = m_fontSizeMax; + m_charWidthAdjDelta = 0; + + m_recursiveCount = 0; + float preferredHeight = CalculatePreferredValues(fontSize, margin, true).y; + + //Debug.Log("GetPreferredHeight() Called. Returning height of " + preferredHeight); + + return preferredHeight; + } + + + /// <summary> + /// Method returning the rendered width and height of the text object. + /// </summary> + /// <returns></returns> + public Vector2 GetRenderedValues() + { + return GetTextBounds().size; + } + + /// <summary> + /// + /// </summary> + /// <param name="onlyVisibleCharacters">Should returned value only factor in visible characters and exclude those greater than maxVisibleCharacters for instance.</param> + /// <returns></returns> + public Vector2 GetRenderedValues(bool onlyVisibleCharacters) + { + return GetTextBounds(onlyVisibleCharacters).size; + } + + + /// <summary> + /// Method returning the rendered width of the text object. + /// </summary> + /// <returns></returns> + protected float GetRenderedWidth() + { + return GetRenderedValues().x; + } + + /// <summary> + /// Method returning the rendered width of the text object. + /// </summary> + /// <returns></returns> + protected float GetRenderedWidth(bool onlyVisibleCharacters) + { + return GetRenderedValues(onlyVisibleCharacters).x; + } + + /// <summary> + /// Method returning the rendered height of the text object. + /// </summary> + /// <returns></returns> + protected float GetRenderedHeight() + { + return GetRenderedValues().y; + } + + /// <summary> + /// Method returning the rendered height of the text object. + /// </summary> + /// <returns></returns> + protected float GetRenderedHeight(bool onlyVisibleCharacters) + { + return GetRenderedValues(onlyVisibleCharacters).y; + } + + + /// <summary> + /// Method to calculate the preferred width and height of the text object. + /// </summary> + /// <returns></returns> + protected virtual Vector2 CalculatePreferredValues(float defaultFontSize, Vector2 marginSize, bool ignoreTextAutoSizing) + { + //Debug.Log("*** CalculatePreferredValues() ***"); // ***** Frame: " + Time.frameCount); + + ////Profiler.BeginSample("TMP Generate Text - Phase I"); + + // Early exit if no font asset was assigned. This should not be needed since LiberationSans SDF will be assigned by default. + if (m_fontAsset == null || m_fontAsset.characterLookupTable == null) + { + Debug.LogWarning("Can't Generate Mesh! No Font Asset has been assigned to Object ID: " + this.GetInstanceID()); + + return Vector2.zero; + } + + // Early exit if we don't have any Text to generate. + if (m_TextParsingBuffer == null || m_TextParsingBuffer.Length == 0 || m_TextParsingBuffer[0].unicode == (char)0) + { + return Vector2.zero; + } + + m_currentFontAsset = m_fontAsset; + m_currentMaterial = m_sharedMaterial; + m_currentMaterialIndex = 0; + m_materialReferenceStack.SetDefault(new MaterialReference(0, m_currentFontAsset, null, m_currentMaterial, m_padding)); + + // Total character count is computed when the text is parsed. + int totalCharacterCount = m_totalCharacterCount; // m_VisibleCharacters.Count; + + if (m_internalCharacterInfo == null || totalCharacterCount > m_internalCharacterInfo.Length) + { + m_internalCharacterInfo = new TMP_CharacterInfo[totalCharacterCount > 1024 ? totalCharacterCount + 256 : Mathf.NextPowerOfTwo(totalCharacterCount)]; + } + + // Calculate the scale of the font based on selected font size and sampling point size. + // baseScale is calculated using the font asset assigned to the text object. + float baseScale = m_fontScale = (defaultFontSize / m_fontAsset.faceInfo.pointSize * m_fontAsset.faceInfo.scale * (m_isOrthographic ? 1 : 0.1f)); + float currentElementScale = baseScale; + m_fontScaleMultiplier = 1; + + m_currentFontSize = defaultFontSize; + m_sizeStack.SetDefault(m_currentFontSize); + float fontSizeDelta = 0; + + int charCode = 0; // Holds the character code of the currently being processed character. + + m_FontStyleInternal = m_fontStyle; // Set the default style. + + m_lineJustification = m_textAlignment; // Sets the line justification mode to match editor alignment. + m_lineJustificationStack.SetDefault(m_lineJustification); + + float bold_xAdvance_multiplier = 1; // Used to increase spacing between character when style is bold. + + m_baselineOffset = 0; // Used by subscript characters. + m_baselineOffsetStack.Clear(); + + m_lineOffset = 0; // Amount of space between lines (font line spacing + m_linespacing). + m_lineHeight = TMP_Math.FLOAT_UNSET; + float lineGap = m_currentFontAsset.faceInfo.lineHeight - (m_currentFontAsset.faceInfo.ascentLine - m_currentFontAsset.faceInfo.descentLine); + + m_cSpacing = 0; // Amount of space added between characters as a result of the use of the <cspace> tag. + m_monoSpacing = 0; + float lineOffsetDelta = 0; + m_xAdvance = 0; // Used to track the position of each character. + float maxXAdvance = 0; // Used to determine Preferred Width. + + tag_LineIndent = 0; // Used for indentation of text. + tag_Indent = 0; + m_indentStack.SetDefault(0); + tag_NoParsing = false; + //m_isIgnoringAlignment = false; + + m_characterCount = 0; // Total characters in the char[] + + + // Tracking of line information + m_firstCharacterOfLine = 0; + m_maxLineAscender = k_LargeNegativeFloat; + m_maxLineDescender = k_LargePositiveFloat; + m_lineNumber = 0; + + float marginWidth = marginSize.x; + //float marginHeight = marginSize.y; + m_marginLeft = 0; + m_marginRight = 0; + m_width = -1; + + // Used by Unity's Auto Layout system. + float renderedWidth = 0; + float renderedHeight = 0; + float linebreakingWidth = 0; + m_isCalculatingPreferredValues = true; + + // Tracking of the highest Ascender + m_maxAscender = 0; + m_maxDescender = 0; + + + // Initialize struct to track states of word wrapping + bool isFirstWord = true; + bool isLastBreakingChar = false; + WordWrapState savedLineState = new WordWrapState(); + SaveWordWrappingState(ref savedLineState, 0, 0); + WordWrapState savedWordWrapState = new WordWrapState(); + int wrappingIndex = 0; + + // Counter to prevent recursive lockup when computing preferred values. + m_recursiveCount += 1; + + // Parse through Character buffer to read HTML tags and begin creating mesh. + for (int i = 0; m_TextParsingBuffer[i].unicode != 0; i++) + { + charCode = (int)m_TextParsingBuffer[i].unicode; + + // Parse Rich Text Tag + #region Parse Rich Text Tag + if (m_isRichText && charCode == 60) // '<' + { + m_isParsingText = true; + m_textElementType = TMP_TextElementType.Character; + int endTagIndex; + + // Check if Tag is valid. If valid, skip to the end of the validated tag. + if (ValidateHtmlTag(m_TextParsingBuffer, i + 1, out endTagIndex)) + { + i = endTagIndex; + + // Continue to next character or handle the sprite element + if (m_textElementType == TMP_TextElementType.Character) + continue; + } + } + else + { + m_textElementType = m_textInfo.characterInfo[m_characterCount].elementType; + m_currentMaterialIndex = m_textInfo.characterInfo[m_characterCount].materialReferenceIndex; + m_currentFontAsset = m_textInfo.characterInfo[m_characterCount].fontAsset; + } + #endregion End Parse Rich Text Tag + + int prev_MaterialIndex = m_currentMaterialIndex; + bool isUsingAltTypeface = m_textInfo.characterInfo[m_characterCount].isUsingAlternateTypeface; + + m_isParsingText = false; + + // Handle Font Styles like LowerCase, UpperCase and SmallCaps. + #region Handling of LowerCase, UpperCase and SmallCaps Font Styles + + float smallCapsMultiplier = 1.0f; + + if (m_textElementType == TMP_TextElementType.Character) + { + if (/*(m_fontStyle & FontStyles.UpperCase) == FontStyles.UpperCase ||*/ (m_FontStyleInternal & FontStyles.UpperCase) == FontStyles.UpperCase) + { + // If this character is lowercase, switch to uppercase. + if (char.IsLower((char)charCode)) + charCode = char.ToUpper((char)charCode); + + } + else if (/*(m_fontStyle & FontStyles.LowerCase) == FontStyles.LowerCase ||*/ (m_FontStyleInternal & FontStyles.LowerCase) == FontStyles.LowerCase) + { + // If this character is uppercase, switch to lowercase. + if (char.IsUpper((char)charCode)) + charCode = char.ToLower((char)charCode); + } + else if (/*(m_fontStyle & FontStyles.SmallCaps) == FontStyles.SmallCaps ||*/ (m_FontStyleInternal & FontStyles.SmallCaps) == FontStyles.SmallCaps) + { + if (char.IsLower((char)charCode)) + { + smallCapsMultiplier = 0.8f; + charCode = char.ToUpper((char)charCode); + } + } + } + #endregion + + + // Look up Character Data from Dictionary and cache it. + #region Look up Character Data + if (m_textElementType == TMP_TextElementType.Sprite) + { + // If a sprite is used as a fallback then get a reference to it and set the color to white. + m_currentSpriteAsset = m_textInfo.characterInfo[m_characterCount].spriteAsset; + m_spriteIndex = m_textInfo.characterInfo[m_characterCount].spriteIndex; + + TMP_SpriteCharacter sprite = m_currentSpriteAsset.spriteCharacterTable[m_spriteIndex]; + if (sprite == null) continue; + + // Sprites are assigned in the E000 Private Area + sprite Index + if (charCode == 60) + charCode = 57344 + m_spriteIndex; + + m_currentFontAsset = m_fontAsset; + + // The sprite scale calculations are based on the font asset assigned to the text object. + // Sprite scale is used to determine line height + // Current element scale represents a modified scale to normalize the sprite based on the font baseline to ascender. + float spriteScale = (m_currentFontSize / m_fontAsset.faceInfo.pointSize * m_fontAsset.faceInfo.scale * (m_isOrthographic ? 1 : 0.1f)); + currentElementScale = m_fontAsset.faceInfo.ascentLine / sprite.glyph.metrics.height * sprite.scale * spriteScale; + + m_cached_TextElement = sprite; + + m_internalCharacterInfo[m_characterCount].elementType = TMP_TextElementType.Sprite; + m_internalCharacterInfo[m_characterCount].scale = spriteScale; + //m_internalCharacterInfo[m_characterCount].spriteAsset = m_currentSpriteAsset; + //m_internalCharacterInfo[m_characterCount].fontAsset = m_currentFontAsset; + //m_internalCharacterInfo[m_characterCount].materialReferenceIndex = m_currentMaterialIndex; + + m_currentMaterialIndex = prev_MaterialIndex; + } + else if (m_textElementType == TMP_TextElementType.Character) + { + m_cached_TextElement = m_textInfo.characterInfo[m_characterCount].textElement; + if (m_cached_TextElement == null) continue; + + //m_currentFontAsset = m_textInfo.characterInfo[m_characterCount].fontAsset; + //m_currentMaterial = m_textInfo.characterInfo[m_characterCount].material; + m_currentMaterialIndex = m_textInfo.characterInfo[m_characterCount].materialReferenceIndex; + + // Re-calculate font scale as the font asset may have changed. + m_fontScale = m_currentFontSize * smallCapsMultiplier / m_currentFontAsset.faceInfo.pointSize * m_currentFontAsset.faceInfo.scale * (m_isOrthographic ? 1 : 0.1f); + + currentElementScale = m_fontScale * m_fontScaleMultiplier * m_cached_TextElement.scale; + + m_internalCharacterInfo[m_characterCount].elementType = TMP_TextElementType.Character; + + } + #endregion + + + // Handle Soft Hyphen + #region Handle Soft Hyphen + float old_scale = currentElementScale; + if (charCode == 0xAD) + { + currentElementScale = 0; + } + #endregion + + + // Store some of the text object's information + m_internalCharacterInfo[m_characterCount].character = (char)charCode; + + + // Handle Kerning if Enabled. + #region Handle Kerning + TMP_GlyphValueRecord glyphAdjustments = new TMP_GlyphValueRecord(); + float characterSpacingAdjustment = m_characterSpacing; + if (m_enableKerning) + { + TMP_GlyphPairAdjustmentRecord adjustmentPair; + + if (m_characterCount < totalCharacterCount - 1) + { + uint firstGlyphIndex = m_cached_TextElement.glyphIndex; + uint secondGlyphIndex = m_textInfo.characterInfo[m_characterCount + 1].textElement.glyphIndex; + long key = new GlyphPairKey(firstGlyphIndex, secondGlyphIndex).key; + + if (m_currentFontAsset.fontFeatureTable.m_GlyphPairAdjustmentRecordLookupDictionary.TryGetValue(key, out adjustmentPair)) + { + glyphAdjustments = adjustmentPair.firstAdjustmentRecord.glyphValueRecord; + characterSpacingAdjustment = (adjustmentPair.featureLookupFlags & FontFeatureLookupFlags.IgnoreSpacingAdjustments) == FontFeatureLookupFlags.IgnoreSpacingAdjustments ? 0 : characterSpacingAdjustment; + } + } + + if (m_characterCount >= 1) + { + uint firstGlyphIndex = m_textInfo.characterInfo[m_characterCount - 1].textElement.glyphIndex; + uint secondGlyphIndex = m_cached_TextElement.glyphIndex; + long key = new GlyphPairKey(firstGlyphIndex, secondGlyphIndex).key; + + if (m_currentFontAsset.fontFeatureTable.m_GlyphPairAdjustmentRecordLookupDictionary.TryGetValue(key, out adjustmentPair)) + { + glyphAdjustments += adjustmentPair.secondAdjustmentRecord.glyphValueRecord; + characterSpacingAdjustment = (adjustmentPair.featureLookupFlags & FontFeatureLookupFlags.IgnoreSpacingAdjustments) == FontFeatureLookupFlags.IgnoreSpacingAdjustments ? 0 : characterSpacingAdjustment; + } + } + } + #endregion + + + // Initial Implementation for RTL support. + #region Handle Right-to-Left + //if (m_isRightToLeft) + //{ + // m_xAdvance -= ((m_cached_TextElement.xAdvance * bold_xAdvance_multiplier + m_characterSpacing + m_wordSpacing + m_currentFontAsset.normalSpacingOffset) * currentElementScale + m_cSpacing) * (1 - m_charWidthAdjDelta); + + // if (char.IsWhiteSpace((char)charCode) || charCode == 0x200B) + // m_xAdvance -= m_wordSpacing * currentElementScale; + //} + #endregion + + + // Handle Mono Spacing + #region Handle Mono Spacing + float monoAdvance = 0; + if (m_monoSpacing != 0) + { + monoAdvance = (m_monoSpacing / 2 - (m_cached_TextElement.glyph.metrics.width / 2 + m_cached_TextElement.glyph.metrics.horizontalBearingX) * currentElementScale); + m_xAdvance += monoAdvance; + } + #endregion + + + // Set Padding based on selected font style + #region Handle Style Padding + if (m_textElementType == TMP_TextElementType.Character && !isUsingAltTypeface && ((m_FontStyleInternal & FontStyles.Bold) == FontStyles.Bold)) // Checks for any combination of Bold Style. + { + bold_xAdvance_multiplier = 1 + m_currentFontAsset.boldSpacing * 0.01f; + } + else + { + //style_padding = m_currentFontAsset.normalStyle * 2; + bold_xAdvance_multiplier = 1.0f; + } + #endregion Handle Style Padding + + m_internalCharacterInfo[m_characterCount].baseLine = 0 - m_lineOffset + m_baselineOffset; + + + // Compute and save text element Ascender and maximum line Ascender. + float elementAscender = m_currentFontAsset.faceInfo.ascentLine * (m_textElementType == TMP_TextElementType.Character ? currentElementScale / smallCapsMultiplier : m_internalCharacterInfo[m_characterCount].scale) + m_baselineOffset; + m_internalCharacterInfo[m_characterCount].ascender = elementAscender - m_lineOffset; + m_maxLineAscender = elementAscender > m_maxLineAscender ? elementAscender : m_maxLineAscender; + + // Compute and save text element Descender and maximum line Descender. + float elementDescender = m_currentFontAsset.faceInfo.descentLine * (m_textElementType == TMP_TextElementType.Character ? currentElementScale / smallCapsMultiplier: m_internalCharacterInfo[m_characterCount].scale) + m_baselineOffset; + float elementDescenderII = m_internalCharacterInfo[m_characterCount].descender = elementDescender - m_lineOffset; + m_maxLineDescender = elementDescender < m_maxLineDescender ? elementDescender : m_maxLineDescender; + + // Adjust maxLineAscender and maxLineDescender if style is superscript or subscript + if ((m_FontStyleInternal & FontStyles.Subscript) == FontStyles.Subscript || (m_FontStyleInternal & FontStyles.Superscript) == FontStyles.Superscript) + { + float baseAscender = (elementAscender - m_baselineOffset) / m_currentFontAsset.faceInfo.subscriptSize; + elementAscender = m_maxLineAscender; + m_maxLineAscender = baseAscender > m_maxLineAscender ? baseAscender : m_maxLineAscender; + + float baseDescender = (elementDescender - m_baselineOffset) / m_currentFontAsset.faceInfo.subscriptSize; + elementDescender = m_maxLineDescender; + m_maxLineDescender = baseDescender < m_maxLineDescender ? baseDescender : m_maxLineDescender; + } + + if (m_lineNumber == 0) m_maxAscender = m_maxAscender > elementAscender ? m_maxAscender : elementAscender; + //if (m_lineOffset == 0) pageAscender = pageAscender > elementAscender ? pageAscender : elementAscender; + + // Setup Mesh for visible text elements. ie. not a SPACE / LINEFEED / CARRIAGE RETURN. + #region Handle Visible Characters + if (charCode == 9 || charCode == 0xA0 || charCode == 0x2007 || (!char.IsWhiteSpace((char)charCode) && charCode != 0x200B) || m_textElementType == TMP_TextElementType.Sprite) + { + // Check if Character exceeds the width of the Text Container + #region Handle Line Breaking, Text Auto-Sizing and Horizontal Overflow + float width = m_width != -1 ? Mathf.Min(marginWidth + 0.0001f - m_marginLeft - m_marginRight, m_width) : marginWidth + 0.0001f - m_marginLeft - m_marginRight; + + bool isJustifiedOrFlush = ((_HorizontalAlignmentOptions)m_lineJustification & _HorizontalAlignmentOptions.Flush) == _HorizontalAlignmentOptions.Flush || ((_HorizontalAlignmentOptions)m_lineJustification & _HorizontalAlignmentOptions.Justified) == _HorizontalAlignmentOptions.Justified; + + // Calculate the line breaking width of the text. + linebreakingWidth = m_xAdvance + m_cached_TextElement.glyph.metrics.horizontalAdvance * (1 - m_charWidthAdjDelta) * (charCode != 0xAD ? currentElementScale : old_scale); + + // Check if Character exceeds the width of the Text Container + if (linebreakingWidth > width * (isJustifiedOrFlush ? 1.05f : 1.0f)) + { + // Word Wrapping + #region Handle Word Wrapping + if (enableWordWrapping && m_characterCount != m_firstCharacterOfLine) + { + // Check if word wrapping is still possible + #region Line Breaking Check + if (wrappingIndex == savedWordWrapState.previous_WordBreak || isFirstWord) + { + // Word wrapping is no longer possible. Shrink size of text if auto-sizing is enabled. + #region Text Auto-Sizing + if (ignoreTextAutoSizing == false && m_currentFontSize > m_fontSizeMin) + { + // Handle Character Width Adjustments + #region Character Width Adjustments + if (m_charWidthAdjDelta < m_charWidthMaxAdj / 100) + { + m_recursiveCount = 0; + m_charWidthAdjDelta += 0.01f; + return CalculatePreferredValues(defaultFontSize, marginSize, false); + } + #endregion + + // Adjust Point Size + m_maxFontSize = defaultFontSize; + + defaultFontSize -= Mathf.Max((defaultFontSize - m_minFontSize) / 2, 0.05f); + defaultFontSize = (int)(Mathf.Max(defaultFontSize, m_fontSizeMin) * 20 + 0.5f) / 20f; + + if (m_recursiveCount > 20) return new Vector2(renderedWidth, renderedHeight); + return CalculatePreferredValues(defaultFontSize, marginSize, false); + } + #endregion + + // Word wrapping is no longer possible, now breaking up individual words. + if (m_isCharacterWrappingEnabled == false) + { + m_isCharacterWrappingEnabled = true; + } + else + isLastBreakingChar = true; + } + #endregion + + // Restore to previously stored state of last valid (space character or linefeed) + i = RestoreWordWrappingState(ref savedWordWrapState); + wrappingIndex = i; // Used to detect when line length can no longer be reduced. + + // Handling for Soft Hyphen + if (m_TextParsingBuffer[i].unicode == 0xAD) // && !m_isCharacterWrappingEnabled) // && ellipsisIndex != i && !m_isCharacterWrappingEnabled) + { + m_isTextTruncated = true; + m_TextParsingBuffer[i].unicode = 0x2D; + return CalculatePreferredValues(defaultFontSize, marginSize, true); + } + + // Check if Line Spacing of previous line needs to be adjusted. + if (m_lineNumber > 0 && !TMP_Math.Approximately(m_maxLineAscender, m_startOfLineAscender) && m_lineHeight == TMP_Math.FLOAT_UNSET) + { + //Debug.Log("(1) Adjusting Line Spacing on line #" + m_lineNumber); + float offsetDelta = m_maxLineAscender - m_startOfLineAscender; + //AdjustLineOffset(m_firstCharacterOfLine, m_characterCount, offsetDelta); + m_lineOffset += offsetDelta; + savedWordWrapState.lineOffset = m_lineOffset; + savedWordWrapState.previousLineAscender = m_maxLineAscender; + + // TODO - Add check for character exceeding vertical bounds + } + //m_isNewPage = false; + + // Calculate lineAscender & make sure if last character is superscript or subscript that we check that as well. + float lineAscender = m_maxLineAscender - m_lineOffset; + float lineDescender = m_maxLineDescender - m_lineOffset; + + + // Update maxDescender and maxVisibleDescender + m_maxDescender = m_maxDescender < lineDescender ? m_maxDescender : lineDescender; + + + m_firstCharacterOfLine = m_characterCount; // Store first character of the next line. + + // Compute Preferred Width & Height + renderedWidth += m_xAdvance; + + if (m_enableWordWrapping) + renderedHeight = m_maxAscender - m_maxDescender; + else + renderedHeight = Mathf.Max(renderedHeight, lineAscender - lineDescender); + + + // Store the state of the line before starting on the new line. + SaveWordWrappingState(ref savedLineState, i, m_characterCount - 1); + + m_lineNumber += 1; + //isStartOfNewLine = true; + + // Check to make sure Array is large enough to hold a new line. + //if (m_lineNumber >= m_internalTextInfo.lineInfo.Length) + // ResizeLineExtents(m_lineNumber); + + // Apply Line Spacing based on scale of the last character of the line. + if (m_lineHeight == TMP_Math.FLOAT_UNSET) + { + float ascender = m_internalCharacterInfo[m_characterCount].ascender - m_internalCharacterInfo[m_characterCount].baseLine; + lineOffsetDelta = 0 - m_maxLineDescender + ascender + (lineGap + m_lineSpacing + m_lineSpacingDelta) * baseScale; + m_lineOffset += lineOffsetDelta; + + m_startOfLineAscender = ascender; + } + else + m_lineOffset += m_lineHeight + m_lineSpacing * baseScale; + + m_maxLineAscender = k_LargeNegativeFloat; + m_maxLineDescender = k_LargePositiveFloat; + + m_xAdvance = 0 + tag_Indent; + + continue; + } + #endregion End Word Wrapping + + // Text Auto-Sizing (text exceeding Width of container. + #region Handle Text Auto-Sizing + if (ignoreTextAutoSizing == false && defaultFontSize > m_fontSizeMin) + { + // Handle Character Width Adjustments + #region Character Width Adjustments + if (m_charWidthAdjDelta < m_charWidthMaxAdj / 100) + { + m_recursiveCount = 0; + m_charWidthAdjDelta += 0.01f; + return CalculatePreferredValues(defaultFontSize, marginSize, false); + } + #endregion + + // Adjust Point Size + m_maxFontSize = defaultFontSize; + + defaultFontSize -= Mathf.Max((defaultFontSize - m_minFontSize) / 2, 0.05f); + defaultFontSize = (int)(Mathf.Max(defaultFontSize, m_fontSizeMin) * 20 + 0.5f) / 20f; + + if (m_recursiveCount > 20) return new Vector2(renderedWidth, renderedHeight); + return CalculatePreferredValues(defaultFontSize, marginSize, false); + } + #endregion End Text Auto-Sizing + } + #endregion End Check for Characters Exceeding Width of Text Container + + } + #endregion Handle Visible Characters + + + // Check if Line Spacing of previous line needs to be adjusted. + #region Adjust Line Spacing + if (m_lineNumber > 0 && !TMP_Math.Approximately(m_maxLineAscender, m_startOfLineAscender) && m_lineHeight == TMP_Math.FLOAT_UNSET && !m_isNewPage) + { + //Debug.Log("Inline - Adjusting Line Spacing on line #" + m_lineNumber); + //float gap = 0; // Compute gap. + + float offsetDelta = m_maxLineAscender - m_startOfLineAscender; + //AdjustLineOffset(m_firstCharacterOfLine, m_characterCount, offsetDelta); + elementDescenderII -= offsetDelta; + m_lineOffset += offsetDelta; + + m_startOfLineAscender += offsetDelta; + savedWordWrapState.lineOffset = m_lineOffset; + savedWordWrapState.previousLineAscender = m_startOfLineAscender; + } + #endregion + + + // Check if text Exceeds the vertical bounds of the margin area. + #region Check Vertical Bounds & Auto-Sizing + /* + if (m_maxAscender - elementDescenderII > marginHeight + 0.0001f) + { + // Handle Line spacing adjustments + #region Line Spacing Adjustments + if (m_enableAutoSizing && m_lineSpacingDelta > m_lineSpacingMax && m_lineNumber > 0) + { + //loopCountA = 0; + + //m_lineSpacingDelta -= 1; + //GenerateTextMesh(); + //return; + } + #endregion + + + // Handle Text Auto-sizing resulting from text exceeding vertical bounds. + #region Text Auto-Sizing (Text greater than vertical bounds) + if (m_enableAutoSizing && m_fontSize > m_fontSizeMin) + { + m_maxFontSize = m_fontSize; + + m_fontSize -= Mathf.Max((m_fontSize - m_minFontSize) / 2, 0.05f); + m_fontSize = (int)(Mathf.Max(m_fontSize, m_fontSizeMin) * 20 + 0.5f) / 20f; + + //m_recursiveCount = 0; + //if (loopCountA > 20) return; // Added to debug + CalculatePreferredValues(m_fontSize, marginSize, false); + return Vector2.zero; + } + #endregion Text Auto-Sizing + } + */ + #endregion Check Vertical Bounds + + + // Handle xAdvance & Tabulation Stops. Tab stops at every 25% of Font Size. + #region XAdvance, Tabulation & Stops + if (charCode == 9) + { + float tabSize = m_currentFontAsset.faceInfo.tabWidth * currentElementScale; + float tabs = Mathf.Ceil(m_xAdvance / tabSize) * tabSize; + m_xAdvance = tabs > m_xAdvance ? tabs : m_xAdvance + tabSize; + } + else if (m_monoSpacing != 0) + { + m_xAdvance += (m_monoSpacing - monoAdvance + ((characterSpacingAdjustment + m_currentFontAsset.normalSpacingOffset) * currentElementScale) + m_cSpacing) * (1 - m_charWidthAdjDelta); + + if (char.IsWhiteSpace((char)charCode) || charCode == 0x200B) + m_xAdvance += m_wordSpacing * currentElementScale; + } + else + { + m_xAdvance += ((m_cached_TextElement.glyph.metrics.horizontalAdvance * bold_xAdvance_multiplier + characterSpacingAdjustment + m_currentFontAsset.normalSpacingOffset + glyphAdjustments.xAdvance) * currentElementScale + m_cSpacing) * (1 - m_charWidthAdjDelta); + + if (char.IsWhiteSpace((char)charCode) || charCode == 0x200B) + m_xAdvance += m_wordSpacing * currentElementScale; + } + + + #endregion Tabulation & Stops + + + // Handle Carriage Return + #region Carriage Return + if (charCode == 13) + { + maxXAdvance = Mathf.Max(maxXAdvance, renderedWidth + m_xAdvance); + renderedWidth = 0; + m_xAdvance = 0 + tag_Indent; + } + #endregion Carriage Return + + + // Handle Line Spacing Adjustments + Word Wrapping & special case for last line. + #region Check for Line Feed and Last Character + if (charCode == 10 || m_characterCount == totalCharacterCount - 1) + { + // Check if Line Spacing of previous line needs to be adjusted. + if (m_lineNumber > 0 && !TMP_Math.Approximately(m_maxLineAscender, m_startOfLineAscender) && m_lineHeight == TMP_Math.FLOAT_UNSET) + { + //Debug.Log("(2) Adjusting Line Spacing on line #" + m_lineNumber); + float offsetDelta = m_maxLineAscender - m_startOfLineAscender; + //AdjustLineOffset(m_firstCharacterOfLine, m_characterCount, offsetDelta); + elementDescenderII -= offsetDelta; + m_lineOffset += offsetDelta; + } + + // Calculate lineAscender & make sure if last character is superscript or subscript that we check that as well. + //float lineAscender = m_maxLineAscender - m_lineOffset; + float lineDescender = m_maxLineDescender - m_lineOffset; + + // Update maxDescender and maxVisibleDescender + m_maxDescender = m_maxDescender < lineDescender ? m_maxDescender : lineDescender; + + m_firstCharacterOfLine = m_characterCount + 1; + + // Store PreferredWidth paying attention to linefeed and last character of text. + if (charCode == 10 && m_characterCount != totalCharacterCount - 1) + { + maxXAdvance = Mathf.Max(maxXAdvance, renderedWidth + linebreakingWidth); + renderedWidth = 0; + } + else + renderedWidth = Mathf.Max(maxXAdvance, renderedWidth + linebreakingWidth); + + + renderedHeight = m_maxAscender - m_maxDescender; + + + // Add new line if not last lines or character. + if (charCode == 10) + { + // Store the state of the line before starting on the new line. + SaveWordWrappingState(ref savedLineState, i, m_characterCount); + // Store the state of the last Character before the new line. + SaveWordWrappingState(ref savedWordWrapState, i, m_characterCount); + + m_lineNumber += 1; + + // Apply Line Spacing + if (m_lineHeight == TMP_Math.FLOAT_UNSET) + { + lineOffsetDelta = 0 - m_maxLineDescender + elementAscender + (lineGap + m_lineSpacing + m_paragraphSpacing + m_lineSpacingDelta) * baseScale; + m_lineOffset += lineOffsetDelta; + } + else + m_lineOffset += m_lineHeight + (m_lineSpacing + m_paragraphSpacing) * baseScale; + + m_maxLineAscender = k_LargeNegativeFloat; + m_maxLineDescender = k_LargePositiveFloat; + m_startOfLineAscender = elementAscender; + + m_xAdvance = 0 + tag_LineIndent + tag_Indent; + + m_characterCount += 1; + continue; + } + } + #endregion Check for Linefeed or Last Character + + + // Save State of Mesh Creation for handling of Word Wrapping + #region Save Word Wrapping State + if (m_enableWordWrapping || m_overflowMode == TextOverflowModes.Truncate || m_overflowMode == TextOverflowModes.Ellipsis) + { + if ((char.IsWhiteSpace((char)charCode) || charCode == 0x200B || charCode == 0x2D || charCode == 0xAD) && !m_isNonBreakingSpace && charCode != 0xA0 && charCode != 0x2011 && charCode != 0x202F && charCode != 0x2060) + { + // We store the state of numerous variables for the most recent Space, LineFeed or Carriage Return to enable them to be restored + // for Word Wrapping. + SaveWordWrappingState(ref savedWordWrapState, i, m_characterCount); + m_isCharacterWrappingEnabled = false; + isFirstWord = false; + } + // Handling for East Asian languages + else if ((charCode > 0x1100 && charCode < 0x11ff || /* Hangul Jamo */ + charCode > 0x2E80 && charCode < 0x9FFF || /* CJK */ + charCode > 0xA960 && charCode < 0xA97F || /* Hangul Jame Extended-A */ + charCode > 0xAC00 && charCode < 0xD7FF || /* Hangul Syllables */ + charCode > 0xF900 && charCode < 0xFAFF || /* CJK Compatibility Ideographs */ + charCode > 0xFE30 && charCode < 0xFE4F || /* CJK Compatibility Forms */ + charCode > 0xFF00 && charCode < 0xFFEF) /* CJK Halfwidth */ + && !m_isNonBreakingSpace) + { + if (isFirstWord || isLastBreakingChar || TMP_Settings.linebreakingRules.leadingCharacters.ContainsKey(charCode) == false && + (m_characterCount < totalCharacterCount - 1 && + TMP_Settings.linebreakingRules.followingCharacters.ContainsKey(m_internalCharacterInfo[m_characterCount + 1].character) == false)) + { + SaveWordWrappingState(ref savedWordWrapState, i, m_characterCount); + m_isCharacterWrappingEnabled = false; + isFirstWord = false; + } + } + else if ((isFirstWord || m_isCharacterWrappingEnabled == true || isLastBreakingChar)) + SaveWordWrappingState(ref savedWordWrapState, i, m_characterCount); + } + #endregion Save Word Wrapping State + + m_characterCount += 1; + } + + // Check Auto Sizing and increase font size to fill text container. + #region Check Auto-Sizing (Upper Font Size Bounds) + fontSizeDelta = m_maxFontSize - m_minFontSize; + if (!m_isCharacterWrappingEnabled && ignoreTextAutoSizing == false && fontSizeDelta > 0.051f && defaultFontSize < m_fontSizeMax) + { + m_minFontSize = defaultFontSize; + defaultFontSize += Mathf.Max((m_maxFontSize - defaultFontSize) / 2, 0.05f); + defaultFontSize = (int)(Mathf.Min(defaultFontSize, m_fontSizeMax) * 20 + 0.5f) / 20f; + + if (m_recursiveCount > 20) return new Vector2(renderedWidth, renderedHeight); + return CalculatePreferredValues(defaultFontSize, marginSize, false); + } + #endregion End Auto-sizing Check + + + m_isCharacterWrappingEnabled = false; + m_isCalculatingPreferredValues = false; + + // Adjust Preferred Width and Height to account for Margins. + renderedWidth += m_margin.x > 0 ? m_margin.x : 0; + renderedWidth += m_margin.z > 0 ? m_margin.z : 0; + + renderedHeight += m_margin.y > 0 ? m_margin.y : 0; + renderedHeight += m_margin.w > 0 ? m_margin.w : 0; + + // Round Preferred Values to nearest 5/100. + renderedWidth = (int)(renderedWidth * 100 + 1f) / 100f; + renderedHeight = (int)(renderedHeight * 100 + 1f) / 100f; + + //Debug.Log("Preferred Values: (" + renderedWidth + ", " + renderedHeight + ") with Recursive count of " + m_recursiveCount); + + ////Profiler.EndSample(); + return new Vector2(renderedWidth, renderedHeight); + } + + + /// <summary> + /// Method returning the compound bounds of the text object and child sub objects. + /// </summary> + /// <returns></returns> + protected virtual Bounds GetCompoundBounds() { return new Bounds(); } + + + /// <summary> + /// Method which returns the bounds of the text object; + /// </summary> + /// <returns></returns> + protected Bounds GetTextBounds() + { + if (m_textInfo == null || m_textInfo.characterCount > m_textInfo.characterInfo.Length) return new Bounds(); + + Extents extent = new Extents(k_LargePositiveVector2, k_LargeNegativeVector2); + + for (int i = 0; i < m_textInfo.characterCount && i < m_textInfo.characterInfo.Length; i++) + { + if (!m_textInfo.characterInfo[i].isVisible) continue; + + extent.min.x = Mathf.Min(extent.min.x, m_textInfo.characterInfo[i].bottomLeft.x); + extent.min.y = Mathf.Min(extent.min.y, m_textInfo.characterInfo[i].descender); + + extent.max.x = Mathf.Max(extent.max.x, m_textInfo.characterInfo[i].xAdvance); + extent.max.y = Mathf.Max(extent.max.y, m_textInfo.characterInfo[i].ascender); + } + + Vector2 size; + size.x = extent.max.x - extent.min.x; + size.y = extent.max.y - extent.min.y; + + Vector3 center = (extent.min + extent.max) / 2; + + return new Bounds(center, size); + } + + + /// <summary> + /// Method which returns the bounds of the text object; + /// </summary> + /// <param name="onlyVisibleCharacters"></param> + /// <returns></returns> + protected Bounds GetTextBounds(bool onlyVisibleCharacters) + { + if (m_textInfo == null) return new Bounds(); + + Extents extent = new Extents(k_LargePositiveVector2, k_LargeNegativeVector2); + + for (int i = 0; i < m_textInfo.characterCount; i++) + { + if ((i > maxVisibleCharacters || m_textInfo.characterInfo[i].lineNumber > m_maxVisibleLines) && onlyVisibleCharacters) break; + + if (onlyVisibleCharacters && !m_textInfo.characterInfo[i].isVisible) continue; + + extent.min.x = Mathf.Min(extent.min.x, m_textInfo.characterInfo[i].origin); + extent.min.y = Mathf.Min(extent.min.y, m_textInfo.characterInfo[i].descender); + + extent.max.x = Mathf.Max(extent.max.x, m_textInfo.characterInfo[i].xAdvance); + extent.max.y = Mathf.Max(extent.max.y, m_textInfo.characterInfo[i].ascender); + } + + Vector2 size; + size.x = extent.max.x - extent.min.x; + size.y = extent.max.y - extent.min.y; + + Vector2 center = (extent.min + extent.max) / 2; + + return new Bounds(center, size); + } + + + /// <summary> + /// Method to adjust line spacing as a result of using different fonts or font point size. + /// </summary> + /// <param name="startIndex"></param> + /// <param name="endIndex"></param> + /// <param name="offset"></param> + protected virtual void AdjustLineOffset(int startIndex, int endIndex, float offset) { } + + + /// <summary> + /// Function to increase the size of the Line Extents Array. + /// </summary> + /// <param name="size"></param> + protected void ResizeLineExtents(int size) + { + size = size > 1024 ? size + 256 : Mathf.NextPowerOfTwo(size + 1); + + TMP_LineInfo[] temp_lineInfo = new TMP_LineInfo[size]; + for (int i = 0; i < size; i++) + { + if (i < m_textInfo.lineInfo.Length) + temp_lineInfo[i] = m_textInfo.lineInfo[i]; + else + { + temp_lineInfo[i].lineExtents.min = k_LargePositiveVector2; + temp_lineInfo[i].lineExtents.max = k_LargeNegativeVector2; + + temp_lineInfo[i].ascender = k_LargeNegativeFloat; + temp_lineInfo[i].descender = k_LargePositiveFloat; + } + } + + m_textInfo.lineInfo = temp_lineInfo; + } + protected static Vector2 k_LargePositiveVector2 = new Vector2(TMP_Math.INT_MAX, TMP_Math.INT_MAX); + protected static Vector2 k_LargeNegativeVector2 = new Vector2(TMP_Math.INT_MIN, TMP_Math.INT_MIN); + protected static float k_LargePositiveFloat = TMP_Math.FLOAT_MAX; + protected static float k_LargeNegativeFloat = TMP_Math.FLOAT_MIN; + protected static int k_LargePositiveInt = TMP_Math.INT_MAX; + protected static int k_LargeNegativeInt = TMP_Math.INT_MIN; + + /// <summary> + /// Function used to evaluate the length of a text string. + /// </summary> + /// <param name="text"></param> + /// <returns></returns> + public virtual TMP_TextInfo GetTextInfo(string text) { return null; } + + + /// <summary> + /// Function to force an update of the margin size. + /// </summary> + public virtual void ComputeMarginSize() { } + + + /// <summary> + /// Function used in conjunction with GetTextInfo to figure out Array allocations. + /// </summary> + /// <param name="chars"></param> + /// <returns></returns> + //protected int GetArraySizes(int[] chars) + //{ + // //Debug.Log("Set Array Size called."); + + // //int visibleCount = 0; + // //int totalCount = 0; + // int tagEnd = 0; + + // m_totalCharacterCount = 0; + // m_isUsingBold = false; + // m_isParsingText = false; + + + // //m_VisibleCharacters.Clear(); + + // for (int i = 0; chars[i] != 0; i++) + // { + // int c = chars[i]; + + // if (m_isRichText && c == 60) // if Char '<' + // { + // // Check if Tag is Valid + // if (ValidateHtmlTag(chars, i + 1, out tagEnd)) + // { + // i = tagEnd; + // //if ((m_style & FontStyles.Underline) == FontStyles.Underline) visibleCount += 3; + + // if ((m_style & FontStyles.Bold) == FontStyles.Bold) m_isUsingBold = true; + + // continue; + // } + // } + + // //if (!char.IsWhiteSpace((char)c) && c != 0x200B) + // //{ + // //visibleCount += 1; + // //} + + // //m_VisibleCharacters.Add((char)c); + // m_totalCharacterCount += 1; + // } + + // return m_totalCharacterCount; + //} + + + /// <summary> + /// Save the State of various variables used in the mesh creation loop in conjunction with Word Wrapping + /// </summary> + /// <param name="state"></param> + /// <param name="index"></param> + /// <param name="count"></param> + protected void SaveWordWrappingState(ref WordWrapState state, int index, int count) + { + // Multi Font & Material support related + state.currentFontAsset = m_currentFontAsset; + state.currentSpriteAsset = m_currentSpriteAsset; + state.currentMaterial = m_currentMaterial; + state.currentMaterialIndex = m_currentMaterialIndex; + + state.previous_WordBreak = index; + state.total_CharacterCount = count; + state.visible_CharacterCount = m_lineVisibleCharacterCount; + //state.visible_CharacterCount = m_visibleCharacterCount; + //state.visible_SpriteCount = m_visibleSpriteCount; + state.visible_LinkCount = m_textInfo.linkCount; + + state.firstCharacterIndex = m_firstCharacterOfLine; + state.firstVisibleCharacterIndex = m_firstVisibleCharacterOfLine; + state.lastVisibleCharIndex = m_lastVisibleCharacterOfLine; + + state.fontStyle = m_FontStyleInternal; + state.fontScale = m_fontScale; + //state.maxFontScale = m_maxFontScale; + state.fontScaleMultiplier = m_fontScaleMultiplier; + state.currentFontSize = m_currentFontSize; + + state.xAdvance = m_xAdvance; + state.maxCapHeight = m_maxCapHeight; + state.maxAscender = m_maxAscender; + state.maxDescender = m_maxDescender; + state.maxLineAscender = m_maxLineAscender; + state.maxLineDescender = m_maxLineDescender; + state.previousLineAscender = m_startOfLineAscender; + state.preferredWidth = m_preferredWidth; + state.preferredHeight = m_preferredHeight; + state.meshExtents = m_meshExtents; + + state.lineNumber = m_lineNumber; + state.lineOffset = m_lineOffset; + state.baselineOffset = m_baselineOffset; + + //state.alignment = m_lineJustification; + state.vertexColor = m_htmlColor; + state.underlineColor = m_underlineColor; + state.strikethroughColor = m_strikethroughColor; + state.highlightColor = m_highlightColor; + + state.isNonBreakingSpace = m_isNonBreakingSpace; + state.tagNoParsing = tag_NoParsing; + + // XML Tag Stack + state.basicStyleStack = m_fontStyleStack; + state.colorStack = m_colorStack; + state.underlineColorStack = m_underlineColorStack; + state.strikethroughColorStack = m_strikethroughColorStack; + state.highlightColorStack = m_highlightColorStack; + state.colorGradientStack = m_colorGradientStack; + state.sizeStack = m_sizeStack; + state.indentStack = m_indentStack; + state.fontWeightStack = m_FontWeightStack; + state.styleStack = m_styleStack; + state.baselineStack = m_baselineOffsetStack; + state.actionStack = m_actionStack; + state.materialReferenceStack = m_materialReferenceStack; + state.lineJustificationStack = m_lineJustificationStack; + //state.spriteAnimationStack = m_spriteAnimationStack; + + state.spriteAnimationID = m_spriteAnimationID; + + if (m_lineNumber < m_textInfo.lineInfo.Length) + state.lineInfo = m_textInfo.lineInfo[m_lineNumber]; + } + + + /// <summary> + /// Restore the State of various variables used in the mesh creation loop. + /// </summary> + /// <param name="state"></param> + /// <returns></returns> + protected int RestoreWordWrappingState(ref WordWrapState state) + { + int index = state.previous_WordBreak; + + // Multi Font & Material support related + m_currentFontAsset = state.currentFontAsset; + m_currentSpriteAsset = state.currentSpriteAsset; + m_currentMaterial = state.currentMaterial; + m_currentMaterialIndex = state.currentMaterialIndex; + + m_characterCount = state.total_CharacterCount + 1; + m_lineVisibleCharacterCount = state.visible_CharacterCount; + //m_visibleCharacterCount = state.visible_CharacterCount; + //m_visibleSpriteCount = state.visible_SpriteCount; + m_textInfo.linkCount = state.visible_LinkCount; + + m_firstCharacterOfLine = state.firstCharacterIndex; + m_firstVisibleCharacterOfLine = state.firstVisibleCharacterIndex; + m_lastVisibleCharacterOfLine = state.lastVisibleCharIndex; + + m_FontStyleInternal = state.fontStyle; + m_fontScale = state.fontScale; + m_fontScaleMultiplier = state.fontScaleMultiplier; + //m_maxFontScale = state.maxFontScale; + m_currentFontSize = state.currentFontSize; + + m_xAdvance = state.xAdvance; + m_maxCapHeight = state.maxCapHeight; + m_maxAscender = state.maxAscender; + m_maxDescender = state.maxDescender; + m_maxLineAscender = state.maxLineAscender; + m_maxLineDescender = state.maxLineDescender; + m_startOfLineAscender = state.previousLineAscender; + m_preferredWidth = state.preferredWidth; + m_preferredHeight = state.preferredHeight; + m_meshExtents = state.meshExtents; + + m_lineNumber = state.lineNumber; + m_lineOffset = state.lineOffset; + m_baselineOffset = state.baselineOffset; + + //m_lineJustification = state.alignment; + m_htmlColor = state.vertexColor; + m_underlineColor = state.underlineColor; + m_strikethroughColor = state.strikethroughColor; + m_highlightColor = state.highlightColor; + + m_isNonBreakingSpace = state.isNonBreakingSpace; + tag_NoParsing = state.tagNoParsing; + + // XML Tag Stack + m_fontStyleStack = state.basicStyleStack; + m_colorStack = state.colorStack; + m_underlineColorStack = state.underlineColorStack; + m_strikethroughColorStack = state.strikethroughColorStack; + m_highlightColorStack = state.highlightColorStack; + m_colorGradientStack = state.colorGradientStack; + m_sizeStack = state.sizeStack; + m_indentStack = state.indentStack; + m_FontWeightStack = state.fontWeightStack; + m_styleStack = state.styleStack; + m_baselineOffsetStack = state.baselineStack; + m_actionStack = state.actionStack; + m_materialReferenceStack = state.materialReferenceStack; + m_lineJustificationStack = state.lineJustificationStack; + //m_spriteAnimationStack = state.spriteAnimationStack; + + m_spriteAnimationID = state.spriteAnimationID; + + if (m_lineNumber < m_textInfo.lineInfo.Length) + m_textInfo.lineInfo[m_lineNumber] = state.lineInfo; + + return index; + } + + + /// <summary> + /// Store vertex information for each character. + /// </summary> + /// <param name="style_padding">Style_padding.</param> + /// <param name="vertexColor">Vertex color.</param> + protected virtual void SaveGlyphVertexInfo(float padding, float style_padding, Color32 vertexColor) + { + // Save the Vertex Position for the Character + #region Setup Mesh Vertices + m_textInfo.characterInfo[m_characterCount].vertex_BL.position = m_textInfo.characterInfo[m_characterCount].bottomLeft; + m_textInfo.characterInfo[m_characterCount].vertex_TL.position = m_textInfo.characterInfo[m_characterCount].topLeft; + m_textInfo.characterInfo[m_characterCount].vertex_TR.position = m_textInfo.characterInfo[m_characterCount].topRight; + m_textInfo.characterInfo[m_characterCount].vertex_BR.position = m_textInfo.characterInfo[m_characterCount].bottomRight; + #endregion + + + #region Setup Vertex Colors + // Alpha is the lower of the vertex color or tag color alpha used. + vertexColor.a = m_fontColor32.a < vertexColor.a ? (byte)(m_fontColor32.a) : (byte)(vertexColor.a); + + // Handle Vertex Colors & Vertex Color Gradient + if (!m_enableVertexGradient) + { + m_textInfo.characterInfo[m_characterCount].vertex_BL.color = vertexColor; + m_textInfo.characterInfo[m_characterCount].vertex_TL.color = vertexColor; + m_textInfo.characterInfo[m_characterCount].vertex_TR.color = vertexColor; + m_textInfo.characterInfo[m_characterCount].vertex_BR.color = vertexColor; + } + else + { + if (!m_overrideHtmlColors && m_colorStack.m_Index > 1) + { + m_textInfo.characterInfo[m_characterCount].vertex_BL.color = vertexColor; + m_textInfo.characterInfo[m_characterCount].vertex_TL.color = vertexColor; + m_textInfo.characterInfo[m_characterCount].vertex_TR.color = vertexColor; + m_textInfo.characterInfo[m_characterCount].vertex_BR.color = vertexColor; + } + else // Handle Vertex Color Gradient + { + // Use Vertex Color Gradient Preset (if one is assigned) + if (m_fontColorGradientPreset != null) + { + m_textInfo.characterInfo[m_characterCount].vertex_BL.color = m_fontColorGradientPreset.bottomLeft * vertexColor; + m_textInfo.characterInfo[m_characterCount].vertex_TL.color = m_fontColorGradientPreset.topLeft * vertexColor; + m_textInfo.characterInfo[m_characterCount].vertex_TR.color = m_fontColorGradientPreset.topRight * vertexColor; + m_textInfo.characterInfo[m_characterCount].vertex_BR.color = m_fontColorGradientPreset.bottomRight * vertexColor; + } + else + { + m_textInfo.characterInfo[m_characterCount].vertex_BL.color = m_fontColorGradient.bottomLeft * vertexColor; + m_textInfo.characterInfo[m_characterCount].vertex_TL.color = m_fontColorGradient.topLeft * vertexColor; + m_textInfo.characterInfo[m_characterCount].vertex_TR.color = m_fontColorGradient.topRight * vertexColor; + m_textInfo.characterInfo[m_characterCount].vertex_BR.color = m_fontColorGradient.bottomRight * vertexColor; + } + } + } + + if (m_colorGradientPreset != null) + { + m_textInfo.characterInfo[m_characterCount].vertex_BL.color *= m_colorGradientPreset.bottomLeft; + m_textInfo.characterInfo[m_characterCount].vertex_TL.color *= m_colorGradientPreset.topLeft; + m_textInfo.characterInfo[m_characterCount].vertex_TR.color *= m_colorGradientPreset.topRight; + m_textInfo.characterInfo[m_characterCount].vertex_BR.color *= m_colorGradientPreset.bottomRight; + } + #endregion + + // Apply style_padding only if this is a SDF Shader. + if (!m_isSDFShader) + style_padding = 0f; + + + // Setup UVs for the Character + #region Setup UVs + + Vector2 uv0; + uv0.x = (m_cached_TextElement.glyph.glyphRect.x - padding - style_padding) / m_currentFontAsset.atlasWidth; + uv0.y = (m_cached_TextElement.glyph.glyphRect.y - padding - style_padding) / m_currentFontAsset.atlasHeight; + + Vector2 uv1; + uv1.x = uv0.x; + uv1.y = (m_cached_TextElement.glyph.glyphRect.y + padding + style_padding + m_cached_TextElement.glyph.glyphRect.height) / m_currentFontAsset.atlasHeight; + + Vector2 uv2; + uv2.x = (m_cached_TextElement.glyph.glyphRect.x + padding + style_padding + m_cached_TextElement.glyph.glyphRect.width) / m_currentFontAsset.atlasWidth; + uv2.y = uv1.y; + + Vector2 uv3; + uv3.x = uv2.x; + uv3.y = uv0.y; + + // Store UV Information + m_textInfo.characterInfo[m_characterCount].vertex_BL.uv = uv0; + m_textInfo.characterInfo[m_characterCount].vertex_TL.uv = uv1; + m_textInfo.characterInfo[m_characterCount].vertex_TR.uv = uv2; + m_textInfo.characterInfo[m_characterCount].vertex_BR.uv = uv3; + #endregion Setup UVs + + + // Normal + #region Setup Normals & Tangents + //Vector3 normal = new Vector3(0, 0, -1); + //m_textInfo.characterInfo[m_characterCount].vertex_BL.normal = normal; + //m_textInfo.characterInfo[m_characterCount].vertex_TL.normal = normal; + //m_textInfo.characterInfo[m_characterCount].vertex_TR.normal = normal; + //m_textInfo.characterInfo[m_characterCount].vertex_BR.normal = normal; + + // Tangents + //Vector4 tangent = new Vector4(-1, 0, 0, 1); + //m_textInfo.characterInfo[m_characterCount].vertex_BL.tangent = tangent; + //m_textInfo.characterInfo[m_characterCount].vertex_TL.tangent = tangent; + //m_textInfo.characterInfo[m_characterCount].vertex_TR.tangent = tangent; + //m_textInfo.characterInfo[m_characterCount].vertex_BR.tangent = tangent; + #endregion end Normals & Tangents + } + + + /// <summary> + /// Store vertex information for each sprite. + /// </summary> + /// <param name="padding"></param> + /// <param name="style_padding"></param> + /// <param name="vertexColor"></param> + protected virtual void SaveSpriteVertexInfo(Color32 vertexColor) + { + // Save the Vertex Position for the Character + #region Setup Mesh Vertices + m_textInfo.characterInfo[m_characterCount].vertex_BL.position = m_textInfo.characterInfo[m_characterCount].bottomLeft; + m_textInfo.characterInfo[m_characterCount].vertex_TL.position = m_textInfo.characterInfo[m_characterCount].topLeft; + m_textInfo.characterInfo[m_characterCount].vertex_TR.position = m_textInfo.characterInfo[m_characterCount].topRight; + m_textInfo.characterInfo[m_characterCount].vertex_BR.position = m_textInfo.characterInfo[m_characterCount].bottomRight; + #endregion + + // Vertex Color Alpha + if (m_tintAllSprites) m_tintSprite = true; + Color32 spriteColor = m_tintSprite ? m_spriteColor.Multiply(vertexColor) : m_spriteColor; + spriteColor.a = spriteColor.a < m_fontColor32.a ? spriteColor.a = spriteColor.a < vertexColor.a ? spriteColor.a : vertexColor.a : m_fontColor32.a; + + Color32 c0 = spriteColor; + Color32 c1 = spriteColor; + Color32 c2 = spriteColor; + Color32 c3 = spriteColor; + + if (m_enableVertexGradient) + { + if (m_fontColorGradientPreset != null) + { + c0 = m_tintSprite ? c0.Multiply(m_fontColorGradientPreset.bottomLeft) : c0; + c1 = m_tintSprite ? c1.Multiply(m_fontColorGradientPreset.topLeft) : c1; + c2 = m_tintSprite ? c2.Multiply(m_fontColorGradientPreset.topRight) : c2; + c3 = m_tintSprite ? c3.Multiply(m_fontColorGradientPreset.bottomRight) : c3; + } + else + { + c0 = m_tintSprite ? c0.Multiply(m_fontColorGradient.bottomLeft) : c0; + c1 = m_tintSprite ? c1.Multiply(m_fontColorGradient.topLeft) : c1; + c2 = m_tintSprite ? c2.Multiply(m_fontColorGradient.topRight) : c2; + c3 = m_tintSprite ? c3.Multiply(m_fontColorGradient.bottomRight) : c3; + } + } + + if (m_colorGradientPreset != null) + { + c0 = m_tintSprite ? c0.Multiply(m_colorGradientPreset.bottomLeft) : c0; + c1 = m_tintSprite ? c1.Multiply(m_colorGradientPreset.topLeft) : c1; + c2 = m_tintSprite ? c2.Multiply(m_colorGradientPreset.topRight) : c2; + c3 = m_tintSprite ? c3.Multiply(m_colorGradientPreset.bottomRight) : c3; + } + + m_textInfo.characterInfo[m_characterCount].vertex_BL.color = c0; + m_textInfo.characterInfo[m_characterCount].vertex_TL.color = c1; + m_textInfo.characterInfo[m_characterCount].vertex_TR.color = c2; + m_textInfo.characterInfo[m_characterCount].vertex_BR.color = c3; + + + // Setup UVs for the Character + #region Setup UVs + Vector2 uv0 = new Vector2((float)m_cached_TextElement.glyph.glyphRect.x / m_currentSpriteAsset.spriteSheet.width, (float)m_cached_TextElement.glyph.glyphRect.y / m_currentSpriteAsset.spriteSheet.height); // bottom left + Vector2 uv1 = new Vector2(uv0.x, (float)(m_cached_TextElement.glyph.glyphRect.y + m_cached_TextElement.glyph.glyphRect.height) / m_currentSpriteAsset.spriteSheet.height); // top left + Vector2 uv2 = new Vector2((float)(m_cached_TextElement.glyph.glyphRect.x + m_cached_TextElement.glyph.glyphRect.width) / m_currentSpriteAsset.spriteSheet.width, uv1.y); // top right + Vector2 uv3 = new Vector2(uv2.x, uv0.y); // bottom right + + // Store UV Information + m_textInfo.characterInfo[m_characterCount].vertex_BL.uv = uv0; + m_textInfo.characterInfo[m_characterCount].vertex_TL.uv = uv1; + m_textInfo.characterInfo[m_characterCount].vertex_TR.uv = uv2; + m_textInfo.characterInfo[m_characterCount].vertex_BR.uv = uv3; + #endregion Setup UVs + + + // Normal + #region Setup Normals & Tangents + //Vector3 normal = new Vector3(0, 0, -1); + //m_textInfo.characterInfo[m_characterCount].vertex_BL.normal = normal; + //m_textInfo.characterInfo[m_characterCount].vertex_TL.normal = normal; + //m_textInfo.characterInfo[m_characterCount].vertex_TR.normal = normal; + //m_textInfo.characterInfo[m_characterCount].vertex_BR.normal = normal; + + // Tangents + //Vector4 tangent = new Vector4(-1, 0, 0, 1); + //m_textInfo.characterInfo[m_characterCount].vertex_BL.tangent = tangent; + //m_textInfo.characterInfo[m_characterCount].vertex_TL.tangent = tangent; + //m_textInfo.characterInfo[m_characterCount].vertex_TR.tangent = tangent; + //m_textInfo.characterInfo[m_characterCount].vertex_BR.tangent = tangent; + #endregion end Normals & Tangents + + } + + + /// <summary> + /// Store vertex attributes into the appropriate TMP_MeshInfo. + /// </summary> + /// <param name="i"></param> + /// <param name="index_X4"></param> + protected virtual void FillCharacterVertexBuffers(int i, int index_X4) + { + int materialIndex = m_textInfo.characterInfo[i].materialReferenceIndex; + index_X4 = m_textInfo.meshInfo[materialIndex].vertexCount; + + // Make sure buffers allocation are sufficient to hold the vertex data + //if (m_textInfo.meshInfo[materialIndex].vertices.Length < index_X4 + 4) + // m_textInfo.meshInfo[materialIndex].ResizeMeshInfo(Mathf.NextPowerOfTwo(index_X4 + 4)); + + + TMP_CharacterInfo[] characterInfoArray = m_textInfo.characterInfo; + m_textInfo.characterInfo[i].vertexIndex = index_X4; + + // Setup Vertices for Characters + m_textInfo.meshInfo[materialIndex].vertices[0 + index_X4] = characterInfoArray[i].vertex_BL.position; + m_textInfo.meshInfo[materialIndex].vertices[1 + index_X4] = characterInfoArray[i].vertex_TL.position; + m_textInfo.meshInfo[materialIndex].vertices[2 + index_X4] = characterInfoArray[i].vertex_TR.position; + m_textInfo.meshInfo[materialIndex].vertices[3 + index_X4] = characterInfoArray[i].vertex_BR.position; + + + // Setup UVS0 + m_textInfo.meshInfo[materialIndex].uvs0[0 + index_X4] = characterInfoArray[i].vertex_BL.uv; + m_textInfo.meshInfo[materialIndex].uvs0[1 + index_X4] = characterInfoArray[i].vertex_TL.uv; + m_textInfo.meshInfo[materialIndex].uvs0[2 + index_X4] = characterInfoArray[i].vertex_TR.uv; + m_textInfo.meshInfo[materialIndex].uvs0[3 + index_X4] = characterInfoArray[i].vertex_BR.uv; + + + // Setup UVS2 + m_textInfo.meshInfo[materialIndex].uvs2[0 + index_X4] = characterInfoArray[i].vertex_BL.uv2; + m_textInfo.meshInfo[materialIndex].uvs2[1 + index_X4] = characterInfoArray[i].vertex_TL.uv2; + m_textInfo.meshInfo[materialIndex].uvs2[2 + index_X4] = characterInfoArray[i].vertex_TR.uv2; + m_textInfo.meshInfo[materialIndex].uvs2[3 + index_X4] = characterInfoArray[i].vertex_BR.uv2; + + + // Setup UVS4 + //m_textInfo.meshInfo[0].uvs4[0 + index_X4] = characterInfoArray[i].vertex_BL.uv4; + //m_textInfo.meshInfo[0].uvs4[1 + index_X4] = characterInfoArray[i].vertex_TL.uv4; + //m_textInfo.meshInfo[0].uvs4[2 + index_X4] = characterInfoArray[i].vertex_TR.uv4; + //m_textInfo.meshInfo[0].uvs4[3 + index_X4] = characterInfoArray[i].vertex_BR.uv4; + + + // setup Vertex Colors + m_textInfo.meshInfo[materialIndex].colors32[0 + index_X4] = characterInfoArray[i].vertex_BL.color; + m_textInfo.meshInfo[materialIndex].colors32[1 + index_X4] = characterInfoArray[i].vertex_TL.color; + m_textInfo.meshInfo[materialIndex].colors32[2 + index_X4] = characterInfoArray[i].vertex_TR.color; + m_textInfo.meshInfo[materialIndex].colors32[3 + index_X4] = characterInfoArray[i].vertex_BR.color; + + m_textInfo.meshInfo[materialIndex].vertexCount = index_X4 + 4; + } + + + protected virtual void FillCharacterVertexBuffers(int i, int index_X4, bool isVolumetric) + { + int materialIndex = m_textInfo.characterInfo[i].materialReferenceIndex; + index_X4 = m_textInfo.meshInfo[materialIndex].vertexCount; + + TMP_CharacterInfo[] characterInfoArray = m_textInfo.characterInfo; + m_textInfo.characterInfo[i].vertexIndex = index_X4; + + // Setup Vertices for Characters + m_textInfo.meshInfo[materialIndex].vertices[0 + index_X4] = characterInfoArray[i].vertex_BL.position; + m_textInfo.meshInfo[materialIndex].vertices[1 + index_X4] = characterInfoArray[i].vertex_TL.position; + m_textInfo.meshInfo[materialIndex].vertices[2 + index_X4] = characterInfoArray[i].vertex_TR.position; + m_textInfo.meshInfo[materialIndex].vertices[3 + index_X4] = characterInfoArray[i].vertex_BR.position; + + if (isVolumetric) + { + Vector3 depth = new Vector3(0, 0, m_fontSize * m_fontScale); + m_textInfo.meshInfo[materialIndex].vertices[4 + index_X4] = characterInfoArray[i].vertex_BL.position + depth; + m_textInfo.meshInfo[materialIndex].vertices[5 + index_X4] = characterInfoArray[i].vertex_TL.position + depth; + m_textInfo.meshInfo[materialIndex].vertices[6 + index_X4] = characterInfoArray[i].vertex_TR.position + depth; + m_textInfo.meshInfo[materialIndex].vertices[7 + index_X4] = characterInfoArray[i].vertex_BR.position + depth; + } + + // Setup UVS0 + m_textInfo.meshInfo[materialIndex].uvs0[0 + index_X4] = characterInfoArray[i].vertex_BL.uv; + m_textInfo.meshInfo[materialIndex].uvs0[1 + index_X4] = characterInfoArray[i].vertex_TL.uv; + m_textInfo.meshInfo[materialIndex].uvs0[2 + index_X4] = characterInfoArray[i].vertex_TR.uv; + m_textInfo.meshInfo[materialIndex].uvs0[3 + index_X4] = characterInfoArray[i].vertex_BR.uv; + + if (isVolumetric) + { + m_textInfo.meshInfo[materialIndex].uvs0[4 + index_X4] = characterInfoArray[i].vertex_BL.uv; + m_textInfo.meshInfo[materialIndex].uvs0[5 + index_X4] = characterInfoArray[i].vertex_TL.uv; + m_textInfo.meshInfo[materialIndex].uvs0[6 + index_X4] = characterInfoArray[i].vertex_TR.uv; + m_textInfo.meshInfo[materialIndex].uvs0[7 + index_X4] = characterInfoArray[i].vertex_BR.uv; + } + + + // Setup UVS2 + m_textInfo.meshInfo[materialIndex].uvs2[0 + index_X4] = characterInfoArray[i].vertex_BL.uv2; + m_textInfo.meshInfo[materialIndex].uvs2[1 + index_X4] = characterInfoArray[i].vertex_TL.uv2; + m_textInfo.meshInfo[materialIndex].uvs2[2 + index_X4] = characterInfoArray[i].vertex_TR.uv2; + m_textInfo.meshInfo[materialIndex].uvs2[3 + index_X4] = characterInfoArray[i].vertex_BR.uv2; + + if (isVolumetric) + { + m_textInfo.meshInfo[materialIndex].uvs2[4 + index_X4] = characterInfoArray[i].vertex_BL.uv2; + m_textInfo.meshInfo[materialIndex].uvs2[5 + index_X4] = characterInfoArray[i].vertex_TL.uv2; + m_textInfo.meshInfo[materialIndex].uvs2[6 + index_X4] = characterInfoArray[i].vertex_TR.uv2; + m_textInfo.meshInfo[materialIndex].uvs2[7 + index_X4] = characterInfoArray[i].vertex_BR.uv2; + } + + + // Setup UVS4 + //m_textInfo.meshInfo[0].uvs4[0 + index_X4] = characterInfoArray[i].vertex_BL.uv4; + //m_textInfo.meshInfo[0].uvs4[1 + index_X4] = characterInfoArray[i].vertex_TL.uv4; + //m_textInfo.meshInfo[0].uvs4[2 + index_X4] = characterInfoArray[i].vertex_TR.uv4; + //m_textInfo.meshInfo[0].uvs4[3 + index_X4] = characterInfoArray[i].vertex_BR.uv4; + + + // setup Vertex Colors + m_textInfo.meshInfo[materialIndex].colors32[0 + index_X4] = characterInfoArray[i].vertex_BL.color; + m_textInfo.meshInfo[materialIndex].colors32[1 + index_X4] = characterInfoArray[i].vertex_TL.color; + m_textInfo.meshInfo[materialIndex].colors32[2 + index_X4] = characterInfoArray[i].vertex_TR.color; + m_textInfo.meshInfo[materialIndex].colors32[3 + index_X4] = characterInfoArray[i].vertex_BR.color; + + if (isVolumetric) + { + Color32 backColor = new Color32(255, 255, 128, 255); + m_textInfo.meshInfo[materialIndex].colors32[4 + index_X4] = backColor; //characterInfoArray[i].vertex_BL.color; + m_textInfo.meshInfo[materialIndex].colors32[5 + index_X4] = backColor; //characterInfoArray[i].vertex_TL.color; + m_textInfo.meshInfo[materialIndex].colors32[6 + index_X4] = backColor; //characterInfoArray[i].vertex_TR.color; + m_textInfo.meshInfo[materialIndex].colors32[7 + index_X4] = backColor; //characterInfoArray[i].vertex_BR.color; + } + + m_textInfo.meshInfo[materialIndex].vertexCount = index_X4 + (!isVolumetric ? 4 : 8); + } + + + /// <summary> + /// Fill Vertex Buffers for Sprites + /// </summary> + /// <param name="i"></param> + /// <param name="spriteIndex_X4"></param> + protected virtual void FillSpriteVertexBuffers(int i, int index_X4) + { + int materialIndex = m_textInfo.characterInfo[i].materialReferenceIndex; + index_X4 = m_textInfo.meshInfo[materialIndex].vertexCount; + + TMP_CharacterInfo[] characterInfoArray = m_textInfo.characterInfo; + m_textInfo.characterInfo[i].vertexIndex = index_X4; + + // Setup Vertices for Characters + m_textInfo.meshInfo[materialIndex].vertices[0 + index_X4] = characterInfoArray[i].vertex_BL.position; + m_textInfo.meshInfo[materialIndex].vertices[1 + index_X4] = characterInfoArray[i].vertex_TL.position; + m_textInfo.meshInfo[materialIndex].vertices[2 + index_X4] = characterInfoArray[i].vertex_TR.position; + m_textInfo.meshInfo[materialIndex].vertices[3 + index_X4] = characterInfoArray[i].vertex_BR.position; + + + // Setup UVS0 + m_textInfo.meshInfo[materialIndex].uvs0[0 + index_X4] = characterInfoArray[i].vertex_BL.uv; + m_textInfo.meshInfo[materialIndex].uvs0[1 + index_X4] = characterInfoArray[i].vertex_TL.uv; + m_textInfo.meshInfo[materialIndex].uvs0[2 + index_X4] = characterInfoArray[i].vertex_TR.uv; + m_textInfo.meshInfo[materialIndex].uvs0[3 + index_X4] = characterInfoArray[i].vertex_BR.uv; + + + // Setup UVS2 + m_textInfo.meshInfo[materialIndex].uvs2[0 + index_X4] = characterInfoArray[i].vertex_BL.uv2; + m_textInfo.meshInfo[materialIndex].uvs2[1 + index_X4] = characterInfoArray[i].vertex_TL.uv2; + m_textInfo.meshInfo[materialIndex].uvs2[2 + index_X4] = characterInfoArray[i].vertex_TR.uv2; + m_textInfo.meshInfo[materialIndex].uvs2[3 + index_X4] = characterInfoArray[i].vertex_BR.uv2; + + + // Setup UVS4 + //m_textInfo.meshInfo[0].uvs4[0 + index_X4] = characterInfoArray[i].vertex_BL.uv4; + //m_textInfo.meshInfo[0].uvs4[1 + index_X4] = characterInfoArray[i].vertex_TL.uv4; + //m_textInfo.meshInfo[0].uvs4[2 + index_X4] = characterInfoArray[i].vertex_TR.uv4; + //m_textInfo.meshInfo[0].uvs4[3 + index_X4] = characterInfoArray[i].vertex_BR.uv4; + + + // setup Vertex Colors + m_textInfo.meshInfo[materialIndex].colors32[0 + index_X4] = characterInfoArray[i].vertex_BL.color; + m_textInfo.meshInfo[materialIndex].colors32[1 + index_X4] = characterInfoArray[i].vertex_TL.color; + m_textInfo.meshInfo[materialIndex].colors32[2 + index_X4] = characterInfoArray[i].vertex_TR.color; + m_textInfo.meshInfo[materialIndex].colors32[3 + index_X4] = characterInfoArray[i].vertex_BR.color; + + m_textInfo.meshInfo[materialIndex].vertexCount = index_X4 + 4; + } + + + /// <summary> + /// Method to add the underline geometry. + /// </summary> + /// <param name="start"></param> + /// <param name="end"></param> + /// <param name="startScale"></param> + /// <param name="endScale"></param> + /// <param name="maxScale"></param> + /// <param name="underlineColor"></param> + protected virtual void DrawUnderlineMesh(Vector3 start, Vector3 end, ref int index, float startScale, float endScale, float maxScale, float sdfScale, Color32 underlineColor) + { + if (m_cached_Underline_Character == null) + { + if (!TMP_Settings.warningsDisabled) + Debug.LogWarning("Unable to add underline since the Font Asset doesn't contain the underline character.", this); + + return; + } + + int verticesCount = index + 12; + // Check to make sure our current mesh buffer allocations can hold these new Quads. + if (verticesCount > m_textInfo.meshInfo[0].vertices.Length) + { + // Resize Mesh Buffers + m_textInfo.meshInfo[0].ResizeMeshInfo(verticesCount / 4); + } + + // Adjust the position of the underline based on the lowest character. This matters for subscript character. + start.y = Mathf.Min(start.y, end.y); + end.y = Mathf.Min(start.y, end.y); + + float segmentWidth = m_cached_Underline_Character.glyph.metrics.width / 2 * maxScale; + + if (end.x - start.x < m_cached_Underline_Character.glyph.metrics.width * maxScale) + { + segmentWidth = (end.x - start.x) / 2f; + } + + float startPadding = m_padding * startScale / maxScale; + float endPadding = m_padding * endScale / maxScale; + + float underlineThickness = m_fontAsset.faceInfo.underlineThickness; + + // UNDERLINE VERTICES FOR (3) LINE SEGMENTS + #region UNDERLINE VERTICES + Vector3[] vertices = m_textInfo.meshInfo[0].vertices; + + // Front Part of the Underline + vertices[index + 0] = start + new Vector3(0, 0 - (underlineThickness + m_padding) * maxScale, 0); // BL + vertices[index + 1] = start + new Vector3(0, m_padding * maxScale, 0); // TL + vertices[index + 2] = vertices[index + 1] + new Vector3(segmentWidth, 0, 0); // TR + vertices[index + 3] = vertices[index + 0] + new Vector3(segmentWidth, 0, 0); // BR + + // Middle Part of the Underline + vertices[index + 4] = vertices[index + 3]; // BL + vertices[index + 5] = vertices[index + 2]; // TL + vertices[index + 6] = end + new Vector3(-segmentWidth, m_padding * maxScale, 0); // TR + vertices[index + 7] = end + new Vector3(-segmentWidth, -(underlineThickness + m_padding) * maxScale, 0); // BR + + // End Part of the Underline + vertices[index + 8] = vertices[index + 7]; // BL + vertices[index + 9] = vertices[index + 6]; // TL + vertices[index + 10] = end + new Vector3(0, m_padding * maxScale, 0); // TR + vertices[index + 11] = end + new Vector3(0, -(underlineThickness + m_padding) * maxScale, 0); // BR + #endregion + + // UNDERLINE UV0 + #region HANDLE UV0 + Vector2[] uvs0 = m_textInfo.meshInfo[0].uvs0; + + // Calculate UV required to setup the 3 Quads for the Underline. + Vector2 uv0 = new Vector2((m_cached_Underline_Character.glyph.glyphRect.x - startPadding) / m_fontAsset.atlasWidth, (m_cached_Underline_Character.glyph.glyphRect.y - m_padding) / m_fontAsset.atlasHeight); // bottom left + Vector2 uv1 = new Vector2(uv0.x, (m_cached_Underline_Character.glyph.glyphRect.y + m_cached_Underline_Character.glyph.glyphRect.height + m_padding) / m_fontAsset.atlasHeight); // top left + Vector2 uv2 = new Vector2((m_cached_Underline_Character.glyph.glyphRect.x - startPadding + (float)m_cached_Underline_Character.glyph.glyphRect.width / 2) / m_fontAsset.atlasWidth, uv1.y); // Mid Top Left + Vector2 uv3 = new Vector2(uv2.x, uv0.y); // Mid Bottom Left + Vector2 uv4 = new Vector2((m_cached_Underline_Character.glyph.glyphRect.x + endPadding + (float)m_cached_Underline_Character.glyph.glyphRect.width / 2) / m_fontAsset.atlasWidth, uv1.y); // Mid Top Right + Vector2 uv5 = new Vector2(uv4.x, uv0.y); // Mid Bottom right + Vector2 uv6 = new Vector2((m_cached_Underline_Character.glyph.glyphRect.x + endPadding + m_cached_Underline_Character.glyph.glyphRect.width) / m_fontAsset.atlasWidth, uv1.y); // End Part - Bottom Right + Vector2 uv7 = new Vector2(uv6.x, uv0.y); // End Part - Top Right + + // Left Part of the Underline + uvs0[0 + index] = uv0; // BL + uvs0[1 + index] = uv1; // TL + uvs0[2 + index] = uv2; // TR + uvs0[3 + index] = uv3; // BR + + // Middle Part of the Underline + uvs0[4 + index] = new Vector2(uv2.x - uv2.x * 0.001f, uv0.y); + uvs0[5 + index] = new Vector2(uv2.x - uv2.x * 0.001f, uv1.y); + uvs0[6 + index] = new Vector2(uv2.x + uv2.x * 0.001f, uv1.y); + uvs0[7 + index] = new Vector2(uv2.x + uv2.x * 0.001f, uv0.y); + + // Right Part of the Underline + uvs0[8 + index] = uv5; + uvs0[9 + index] = uv4; + uvs0[10 + index] = uv6; + uvs0[11 + index] = uv7; + #endregion + + // UNDERLINE UV2 + #region HANDLE UV2 - SDF SCALE + // UV1 contains Face / Border UV layout. + float min_UvX = 0; + float max_UvX = (vertices[index + 2].x - start.x) / (end.x - start.x); + + //Calculate the xScale or how much the UV's are getting stretched on the X axis for the middle section of the underline. + float xScale = Mathf.Abs(sdfScale); + + Vector2[] uvs2 = m_textInfo.meshInfo[0].uvs2; + + uvs2[0 + index] = PackUV(0, 0, xScale); + uvs2[1 + index] = PackUV(0, 1, xScale); + uvs2[2 + index] = PackUV(max_UvX, 1, xScale); + uvs2[3 + index] = PackUV(max_UvX, 0, xScale); + + min_UvX = (vertices[index + 4].x - start.x) / (end.x - start.x); + max_UvX = (vertices[index + 6].x - start.x) / (end.x - start.x); + + uvs2[4 + index] = PackUV(min_UvX, 0, xScale); + uvs2[5 + index] = PackUV(min_UvX, 1, xScale); + uvs2[6 + index] = PackUV(max_UvX, 1, xScale); + uvs2[7 + index] = PackUV(max_UvX, 0, xScale); + + min_UvX = (vertices[index + 8].x - start.x) / (end.x - start.x); + max_UvX = (vertices[index + 6].x - start.x) / (end.x - start.x); + + uvs2[8 + index] = PackUV(min_UvX, 0, xScale); + uvs2[9 + index] = PackUV(min_UvX, 1, xScale); + uvs2[10 + index] = PackUV(1, 1, xScale); + uvs2[11 + index] = PackUV(1, 0, xScale); + #endregion + + // UNDERLINE VERTEX COLORS + #region + // Alpha is the lower of the vertex color or tag color alpha used. + underlineColor.a = m_fontColor32.a < underlineColor.a ? (byte)(m_fontColor32.a) : (byte)(underlineColor.a); + + Color32[] colors32 = m_textInfo.meshInfo[0].colors32; + colors32[0 + index] = underlineColor; + colors32[1 + index] = underlineColor; + colors32[2 + index] = underlineColor; + colors32[3 + index] = underlineColor; + + colors32[4 + index] = underlineColor; + colors32[5 + index] = underlineColor; + colors32[6 + index] = underlineColor; + colors32[7 + index] = underlineColor; + + colors32[8 + index] = underlineColor; + colors32[9 + index] = underlineColor; + colors32[10 + index] = underlineColor; + colors32[11 + index] = underlineColor; + #endregion + + index += 12; + } + + + protected virtual void DrawTextHighlight(Vector3 start, Vector3 end, ref int index, Color32 highlightColor) + { + if (m_cached_Underline_Character == null) + { + if (!TMP_Settings.warningsDisabled) Debug.LogWarning("Unable to add underline since the Font Asset doesn't contain the underline character.", this); + return; + } + + int verticesCount = index + 4; + // Check to make sure our current mesh buffer allocations can hold these new Quads. + if (verticesCount > m_textInfo.meshInfo[0].vertices.Length) + { + // Resize Mesh Buffers + m_textInfo.meshInfo[0].ResizeMeshInfo(verticesCount / 4); + } + + // UNDERLINE VERTICES FOR (3) LINE SEGMENTS + #region HIGHLIGHT VERTICES + Vector3[] vertices = m_textInfo.meshInfo[0].vertices; + + // Front Part of the Underline + vertices[index + 0] = start; // BL + vertices[index + 1] = new Vector3(start.x, end.y, 0); // TL + vertices[index + 2] = end; // TR + vertices[index + 3] = new Vector3(end.x, start.y, 0); // BR + #endregion + + // UNDERLINE UV0 + #region HANDLE UV0 + Vector2[] uvs0 = m_textInfo.meshInfo[0].uvs0; + + // Calculate UV required to setup the 3 Quads for the Underline. + Vector2 uv0 = new Vector2(((float)m_cached_Underline_Character.glyph.glyphRect.x + m_cached_Underline_Character.glyph.glyphRect.width / 2) / m_fontAsset.atlasWidth, (m_cached_Underline_Character.glyph.glyphRect.y + (float)m_cached_Underline_Character.glyph.glyphRect.height / 2) / m_fontAsset.atlasHeight); // bottom left + //Vector2 uv1 = new Vector2(uv0.x, uv0.y); // top left + //Vector2 uv2 = new Vector2(uv0.x, uv0.y); // Top Right + //Vector2 uv3 = new Vector2(uv2.x, uv0.y); // Bottom Right + + // Left Part of the Underline + uvs0[0 + index] = uv0; // BL + uvs0[1 + index] = uv0; // TL + uvs0[2 + index] = uv0; // TR + uvs0[3 + index] = uv0; // BR + #endregion + + // UNDERLINE UV2 + #region HANDLE UV2 - SDF SCALE + // UV1 contains Face / Border UV layout. + //float min_UvX = 0; + //float max_UvX = (vertices[index + 2].x - start.x) / (end.x - start.x); + + ////Calculate the xScale or how much the UV's are getting stretched on the X axis for the middle section of the underline. + //float xScale = 0; // Mathf.Abs(sdfScale); + + Vector2[] uvs2 = m_textInfo.meshInfo[0].uvs2; + Vector2 customUV = new Vector2(0, 1); + uvs2[0 + index] = customUV; // PackUV(-0.2f, -0.2f, xScale); + uvs2[1 + index] = customUV; // PackUV(-0.2f, -0.1f, xScale); + uvs2[2 + index] = customUV; // PackUV(-0.1f, -0.1f, xScale); + uvs2[3 + index] = customUV; // PackUV(-0.1f, -0.2f, xScale); + #endregion + + // HIGHLIGHT VERTEX COLORS + #region + // Alpha is the lower of the vertex color or tag color alpha used. + highlightColor.a = m_fontColor32.a < highlightColor.a ? m_fontColor32.a : highlightColor.a; + + Color32[] colors32 = m_textInfo.meshInfo[0].colors32; + colors32[0 + index] = highlightColor; + colors32[1 + index] = highlightColor; + colors32[2 + index] = highlightColor; + colors32[3 + index] = highlightColor; + #endregion + + index += 4; + } + + + /// <summary> + /// Internal function used to load the default settings of text objects. + /// </summary> + protected void LoadDefaultSettings() + { + if (m_text == null || m_isWaitingOnResourceLoad) + { + if (TMP_Settings.autoSizeTextContainer) + autoSizeTextContainer = true; + else + { + m_rectTransform = this.rectTransform; + + if (GetType() == typeof(TextMeshPro)) + m_rectTransform.sizeDelta = TMP_Settings.defaultTextMeshProTextContainerSize; + else + m_rectTransform.sizeDelta = TMP_Settings.defaultTextMeshProUITextContainerSize; + } + + m_enableWordWrapping = TMP_Settings.enableWordWrapping; + m_enableKerning = TMP_Settings.enableKerning; + m_enableExtraPadding = TMP_Settings.enableExtraPadding; + m_tintAllSprites = TMP_Settings.enableTintAllSprites; + m_parseCtrlCharacters = TMP_Settings.enableParseEscapeCharacters; + m_fontSize = m_fontSizeBase = TMP_Settings.defaultFontSize; + m_fontSizeMin = m_fontSize * TMP_Settings.defaultTextAutoSizingMinRatio; + m_fontSizeMax = m_fontSize * TMP_Settings.defaultTextAutoSizingMaxRatio; + m_isWaitingOnResourceLoad = false; + raycastTarget = TMP_Settings.enableRaycastTarget; + } + } + + + /// <summary> + /// Method used to find and cache references to the Underline and Ellipsis characters. + /// </summary> + /// <param name=""></param> + protected void GetSpecialCharacters(TMP_FontAsset fontAsset) + { + bool isUsingAlternativeTypeface; + TMP_FontAsset tempFontAsset; + + // Check & Assign Underline Character for use with the Underline tag. + if (!fontAsset.characterLookupTable.TryGetValue(95, out m_cached_Underline_Character)) + { + m_cached_Underline_Character = TMP_FontAssetUtilities.GetCharacterFromFontAsset(95,fontAsset, false, m_FontStyleInternal, (FontWeight)m_FontWeightInternal, out isUsingAlternativeTypeface, out tempFontAsset); + + if (m_cached_Underline_Character == null) + { + if (!TMP_Settings.warningsDisabled) + Debug.LogWarning("The character used for Underline and Strikethrough is not available in font asset [" + fontAsset.name + "].", this); + } + } + + // Check & Assign Underline Character for use with the Underline tag. + if (!fontAsset.characterLookupTable.TryGetValue(8230, out m_cached_Ellipsis_Character)) //95 + { + m_cached_Ellipsis_Character = TMP_FontAssetUtilities.GetCharacterFromFontAsset(8230, fontAsset, false, m_FontStyleInternal, (FontWeight)m_FontWeightInternal, out isUsingAlternativeTypeface, out tempFontAsset); + + if (m_cached_Ellipsis_Character == null) + { + if (!TMP_Settings.warningsDisabled) + Debug.LogWarning("The character used for Ellipsis is not available in font asset [" + fontAsset.name + "].", this); + } + } + } + + + /// <summary> + /// Replace a given number of characters (tag) in the array with a new character and shift subsequent characters in the array. + /// </summary> + /// <param name="chars">Array which contains the text.</param> + /// <param name="insertionIndex">The index of where the new character will be inserted</param> + /// <param name="tagLength">Length of the tag being replaced.</param> + /// <param name="c">The replacement character.</param> + protected void ReplaceTagWithCharacter(int[] chars, int insertionIndex, int tagLength, char c) + { + chars[insertionIndex] = c; + + for (int i = insertionIndex + tagLength; i < chars.Length; i++) + { + chars[i - 3] = chars[i]; + } + } + + + /// <summary> + /// + /// </summary> + /// <returns></returns> + //protected int GetMaterialReferenceForFontWeight() + //{ + // //bool isItalic = (m_style & FontStyles.Italic) == FontStyles.Italic || (m_fontStyle & FontStyles.Italic) == FontStyles.Italic; + + // m_currentMaterialIndex = MaterialReference.AddMaterialReference(m_currentFontAsset.fontWeights[0].italicTypeface.material, m_currentFontAsset.fontWeights[0].italicTypeface, m_materialReferences, m_materialReferenceIndexLookup); + + // return 0; + //} + + + /// <summary> + /// + /// </summary> + /// <returns></returns> + protected TMP_FontAsset GetFontAssetForWeight(int fontWeight) + { + bool isItalic = (m_FontStyleInternal & FontStyles.Italic) == FontStyles.Italic || (m_fontStyle & FontStyles.Italic) == FontStyles.Italic; + + TMP_FontAsset fontAsset = null; + + int weightIndex = fontWeight / 100; + + if (isItalic) + fontAsset = m_currentFontAsset.fontWeightTable[weightIndex].italicTypeface; + else + fontAsset = m_currentFontAsset.fontWeightTable[weightIndex].regularTypeface; + + return fontAsset; + } + + + /// <summary> + /// Method to Enable or Disable child SubMesh objects. + /// </summary> + /// <param name="state"></param> + protected virtual void SetActiveSubMeshes(bool state) { } + + + /// <summary> + /// Destroy Sub Mesh Objects. + /// </summary> + protected virtual void ClearSubMeshObjects() { } + + + /// <summary> + /// Function to clear the geometry of the Primary and Sub Text objects. + /// </summary> + public virtual void ClearMesh() { } + + + /// <summary> + /// Function to clear the geometry of the Primary and Sub Text objects. + /// </summary> + public virtual void ClearMesh(bool uploadGeometry) { } + + + /// <summary> + /// Function which returns the text after it has been parsed and rich text tags removed. + /// </summary> + /// <returns></returns> + public virtual string GetParsedText() + { + if (m_textInfo == null) + return string.Empty; + + int characterCount = m_textInfo.characterCount; + + // TODO - Could implement some static buffer pool shared by all instances of TMP objects. + char[] buffer = new char[characterCount]; + + for (int i = 0; i < characterCount && i < m_textInfo.characterInfo.Length; i++) + { + buffer[i] = m_textInfo.characterInfo[i].character; + } + + return new string(buffer); + } + + + /// <summary> + /// Function to pack scale information in the UV2 Channel. + /// </summary> + /// <param name="x"></param> + /// <param name="y"></param> + /// <param name="scale"></param> + /// <returns></returns> + //protected Vector2 PackUV(float x, float y, float scale) + //{ + // Vector2 output; + + // output.x = Mathf.Floor(x * 4095); + // output.y = Mathf.Floor(y * 4095); + + // output.x = (output.x * 4096) + output.y; + // output.y = scale; + + // return output; + //} + + /// <summary> + /// Function to pack scale information in the UV2 Channel. + /// </summary> + /// <param name="x"></param> + /// <param name="y"></param> + /// <param name="scale"></param> + /// <returns></returns> + protected Vector2 PackUV(float x, float y, float scale) + { + Vector2 output; + + output.x = (int)(x * 511); + output.y = (int)(y * 511); + + output.x = (output.x * 4096) + output.y; + output.y = scale; + + return output; + } + + + /// <summary> + /// + /// </summary> + /// <param name="x"></param> + /// <param name="y"></param> + /// <returns></returns> + protected float PackUV(float x, float y) + { + double x0 = (int)(x * 511); + double y0 = (int)(y * 511); + + return (float)((x0 * 4096) + y0); + } + + + /// <summary> + /// Function used as a replacement for LateUpdate() + /// </summary> + internal virtual void InternalUpdate() { } + + + /// <summary> + /// Function to pack scale information in the UV2 Channel. + /// </summary> + /// <param name="x"></param> + /// <param name="y"></param> + /// <param name="scale"></param> + /// <returns></returns> + //protected Vector2 PackUV(float x, float y, float scale) + //{ + // Vector2 output; + + // output.x = Mathf.Floor(x * 4095); + // output.y = Mathf.Floor(y * 4095); + + // return new Vector2((output.x * 4096) + output.y, scale); + //} + + + /// <summary> + /// + /// </summary> + /// <param name="x"></param> + /// <param name="y"></param> + /// <returns></returns> + //protected float PackUV(float x, float y) + //{ + // x = (x % 5) / 5; + // y = (y % 5) / 5; + + // return Mathf.Round(x * 4096) + y; + //} + + + /// <summary> + /// Method to convert Hex to Int + /// </summary> + /// <param name="hex"></param> + /// <returns></returns> + protected int HexToInt(char hex) + { + switch (hex) + { + case '0': return 0; + case '1': return 1; + case '2': return 2; + case '3': return 3; + case '4': return 4; + case '5': return 5; + case '6': return 6; + case '7': return 7; + case '8': return 8; + case '9': return 9; + case 'A': return 10; + case 'B': return 11; + case 'C': return 12; + case 'D': return 13; + case 'E': return 14; + case 'F': return 15; + case 'a': return 10; + case 'b': return 11; + case 'c': return 12; + case 'd': return 13; + case 'e': return 14; + case 'f': return 15; + } + return 15; + } + + + /// <summary> + /// Convert UTF-16 Hex to Char + /// </summary> + /// <returns>The Unicode hex.</returns> + /// <param name="i">The index.</param> + protected int GetUTF16(string text, int i) + { + int unicode = 0; + unicode += HexToInt(text[i]) << 12; + unicode += HexToInt(text[i + 1]) << 8; + unicode += HexToInt(text[i + 2]) << 4; + unicode += HexToInt(text[i + 3]); + return unicode; + } + + /// <summary> + /// Convert UTF-16 Hex to Char + /// </summary> + /// <returns>The Unicode hex.</returns> + /// <param name="i">The index.</param> + protected int GetUTF16(StringBuilder text, int i) + { + int unicode = 0; + unicode += HexToInt(text[i]) << 12; + unicode += HexToInt(text[i + 1]) << 8; + unicode += HexToInt(text[i + 2]) << 4; + unicode += HexToInt(text[i + 3]); + return unicode; + } + + + /// <summary> + /// Convert UTF-32 Hex to Char + /// </summary> + /// <returns>The Unicode hex.</returns> + /// <param name="i">The index.</param> + protected int GetUTF32(string text, int i) + { + int unicode = 0; + unicode += HexToInt(text[i]) << 30; + unicode += HexToInt(text[i + 1]) << 24; + unicode += HexToInt(text[i + 2]) << 20; + unicode += HexToInt(text[i + 3]) << 16; + unicode += HexToInt(text[i + 4]) << 12; + unicode += HexToInt(text[i + 5]) << 8; + unicode += HexToInt(text[i + 6]) << 4; + unicode += HexToInt(text[i + 7]); + return unicode; + } + + /// <summary> + /// Convert UTF-32 Hex to Char + /// </summary> + /// <returns>The Unicode hex.</returns> + /// <param name="i">The index.</param> + protected int GetUTF32(StringBuilder text, int i) + { + int unicode = 0; + unicode += HexToInt(text[i]) << 30; + unicode += HexToInt(text[i + 1]) << 24; + unicode += HexToInt(text[i + 2]) << 20; + unicode += HexToInt(text[i + 3]) << 16; + unicode += HexToInt(text[i + 4]) << 12; + unicode += HexToInt(text[i + 5]) << 8; + unicode += HexToInt(text[i + 6]) << 4; + unicode += HexToInt(text[i + 7]); + return unicode; + } + + + /// <summary> + /// Method to convert Hex color values to Color32 + /// </summary> + /// <param name="hexChars"></param> + /// <param name="tagCount"></param> + /// <returns></returns> + protected Color32 HexCharsToColor(char[] hexChars, int tagCount) + { + if (tagCount == 4) + { + byte r = (byte)(HexToInt(hexChars[1]) * 16 + HexToInt(hexChars[1])); + byte g = (byte)(HexToInt(hexChars[2]) * 16 + HexToInt(hexChars[2])); + byte b = (byte)(HexToInt(hexChars[3]) * 16 + HexToInt(hexChars[3])); + + return new Color32(r, g, b, 255); + } + else if (tagCount == 5) + { + byte r = (byte)(HexToInt(hexChars[1]) * 16 + HexToInt(hexChars[1])); + byte g = (byte)(HexToInt(hexChars[2]) * 16 + HexToInt(hexChars[2])); + byte b = (byte)(HexToInt(hexChars[3]) * 16 + HexToInt(hexChars[3])); + byte a = (byte)(HexToInt(hexChars[4]) * 16 + HexToInt(hexChars[4])); + + return new Color32(r, g, b, a); + } + else if (tagCount == 7) + { + byte r = (byte)(HexToInt(hexChars[1]) * 16 + HexToInt(hexChars[2])); + byte g = (byte)(HexToInt(hexChars[3]) * 16 + HexToInt(hexChars[4])); + byte b = (byte)(HexToInt(hexChars[5]) * 16 + HexToInt(hexChars[6])); + + return new Color32(r, g, b, 255); + } + else if (tagCount == 9) + { + byte r = (byte)(HexToInt(hexChars[1]) * 16 + HexToInt(hexChars[2])); + byte g = (byte)(HexToInt(hexChars[3]) * 16 + HexToInt(hexChars[4])); + byte b = (byte)(HexToInt(hexChars[5]) * 16 + HexToInt(hexChars[6])); + byte a = (byte)(HexToInt(hexChars[7]) * 16 + HexToInt(hexChars[8])); + + return new Color32(r, g, b, a); + } + else if (tagCount == 10) + { + byte r = (byte)(HexToInt(hexChars[7]) * 16 + HexToInt(hexChars[7])); + byte g = (byte)(HexToInt(hexChars[8]) * 16 + HexToInt(hexChars[8])); + byte b = (byte)(HexToInt(hexChars[9]) * 16 + HexToInt(hexChars[9])); + + return new Color32(r, g, b, 255); + } + else if (tagCount == 11) + { + byte r = (byte)(HexToInt(hexChars[7]) * 16 + HexToInt(hexChars[7])); + byte g = (byte)(HexToInt(hexChars[8]) * 16 + HexToInt(hexChars[8])); + byte b = (byte)(HexToInt(hexChars[9]) * 16 + HexToInt(hexChars[9])); + byte a = (byte)(HexToInt(hexChars[10]) * 16 + HexToInt(hexChars[10])); + + return new Color32(r, g, b, a); + } + else if (tagCount == 13) + { + byte r = (byte)(HexToInt(hexChars[7]) * 16 + HexToInt(hexChars[8])); + byte g = (byte)(HexToInt(hexChars[9]) * 16 + HexToInt(hexChars[10])); + byte b = (byte)(HexToInt(hexChars[11]) * 16 + HexToInt(hexChars[12])); + + return new Color32(r, g, b, 255); + } + else if (tagCount == 15) + { + byte r = (byte)(HexToInt(hexChars[7]) * 16 + HexToInt(hexChars[8])); + byte g = (byte)(HexToInt(hexChars[9]) * 16 + HexToInt(hexChars[10])); + byte b = (byte)(HexToInt(hexChars[11]) * 16 + HexToInt(hexChars[12])); + byte a = (byte)(HexToInt(hexChars[13]) * 16 + HexToInt(hexChars[14])); + + return new Color32(r, g, b, a); + } + + return new Color32(255, 255, 255, 255); + } + + + /// <summary> + /// Method to convert Hex Color values to Color32 + /// </summary> + /// <param name="hexChars"></param> + /// <param name="startIndex"></param> + /// <param name="length"></param> + /// <returns></returns> + protected Color32 HexCharsToColor(char[] hexChars, int startIndex, int length) + { + if (length == 7) + { + byte r = (byte)(HexToInt(hexChars[startIndex + 1]) * 16 + HexToInt(hexChars[startIndex + 2])); + byte g = (byte)(HexToInt(hexChars[startIndex + 3]) * 16 + HexToInt(hexChars[startIndex + 4])); + byte b = (byte)(HexToInt(hexChars[startIndex + 5]) * 16 + HexToInt(hexChars[startIndex + 6])); + + return new Color32(r, g, b, 255); + } + else if (length == 9) + { + byte r = (byte)(HexToInt(hexChars[startIndex + 1]) * 16 + HexToInt(hexChars[startIndex + 2])); + byte g = (byte)(HexToInt(hexChars[startIndex + 3]) * 16 + HexToInt(hexChars[startIndex + 4])); + byte b = (byte)(HexToInt(hexChars[startIndex + 5]) * 16 + HexToInt(hexChars[startIndex + 6])); + byte a = (byte)(HexToInt(hexChars[startIndex + 7]) * 16 + HexToInt(hexChars[startIndex + 8])); + + return new Color32(r, g, b, a); + } + + return s_colorWhite; + } + + + /// <summary> + /// Method which returns the number of parameters used in a tag attribute and populates an array with such values. + /// </summary> + /// <param name="chars">Char[] containing the tag attribute and data</param> + /// <param name="startIndex">The index of the first char of the data</param> + /// <param name="length">The length of the data</param> + /// <param name="parameters">The number of parameters contained in the Char[]</param> + /// <returns></returns> + int GetAttributeParameters(char[] chars, int startIndex, int length, ref float[] parameters) + { + int endIndex = startIndex; + int attributeCount = 0; + + while (endIndex < startIndex + length) + { + parameters[attributeCount] = ConvertToFloat(chars, startIndex, length, out endIndex); + + length -= (endIndex - startIndex) + 1; + startIndex = endIndex + 1; + + attributeCount += 1; + } + + return attributeCount; + } + + + /// <summary> + /// Extracts a float value from char[] assuming we know the position of the start, end and decimal point. + /// </summary> + /// <param name="chars"></param> + /// <param name="startIndex"></param> + /// <param name="length"></param> + /// <returns></returns> + protected float ConvertToFloat(char[] chars, int startIndex, int length) + { + int lastIndex; + + return ConvertToFloat(chars, startIndex, length, out lastIndex); + } + + + /// <summary> + /// Extracts a float value from char[] given a start index and length. + /// </summary> + /// <param name="chars"></param> The Char[] containing the numerical sequence. + /// <param name="startIndex"></param> The index of the start of the numerical sequence. + /// <param name="length"></param> The length of the numerical sequence. + /// <param name="lastIndex"></param> Index of the last character in the validated sequence. + /// <returns></returns> + protected float ConvertToFloat(char[] chars, int startIndex, int length, out int lastIndex) + { + if (startIndex == 0) { lastIndex = 0; return -9999; } + int endIndex = startIndex + length; + + bool isIntegerValue = true; + float decimalPointMultiplier = 0; + + // Set value multiplier checking the first character to determine if we are using '+' or '-' + int valueSignMultiplier = 1; + if (chars[startIndex] == '+') + { + valueSignMultiplier = 1; + startIndex += 1; + } + else if (chars[startIndex] == '-') + { + valueSignMultiplier = -1; + startIndex += 1; + } + + float value = 0; + + for (int i = startIndex; i < endIndex; i++) + { + uint c = chars[i]; + + if (c >= '0' && c <= '9' || c == '.') + { + if (c == '.') + { + isIntegerValue = false; + decimalPointMultiplier = 0.1f; + continue; + } + + //Calculate integer and floating point value + if (isIntegerValue) + value = value * 10 + (c - 48) * valueSignMultiplier; + else + { + value = value + (c - 48) * decimalPointMultiplier * valueSignMultiplier; + decimalPointMultiplier *= 0.1f; + } + + continue; + } + else if (c == ',') + { + if (i + 1 < endIndex && chars[i + 1] == ' ') + lastIndex = i + 1; + else + lastIndex = i; + + return value; + } + } + + lastIndex = endIndex; + return value; + } + + + /// <summary> + /// Function to identify and validate the rich tag. Returns the position of the > if the tag was valid. + /// </summary> + /// <param name="chars"></param> + /// <param name="startIndex"></param> + /// <param name="endIndex"></param> + /// <returns></returns> + protected bool ValidateHtmlTag(UnicodeChar[] chars, int startIndex, out int endIndex) + { + int tagCharCount = 0; + byte attributeFlag = 0; + + int attributeIndex = 0; + m_xmlAttribute[attributeIndex].nameHashCode = 0; + m_xmlAttribute[attributeIndex].valueHashCode = 0; + m_xmlAttribute[attributeIndex].valueStartIndex = 0; + m_xmlAttribute[attributeIndex].valueLength = 0; + TagValueType tagValueType = m_xmlAttribute[attributeIndex].valueType = TagValueType.None; + TagUnitType tagUnitType = m_xmlAttribute[attributeIndex].unitType = TagUnitType.Pixels; + + // Clear attribute name hash codes + m_xmlAttribute[1].nameHashCode = 0; + m_xmlAttribute[2].nameHashCode = 0; + m_xmlAttribute[3].nameHashCode = 0; + m_xmlAttribute[4].nameHashCode = 0; + + endIndex = startIndex; + bool isTagSet = false; + bool isValidHtmlTag = false; + + for (int i = startIndex; i < chars.Length && chars[i].unicode != 0 && tagCharCount < m_htmlTag.Length && chars[i].unicode != '<'; i++) + { + int unicode = chars[i].unicode; + + if (unicode == '>') // ASCII Code of End HTML tag '>' + { + isValidHtmlTag = true; + endIndex = i; + m_htmlTag[tagCharCount] = (char)0; + break; + } + + m_htmlTag[tagCharCount] = (char)unicode; + tagCharCount += 1; + + if (attributeFlag == 1) + { + if (tagValueType == TagValueType.None) + { + // Check for attribute type + if (unicode == '+' || unicode == '-' || unicode == '.' || (unicode >= '0' && unicode <= '9')) + { + tagUnitType = TagUnitType.Pixels; + tagValueType = m_xmlAttribute[attributeIndex].valueType = TagValueType.NumericalValue; + m_xmlAttribute[attributeIndex].valueStartIndex = tagCharCount - 1; + m_xmlAttribute[attributeIndex].valueLength += 1; + } + else if (unicode == '#') + { + tagUnitType = TagUnitType.Pixels; + tagValueType = m_xmlAttribute[attributeIndex].valueType = TagValueType.ColorValue; + m_xmlAttribute[attributeIndex].valueStartIndex = tagCharCount - 1; + m_xmlAttribute[attributeIndex].valueLength += 1; + } + else if (unicode == '"') + { + tagUnitType = TagUnitType.Pixels; + tagValueType = m_xmlAttribute[attributeIndex].valueType = TagValueType.StringValue; + m_xmlAttribute[attributeIndex].valueStartIndex = tagCharCount; + } + else + { + tagUnitType = TagUnitType.Pixels; + tagValueType = m_xmlAttribute[attributeIndex].valueType = TagValueType.StringValue; + m_xmlAttribute[attributeIndex].valueStartIndex = tagCharCount - 1; + m_xmlAttribute[attributeIndex].valueHashCode = (m_xmlAttribute[attributeIndex].valueHashCode << 5) + m_xmlAttribute[attributeIndex].valueHashCode ^ unicode; + m_xmlAttribute[attributeIndex].valueLength += 1; + } + } + else + { + if (tagValueType == TagValueType.NumericalValue) + { + // Check for termination of numerical value. + if (unicode == 'p' || unicode == 'e' || unicode == '%' || unicode == ' ') + { + attributeFlag = 2; + tagValueType = TagValueType.None; + + switch (unicode) + { + case 'e': + m_xmlAttribute[attributeIndex].unitType = tagUnitType = TagUnitType.FontUnits; + break; + case '%': + m_xmlAttribute[attributeIndex].unitType = tagUnitType = TagUnitType.Percentage; + break; + default: + m_xmlAttribute[attributeIndex].unitType = tagUnitType = TagUnitType.Pixels; + break; + } + + attributeIndex += 1; + m_xmlAttribute[attributeIndex].nameHashCode = 0; + m_xmlAttribute[attributeIndex].valueHashCode = 0; + m_xmlAttribute[attributeIndex].valueType = TagValueType.None; + m_xmlAttribute[attributeIndex].unitType = TagUnitType.Pixels; + m_xmlAttribute[attributeIndex].valueStartIndex = 0; + m_xmlAttribute[attributeIndex].valueLength = 0; + + } + else if (attributeFlag != 2) + { + m_xmlAttribute[attributeIndex].valueLength += 1; + } + } + else if (tagValueType == TagValueType.ColorValue) + { + if (unicode != ' ') + { + m_xmlAttribute[attributeIndex].valueLength += 1; + } + else + { + attributeFlag = 2; + tagValueType = TagValueType.None; + tagUnitType = TagUnitType.Pixels; + attributeIndex += 1; + m_xmlAttribute[attributeIndex].nameHashCode = 0; + m_xmlAttribute[attributeIndex].valueType = TagValueType.None; + m_xmlAttribute[attributeIndex].unitType = TagUnitType.Pixels; + m_xmlAttribute[attributeIndex].valueHashCode = 0; + m_xmlAttribute[attributeIndex].valueStartIndex = 0; + m_xmlAttribute[attributeIndex].valueLength = 0; + } + } + else if (tagValueType == TagValueType.StringValue) + { + // Compute HashCode value for the named tag. + if (unicode != '"') + { + m_xmlAttribute[attributeIndex].valueHashCode = (m_xmlAttribute[attributeIndex].valueHashCode << 5) + m_xmlAttribute[attributeIndex].valueHashCode ^ unicode; + m_xmlAttribute[attributeIndex].valueLength += 1; + } + else + { + attributeFlag = 2; + tagValueType = TagValueType.None; + tagUnitType = TagUnitType.Pixels; + attributeIndex += 1; + m_xmlAttribute[attributeIndex].nameHashCode = 0; + m_xmlAttribute[attributeIndex].valueType = TagValueType.None; + m_xmlAttribute[attributeIndex].unitType = TagUnitType.Pixels; + m_xmlAttribute[attributeIndex].valueHashCode = 0; + m_xmlAttribute[attributeIndex].valueStartIndex = 0; + m_xmlAttribute[attributeIndex].valueLength = 0; + } + } + } + } + + + if (unicode == '=') // '=' + attributeFlag = 1; + + // Compute HashCode for the name of the attribute + if (attributeFlag == 0 && unicode == ' ') + { + if (isTagSet) return false; + + isTagSet = true; + attributeFlag = 2; + + tagValueType = TagValueType.None; + tagUnitType = TagUnitType.Pixels; + attributeIndex += 1; + m_xmlAttribute[attributeIndex].nameHashCode = 0; + m_xmlAttribute[attributeIndex].valueType = TagValueType.None; + m_xmlAttribute[attributeIndex].unitType = TagUnitType.Pixels; + m_xmlAttribute[attributeIndex].valueHashCode = 0; + m_xmlAttribute[attributeIndex].valueStartIndex = 0; + m_xmlAttribute[attributeIndex].valueLength = 0; + } + + if (attributeFlag == 0) + m_xmlAttribute[attributeIndex].nameHashCode = (m_xmlAttribute[attributeIndex].nameHashCode << 3) - m_xmlAttribute[attributeIndex].nameHashCode + unicode; + + if (attributeFlag == 2 && unicode == ' ') + attributeFlag = 0; + + } + + if (!isValidHtmlTag) + { + return false; + } + + //Debug.Log("Tag is [" + m_htmlTag.ArrayToString() + "]. Tag HashCode: " + m_xmlAttribute[0].nameHashCode + " Tag Value HashCode: " + m_xmlAttribute[0].valueHashCode + " Attribute 1 HashCode: " + m_xmlAttribute[1].nameHashCode + " Value HashCode: " + m_xmlAttribute[1].valueHashCode); + //for (int i = 0; i < attributeIndex; i++) + // Debug.Log("Tag [" + i + "] with HashCode: " + m_xmlAttribute[i].nameHashCode + " has value of [" + new string(m_htmlTag, m_xmlAttribute[i].valueStartIndex, m_xmlAttribute[i].valueLength) + "] Numerical Value: " + ConvertToFloat(m_htmlTag, m_xmlAttribute[i].valueStartIndex, m_xmlAttribute[i].valueLength)); + + #region Rich Text Tag Processing + #if !RICH_TEXT_ENABLED + // Special handling of the no parsing tag </noparse> </NOPARSE> tag + if (tag_NoParsing && (m_xmlAttribute[0].nameHashCode != 53822163 && m_xmlAttribute[0].nameHashCode != 49429939)) + return false; + else if (m_xmlAttribute[0].nameHashCode == 53822163 || m_xmlAttribute[0].nameHashCode == 49429939) + { + tag_NoParsing = false; + return true; + } + + // Color <#FFF> 3 Hex values (short form) + if (m_htmlTag[0] == 35 && tagCharCount == 4) + { + m_htmlColor = HexCharsToColor(m_htmlTag, tagCharCount); + m_colorStack.Add(m_htmlColor); + return true; + } + // Color <#FFF7> 4 Hex values with alpha (short form) + else if (m_htmlTag[0] == 35 && tagCharCount == 5) + { + m_htmlColor = HexCharsToColor(m_htmlTag, tagCharCount); + m_colorStack.Add(m_htmlColor); + return true; + } + // Color <#FF00FF> + else if (m_htmlTag[0] == 35 && tagCharCount == 7) // if Tag begins with # and contains 7 characters. + { + m_htmlColor = HexCharsToColor(m_htmlTag, tagCharCount); + m_colorStack.Add(m_htmlColor); + return true; + } + // Color <#FF00FF00> with alpha + else if (m_htmlTag[0] == 35 && tagCharCount == 9) // if Tag begins with # and contains 9 characters. + { + m_htmlColor = HexCharsToColor(m_htmlTag, tagCharCount); + m_colorStack.Add(m_htmlColor); + return true; + } + else + { + float value = 0; + + switch (m_xmlAttribute[0].nameHashCode) + { + case 98: // <b> + case 66: // <B> + m_FontStyleInternal |= FontStyles.Bold; + m_fontStyleStack.Add(FontStyles.Bold); + + m_FontWeightInternal = FontWeight.Bold; + return true; + case 427: // </b> + case 395: // </B> + if ((m_fontStyle & FontStyles.Bold) != FontStyles.Bold) + { + if (m_fontStyleStack.Remove(FontStyles.Bold) == 0) + { + m_FontStyleInternal &= ~FontStyles.Bold; + m_FontWeightInternal = m_FontWeightStack.Peek(); + } + } + return true; + case 105: // <i> + case 73: // <I> + m_FontStyleInternal |= FontStyles.Italic; + m_fontStyleStack.Add(FontStyles.Italic); + return true; + case 434: // </i> + case 402: // </I> + if ((m_fontStyle & FontStyles.Italic) != FontStyles.Italic) + { + if (m_fontStyleStack.Remove(FontStyles.Italic) == 0) + m_FontStyleInternal &= ~FontStyles.Italic; + } + return true; + case 115: // <s> + case 83: // <S> + m_FontStyleInternal |= FontStyles.Strikethrough; + m_fontStyleStack.Add(FontStyles.Strikethrough); + + if (m_xmlAttribute[1].nameHashCode == 281955 || m_xmlAttribute[1].nameHashCode == 192323) + { + m_strikethroughColor = HexCharsToColor(m_htmlTag, m_xmlAttribute[1].valueStartIndex, m_xmlAttribute[1].valueLength); + m_strikethroughColor.a = m_htmlColor.a < m_strikethroughColor.a ? (byte)(m_htmlColor.a) : (byte)(m_strikethroughColor .a); + } + else + m_strikethroughColor = m_htmlColor; + + m_strikethroughColorStack.Add(m_strikethroughColor); + + return true; + case 444: // </s> + case 412: // </S> + if ((m_fontStyle & FontStyles.Strikethrough) != FontStyles.Strikethrough) + { + if (m_fontStyleStack.Remove(FontStyles.Strikethrough) == 0) + m_FontStyleInternal &= ~FontStyles.Strikethrough; + } + return true; + case 117: // <u> + case 85: // <U> + m_FontStyleInternal |= FontStyles.Underline; + m_fontStyleStack.Add(FontStyles.Underline); + + if (m_xmlAttribute[1].nameHashCode == 281955 || m_xmlAttribute[1].nameHashCode == 192323) + { + m_underlineColor = HexCharsToColor(m_htmlTag, m_xmlAttribute[1].valueStartIndex, m_xmlAttribute[1].valueLength); + m_underlineColor.a = m_htmlColor.a < m_underlineColor.a ? (byte)(m_htmlColor.a) : (byte)(m_underlineColor.a); + } + else + m_underlineColor = m_htmlColor; + + m_underlineColorStack.Add(m_underlineColor); + + return true; + case 446: // </u> + case 414: // </U> + if ((m_fontStyle & FontStyles.Underline) != FontStyles.Underline) + { + m_underlineColor = m_underlineColorStack.Remove(); + + if (m_fontStyleStack.Remove(FontStyles.Underline) == 0) + m_FontStyleInternal &= ~FontStyles.Underline; + } + return true; + case 43045: // <mark=#FF00FF80> + case 30245: // <MARK> + m_FontStyleInternal |= FontStyles.Highlight; + m_fontStyleStack.Add(FontStyles.Highlight); + + m_highlightColor = HexCharsToColor(m_htmlTag, m_xmlAttribute[0].valueStartIndex, m_xmlAttribute[0].valueLength); + m_highlightColor.a = m_htmlColor.a < m_highlightColor.a ? (byte)(m_htmlColor.a) : (byte)(m_highlightColor.a); + m_highlightColorStack.Add(m_highlightColor); + + // Handle Mark Tag Attributes + for (int i = 0; i < m_xmlAttribute.Length && m_xmlAttribute[i].nameHashCode != 0; i++) + { + int nameHashCode = m_xmlAttribute[i].nameHashCode; + + switch (nameHashCode) + { + case 281955: // color + break; + + case 15087385: // padding + int paramCount = GetAttributeParameters(m_htmlTag, m_xmlAttribute[i].valueStartIndex, m_xmlAttribute[i].valueLength, ref m_attributeParameterValues); + if (paramCount != 4) return false; + + m_highlightPadding = new Vector4(m_attributeParameterValues[0], m_attributeParameterValues[1], m_attributeParameterValues[2], m_attributeParameterValues[3]); + break; + } + } + + return true; + case 155892: // </mark> + case 143092: // </MARK> + if ((m_fontStyle & FontStyles.Highlight) != FontStyles.Highlight) + { + m_highlightColor = m_highlightColorStack.Remove(); + + if (m_fontStyleStack.Remove(FontStyles.Highlight) == 0) + m_FontStyleInternal &= ~FontStyles.Highlight; + } + return true; + case 6552: // <sub> + case 4728: // <SUB> + m_fontScaleMultiplier *= m_currentFontAsset.faceInfo.subscriptSize > 0 ? m_currentFontAsset.faceInfo.subscriptSize : 1; + m_baselineOffsetStack.Push(m_baselineOffset); + m_baselineOffset += m_currentFontAsset.faceInfo.subscriptOffset * m_fontScale * m_fontScaleMultiplier; + + m_fontStyleStack.Add(FontStyles.Subscript); + m_FontStyleInternal |= FontStyles.Subscript; + return true; + case 22673: // </sub> + case 20849: // </SUB> + if ((m_FontStyleInternal & FontStyles.Subscript) == FontStyles.Subscript) + { + if (m_fontScaleMultiplier < 1) + { + //m_baselineOffset -= m_currentFontAsset.fontInfo.SubscriptOffset * m_fontScale * m_fontScaleMultiplier; + m_baselineOffset = m_baselineOffsetStack.Pop(); + m_fontScaleMultiplier /= m_currentFontAsset.faceInfo.subscriptSize > 0 ? m_currentFontAsset.faceInfo.subscriptSize : 1; + } + + if (m_fontStyleStack.Remove(FontStyles.Subscript) == 0) + m_FontStyleInternal &= ~FontStyles.Subscript; + } + return true; + case 6566: // <sup> + case 4742: // <SUP> + m_fontScaleMultiplier *= m_currentFontAsset.faceInfo.superscriptSize > 0 ? m_currentFontAsset.faceInfo.superscriptSize : 1; + m_baselineOffsetStack.Push(m_baselineOffset); + m_baselineOffset += m_currentFontAsset.faceInfo.superscriptOffset * m_fontScale * m_fontScaleMultiplier; + + m_fontStyleStack.Add(FontStyles.Superscript); + m_FontStyleInternal |= FontStyles.Superscript; + return true; + case 22687: // </sup> + case 20863: // </SUP> + if ((m_FontStyleInternal & FontStyles.Superscript) == FontStyles.Superscript) + { + if (m_fontScaleMultiplier < 1) + { + //m_baselineOffset -= m_currentFontAsset.fontInfo.SuperscriptOffset * m_fontScale * m_fontScaleMultiplier; + m_baselineOffset = m_baselineOffsetStack.Pop(); + m_fontScaleMultiplier /= m_currentFontAsset.faceInfo.superscriptSize > 0 ? m_currentFontAsset.faceInfo.superscriptSize : 1; + } + + if (m_fontStyleStack.Remove(FontStyles.Superscript) == 0) + m_FontStyleInternal &= ~FontStyles.Superscript; + } + return true; + case -330774850: // <font-weight> + case 2012149182: // <FONT-WEIGHT> + value = ConvertToFloat(m_htmlTag, m_xmlAttribute[0].valueStartIndex, m_xmlAttribute[0].valueLength); + + //if (value == -9999) return false; + + //if ((m_fontStyle & FontStyles.Bold) == FontStyles.Bold) + //{ + // // Nothing happens since Bold is forced on the text. + // //m_fontWeight = 700; + // return true; + //} + + + //// Remove bold style + //m_style &= ~FontStyles.Bold; + + switch ((int)value) + { + case 100: + m_FontWeightInternal = FontWeight.Thin; + break; + case 200: + m_FontWeightInternal = FontWeight.ExtraLight; + break; + case 300: + m_FontWeightInternal = FontWeight.Light; + break; + case 400: + m_FontWeightInternal = FontWeight.Regular; + break; + case 500: + m_FontWeightInternal = FontWeight.Medium; + break; + case 600: + m_FontWeightInternal = FontWeight.SemiBold; + break; + case 700: + m_FontWeightInternal = FontWeight.Bold; + break; + case 800: + m_FontWeightInternal = FontWeight.Heavy; + break; + case 900: + m_FontWeightInternal = FontWeight.Black; + break; + } + + m_FontWeightStack.Add(m_FontWeightInternal); + + return true; + case -1885698441: // </font-weight> + case 457225591: // </FONT-WEIGHT> + m_FontWeightStack.Remove(); + + if (m_FontStyleInternal == FontStyles.Bold) + m_FontWeightInternal = FontWeight.Bold; + else + m_FontWeightInternal = m_FontWeightStack.Peek(); + + return true; + case 6380: // <pos=000.00px> <pos=0em> <pos=50%> + case 4556: // <POS> + value = ConvertToFloat(m_htmlTag, m_xmlAttribute[0].valueStartIndex, m_xmlAttribute[0].valueLength); + if (value == -9999) return false; + + switch (tagUnitType) + { + case TagUnitType.Pixels: + m_xAdvance = value * (m_isOrthographic ? 1.0f : 0.1f); + //m_isIgnoringAlignment = true; + return true; + case TagUnitType.FontUnits: + m_xAdvance = value * m_currentFontSize * (m_isOrthographic ? 1.0f : 0.1f); + //m_isIgnoringAlignment = true; + return true; + case TagUnitType.Percentage: + m_xAdvance = m_marginWidth * value / 100; + //m_isIgnoringAlignment = true; + return true; + } + return false; + case 22501: // </pos> + case 20677: // </POS> + m_isIgnoringAlignment = false; + return true; + case 16034505: // <voffset> + case 11642281: // <VOFFSET> + value = ConvertToFloat(m_htmlTag, m_xmlAttribute[0].valueStartIndex, m_xmlAttribute[0].valueLength); + if (value == -9999) return false; + + switch (tagUnitType) + { + case TagUnitType.Pixels: + m_baselineOffset = value * (m_isOrthographic ? 1 : 0.1f); + return true; + case TagUnitType.FontUnits: + m_baselineOffset = value * (m_isOrthographic ? 1 : 0.1f) * m_currentFontSize; + return true; + case TagUnitType.Percentage: + //m_baselineOffset = m_marginHeight * val / 100; + return false; + } + return false; + case 54741026: // </voffset> + case 50348802: // </VOFFSET> + m_baselineOffset = 0; + return true; + case 43991: // <page> + case 31191: // <PAGE> + // This tag only works when Overflow - Page mode is used. + if (m_overflowMode == TextOverflowModes.Page) + { + m_xAdvance = 0 + tag_LineIndent + tag_Indent; + m_lineOffset = 0; + m_pageNumber += 1; + m_isNewPage = true; + } + return true; + // <BR> tag is now handled inline where it is replaced by a linefeed or \n. + //case 544: // <BR> + //case 800: // <br> + // m_forceLineBreak = true; + // return true; + case 43969: // <nobr> + case 31169: // <NOBR> + m_isNonBreakingSpace = true; + return true; + case 156816: // </nobr> + case 144016: // </NOBR> + m_isNonBreakingSpace = false; + return true; + case 45545: // <size=> + case 32745: // <SIZE> + value = ConvertToFloat(m_htmlTag, m_xmlAttribute[0].valueStartIndex, m_xmlAttribute[0].valueLength); + if (value == -9999) return false; + + switch (tagUnitType) + { + case TagUnitType.Pixels: + if (m_htmlTag[5] == 43) // <size=+00> + { + m_currentFontSize = m_fontSize + value; + m_sizeStack.Add(m_currentFontSize); + m_fontScale = (m_currentFontSize / m_currentFontAsset.faceInfo.pointSize * m_currentFontAsset.faceInfo.scale * (m_isOrthographic ? 1 : 0.1f)); + return true; + } + else if (m_htmlTag[5] == 45) // <size=-00> + { + m_currentFontSize = m_fontSize + value; + m_sizeStack.Add(m_currentFontSize); + m_fontScale = (m_currentFontSize / m_currentFontAsset.faceInfo.pointSize * m_currentFontAsset.faceInfo.scale * (m_isOrthographic ? 1 : 0.1f)); + return true; + } + else // <size=00.0> + { + m_currentFontSize = value; + m_sizeStack.Add(m_currentFontSize); + m_fontScale = (m_currentFontSize / m_currentFontAsset.faceInfo.pointSize * m_currentFontAsset.faceInfo.scale * (m_isOrthographic ? 1 : 0.1f)); + return true; + } + case TagUnitType.FontUnits: + m_currentFontSize = m_fontSize * value; + m_sizeStack.Add(m_currentFontSize); + m_fontScale = (m_currentFontSize / m_currentFontAsset.faceInfo.pointSize * m_currentFontAsset.faceInfo.scale * (m_isOrthographic ? 1 : 0.1f)); + return true; + case TagUnitType.Percentage: + m_currentFontSize = m_fontSize * value / 100; + m_sizeStack.Add(m_currentFontSize); + m_fontScale = (m_currentFontSize / m_currentFontAsset.faceInfo.pointSize * m_currentFontAsset.faceInfo.scale * (m_isOrthographic ? 1 : 0.1f)); + return true; + } + return false; + case 158392: // </size> + case 145592: // </SIZE> + m_currentFontSize = m_sizeStack.Remove(); + m_fontScale = (m_currentFontSize / m_currentFontAsset.faceInfo.pointSize * m_currentFontAsset.faceInfo.scale * (m_isOrthographic ? 1 : 0.1f)); + return true; + case 41311: // <font=xx> + case 28511: // <FONT> + int fontHashCode = m_xmlAttribute[0].valueHashCode; + int materialAttributeHashCode = m_xmlAttribute[1].nameHashCode; + int materialHashCode = m_xmlAttribute[1].valueHashCode; + + // Special handling for <font=default> or <font=Default> + if (fontHashCode == 764638571 || fontHashCode == 523367755) + { + m_currentFontAsset = m_materialReferences[0].fontAsset; + m_currentMaterial = m_materialReferences[0].material; + m_currentMaterialIndex = 0; + //Debug.Log("<font=Default> assigning Font Asset [" + m_currentFontAsset.name + "] with Material [" + m_currentMaterial.name + "]."); + + m_fontScale = (m_currentFontSize / m_currentFontAsset.faceInfo.pointSize * m_currentFontAsset.faceInfo.scale * (m_isOrthographic ? 1 : 0.1f)); + + m_materialReferenceStack.Add(m_materialReferences[0]); + + return true; + } + + TMP_FontAsset tempFont; + Material tempMaterial; + + // HANDLE NEW FONT ASSET + if (MaterialReferenceManager.TryGetFontAsset(fontHashCode, out tempFont)) + { + //if (tempFont != m_currentFontAsset) + //{ + // //Debug.Log("Assigning Font Asset: " + tempFont.name); + // m_currentFontAsset = tempFont; + // m_fontScale = (m_currentFontSize / m_currentFontAsset.fontInfo.PointSize * m_currentFontAsset.fontInfo.Scale * (m_isOrthographic ? 1 : 0.1f)); + //} + } + else + { + // Load Font Asset + tempFont = Resources.Load<TMP_FontAsset>(TMP_Settings.defaultFontAssetPath + new string(m_htmlTag, m_xmlAttribute[0].valueStartIndex, m_xmlAttribute[0].valueLength)); + + if (tempFont == null) + return false; + + // Add new reference to the font asset as well as default material to the MaterialReferenceManager + MaterialReferenceManager.AddFontAsset(tempFont); + } + + + // HANDLE NEW MATERIAL + if (materialAttributeHashCode == 0 && materialHashCode == 0) + { + // No material specified then use default font asset material. + m_currentMaterial = tempFont.material; + + m_currentMaterialIndex = MaterialReference.AddMaterialReference(m_currentMaterial, tempFont, m_materialReferences, m_materialReferenceIndexLookup); + + m_materialReferenceStack.Add(m_materialReferences[m_currentMaterialIndex]); + } + else if (materialAttributeHashCode == 103415287 || materialAttributeHashCode == 72669687) // using material attribute + { + if (MaterialReferenceManager.TryGetMaterial(materialHashCode, out tempMaterial)) + { + m_currentMaterial = tempMaterial; + + m_currentMaterialIndex = MaterialReference.AddMaterialReference(m_currentMaterial, tempFont, m_materialReferences, m_materialReferenceIndexLookup); + + m_materialReferenceStack.Add(m_materialReferences[m_currentMaterialIndex]); + } + else + { + // Load new material + tempMaterial = Resources.Load<Material>(TMP_Settings.defaultFontAssetPath + new string(m_htmlTag, m_xmlAttribute[1].valueStartIndex, m_xmlAttribute[1].valueLength)); + + if (tempMaterial == null) + return false; + + // Add new reference to this material in the MaterialReferenceManager + MaterialReferenceManager.AddFontMaterial(materialHashCode, tempMaterial); + + m_currentMaterial = tempMaterial; + + m_currentMaterialIndex = MaterialReference.AddMaterialReference(m_currentMaterial, tempFont, m_materialReferences, m_materialReferenceIndexLookup); + + m_materialReferenceStack.Add(m_materialReferences[m_currentMaterialIndex]); + } + } + else + return false; + + m_currentFontAsset = tempFont; + m_fontScale = (m_currentFontSize / m_currentFontAsset.faceInfo.pointSize * m_currentFontAsset.faceInfo.scale * (m_isOrthographic ? 1 : 0.1f)); + + return true; + case 154158: // </font> + case 141358: // </FONT> + { + MaterialReference materialReference = m_materialReferenceStack.Remove(); + + m_currentFontAsset = materialReference.fontAsset; + m_currentMaterial = materialReference.material; + m_currentMaterialIndex = materialReference.index; + + m_fontScale = (m_currentFontSize / m_currentFontAsset.faceInfo.pointSize * m_currentFontAsset.faceInfo.scale * (m_isOrthographic ? 1 : 0.1f)); + + return true; + } + case 103415287: // <material="material name"> + case 72669687: // <MATERIAL> + materialHashCode = m_xmlAttribute[0].valueHashCode; + + // Special handling for <material=default> or <material=Default> + if (materialHashCode == 764638571 || materialHashCode == 523367755) + { + // Check if material font atlas texture matches that of the current font asset. + //if (m_currentFontAsset.atlas.GetInstanceID() != m_currentMaterial.GetTexture(ShaderUtilities.ID_MainTex).GetInstanceID()) return false; + + m_currentMaterial = m_materialReferences[0].material; + m_currentMaterialIndex = 0; + + m_materialReferenceStack.Add(m_materialReferences[0]); + + return true; + } + + + // Check if material + if (MaterialReferenceManager.TryGetMaterial(materialHashCode, out tempMaterial)) + { + // Check if material font atlas texture matches that of the current font asset. + //if (m_currentFontAsset.atlas.GetInstanceID() != tempMaterial.GetTexture(ShaderUtilities.ID_MainTex).GetInstanceID()) return false; + + m_currentMaterial = tempMaterial; + + m_currentMaterialIndex = MaterialReference.AddMaterialReference(m_currentMaterial, m_currentFontAsset, m_materialReferences, m_materialReferenceIndexLookup); + + m_materialReferenceStack.Add(m_materialReferences[m_currentMaterialIndex]); + } + else + { + // Load new material + tempMaterial = Resources.Load<Material>(TMP_Settings.defaultFontAssetPath + new string(m_htmlTag, m_xmlAttribute[0].valueStartIndex, m_xmlAttribute[0].valueLength)); + + if (tempMaterial == null) + return false; + + // Check if material font atlas texture matches that of the current font asset. + //if (m_currentFontAsset.atlas.GetInstanceID() != tempMaterial.GetTexture(ShaderUtilities.ID_MainTex).GetInstanceID()) return false; + + // Add new reference to this material in the MaterialReferenceManager + MaterialReferenceManager.AddFontMaterial(materialHashCode, tempMaterial); + + m_currentMaterial = tempMaterial; + + m_currentMaterialIndex = MaterialReference.AddMaterialReference(m_currentMaterial, m_currentFontAsset , m_materialReferences, m_materialReferenceIndexLookup); + + m_materialReferenceStack.Add(m_materialReferences[m_currentMaterialIndex]); + } + return true; + case 374360934: // </material> + case 343615334: // </MATERIAL> + { + //if (m_currentMaterial.GetTexture(ShaderUtilities.ID_MainTex).GetInstanceID() != m_materialReferenceStack.PreviousItem().material.GetTexture(ShaderUtilities.ID_MainTex).GetInstanceID()) + // return false; + + MaterialReference materialReference = m_materialReferenceStack.Remove(); + + m_currentMaterial = materialReference.material; + m_currentMaterialIndex = materialReference.index; + + return true; + } + case 320078: // <space=000.00> + case 230446: // <SPACE> + value = ConvertToFloat(m_htmlTag, m_xmlAttribute[0].valueStartIndex, m_xmlAttribute[0].valueLength); + if (value == -9999) return false; + + switch (tagUnitType) + { + case TagUnitType.Pixels: + m_xAdvance += value * (m_isOrthographic ? 1 : 0.1f); + return true; + case TagUnitType.FontUnits: + m_xAdvance += value * (m_isOrthographic ? 1 : 0.1f) * m_currentFontSize; + return true; + case TagUnitType.Percentage: + // Not applicable + return false; + } + return false; + case 276254: // <alpha=#FF> + case 186622: // <ALPHA> + if (m_xmlAttribute[0].valueLength != 3) return false; + + m_htmlColor.a = (byte)(HexToInt(m_htmlTag[7]) * 16 + HexToInt(m_htmlTag[8])); + return true; + + case 1750458: // <a name=" "> + return false; + case 426: // </a> + return true; + case 43066: // <link="name"> + case 30266: // <LINK> + if (m_isParsingText && !m_isCalculatingPreferredValues) + { + int index = m_textInfo.linkCount; + + if (index + 1 > m_textInfo.linkInfo.Length) + TMP_TextInfo.Resize(ref m_textInfo.linkInfo, index + 1); + + m_textInfo.linkInfo[index].textComponent = this; + m_textInfo.linkInfo[index].hashCode = m_xmlAttribute[0].valueHashCode; + m_textInfo.linkInfo[index].linkTextfirstCharacterIndex = m_characterCount; + + m_textInfo.linkInfo[index].linkIdFirstCharacterIndex = startIndex + m_xmlAttribute[0].valueStartIndex; + m_textInfo.linkInfo[index].linkIdLength = m_xmlAttribute[0].valueLength; + m_textInfo.linkInfo[index].SetLinkID(m_htmlTag, m_xmlAttribute[0].valueStartIndex, m_xmlAttribute[0].valueLength); + } + return true; + case 155913: // </link> + case 143113: // </LINK> + if (m_isParsingText && !m_isCalculatingPreferredValues) + { + if (m_textInfo.linkCount < m_textInfo.linkInfo.Length) + { + m_textInfo.linkInfo[m_textInfo.linkCount].linkTextLength = m_characterCount - m_textInfo.linkInfo[m_textInfo.linkCount].linkTextfirstCharacterIndex; + + m_textInfo.linkCount += 1; + } + } + return true; + case 275917: // <align=> + case 186285: // <ALIGN> + switch (m_xmlAttribute[0].valueHashCode) + { + case 3774683: // <align=left> + m_lineJustification = TextAlignmentOptions.Left; + m_lineJustificationStack.Add(m_lineJustification); + return true; + case 136703040: // <align=right> + m_lineJustification = TextAlignmentOptions.Right; + m_lineJustificationStack.Add(m_lineJustification); + return true; + case -458210101: // <align=center> + m_lineJustification = TextAlignmentOptions.Center; + m_lineJustificationStack.Add(m_lineJustification); + return true; + case -523808257: // <align=justified> + m_lineJustification = TextAlignmentOptions.Justified; + m_lineJustificationStack.Add(m_lineJustification); + return true; + case 122383428: // <align=flush> + m_lineJustification = TextAlignmentOptions.Flush; + m_lineJustificationStack.Add(m_lineJustification); + return true; + } + return false; + case 1065846: // </align> + case 976214: // </ALIGN> + m_lineJustification = m_lineJustificationStack.Remove(); + return true; + case 327550: // <width=xx> + case 237918: // <WIDTH> + value = ConvertToFloat(m_htmlTag, m_xmlAttribute[0].valueStartIndex, m_xmlAttribute[0].valueLength); + if (value == -9999) return false; + + switch (tagUnitType) + { + case TagUnitType.Pixels: + m_width = value * (m_isOrthographic ? 1 : 0.1f); + break; + case TagUnitType.FontUnits: + return false; + //break; + case TagUnitType.Percentage: + m_width = m_marginWidth * value / 100; + break; + } + return true; + case 1117479: // </width> + case 1027847: // </WIDTH> + m_width = -1; + return true; + // STYLE tag is now handled inline and replaced by its definition. + //case 322689: // <style="name"> + //case 233057: // <STYLE> + // TMP_Style style = TMP_StyleSheet.GetStyle(m_xmlAttribute[0].valueHashCode); + + // if (style == null) return false; + + // m_styleStack.Add(style.hashCode); + + // // Parse Style Macro + // for (int i = 0; i < style.styleOpeningTagArray.Length; i++) + // { + // if (style.styleOpeningTagArray[i] == 60) + // { + // if (ValidateHtmlTag(style.styleOpeningTagArray, i + 1, out i) == false) return false; + // } + // } + // return true; + //case 1112618: // </style> + //case 1022986: // </STYLE> + // style = TMP_StyleSheet.GetStyle(m_xmlAttribute[0].valueHashCode); + + // if (style == null) + // { + // // Get style from the Style Stack + // int styleHashCode = m_styleStack.CurrentItem(); + // style = TMP_StyleSheet.GetStyle(styleHashCode); + + // m_styleStack.Remove(); + // } + + // if (style == null) return false; + // //// Parse Style Macro + // for (int i = 0; i < style.styleClosingTagArray.Length; i++) + // { + // if (style.styleClosingTagArray[i] == 60) + // ValidateHtmlTag(style.styleClosingTagArray, i + 1, out i); + // } + // return true; + case 281955: // <color> <color=#FF00FF> or <color=#FF00FF00> + case 192323: // <COLOR=#FF00FF> + // <color=#FFF> 3 Hex (short hand) + if (m_htmlTag[6] == 35 && tagCharCount == 10) + { + m_htmlColor = HexCharsToColor(m_htmlTag, tagCharCount); + m_colorStack.Add(m_htmlColor); + return true; + } + // <color=#FFF7> 4 Hex (short hand) + else if (m_htmlTag[6] == 35 && tagCharCount == 11) + { + m_htmlColor = HexCharsToColor(m_htmlTag, tagCharCount); + m_colorStack.Add(m_htmlColor); + return true; + } + // <color=#FF00FF> 3 Hex pairs + if (m_htmlTag[6] == 35 && tagCharCount == 13) + { + m_htmlColor = HexCharsToColor(m_htmlTag, tagCharCount); + m_colorStack.Add(m_htmlColor); + return true; + } + // <color=#FF00FF00> 4 Hex pairs + else if (m_htmlTag[6] == 35 && tagCharCount == 15) + { + m_htmlColor = HexCharsToColor(m_htmlTag, tagCharCount); + m_colorStack.Add(m_htmlColor); + return true; + } + + // <color=name> + switch (m_xmlAttribute[0].valueHashCode) + { + case 125395: // <color=red> + m_htmlColor = Color.red; + m_colorStack.Add(m_htmlColor); + return true; + case 3573310: // <color=blue> + m_htmlColor = Color.blue; + m_colorStack.Add(m_htmlColor); + return true; + case 117905991: // <color=black> + m_htmlColor = Color.black; + m_colorStack.Add(m_htmlColor); + return true; + case 121463835: // <color=green> + m_htmlColor = Color.green; + m_colorStack.Add(m_htmlColor); + return true; + case 140357351: // <color=white> + m_htmlColor = Color.white; + m_colorStack.Add(m_htmlColor); + return true; + case 26556144: // <color=orange> + m_htmlColor = new Color32(255, 128, 0, 255); + m_colorStack.Add(m_htmlColor); + return true; + case -36881330: // <color=purple> + m_htmlColor = new Color32(160, 32, 240, 255); + m_colorStack.Add(m_htmlColor); + return true; + case 554054276: // <color=yellow> + m_htmlColor = Color.yellow; + m_colorStack.Add(m_htmlColor); + return true; + } + return false; + + case 100149144: //<gradient> + case 69403544: // <GRADIENT> + int gradientPresetHashCode = m_xmlAttribute[0].valueHashCode; + TMP_ColorGradient tempColorGradientPreset; + + // Check if Color Gradient Preset has already been loaded. + if (MaterialReferenceManager.TryGetColorGradientPreset(gradientPresetHashCode, out tempColorGradientPreset)) + { + m_colorGradientPreset = tempColorGradientPreset; + } + else + { + // Load Color Gradient Preset + if (tempColorGradientPreset == null) + { + tempColorGradientPreset = Resources.Load<TMP_ColorGradient>(TMP_Settings.defaultColorGradientPresetsPath + new string(m_htmlTag, m_xmlAttribute[0].valueStartIndex, m_xmlAttribute[0].valueLength)); + } + + if (tempColorGradientPreset == null) + return false; + + MaterialReferenceManager.AddColorGradientPreset(gradientPresetHashCode, tempColorGradientPreset); + m_colorGradientPreset = tempColorGradientPreset; + } + + m_colorGradientStack.Add(m_colorGradientPreset); + + // TODO : Add support for defining preset in the tag itself + + return true; + + case 371094791: // </gradient> + case 340349191: // </GRADIENT> + m_colorGradientPreset = m_colorGradientStack.Remove(); + return true; + + case 1983971: // <cspace=xx.x> + case 1356515: // <CSPACE> + value = ConvertToFloat(m_htmlTag, m_xmlAttribute[0].valueStartIndex, m_xmlAttribute[0].valueLength); + if (value == -9999) return false; + + switch (tagUnitType) + { + case TagUnitType.Pixels: + m_cSpacing = value * (m_isOrthographic ? 1 : 0.1f); + break; + case TagUnitType.FontUnits: + m_cSpacing = value * (m_isOrthographic ? 1 : 0.1f) * m_currentFontSize; + break; + case TagUnitType.Percentage: + return false; + } + return true; + case 7513474: // </cspace> + case 6886018: // </CSPACE> + if (!m_isParsingText) return true; + + // Adjust xAdvance to remove extra space from last character. + if (m_characterCount > 0) + { + m_xAdvance -= m_cSpacing; + m_textInfo.characterInfo[m_characterCount - 1].xAdvance = m_xAdvance; + } + m_cSpacing = 0; + return true; + case 2152041: // <mspace=xx.x> + case 1524585: // <MSPACE> + value = ConvertToFloat(m_htmlTag, m_xmlAttribute[0].valueStartIndex, m_xmlAttribute[0].valueLength); + if (value == -9999) return false; + + switch (tagUnitType) + { + case TagUnitType.Pixels: + m_monoSpacing = value * (m_isOrthographic ? 1 : 0.1f); + break; + case TagUnitType.FontUnits: + m_monoSpacing = value * (m_isOrthographic ? 1 : 0.1f) * m_currentFontSize; + break; + case TagUnitType.Percentage: + return false; + } + return true; + case 7681544: // </mspace> + case 7054088: // </MSPACE> + m_monoSpacing = 0; + return true; + case 280416: // <class="name"> + return false; + case 1071884: // </color> + case 982252: // </COLOR> + m_htmlColor = m_colorStack.Remove(); + return true; + case 2068980: // <indent=10px> <indent=10em> <indent=50%> + case 1441524: // <INDENT> + value = ConvertToFloat(m_htmlTag, m_xmlAttribute[0].valueStartIndex, m_xmlAttribute[0].valueLength); + if (value == -9999) return false; + + switch (tagUnitType) + { + case TagUnitType.Pixels: + tag_Indent = value * (m_isOrthographic ? 1 : 0.1f); + break; + case TagUnitType.FontUnits: + tag_Indent = value * (m_isOrthographic ? 1 : 0.1f) * m_currentFontSize; + break; + case TagUnitType.Percentage: + tag_Indent = m_marginWidth * value / 100; + break; + } + m_indentStack.Add(tag_Indent); + + m_xAdvance = tag_Indent; + return true; + case 7598483: // </indent> + case 6971027: // </INDENT> + tag_Indent = m_indentStack.Remove(); + //m_xAdvance = tag_Indent; + return true; + case 1109386397: // <line-indent> + case -842656867: // <LINE-INDENT> + value = ConvertToFloat(m_htmlTag, m_xmlAttribute[0].valueStartIndex, m_xmlAttribute[0].valueLength); + if (value == -9999) return false; + + switch (tagUnitType) + { + case TagUnitType.Pixels: + tag_LineIndent = value * (m_isOrthographic ? 1 : 0.1f); + break; + case TagUnitType.FontUnits: + tag_LineIndent = value * (m_isOrthographic ? 1 : 0.1f) * m_currentFontSize; + break; + case TagUnitType.Percentage: + tag_LineIndent = m_marginWidth * value / 100; + break; + } + + m_xAdvance += tag_LineIndent; + return true; + case -445537194: // </line-indent> + case 1897386838: // </LINE-INDENT> + tag_LineIndent = 0; + return true; + case 2246877: // <sprite=x> + case 1619421: // <SPRITE> + int spriteAssetHashCode = m_xmlAttribute[0].valueHashCode; + TMP_SpriteAsset tempSpriteAsset; + m_spriteIndex = -1; + + // CHECK TAG FORMAT + if (m_xmlAttribute[0].valueType == TagValueType.None || m_xmlAttribute[0].valueType == TagValueType.NumericalValue) + { + // No Sprite Asset is assigned to the text object + if (m_spriteAsset != null) + { + m_currentSpriteAsset = m_spriteAsset; + } + else if (m_defaultSpriteAsset != null) + { + m_currentSpriteAsset = m_defaultSpriteAsset; + } + else if (m_defaultSpriteAsset == null) + { + if (TMP_Settings.defaultSpriteAsset != null) + m_defaultSpriteAsset = TMP_Settings.defaultSpriteAsset; + else + m_defaultSpriteAsset = Resources.Load<TMP_SpriteAsset>("Sprite Assets/Default Sprite Asset"); + + m_currentSpriteAsset = m_defaultSpriteAsset; + } + + // No valid sprite asset available + if (m_currentSpriteAsset == null) + return false; + } + else + { + // A Sprite Asset has been specified + if (MaterialReferenceManager.TryGetSpriteAsset(spriteAssetHashCode, out tempSpriteAsset)) + { + m_currentSpriteAsset = tempSpriteAsset; + } + else + { + // Load Sprite Asset + if (tempSpriteAsset == null) + { + tempSpriteAsset = Resources.Load<TMP_SpriteAsset>(TMP_Settings.defaultSpriteAssetPath + new string(m_htmlTag, m_xmlAttribute[0].valueStartIndex, m_xmlAttribute[0].valueLength)); + } + + if (tempSpriteAsset == null) + return false; + + //Debug.Log("Loading & assigning new Sprite Asset: " + tempSpriteAsset.name); + MaterialReferenceManager.AddSpriteAsset(spriteAssetHashCode, tempSpriteAsset); + m_currentSpriteAsset = tempSpriteAsset; + } + } + + // Handling of <sprite=index> legacy tag format. + if (m_xmlAttribute[0].valueType == TagValueType.NumericalValue) // <sprite=index> + { + int index = (int)ConvertToFloat(m_htmlTag, m_xmlAttribute[0].valueStartIndex, m_xmlAttribute[0].valueLength); + if (index == -9999) return false; + + // Check to make sure sprite index is valid + if (index > m_currentSpriteAsset.spriteCharacterTable.Count - 1) return false; + + m_spriteIndex = index; + } + + m_spriteColor = s_colorWhite; + m_tintSprite = false; + + // Handle Sprite Tag Attributes + for (int i = 0; i < m_xmlAttribute.Length && m_xmlAttribute[i].nameHashCode != 0; i++) + { + //Debug.Log("Attribute[" + i + "].nameHashCode=" + m_xmlAttribute[i].nameHashCode + " Value:" + ConvertToFloat(m_htmlTag, m_xmlAttribute[i].valueStartIndex, m_xmlAttribute[i].valueLength)); + int nameHashCode = m_xmlAttribute[i].nameHashCode; + int index = 0; + + switch (nameHashCode) + { + case 43347: // <sprite name=""> + case 30547: // <SPRITE NAME=""> + m_currentSpriteAsset = TMP_SpriteAsset.SearchForSpriteByHashCode(m_currentSpriteAsset, m_xmlAttribute[i].valueHashCode, true, out index); + if (index == -1) return false; + + m_spriteIndex = index; + break; + case 295562: // <sprite index=> + case 205930: // <SPRITE INDEX=> + index = (int)ConvertToFloat(m_htmlTag, m_xmlAttribute[1].valueStartIndex, m_xmlAttribute[1].valueLength); + if (index == -9999) return false; + + // Check to make sure sprite index is valid + if (index > m_currentSpriteAsset.spriteCharacterTable.Count - 1) return false; + + m_spriteIndex = index; + break; + case 45819: // tint + case 33019: // TINT + m_tintSprite = ConvertToFloat(m_htmlTag, m_xmlAttribute[i].valueStartIndex, m_xmlAttribute[i].valueLength) != 0; + break; + case 281955: // color=#FF00FF80 + case 192323: // COLOR + m_spriteColor = HexCharsToColor(m_htmlTag, m_xmlAttribute[i].valueStartIndex, m_xmlAttribute[i].valueLength); + break; + case 39505: // anim="0,16,12" start, end, fps + case 26705: // ANIM + //Debug.Log("Start: " + m_xmlAttribute[i].valueStartIndex + " Length: " + m_xmlAttribute[i].valueLength); + int paramCount = GetAttributeParameters(m_htmlTag, m_xmlAttribute[i].valueStartIndex, m_xmlAttribute[i].valueLength, ref m_attributeParameterValues); + if (paramCount != 3) return false; + + m_spriteIndex = (int)m_attributeParameterValues[0]; + + if (m_isParsingText) + { + // TODO : fix this! + //if (m_attributeParameterValues[0] > m_currentSpriteAsset.spriteInfoList.Count - 1 || m_attributeParameterValues[1] > m_currentSpriteAsset.spriteInfoList.Count - 1) + // return false; + + spriteAnimator.DoSpriteAnimation(m_characterCount, m_currentSpriteAsset, m_spriteIndex, (int)m_attributeParameterValues[1], (int)m_attributeParameterValues[2]); + } + + break; + //case 45545: // size + //case 32745: // SIZE + + // break; + default: + if (nameHashCode != 2246877 && nameHashCode != 1619421) + return false; + break; + } + } + + if (m_spriteIndex == -1) return false; + + // Material HashCode for the Sprite Asset is the Sprite Asset Hash Code + m_currentMaterialIndex = MaterialReference.AddMaterialReference(m_currentSpriteAsset.material, m_currentSpriteAsset, m_materialReferences, m_materialReferenceIndexLookup); + + m_textElementType = TMP_TextElementType.Sprite; + return true; + case 730022849: // <lowercase> + case 514803617: // <LOWERCASE> + m_FontStyleInternal |= FontStyles.LowerCase; + m_fontStyleStack.Add(FontStyles.LowerCase); + return true; + case -1668324918: // </lowercase> + case -1883544150: // </LOWERCASE> + if ((m_fontStyle & FontStyles.LowerCase) != FontStyles.LowerCase) + { + if (m_fontStyleStack.Remove(FontStyles.LowerCase) == 0) + m_FontStyleInternal &= ~FontStyles.LowerCase; + } + return true; + case 13526026: // <allcaps> + case 9133802: // <ALLCAPS> + case 781906058: // <uppercase> + case 566686826: // <UPPERCASE> + m_FontStyleInternal |= FontStyles.UpperCase; + m_fontStyleStack.Add(FontStyles.UpperCase); + return true; + case 52232547: // </allcaps> + case 47840323: // </ALLCAPS> + case -1616441709: // </uppercase> + case -1831660941: // </UPPERCASE> + if ((m_fontStyle & FontStyles.UpperCase) != FontStyles.UpperCase) + { + if (m_fontStyleStack.Remove(FontStyles.UpperCase) == 0) + m_FontStyleInternal &= ~FontStyles.UpperCase; + } + return true; + case 766244328: // <smallcaps> + case 551025096: // <SMALLCAPS> + m_FontStyleInternal |= FontStyles.SmallCaps; + m_fontStyleStack.Add(FontStyles.SmallCaps); + return true; + case -1632103439: // </smallcaps> + case -1847322671: // </SMALLCAPS> + if ((m_fontStyle & FontStyles.SmallCaps) != FontStyles.SmallCaps) + { + if (m_fontStyleStack.Remove(FontStyles.SmallCaps) == 0) + m_FontStyleInternal &= ~FontStyles.SmallCaps; + } + return true; + case 2109854: // <margin=00.0> <margin=00em> <margin=50%> + case 1482398: // <MARGIN> + // Check value type + switch (m_xmlAttribute[0].valueType) + { + case TagValueType.NumericalValue: + value = ConvertToFloat(m_htmlTag, m_xmlAttribute[0].valueStartIndex, m_xmlAttribute[0].valueLength); // px + if (value == -9999) return false; + + // Determine tag unit type + switch (tagUnitType) + { + case TagUnitType.Pixels: + m_marginLeft = value * (m_isOrthographic ? 1 : 0.1f); + break; + case TagUnitType.FontUnits: + m_marginLeft = value * (m_isOrthographic ? 1 : 0.1f) * m_currentFontSize; + break; + case TagUnitType.Percentage: + m_marginLeft = (m_marginWidth - (m_width != -1 ? m_width : 0)) * value / 100; + break; + } + m_marginLeft = m_marginLeft >= 0 ? m_marginLeft : 0; + m_marginRight = m_marginLeft; + return true; + + case TagValueType.None: + for (int i = 1; i < m_xmlAttribute.Length && m_xmlAttribute[i].nameHashCode != 0; i++) + { + // Get attribute name + int nameHashCode = m_xmlAttribute[i].nameHashCode; + + switch (nameHashCode) + { + case 42823: // <margin left=value> + value = ConvertToFloat(m_htmlTag, m_xmlAttribute[i].valueStartIndex, m_xmlAttribute[i].valueLength); // px + if (value == -9999) return false; + + switch (m_xmlAttribute[i].unitType) + { + case TagUnitType.Pixels: + m_marginLeft = value * (m_isOrthographic ? 1 : 0.1f); + break; + case TagUnitType.FontUnits: + m_marginLeft = value * (m_isOrthographic ? 1 : 0.1f) * m_currentFontSize; + break; + case TagUnitType.Percentage: + m_marginLeft = (m_marginWidth - (m_width != -1 ? m_width : 0)) * value / 100; + break; + } + m_marginLeft = m_marginLeft >= 0 ? m_marginLeft : 0; + break; + + case 315620: // <margin right=value> + value = ConvertToFloat(m_htmlTag, m_xmlAttribute[i].valueStartIndex, m_xmlAttribute[i].valueLength); // px + if (value == -9999) return false; + + switch (m_xmlAttribute[i].unitType) + { + case TagUnitType.Pixels: + m_marginRight = value * (m_isOrthographic ? 1 : 0.1f); + break; + case TagUnitType.FontUnits: + m_marginRight = value * (m_isOrthographic ? 1 : 0.1f) * m_currentFontSize; + break; + case TagUnitType.Percentage: + m_marginRight = (m_marginWidth - (m_width != -1 ? m_width : 0)) * value / 100; + break; + } + m_marginRight = m_marginRight >= 0 ? m_marginRight : 0; + break; + } + } + return true; + } + + return false; + case 7639357: // </margin> + case 7011901: // </MARGIN> + m_marginLeft = 0; + m_marginRight = 0; + return true; + case 1100728678: // <margin-left=xx.x> + case -855002522: // <MARGIN-LEFT> + value = ConvertToFloat(m_htmlTag, m_xmlAttribute[0].valueStartIndex, m_xmlAttribute[0].valueLength); // px + if (value == -9999) return false; + + switch (tagUnitType) + { + case TagUnitType.Pixels: + m_marginLeft = value * (m_isOrthographic ? 1 : 0.1f); + break; + case TagUnitType.FontUnits: + m_marginLeft = value * (m_isOrthographic ? 1 : 0.1f) * m_currentFontSize; + break; + case TagUnitType.Percentage: + m_marginLeft = (m_marginWidth - (m_width != -1 ? m_width : 0)) * value / 100; + break; + } + m_marginLeft = m_marginLeft >= 0 ? m_marginLeft : 0; + return true; + case -884817987: // <margin-right=xx.x> + case -1690034531: // <MARGIN-RIGHT> + value = ConvertToFloat(m_htmlTag, m_xmlAttribute[0].valueStartIndex, m_xmlAttribute[0].valueLength); // px + if (value == -9999) return false; + + switch (tagUnitType) + { + case TagUnitType.Pixels: + m_marginRight = value * (m_isOrthographic ? 1 : 0.1f); + break; + case TagUnitType.FontUnits: + m_marginRight = value * (m_isOrthographic ? 1 : 0.1f) * m_currentFontSize; + break; + case TagUnitType.Percentage: + m_marginRight = (m_marginWidth - (m_width != -1 ? m_width : 0)) * value / 100; + break; + } + m_marginRight = m_marginRight >= 0 ? m_marginRight : 0; + return true; + case 1109349752: // <line-height=xx.x> + case -842693512: // <LINE-HEIGHT> + value = ConvertToFloat(m_htmlTag, m_xmlAttribute[0].valueStartIndex, m_xmlAttribute[0].valueLength); + if (value == -9999 || value == 0) return false; + + switch (tagUnitType) + { + case TagUnitType.Pixels: + m_lineHeight = value * (m_isOrthographic ? 1 : 0.1f); + break; + case TagUnitType.FontUnits: + m_lineHeight = value * (m_isOrthographic ? 1 : 0.1f) * m_currentFontSize; + break; + case TagUnitType.Percentage: + m_lineHeight = m_fontAsset.faceInfo.lineHeight * value / 100 * m_fontScale; + break; + } + return true; + case -445573839: // </line-height> + case 1897350193: // </LINE-HEIGHT> + m_lineHeight = TMP_Math.FLOAT_UNSET; + return true; + case 15115642: // <noparse> + case 10723418: // <NOPARSE> + tag_NoParsing = true; + return true; + case 1913798: // <action> + case 1286342: // <ACTION> + int actionID = m_xmlAttribute[0].valueHashCode; + + if (m_isParsingText) + { + m_actionStack.Add(actionID); + + Debug.Log("Action ID: [" + actionID + "] First character index: " + m_characterCount); + + + } + //if (m_isParsingText) + //{ + // TMP_Action action = TMP_Action.GetAction(m_xmlAttribute[0].valueHashCode); + //} + return true; + case 7443301: // </action> + case 6815845: // </ACTION> + if (m_isParsingText) + { + Debug.Log("Action ID: [" + m_actionStack.CurrentItem() + "] Last character index: " + (m_characterCount - 1)); + } + + m_actionStack.Remove(); + return true; + case 315682: // <scale=xx.x> + case 226050: // <SCALE=xx.x> + value = ConvertToFloat(m_htmlTag, m_xmlAttribute[0].valueStartIndex, m_xmlAttribute[0].valueLength); + if (value == -9999) return false; + + m_FXMatrix = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, new Vector3(value, 1, 1)); + m_isFXMatrixSet = true; + + return true; + case 1105611: // </scale> + case 1015979: // </SCALE> + m_isFXMatrixSet = false; + return true; + case 2227963: // <rotate=xx.x> + case 1600507: // <ROTATE=xx.x> + // TODO: Add ability to use Random Rotation + + value = ConvertToFloat(m_htmlTag, m_xmlAttribute[0].valueStartIndex, m_xmlAttribute[0].valueLength); + if (value == -9999) return false; + + m_FXMatrix = Matrix4x4.TRS(Vector3.zero, Quaternion.Euler(0, 0, value), Vector3.one); + m_isFXMatrixSet = true; + + return true; + case 7757466: // </rotate> + case 7130010: // </ROTATE> + m_isFXMatrixSet = false; + return true; + case 317446: // <table> + case 227814: // <TABLE> + switch (m_xmlAttribute[1].nameHashCode) + { + case 327550: // width + float tableWidth = ConvertToFloat(m_htmlTag, m_xmlAttribute[1].valueStartIndex, m_xmlAttribute[1].valueLength); + + switch (tagUnitType) + { + case TagUnitType.Pixels: + Debug.Log("Table width = " + tableWidth + "px."); + break; + case TagUnitType.FontUnits: + Debug.Log("Table width = " + tableWidth + "em."); + break; + case TagUnitType.Percentage: + Debug.Log("Table width = " + tableWidth + "%."); + break; + } + break; + } + return true; + case 1107375: // </table> + case 1017743: // </TABLE> + return true; + case 926: // <tr> + case 670: // <TR> + return true; + case 3229: // </tr> + case 2973: // </TR> + return true; + case 916: // <th> + case 660: // <TH> + // Set style to bold and center alignment + return true; + case 3219: // </th> + case 2963: // </TH> + return true; + case 912: // <td> + case 656: // <TD> + // Style options + for (int i = 1; i < m_xmlAttribute.Length && m_xmlAttribute[i].nameHashCode != 0; i++) + { + switch (m_xmlAttribute[i].nameHashCode) + { + case 327550: // width + float tableWidth = ConvertToFloat(m_htmlTag, m_xmlAttribute[i].valueStartIndex, m_xmlAttribute[i].valueLength); + + switch (tagUnitType) + { + case TagUnitType.Pixels: + Debug.Log("Table width = " + tableWidth + "px."); + break; + case TagUnitType.FontUnits: + Debug.Log("Table width = " + tableWidth + "em."); + break; + case TagUnitType.Percentage: + Debug.Log("Table width = " + tableWidth + "%."); + break; + } + break; + case 275917: // align + switch (m_xmlAttribute[i].valueHashCode) + { + case 3774683: // left + Debug.Log("TD align=\"left\"."); + break; + case 136703040: // right + Debug.Log("TD align=\"right\"."); + break; + case -458210101: // center + Debug.Log("TD align=\"center\"."); + break; + case -523808257: // justified + Debug.Log("TD align=\"justified\"."); + break; + } + break; + } + } + + return true; + case 3215: // </td> + case 2959: // </TD> + return true; + } + } + #endif + #endregion + + return false; + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Text.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Text.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..cef63a5c62ba087179b9c117a5559faad343dd33 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_Text.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5143f58107604835ab1a5efa2d8818fd +timeCreated: 1445841744 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextElement.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextElement.cs new file mode 100644 index 0000000000000000000000000000000000000000..97954d9db59fa96366af1f9801b86b04c484281d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextElement.cs @@ -0,0 +1,62 @@ +using System; +using UnityEngine; +using UnityEngine.TextCore; + +namespace TMPro +{ + public enum TextElementType : byte + { + Character = 0x1, + Sprite = 0x2, + } + + /// <summary> + /// Base class for all text elements like Character and SpriteCharacter. + /// </summary> + [Serializable] + public class TMP_TextElement + { + /// <summary> + /// The type of text element which can be a character or sprite. + /// </summary> + public TextElementType elementType { get { return m_ElementType; } } + + /// <summary> + /// The unicode value (code point) of the character. + /// </summary> + public uint unicode { get { return m_Unicode; } set { m_Unicode = value; } } + + /// <summary> + /// The glyph used by this text element. + /// </summary> + public Glyph glyph { get { return m_Glyph; } set { m_Glyph = value; } } + + /// <summary> + /// The index of the glyph used by this text element. + /// </summary> + public uint glyphIndex { get { return m_GlyphIndex; } set { m_GlyphIndex = value; } } + + /// <summary> + /// The relative scale of the character. + /// </summary> + public float scale { get { return m_Scale; } set { m_Scale = value; } } + + // ============================================= + // Private backing fields for public properties. + // ============================================= + + [SerializeField] + protected TextElementType m_ElementType; + + [SerializeField] + private uint m_Unicode; + + private Glyph m_Glyph; + + [SerializeField] + private uint m_GlyphIndex; + + [SerializeField] + private float m_Scale; + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextElement.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextElement.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..d369da07951d75c7b9d32eb6334bf120fd1a02d3 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextElement.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 543674eec776b1442a192c932e6cd9b3 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextElement_Legacy.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextElement_Legacy.cs new file mode 100644 index 0000000000000000000000000000000000000000..cb698cfa6e5c20ee06ed320716433d6ff80450d6 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextElement_Legacy.cs @@ -0,0 +1,25 @@ +using UnityEngine; +using System; +using System.Collections; + + +namespace TMPro +{ + + /// <summary> + /// Base class for all text elements like characters (glyphs) and sprites. + /// </summary> + [Serializable] + public class TMP_TextElement_Legacy + { + public int id; + public float x; + public float y; + public float width; + public float height; + public float xOffset; + public float yOffset; + public float xAdvance; + public float scale; + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextElement_Legacy.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextElement_Legacy.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..d782bf9b05d88d48a519b555c909216971091e99 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextElement_Legacy.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 87ab1bebe13f41f89d5427e7d2c34d58 +timeCreated: 1448407070 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextInfo.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextInfo.cs new file mode 100644 index 0000000000000000000000000000000000000000..1098304105ce3a8faf13213264a3b35d97700a11 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextInfo.cs @@ -0,0 +1,256 @@ +using UnityEngine; +using System; +using System.Collections; +using System.Collections.Generic; + + +namespace TMPro +{ + /// <summary> + /// Class which contains information about every element contained within the text object. + /// </summary> + [Serializable] + public class TMP_TextInfo + { + private static Vector2 k_InfinityVectorPositive = new Vector2(32767, 32767); + private static Vector2 k_InfinityVectorNegative = new Vector2(-32767, -32767); + + public TMP_Text textComponent; + + public int characterCount; + public int spriteCount; + public int spaceCount; + public int wordCount; + public int linkCount; + public int lineCount; + public int pageCount; + + public int materialCount; + + public TMP_CharacterInfo[] characterInfo; + public TMP_WordInfo[] wordInfo; + public TMP_LinkInfo[] linkInfo; + public TMP_LineInfo[] lineInfo; + public TMP_PageInfo[] pageInfo; + public TMP_MeshInfo[] meshInfo; + + private TMP_MeshInfo[] m_CachedMeshInfo; + + // Default Constructor + public TMP_TextInfo() + { + characterInfo = new TMP_CharacterInfo[8]; + wordInfo = new TMP_WordInfo[16]; + linkInfo = new TMP_LinkInfo[0]; + lineInfo = new TMP_LineInfo[2]; + pageInfo = new TMP_PageInfo[4]; + + meshInfo = new TMP_MeshInfo[1]; + } + + + public TMP_TextInfo(TMP_Text textComponent) + { + this.textComponent = textComponent; + + characterInfo = new TMP_CharacterInfo[8]; + + wordInfo = new TMP_WordInfo[4]; + linkInfo = new TMP_LinkInfo[0]; + + lineInfo = new TMP_LineInfo[2]; + pageInfo = new TMP_PageInfo[4]; + + meshInfo = new TMP_MeshInfo[1]; + meshInfo[0].mesh = textComponent.mesh; + materialCount = 1; + } + + + /// <summary> + /// Function to clear the counters of the text object. + /// </summary> + public void Clear() + { + characterCount = 0; + spaceCount = 0; + wordCount = 0; + linkCount = 0; + lineCount = 0; + pageCount = 0; + spriteCount = 0; + + for (int i = 0; i < this.meshInfo.Length; i++) + { + this.meshInfo[i].vertexCount = 0; + } + } + + + /// <summary> + /// Function to clear the content of the MeshInfo array while preserving the Triangles, Normals and Tangents. + /// </summary> + public void ClearMeshInfo(bool updateMesh) + { + for (int i = 0; i < this.meshInfo.Length; i++) + this.meshInfo[i].Clear(updateMesh); + } + + + /// <summary> + /// Function to clear the content of all the MeshInfo arrays while preserving their Triangles, Normals and Tangents. + /// </summary> + public void ClearAllMeshInfo() + { + for (int i = 0; i < this.meshInfo.Length; i++) + this.meshInfo[i].Clear(true); + } + + + /// <summary> + /// + /// </summary> + public void ResetVertexLayout(bool isVolumetric) + { + for (int i = 0; i < this.meshInfo.Length; i++) + this.meshInfo[i].ResizeMeshInfo(0, isVolumetric); + } + + + /// <summary> + /// Function used to mark unused vertices as degenerate. + /// </summary> + /// <param name="materials"></param> + public void ClearUnusedVertices(MaterialReference[] materials) + { + for (int i = 0; i < meshInfo.Length; i++) + { + int start = 0; // materials[i].referenceCount * 4; + meshInfo[i].ClearUnusedVertices(start); + } + } + + + /// <summary> + /// Function to clear and initialize the lineInfo array. + /// </summary> + public void ClearLineInfo() + { + if (this.lineInfo == null) + this.lineInfo = new TMP_LineInfo[2]; + + for (int i = 0; i < this.lineInfo.Length; i++) + { + this.lineInfo[i].characterCount = 0; + this.lineInfo[i].spaceCount = 0; + this.lineInfo[i].wordCount = 0; + this.lineInfo[i].controlCharacterCount = 0; + this.lineInfo[i].width = 0; + + this.lineInfo[i].ascender = k_InfinityVectorNegative.x; + this.lineInfo[i].descender = k_InfinityVectorPositive.x; + + this.lineInfo[i].lineExtents.min = k_InfinityVectorPositive; + this.lineInfo[i].lineExtents.max = k_InfinityVectorNegative; + + this.lineInfo[i].maxAdvance = 0; + //this.lineInfo[i].maxScale = 0; + + } + } + + + /// <summary> + /// Function to copy the MeshInfo Arrays and their primary vertex data content. + /// </summary> + /// <returns>A copy of the MeshInfo[]</returns> + public TMP_MeshInfo[] CopyMeshInfoVertexData() + { + if (m_CachedMeshInfo == null || m_CachedMeshInfo.Length != meshInfo.Length) + { + m_CachedMeshInfo = new TMP_MeshInfo[meshInfo.Length]; + + // Initialize all the vertex data arrays + for (int i = 0; i < m_CachedMeshInfo.Length; i++) + { + int length = meshInfo[i].vertices.Length; + + m_CachedMeshInfo[i].vertices = new Vector3[length]; + m_CachedMeshInfo[i].uvs0 = new Vector2[length]; + m_CachedMeshInfo[i].uvs2 = new Vector2[length]; + m_CachedMeshInfo[i].colors32 = new Color32[length]; + + //m_CachedMeshInfo[i].normals = new Vector3[length]; + //m_CachedMeshInfo[i].tangents = new Vector4[length]; + //m_CachedMeshInfo[i].triangles = new int[meshInfo[i].triangles.Length]; + } + } + + for (int i = 0; i < m_CachedMeshInfo.Length; i++) + { + int length = meshInfo[i].vertices.Length; + + if (m_CachedMeshInfo[i].vertices.Length != length) + { + m_CachedMeshInfo[i].vertices = new Vector3[length]; + m_CachedMeshInfo[i].uvs0 = new Vector2[length]; + m_CachedMeshInfo[i].uvs2 = new Vector2[length]; + m_CachedMeshInfo[i].colors32 = new Color32[length]; + + //m_CachedMeshInfo[i].normals = new Vector3[length]; + //m_CachedMeshInfo[i].tangents = new Vector4[length]; + //m_CachedMeshInfo[i].triangles = new int[meshInfo[i].triangles.Length]; + } + + + // Only copy the primary vertex data + Array.Copy(meshInfo[i].vertices, m_CachedMeshInfo[i].vertices, length); + Array.Copy(meshInfo[i].uvs0, m_CachedMeshInfo[i].uvs0, length); + Array.Copy(meshInfo[i].uvs2, m_CachedMeshInfo[i].uvs2, length); + Array.Copy(meshInfo[i].colors32, m_CachedMeshInfo[i].colors32, length); + + //Array.Copy(meshInfo[i].normals, m_CachedMeshInfo[i].normals, length); + //Array.Copy(meshInfo[i].tangents, m_CachedMeshInfo[i].tangents, length); + //Array.Copy(meshInfo[i].triangles, m_CachedMeshInfo[i].triangles, meshInfo[i].triangles.Length); + } + + return m_CachedMeshInfo; + } + + + + /// <summary> + /// Function to resize any of the structure contained in the TMP_TextInfo class. + /// </summary> + /// <typeparam name="T"></typeparam> + /// <param name="array"></param> + /// <param name="size"></param> + public static void Resize<T> (ref T[] array, int size) + { + // Allocated to the next power of two + int newSize = size > 1024 ? size + 256 : Mathf.NextPowerOfTwo(size); + + Array.Resize(ref array, newSize); + } + + + /// <summary> + /// Function to resize any of the structure contained in the TMP_TextInfo class. + /// </summary> + /// <typeparam name="T"></typeparam> + /// <param name="array"></param> + /// <param name="size"></param> + /// <param name="isFixedSize"></param> + public static void Resize<T>(ref T[] array, int size, bool isBlockAllocated) + { + //if (size <= array.Length) return; + + if (isBlockAllocated) size = size > 1024 ? size + 256 : Mathf.NextPowerOfTwo(size); + + if (size == array.Length) return; + + Array.Resize(ref array, size); + } + + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextInfo.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextInfo.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..4f70c1f7f0563d8654338cef768679e4f359c922 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextInfo.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4ae64f3f72004807a9f919f9c27af0db +timeCreated: 1446589998 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextParsingUtilities.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextParsingUtilities.cs new file mode 100644 index 0000000000000000000000000000000000000000..c2acfba761c153902f1db376a028b67621fd8e2b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextParsingUtilities.cs @@ -0,0 +1,136 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +namespace TMPro +{ + public class TMP_TextParsingUtilities + { + private static readonly TMP_TextParsingUtilities s_Instance = new TMP_TextParsingUtilities(); + + /// <summary> + /// Default constructor + /// </summary> + static TMP_TextParsingUtilities() { } + + + /// <summary> + /// Get a singleton instance of the TextModuleUtilities. + /// </summary> + public static TMP_TextParsingUtilities instance + { + get { return s_Instance; } + } + + + /// <summary> + /// Function returning the hashcode value of a given string. + /// </summary> + public static uint GetHashCode(string s) + { + uint hashCode = 0; + + for (int i = 0; i < s.Length; i++) + hashCode = ((hashCode << 5) + hashCode) ^ ToUpperASCIIFast(s[i]); + + return hashCode; + } + + public static int GetHashCodeCaseSensitive(string s) + { + int hashCode = 0; + + for (int i = 0; i < s.Length; i++) + hashCode = ((hashCode << 5) + hashCode) ^ s[i]; + + return hashCode; + } + + + /// <summary> + /// Table used to convert character to lowercase. + /// </summary> + const string k_LookupStringL = "-------------------------------- !-#$%&-()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[-]^_`abcdefghijklmnopqrstuvwxyz{|}~-"; + + /// <summary> + /// Table used to convert character to uppercase. + /// </summary> + const string k_LookupStringU = "-------------------------------- !-#$%&-()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[-]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~-"; + + + /// <summary> + /// Get lowercase version of this ASCII character. + /// </summary> + //[MethodImpl(MethodImplOptions.AggressiveInlining)] + public static char ToLowerASCIIFast(char c) + { + if (c > k_LookupStringL.Length - 1) + return c; + + return k_LookupStringL[c]; + } + + + /// <summary> + /// Get uppercase version of this ASCII character. + /// </summary> + //[MethodImpl(MethodImplOptions.AggressiveInlining)] + public static char ToUpperASCIIFast(char c) + { + if (c > k_LookupStringU.Length - 1) + return c; + + return k_LookupStringU[c]; + } + + + /// <summary> + /// Get uppercase version of this ASCII character. + /// </summary> + //[MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint ToUpperASCIIFast(uint c) + { + if (c > k_LookupStringU.Length - 1) + return c; + + return k_LookupStringU[(int)c]; + } + + + /// <summary> + /// Get lowercase version of this ASCII character. + /// </summary> + //[MethodImpl(MethodImplOptions.AggressiveInlining)] + public static uint ToLowerASCIIFast(uint c) + { + if (c > k_LookupStringL.Length - 1) + return c; + + return k_LookupStringL[(int)c]; + } + + + /// <summary> + /// Check if Unicode is High Surrogate + /// </summary> + /// <param name="c"></param> + /// <returns></returns> + //[MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool IsHighSurrogate(uint c) + { + return c > 0xD800 && c < 0xDBFF; + } + + /// <summary> + /// Check if Unicode is Low Surrogate + /// </summary> + /// <param name="c"></param> + /// <returns></returns> + //[MethodImpl(MethodImplOptions.AggressiveInlining)] + public static bool IsLowSurrogate(uint c) + { + return c > 0xDC00 && c < 0xDFFF; + } + + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextParsingUtilities.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextParsingUtilities.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..e30b54c5dce3badbb52033d2427edd61686afd1f --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextParsingUtilities.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6ad632cbcc87f634d9b86006cdffdaf5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextUtilities.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextUtilities.cs new file mode 100644 index 0000000000000000000000000000000000000000..4db3d37cc9ec16d79c24f3bc9d50173789598e4d --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextUtilities.cs @@ -0,0 +1,2280 @@ +using UnityEngine; +using System.Collections; + + +namespace TMPro +{ + public enum CaretPosition { None, Left, Right } + + /// <summary> + /// Structure which contains the character index and position of caret relative to the character. + /// </summary> + public struct CaretInfo + { + public int index; + public CaretPosition position; + + public CaretInfo(int index, CaretPosition position) + { + this.index = index; + this.position = position; + } + } + + public static class TMP_TextUtilities + { + private static Vector3[] m_rectWorldCorners = new Vector3[4]; + + + // TEXT INPUT COMPONENT RELATED FUNCTIONS + + /// <summary> + /// + /// </summary> + /// <param name="textComponent">A reference to the text object.</param> + /// <param name="position">Position to check for intersection.</param> + /// <param name="camera">The scene camera which may be assigned to a Canvas using ScreenSpace Camera or WorldSpace render mode. Set to null is using ScreenSpace Overlay.</param> + /// <returns></returns> + //public static CaretInfo GetCursorInsertionIndex(TMP_Text textComponent, Vector3 position, Camera camera) + //{ + // int index = TMP_TextUtilities.FindNearestCharacter(textComponent, position, camera, false); + + // RectTransform rectTransform = textComponent.rectTransform; + + // // Convert position into Worldspace coordinates + // ScreenPointToWorldPointInRectangle(rectTransform, position, camera, out position); + + // TMP_CharacterInfo cInfo = textComponent.textInfo.characterInfo[index]; + + // // Get Bottom Left and Top Right position of the current character + // Vector3 bl = rectTransform.TransformPoint(cInfo.bottomLeft); + // //Vector3 tl = rectTransform.TransformPoint(new Vector3(cInfo.bottomLeft.x, cInfo.topRight.y, 0)); + // Vector3 tr = rectTransform.TransformPoint(cInfo.topRight); + // //Vector3 br = rectTransform.TransformPoint(new Vector3(cInfo.topRight.x, cInfo.bottomLeft.y, 0)); + + // float insertPosition = (position.x - bl.x) / (tr.x - bl.x); + + // if (insertPosition < 0.5f) + // return new CaretInfo(index, CaretPosition.Left); + // else + // return new CaretInfo(index, CaretPosition.Right); + //} + + + /// <summary> + /// Function returning the index of the character whose origin is closest to the cursor. + /// </summary> + /// <param name="textComponent">A reference to the text object.</param> + /// <param name="position">Position to check for intersection.</param> + /// <param name="camera">The scene camera which may be assigned to a Canvas using ScreenSpace Camera or WorldSpace render mode. Set to null is using ScreenSpace Overlay.</param> + /// <returns></returns> + public static int GetCursorIndexFromPosition(TMP_Text textComponent, Vector3 position, Camera camera) + { + int index = TMP_TextUtilities.FindNearestCharacter(textComponent, position, camera, false); + + RectTransform rectTransform = textComponent.rectTransform; + + // Convert position into Worldspace coordinates + ScreenPointToWorldPointInRectangle(rectTransform, position, camera, out position); + + TMP_CharacterInfo cInfo = textComponent.textInfo.characterInfo[index]; + + // Get Bottom Left and Top Right position of the current character + Vector3 bl = rectTransform.TransformPoint(cInfo.bottomLeft); + Vector3 tr = rectTransform.TransformPoint(cInfo.topRight); + + float insertPosition = (position.x - bl.x) / (tr.x - bl.x); + + if (insertPosition < 0.5f) + return index; + else + return index + 1; + + } + + + /// <summary> + /// Function returning the index of the character whose origin is closest to the cursor. + /// </summary> + /// <param name="textComponent">A reference to the text object.</param> + /// <param name="position">Position to check for intersection.</param> + /// <param name="camera">The scene camera which may be assigned to a Canvas using ScreenSpace Camera or WorldSpace render mode. Set to null is using ScreenSpace Overlay.</param> + /// <param name="cursor">The position of the cursor insertion position relative to the position.</param> + /// <returns></returns> + //public static int GetCursorIndexFromPosition(TMP_Text textComponent, Vector3 position, Camera camera, out CaretPosition cursor) + //{ + // int index = TMP_TextUtilities.FindNearestCharacter(textComponent, position, camera, false); + + // RectTransform rectTransform = textComponent.rectTransform; + + // // Convert position into Worldspace coordinates + // ScreenPointToWorldPointInRectangle(rectTransform, position, camera, out position); + + // TMP_CharacterInfo cInfo = textComponent.textInfo.characterInfo[index]; + + // // Get Bottom Left and Top Right position of the current character + // Vector3 bl = rectTransform.TransformPoint(cInfo.bottomLeft); + // Vector3 tr = rectTransform.TransformPoint(cInfo.topRight); + + // float insertPosition = (position.x - bl.x) / (tr.x - bl.x); + + // if (insertPosition < 0.5f) + // { + // cursor = CaretPosition.Left; + // return index; + // } + // else + // { + // cursor = CaretPosition.Right; + // return index; + // } + //} + + + /// <summary> + /// Function returning the index of the character whose origin is closest to the cursor. + /// </summary> + /// <param name="textComponent">A reference to the text object.</param> + /// <param name="position">Position to check for intersection.</param> + /// <param name="camera">The scene camera which may be assigned to a Canvas using ScreenSpace Camera or WorldSpace render mode. Set to null is using ScreenSpace Overlay.</param> + /// <param name="cursor">The position of the cursor insertion position relative to the position.</param> + /// <returns></returns> + public static int GetCursorIndexFromPosition(TMP_Text textComponent, Vector3 position, Camera camera, out CaretPosition cursor) + { + int line = TMP_TextUtilities.FindNearestLine(textComponent, position, camera); + + int index = FindNearestCharacterOnLine(textComponent, position, line, camera, false); + + // Special handling if line contains only one character. + if (textComponent.textInfo.lineInfo[line].characterCount == 1) + { + cursor = CaretPosition.Left; + return index; + } + + RectTransform rectTransform = textComponent.rectTransform; + + // Convert position into Worldspace coordinates + ScreenPointToWorldPointInRectangle(rectTransform, position, camera, out position); + + TMP_CharacterInfo cInfo = textComponent.textInfo.characterInfo[index]; + + // Get Bottom Left and Top Right position of the current character + Vector3 bl = rectTransform.TransformPoint(cInfo.bottomLeft); + Vector3 tr = rectTransform.TransformPoint(cInfo.topRight); + + float insertPosition = (position.x - bl.x) / (tr.x - bl.x); + + if (insertPosition < 0.5f) + { + cursor = CaretPosition.Left; + return index; + } + else + { + cursor = CaretPosition.Right; + return index; + } + } + + + /// <summary> + /// Function returning the line nearest to the position. + /// </summary> + /// <param name="textComponent"></param> + /// <param name="position"></param> + /// <param name="camera"></param> + /// <returns></returns> + public static int FindNearestLine(TMP_Text text, Vector3 position, Camera camera) + { + RectTransform rectTransform = text.rectTransform; + + float distance = Mathf.Infinity; + int closest = -1; + + // Convert position into Worldspace coordinates + ScreenPointToWorldPointInRectangle(rectTransform, position, camera, out position); + + for (int i = 0; i < text.textInfo.lineCount; i++) + { + TMP_LineInfo lineInfo = text.textInfo.lineInfo[i]; + + float ascender = rectTransform.TransformPoint(new Vector3(0, lineInfo.ascender, 0)).y; + float descender = rectTransform.TransformPoint(new Vector3(0, lineInfo.descender, 0)).y; + + if (ascender > position.y && descender < position.y) + { + //Debug.Log("Position is on line " + i); + return i; + } + + float d0 = Mathf.Abs(ascender - position.y); + float d1 = Mathf.Abs(descender - position.y); + + float d = Mathf.Min(d0, d1); + if (d < distance) + { + distance = d; + closest = i; + } + } + + //Debug.Log("Closest line to position is " + closest); + return closest; + } + + + /// <summary> + /// Function returning the nearest character to position on a given line. + /// </summary> + /// <param name="text"></param> + /// <param name="position"></param> + /// <param name="line"></param> + /// <param name="camera"></param> + /// <returns></returns> + public static int FindNearestCharacterOnLine(TMP_Text text, Vector3 position, int line, Camera camera, bool visibleOnly) + { + RectTransform rectTransform = text.rectTransform; + + // Convert position into Worldspace coordinates + ScreenPointToWorldPointInRectangle(rectTransform, position, camera, out position); + + int firstCharacter = text.textInfo.lineInfo[line].firstCharacterIndex; + int lastCharacter = text.textInfo.lineInfo[line].lastCharacterIndex; + + float distanceSqr = Mathf.Infinity; + int closest = lastCharacter; + + for (int i = firstCharacter; i < lastCharacter; i++) + { + // Get current character info. + TMP_CharacterInfo cInfo = text.textInfo.characterInfo[i]; + if (visibleOnly && !cInfo.isVisible) continue; + + // Get Bottom Left and Top Right position of the current character + Vector3 bl = rectTransform.TransformPoint(cInfo.bottomLeft); + Vector3 tl = rectTransform.TransformPoint(new Vector3(cInfo.bottomLeft.x, cInfo.topRight.y, 0)); + Vector3 tr = rectTransform.TransformPoint(cInfo.topRight); + Vector3 br = rectTransform.TransformPoint(new Vector3(cInfo.topRight.x, cInfo.bottomLeft.y, 0)); + + if (PointIntersectRectangle(position, bl, tl, tr, br)) + { + closest = i; + break; + } + + // Find the closest corner to position. + float dbl = DistanceToLine(bl, tl, position); + float dtl = DistanceToLine(tl, tr, position); + float dtr = DistanceToLine(tr, br, position); + float dbr = DistanceToLine(br, bl, position); + + float d = dbl < dtl ? dbl : dtl; + d = d < dtr ? d : dtr; + d = d < dbr ? d : dbr; + + if (distanceSqr > d) + { + distanceSqr = d; + closest = i; + } + } + return closest; + } + + + /// <summary> + /// Function used to determine if the position intersects with the RectTransform. + /// </summary> + /// <param name="rectTransform">A reference to the RectTranform of the text object.</param> + /// <param name="position">Position to check for intersection.</param> + /// <param name="camera">The scene camera which may be assigned to a Canvas using ScreenSpace Camera or WorldSpace render mode. Set to null is using ScreenSpace Overlay.</param> + /// <returns></returns> + public static bool IsIntersectingRectTransform(RectTransform rectTransform, Vector3 position, Camera camera) + { + // Convert position into Worldspace coordinates + ScreenPointToWorldPointInRectangle(rectTransform, position, camera, out position); + + rectTransform.GetWorldCorners(m_rectWorldCorners); + + if (PointIntersectRectangle(position, m_rectWorldCorners[0], m_rectWorldCorners[1], m_rectWorldCorners[2], m_rectWorldCorners[3])) + { + return true; + } + + return false; + } + + + // CHARACTER HANDLING + + /// <summary> + /// Function returning the index of the character at the given position (if any). + /// </summary> + /// <param name="text">A reference to the TextMeshPro component.</param> + /// <param name="position">Position to check for intersection.</param> + /// <param name="camera">The scene camera which is rendering the text or whichever one might be assigned to a Canvas using ScreenSpace Camera or WorldSpace render mode. Set to null is using ScreenSpace Overlay.</param> + /// <param name="visibleOnly">Only check for visible characters.</param> + /// <returns></returns> + public static int FindIntersectingCharacter(TMP_Text text, Vector3 position, Camera camera, bool visibleOnly) + { + RectTransform rectTransform = text.rectTransform; + + // Convert position into Worldspace coordinates + ScreenPointToWorldPointInRectangle(rectTransform, position, camera, out position); + + for (int i = 0; i < text.textInfo.characterCount; i++) + { + // Get current character info. + TMP_CharacterInfo cInfo = text.textInfo.characterInfo[i]; + if (visibleOnly && !cInfo.isVisible) continue; + + // Get Bottom Left and Top Right position of the current character + Vector3 bl = rectTransform.TransformPoint(cInfo.bottomLeft); + Vector3 tl = rectTransform.TransformPoint(new Vector3(cInfo.bottomLeft.x, cInfo.topRight.y, 0)); + Vector3 tr = rectTransform.TransformPoint(cInfo.topRight); + Vector3 br = rectTransform.TransformPoint(new Vector3(cInfo.topRight.x, cInfo.bottomLeft.y, 0)); + + if (PointIntersectRectangle(position, bl, tl, tr, br)) + return i; + + } + return -1; + } + + + /// <summary> + /// Function returning the index of the character at the given position (if any). + /// </summary> + /// <param name="text">A reference to the TextMeshPro UGUI component.</param> + /// <param name="position">Position to check for intersection.</param> + /// <param name="camera">The camera which is rendering the text object.</param> + /// <param name="visibleOnly">Only check for visible characters.</param> + /// <returns></returns> + //public static int FindIntersectingCharacter(TextMeshPro text, Vector3 position, Camera camera, bool visibleOnly) + //{ + // Transform textTransform = text.transform; + + // // Convert position into Worldspace coordinates + // ScreenPointToWorldPointInRectangle(textTransform, position, camera, out position); + + // for (int i = 0; i < text.textInfo.characterCount; i++) + // { + // // Get current character info. + // TMP_CharacterInfo cInfo = text.textInfo.characterInfo[i]; + // if ((visibleOnly && !cInfo.isVisible) || (text.OverflowMode == TextOverflowModes.Page && cInfo.pageNumber + 1 != text.pageToDisplay)) + // continue; + + // // Get Bottom Left and Top Right position of the current character + // Vector3 bl = textTransform.TransformPoint(cInfo.bottomLeft); + // Vector3 tl = textTransform.TransformPoint(new Vector3(cInfo.bottomLeft.x, cInfo.topRight.y, 0)); + // Vector3 tr = textTransform.TransformPoint(cInfo.topRight); + // Vector3 br = textTransform.TransformPoint(new Vector3(cInfo.topRight.x, cInfo.bottomLeft.y, 0)); + + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // } + + // return -1; + //} + + + /// <summary> + /// Function to find the nearest character to position. + /// </summary> + /// <param name="text">A reference to the TMP Text component.</param> + /// <param name="position">Position to check for intersection.</param> + /// <param name="camera">The scene camera which may be assigned to a Canvas using ScreenSpace Camera or WorldSpace render mode. Set to null is using ScreenSpace Overlay.</param> + /// <param name="visibleOnly">Only check for visible characters.</param> + /// <returns></returns> + public static int FindNearestCharacter(TMP_Text text, Vector3 position, Camera camera, bool visibleOnly) + { + RectTransform rectTransform = text.rectTransform; + + float distanceSqr = Mathf.Infinity; + int closest = 0; + + // Convert position into Worldspace coordinates + ScreenPointToWorldPointInRectangle(rectTransform, position, camera, out position); + + for (int i = 0; i < text.textInfo.characterCount; i++) + { + // Get current character info. + TMP_CharacterInfo cInfo = text.textInfo.characterInfo[i]; + if (visibleOnly && !cInfo.isVisible) continue; + + // Get Bottom Left and Top Right position of the current character + Vector3 bl = rectTransform.TransformPoint(cInfo.bottomLeft); + Vector3 tl = rectTransform.TransformPoint(new Vector3(cInfo.bottomLeft.x, cInfo.topRight.y, 0)); + Vector3 tr = rectTransform.TransformPoint(cInfo.topRight); + Vector3 br = rectTransform.TransformPoint(new Vector3(cInfo.topRight.x, cInfo.bottomLeft.y, 0)); + + if (PointIntersectRectangle(position, bl, tl, tr, br)) + return i; + + // Find the closest corner to position. + float dbl = DistanceToLine(bl, tl, position); + float dtl = DistanceToLine(tl, tr, position); + float dtr = DistanceToLine(tr, br, position); + float dbr = DistanceToLine(br, bl, position); + + float d = dbl < dtl ? dbl : dtl; + d = d < dtr ? d : dtr; + d = d < dbr ? d : dbr; + + if (distanceSqr > d) + { + distanceSqr = d; + closest = i; + } + } + + return closest; + } + + + /// <summary> + /// Function to find the nearest character to position. + /// </summary> + /// <param name="text">A reference to the TextMeshPro UGUI component.</param> + /// <param name="position">Position to check for intersection.</param> + /// <param name="camera">The scene camera which may be assigned to a Canvas using ScreenSpace Camera or WorldSpace render mode. Set to null is using ScreenSpace Overlay.</param> + /// <param name="visibleOnly">Only check for visible characters.</param> + /// <returns></returns> + //public static int FindNearestCharacter(TextMeshProUGUI text, Vector3 position, Camera camera, bool visibleOnly) + //{ + // RectTransform rectTransform = text.rectTransform; + + // float distanceSqr = Mathf.Infinity; + // int closest = 0; + + // // Convert position into Worldspace coordinates + // ScreenPointToWorldPointInRectangle(rectTransform, position, camera, out position); + + // for (int i = 0; i < text.textInfo.characterCount; i++) + // { + // // Get current character info. + // TMP_CharacterInfo cInfo = text.textInfo.characterInfo[i]; + // if ((visibleOnly && !cInfo.isVisible) || (text.OverflowMode == TextOverflowModes.Page && cInfo.pageNumber + 1 != text.pageToDisplay)) + // continue; + + // // Get Bottom Left and Top Right position of the current character + // Vector3 bl = rectTransform.TransformPoint(cInfo.bottomLeft); + // Vector3 tl = rectTransform.TransformPoint(new Vector3(cInfo.bottomLeft.x, cInfo.topRight.y, 0)); + // Vector3 tr = rectTransform.TransformPoint(cInfo.topRight); + // Vector3 br = rectTransform.TransformPoint(new Vector3(cInfo.topRight.x, cInfo.bottomLeft.y, 0)); + + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // // Find the closest corner to position. + // float dbl = DistanceToLine(bl, tl, position); + // float dtl = DistanceToLine(tl, tr, position); + // float dtr = DistanceToLine(tr, br, position); + // float dbr = DistanceToLine(br, bl, position); + + // float d = dbl < dtl ? dbl : dtl; + // d = d < dtr ? d : dtr; + // d = d < dbr ? d : dbr; + + // if (distanceSqr > d) + // { + // distanceSqr = d; + // closest = i; + // } + // } + + // //Debug.Log("Returning nearest character at index: " + closest); + + // return closest; + //} + + + /// <summary> + /// Function to find the nearest character to position. + /// </summary> + /// <param name="text">A reference to the TextMeshPro component.</param> + /// <param name="position">Position to check for intersection.</param> + /// <param name="camera">The camera which is rendering the text object.</param> + /// <param name="visibleOnly">Only check for visible characters.</param> + /// <returns></returns> + //public static int FindNearestCharacter(TextMeshPro text, Vector3 position, Camera camera, bool visibleOnly) + //{ + // Transform textTransform = text.transform; + + // float distanceSqr = Mathf.Infinity; + // int closest = 0; + + // // Convert position into Worldspace coordinates + // ScreenPointToWorldPointInRectangle(textTransform, position, camera, out position); + + // for (int i = 0; i < text.textInfo.characterCount; i++) + // { + // // Get current character info. + // TMP_CharacterInfo cInfo = text.textInfo.characterInfo[i]; + // if ((visibleOnly && !cInfo.isVisible) || (text.OverflowMode == TextOverflowModes.Page && cInfo.pageNumber + 1 != text.pageToDisplay)) + // continue; + + // // Get Bottom Left and Top Right position of the current character + // Vector3 bl = textTransform.TransformPoint(cInfo.bottomLeft); + // Vector3 tl = textTransform.TransformPoint(new Vector3(cInfo.bottomLeft.x, cInfo.topRight.y, 0)); + // Vector3 tr = textTransform.TransformPoint(cInfo.topRight); + // Vector3 br = textTransform.TransformPoint(new Vector3(cInfo.topRight.x, cInfo.bottomLeft.y, 0)); + + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // // Find the closest corner to position. + // float dbl = DistanceToLine(bl, tl, position); // (position - bl).sqrMagnitude; + // float dtl = DistanceToLine(tl, tr, position); // (position - tl).sqrMagnitude; + // float dtr = DistanceToLine(tr, br, position); // (position - tr).sqrMagnitude; + // float dbr = DistanceToLine(br, bl, position); // (position - br).sqrMagnitude; + + // float d = dbl < dtl ? dbl : dtl; + // d = d < dtr ? d : dtr; + // d = d < dbr ? d : dbr; + + // if (distanceSqr > d) + // { + // distanceSqr = d; + // closest = i; + // } + // } + + // //Debug.Log("Returning nearest character at index: " + closest); + + // return closest; + //} + + + // WORD HANDLING + /// <summary> + /// Function returning the index of the word at the given position (if any). + /// </summary> + /// <param name="text">A reference to the TMP_Text component.</param> + /// <param name="position">Position to check for intersection.</param> + /// <param name="camera">The scene camera which may be assigned to a Canvas using ScreenSpace Camera or WorldSpace render mode. Set to null is using ScreenSpace Overlay.</param> + /// <returns></returns> + public static int FindIntersectingWord(TMP_Text text, Vector3 position, Camera camera) + { + RectTransform rectTransform = text.rectTransform; + + // Convert position into Worldspace coordinates + ScreenPointToWorldPointInRectangle(rectTransform, position, camera, out position); + + for (int i = 0; i < text.textInfo.wordCount; i++) + { + TMP_WordInfo wInfo = text.textInfo.wordInfo[i]; + + bool isBeginRegion = false; + + Vector3 bl = Vector3.zero; + Vector3 tl = Vector3.zero; + Vector3 br = Vector3.zero; + Vector3 tr = Vector3.zero; + + float maxAscender = -Mathf.Infinity; + float minDescender = Mathf.Infinity; + + // Iterate through each character of the word + for (int j = 0; j < wInfo.characterCount; j++) + { + int characterIndex = wInfo.firstCharacterIndex + j; + TMP_CharacterInfo currentCharInfo = text.textInfo.characterInfo[characterIndex]; + int currentLine = currentCharInfo.lineNumber; + + bool isCharacterVisible = currentCharInfo.isVisible; + + // Track maximum Ascender and minimum Descender for each word. + maxAscender = Mathf.Max(maxAscender, currentCharInfo.ascender); + minDescender = Mathf.Min(minDescender, currentCharInfo.descender); + + if (isBeginRegion == false && isCharacterVisible) + { + isBeginRegion = true; + + bl = new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.descender, 0); + tl = new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.ascender, 0); + + //Debug.Log("Start Word Region at [" + currentCharInfo.character + "]"); + + // If Word is one character + if (wInfo.characterCount == 1) + { + isBeginRegion = false; + + br = new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0); + tr = new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0); + + // Transform coordinates to be relative to transform and account min descender and max ascender. + bl = rectTransform.TransformPoint(new Vector3(bl.x, minDescender, 0)); + tl = rectTransform.TransformPoint(new Vector3(tl.x, maxAscender, 0)); + tr = rectTransform.TransformPoint(new Vector3(tr.x, maxAscender, 0)); + br = rectTransform.TransformPoint(new Vector3(br.x, minDescender, 0)); + + // Check for Intersection + if (PointIntersectRectangle(position, bl, tl, tr, br)) + return i; + + //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + } + } + + // Last Character of Word + if (isBeginRegion && j == wInfo.characterCount - 1) + { + isBeginRegion = false; + + br = new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0); + tr = new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0); + + // Transform coordinates to be relative to transform and account min descender and max ascender. + bl = rectTransform.TransformPoint(new Vector3(bl.x, minDescender, 0)); + tl = rectTransform.TransformPoint(new Vector3(tl.x, maxAscender, 0)); + tr = rectTransform.TransformPoint(new Vector3(tr.x, maxAscender, 0)); + br = rectTransform.TransformPoint(new Vector3(br.x, minDescender, 0)); + + // Check for Intersection + if (PointIntersectRectangle(position, bl, tl, tr, br)) + return i; + + //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + } + // If Word is split on more than one line. + else if (isBeginRegion && currentLine != text.textInfo.characterInfo[characterIndex + 1].lineNumber) + { + isBeginRegion = false; + + br = new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0); + tr = new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0); + + // Transform coordinates to be relative to transform and account min descender and max ascender. + bl = rectTransform.TransformPoint(new Vector3(bl.x, minDescender, 0)); + tl = rectTransform.TransformPoint(new Vector3(tl.x, maxAscender, 0)); + tr = rectTransform.TransformPoint(new Vector3(tr.x, maxAscender, 0)); + br = rectTransform.TransformPoint(new Vector3(br.x, minDescender, 0)); + + maxAscender = -Mathf.Infinity; + minDescender = Mathf.Infinity; + + // Check for Intersection + if (PointIntersectRectangle(position, bl, tl, tr, br)) + return i; + + //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + } + } + + //Debug.Log("Word at Index: " + i + " is located at (" + bl + ", " + tl + ", " + tr + ", " + br + ")."); + + } + + return -1; + } + + + /// <summary> + /// Function returning the index of the word at the given position (if any). + /// </summary> + /// <param name="text">A reference to the TextMeshPro UGUI component.</param> + /// <param name="position">Position to check for intersection.</param> + /// <param name="camera">The scene camera which may be assigned to a Canvas using ScreenSpace Camera or WorldSpace render mode. Set to null is using ScreenSpace Overlay.</param> + /// <returns></returns> + //public static int FindIntersectingWord(TextMeshProUGUI text, Vector3 position, Camera camera) + //{ + // RectTransform rectTransform = text.rectTransform; + + // // Convert position into Worldspace coordinates + // ScreenPointToWorldPointInRectangle(rectTransform, position, camera, out position); + + // for (int i = 0; i < text.textInfo.wordCount; i++) + // { + // TMP_WordInfo wInfo = text.textInfo.wordInfo[i]; + + // bool isBeginRegion = false; + + // Vector3 bl = Vector3.zero; + // Vector3 tl = Vector3.zero; + // Vector3 br = Vector3.zero; + // Vector3 tr = Vector3.zero; + + // float maxAscender = -Mathf.Infinity; + // float minDescender = Mathf.Infinity; + + // // Iterate through each character of the word + // for (int j = 0; j < wInfo.characterCount; j++) + // { + // int characterIndex = wInfo.firstCharacterIndex + j; + // TMP_CharacterInfo currentCharInfo = text.textInfo.characterInfo[characterIndex]; + // int currentLine = currentCharInfo.lineNumber; + + // bool isCharacterVisible = characterIndex > text.maxVisibleCharacters || + // currentCharInfo.lineNumber > text.maxVisibleLines || + // (text.OverflowMode == TextOverflowModes.Page && currentCharInfo.pageNumber + 1 != text.pageToDisplay) ? false : true; + + // // Track maximum Ascender and minimum Descender for each word. + // maxAscender = Mathf.Max(maxAscender, currentCharInfo.ascender); + // minDescender = Mathf.Min(minDescender, currentCharInfo.descender); + + // if (isBeginRegion == false && isCharacterVisible) + // { + // isBeginRegion = true; + + // bl = new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.descender, 0); + // tl = new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.ascender, 0); + + // //Debug.Log("Start Word Region at [" + currentCharInfo.character + "]"); + + // // If Word is one character + // if (wInfo.characterCount == 1) + // { + // isBeginRegion = false; + + // br = new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0); + // tr = new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0); + + // // Transform coordinates to be relative to transform and account min descender and max ascender. + // bl = rectTransform.TransformPoint(new Vector3(bl.x, minDescender, 0)); + // tl = rectTransform.TransformPoint(new Vector3(tl.x, maxAscender, 0)); + // tr = rectTransform.TransformPoint(new Vector3(tr.x, maxAscender, 0)); + // br = rectTransform.TransformPoint(new Vector3(br.x, minDescender, 0)); + + // // Check for Intersection + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + // } + // } + + // // Last Character of Word + // if (isBeginRegion && j == wInfo.characterCount - 1) + // { + // isBeginRegion = false; + + // br = new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0); + // tr = new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0); + + // // Transform coordinates to be relative to transform and account min descender and max ascender. + // bl = rectTransform.TransformPoint(new Vector3(bl.x, minDescender, 0)); + // tl = rectTransform.TransformPoint(new Vector3(tl.x, maxAscender, 0)); + // tr = rectTransform.TransformPoint(new Vector3(tr.x, maxAscender, 0)); + // br = rectTransform.TransformPoint(new Vector3(br.x, minDescender, 0)); + + // // Check for Intersection + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + // } + // // If Word is split on more than one line. + // else if (isBeginRegion && currentLine != text.textInfo.characterInfo[characterIndex + 1].lineNumber) + // { + // isBeginRegion = false; + + // br = new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0); + // tr = new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0); + + // // Transform coordinates to be relative to transform and account min descender and max ascender. + // bl = rectTransform.TransformPoint(new Vector3(bl.x, minDescender, 0)); + // tl = rectTransform.TransformPoint(new Vector3(tl.x, maxAscender, 0)); + // tr = rectTransform.TransformPoint(new Vector3(tr.x, maxAscender, 0)); + // br = rectTransform.TransformPoint(new Vector3(br.x, minDescender, 0)); + + // maxAscender = -Mathf.Infinity; + // minDescender = Mathf.Infinity; + + // // Check for Intersection + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + // } + // } + + // //Debug.Log("Word at Index: " + i + " is located at (" + bl + ", " + tl + ", " + tr + ", " + br + ")."); + + // } + + // return -1; + //} + + + /// <summary> + /// Function returning the index of the word at the given position (if any). + /// </summary> + /// <param name="text">A reference to the TextMeshPro component.</param> + /// <param name="position">Position to check for intersection.</param> + /// <param name="camera">The camera which is rendering the text object.</param> + /// <returns></returns> + //public static int FindIntersectingWord(TextMeshPro text, Vector3 position, Camera camera) + //{ + // Transform textTransform = text.transform; + + // // Convert position into Worldspace coordinates + // ScreenPointToWorldPointInRectangle(textTransform, position, camera, out position); + + // for (int i = 0; i < text.textInfo.wordCount; i++) + // { + // TMP_WordInfo wInfo = text.textInfo.wordInfo[i]; + + // bool isBeginRegion = false; + + // Vector3 bl = Vector3.zero; + // Vector3 tl = Vector3.zero; + // Vector3 br = Vector3.zero; + // Vector3 tr = Vector3.zero; + + // float maxAscender = -Mathf.Infinity; + // float minDescender = Mathf.Infinity; + + // // Iterate through each character of the word + // for (int j = 0; j < wInfo.characterCount; j++) + // { + // int characterIndex = wInfo.firstCharacterIndex + j; + // TMP_CharacterInfo currentCharInfo = text.textInfo.characterInfo[characterIndex]; + // int currentLine = currentCharInfo.lineNumber; + + // bool isCharacterVisible = characterIndex > text.maxVisibleCharacters || + // currentCharInfo.lineNumber > text.maxVisibleLines || + // (text.OverflowMode == TextOverflowModes.Page && currentCharInfo.pageNumber + 1 != text.pageToDisplay) ? false : true; + + // // Track maximum Ascender and minimum Descender for each word. + // maxAscender = Mathf.Max(maxAscender, currentCharInfo.ascender); + // minDescender = Mathf.Min(minDescender, currentCharInfo.descender); + + // if (isBeginRegion == false && isCharacterVisible) + // { + // isBeginRegion = true; + + // bl = new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.descender, 0); + // tl = new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.ascender, 0); + + // //Debug.Log("Start Word Region at [" + currentCharInfo.character + "]"); + + // // If Word is one character + // if (wInfo.characterCount == 1) + // { + // isBeginRegion = false; + + // br = new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0); + // tr = new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0); + + // // Transform coordinates to be relative to transform and account min descender and max ascender. + // bl = textTransform.TransformPoint(new Vector3(bl.x, minDescender, 0)); + // tl = textTransform.TransformPoint(new Vector3(tl.x, maxAscender, 0)); + // tr = textTransform.TransformPoint(new Vector3(tr.x, maxAscender, 0)); + // br = textTransform.TransformPoint(new Vector3(br.x, minDescender, 0)); + + // // Check for Intersection + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + // } + // } + + // // Last Character of Word + // if (isBeginRegion && j == wInfo.characterCount - 1) + // { + // isBeginRegion = false; + + // br = new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0); + // tr = new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0); + + // // Transform coordinates to be relative to transform and account min descender and max ascender. + // bl = textTransform.TransformPoint(new Vector3(bl.x, minDescender, 0)); + // tl = textTransform.TransformPoint(new Vector3(tl.x, maxAscender, 0)); + // tr = textTransform.TransformPoint(new Vector3(tr.x, maxAscender, 0)); + // br = textTransform.TransformPoint(new Vector3(br.x, minDescender, 0)); + + // // Check for Intersection + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + // } + // // If Word is split on more than one line. + // else if (isBeginRegion && currentLine != text.textInfo.characterInfo[characterIndex + 1].lineNumber) + // { + // isBeginRegion = false; + + // br = new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0); + // tr = new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0); + + // // Transform coordinates to be relative to transform and account min descender and max ascender. + // bl = textTransform.TransformPoint(new Vector3(bl.x, minDescender, 0)); + // tl = textTransform.TransformPoint(new Vector3(tl.x, maxAscender, 0)); + // tr = textTransform.TransformPoint(new Vector3(tr.x, maxAscender, 0)); + // br = textTransform.TransformPoint(new Vector3(br.x, minDescender, 0)); + + // // Reset maxAscender and minDescender for next word segment. + // maxAscender = -Mathf.Infinity; + // minDescender = Mathf.Infinity; + + // // Check for Intersection + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + // } + // } + // } + + // return -1; + //} + + + /// <summary> + /// Function returning the index of the word at the given position (if any). + /// </summary> + /// <param name="text">A reference to the TMP_Text component.</param> + /// <param name="position"></param> + /// <param name="camera">The scene camera which may be assigned to a Canvas using ScreenSpace Camera or WorldSpace render mode. Set to null is using ScreenSpace Overlay.</param> + /// <returns></returns> + public static int FindNearestWord(TMP_Text text, Vector3 position, Camera camera) + { + RectTransform rectTransform = text.rectTransform; + + float distanceSqr = Mathf.Infinity; + int closest = 0; + + // Convert position into Worldspace coordinates + ScreenPointToWorldPointInRectangle(rectTransform, position, camera, out position); + + for (int i = 0; i < text.textInfo.wordCount; i++) + { + TMP_WordInfo wInfo = text.textInfo.wordInfo[i]; + + bool isBeginRegion = false; + + Vector3 bl = Vector3.zero; + Vector3 tl = Vector3.zero; + Vector3 br = Vector3.zero; + Vector3 tr = Vector3.zero; + + // Iterate through each character of the word + for (int j = 0; j < wInfo.characterCount; j++) + { + int characterIndex = wInfo.firstCharacterIndex + j; + TMP_CharacterInfo currentCharInfo = text.textInfo.characterInfo[characterIndex]; + int currentLine = currentCharInfo.lineNumber; + + bool isCharacterVisible = currentCharInfo.isVisible; + + if (isBeginRegion == false && isCharacterVisible) + { + isBeginRegion = true; + + bl = rectTransform.TransformPoint(new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.descender, 0)); + tl = rectTransform.TransformPoint(new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.ascender, 0)); + + //Debug.Log("Start Word Region at [" + currentCharInfo.character + "]"); + + // If Word is one character + if (wInfo.characterCount == 1) + { + isBeginRegion = false; + + br = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + tr = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // Check for Intersection + if (PointIntersectRectangle(position, bl, tl, tr, br)) + return i; + + // Find the closest line segment to position. + float dbl = DistanceToLine(bl, tl, position); + float dtl = DistanceToLine(tl, tr, position); + float dtr = DistanceToLine(tr, br, position); + float dbr = DistanceToLine(br, bl, position); + + float d = dbl < dtl ? dbl : dtl; + d = d < dtr ? d : dtr; + d = d < dbr ? d : dbr; + + if (distanceSqr > d) + { + distanceSqr = d; + closest = i; + } + } + } + + // Last Character of Word + if (isBeginRegion && j == wInfo.characterCount - 1) + { + isBeginRegion = false; + + br = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + tr = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // Check for Intersection + if (PointIntersectRectangle(position, bl, tl, tr, br)) + return i; + + // Find the closest line segment to position. + float dbl = DistanceToLine(bl, tl, position); + float dtl = DistanceToLine(tl, tr, position); + float dtr = DistanceToLine(tr, br, position); + float dbr = DistanceToLine(br, bl, position); + + float d = dbl < dtl ? dbl : dtl; + d = d < dtr ? d : dtr; + d = d < dbr ? d : dbr; + + if (distanceSqr > d) + { + distanceSqr = d; + closest = i; + } + } + // If Word is split on more than one line. + else if (isBeginRegion && currentLine != text.textInfo.characterInfo[characterIndex + 1].lineNumber) + { + isBeginRegion = false; + + br = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + tr = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // Check for Intersection + if (PointIntersectRectangle(position, bl, tl, tr, br)) + return i; + + // Find the closest line segment to position. + float dbl = DistanceToLine(bl, tl, position); + float dtl = DistanceToLine(tl, tr, position); + float dtr = DistanceToLine(tr, br, position); + float dbr = DistanceToLine(br, bl, position); + + float d = dbl < dtl ? dbl : dtl; + d = d < dtr ? d : dtr; + d = d < dbr ? d : dbr; + + if (distanceSqr > d) + { + distanceSqr = d; + closest = i; + } + } + } + + //Debug.Log("Word at Index: " + i + " is located at (" + bl + ", " + tl + ", " + tr + ", " + br + ")."); + } + + return closest; + } + + /// <summary> + /// Function returning the index of the word at the given position (if any). + /// </summary> + /// <param name="text">A reference to the TextMeshPro UGUI component.</param> + /// <param name="position"></param> + /// <param name="camera">The scene camera which may be assigned to a Canvas using ScreenSpace Camera or WorldSpace render mode. Set to null is using ScreenSpace Overlay.</param> + /// <returns></returns> + //public static int FindNearestWord(TextMeshProUGUI text, Vector3 position, Camera camera) + //{ + // RectTransform rectTransform = text.rectTransform; + + // float distanceSqr = Mathf.Infinity; + // int closest = 0; + + // // Convert position into Worldspace coordinates + // ScreenPointToWorldPointInRectangle(rectTransform, position, camera, out position); + + // for (int i = 0; i < text.textInfo.wordCount; i++) + // { + // TMP_WordInfo wInfo = text.textInfo.wordInfo[i]; + + // bool isBeginRegion = false; + + // Vector3 bl = Vector3.zero; + // Vector3 tl = Vector3.zero; + // Vector3 br = Vector3.zero; + // Vector3 tr = Vector3.zero; + + // // Iterate through each character of the word + // for (int j = 0; j < wInfo.characterCount; j++) + // { + // int characterIndex = wInfo.firstCharacterIndex + j; + // TMP_CharacterInfo currentCharInfo = text.textInfo.characterInfo[characterIndex]; + // int currentLine = currentCharInfo.lineNumber; + + // bool isCharacterVisible = characterIndex > text.maxVisibleCharacters || + // currentCharInfo.lineNumber > text.maxVisibleLines || + // (text.OverflowMode == TextOverflowModes.Page && currentCharInfo.pageNumber + 1 != text.pageToDisplay) ? false : true; + + // if (isBeginRegion == false && isCharacterVisible) + // { + // isBeginRegion = true; + + // bl = rectTransform.TransformPoint(new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.descender, 0)); + // tl = rectTransform.TransformPoint(new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.ascender, 0)); + + // //Debug.Log("Start Word Region at [" + currentCharInfo.character + "]"); + + // // If Word is one character + // if (wInfo.characterCount == 1) + // { + // isBeginRegion = false; + + // br = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + // tr = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // // Check for Intersection + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + // } + // } + + // // Last Character of Word + // if (isBeginRegion && j == wInfo.characterCount - 1) + // { + // isBeginRegion = false; + + // br = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + // tr = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // // Check for Intersection + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + // } + // // If Word is split on more than one line. + // else if (isBeginRegion && currentLine != text.textInfo.characterInfo[characterIndex + 1].lineNumber) + // { + // isBeginRegion = false; + + // br = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + // tr = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // // Check for Intersection + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + // } + // } + + // // Find the closest line segment to position. + // float dbl = DistanceToLine(bl, tl, position); // (position - bl).sqrMagnitude; + // float dtl = DistanceToLine(tl, tr, position); // (position - tl).sqrMagnitude; + // float dtr = DistanceToLine(tr, br, position); // (position - tr).sqrMagnitude; + // float dbr = DistanceToLine(br, bl, position); // (position - br).sqrMagnitude; + + // float d = dbl < dtl ? dbl : dtl; + // d = d < dtr ? d : dtr; + // d = d < dbr ? d : dbr; + + // if (distanceSqr > d) + // { + // distanceSqr = d; + // closest = i; + // } + // //Debug.Log("Word at Index: " + i + " is located at (" + bl + ", " + tl + ", " + tr + ", " + br + ")."); + + // } + + // return closest; + //} + + + /// <summary> + /// Function returning the index of the word at the given position (if any). + /// </summary> + /// <param name="text">A reference to the TextMeshPro UGUI component.</param> + /// <param name="position">Position to check for intersection.</param> + /// <param name="camera">The camera which is rendering the text object.</param> + /// <returns></returns> + //public static int FindNearestWord(TextMeshPro text, Vector3 position, Camera camera) + //{ + // Transform textTransform = text.transform; + + // float distanceSqr = Mathf.Infinity; + // int closest = 0; + + // // Convert position into Worldspace coordinates + // ScreenPointToWorldPointInRectangle(textTransform, position, camera, out position); + + // for (int i = 0; i < text.textInfo.wordCount; i++) + // { + // TMP_WordInfo wInfo = text.textInfo.wordInfo[i]; + + // bool isBeginRegion = false; + + // Vector3 bl = Vector3.zero; + // Vector3 tl = Vector3.zero; + // Vector3 br = Vector3.zero; + // Vector3 tr = Vector3.zero; + + // // Iterate through each character of the word + // for (int j = 0; j < wInfo.characterCount; j++) + // { + // int characterIndex = wInfo.firstCharacterIndex + j; + // TMP_CharacterInfo currentCharInfo = text.textInfo.characterInfo[characterIndex]; + // int currentLine = currentCharInfo.lineNumber; + + // bool isCharacterVisible = characterIndex > text.maxVisibleCharacters || + // currentCharInfo.lineNumber > text.maxVisibleLines || + // (text.OverflowMode == TextOverflowModes.Page && currentCharInfo.pageNumber + 1 != text.pageToDisplay) ? false : true; + + // if (isBeginRegion == false && isCharacterVisible) + // { + // isBeginRegion = true; + + // bl = textTransform.TransformPoint(new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.descender, 0)); + // tl = textTransform.TransformPoint(new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.ascender, 0)); + + // //Debug.Log("Start Word Region at [" + currentCharInfo.character + "]"); + + // // If Word is one character + // if (wInfo.characterCount == 1) + // { + // isBeginRegion = false; + + // br = textTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + // tr = textTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // // Check for Intersection + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + // } + // } + + // // Last Character of Word + // if (isBeginRegion && j == wInfo.characterCount - 1) + // { + // isBeginRegion = false; + + // br = textTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + // tr = textTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // // Check for Intersection + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + // } + // // If Word is split on more than one line. + // else if (isBeginRegion && currentLine != text.textInfo.characterInfo[characterIndex + 1].lineNumber) + // { + // isBeginRegion = false; + + // br = textTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + // tr = textTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // // Check for Intersection + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + // } + // } + + // // Find the closest line segment to position. + // float dbl = DistanceToLine(bl, tl, position); + // float dtl = DistanceToLine(tl, tr, position); + // float dtr = DistanceToLine(tr, br, position); + // float dbr = DistanceToLine(br, bl, position); + + // float d = dbl < dtl ? dbl : dtl; + // d = d < dtr ? d : dtr; + // d = d < dbr ? d : dbr; + + // if (distanceSqr > d) + // { + // distanceSqr = d; + // closest = i; + // } + // //Debug.Log("Word at Index: " + i + " is located at (" + bl + ", " + tl + ", " + tr + ", " + br + ")."); + + // } + + // return closest; + + //} + + + /// <summary> + /// Function returning the line intersecting the position. + /// </summary> + /// <param name="textComponent"></param> + /// <param name="position"></param> + /// <param name="camera"></param> + /// <returns></returns> + public static int FindIntersectingLine(TMP_Text text, Vector3 position, Camera camera) + { + RectTransform rectTransform = text.rectTransform; + + int closest = -1; + + // Convert position into Worldspace coordinates + ScreenPointToWorldPointInRectangle(rectTransform, position, camera, out position); + + for (int i = 0; i < text.textInfo.lineCount; i++) + { + TMP_LineInfo lineInfo = text.textInfo.lineInfo[i]; + + float ascender = rectTransform.TransformPoint(new Vector3(0, lineInfo.ascender, 0)).y; + float descender = rectTransform.TransformPoint(new Vector3(0, lineInfo.descender, 0)).y; + + if (ascender > position.y && descender < position.y) + { + //Debug.Log("Position is on line " + i); + return i; + } + } + + //Debug.Log("Closest line to position is " + closest); + return closest; + } + + + /// <summary> + /// Function returning the index of the Link at the given position (if any). + /// </summary> + /// <param name="text">A reference to the TMP_Text component.</param> + /// <param name="position">Position to check for intersection.</param> + /// <param name="camera">The scene camera which may be assigned to a Canvas using ScreenSpace Camera or WorldSpace render mode. Set to null is using ScreenSpace Overlay.</param> + /// <returns></returns> + public static int FindIntersectingLink(TMP_Text text, Vector3 position, Camera camera) + { + Transform rectTransform = text.transform; + + // Convert position into Worldspace coordinates + ScreenPointToWorldPointInRectangle(rectTransform, position, camera, out position); + + for (int i = 0; i < text.textInfo.linkCount; i++) + { + TMP_LinkInfo linkInfo = text.textInfo.linkInfo[i]; + + bool isBeginRegion = false; + + Vector3 bl = Vector3.zero; + Vector3 tl = Vector3.zero; + Vector3 br = Vector3.zero; + Vector3 tr = Vector3.zero; + + // Iterate through each character of the word + for (int j = 0; j < linkInfo.linkTextLength; j++) + { + int characterIndex = linkInfo.linkTextfirstCharacterIndex + j; + TMP_CharacterInfo currentCharInfo = text.textInfo.characterInfo[characterIndex]; + int currentLine = currentCharInfo.lineNumber; + + // Check if Link characters are on the current page + if (text.overflowMode == TextOverflowModes.Page && currentCharInfo.pageNumber + 1 != text.pageToDisplay) continue; + + if (isBeginRegion == false) + { + isBeginRegion = true; + + bl = rectTransform.TransformPoint(new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.descender, 0)); + tl = rectTransform.TransformPoint(new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.ascender, 0)); + + //Debug.Log("Start Word Region at [" + currentCharInfo.character + "]"); + + // If Word is one character + if (linkInfo.linkTextLength == 1) + { + isBeginRegion = false; + + br = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + tr = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // Check for Intersection + if (PointIntersectRectangle(position, bl, tl, tr, br)) + return i; + + //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + } + } + + // Last Character of Word + if (isBeginRegion && j == linkInfo.linkTextLength - 1) + { + isBeginRegion = false; + + br = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + tr = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // Check for Intersection + if (PointIntersectRectangle(position, bl, tl, tr, br)) + return i; + + //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + } + // If Word is split on more than one line. + else if (isBeginRegion && currentLine != text.textInfo.characterInfo[characterIndex + 1].lineNumber) + { + isBeginRegion = false; + + br = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + tr = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // Check for Intersection + if (PointIntersectRectangle(position, bl, tl, tr, br)) + return i; + + //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + } + } + + //Debug.Log("Word at Index: " + i + " is located at (" + bl + ", " + tl + ", " + tr + ", " + br + ")."); + + } + + return -1; + } + + /// <summary> + /// Function returning the index of the Link at the given position (if any). + /// </summary> + /// <param name="text">A reference to the TextMeshPro UGUI component.</param> + /// <param name="position">Position to check for intersection.</param> + /// <param name="camera">The scene camera which may be assigned to a Canvas using ScreenSpace Camera or WorldSpace render mode. Set to null is using ScreenSpace Overlay.</param> + /// <returns></returns> + //public static int FindIntersectingLink(TextMeshProUGUI text, Vector3 position, Camera camera) + //{ + // Transform rectTransform = text.transform; + + // // Convert position into Worldspace coordinates + // ScreenPointToWorldPointInRectangle(rectTransform, position, camera, out position); + + // for (int i = 0; i < text.textInfo.linkCount; i++) + // { + // TMP_LinkInfo linkInfo = text.textInfo.linkInfo[i]; + + // bool isBeginRegion = false; + + // Vector3 bl = Vector3.zero; + // Vector3 tl = Vector3.zero; + // Vector3 br = Vector3.zero; + // Vector3 tr = Vector3.zero; + + // // Iterate through each character of the word + // for (int j = 0; j < linkInfo.linkTextLength; j++) + // { + // int characterIndex = linkInfo.linkTextfirstCharacterIndex + j; + // TMP_CharacterInfo currentCharInfo = text.textInfo.characterInfo[characterIndex]; + // int currentLine = currentCharInfo.lineNumber; + + // // Check if Link characters are on the current page + // if (text.OverflowMode == TextOverflowModes.Page && currentCharInfo.pageNumber + 1 != text.pageToDisplay) continue; + + // if (isBeginRegion == false) + // { + // isBeginRegion = true; + + // bl = rectTransform.TransformPoint(new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.descender, 0)); + // tl = rectTransform.TransformPoint(new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.ascender, 0)); + + // //Debug.Log("Start Word Region at [" + currentCharInfo.character + "]"); + + // // If Word is one character + // if (linkInfo.linkTextLength == 1) + // { + // isBeginRegion = false; + + // br = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + // tr = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // // Check for Intersection + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + // } + // } + + // // Last Character of Word + // if (isBeginRegion && j == linkInfo.linkTextLength - 1) + // { + // isBeginRegion = false; + + // br = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + // tr = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // // Check for Intersection + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + // } + // // If Word is split on more than one line. + // else if (isBeginRegion && currentLine != text.textInfo.characterInfo[characterIndex + 1].lineNumber) + // { + // isBeginRegion = false; + + // br = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + // tr = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // // Check for Intersection + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + // } + // } + + // //Debug.Log("Word at Index: " + i + " is located at (" + bl + ", " + tl + ", " + tr + ", " + br + ")."); + + // } + + // return -1; + //} + + + /// <summary> + /// Function returning the index of the Link at the given position (if any). + /// </summary> + /// <param name="text">A reference to the TextMeshPro component.</param> + /// <param name="position">Position to check for intersection.</param> + /// <param name="camera">The camera which is rendering the text object.</param> + /// <returns></returns> + //public static int FindIntersectingLink(TextMeshPro text, Vector3 position, Camera camera) + //{ + // Transform textTransform = text.transform; + + // // Convert position into Worldspace coordinates + // ScreenPointToWorldPointInRectangle(textTransform, position, camera, out position); + + // for (int i = 0; i < text.textInfo.linkCount; i++) + // { + // TMP_LinkInfo linkInfo = text.textInfo.linkInfo[i]; + + // bool isBeginRegion = false; + + // Vector3 bl = Vector3.zero; + // Vector3 tl = Vector3.zero; + // Vector3 br = Vector3.zero; + // Vector3 tr = Vector3.zero; + + // // Iterate through each character of the word + // for (int j = 0; j < linkInfo.linkTextLength; j++) + // { + // int characterIndex = linkInfo.linkTextfirstCharacterIndex + j; + // TMP_CharacterInfo currentCharInfo = text.textInfo.characterInfo[characterIndex]; + // int currentLine = currentCharInfo.lineNumber; + + // // Check if Link characters are on the current page + // if (text.OverflowMode == TextOverflowModes.Page && currentCharInfo.pageNumber + 1 != text.pageToDisplay) continue; + + // if (isBeginRegion == false) + // { + // isBeginRegion = true; + + // bl = textTransform.TransformPoint(new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.descender, 0)); + // tl = textTransform.TransformPoint(new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.ascender, 0)); + + // //Debug.Log("Start Word Region at [" + currentCharInfo.character + "]"); + + // // If Word is one character + // if (linkInfo.linkTextLength == 1) + // { + // isBeginRegion = false; + + // br = textTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + // tr = textTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // // Check for Intersection + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + // } + // } + + // // Last Character of Word + // if (isBeginRegion && j == linkInfo.linkTextLength - 1) + // { + // isBeginRegion = false; + + // br = textTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + // tr = textTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // // Check for Intersection + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + // } + // // If Word is split on more than one line. + // else if (isBeginRegion && currentLine != text.textInfo.characterInfo[characterIndex + 1].lineNumber) + // { + // isBeginRegion = false; + + // br = textTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + // tr = textTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // // Check for Intersection + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + // } + // } + + // //Debug.Log("Word at Index: " + i + " is located at (" + bl + ", " + tl + ", " + tr + ", " + br + ")."); + + // } + + // return -1; + //} + + + /// <summary> + /// Function returning the index of the word at the given position (if any). + /// </summary> + /// <param name="text">A reference to the TMP_Text component.</param> + /// <param name="position">Position to check for intersection.</param> + /// <param name="camera">The scene camera which may be assigned to a Canvas using ScreenSpace Camera or WorldSpace render mode. Set to null is using ScreenSpace Overlay.</param> + /// <returns></returns> + public static int FindNearestLink(TMP_Text text, Vector3 position, Camera camera) + { + RectTransform rectTransform = text.rectTransform; + + // Convert position into Worldspace coordinates + ScreenPointToWorldPointInRectangle(rectTransform, position, camera, out position); + + float distanceSqr = Mathf.Infinity; + int closest = 0; + + for (int i = 0; i < text.textInfo.linkCount; i++) + { + TMP_LinkInfo linkInfo = text.textInfo.linkInfo[i]; + + bool isBeginRegion = false; + + Vector3 bl = Vector3.zero; + Vector3 tl = Vector3.zero; + Vector3 br = Vector3.zero; + Vector3 tr = Vector3.zero; + + // Iterate through each character of the link + for (int j = 0; j < linkInfo.linkTextLength; j++) + { + int characterIndex = linkInfo.linkTextfirstCharacterIndex + j; + TMP_CharacterInfo currentCharInfo = text.textInfo.characterInfo[characterIndex]; + int currentLine = currentCharInfo.lineNumber; + + // Check if Link characters are on the current page + if (text.overflowMode == TextOverflowModes.Page && currentCharInfo.pageNumber + 1 != text.pageToDisplay) continue; + + if (isBeginRegion == false) + { + isBeginRegion = true; + + //Debug.Log("Start Word Region at [" + currentCharInfo.character + "]"); + + bl = rectTransform.TransformPoint(new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.descender, 0)); + tl = rectTransform.TransformPoint(new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.ascender, 0)); + + // If Link is one character + if (linkInfo.linkTextLength == 1) + { + isBeginRegion = false; + + br = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + tr = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // Check for Intersection + if (PointIntersectRectangle(position, bl, tl, tr, br)) + return i; + + // Find the closest line segment to position. + float dbl = DistanceToLine(bl, tl, position); + float dtl = DistanceToLine(tl, tr, position); + float dtr = DistanceToLine(tr, br, position); + float dbr = DistanceToLine(br, bl, position); + + float d = dbl < dtl ? dbl : dtl; + d = d < dtr ? d : dtr; + d = d < dbr ? d : dbr; + + if (distanceSqr > d) + { + distanceSqr = d; + closest = i; + } + + } + } + + // Last Character of Word + if (isBeginRegion && j == linkInfo.linkTextLength - 1) + { + isBeginRegion = false; + + br = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + tr = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // Check for Intersection + if (PointIntersectRectangle(position, bl, tl, tr, br)) + return i; + + // Find the closest line segment to position. + float dbl = DistanceToLine(bl, tl, position); + float dtl = DistanceToLine(tl, tr, position); + float dtr = DistanceToLine(tr, br, position); + float dbr = DistanceToLine(br, bl, position); + + float d = dbl < dtl ? dbl : dtl; + d = d < dtr ? d : dtr; + d = d < dbr ? d : dbr; + + if (distanceSqr > d) + { + distanceSqr = d; + closest = i; + } + + } + // If Link is split on more than one line. + else if (isBeginRegion && currentLine != text.textInfo.characterInfo[characterIndex + 1].lineNumber) + { + isBeginRegion = false; + + br = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + tr = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // Check for Intersection + if (PointIntersectRectangle(position, bl, tl, tr, br)) + return i; + + // Find the closest line segment to position. + float dbl = DistanceToLine(bl, tl, position); + float dtl = DistanceToLine(tl, tr, position); + float dtr = DistanceToLine(tr, br, position); + float dbr = DistanceToLine(br, bl, position); + + float d = dbl < dtl ? dbl : dtl; + d = d < dtr ? d : dtr; + d = d < dbr ? d : dbr; + + if (distanceSqr > d) + { + distanceSqr = d; + closest = i; + } + } + } + + //Debug.Log("Word at Index: " + i + " is located at (" + bl + ", " + tl + ", " + tr + ", " + br + ")."); + + } + + return closest; + } + + + /// <summary> + /// Function returning the index of the word at the given position (if any). + /// </summary> + /// <param name="text">A reference to the TextMeshPro UGUI component.</param> + /// <param name="position">Position to check for intersection.</param> + /// <param name="camera">The scene camera which may be assigned to a Canvas using ScreenSpace Camera or WorldSpace render mode. Set to null is using ScreenSpace Overlay.</param> + /// <returns></returns> + //public static int FindNearestLink(TextMeshProUGUI text, Vector3 position, Camera camera) + //{ + // RectTransform rectTransform = text.rectTransform; + + // // Convert position into Worldspace coordinates + // ScreenPointToWorldPointInRectangle(rectTransform, position, camera, out position); + + // float distanceSqr = Mathf.Infinity; + // int closest = 0; + + // for (int i = 0; i < text.textInfo.linkCount; i++) + // { + // TMP_LinkInfo linkInfo = text.textInfo.linkInfo[i]; + + // bool isBeginRegion = false; + + // Vector3 bl = Vector3.zero; + // Vector3 tl = Vector3.zero; + // Vector3 br = Vector3.zero; + // Vector3 tr = Vector3.zero; + + // // Iterate through each character of the word + // for (int j = 0; j < linkInfo.linkTextLength; j++) + // { + // int characterIndex = linkInfo.linkTextfirstCharacterIndex + j; + // TMP_CharacterInfo currentCharInfo = text.textInfo.characterInfo[characterIndex]; + // int currentLine = currentCharInfo.lineNumber; + + // if (isBeginRegion == false) + // { + // isBeginRegion = true; + + // bl = rectTransform.TransformPoint(new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.descender, 0)); + // tl = rectTransform.TransformPoint(new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.ascender, 0)); + + // //Debug.Log("Start Word Region at [" + currentCharInfo.character + "]"); + + // // If Word is one character + // if (linkInfo.linkTextLength == 1) + // { + // isBeginRegion = false; + + // br = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + // tr = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // // Check for Intersection + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + // } + // } + + // // Last Character of Word + // if (isBeginRegion && j == linkInfo.linkTextLength - 1) + // { + // isBeginRegion = false; + + // br = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + // tr = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // // Check for Intersection + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + // } + // // If Word is split on more than one line. + // else if (isBeginRegion && currentLine != text.textInfo.characterInfo[characterIndex + 1].lineNumber) + // { + // isBeginRegion = false; + + // br = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + // tr = rectTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // // Check for Intersection + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + // } + // } + + // // Find the closest line segment to position. + // float dbl = DistanceToLine(bl, tl, position); // (position - bl).sqrMagnitude; + // float dtl = DistanceToLine(tl, tr, position); // (position - tl).sqrMagnitude; + // float dtr = DistanceToLine(tr, br, position); // (position - tr).sqrMagnitude; + // float dbr = DistanceToLine(br, bl, position); // (position - br).sqrMagnitude; + + // float d = dbl < dtl ? dbl : dtl; + // d = d < dtr ? d : dtr; + // d = d < dbr ? d : dbr; + + // if (distanceSqr > d) + // { + // distanceSqr = d; + // closest = i; + // } + // //Debug.Log("Word at Index: " + i + " is located at (" + bl + ", " + tl + ", " + tr + ", " + br + ")."); + + // } + + // return closest; + //} + + + /// <summary> + /// Function returning the index of the word at the given position (if any). + /// </summary> + /// <param name="text">A reference to the TextMeshPro component.</param> + /// <param name="position">Position to check for intersection.</param> + /// <param name="camera">The camera which is rendering the text object.</param> + /// <returns></returns> + //public static int FindNearestLink(TextMeshPro text, Vector3 position, Camera camera) + //{ + // Transform textTransform = text.transform; + + // // Convert position into Worldspace coordinates + // ScreenPointToWorldPointInRectangle(textTransform, position, camera, out position); + + // float distanceSqr = Mathf.Infinity; + // int closest = 0; + + // for (int i = 0; i < text.textInfo.linkCount; i++) + // { + // TMP_LinkInfo linkInfo = text.textInfo.linkInfo[i]; + + // bool isBeginRegion = false; + + // Vector3 bl = Vector3.zero; + // Vector3 tl = Vector3.zero; + // Vector3 br = Vector3.zero; + // Vector3 tr = Vector3.zero; + + // // Iterate through each character of the word + // for (int j = 0; j < linkInfo.linkTextLength; j++) + // { + // int characterIndex = linkInfo.linkTextfirstCharacterIndex + j; + // TMP_CharacterInfo currentCharInfo = text.textInfo.characterInfo[characterIndex]; + // int currentLine = currentCharInfo.lineNumber; + + // if (isBeginRegion == false) + // { + // isBeginRegion = true; + + // bl = textTransform.TransformPoint(new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.descender, 0)); + // tl = textTransform.TransformPoint(new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.ascender, 0)); + + // //Debug.Log("Start Word Region at [" + currentCharInfo.character + "]"); + + // // If Word is one character + // if (linkInfo.linkTextLength == 1) + // { + // isBeginRegion = false; + + // br = textTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + // tr = textTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // // Check for Intersection + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + // } + // } + + // // Last Character of Word + // if (isBeginRegion && j == linkInfo.linkTextLength - 1) + // { + // isBeginRegion = false; + + // br = textTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + // tr = textTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // // Check for Intersection + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + // } + // // If Word is split on more than one line. + // else if (isBeginRegion && currentLine != text.textInfo.characterInfo[characterIndex + 1].lineNumber) + // { + // isBeginRegion = false; + + // br = textTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.descender, 0)); + // tr = textTransform.TransformPoint(new Vector3(currentCharInfo.topRight.x, currentCharInfo.ascender, 0)); + + // // Check for Intersection + // if (PointIntersectRectangle(position, bl, tl, tr, br)) + // return i; + + // //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); + // } + // } + + // // Find the closest line segment to position. + // float dbl = DistanceToLine(bl, tl, position); + // float dtl = DistanceToLine(tl, tr, position); + // float dtr = DistanceToLine(tr, br, position); + // float dbr = DistanceToLine(br, bl, position); + + // float d = dbl < dtl ? dbl : dtl; + // d = d < dtr ? d : dtr; + // d = d < dbr ? d : dbr; + + // if (distanceSqr > d) + // { + // distanceSqr = d; + // closest = i; + // } + // //Debug.Log("Word at Index: " + i + " is located at (" + bl + ", " + tl + ", " + tr + ", " + br + ")."); + + // } + // return closest; + //} + + + + /// <summary> + /// Function to check if a Point is contained within a Rectangle. + /// </summary> + /// <param name="m"></param> + /// <param name="a"></param> + /// <param name="b"></param> + /// <param name="c"></param> + /// <param name="d"></param> + /// <returns></returns> + private static bool PointIntersectRectangle(Vector3 m, Vector3 a, Vector3 b, Vector3 c, Vector3 d) + { + Vector3 ab = b - a; + Vector3 am = m - a; + Vector3 bc = c - b; + Vector3 bm = m - b; + + float abamDot = Vector3.Dot(ab, am); + float bcbmDot = Vector3.Dot(bc, bm); + + return 0 <= abamDot && abamDot <= Vector3.Dot(ab, ab) && 0 <= bcbmDot && bcbmDot <= Vector3.Dot(bc, bc); + } + + + /// <summary> + /// Method to convert ScreenPoint to WorldPoint aligned with Rectangle + /// </summary> + /// <param name="transform"></param> + /// <param name="screenPoint"></param> + /// <param name="cam"></param> + /// <param name="worldPoint"></param> + /// <returns></returns> + public static bool ScreenPointToWorldPointInRectangle(Transform transform, Vector2 screenPoint, Camera cam, out Vector3 worldPoint) + { + worldPoint = (Vector3)Vector2.zero; + Ray ray = RectTransformUtility.ScreenPointToRay(cam, screenPoint); + float enter; + + if (!new Plane(transform.rotation * Vector3.back, transform.position).Raycast(ray, out enter)) + return false; + + worldPoint = ray.GetPoint(enter); + + return true; + } + + + private struct LineSegment + { + public Vector3 Point1; + public Vector3 Point2; + + public LineSegment(Vector3 p1, Vector3 p2) + { + Point1 = p1; + Point2 = p2; + } + } + + + /// <summary> + /// Function returning the point of intersection between a line and a plane. + /// </summary> + /// <param name="line"></param> + /// <param name="point"></param> + /// <param name="normal"></param> + /// <param name="intersectingPoint"></param> + /// <returns></returns> + private static bool IntersectLinePlane(LineSegment line, Vector3 point, Vector3 normal, out Vector3 intersectingPoint) + { + intersectingPoint = Vector3.zero; + Vector3 u = line.Point2 - line.Point1; + Vector3 w = line.Point1 - point; + + float D = Vector3.Dot(normal, u); + float N = -Vector3.Dot(normal, w); + + if (Mathf.Abs(D) < Mathf.Epsilon) // if line is parallel & co-planar to plane + { + if (N == 0) + return true; + else + return false; + } + + float sI = N / D; + + if (sI < 0 || sI > 1) // Line parallel to plane + return false; + + intersectingPoint = line.Point1 + sI * u; + + return true; + } + + + /// <summary> + /// Function returning the Square Distance from a Point to a Line. + /// </summary> + /// <param name="a"></param> + /// <param name="b"></param> + /// <param name="point"></param> + /// <returns></returns> + public static float DistanceToLine(Vector3 a, Vector3 b, Vector3 point) + { + Vector3 n = b - a; + Vector3 pa = a - point; + + float c = Vector3.Dot( n, pa ); + + // Closest point is a + if ( c > 0.0f ) + return Vector3.Dot( pa, pa ); + + Vector3 bp = point - b; + + // Closest point is b + if (Vector3.Dot( n, bp ) > 0.0f ) + return Vector3.Dot( bp, bp ); + + // Closest point is between a and b + Vector3 e = pa - n * (c / Vector3.Dot( n, n )); + + return Vector3.Dot( e, e ); + } + + + /// <summary> + /// Function returning the Square Distance from a Point to a Line and Direction. + /// </summary> + /// <param name="a"></param> + /// <param name="b"></param> + /// <param name="point"></param> + /// <param name="direction">-1 left, 0 in between, 1 right</param> + /// <returns></returns> + //public static float DistanceToLineDirectional(Vector3 a, Vector3 b, Vector3 point, ref int direction) + //{ + // Vector3 n = b - a; + // Vector3 pa = a - point; + + // float c = Vector3.Dot(n, pa); + // direction = -1; + + // // Closest point is a + // if (c > 0.0f) + // return Vector3.Dot(pa, pa); + + // Vector3 bp = point - b; + // direction = 1; + + // // Closest point is b + // if (Vector3.Dot(n, bp) > 0.0f) + // return Vector3.Dot(bp, bp); + + // // Closest point is between a and b + // Vector3 e = pa - n * (c / Vector3.Dot(n, n)); + + // direction = 0; + // return Vector3.Dot(e, e); + //} + + + /// <summary> + /// Table used to convert character to lowercase. + /// </summary> + const string k_lookupStringL = "-------------------------------- !-#$%&-()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[-]^_`abcdefghijklmnopqrstuvwxyz{|}~-"; + + /// <summary> + /// Table used to convert character to uppercase. + /// </summary> + const string k_lookupStringU = "-------------------------------- !-#$%&-()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[-]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~-"; + + + /// <summary> + /// Get lowercase version of this ASCII character. + /// </summary> + public static char ToLowerFast(char c) + { + if (c > k_lookupStringL.Length - 1) + return c; + + return k_lookupStringL[c]; + } + + /// <summary> + /// Get uppercase version of this ASCII character. + /// </summary> + public static char ToUpperFast(char c) + { + if (c > k_lookupStringU.Length - 1) + return c; + + return k_lookupStringU[c]; + } + + /// <summary> + /// Function which returns a simple hashcode from a string. + /// </summary> + /// <returns></returns> + public static int GetSimpleHashCode(string s) + { + int hashCode = 0; // 5381; + + for (int i = 0; i < s.Length; i++) + hashCode = (hashCode << 5) + hashCode ^ s[i]; + + return hashCode; + } + + /// <summary> + /// Function which returns a simple hashcode from a string converted to lowercase. + /// </summary> + /// <returns></returns> + public static uint GetSimpleHashCodeLowercase(string s) + { + uint hashCode = 5381; + + for (int i = 0; i < s.Length; i++) + hashCode = (hashCode << 5) + hashCode ^ ToLowerFast(s[i]); + + return hashCode; + } + + + /// <summary> + /// Function to convert Hex to Int + /// </summary> + /// <param name="hex"></param> + /// <returns></returns> + public static int HexToInt(char hex) + { + switch (hex) + { + case '0': return 0; + case '1': return 1; + case '2': return 2; + case '3': return 3; + case '4': return 4; + case '5': return 5; + case '6': return 6; + case '7': return 7; + case '8': return 8; + case '9': return 9; + case 'A': return 10; + case 'B': return 11; + case 'C': return 12; + case 'D': return 13; + case 'E': return 14; + case 'F': return 15; + case 'a': return 10; + case 'b': return 11; + case 'c': return 12; + case 'd': return 13; + case 'e': return 14; + case 'f': return 15; + } + return 15; + } + + + /// <summary> + /// Function to convert a properly formatted string which contains an hex value to its decimal value. + /// </summary> + /// <param name="s"></param> + /// <returns></returns> + public static int StringHexToInt(string s) + { + int value = 0; + + for (int i = 0; i < s.Length; i++) + { + value += HexToInt(s[i]) * (int)Mathf.Pow(16, (s.Length - 1) - i); + } + + return value; + } + + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextUtilities.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextUtilities.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..9597769ea6b7fb2be95d758ad1a1f5c53d3b94ed --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_TextUtilities.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4f0ca6874aa74540bb3d4fe5a0f86bcc +timeCreated: 1432117579 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_UpdateManager.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_UpdateManager.cs new file mode 100644 index 0000000000000000000000000000000000000000..4f07cf1ad68d04cd8af41f5e52d8f830af03f633 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_UpdateManager.cs @@ -0,0 +1,238 @@ +using UnityEngine; +using UnityEngine.UI; +using System.Collections.Generic; + +#if UNITY_2019_1_OR_NEWER +using UnityEngine.Rendering; +#elif UNITY_2018_1_OR_NEWER +using UnityEngine.Experimental.Rendering; +#endif + + +namespace TMPro +{ + + public class TMP_UpdateManager + { + private static TMP_UpdateManager s_Instance; + + private readonly List<TMP_Text> m_LayoutRebuildQueue = new List<TMP_Text>(); + private Dictionary<int, int> m_LayoutQueueLookup = new Dictionary<int, int>(); + + private readonly List<TMP_Text> m_GraphicRebuildQueue = new List<TMP_Text>(); + private Dictionary<int, int> m_GraphicQueueLookup = new Dictionary<int, int>(); + + private readonly List<TMP_Text> m_InternalUpdateQueue = new List<TMP_Text>(); + private Dictionary<int, int> m_InternalUpdateLookup = new Dictionary<int, int>(); + + //private bool m_PerformingGraphicRebuild; + //private bool m_PerformingLayoutRebuild; + + /// <summary> + /// Get a singleton instance of the registry + /// </summary> + public static TMP_UpdateManager instance + { + get + { + if (TMP_UpdateManager.s_Instance == null) + TMP_UpdateManager.s_Instance = new TMP_UpdateManager(); + return TMP_UpdateManager.s_Instance; + } + } + + + /// <summary> + /// Register to receive rendering callbacks. + /// </summary> + protected TMP_UpdateManager() + { + Camera.onPreCull += OnCameraPreCull; + + #if UNITY_2019_1_OR_NEWER + RenderPipelineManager.beginFrameRendering += OnBeginFrameRendering; + #elif UNITY_2018_1_OR_NEWER + RenderPipeline.beginFrameRendering += OnBeginFrameRendering; + #endif + } + + + /// <summary> + /// Function used as a replacement for LateUpdate() to handle SDF Scale updates and Legacy Animation updates. + /// </summary> + /// <param name="textObject"></param> + internal static void RegisterTextObjectForUpdate(TMP_Text textObject) + { + TMP_UpdateManager.instance.InternalRegisterTextObjectForUpdate(textObject); + } + + private void InternalRegisterTextObjectForUpdate(TMP_Text textObject) + { + int id = textObject.GetInstanceID(); + + if (this.m_InternalUpdateLookup.ContainsKey(id)) + return; + + m_InternalUpdateLookup[id] = id; + this.m_InternalUpdateQueue.Add(textObject); + + return; + } + + + /// <summary> + /// Function to register elements which require a layout rebuild. + /// </summary> + /// <param name="element"></param> + public static void RegisterTextElementForLayoutRebuild(TMP_Text element) + { + TMP_UpdateManager.instance.InternalRegisterTextElementForLayoutRebuild(element); + } + + private bool InternalRegisterTextElementForLayoutRebuild(TMP_Text element) + { + int id = element.GetInstanceID(); + + if (this.m_LayoutQueueLookup.ContainsKey(id)) + return false; + + m_LayoutQueueLookup[id] = id; + this.m_LayoutRebuildQueue.Add(element); + + return true; + } + + + /// <summary> + /// Function to register elements which require a layout rebuild. + /// </summary> + /// <param name="element"></param> + public static void RegisterTextElementForGraphicRebuild(TMP_Text element) + { + TMP_UpdateManager.instance.InternalRegisterTextElementForGraphicRebuild(element); + } + + private bool InternalRegisterTextElementForGraphicRebuild(TMP_Text element) + { + int id = element.GetInstanceID(); + + if (this.m_GraphicQueueLookup.ContainsKey(id)) + return false; + + m_GraphicQueueLookup[id] = id; + this.m_GraphicRebuildQueue.Add(element); + + return true; + } + + + /// <summary> + /// Callback which occurs just before the Scriptable Render Pipeline (SRP) begins rendering. + /// </summary> + /// <param name="cameras"></param> + #if UNITY_2019_1_OR_NEWER + void OnBeginFrameRendering(ScriptableRenderContext renderContext, Camera[] cameras) + #elif UNITY_2018_1_OR_NEWER + void OnBeginFrameRendering(Camera[] cameras) + #endif + { + // Exclude the PreRenderCamera + #if UNITY_EDITOR + if (cameras.Length == 1 && cameras[0].cameraType == CameraType.Preview) + return; + #endif + DoRebuilds(); + } + + /// <summary> + /// Callback which occurs just before the cam is rendered. + /// </summary> + /// <param name="cam"></param> + void OnCameraPreCull(Camera cam) + { + // Exclude the PreRenderCamera + #if UNITY_EDITOR + if (cam.cameraType == CameraType.Preview) + return; + #endif + DoRebuilds(); + } + + /// <summary> + /// Process the rebuild requests in the rebuild queues. + /// </summary> + void DoRebuilds() + { + // Handle text objects the require an update either as a result of scale changes or legacy animation. + for (int i = 0; i < m_InternalUpdateQueue.Count; i++) + { + m_InternalUpdateQueue[i].InternalUpdate(); + } + + // Handle Layout Rebuild Phase + for (int i = 0; i < m_LayoutRebuildQueue.Count; i++) + { + m_LayoutRebuildQueue[i].Rebuild(CanvasUpdate.Prelayout); + } + + if (m_LayoutRebuildQueue.Count > 0) + { + m_LayoutRebuildQueue.Clear(); + m_LayoutQueueLookup.Clear(); + } + + // Handle Graphic Rebuild Phase + for (int i = 0; i < m_GraphicRebuildQueue.Count; i++) + { + m_GraphicRebuildQueue[i].Rebuild(CanvasUpdate.PreRender); + } + + // If there are no objects in the queue, we don't need to clear the lists again. + if (m_GraphicRebuildQueue.Count > 0) + { + m_GraphicRebuildQueue.Clear(); + m_GraphicQueueLookup.Clear(); + } + } + + internal static void UnRegisterTextObjectForUpdate(TMP_Text textObject) + { + TMP_UpdateManager.instance.InternalUnRegisterTextObjectForUpdate(textObject); + } + + /// <summary> + /// Function to unregister elements which no longer require a rebuild. + /// </summary> + /// <param name="element"></param> + public static void UnRegisterTextElementForRebuild(TMP_Text element) + { + TMP_UpdateManager.instance.InternalUnRegisterTextElementForGraphicRebuild(element); + TMP_UpdateManager.instance.InternalUnRegisterTextElementForLayoutRebuild(element); + TMP_UpdateManager.instance.InternalUnRegisterTextObjectForUpdate(element); + } + + private void InternalUnRegisterTextElementForGraphicRebuild(TMP_Text element) + { + int id = element.GetInstanceID(); + + TMP_UpdateManager.instance.m_GraphicRebuildQueue.Remove(element); + m_GraphicQueueLookup.Remove(id); + } + + private void InternalUnRegisterTextElementForLayoutRebuild(TMP_Text element) + { + int id = element.GetInstanceID(); + + TMP_UpdateManager.instance.m_LayoutRebuildQueue.Remove(element); + m_LayoutQueueLookup.Remove(id); + } + + private void InternalUnRegisterTextObjectForUpdate(TMP_Text textObject) + { + int id = textObject.GetInstanceID(); + + TMP_UpdateManager.instance.m_InternalUpdateQueue.Remove(textObject); + m_InternalUpdateLookup.Remove(id); + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_UpdateManager.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_UpdateManager.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..cea83cdd5729458ba069dac496f3d7d72eeb0beb --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_UpdateManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 691db8cb70c4426a8ae718465c21345f +timeCreated: 1447406424 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_UpdateRegistery.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_UpdateRegistery.cs new file mode 100644 index 0000000000000000000000000000000000000000..12a85278921e39f1c9f57a739631b8f5cb5bc18c --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_UpdateRegistery.cs @@ -0,0 +1,178 @@ +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.UI.Collections; +using System.Collections; +using System.Collections.Generic; + + +namespace TMPro +{ + /// <summary> + /// Class for handling and scheduling text object updates. + /// </summary> + public class TMP_UpdateRegistry + { + private static TMP_UpdateRegistry s_Instance; + + private readonly List<ICanvasElement> m_LayoutRebuildQueue = new List<ICanvasElement>(); + private Dictionary<int, int> m_LayoutQueueLookup = new Dictionary<int, int>(); + + private readonly List<ICanvasElement> m_GraphicRebuildQueue = new List<ICanvasElement>(); + private Dictionary<int, int> m_GraphicQueueLookup = new Dictionary<int, int>(); + + //private bool m_PerformingLayoutUpdate; + //private bool m_PerformingGraphicUpdate; + + /// <summary> + /// Get a singleton instance of the registry + /// </summary> + public static TMP_UpdateRegistry instance + { + get + { + if (TMP_UpdateRegistry.s_Instance == null) + TMP_UpdateRegistry.s_Instance = new TMP_UpdateRegistry(); + return TMP_UpdateRegistry.s_Instance; + } + } + + + /// <summary> + /// Register to receive callback from the Canvas System. + /// </summary> + protected TMP_UpdateRegistry() + { + //Debug.Log("Adding WillRenderCanvases"); + Canvas.willRenderCanvases += PerformUpdateForCanvasRendererObjects; + } + + + /// <summary> + /// Function to register elements which require a layout rebuild. + /// </summary> + /// <param name="element"></param> + public static void RegisterCanvasElementForLayoutRebuild(ICanvasElement element) + { + TMP_UpdateRegistry.instance.InternalRegisterCanvasElementForLayoutRebuild(element); + } + + private bool InternalRegisterCanvasElementForLayoutRebuild(ICanvasElement element) + { + int id = (element as Object).GetInstanceID(); + + if (this.m_LayoutQueueLookup.ContainsKey(id)) + return false; + + m_LayoutQueueLookup[id] = id; + this.m_LayoutRebuildQueue.Add(element); + + return true; + } + + + /// <summary> + /// Function to register elements which require a graphic rebuild. + /// </summary> + /// <param name="element"></param> + public static void RegisterCanvasElementForGraphicRebuild(ICanvasElement element) + { + TMP_UpdateRegistry.instance.InternalRegisterCanvasElementForGraphicRebuild(element); + } + + private bool InternalRegisterCanvasElementForGraphicRebuild(ICanvasElement element) + { + int id = (element as Object).GetInstanceID(); + + if (this.m_GraphicQueueLookup.ContainsKey(id)) + return false; + + m_GraphicQueueLookup[id] = id; + this.m_GraphicRebuildQueue.Add(element); + + return true; + } + + + /// <summary> + /// Method to handle objects that need updating. + /// </summary> + private void PerformUpdateForCanvasRendererObjects() + { + //Debug.Log("Performing update of CanvasRenderer objects at Frame: " + Time.frameCount); + + // Processing elements that require a layout rebuild. + //this.m_PerformingLayoutUpdate = true; + for (int index = 0; index < m_LayoutRebuildQueue.Count; index++) + { + ICanvasElement element = TMP_UpdateRegistry.instance.m_LayoutRebuildQueue[index]; + + element.Rebuild(CanvasUpdate.Prelayout); + } + + if (m_LayoutRebuildQueue.Count > 0) + { + m_LayoutRebuildQueue.Clear(); + m_LayoutQueueLookup.Clear(); + } + + // Update font assets before graphic rebuild + + + // Processing elements that require a graphic rebuild. + for (int index = 0; index < m_GraphicRebuildQueue.Count; index++) + { + ICanvasElement element = TMP_UpdateRegistry.instance.m_GraphicRebuildQueue[index]; + + element.Rebuild(CanvasUpdate.PreRender); + } + + // If there are no objects in the queue, we don't need to clear the lists again. + if (m_GraphicRebuildQueue.Count > 0) + { + m_GraphicRebuildQueue.Clear(); + m_GraphicQueueLookup.Clear(); + } + } + + + /// <summary> + /// Method to handle objects that need updating. + /// </summary> + private void PerformUpdateForMeshRendererObjects() + { + Debug.Log("Perform update of MeshRenderer objects."); + + } + + + /// <summary> + /// Function to unregister elements which no longer require a rebuild. + /// </summary> + /// <param name="element"></param> + public static void UnRegisterCanvasElementForRebuild(ICanvasElement element) + { + TMP_UpdateRegistry.instance.InternalUnRegisterCanvasElementForLayoutRebuild(element); + TMP_UpdateRegistry.instance.InternalUnRegisterCanvasElementForGraphicRebuild(element); + } + + + private void InternalUnRegisterCanvasElementForLayoutRebuild(ICanvasElement element) + { + int id = (element as Object).GetInstanceID(); + + //element.LayoutComplete(); + TMP_UpdateRegistry.instance.m_LayoutRebuildQueue.Remove(element); + m_GraphicQueueLookup.Remove(id); + } + + + private void InternalUnRegisterCanvasElementForGraphicRebuild(ICanvasElement element) + { + int id = (element as Object).GetInstanceID(); + + //element.GraphicUpdateComplete(); + TMP_UpdateRegistry.instance.m_GraphicRebuildQueue.Remove(element); + m_LayoutQueueLookup.Remove(id); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_UpdateRegistery.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_UpdateRegistery.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..e6427875301b76f2b9778c78bdea2c129a051b97 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMP_UpdateRegistery.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a55fb7b4961a425381d1282fc424f966 +timeCreated: 1446775434 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_EventManager.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_EventManager.cs new file mode 100644 index 0000000000000000000000000000000000000000..f460f325d126e15f6affae043335564316d01810 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_EventManager.cs @@ -0,0 +1,150 @@ +using UnityEngine; +using System.Collections.Generic; + + +namespace TMPro +{ + public enum Compute_DistanceTransform_EventTypes { Processing, Completed }; + + + public static class TMPro_EventManager + { + public static readonly FastAction<object, Compute_DT_EventArgs> COMPUTE_DT_EVENT = new FastAction<object, Compute_DT_EventArgs>(); + + // Event & Delegate used to notify TextMesh Pro objects that Material properties have been changed. + public static readonly FastAction<bool, Material> MATERIAL_PROPERTY_EVENT = new FastAction<bool, Material>(); + + public static readonly FastAction<bool, TMP_FontAsset> FONT_PROPERTY_EVENT = new FastAction<bool, TMP_FontAsset>(); + + public static readonly FastAction<bool, Object> SPRITE_ASSET_PROPERTY_EVENT = new FastAction<bool, Object>(); + + public static readonly FastAction<bool, TextMeshPro> TEXTMESHPRO_PROPERTY_EVENT = new FastAction<bool, TextMeshPro>(); + + public static readonly FastAction<GameObject, Material, Material> DRAG_AND_DROP_MATERIAL_EVENT = new FastAction<GameObject, Material, Material>(); + + public static readonly FastAction<bool> TEXT_STYLE_PROPERTY_EVENT = new FastAction<bool>(); + + public static readonly FastAction<TMP_ColorGradient> COLOR_GRADIENT_PROPERTY_EVENT = new FastAction<TMP_ColorGradient>(); + + public static readonly FastAction TMP_SETTINGS_PROPERTY_EVENT = new FastAction(); + + public static readonly FastAction RESOURCE_LOAD_EVENT = new FastAction(); + + public static readonly FastAction<bool, TextMeshProUGUI> TEXTMESHPRO_UGUI_PROPERTY_EVENT = new FastAction<bool, TextMeshProUGUI>(); + + public static readonly FastAction OnPreRenderObject_Event = new FastAction(); + + public static readonly FastAction<Object> TEXT_CHANGED_EVENT = new FastAction<Object>(); + + //public static readonly FastAction WILL_RENDER_CANVASES = new FastAction(); + + + + //static TMPro_EventManager() + //{ + // // Register to the willRenderCanvases callback once + // // then the WILL_RENDER_CANVASES FastAction will handle the rest + // Canvas.willRenderCanvases += WILL_RENDER_CANVASES.Call; + //} + + public static void ON_PRE_RENDER_OBJECT_CHANGED() + { + OnPreRenderObject_Event.Call(); + } + + public static void ON_MATERIAL_PROPERTY_CHANGED(bool isChanged, Material mat) + { + MATERIAL_PROPERTY_EVENT.Call(isChanged, mat); + } + + public static void ON_FONT_PROPERTY_CHANGED(bool isChanged, TMP_FontAsset font) + { + FONT_PROPERTY_EVENT.Call(isChanged, font); + } + + public static void ON_SPRITE_ASSET_PROPERTY_CHANGED(bool isChanged, Object obj) + { + SPRITE_ASSET_PROPERTY_EVENT.Call(isChanged, obj); + } + + public static void ON_TEXTMESHPRO_PROPERTY_CHANGED(bool isChanged, TextMeshPro obj) + { + TEXTMESHPRO_PROPERTY_EVENT.Call(isChanged, obj); + } + + public static void ON_DRAG_AND_DROP_MATERIAL_CHANGED(GameObject sender, Material currentMaterial, Material newMaterial) + { + DRAG_AND_DROP_MATERIAL_EVENT.Call(sender, currentMaterial, newMaterial); + } + + public static void ON_TEXT_STYLE_PROPERTY_CHANGED(bool isChanged) + { + TEXT_STYLE_PROPERTY_EVENT.Call(isChanged); + } + + public static void ON_COLOR_GRAIDENT_PROPERTY_CHANGED(TMP_ColorGradient gradient) + { + COLOR_GRADIENT_PROPERTY_EVENT.Call(gradient); + } + + + public static void ON_TEXT_CHANGED(Object obj) + { + TEXT_CHANGED_EVENT.Call(obj); + } + + public static void ON_TMP_SETTINGS_CHANGED() + { + TMP_SETTINGS_PROPERTY_EVENT.Call(); + } + + public static void ON_RESOURCES_LOADED() + { + RESOURCE_LOAD_EVENT.Call(); + } + + public static void ON_TEXTMESHPRO_UGUI_PROPERTY_CHANGED(bool isChanged, TextMeshProUGUI obj) + { + TEXTMESHPRO_UGUI_PROPERTY_EVENT.Call(isChanged, obj); + } + + //public static void ON_BASE_MATERIAL_CHANGED(Material mat) + //{ + // BASE_MATERIAL_EVENT.Call(mat); + //} + + //public static void ON_PROGRESSBAR_UPDATE(Progress_Bar_EventTypes event_type, Progress_Bar_EventArgs eventArgs) + //{ + // if (PROGRESS_BAR_EVENT != null) + // PROGRESS_BAR_EVENT(event_type, eventArgs); + //} + + public static void ON_COMPUTE_DT_EVENT(object Sender, Compute_DT_EventArgs e) + { + COMPUTE_DT_EVENT.Call(Sender, e); + } + } + + + public class Compute_DT_EventArgs + { + public Compute_DistanceTransform_EventTypes EventType; + public float ProgressPercentage; + public Color[] Colors; + + + public Compute_DT_EventArgs(Compute_DistanceTransform_EventTypes type, float progress) + { + EventType = type; + ProgressPercentage = progress; + } + + public Compute_DT_EventArgs(Compute_DistanceTransform_EventTypes type, Color[] colors) + { + EventType = type; + Colors = colors; + } + + } + +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_EventManager.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_EventManager.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..067ecf0b945b9882e432bf3542416ffd7fc42bf9 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_EventManager.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 96e9072453a441618754c478755b3028 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_ExtensionMethods.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_ExtensionMethods.cs new file mode 100644 index 0000000000000000000000000000000000000000..8dd4b91b3ae2e9a4146137390797d9e75ed5ba18 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_ExtensionMethods.cs @@ -0,0 +1,224 @@ +using UnityEngine; +using System.Text; +using System.Collections; +using System.Collections.Generic; + +namespace TMPro +{ + public static class TMPro_ExtensionMethods + { + + public static string ArrayToString(this char[] chars) + { + string s = string.Empty; + + for (int i = 0; i < chars.Length && chars[i] != 0; i++) + { + s += chars[i]; + } + + return s; + } + + public static string IntToString(this int[] unicodes) + { + char[] chars = new char[unicodes.Length]; + + for (int i = 0; i < unicodes.Length; i++) + { + chars[i] = (char)unicodes[i]; + } + + return new string(chars); + } + + public static string IntToString(this int[] unicodes, int start, int length) + { + if (start > unicodes.Length) + return string.Empty; + + int end = Mathf.Min(start + length, unicodes.Length); + + char[] chars = new char[end - start]; + + int writeIndex = 0; + + for (int i = start; i < end; i++) + { + chars[writeIndex++] = (char)unicodes[i]; + } + + return new string(chars); + } + + + public static int FindInstanceID <T> (this List<T> list, T target) where T : Object + { + int targetID = target.GetInstanceID(); + + for (int i = 0; i < list.Count; i++) + { + if (list[i].GetInstanceID() == targetID) + return i; + } + return -1; + } + + + public static bool Compare(this Color32 a, Color32 b) + { + return a.r == b.r && a.g == b.g && a.b == b.b && a.a == b.a; + } + + public static bool CompareRGB(this Color32 a, Color32 b) + { + return a.r == b.r && a.g == b.g && a.b == b.b; + } + + public static bool Compare(this Color a, Color b) + { + return a.r == b.r && a.g == b.g && a.b == b.b && a.a == b.a; + } + + + public static bool CompareRGB(this Color a, Color b) + { + return a.r == b.r && a.g == b.g && a.b == b.b; + } + + + public static Color32 Multiply (this Color32 c1, Color32 c2) + { + byte r = (byte)((c1.r / 255f) * (c2.r / 255f) * 255); + byte g = (byte)((c1.g / 255f) * (c2.g / 255f) * 255); + byte b = (byte)((c1.b / 255f) * (c2.b / 255f) * 255); + byte a = (byte)((c1.a / 255f) * (c2.a / 255f) * 255); + + return new Color32(r, g, b, a); + } + + + public static Color32 Tint (this Color32 c1, Color32 c2) + { + byte r = (byte)((c1.r / 255f) * (c2.r / 255f) * 255); + byte g = (byte)((c1.g / 255f) * (c2.g / 255f) * 255); + byte b = (byte)((c1.b / 255f) * (c2.b / 255f) * 255); + byte a = (byte)((c1.a / 255f) * (c2.a / 255f) * 255); + + return new Color32(r, g, b, a); + } + + public static Color32 Tint(this Color32 c1, float tint) + { + byte r = (byte)(Mathf.Clamp(c1.r / 255f * tint * 255, 0, 255)); + byte g = (byte)(Mathf.Clamp(c1.g / 255f * tint * 255, 0, 255)); + byte b = (byte)(Mathf.Clamp(c1.b / 255f * tint * 255, 0, 255)); + byte a = (byte)(Mathf.Clamp(c1.a / 255f * tint * 255, 0, 255)); + + return new Color32(r, g, b, a); + } + + + public static bool Compare(this Vector3 v1, Vector3 v2, int accuracy) + { + bool x = (int)(v1.x * accuracy) == (int)(v2.x * accuracy); + bool y = (int)(v1.y * accuracy) == (int)(v2.y * accuracy); + bool z = (int)(v1.z * accuracy) == (int)(v2.z * accuracy); + + return x && y && z; + } + + public static bool Compare(this Quaternion q1, Quaternion q2, int accuracy) + { + bool x = (int)(q1.x * accuracy) == (int)(q2.x * accuracy); + bool y = (int)(q1.y * accuracy) == (int)(q2.y * accuracy); + bool z = (int)(q1.z * accuracy) == (int)(q2.z * accuracy); + bool w = (int)(q1.w * accuracy) == (int)(q2.w * accuracy); + + return x && y && z && w; + } + + //public static void AddElementAtIndex<T>(this T[] array, int writeIndex, T item) + //{ + // if (writeIndex >= array.Length) + // System.Array.Resize(ref array, Mathf.NextPowerOfTwo(writeIndex + 1)); + + // array[writeIndex] = item; + //} + + /// <summary> + /// Insert item into array at index. + /// </summary> + /// <typeparam name="T"></typeparam> + /// <param name="array"></param> + /// <param name="index"></param> + /// <param name="item"></param> + //public static void Insert<T>(this T[] array, int index, T item) + //{ + // if (index > array.Length - 1) return; + + // T savedItem = item; + + // for (int i = index; i < array.Length; i++) + // { + // savedItem = array[i]; + + // array[i] = item; + + // item = savedItem; + // } + //} + + /// <summary> + /// Insert item into array at index. + /// </summary> + /// <typeparam name="T"></typeparam> + /// <param name="array"></param> + /// <param name="index"></param> + /// <param name="item"></param> + //public static void Insert<T>(this T[] array, int index, T[] items) + //{ + // if (index > array.Length - 1) return; + + // System.Array.Resize(ref array, array.Length + items.Length); + + // int sourceIndex = 0; + + // T savedItem = items[sourceIndex]; + + // for (int i = index; i < array.Length; i++) + // { + // savedItem = array[i]; + + // array[i] = items[sourceIndex]; + + // items[sourceIndex] = savedItem; + + // if (sourceIndex < items.Length - 1) + // sourceIndex += 1; + // else + // sourceIndex = 0; + // } + //} + + } + + public static class TMP_Math + { + public const float FLOAT_MAX = 32767; + public const float FLOAT_MIN = -32767; + public const int INT_MAX = 2147483647; + public const int INT_MIN = -2147483647; + + public const float FLOAT_UNSET = -32767; + public const int INT_UNSET = -32767; + + public static Vector2 MAX_16BIT = new Vector2(FLOAT_MAX, FLOAT_MAX); + public static Vector2 MIN_16BIT = new Vector2(FLOAT_MIN, FLOAT_MIN); + + public static bool Approximately(float a, float b) + { + return (b - 0.0001f) < a && a < (b + 0.0001f); + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_ExtensionMethods.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_ExtensionMethods.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..f646b54ad00d496bb76946cf205cefd83804e010 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_ExtensionMethods.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 77476292f9fa4905a787e6417853846b +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_MeshUtilities.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_MeshUtilities.cs new file mode 100644 index 0000000000000000000000000000000000000000..e74119393eeec3de2832fd048d66cf204481e712 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_MeshUtilities.cs @@ -0,0 +1,357 @@ +using UnityEngine; +using UnityEngine.TextCore; +using System; + + +namespace TMPro +{ + /// <summary> + /// Flags to control what vertex data is pushed to the mesh and renderer. + /// </summary> + public enum TMP_VertexDataUpdateFlags + { + None = 0x0, + Vertices = 0x1, + Uv0 = 0x2, + Uv2 = 0x4, + Uv4 = 0x8, + Colors32 = 0x10, + All = 0xFF + }; + + + /// <summary> + /// TMP custom data type to represent 32 bit characters. + /// </summary> + //public struct TMP_Char + //{ + // private int m_value; + + // private TMP_Char(int value) + // { + // this.m_value = value; + // } + + // private TMP_Char(TMP_Char value) + // { + // this.m_value = (int)value; + // } + + // public static implicit operator TMP_Char(int value) + // { + // return new TMP_Char(value); + // } + + // public static implicit operator TMP_Char(char c) + // { + // return new TMP_Char(c); + // } + + // public static explicit operator int(TMP_Char value) + // { + // return value.m_value; + // } + + // public override string ToString() + // { + // return m_value.ToString(); + // } + //} + + + //public struct TMP_VertexInfo + //{ + // public TMP_Vertex topLeft; + // public TMP_Vertex bottomLeft; + // public TMP_Vertex topRight; + // public TMP_Vertex bottomRight; + //} + + + [Serializable] + public struct VertexGradient + { + public Color topLeft; + public Color topRight; + public Color bottomLeft; + public Color bottomRight; + + public VertexGradient (Color color) + { + this.topLeft = color; + this.topRight = color; + this.bottomLeft = color; + this.bottomRight = color; + } + + /// <summary> + /// The vertex colors at the corners of the characters. + /// </summary> + /// <param name="color0">Top left color.</param> + /// <param name="color1">Top right color.</param> + /// <param name="color2">Bottom left color.</param> + /// <param name="color3">Bottom right color.</param> + public VertexGradient(Color color0, Color color1, Color color2, Color color3) + { + this.topLeft = color0; + this.topRight = color1; + this.bottomLeft = color2; + this.bottomRight = color3; + } + } + + + public struct TMP_PageInfo + { + public int firstCharacterIndex; + public int lastCharacterIndex; + public float ascender; + public float baseLine; + public float descender; + // public float extents; + } + + + /// <summary> + /// Structure containing information about individual links contained in the text object. + /// </summary> + public struct TMP_LinkInfo + { + public TMP_Text textComponent; + + public int hashCode; + + public int linkIdFirstCharacterIndex; + public int linkIdLength; + public int linkTextfirstCharacterIndex; + public int linkTextLength; + + internal char[] linkID; + + + internal void SetLinkID(char[] text, int startIndex, int length) + { + if (linkID == null || linkID.Length < length) linkID = new char[length]; + + for (int i = 0; i < length; i++) + linkID[i] = text[startIndex + i]; + } + + /// <summary> + /// Function which returns the text contained in a link. + /// </summary> + /// <param name="textInfo"></param> + /// <returns></returns> + public string GetLinkText() + { + string text = string.Empty; + TMP_TextInfo textInfo = textComponent.textInfo; + + for (int i = linkTextfirstCharacterIndex; i < linkTextfirstCharacterIndex + linkTextLength; i++) + text += textInfo.characterInfo[i].character; + + return text; + } + + + /// <summary> + /// Function which returns the link ID as a string. + /// </summary> + /// <param name="text">The source input text.</param> + /// <returns></returns> + public string GetLinkID() + { + if (textComponent == null) + return string.Empty; + + return new string(linkID, 0, linkIdLength); + //return textComponent.text.Substring(linkIdFirstCharacterIndex, linkIdLength); + + } + } + + + /// <summary> + /// Structure containing information about the individual words contained in the text object. + /// </summary> + public struct TMP_WordInfo + { + // NOTE: Structure could be simplified by only including the firstCharacterIndex and length. + + public TMP_Text textComponent; + + public int firstCharacterIndex; + public int lastCharacterIndex; + public int characterCount; + //public float length; + + /// <summary> + /// Returns the word as a string. + /// </summary> + /// <returns></returns> + public string GetWord() + { + string word = string.Empty; + TMP_CharacterInfo[] charInfo = textComponent.textInfo.characterInfo; + + for (int i = firstCharacterIndex; i < lastCharacterIndex + 1; i++) + { + word += charInfo[i].character; + } + + return word; + } + } + + + public struct TMP_SpriteInfo + { + public int spriteIndex; // Index of the sprite in the sprite atlas. + public int characterIndex; // The characterInfo index which holds the key information about this sprite. + public int vertexIndex; + } + + + //public struct SpriteInfo + //{ + // + //} + + + public struct Extents + { + public Vector2 min; + public Vector2 max; + + public Extents(Vector2 min, Vector2 max) + { + this.min = min; + this.max = max; + } + + public override string ToString() + { + string s = "Min (" + min.x.ToString("f2") + ", " + min.y.ToString("f2") + ") Max (" + max.x.ToString("f2") + ", " + max.y.ToString("f2") + ")"; + return s; + } + } + + + [Serializable] + public struct Mesh_Extents + { + public Vector2 min; + public Vector2 max; + + + public Mesh_Extents(Vector2 min, Vector2 max) + { + this.min = min; + this.max = max; + } + + public override string ToString() + { + string s = "Min (" + min.x.ToString("f2") + ", " + min.y.ToString("f2") + ") Max (" + max.x.ToString("f2") + ", " + max.y.ToString("f2") + ")"; + //string s = "Center: (" + ")" + " Extents: (" + ((max.x - min.x) / 2).ToString("f2") + "," + ((max.y - min.y) / 2).ToString("f2") + ")."; + return s; + } + } + + + // Structure used for Word Wrapping which tracks the state of execution when the last space or carriage return character was encountered. + public struct WordWrapState + { + public int previous_WordBreak; + public int total_CharacterCount; + public int visible_CharacterCount; + public int visible_SpriteCount; + public int visible_LinkCount; + public int firstCharacterIndex; + public int firstVisibleCharacterIndex; + public int lastCharacterIndex; + public int lastVisibleCharIndex; + public int lineNumber; + + public float maxCapHeight; + public float maxAscender; + public float maxDescender; + public float maxLineAscender; + public float maxLineDescender; + public float previousLineAscender; + + public float xAdvance; + public float preferredWidth; + public float preferredHeight; + //public float maxFontScale; + public float previousLineScale; + + public int wordCount; + public FontStyles fontStyle; + public float fontScale; + public float fontScaleMultiplier; + + public float currentFontSize; + public float baselineOffset; + public float lineOffset; + + public TMP_TextInfo textInfo; + //public TMPro_CharacterInfo[] characterInfo; + public TMP_LineInfo lineInfo; + + public Color32 vertexColor; + public Color32 underlineColor; + public Color32 strikethroughColor; + public Color32 highlightColor; + public TMP_FontStyleStack basicStyleStack; + public TMP_RichTextTagStack<Color32> colorStack; + public TMP_RichTextTagStack<Color32> underlineColorStack; + public TMP_RichTextTagStack<Color32> strikethroughColorStack; + public TMP_RichTextTagStack<Color32> highlightColorStack; + public TMP_RichTextTagStack<TMP_ColorGradient> colorGradientStack; + public TMP_RichTextTagStack<float> sizeStack; + public TMP_RichTextTagStack<float> indentStack; + public TMP_RichTextTagStack<FontWeight> fontWeightStack; + public TMP_RichTextTagStack<int> styleStack; + public TMP_RichTextTagStack<float> baselineStack; + public TMP_RichTextTagStack<int> actionStack; + public TMP_RichTextTagStack<MaterialReference> materialReferenceStack; + public TMP_RichTextTagStack<TextAlignmentOptions> lineJustificationStack; + //public TMP_XmlTagStack<int> spriteAnimationStack; + public int spriteAnimationID; + + public TMP_FontAsset currentFontAsset; + public TMP_SpriteAsset currentSpriteAsset; + public Material currentMaterial; + public int currentMaterialIndex; + + public Extents meshExtents; + + public bool tagNoParsing; + public bool isNonBreakingSpace; + //public Mesh_Extents lineExtents; + } + + + /// <summary> + /// Structure used to store retrieve the name and hashcode of the font and material + /// </summary> + public struct TagAttribute + { + public int startIndex; + public int length; + public int hashCode; + } + + + public struct RichTextTagAttribute + { + public int nameHashCode; + public int valueHashCode; + public TagValueType valueType; + public int valueStartIndex; + public int valueLength; + public TagUnitType unitType; + } + +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_MeshUtilities.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_MeshUtilities.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..1a66edd7039979aec5808b264b01a29390047270 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_MeshUtilities.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: effb76e1937b45ff8adf45e51a4c08cf +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_Private.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_Private.cs new file mode 100644 index 0000000000000000000000000000000000000000..e41d2a046fd7ebfbb19909ebb4a748a4cd10a731 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_Private.cs @@ -0,0 +1,4055 @@ +//#define TMP_PROFILE_ON +//#define TMP_PROFILE_PHASES_ON + +using UnityEngine; +using UnityEngine.TextCore; +using System; +using System.Collections; +using System.Collections.Generic; + +#pragma warning disable 0414 // Disabled a few warnings related to serialized variables not used in this script but used in the editor. + +namespace TMPro +{ + + public partial class TextMeshPro + { + [SerializeField] + private bool m_hasFontAssetChanged = false; // Used to track when font properties have changed. + + float m_previousLossyScaleY = -1; // Used for Tracking lossy scale changes in the transform; + + [SerializeField] + private Renderer m_renderer; + private MeshFilter m_meshFilter; + + private bool m_isFirstAllocation; // Flag to determine if this is the first allocation of the buffers. + private int m_max_characters = 8; // Determines the initial allocation and size of the character array / buffer. + private int m_max_numberOfLines = 4; // Determines the initial allocation and maximum number of lines of text. + + [SerializeField] + protected TMP_SubMesh[] m_subTextObjects = new TMP_SubMesh[8]; + + + // MASKING RELATED PROPERTIES + + //MaterialPropertyBlock m_maskingPropertyBlock; + //[SerializeField] + private bool m_isMaskingEnabled; + private bool isMaskUpdateRequired; + //private bool m_isMaterialBlockSet; + + [SerializeField] + private MaskingTypes m_maskType; + + // Matrix used to animated Env Map + private Matrix4x4 m_EnvMapMatrix = new Matrix4x4(); + + + // Text Container / RectTransform Component + private Vector3[] m_RectTransformCorners = new Vector3[4]; + + [NonSerialized] + private bool m_isRegisteredForEvents; + + + // DEBUG Variables + //private System.Diagnostics.Stopwatch m_StopWatch; + //private bool isDebugOutputDone; + //private int m_recursiveCount = 0; + private int loopCountA; + //private int loopCountB; + //private int loopCountC; + //private int loopCountD; + //private int loopCountE; + + + protected override void Awake() + { + //Debug.Log("***** Awake() called on object ID " + GetInstanceID() + ". *****"); + + #if UNITY_EDITOR + // Special handling for TMP Settings and importing Essential Resources + if (TMP_Settings.instance == null) + { + if (m_isWaitingOnResourceLoad == false) + TMPro_EventManager.RESOURCE_LOAD_EVENT.Add(ON_RESOURCES_LOADED); + + m_isWaitingOnResourceLoad = true; + return; + } + #endif + + // Cache Reference to the Mesh Renderer. + m_renderer = GetComponent<Renderer>(); + if (m_renderer == null) + m_renderer = gameObject.AddComponent<Renderer>(); + + // Make sure we have a CanvasRenderer for compatibility reasons and hide it + if (this.canvasRenderer != null) + this.canvasRenderer.hideFlags = HideFlags.HideInInspector; + else + { + CanvasRenderer canvasRenderer = gameObject.AddComponent<CanvasRenderer>(); + canvasRenderer.hideFlags = HideFlags.HideInInspector; + } + + // Cache Reference to RectTransform + m_rectTransform = this.rectTransform; + + // Cache Reference to the transform; + m_transform = this.transform; + + // Cache a reference to the Mesh Filter. + m_meshFilter = GetComponent<MeshFilter>(); + if (m_meshFilter == null) + m_meshFilter = gameObject.AddComponent<MeshFilter>(); + + // Create new Mesh if necessary and cache reference to it. + if (m_mesh == null) + { + m_mesh = new Mesh(); + m_mesh.hideFlags = HideFlags.HideAndDontSave; + + m_meshFilter.mesh = m_mesh; + + // Create new TextInfo for the text object. + m_textInfo = new TMP_TextInfo(this); + } + m_meshFilter.hideFlags = HideFlags.HideInInspector; + + // Load TMP Settings for new text object instances. + LoadDefaultSettings(); + + // Load the font asset and assign material to renderer. + LoadFontAsset(); + + // Load Default TMP StyleSheet + TMP_StyleSheet.LoadDefaultStyleSheet(); + + // Allocate our initial buffers. + if (m_TextParsingBuffer == null) + m_TextParsingBuffer = new UnicodeChar[m_max_characters]; + + m_cached_TextElement = new TMP_Character(); + m_isFirstAllocation = true; + + // Check if we have a font asset assigned. Return if we don't because no one likes to see purple squares on screen. + if (m_fontAsset == null) + { + Debug.LogWarning("Please assign a Font Asset to this " + transform.name + " gameobject.", this); + return; + } + + // Check to make sure Sub Text Objects are tracked correctly in the event a Prefab is used. + TMP_SubMesh[] subTextObjects = GetComponentsInChildren<TMP_SubMesh>(); + if (subTextObjects.Length > 0) + { + for (int i = 0; i < subTextObjects.Length; i++) + m_subTextObjects[i + 1] = subTextObjects[i]; + } + + // Set flags to ensure our text is parsed and redrawn. + m_isInputParsingRequired = true; + m_havePropertiesChanged = true; + m_isCalculateSizeRequired = true; + + m_isAwake = true; + } + + + protected override void OnEnable() + { + //Debug.Log("***** OnEnable() called on object ID " + GetInstanceID() + ". *****"); + + // Return if Awake() has not been called on the text object. + if (m_isAwake == false) + return; + + // Register Callbacks for various events. + if (!m_isRegisteredForEvents) + { + #if UNITY_EDITOR + TMPro_EventManager.MATERIAL_PROPERTY_EVENT.Add(ON_MATERIAL_PROPERTY_CHANGED); + TMPro_EventManager.FONT_PROPERTY_EVENT.Add(ON_FONT_PROPERTY_CHANGED); + TMPro_EventManager.TEXTMESHPRO_PROPERTY_EVENT.Add(ON_TEXTMESHPRO_PROPERTY_CHANGED); + TMPro_EventManager.DRAG_AND_DROP_MATERIAL_EVENT.Add(ON_DRAG_AND_DROP_MATERIAL); + TMPro_EventManager.TEXT_STYLE_PROPERTY_EVENT.Add(ON_TEXT_STYLE_CHANGED); + TMPro_EventManager.COLOR_GRADIENT_PROPERTY_EVENT.Add(ON_COLOR_GRADIENT_CHANGED); + TMPro_EventManager.TMP_SETTINGS_PROPERTY_EVENT.Add(ON_TMP_SETTINGS_CHANGED); + #endif + m_isRegisteredForEvents = true; + } + + TMP_UpdateManager.RegisterTextObjectForUpdate(this); + + meshFilter.sharedMesh = mesh; + SetActiveSubMeshes(true); + + // Schedule potential text object update (if any of the properties have changed. + ComputeMarginSize(); + + m_isInputParsingRequired = true; + m_havePropertiesChanged = true; + m_verticesAlreadyDirty = false; + SetVerticesDirty(); + } + + + protected override void OnDisable() + { + //Debug.Log("***** OnDisable() called on object ID " + GetInstanceID() + ". *****"); + + // Return if Awake() has not been called on the text object. + if (m_isAwake == false) + return; + + TMP_UpdateManager.UnRegisterTextElementForRebuild(this); + TMP_UpdateManager.UnRegisterTextObjectForUpdate(this); + + m_meshFilter.sharedMesh = null; + SetActiveSubMeshes(false); + } + + + protected override void OnDestroy() + { + //Debug.Log("***** OnDestroy() called on object ID " + GetInstanceID() + ". *****"); + + // Destroy the mesh if we have one. + if (m_mesh != null) + { + DestroyImmediate(m_mesh); + } + + // Unregister the event this object was listening to + #if UNITY_EDITOR + TMPro_EventManager.MATERIAL_PROPERTY_EVENT.Remove(ON_MATERIAL_PROPERTY_CHANGED); + TMPro_EventManager.FONT_PROPERTY_EVENT.Remove(ON_FONT_PROPERTY_CHANGED); + TMPro_EventManager.TEXTMESHPRO_PROPERTY_EVENT.Remove(ON_TEXTMESHPRO_PROPERTY_CHANGED); + TMPro_EventManager.DRAG_AND_DROP_MATERIAL_EVENT.Remove(ON_DRAG_AND_DROP_MATERIAL); + TMPro_EventManager.TEXT_STYLE_PROPERTY_EVENT.Remove(ON_TEXT_STYLE_CHANGED); + TMPro_EventManager.COLOR_GRADIENT_PROPERTY_EVENT.Remove(ON_COLOR_GRADIENT_CHANGED); + TMPro_EventManager.TMP_SETTINGS_PROPERTY_EVENT.Remove(ON_TMP_SETTINGS_CHANGED); + TMPro_EventManager.RESOURCE_LOAD_EVENT.Remove(ON_RESOURCES_LOADED); + #endif + + m_isRegisteredForEvents = false; + TMP_UpdateManager.UnRegisterTextElementForRebuild(this); + TMP_UpdateManager.UnRegisterTextObjectForUpdate(this); + } + + + #if UNITY_EDITOR + protected override void Reset() + { + //Debug.Log("Reset() has been called." + m_subTextObjects); + + // Return if Awake() has not been called on the text object. + if (m_isAwake == false) + return; + + if (m_mesh != null) + DestroyImmediate(m_mesh); + + Awake(); + } + + + protected override void OnValidate() + { + //Debug.Log("*** TextMeshPro OnValidate() has been called on Object ID:" + gameObject.GetInstanceID()); + + // Return if Awake() has not been called on the text object. + if (m_isAwake == false) + return; + + // Additional Properties could be added to sync up Serialized Properties & Properties. + + // Handle Font Asset changes in the inspector + if (m_fontAsset == null || m_hasFontAssetChanged) + { + LoadFontAsset(); + m_isCalculateSizeRequired = true; + m_hasFontAssetChanged = false; + } + + m_padding = GetPaddingForMaterial(); + ComputeMarginSize(); + + m_isInputParsingRequired = true; + m_inputSource = TextInputSources.Text; + m_havePropertiesChanged = true; + m_isCalculateSizeRequired = true; + m_isPreferredWidthDirty = true; + m_isPreferredHeightDirty = true; + + SetAllDirty(); + } + + + // Event received when TMP resources have been loaded. + void ON_RESOURCES_LOADED() + { + TMPro_EventManager.RESOURCE_LOAD_EVENT.Remove(ON_RESOURCES_LOADED); + + if (this == null) + return; + + Awake(); + OnEnable(); + } + + + // Event received when custom material editor properties are changed. + void ON_MATERIAL_PROPERTY_CHANGED(bool isChanged, Material mat) + { + //Debug.Log("ON_MATERIAL_PROPERTY_CHANGED event received. Targeted Material is: " + mat.name + " m_sharedMaterial: " + m_sharedMaterial.name + " m_renderer.sharedMaterial: " + m_renderer.sharedMaterial); + + if (m_renderer.sharedMaterial == null) + { + if (m_fontAsset != null) + { + m_renderer.sharedMaterial = m_fontAsset.material; + Debug.LogWarning("No Material was assigned to " + name + ". " + m_fontAsset.material.name + " was assigned.", this); + } + else + Debug.LogWarning("No Font Asset assigned to " + name + ". Please assign a Font Asset.", this); + } + + if (m_fontAsset.atlasTexture != null && m_fontAsset.atlasTexture.GetInstanceID() != m_renderer.sharedMaterial.GetTexture(ShaderUtilities.ID_MainTex).GetInstanceID()) + { + m_renderer.sharedMaterial = m_sharedMaterial; + //m_renderer.sharedMaterial = m_fontAsset.material; + Debug.LogWarning("Font Asset Atlas doesn't match the Atlas in the newly assigned material. Select a matching material or a different font asset.", this); + } + + if (m_renderer.sharedMaterial != m_sharedMaterial) // || m_renderer.sharedMaterials.Contains(mat)) + { + //Debug.Log("ON_MATERIAL_PROPERTY_CHANGED Called on Target ID: " + GetInstanceID() + ". Previous Material:" + m_sharedMaterial + " New Material:" + m_renderer.sharedMaterial); // on Object ID:" + GetInstanceID() + ". m_sharedMaterial: " + m_sharedMaterial.name + " m_renderer.sharedMaterial: " + m_renderer.sharedMaterial.name); + m_sharedMaterial = m_renderer.sharedMaterial; + } + + m_padding = GetPaddingForMaterial(); + //m_sharedMaterialHashCode = TMP_TextUtilities.GetSimpleHashCode(m_sharedMaterial.name); + + UpdateMask(); + UpdateEnvMapMatrix(); + m_havePropertiesChanged = true; + SetVerticesDirty(); + } + + + // Event received when font asset properties are changed in Font Inspector + void ON_FONT_PROPERTY_CHANGED(bool isChanged, TMP_FontAsset font) + { + if (MaterialReference.Contains(m_materialReferences, font)) + { + //Debug.Log("ON_FONT_PROPERTY_CHANGED event received."); + m_isInputParsingRequired = true; + m_havePropertiesChanged = true; + + UpdateMeshPadding(); + + SetMaterialDirty(); + SetVerticesDirty(); + } + } + + + // Event received when UNDO / REDO Event alters the properties of the object. + void ON_TEXTMESHPRO_PROPERTY_CHANGED(bool isChanged, TextMeshPro obj) + { + if (obj == this) + { + //Debug.Log("Undo / Redo Event Received by Object ID:" + GetInstanceID()); + m_havePropertiesChanged = true; + m_isInputParsingRequired = true; + + m_padding = GetPaddingForMaterial(); + ComputeMarginSize(); // Verify this change + SetVerticesDirty(); + } + } + + + // Event to Track Material Changed resulting from Drag-n-drop. + void ON_DRAG_AND_DROP_MATERIAL(GameObject obj, Material currentMaterial, Material newMaterial) + { + //Debug.Log("Drag-n-Drop Event - Receiving Object ID " + GetInstanceID()); // + ". Target Object ID " + obj.GetInstanceID() + ". New Material is " + mat.name + " with ID " + mat.GetInstanceID() + ". Base Material is " + m_baseMaterial.name + " with ID " + m_baseMaterial.GetInstanceID()); + + // Check if event applies to this current object + #if UNITY_2018_2_OR_NEWER + if (obj == gameObject || UnityEditor.PrefabUtility.GetCorrespondingObjectFromSource(gameObject) == obj) + #else + if (obj == gameObject || UnityEditor.PrefabUtility.GetPrefabParent(gameObject) == obj) + #endif + { + UnityEditor.Undo.RecordObject(this, "Material Assignment"); + UnityEditor.Undo.RecordObject(m_renderer, "Material Assignment"); + + m_sharedMaterial = newMaterial; + + m_padding = GetPaddingForMaterial(); + m_havePropertiesChanged = true; + SetVerticesDirty(); + SetMaterialDirty(); + } + } + + + // Event received when Text Styles are changed. + void ON_TEXT_STYLE_CHANGED(bool isChanged) + { + m_havePropertiesChanged = true; + m_isInputParsingRequired = true; + SetVerticesDirty(); + } + + + /// <summary> + /// Event received when a Color Gradient Preset is modified. + /// </summary> + /// <param name="textObject"></param> + void ON_COLOR_GRADIENT_CHANGED(TMP_ColorGradient gradient) + { + if (m_fontColorGradientPreset != null && gradient.GetInstanceID() == m_fontColorGradientPreset.GetInstanceID()) + { + m_havePropertiesChanged = true; + SetVerticesDirty(); + } + } + + + /// <summary> + /// Event received when the TMP Settings are changed. + /// </summary> + void ON_TMP_SETTINGS_CHANGED() + { + m_defaultSpriteAsset = null; + m_havePropertiesChanged = true; + m_isInputParsingRequired = true; + SetAllDirty(); + } +#endif + + + // Function which loads either the default font or a newly assigned font asset. This function also assigned the appropriate material to the renderer. + protected override void LoadFontAsset() + { + //Debug.Log("TextMeshPro LoadFontAsset() has been called."); // Current Font Asset is " + (font != null ? font.name: "Null") ); + + ShaderUtilities.GetShaderPropertyIDs(); // Initialize & Get shader property IDs. + + if (m_fontAsset == null) + { + if (TMP_Settings.defaultFontAsset != null) + m_fontAsset =TMP_Settings.defaultFontAsset; + else + m_fontAsset = Resources.Load<TMP_FontAsset>("Fonts & Materials/LiberationSans SDF"); + + if (m_fontAsset == null) + { + Debug.LogWarning("The LiberationSans SDF Font Asset was not found. There is no Font Asset assigned to " + gameObject.name + ".", this); + return; + } + + if (m_fontAsset.characterLookupTable == null) + { + Debug.Log("Dictionary is Null!"); + } + + m_renderer.sharedMaterial = m_fontAsset.material; + m_sharedMaterial = m_fontAsset.material; + m_sharedMaterial.SetFloat("_CullMode", 0); + m_sharedMaterial.SetFloat(ShaderUtilities.ShaderTag_ZTestMode, 4); + m_renderer.receiveShadows = false; + m_renderer.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off; // true; + // Get a Reference to the Shader + } + else + { + if (m_fontAsset.characterLookupTable == null) + { + //Debug.Log("Reading Font Definition and Creating Character Dictionary."); + m_fontAsset.ReadFontAssetDefinition(); + } + + //Debug.Log("Font Asset name:" + font.material.name); + + // If font atlas texture doesn't match the assigned material font atlas, switch back to default material specified in the Font Asset. + if (m_renderer.sharedMaterial == null || m_renderer.sharedMaterial.GetTexture(ShaderUtilities.ID_MainTex) == null || m_fontAsset.atlasTexture.GetInstanceID() != m_renderer.sharedMaterial.GetTexture(ShaderUtilities.ID_MainTex).GetInstanceID()) + { + m_renderer.sharedMaterial = m_fontAsset.material; + m_sharedMaterial = m_fontAsset.material; + } + else + { + m_sharedMaterial = m_renderer.sharedMaterial; + } + + //m_sharedMaterial.SetFloat("_CullMode", 0); + m_sharedMaterial.SetFloat(ShaderUtilities.ShaderTag_ZTestMode, 4); + + // Check if we are using the SDF Surface Shader + if (m_sharedMaterial.passCount == 1) + { + m_renderer.receiveShadows = false; + m_renderer.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off; + } + + } + + m_padding = GetPaddingForMaterial(); + //m_alignmentPadding = ShaderUtilities.GetFontExtent(m_sharedMaterial); + m_isMaskingEnabled = ShaderUtilities.IsMaskingEnabled(m_sharedMaterial); + + + // Find and cache Underline & Ellipsis characters. + GetSpecialCharacters(m_fontAsset); + + + //m_sharedMaterials.Add(m_sharedMaterial); + //m_sharedMaterialHashCode = TMP_TextUtilities.GetSimpleHashCode(m_sharedMaterial.name); + // Hide Material Editor Component + //m_renderer.sharedMaterial.hideFlags = HideFlags.None; + } + + + void UpdateEnvMapMatrix() + { + if (!m_sharedMaterial.HasProperty(ShaderUtilities.ID_EnvMap) || m_sharedMaterial.GetTexture(ShaderUtilities.ID_EnvMap) == null) + return; + + //Debug.Log("Updating Env Matrix..."); + Vector3 rotation = m_sharedMaterial.GetVector(ShaderUtilities.ID_EnvMatrixRotation); + m_EnvMapMatrix = Matrix4x4.TRS(Vector3.zero, Quaternion.Euler(rotation), Vector3.one); + + m_sharedMaterial.SetMatrix(ShaderUtilities.ID_EnvMatrix, m_EnvMapMatrix); + } + + + // + void SetMask(MaskingTypes maskType) + { + switch(maskType) + { + case MaskingTypes.MaskOff: + m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_SOFT); + m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_HARD); + m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_TEX); + break; + case MaskingTypes.MaskSoft: + m_sharedMaterial.EnableKeyword(ShaderUtilities.Keyword_MASK_SOFT); + m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_HARD); + m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_TEX); + break; + case MaskingTypes.MaskHard: + m_sharedMaterial.EnableKeyword(ShaderUtilities.Keyword_MASK_HARD); + m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_SOFT); + m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_TEX); + break; + //case MaskingTypes.MaskTex: + // m_sharedMaterial.EnableKeyword(ShaderUtilities.Keyword_MASK_TEX); + // m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_HARD); + // m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_SOFT); + // break; + } + } + + + // Method used to set the masking coordinates + void SetMaskCoordinates(Vector4 coords) + { + m_sharedMaterial.SetVector(ShaderUtilities.ID_ClipRect, coords); + } + + // Method used to set the masking coordinates + void SetMaskCoordinates(Vector4 coords, float softX, float softY) + { + m_sharedMaterial.SetVector(ShaderUtilities.ID_ClipRect, coords); + m_sharedMaterial.SetFloat(ShaderUtilities.ID_MaskSoftnessX, softX); + m_sharedMaterial.SetFloat(ShaderUtilities.ID_MaskSoftnessY, softY); + } + + + + // Enable Masking in the Shader + void EnableMasking() + { + if (m_sharedMaterial.HasProperty(ShaderUtilities.ID_ClipRect)) + { + m_sharedMaterial.EnableKeyword(ShaderUtilities.Keyword_MASK_SOFT); + m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_HARD); + m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_TEX); + + m_isMaskingEnabled = true; + UpdateMask(); + } + } + + + // Enable Masking in the Shader + void DisableMasking() + { + if (m_sharedMaterial.HasProperty(ShaderUtilities.ID_ClipRect)) + { + m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_SOFT); + m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_HARD); + m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_TEX); + + m_isMaskingEnabled = false; + UpdateMask(); + } + } + + + void UpdateMask() + { + //Debug.Log("UpdateMask() called."); + + if (!m_isMaskingEnabled) + { + // Release Masking Material + + // Re-assign Base Material + + return; + } + + if (m_isMaskingEnabled && m_fontMaterial == null) + { + CreateMaterialInstance(); + } + + + /* + if (!m_isMaskingEnabled) + { + //Debug.Log("Masking is not enabled."); + if (m_maskingPropertyBlock != null) + { + m_renderer.SetPropertyBlock(null); + //havePropertiesChanged = true; + } + return; + } + //else + // Debug.Log("Updating Masking..."); + */ + + // Compute Masking Coordinates & Softness + //float softnessX = Mathf.Min(Mathf.Min(m_textContainer.margins.x, m_textContainer.margins.z), m_sharedMaterial.GetFloat(ShaderUtilities.ID_MaskSoftnessX)); + //float softnessY = Mathf.Min(Mathf.Min(m_textContainer.margins.y, m_textContainer.margins.w), m_sharedMaterial.GetFloat(ShaderUtilities.ID_MaskSoftnessY)); + + //softnessX = softnessX > 0 ? softnessX : 0; + //softnessY = softnessY > 0 ? softnessY : 0; + + //float width = (m_textContainer.width - Mathf.Max(m_textContainer.margins.x, 0) - Mathf.Max(m_textContainer.margins.z, 0)) / 2 + softnessX; + //float height = (m_textContainer.height - Mathf.Max(m_textContainer.margins.y, 0) - Mathf.Max(m_textContainer.margins.w, 0)) / 2 + softnessY; + + //Vector2 center = new Vector2((0.5f - m_textContainer.pivot.x) * m_textContainer.width + (Mathf.Max(m_textContainer.margins.x, 0) - Mathf.Max(m_textContainer.margins.z, 0)) / 2, (0.5f - m_textContainer.pivot.y) * m_textContainer.height + (- Mathf.Max(m_textContainer.margins.y, 0) + Mathf.Max(m_textContainer.margins.w, 0)) / 2); + //Vector4 mask = new Vector4(center.x, center.y, width, height); + + + //m_fontMaterial.SetVector(ShaderUtilities.ID_ClipRect, mask); + //m_fontMaterial.SetFloat(ShaderUtilities.ID_MaskSoftnessX, softnessX); + //m_fontMaterial.SetFloat(ShaderUtilities.ID_MaskSoftnessY, softnessY); + + /* + if(m_maskingPropertyBlock == null) + { + m_maskingPropertyBlock = new MaterialPropertyBlock(); + + //m_maskingPropertyBlock.AddFloat(ShaderUtilities.ID_VertexOffsetX, m_sharedMaterial.GetFloat(ShaderUtilities.ID_VertexOffsetX)); + //m_maskingPropertyBlock.AddFloat(ShaderUtilities.ID_VertexOffsetY, m_sharedMaterial.GetFloat(ShaderUtilities.ID_VertexOffsetY)); + //Debug.Log("Creating new MaterialPropertyBlock."); + } + + //Debug.Log("Updating Material Property Block."); + //m_maskingPropertyBlock.Clear(); + m_maskingPropertyBlock.AddFloat(ShaderUtilities.ID_MaskID, m_renderer.GetInstanceID()); + m_maskingPropertyBlock.AddVector(ShaderUtilities.ID_MaskCoord, mask); + m_maskingPropertyBlock.AddFloat(ShaderUtilities.ID_MaskSoftnessX, softnessX); + m_maskingPropertyBlock.AddFloat(ShaderUtilities.ID_MaskSoftnessY, softnessY); + + m_renderer.SetPropertyBlock(m_maskingPropertyBlock); + */ + } + + + // Function called internally when a new material is assigned via the fontMaterial property. + protected override Material GetMaterial(Material mat) + { + // Check in case Object is disabled. If so, we don't have a valid reference to the Renderer. + // This can occur when the Duplicate Material Context menu is used on an inactive object. + //if (m_renderer == null) + // m_renderer = GetComponent<Renderer>(); + + // Create Instance Material only if the new material is not the same instance previously used. + if (m_fontMaterial == null || m_fontMaterial.GetInstanceID() != mat.GetInstanceID()) + m_fontMaterial = CreateMaterialInstance(mat); + + m_sharedMaterial = m_fontMaterial; + + m_padding = GetPaddingForMaterial(); + + SetVerticesDirty(); + SetMaterialDirty(); + + return m_sharedMaterial; + } + + + /// <summary> + /// Method returning instances of the materials used by the text object. + /// </summary> + /// <returns></returns> + protected override Material[] GetMaterials(Material[] mats) + { + int materialCount = m_textInfo.materialCount; + + if (m_fontMaterials == null) + m_fontMaterials = new Material[materialCount]; + else if (m_fontMaterials.Length != materialCount) + TMP_TextInfo.Resize(ref m_fontMaterials, materialCount, false); + + // Get instances of the materials + for (int i = 0; i < materialCount; i++) + { + if (i == 0) + m_fontMaterials[i] = fontMaterial; + else + m_fontMaterials[i] = m_subTextObjects[i].material; + } + + m_fontSharedMaterials = m_fontMaterials; + + return m_fontMaterials; + } + + + // Function called internally when a new shared material is assigned via the fontSharedMaterial property. + protected override void SetSharedMaterial(Material mat) + { + // Check in case Object is disabled. If so, we don't have a valid reference to the Renderer. + // This can occur when the Duplicate Material Context menu is used on an inactive object. + //if (m_renderer == null) + // m_renderer = GetComponent<Renderer>(); + + m_sharedMaterial = mat; + + m_padding = GetPaddingForMaterial(); + + SetMaterialDirty(); + } + + + /// <summary> + /// Method returning an array containing the materials used by the text object. + /// </summary> + /// <returns></returns> + protected override Material[] GetSharedMaterials() + { + int materialCount = m_textInfo.materialCount; + + if (m_fontSharedMaterials == null) + m_fontSharedMaterials = new Material[materialCount]; + else if (m_fontSharedMaterials.Length != materialCount) + TMP_TextInfo.Resize(ref m_fontSharedMaterials, materialCount, false); + + for (int i = 0; i < materialCount; i++) + { + if (i == 0) + m_fontSharedMaterials[i] = m_sharedMaterial; + else + m_fontSharedMaterials[i] = m_subTextObjects[i].sharedMaterial; + } + + return m_fontSharedMaterials; + } + + + /// <summary> + /// Method used to assign new materials to the text and sub text objects. + /// </summary> + protected override void SetSharedMaterials(Material[] materials) + { + int materialCount = m_textInfo.materialCount; + + // Check allocation of the fontSharedMaterials array. + if (m_fontSharedMaterials == null) + m_fontSharedMaterials = new Material[materialCount]; + else if (m_fontSharedMaterials.Length != materialCount) + TMP_TextInfo.Resize(ref m_fontSharedMaterials, materialCount, false); + + // Only assign as many materials as the text object contains. + for (int i = 0; i < materialCount; i++) + { + Texture mat_MainTex = materials[i].GetTexture(ShaderUtilities.ID_MainTex); + + if (i == 0) + { + // Only assign new material if the font atlas textures match. + if ( mat_MainTex == null || mat_MainTex.GetInstanceID() != m_sharedMaterial.GetTexture(ShaderUtilities.ID_MainTex).GetInstanceID()) + continue; + + m_sharedMaterial = m_fontSharedMaterials[i] = materials[i]; + m_padding = GetPaddingForMaterial(m_sharedMaterial); + } + else + { + // Only assign new material if the font atlas textures match. + if (mat_MainTex == null || mat_MainTex.GetInstanceID() != m_subTextObjects[i].sharedMaterial.GetTexture(ShaderUtilities.ID_MainTex).GetInstanceID()) + continue; + + // Only assign a new material if none were specified in the text input. + if (m_subTextObjects[i].isDefaultMaterial) + m_subTextObjects[i].sharedMaterial = m_fontSharedMaterials[i] = materials[i]; + } + } + } + + + // This function will create an instance of the Font Material. + protected override void SetOutlineThickness(float thickness) + { + thickness = Mathf.Clamp01(thickness); + m_renderer.material.SetFloat(ShaderUtilities.ID_OutlineWidth, thickness); + + if (m_fontMaterial == null) + m_fontMaterial = m_renderer.material; + + m_fontMaterial = m_renderer.material; + m_sharedMaterial = m_fontMaterial; + m_padding = GetPaddingForMaterial(); + } + + + // This function will create an instance of the Font Material. + protected override void SetFaceColor(Color32 color) + { + m_renderer.material.SetColor(ShaderUtilities.ID_FaceColor, color); + + if (m_fontMaterial == null) + m_fontMaterial = m_renderer.material; + + m_sharedMaterial = m_fontMaterial; + } + + + // This function will create an instance of the Font Material. + protected override void SetOutlineColor(Color32 color) + { + m_renderer.material.SetColor(ShaderUtilities.ID_OutlineColor, color); + + if (m_fontMaterial == null) + m_fontMaterial = m_renderer.material; + + //Debug.Log("Material ID:" + m_fontMaterial.GetInstanceID()); + m_sharedMaterial = m_fontMaterial; + } + + + // Function used to create an instance of the material + void CreateMaterialInstance() + { + Material mat = new Material(m_sharedMaterial); + mat.shaderKeywords = m_sharedMaterial.shaderKeywords; + + //mat.hideFlags = HideFlags.DontSave; + mat.name += " Instance"; + + m_fontMaterial = mat; + } + + + // Sets the Render Queue and Ztest mode + protected override void SetShaderDepth() + { + if (m_isOverlay) + { + // Changing these properties results in an instance of the material + m_sharedMaterial.SetFloat(ShaderUtilities.ShaderTag_ZTestMode, 0); + //m_renderer.material.SetFloat("_ZTestMode", 8); + m_renderer.material.renderQueue = 4000; + + m_sharedMaterial = m_renderer.material; + //Debug.Log("Text set to Overlay mode."); + } + else + { + // Should this use an instanced material? + m_sharedMaterial.SetFloat(ShaderUtilities.ShaderTag_ZTestMode, 4); + m_renderer.material.renderQueue = -1; + + m_sharedMaterial = m_renderer.material; + //Debug.Log("Text set to Normal mode."); + } + } + + + // Sets the Culling mode of the material + protected override void SetCulling() + { + if (m_isCullingEnabled) + { + m_renderer.material.SetFloat("_CullMode", 2); + + for (int i = 1; i < m_subTextObjects.Length && m_subTextObjects[i] != null; i++) + { + Renderer renderer = m_subTextObjects[i].renderer; + + if (renderer != null) + { + renderer.material.SetFloat(ShaderUtilities.ShaderTag_CullMode, 2); + } + } + } + else + { + m_renderer.material.SetFloat("_CullMode", 0); + + for (int i = 1; i < m_subTextObjects.Length && m_subTextObjects[i] != null; i++) + { + Renderer renderer = m_subTextObjects[i].renderer; + + if (renderer != null) + { + renderer.material.SetFloat(ShaderUtilities.ShaderTag_CullMode, 0); + } + } + } + } + + + // Set Perspective Correction Mode based on whether Camera is Orthographic or Perspective + void SetPerspectiveCorrection() + { + if (m_isOrthographic) + m_sharedMaterial.SetFloat(ShaderUtilities.ID_PerspectiveFilter, 0.0f); + else + m_sharedMaterial.SetFloat(ShaderUtilities.ID_PerspectiveFilter, 0.875f); + } + + + /// <summary> + /// Get the padding value for the currently assigned material. + /// </summary> + /// <returns></returns> + protected override float GetPaddingForMaterial(Material mat) + { + m_padding = ShaderUtilities.GetPadding(mat, m_enableExtraPadding, m_isUsingBold); + m_isMaskingEnabled = ShaderUtilities.IsMaskingEnabled(m_sharedMaterial); + m_isSDFShader = mat.HasProperty(ShaderUtilities.ID_WeightNormal); + + return m_padding; + } + + + /// <summary> + /// Get the padding value for the currently assigned material. + /// </summary> + /// <returns></returns> + protected override float GetPaddingForMaterial() + { + ShaderUtilities.GetShaderPropertyIDs(); + + if (m_sharedMaterial == null) return 0; + + m_padding = ShaderUtilities.GetPadding(m_sharedMaterial, m_enableExtraPadding, m_isUsingBold); + m_isMaskingEnabled = ShaderUtilities.IsMaskingEnabled(m_sharedMaterial); + m_isSDFShader = m_sharedMaterial.HasProperty(ShaderUtilities.ID_WeightNormal); + + return m_padding; + } + + + // This function parses through the Char[] to determine how many characters will be visible. It then makes sure the arrays are large enough for all those characters. + protected override int SetArraySizes(UnicodeChar[] chars) + { + //Debug.Log("*** SetArraySizes() ***"); + + int spriteCount = 0; + + m_totalCharacterCount = 0; + m_isUsingBold = false; + m_isParsingText = false; + tag_NoParsing = false; + m_FontStyleInternal = m_fontStyle; + + m_FontWeightInternal = (m_FontStyleInternal & FontStyles.Bold) == FontStyles.Bold ? FontWeight.Bold : m_fontWeight; + m_FontWeightStack.SetDefault(m_FontWeightInternal); + + m_currentFontAsset = m_fontAsset; + m_currentMaterial = m_sharedMaterial; + m_currentMaterialIndex = 0; + + m_materialReferenceStack.SetDefault(new MaterialReference(m_currentMaterialIndex, m_currentFontAsset, null, m_currentMaterial, m_padding)); + + m_materialReferenceIndexLookup.Clear(); + MaterialReference.AddMaterialReference(m_currentMaterial, m_currentFontAsset, m_materialReferences, m_materialReferenceIndexLookup); + + if (m_textInfo == null) m_textInfo = new TMP_TextInfo(); + m_textElementType = TMP_TextElementType.Character; + + // Clear Linked Text object if we have one. + if (m_linkedTextComponent != null) + { + m_linkedTextComponent.text = string.Empty; + m_linkedTextComponent.ForceMeshUpdate(); + } + + // Parsing XML tags in the text + for (int i = 0; i < chars.Length && chars[i].unicode != 0; i++) + { + //Make sure the characterInfo array can hold the next text element. + if (m_textInfo.characterInfo == null || m_totalCharacterCount >= m_textInfo.characterInfo.Length) + TMP_TextInfo.Resize(ref m_textInfo.characterInfo, m_totalCharacterCount + 1, true); + + int unicode = (int)chars[i].unicode; + + // PARSE XML TAGS + #region PARSE XML TAGS + if (m_isRichText && unicode == 60) // if Char '<' + { + int prev_MaterialIndex = m_currentMaterialIndex; + int endTagIndex; + + // Check if Tag is Valid + if (ValidateHtmlTag(chars, i + 1, out endTagIndex)) + { + int tagStartIndex = chars[i].stringIndex; + i = endTagIndex; + + if ((m_FontStyleInternal & FontStyles.Bold) == FontStyles.Bold) m_isUsingBold = true; + + if (m_textElementType == TMP_TextElementType.Sprite) + { + m_materialReferences[m_currentMaterialIndex].referenceCount += 1; + + m_textInfo.characterInfo[m_totalCharacterCount].character = (char)(57344 + m_spriteIndex); + m_textInfo.characterInfo[m_totalCharacterCount].spriteIndex = m_spriteIndex; + m_textInfo.characterInfo[m_totalCharacterCount].fontAsset = m_currentFontAsset; + m_textInfo.characterInfo[m_totalCharacterCount].spriteAsset = m_currentSpriteAsset; + m_textInfo.characterInfo[m_totalCharacterCount].materialReferenceIndex = m_currentMaterialIndex; + m_textInfo.characterInfo[m_totalCharacterCount].textElement = m_currentSpriteAsset.spriteCharacterTable[m_spriteIndex]; + m_textInfo.characterInfo[m_totalCharacterCount].elementType = m_textElementType; + m_textInfo.characterInfo[m_totalCharacterCount].index = tagStartIndex; + m_textInfo.characterInfo[m_totalCharacterCount].stringLength = chars[i].stringIndex - tagStartIndex + 1; + + // Restore element type and material index to previous values. + m_textElementType = TMP_TextElementType.Character; + m_currentMaterialIndex = prev_MaterialIndex; + + spriteCount += 1; + m_totalCharacterCount += 1; + } + + continue; + } + } + #endregion + + bool isUsingAlternativeTypeface = false; + bool isUsingFallbackOrAlternativeTypeface = false; + + TMP_Character character; + TMP_FontAsset tempFontAsset; + TMP_FontAsset prev_fontAsset = m_currentFontAsset; + Material prev_material = m_currentMaterial; + int prev_materialIndex = m_currentMaterialIndex; + + + // Handle Font Styles like LowerCase, UpperCase and SmallCaps. + #region Handling of LowerCase, UpperCase and SmallCaps Font Styles + if (m_textElementType == TMP_TextElementType.Character) + { + if ((m_FontStyleInternal & FontStyles.UpperCase) == FontStyles.UpperCase) + { + // If this character is lowercase, switch to uppercase. + if (char.IsLower((char)unicode)) + unicode = char.ToUpper((char)unicode); + + } + else if ((m_FontStyleInternal & FontStyles.LowerCase) == FontStyles.LowerCase) + { + // If this character is uppercase, switch to lowercase. + if (char.IsUpper((char)unicode)) + unicode = char.ToLower((char)unicode); + } + else if ((m_FontStyleInternal & FontStyles.SmallCaps) == FontStyles.SmallCaps) + { + // Only convert lowercase characters to uppercase. + if (char.IsLower((char)unicode)) + unicode = char.ToUpper((char)unicode); + } + } + #endregion + + + // Lookup the Glyph data for each character and cache it. + #region LOOKUP GLYPH + character = TMP_FontAssetUtilities.GetCharacterFromFontAsset((uint)unicode, m_currentFontAsset, false, m_FontStyleInternal, m_FontWeightInternal, out isUsingAlternativeTypeface, out tempFontAsset); + + // Search for the glyph in the list of fallback assigned to the primary font asset. + if (character == null) + { + if (m_currentFontAsset.fallbackFontAssetTable != null && m_currentFontAsset.fallbackFontAssetTable.Count > 0) + character = TMP_FontAssetUtilities.GetCharacterFromFontAssets((uint)unicode, m_currentFontAsset.fallbackFontAssetTable, true, m_FontStyleInternal, m_FontWeightInternal, out isUsingAlternativeTypeface, out tempFontAsset); + } + + // Search for the glyph in the Sprite Asset assigned to the text object. + if (character == null) + { + TMP_SpriteAsset spriteAsset = this.spriteAsset; + + if (spriteAsset != null) + { + int spriteIndex = -1; + + // Check Default Sprite Asset and its Fallbacks + spriteAsset = TMP_SpriteAsset.SearchForSpriteByUnicode(spriteAsset, (uint)unicode, true, out spriteIndex); + + if (spriteIndex != -1) + { + m_textElementType = TMP_TextElementType.Sprite; + m_textInfo.characterInfo[m_totalCharacterCount].elementType = m_textElementType; + + m_currentMaterialIndex = MaterialReference.AddMaterialReference(spriteAsset.material, spriteAsset, m_materialReferences, m_materialReferenceIndexLookup); + m_materialReferences[m_currentMaterialIndex].referenceCount += 1; + + m_textInfo.characterInfo[m_totalCharacterCount].character = (char)unicode; + m_textInfo.characterInfo[m_totalCharacterCount].spriteIndex = spriteIndex; + m_textInfo.characterInfo[m_totalCharacterCount].fontAsset = m_currentFontAsset; + m_textInfo.characterInfo[m_totalCharacterCount].spriteAsset = spriteAsset; + m_textInfo.characterInfo[m_totalCharacterCount].textElement = spriteAsset.spriteCharacterTable[m_spriteIndex]; + m_textInfo.characterInfo[m_totalCharacterCount].materialReferenceIndex = m_currentMaterialIndex; + m_textInfo.characterInfo[m_totalCharacterCount].index = chars[i].stringIndex; + m_textInfo.characterInfo[m_totalCharacterCount].stringLength = chars[i].length; + + // Restore element type and material index to previous values. + m_textElementType = TMP_TextElementType.Character; + m_currentMaterialIndex = prev_materialIndex; + + spriteCount += 1; + m_totalCharacterCount += 1; + + continue; + } + } + } + + // Search for the glyph in the list of fallback assigned in the TMP Settings (General Fallbacks). + if (character == null) + { + if (TMP_Settings.fallbackFontAssets != null && TMP_Settings.fallbackFontAssets.Count > 0) + character = TMP_FontAssetUtilities.GetCharacterFromFontAssets((uint)unicode, TMP_Settings.fallbackFontAssets, true, m_FontStyleInternal, m_FontWeightInternal, out isUsingAlternativeTypeface, out tempFontAsset); + } + + // Search for the glyph in the Default Font Asset assigned in the TMP Settings file. + if (character == null) + { + if (TMP_Settings.defaultFontAsset != null) + character = TMP_FontAssetUtilities.GetCharacterFromFontAsset((uint)unicode, TMP_Settings.defaultFontAsset, true, m_FontStyleInternal, m_FontWeightInternal, out isUsingAlternativeTypeface, out tempFontAsset); + } + + // TODO: Add support for using Sprite Assets like a special Emoji only Sprite Asset when UTF16 or UTF32 glyphs are requested. + // This would kind of mirror native Emoji support. + if (character == null) + { + TMP_SpriteAsset spriteAsset = TMP_Settings.defaultSpriteAsset; + + if (spriteAsset != null) + { + int spriteIndex = -1; + + // Check Default Sprite Asset and its Fallbacks + spriteAsset = TMP_SpriteAsset.SearchForSpriteByUnicode(spriteAsset, (uint)unicode, true, out spriteIndex); + + if (spriteIndex != -1) + { + m_textElementType = TMP_TextElementType.Sprite; + m_textInfo.characterInfo[m_totalCharacterCount].elementType = m_textElementType; + + m_currentMaterialIndex = MaterialReference.AddMaterialReference(spriteAsset.material, spriteAsset, m_materialReferences, m_materialReferenceIndexLookup); + m_materialReferences[m_currentMaterialIndex].referenceCount += 1; + + m_textInfo.characterInfo[m_totalCharacterCount].character = (char)unicode; + m_textInfo.characterInfo[m_totalCharacterCount].spriteIndex = spriteIndex; + m_textInfo.characterInfo[m_totalCharacterCount].fontAsset = m_currentFontAsset; + m_textInfo.characterInfo[m_totalCharacterCount].spriteAsset = spriteAsset; + m_textInfo.characterInfo[m_totalCharacterCount].textElement = spriteAsset.spriteCharacterTable[m_spriteIndex]; + m_textInfo.characterInfo[m_totalCharacterCount].materialReferenceIndex = m_currentMaterialIndex; + m_textInfo.characterInfo[m_totalCharacterCount].index = chars[i].stringIndex; + m_textInfo.characterInfo[m_totalCharacterCount].stringLength = chars[i].length; + + // Restore element type and material index to previous values. + m_textElementType = TMP_TextElementType.Character; + m_currentMaterialIndex = prev_materialIndex; + + spriteCount += 1; + m_totalCharacterCount += 1; + + continue; + } + + } + } + + //Check if Lowercase or Uppercase variant of the character is available. + // Not sure this is necessary anyone as it is very unlikely with recursive search through fallback fonts. + //if (glyph == null) + //{ + // if (char.IsLower((char)c)) + // { + // if (m_currentFontAsset.characterDictionary.TryGetValue(char.ToUpper((char)c), out glyph)) + // c = chars[i] = char.ToUpper((char)c); + // } + // else if (char.IsUpper((char)c)) + // { + // if (m_currentFontAsset.characterDictionary.TryGetValue(char.ToLower((char)c), out glyph)) + // c = chars[i] = char.ToLower((char)c); + // } + //} + + // Replace missing glyph by the Square (9633) glyph or possibly the Space (32) glyph. + if (character == null) + { + // Save the original unicode character + int srcGlyph = unicode; + + // Try replacing the missing glyph character by TMP Settings Missing Glyph or Square (9633) character. + unicode = chars[i].unicode = TMP_Settings.missingGlyphCharacter == 0 ? 9633 : TMP_Settings.missingGlyphCharacter; + + // Check for the missing glyph character in the currently assigned font asset and its fallbacks + character = TMP_FontAssetUtilities.GetCharacterFromFontAsset((uint)unicode, m_currentFontAsset, true, m_FontStyleInternal, m_FontWeightInternal, out isUsingAlternativeTypeface, out tempFontAsset); + + if (character == null) + { + // Search for the missing glyph character in the TMP Settings Fallback list. + if (TMP_Settings.fallbackFontAssets != null && TMP_Settings.fallbackFontAssets.Count > 0) + character = TMP_FontAssetUtilities.GetCharacterFromFontAssets((uint)unicode, TMP_Settings.fallbackFontAssets, true, m_FontStyleInternal, m_FontWeightInternal, out isUsingAlternativeTypeface, out tempFontAsset); + } + + if (character == null) + { + // Search for the missing glyph in the TMP Settings Default Font Asset. + if (TMP_Settings.defaultFontAsset != null) + character = TMP_FontAssetUtilities.GetCharacterFromFontAsset((uint)unicode, TMP_Settings.defaultFontAsset, true, m_FontStyleInternal, m_FontWeightInternal, out isUsingAlternativeTypeface, out tempFontAsset); + } + + if (character == null) + { + // Use Space (32) Glyph from the currently assigned font asset. + unicode = chars[i].unicode = 32; + character = TMP_FontAssetUtilities.GetCharacterFromFontAsset((uint)unicode, m_currentFontAsset, true, m_FontStyleInternal, m_FontWeightInternal, out isUsingAlternativeTypeface, out tempFontAsset); + if (!TMP_Settings.warningsDisabled) + Debug.LogWarning("Character with ASCII value of " + srcGlyph + " was not found in the Font Asset Glyph Table. It was replaced by a space.", this); + } + } + + // Determine if the font asset is still the current font asset or a fallback. + if (tempFontAsset != null) + { + if (tempFontAsset.GetInstanceID() != m_currentFontAsset.GetInstanceID()) + { + isUsingFallbackOrAlternativeTypeface = true; + m_currentFontAsset = tempFontAsset; + } + } + #endregion + + m_textInfo.characterInfo[m_totalCharacterCount].elementType = TMP_TextElementType.Character; + m_textInfo.characterInfo[m_totalCharacterCount].textElement = character; + m_textInfo.characterInfo[m_totalCharacterCount].isUsingAlternateTypeface = isUsingAlternativeTypeface; + m_textInfo.characterInfo[m_totalCharacterCount].character = (char)unicode; + m_textInfo.characterInfo[m_totalCharacterCount].fontAsset = m_currentFontAsset; + m_textInfo.characterInfo[m_totalCharacterCount].index = chars[i].stringIndex; + m_textInfo.characterInfo[m_totalCharacterCount].stringLength = chars[i].length; + + if (isUsingFallbackOrAlternativeTypeface) + { + // Create Fallback material instance matching current material preset if necessary + if (TMP_Settings.matchMaterialPreset) + m_currentMaterial = TMP_MaterialManager.GetFallbackMaterial(m_currentMaterial, m_currentFontAsset.material); + else + m_currentMaterial = m_currentFontAsset.material; + + m_currentMaterialIndex = MaterialReference.AddMaterialReference(m_currentMaterial, m_currentFontAsset, m_materialReferences, m_materialReferenceIndexLookup); + } + + if (!char.IsWhiteSpace((char)unicode) && unicode != 0x200B) + { + // Limit the mesh of the main text object to 65535 vertices and use sub objects for the overflow. + if (m_materialReferences[m_currentMaterialIndex].referenceCount < 16383) + m_materialReferences[m_currentMaterialIndex].referenceCount += 1; + else + { + m_currentMaterialIndex = MaterialReference.AddMaterialReference(new Material(m_currentMaterial), m_currentFontAsset, m_materialReferences, m_materialReferenceIndexLookup); + m_materialReferences[m_currentMaterialIndex].referenceCount += 1; + } + } + + m_textInfo.characterInfo[m_totalCharacterCount].material = m_currentMaterial; + m_textInfo.characterInfo[m_totalCharacterCount].materialReferenceIndex = m_currentMaterialIndex; + m_materialReferences[m_currentMaterialIndex].isFallbackMaterial = isUsingFallbackOrAlternativeTypeface; + + // Restore previous font asset and material if fallback font was used. + if (isUsingFallbackOrAlternativeTypeface) + { + m_materialReferences[m_currentMaterialIndex].fallbackMaterial = prev_material; + m_currentFontAsset = prev_fontAsset; + m_currentMaterial = prev_material; + m_currentMaterialIndex = prev_materialIndex; + } + + m_totalCharacterCount += 1; + } + + // Early return if we are calculating the preferred values. + if (m_isCalculatingPreferredValues) + { + m_isCalculatingPreferredValues = false; + m_isInputParsingRequired = true; + return m_totalCharacterCount; + } + + // Save material and sprite count. + m_textInfo.spriteCount = spriteCount; + int materialCount = m_textInfo.materialCount = m_materialReferenceIndexLookup.Count; + + // Check if we need to resize the MeshInfo array for handling different materials. + if (materialCount > m_textInfo.meshInfo.Length) + TMP_TextInfo.Resize(ref m_textInfo.meshInfo, materialCount, false); + + // Resize SubTextObject array if necessary + if (materialCount > m_subTextObjects.Length) + TMP_TextInfo.Resize(ref m_subTextObjects, Mathf.NextPowerOfTwo(materialCount + 1)); + + // Resize CharacterInfo[] if allocations are excessive + if (m_textInfo.characterInfo.Length - m_totalCharacterCount > 256) + TMP_TextInfo.Resize(ref m_textInfo.characterInfo, Mathf.Max(m_totalCharacterCount + 1, 256), true); + + + // Iterate through the material references to set the mesh buffer allocations + for (int i = 0; i < materialCount; i++) + { + // Add new sub text object for each material reference + if (i > 0) + { + if (m_subTextObjects[i] == null) + { + m_subTextObjects[i] = TMP_SubMesh.AddSubTextObject(this, m_materialReferences[i]); + + // Not sure this is necessary + m_textInfo.meshInfo[i].vertices = null; + } + //else if (m_subTextObjects[i].gameObject.activeInHierarchy == false) + // m_subTextObjects[i].gameObject.SetActive(true); + + // Check if the material has changed. + if (m_subTextObjects[i].sharedMaterial == null || m_subTextObjects[i].sharedMaterial.GetInstanceID() != m_materialReferences[i].material.GetInstanceID()) + { + bool isDefaultMaterial = m_materialReferences[i].isDefaultMaterial; + + m_subTextObjects[i].isDefaultMaterial = isDefaultMaterial; + + // Assign new material if we are not using the default material or if the font asset has changed. + if (!isDefaultMaterial || m_subTextObjects[i].sharedMaterial == null || m_subTextObjects[i].sharedMaterial.GetTexture(ShaderUtilities.ID_MainTex).GetInstanceID() != m_materialReferences[i].material.GetTexture(ShaderUtilities.ID_MainTex).GetInstanceID()) + { + m_subTextObjects[i].sharedMaterial = m_materialReferences[i].material; + m_subTextObjects[i].fontAsset = m_materialReferences[i].fontAsset; + m_subTextObjects[i].spriteAsset = m_materialReferences[i].spriteAsset; + } + } + + // Check if we need to use a Fallback Material + if (m_materialReferences[i].isFallbackMaterial) + { + m_subTextObjects[i].fallbackMaterial = m_materialReferences[i].material; + m_subTextObjects[i].fallbackSourceMaterial = m_materialReferences[i].fallbackMaterial; + } + + } + + int referenceCount = m_materialReferences[i].referenceCount; + + // Check to make sure our buffers allocations can accommodate the required text elements. + if (m_textInfo.meshInfo[i].vertices == null || m_textInfo.meshInfo[i].vertices.Length < referenceCount * (!m_isVolumetricText ? 4 : 8)) + { + if (m_textInfo.meshInfo[i].vertices == null) + { + if (i == 0) + m_textInfo.meshInfo[i] = new TMP_MeshInfo(m_mesh, referenceCount + 1, m_isVolumetricText); + else + m_textInfo.meshInfo[i] = new TMP_MeshInfo(m_subTextObjects[i].mesh, referenceCount + 1, m_isVolumetricText); + } + else + m_textInfo.meshInfo[i].ResizeMeshInfo(referenceCount > 1024 ? referenceCount + 256 : Mathf.NextPowerOfTwo(referenceCount + 1), m_isVolumetricText); + } + else if (m_VertexBufferAutoSizeReduction && referenceCount > 0 && m_textInfo.meshInfo[i].vertices.Length - referenceCount * (!m_isVolumetricText ? 4 : 8) > 1024) + { + // Resize vertex buffers if allocations are excessive. + //Debug.Log("Reducing the size of the vertex buffers."); + m_textInfo.meshInfo[i].ResizeMeshInfo(referenceCount > 1024 ? referenceCount + 256 : Mathf.NextPowerOfTwo(referenceCount + 1), m_isVolumetricText); + } + } + + //TMP_MaterialManager.CleanupFallbackMaterials(); + + // Clean up unused SubMeshes + for (int i = materialCount; i < m_subTextObjects.Length && m_subTextObjects[i] != null; i++) + { + if (i < m_textInfo.meshInfo.Length) + m_textInfo.meshInfo[i].ClearUnusedVertices(0, true); + + //m_subTextObjects[i].gameObject.SetActive(false); + } + + return m_totalCharacterCount; + } + + + // Added to sort handle the potential issue with OnWillRenderObject() not getting called when objects are not visible by camera. + //void OnBecameInvisible() + //{ + // if (m_mesh != null) + // m_mesh.bounds = new Bounds(transform.position, new Vector3(1000, 1000, 0)); + //} + + + /// <summary> + /// Update the margin width and height + /// </summary> + public override void ComputeMarginSize() + { + if (this.rectTransform != null) + { + //Debug.Log("*** ComputeMarginSize() *** Current RectTransform's Width is " + m_rectTransform.rect.width + " and Height is " + m_rectTransform.rect.height); // + " and size delta is " + m_rectTransform.sizeDelta); + + m_marginWidth = m_rectTransform.rect.width - m_margin.x - m_margin.z; + m_marginHeight = m_rectTransform.rect.height - m_margin.y - m_margin.w; + + // Update the corners of the RectTransform + m_RectTransformCorners = GetTextContainerLocalCorners(); + } + } + + + protected override void OnDidApplyAnimationProperties() + { + //Debug.Log("*** OnDidApplyAnimationProperties() ***"); + m_havePropertiesChanged = true; + isMaskUpdateRequired = true; + + SetVerticesDirty(); + } + + + protected override void OnTransformParentChanged() + { + //Debug.Log("*** OnTransformParentChanged() ***"); + //ComputeMarginSize(); + + SetVerticesDirty(); + SetLayoutDirty(); + } + + + protected override void OnRectTransformDimensionsChange() + { + //Debug.Log("*** OnRectTransformDimensionsChange() ***"); + ComputeMarginSize(); + + SetVerticesDirty(); + SetLayoutDirty(); + } + + + /// <summary> + /// Function used as a replacement for LateUpdate to check if the transform or scale of the text object has changed. + /// </summary> + internal override void InternalUpdate() + { + // We need to update the SDF scale or possibly regenerate the text object if lossy scale has changed. + if (m_havePropertiesChanged == false) + { + float lossyScaleY = m_rectTransform.lossyScale.y; + if (lossyScaleY != m_previousLossyScaleY && m_text != string.Empty && m_text != null) + { + float scaleDelta = lossyScaleY / m_previousLossyScaleY; + + UpdateSDFScale(scaleDelta); + + m_previousLossyScaleY = lossyScaleY; + } + } + + // Added to handle legacy animation mode. + if (m_isUsingLegacyAnimationComponent) + { + //if (m_havePropertiesChanged) + m_havePropertiesChanged = true; + OnPreRenderObject(); + } + } + + + /// <summary> + /// Function called when the text needs to be updated. + /// </summary> + void OnPreRenderObject() + { + //Debug.Log("*** OnPreRenderObject() ***"); + + if (!m_isAwake || (this.IsActive() == false && m_ignoreActiveState == false)) return; + + // Debug Variables + loopCountA = 0; + //loopCountB = 0; + //loopCountC = 0; + //loopCountD = 0; + //loopCountE = 0; + + if (m_havePropertiesChanged || m_isLayoutDirty) + { + //Debug.Log("Properties have changed!"); // Assigned Material is:" + m_sharedMaterial); // New Text is: " + m_text + "."); + + if (isMaskUpdateRequired) + { + UpdateMask(); + isMaskUpdateRequired = false; + } + + // Update mesh padding if necessary. + if (checkPaddingRequired) + UpdateMeshPadding(); + + // Reparse the text if the input has changed or text was truncated. + if (m_isInputParsingRequired || m_isTextTruncated) + ParseInputText(); + + // Reset Font min / max used with Auto-sizing + if (m_enableAutoSizing) + m_fontSize = Mathf.Clamp(m_fontSizeBase, m_fontSizeMin, m_fontSizeMax); + + m_maxFontSize = m_fontSizeMax; + m_minFontSize = m_fontSizeMin; + m_lineSpacingDelta = 0; + m_charWidthAdjDelta = 0; + //m_recursiveCount = 0; + + m_isCharacterWrappingEnabled = false; + m_isTextTruncated = false; + + m_havePropertiesChanged = false; + m_isLayoutDirty = false; + m_ignoreActiveState = false; + + GenerateTextMesh(); + } + } + + + /// <summary> + /// This is the main function that is responsible for creating / displaying the text. + /// </summary> + protected override void GenerateTextMesh() + { + //Debug.Log("***** GenerateTextMesh() *****"); // ***** Frame: " + Time.frameCount); // + ". Point Size: " + m_fontSize + ". Margins are (W) " + m_marginWidth + " (H) " + m_marginHeight); // ". Iteration Count: " + loopCountA + ". Min: " + m_minFontSize + " Max: " + m_maxFontSize + " Delta: " + (m_maxFontSize - m_minFontSize) + " Font size is " + m_fontSize); //called for Object with ID " + GetInstanceID()); // Assigned Material is " + m_uiRenderer.GetMaterial().name); // IncludeForMasking " + this.m_IncludeForMasking); // and text is " + m_text); + + // Early exit if no font asset was assigned. This should not be needed since LiberationSans SDF will be assigned by default. + if (m_fontAsset == null || m_fontAsset.characterLookupTable == null) + { + Debug.LogWarning("Can't Generate Mesh! No Font Asset has been assigned to Object ID: " + this.GetInstanceID()); + return; + } + + // Clear TextInfo + if (m_textInfo != null) + m_textInfo.Clear(); + + // Early exit if we don't have any Text to generate. + if (m_TextParsingBuffer == null || m_TextParsingBuffer.Length == 0 || m_TextParsingBuffer[0].unicode == (char)0) + { + // Clear mesh and upload changes to the mesh. + ClearMesh(true); + + m_preferredWidth = 0; + m_preferredHeight = 0; + + // Event indicating the text has been regenerated. + TMPro_EventManager.ON_TEXT_CHANGED(this); + + return; + } + + m_currentFontAsset = m_fontAsset; + m_currentMaterial = m_sharedMaterial; + m_currentMaterialIndex = 0; + m_materialReferenceStack.SetDefault(new MaterialReference(m_currentMaterialIndex, m_currentFontAsset, null, m_currentMaterial, m_padding)); + + m_currentSpriteAsset = m_spriteAsset; + + // Stop all Sprite Animations + if (m_spriteAnimator != null) + m_spriteAnimator.StopAllAnimations(); + + // Total character count is computed when the text is parsed. + int totalCharacterCount = m_totalCharacterCount; + + // Calculate the scale of the font based on selected font size and sampling point size. + // baseScale is calculated using the font asset assigned to the text object. + float baseScale = m_fontScale = (m_fontSize / m_fontAsset.faceInfo.pointSize * m_fontAsset.faceInfo.scale * (m_isOrthographic ? 1 : 0.1f)); + float currentElementScale = baseScale; + m_fontScaleMultiplier = 1; + + m_currentFontSize = m_fontSize; + m_sizeStack.SetDefault(m_currentFontSize); + float fontSizeDelta = 0; + + int charCode = 0; // Holds the character code of the currently being processed character. + + m_FontStyleInternal = m_fontStyle; // Set the default style. + m_FontWeightInternal = (m_FontStyleInternal & FontStyles.Bold) == FontStyles.Bold ? FontWeight.Bold : m_fontWeight; + m_FontWeightStack.SetDefault(m_FontWeightInternal); + m_fontStyleStack.Clear(); + + m_lineJustification = m_textAlignment; // Sets the line justification mode to match editor alignment. + m_lineJustificationStack.SetDefault(m_lineJustification); + + float padding = 0; + float style_padding = 0; // Extra padding required to accommodate Bold style. + float bold_xAdvance_multiplier = 1; // Used to increase spacing between character when style is bold. + + m_baselineOffset = 0; // Used by subscript characters. + m_baselineOffsetStack.Clear(); + + // Underline + bool beginUnderline = false; + Vector3 underline_start = Vector3.zero; // Used to track where underline starts & ends. + Vector3 underline_end = Vector3.zero; + + // Strike-through + bool beginStrikethrough = false; + Vector3 strikethrough_start = Vector3.zero; + Vector3 strikethrough_end = Vector3.zero; + + // Text Highlight + bool beginHighlight = false; + Vector3 highlight_start = Vector3.zero; + Vector3 highlight_end = Vector3.zero; + + m_fontColor32 = m_fontColor; + Color32 vertexColor; + m_htmlColor = m_fontColor32; + m_underlineColor = m_htmlColor; + m_strikethroughColor = m_htmlColor; + + m_colorStack.SetDefault(m_htmlColor); + m_underlineColorStack.SetDefault(m_htmlColor); + m_strikethroughColorStack.SetDefault(m_htmlColor); + m_highlightColorStack.SetDefault(m_htmlColor); + + m_colorGradientPreset = null; + m_colorGradientStack.SetDefault(null); + + // Clear the Style stack. + //m_styleStack.Clear(); + + // Clear the Action stack. + m_actionStack.Clear(); + + m_isFXMatrixSet = false; + + m_lineOffset = 0; // Amount of space between lines (font line spacing + m_linespacing). + m_lineHeight = TMP_Math.FLOAT_UNSET; + float lineGap = m_currentFontAsset.faceInfo.lineHeight - (m_currentFontAsset.faceInfo.ascentLine - m_currentFontAsset.faceInfo.descentLine); + + m_cSpacing = 0; // Amount of space added between characters as a result of the use of the <cspace> tag. + m_monoSpacing = 0; + float lineOffsetDelta = 0; + m_xAdvance = 0; // Used to track the position of each character. + + tag_LineIndent = 0; // Used for indentation of text. + tag_Indent = 0; + m_indentStack.SetDefault(0); + tag_NoParsing = false; + //m_isIgnoringAlignment = false; + + m_characterCount = 0; // Total characters in the char[] + + // Tracking of line information + m_firstCharacterOfLine = 0; + m_lastCharacterOfLine = 0; + m_firstVisibleCharacterOfLine = 0; + m_lastVisibleCharacterOfLine = 0; + m_maxLineAscender = k_LargeNegativeFloat; + m_maxLineDescender = k_LargePositiveFloat; + m_lineNumber = 0; + m_lineVisibleCharacterCount = 0; + bool isStartOfNewLine = true; + m_firstOverflowCharacterIndex = -1; + + m_pageNumber = 0; + int pageToDisplay = Mathf.Clamp(m_pageToDisplay - 1, 0, m_textInfo.pageInfo.Length - 1); + int previousPageOverflowChar = 0; + + int ellipsisIndex = 0; + + Vector4 margins = m_margin; + float marginWidth = m_marginWidth; + float marginHeight = m_marginHeight; + m_marginLeft = 0; + m_marginRight = 0; + m_width = -1; + float width = marginWidth + 0.0001f - m_marginLeft - m_marginRight; + + // Need to initialize these Extents structures + m_meshExtents.min = k_LargePositiveVector2; + m_meshExtents.max = k_LargeNegativeVector2; + + // Initialize lineInfo + m_textInfo.ClearLineInfo(); + + // Tracking of the highest Ascender + m_maxCapHeight = 0; + m_maxAscender = 0; + m_maxDescender = 0; + float pageAscender = 0; + float maxVisibleDescender = 0; + bool isMaxVisibleDescenderSet = false; + m_isNewPage = false; + + // Initialize struct to track states of word wrapping + bool isFirstWord = true; + m_isNonBreakingSpace = false; + bool ignoreNonBreakingSpace = false; + bool isLastBreakingChar = false; + float linebreakingWidth = 0; + int wrappingIndex = 0; + + // Save character and line state before we begin layout. + SaveWordWrappingState(ref m_SavedWordWrapState, -1, -1); + SaveWordWrappingState(ref m_SavedLineState, -1, -1); + + loopCountA += 1; + + // Parse through Character buffer to read HTML tags and begin creating mesh. + for (int i = 0; i < m_TextParsingBuffer.Length && m_TextParsingBuffer[i].unicode != 0; i++) + { + charCode = m_TextParsingBuffer[i].unicode; + + // Parse Rich Text Tag + #region Parse Rich Text Tag + if (m_isRichText && charCode == 60) // '<' + { + m_isParsingText = true; + m_textElementType = TMP_TextElementType.Character; + int endTagIndex; + + // Check if Tag is valid. If valid, skip to the end of the validated tag. + if (ValidateHtmlTag(m_TextParsingBuffer, i + 1, out endTagIndex)) + { + i = endTagIndex; + + // Continue to next character or handle the sprite element + if (m_textElementType == TMP_TextElementType.Character) + continue; + } + } + else + { + m_textElementType = m_textInfo.characterInfo[m_characterCount].elementType; + m_currentMaterialIndex = m_textInfo.characterInfo[m_characterCount].materialReferenceIndex; + m_currentFontAsset = m_textInfo.characterInfo[m_characterCount].fontAsset; + } + #endregion End Parse Rich Text Tag + + int prev_MaterialIndex = m_currentMaterialIndex; + bool isUsingAltTypeface = m_textInfo.characterInfo[m_characterCount].isUsingAlternateTypeface; + + m_isParsingText = false; + + // When using Linked text, mark character as ignored and skip to next character. + if (m_characterCount < m_firstVisibleCharacter) + { + m_textInfo.characterInfo[m_characterCount].isVisible = false; + m_textInfo.characterInfo[m_characterCount].character = (char)0x200B; + m_characterCount += 1; + continue; + } + + // Handle Font Styles like LowerCase, UpperCase and SmallCaps. + #region Handling of LowerCase, UpperCase and SmallCaps Font Styles + + float smallCapsMultiplier = 1.0f; + + if (m_textElementType == TMP_TextElementType.Character) + { + if ((m_FontStyleInternal & FontStyles.UpperCase) == FontStyles.UpperCase) + { + // If this character is lowercase, switch to uppercase. + if (char.IsLower((char)charCode)) + charCode = char.ToUpper((char)charCode); + + } + else if ((m_FontStyleInternal & FontStyles.LowerCase) == FontStyles.LowerCase) + { + // If this character is uppercase, switch to lowercase. + if (char.IsUpper((char)charCode)) + charCode = char.ToLower((char)charCode); + } + else if ((m_FontStyleInternal & FontStyles.SmallCaps) == FontStyles.SmallCaps) + { + if (char.IsLower((char)charCode)) + { + smallCapsMultiplier = 0.8f; + charCode = char.ToUpper((char)charCode); + } + } + } + #endregion + + + // Look up Character Data from Dictionary and cache it. + #region Look up Character Data + if (m_textElementType == TMP_TextElementType.Sprite) + { + // If a sprite is used as a fallback then get a reference to it and set the color to white. + m_currentSpriteAsset = m_textInfo.characterInfo[m_characterCount].spriteAsset; + m_spriteIndex = m_textInfo.characterInfo[m_characterCount].spriteIndex; + + TMP_SpriteCharacter sprite = m_currentSpriteAsset.spriteCharacterTable[m_spriteIndex]; + if (sprite == null) continue; + + // Sprites are assigned in the E000 Private Area + sprite Index + if (charCode == 60) + charCode = 57344 + m_spriteIndex; + else + m_spriteColor = s_colorWhite; + + // The sprite scale calculations are based on the font asset assigned to the text object. + float spriteScale = (m_currentFontSize / m_currentFontAsset.faceInfo.pointSize * m_currentFontAsset.faceInfo.scale * (m_isOrthographic ? 1 : 0.1f)); + currentElementScale = m_currentFontAsset.faceInfo.ascentLine / sprite.glyph.metrics.height * sprite.scale * sprite.glyph.scale * spriteScale; + + m_cached_TextElement = sprite; + + m_textInfo.characterInfo[m_characterCount].elementType = TMP_TextElementType.Sprite; + m_textInfo.characterInfo[m_characterCount].scale = spriteScale; + m_textInfo.characterInfo[m_characterCount].spriteAsset = m_currentSpriteAsset; + m_textInfo.characterInfo[m_characterCount].fontAsset = m_currentFontAsset; + m_textInfo.characterInfo[m_characterCount].materialReferenceIndex = m_currentMaterialIndex; + + m_currentMaterialIndex = prev_MaterialIndex; + + padding = 0; + } + else if (m_textElementType == TMP_TextElementType.Character) + { + m_cached_TextElement = m_textInfo.characterInfo[m_characterCount].textElement; + if (m_cached_TextElement == null) continue; + + m_currentFontAsset = m_textInfo.characterInfo[m_characterCount].fontAsset; + m_currentMaterial = m_textInfo.characterInfo[m_characterCount].material; + m_currentMaterialIndex = m_textInfo.characterInfo[m_characterCount].materialReferenceIndex; + + // Re-calculate font scale as the font asset may have changed. + m_fontScale = m_currentFontSize * smallCapsMultiplier / m_currentFontAsset.faceInfo.pointSize * m_currentFontAsset.faceInfo.scale * (m_isOrthographic ? 1 : 0.1f); + + currentElementScale = m_fontScale * m_fontScaleMultiplier * m_cached_TextElement.scale * m_cached_TextElement.glyph.scale; + + m_textInfo.characterInfo[m_characterCount].elementType = TMP_TextElementType.Character; + m_textInfo.characterInfo[m_characterCount].scale = currentElementScale; + + padding = m_currentMaterialIndex == 0 ? m_padding : m_subTextObjects[m_currentMaterialIndex].padding; + } + #endregion + + + // Handle Soft Hyphen + #region Handle Soft Hyphen + float old_scale = currentElementScale; + if (charCode == 0xAD) + { + currentElementScale = 0; + } + #endregion + + + // Store some of the text object's information + m_textInfo.characterInfo[m_characterCount].character = (char)charCode; + m_textInfo.characterInfo[m_characterCount].pointSize = m_currentFontSize; + m_textInfo.characterInfo[m_characterCount].color = m_htmlColor; + m_textInfo.characterInfo[m_characterCount].underlineColor = m_underlineColor; + m_textInfo.characterInfo[m_characterCount].strikethroughColor = m_strikethroughColor; + m_textInfo.characterInfo[m_characterCount].highlightColor = m_highlightColor; + m_textInfo.characterInfo[m_characterCount].style = m_FontStyleInternal; + //m_textInfo.characterInfo[m_characterCount].index = m_TextParsingBuffer[i].stringIndex; + //m_textInfo.characterInfo[m_characterCount].isIgnoringAlignment = m_isIgnoringAlignment; + + + // Handle Kerning if Enabled. + #region Handle Kerning + TMP_GlyphValueRecord glyphAdjustments = new TMP_GlyphValueRecord(); + float characterSpacingAdjustment = m_characterSpacing; + if (m_enableKerning) + { + TMP_GlyphPairAdjustmentRecord adjustmentPair; + + if (m_characterCount < totalCharacterCount - 1) + { + uint firstGlyphIndex = m_cached_TextElement.glyphIndex; + uint secondGlyphIndex = m_textInfo.characterInfo[m_characterCount + 1].textElement.glyphIndex; + long key = new GlyphPairKey(firstGlyphIndex, secondGlyphIndex).key; + + if (m_currentFontAsset.fontFeatureTable.m_GlyphPairAdjustmentRecordLookupDictionary.TryGetValue(key, out adjustmentPair)) + { + glyphAdjustments = adjustmentPair.firstAdjustmentRecord.glyphValueRecord; + characterSpacingAdjustment = (adjustmentPair.featureLookupFlags & FontFeatureLookupFlags.IgnoreSpacingAdjustments) == FontFeatureLookupFlags.IgnoreSpacingAdjustments ? 0 : characterSpacingAdjustment; + } + } + + if (m_characterCount >= 1) + { + uint firstGlyphIndex = m_textInfo.characterInfo[m_characterCount - 1].textElement.glyphIndex; + uint secondGlyphIndex = m_cached_TextElement.glyphIndex; + long key = new GlyphPairKey(firstGlyphIndex, secondGlyphIndex).key; + + if (m_currentFontAsset.fontFeatureTable.m_GlyphPairAdjustmentRecordLookupDictionary.TryGetValue(key, out adjustmentPair)) + { + glyphAdjustments += adjustmentPair.secondAdjustmentRecord.glyphValueRecord; + characterSpacingAdjustment = (adjustmentPair.featureLookupFlags & FontFeatureLookupFlags.IgnoreSpacingAdjustments) == FontFeatureLookupFlags.IgnoreSpacingAdjustments ? 0 : characterSpacingAdjustment; + } + } + } + #endregion + + + // Initial Implementation for RTL support. + #region Handle Right-to-Left + if (m_isRightToLeft) + { + m_xAdvance -= ((m_cached_TextElement.glyph.metrics.horizontalAdvance * bold_xAdvance_multiplier + characterSpacingAdjustment + m_wordSpacing + m_currentFontAsset.normalSpacingOffset) * currentElementScale + m_cSpacing) * (1 - m_charWidthAdjDelta); + + if (char.IsWhiteSpace((char)charCode) || charCode == 0x200B) + m_xAdvance -= m_wordSpacing * currentElementScale; + } + #endregion + + + // Handle Mono Spacing + #region Handle Mono Spacing + float monoAdvance = 0; + if (m_monoSpacing != 0) + { + monoAdvance = (m_monoSpacing / 2 - (m_cached_TextElement.glyph.metrics.width / 2 + m_cached_TextElement.glyph.metrics.horizontalBearingX) * currentElementScale) * (1 - m_charWidthAdjDelta); + m_xAdvance += monoAdvance; + } + #endregion + + + // Set Padding based on selected font style + #region Handle Style Padding + if (m_textElementType == TMP_TextElementType.Character && !isUsingAltTypeface && (/*(m_fontStyle & FontStyles.Bold) == FontStyles.Bold ||*/ (m_FontStyleInternal & FontStyles.Bold) == FontStyles.Bold)) // Checks for any combination of Bold Style. + { + if (m_currentMaterial.HasProperty(ShaderUtilities.ID_GradientScale)) + { + float gradientScale = m_currentMaterial.GetFloat(ShaderUtilities.ID_GradientScale); + style_padding = m_currentFontAsset.boldStyle / 4.0f * gradientScale * m_currentMaterial.GetFloat(ShaderUtilities.ID_ScaleRatio_A); + + // Clamp overall padding to Gradient Scale size. + if (style_padding + padding > gradientScale) + padding = gradientScale - style_padding; + } + else + style_padding = 0; + + bold_xAdvance_multiplier = 1 + m_currentFontAsset.boldSpacing * 0.01f; + } + else + { + if (m_currentMaterial.HasProperty(ShaderUtilities.ID_GradientScale)) + { + float gradientScale = m_currentMaterial.GetFloat(ShaderUtilities.ID_GradientScale); + style_padding = m_currentFontAsset.normalStyle / 4.0f * gradientScale * m_currentMaterial.GetFloat(ShaderUtilities.ID_ScaleRatio_A); + + // Clamp overall padding to Gradient Scale size. + if (style_padding + padding > gradientScale) + padding = gradientScale - style_padding; + } + else + style_padding = 0; + + bold_xAdvance_multiplier = 1.0f; + } + #endregion Handle Style Padding + + + // Determine the position of the vertices of the Character or Sprite. + #region Calculate Vertices Position + float fontBaseLineOffset = m_currentFontAsset.faceInfo.baseline * m_fontScale * m_fontScaleMultiplier * m_currentFontAsset.faceInfo.scale; + Vector3 top_left; + top_left.x = m_xAdvance + ((m_cached_TextElement.glyph.metrics.horizontalBearingX - padding - style_padding + glyphAdjustments.xPlacement) * currentElementScale * (1 - m_charWidthAdjDelta)); + top_left.y = fontBaseLineOffset + (m_cached_TextElement.glyph.metrics.horizontalBearingY + padding + glyphAdjustments.yPlacement) * currentElementScale - m_lineOffset + m_baselineOffset; + top_left.z = 0; + + Vector3 bottom_left; + bottom_left.x = top_left.x; + bottom_left.y = top_left.y - ((m_cached_TextElement.glyph.metrics.height + padding * 2) * currentElementScale); + bottom_left.z = 0; + + Vector3 top_right; + top_right.x = bottom_left.x + ((m_cached_TextElement.glyph.metrics.width + padding * 2 + style_padding * 2) * currentElementScale * (1 - m_charWidthAdjDelta)); + top_right.y = top_left.y; + top_right.z = 0; + + Vector3 bottom_right; + bottom_right.x = top_right.x; + bottom_right.y = bottom_left.y; + bottom_right.z = 0; + #endregion + + + // Check if we need to Shear the rectangles for Italic styles + #region Handle Italic & Shearing + if (m_textElementType == TMP_TextElementType.Character && !isUsingAltTypeface && (/*(m_fontStyle & FontStyles.Italic) == FontStyles.Italic ||*/ (m_FontStyleInternal & FontStyles.Italic) == FontStyles.Italic)) + { + // Shift Top vertices forward by half (Shear Value * height of character) and Bottom vertices back by same amount. + float shear_value = m_currentFontAsset.italicStyle * 0.01f; + Vector3 topShear = new Vector3(shear_value * ((m_cached_TextElement.glyph.metrics.horizontalBearingY + padding + style_padding) * currentElementScale), 0, 0); + Vector3 bottomShear = new Vector3(shear_value * (((m_cached_TextElement.glyph.metrics.horizontalBearingY - m_cached_TextElement.glyph.metrics.height - padding - style_padding)) * currentElementScale), 0, 0); + + top_left = top_left + topShear; + bottom_left = bottom_left + bottomShear; + top_right = top_right + topShear; + bottom_right = bottom_right + bottomShear; + } + #endregion Handle Italics & Shearing + + + // Handle Character Rotation + #region Handle Character Rotation + if (m_isFXMatrixSet) + { + // Apply scale matrix when simulating Condensed text. + if (m_FXMatrix.lossyScale.x != 1) + { + //top_left = m_FXMatrix.MultiplyPoint3x4(top_left); + //bottom_left = m_FXMatrix.MultiplyPoint3x4(bottom_left); + //top_right = m_FXMatrix.MultiplyPoint3x4(top_right); + //bottom_right = m_FXMatrix.MultiplyPoint3x4(bottom_right); + } + + Vector3 positionOffset = (top_right + bottom_left) / 2; + + top_left = m_FXMatrix.MultiplyPoint3x4(top_left - positionOffset) + positionOffset; + bottom_left = m_FXMatrix.MultiplyPoint3x4(bottom_left - positionOffset) + positionOffset; + top_right = m_FXMatrix.MultiplyPoint3x4(top_right - positionOffset) + positionOffset; + bottom_right = m_FXMatrix.MultiplyPoint3x4(bottom_right - positionOffset) + positionOffset; + } + #endregion + + + // Store vertex information for the character or sprite. + m_textInfo.characterInfo[m_characterCount].bottomLeft = bottom_left; + m_textInfo.characterInfo[m_characterCount].topLeft = top_left; + m_textInfo.characterInfo[m_characterCount].topRight = top_right; + m_textInfo.characterInfo[m_characterCount].bottomRight = bottom_right; + + m_textInfo.characterInfo[m_characterCount].origin = m_xAdvance; + m_textInfo.characterInfo[m_characterCount].baseLine = fontBaseLineOffset - m_lineOffset + m_baselineOffset; + m_textInfo.characterInfo[m_characterCount].aspectRatio = (top_right.x - bottom_left.x) / (top_left.y - bottom_left.y); + + + // Compute and save text element Ascender and maximum line Ascender. + float elementAscender = m_currentFontAsset.faceInfo.ascentLine * (m_textElementType == TMP_TextElementType.Character ? currentElementScale / smallCapsMultiplier : m_textInfo.characterInfo[m_characterCount].scale) + m_baselineOffset; + m_textInfo.characterInfo[m_characterCount].ascender = elementAscender - m_lineOffset; + m_maxLineAscender = elementAscender > m_maxLineAscender ? elementAscender : m_maxLineAscender; + + // Compute and save text element Descender and maximum line Descender. + float elementDescender = m_currentFontAsset.faceInfo.descentLine * (m_textElementType == TMP_TextElementType.Character ? currentElementScale / smallCapsMultiplier : m_textInfo.characterInfo[m_characterCount].scale) + m_baselineOffset; + float elementDescenderII = m_textInfo.characterInfo[m_characterCount].descender = elementDescender - m_lineOffset; + m_maxLineDescender = elementDescender < m_maxLineDescender ? elementDescender : m_maxLineDescender; + + // Adjust maxLineAscender and maxLineDescender if style is superscript or subscript + if ((m_FontStyleInternal & FontStyles.Subscript) == FontStyles.Subscript || (m_FontStyleInternal & FontStyles.Superscript) == FontStyles.Superscript) + { + float baseAscender = (elementAscender - m_baselineOffset) / m_currentFontAsset.faceInfo.subscriptSize; + elementAscender = m_maxLineAscender; + m_maxLineAscender = baseAscender > m_maxLineAscender ? baseAscender : m_maxLineAscender; + + float baseDescender = (elementDescender - m_baselineOffset) / m_currentFontAsset.faceInfo.subscriptSize; + elementDescender = m_maxLineDescender; + m_maxLineDescender = baseDescender < m_maxLineDescender ? baseDescender : m_maxLineDescender; + } + + if (m_lineNumber == 0 || m_isNewPage) + { + m_maxAscender = m_maxAscender > elementAscender ? m_maxAscender : elementAscender; + m_maxCapHeight = Mathf.Max(m_maxCapHeight, m_currentFontAsset.faceInfo.capLine * currentElementScale / smallCapsMultiplier); + } + if (m_lineOffset == 0) pageAscender = pageAscender > elementAscender ? pageAscender : elementAscender; + + + // Set Characters to not visible by default. + m_textInfo.characterInfo[m_characterCount].isVisible = false; + + // Setup Mesh for visible text elements. ie. not a SPACE / LINEFEED / CARRIAGE RETURN. + #region Handle Visible Characters + if (charCode == 9 || charCode == 0xA0 || charCode == 0x2007 || (!char.IsWhiteSpace((char)charCode) && charCode != 0x200B) || m_textElementType == TMP_TextElementType.Sprite) + { + m_textInfo.characterInfo[m_characterCount].isVisible = true; + + #region Experimental Margin Shaper + //Vector2 shapedMargins; + //if (marginShaper) + //{ + // shapedMargins = m_marginShaper.GetShapedMargins(m_textInfo.characterInfo[m_characterCount].baseLine); + // if (shapedMargins.x < margins.x) + // { + // shapedMargins.x = m_marginLeft; + // } + // else + // { + // shapedMargins.x += m_marginLeft - margins.x; + // } + // if (shapedMargins.y < margins.z) + // { + // shapedMargins.y = m_marginRight; + // } + // else + // { + // shapedMargins.y += m_marginRight - margins.z; + // } + //} + //else + //{ + // shapedMargins.x = m_marginLeft; + // shapedMargins.y = m_marginRight; + //} + //width = marginWidth + 0.0001f - shapedMargins.x - shapedMargins.y; + //if (m_width != -1 && m_width < width) + //{ + // width = m_width; + //} + //m_textInfo.lineInfo[m_lineNumber].marginLeft = shapedMargins.x; + #endregion + + width = m_width != -1 ? Mathf.Min(marginWidth + 0.0001f - m_marginLeft - m_marginRight, m_width) : marginWidth + 0.0001f - m_marginLeft - m_marginRight; + m_textInfo.lineInfo[m_lineNumber].marginLeft = m_marginLeft; + + bool isJustifiedOrFlush = ((_HorizontalAlignmentOptions)m_lineJustification & _HorizontalAlignmentOptions.Flush) == _HorizontalAlignmentOptions.Flush || ((_HorizontalAlignmentOptions)m_lineJustification & _HorizontalAlignmentOptions.Justified) == _HorizontalAlignmentOptions.Justified; + + // Calculate the line breaking width of the text. + linebreakingWidth = Mathf.Abs(m_xAdvance) + (!m_isRightToLeft ? m_cached_TextElement.glyph.metrics.horizontalAdvance : 0) * (1 - m_charWidthAdjDelta) * (charCode != 0xAD ? currentElementScale : old_scale); + + // Check if Character exceeds the width of the Text Container + #region Handle Line Breaking, Text Auto-Sizing and Horizontal Overflow + if (linebreakingWidth > width * (isJustifiedOrFlush ? 1.05f : 1.0f)) + { + ellipsisIndex = m_characterCount - 1; // Last safely rendered character + + // Word Wrapping + #region Handle Word Wrapping + if (enableWordWrapping && m_characterCount != m_firstCharacterOfLine) + { + // Check if word wrapping is still possible + #region Line Breaking Check + if (wrappingIndex == m_SavedWordWrapState.previous_WordBreak || isFirstWord) + { + // Word wrapping is no longer possible. Shrink size of text if auto-sizing is enabled. + if (m_enableAutoSizing && m_fontSize > m_fontSizeMin) + { + // Handle Character Width Adjustments + #region Character Width Adjustments + if (m_charWidthAdjDelta < m_charWidthMaxAdj / 100) + { + loopCountA = 0; + m_charWidthAdjDelta += 0.01f; + GenerateTextMesh(); + return; + } + #endregion + + // Adjust Point Size + m_maxFontSize = m_fontSize; + + m_fontSize -= Mathf.Max((m_fontSize - m_minFontSize) / 2, 0.05f); + m_fontSize = (int)(Mathf.Max(m_fontSize, m_fontSizeMin) * 20 + 0.5f) / 20f; + + if (loopCountA > 20) return; // Added to debug + GenerateTextMesh(); + return; + } + + // Word wrapping is no longer possible, now breaking up individual words. + if (m_isCharacterWrappingEnabled == false) + { + if (ignoreNonBreakingSpace == false) + ignoreNonBreakingSpace = true; + else + m_isCharacterWrappingEnabled = true; + } + else + isLastBreakingChar = true; + + //m_recursiveCount += 1; + //if (m_recursiveCount > 20) + //{ + // Debug.Log("Recursive count exceeded!"); + // continue; + //} + } + #endregion + + // Restore to previously stored state of last valid (space character or linefeed) + i = RestoreWordWrappingState(ref m_SavedWordWrapState); + wrappingIndex = i; // Used to detect when line length can no longer be reduced. + + // Handling for Soft Hyphen + if (m_TextParsingBuffer[i].unicode == 0xAD) // && !m_isCharacterWrappingEnabled) // && ellipsisIndex != i && !m_isCharacterWrappingEnabled) + { + m_isTextTruncated = true; + m_TextParsingBuffer[i].unicode = 0x2D; + GenerateTextMesh(); + return; + } + + //Debug.Log("Last Visible Character of line # " + m_lineNumber + " is [" + m_textInfo.characterInfo[m_lastVisibleCharacterOfLine].character + " Character Count: " + m_characterCount + " Last visible: " + m_lastVisibleCharacterOfLine); + + // Check if Line Spacing of previous line needs to be adjusted. + if (m_lineNumber > 0 && !TMP_Math.Approximately(m_maxLineAscender, m_startOfLineAscender) && m_lineHeight == TMP_Math.FLOAT_UNSET && !m_isNewPage) + { + //Debug.Log("(Line Break - Adjusting Line Spacing on line #" + m_lineNumber); + float offsetDelta = m_maxLineAscender - m_startOfLineAscender; + AdjustLineOffset(m_firstCharacterOfLine, m_characterCount, offsetDelta); + m_lineOffset += offsetDelta; + m_SavedWordWrapState.lineOffset = m_lineOffset; + m_SavedWordWrapState.previousLineAscender = m_maxLineAscender; + + // TODO - Add check for character exceeding vertical bounds + } + m_isNewPage = false; + + // Calculate lineAscender & make sure if last character is superscript or subscript that we check that as well. + float lineAscender = m_maxLineAscender - m_lineOffset; + float lineDescender = m_maxLineDescender - m_lineOffset; + + + // Update maxDescender and maxVisibleDescender + m_maxDescender = m_maxDescender < lineDescender ? m_maxDescender : lineDescender; + if (!isMaxVisibleDescenderSet) + maxVisibleDescender = m_maxDescender; + + if (m_useMaxVisibleDescender && (m_characterCount >= m_maxVisibleCharacters || m_lineNumber >= m_maxVisibleLines)) + isMaxVisibleDescenderSet = true; + + // Track & Store lineInfo for the new line + m_textInfo.lineInfo[m_lineNumber].firstCharacterIndex = m_firstCharacterOfLine; + m_textInfo.lineInfo[m_lineNumber].firstVisibleCharacterIndex = m_firstVisibleCharacterOfLine = m_firstCharacterOfLine > m_firstVisibleCharacterOfLine ? m_firstCharacterOfLine : m_firstVisibleCharacterOfLine; + m_textInfo.lineInfo[m_lineNumber].lastCharacterIndex = m_lastCharacterOfLine = m_characterCount - 1 > 0 ? m_characterCount - 1 : 0; + m_textInfo.lineInfo[m_lineNumber].lastVisibleCharacterIndex = m_lastVisibleCharacterOfLine = m_lastVisibleCharacterOfLine < m_firstVisibleCharacterOfLine ? m_firstVisibleCharacterOfLine : m_lastVisibleCharacterOfLine; + + m_textInfo.lineInfo[m_lineNumber].characterCount = m_textInfo.lineInfo[m_lineNumber].lastCharacterIndex - m_textInfo.lineInfo[m_lineNumber].firstCharacterIndex + 1; + m_textInfo.lineInfo[m_lineNumber].visibleCharacterCount = m_lineVisibleCharacterCount; + m_textInfo.lineInfo[m_lineNumber].lineExtents.min = new Vector2(m_textInfo.characterInfo[m_firstVisibleCharacterOfLine].bottomLeft.x, lineDescender); + m_textInfo.lineInfo[m_lineNumber].lineExtents.max = new Vector2(m_textInfo.characterInfo[m_lastVisibleCharacterOfLine].topRight.x, lineAscender); + m_textInfo.lineInfo[m_lineNumber].length = m_textInfo.lineInfo[m_lineNumber].lineExtents.max.x; + m_textInfo.lineInfo[m_lineNumber].width = width; + + //m_textInfo.lineInfo[m_lineNumber].alignment = m_lineJustification; + + m_textInfo.lineInfo[m_lineNumber].maxAdvance = m_textInfo.characterInfo[m_lastVisibleCharacterOfLine].xAdvance - (characterSpacingAdjustment + m_currentFontAsset.normalSpacingOffset) * currentElementScale - m_cSpacing; + + m_textInfo.lineInfo[m_lineNumber].baseline = 0 - m_lineOffset; + m_textInfo.lineInfo[m_lineNumber].ascender = lineAscender; + m_textInfo.lineInfo[m_lineNumber].descender = lineDescender; + m_textInfo.lineInfo[m_lineNumber].lineHeight = lineAscender - lineDescender + lineGap * baseScale; + + m_firstCharacterOfLine = m_characterCount; // Store first character of the next line. + m_lineVisibleCharacterCount = 0; + + // Store the state of the line before starting on the new line. + SaveWordWrappingState(ref m_SavedLineState, i, m_characterCount - 1); + + m_lineNumber += 1; + isStartOfNewLine = true; + isFirstWord = true; + + // Check to make sure Array is large enough to hold a new line. + if (m_lineNumber >= m_textInfo.lineInfo.Length) + ResizeLineExtents(m_lineNumber); + + // Apply Line Spacing based on scale of the last character of the line. + if (m_lineHeight == TMP_Math.FLOAT_UNSET) + { + float ascender = m_textInfo.characterInfo[m_characterCount].ascender - m_textInfo.characterInfo[m_characterCount].baseLine; + lineOffsetDelta = 0 - m_maxLineDescender + ascender + (lineGap + m_lineSpacing + m_lineSpacingDelta) * baseScale; + m_lineOffset += lineOffsetDelta; + + m_startOfLineAscender = ascender; + } + else + m_lineOffset += m_lineHeight + m_lineSpacing * baseScale; + + m_maxLineAscender = k_LargeNegativeFloat; + m_maxLineDescender = k_LargePositiveFloat; + + m_xAdvance = 0 + tag_Indent; + + continue; + } + #endregion End Word Wrapping + + + // Text Auto-Sizing (text exceeding Width of container. + #region Handle Text Auto-Sizing + if (m_enableAutoSizing && m_fontSize > m_fontSizeMin) + { + // Handle Character Width Adjustments + #region Character Width Adjustments + if (m_charWidthAdjDelta < m_charWidthMaxAdj / 100) + { + loopCountA = 0; + m_charWidthAdjDelta += 0.01f; + GenerateTextMesh(); + return; + } + #endregion + + // Adjust Point Size + m_maxFontSize = m_fontSize; + + m_fontSize -= Mathf.Max((m_fontSize - m_minFontSize) / 2, 0.05f); + m_fontSize = (int)(Mathf.Max(m_fontSize, m_fontSizeMin) * 20 + 0.5f) / 20f; + + //m_recursiveCount = 0; + if (loopCountA > 20) return; // Added to debug + GenerateTextMesh(); + return; + } + #endregion End Text Auto-Sizing + + + // Handle Text Overflow + #region Handle Text Overflow + switch (m_overflowMode) + { + case TextOverflowModes.Overflow: + if (m_isMaskingEnabled) + DisableMasking(); + + break; + case TextOverflowModes.Ellipsis: + if (m_isMaskingEnabled) + DisableMasking(); + + m_isTextTruncated = true; + + if (m_characterCount < 1) + { + m_textInfo.characterInfo[m_characterCount].isVisible = false; + //m_visibleCharacterCount = 0; + break; + } + + m_TextParsingBuffer[i - 1].unicode = 8230; + m_TextParsingBuffer[i].unicode = (char)0; + + if (m_cached_Ellipsis_Character != null) + { + m_textInfo.characterInfo[ellipsisIndex].character = (char)8230; + m_textInfo.characterInfo[ellipsisIndex].textElement = m_cached_Ellipsis_Character; + m_textInfo.characterInfo[ellipsisIndex].fontAsset = m_materialReferences[0].fontAsset; + m_textInfo.characterInfo[ellipsisIndex].material = m_materialReferences[0].material; + m_textInfo.characterInfo[ellipsisIndex].materialReferenceIndex = 0; + } + else + { + Debug.LogWarning("Unable to use Ellipsis character since it wasn't found in the current Font Asset [" + m_fontAsset.name + "]. Consider regenerating this font asset to include the Ellipsis character (u+2026).\nNote: Warnings can be disabled in the TMP Settings file.", this); + } + + m_totalCharacterCount = ellipsisIndex + 1; + + GenerateTextMesh(); + return; + //case TextOverflowModes.Masking: + // if (!m_isMaskingEnabled) + // EnableMasking(); + // break; + //case TextOverflowModes.ScrollRect: + // if (!m_isMaskingEnabled) + // EnableMasking(); + // break; + case TextOverflowModes.Truncate: + if (m_isMaskingEnabled) + DisableMasking(); + + m_textInfo.characterInfo[m_characterCount].isVisible = false; + break; + case TextOverflowModes.Linked: + //m_textInfo.characterInfo[m_characterCount].isVisible = false; + + //if (m_linkedTextComponent != null) + //{ + // m_linkedTextComponent.text = text; + // m_linkedTextComponent.firstVisibleCharacter = m_characterCount; + // m_linkedTextComponent.ForceMeshUpdate(); + //} + break; + } + #endregion End Text Overflow + + } + #endregion End Check for Characters Exceeding Width of Text Container + + + // Special handling of characters that are not ignored at the end of a line. + if (charCode == 9 || charCode == 0xA0 || charCode == 0x2007) + { + m_textInfo.characterInfo[m_characterCount].isVisible = false; + m_lastVisibleCharacterOfLine = m_characterCount; + m_textInfo.lineInfo[m_lineNumber].spaceCount += 1; + m_textInfo.spaceCount += 1; + + if (charCode == 0xA0) + m_textInfo.lineInfo[m_lineNumber].controlCharacterCount += 1; + } + else + { + // Determine Vertex Color + if (m_overrideHtmlColors) + vertexColor = m_fontColor32; + else + vertexColor = m_htmlColor; + + // Store Character & Sprite Vertex Information + if (m_textElementType == TMP_TextElementType.Character) + { + // Save Character Vertex Data + SaveGlyphVertexInfo(padding, style_padding, vertexColor); + } + else if (m_textElementType == TMP_TextElementType.Sprite) + { + SaveSpriteVertexInfo(vertexColor); + } + } + + + // Increase visible count for Characters. + if (m_textInfo.characterInfo[m_characterCount].isVisible && charCode != 0xAD) + { + if (isStartOfNewLine) { isStartOfNewLine = false; m_firstVisibleCharacterOfLine = m_characterCount; } + + m_lineVisibleCharacterCount += 1; + m_lastVisibleCharacterOfLine = m_characterCount; + } + } + else + { // This is a Space, Tab, LineFeed or Carriage Return + + // Track # of spaces per line which is used for line justification. + if ((charCode == 10 || char.IsSeparator((char)charCode)) && charCode != 0xAD && charCode != 0x200B && charCode != 0x2060) + { + m_textInfo.lineInfo[m_lineNumber].spaceCount += 1; + m_textInfo.spaceCount += 1; + } + } + #endregion Handle Visible Characters + + + // Check if Line Spacing of previous line needs to be adjusted. + #region Adjust Line Spacing + if (m_lineNumber > 0 && !TMP_Math.Approximately(m_maxLineAscender, m_startOfLineAscender) && m_lineHeight == TMP_Math.FLOAT_UNSET && !m_isNewPage) + { + //Debug.Log("Inline - Adjusting Line Spacing on line #" + m_lineNumber); + //float gap = 0; // Compute gap. + + float offsetDelta = m_maxLineAscender - m_startOfLineAscender; + AdjustLineOffset(m_firstCharacterOfLine, m_characterCount, offsetDelta); + elementDescenderII -= offsetDelta; + m_lineOffset += offsetDelta; + + m_startOfLineAscender += offsetDelta; + m_SavedWordWrapState.lineOffset = m_lineOffset; + m_SavedWordWrapState.previousLineAscender = m_startOfLineAscender; + } + #endregion + + + // Store Rectangle positions for each Character. + #region Store Character Data + m_textInfo.characterInfo[m_characterCount].lineNumber = m_lineNumber; + m_textInfo.characterInfo[m_characterCount].pageNumber = m_pageNumber; + + if (charCode != 10 && charCode != 13 && charCode != 8230 || m_textInfo.lineInfo[m_lineNumber].characterCount == 1) + m_textInfo.lineInfo[m_lineNumber].alignment = m_lineJustification; + #endregion Store Character Data + + + // Check if text Exceeds the vertical bounds of the margin area. + #region Check Vertical Bounds & Auto-Sizing + if (m_maxAscender - elementDescenderII > marginHeight + 0.0001f) + { + // Handle Line spacing adjustments + #region Line Spacing Adjustments + if (m_enableAutoSizing && m_lineSpacingDelta > m_lineSpacingMax && m_lineNumber > 0) + { + loopCountA = 0; + + m_lineSpacingDelta -= 1; + GenerateTextMesh(); + return; + } + #endregion + + + // Handle Text Auto-sizing resulting from text exceeding vertical bounds. + #region Text Auto-Sizing (Text greater than vertical bounds) + if (m_enableAutoSizing && m_fontSize > m_fontSizeMin) + { + m_maxFontSize = m_fontSize; + + m_fontSize -= Mathf.Max((m_fontSize - m_minFontSize) / 2, 0.05f); + m_fontSize = (int)(Mathf.Max(m_fontSize, m_fontSizeMin) * 20 + 0.5f) / 20f; + + //m_recursiveCount = 0; + if (loopCountA > 20) return; // Added to debug + GenerateTextMesh(); + return; + } + #endregion Text Auto-Sizing + + // Set isTextOverflowing and firstOverflowCharacterIndex + if (m_firstOverflowCharacterIndex == -1) + m_firstOverflowCharacterIndex = m_characterCount; + + // Handle Text Overflow + #region Text Overflow + switch (m_overflowMode) + { + case TextOverflowModes.Overflow: + if (m_isMaskingEnabled) + DisableMasking(); + + break; + case TextOverflowModes.Ellipsis: + if (m_isMaskingEnabled) + DisableMasking(); + + if (m_lineNumber > 0) + { + m_TextParsingBuffer[m_textInfo.characterInfo[ellipsisIndex].index].unicode = 8230; + m_TextParsingBuffer[m_textInfo.characterInfo[ellipsisIndex].index + 1].unicode = (char)0; + + if (m_cached_Ellipsis_Character != null) + { + m_textInfo.characterInfo[ellipsisIndex].character = (char)8230; + m_textInfo.characterInfo[ellipsisIndex].textElement = m_cached_Ellipsis_Character; + m_textInfo.characterInfo[ellipsisIndex].fontAsset = m_materialReferences[0].fontAsset; + m_textInfo.characterInfo[ellipsisIndex].material = m_materialReferences[0].material; + m_textInfo.characterInfo[ellipsisIndex].materialReferenceIndex = 0; + } + else + { + Debug.LogWarning("Unable to use Ellipsis character since it wasn't found in the current Font Asset [" + m_fontAsset.name + "]. Consider regenerating this font asset to include the Ellipsis character (u+2026).\nNote: Warnings can be disabled in the TMP Settings file.", this); + } + + m_totalCharacterCount = ellipsisIndex + 1; + + GenerateTextMesh(); + m_isTextTruncated = true; + return; + } + else + { + ClearMesh(false); + return; + } + //case TextOverflowModes.Masking: + // if (!m_isMaskingEnabled) + // EnableMasking(); + // break; + //case TextOverflowModes.ScrollRect: + // if (!m_isMaskingEnabled) + // EnableMasking(); + // break; + case TextOverflowModes.Truncate: + if (m_isMaskingEnabled) + DisableMasking(); + + // TODO : Optimize + if (m_lineNumber > 0) + { + m_TextParsingBuffer[m_textInfo.characterInfo[ellipsisIndex].index + 1].unicode = (char)0; + + m_totalCharacterCount = ellipsisIndex + 1; + + GenerateTextMesh(); + m_isTextTruncated = true; + return; + } + else + { + ClearMesh(false); + return; + } + case TextOverflowModes.Page: + if (m_isMaskingEnabled) + DisableMasking(); + + // Ignore Page Break, Linefeed or carriage return + if (charCode == 13 || charCode == 10) + break; + + // Return if the first character doesn't fit. + if (i == 0) + { + ClearMesh(); + return; + } + else if (previousPageOverflowChar == i) + { + m_TextParsingBuffer[i].unicode = 0; + m_isTextTruncated = true; + } + + previousPageOverflowChar = i; + + // Go back to previous line and re-layout + i = RestoreWordWrappingState(ref m_SavedLineState); + + m_isNewPage = true; + m_xAdvance = 0 + tag_Indent; + m_lineOffset = 0; + m_maxAscender = 0; + pageAscender = 0; + m_lineNumber += 1; + m_pageNumber += 1; + continue; + case TextOverflowModes.Linked: + if (m_linkedTextComponent != null) + { + m_linkedTextComponent.text = text; + m_linkedTextComponent.firstVisibleCharacter = m_characterCount; + m_linkedTextComponent.ForceMeshUpdate(); + } + + // Truncate remaining text + if (m_lineNumber > 0) + { + m_TextParsingBuffer[i].unicode = (char)0; + + m_totalCharacterCount = m_characterCount; + + // TODO : Optimize as we should be able to end the layout phase here without having to do another pass. + GenerateTextMesh(); + m_isTextTruncated = true; + return; + } + else + { + ClearMesh(true); + return; + } + } + #endregion End Text Overflow + + } + #endregion Check Vertical Bounds + + + // Handle xAdvance & Tabulation Stops. Tab stops at every 25% of Font Size. + #region XAdvance, Tabulation & Stops + if (charCode == 9) + { + float tabSize = m_currentFontAsset.faceInfo.tabWidth * m_currentFontAsset.tabSize * currentElementScale; + float tabs = Mathf.Ceil(m_xAdvance / tabSize) * tabSize; + m_xAdvance = tabs > m_xAdvance ? tabs : m_xAdvance + tabSize; + } + else if (m_monoSpacing != 0) + { + m_xAdvance += (m_monoSpacing - monoAdvance + ((characterSpacingAdjustment + m_currentFontAsset.normalSpacingOffset) * currentElementScale) + m_cSpacing) * (1 - m_charWidthAdjDelta); + + if (char.IsWhiteSpace((char)charCode) || charCode == 0x200B) + m_xAdvance += m_wordSpacing * currentElementScale; + } + else if (!m_isRightToLeft) + { + float scaleFXMultiplier = 1; + if (m_isFXMatrixSet) scaleFXMultiplier = m_FXMatrix.lossyScale.x; + + m_xAdvance += ((m_cached_TextElement.glyph.metrics.horizontalAdvance * scaleFXMultiplier * bold_xAdvance_multiplier + characterSpacingAdjustment + m_currentFontAsset.normalSpacingOffset + glyphAdjustments.xAdvance) * currentElementScale + m_cSpacing) * (1 - m_charWidthAdjDelta); + + if (char.IsWhiteSpace((char)charCode) || charCode == 0x200B) + m_xAdvance += m_wordSpacing * currentElementScale; + } + else + { + m_xAdvance -= glyphAdjustments.xAdvance * currentElementScale; + } + + + // Store xAdvance information + m_textInfo.characterInfo[m_characterCount].xAdvance = m_xAdvance; + + #endregion Tabulation & Stops + + + // Handle Carriage Return + #region Carriage Return + if (charCode == 13) + { + m_xAdvance = 0 + tag_Indent; + } + #endregion Carriage Return + + + // Handle Line Spacing Adjustments + Word Wrapping & special case for last line. + #region Check for Line Feed and Last Character + if (charCode == 10 || m_characterCount == totalCharacterCount - 1) + { + // Check if Line Spacing of previous line needs to be adjusted. + if (m_lineNumber > 0 && !TMP_Math.Approximately(m_maxLineAscender, m_startOfLineAscender) && m_lineHeight == TMP_Math.FLOAT_UNSET && !m_isNewPage) + { + //Debug.Log("Line Feed - Adjusting Line Spacing on line #" + m_lineNumber); + float offsetDelta = m_maxLineAscender - m_startOfLineAscender; + AdjustLineOffset(m_firstCharacterOfLine, m_characterCount, offsetDelta); + elementDescenderII -= offsetDelta; + m_lineOffset += offsetDelta; + } + m_isNewPage = false; + + // Calculate lineAscender & make sure if last character is superscript or subscript that we check that as well. + float lineAscender = m_maxLineAscender - m_lineOffset; + float lineDescender = m_maxLineDescender - m_lineOffset; + + // Update maxDescender and maxVisibleDescender + m_maxDescender = m_maxDescender < lineDescender ? m_maxDescender : lineDescender; + if (!isMaxVisibleDescenderSet) + maxVisibleDescender = m_maxDescender; + + if (m_useMaxVisibleDescender && (m_characterCount >= m_maxVisibleCharacters || m_lineNumber >= m_maxVisibleLines)) + isMaxVisibleDescenderSet = true; + + // Save Line Information + m_textInfo.lineInfo[m_lineNumber].firstCharacterIndex = m_firstCharacterOfLine; + m_textInfo.lineInfo[m_lineNumber].firstVisibleCharacterIndex = m_firstVisibleCharacterOfLine = m_firstCharacterOfLine > m_firstVisibleCharacterOfLine ? m_firstCharacterOfLine : m_firstVisibleCharacterOfLine; + m_textInfo.lineInfo[m_lineNumber].lastCharacterIndex = m_lastCharacterOfLine = m_characterCount; + m_textInfo.lineInfo[m_lineNumber].lastVisibleCharacterIndex = m_lastVisibleCharacterOfLine = m_lastVisibleCharacterOfLine < m_firstVisibleCharacterOfLine ? m_firstVisibleCharacterOfLine : m_lastVisibleCharacterOfLine; + + m_textInfo.lineInfo[m_lineNumber].characterCount = m_textInfo.lineInfo[m_lineNumber].lastCharacterIndex - m_textInfo.lineInfo[m_lineNumber].firstCharacterIndex + 1; + m_textInfo.lineInfo[m_lineNumber].visibleCharacterCount = m_lineVisibleCharacterCount; + m_textInfo.lineInfo[m_lineNumber].lineExtents.min = new Vector2(m_textInfo.characterInfo[m_firstVisibleCharacterOfLine].bottomLeft.x, lineDescender); + m_textInfo.lineInfo[m_lineNumber].lineExtents.max = new Vector2(m_textInfo.characterInfo[m_lastVisibleCharacterOfLine].topRight.x, lineAscender); + m_textInfo.lineInfo[m_lineNumber].length = m_textInfo.lineInfo[m_lineNumber].lineExtents.max.x - (padding * currentElementScale); + m_textInfo.lineInfo[m_lineNumber].width = width; + + if (m_textInfo.lineInfo[m_lineNumber].characterCount == 1) + m_textInfo.lineInfo[m_lineNumber].alignment = m_lineJustification; + + if (m_textInfo.characterInfo[m_lastVisibleCharacterOfLine].isVisible) + m_textInfo.lineInfo[m_lineNumber].maxAdvance = m_textInfo.characterInfo[m_lastVisibleCharacterOfLine].xAdvance - (characterSpacingAdjustment + m_currentFontAsset.normalSpacingOffset) * currentElementScale - m_cSpacing; + else + m_textInfo.lineInfo[m_lineNumber].maxAdvance = m_textInfo.characterInfo[m_lastCharacterOfLine].xAdvance - (characterSpacingAdjustment + m_currentFontAsset.normalSpacingOffset) * currentElementScale - m_cSpacing; + + m_textInfo.lineInfo[m_lineNumber].baseline = 0 - m_lineOffset; + m_textInfo.lineInfo[m_lineNumber].ascender = lineAscender; + m_textInfo.lineInfo[m_lineNumber].descender = lineDescender; + m_textInfo.lineInfo[m_lineNumber].lineHeight = lineAscender - lineDescender + lineGap * baseScale; + + m_firstCharacterOfLine = m_characterCount + 1; + m_lineVisibleCharacterCount = 0; + + // Add new line if not last line or character. + if (charCode == 10) + { + // Store the state of the line before starting on the new line. + SaveWordWrappingState(ref m_SavedLineState, i, m_characterCount); + // Store the state of the last Character before the new line. + SaveWordWrappingState(ref m_SavedWordWrapState, i, m_characterCount); + + m_lineNumber += 1; + isStartOfNewLine = true; + ignoreNonBreakingSpace = false; + isFirstWord = true; + + // Check to make sure Array is large enough to hold a new line. + if (m_lineNumber >= m_textInfo.lineInfo.Length) + ResizeLineExtents(m_lineNumber); + + // Apply Line Spacing + if (m_lineHeight == TMP_Math.FLOAT_UNSET) + { + lineOffsetDelta = 0 - m_maxLineDescender + elementAscender + (lineGap + m_lineSpacing + m_paragraphSpacing + m_lineSpacingDelta) * baseScale; + m_lineOffset += lineOffsetDelta; + } + else + m_lineOffset += m_lineHeight + (m_lineSpacing + m_paragraphSpacing) * baseScale; + + m_maxLineAscender = k_LargeNegativeFloat; + m_maxLineDescender = k_LargePositiveFloat; + m_startOfLineAscender = elementAscender; + + m_xAdvance = 0 + tag_LineIndent + tag_Indent; + + ellipsisIndex = m_characterCount - 1; + + m_characterCount += 1; + continue; + } + } + #endregion Check for Linefeed or Last Character + + + // Store Rectangle positions for each Character. + #region Save CharacterInfo for the current character. + // Determine the bounds of the Mesh. + if (m_textInfo.characterInfo[m_characterCount].isVisible) + { + m_meshExtents.min.x = Mathf.Min(m_meshExtents.min.x, m_textInfo.characterInfo[m_characterCount].bottomLeft.x); + m_meshExtents.min.y = Mathf.Min(m_meshExtents.min.y, m_textInfo.characterInfo[m_characterCount].bottomLeft.y); + + m_meshExtents.max.x = Mathf.Max(m_meshExtents.max.x, m_textInfo.characterInfo[m_characterCount].topRight.x); + m_meshExtents.max.y = Mathf.Max(m_meshExtents.max.y, m_textInfo.characterInfo[m_characterCount].topRight.y); + + //m_meshExtents.min = new Vector2(Mathf.Min(m_meshExtents.min.x, m_textInfo.characterInfo[m_characterCount].bottomLeft.x), Mathf.Min(m_meshExtents.min.y, m_textInfo.characterInfo[m_characterCount].bottomLeft.y)); + //m_meshExtents.max = new Vector2(Mathf.Max(m_meshExtents.max.x, m_textInfo.characterInfo[m_characterCount].topRight.x), Mathf.Max(m_meshExtents.max.y, m_textInfo.characterInfo[m_characterCount].topRight.y)); + } + + + // Save pageInfo Data + if (m_overflowMode == TextOverflowModes.Page && charCode != 13 && charCode != 10) // && m_pageNumber < 16) + { + // Check if we need to increase allocations for the pageInfo array. + if (m_pageNumber + 1 > m_textInfo.pageInfo.Length) + TMP_TextInfo.Resize(ref m_textInfo.pageInfo, m_pageNumber + 1, true); + + m_textInfo.pageInfo[m_pageNumber].ascender = pageAscender; + m_textInfo.pageInfo[m_pageNumber].descender = elementDescender < m_textInfo.pageInfo[m_pageNumber].descender ? elementDescender : m_textInfo.pageInfo[m_pageNumber].descender; + + if (m_pageNumber == 0 && m_characterCount == 0) + m_textInfo.pageInfo[m_pageNumber].firstCharacterIndex = m_characterCount; + else if (m_characterCount > 0 && m_pageNumber != m_textInfo.characterInfo[m_characterCount - 1].pageNumber) + { + m_textInfo.pageInfo[m_pageNumber - 1].lastCharacterIndex = m_characterCount - 1; + m_textInfo.pageInfo[m_pageNumber].firstCharacterIndex = m_characterCount; + } + else if (m_characterCount == totalCharacterCount - 1) + m_textInfo.pageInfo[m_pageNumber].lastCharacterIndex = m_characterCount; + } + #endregion Saving CharacterInfo + + + // Save State of Mesh Creation for handling of Word Wrapping + #region Save Word Wrapping State + if (m_enableWordWrapping || m_overflowMode == TextOverflowModes.Truncate || m_overflowMode == TextOverflowModes.Ellipsis) + { + if ((char.IsWhiteSpace((char)charCode) || charCode == 0x200B || charCode == 0x2D || charCode == 0xAD) && (!m_isNonBreakingSpace || ignoreNonBreakingSpace) && charCode != 0xA0 && charCode != 0x2007 && charCode != 0x2011 && charCode != 0x202F && charCode != 0x2060) + { + // We store the state of numerous variables for the most recent Space, LineFeed or Carriage Return to enable them to be restored + // for Word Wrapping. + SaveWordWrappingState(ref m_SavedWordWrapState, i, m_characterCount); + m_isCharacterWrappingEnabled = false; + isFirstWord = false; + } + // Handling for East Asian languages + else if (( charCode > 0x1100 && charCode < 0x11ff || /* Hangul Jamo */ + charCode > 0x2E80 && charCode < 0x9FFF || /* CJK */ + charCode > 0xA960 && charCode < 0xA97F || /* Hangul Jame Extended-A */ + charCode > 0xAC00 && charCode < 0xD7FF || /* Hangul Syllables */ + charCode > 0xF900 && charCode < 0xFAFF || /* CJK Compatibility Ideographs */ + charCode > 0xFE30 && charCode < 0xFE4F || /* CJK Compatibility Forms */ + charCode > 0xFF00 && charCode < 0xFFEF) /* CJK Halfwidth */ + && !m_isNonBreakingSpace) + { + if (isFirstWord || isLastBreakingChar || TMP_Settings.linebreakingRules.leadingCharacters.ContainsKey(charCode) == false && + (m_characterCount < totalCharacterCount - 1 && + TMP_Settings.linebreakingRules.followingCharacters.ContainsKey(m_textInfo.characterInfo[m_characterCount + 1].character) == false)) + { + SaveWordWrappingState(ref m_SavedWordWrapState, i, m_characterCount); + m_isCharacterWrappingEnabled = false; + isFirstWord = false; + } + } + else if ((isFirstWord || m_isCharacterWrappingEnabled == true || isLastBreakingChar)) + SaveWordWrappingState(ref m_SavedWordWrapState, i, m_characterCount); + } + #endregion Save Word Wrapping State + + m_characterCount += 1; + } + + // Check Auto Sizing and increase font size to fill text container. + #region Check Auto-Sizing (Upper Font Size Bounds) + fontSizeDelta = m_maxFontSize - m_minFontSize; + if (!m_isCharacterWrappingEnabled && m_enableAutoSizing && fontSizeDelta > 0.051f && m_fontSize < m_fontSizeMax) + { + m_minFontSize = m_fontSize; + m_fontSize += Mathf.Max((m_maxFontSize - m_fontSize) / 2, 0.05f); + m_fontSize = (int)(Mathf.Min(m_fontSize, m_fontSizeMax) * 20 + 0.5f) / 20f; + + //Debug.Log(m_fontSize); + + if (loopCountA > 20) return; // Added to debug + GenerateTextMesh(); + return; + } + #endregion End Auto-sizing Check + + + m_isCharacterWrappingEnabled = false; + + + //Debug.Log("Iteration Count: " + loopCountA + ". Final Point Size: " + m_fontSize); // + " B: " + loopCountB + " C: " + loopCountC + " D: " + loopCountD); + + + + // If there are no visible characters... no need to continue + if (m_characterCount == 0) // && m_visibleSpriteCount == 0) + { + ClearMesh(true); + + // Event indicating the text has been regenerated. + TMPro_EventManager.ON_TEXT_CHANGED(this); + return; + } + + + // *** PHASE II of Text Generation *** + int last_vert_index = m_materialReferences[0].referenceCount * (!m_isVolumetricText ? 4 : 8); + + // Partial clear of the vertices array to mark unused vertices as degenerate. + m_textInfo.meshInfo[0].Clear(false); + + // Handle Text Alignment + #region Text Vertical Alignment + Vector3 anchorOffset = Vector3.zero; + Vector3[] corners = m_RectTransformCorners; // GetTextContainerLocalCorners(); + + // Handle Vertical Text Alignment + switch (m_textAlignment) + { + // Top Vertically + case TextAlignmentOptions.Top: + case TextAlignmentOptions.TopLeft: + case TextAlignmentOptions.TopRight: + case TextAlignmentOptions.TopJustified: + case TextAlignmentOptions.TopFlush: + case TextAlignmentOptions.TopGeoAligned: + if (m_overflowMode != TextOverflowModes.Page) + anchorOffset = corners[1] + new Vector3(0 + margins.x, 0 - m_maxAscender - margins.y, 0); + else + anchorOffset = corners[1] + new Vector3(0 + margins.x, 0 - m_textInfo.pageInfo[pageToDisplay].ascender - margins.y, 0); + break; + + // Middle Vertically + case TextAlignmentOptions.Left: + case TextAlignmentOptions.Right: + case TextAlignmentOptions.Center: + case TextAlignmentOptions.Justified: + case TextAlignmentOptions.Flush: + case TextAlignmentOptions.CenterGeoAligned: + if (m_overflowMode != TextOverflowModes.Page) + anchorOffset = (corners[0] + corners[1]) / 2 + new Vector3(0 + margins.x, 0 - (m_maxAscender + margins.y + maxVisibleDescender - margins.w) / 2, 0); + else + anchorOffset = (corners[0] + corners[1]) / 2 + new Vector3(0 + margins.x, 0 - (m_textInfo.pageInfo[pageToDisplay].ascender + margins.y + m_textInfo.pageInfo[pageToDisplay].descender - margins.w) / 2, 0); + break; + + // Bottom Vertically + case TextAlignmentOptions.Bottom: + case TextAlignmentOptions.BottomLeft: + case TextAlignmentOptions.BottomRight: + case TextAlignmentOptions.BottomJustified: + case TextAlignmentOptions.BottomFlush: + case TextAlignmentOptions.BottomGeoAligned: + if (m_overflowMode != TextOverflowModes.Page) + anchorOffset = corners[0] + new Vector3(0 + margins.x, 0 - maxVisibleDescender + margins.w, 0); + else + anchorOffset = corners[0] + new Vector3(0 + margins.x, 0 - m_textInfo.pageInfo[pageToDisplay].descender + margins.w, 0); + break; + + // Baseline Vertically + case TextAlignmentOptions.Baseline: + case TextAlignmentOptions.BaselineLeft: + case TextAlignmentOptions.BaselineRight: + case TextAlignmentOptions.BaselineJustified: + case TextAlignmentOptions.BaselineFlush: + case TextAlignmentOptions.BaselineGeoAligned: + anchorOffset = (corners[0] + corners[1]) / 2 + new Vector3(0 + margins.x, 0, 0); + break; + + // Midline Vertically + case TextAlignmentOptions.MidlineLeft: + case TextAlignmentOptions.Midline: + case TextAlignmentOptions.MidlineRight: + case TextAlignmentOptions.MidlineJustified: + case TextAlignmentOptions.MidlineFlush: + case TextAlignmentOptions.MidlineGeoAligned: + anchorOffset = (corners[0] + corners[1]) / 2 + new Vector3(0 + margins.x, 0 - (m_meshExtents.max.y + margins.y + m_meshExtents.min.y - margins.w) / 2, 0); + break; + + // Capline Vertically + case TextAlignmentOptions.CaplineLeft: + case TextAlignmentOptions.Capline: + case TextAlignmentOptions.CaplineRight: + case TextAlignmentOptions.CaplineJustified: + case TextAlignmentOptions.CaplineFlush: + case TextAlignmentOptions.CaplineGeoAligned: + anchorOffset = (corners[0] + corners[1]) / 2 + new Vector3(0 + margins.x, 0 - (m_maxCapHeight - margins.y - margins.w) / 2, 0); + break; + } + #endregion + + + // Initialization for Second Pass + Vector3 justificationOffset = Vector3.zero; + Vector3 offset = Vector3.zero; + int vert_index_X4 = 0; + int sprite_index_X4 = 0; + + int wordCount = 0; + int lineCount = 0; + int lastLine = 0; + bool isFirstSeperator = false; + + bool isStartOfWord = false; + int wordFirstChar = 0; + int wordLastChar = 0; + + // Second Pass : Line Justification, UV Mapping, Character & Line Visibility & more. + float lossyScale = m_previousLossyScaleY = this.transform.lossyScale.y; + + Color32 underlineColor = Color.white; + Color32 strikethroughColor = Color.white; + Color32 highlightColor = new Color32(255, 255, 0, 64); + float xScale = 0; + float xScaleMax = 0; + float underlineStartScale = 0; + float underlineEndScale = 0; + float underlineMaxScale = 0; + float underlineBaseLine = k_LargePositiveFloat; + int lastPage = 0; + + float strikethroughPointSize = 0; + float strikethroughScale = 0; + float strikethroughBaseline = 0; + + TMP_CharacterInfo[] characterInfos = m_textInfo.characterInfo; + #region Handle Line Justification & UV Mapping & Character Visibility & More + for (int i = 0; i < m_characterCount; i++) + { + TMP_FontAsset currentFontAsset = characterInfos[i].fontAsset; + + char currentCharacter = characterInfos[i].character; + + int currentLine = characterInfos[i].lineNumber; + TMP_LineInfo lineInfo = m_textInfo.lineInfo[currentLine]; + lineCount = currentLine + 1; + + TextAlignmentOptions lineAlignment = lineInfo.alignment; + + // Process Line Justification + #region Handle Line Justification + switch (lineAlignment) + { + case TextAlignmentOptions.TopLeft: + case TextAlignmentOptions.Left: + case TextAlignmentOptions.BottomLeft: + case TextAlignmentOptions.BaselineLeft: + case TextAlignmentOptions.MidlineLeft: + case TextAlignmentOptions.CaplineLeft: + if (!m_isRightToLeft) + justificationOffset = new Vector3(0 + lineInfo.marginLeft, 0, 0); + else + justificationOffset = new Vector3(0 - lineInfo.maxAdvance, 0, 0); + break; + + case TextAlignmentOptions.Top: + case TextAlignmentOptions.Center: + case TextAlignmentOptions.Bottom: + case TextAlignmentOptions.Baseline: + case TextAlignmentOptions.Midline: + case TextAlignmentOptions.Capline: + justificationOffset = new Vector3(lineInfo.marginLeft + lineInfo.width / 2 - lineInfo.maxAdvance / 2, 0, 0); + break; + + case TextAlignmentOptions.TopGeoAligned: + case TextAlignmentOptions.CenterGeoAligned: + case TextAlignmentOptions.BottomGeoAligned: + case TextAlignmentOptions.BaselineGeoAligned: + case TextAlignmentOptions.MidlineGeoAligned: + case TextAlignmentOptions.CaplineGeoAligned: + justificationOffset = new Vector3(lineInfo.marginLeft + lineInfo.width / 2 - (lineInfo.lineExtents.min.x + lineInfo.lineExtents.max.x) / 2, 0, 0); + break; + + case TextAlignmentOptions.TopRight: + case TextAlignmentOptions.Right: + case TextAlignmentOptions.BottomRight: + case TextAlignmentOptions.BaselineRight: + case TextAlignmentOptions.MidlineRight: + case TextAlignmentOptions.CaplineRight: + if (!m_isRightToLeft) + justificationOffset = new Vector3(lineInfo.marginLeft + lineInfo.width - lineInfo.maxAdvance, 0, 0); + else + justificationOffset = new Vector3(lineInfo.marginLeft + lineInfo.width, 0, 0); + break; + + case TextAlignmentOptions.TopJustified: + case TextAlignmentOptions.Justified: + case TextAlignmentOptions.BottomJustified: + case TextAlignmentOptions.BaselineJustified: + case TextAlignmentOptions.MidlineJustified: + case TextAlignmentOptions.CaplineJustified: + case TextAlignmentOptions.TopFlush: + case TextAlignmentOptions.Flush: + case TextAlignmentOptions.BottomFlush: + case TextAlignmentOptions.BaselineFlush: + case TextAlignmentOptions.MidlineFlush: + case TextAlignmentOptions.CaplineFlush: + // Skip Zero Width Characters + if (currentCharacter == 0xAD || currentCharacter == 0x200B || currentCharacter == 0x2060) break; + + char lastCharOfCurrentLine = characterInfos[lineInfo.lastCharacterIndex].character; + bool isFlush = ((_HorizontalAlignmentOptions)lineAlignment & _HorizontalAlignmentOptions.Flush) == _HorizontalAlignmentOptions.Flush; + + // In Justified mode, all lines are justified except the last one. + // In Flush mode, all lines are justified. + if (char.IsControl(lastCharOfCurrentLine) == false && currentLine < m_lineNumber || isFlush || lineInfo.maxAdvance > lineInfo.width) + { + // First character of each line. + if (currentLine != lastLine || i == 0 || i == m_firstVisibleCharacter) + { + if (!m_isRightToLeft) + justificationOffset = new Vector3(lineInfo.marginLeft, 0, 0); + else + justificationOffset = new Vector3(lineInfo.marginLeft + lineInfo.width, 0, 0); + + if (char.IsSeparator(currentCharacter)) + isFirstSeperator = true; + else + isFirstSeperator = false; + } + else + { + float gap = !m_isRightToLeft ? lineInfo.width - lineInfo.maxAdvance : lineInfo.width + lineInfo.maxAdvance; + + int visibleCount = lineInfo.visibleCharacterCount - 1 + lineInfo.controlCharacterCount; + + // Get the number of spaces for each line ignoring the last character if it is not visible (ie. a space or linefeed). + int spaces = (characterInfos[lineInfo.lastCharacterIndex].isVisible ? lineInfo.spaceCount : lineInfo.spaceCount - 1) - lineInfo.controlCharacterCount; + + if (isFirstSeperator) { spaces -= 1; visibleCount += 1; } + + float ratio = spaces > 0 ? m_wordWrappingRatios : 1; + + if (spaces < 1) spaces = 1; + + if (currentCharacter != 0xA0 && (currentCharacter == 9 || char.IsSeparator((char)currentCharacter))) + { + if (!m_isRightToLeft) + justificationOffset += new Vector3(gap * (1 - ratio) / spaces, 0, 0); + else + justificationOffset -= new Vector3(gap * (1 - ratio) / spaces, 0, 0); + } + else + { + if (!m_isRightToLeft) + justificationOffset += new Vector3(gap * ratio / visibleCount, 0, 0); + else + justificationOffset -= new Vector3(gap * ratio / visibleCount, 0, 0); + } + } + } + else + { + if (!m_isRightToLeft) + justificationOffset = new Vector3(lineInfo.marginLeft, 0, 0); // Keep last line left justified. + else + justificationOffset = new Vector3(lineInfo.marginLeft + lineInfo.width, 0, 0); // Keep last line right justified. + } + //Debug.Log("Char [" + (char)charCode + "] Code:" + charCode + " Line # " + currentLine + " Offset:" + justificationOffset + " # Spaces:" + lineInfo.spaceCount + " # Characters:" + lineInfo.characterCount); + break; + } + #endregion End Text Justification + + offset = anchorOffset + justificationOffset; + + // Handle UV2 mapping options and packing of scale information into UV2. + #region Handling of UV2 mapping & Scale packing + bool isCharacterVisible = characterInfos[i].isVisible; + if (isCharacterVisible) + { + TMP_TextElementType elementType = characterInfos[i].elementType; + switch (elementType) + { + // CHARACTERS + case TMP_TextElementType.Character: + Extents lineExtents = lineInfo.lineExtents; + float uvOffset = (m_uvLineOffset * currentLine) % 1; // + m_uvOffset.x; + + // Setup UV2 based on Character Mapping Options Selected + #region Handle UV Mapping Options + switch (m_horizontalMapping) + { + case TextureMappingOptions.Character: + characterInfos[i].vertex_BL.uv2.x = 0; //+ m_uvOffset.x; + characterInfos[i].vertex_TL.uv2.x = 0; //+ m_uvOffset.x; + characterInfos[i].vertex_TR.uv2.x = 1; //+ m_uvOffset.x; + characterInfos[i].vertex_BR.uv2.x = 1; //+ m_uvOffset.x; + break; + + case TextureMappingOptions.Line: + if (m_textAlignment != TextAlignmentOptions.Justified) + { + characterInfos[i].vertex_BL.uv2.x = (characterInfos[i].vertex_BL.position.x - lineExtents.min.x) / (lineExtents.max.x - lineExtents.min.x) + uvOffset; + characterInfos[i].vertex_TL.uv2.x = (characterInfos[i].vertex_TL.position.x - lineExtents.min.x) / (lineExtents.max.x - lineExtents.min.x) + uvOffset; + characterInfos[i].vertex_TR.uv2.x = (characterInfos[i].vertex_TR.position.x - lineExtents.min.x) / (lineExtents.max.x - lineExtents.min.x) + uvOffset; + characterInfos[i].vertex_BR.uv2.x = (characterInfos[i].vertex_BR.position.x - lineExtents.min.x) / (lineExtents.max.x - lineExtents.min.x) + uvOffset; + break; + } + else // Special Case if Justified is used in Line Mode. + { + characterInfos[i].vertex_BL.uv2.x = (characterInfos[i].vertex_BL.position.x + justificationOffset.x - m_meshExtents.min.x) / (m_meshExtents.max.x - m_meshExtents.min.x) + uvOffset; + characterInfos[i].vertex_TL.uv2.x = (characterInfos[i].vertex_TL.position.x + justificationOffset.x - m_meshExtents.min.x) / (m_meshExtents.max.x - m_meshExtents.min.x) + uvOffset; + characterInfos[i].vertex_TR.uv2.x = (characterInfos[i].vertex_TR.position.x + justificationOffset.x - m_meshExtents.min.x) / (m_meshExtents.max.x - m_meshExtents.min.x) + uvOffset; + characterInfos[i].vertex_BR.uv2.x = (characterInfos[i].vertex_BR.position.x + justificationOffset.x - m_meshExtents.min.x) / (m_meshExtents.max.x - m_meshExtents.min.x) + uvOffset; + break; + } + + case TextureMappingOptions.Paragraph: + characterInfos[i].vertex_BL.uv2.x = (characterInfos[i].vertex_BL.position.x + justificationOffset.x - m_meshExtents.min.x) / (m_meshExtents.max.x - m_meshExtents.min.x) + uvOffset; + characterInfos[i].vertex_TL.uv2.x = (characterInfos[i].vertex_TL.position.x + justificationOffset.x - m_meshExtents.min.x) / (m_meshExtents.max.x - m_meshExtents.min.x) + uvOffset; + characterInfos[i].vertex_TR.uv2.x = (characterInfos[i].vertex_TR.position.x + justificationOffset.x - m_meshExtents.min.x) / (m_meshExtents.max.x - m_meshExtents.min.x) + uvOffset; + characterInfos[i].vertex_BR.uv2.x = (characterInfos[i].vertex_BR.position.x + justificationOffset.x - m_meshExtents.min.x) / (m_meshExtents.max.x - m_meshExtents.min.x) + uvOffset; + break; + + case TextureMappingOptions.MatchAspect: + + switch (m_verticalMapping) + { + case TextureMappingOptions.Character: + characterInfos[i].vertex_BL.uv2.y = 0; //+ m_uvOffset.y; + characterInfos[i].vertex_TL.uv2.y = 1; //+ m_uvOffset.y; + characterInfos[i].vertex_TR.uv2.y = 0; //+ m_uvOffset.y; + characterInfos[i].vertex_BR.uv2.y = 1; //+ m_uvOffset.y; + break; + + case TextureMappingOptions.Line: + characterInfos[i].vertex_BL.uv2.y = (characterInfos[i].vertex_BL.position.y - lineExtents.min.y) / (lineExtents.max.y - lineExtents.min.y) + uvOffset; + characterInfos[i].vertex_TL.uv2.y = (characterInfos[i].vertex_TL.position.y - lineExtents.min.y) / (lineExtents.max.y - lineExtents.min.y) + uvOffset; + characterInfos[i].vertex_TR.uv2.y = characterInfos[i].vertex_BL.uv2.y; + characterInfos[i].vertex_BR.uv2.y = characterInfos[i].vertex_TL.uv2.y; + break; + + case TextureMappingOptions.Paragraph: + characterInfos[i].vertex_BL.uv2.y = (characterInfos[i].vertex_BL.position.y - m_meshExtents.min.y) / (m_meshExtents.max.y - m_meshExtents.min.y) + uvOffset; + characterInfos[i].vertex_TL.uv2.y = (characterInfos[i].vertex_TL.position.y - m_meshExtents.min.y) / (m_meshExtents.max.y - m_meshExtents.min.y) + uvOffset; + characterInfos[i].vertex_TR.uv2.y = characterInfos[i].vertex_BL.uv2.y; + characterInfos[i].vertex_BR.uv2.y = characterInfos[i].vertex_TL.uv2.y; + break; + + case TextureMappingOptions.MatchAspect: + Debug.Log("ERROR: Cannot Match both Vertical & Horizontal."); + break; + } + + //float xDelta = 1 - (_uv2s[vert_index + 0].y * textMeshCharacterInfo[i].AspectRatio); // Left aligned + float xDelta = (1 - ((characterInfos[i].vertex_BL.uv2.y + characterInfos[i].vertex_TL.uv2.y) * characterInfos[i].aspectRatio)) / 2; // Center of Rectangle + + characterInfos[i].vertex_BL.uv2.x = (characterInfos[i].vertex_BL.uv2.y * characterInfos[i].aspectRatio) + xDelta + uvOffset; + characterInfos[i].vertex_TL.uv2.x = characterInfos[i].vertex_BL.uv2.x; + characterInfos[i].vertex_TR.uv2.x = (characterInfos[i].vertex_TL.uv2.y * characterInfos[i].aspectRatio) + xDelta + uvOffset; + characterInfos[i].vertex_BR.uv2.x = characterInfos[i].vertex_TR.uv2.x; + break; + } + + switch (m_verticalMapping) + { + case TextureMappingOptions.Character: + characterInfos[i].vertex_BL.uv2.y = 0; //+ m_uvOffset.y; + characterInfos[i].vertex_TL.uv2.y = 1; //+ m_uvOffset.y; + characterInfos[i].vertex_TR.uv2.y = 1; //+ m_uvOffset.y; + characterInfos[i].vertex_BR.uv2.y = 0; //+ m_uvOffset.y; + break; + + case TextureMappingOptions.Line: + characterInfos[i].vertex_BL.uv2.y = (characterInfos[i].vertex_BL.position.y - lineInfo.descender) / (lineInfo.ascender - lineInfo.descender); // + m_uvOffset.y; + characterInfos[i].vertex_TL.uv2.y = (characterInfos[i].vertex_TL.position.y - lineInfo.descender) / (lineInfo.ascender - lineInfo.descender); // + m_uvOffset.y; + characterInfos[i].vertex_TR.uv2.y = characterInfos[i].vertex_TL.uv2.y; + characterInfos[i].vertex_BR.uv2.y = characterInfos[i].vertex_BL.uv2.y; + break; + + case TextureMappingOptions.Paragraph: + characterInfos[i].vertex_BL.uv2.y = (characterInfos[i].vertex_BL.position.y - m_meshExtents.min.y) / (m_meshExtents.max.y - m_meshExtents.min.y); // + m_uvOffset.y; + characterInfos[i].vertex_TL.uv2.y = (characterInfos[i].vertex_TL.position.y - m_meshExtents.min.y) / (m_meshExtents.max.y - m_meshExtents.min.y); // + m_uvOffset.y; + characterInfos[i].vertex_TR.uv2.y = characterInfos[i].vertex_TL.uv2.y; + characterInfos[i].vertex_BR.uv2.y = characterInfos[i].vertex_BL.uv2.y; + break; + + case TextureMappingOptions.MatchAspect: + float yDelta = (1 - ((characterInfos[i].vertex_BL.uv2.x + characterInfos[i].vertex_TR.uv2.x) / characterInfos[i].aspectRatio)) / 2; // Center of Rectangle + + characterInfos[i].vertex_BL.uv2.y = yDelta + (characterInfos[i].vertex_BL.uv2.x / characterInfos[i].aspectRatio); // + m_uvOffset.y; + characterInfos[i].vertex_TL.uv2.y = yDelta + (characterInfos[i].vertex_TR.uv2.x / characterInfos[i].aspectRatio); // + m_uvOffset.y; + characterInfos[i].vertex_BR.uv2.y = characterInfos[i].vertex_BL.uv2.y; + characterInfos[i].vertex_TR.uv2.y = characterInfos[i].vertex_TL.uv2.y; + break; + } + #endregion + + // Pack UV's so that we can pass Xscale needed for Shader to maintain 1:1 ratio. + #region Pack Scale into UV2 + xScale = characterInfos[i].scale * Mathf.Abs(lossyScale) * (1 - m_charWidthAdjDelta); + if (!characterInfos[i].isUsingAlternateTypeface && (characterInfos[i].style & FontStyles.Bold) == FontStyles.Bold) xScale *= -1; + + //int isBold = (m_textInfo.characterInfo[i].style & FontStyles.Bold) == FontStyles.Bold ? 1 : 0; + //Vector2 vertexData = new Vector2(isBold, xScale); + //characterInfos[i].vertex_BL.uv4 = vertexData; + //characterInfos[i].vertex_TL.uv4 = vertexData; + //characterInfos[i].vertex_TR.uv4 = vertexData; + //characterInfos[i].vertex_BR.uv4 = vertexData; + + float x0 = characterInfos[i].vertex_BL.uv2.x; + float y0 = characterInfos[i].vertex_BL.uv2.y; + float x1 = characterInfos[i].vertex_TR.uv2.x; + float y1 = characterInfos[i].vertex_TR.uv2.y; + + float dx = (int)x0; + float dy = (int)y0; + + x0 = x0 - dx; + x1 = x1 - dx; + y0 = y0 - dy; + y1 = y1 - dy; + + // Optimization to avoid having a vector2 returned from the Pack UV function. + characterInfos[i].vertex_BL.uv2.x = PackUV(x0, y0); characterInfos[i].vertex_BL.uv2.y = xScale; + characterInfos[i].vertex_TL.uv2.x = PackUV(x0, y1); characterInfos[i].vertex_TL.uv2.y = xScale; + characterInfos[i].vertex_TR.uv2.x = PackUV(x1, y1); characterInfos[i].vertex_TR.uv2.y = xScale; + characterInfos[i].vertex_BR.uv2.x = PackUV(x1, y0); characterInfos[i].vertex_BR.uv2.y = xScale; + #endregion + break; + + // SPRITES + case TMP_TextElementType.Sprite: + // Nothing right now + break; + } + + // Handle maxVisibleCharacters, maxVisibleLines and Overflow Page Mode. + #region Handle maxVisibleCharacters / maxVisibleLines / Page Mode + if (i < m_maxVisibleCharacters && wordCount < m_maxVisibleWords && currentLine < m_maxVisibleLines && m_overflowMode != TextOverflowModes.Page) + { + characterInfos[i].vertex_BL.position += offset; + characterInfos[i].vertex_TL.position += offset; + characterInfos[i].vertex_TR.position += offset; + characterInfos[i].vertex_BR.position += offset; + } + else if (i < m_maxVisibleCharacters && wordCount < m_maxVisibleWords && currentLine < m_maxVisibleLines && m_overflowMode == TextOverflowModes.Page && characterInfos[i].pageNumber == pageToDisplay) + { + characterInfos[i].vertex_BL.position += offset; + characterInfos[i].vertex_TL.position += offset; + characterInfos[i].vertex_TR.position += offset; + characterInfos[i].vertex_BR.position += offset; + } + else + { + characterInfos[i].vertex_BL.position = Vector3.zero; + characterInfos[i].vertex_TL.position = Vector3.zero; + characterInfos[i].vertex_TR.position = Vector3.zero; + characterInfos[i].vertex_BR.position = Vector3.zero; + characterInfos[i].isVisible = false; + } + #endregion + + + // Fill Vertex Buffers for the various types of element + if (elementType == TMP_TextElementType.Character) + { + FillCharacterVertexBuffers(i, vert_index_X4, m_isVolumetricText); + } + else if (elementType == TMP_TextElementType.Sprite) + { + FillSpriteVertexBuffers(i, sprite_index_X4); + } + } + #endregion + + // Apply Alignment and Justification Offset + m_textInfo.characterInfo[i].bottomLeft += offset; + m_textInfo.characterInfo[i].topLeft += offset; + m_textInfo.characterInfo[i].topRight += offset; + m_textInfo.characterInfo[i].bottomRight += offset; + + m_textInfo.characterInfo[i].origin += offset.x; + m_textInfo.characterInfo[i].xAdvance += offset.x; + + m_textInfo.characterInfo[i].ascender += offset.y; + m_textInfo.characterInfo[i].descender += offset.y; + m_textInfo.characterInfo[i].baseLine += offset.y; + + // Update MeshExtents + if (isCharacterVisible) + { + //m_meshExtents.min = new Vector2(Mathf.Min(m_meshExtents.min.x, m_textInfo.characterInfo[i].bottomLeft.x), Mathf.Min(m_meshExtents.min.y, m_textInfo.characterInfo[i].bottomLeft.y)); + //m_meshExtents.max = new Vector2(Mathf.Max(m_meshExtents.max.x, m_textInfo.characterInfo[i].topRight.x), Mathf.Max(m_meshExtents.max.y, m_textInfo.characterInfo[i].topLeft.y)); + } + + // Need to recompute lineExtent to account for the offset from justification. + #region Adjust lineExtents resulting from alignment offset + if (currentLine != lastLine || i == m_characterCount - 1) + { + // Update the previous line's extents + if (currentLine != lastLine) + { + m_textInfo.lineInfo[lastLine].baseline += offset.y; + m_textInfo.lineInfo[lastLine].ascender += offset.y; + m_textInfo.lineInfo[lastLine].descender += offset.y; + + m_textInfo.lineInfo[lastLine].lineExtents.min = new Vector2(m_textInfo.characterInfo[m_textInfo.lineInfo[lastLine].firstCharacterIndex].bottomLeft.x, m_textInfo.lineInfo[lastLine].descender); + m_textInfo.lineInfo[lastLine].lineExtents.max = new Vector2(m_textInfo.characterInfo[m_textInfo.lineInfo[lastLine].lastVisibleCharacterIndex].topRight.x, m_textInfo.lineInfo[lastLine].ascender); + } + + // Update the current line's extents + if (i == m_characterCount - 1) + { + m_textInfo.lineInfo[currentLine].baseline += offset.y; + m_textInfo.lineInfo[currentLine].ascender += offset.y; + m_textInfo.lineInfo[currentLine].descender += offset.y; + + m_textInfo.lineInfo[currentLine].lineExtents.min = new Vector2(m_textInfo.characterInfo[m_textInfo.lineInfo[currentLine].firstCharacterIndex].bottomLeft.x, m_textInfo.lineInfo[currentLine].descender); + m_textInfo.lineInfo[currentLine].lineExtents.max = new Vector2(m_textInfo.characterInfo[m_textInfo.lineInfo[currentLine].lastVisibleCharacterIndex].topRight.x, m_textInfo.lineInfo[currentLine].ascender); + } + } + #endregion + + + // Track Word Count per line and for the object + #region Track Word Count + if (char.IsLetterOrDigit(currentCharacter) || currentCharacter == 0x2D || currentCharacter == 0xAD || currentCharacter == 0x2010 || currentCharacter == 0x2011) + { + if (isStartOfWord == false) + { + isStartOfWord = true; + wordFirstChar = i; + } + + // If last character is a word + if (isStartOfWord && i == m_characterCount - 1) + { + int size = m_textInfo.wordInfo.Length; + int index = m_textInfo.wordCount; + + if (m_textInfo.wordCount + 1 > size) + TMP_TextInfo.Resize(ref m_textInfo.wordInfo, size + 1); + + wordLastChar = i; + + m_textInfo.wordInfo[index].firstCharacterIndex = wordFirstChar; + m_textInfo.wordInfo[index].lastCharacterIndex = wordLastChar; + m_textInfo.wordInfo[index].characterCount = wordLastChar - wordFirstChar + 1; + m_textInfo.wordInfo[index].textComponent = this; + + wordCount += 1; + m_textInfo.wordCount += 1; + m_textInfo.lineInfo[currentLine].wordCount += 1; + } + } + else if (isStartOfWord || i == 0 && (!char.IsPunctuation(currentCharacter) || char.IsWhiteSpace(currentCharacter) || currentCharacter == 0x200B || i == m_characterCount - 1)) + { + if (i > 0 && i < characterInfos.Length - 1 && i < m_characterCount && (currentCharacter == 39 || currentCharacter == 8217) && char.IsLetterOrDigit(characterInfos[i - 1].character) && char.IsLetterOrDigit(characterInfos[i + 1].character)) + { + + } + else + { + wordLastChar = i == m_characterCount - 1 && char.IsLetterOrDigit(currentCharacter) ? i : i - 1; + isStartOfWord = false; + + int size = m_textInfo.wordInfo.Length; + int index = m_textInfo.wordCount; + + if (m_textInfo.wordCount + 1 > size) + TMP_TextInfo.Resize(ref m_textInfo.wordInfo, size + 1); + + m_textInfo.wordInfo[index].firstCharacterIndex = wordFirstChar; + m_textInfo.wordInfo[index].lastCharacterIndex = wordLastChar; + m_textInfo.wordInfo[index].characterCount = wordLastChar - wordFirstChar + 1; + m_textInfo.wordInfo[index].textComponent = this; + + wordCount += 1; + m_textInfo.wordCount += 1; + m_textInfo.lineInfo[currentLine].wordCount += 1; + } + } + #endregion + + + // Setup & Handle Underline + #region Underline + // NOTE: Need to figure out how underline will be handled with multiple fonts and which font will be used for the underline. + bool isUnderline = (m_textInfo.characterInfo[i].style & FontStyles.Underline) == FontStyles.Underline; + if (isUnderline) + { + bool isUnderlineVisible = true; + int currentPage = m_textInfo.characterInfo[i].pageNumber; + + if (i > m_maxVisibleCharacters || currentLine > m_maxVisibleLines || (m_overflowMode == TextOverflowModes.Page && currentPage + 1 != m_pageToDisplay)) + isUnderlineVisible = false; + + // We only use the scale of visible characters. + if (!char.IsWhiteSpace(currentCharacter) && currentCharacter != 0x200B) + { + underlineMaxScale = Mathf.Max(underlineMaxScale, m_textInfo.characterInfo[i].scale); + xScaleMax = Mathf.Max(xScaleMax, Mathf.Abs(xScale)); + underlineBaseLine = Mathf.Min(currentPage == lastPage ? underlineBaseLine : k_LargePositiveFloat, m_textInfo.characterInfo[i].baseLine + font.faceInfo.underlineOffset * underlineMaxScale); + lastPage = currentPage; // Need to track pages to ensure we reset baseline for the new pages. + } + + if (beginUnderline == false && isUnderlineVisible == true && i <= lineInfo.lastVisibleCharacterIndex && currentCharacter != 10 && currentCharacter != 13) + { + if (i == lineInfo.lastVisibleCharacterIndex && char.IsSeparator(currentCharacter)) + { } + else + { + beginUnderline = true; + underlineStartScale = m_textInfo.characterInfo[i].scale; + if (underlineMaxScale == 0) + { + underlineMaxScale = underlineStartScale; + xScaleMax = xScale; + } + underline_start = new Vector3(m_textInfo.characterInfo[i].bottomLeft.x, underlineBaseLine, 0); + underlineColor = m_textInfo.characterInfo[i].underlineColor; + } + } + + // End Underline if text only contains one character. + if (beginUnderline && m_characterCount == 1) + { + beginUnderline = false; + underline_end = new Vector3(m_textInfo.characterInfo[i].topRight.x, underlineBaseLine, 0); + underlineEndScale = m_textInfo.characterInfo[i].scale; + + DrawUnderlineMesh(underline_start, underline_end, ref last_vert_index, underlineStartScale, underlineEndScale, underlineMaxScale, xScaleMax, underlineColor); + underlineMaxScale = 0; + xScaleMax = 0; + underlineBaseLine = k_LargePositiveFloat; + } + else if (beginUnderline && (i == lineInfo.lastCharacterIndex || i >= lineInfo.lastVisibleCharacterIndex)) + { + // Terminate underline at previous visible character if space or carriage return. + if (char.IsWhiteSpace(currentCharacter) || currentCharacter == 0x200B) + { + int lastVisibleCharacterIndex = lineInfo.lastVisibleCharacterIndex; + underline_end = new Vector3(m_textInfo.characterInfo[lastVisibleCharacterIndex].topRight.x, underlineBaseLine, 0); + underlineEndScale = m_textInfo.characterInfo[lastVisibleCharacterIndex].scale; + } + else + { // End underline if last character of the line. + underline_end = new Vector3(m_textInfo.characterInfo[i].topRight.x, underlineBaseLine, 0); + underlineEndScale = m_textInfo.characterInfo[i].scale; + } + + beginUnderline = false; + DrawUnderlineMesh(underline_start, underline_end, ref last_vert_index, underlineStartScale, underlineEndScale, underlineMaxScale, xScaleMax, underlineColor); + underlineMaxScale = 0; + xScaleMax = 0; + underlineBaseLine = k_LargePositiveFloat; + } + else if (beginUnderline && !isUnderlineVisible) + { + beginUnderline = false; + underline_end = new Vector3(m_textInfo.characterInfo[i - 1].topRight.x, underlineBaseLine, 0); + underlineEndScale = m_textInfo.characterInfo[i - 1].scale; + + DrawUnderlineMesh(underline_start, underline_end, ref last_vert_index, underlineStartScale, underlineEndScale, underlineMaxScale, xScaleMax, underlineColor); + underlineMaxScale = 0; + xScaleMax = 0; + underlineBaseLine = k_LargePositiveFloat; + } + else if (beginUnderline && i < m_characterCount - 1 && !underlineColor.Compare(m_textInfo.characterInfo[i + 1].underlineColor)) + { + // End underline if underline color has changed. + beginUnderline = false; + underline_end = new Vector3(m_textInfo.characterInfo[i].topRight.x, underlineBaseLine, 0); + underlineEndScale = m_textInfo.characterInfo[i].scale; + + DrawUnderlineMesh(underline_start, underline_end, ref last_vert_index, underlineStartScale, underlineEndScale, underlineMaxScale, xScaleMax, underlineColor); + underlineMaxScale = 0; + xScaleMax = 0; + underlineBaseLine = k_LargePositiveFloat; + } + } + else + { + // End Underline + if (beginUnderline == true) + { + beginUnderline = false; + underline_end = new Vector3(m_textInfo.characterInfo[i - 1].topRight.x, underlineBaseLine, 0); + underlineEndScale = m_textInfo.characterInfo[i - 1].scale; + + DrawUnderlineMesh(underline_start, underline_end, ref last_vert_index, underlineStartScale, underlineEndScale, underlineMaxScale, xScaleMax, underlineColor); + underlineMaxScale = 0; + xScaleMax = 0; + underlineBaseLine = k_LargePositiveFloat; + } + } + #endregion + + + // Setup & Handle Strikethrough + #region Strikethrough + // NOTE: Need to figure out how underline will be handled with multiple fonts and which font will be used for the underline. + bool isStrikethrough = (m_textInfo.characterInfo[i].style & FontStyles.Strikethrough) == FontStyles.Strikethrough; + float strikethroughOffset = currentFontAsset.faceInfo.strikethroughOffset; + + if (isStrikethrough) + { + bool isStrikeThroughVisible = true; + + if (i > m_maxVisibleCharacters || currentLine > m_maxVisibleLines || (m_overflowMode == TextOverflowModes.Page && m_textInfo.characterInfo[i].pageNumber + 1 != m_pageToDisplay)) + isStrikeThroughVisible = false; + + if (beginStrikethrough == false && isStrikeThroughVisible && i <= lineInfo.lastVisibleCharacterIndex && currentCharacter != 10 && currentCharacter != 13) + { + if (i == lineInfo.lastVisibleCharacterIndex && char.IsSeparator(currentCharacter)) + { } + else + { + beginStrikethrough = true; + strikethroughPointSize = m_textInfo.characterInfo[i].pointSize; + strikethroughScale = m_textInfo.characterInfo[i].scale; + strikethrough_start = new Vector3(m_textInfo.characterInfo[i].bottomLeft.x, m_textInfo.characterInfo[i].baseLine + strikethroughOffset * strikethroughScale, 0); + strikethroughColor = m_textInfo.characterInfo[i].strikethroughColor; + strikethroughBaseline = m_textInfo.characterInfo[i].baseLine; + //Debug.Log("Char [" + currentCharacter + "] Start Strikethrough POS: " + strikethrough_start); + } + } + + // End Strikethrough if text only contains one character. + if (beginStrikethrough && m_characterCount == 1) + { + beginStrikethrough = false; + strikethrough_end = new Vector3(m_textInfo.characterInfo[i].topRight.x, m_textInfo.characterInfo[i].baseLine + strikethroughOffset * strikethroughScale, 0); + + DrawUnderlineMesh(strikethrough_start, strikethrough_end, ref last_vert_index, strikethroughScale, strikethroughScale, strikethroughScale, xScale, strikethroughColor); + } + else if (beginStrikethrough && i == lineInfo.lastCharacterIndex) + { + // Terminate Strikethrough at previous visible character if space or carriage return. + if (char.IsWhiteSpace(currentCharacter) || currentCharacter == 0x200B) + { + int lastVisibleCharacterIndex = lineInfo.lastVisibleCharacterIndex; + strikethrough_end = new Vector3(m_textInfo.characterInfo[lastVisibleCharacterIndex].topRight.x, m_textInfo.characterInfo[lastVisibleCharacterIndex].baseLine + strikethroughOffset * strikethroughScale, 0); + } + else + { + // Terminate Strikethrough at last character of line. + strikethrough_end = new Vector3(m_textInfo.characterInfo[i].topRight.x, m_textInfo.characterInfo[i].baseLine + strikethroughOffset * strikethroughScale, 0); + } + + beginStrikethrough = false; + DrawUnderlineMesh(strikethrough_start, strikethrough_end, ref last_vert_index, strikethroughScale, strikethroughScale, strikethroughScale, xScale, strikethroughColor); + } + else if (beginStrikethrough && i < m_characterCount && (m_textInfo.characterInfo[i + 1].pointSize != strikethroughPointSize || !TMP_Math.Approximately(m_textInfo.characterInfo[i + 1].baseLine + offset.y, strikethroughBaseline))) + { + // Terminate Strikethrough if scale changes. + beginStrikethrough = false; + + int lastVisibleCharacterIndex = lineInfo.lastVisibleCharacterIndex; + if (i > lastVisibleCharacterIndex) + strikethrough_end = new Vector3(m_textInfo.characterInfo[lastVisibleCharacterIndex].topRight.x, m_textInfo.characterInfo[lastVisibleCharacterIndex].baseLine + strikethroughOffset * strikethroughScale, 0); + else + strikethrough_end = new Vector3(m_textInfo.characterInfo[i].topRight.x, m_textInfo.characterInfo[i].baseLine + strikethroughOffset * strikethroughScale, 0); + + DrawUnderlineMesh(strikethrough_start, strikethrough_end, ref last_vert_index, strikethroughScale, strikethroughScale, strikethroughScale, xScale, strikethroughColor); + //Debug.Log("Char [" + currentCharacter + "] at Index: " + i + " End Strikethrough POS: " + strikethrough_end + " Baseline: " + m_textInfo.characterInfo[i].baseLine.ToString("f3")); + } + else if (beginStrikethrough && i < m_characterCount && currentFontAsset.GetInstanceID() != characterInfos[i + 1].fontAsset.GetInstanceID()) + { + // Terminate Strikethrough if font asset changes. + beginStrikethrough = false; + strikethrough_end = new Vector3(m_textInfo.characterInfo[i].topRight.x, m_textInfo.characterInfo[i].baseLine + strikethroughOffset * strikethroughScale, 0); + + DrawUnderlineMesh(strikethrough_start, strikethrough_end, ref last_vert_index, strikethroughScale, strikethroughScale, strikethroughScale, xScale, strikethroughColor); + } + else if (beginStrikethrough && !isStrikeThroughVisible) + { + // Terminate Strikethrough if character is not visible. + beginStrikethrough = false; + strikethrough_end = new Vector3(m_textInfo.characterInfo[i - 1].topRight.x, m_textInfo.characterInfo[i - 1].baseLine + strikethroughOffset * strikethroughScale, 0); + + DrawUnderlineMesh(strikethrough_start, strikethrough_end, ref last_vert_index, strikethroughScale, strikethroughScale, strikethroughScale, xScale, strikethroughColor); + } + } + else + { + // End Strikethrough + if (beginStrikethrough == true) + { + beginStrikethrough = false; + strikethrough_end = new Vector3(m_textInfo.characterInfo[i - 1].topRight.x, m_textInfo.characterInfo[i - 1].baseLine + strikethroughOffset * strikethroughScale, 0); + + DrawUnderlineMesh(strikethrough_start, strikethrough_end, ref last_vert_index, strikethroughScale, strikethroughScale, strikethroughScale, xScale, strikethroughColor); + } + } + #endregion + + + // HANDLE TEXT HIGHLIGHTING + #region Text Highlighting + bool isHighlight = (m_textInfo.characterInfo[i].style & FontStyles.Highlight) == FontStyles.Highlight; + if (isHighlight) + { + bool isHighlightVisible = true; + int currentPage = m_textInfo.characterInfo[i].pageNumber; + + if (i > m_maxVisibleCharacters || currentLine > m_maxVisibleLines || (m_overflowMode == TextOverflowModes.Page && currentPage + 1 != m_pageToDisplay)) + isHighlightVisible = false; + + if (beginHighlight == false && isHighlightVisible == true && i <= lineInfo.lastVisibleCharacterIndex && currentCharacter != 10 && currentCharacter != 13) + { + if (i == lineInfo.lastVisibleCharacterIndex && char.IsSeparator(currentCharacter)) + { } + else + { + beginHighlight = true; + highlight_start = k_LargePositiveVector2; + highlight_end = k_LargeNegativeVector2; + highlightColor = m_textInfo.characterInfo[i].highlightColor; + } + } + + if (beginHighlight) + { + Color32 currentHighlightColor = m_textInfo.characterInfo[i].highlightColor; + bool isColorTransition = false; + + // Handle Highlight color changes + if (!highlightColor.Compare(currentHighlightColor)) + { + // End drawing at the start of new highlight color to prevent a gap between highlight sections. + highlight_end.x = (highlight_end.x + m_textInfo.characterInfo[i].bottomLeft.x) / 2; + + highlight_start.y = Mathf.Min(highlight_start.y, m_textInfo.characterInfo[i].descender); + highlight_end.y = Mathf.Max(highlight_end.y, m_textInfo.characterInfo[i].ascender); + + DrawTextHighlight(highlight_start, highlight_end, ref last_vert_index, highlightColor); + + beginHighlight = true; + highlight_start = highlight_end; + + highlight_end = new Vector3(m_textInfo.characterInfo[i].topRight.x, m_textInfo.characterInfo[i].descender, 0); + highlightColor = m_textInfo.characterInfo[i].highlightColor; + + isColorTransition = true; + } + + if (!isColorTransition) + { + // Use the Min / Max Extents of the Highlight area to handle different character sizes and fonts. + highlight_start.x = Mathf.Min(highlight_start.x, m_textInfo.characterInfo[i].bottomLeft.x); + highlight_start.y = Mathf.Min(highlight_start.y, m_textInfo.characterInfo[i].descender); + + highlight_end.x = Mathf.Max(highlight_end.x, m_textInfo.characterInfo[i].topRight.x); + highlight_end.y = Mathf.Max(highlight_end.y, m_textInfo.characterInfo[i].ascender); + } + } + + // End Highlight if text only contains one character. + if (beginHighlight && m_characterCount == 1) + { + beginHighlight = false; + + DrawTextHighlight(highlight_start, highlight_end, ref last_vert_index, highlightColor); + } + else if (beginHighlight && (i == lineInfo.lastCharacterIndex || i >= lineInfo.lastVisibleCharacterIndex)) + { + beginHighlight = false; + DrawTextHighlight(highlight_start, highlight_end, ref last_vert_index, highlightColor); + } + else if (beginHighlight && !isHighlightVisible) + { + beginHighlight = false; + DrawTextHighlight(highlight_start, highlight_end, ref last_vert_index, highlightColor); + } + } + else + { + // End Highlight + if (beginHighlight == true) + { + beginHighlight = false; + DrawTextHighlight(highlight_start, highlight_end, ref last_vert_index, highlightColor); + } + } + #endregion + + + lastLine = currentLine; + } + #endregion + + + // METRICS ABOUT THE TEXT OBJECT + m_textInfo.characterCount = m_characterCount; + m_textInfo.spriteCount = m_spriteCount; + m_textInfo.lineCount = lineCount; + m_textInfo.wordCount = wordCount != 0 && m_characterCount > 0 ? wordCount : 1; + m_textInfo.pageCount = m_pageNumber + 1; + + + ////Profiler.BeginSample("TMP Generate Text - Phase III"); + // Update Mesh Vertex Data + if (m_renderMode == TextRenderFlags.Render && IsActive()) + { + // Clear unused vertices + //m_textInfo.meshInfo[0].ClearUnusedVertices(); + + // Sort the geometry of the text object if needed. + if (m_geometrySortingOrder != VertexSortingOrder.Normal) + m_textInfo.meshInfo[0].SortGeometry(VertexSortingOrder.Reverse); + + // Upload Mesh Data + m_mesh.MarkDynamic(); + m_mesh.vertices = m_textInfo.meshInfo[0].vertices; + m_mesh.uv = m_textInfo.meshInfo[0].uvs0; + m_mesh.uv2 = m_textInfo.meshInfo[0].uvs2; + //m_mesh.uv4 = m_textInfo.meshInfo[0].uvs4; + m_mesh.colors32 = m_textInfo.meshInfo[0].colors32; + + // Compute Bounds for the mesh. Manual computation is more efficient then using Mesh.recalcualteBounds. + m_mesh.RecalculateBounds(); + //m_mesh.bounds = new Bounds(new Vector3((m_meshExtents.max.x + m_meshExtents.min.x) / 2, (m_meshExtents.max.y + m_meshExtents.min.y) / 2, 0) + offset, new Vector3(m_meshExtents.max.x - m_meshExtents.min.x, m_meshExtents.max.y - m_meshExtents.min.y, 0)); + + for (int i = 1; i < m_textInfo.materialCount; i++) + { + // Clear unused vertices + m_textInfo.meshInfo[i].ClearUnusedVertices(); + + if (m_subTextObjects[i] == null) continue; + + // Sort the geometry of the sub-text objects if needed. + if (m_geometrySortingOrder != VertexSortingOrder.Normal) + m_textInfo.meshInfo[i].SortGeometry(VertexSortingOrder.Reverse); + + m_subTextObjects[i].mesh.vertices = m_textInfo.meshInfo[i].vertices; + m_subTextObjects[i].mesh.uv = m_textInfo.meshInfo[i].uvs0; + m_subTextObjects[i].mesh.uv2 = m_textInfo.meshInfo[i].uvs2; + //m_subTextObjects[i].mesh.uv4 = m_textInfo.meshInfo[i].uvs4; + m_subTextObjects[i].mesh.colors32 = m_textInfo.meshInfo[i].colors32; + + m_subTextObjects[i].mesh.RecalculateBounds(); + + // Update the collider on the sub text object + //m_subTextObjects[i].UpdateColliders(m_textInfo.meshInfo[i].vertexCount); + } + } + + // Event indicating the text has been regenerated. + TMPro_EventManager.ON_TEXT_CHANGED(this); + + ////Profiler.EndSample(); + //Debug.Log("Done Rendering Text."); + } + + + /// <summary> + /// Method to return the local corners of the Text Container or RectTransform. + /// </summary> + /// <returns></returns> + protected override Vector3[] GetTextContainerLocalCorners() + { + if (m_rectTransform == null) m_rectTransform = this.rectTransform; + + m_rectTransform.GetLocalCorners(m_RectTransformCorners); + + return m_RectTransformCorners; + } + + + /// <summary> + /// Method to disable the renderers. + /// </summary> + void SetMeshFilters(bool state) + { + // Parent text object + if (m_meshFilter != null) + { + if (state) + m_meshFilter.sharedMesh = m_mesh; + else + m_meshFilter.sharedMesh = null; + } + + for (int i = 1; i < m_subTextObjects.Length && m_subTextObjects[i] != null; i++) + { + if (m_subTextObjects[i].meshFilter != null) + { + if (state) + m_subTextObjects[i].meshFilter.sharedMesh = m_subTextObjects[i].mesh; + else + m_subTextObjects[i].meshFilter.sharedMesh = null; + } + } + } + + + /// <summary> + /// Method to Enable or Disable child SubMesh objects. + /// </summary> + /// <param name="state"></param> + protected override void SetActiveSubMeshes(bool state) + { + for (int i = 1; i < m_subTextObjects.Length && m_subTextObjects[i] != null; i++) + { + if (m_subTextObjects[i].enabled != state) + m_subTextObjects[i].enabled = state; + } + } + + + /// <summary> + /// Destroy Sub Mesh Objects + /// </summary> + protected override void ClearSubMeshObjects() + { + for (int i = 1; i < m_subTextObjects.Length && m_subTextObjects[i] != null; i++) + { + Debug.Log("Destroying Sub Text object[" + i + "]."); + DestroyImmediate(m_subTextObjects[i]); + } + } + + + /// <summary> + /// Method returning the compound bounds of the text object and child sub objects. + /// </summary> + /// <returns></returns> + protected override Bounds GetCompoundBounds() + { + Bounds mainBounds = m_mesh.bounds; + Vector3 min = mainBounds.min; + Vector3 max = mainBounds.max; + + for (int i = 1; i < m_subTextObjects.Length && m_subTextObjects[i] != null; i++) + { + Bounds subBounds = m_subTextObjects[i].mesh.bounds; + min.x = min.x < subBounds.min.x ? min.x : subBounds.min.x; + min.y = min.y < subBounds.min.y ? min.y : subBounds.min.y; + + max.x = max.x > subBounds.max.x ? max.x : subBounds.max.x; + max.y = max.y > subBounds.max.y ? max.y : subBounds.max.y; + } + + Vector3 center = (min + max) / 2; + Vector2 size = max - min; + return new Bounds(center, size); + } + + + /// <summary> + /// Method to Update Scale in UV2 + /// </summary> + //void UpdateSDFScale(float lossyScale) + //{ + // // TODO: Resolve - Underline / Strikethrough segments not getting their SDF Scale adjusted. + + // //Debug.Log("*** UpdateSDFScale() ***"); + + // // Iterate through each of the characters. + // for (int i = 0; i < m_textInfo.characterCount; i++) + // { + // // Only update scale for visible characters. + // if (m_textInfo.characterInfo[i].isVisible && m_textInfo.characterInfo[i].elementType == TMP_TextElementType.Character) + // { + // float scale = lossyScale * m_textInfo.characterInfo[i].scale * (1 - m_charWidthAdjDelta); + // if (!m_textInfo.characterInfo[i].isUsingAlternateTypeface && (m_textInfo.characterInfo[i].style & FontStyles.Bold) == FontStyles.Bold) scale *= -1; + + // int index = m_textInfo.characterInfo[i].materialReferenceIndex; + // int vertexIndex = m_textInfo.characterInfo[i].vertexIndex; + + // m_textInfo.meshInfo[index].uvs2[vertexIndex + 0].y = scale; + // m_textInfo.meshInfo[index].uvs2[vertexIndex + 1].y = scale; + // m_textInfo.meshInfo[index].uvs2[vertexIndex + 2].y = scale; + // m_textInfo.meshInfo[index].uvs2[vertexIndex + 3].y = scale; + // } + // } + + // // Push the updated uv2 scale information to the meshes. + // for (int i = 0; i < m_textInfo.meshInfo.Length; i++) + // { + // if (i == 0) + // m_mesh.uv2 = m_textInfo.meshInfo[0].uvs2; + // else + // m_subTextObjects[i].mesh.uv2 = m_textInfo.meshInfo[i].uvs2; + // } + //} + + /// <summary> + /// Method to update the SDF Scale in UV2. + /// </summary> + /// <param name="scaleDelta"></param> + void UpdateSDFScale(float scaleDelta) + { + if (scaleDelta == 0 || scaleDelta == float.PositiveInfinity) + { + m_havePropertiesChanged = true; + OnPreRenderObject(); + return; + } + + for (int materialIndex = 0; materialIndex < m_textInfo.materialCount; materialIndex++) + { + TMP_MeshInfo meshInfo = m_textInfo.meshInfo[materialIndex]; + + for (int i = 0; i < meshInfo.uvs2.Length; i++) + { + meshInfo.uvs2[i].y *= Mathf.Abs(scaleDelta); + } + } + + // Push the updated uv2 scale information to the meshes. + for (int i = 0; i < m_textInfo.meshInfo.Length; i++) + { + if (i == 0) + m_mesh.uv2 = m_textInfo.meshInfo[0].uvs2; + else + m_subTextObjects[i].mesh.uv2 = m_textInfo.meshInfo[i].uvs2; + } + } + + + // Function to offset vertices position to account for line spacing changes. + protected override void AdjustLineOffset(int startIndex, int endIndex, float offset) + { + Vector3 vertexOffset = new Vector3(0, offset, 0); + + for (int i = startIndex; i <= endIndex; i++) + { + m_textInfo.characterInfo[i].bottomLeft -= vertexOffset; + m_textInfo.characterInfo[i].topLeft -= vertexOffset; + m_textInfo.characterInfo[i].topRight -= vertexOffset; + m_textInfo.characterInfo[i].bottomRight -= vertexOffset; + + m_textInfo.characterInfo[i].ascender -= vertexOffset.y; + m_textInfo.characterInfo[i].baseLine -= vertexOffset.y; + m_textInfo.characterInfo[i].descender -= vertexOffset.y; + + if (m_textInfo.characterInfo[i].isVisible) + { + m_textInfo.characterInfo[i].vertex_BL.position -= vertexOffset; + m_textInfo.characterInfo[i].vertex_TL.position -= vertexOffset; + m_textInfo.characterInfo[i].vertex_TR.position -= vertexOffset; + m_textInfo.characterInfo[i].vertex_BR.position -= vertexOffset; + } + } + } + + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_Private.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_Private.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..922dae217c8c0ca6ca38e036e38acdfa62224585 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_Private.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 8f8b248abe6b4dcebd6cdd0d754717f4 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8e098d8d28c5182419f7a1c8b91ca722, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_UGUI_Private.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_UGUI_Private.cs new file mode 100644 index 0000000000000000000000000000000000000000..2c25e343738eb56325abec7ae0ddc75c0372fed6 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_UGUI_Private.cs @@ -0,0 +1,4318 @@ +//#define TMP_PROFILE_ON +//#define TMP_PROFILE_PHASES_ON + + +using UnityEngine; +using UnityEngine.TextCore; +using System; +using System.Collections.Generic; +using UnityEngine.UI; + +#pragma warning disable 0414 // Disabled a few warnings related to serialized variables not used in this script but used in the editor. +#pragma warning disable 0618 // Disabled warning due to SetVertices being deprecated until new release with SetMesh() is available. + +namespace TMPro +{ + + public partial class TextMeshProUGUI + { + [SerializeField] + private bool m_hasFontAssetChanged = false; // Used to track when font properties have changed. + + [SerializeField] + protected TMP_SubMeshUI[] m_subTextObjects = new TMP_SubMeshUI[8]; + + private float m_previousLossyScaleY = -1; // Used for Tracking lossy scale changes in the transform; + + private Vector3[] m_RectTransformCorners = new Vector3[4]; + private CanvasRenderer m_canvasRenderer; + private Canvas m_canvas; + + + private bool m_isFirstAllocation; // Flag to determine if this is the first allocation of the buffers. + private int m_max_characters = 8; // Determines the initial allocation and size of the character array / buffer. + //private int m_max_numberOfLines = 4; // Determines the initial allocation and maximum number of lines of text. + + // MASKING RELATED PROPERTIES + private bool m_isMaskingEnabled; + // This property is now obsolete and used for compatibility with previous releases (prior to release 0.1.54). + [SerializeField] + private Material m_baseMaterial; + + + private bool m_isScrollRegionSet; + //private Mask m_mask; + private int m_stencilID = 0; + + [SerializeField] + private Vector4 m_maskOffset; + + // Matrix used to animated Env Map + private Matrix4x4 m_EnvMapMatrix = new Matrix4x4(); + + + //private bool m_isEnabled; + [NonSerialized] + private bool m_isRegisteredForEvents; + + // DEBUG Variables + //private System.Diagnostics.Stopwatch m_StopWatch; + //private int frame = 0; + //private int m_recursiveCount = 0; + private int m_recursiveCountA = 0; + private int loopCountA = 0; + //private int loopCountB = 0; + //private int loopCountC = 0; + //private int loopCountD = 0; + //private int loopCountE = 0; + + //[SerializeField] + //private new Material m_MaskMaterial; + + + protected override void Awake() + { + //Debug.Log("***** Awake() called on object ID " + GetInstanceID() + ". *****"); + + #if UNITY_EDITOR + // Special handling for TMP Settings and importing Essential Resources + if (TMP_Settings.instance == null) + { + if (m_isWaitingOnResourceLoad == false) + TMPro_EventManager.RESOURCE_LOAD_EVENT.Add(ON_RESOURCES_LOADED); + + m_isWaitingOnResourceLoad = true; + return; + } + #endif + + // Cache Reference to the Canvas + m_canvas = this.canvas; + + m_isOrthographic = true; + + // Cache Reference to RectTransform. + m_rectTransform = gameObject.GetComponent<RectTransform>(); + if (m_rectTransform == null) + m_rectTransform = gameObject.AddComponent<RectTransform>(); + + // Cache a reference to the CanvasRenderer. + m_canvasRenderer = GetComponent<CanvasRenderer>(); + if (m_canvasRenderer == null) + m_canvasRenderer = gameObject.AddComponent<CanvasRenderer> (); + + if (m_mesh == null) + { + m_mesh = new Mesh(); + m_mesh.hideFlags = HideFlags.HideAndDontSave; + + // Create new TextInfo for the text object. + m_textInfo = new TMP_TextInfo(this); + } + + // Load TMP Settings for new text object instances. + LoadDefaultSettings(); + + // Load the font asset and assign material to renderer. + LoadFontAsset(); + + // Load Default TMP StyleSheet + TMP_StyleSheet.LoadDefaultStyleSheet(); + + // Allocate our initial buffers. + if (m_TextParsingBuffer == null) + m_TextParsingBuffer = new UnicodeChar[m_max_characters]; + + m_cached_TextElement = new TMP_Character(); + m_isFirstAllocation = true; + + // Check if we have a font asset assigned. Return if we don't because no one likes to see purple squares on screen. + if (m_fontAsset == null) + { + Debug.LogWarning("Please assign a Font Asset to this " + transform.name + " gameobject.", this); + return; + } + + // Check to make sure Sub Text Objects are tracked correctly in the event a Prefab is used. + TMP_SubMeshUI[] subTextObjects = GetComponentsInChildren<TMP_SubMeshUI>(); + if (subTextObjects.Length > 0) + { + for (int i = 0; i < subTextObjects.Length; i++) + m_subTextObjects[i + 1] = subTextObjects[i]; + } + + // Set flags to ensure our text is parsed and redrawn. + m_isInputParsingRequired = true; + m_havePropertiesChanged = true; + m_isCalculateSizeRequired = true; + + m_isAwake = true; + } + + + protected override void OnEnable() + { + //Debug.Log("***** OnEnable() called on object ID " + GetInstanceID() + ". *****"); + + // Return if Awake() has not been called on the text object. + if (m_isAwake == false) + return; + + if (!m_isRegisteredForEvents) + { + //Debug.Log("Registering for Events."); + + #if UNITY_EDITOR + // Register Callbacks for various events. + TMPro_EventManager.MATERIAL_PROPERTY_EVENT.Add(ON_MATERIAL_PROPERTY_CHANGED); + TMPro_EventManager.FONT_PROPERTY_EVENT.Add(ON_FONT_PROPERTY_CHANGED); + TMPro_EventManager.TEXTMESHPRO_UGUI_PROPERTY_EVENT.Add(ON_TEXTMESHPRO_UGUI_PROPERTY_CHANGED); + TMPro_EventManager.DRAG_AND_DROP_MATERIAL_EVENT.Add(ON_DRAG_AND_DROP_MATERIAL); + TMPro_EventManager.TEXT_STYLE_PROPERTY_EVENT.Add(ON_TEXT_STYLE_CHANGED); + TMPro_EventManager.COLOR_GRADIENT_PROPERTY_EVENT.Add(ON_COLOR_GRADIENT_CHANGED); + TMPro_EventManager.TMP_SETTINGS_PROPERTY_EVENT.Add(ON_TMP_SETTINGS_CHANGED); + #endif + m_isRegisteredForEvents = true; + } + + // Cache Reference to the Canvas + m_canvas = GetCanvas(); + + SetActiveSubMeshes(true); + + // Register Graphic Component to receive event triggers + GraphicRegistry.RegisterGraphicForCanvas(m_canvas, this); + + // Register text object for updates + TMP_UpdateManager.RegisterTextObjectForUpdate(this); + + ComputeMarginSize(); + + m_verticesAlreadyDirty = false; + m_layoutAlreadyDirty = false; + m_ShouldRecalculateStencil = true; + m_isInputParsingRequired = true; + SetAllDirty(); + + RecalculateClipping(); + } + + + protected override void OnDisable() + { + //Debug.Log("***** OnDisable() called on object ID " + GetInstanceID() + ". *****"); + + // Return if Awake() has not been called on the text object. + if (m_isAwake == false) + return; + + if (m_MaskMaterial != null) + { + TMP_MaterialManager.ReleaseStencilMaterial(m_MaskMaterial); + m_MaskMaterial = null; + } + + // UnRegister Graphic Component + GraphicRegistry.UnregisterGraphicForCanvas(m_canvas, this); + CanvasUpdateRegistry.UnRegisterCanvasElementForRebuild((ICanvasElement)this); + + TMP_UpdateManager.UnRegisterTextObjectForUpdate(this); + + if (m_canvasRenderer != null) + m_canvasRenderer.Clear(); + + SetActiveSubMeshes(false); + + LayoutRebuilder.MarkLayoutForRebuild(m_rectTransform); + RecalculateClipping(); + } + + + protected override void OnDestroy() + { + //Debug.Log("***** OnDestroy() called on object ID " + GetInstanceID() + ". *****"); + + // UnRegister Graphic Component + GraphicRegistry.UnregisterGraphicForCanvas(m_canvas, this); + + TMP_UpdateManager.UnRegisterTextObjectForUpdate(this); + + // Clean up remaining mesh + if (m_mesh != null) + DestroyImmediate(m_mesh); + + // Clean up mask material + if (m_MaskMaterial != null) + { + TMP_MaterialManager.ReleaseStencilMaterial(m_MaskMaterial); + m_MaskMaterial = null; + } + + #if UNITY_EDITOR + // Unregister the event this object was listening to + TMPro_EventManager.MATERIAL_PROPERTY_EVENT.Remove(ON_MATERIAL_PROPERTY_CHANGED); + TMPro_EventManager.FONT_PROPERTY_EVENT.Remove(ON_FONT_PROPERTY_CHANGED); + TMPro_EventManager.TEXTMESHPRO_UGUI_PROPERTY_EVENT.Remove(ON_TEXTMESHPRO_UGUI_PROPERTY_CHANGED); + TMPro_EventManager.DRAG_AND_DROP_MATERIAL_EVENT.Remove(ON_DRAG_AND_DROP_MATERIAL); + TMPro_EventManager.TEXT_STYLE_PROPERTY_EVENT.Remove(ON_TEXT_STYLE_CHANGED); + TMPro_EventManager.COLOR_GRADIENT_PROPERTY_EVENT.Remove(ON_COLOR_GRADIENT_CHANGED); + TMPro_EventManager.TMP_SETTINGS_PROPERTY_EVENT.Remove(ON_TMP_SETTINGS_CHANGED); + TMPro_EventManager.RESOURCE_LOAD_EVENT.Remove(ON_RESOURCES_LOADED); + #endif + m_isRegisteredForEvents = false; + } + + + #if UNITY_EDITOR + protected override void Reset() + { + //Debug.Log("***** Reset() *****"); //has been called."); + + // Return if Awake() has not been called on the text object. + if (m_isAwake == false) + return; + + LoadDefaultSettings(); + LoadFontAsset(); + + m_isInputParsingRequired = true; + m_havePropertiesChanged = true; + } + + + protected override void OnValidate() + { + //Debug.Log("***** OnValidate() ***** Frame:" + Time.frameCount); // ID " + GetInstanceID()); // New Material [" + m_sharedMaterial.name + "] with ID " + m_sharedMaterial.GetInstanceID() + ". Base Material is [" + m_baseMaterial.name + "] with ID " + m_baseMaterial.GetInstanceID() + ". Previous Base Material is [" + (m_lastBaseMaterial == null ? "Null" : m_lastBaseMaterial.name) + "]."); + + // Return if Awake() has not been called on the text object. + if (m_isAwake == false) + return; + + // Handle Font Asset changes in the inspector. + if (m_fontAsset == null || m_hasFontAssetChanged) + { + LoadFontAsset(); + m_isCalculateSizeRequired = true; + m_hasFontAssetChanged = false; + } + + + if (m_canvasRenderer == null || m_canvasRenderer.GetMaterial() == null || m_canvasRenderer.GetMaterial().GetTexture(ShaderUtilities.ID_MainTex) == null || m_fontAsset == null || m_fontAsset.atlasTexture.GetInstanceID() != m_canvasRenderer.GetMaterial().GetTexture(ShaderUtilities.ID_MainTex).GetInstanceID()) + { + LoadFontAsset(); + m_isCalculateSizeRequired = true; + m_hasFontAssetChanged = false; + } + + m_padding = GetPaddingForMaterial(); + ComputeMarginSize(); + + m_isInputParsingRequired = true; + m_inputSource = TextInputSources.Text; + m_havePropertiesChanged = true; + m_isCalculateSizeRequired = true; + m_isPreferredWidthDirty = true; + m_isPreferredHeightDirty = true; + + SetAllDirty(); + } + + + // Event received when TMP resources have been loaded. + void ON_RESOURCES_LOADED() + { + TMPro_EventManager.RESOURCE_LOAD_EVENT.Remove(ON_RESOURCES_LOADED); + + if (this == null) + return; + + Awake(); + OnEnable(); + } + + + // Event received when custom material editor properties are changed. + void ON_MATERIAL_PROPERTY_CHANGED(bool isChanged, Material mat) + { + //Debug.Log("ON_MATERIAL_PROPERTY_CHANGED event received."); // Targeted Material is: " + mat.name + " m_sharedMaterial: " + m_sharedMaterial.name + " with ID:" + m_sharedMaterial.GetInstanceID() + " m_renderer.sharedMaterial: " + m_canvasRenderer.GetMaterial() + " Masking Material:" + m_MaskMaterial.GetInstanceID()); + + ShaderUtilities.GetShaderPropertyIDs(); // Initialize ShaderUtilities and get shader property IDs. + + int materialID = mat.GetInstanceID(); + int sharedMaterialID = m_sharedMaterial.GetInstanceID(); + int maskingMaterialID = m_MaskMaterial == null ? 0 : m_MaskMaterial.GetInstanceID(); + + if (m_canvasRenderer == null || m_canvasRenderer.GetMaterial() == null) + { + if (m_canvasRenderer == null) return; + + if (m_fontAsset != null) + { + m_canvasRenderer.SetMaterial(m_fontAsset.material, m_sharedMaterial.GetTexture(ShaderUtilities.ID_MainTex)); + //Debug.LogWarning("No Material was assigned to " + name + ". " + m_fontAsset.material.name + " was assigned."); + } + else + Debug.LogWarning("No Font Asset assigned to " + name + ". Please assign a Font Asset.", this); + } + + + if (m_canvasRenderer.GetMaterial() != m_sharedMaterial && m_fontAsset == null) // || m_renderer.sharedMaterials.Contains(mat)) + { + //Debug.Log("ON_MATERIAL_PROPERTY_CHANGED Called on Target ID: " + GetInstanceID() + ". Previous Material:" + m_sharedMaterial + " New Material:" + m_uiRenderer.GetMaterial()); // on Object ID:" + GetInstanceID() + ". m_sharedMaterial: " + m_sharedMaterial.name + " m_renderer.sharedMaterial: " + m_renderer.sharedMaterial.name); + m_sharedMaterial = m_canvasRenderer.GetMaterial(); + } + + + // Make sure material properties are synchronized between the assigned material and masking material. + if (m_MaskMaterial != null) + { + UnityEditor.Undo.RecordObject(m_MaskMaterial, "Material Property Changes"); + UnityEditor.Undo.RecordObject(m_sharedMaterial, "Material Property Changes"); + + if (materialID == sharedMaterialID) + { + //Debug.Log("Copy base material properties to masking material if not null."); + float stencilID = m_MaskMaterial.GetFloat(ShaderUtilities.ID_StencilID); + float stencilComp = m_MaskMaterial.GetFloat(ShaderUtilities.ID_StencilComp); + //float stencilOp = m_MaskMaterial.GetFloat(ShaderUtilities.ID_StencilOp); + //float stencilRead = m_MaskMaterial.GetFloat(ShaderUtilities.ID_StencilReadMask); + //float stencilWrite = m_MaskMaterial.GetFloat(ShaderUtilities.ID_StencilWriteMask); + + m_MaskMaterial.CopyPropertiesFromMaterial(mat); + m_MaskMaterial.shaderKeywords = mat.shaderKeywords; + + m_MaskMaterial.SetFloat(ShaderUtilities.ID_StencilID, stencilID); + m_MaskMaterial.SetFloat(ShaderUtilities.ID_StencilComp, stencilComp); + //m_MaskMaterial.SetFloat(ShaderUtilities.ID_StencilOp, stencilOp); + //m_MaskMaterial.SetFloat(ShaderUtilities.ID_StencilReadMask, stencilID); + //m_MaskMaterial.SetFloat(ShaderUtilities.ID_StencilWriteMask, 0); + } + else if (materialID == maskingMaterialID) + { + // Update the padding + GetPaddingForMaterial(mat); + + m_sharedMaterial.CopyPropertiesFromMaterial(mat); + m_sharedMaterial.shaderKeywords = mat.shaderKeywords; + m_sharedMaterial.SetFloat(ShaderUtilities.ID_StencilID, 0); + m_sharedMaterial.SetFloat(ShaderUtilities.ID_StencilComp, 8); + //m_sharedMaterial.SetFloat(ShaderUtilities.ID_StencilOp, 0); + //m_sharedMaterial.SetFloat(ShaderUtilities.ID_StencilReadMask, 255); + //m_sharedMaterial.SetFloat(ShaderUtilities.ID_StencilWriteMask, 255); + } + + } + + m_padding = GetPaddingForMaterial(); + m_havePropertiesChanged = true; + SetVerticesDirty(); + //SetMaterialDirty(); + } + + + // Event received when font asset properties are changed in Font Inspector + void ON_FONT_PROPERTY_CHANGED(bool isChanged, TMP_FontAsset font) + { + if (MaterialReference.Contains(m_materialReferences, font)) + { + //Debug.Log("ON_FONT_PROPERTY_CHANGED event received."); + m_isInputParsingRequired = true; + m_havePropertiesChanged = true; + + UpdateMeshPadding(); + + SetLayoutDirty(); + SetVerticesDirty(); + } + } + + + // Event received when UNDO / REDO Event alters the properties of the object. + void ON_TEXTMESHPRO_UGUI_PROPERTY_CHANGED(bool isChanged, TextMeshProUGUI obj) + { + //Debug.Log("Event Received by " + obj); + + if (obj == this) + { + //Debug.Log("Undo / Redo Event Received by Object ID:" + GetInstanceID()); + m_havePropertiesChanged = true; + m_isInputParsingRequired = true; + + ComputeMarginSize(); // Review this change + SetVerticesDirty(); + } + } + + + // Event to Track Material Changed resulting from Drag-n-drop. + void ON_DRAG_AND_DROP_MATERIAL(GameObject obj, Material currentMaterial, Material newMaterial) + { + //Debug.Log("Drag-n-Drop Event - Receiving Object ID " + GetInstanceID() + ". Sender ID " + obj.GetInstanceID()); // + ". Prefab Parent is " + UnityEditor.PrefabUtility.GetPrefabParent(gameObject).GetInstanceID()); // + ". New Material is " + newMaterial.name + " with ID " + newMaterial.GetInstanceID() + ". Base Material is " + m_baseMaterial.name + " with ID " + m_baseMaterial.GetInstanceID()); + + // Check if event applies to this current object + #if UNITY_2018_2_OR_NEWER + if (obj == gameObject || UnityEditor.PrefabUtility.GetCorrespondingObjectFromSource(gameObject) == obj) + #else + if (obj == gameObject || UnityEditor.PrefabUtility.GetPrefabParent(gameObject) == obj) + #endif + { + UnityEditor.Undo.RecordObject(this, "Material Assignment"); + UnityEditor.Undo.RecordObject(m_canvasRenderer, "Material Assignment"); + + m_sharedMaterial = newMaterial; + + m_padding = GetPaddingForMaterial(); + + m_havePropertiesChanged = true; + SetVerticesDirty(); + SetMaterialDirty(); + } + } + + + // Event received when Text Styles are changed. + void ON_TEXT_STYLE_CHANGED(bool isChanged) + { + m_havePropertiesChanged = true; + m_isInputParsingRequired = true; + SetVerticesDirty(); + } + + + /// <summary> + /// Event received when a Color Gradient Preset is modified. + /// </summary> + /// <param name="textObject"></param> + void ON_COLOR_GRADIENT_CHANGED(TMP_ColorGradient gradient) + { + if (m_fontColorGradientPreset != null && gradient.GetInstanceID() == m_fontColorGradientPreset.GetInstanceID()) + { + m_havePropertiesChanged = true; + SetVerticesDirty(); + } + } + + + /// <summary> + /// Event received when the TMP Settings are changed. + /// </summary> + void ON_TMP_SETTINGS_CHANGED() + { + m_defaultSpriteAsset = null; + m_havePropertiesChanged = true; + m_isInputParsingRequired = true; + SetAllDirty(); + } + #endif + + + // Function which loads either the default font or a newly assigned font asset. This function also assigned the appropriate material to the renderer. + protected override void LoadFontAsset() + { + //Debug.Log("***** LoadFontAsset() *****"); //TextMeshPro LoadFontAsset() has been called."); // Current Font Asset is " + (font != null ? font.name: "Null") ); + + ShaderUtilities.GetShaderPropertyIDs(); // Initialize & Get shader property IDs. + + if (m_fontAsset == null) + { + if (TMP_Settings.defaultFontAsset != null) + m_fontAsset = TMP_Settings.defaultFontAsset; + else + m_fontAsset = Resources.Load<TMP_FontAsset>("Fonts & Materials/LiberationSans SDF"); + + if (m_fontAsset == null) + { + Debug.LogWarning("The LiberationSans SDF Font Asset was not found. There is no Font Asset assigned to " + gameObject.name + ".", this); + return; + } + + if (m_fontAsset.characterLookupTable == null) + { + Debug.Log("Dictionary is Null!"); + } + + m_sharedMaterial = m_fontAsset.material; + } + else + { + // Read font definition if needed. + if (m_fontAsset.characterLookupTable == null) + m_fontAsset.ReadFontAssetDefinition(); + + // Added for compatibility with previous releases. + if (m_sharedMaterial == null && m_baseMaterial != null) + { + m_sharedMaterial = m_baseMaterial; + m_baseMaterial = null; + } + + // If font atlas texture doesn't match the assigned material font atlas, switch back to default material specified in the Font Asset. + if (m_sharedMaterial == null || m_sharedMaterial.GetTexture(ShaderUtilities.ID_MainTex) == null || m_fontAsset.atlasTexture.GetInstanceID() != m_sharedMaterial.GetTexture(ShaderUtilities.ID_MainTex).GetInstanceID()) + { + if (m_fontAsset.material == null) + Debug.LogWarning("The Font Atlas Texture of the Font Asset " + m_fontAsset.name + " assigned to " + gameObject.name + " is missing.", this); + else + m_sharedMaterial = m_fontAsset.material; + } + } + + + // Find and cache Underline & Ellipsis characters. + GetSpecialCharacters(m_fontAsset); + + m_padding = GetPaddingForMaterial(); + + SetMaterialDirty(); + } + + + /// <summary> + /// Method to retrieve the parent Canvas. + /// </summary> + private Canvas GetCanvas() + { + Canvas canvas = null; + var list = TMP_ListPool<Canvas>.Get(); + + gameObject.GetComponentsInParent(false, list); + if (list.Count > 0) + { + // Find the first active and enabled canvas. + for (int i = 0; i < list.Count; ++i) + { + if (list[i].isActiveAndEnabled) + { + canvas = list[i]; + break; + } + } + } + + TMP_ListPool<Canvas>.Release(list); + + return canvas; + } + + + /// <summary> + /// Method used when animating the Env Map on the material. + /// </summary> + void UpdateEnvMapMatrix() + { + if (!m_sharedMaterial.HasProperty(ShaderUtilities.ID_EnvMap) || m_sharedMaterial.GetTexture(ShaderUtilities.ID_EnvMap) == null) + return; + + //Debug.Log("Updating Env Matrix..."); + Vector3 rotation = m_sharedMaterial.GetVector(ShaderUtilities.ID_EnvMatrixRotation); + m_EnvMapMatrix = Matrix4x4.TRS(Vector3.zero, Quaternion.Euler(rotation), Vector3.one); + + m_sharedMaterial.SetMatrix(ShaderUtilities.ID_EnvMatrix, m_EnvMapMatrix); + } + + + // Enable Masking in the Shader + void EnableMasking() + { + if (m_fontMaterial == null) + { + m_fontMaterial = CreateMaterialInstance(m_sharedMaterial); + m_canvasRenderer.SetMaterial(m_fontMaterial, m_sharedMaterial.GetTexture(ShaderUtilities.ID_MainTex)); + } + + m_sharedMaterial = m_fontMaterial; + if (m_sharedMaterial.HasProperty(ShaderUtilities.ID_ClipRect)) + { + m_sharedMaterial.EnableKeyword(ShaderUtilities.Keyword_MASK_SOFT); + m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_HARD); + m_sharedMaterial.DisableKeyword(ShaderUtilities.Keyword_MASK_TEX); + + UpdateMask(); // Update Masking Coordinates + } + + m_isMaskingEnabled = true; + + //m_uiRenderer.SetMaterial(m_sharedMaterial, null); + + //m_padding = ShaderUtilities.GetPadding(m_sharedMaterial, m_enableExtraPadding, m_isUsingBold); + //m_alignmentPadding = ShaderUtilities.GetFontExtent(m_sharedMaterial); + + /* + Material mat = m_uiRenderer.GetMaterial(); + if (mat.HasProperty(ShaderUtilities.ID_MaskCoord)) + { + mat.EnableKeyword("MASK_SOFT"); + mat.DisableKeyword("MASK_HARD"); + mat.DisableKeyword("MASK_OFF"); + + m_isMaskingEnabled = true; + UpdateMask(); + } + */ + } + + + // Enable Masking in the Shader + void DisableMasking() + { + if (m_fontMaterial != null) + { + if (m_stencilID > 0) + m_sharedMaterial = m_MaskMaterial; + else + m_sharedMaterial = m_baseMaterial; + + m_canvasRenderer.SetMaterial(m_sharedMaterial, m_sharedMaterial.GetTexture(ShaderUtilities.ID_MainTex)); + + DestroyImmediate(m_fontMaterial); + } + + m_isMaskingEnabled = false; + + /* + if (m_maskingMaterial != null && m_stencilID == 0) + { + m_sharedMaterial = m_baseMaterial; + m_uiRenderer.SetMaterial(m_sharedMaterial, null); + } + else if (m_stencilID > 0) + { + m_sharedMaterial.EnableKeyword("MASK_OFF"); + m_sharedMaterial.DisableKeyword("MASK_HARD"); + m_sharedMaterial.DisableKeyword("MASK_SOFT"); + } + */ + + + /* + Material mat = m_uiRenderer.GetMaterial(); + if (mat.HasProperty(ShaderUtilities.ID_MaskCoord)) + { + mat.EnableKeyword("MASK_OFF"); + mat.DisableKeyword("MASK_HARD"); + mat.DisableKeyword("MASK_SOFT"); + + m_isMaskingEnabled = false; + UpdateMask(); + } + */ + } + + + // Update & recompute Mask offset + void UpdateMask() + { + //Debug.Log("Updating Mask..."); + + if (m_rectTransform != null) + { + //Material mat = m_uiRenderer.GetMaterial(); + //if (mat == null || (m_overflowMode == TextOverflowModes.ScrollRect && m_isScrollRegionSet)) + // return; + + if (!ShaderUtilities.isInitialized) + ShaderUtilities.GetShaderPropertyIDs(); + + //Debug.Log("Setting Mask for the first time."); + + m_isScrollRegionSet = true; + + float softnessX = Mathf.Min(Mathf.Min(m_margin.x, m_margin.z), m_sharedMaterial.GetFloat(ShaderUtilities.ID_MaskSoftnessX)); + float softnessY = Mathf.Min(Mathf.Min(m_margin.y, m_margin.w), m_sharedMaterial.GetFloat(ShaderUtilities.ID_MaskSoftnessY)); + + softnessX = softnessX > 0 ? softnessX : 0; + softnessY = softnessY > 0 ? softnessY : 0; + + float width = (m_rectTransform.rect.width - Mathf.Max(m_margin.x, 0) - Mathf.Max(m_margin.z, 0)) / 2 + softnessX; + float height = (m_rectTransform.rect.height - Mathf.Max(m_margin.y, 0) - Mathf.Max(m_margin.w, 0)) / 2 + softnessY; + + + Vector2 center = m_rectTransform.localPosition + new Vector3((0.5f - m_rectTransform.pivot.x) * m_rectTransform.rect.width + (Mathf.Max(m_margin.x, 0) - Mathf.Max(m_margin.z, 0)) / 2, (0.5f - m_rectTransform.pivot.y) * m_rectTransform.rect.height + (-Mathf.Max(m_margin.y, 0) + Mathf.Max(m_margin.w, 0)) / 2); + + //Vector2 center = m_rectTransform.localPosition + new Vector3((0.5f - m_rectTransform.pivot.x) * m_rectTransform.rect.width + (margin.x - margin.z) / 2, (0.5f - m_rectTransform.pivot.y) * m_rectTransform.rect.height + (-margin.y + margin.w) / 2); + Vector4 mask = new Vector4(center.x, center.y, width, height); + //Debug.Log(mask); + + + + //Rect rect = new Rect(0, 0, m_rectTransform.rect.width + margin.x + margin.z, m_rectTransform.rect.height + margin.y + margin.w); + //int softness = (int)m_sharedMaterial.GetFloat(ShaderUtilities.ID_MaskSoftnessX) / 2; + m_sharedMaterial.SetVector(ShaderUtilities.ID_ClipRect, mask); + } + } + + + // Function called internally when a new material is assigned via the fontMaterial property. + protected override Material GetMaterial(Material mat) + { + // Get Shader PropertyIDs if they haven't been cached already. + ShaderUtilities.GetShaderPropertyIDs(); + + // Check in case Object is disabled. If so, we don't have a valid reference to the Renderer. + // This can occur when the Duplicate Material Context menu is used on an inactive object. + //if (m_canvasRenderer == null) + // m_canvasRenderer = GetComponent<CanvasRenderer>(); + + // Create Instance Material only if the new material is not the same instance previously used. + if (m_fontMaterial == null || m_fontMaterial.GetInstanceID() != mat.GetInstanceID()) + m_fontMaterial = CreateMaterialInstance(mat); + + m_sharedMaterial = m_fontMaterial; + + m_padding = GetPaddingForMaterial(); + + m_ShouldRecalculateStencil = true; + SetVerticesDirty(); + SetMaterialDirty(); + + return m_sharedMaterial; + } + + + /// <summary> + /// Method returning instances of the materials used by the text object. + /// </summary> + /// <returns></returns> + protected override Material[] GetMaterials(Material[] mats) + { + int materialCount = m_textInfo.materialCount; + + if (m_fontMaterials == null) + m_fontMaterials = new Material[materialCount]; + else if (m_fontMaterials.Length != materialCount) + TMP_TextInfo.Resize(ref m_fontMaterials, materialCount, false); + + // Get instances of the materials + for (int i = 0; i < materialCount; i++) + { + if (i == 0) + m_fontMaterials[i] = fontMaterial; + else + m_fontMaterials[i] = m_subTextObjects[i].material; + } + + m_fontSharedMaterials = m_fontMaterials; + + return m_fontMaterials; + } + + + // Function called internally when a new shared material is assigned via the fontSharedMaterial property. + protected override void SetSharedMaterial(Material mat) + { + // Check in case Object is disabled. If so, we don't have a valid reference to the Renderer. + // This can occur when the Duplicate Material Context menu is used on an inactive object. + //if (m_canvasRenderer == null) + // m_canvasRenderer = GetComponent<CanvasRenderer>(); + + m_sharedMaterial = mat; + + m_padding = GetPaddingForMaterial(); + + SetMaterialDirty(); + } + + + /// <summary> + /// Method returning an array containing the materials used by the text object. + /// </summary> + /// <returns></returns> + protected override Material[] GetSharedMaterials() + { + int materialCount = m_textInfo.materialCount; + + if (m_fontSharedMaterials == null) + m_fontSharedMaterials = new Material[materialCount]; + else if (m_fontSharedMaterials.Length != materialCount) + TMP_TextInfo.Resize(ref m_fontSharedMaterials, materialCount, false); + + for (int i = 0; i < materialCount; i++) + { + if (i == 0) + m_fontSharedMaterials[i] = m_sharedMaterial; + else + m_fontSharedMaterials[i] = m_subTextObjects[i].sharedMaterial; + } + + return m_fontSharedMaterials; + } + + + /// <summary> + /// Method used to assign new materials to the text and sub text objects. + /// </summary> + protected override void SetSharedMaterials(Material[] materials) + { + int materialCount = m_textInfo.materialCount; + + // Check allocation of the fontSharedMaterials array. + if (m_fontSharedMaterials == null) + m_fontSharedMaterials = new Material[materialCount]; + else if (m_fontSharedMaterials.Length != materialCount) + TMP_TextInfo.Resize(ref m_fontSharedMaterials, materialCount, false); + + // Only assign as many materials as the text object contains. + for (int i = 0; i < materialCount; i++) + { + if (i == 0) + { + // Only assign new material if the font atlas textures match. + if (materials[i].GetTexture(ShaderUtilities.ID_MainTex) == null || materials[i].GetTexture(ShaderUtilities.ID_MainTex).GetInstanceID() != m_sharedMaterial.GetTexture(ShaderUtilities.ID_MainTex).GetInstanceID()) + continue; + + m_sharedMaterial = m_fontSharedMaterials[i] = materials[i]; + m_padding = GetPaddingForMaterial(m_sharedMaterial); + } + else + { + // Only assign new material if the font atlas textures match. + if (materials[i].GetTexture(ShaderUtilities.ID_MainTex) == null || materials[i].GetTexture(ShaderUtilities.ID_MainTex).GetInstanceID() != m_subTextObjects[i].sharedMaterial.GetTexture(ShaderUtilities.ID_MainTex).GetInstanceID()) + continue; + + // Only assign a new material if none were specified in the text input. + if (m_subTextObjects[i].isDefaultMaterial) + m_subTextObjects[i].sharedMaterial = m_fontSharedMaterials[i] = materials[i]; + } + } + } + + + // This function will create an instance of the Font Material. + protected override void SetOutlineThickness(float thickness) + { + // Use material instance if one exists. Otherwise, create a new instance of the shared material. + if (m_fontMaterial != null && m_sharedMaterial.GetInstanceID() != m_fontMaterial.GetInstanceID()) + { + m_sharedMaterial = m_fontMaterial; + m_canvasRenderer.SetMaterial(m_sharedMaterial, m_sharedMaterial.GetTexture(ShaderUtilities.ID_MainTex)); + } + else if(m_fontMaterial == null) + { + m_fontMaterial = CreateMaterialInstance(m_sharedMaterial); + m_sharedMaterial = m_fontMaterial; + m_canvasRenderer.SetMaterial(m_sharedMaterial, m_sharedMaterial.GetTexture(ShaderUtilities.ID_MainTex)); + } + + thickness = Mathf.Clamp01(thickness); + m_sharedMaterial.SetFloat(ShaderUtilities.ID_OutlineWidth, thickness); + m_padding = GetPaddingForMaterial(); + } + + + // This function will create an instance of the Font Material. + protected override void SetFaceColor(Color32 color) + { + // Use material instance if one exists. Otherwise, create a new instance of the shared material. + if (m_fontMaterial == null) + m_fontMaterial = CreateMaterialInstance(m_sharedMaterial); + + m_sharedMaterial = m_fontMaterial; + m_padding = GetPaddingForMaterial(); + + m_sharedMaterial.SetColor(ShaderUtilities.ID_FaceColor, color); + } + + + // This function will create an instance of the Font Material. + protected override void SetOutlineColor(Color32 color) + { + // Use material instance if one exists. Otherwise, create a new instance of the shared material. + if (m_fontMaterial == null) + m_fontMaterial = CreateMaterialInstance(m_sharedMaterial); + + m_sharedMaterial = m_fontMaterial; + m_padding = GetPaddingForMaterial(); + + m_sharedMaterial.SetColor(ShaderUtilities.ID_OutlineColor, color); + } + + + // Sets the Render Queue and Ztest mode + protected override void SetShaderDepth() + { + if (m_canvas == null || m_sharedMaterial == null) + return; + + if (m_canvas.renderMode == RenderMode.ScreenSpaceOverlay || m_isOverlay) + { + // Should this use an instanced material? + m_sharedMaterial.SetFloat(ShaderUtilities.ShaderTag_ZTestMode, 0); + } + else + { // TODO: This section needs to be tested. + m_sharedMaterial.SetFloat(ShaderUtilities.ShaderTag_ZTestMode, 4); + } + } + + + // Sets the Culling mode of the material + protected override void SetCulling() + { + if (m_isCullingEnabled) + { + Material mat = materialForRendering; + + if (mat != null) + mat.SetFloat("_CullMode", 2); + + for (int i = 1; i < m_subTextObjects.Length && m_subTextObjects[i] != null; i++) + { + mat = m_subTextObjects[i].materialForRendering; + + if (mat != null) + { + mat.SetFloat(ShaderUtilities.ShaderTag_CullMode, 2); + } + } + } + else + { + Material mat = materialForRendering; + + if (mat != null) + mat.SetFloat("_CullMode", 0); + + for (int i = 1; i < m_subTextObjects.Length && m_subTextObjects[i] != null; i++) + { + mat = m_subTextObjects[i].materialForRendering; + + if (mat != null) + { + mat.SetFloat(ShaderUtilities.ShaderTag_CullMode, 0); + } + } + } + } + + + // Set Perspective Correction Mode based on whether Camera is Orthographic or Perspective + void SetPerspectiveCorrection() + { + if (m_isOrthographic) + m_sharedMaterial.SetFloat(ShaderUtilities.ID_PerspectiveFilter, 0.0f); + else + m_sharedMaterial.SetFloat(ShaderUtilities.ID_PerspectiveFilter, 0.875f); + } + + + /// <summary> + /// Get the padding value for the currently assigned material. + /// </summary> + /// <returns></returns> + protected override float GetPaddingForMaterial(Material mat) + { + m_padding = ShaderUtilities.GetPadding(mat, m_enableExtraPadding, m_isUsingBold); + m_isMaskingEnabled = ShaderUtilities.IsMaskingEnabled(m_sharedMaterial); + m_isSDFShader = mat.HasProperty(ShaderUtilities.ID_WeightNormal); + + return m_padding; + } + + + /// <summary> + /// Get the padding value for the currently assigned material. + /// </summary> + /// <returns></returns> + protected override float GetPaddingForMaterial() + { + ShaderUtilities.GetShaderPropertyIDs(); + + m_padding = ShaderUtilities.GetPadding(m_sharedMaterial, m_enableExtraPadding, m_isUsingBold); + m_isMaskingEnabled = ShaderUtilities.IsMaskingEnabled(m_sharedMaterial); + m_isSDFShader = m_sharedMaterial.HasProperty(ShaderUtilities.ID_WeightNormal); + + return m_padding; + } + + // Function to allocate the necessary buffers to render the text. This function is called whenever the buffer size needs to be increased. + void SetMeshArrays(int size) + { + m_textInfo.meshInfo[0].ResizeMeshInfo(size); + + m_canvasRenderer.SetMesh(m_textInfo.meshInfo[0].mesh); + } + + + // This function parses through the Char[] to determine how many characters will be visible. It then makes sure the arrays are large enough for all those characters. + protected override int SetArraySizes(UnicodeChar[] chars) + { + //Debug.Log("*** SetArraySizes() on Instance ID (" + GetInstanceID() + ") ***"); + #if TMP_PROFILE_ON + Profiler.BeginSample("SetArraySizes"); + #endif + + int spriteCount = 0; + + m_totalCharacterCount = 0; + m_isUsingBold = false; + m_isParsingText = false; + tag_NoParsing = false; + m_FontStyleInternal = m_fontStyle; + + m_FontWeightInternal = (m_FontStyleInternal & FontStyles.Bold) == FontStyles.Bold ? FontWeight.Bold : m_fontWeight; + m_FontWeightStack.SetDefault(m_FontWeightInternal); + + m_currentFontAsset = m_fontAsset; + m_currentMaterial = m_sharedMaterial; + m_currentMaterialIndex = 0; + + m_materialReferenceStack.SetDefault(new MaterialReference(m_currentMaterialIndex, m_currentFontAsset, null, m_currentMaterial, m_padding)); + + m_materialReferenceIndexLookup.Clear(); + MaterialReference.AddMaterialReference(m_currentMaterial, m_currentFontAsset, m_materialReferences, m_materialReferenceIndexLookup); + + if (m_textInfo == null) m_textInfo = new TMP_TextInfo(); + m_textElementType = TMP_TextElementType.Character; + + // Clear Linked Text object if we have one. + if (m_linkedTextComponent != null) + { + m_linkedTextComponent.text = string.Empty; + m_linkedTextComponent.ForceMeshUpdate(); + } + + // Parsing XML tags in the text + for (int i = 0; i < chars.Length && chars[i].unicode != 0; i++) + { + //Make sure the characterInfo array can hold the next text element. + if (m_textInfo.characterInfo == null || m_totalCharacterCount >= m_textInfo.characterInfo.Length) + TMP_TextInfo.Resize(ref m_textInfo.characterInfo, m_totalCharacterCount + 1, true); + + int unicode = chars[i].unicode; + + // PARSE XML TAGS + #region PARSE XML TAGS + if (m_isRichText && unicode == 60) // if Char '<' + { + int prev_MaterialIndex = m_currentMaterialIndex; + int tagEndIndex; + + // Check if Tag is Valid + if (ValidateHtmlTag(chars, i + 1, out tagEndIndex)) + { + int tagStartIndex = chars[i].stringIndex; + i = tagEndIndex; + + if ((m_FontStyleInternal & FontStyles.Bold) == FontStyles.Bold) m_isUsingBold = true; + + if (m_textElementType == TMP_TextElementType.Sprite) + { + m_materialReferences[m_currentMaterialIndex].referenceCount += 1; + + m_textInfo.characterInfo[m_totalCharacterCount].character = (char)(57344 + m_spriteIndex); + m_textInfo.characterInfo[m_totalCharacterCount].spriteIndex = m_spriteIndex; + m_textInfo.characterInfo[m_totalCharacterCount].fontAsset = m_currentFontAsset; + m_textInfo.characterInfo[m_totalCharacterCount].spriteAsset = m_currentSpriteAsset; + m_textInfo.characterInfo[m_totalCharacterCount].materialReferenceIndex = m_currentMaterialIndex; + m_textInfo.characterInfo[m_totalCharacterCount].textElement = m_currentSpriteAsset.spriteCharacterTable[m_spriteIndex]; + m_textInfo.characterInfo[m_totalCharacterCount].elementType = m_textElementType; + m_textInfo.characterInfo[m_totalCharacterCount].index = tagStartIndex; + m_textInfo.characterInfo[m_totalCharacterCount].stringLength = chars[i].stringIndex - tagStartIndex + 1; + + // Restore element type and material index to previous values. + m_textElementType = TMP_TextElementType.Character; + m_currentMaterialIndex = prev_MaterialIndex; + + spriteCount += 1; + m_totalCharacterCount += 1; + } + + continue; + } + } + #endregion + + bool isUsingAlternativeTypeface = false; + bool isUsingFallbackOrAlternativeTypeface = false; + + TMP_Character character; + TMP_FontAsset tempFontAsset; + TMP_FontAsset prev_fontAsset = m_currentFontAsset; + Material prev_material = m_currentMaterial; + int prev_materialIndex = m_currentMaterialIndex; + + + // Handle Font Styles like LowerCase, UpperCase and SmallCaps. + #region Handling of LowerCase, UpperCase and SmallCaps Font Styles + if (m_textElementType == TMP_TextElementType.Character) + { + if ((m_FontStyleInternal & FontStyles.UpperCase) == FontStyles.UpperCase) + { + // If this character is lowercase, switch to uppercase. + if (char.IsLower((char)unicode)) + unicode = char.ToUpper((char)unicode); + + } + else if ((m_FontStyleInternal & FontStyles.LowerCase) == FontStyles.LowerCase) + { + // If this character is uppercase, switch to lowercase. + if (char.IsUpper((char)unicode)) + unicode = char.ToLower((char)unicode); + } + else if ((m_FontStyleInternal & FontStyles.SmallCaps) == FontStyles.SmallCaps) + { + // Only convert lowercase characters to uppercase. + if (char.IsLower((char)unicode)) + unicode = char.ToUpper((char)unicode); + } + } + #endregion + + + // Lookup the Glyph data for each character and cache it. + #region LOOKUP GLYPH + character = TMP_FontAssetUtilities.GetCharacterFromFontAsset((uint)unicode, m_currentFontAsset, false, m_FontStyleInternal, m_FontWeightInternal, out isUsingAlternativeTypeface, out tempFontAsset); + + // Search for the glyph in the list of fallback assigned to the primary font asset. + if (character == null) + { + if (m_currentFontAsset.fallbackFontAssetTable != null && m_currentFontAsset.fallbackFontAssetTable.Count > 0) + character = TMP_FontAssetUtilities.GetCharacterFromFontAssets((uint)unicode, m_currentFontAsset.fallbackFontAssetTable, true, m_FontStyleInternal, m_FontWeightInternal, out isUsingAlternativeTypeface, out tempFontAsset); + } + + // Search for the glyph in the Sprite Asset assigned to the text object. + if (character == null) + { + TMP_SpriteAsset spriteAsset = this.spriteAsset; + + if (spriteAsset != null) + { + int spriteIndex = -1; + + // Check Default Sprite Asset and its Fallbacks + spriteAsset = TMP_SpriteAsset.SearchForSpriteByUnicode(spriteAsset, (uint)unicode, true, out spriteIndex); + + if (spriteIndex != -1) + { + m_textElementType = TMP_TextElementType.Sprite; + m_textInfo.characterInfo[m_totalCharacterCount].elementType = m_textElementType; + + m_currentMaterialIndex = MaterialReference.AddMaterialReference(spriteAsset.material, spriteAsset, m_materialReferences, m_materialReferenceIndexLookup); + m_materialReferences[m_currentMaterialIndex].referenceCount += 1; + + m_textInfo.characterInfo[m_totalCharacterCount].character = (char)unicode; + m_textInfo.characterInfo[m_totalCharacterCount].spriteIndex = spriteIndex; + m_textInfo.characterInfo[m_totalCharacterCount].fontAsset = m_currentFontAsset; + m_textInfo.characterInfo[m_totalCharacterCount].spriteAsset = spriteAsset; + m_textInfo.characterInfo[m_totalCharacterCount].textElement = spriteAsset.spriteCharacterTable[m_spriteIndex]; + m_textInfo.characterInfo[m_totalCharacterCount].materialReferenceIndex = m_currentMaterialIndex; + m_textInfo.characterInfo[m_totalCharacterCount].index = chars[i].stringIndex; + m_textInfo.characterInfo[m_totalCharacterCount].stringLength = chars[i].length; + + // Restore element type and material index to previous values. + m_textElementType = TMP_TextElementType.Character; + m_currentMaterialIndex = prev_materialIndex; + + spriteCount += 1; + m_totalCharacterCount += 1; + + continue; + } + } + } + + // Search for the glyph in the list of fallback assigned in the TMP Settings (General Fallbacks). + if (character == null) + { + if (TMP_Settings.fallbackFontAssets != null && TMP_Settings.fallbackFontAssets.Count > 0) + character = TMP_FontAssetUtilities.GetCharacterFromFontAssets((uint)unicode, TMP_Settings.fallbackFontAssets, true, m_FontStyleInternal, m_FontWeightInternal, out isUsingAlternativeTypeface, out tempFontAsset); + } + + // Search for the glyph in the Default Font Asset assigned in the TMP Settings file. + if (character == null) + { + if (TMP_Settings.defaultFontAsset != null) + character = TMP_FontAssetUtilities.GetCharacterFromFontAsset((uint)unicode, TMP_Settings.defaultFontAsset, true, m_FontStyleInternal, m_FontWeightInternal, out isUsingAlternativeTypeface, out tempFontAsset); + } + + // TODO: Add support for using Sprite Assets like a special Emoji only Sprite Asset when UTF16 or UTF32 glyphs are requested. + // This would kind of mirror native Emoji support. + if (character == null) + { + TMP_SpriteAsset spriteAsset = TMP_Settings.defaultSpriteAsset; + + if (spriteAsset != null) + { + int spriteIndex = -1; + + // Check Default Sprite Asset and its Fallbacks + spriteAsset = TMP_SpriteAsset.SearchForSpriteByUnicode(spriteAsset, (uint)unicode, true, out spriteIndex); + + if (spriteIndex != -1) + { + m_textElementType = TMP_TextElementType.Sprite; + m_textInfo.characterInfo[m_totalCharacterCount].elementType = m_textElementType; + + m_currentMaterialIndex = MaterialReference.AddMaterialReference(spriteAsset.material, spriteAsset, m_materialReferences, m_materialReferenceIndexLookup); + m_materialReferences[m_currentMaterialIndex].referenceCount += 1; + + m_textInfo.characterInfo[m_totalCharacterCount].character = (char)unicode; + m_textInfo.characterInfo[m_totalCharacterCount].spriteIndex = spriteIndex; + m_textInfo.characterInfo[m_totalCharacterCount].fontAsset = m_currentFontAsset; + m_textInfo.characterInfo[m_totalCharacterCount].spriteAsset = spriteAsset; + m_textInfo.characterInfo[m_totalCharacterCount].textElement = spriteAsset.spriteCharacterTable[m_spriteIndex]; + m_textInfo.characterInfo[m_totalCharacterCount].materialReferenceIndex = m_currentMaterialIndex; + m_textInfo.characterInfo[m_totalCharacterCount].index = chars[i].stringIndex; + m_textInfo.characterInfo[m_totalCharacterCount].stringLength = chars[i].length; + + // Restore element type and material index to previous values. + m_textElementType = TMP_TextElementType.Character; + m_currentMaterialIndex = prev_materialIndex; + + spriteCount += 1; + m_totalCharacterCount += 1; + + continue; + } + + } + } + + //Check if Lowercase or Uppercase variant of the character is available. + // Not sure this is necessary anyone as it is very unlikely with recursive search through fallback fonts. + //if (glyph == null) + //{ + // if (char.IsLower((char)c)) + // { + // if (m_currentFontAsset.characterDictionary.TryGetValue(char.ToUpper((char)c), out glyph)) + // c = chars[i] = char.ToUpper((char)c); + // } + // else if (char.IsUpper((char)c)) + // { + // if (m_currentFontAsset.characterDictionary.TryGetValue(char.ToLower((char)c), out glyph)) + // c = chars[i] = char.ToLower((char)c); + // } + //} + + // Replace missing glyph by the Square (9633) glyph or possibly the Space (32) glyph. + if (character == null) + { + // Save the original unicode character + int srcGlyph = unicode; + + // Try replacing the missing glyph character by TMP Settings Missing Glyph or Square (9633) character. + unicode = chars[i].unicode = TMP_Settings.missingGlyphCharacter == 0 ? 9633 : TMP_Settings.missingGlyphCharacter; + + // Check for the missing glyph character in the currently assigned font asset and its fallbacks + character = TMP_FontAssetUtilities.GetCharacterFromFontAsset((uint)unicode, m_currentFontAsset, true, m_FontStyleInternal, m_FontWeightInternal, out isUsingAlternativeTypeface, out tempFontAsset); + + if (character == null) + { + // Search for the missing glyph character in the TMP Settings Fallback list. + if (TMP_Settings.fallbackFontAssets != null && TMP_Settings.fallbackFontAssets.Count > 0) + character = TMP_FontAssetUtilities.GetCharacterFromFontAssets((uint)unicode, TMP_Settings.fallbackFontAssets, true, m_FontStyleInternal, m_FontWeightInternal, out isUsingAlternativeTypeface, out tempFontAsset); + } + + if (character == null) + { + // Search for the missing glyph in the TMP Settings Default Font Asset. + if (TMP_Settings.defaultFontAsset != null) + character = TMP_FontAssetUtilities.GetCharacterFromFontAsset((uint)unicode, TMP_Settings.defaultFontAsset, true, m_FontStyleInternal, m_FontWeightInternal, out isUsingAlternativeTypeface, out tempFontAsset); + } + + if (character == null) + { + // Use Space (32) Glyph from the currently assigned font asset. + unicode = chars[i].unicode = 32; + character = TMP_FontAssetUtilities.GetCharacterFromFontAsset((uint)unicode, m_currentFontAsset, true, m_FontStyleInternal, m_FontWeightInternal, out isUsingAlternativeTypeface, out tempFontAsset); + if (!TMP_Settings.warningsDisabled) Debug.LogWarning("Character with ASCII value of " + srcGlyph + " was not found in the Font Asset Glyph Table. It was replaced by a space.", this); + } + } + + // Determine if the font asset is still the current font asset or a fallback. + if (tempFontAsset != null) + { + if (tempFontAsset.GetInstanceID() != m_currentFontAsset.GetInstanceID()) + { + isUsingFallbackOrAlternativeTypeface = true; + m_currentFontAsset = tempFontAsset; + } + } + #endregion + + + m_textInfo.characterInfo[m_totalCharacterCount].elementType = TMP_TextElementType.Character; + m_textInfo.characterInfo[m_totalCharacterCount].textElement = character; + m_textInfo.characterInfo[m_totalCharacterCount].isUsingAlternateTypeface = isUsingAlternativeTypeface; + m_textInfo.characterInfo[m_totalCharacterCount].character = (char)unicode; + m_textInfo.characterInfo[m_totalCharacterCount].fontAsset = m_currentFontAsset; + m_textInfo.characterInfo[m_totalCharacterCount].index = chars[i].stringIndex; + m_textInfo.characterInfo[m_totalCharacterCount].stringLength = chars[i].length; + + if (isUsingFallbackOrAlternativeTypeface) + { + // Create Fallback material instance matching current material preset if necessary + if (TMP_Settings.matchMaterialPreset) + m_currentMaterial = TMP_MaterialManager.GetFallbackMaterial(m_currentMaterial, m_currentFontAsset.material); + else + m_currentMaterial = m_currentFontAsset.material; + + m_currentMaterialIndex = MaterialReference.AddMaterialReference(m_currentMaterial, m_currentFontAsset, m_materialReferences, m_materialReferenceIndexLookup); + } + + if (!char.IsWhiteSpace((char)unicode) && unicode != 0x200B) + { + // Limit the mesh of the main text object to 65535 vertices and use sub objects for the overflow. + if (m_materialReferences[m_currentMaterialIndex].referenceCount < 16383) + m_materialReferences[m_currentMaterialIndex].referenceCount += 1; + else + { + m_currentMaterialIndex = MaterialReference.AddMaterialReference(new Material(m_currentMaterial), m_currentFontAsset, m_materialReferences, m_materialReferenceIndexLookup); + m_materialReferences[m_currentMaterialIndex].referenceCount += 1; + } + } + + m_textInfo.characterInfo[m_totalCharacterCount].material = m_currentMaterial; + m_textInfo.characterInfo[m_totalCharacterCount].materialReferenceIndex = m_currentMaterialIndex; + m_materialReferences[m_currentMaterialIndex].isFallbackMaterial = isUsingFallbackOrAlternativeTypeface; + + // Restore previous font asset and material if fallback font was used. + if (isUsingFallbackOrAlternativeTypeface) + { + m_materialReferences[m_currentMaterialIndex].fallbackMaterial = prev_material; + m_currentFontAsset = prev_fontAsset; + m_currentMaterial = prev_material; + m_currentMaterialIndex = prev_materialIndex; + } + + m_totalCharacterCount += 1; + } + + // Early return if we are calculating the preferred values. + if (m_isCalculatingPreferredValues) + { + m_isCalculatingPreferredValues = false; + m_isInputParsingRequired = true; + return m_totalCharacterCount; + } + + // Save material and sprite count. + m_textInfo.spriteCount = spriteCount; + int materialCount = m_textInfo.materialCount = m_materialReferenceIndexLookup.Count; + + // Check if we need to resize the MeshInfo array for handling different materials. + if (materialCount > m_textInfo.meshInfo.Length) + TMP_TextInfo.Resize(ref m_textInfo.meshInfo, materialCount, false); + + // Resize SubTextObject array if necessary + if (materialCount > m_subTextObjects.Length) + TMP_TextInfo.Resize(ref m_subTextObjects, Mathf.NextPowerOfTwo(materialCount + 1)); + + // Resize CharacterInfo[] if allocations are excessive + if (m_textInfo.characterInfo.Length - m_totalCharacterCount > 256) + TMP_TextInfo.Resize(ref m_textInfo.characterInfo, Mathf.Max(m_totalCharacterCount + 1, 256), true); + + + // Iterate through the material references to set the mesh buffer allocations + for (int i = 0; i < materialCount; i++) + { + // Add new sub text object for each material reference + if (i > 0) + { + if (m_subTextObjects[i] == null) + { + m_subTextObjects[i] = TMP_SubMeshUI.AddSubTextObject(this, m_materialReferences[i]); + + // Not sure this is necessary + m_textInfo.meshInfo[i].vertices = null; + } + //else if (m_subTextObjects[i].gameObject.activeInHierarchy == false) + // m_subTextObjects[i].gameObject.SetActive(true); + + // Make sure the pivots are synchronized + if (m_rectTransform.pivot != m_subTextObjects[i].rectTransform.pivot) + m_subTextObjects[i].rectTransform.pivot = m_rectTransform.pivot; + + // Check if the material has changed. + if (m_subTextObjects[i].sharedMaterial == null || m_subTextObjects[i].sharedMaterial.GetInstanceID() != m_materialReferences[i].material.GetInstanceID()) + { + bool isDefaultMaterial = m_materialReferences[i].isDefaultMaterial; + + m_subTextObjects[i].isDefaultMaterial = isDefaultMaterial; + + // Assign new material if we are not using the default material or if the font asset has changed. + if (!isDefaultMaterial || m_subTextObjects[i].sharedMaterial == null || m_subTextObjects[i].sharedMaterial.GetTexture(ShaderUtilities.ID_MainTex).GetInstanceID() != m_materialReferences[i].material.GetTexture(ShaderUtilities.ID_MainTex).GetInstanceID()) + { + m_subTextObjects[i].sharedMaterial = m_materialReferences[i].material; + m_subTextObjects[i].fontAsset = m_materialReferences[i].fontAsset; + m_subTextObjects[i].spriteAsset = m_materialReferences[i].spriteAsset; + } + } + + // Check if we need to use a Fallback Material + if (m_materialReferences[i].isFallbackMaterial) + { + m_subTextObjects[i].fallbackMaterial = m_materialReferences[i].material; + m_subTextObjects[i].fallbackSourceMaterial = m_materialReferences[i].fallbackMaterial; + } + + } + + int referenceCount = m_materialReferences[i].referenceCount; + + // Check to make sure our buffers allocations can accommodate the required text elements. + if (m_textInfo.meshInfo[i].vertices == null || m_textInfo.meshInfo[i].vertices.Length < referenceCount * 4) + { + if (m_textInfo.meshInfo[i].vertices == null) + { + if (i == 0) + m_textInfo.meshInfo[i] = new TMP_MeshInfo(m_mesh, referenceCount + 1); + else + m_textInfo.meshInfo[i] = new TMP_MeshInfo(m_subTextObjects[i].mesh, referenceCount + 1); + } + else + m_textInfo.meshInfo[i].ResizeMeshInfo(referenceCount > 1024 ? referenceCount + 256 : Mathf.NextPowerOfTwo(referenceCount + 1)); + } + else if (m_VertexBufferAutoSizeReduction && referenceCount > 0 && m_textInfo.meshInfo[i].vertices.Length / 4 - referenceCount > 256) + { + // Resize vertex buffers if allocations are excessive. + //Debug.Log("Reducing the size of the vertex buffers."); + m_textInfo.meshInfo[i].ResizeMeshInfo(referenceCount > 1024 ? referenceCount + 256 : Mathf.NextPowerOfTwo(referenceCount + 1)); + } + } + + //TMP_MaterialManager.CleanupFallbackMaterials(); + + // Clean up unused SubMeshes + for (int i = materialCount; i < m_subTextObjects.Length && m_subTextObjects[i] != null; i++) + { + if (i < m_textInfo.meshInfo.Length) + { + m_subTextObjects[i].canvasRenderer.SetMesh(null); + + // TODO: Figure out a way to handle this without running into Unity's Rebuild loop issue. + //m_subTextObjects[i].gameObject.SetActive(false); + } + } + + #if TMP_PROFILE_ON + Profiler.EndSample(); + #endif + + return m_totalCharacterCount; + } + + + // Added to sort handle the potential issue with OnWillRenderObject() not getting called when objects are not visible by camera. + //void OnBecameInvisible() + //{ + // if (m_mesh != null) + // m_mesh.bounds = new Bounds(transform.position, new Vector3(1000, 1000, 0)); + //} + + + /// <summary> + /// Update the margin width and height + /// </summary> + public override void ComputeMarginSize() + { + if (this.rectTransform != null) + { + //Debug.Log("*** ComputeMarginSize() *** Current RectTransform's Width is " + m_rectTransform.rect.width + " and Height is " + m_rectTransform.rect.height); // + " and size delta is " + m_rectTransform.sizeDelta); + + m_marginWidth = m_rectTransform.rect.width - m_margin.x - m_margin.z; + m_marginHeight = m_rectTransform.rect.height - m_margin.y - m_margin.w; + + // Update the corners of the RectTransform + m_RectTransformCorners = GetTextContainerLocalCorners(); + } + } + + + /// <summary> + /// + /// </summary> + protected override void OnDidApplyAnimationProperties() + { + m_havePropertiesChanged = true; + SetVerticesDirty(); + SetLayoutDirty(); + //Debug.Log("Animation Properties have changed."); + } + + + protected override void OnCanvasHierarchyChanged() + { + base.OnCanvasHierarchyChanged(); + m_canvas = this.canvas; + } + + + protected override void OnTransformParentChanged() + { + //Debug.Log("***** OnTransformParentChanged *****"); + + base.OnTransformParentChanged(); + + m_canvas = this.canvas; + + ComputeMarginSize(); + m_havePropertiesChanged = true; + } + + + protected override void OnRectTransformDimensionsChange() + { + //Debug.Log("*** OnRectTransformDimensionsChange() *** ActiveInHierarchy: " + this.gameObject.activeInHierarchy + " Frame: " + Time.frameCount); + + // Make sure object is active in Hierarchy + if (!this.gameObject.activeInHierarchy) + return; + + ComputeMarginSize(); + + UpdateSubObjectPivot(); + + SetVerticesDirty(); + SetLayoutDirty(); + } + + + /// <summary> + /// Function used as a replacement for LateUpdate to check if the transform or scale of the text object has changed. + /// </summary> + internal override void InternalUpdate() + { + // We need to update the SDF scale or possibly regenerate the text object if lossy scale has changed. + if (m_havePropertiesChanged == false) + { + float lossyScaleY = m_rectTransform.lossyScale.y; + if (lossyScaleY != m_previousLossyScaleY && m_text != string.Empty && m_text != null) + { + float scaleDelta = lossyScaleY / m_previousLossyScaleY; + + UpdateSDFScale(scaleDelta); + + m_previousLossyScaleY = lossyScaleY; + } + } + + // Added to handle legacy animation mode. + if (m_isUsingLegacyAnimationComponent) + { + //if (m_havePropertiesChanged) + m_havePropertiesChanged = true; + OnPreRenderCanvas(); + } + } + + + + // Called just before the Canvas is rendered. + void OnPreRenderCanvas() + { + //Debug.Log("*** OnPreRenderCanvas() *** Frame: " + Time.frameCount); + + // Make sure object is active and that we have a valid Canvas. + if (!m_isAwake || (this.IsActive() == false && m_ignoreActiveState == false)) return; + + if (m_canvas == null) { m_canvas = this.canvas; if (m_canvas == null) return; } + + + // Debug Variables + loopCountA = 0; + //loopCountB = 0; + //loopCountC = 0; + //loopCountD = 0; + //loopCountE = 0; + + // Update Margins + //ComputeMarginSize(); + + // Update Mask + // if (m_isMaskingEnabled) + // { + // UpdateMask(); + // } + + + if (m_havePropertiesChanged || m_isLayoutDirty) + { + //Debug.Log("Properties have changed!"); // Assigned Material is:" + m_sharedMaterial); // New Text is: " + m_text + "."); + + // Update mesh padding if necessary. + if (checkPaddingRequired) + UpdateMeshPadding(); + + // Reparse the text if the input has changed or text was truncated. + if (m_isInputParsingRequired || m_isTextTruncated) + ParseInputText(); + + // Reset Font min / max used with Auto-sizing + if (m_enableAutoSizing) + m_fontSize = Mathf.Clamp(m_fontSizeBase, m_fontSizeMin, m_fontSizeMax); + + m_maxFontSize = m_fontSizeMax; + m_minFontSize = m_fontSizeMin; + m_lineSpacingDelta = 0; + m_charWidthAdjDelta = 0; + //m_recursiveCount = 0; + + m_isCharacterWrappingEnabled = false; + m_isTextTruncated = false; + + m_havePropertiesChanged = false; + m_isLayoutDirty = false; + m_ignoreActiveState = false; + + GenerateTextMesh(); + } + } + + + + /// <summary> + /// This is the main function that is responsible for creating / displaying the text. + /// </summary> + protected override void GenerateTextMesh() + { + //Debug.Log("*** GenerateTextMesh() ***"); // ***** Frame: " + Time.frameCount); // + ". Point Size: " + m_fontSize + ". Margins are (W) " + m_marginWidth + " (H) " + m_marginHeight); // ". Iteration Count: " + loopCountA + ". Min: " + m_minFontSize + " Max: " + m_maxFontSize + " Delta: " + (m_maxFontSize - m_minFontSize) + " Font size is " + m_fontSize); //called for Object with ID " + GetInstanceID()); // Assigned Material is " + m_uiRenderer.GetMaterial().name); // IncludeForMasking " + this.m_IncludeForMasking); // and text is " + m_text); + //Profiler.BeginSample("TMP Generate Text - Pre"); + + // Early exit if no font asset was assigned. This should not be needed since LiberationSans SDF will be assigned by default. + if (m_fontAsset == null || m_fontAsset.characterLookupTable == null) + { + Debug.LogWarning("Can't Generate Mesh! No Font Asset has been assigned to Object ID: " + this.GetInstanceID()); + return; + } + + // Clear TextInfo + if (m_textInfo != null) + m_textInfo.Clear(); + + // Early exit if we don't have any Text to generate. + if (m_TextParsingBuffer == null || m_TextParsingBuffer.Length == 0 || m_TextParsingBuffer[0].unicode == (char)0) + { + // Clear mesh and upload changes to the mesh. + ClearMesh(); + + m_preferredWidth = 0; + m_preferredHeight = 0; + + // Event indicating the text has been regenerated. + TMPro_EventManager.ON_TEXT_CHANGED(this); + + return; + } + + m_currentFontAsset = m_fontAsset; + m_currentMaterial = m_sharedMaterial; + m_currentMaterialIndex = 0; + m_materialReferenceStack.SetDefault(new MaterialReference(m_currentMaterialIndex, m_currentFontAsset, null, m_currentMaterial, m_padding)); + + m_currentSpriteAsset = m_spriteAsset; + + // Stop all Sprite Animations + if (m_spriteAnimator != null) + m_spriteAnimator.StopAllAnimations(); + + // Total character count is computed when the text is parsed. + int totalCharacterCount = m_totalCharacterCount; + + // Calculate the scale of the font based on selected font size and sampling point size. + // baseScale is calculated using the font asset assigned to the text object. + float baseScale = m_fontScale = (m_fontSize / m_fontAsset.faceInfo.pointSize * m_fontAsset.faceInfo.scale); + float currentElementScale = baseScale; + m_fontScaleMultiplier = 1; + + m_currentFontSize = m_fontSize; + m_sizeStack.SetDefault(m_currentFontSize); + float fontSizeDelta = 0; + + int charCode = 0; // Holds the character code of the currently being processed character. + + m_FontStyleInternal = m_fontStyle; // Set the default style. + m_FontWeightInternal = (m_FontStyleInternal & FontStyles.Bold) == FontStyles.Bold ? FontWeight.Bold : m_fontWeight; + m_FontWeightStack.SetDefault(m_FontWeightInternal); + m_fontStyleStack.Clear(); + + m_lineJustification = m_textAlignment; // Sets the line justification mode to match editor alignment. + m_lineJustificationStack.SetDefault(m_lineJustification); + + float padding = 0; + float style_padding = 0; // Extra padding required to accommodate Bold style. + float bold_xAdvance_multiplier = 1; // Used to increase spacing between character when style is bold. + + m_baselineOffset = 0; // Used by subscript characters. + m_baselineOffsetStack.Clear(); + + // Underline + bool beginUnderline = false; + Vector3 underline_start = Vector3.zero; // Used to track where underline starts & ends. + Vector3 underline_end = Vector3.zero; + + // Strike-through + bool beginStrikethrough = false; + Vector3 strikethrough_start = Vector3.zero; + Vector3 strikethrough_end = Vector3.zero; + + // Text Highlight + bool beginHighlight = false; + Vector3 highlight_start = Vector3.zero; + Vector3 highlight_end = Vector3.zero; + + m_fontColor32 = m_fontColor; + Color32 vertexColor; + m_htmlColor = m_fontColor32; + m_underlineColor = m_htmlColor; + m_strikethroughColor = m_htmlColor; + + m_colorStack.SetDefault(m_htmlColor); + m_underlineColorStack.SetDefault(m_htmlColor); + m_strikethroughColorStack.SetDefault(m_htmlColor); + m_highlightColorStack.SetDefault(m_htmlColor); + + m_colorGradientPreset = null; + m_colorGradientStack.SetDefault(null); + + // Clear the Style stack. + //m_styleStack.Clear(); + + // Clear the Action stack. + m_actionStack.Clear(); + + m_isFXMatrixSet = false; + + m_lineOffset = 0; // Amount of space between lines (font line spacing + m_linespacing). + m_lineHeight = TMP_Math.FLOAT_UNSET; + float lineGap = m_currentFontAsset.faceInfo.lineHeight - (m_currentFontAsset.faceInfo.ascentLine - m_currentFontAsset.faceInfo.descentLine); + + m_cSpacing = 0; // Amount of space added between characters as a result of the use of the <cspace> tag. + m_monoSpacing = 0; + float lineOffsetDelta = 0; + m_xAdvance = 0; // Used to track the position of each character. + + tag_LineIndent = 0; // Used for indentation of text. + tag_Indent = 0; + m_indentStack.SetDefault(0); + tag_NoParsing = false; + //m_isIgnoringAlignment = false; + + m_characterCount = 0; // Total characters in the char[] + + // Tracking of line information + m_firstCharacterOfLine = 0; + m_lastCharacterOfLine = 0; + m_firstVisibleCharacterOfLine = 0; + m_lastVisibleCharacterOfLine = 0; + m_maxLineAscender = k_LargeNegativeFloat; + m_maxLineDescender = k_LargePositiveFloat; + m_lineNumber = 0; + m_lineVisibleCharacterCount = 0; + bool isStartOfNewLine = true; + m_firstOverflowCharacterIndex = -1; + + m_pageNumber = 0; + int pageToDisplay = Mathf.Clamp(m_pageToDisplay - 1, 0, m_textInfo.pageInfo.Length - 1); + int previousPageOverflowChar = 0; + + int ellipsisIndex = 0; + + Vector4 margins = m_margin; + float marginWidth = m_marginWidth; + float marginHeight = m_marginHeight; + m_marginLeft = 0; + m_marginRight = 0; + m_width = -1; + float width = marginWidth + 0.0001f - m_marginLeft - m_marginRight; + + // Need to initialize these Extents structures + m_meshExtents.min = k_LargePositiveVector2; + m_meshExtents.max = k_LargeNegativeVector2; + + // Initialize lineInfo + m_textInfo.ClearLineInfo(); + + // Tracking of the highest Ascender + m_maxCapHeight = 0; + m_maxAscender = 0; + m_maxDescender = 0; + float pageAscender = 0; + float maxVisibleDescender = 0; + bool isMaxVisibleDescenderSet = false; + m_isNewPage = false; + + // Initialize struct to track states of word wrapping + bool isFirstWord = true; + m_isNonBreakingSpace = false; + bool ignoreNonBreakingSpace = false; + bool isLastBreakingChar = false; + float linebreakingWidth = 0; + int wrappingIndex = 0; + + // Save character and line state before we begin layout. + SaveWordWrappingState(ref m_SavedWordWrapState, -1, -1); + SaveWordWrappingState(ref m_SavedLineState, -1, -1); + + loopCountA += 1; + //Profiler.EndSample(); + + #if TMP_PROFILE_PHASES_ON + Profiler.BeginSample("TMP Generate Text - Phase I"); + #endif + + // Parse through Character buffer to read HTML tags and begin creating mesh. + for (int i = 0; i < m_TextParsingBuffer.Length && m_TextParsingBuffer[i].unicode != 0; i++) + { + charCode = m_TextParsingBuffer[i].unicode; + + // Parse Rich Text Tag + #region Parse Rich Text Tag + if (m_isRichText && charCode == 60) // '<' + { + m_isParsingText = true; + m_textElementType = TMP_TextElementType.Character; + int tagEndIndex; + + // Check if Tag is valid. If valid, skip to the end of the validated tag. + if (ValidateHtmlTag(m_TextParsingBuffer, i + 1, out tagEndIndex)) + { + i = tagEndIndex; + + // Continue to next character or handle the sprite element + if (m_textElementType == TMP_TextElementType.Character) + continue; + } + } + else + { + m_textElementType = m_textInfo.characterInfo[m_characterCount].elementType; + m_currentMaterialIndex = m_textInfo.characterInfo[m_characterCount].materialReferenceIndex; + m_currentFontAsset = m_textInfo.characterInfo[m_characterCount].fontAsset; + } + #endregion End Parse Rich Text Tag + + int prev_MaterialIndex = m_currentMaterialIndex; + bool isUsingAltTypeface = m_textInfo.characterInfo[m_characterCount].isUsingAlternateTypeface; + + m_isParsingText = false; + + // When using Linked text, mark character as ignored and skip to next character. + if (m_characterCount < m_firstVisibleCharacter) + { + m_textInfo.characterInfo[m_characterCount].isVisible = false; + m_textInfo.characterInfo[m_characterCount].character = (char)0x200B; + m_characterCount += 1; + continue; + } + + // Handle Font Styles like LowerCase, UpperCase and SmallCaps. + #region Handling of LowerCase, UpperCase and SmallCaps Font Styles + #if TMP_PROFILE_ON + Profiler.BeginSample("Handle Font Style"); + #endif + float smallCapsMultiplier = 1.0f; + + if (m_textElementType == TMP_TextElementType.Character) + { + if ((m_FontStyleInternal & FontStyles.UpperCase) == FontStyles.UpperCase) + { + // If this character is lowercase, switch to uppercase. + if (char.IsLower((char)charCode)) + charCode = char.ToUpper((char)charCode); + + } + else if ((m_FontStyleInternal & FontStyles.LowerCase) == FontStyles.LowerCase) + { + // If this character is uppercase, switch to lowercase. + if (char.IsUpper((char)charCode)) + charCode = char.ToLower((char)charCode); + } + else if ((m_FontStyleInternal & FontStyles.SmallCaps) == FontStyles.SmallCaps) + { + if (char.IsLower((char)charCode)) + { + smallCapsMultiplier = 0.8f; + charCode = char.ToUpper((char)charCode); + } + } + } + #if TMP_PROFILE_ON + Profiler.EndSample(); + #endif + #endregion + + + // Look up Character Data from Dictionary and cache it. + #region Look up Character Data + #if TMP_PROFILE_ON + Profiler.BeginSample("Lookup Character Data"); + #endif + if (m_textElementType == TMP_TextElementType.Sprite) + { + // If a sprite is used as a fallback then get a reference to it and set the color to white. + m_currentSpriteAsset = m_textInfo.characterInfo[m_characterCount].spriteAsset; + m_spriteIndex = m_textInfo.characterInfo[m_characterCount].spriteIndex; + + TMP_SpriteCharacter sprite = m_currentSpriteAsset.spriteCharacterTable[m_spriteIndex]; + if (sprite == null) continue; + + // Sprites are assigned in the E000 Private Area + sprite Index + if (charCode == 60) + charCode = 57344 + m_spriteIndex; + else + m_spriteColor = s_colorWhite; + + // The sprite scale calculations are based on the font asset assigned to the text object. + float spriteScale = (m_currentFontSize / m_currentFontAsset.faceInfo.pointSize * m_currentFontAsset.faceInfo.scale); + currentElementScale = m_currentFontAsset.faceInfo.ascentLine / sprite.glyph.metrics.height * sprite.scale * sprite.glyph.scale * spriteScale; + + m_cached_TextElement = sprite; + + m_textInfo.characterInfo[m_characterCount].elementType = TMP_TextElementType.Sprite; + m_textInfo.characterInfo[m_characterCount].scale = spriteScale; + m_textInfo.characterInfo[m_characterCount].spriteAsset = m_currentSpriteAsset; + m_textInfo.characterInfo[m_characterCount].fontAsset = m_currentFontAsset; + m_textInfo.characterInfo[m_characterCount].materialReferenceIndex = m_currentMaterialIndex; + + m_currentMaterialIndex = prev_MaterialIndex; + + padding = 0; + } + else if (m_textElementType == TMP_TextElementType.Character) + { + m_cached_TextElement = m_textInfo.characterInfo[m_characterCount].textElement; + if (m_cached_TextElement == null) continue; + + m_currentFontAsset = m_textInfo.characterInfo[m_characterCount].fontAsset; + m_currentMaterial = m_textInfo.characterInfo[m_characterCount].material; + m_currentMaterialIndex = m_textInfo.characterInfo[m_characterCount].materialReferenceIndex; + + // Re-calculate font scale as the font asset may have changed. + m_fontScale = m_currentFontSize * smallCapsMultiplier / m_currentFontAsset.faceInfo.pointSize * m_currentFontAsset.faceInfo.scale; + + currentElementScale = m_fontScale * m_fontScaleMultiplier * m_cached_TextElement.scale * m_cached_TextElement.glyph.scale; + + m_textInfo.characterInfo[m_characterCount].elementType = TMP_TextElementType.Character; + m_textInfo.characterInfo[m_characterCount].scale = currentElementScale; + + padding = m_currentMaterialIndex == 0 ? m_padding : m_subTextObjects[m_currentMaterialIndex].padding; + } + #if TMP_PROFILE_ON + Profiler.EndSample(); + #endif + #endregion + + + // Handle Soft Hyphen + #region Handle Soft Hyphen + float old_scale = currentElementScale; + if (charCode == 0xAD) + { + currentElementScale = 0; + } + #endregion + + + // Store some of the text object's information + m_textInfo.characterInfo[m_characterCount].character = (char)charCode; + m_textInfo.characterInfo[m_characterCount].pointSize = m_currentFontSize; + m_textInfo.characterInfo[m_characterCount].color = m_htmlColor; + m_textInfo.characterInfo[m_characterCount].underlineColor = m_underlineColor; + m_textInfo.characterInfo[m_characterCount].strikethroughColor = m_strikethroughColor; + m_textInfo.characterInfo[m_characterCount].highlightColor = m_highlightColor; + m_textInfo.characterInfo[m_characterCount].style = m_FontStyleInternal; + //m_textInfo.characterInfo[m_characterCount].index = m_TextParsingBuffer[i].stringIndex; + //m_textInfo.characterInfo[m_characterCount].isIgnoringAlignment = m_isIgnoringAlignment; + + + // Handle Kerning if Enabled. + #region Handle Kerning + TMP_GlyphValueRecord glyphAdjustments = new TMP_GlyphValueRecord(); + float characterSpacingAdjustment = m_characterSpacing; + if (m_enableKerning) + { + TMP_GlyphPairAdjustmentRecord adjustmentPair; + + if (m_characterCount < totalCharacterCount - 1) + { + uint firstGlyphIndex = m_cached_TextElement.glyphIndex; + uint secondGlyphIndex = m_textInfo.characterInfo[m_characterCount + 1].textElement.glyphIndex; + long key = new GlyphPairKey(firstGlyphIndex, secondGlyphIndex).key; + + if (m_currentFontAsset.fontFeatureTable.m_GlyphPairAdjustmentRecordLookupDictionary.TryGetValue(key, out adjustmentPair)) + { + glyphAdjustments = adjustmentPair.firstAdjustmentRecord.glyphValueRecord; + characterSpacingAdjustment = (adjustmentPair.featureLookupFlags & FontFeatureLookupFlags.IgnoreSpacingAdjustments) == FontFeatureLookupFlags.IgnoreSpacingAdjustments ? 0 : characterSpacingAdjustment; + } + } + + if (m_characterCount >= 1) + { + uint firstGlyphIndex = m_textInfo.characterInfo[m_characterCount - 1].textElement.glyphIndex; + uint secondGlyphIndex = m_cached_TextElement.glyphIndex; + long key = new GlyphPairKey(firstGlyphIndex, secondGlyphIndex).key; + + if (m_currentFontAsset.fontFeatureTable.m_GlyphPairAdjustmentRecordLookupDictionary.TryGetValue(key, out adjustmentPair)) + { + glyphAdjustments += adjustmentPair.secondAdjustmentRecord.glyphValueRecord; + characterSpacingAdjustment = (adjustmentPair.featureLookupFlags & FontFeatureLookupFlags.IgnoreSpacingAdjustments) == FontFeatureLookupFlags.IgnoreSpacingAdjustments ? 0 : characterSpacingAdjustment; + } + } + } + #endregion + + + // Initial Implementation for RTL support. + #region Handle Right-to-Left + if (m_isRightToLeft) + { + m_xAdvance -= ((m_cached_TextElement.glyph.metrics.horizontalAdvance * bold_xAdvance_multiplier + characterSpacingAdjustment + m_wordSpacing + m_currentFontAsset.normalSpacingOffset) * currentElementScale + m_cSpacing) * (1 - m_charWidthAdjDelta); + + if (char.IsWhiteSpace((char)charCode) || charCode == 0x200B) + m_xAdvance -= m_wordSpacing * currentElementScale; + } + #endregion + + + // Handle Mono Spacing + #region Handle Mono Spacing + float monoAdvance = 0; + if (m_monoSpacing != 0) + { + monoAdvance = (m_monoSpacing / 2 - (m_cached_TextElement.glyph.metrics.width / 2 + m_cached_TextElement.glyph.metrics.horizontalBearingX) * currentElementScale) * (1 - m_charWidthAdjDelta); + m_xAdvance += monoAdvance; + } + #endregion + + + // Set Padding based on selected font style + #region Handle Style Padding + if (m_textElementType == TMP_TextElementType.Character && !isUsingAltTypeface && ((m_FontStyleInternal & FontStyles.Bold) == FontStyles.Bold)) // Checks for any combination of Bold Style. + { + if (m_currentMaterial.HasProperty(ShaderUtilities.ID_GradientScale)) + { + float gradientScale = m_currentMaterial.GetFloat(ShaderUtilities.ID_GradientScale); + style_padding = m_currentFontAsset.boldStyle / 4.0f * gradientScale * m_currentMaterial.GetFloat(ShaderUtilities.ID_ScaleRatio_A); + + // Clamp overall padding to Gradient Scale size. + if (style_padding + padding > gradientScale) + padding = gradientScale - style_padding; + } + else + style_padding = 0; + + bold_xAdvance_multiplier = 1 + m_currentFontAsset.boldSpacing * 0.01f; + } + else + { + if (m_currentMaterial.HasProperty(ShaderUtilities.ID_GradientScale)) + { + float gradientScale = m_currentMaterial.GetFloat(ShaderUtilities.ID_GradientScale); + style_padding = m_currentFontAsset.normalStyle / 4.0f * gradientScale * m_currentMaterial.GetFloat(ShaderUtilities.ID_ScaleRatio_A); + + // Clamp overall padding to Gradient Scale size. + if (style_padding + padding > gradientScale) + padding = gradientScale - style_padding; + } + else + style_padding = 0; + + bold_xAdvance_multiplier = 1.0f; + } + #endregion Handle Style Padding + + + // Determine the position of the vertices of the Character or Sprite. + #region Calculate Vertices Position + #if TMP_PROFILE_ON + Profiler.BeginSample("Calculate Vertices Position"); + #endif + float fontBaseLineOffset = m_currentFontAsset.faceInfo.baseline * m_fontScale * m_fontScaleMultiplier * m_currentFontAsset.faceInfo.scale; + Vector3 top_left; + top_left.x = m_xAdvance + ((m_cached_TextElement.glyph.metrics.horizontalBearingX - padding - style_padding + glyphAdjustments.xPlacement) * currentElementScale * (1 - m_charWidthAdjDelta)); + top_left.y = fontBaseLineOffset + (m_cached_TextElement.glyph.metrics.horizontalBearingY + padding + glyphAdjustments.yPlacement) * currentElementScale - m_lineOffset + m_baselineOffset; + top_left.z = 0; + + Vector3 bottom_left; + bottom_left.x = top_left.x; + bottom_left.y = top_left.y - ((m_cached_TextElement.glyph.metrics.height + padding * 2) * currentElementScale); + bottom_left.z = 0; + + Vector3 top_right; + top_right.x = bottom_left.x + ((m_cached_TextElement.glyph.metrics.width + padding * 2 + style_padding * 2) * currentElementScale * (1 - m_charWidthAdjDelta)); + top_right.y = top_left.y; + top_right.z = 0; + + Vector3 bottom_right; + bottom_right.x = top_right.x; + bottom_right.y = bottom_left.y; + bottom_right.z = 0; + + #if TMP_PROFILE_ON + Profiler.EndSample(); + #endif + #endregion + + + // Check if we need to Shear the rectangles for Italic styles + #region Handle Italic & Shearing + if (m_textElementType == TMP_TextElementType.Character && !isUsingAltTypeface && ((m_FontStyleInternal & FontStyles.Italic) == FontStyles.Italic)) + { + // Shift Top vertices forward by half (Shear Value * height of character) and Bottom vertices back by same amount. + float shear_value = m_currentFontAsset.italicStyle * 0.01f; + Vector3 topShear = new Vector3(shear_value * ((m_cached_TextElement.glyph.metrics.horizontalBearingY + padding + style_padding) * currentElementScale), 0, 0); + Vector3 bottomShear = new Vector3(shear_value * (((m_cached_TextElement.glyph.metrics.horizontalBearingY - m_cached_TextElement.glyph.metrics.height - padding - style_padding)) * currentElementScale), 0, 0); + + top_left = top_left + topShear; + bottom_left = bottom_left + bottomShear; + top_right = top_right + topShear; + bottom_right = bottom_right + bottomShear; + } + #endregion Handle Italics & Shearing + + + // Handle Character Rotation + #region Handle Character Rotation + if (m_isFXMatrixSet) + { + // Apply scale matrix when simulating Condensed text. + if (m_FXMatrix.lossyScale.x != 1) + { + //top_left = m_FXMatrix.MultiplyPoint3x4(top_left); + //bottom_left = m_FXMatrix.MultiplyPoint3x4(bottom_left); + //top_right = m_FXMatrix.MultiplyPoint3x4(top_right); + //bottom_right = m_FXMatrix.MultiplyPoint3x4(bottom_right); + } + + Vector3 positionOffset = (top_right + bottom_left) / 2; + + top_left = m_FXMatrix.MultiplyPoint3x4(top_left - positionOffset) + positionOffset; + bottom_left = m_FXMatrix.MultiplyPoint3x4(bottom_left - positionOffset) + positionOffset; + top_right = m_FXMatrix.MultiplyPoint3x4(top_right - positionOffset) + positionOffset; + bottom_right = m_FXMatrix.MultiplyPoint3x4(bottom_right - positionOffset) + positionOffset; + } + #endregion + + + // Store vertex information for the character or sprite. + m_textInfo.characterInfo[m_characterCount].bottomLeft = bottom_left; + m_textInfo.characterInfo[m_characterCount].topLeft = top_left; + m_textInfo.characterInfo[m_characterCount].topRight = top_right; + m_textInfo.characterInfo[m_characterCount].bottomRight = bottom_right; + + m_textInfo.characterInfo[m_characterCount].origin = m_xAdvance; + m_textInfo.characterInfo[m_characterCount].baseLine = fontBaseLineOffset - m_lineOffset + m_baselineOffset; + m_textInfo.characterInfo[m_characterCount].aspectRatio = (top_right.x - bottom_left.x) / (top_left.y - bottom_left.y); + + + // Compute and save text element Ascender and maximum line Ascender. + float elementAscender = m_currentFontAsset.faceInfo.ascentLine * (m_textElementType == TMP_TextElementType.Character ? currentElementScale / smallCapsMultiplier : m_textInfo.characterInfo[m_characterCount].scale) + m_baselineOffset; + m_textInfo.characterInfo[m_characterCount].ascender = elementAscender - m_lineOffset; + m_maxLineAscender = elementAscender > m_maxLineAscender ? elementAscender : m_maxLineAscender; + + // Compute and save text element Descender and maximum line Descender. + float elementDescender = m_currentFontAsset.faceInfo.descentLine * (m_textElementType == TMP_TextElementType.Character ? currentElementScale / smallCapsMultiplier : m_textInfo.characterInfo[m_characterCount].scale) + m_baselineOffset; + float elementDescenderII = m_textInfo.characterInfo[m_characterCount].descender = elementDescender - m_lineOffset; + m_maxLineDescender = elementDescender < m_maxLineDescender ? elementDescender : m_maxLineDescender; + + // Adjust maxLineAscender and maxLineDescender if style is superscript or subscript + if ((m_FontStyleInternal & FontStyles.Subscript) == FontStyles.Subscript || (m_FontStyleInternal & FontStyles.Superscript) == FontStyles.Superscript) + { + float baseAscender = (elementAscender - m_baselineOffset) / m_currentFontAsset.faceInfo.subscriptSize; + elementAscender = m_maxLineAscender; + m_maxLineAscender = baseAscender > m_maxLineAscender ? baseAscender : m_maxLineAscender; + + float baseDescender = (elementDescender - m_baselineOffset) / m_currentFontAsset.faceInfo.subscriptSize; + elementDescender = m_maxLineDescender; + m_maxLineDescender = baseDescender < m_maxLineDescender ? baseDescender : m_maxLineDescender; + } + + if (m_lineNumber == 0 || m_isNewPage) + { + m_maxAscender = m_maxAscender > elementAscender ? m_maxAscender : elementAscender; + m_maxCapHeight = Mathf.Max(m_maxCapHeight, m_currentFontAsset.faceInfo.capLine * currentElementScale / smallCapsMultiplier); + } + if (m_lineOffset == 0) pageAscender = pageAscender > elementAscender ? pageAscender : elementAscender; + + + // Set Characters to not visible by default. + m_textInfo.characterInfo[m_characterCount].isVisible = false; + + // Setup Mesh for visible text elements. ie. not a SPACE / LINEFEED / CARRIAGE RETURN. + #region Handle Visible Characters + //#if TMP_PROFILE_ON + //Profiler.BeginSample("Handle Visible Characters"); + //#endif + if (charCode == 9 || charCode == 0xA0 || charCode == 0x2007 || (!char.IsWhiteSpace((char)charCode) && charCode != 0x200B) || m_textElementType == TMP_TextElementType.Sprite) + { + m_textInfo.characterInfo[m_characterCount].isVisible = true; + + #region Experimental Margin Shaper + //Vector2 shapedMargins; + //if (marginShaper) + //{ + // shapedMargins = m_marginShaper.GetShapedMargins(m_textInfo.characterInfo[m_characterCount].baseLine); + // if (shapedMargins.x < margins.x) + // { + // shapedMargins.x = m_marginLeft; + // } + // else + // { + // shapedMargins.x += m_marginLeft - margins.x; + // } + // if (shapedMargins.y < margins.z) + // { + // shapedMargins.y = m_marginRight; + // } + // else + // { + // shapedMargins.y += m_marginRight - margins.z; + // } + //} + //else + //{ + // shapedMargins.x = m_marginLeft; + // shapedMargins.y = m_marginRight; + //} + //width = marginWidth + 0.0001f - shapedMargins.x - shapedMargins.y; + //if (m_width != -1 && m_width < width) + //{ + // width = m_width; + //} + //m_textInfo.lineInfo[m_lineNumber].marginLeft = shapedMargins.x; + #endregion + + width = m_width != -1 ? Mathf.Min(marginWidth + 0.0001f - m_marginLeft - m_marginRight, m_width) : marginWidth + 0.0001f - m_marginLeft - m_marginRight; + m_textInfo.lineInfo[m_lineNumber].marginLeft = m_marginLeft; + + bool isJustifiedOrFlush = ((_HorizontalAlignmentOptions)m_lineJustification & _HorizontalAlignmentOptions.Flush) == _HorizontalAlignmentOptions.Flush || ((_HorizontalAlignmentOptions)m_lineJustification & _HorizontalAlignmentOptions.Justified) == _HorizontalAlignmentOptions.Justified; + + // Calculate the line breaking width of the text. + linebreakingWidth = Mathf.Abs(m_xAdvance) + (!m_isRightToLeft ? m_cached_TextElement.glyph.metrics.horizontalAdvance : 0) * (1 - m_charWidthAdjDelta) * (charCode != 0xAD ? currentElementScale : old_scale); + + // Check if Character exceeds the width of the Text Container + #region Handle Line Breaking, Text Auto-Sizing and Horizontal Overflow + if (linebreakingWidth > width * (isJustifiedOrFlush ? 1.05f : 1.0f)) + { + ellipsisIndex = m_characterCount - 1; // Last safely rendered character + + // Word Wrapping + #region Handle Word Wrapping + if (enableWordWrapping && m_characterCount != m_firstCharacterOfLine) + { + // Check if word wrapping is still possible + #region Line Breaking Check + if (wrappingIndex == m_SavedWordWrapState.previous_WordBreak || isFirstWord) + { + // Word wrapping is no longer possible. Shrink size of text if auto-sizing is enabled. + if (m_enableAutoSizing && m_fontSize > m_fontSizeMin) + { + // Handle Character Width Adjustments + #region Character Width Adjustments + if (m_charWidthAdjDelta < m_charWidthMaxAdj / 100) + { + loopCountA = 0; + m_charWidthAdjDelta += 0.01f; + GenerateTextMesh(); + return; + } + #endregion + + // Adjust Point Size + m_maxFontSize = m_fontSize; + + m_fontSize -= Mathf.Max((m_fontSize - m_minFontSize) / 2, 0.05f); + m_fontSize = (int)(Mathf.Max(m_fontSize, m_fontSizeMin) * 20 + 0.5f) / 20f; + + if (loopCountA > 20) return; // Added to debug + GenerateTextMesh(); + return; + } + + // Word wrapping is no longer possible, now breaking up individual words. + if (m_isCharacterWrappingEnabled == false) + { + if (ignoreNonBreakingSpace == false) + ignoreNonBreakingSpace = true; + else + m_isCharacterWrappingEnabled = true; + } + else + isLastBreakingChar = true; + + //m_recursiveCount += 1; + //if (m_recursiveCount > 20) + //{ + // Debug.Log("Recursive count exceeded!"); + // continue; + //} + } + #endregion + + // Restore to previously stored state of last valid (space character or linefeed) + i = RestoreWordWrappingState(ref m_SavedWordWrapState); + wrappingIndex = i; // Used to detect when line length can no longer be reduced. + + // Handling for Soft Hyphen + if (m_TextParsingBuffer[i].unicode == 0xAD) // && !m_isCharacterWrappingEnabled) // && ellipsisIndex != i && !m_isCharacterWrappingEnabled) + { + m_isTextTruncated = true; + m_TextParsingBuffer[i].unicode = 0x2D; + GenerateTextMesh(); + return; + } + + //Debug.Log("Last Visible Character of line # " + m_lineNumber + " is [" + m_textInfo.characterInfo[m_lastVisibleCharacterOfLine].character + " Character Count: " + m_characterCount + " Last visible: " + m_lastVisibleCharacterOfLine); + + // Check if Line Spacing of previous line needs to be adjusted. + if (m_lineNumber > 0 && !TMP_Math.Approximately(m_maxLineAscender, m_startOfLineAscender) && m_lineHeight == TMP_Math.FLOAT_UNSET && !m_isNewPage) + { + //Debug.Log("(Line Break - Adjusting Line Spacing on line #" + m_lineNumber); + float offsetDelta = m_maxLineAscender - m_startOfLineAscender; + AdjustLineOffset(m_firstCharacterOfLine, m_characterCount, offsetDelta); + m_lineOffset += offsetDelta; + m_SavedWordWrapState.lineOffset = m_lineOffset; + m_SavedWordWrapState.previousLineAscender = m_maxLineAscender; + + // TODO - Add check for character exceeding vertical bounds + } + m_isNewPage = false; + + // Calculate lineAscender & make sure if last character is superscript or subscript that we check that as well. + float lineAscender = m_maxLineAscender - m_lineOffset; + float lineDescender = m_maxLineDescender - m_lineOffset; + + + // Update maxDescender and maxVisibleDescender + m_maxDescender = m_maxDescender < lineDescender ? m_maxDescender : lineDescender; + if (!isMaxVisibleDescenderSet) + maxVisibleDescender = m_maxDescender; + + if (m_useMaxVisibleDescender && (m_characterCount >= m_maxVisibleCharacters || m_lineNumber >= m_maxVisibleLines)) + isMaxVisibleDescenderSet = true; + + // Track & Store lineInfo for the new line + m_textInfo.lineInfo[m_lineNumber].firstCharacterIndex = m_firstCharacterOfLine; + m_textInfo.lineInfo[m_lineNumber].firstVisibleCharacterIndex = m_firstVisibleCharacterOfLine = m_firstCharacterOfLine > m_firstVisibleCharacterOfLine ? m_firstCharacterOfLine : m_firstVisibleCharacterOfLine; + m_textInfo.lineInfo[m_lineNumber].lastCharacterIndex = m_lastCharacterOfLine = m_characterCount - 1 > 0 ? m_characterCount - 1 : 0; + m_textInfo.lineInfo[m_lineNumber].lastVisibleCharacterIndex = m_lastVisibleCharacterOfLine = m_lastVisibleCharacterOfLine < m_firstVisibleCharacterOfLine ? m_firstVisibleCharacterOfLine : m_lastVisibleCharacterOfLine; + + m_textInfo.lineInfo[m_lineNumber].characterCount = m_textInfo.lineInfo[m_lineNumber].lastCharacterIndex - m_textInfo.lineInfo[m_lineNumber].firstCharacterIndex + 1; + m_textInfo.lineInfo[m_lineNumber].visibleCharacterCount = m_lineVisibleCharacterCount; + m_textInfo.lineInfo[m_lineNumber].lineExtents.min = new Vector2(m_textInfo.characterInfo[m_firstVisibleCharacterOfLine].bottomLeft.x, lineDescender); + m_textInfo.lineInfo[m_lineNumber].lineExtents.max = new Vector2(m_textInfo.characterInfo[m_lastVisibleCharacterOfLine].topRight.x, lineAscender); + m_textInfo.lineInfo[m_lineNumber].length = m_textInfo.lineInfo[m_lineNumber].lineExtents.max.x; + m_textInfo.lineInfo[m_lineNumber].width = width; + + //m_textInfo.lineInfo[m_lineNumber].alignment = m_lineJustification; + + m_textInfo.lineInfo[m_lineNumber].maxAdvance = m_textInfo.characterInfo[m_lastVisibleCharacterOfLine].xAdvance - (characterSpacingAdjustment + m_currentFontAsset.normalSpacingOffset) * currentElementScale - m_cSpacing; + + m_textInfo.lineInfo[m_lineNumber].baseline = 0 - m_lineOffset; + m_textInfo.lineInfo[m_lineNumber].ascender = lineAscender; + m_textInfo.lineInfo[m_lineNumber].descender = lineDescender; + m_textInfo.lineInfo[m_lineNumber].lineHeight = lineAscender - lineDescender + lineGap * baseScale; + + m_firstCharacterOfLine = m_characterCount; // Store first character of the next line. + m_lineVisibleCharacterCount = 0; + + // Store the state of the line before starting on the new line. + SaveWordWrappingState(ref m_SavedLineState, i, m_characterCount - 1); + + m_lineNumber += 1; + isStartOfNewLine = true; + isFirstWord = true; + + // Check to make sure Array is large enough to hold a new line. + if (m_lineNumber >= m_textInfo.lineInfo.Length) + ResizeLineExtents(m_lineNumber); + + // Apply Line Spacing based on scale of the last character of the line. + if (m_lineHeight == TMP_Math.FLOAT_UNSET) + { + float ascender = m_textInfo.characterInfo[m_characterCount].ascender - m_textInfo.characterInfo[m_characterCount].baseLine; + lineOffsetDelta = 0 - m_maxLineDescender + ascender + (lineGap + m_lineSpacing + m_lineSpacingDelta) * baseScale; + m_lineOffset += lineOffsetDelta; + + m_startOfLineAscender = ascender; + } + else + m_lineOffset += m_lineHeight + m_lineSpacing * baseScale; + + m_maxLineAscender = k_LargeNegativeFloat; + m_maxLineDescender = k_LargePositiveFloat; + + m_xAdvance = 0 + tag_Indent; + + continue; + } + #endregion End Word Wrapping + + + // Text Auto-Sizing (text exceeding Width of container. + #region Handle Text Auto-Sizing + if (m_enableAutoSizing && m_fontSize > m_fontSizeMin) + { + // Handle Character Width Adjustments + #region Character Width Adjustments + if (m_charWidthAdjDelta < m_charWidthMaxAdj / 100) + { + loopCountA = 0; + m_charWidthAdjDelta += 0.01f; + GenerateTextMesh(); + return; + } + #endregion + + // Adjust Point Size + m_maxFontSize = m_fontSize; + + m_fontSize -= Mathf.Max((m_fontSize - m_minFontSize) / 2, 0.05f); + m_fontSize = (int)(Mathf.Max(m_fontSize, m_fontSizeMin) * 20 + 0.5f) / 20f; + + //m_recursiveCount = 0; + if (loopCountA > 20) return; // Added to debug + GenerateTextMesh(); + return; + } + #endregion End Text Auto-Sizing + + + // Handle Text Overflow + #region Handle Text Overflow + switch (m_overflowMode) + { + case TextOverflowModes.Overflow: + if (m_isMaskingEnabled) + DisableMasking(); + + break; + case TextOverflowModes.Ellipsis: + if (m_isMaskingEnabled) + DisableMasking(); + + m_isTextTruncated = true; + + if (m_characterCount < 1) + { + m_textInfo.characterInfo[m_characterCount].isVisible = false; + //m_visibleCharacterCount = 0; + break; + } + + m_TextParsingBuffer[i - 1].unicode = 8230; + m_TextParsingBuffer[i].unicode = (char)0; + + if (m_cached_Ellipsis_Character != null) + { + m_textInfo.characterInfo[ellipsisIndex].character = (char)8230; + m_textInfo.characterInfo[ellipsisIndex].textElement = m_cached_Ellipsis_Character; + m_textInfo.characterInfo[ellipsisIndex].fontAsset = m_materialReferences[0].fontAsset; + m_textInfo.characterInfo[ellipsisIndex].material = m_materialReferences[0].material; + m_textInfo.characterInfo[ellipsisIndex].materialReferenceIndex = 0; + } + else + { + Debug.LogWarning("Unable to use Ellipsis character since it wasn't found in the current Font Asset [" + m_fontAsset.name + "]. Consider regenerating this font asset to include the Ellipsis character (u+2026).\nNote: Warnings can be disabled in the TMP Settings file.", this); + } + + m_totalCharacterCount = ellipsisIndex + 1; + + GenerateTextMesh(); + return; + //case TextOverflowModes.Masking: + // if (!m_isMaskingEnabled) + // EnableMasking(); + // break; + //case TextOverflowModes.ScrollRect: + // if (!m_isMaskingEnabled) + // EnableMasking(); + // break; + case TextOverflowModes.Truncate: + if (m_isMaskingEnabled) + DisableMasking(); + + m_textInfo.characterInfo[m_characterCount].isVisible = false; + break; + case TextOverflowModes.Linked: + //m_textInfo.characterInfo[m_characterCount].isVisible = false; + + //if (m_linkedTextComponent != null) + //{ + // m_linkedTextComponent.text = text; + // m_linkedTextComponent.firstVisibleCharacter = m_characterCount; + // m_linkedTextComponent.ForceMeshUpdate(); + //} + break; + } + #endregion End Text Overflow + + } + #endregion End Check for Characters Exceeding Width of Text Container + + + // Special handling of characters that are not ignored at the end of a line. + if (charCode == 9 || charCode == 0xA0 || charCode == 0x2007) + { + m_textInfo.characterInfo[m_characterCount].isVisible = false; + m_lastVisibleCharacterOfLine = m_characterCount; + m_textInfo.lineInfo[m_lineNumber].spaceCount += 1; + m_textInfo.spaceCount += 1; + + if (charCode == 0xA0) + m_textInfo.lineInfo[m_lineNumber].controlCharacterCount += 1; + } + else + { + // Determine Vertex Color + if (m_overrideHtmlColors) + vertexColor = m_fontColor32; + else + vertexColor = m_htmlColor; + + // Store Character & Sprite Vertex Information + if (m_textElementType == TMP_TextElementType.Character) + { + // Save Character Vertex Data + SaveGlyphVertexInfo(padding, style_padding, vertexColor); + } + else if (m_textElementType == TMP_TextElementType.Sprite) + { + SaveSpriteVertexInfo(vertexColor); + } + } + + + // Increase visible count for Characters. + if (m_textInfo.characterInfo[m_characterCount].isVisible && charCode != 0xAD) + { + if (isStartOfNewLine) { isStartOfNewLine = false; m_firstVisibleCharacterOfLine = m_characterCount; } + + m_lineVisibleCharacterCount += 1; + m_lastVisibleCharacterOfLine = m_characterCount; + } + } + else + { // This is a Space, Tab, LineFeed or Carriage Return + + // Track # of spaces per line which is used for line justification. + if ((charCode == 10 || char.IsSeparator((char)charCode)) && charCode != 0xAD && charCode != 0x200B && charCode != 0x2060) + { + m_textInfo.lineInfo[m_lineNumber].spaceCount += 1; + m_textInfo.spaceCount += 1; + } + } + //#if TMP_PROFILE_ON + //Profiler.EndSample(); + //#endif + #endregion Handle Visible Characters + + + // Check if Line Spacing of previous line needs to be adjusted. + #region Adjust Line Spacing + #if TMP_PROFILE_ON + Profiler.BeginSample("Adjust Line Spacing"); + #endif + if (m_lineNumber > 0 && !TMP_Math.Approximately(m_maxLineAscender, m_startOfLineAscender) && m_lineHeight == TMP_Math.FLOAT_UNSET && !m_isNewPage) + { + //Debug.Log("Inline - Adjusting Line Spacing on line #" + m_lineNumber); + //float gap = 0; // Compute gap. + + float offsetDelta = m_maxLineAscender - m_startOfLineAscender; + AdjustLineOffset(m_firstCharacterOfLine, m_characterCount, offsetDelta); + elementDescenderII -= offsetDelta; + m_lineOffset += offsetDelta; + + m_startOfLineAscender += offsetDelta; + m_SavedWordWrapState.lineOffset = m_lineOffset; + m_SavedWordWrapState.previousLineAscender = m_startOfLineAscender; + } + #if TMP_PROFILE_ON + Profiler.EndSample(); + #endif + #endregion + + + // Store Rectangle positions for each Character. + #region Store Character Data + m_textInfo.characterInfo[m_characterCount].lineNumber = m_lineNumber; + m_textInfo.characterInfo[m_characterCount].pageNumber = m_pageNumber; + + if (charCode != 10 && charCode != 13 && charCode != 8230 || m_textInfo.lineInfo[m_lineNumber].characterCount == 1) + m_textInfo.lineInfo[m_lineNumber].alignment = m_lineJustification; + #endregion Store Character Data + + + // Check if text Exceeds the vertical bounds of the margin area. + #region Check Vertical Bounds & Auto-Sizing + #if TMP_PROFILE_ON + Profiler.BeginSample("Check Vertical Bounds"); + #endif + if (m_maxAscender - elementDescenderII > marginHeight + 0.0001f) + { + // Handle Line spacing adjustments + #region Line Spacing Adjustments + if (m_enableAutoSizing && m_lineSpacingDelta > m_lineSpacingMax && m_lineNumber > 0) + { + loopCountA = 0; + + m_lineSpacingDelta -= 1; + GenerateTextMesh(); + return; + } + #endregion + + + // Handle Text Auto-sizing resulting from text exceeding vertical bounds. + #region Text Auto-Sizing (Text greater than vertical bounds) + if (m_enableAutoSizing && m_fontSize > m_fontSizeMin) + { + m_maxFontSize = m_fontSize; + + m_fontSize -= Mathf.Max((m_fontSize - m_minFontSize) / 2, 0.05f); + m_fontSize = (int)(Mathf.Max(m_fontSize, m_fontSizeMin) * 20 + 0.5f) / 20f; + + //m_recursiveCount = 0; + if (loopCountA > 20) return; // Added to debug + GenerateTextMesh(); + return; + } + #endregion Text Auto-Sizing + + // Set isTextOverflowing and firstOverflowCharacterIndex + if (m_firstOverflowCharacterIndex == -1) + m_firstOverflowCharacterIndex = m_characterCount; + + // Handle Text Overflow + #region Text Overflow + switch (m_overflowMode) + { + case TextOverflowModes.Overflow: + if (m_isMaskingEnabled) + DisableMasking(); + + break; + case TextOverflowModes.Ellipsis: + if (m_isMaskingEnabled) + DisableMasking(); + + if (m_lineNumber > 0) + { + m_TextParsingBuffer[m_textInfo.characterInfo[ellipsisIndex].index].unicode = 8230; + m_TextParsingBuffer[m_textInfo.characterInfo[ellipsisIndex].index + 1].unicode = (char)0; + + if (m_cached_Ellipsis_Character != null) + { + m_textInfo.characterInfo[ellipsisIndex].character = (char)8230; + m_textInfo.characterInfo[ellipsisIndex].textElement = m_cached_Ellipsis_Character; + m_textInfo.characterInfo[ellipsisIndex].fontAsset = m_materialReferences[0].fontAsset; + m_textInfo.characterInfo[ellipsisIndex].material = m_materialReferences[0].material; + m_textInfo.characterInfo[ellipsisIndex].materialReferenceIndex = 0; + } + else + { + Debug.LogWarning("Unable to use Ellipsis character since it wasn't found in the current Font Asset [" + m_fontAsset.name + "]. Consider regenerating this font asset to include the Ellipsis character (u+2026).\nNote: Warnings can be disabled in the TMP Settings file.", this); + } + + m_totalCharacterCount = ellipsisIndex + 1; + + GenerateTextMesh(); + m_isTextTruncated = true; + return; + } + else + { + ClearMesh(); + return; + } + //case TextOverflowModes.Masking: + // if (!m_isMaskingEnabled) + // EnableMasking(); + // break; + //case TextOverflowModes.ScrollRect: + // if (!m_isMaskingEnabled) + // EnableMasking(); + // break; + case TextOverflowModes.Truncate: + if (m_isMaskingEnabled) + DisableMasking(); + + // TODO : Optimize + if (m_lineNumber > 0) + { + m_TextParsingBuffer[m_textInfo.characterInfo[ellipsisIndex].index + 1].unicode = (char)0; + + m_totalCharacterCount = ellipsisIndex + 1; + + GenerateTextMesh(); + m_isTextTruncated = true; + return; + } + else + { + ClearMesh(); + return; + } + case TextOverflowModes.Page: + if (m_isMaskingEnabled) + DisableMasking(); + + // Ignore Page Break, Linefeed or carriage return + if (charCode == 13 || charCode == 10) + break; + + // Return if the first character doesn't fit. + if (i == 0) + { + ClearMesh(); + return; + } + else if (previousPageOverflowChar == i) + { + m_TextParsingBuffer[i].unicode = 0; + m_isTextTruncated = true; + } + + previousPageOverflowChar = i; + + // Go back to previous line and re-layout + i = RestoreWordWrappingState(ref m_SavedLineState); + + m_isNewPage = true; + m_xAdvance = 0 + tag_Indent; + m_lineOffset = 0; + m_maxAscender = 0; + pageAscender = 0; + m_lineNumber += 1; + m_pageNumber += 1; + continue; + case TextOverflowModes.Linked: + if (m_linkedTextComponent != null) + { + m_linkedTextComponent.text = text; + m_linkedTextComponent.firstVisibleCharacter = m_characterCount; + m_linkedTextComponent.ForceMeshUpdate(); + } + + // Truncate remaining text + if (m_lineNumber > 0) + { + m_TextParsingBuffer[i].unicode = (char)0; + + m_totalCharacterCount = m_characterCount; + + // TODO : Optimize as we should be able to end the layout phase here without having to do another pass. + GenerateTextMesh(); + m_isTextTruncated = true; + return; + } + else + { + ClearMesh(); + return; + } + } + #endregion End Text Overflow + + } + #if TMP_PROFILE_ON + Profiler.EndSample(); + #endif + #endregion Check Vertical Bounds + + + // Handle xAdvance & Tabulation Stops. Tab stops at every 25% of Font Size. + #region XAdvance, Tabulation & Stops + if (charCode == 9) + { + float tabSize = m_currentFontAsset.faceInfo.tabWidth * m_currentFontAsset.tabSize * currentElementScale; + float tabs = Mathf.Ceil(m_xAdvance / tabSize) * tabSize; + m_xAdvance = tabs > m_xAdvance ? tabs : m_xAdvance + tabSize; + } + else if (m_monoSpacing != 0) + { + m_xAdvance += (m_monoSpacing - monoAdvance + ((characterSpacingAdjustment + m_currentFontAsset.normalSpacingOffset) * currentElementScale) + m_cSpacing) * (1 - m_charWidthAdjDelta); + + if (char.IsWhiteSpace((char)charCode) || charCode == 0x200B) + m_xAdvance += m_wordSpacing * currentElementScale; + } + else if (!m_isRightToLeft) + { + float scaleFXMultiplier = 1; + if (m_isFXMatrixSet) scaleFXMultiplier = m_FXMatrix.lossyScale.x; + + m_xAdvance += ((m_cached_TextElement.glyph.metrics.horizontalAdvance * scaleFXMultiplier * bold_xAdvance_multiplier + characterSpacingAdjustment + m_currentFontAsset.normalSpacingOffset + glyphAdjustments.xAdvance) * currentElementScale + m_cSpacing) * (1 - m_charWidthAdjDelta); + + if (char.IsWhiteSpace((char)charCode) || charCode == 0x200B) + m_xAdvance += m_wordSpacing * currentElementScale; + } + else + { + m_xAdvance -= glyphAdjustments.xAdvance * currentElementScale; + } + + + // Store xAdvance information + m_textInfo.characterInfo[m_characterCount].xAdvance = m_xAdvance; + + #endregion Tabulation & Stops + + + // Handle Carriage Return + #region Carriage Return + if (charCode == 13) + { + m_xAdvance = 0 + tag_Indent; + } + #endregion Carriage Return + + + // Handle Line Spacing Adjustments + Word Wrapping & special case for last line. + #region Check for Line Feed and Last Character + #if TMP_PROFILE_ON + Profiler.BeginSample("Process Linefeed"); + #endif + if (charCode == 10 || m_characterCount == totalCharacterCount - 1) + { + // Check if Line Spacing of previous line needs to be adjusted. + if (m_lineNumber > 0 && !TMP_Math.Approximately(m_maxLineAscender, m_startOfLineAscender) && m_lineHeight == TMP_Math.FLOAT_UNSET && !m_isNewPage) + { + //Debug.Log("Line Feed - Adjusting Line Spacing on line #" + m_lineNumber); + float offsetDelta = m_maxLineAscender - m_startOfLineAscender; + AdjustLineOffset(m_firstCharacterOfLine, m_characterCount, offsetDelta); + elementDescenderII -= offsetDelta; + m_lineOffset += offsetDelta; + } + m_isNewPage = false; + + // Calculate lineAscender & make sure if last character is superscript or subscript that we check that as well. + float lineAscender = m_maxLineAscender - m_lineOffset; + float lineDescender = m_maxLineDescender - m_lineOffset; + + // Update maxDescender and maxVisibleDescender + m_maxDescender = m_maxDescender < lineDescender ? m_maxDescender : lineDescender; + if (!isMaxVisibleDescenderSet) + maxVisibleDescender = m_maxDescender; + + if (m_useMaxVisibleDescender && (m_characterCount >= m_maxVisibleCharacters || m_lineNumber >= m_maxVisibleLines)) + isMaxVisibleDescenderSet = true; + + // Save Line Information + m_textInfo.lineInfo[m_lineNumber].firstCharacterIndex = m_firstCharacterOfLine; + m_textInfo.lineInfo[m_lineNumber].firstVisibleCharacterIndex = m_firstVisibleCharacterOfLine = m_firstCharacterOfLine > m_firstVisibleCharacterOfLine ? m_firstCharacterOfLine : m_firstVisibleCharacterOfLine; + m_textInfo.lineInfo[m_lineNumber].lastCharacterIndex = m_lastCharacterOfLine = m_characterCount; + m_textInfo.lineInfo[m_lineNumber].lastVisibleCharacterIndex = m_lastVisibleCharacterOfLine = m_lastVisibleCharacterOfLine < m_firstVisibleCharacterOfLine ? m_firstVisibleCharacterOfLine : m_lastVisibleCharacterOfLine; + + m_textInfo.lineInfo[m_lineNumber].characterCount = m_textInfo.lineInfo[m_lineNumber].lastCharacterIndex - m_textInfo.lineInfo[m_lineNumber].firstCharacterIndex + 1; + m_textInfo.lineInfo[m_lineNumber].visibleCharacterCount = m_lineVisibleCharacterCount; + m_textInfo.lineInfo[m_lineNumber].lineExtents.min = new Vector2(m_textInfo.characterInfo[m_firstVisibleCharacterOfLine].bottomLeft.x, lineDescender); + m_textInfo.lineInfo[m_lineNumber].lineExtents.max = new Vector2(m_textInfo.characterInfo[m_lastVisibleCharacterOfLine].topRight.x, lineAscender); + m_textInfo.lineInfo[m_lineNumber].length = m_textInfo.lineInfo[m_lineNumber].lineExtents.max.x - (padding * currentElementScale); + m_textInfo.lineInfo[m_lineNumber].width = width; + + if (m_textInfo.lineInfo[m_lineNumber].characterCount == 1) + m_textInfo.lineInfo[m_lineNumber].alignment = m_lineJustification; + + if (m_textInfo.characterInfo[m_lastVisibleCharacterOfLine].isVisible) + m_textInfo.lineInfo[m_lineNumber].maxAdvance = m_textInfo.characterInfo[m_lastVisibleCharacterOfLine].xAdvance - (characterSpacingAdjustment + m_currentFontAsset.normalSpacingOffset) * currentElementScale - m_cSpacing; + else + m_textInfo.lineInfo[m_lineNumber].maxAdvance = m_textInfo.characterInfo[m_lastCharacterOfLine].xAdvance - (characterSpacingAdjustment + m_currentFontAsset.normalSpacingOffset) * currentElementScale - m_cSpacing; + + m_textInfo.lineInfo[m_lineNumber].baseline = 0 - m_lineOffset; + m_textInfo.lineInfo[m_lineNumber].ascender = lineAscender; + m_textInfo.lineInfo[m_lineNumber].descender = lineDescender; + m_textInfo.lineInfo[m_lineNumber].lineHeight = lineAscender - lineDescender + lineGap * baseScale; + + m_firstCharacterOfLine = m_characterCount + 1; + m_lineVisibleCharacterCount = 0; + + // Add new line if not last line or character. + if (charCode == 10) + { + // Store the state of the line before starting on the new line. + SaveWordWrappingState(ref m_SavedLineState, i, m_characterCount); + // Store the state of the last Character before the new line. + SaveWordWrappingState(ref m_SavedWordWrapState, i, m_characterCount); + + m_lineNumber += 1; + isStartOfNewLine = true; + ignoreNonBreakingSpace = false; + isFirstWord = true; + + // Check to make sure Array is large enough to hold a new line. + if (m_lineNumber >= m_textInfo.lineInfo.Length) + ResizeLineExtents(m_lineNumber); + + // Apply Line Spacing + if (m_lineHeight == TMP_Math.FLOAT_UNSET) + { + lineOffsetDelta = 0 - m_maxLineDescender + elementAscender + (lineGap + m_lineSpacing + m_paragraphSpacing + m_lineSpacingDelta) * baseScale; + m_lineOffset += lineOffsetDelta; + } + else + m_lineOffset += m_lineHeight + (m_lineSpacing + m_paragraphSpacing) * baseScale; + + m_maxLineAscender = k_LargeNegativeFloat; + m_maxLineDescender = k_LargePositiveFloat; + m_startOfLineAscender = elementAscender; + + m_xAdvance = 0 + tag_LineIndent + tag_Indent; + + ellipsisIndex = m_characterCount - 1; + + m_characterCount += 1; + continue; + } + } + #if TMP_PROFILE_ON + Profiler.EndSample(); + #endif + #endregion Check for Linefeed or Last Character + + + // Store Rectangle positions for each Character. + #region Save CharacterInfo for the current character. + #if TMP_PROFILE_ON + Profiler.BeginSample("Save CharacterInfo & Extents"); + #endif + // Determine the bounds of the Mesh. + if (m_textInfo.characterInfo[m_characterCount].isVisible) + { + m_meshExtents.min.x = Mathf.Min(m_meshExtents.min.x, m_textInfo.characterInfo[m_characterCount].bottomLeft.x); + m_meshExtents.min.y = Mathf.Min(m_meshExtents.min.y, m_textInfo.characterInfo[m_characterCount].bottomLeft.y); + + m_meshExtents.max.x = Mathf.Max(m_meshExtents.max.x, m_textInfo.characterInfo[m_characterCount].topRight.x); + m_meshExtents.max.y = Mathf.Max(m_meshExtents.max.y, m_textInfo.characterInfo[m_characterCount].topRight.y); + + //m_meshExtents.min = new Vector2(Mathf.Min(m_meshExtents.min.x, m_textInfo.characterInfo[m_characterCount].bottomLeft.x), Mathf.Min(m_meshExtents.min.y, m_textInfo.characterInfo[m_characterCount].bottomLeft.y)); + //m_meshExtents.max = new Vector2(Mathf.Max(m_meshExtents.max.x, m_textInfo.characterInfo[m_characterCount].topRight.x), Mathf.Max(m_meshExtents.max.y, m_textInfo.characterInfo[m_characterCount].topRight.y)); + } + + + // Save pageInfo Data + if (m_overflowMode == TextOverflowModes.Page && charCode != 13 && charCode != 10) // && m_pageNumber < 16) + { + // Check if we need to increase allocations for the pageInfo array. + if (m_pageNumber + 1 > m_textInfo.pageInfo.Length) + TMP_TextInfo.Resize(ref m_textInfo.pageInfo, m_pageNumber + 1, true); + + m_textInfo.pageInfo[m_pageNumber].ascender = pageAscender; + m_textInfo.pageInfo[m_pageNumber].descender = elementDescender < m_textInfo.pageInfo[m_pageNumber].descender ? elementDescender : m_textInfo.pageInfo[m_pageNumber].descender; + + if (m_pageNumber == 0 && m_characterCount == 0) + m_textInfo.pageInfo[m_pageNumber].firstCharacterIndex = m_characterCount; + else if (m_characterCount > 0 && m_pageNumber != m_textInfo.characterInfo[m_characterCount - 1].pageNumber) + { + m_textInfo.pageInfo[m_pageNumber - 1].lastCharacterIndex = m_characterCount - 1; + m_textInfo.pageInfo[m_pageNumber].firstCharacterIndex = m_characterCount; + } + else if (m_characterCount == totalCharacterCount - 1) + m_textInfo.pageInfo[m_pageNumber].lastCharacterIndex = m_characterCount; + } + #if TMP_PROFILE_ON + Profiler.EndSample(); + #endif + #endregion Saving CharacterInfo + + + // Save State of Mesh Creation for handling of Word Wrapping + #region Save Word Wrapping State + #if TMP_PROFILE_ON + Profiler.BeginSample("Save Word Wrapping State"); + #endif + if (m_enableWordWrapping || m_overflowMode == TextOverflowModes.Truncate || m_overflowMode == TextOverflowModes.Ellipsis) + { + if ((char.IsWhiteSpace((char)charCode) || charCode == 0x200B || charCode == 0x2D || charCode == 0xAD) && (!m_isNonBreakingSpace || ignoreNonBreakingSpace) && charCode != 0xA0 && charCode != 0x2007 && charCode != 0x2011 && charCode != 0x202F && charCode != 0x2060) + { + // We store the state of numerous variables for the most recent Space, LineFeed or Carriage Return to enable them to be restored + // for Word Wrapping. + SaveWordWrappingState(ref m_SavedWordWrapState, i, m_characterCount); + m_isCharacterWrappingEnabled = false; + isFirstWord = false; + } + // Handling for East Asian languages + else if (( charCode > 0x1100 && charCode < 0x11ff || /* Hangul Jamo */ + charCode > 0x2E80 && charCode < 0x9FFF || /* CJK */ + charCode > 0xA960 && charCode < 0xA97F || /* Hangul Jame Extended-A */ + charCode > 0xAC00 && charCode < 0xD7FF || /* Hangul Syllables */ + charCode > 0xF900 && charCode < 0xFAFF || /* CJK Compatibility Ideographs */ + charCode > 0xFE30 && charCode < 0xFE4F || /* CJK Compatibility Forms */ + charCode > 0xFF00 && charCode < 0xFFEF) /* CJK Halfwidth */ + && !m_isNonBreakingSpace) + { + if (isFirstWord || isLastBreakingChar || TMP_Settings.linebreakingRules.leadingCharacters.ContainsKey(charCode) == false && + (m_characterCount < totalCharacterCount - 1 && + TMP_Settings.linebreakingRules.followingCharacters.ContainsKey(m_textInfo.characterInfo[m_characterCount + 1].character) == false)) + { + SaveWordWrappingState(ref m_SavedWordWrapState, i, m_characterCount); + m_isCharacterWrappingEnabled = false; + isFirstWord = false; + } + } + else if ((isFirstWord || m_isCharacterWrappingEnabled == true || isLastBreakingChar)) + SaveWordWrappingState(ref m_SavedWordWrapState, i, m_characterCount); + + } + #if TMP_PROFILE_ON + Profiler.EndSample(); + #endif + #endregion Save Word Wrapping State + + m_characterCount += 1; + } + + // Check Auto Sizing and increase font size to fill text container. + #region Check Auto-Sizing (Upper Font Size Bounds) + fontSizeDelta = m_maxFontSize - m_minFontSize; + if (!m_isCharacterWrappingEnabled && m_enableAutoSizing && fontSizeDelta > 0.051f && m_fontSize < m_fontSizeMax) + { + m_minFontSize = m_fontSize; + m_fontSize += Mathf.Max((m_maxFontSize - m_fontSize) / 2, 0.05f); + m_fontSize = (int)(Mathf.Min(m_fontSize, m_fontSizeMax) * 20 + 0.5f) / 20f; + + //Debug.Log(m_fontSize); + + if (loopCountA > 20) return; // Added to debug + GenerateTextMesh(); + return; + } + #endregion End Auto-sizing Check + + + m_isCharacterWrappingEnabled = false; + + #if TMP_PROFILE_PHASES_ON + Profiler.EndSample(); + #endif + + //Debug.Log("Iteration Count: " + loopCountA + ". Final Point Size: " + m_fontSize); // + " B: " + loopCountB + " C: " + loopCountC + " D: " + loopCountD); + + // *** PHASE II of Text Generation *** + #if TMP_PROFILE_PHASES_ON + Profiler.BeginSample("TMP Generate Text - Phase II"); + #endif + + // If there are no visible characters... no need to continue + if (m_characterCount == 0) // && m_visibleSpriteCount == 0) + { + ClearMesh(); + + // Event indicating the text has been regenerated. + TMPro_EventManager.ON_TEXT_CHANGED(this); + return; + } + + + // *** PHASE II of Text Generation *** + int last_vert_index = m_materialReferences[0].referenceCount * 4; + + // Partial clear of the vertices array to mark unused vertices as degenerate. + m_textInfo.meshInfo[0].Clear(false); + + // Handle Text Alignment + #region Text Vertical Alignment + #if TMP_PROFILE_ON + Profiler.BeginSample("Vertical Text Alignment"); + #endif + Vector3 anchorOffset = Vector3.zero; + Vector3[] corners = m_RectTransformCorners; // GetTextContainerLocalCorners(); + + switch (m_textAlignment) + { + // Top Vertically + case TextAlignmentOptions.Top: + case TextAlignmentOptions.TopLeft: + case TextAlignmentOptions.TopRight: + case TextAlignmentOptions.TopJustified: + case TextAlignmentOptions.TopFlush: + case TextAlignmentOptions.TopGeoAligned: + if (m_overflowMode != TextOverflowModes.Page) + anchorOffset = corners[1] + new Vector3(0 + margins.x, 0 - m_maxAscender - margins.y, 0); + else + anchorOffset = corners[1] + new Vector3(0 + margins.x, 0 - m_textInfo.pageInfo[pageToDisplay].ascender - margins.y, 0); + break; + + // Middle Vertically + case TextAlignmentOptions.Left: + case TextAlignmentOptions.Right: + case TextAlignmentOptions.Center: + case TextAlignmentOptions.Justified: + case TextAlignmentOptions.Flush: + case TextAlignmentOptions.CenterGeoAligned: + if (m_overflowMode != TextOverflowModes.Page) + anchorOffset = (corners[0] + corners[1]) / 2 + new Vector3(0 + margins.x, 0 - (m_maxAscender + margins.y + maxVisibleDescender - margins.w) / 2, 0); + else + anchorOffset = (corners[0] + corners[1]) / 2 + new Vector3(0 + margins.x, 0 - (m_textInfo.pageInfo[pageToDisplay].ascender + margins.y + m_textInfo.pageInfo[pageToDisplay].descender - margins.w) / 2, 0); + break; + + // Bottom Vertically + case TextAlignmentOptions.Bottom: + case TextAlignmentOptions.BottomLeft: + case TextAlignmentOptions.BottomRight: + case TextAlignmentOptions.BottomJustified: + case TextAlignmentOptions.BottomFlush: + case TextAlignmentOptions.BottomGeoAligned: + if (m_overflowMode != TextOverflowModes.Page) + anchorOffset = corners[0] + new Vector3(0 + margins.x, 0 - maxVisibleDescender + margins.w, 0); + else + anchorOffset = corners[0] + new Vector3(0 + margins.x, 0 - m_textInfo.pageInfo[pageToDisplay].descender + margins.w, 0); + break; + + // Baseline Vertically + case TextAlignmentOptions.Baseline: + case TextAlignmentOptions.BaselineLeft: + case TextAlignmentOptions.BaselineRight: + case TextAlignmentOptions.BaselineJustified: + case TextAlignmentOptions.BaselineFlush: + case TextAlignmentOptions.BaselineGeoAligned: + anchorOffset = (corners[0] + corners[1]) / 2 + new Vector3(0 + margins.x, 0, 0); + break; + + // Midline Vertically + case TextAlignmentOptions.MidlineLeft: + case TextAlignmentOptions.Midline: + case TextAlignmentOptions.MidlineRight: + case TextAlignmentOptions.MidlineJustified: + case TextAlignmentOptions.MidlineFlush: + case TextAlignmentOptions.MidlineGeoAligned: + anchorOffset = (corners[0] + corners[1]) / 2 + new Vector3(0 + margins.x, 0 - (m_meshExtents.max.y + margins.y + m_meshExtents.min.y - margins.w) / 2, 0); + break; + + // Capline Vertically + case TextAlignmentOptions.CaplineLeft: + case TextAlignmentOptions.Capline: + case TextAlignmentOptions.CaplineRight: + case TextAlignmentOptions.CaplineJustified: + case TextAlignmentOptions.CaplineFlush: + case TextAlignmentOptions.CaplineGeoAligned: + anchorOffset = (corners[0] + corners[1]) / 2 + new Vector3(0 + margins.x, 0 - (m_maxCapHeight - margins.y - margins.w) / 2, 0); + break; + } + #if TMP_PROFILE_ON + Profiler.EndSample(); + #endif + #endregion + + + // Initialization for Second Pass + Vector3 justificationOffset = Vector3.zero; + Vector3 offset = Vector3.zero; + int vert_index_X4 = 0; + int sprite_index_X4 = 0; + + int wordCount = 0; + int lineCount = 0; + int lastLine = 0; + bool isFirstSeperator = false; + + bool isStartOfWord = false; + int wordFirstChar = 0; + int wordLastChar = 0; + + // Second Pass : Line Justification, UV Mapping, Character & Line Visibility & more. + #region Handle Line Justification & UV Mapping & Character Visibility & More + + // Variables used to handle Canvas Render Modes and SDF Scaling + bool isCameraAssigned = m_canvas.worldCamera == null ? false : true; + float lossyScale = m_previousLossyScaleY = this.transform.lossyScale.y; + RenderMode canvasRenderMode = m_canvas.renderMode; + float canvasScaleFactor = m_canvas.scaleFactor; + + Color32 underlineColor = Color.white; + Color32 strikethroughColor = Color.white; + Color32 highlightColor = new Color32(255, 255, 0, 64); + float xScale = 0; + float xScaleMax = 0; + float underlineStartScale = 0; + float underlineEndScale = 0; + float underlineMaxScale = 0; + float underlineBaseLine = k_LargePositiveFloat; + int lastPage = 0; + + float strikethroughPointSize = 0; + float strikethroughScale = 0; + float strikethroughBaseline = 0; + + TMP_CharacterInfo[] characterInfos = m_textInfo.characterInfo; + #region Handle Line Justification & UV Mapping & Character Visibility & More + for (int i = 0; i < m_characterCount; i++) + { + TMP_FontAsset currentFontAsset = characterInfos[i].fontAsset; + + char currentCharacter = characterInfos[i].character; + + int currentLine = characterInfos[i].lineNumber; + TMP_LineInfo lineInfo = m_textInfo.lineInfo[currentLine]; + lineCount = currentLine + 1; + + TextAlignmentOptions lineAlignment = lineInfo.alignment; + + // Process Line Justification + #region Handle Line Justification + #if TMP_PROFILE_ON + Profiler.BeginSample("Horizontal Text Alignment"); + #endif + //if (!characterInfos[i].isIgnoringAlignment) + //{ + switch (lineAlignment) + { + case TextAlignmentOptions.TopLeft: + case TextAlignmentOptions.Left: + case TextAlignmentOptions.BottomLeft: + case TextAlignmentOptions.BaselineLeft: + case TextAlignmentOptions.MidlineLeft: + case TextAlignmentOptions.CaplineLeft: + if (!m_isRightToLeft) + justificationOffset = new Vector3(0 + lineInfo.marginLeft, 0, 0); + else + justificationOffset = new Vector3(0 - lineInfo.maxAdvance, 0, 0); + break; + + case TextAlignmentOptions.Top: + case TextAlignmentOptions.Center: + case TextAlignmentOptions.Bottom: + case TextAlignmentOptions.Baseline: + case TextAlignmentOptions.Midline: + case TextAlignmentOptions.Capline: + justificationOffset = new Vector3(lineInfo.marginLeft + lineInfo.width / 2 - lineInfo.maxAdvance / 2, 0, 0); + break; + + case TextAlignmentOptions.TopGeoAligned: + case TextAlignmentOptions.CenterGeoAligned: + case TextAlignmentOptions.BottomGeoAligned: + case TextAlignmentOptions.BaselineGeoAligned: + case TextAlignmentOptions.MidlineGeoAligned: + case TextAlignmentOptions.CaplineGeoAligned: + justificationOffset = new Vector3(lineInfo.marginLeft + lineInfo.width / 2 - (lineInfo.lineExtents.min.x + lineInfo.lineExtents.max.x) / 2, 0, 0); + break; + + case TextAlignmentOptions.TopRight: + case TextAlignmentOptions.Right: + case TextAlignmentOptions.BottomRight: + case TextAlignmentOptions.BaselineRight: + case TextAlignmentOptions.MidlineRight: + case TextAlignmentOptions.CaplineRight: + if (!m_isRightToLeft) + justificationOffset = new Vector3(lineInfo.marginLeft + lineInfo.width - lineInfo.maxAdvance, 0, 0); + else + justificationOffset = new Vector3(lineInfo.marginLeft + lineInfo.width, 0, 0); + break; + + case TextAlignmentOptions.TopJustified: + case TextAlignmentOptions.Justified: + case TextAlignmentOptions.BottomJustified: + case TextAlignmentOptions.BaselineJustified: + case TextAlignmentOptions.MidlineJustified: + case TextAlignmentOptions.CaplineJustified: + case TextAlignmentOptions.TopFlush: + case TextAlignmentOptions.Flush: + case TextAlignmentOptions.BottomFlush: + case TextAlignmentOptions.BaselineFlush: + case TextAlignmentOptions.MidlineFlush: + case TextAlignmentOptions.CaplineFlush: + // Skip Zero Width Characters + if (currentCharacter == 0xAD || currentCharacter == 0x200B || currentCharacter == 0x2060) break; + + char lastCharOfCurrentLine = characterInfos[lineInfo.lastCharacterIndex].character; + bool isFlush = ((_HorizontalAlignmentOptions)lineAlignment & _HorizontalAlignmentOptions.Flush) == _HorizontalAlignmentOptions.Flush; + + // In Justified mode, all lines are justified except the last one. + // In Flush mode, all lines are justified. + if (char.IsControl(lastCharOfCurrentLine) == false && currentLine < m_lineNumber || isFlush || lineInfo.maxAdvance > lineInfo.width) + { + // First character of each line. + if (currentLine != lastLine || i == 0 || i == m_firstVisibleCharacter) + { + if (!m_isRightToLeft) + justificationOffset = new Vector3(lineInfo.marginLeft, 0, 0); + else + justificationOffset = new Vector3(lineInfo.marginLeft + lineInfo.width, 0, 0); + + if (char.IsSeparator(currentCharacter)) + isFirstSeperator = true; + else + isFirstSeperator = false; + } + else + { + float gap = !m_isRightToLeft ? lineInfo.width - lineInfo.maxAdvance : lineInfo.width + lineInfo.maxAdvance; + + int visibleCount = lineInfo.visibleCharacterCount - 1 + lineInfo.controlCharacterCount; + + // Get the number of spaces for each line ignoring the last character if it is not visible (ie. a space or linefeed). + int spaces = (characterInfos[lineInfo.lastCharacterIndex].isVisible ? lineInfo.spaceCount : lineInfo.spaceCount - 1) - lineInfo.controlCharacterCount; + + if (isFirstSeperator) { spaces -= 1; visibleCount += 1; } + + float ratio = spaces > 0 ? m_wordWrappingRatios : 1; + + if (spaces < 1) spaces = 1; + + if (currentCharacter != 0xA0 && (currentCharacter == 9 || char.IsSeparator((char)currentCharacter))) + { + if (!m_isRightToLeft) + justificationOffset += new Vector3(gap * (1 - ratio) / spaces, 0, 0); + else + justificationOffset -= new Vector3(gap * (1 - ratio) / spaces, 0, 0); + } + else + { + if (!m_isRightToLeft) + justificationOffset += new Vector3(gap * ratio / visibleCount, 0, 0); + else + justificationOffset -= new Vector3(gap * ratio / visibleCount, 0, 0); + } + } + } + else + { + if (!m_isRightToLeft) + justificationOffset = new Vector3(lineInfo.marginLeft, 0, 0); // Keep last line left justified. + else + justificationOffset = new Vector3(lineInfo.marginLeft + lineInfo.width, 0, 0); // Keep last line right justified. + } + //Debug.Log("Char [" + (char)charCode + "] Code:" + charCode + " Line # " + currentLine + " Offset:" + justificationOffset + " # Spaces:" + lineInfo.spaceCount + " # Characters:" + lineInfo.characterCount); + break; + } + //} + #if TMP_PROFILE_ON + Profiler.EndSample(); + #endif + #endregion End Text Justification + + offset = anchorOffset + justificationOffset; + + // Handle UV2 mapping options and packing of scale information into UV2. + #region Handling of UV2 mapping & Scale packing + bool isCharacterVisible = characterInfos[i].isVisible; + if (isCharacterVisible) + { + TMP_TextElementType elementType = characterInfos[i].elementType; + switch (elementType) + { + // CHARACTERS + case TMP_TextElementType.Character: + Extents lineExtents = lineInfo.lineExtents; + float uvOffset = (m_uvLineOffset * currentLine) % 1; // + m_uvOffset.x; + + // Setup UV2 based on Character Mapping Options Selected + #region Handle UV Mapping Options + #if TMP_PROFILE_ON + Profiler.BeginSample("UV MAPPING"); + #endif + switch (m_horizontalMapping) + { + case TextureMappingOptions.Character: + characterInfos[i].vertex_BL.uv2.x = 0; //+ m_uvOffset.x; + characterInfos[i].vertex_TL.uv2.x = 0; //+ m_uvOffset.x; + characterInfos[i].vertex_TR.uv2.x = 1; //+ m_uvOffset.x; + characterInfos[i].vertex_BR.uv2.x = 1; //+ m_uvOffset.x; + break; + + case TextureMappingOptions.Line: + if (m_textAlignment != TextAlignmentOptions.Justified) + { + characterInfos[i].vertex_BL.uv2.x = (characterInfos[i].vertex_BL.position.x - lineExtents.min.x) / (lineExtents.max.x - lineExtents.min.x) + uvOffset; + characterInfos[i].vertex_TL.uv2.x = (characterInfos[i].vertex_TL.position.x - lineExtents.min.x) / (lineExtents.max.x - lineExtents.min.x) + uvOffset; + characterInfos[i].vertex_TR.uv2.x = (characterInfos[i].vertex_TR.position.x - lineExtents.min.x) / (lineExtents.max.x - lineExtents.min.x) + uvOffset; + characterInfos[i].vertex_BR.uv2.x = (characterInfos[i].vertex_BR.position.x - lineExtents.min.x) / (lineExtents.max.x - lineExtents.min.x) + uvOffset; + break; + } + else // Special Case if Justified is used in Line Mode. + { + characterInfos[i].vertex_BL.uv2.x = (characterInfos[i].vertex_BL.position.x + justificationOffset.x - m_meshExtents.min.x) / (m_meshExtents.max.x - m_meshExtents.min.x) + uvOffset; + characterInfos[i].vertex_TL.uv2.x = (characterInfos[i].vertex_TL.position.x + justificationOffset.x - m_meshExtents.min.x) / (m_meshExtents.max.x - m_meshExtents.min.x) + uvOffset; + characterInfos[i].vertex_TR.uv2.x = (characterInfos[i].vertex_TR.position.x + justificationOffset.x - m_meshExtents.min.x) / (m_meshExtents.max.x - m_meshExtents.min.x) + uvOffset; + characterInfos[i].vertex_BR.uv2.x = (characterInfos[i].vertex_BR.position.x + justificationOffset.x - m_meshExtents.min.x) / (m_meshExtents.max.x - m_meshExtents.min.x) + uvOffset; + break; + } + + case TextureMappingOptions.Paragraph: + characterInfos[i].vertex_BL.uv2.x = (characterInfos[i].vertex_BL.position.x + justificationOffset.x - m_meshExtents.min.x) / (m_meshExtents.max.x - m_meshExtents.min.x) + uvOffset; + characterInfos[i].vertex_TL.uv2.x = (characterInfos[i].vertex_TL.position.x + justificationOffset.x - m_meshExtents.min.x) / (m_meshExtents.max.x - m_meshExtents.min.x) + uvOffset; + characterInfos[i].vertex_TR.uv2.x = (characterInfos[i].vertex_TR.position.x + justificationOffset.x - m_meshExtents.min.x) / (m_meshExtents.max.x - m_meshExtents.min.x) + uvOffset; + characterInfos[i].vertex_BR.uv2.x = (characterInfos[i].vertex_BR.position.x + justificationOffset.x - m_meshExtents.min.x) / (m_meshExtents.max.x - m_meshExtents.min.x) + uvOffset; + break; + + case TextureMappingOptions.MatchAspect: + + switch (m_verticalMapping) + { + case TextureMappingOptions.Character: + characterInfos[i].vertex_BL.uv2.y = 0; // + m_uvOffset.y; + characterInfos[i].vertex_TL.uv2.y = 1; // + m_uvOffset.y; + characterInfos[i].vertex_TR.uv2.y = 0; // + m_uvOffset.y; + characterInfos[i].vertex_BR.uv2.y = 1; // + m_uvOffset.y; + break; + + case TextureMappingOptions.Line: + characterInfos[i].vertex_BL.uv2.y = (characterInfos[i].vertex_BL.position.y - lineExtents.min.y) / (lineExtents.max.y - lineExtents.min.y) + uvOffset; + characterInfos[i].vertex_TL.uv2.y = (characterInfos[i].vertex_TL.position.y - lineExtents.min.y) / (lineExtents.max.y - lineExtents.min.y) + uvOffset; + characterInfos[i].vertex_TR.uv2.y = characterInfos[i].vertex_BL.uv2.y; + characterInfos[i].vertex_BR.uv2.y = characterInfos[i].vertex_TL.uv2.y; + break; + + case TextureMappingOptions.Paragraph: + characterInfos[i].vertex_BL.uv2.y = (characterInfos[i].vertex_BL.position.y - m_meshExtents.min.y) / (m_meshExtents.max.y - m_meshExtents.min.y) + uvOffset; + characterInfos[i].vertex_TL.uv2.y = (characterInfos[i].vertex_TL.position.y - m_meshExtents.min.y) / (m_meshExtents.max.y - m_meshExtents.min.y) + uvOffset; + characterInfos[i].vertex_TR.uv2.y = characterInfos[i].vertex_BL.uv2.y; + characterInfos[i].vertex_BR.uv2.y = characterInfos[i].vertex_TL.uv2.y; + break; + + case TextureMappingOptions.MatchAspect: + Debug.Log("ERROR: Cannot Match both Vertical & Horizontal."); + break; + } + + //float xDelta = 1 - (_uv2s[vert_index + 0].y * textMeshCharacterInfo[i].AspectRatio); // Left aligned + float xDelta = (1 - ((characterInfos[i].vertex_BL.uv2.y + characterInfos[i].vertex_TL.uv2.y) * characterInfos[i].aspectRatio)) / 2; // Center of Rectangle + + characterInfos[i].vertex_BL.uv2.x = (characterInfos[i].vertex_BL.uv2.y * characterInfos[i].aspectRatio) + xDelta + uvOffset; + characterInfos[i].vertex_TL.uv2.x = characterInfos[i].vertex_BL.uv2.x; + characterInfos[i].vertex_TR.uv2.x = (characterInfos[i].vertex_TL.uv2.y * characterInfos[i].aspectRatio) + xDelta + uvOffset; + characterInfos[i].vertex_BR.uv2.x = characterInfos[i].vertex_TR.uv2.x; + break; + } + + switch (m_verticalMapping) + { + case TextureMappingOptions.Character: + characterInfos[i].vertex_BL.uv2.y = 0; // + m_uvOffset.y; + characterInfos[i].vertex_TL.uv2.y = 1; // + m_uvOffset.y; + characterInfos[i].vertex_TR.uv2.y = 1; // + m_uvOffset.y; + characterInfos[i].vertex_BR.uv2.y = 0; // + m_uvOffset.y; + break; + + case TextureMappingOptions.Line: + characterInfos[i].vertex_BL.uv2.y = (characterInfos[i].vertex_BL.position.y - lineInfo.descender) / (lineInfo.ascender - lineInfo.descender); // + m_uvOffset.y; + characterInfos[i].vertex_TL.uv2.y = (characterInfos[i].vertex_TL.position.y - lineInfo.descender) / (lineInfo.ascender - lineInfo.descender); // + m_uvOffset.y; + characterInfos[i].vertex_TR.uv2.y = characterInfos[i].vertex_TL.uv2.y; + characterInfos[i].vertex_BR.uv2.y = characterInfos[i].vertex_BL.uv2.y; + break; + + case TextureMappingOptions.Paragraph: + characterInfos[i].vertex_BL.uv2.y = (characterInfos[i].vertex_BL.position.y - m_meshExtents.min.y) / (m_meshExtents.max.y - m_meshExtents.min.y); // + m_uvOffset.y; + characterInfos[i].vertex_TL.uv2.y = (characterInfos[i].vertex_TL.position.y - m_meshExtents.min.y) / (m_meshExtents.max.y - m_meshExtents.min.y); // + m_uvOffset.y; + characterInfos[i].vertex_TR.uv2.y = characterInfos[i].vertex_TL.uv2.y; + characterInfos[i].vertex_BR.uv2.y = characterInfos[i].vertex_BL.uv2.y; + break; + + case TextureMappingOptions.MatchAspect: + float yDelta = (1 - ((characterInfos[i].vertex_BL.uv2.x + characterInfos[i].vertex_TR.uv2.x) / characterInfos[i].aspectRatio)) / 2; // Center of Rectangle + + characterInfos[i].vertex_BL.uv2.y = yDelta + (characterInfos[i].vertex_BL.uv2.x / characterInfos[i].aspectRatio); // + m_uvOffset.y; + characterInfos[i].vertex_TL.uv2.y = yDelta + (characterInfos[i].vertex_TR.uv2.x / characterInfos[i].aspectRatio); // + m_uvOffset.y; + characterInfos[i].vertex_BR.uv2.y = characterInfos[i].vertex_BL.uv2.y; + characterInfos[i].vertex_TR.uv2.y = characterInfos[i].vertex_TL.uv2.y; + break; + } + #if TMP_PROFILE_ON + Profiler.EndSample(); + #endif + #endregion End UV Mapping Options + + // Pack UV's so that we can pass Xscale needed for Shader to maintain 1:1 ratio. + #region Pack Scale into UV2 + #if TMP_PROFILE_ON + Profiler.BeginSample("Pack UV"); + #endif + xScale = characterInfos[i].scale * (1 - m_charWidthAdjDelta); + if (!characterInfos[i].isUsingAlternateTypeface && (characterInfos[i].style & FontStyles.Bold) == FontStyles.Bold) xScale *= -1; + + switch (canvasRenderMode) + { + case RenderMode.ScreenSpaceOverlay: + xScale *= Mathf.Abs(lossyScale) / canvasScaleFactor; + break; + case RenderMode.ScreenSpaceCamera: + xScale *= isCameraAssigned ? Mathf.Abs(lossyScale) : 1; + break; + case RenderMode.WorldSpace: + xScale *= Mathf.Abs(lossyScale); + break; + } + + // isBold is encoded in the X value and SDF Scale in Y. + //Vector2 vertexData = new Vector2((characterInfos[i].style & FontStyles.Bold) == FontStyles.Bold ? 1 : 0, xScale); + //characterInfos[i].vertex_BL.uv2 = vertexData; + //characterInfos[i].vertex_TL.uv2 = vertexData; + //characterInfos[i].vertex_TR.uv2 = vertexData; + //characterInfos[i].vertex_BR.uv2 = vertexData; + + float x0 = characterInfos[i].vertex_BL.uv2.x; + float y0 = characterInfos[i].vertex_BL.uv2.y; + float x1 = characterInfos[i].vertex_TR.uv2.x; + float y1 = characterInfos[i].vertex_TR.uv2.y; + + float dx = (int)x0; + float dy = (int)y0; + + x0 = x0 - dx; + x1 = x1 - dx; + y0 = y0 - dy; + y1 = y1 - dy; + + // Optimization to avoid having a vector2 returned from the Pack UV function. + characterInfos[i].vertex_BL.uv2.x = PackUV(x0, y0); characterInfos[i].vertex_BL.uv2.y = xScale; + characterInfos[i].vertex_TL.uv2.x = PackUV(x0, y1); characterInfos[i].vertex_TL.uv2.y = xScale; + characterInfos[i].vertex_TR.uv2.x = PackUV(x1, y1); characterInfos[i].vertex_TR.uv2.y = xScale; + characterInfos[i].vertex_BR.uv2.x = PackUV(x1, y0); characterInfos[i].vertex_BR.uv2.y = xScale; + #if TMP_PROFILE_ON + Profiler.EndSample(); + #endif + #endregion + break; + + // SPRITES + case TMP_TextElementType.Sprite: + // Nothing right now + break; + } + + // Handle maxVisibleCharacters, maxVisibleLines and Overflow Page Mode. + #region Handle maxVisibleCharacters / maxVisibleLines / Page Mode + #if TMP_PROFILE_ON + Profiler.BeginSample("Process MaxVisible Characters & Lines"); + #endif + if (i < m_maxVisibleCharacters && wordCount < m_maxVisibleWords && currentLine < m_maxVisibleLines && m_overflowMode != TextOverflowModes.Page) + { + characterInfos[i].vertex_BL.position += offset; + characterInfos[i].vertex_TL.position += offset; + characterInfos[i].vertex_TR.position += offset; + characterInfos[i].vertex_BR.position += offset; + } + else if (i < m_maxVisibleCharacters && wordCount < m_maxVisibleWords && currentLine < m_maxVisibleLines && m_overflowMode == TextOverflowModes.Page && characterInfos[i].pageNumber == pageToDisplay) + { + characterInfos[i].vertex_BL.position += offset; + characterInfos[i].vertex_TL.position += offset; + characterInfos[i].vertex_TR.position += offset; + characterInfos[i].vertex_BR.position += offset; + } + else + { + characterInfos[i].vertex_BL.position = Vector3.zero; + characterInfos[i].vertex_TL.position = Vector3.zero; + characterInfos[i].vertex_TR.position = Vector3.zero; + characterInfos[i].vertex_BR.position = Vector3.zero; + characterInfos[i].isVisible = false; + } + #if TMP_PROFILE_ON + Profiler.EndSample(); + #endif + #endregion + + + // Fill Vertex Buffers for the various types of element + if (elementType == TMP_TextElementType.Character) + { + FillCharacterVertexBuffers(i, vert_index_X4); + } + else if (elementType == TMP_TextElementType.Sprite) + { + FillSpriteVertexBuffers(i, sprite_index_X4); + } + } + #endregion + + // Apply Alignment and Justification Offset + m_textInfo.characterInfo[i].bottomLeft += offset; + m_textInfo.characterInfo[i].topLeft += offset; + m_textInfo.characterInfo[i].topRight += offset; + m_textInfo.characterInfo[i].bottomRight += offset; + + m_textInfo.characterInfo[i].origin += offset.x; + m_textInfo.characterInfo[i].xAdvance += offset.x; + + m_textInfo.characterInfo[i].ascender += offset.y; + m_textInfo.characterInfo[i].descender += offset.y; + m_textInfo.characterInfo[i].baseLine += offset.y; + + // Update MeshExtents + if (isCharacterVisible) + { + //m_meshExtents.min = new Vector2(Mathf.Min(m_meshExtents.min.x, m_textInfo.characterInfo[i].bottomLeft.x), Mathf.Min(m_meshExtents.min.y, m_textInfo.characterInfo[i].bottomLeft.y)); + //m_meshExtents.max = new Vector2(Mathf.Max(m_meshExtents.max.x, m_textInfo.characterInfo[i].topRight.x), Mathf.Max(m_meshExtents.max.y, m_textInfo.characterInfo[i].topLeft.y)); + } + + // Need to recompute lineExtent to account for the offset from justification. + #region Adjust lineExtents resulting from alignment offset + #if TMP_PROFILE_ON + Profiler.BeginSample("Adjust LineExtents"); + #endif + if (currentLine != lastLine || i == m_characterCount - 1) + { + // Update the previous line's extents + if (currentLine != lastLine) + { + m_textInfo.lineInfo[lastLine].baseline += offset.y; + m_textInfo.lineInfo[lastLine].ascender += offset.y; + m_textInfo.lineInfo[lastLine].descender += offset.y; + + m_textInfo.lineInfo[lastLine].lineExtents.min = new Vector2(m_textInfo.characterInfo[m_textInfo.lineInfo[lastLine].firstCharacterIndex].bottomLeft.x, m_textInfo.lineInfo[lastLine].descender); + m_textInfo.lineInfo[lastLine].lineExtents.max = new Vector2(m_textInfo.characterInfo[m_textInfo.lineInfo[lastLine].lastVisibleCharacterIndex].topRight.x, m_textInfo.lineInfo[lastLine].ascender); + } + + // Update the current line's extents + if (i == m_characterCount - 1) + { + m_textInfo.lineInfo[currentLine].baseline += offset.y; + m_textInfo.lineInfo[currentLine].ascender += offset.y; + m_textInfo.lineInfo[currentLine].descender += offset.y; + + m_textInfo.lineInfo[currentLine].lineExtents.min = new Vector2(m_textInfo.characterInfo[m_textInfo.lineInfo[currentLine].firstCharacterIndex].bottomLeft.x, m_textInfo.lineInfo[currentLine].descender); + m_textInfo.lineInfo[currentLine].lineExtents.max = new Vector2(m_textInfo.characterInfo[m_textInfo.lineInfo[currentLine].lastVisibleCharacterIndex].topRight.x, m_textInfo.lineInfo[currentLine].ascender); + } + } + #if TMP_PROFILE_ON + Profiler.EndSample(); + #endif + #endregion + + + // Track Word Count per line and for the object + #region Track Word Count + #if TMP_PROFILE_ON + Profiler.BeginSample("Track Word Count"); + #endif + if (char.IsLetterOrDigit(currentCharacter) || currentCharacter == 0x2D || currentCharacter == 0xAD || currentCharacter == 0x2010 || currentCharacter == 0x2011) + { + if (isStartOfWord == false) + { + isStartOfWord = true; + wordFirstChar = i; + } + + // If last character is a word + if (isStartOfWord && i == m_characterCount - 1) + { + int size = m_textInfo.wordInfo.Length; + int index = m_textInfo.wordCount; + + if (m_textInfo.wordCount + 1 > size) + TMP_TextInfo.Resize(ref m_textInfo.wordInfo, size + 1); + + wordLastChar = i; + + m_textInfo.wordInfo[index].firstCharacterIndex = wordFirstChar; + m_textInfo.wordInfo[index].lastCharacterIndex = wordLastChar; + m_textInfo.wordInfo[index].characterCount = wordLastChar - wordFirstChar + 1; + m_textInfo.wordInfo[index].textComponent = this; + + wordCount += 1; + m_textInfo.wordCount += 1; + m_textInfo.lineInfo[currentLine].wordCount += 1; + } + } + else if (isStartOfWord || i == 0 && (!char.IsPunctuation(currentCharacter) || char.IsWhiteSpace(currentCharacter) || currentCharacter == 0x200B || i == m_characterCount - 1)) + { + if (i > 0 && i < characterInfos.Length - 1 && i < m_characterCount && (currentCharacter == 39 || currentCharacter == 8217) && char.IsLetterOrDigit(characterInfos[i - 1].character) && char.IsLetterOrDigit(characterInfos[i + 1].character)) + { + + } + else + { + wordLastChar = i == m_characterCount - 1 && char.IsLetterOrDigit(currentCharacter) ? i : i - 1; + isStartOfWord = false; + + int size = m_textInfo.wordInfo.Length; + int index = m_textInfo.wordCount; + + if (m_textInfo.wordCount + 1 > size) + TMP_TextInfo.Resize(ref m_textInfo.wordInfo, size + 1); + + m_textInfo.wordInfo[index].firstCharacterIndex = wordFirstChar; + m_textInfo.wordInfo[index].lastCharacterIndex = wordLastChar; + m_textInfo.wordInfo[index].characterCount = wordLastChar - wordFirstChar + 1; + m_textInfo.wordInfo[index].textComponent = this; + + wordCount += 1; + m_textInfo.wordCount += 1; + m_textInfo.lineInfo[currentLine].wordCount += 1; + } + } + #if TMP_PROFILE_ON + Profiler.EndSample(); + #endif + #endregion + + + // Setup & Handle Underline + #region Underline + #if TMP_PROFILE_ON + Profiler.BeginSample("Process Underline & Strikethrough"); + #endif + // NOTE: Need to figure out how underline will be handled with multiple fonts and which font will be used for the underline. + bool isUnderline = (m_textInfo.characterInfo[i].style & FontStyles.Underline) == FontStyles.Underline; + if (isUnderline) + { + bool isUnderlineVisible = true; + int currentPage = m_textInfo.characterInfo[i].pageNumber; + + if (i > m_maxVisibleCharacters || currentLine > m_maxVisibleLines || (m_overflowMode == TextOverflowModes.Page && currentPage + 1 != m_pageToDisplay)) + isUnderlineVisible = false; + + // We only use the scale of visible characters. + if (!char.IsWhiteSpace(currentCharacter) && currentCharacter != 0x200B) + { + underlineMaxScale = Mathf.Max(underlineMaxScale, m_textInfo.characterInfo[i].scale); + xScaleMax = Mathf.Max(xScaleMax, Mathf.Abs(xScale)); + underlineBaseLine = Mathf.Min(currentPage == lastPage ? underlineBaseLine : k_LargePositiveFloat, m_textInfo.characterInfo[i].baseLine + font.faceInfo.underlineOffset * underlineMaxScale); + lastPage = currentPage; // Need to track pages to ensure we reset baseline for the new pages. + } + + if (beginUnderline == false && isUnderlineVisible == true && i <= lineInfo.lastVisibleCharacterIndex && currentCharacter != 10 && currentCharacter != 13) + { + if (i == lineInfo.lastVisibleCharacterIndex && char.IsSeparator(currentCharacter)) + { } + else + { + beginUnderline = true; + underlineStartScale = m_textInfo.characterInfo[i].scale; + if (underlineMaxScale == 0) + { + underlineMaxScale = underlineStartScale; + xScaleMax = xScale; + } + underline_start = new Vector3(m_textInfo.characterInfo[i].bottomLeft.x, underlineBaseLine, 0); + underlineColor = m_textInfo.characterInfo[i].underlineColor; + } + } + + // End Underline if text only contains one character. + if (beginUnderline && m_characterCount == 1) + { + beginUnderline = false; + underline_end = new Vector3(m_textInfo.characterInfo[i].topRight.x, underlineBaseLine, 0); + underlineEndScale = m_textInfo.characterInfo[i].scale; + + DrawUnderlineMesh(underline_start, underline_end, ref last_vert_index, underlineStartScale, underlineEndScale, underlineMaxScale, xScaleMax, underlineColor); + underlineMaxScale = 0; + xScaleMax = 0; + underlineBaseLine = k_LargePositiveFloat; + } + else if (beginUnderline && (i == lineInfo.lastCharacterIndex || i >= lineInfo.lastVisibleCharacterIndex)) + { + // Terminate underline at previous visible character if space or carriage return. + if (char.IsWhiteSpace(currentCharacter) || currentCharacter == 0x200B) + { + int lastVisibleCharacterIndex = lineInfo.lastVisibleCharacterIndex; + underline_end = new Vector3(m_textInfo.characterInfo[lastVisibleCharacterIndex].topRight.x, underlineBaseLine, 0); + underlineEndScale = m_textInfo.characterInfo[lastVisibleCharacterIndex].scale; + } + else + { // End underline if last character of the line. + underline_end = new Vector3(m_textInfo.characterInfo[i].topRight.x, underlineBaseLine, 0); + underlineEndScale = m_textInfo.characterInfo[i].scale; + } + + beginUnderline = false; + DrawUnderlineMesh(underline_start, underline_end, ref last_vert_index, underlineStartScale, underlineEndScale, underlineMaxScale, xScaleMax, underlineColor); + underlineMaxScale = 0; + xScaleMax = 0; + underlineBaseLine = k_LargePositiveFloat; + } + else if (beginUnderline && !isUnderlineVisible) + { + beginUnderline = false; + underline_end = new Vector3(m_textInfo.characterInfo[i - 1].topRight.x, underlineBaseLine, 0); + underlineEndScale = m_textInfo.characterInfo[i - 1].scale; + + DrawUnderlineMesh(underline_start, underline_end, ref last_vert_index, underlineStartScale, underlineEndScale, underlineMaxScale, xScaleMax, underlineColor); + underlineMaxScale = 0; + xScaleMax = 0; + underlineBaseLine = k_LargePositiveFloat; + } + else if (beginUnderline && i < m_characterCount - 1 && !underlineColor.Compare(m_textInfo.characterInfo[i + 1].underlineColor)) + { + // End underline if underline color has changed. + beginUnderline = false; + underline_end = new Vector3(m_textInfo.characterInfo[i].topRight.x, underlineBaseLine, 0); + underlineEndScale = m_textInfo.characterInfo[i].scale; + + DrawUnderlineMesh(underline_start, underline_end, ref last_vert_index, underlineStartScale, underlineEndScale, underlineMaxScale, xScaleMax, underlineColor); + underlineMaxScale = 0; + xScaleMax = 0; + underlineBaseLine = k_LargePositiveFloat; + } + } + else + { + // End Underline + if (beginUnderline == true) + { + beginUnderline = false; + underline_end = new Vector3(m_textInfo.characterInfo[i - 1].topRight.x, underlineBaseLine, 0); + underlineEndScale = m_textInfo.characterInfo[i - 1].scale; + + DrawUnderlineMesh(underline_start, underline_end, ref last_vert_index, underlineStartScale, underlineEndScale, underlineMaxScale, xScaleMax, underlineColor); + underlineMaxScale = 0; + xScaleMax = 0; + underlineBaseLine = k_LargePositiveFloat; + } + } + #endregion + + + // Setup & Handle Strikethrough + #region Strikethrough + // NOTE: Need to figure out how underline will be handled with multiple fonts and which font will be used for the underline. + bool isStrikethrough = (m_textInfo.characterInfo[i].style & FontStyles.Strikethrough) == FontStyles.Strikethrough; + float strikethroughOffset = currentFontAsset.faceInfo.strikethroughOffset; + + if (isStrikethrough) + { + bool isStrikeThroughVisible = true; + + if (i > m_maxVisibleCharacters || currentLine > m_maxVisibleLines || (m_overflowMode == TextOverflowModes.Page && m_textInfo.characterInfo[i].pageNumber + 1 != m_pageToDisplay)) + isStrikeThroughVisible = false; + + if (beginStrikethrough == false && isStrikeThroughVisible && i <= lineInfo.lastVisibleCharacterIndex && currentCharacter != 10 && currentCharacter != 13) + { + if (i == lineInfo.lastVisibleCharacterIndex && char.IsSeparator(currentCharacter)) + { } + else + { + beginStrikethrough = true; + strikethroughPointSize = m_textInfo.characterInfo[i].pointSize; + strikethroughScale = m_textInfo.characterInfo[i].scale; + strikethrough_start = new Vector3(m_textInfo.characterInfo[i].bottomLeft.x, m_textInfo.characterInfo[i].baseLine + strikethroughOffset * strikethroughScale, 0); + strikethroughColor = m_textInfo.characterInfo[i].strikethroughColor; + strikethroughBaseline = m_textInfo.characterInfo[i].baseLine; + //Debug.Log("Char [" + currentCharacter + "] Start Strikethrough POS: " + strikethrough_start); + } + } + + // End Strikethrough if text only contains one character. + if (beginStrikethrough && m_characterCount == 1) + { + beginStrikethrough = false; + strikethrough_end = new Vector3(m_textInfo.characterInfo[i].topRight.x, m_textInfo.characterInfo[i].baseLine + strikethroughOffset * strikethroughScale, 0); + + DrawUnderlineMesh(strikethrough_start, strikethrough_end, ref last_vert_index, strikethroughScale, strikethroughScale, strikethroughScale, xScale, strikethroughColor); + } + else if (beginStrikethrough && i == lineInfo.lastCharacterIndex) + { + // Terminate Strikethrough at previous visible character if space or carriage return. + if (char.IsWhiteSpace(currentCharacter) || currentCharacter == 0x200B) + { + int lastVisibleCharacterIndex = lineInfo.lastVisibleCharacterIndex; + strikethrough_end = new Vector3(m_textInfo.characterInfo[lastVisibleCharacterIndex].topRight.x, m_textInfo.characterInfo[lastVisibleCharacterIndex].baseLine + strikethroughOffset * strikethroughScale, 0); + } + else + { + // Terminate Strikethrough at last character of line. + strikethrough_end = new Vector3(m_textInfo.characterInfo[i].topRight.x, m_textInfo.characterInfo[i].baseLine + strikethroughOffset * strikethroughScale, 0); + } + + beginStrikethrough = false; + DrawUnderlineMesh(strikethrough_start, strikethrough_end, ref last_vert_index, strikethroughScale, strikethroughScale, strikethroughScale, xScale, strikethroughColor); + } + else if (beginStrikethrough && i < m_characterCount && (m_textInfo.characterInfo[i + 1].pointSize != strikethroughPointSize || !TMP_Math.Approximately(m_textInfo.characterInfo[i + 1].baseLine + offset.y, strikethroughBaseline))) + { + // Terminate Strikethrough if scale changes. + beginStrikethrough = false; + + int lastVisibleCharacterIndex = lineInfo.lastVisibleCharacterIndex; + if (i > lastVisibleCharacterIndex) + strikethrough_end = new Vector3(m_textInfo.characterInfo[lastVisibleCharacterIndex].topRight.x, m_textInfo.characterInfo[lastVisibleCharacterIndex].baseLine + strikethroughOffset * strikethroughScale, 0); + else + strikethrough_end = new Vector3(m_textInfo.characterInfo[i].topRight.x, m_textInfo.characterInfo[i].baseLine + strikethroughOffset * strikethroughScale, 0); + + DrawUnderlineMesh(strikethrough_start, strikethrough_end, ref last_vert_index, strikethroughScale, strikethroughScale, strikethroughScale, xScale, strikethroughColor); + //Debug.Log("Char [" + currentCharacter + "] at Index: " + i + " End Strikethrough POS: " + strikethrough_end + " Baseline: " + m_textInfo.characterInfo[i].baseLine.ToString("f3")); + } + else if (beginStrikethrough && i < m_characterCount && currentFontAsset.GetInstanceID() != characterInfos[i + 1].fontAsset.GetInstanceID()) + { + // Terminate Strikethrough if font asset changes. + beginStrikethrough = false; + strikethrough_end = new Vector3(m_textInfo.characterInfo[i].topRight.x, m_textInfo.characterInfo[i].baseLine + strikethroughOffset * strikethroughScale, 0); + + DrawUnderlineMesh(strikethrough_start, strikethrough_end, ref last_vert_index, strikethroughScale, strikethroughScale, strikethroughScale, xScale, strikethroughColor); + } + else if (beginStrikethrough && !isStrikeThroughVisible) + { + // Terminate Strikethrough if character is not visible. + beginStrikethrough = false; + strikethrough_end = new Vector3(m_textInfo.characterInfo[i - 1].topRight.x, m_textInfo.characterInfo[i - 1].baseLine + strikethroughOffset * strikethroughScale, 0); + + DrawUnderlineMesh(strikethrough_start, strikethrough_end, ref last_vert_index, strikethroughScale, strikethroughScale, strikethroughScale, xScale, strikethroughColor); + } + } + else + { + // End Strikethrough + if (beginStrikethrough == true) + { + beginStrikethrough = false; + strikethrough_end = new Vector3(m_textInfo.characterInfo[i - 1].topRight.x, m_textInfo.characterInfo[i - 1].baseLine + strikethroughOffset * strikethroughScale, 0); + + DrawUnderlineMesh(strikethrough_start, strikethrough_end, ref last_vert_index, strikethroughScale, strikethroughScale, strikethroughScale, xScale, strikethroughColor); + } + } + #endregion + + + // HANDLE TEXT HIGHLIGHTING + #region Text Highlighting + bool isHighlight = (m_textInfo.characterInfo[i].style & FontStyles.Highlight) == FontStyles.Highlight; + if (isHighlight) + { + bool isHighlightVisible = true; + int currentPage = m_textInfo.characterInfo[i].pageNumber; + + if (i > m_maxVisibleCharacters || currentLine > m_maxVisibleLines || (m_overflowMode == TextOverflowModes.Page && currentPage + 1 != m_pageToDisplay)) + isHighlightVisible = false; + + if (beginHighlight == false && isHighlightVisible == true && i <= lineInfo.lastVisibleCharacterIndex && currentCharacter != 10 && currentCharacter != 13) + { + if (i == lineInfo.lastVisibleCharacterIndex && char.IsSeparator(currentCharacter)) + { } + else + { + beginHighlight = true; + highlight_start = k_LargePositiveVector2; + highlight_end = k_LargeNegativeVector2; + highlightColor = m_textInfo.characterInfo[i].highlightColor; + } + } + + if (beginHighlight) + { + Color32 currentHighlightColor = m_textInfo.characterInfo[i].highlightColor; + bool isColorTransition = false; + + // Handle Highlight color changes + if (!highlightColor.Compare(currentHighlightColor)) + { + // End drawing at the start of new highlight color to prevent a gap between highlight sections. + highlight_end.x = (highlight_end.x + m_textInfo.characterInfo[i].bottomLeft.x) / 2; + + highlight_start.y = Mathf.Min(highlight_start.y, m_textInfo.characterInfo[i].descender); + highlight_end.y = Mathf.Max(highlight_end.y, m_textInfo.characterInfo[i].ascender); + + DrawTextHighlight(highlight_start, highlight_end, ref last_vert_index, highlightColor); + + beginHighlight = true; + highlight_start = highlight_end; + + highlight_end = new Vector3(m_textInfo.characterInfo[i].topRight.x, m_textInfo.characterInfo[i].descender, 0); + highlightColor = m_textInfo.characterInfo[i].highlightColor; + + isColorTransition = true; + } + + if (!isColorTransition) + { + // Use the Min / Max Extents of the Highlight area to handle different character sizes and fonts. + highlight_start.x = Mathf.Min(highlight_start.x, m_textInfo.characterInfo[i].bottomLeft.x); + highlight_start.y = Mathf.Min(highlight_start.y, m_textInfo.characterInfo[i].descender); + + highlight_end.x = Mathf.Max(highlight_end.x, m_textInfo.characterInfo[i].topRight.x); + highlight_end.y = Mathf.Max(highlight_end.y, m_textInfo.characterInfo[i].ascender); + } + } + + // End Highlight if text only contains one character. + if (beginHighlight && m_characterCount == 1) + { + beginHighlight = false; + + DrawTextHighlight(highlight_start, highlight_end, ref last_vert_index, highlightColor); + } + else if (beginHighlight && (i == lineInfo.lastCharacterIndex || i >= lineInfo.lastVisibleCharacterIndex)) + { + beginHighlight = false; + DrawTextHighlight(highlight_start, highlight_end, ref last_vert_index, highlightColor); + } + else if (beginHighlight && !isHighlightVisible) + { + beginHighlight = false; + DrawTextHighlight(highlight_start, highlight_end, ref last_vert_index, highlightColor); + } + } + else + { + // End Highlight + if (beginHighlight == true) + { + beginHighlight = false; + DrawTextHighlight(highlight_start, highlight_end, ref last_vert_index, highlightColor); + } + } + #endregion + #if TMP_PROFILE_ON + Profiler.EndSample(); + #endif + #endregion + + lastLine = currentLine; + } + #endregion + + + // METRICS ABOUT THE TEXT OBJECT + m_textInfo.characterCount = m_characterCount; + m_textInfo.spriteCount = m_spriteCount; + m_textInfo.lineCount = lineCount; + m_textInfo.wordCount = wordCount != 0 && m_characterCount > 0 ? wordCount : 1; + m_textInfo.pageCount = m_pageNumber + 1; + + #if TMP_PROFILE_PHASES_ON + Profiler.EndSample(); + #endif + + + // *** UPLOAD MESH DATA *** + #if TMP_PROFILE_PHASES_ON + Profiler.BeginSample("TMP Generate Text - Phase III"); + #endif + if (m_renderMode == TextRenderFlags.Render && IsActive()) + { + // Clear unused vertices + //m_textInfo.meshInfo[0].ClearUnusedVertices(); + + // Must ensure the Canvas support the additon vertex attributes used by TMP. + if (m_canvas.additionalShaderChannels != (AdditionalCanvasShaderChannels)25) + m_canvas.additionalShaderChannels |= (AdditionalCanvasShaderChannels)25; + + // Sort the geometry of the text object if needed. + if (m_geometrySortingOrder != VertexSortingOrder.Normal) + m_textInfo.meshInfo[0].SortGeometry(VertexSortingOrder.Reverse); + + // Upload Mesh Data + m_mesh.MarkDynamic(); + m_mesh.vertices = m_textInfo.meshInfo[0].vertices; + m_mesh.uv = m_textInfo.meshInfo[0].uvs0; + m_mesh.uv2 = m_textInfo.meshInfo[0].uvs2; + //m_mesh.uv4 = m_textInfo.meshInfo[0].uvs4; + m_mesh.colors32 = m_textInfo.meshInfo[0].colors32; + + // Compute Bounds for the mesh. Manual computation is more efficient then using Mesh.recalcualteBounds. + m_mesh.RecalculateBounds(); + //m_mesh.bounds = new Bounds(new Vector3((m_meshExtents.max.x + m_meshExtents.min.x) / 2, (m_meshExtents.max.y + m_meshExtents.min.y) / 2, 0) + offset, new Vector3(m_meshExtents.max.x - m_meshExtents.min.x, m_meshExtents.max.y - m_meshExtents.min.y, 0)); + + m_canvasRenderer.SetMesh(m_mesh); + + // Cache CanvasRenderer color of the parent text object. + Color parentBaseColor = m_canvasRenderer.GetColor(); + + for (int i = 1; i < m_textInfo.materialCount; i++) + { + // Clear unused vertices + m_textInfo.meshInfo[i].ClearUnusedVertices(); + + if (m_subTextObjects[i] == null) continue; + + // Sort the geometry of the sub-text objects if needed. + if (m_geometrySortingOrder != VertexSortingOrder.Normal) + m_textInfo.meshInfo[i].SortGeometry(VertexSortingOrder.Reverse); + + //m_subTextObjects[i].mesh.MarkDynamic(); + m_subTextObjects[i].mesh.vertices = m_textInfo.meshInfo[i].vertices; + m_subTextObjects[i].mesh.uv = m_textInfo.meshInfo[i].uvs0; + m_subTextObjects[i].mesh.uv2 = m_textInfo.meshInfo[i].uvs2; + //m_subTextObjects[i].mesh.uv4 = m_textInfo.meshInfo[i].uvs4; + m_subTextObjects[i].mesh.colors32 = m_textInfo.meshInfo[i].colors32; + + m_subTextObjects[i].mesh.RecalculateBounds(); + + m_subTextObjects[i].canvasRenderer.SetMesh(m_subTextObjects[i].mesh); + + // Set CanvasRenderer color to match the parent text object. + m_subTextObjects[i].canvasRenderer.SetColor(parentBaseColor); + } + } + + // Event indicating the text has been regenerated. + TMPro_EventManager.ON_TEXT_CHANGED(this); + //SendOnTextChanged(); + + #if TMP_PROFILE_PHASES_ON + Profiler.EndSample(); + #endif + + //Debug.Log("Done Rendering Text."); + } + + + /// <summary> + /// Method to return the local corners of the Text Container or RectTransform. + /// </summary> + /// <returns></returns> + protected override Vector3[] GetTextContainerLocalCorners() + { + if (m_rectTransform == null) m_rectTransform = this.rectTransform; + + m_rectTransform.GetLocalCorners(m_RectTransformCorners); + + return m_RectTransformCorners; + } + + + /// <summary> + /// Method to Enable or Disable child SubMesh objects. + /// </summary> + /// <param name="state"></param> + protected override void SetActiveSubMeshes(bool state) + { + for (int i = 1; i < m_subTextObjects.Length && m_subTextObjects[i] != null; i++) + { + if (m_subTextObjects[i].enabled != state) + m_subTextObjects[i].enabled = state; + } + } + + + /// <summary> + /// Method returning the compound bounds of the text object and child sub objects. + /// </summary> + /// <returns></returns> + protected override Bounds GetCompoundBounds() + { + Bounds mainBounds = m_mesh.bounds; + Vector3 min = mainBounds.min; + Vector3 max = mainBounds.max; + + for (int i = 1; i < m_subTextObjects.Length && m_subTextObjects[i] != null; i++) + { + Bounds subBounds = m_subTextObjects[i].mesh.bounds; + min.x = min.x < subBounds.min.x ? min.x : subBounds.min.x; + min.y = min.y < subBounds.min.y ? min.y : subBounds.min.y; + + max.x = max.x > subBounds.max.x ? max.x : subBounds.max.x; + max.y = max.y > subBounds.max.y ? max.y : subBounds.max.y; + } + + Vector3 center = (min + max) / 2; + Vector2 size = max - min; + return new Bounds(center, size); + } + + + //public override void UpdateGeometry() + //{ + + //} + + + /// <summary> + /// Method to Update Scale in UV2 + /// </summary> + //void UpdateSDFScale(float lossyScale) + //{ + // // TODO: Resolve - Underline / Strikethrough segments not getting their SDF Scale adjusted. + + // //Debug.Log("Updating SDF Scale."); + + // // Return if we don't have a valid reference to a Canvas. + // if (m_canvas == null) + // { + // m_canvas = GetCanvas(); + // if (m_canvas == null) return; + // } + + // lossyScale = lossyScale == 0 ? 1 : lossyScale; + + // float xScale = 0; + // float canvasScaleFactor = m_canvas.scaleFactor; + + // if (m_canvas.renderMode == RenderMode.ScreenSpaceOverlay) + // xScale = lossyScale / canvasScaleFactor; + // else if (m_canvas.renderMode == RenderMode.ScreenSpaceCamera) + // xScale = m_canvas.worldCamera != null ? lossyScale : 1; + // else + // xScale = lossyScale; + + // // Iterate through each of the characters. + // for (int i = 0; i < m_textInfo.characterCount; i++) + // { + // // Only update scale for visible characters. + // if (m_textInfo.characterInfo[i].isVisible && m_textInfo.characterInfo[i].elementType == TMP_TextElementType.Character) + // { + // float scale = xScale * m_textInfo.characterInfo[i].scale * (1 - m_charWidthAdjDelta); + // if (!m_textInfo.characterInfo[i].isUsingAlternateTypeface && (m_textInfo.characterInfo[i].style & FontStyles.Bold) == FontStyles.Bold) scale *= -1; + + // int index = m_textInfo.characterInfo[i].materialReferenceIndex; + // int vertexIndex = m_textInfo.characterInfo[i].vertexIndex; + + // m_textInfo.meshInfo[index].uvs2[vertexIndex + 0].y = scale; + // m_textInfo.meshInfo[index].uvs2[vertexIndex + 1].y = scale; + // m_textInfo.meshInfo[index].uvs2[vertexIndex + 2].y = scale; + // m_textInfo.meshInfo[index].uvs2[vertexIndex + 3].y = scale; + // } + // } + + // // Push the updated uv2 scale information to the meshes. + // for (int i = 0; i < m_textInfo.materialCount; i++) + // { + // if (i == 0) + // { + // m_mesh.uv2 = m_textInfo.meshInfo[0].uvs2; + // m_canvasRenderer.SetMesh(m_mesh); + // } + // else + // { + // m_subTextObjects[i].mesh.uv2 = m_textInfo.meshInfo[i].uvs2; + // m_subTextObjects[i].canvasRenderer.SetMesh(m_subTextObjects[i].mesh); + // } + // } + //} + + /// <summary> + /// Method to update the SDF Scale in UV2. + /// </summary> + /// <param name="scaleDelta"></param> + void UpdateSDFScale(float scaleDelta) + { + if (scaleDelta == 0 || scaleDelta == float.PositiveInfinity) + { + m_havePropertiesChanged = true; + OnPreRenderCanvas(); + return; + } + + for (int materialIndex = 0; materialIndex < m_textInfo.materialCount; materialIndex ++) + { + TMP_MeshInfo meshInfo = m_textInfo.meshInfo[materialIndex]; + + for (int i = 0; i < meshInfo.uvs2.Length; i++) + { + meshInfo.uvs2[i].y *= Mathf.Abs(scaleDelta); + } + } + + // Push the updated uv2 scale information to the meshes. + for (int i = 0; i < m_textInfo.materialCount; i++) + { + if (i == 0) + { + m_mesh.uv2 = m_textInfo.meshInfo[0].uvs2; + m_canvasRenderer.SetMesh(m_mesh); + } + else + { + m_subTextObjects[i].mesh.uv2 = m_textInfo.meshInfo[i].uvs2; + m_subTextObjects[i].canvasRenderer.SetMesh(m_subTextObjects[i].mesh); + } + } + } + + + // Function to offset vertices position to account for line spacing changes. + protected override void AdjustLineOffset(int startIndex, int endIndex, float offset) + { + Vector3 vertexOffset = new Vector3(0, offset, 0); + + for (int i = startIndex; i <= endIndex; i++) + { + m_textInfo.characterInfo[i].bottomLeft -= vertexOffset; + m_textInfo.characterInfo[i].topLeft -= vertexOffset; + m_textInfo.characterInfo[i].topRight -= vertexOffset; + m_textInfo.characterInfo[i].bottomRight -= vertexOffset; + + m_textInfo.characterInfo[i].ascender -= vertexOffset.y; + m_textInfo.characterInfo[i].baseLine -= vertexOffset.y; + m_textInfo.characterInfo[i].descender -= vertexOffset.y; + + if (m_textInfo.characterInfo[i].isVisible) + { + m_textInfo.characterInfo[i].vertex_BL.position -= vertexOffset; + m_textInfo.characterInfo[i].vertex_TL.position -= vertexOffset; + m_textInfo.characterInfo[i].vertex_TR.position -= vertexOffset; + m_textInfo.characterInfo[i].vertex_BR.position -= vertexOffset; + } + } + } + + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_UGUI_Private.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_UGUI_Private.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..9c0541e194050a550b99f27a7652bc33c5b6fad1 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TMPro_UGUI_Private.cs.meta @@ -0,0 +1,10 @@ +fileFormatVersion: 2 +guid: 3069a00b8c364df395994d7d379e0a99 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {fileID: 2800000, guid: 8e098d8d28c5182419f7a1c8b91ca722, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TextContainer.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TextContainer.cs new file mode 100644 index 0000000000000000000000000000000000000000..1417cacd832365ff4c867735eae0b56d8364b713 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TextContainer.cs @@ -0,0 +1,370 @@ +using UnityEngine; +using UnityEngine.EventSystems; +using System.Collections; + + +namespace TMPro +{ + + public enum TextContainerAnchors { TopLeft = 0, Top = 1, TopRight = 2, Left = 3, Middle = 4, Right = 5, BottomLeft = 6, Bottom = 7, BottomRight = 8, Custom = 9 }; + + + [RequireComponent(typeof(RectTransform))] + [AddComponentMenu("Layout/Text Container")] + public class TextContainer : UIBehaviour + { + + #pragma warning disable 0618 // Disabled warning related to deprecated properties. This is for backwards compatibility. + + public bool hasChanged + { + get { return m_hasChanged; } + set { m_hasChanged = value; } + } + private bool m_hasChanged; + + + // Pivot / Transform Position + public Vector2 pivot + { + get { return m_pivot; } + set { /*Debug.Log("Pivot has changed.");*/ if (m_pivot != value) { m_pivot = value; m_anchorPosition = GetAnchorPosition(m_pivot); m_hasChanged = true; OnContainerChanged(); } } + } + [SerializeField] + private Vector2 m_pivot; + + + public TextContainerAnchors anchorPosition + { + get { return m_anchorPosition; } + set { /*Debug.Log("Anchor has changed.");*/ if (m_anchorPosition != value) { m_anchorPosition = value; m_pivot = GetPivot(m_anchorPosition); m_hasChanged = true; OnContainerChanged(); } } + } + [SerializeField] + private TextContainerAnchors m_anchorPosition = TextContainerAnchors.Middle; + + + // Rect which defines the Rectangle + public Rect rect + { + get { return m_rect; } + set { /*Debug.Log("Rectangle has changed.");*/ if (m_rect != value) { m_rect = value; /*m_size = new Vector2(m_rect.width, m_rect.height);*/ m_hasChanged = true; OnContainerChanged(); } } + } + [SerializeField] + private Rect m_rect; + + + public Vector2 size + { + get { return new Vector2(m_rect.width, m_rect.height); } + set { /*Debug.Log("Size has changed.");*/ if (new Vector2(m_rect.width, m_rect.height) != value) { SetRect(value); m_hasChanged = true; m_isDefaultWidth = false; m_isDefaultHeight = false; OnContainerChanged(); } } + } + + + // Sets the width of the Text Container. + public float width + { + get { return m_rect.width; } + set { /*Debug.Log("Width has changed.");*/ SetRect(new Vector2(value, m_rect.height)); m_hasChanged = true; m_isDefaultWidth = false; OnContainerChanged(); } + } + + + // Sets the height of the Text Container. + public float height + { + get { return m_rect.height; } + set { SetRect(new Vector2(m_rect.width, value)); m_hasChanged = true; m_isDefaultHeight = false; OnContainerChanged(); } + } + + + // Used to determine if the user has changed the width of the Text Container. + public bool isDefaultWidth + { + get { return m_isDefaultWidth; } + } + private bool m_isDefaultWidth; + + // Used to determine if the user has changed the height of the Text Container. + public bool isDefaultHeight + { + get { return m_isDefaultHeight; } + } + private bool m_isDefaultHeight; + + + public bool isAutoFitting + { + get { return m_isAutoFitting; } + set { m_isAutoFitting = value; } + } + private bool m_isAutoFitting = false; + + + // Corners of the Text Container + public Vector3[] corners + { + get { return m_corners; } + } + private Vector3[] m_corners = new Vector3[4]; + + + public Vector3[] worldCorners + { + get { return m_worldCorners; } + } + private Vector3[] m_worldCorners = new Vector3[4]; + + + //public Vector3 normal + //{ + // get { return m_normal; } + //} + //private Vector3 m_normal; + + + // The margin offset from the Rectangle Bounds + public Vector4 margins + { + get { return m_margins; } + set { if (m_margins != value) { /*Debug.Log("Margins have changed.");*/ m_margins = value; m_hasChanged = true; OnContainerChanged(); } } + } + [SerializeField] + private Vector4 m_margins; + + + /// <summary> + /// The RectTransform used by the object + /// </summary> + public RectTransform rectTransform + { + get + { + if (m_rectTransform == null) m_rectTransform = GetComponent<RectTransform>(); + + return m_rectTransform; + } + } + private RectTransform m_rectTransform; + + + //private Transform m_transform; + //private bool m_isAddingRectTransform; + private static Vector2 k_defaultSize = new Vector2(100, 100); + + + /// <summary> + /// + /// </summary> + public TextMeshPro textMeshPro + { + get + { + if (m_textMeshPro == null) m_textMeshPro = GetComponent<TextMeshPro>(); + return m_textMeshPro; + } + } + private TextMeshPro m_textMeshPro; + + + protected override void Awake() + { + Debug.LogWarning("The Text Container component is now Obsolete and can safely be removed from [" + gameObject.name + "].", this); + + return; + } + + + /// <summary> + /// + /// </summary> + protected override void OnEnable() + { + //Debug.Log("Text Container OnEnable() called."); + + OnContainerChanged(); + } + + + /// <summary> + /// + /// </summary> + protected override void OnDisable() + { + //Debug.Log("OnDisable() called."); + } + + + /// <summary> + /// + /// </summary> + void OnContainerChanged() + { + //Debug.Log("OnContainerChanged"); + + UpdateCorners(); + //UpdateWorldCorners(); + + if (this.m_rectTransform != null) + { + m_rectTransform.sizeDelta = this.size; + m_rectTransform.hasChanged = true; + } + + if (this.textMeshPro != null) + { + m_textMeshPro.SetVerticesDirty(); + m_textMeshPro.margin = m_margins; + } + } + + +#if UNITY_EDITOR + /// <summary> + /// + /// </summary> + protected override void OnValidate() + { + //Debug.Log("OnValidate() called."); + m_hasChanged = true; + OnContainerChanged(); + } +#endif + + + /* + void LateUpdate() + { + // Used by the Run Time Text Input Component ... This will have to be changed. + if (m_transform.hasChanged) + UpdateWorldCorners(); + } + */ + + + + /// <summary> + /// Callback from Unity to handle RectTransform changes. + /// </summary> + protected override void OnRectTransformDimensionsChange() + { + // Required to add a RectTransform to objects created in previous releases. + if (this.rectTransform == null) m_rectTransform = gameObject.AddComponent<RectTransform>(); + + if (m_rectTransform.sizeDelta != k_defaultSize) + this.size = m_rectTransform.sizeDelta; + + pivot = m_rectTransform.pivot; + + m_hasChanged = true; + OnContainerChanged(); + } + + + private void SetRect(Vector2 size) + { + m_rect = new Rect(m_rect.x, m_rect.y, size.x, size.y); + //UpdateCorners(); + } + + private void UpdateCorners() + { + m_corners[0] = new Vector3(-m_pivot.x * m_rect.width, (- m_pivot.y) * m_rect.height); + m_corners[1] = new Vector3(-m_pivot.x * m_rect.width, (1 - m_pivot.y) * m_rect.height); + m_corners[2] = new Vector3((1 - m_pivot.x) * m_rect.width, (1 - m_pivot.y) * m_rect.height); + m_corners[3] = new Vector3((1 - m_pivot.x) * m_rect.width, (- m_pivot.y) * m_rect.height); + //Debug.Log("Pivot " + m_pivot + " Corners 0: " + m_corners[0] + " 1: " + m_corners[1] + " 2: " + m_corners[2] + " 3: " + m_corners[3]); + + if (m_rectTransform != null) + m_rectTransform.pivot = m_pivot; + } + + + //private void UpdateWorldCorners() + //{ + // if (m_transform == null) + // return; + + // Vector3 position = m_transform.position; + // m_worldCorners[0] = position + m_transform.TransformDirection(m_corners[0]); + // m_worldCorners[1] = position + m_transform.TransformDirection(m_corners[1]); + // m_worldCorners[2] = position + m_transform.TransformDirection(m_corners[2]); + // m_worldCorners[3] = position + m_transform.TransformDirection(m_corners[3]); + + // m_normal = Vector3.Cross(worldCorners[1] - worldCorners[0], worldCorners[3] - worldCorners[0]); + //} + + + //public Vector3[] GetWorldCorners() + //{ + // UpdateWorldCorners(); + + // return m_worldCorners; + //} + + + Vector2 GetPivot(TextContainerAnchors anchor) + { + Vector2 pivot = Vector2.zero; + + switch (anchor) + { + case TextContainerAnchors.TopLeft: + pivot = new Vector2(0, 1); + break; + case TextContainerAnchors.Top: + pivot = new Vector2(0.5f, 1); + break; + case TextContainerAnchors.TopRight: + pivot = new Vector2(1, 1); + break; + case TextContainerAnchors.Left: + pivot = new Vector2(0, 0.5f); + break; + case TextContainerAnchors.Middle: + pivot = new Vector2(0.5f, 0.5f); + break; + case TextContainerAnchors.Right: + pivot = new Vector2(1, 0.5f); + break; + case TextContainerAnchors.BottomLeft: + pivot = new Vector2(0, 0); + break; + case TextContainerAnchors.Bottom: + pivot = new Vector2(0.5f, 0); + break; + case TextContainerAnchors.BottomRight: + pivot = new Vector2(1, 0); + break; + } + + return pivot; + } + + + // Method which returns the Anchor position based on pivot value. + TextContainerAnchors GetAnchorPosition(Vector2 pivot) + { + + if (pivot == new Vector2(0, 1)) + return TextContainerAnchors.TopLeft; + else if (pivot == new Vector2(0.5f, 1)) + return TextContainerAnchors.Top; + else if (pivot == new Vector2(1f, 1)) + return TextContainerAnchors.TopRight; + else if (pivot == new Vector2(0, 0.5f)) + return TextContainerAnchors.Left; + else if (pivot == new Vector2(0.5f, 0.5f)) + return TextContainerAnchors.Middle; + else if (pivot == new Vector2(1, 0.5f)) + return TextContainerAnchors.Right; + else if (pivot == new Vector2(0, 0)) + return TextContainerAnchors.BottomLeft; + else if (pivot == new Vector2(0.5f, 0)) + return TextContainerAnchors.Bottom; + else if (pivot == new Vector2(1, 0)) + return TextContainerAnchors.BottomRight; + else + return TextContainerAnchors.Custom; + + } + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TextContainer.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TextContainer.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..8b8f26e767096ad75f88f6ad4e71f97f6dd87ef7 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TextContainer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 32d40088a6124c578ad6b428df586e2e +timeCreated: 1448498693 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: -110 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TextMeshPro.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TextMeshPro.cs new file mode 100644 index 0000000000000000000000000000000000000000..f6903225095a4cc651572e187e537f6f22a7a625 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TextMeshPro.cs @@ -0,0 +1,551 @@ +using UnityEngine; +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine.UI; + +namespace TMPro +{ + + [DisallowMultipleComponent] + [RequireComponent(typeof(MeshRenderer))] + [RequireComponent(typeof(MeshFilter))] + [AddComponentMenu("Mesh/TextMeshPro - Text")] + [ExecuteAlways] + public partial class TextMeshPro : TMP_Text, ILayoutElement + { + // Public Properties and Serializable Properties + + /// <summary> + /// Sets the Renderer's sorting Layer ID + /// </summary> + public int sortingLayerID + { + get { return m_renderer.sortingLayerID; } + set { m_renderer.sortingLayerID = value; } + } + + /// <summary> + /// Sets the Renderer's sorting order within the assigned layer. + /// </summary> + public int sortingOrder + { + get { return m_renderer.sortingOrder; } + set { m_renderer.sortingOrder = value; } + } + + /// <summary> + /// Determines if the size of the text container will be adjusted to fit the text object when it is first created. + /// </summary> + public override bool autoSizeTextContainer + { + get { return m_autoSizeTextContainer; } + + set { if (m_autoSizeTextContainer == value) return; m_autoSizeTextContainer = value; if (m_autoSizeTextContainer) { TMP_UpdateManager.RegisterTextElementForLayoutRebuild(this); SetLayoutDirty(); } } + } + + + /// <summary> + /// Returns a reference to the Text Container + /// </summary> + [Obsolete("The TextContainer is now obsolete. Use the RectTransform instead.")] + public TextContainer textContainer + { + get + { + return null; + } + } + + + /// <summary> + /// Returns a reference to the Transform + /// </summary> + public new Transform transform + { + get + { + if (m_transform == null) + m_transform = GetComponent<Transform>(); + + return m_transform; + } + } + + + #pragma warning disable 0108 + /// <summary> + /// Returns the rendered assigned to the text object. + /// </summary> + public Renderer renderer + { + get + { + if (m_renderer == null) + m_renderer = GetComponent<Renderer>(); + + return m_renderer; + } + } + + + /// <summary> + /// Returns the mesh assigned to the text object. + /// </summary> + public override Mesh mesh + { + get + { + if (m_mesh == null) + { + m_mesh = new Mesh(); + m_mesh.hideFlags = HideFlags.HideAndDontSave; + this.meshFilter.mesh = m_mesh; + } + + return m_mesh; + } + } + + /// <summary> + /// Returns the Mesh Filter of the text object. + /// </summary> + public MeshFilter meshFilter + { + get + { + if (m_meshFilter == null) + m_meshFilter = GetComponent<MeshFilter>(); + + return m_meshFilter; + } + } + + // MASKING RELATED PROPERTIES + /// <summary> + /// Sets the mask type + /// </summary> + public MaskingTypes maskType + { + get { return m_maskType; } + set { m_maskType = value; SetMask(m_maskType); } + } + + + /// <summary> + /// Function used to set the mask type and coordinates in World Space + /// </summary> + /// <param name="type"></param> + /// <param name="maskCoords"></param> + public void SetMask(MaskingTypes type, Vector4 maskCoords) + { + SetMask(type); + + SetMaskCoordinates(maskCoords); + } + + /// <summary> + /// Function used to set the mask type, coordinates and softness + /// </summary> + /// <param name="type"></param> + /// <param name="maskCoords"></param> + /// <param name="softnessX"></param> + /// <param name="softnessY"></param> + public void SetMask(MaskingTypes type, Vector4 maskCoords, float softnessX, float softnessY) + { + SetMask(type); + + SetMaskCoordinates(maskCoords, softnessX, softnessY); + } + + + /// <summary> + /// Schedule rebuilding of the text geometry. + /// </summary> + public override void SetVerticesDirty() + { + //Debug.Log("SetVerticesDirty()"); + + if (m_verticesAlreadyDirty || this == null || !this.IsActive()) + return; + + TMP_UpdateManager.RegisterTextElementForGraphicRebuild(this); + m_verticesAlreadyDirty = true; + } + + + /// <summary> + /// + /// </summary> + public override void SetLayoutDirty() + { + m_isPreferredWidthDirty = true; + m_isPreferredHeightDirty = true; + + if (m_layoutAlreadyDirty || this == null || !this.IsActive()) + return; + + //TMP_UpdateManager.RegisterTextElementForLayoutRebuild(this); + m_layoutAlreadyDirty = true; + //LayoutRebuilder.MarkLayoutForRebuild(this.rectTransform); + m_isLayoutDirty = true; + } + + + /// <summary> + /// Schedule updating of the material used by the text object. + /// </summary> + public override void SetMaterialDirty() + { + //Debug.Log("SetMaterialDirty()"); + + //if (!this.IsActive()) + // return; + + //m_isMaterialDirty = true; + UpdateMaterial(); + //TMP_UpdateManager.RegisterTextElementForGraphicRebuild(this); + } + + + /// <summary> + /// + /// </summary> + public override void SetAllDirty() + { + m_isInputParsingRequired = true; + + SetLayoutDirty(); + SetVerticesDirty(); + SetMaterialDirty(); + } + + + /// <summary> + /// + /// </summary> + /// <param name="update"></param> + public override void Rebuild(CanvasUpdate update) + { + if (this == null) return; + + if (update == CanvasUpdate.Prelayout) + { + if (m_autoSizeTextContainer) + { + m_rectTransform.sizeDelta = GetPreferredValues(Mathf.Infinity, Mathf.Infinity); + } + } + else if (update == CanvasUpdate.PreRender) + { + this.OnPreRenderObject(); + m_verticesAlreadyDirty = false; + m_layoutAlreadyDirty = false; + + if (!m_isMaterialDirty) return; + + UpdateMaterial(); + m_isMaterialDirty = false; + } + } + + + /// <summary> + /// + /// </summary> + protected override void UpdateMaterial() + { + //Debug.Log("*** UpdateMaterial() ***"); + + //if (!this.IsActive()) + // return; + + if (m_sharedMaterial == null) + return; + + if (m_renderer == null) m_renderer = this.renderer; + + // Only update the material if it has changed. + if (m_renderer.sharedMaterial.GetInstanceID() != m_sharedMaterial.GetInstanceID()) + m_renderer.sharedMaterial = m_sharedMaterial; + } + + + /// <summary> + /// Function to be used to force recomputing of character padding when Shader / Material properties have been changed via script. + /// </summary> + public override void UpdateMeshPadding() + { + m_padding = ShaderUtilities.GetPadding(m_sharedMaterial, m_enableExtraPadding, m_isUsingBold); + m_isMaskingEnabled = ShaderUtilities.IsMaskingEnabled(m_sharedMaterial); + m_havePropertiesChanged = true; + checkPaddingRequired = false; + + // Return if text object is not awake yet. + if (m_textInfo == null) return; + + // Update sub text objects + for (int i = 1; i < m_textInfo.materialCount; i++) + m_subTextObjects[i].UpdateMeshPadding(m_enableExtraPadding, m_isUsingBold); + } + + + /// <summary> + /// Function to force regeneration of the mesh before its normal process time. This is useful when changes to the text object properties need to be applied immediately. + /// </summary> + public override void ForceMeshUpdate() + { + //Debug.Log("ForceMeshUpdate() called."); + m_havePropertiesChanged = true; + OnPreRenderObject(); + } + + + /// <summary> + /// Function to force regeneration of the mesh before its normal process time. This is useful when changes to the text object properties need to be applied immediately. + /// </summary> + /// <param name="ignoreInactive">If set to true, the text object will be regenerated regardless of is active state.</param> + public override void ForceMeshUpdate(bool ignoreInactive) + { + m_havePropertiesChanged = true; + m_ignoreActiveState = true; + OnPreRenderObject(); + } + + + /// <summary> + /// Function used to evaluate the length of a text string. + /// </summary> + /// <param name="text"></param> + /// <returns></returns> + public override TMP_TextInfo GetTextInfo(string text) + { + StringToCharArray(text, ref m_TextParsingBuffer); + SetArraySizes(m_TextParsingBuffer); + + m_renderMode = TextRenderFlags.DontRender; + + ComputeMarginSize(); + + GenerateTextMesh(); + + m_renderMode = TextRenderFlags.Render; + + return this.textInfo; + } + + + /// <summary> + /// Function to clear the geometry of the Primary and Sub Text objects. + /// </summary> + public override void ClearMesh(bool updateMesh) + { + if (m_textInfo.meshInfo[0].mesh == null) m_textInfo.meshInfo[0].mesh = m_mesh; + + m_textInfo.ClearMeshInfo(updateMesh); + } + + + /// <summary> + /// Function to force the regeneration of the text object. + /// </summary> + /// <param name="flags"> Flags to control which portions of the geometry gets uploaded.</param> + //public override void ForceMeshUpdate(TMP_VertexDataUpdateFlags flags) { } + + + /// <summary> + /// Function to update the geometry of the main and sub text objects. + /// </summary> + /// <param name="mesh"></param> + /// <param name="index"></param> + public override void UpdateGeometry(Mesh mesh, int index) + { + mesh.RecalculateBounds(); + } + + + /// <summary> + /// Function to upload the updated vertex data and renderer. + /// </summary> + public override void UpdateVertexData(TMP_VertexDataUpdateFlags flags) + { + int materialCount = m_textInfo.materialCount; + + for (int i = 0; i < materialCount; i++) + { + Mesh mesh; + + if (i == 0) + mesh = m_mesh; + else + { + // Clear unused vertices + // TODO: Causes issues when sorting geometry as last vertex data attribute get wiped out. + //m_textInfo.meshInfo[i].ClearUnusedVertices(); + + mesh = m_subTextObjects[i].mesh; + } + + //mesh.MarkDynamic(); + + if ((flags & TMP_VertexDataUpdateFlags.Vertices) == TMP_VertexDataUpdateFlags.Vertices) + mesh.vertices = m_textInfo.meshInfo[i].vertices; + + if ((flags & TMP_VertexDataUpdateFlags.Uv0) == TMP_VertexDataUpdateFlags.Uv0) + mesh.uv = m_textInfo.meshInfo[i].uvs0; + + if ((flags & TMP_VertexDataUpdateFlags.Uv2) == TMP_VertexDataUpdateFlags.Uv2) + mesh.uv2 = m_textInfo.meshInfo[i].uvs2; + + //if ((flags & TMP_VertexDataUpdateFlags.Uv4) == TMP_VertexDataUpdateFlags.Uv4) + // mesh.uv4 = m_textInfo.meshInfo[i].uvs4; + + if ((flags & TMP_VertexDataUpdateFlags.Colors32) == TMP_VertexDataUpdateFlags.Colors32) + mesh.colors32 = m_textInfo.meshInfo[i].colors32; + + mesh.RecalculateBounds(); + } + } + + + /// <summary> + /// Function to upload the updated vertex data and renderer. + /// </summary> + public override void UpdateVertexData() + { + int materialCount = m_textInfo.materialCount; + + for (int i = 0; i < materialCount; i++) + { + Mesh mesh; + + if (i == 0) + mesh = m_mesh; + else + { + // Clear unused vertices + m_textInfo.meshInfo[i].ClearUnusedVertices(); + + mesh = m_subTextObjects[i].mesh; + } + + + //mesh.MarkDynamic(); + mesh.vertices = m_textInfo.meshInfo[i].vertices; + mesh.uv = m_textInfo.meshInfo[i].uvs0; + mesh.uv2 = m_textInfo.meshInfo[i].uvs2; + //mesh.uv4 = m_textInfo.meshInfo[i].uvs4; + mesh.colors32 = m_textInfo.meshInfo[i].colors32; + + mesh.RecalculateBounds(); + } + } + + public void UpdateFontAsset() + { + LoadFontAsset(); + } + + + private bool m_currentAutoSizeMode; + + + public void CalculateLayoutInputHorizontal() + { + //Debug.Log("*** CalculateLayoutInputHorizontal() ***"); + + if (!this.gameObject.activeInHierarchy) + return; + + //IsRectTransformDriven = true; + + m_currentAutoSizeMode = m_enableAutoSizing; + + if (m_isCalculateSizeRequired || m_rectTransform.hasChanged) + { + //Debug.Log("Calculating Layout Horizontal"); + + //m_LayoutPhase = AutoLayoutPhase.Horizontal; + //m_isRebuildingLayout = true; + + m_minWidth = 0; + m_flexibleWidth = 0; + + //m_renderMode = TextRenderFlags.GetPreferredSizes; // Set Text to not Render and exit early once we have new width values. + + if (m_enableAutoSizing) + { + m_fontSize = m_fontSizeMax; + } + + // Set Margins to Infinity + m_marginWidth = k_LargePositiveFloat; + m_marginHeight = k_LargePositiveFloat; + + if (m_isInputParsingRequired || m_isTextTruncated) + ParseInputText(); + + GenerateTextMesh(); + + m_renderMode = TextRenderFlags.Render; + + //m_preferredWidth = (int)m_preferredWidth + 1f; + + ComputeMarginSize(); + + //Debug.Log("Preferred Width: " + m_preferredWidth + " Margin Width: " + m_marginWidth + " Preferred Height: " + m_preferredHeight + " Margin Height: " + m_marginHeight + " Rendered Width: " + m_renderedWidth + " Height: " + m_renderedHeight + " RectTransform Width: " + m_rectTransform.rect); + + m_isLayoutDirty = true; + } + } + + + public void CalculateLayoutInputVertical() + { + //Debug.Log("*** CalculateLayoutInputVertical() ***"); + + // Check if object is active + if (!this.gameObject.activeInHierarchy) // || IsRectTransformDriven == false) + return; + + //IsRectTransformDriven = true; + + if (m_isCalculateSizeRequired || m_rectTransform.hasChanged) + { + //Debug.Log("Calculating Layout InputVertical"); + + //m_LayoutPhase = AutoLayoutPhase.Vertical; + //m_isRebuildingLayout = true; + + m_minHeight = 0; + m_flexibleHeight = 0; + + //m_renderMode = TextRenderFlags.GetPreferredSizes; + + if (m_enableAutoSizing) + { + m_currentAutoSizeMode = true; + m_enableAutoSizing = false; + } + + m_marginHeight = k_LargePositiveFloat; + + GenerateTextMesh(); + + m_enableAutoSizing = m_currentAutoSizeMode; + + m_renderMode = TextRenderFlags.Render; + + //m_preferredHeight = (int)m_preferredHeight + 1f; + + ComputeMarginSize(); + + //Debug.Log("Preferred Height: " + m_preferredHeight + " Margin Height: " + m_marginHeight + " Preferred Width: " + m_preferredWidth + " Margin Width: " + m_marginWidth + " Rendered Width: " + m_renderedWidth + " Height: " + m_renderedHeight + " RectTransform Width: " + m_rectTransform.rect); + + m_isLayoutDirty = true; + } + + m_isCalculateSizeRequired = false; + } + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TextMeshPro.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TextMeshPro.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..3fbc12432e17321fa9c54e30a83eaa74b5330dc8 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TextMeshPro.cs.meta @@ -0,0 +1,39 @@ +fileFormatVersion: 2 +guid: 9541d86e2fd84c1d9990edf0852d74ab +labels: +- Text +- TextMesh +- Mesh +- Glow +- Shadow +- Outline +- Bevel +- Pro +- TextMeshPro +- Kerning +- Distance +- Field +- Signed +- Font +- Atlas +- Creator +- Advanced +- Rendering +- TrueType +- Dynamic +- Layout +- Style +- Styles +- Fonts +- SDF +- Scene +- GUI +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: -105 + icon: {fileID: 2800000, guid: 2fd6421f253b4ef1a19526541f9ffc0c, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TextMeshProUGUI.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TextMeshProUGUI.cs new file mode 100644 index 0000000000000000000000000000000000000000..be9ff8f1c39e0a5f592b4fbed453789a2bbb4c68 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TextMeshProUGUI.cs @@ -0,0 +1,656 @@ +using UnityEngine; +using System; +using System.Collections; +using System.Collections.Generic; + +using UnityEngine.UI; +using UnityEngine.EventSystems; +using UnityEngine.UI.CoroutineTween; + + +#pragma warning disable 0414 // Disabled a few warnings related to serialized variables not used in this script but used in the editor. + +namespace TMPro +{ + + [DisallowMultipleComponent] + [RequireComponent(typeof(RectTransform))] + [RequireComponent(typeof(CanvasRenderer))] + [AddComponentMenu("UI/TextMeshPro - Text (UI)", 11)] + [ExecuteAlways] + public partial class TextMeshProUGUI : TMP_Text, ILayoutElement + { + /// <summary> + /// Get the material that will be used for rendering. + /// </summary> + public override Material materialForRendering + { + get { return TMP_MaterialManager.GetMaterialForRendering(this, m_sharedMaterial); } + } + + /// <summary> + /// Determines if the size of the text container will be adjusted to fit the text object when it is first created. + /// </summary> + public override bool autoSizeTextContainer + { + get { return m_autoSizeTextContainer; } + + set { if (m_autoSizeTextContainer == value) return; m_autoSizeTextContainer = value; if (m_autoSizeTextContainer) { CanvasUpdateRegistry.RegisterCanvasElementForLayoutRebuild(this); SetLayoutDirty(); } } + } + + + + /// <summary> + /// Reference to the Mesh used by the text object. + /// </summary> + public override Mesh mesh + { + get { return m_mesh; } + } + + + /// <summary> + /// Reference to the CanvasRenderer used by the text object. + /// </summary> + public new CanvasRenderer canvasRenderer + { + get + { + if (m_canvasRenderer == null) m_canvasRenderer = GetComponent<CanvasRenderer>(); + + return m_canvasRenderer; + } + } + + + /// <summary> + /// Anchor dampening prevents the anchor position from being adjusted unless the positional change exceeds about 40% of the width of the underline character. This essentially stabilizes the anchor position. + /// </summary> + //public bool anchorDampening + //{ + // get { return m_anchorDampening; } + // set { if (m_anchorDampening != value) { havePropertiesChanged = true; m_anchorDampening = value; /* ScheduleUpdate(); */ } } + //} + + + private bool m_isRebuildingLayout = false; + //private bool m_isLayoutDirty = false; + + + /// <summary> + /// Function called by Unity when the horizontal layout needs to be recalculated. + /// </summary> + public void CalculateLayoutInputHorizontal() + { + //Debug.Log("*** CalculateLayoutHorizontal() ***"); // at Frame: " + Time.frameCount); // called on Object ID " + GetInstanceID()); + + //// Check if object is active + if (!this.gameObject.activeInHierarchy) + return; + + if (m_isCalculateSizeRequired || m_rectTransform.hasChanged) + { + m_preferredWidth = GetPreferredWidth(); + + ComputeMarginSize(); + + m_isLayoutDirty = true; + } + } + + + /// <summary> + /// Function called by Unity when the vertical layout needs to be recalculated. + /// </summary> + public void CalculateLayoutInputVertical() + { + //Debug.Log("*** CalculateLayoutInputVertical() ***"); // at Frame: " + Time.frameCount); // called on Object ID " + GetInstanceID()); + + //// Check if object is active + if (!this.gameObject.activeInHierarchy) // || IsRectTransformDriven == false) + return; + + if (m_isCalculateSizeRequired || m_rectTransform.hasChanged) + { + m_preferredHeight = GetPreferredHeight(); + + ComputeMarginSize(); + + m_isLayoutDirty = true; + } + + m_isCalculateSizeRequired = false; + } + + + public override void SetVerticesDirty() + { + if (m_verticesAlreadyDirty || this == null || !this.IsActive() || CanvasUpdateRegistry.IsRebuildingGraphics()) + return; + + m_verticesAlreadyDirty = true; + CanvasUpdateRegistry.RegisterCanvasElementForGraphicRebuild((ICanvasElement)this); + + if (m_OnDirtyVertsCallback != null) + m_OnDirtyVertsCallback(); + } + + + /// <summary> + /// + /// </summary> + public override void SetLayoutDirty() + { + m_isPreferredWidthDirty = true; + m_isPreferredHeightDirty = true; + + if ( m_layoutAlreadyDirty || this == null || !this.IsActive()) + return; + + m_layoutAlreadyDirty = true; + LayoutRebuilder.MarkLayoutForRebuild(this.rectTransform); + + m_isLayoutDirty = true; + + if (m_OnDirtyLayoutCallback != null) + m_OnDirtyLayoutCallback(); + } + + + /// <summary> + /// + /// </summary> + public override void SetMaterialDirty() + { + //Debug.Log("SetMaterialDirty()"); + + if (this == null || !this.IsActive() || CanvasUpdateRegistry.IsRebuildingGraphics()) + return; + + m_isMaterialDirty = true; + CanvasUpdateRegistry.RegisterCanvasElementForGraphicRebuild((ICanvasElement)this); + + if (m_OnDirtyMaterialCallback != null) + m_OnDirtyMaterialCallback(); + } + + + /// <summary> + /// + /// </summary> + public override void SetAllDirty() + { + m_isInputParsingRequired = true; + + SetLayoutDirty(); + SetVerticesDirty(); + SetMaterialDirty(); + } + + + + /// <summary> + /// + /// </summary> + /// <param name="update"></param> + public override void Rebuild(CanvasUpdate update) + { + if (this == null) return; + + if (update == CanvasUpdate.Prelayout) + { + if (m_autoSizeTextContainer) + { + m_rectTransform.sizeDelta = GetPreferredValues(Mathf.Infinity, Mathf.Infinity); + } + } + else if (update == CanvasUpdate.PreRender) + { + OnPreRenderCanvas(); + + m_verticesAlreadyDirty = false; + m_layoutAlreadyDirty = false; + + if (!m_isMaterialDirty) return; + + UpdateMaterial(); + m_isMaterialDirty = false; + } + } + + + /// <summary> + /// Method to keep the pivot of the sub text objects in sync with the parent pivot. + /// </summary> + private void UpdateSubObjectPivot() + { + if (m_textInfo == null) return; + + for (int i = 1; i < m_subTextObjects.Length && m_subTextObjects[i] != null; i++) + { + m_subTextObjects[i].SetPivotDirty(); + } + //m_isPivotDirty = false; + } + + + /// <summary> + /// + /// </summary> + /// <param name="baseMaterial"></param> + /// <returns></returns> + public override Material GetModifiedMaterial(Material baseMaterial) + { + Material mat = baseMaterial; + + if (m_ShouldRecalculateStencil) + { + m_stencilID = TMP_MaterialManager.GetStencilID(gameObject); + m_ShouldRecalculateStencil = false; + } + + // Release masking material + //if (m_MaskMaterial != null) + // MaterialManager.ReleaseStencilMaterial(m_MaskMaterial); + + if (m_stencilID > 0) + { + mat = TMP_MaterialManager.GetStencilMaterial(baseMaterial, m_stencilID); + if (m_MaskMaterial != null) + TMP_MaterialManager.ReleaseStencilMaterial(m_MaskMaterial); + + m_MaskMaterial = mat; + } + + return mat; + } + + + /// <summary> + /// + /// </summary> + protected override void UpdateMaterial() + { + //Debug.Log("*** UpdateMaterial() ***"); + + //if (!this.IsActive()) + // return; + + if (m_sharedMaterial == null) return; + + if (m_canvasRenderer == null) m_canvasRenderer = this.canvasRenderer; + + m_canvasRenderer.materialCount = 1; + m_canvasRenderer.SetMaterial(materialForRendering, 0); + } + + + //public override void OnRebuildRequested() + //{ + // //Debug.Log("OnRebuildRequested"); + + // base.OnRebuildRequested(); + //} + + + + //public override bool Raycast(Vector2 sp, Camera eventCamera) + //{ + // //Debug.Log("Raycast Event. ScreenPoint: " + sp); + // return base.Raycast(sp, eventCamera); + //} + + + // MASKING RELATED PROPERTIES + /// <summary> + /// Sets the masking offset from the bounds of the object + /// </summary> + public Vector4 maskOffset + { + get { return m_maskOffset; } + set { m_maskOffset = value; UpdateMask(); m_havePropertiesChanged = true; } + } + + + //public override Material defaultMaterial + //{ + // get { Debug.Log("Default Material called."); return m_sharedMaterial; } + //} + + + + //protected override void OnCanvasHierarchyChanged() + //{ + // //Debug.Log("OnCanvasHierarchyChanged..."); + //} + + + // IClippable implementation + /// <summary> + /// Method called when the state of a parent changes. + /// </summary> + public override void RecalculateClipping() + { + //Debug.Log("***** RecalculateClipping() *****"); + + base.RecalculateClipping(); + } + + // IMaskable Implementation + /// <summary> + /// Method called when Stencil Mask needs to be updated on this element and parents. + /// </summary> + public override void RecalculateMasking() + { + //Debug.Log("***** RecalculateMasking() *****"); + + this.m_ShouldRecalculateStencil = true; + SetMaterialDirty(); + } + + /// <summary> + /// Override of the Cull function to provide for the ability to override the culling of the text object. + /// </summary> + /// <param name="clipRect"></param> + /// <param name="validRect"></param> + public override void Cull(Rect clipRect, bool validRect) + { + if (m_ignoreRectMaskCulling) return; + + base.Cull(clipRect, validRect); + } + + + //protected override void UpdateGeometry() + //{ + // //Debug.Log("UpdateGeometry"); + // //base.UpdateGeometry(); + //} + + + //protected override void UpdateMaterial() + //{ + // //Debug.Log("UpdateMaterial called."); + //// base.UpdateMaterial(); + //} + + + /* + /// <summary> + /// Sets the mask type + /// </summary> + public MaskingTypes mask + { + get { return m_mask; } + set { m_mask = value; havePropertiesChanged = true; isMaskUpdateRequired = true; } + } + + /// <summary> + /// Set the masking offset mode (as percentage or pixels) + /// </summary> + public MaskingOffsetMode maskOffsetMode + { + get { return m_maskOffsetMode; } + set { m_maskOffsetMode = value; havePropertiesChanged = true; isMaskUpdateRequired = true; } + } + */ + + + + /* + /// <summary> + /// Sets the softness of the mask + /// </summary> + public Vector2 maskSoftness + { + get { return m_maskSoftness; } + set { m_maskSoftness = value; havePropertiesChanged = true; isMaskUpdateRequired = true; } + } + + /// <summary> + /// Allows to move / offset the mesh vertices by a set amount + /// </summary> + public Vector2 vertexOffset + { + get { return m_vertexOffset; } + set { m_vertexOffset = value; havePropertiesChanged = true; isMaskUpdateRequired = true; } + } + */ + + + /// <summary> + /// Function to be used to force recomputing of character padding when Shader / Material properties have been changed via script. + /// </summary> + public override void UpdateMeshPadding() + { + m_padding = ShaderUtilities.GetPadding(m_sharedMaterial, m_enableExtraPadding, m_isUsingBold); + m_isMaskingEnabled = ShaderUtilities.IsMaskingEnabled(m_sharedMaterial); + m_havePropertiesChanged = true; + checkPaddingRequired = false; + + // Return if text object is not awake yet. + if (m_textInfo == null) return; + + // Update sub text objects + for (int i = 1; i < m_textInfo.materialCount; i++) + m_subTextObjects[i].UpdateMeshPadding(m_enableExtraPadding, m_isUsingBold); + } + + + /// <summary> + /// Tweens the CanvasRenderer color associated with this Graphic. + /// </summary> + /// <param name="targetColor">Target color.</param> + /// <param name="duration">Tween duration.</param> + /// <param name="ignoreTimeScale">Should ignore Time.scale?</param> + /// <param name="useAlpha">Should also Tween the alpha channel?</param> + protected override void InternalCrossFadeColor(Color targetColor, float duration, bool ignoreTimeScale, bool useAlpha) + { + int materialCount = m_textInfo.materialCount; + + for (int i = 1; i < materialCount; i++) + { + m_subTextObjects[i].CrossFadeColor(targetColor, duration, ignoreTimeScale, useAlpha); + } + } + + + /// <summary> + /// Tweens the alpha of the CanvasRenderer color associated with this Graphic. + /// </summary> + /// <param name="alpha">Target alpha.</param> + /// <param name="duration">Duration of the tween in seconds.</param> + /// <param name="ignoreTimeScale">Should ignore Time.scale?</param> + protected override void InternalCrossFadeAlpha(float alpha, float duration, bool ignoreTimeScale) + { + int materialCount = m_textInfo.materialCount; + + for (int i = 1; i < materialCount; i++) + { + m_subTextObjects[i].CrossFadeAlpha(alpha, duration, ignoreTimeScale); + } + } + + + /// <summary> + /// Function to force regeneration of the mesh before its normal process time. This is useful when changes to the text object properties need to be applied immediately. + /// </summary> + public override void ForceMeshUpdate() + { + //if (m_isEnabled == false) this.OnEnable(); + + m_havePropertiesChanged = true; + OnPreRenderCanvas(); + } + + + /// <summary> + /// Function to force regeneration of the mesh before its normal process time. This is useful when changes to the text object properties need to be applied immediately. + /// </summary> + /// <param name="ignoreInactive">If set to true, the text object will be regenerated regardless of is active state.</param> + public override void ForceMeshUpdate(bool ignoreInactive) + { + m_havePropertiesChanged = true; + m_ignoreActiveState = true; + OnPreRenderCanvas(); + } + + + /// <summary> + /// Function used to evaluate the length of a text string. + /// </summary> + /// <param name="text"></param> + /// <returns></returns> + public override TMP_TextInfo GetTextInfo(string text) + { + StringToCharArray(text, ref m_TextParsingBuffer); + SetArraySizes(m_TextParsingBuffer); + + m_renderMode = TextRenderFlags.DontRender; + + ComputeMarginSize(); + + // Need to make sure we have a valid reference to a Canvas. + if (m_canvas == null) m_canvas = this.canvas; + + GenerateTextMesh(); + + m_renderMode = TextRenderFlags.Render; + + return this.textInfo; + } + + /// <summary> + /// Function to clear the geometry of the Primary and Sub Text objects. + /// </summary> + public override void ClearMesh() + { + m_canvasRenderer.SetMesh(null); + + for (int i = 1; i < m_subTextObjects.Length && m_subTextObjects[i] != null; i++) + m_subTextObjects[i].canvasRenderer.SetMesh(null); + + //if (m_linkedTextComponent != null) + // m_linkedTextComponent.ClearMesh(); + } + + + /// <summary> + /// Function to force the regeneration of the text object. + /// </summary> + /// <param name="flags"> Flags to control which portions of the geometry gets uploaded.</param> + //public override void ForceMeshUpdate(TMP_VertexDataUpdateFlags flags) { } + + + /// <summary> + /// Function to update the geometry of the main and sub text objects. + /// </summary> + /// <param name="mesh"></param> + /// <param name="index"></param> + public override void UpdateGeometry(Mesh mesh, int index) + { + mesh.RecalculateBounds(); + + if (index == 0) + { + m_canvasRenderer.SetMesh(mesh); + } + else + { + m_subTextObjects[index].canvasRenderer.SetMesh(mesh); + } + } + + + /// <summary> + /// Function to upload the updated vertex data and renderer. + /// </summary> + public override void UpdateVertexData(TMP_VertexDataUpdateFlags flags) + { + int materialCount = m_textInfo.materialCount; + + for (int i = 0; i < materialCount; i++) + { + Mesh mesh; + + if (i == 0) + mesh = m_mesh; + else + { + // Clear unused vertices + // TODO: Causes issues when sorting geometry as last vertex data attribute get wiped out. + //m_textInfo.meshInfo[i].ClearUnusedVertices(); + + mesh = m_subTextObjects[i].mesh; + } + + if ((flags & TMP_VertexDataUpdateFlags.Vertices) == TMP_VertexDataUpdateFlags.Vertices) + mesh.vertices = m_textInfo.meshInfo[i].vertices; + + if ((flags & TMP_VertexDataUpdateFlags.Uv0) == TMP_VertexDataUpdateFlags.Uv0) + mesh.uv = m_textInfo.meshInfo[i].uvs0; + + if ((flags & TMP_VertexDataUpdateFlags.Uv2) == TMP_VertexDataUpdateFlags.Uv2) + mesh.uv2 = m_textInfo.meshInfo[i].uvs2; + + //if ((flags & TMP_VertexDataUpdateFlags.Uv4) == TMP_VertexDataUpdateFlags.Uv4) + // mesh.uv4 = m_textInfo.meshInfo[i].uvs4; + + if ((flags & TMP_VertexDataUpdateFlags.Colors32) == TMP_VertexDataUpdateFlags.Colors32) + mesh.colors32 = m_textInfo.meshInfo[i].colors32; + + mesh.RecalculateBounds(); + + if (i == 0) + m_canvasRenderer.SetMesh(mesh); + else + m_subTextObjects[i].canvasRenderer.SetMesh(mesh); + } + } + + + /// <summary> + /// Function to upload the updated vertex data and renderer. + /// </summary> + public override void UpdateVertexData() + { + int materialCount = m_textInfo.materialCount; + + for (int i = 0; i < materialCount; i++) + { + Mesh mesh; + + if (i == 0) + mesh = m_mesh; + else + { + // Clear unused vertices + m_textInfo.meshInfo[i].ClearUnusedVertices(); + + mesh = m_subTextObjects[i].mesh; + } + + //mesh.MarkDynamic(); + mesh.vertices = m_textInfo.meshInfo[i].vertices; + mesh.uv = m_textInfo.meshInfo[i].uvs0; + mesh.uv2 = m_textInfo.meshInfo[i].uvs2; + //mesh.uv4 = m_textInfo.meshInfo[i].uvs4; + mesh.colors32 = m_textInfo.meshInfo[i].colors32; + + mesh.RecalculateBounds(); + + if (i == 0) + m_canvasRenderer.SetMesh(mesh); + else + m_subTextObjects[i].canvasRenderer.SetMesh(mesh); + } + } + + + public void UpdateFontAsset() + { + LoadFontAsset(); + } + + } +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TextMeshProUGUI.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TextMeshProUGUI.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..3ad5c46869cf44de008f825f43e3de072d1d8259 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/TextMeshProUGUI.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: f4688fdb7df04437aeb418b961361dc5 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: -100 + icon: {fileID: 2800000, guid: 2fd6421f253b4ef1a19526541f9ffc0c, type: 3} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/Unity.TextMeshPro.asmdef b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/Unity.TextMeshPro.asmdef new file mode 100644 index 0000000000000000000000000000000000000000..fafc7ed5cffd138691df46df45ca0fa1621a88fc --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/Unity.TextMeshPro.asmdef @@ -0,0 +1,7 @@ +{ + "name": "Unity.TextMeshPro", + "references": [], + "optionalUnityReferences": [], + "includePlatforms": [], + "excludePlatforms": [] +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/Unity.TextMeshPro.asmdef.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/Unity.TextMeshPro.asmdef.meta new file mode 100644 index 0000000000000000000000000000000000000000..6cd3a478771adb35b6aac7e9033fb75bb21d7823 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Scripts/Runtime/Unity.TextMeshPro.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6055be8ebefd69e48b49212b09b47b2f +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests.meta new file mode 100644 index 0000000000000000000000000000000000000000..3ff34706ed4b7c882848a466d30e623e26b5b228 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2ce4bbcc4722440890a03312706037fe +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Editor.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Editor.meta new file mode 100644 index 0000000000000000000000000000000000000000..81925d1a108bda143ee41127a255f176f8151534 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Editor.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 28542eca5f1b4c64813acfbd512524b6 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Editor/TMP_EditorTests.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Editor/TMP_EditorTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..a31a640a2821a98ace3f6f98719f7afaf7d81295 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Editor/TMP_EditorTests.cs @@ -0,0 +1,209 @@ +using UnityEngine; +using UnityEditor; +using UnityEngine.TestTools; +using NUnit.Framework; +using System.IO; +using System.Collections; + + +namespace TMPro +{ + [Category("Text Parsing & Layout")] + class TMP_EditorTests + { + private TextMeshPro m_TextComponent; + + // Characters: 22 Spaces: 4 Words: 5 Lines: + private const string m_TextBlock_00 = "A simple line of text."; + + // Characters: 104 Spaces: 14 Words: 15 Lines: + private const string m_TextBlock_01 = "Unity 2017 introduces new features that help teams of artists and developers build experiences together."; + + // Characters: 1500 Spaces: 228 Words: 241 + private const string m_TextBlock_02 = "The European languages are members of the same family. Their separate existence is a myth. For science, music, sport, etc, Europe uses the same vocabulary. The languages only differ in their grammar, their pronunciation and their most common words." + + "Everyone realizes why a new common language would be desirable: one could refuse to pay expensive translators.To achieve this, it would be necessary to have uniform grammar, pronunciation and more common words.If several languages coalesce, the grammar of the resulting language is more simple and regular than that of the individual languages." + + "The new common language will be more simple and regular than the existing European languages.It will be as simple as Occidental; in fact, it will be Occidental.To an English person, it will seem like simplified English, as a skeptical Cambridge friend of mine told me what Occidental is. The European languages are members of the same family." + + "Their separate existence is a myth. For science, music, sport, etc, Europe uses the same vocabulary.The languages only differ in their grammar, their pronunciation and their most common words.Everyone realizes why a new common language would be desirable: one could refuse to pay expensive translators.To achieve this, it would be necessary to" + + "have uniform grammar, pronunciation and more common words.If several languages coalesce, the grammar of the resulting language is more simple and regular than that of the individual languages.The new common language will be"; + + // Characters: 2500 Spaces: 343 Words: 370 + private const string m_TextBlock_03 = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. " + + "Nullam dictum felis eu pede mollis pretium.Integer tincidunt.Cras dapibus.Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim.Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus.Phasellus viverra nulla ut metus varius laoreet.Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue.Curabitur ullamcorper ultricies nisi. " + + "Nam eget dui.Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum.Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem.Maecenas nec odio et ante tincidunt tempus.Donec vitae sapien ut libero venenatis faucibus.Nullam quis ante.Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. " + + "Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus.Nullam accumsan lorem in dui.Cras ultricies mi eu turpis hendrerit fringilla.Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Nam pretium turpis et arcu. " + + "Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris.Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris.Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc.Nunc nonummy metus.Vestibulum volutpat pretium libero. Cras id dui.Aenean ut eros et nisl sagittis vestibulum.Nullam nulla eros, ultricies sit amet, nonummy id, imperdiet feugiat, pede.Sed lectus. Donec mollis hendrerit risus. Phasellus nec sem in justo pellentesque facilisis. " + + "Etiam imperdiet imperdiet orci. Nunc nec neque.Phasellus leo dolor, tempus non, auctor et, hendrerit quis, nisi.Curabitur ligula sapien, tincidunt non, euismod vitae, posuere imperdiet, leo.Maecenas malesuada. Praesent nan. The end of this of this long block of text."; + + // Characters: 3423 Spaces: 453 Words: 500 + private const string m_TextBlock_04 = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit.Aenean commodo ligula eget dolor.Aenean massa.Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.Nulla consequat massa quis enim.Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu.In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.Nullam dictum felis eu pede mollis pretium.Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus." + + "Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim.Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus.Phasellus viverra nulla ut metus varius laoreet.Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue.Curabitur ullamcorper ultricies nisi. Nam eget dui.Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum.Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem.Maecenas nec odio et ante tincidunt tempus.Donec vitae sapien ut libero venenatis faucibus.Nullam quis ante." + + "Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus.Nullam accumsan lorem in dui.Cras ultricies mi eu turpis hendrerit fringilla.Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia.Nam pretium turpis et arcu." + + "Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris.Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris.Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc.Nunc nonummy metus.Vestibulum volutpat pretium libero. Cras id dui.Aenean ut eros et nisl sagittis vestibulum.Nullam nulla eros, ultricies sit amet, nonummy id, imperdiet feugiat, pede.Sed lectus. Donec mollis hendrerit risus. Phasellus nec sem in justo pellentesque facilisis.Etiam imperdiet imperdiet orci. Nunc nec neque." + + "Phasellus leo dolor, tempus non, auctor et, hendrerit quis, nisi.Curabitur ligula sapien, tincidunt non, euismod vitae, posuere imperdiet, leo.Maecenas malesuada. Praesent congue erat at massa.Sed cursus turpis vitae tortor.Donec posuere vulputate arcu. Phasellus accumsan cursus velit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed aliquam, nisi quis porttitor congue, elit erat euismod orci, ac placerat dolor lectus quis orci.Phasellus consectetuer vestibulum elit.Aenean tellus metus, bibendum sed, posuere ac, mattis non, nunc.Vestibulum fringilla pede sit amet augue." + + "In turpis. Pellentesque posuere. Praesent turpis. Aenean posuere, tortor sed cursus feugiat, nunc augue blandit nunc, eu sollicitudin urna dolor sagittis lacus. Donec elit libero, sodales nec, volutpat a, suscipit non, turpis.Nullam sagittis. Suspendisse pulvinar, augue ac venenatis condimentum, sem libero volutpat nibh, nec pellentesque velit pede quis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Fusce id purus.Ut varius tincidunt libero.Phasellus dolor.Maecenas vestibulum mollis"; + + // + private const string m_TextBlock_05 = "This block of text contains <b>bold</b> and <i>italicized</i> characters."; + + private const string m_TextBlock_06 = "<align=center><style=H1><#ffffff><u>Multiple<#80f0ff> Alignment</color> per text object</u></color></style></align><line-height=2em>\n" + + "</line-height> The <<#ffffa0>align</color>> tag in TextMesh<#40a0ff>Pro</color> provides the ability to control the alignment of lines and paragraphs which is essential when working with text.\n" + + "<align=left> You may want some block of text to be<#80f0ff>left aligned</color> <<#ffffa0>align=<#80f0ff>left</color></color>> which is sort of the standard.</align>\n" + + "<style=Quote><#ffffa0>\"Using <#80f0ff>Center Alignment</color> <<#ffffa0>align=<#80f0ff>center</color></color>> for a title or displaying a quote is another good example of text alignment.\"</color></style>\n" + + "<align=right><#80f0ff>Right Alignment</color> <<#ffffa0>align=<#80f0ff>right</color></color>> can be useful to create contrast between lines and paragraphs of text.\n" + + "<align=justified><#80f0ff>Justified Alignment</color> <<#ffffa0>align=<#80f0ff>justified</color></color>> results in text that is flush on both the left and right margins. Used well, justified type can look clean and classy.\n" + + "<style=Quote><align=left><#ffffa0>\"Text formatting and alignment has a huge impact on how people will read and perceive your text.\"</color>\n" + + "<size=65%><align=right> -Stephan Bouchard</style>"; + + private readonly string[] testStrings = new string[] { m_TextBlock_00, m_TextBlock_01, m_TextBlock_02, m_TextBlock_03, m_TextBlock_04, m_TextBlock_05, m_TextBlock_06 }; + + + [OneTimeSetUp] + public void Setup() + { + if (Directory.Exists(Path.GetFullPath("Assets/TextMesh Pro")) || Directory.Exists(Path.GetFullPath("Packages/com.unity.textmeshpro.tests/TextMesh Pro"))) + { + GameObject textObject = new GameObject("Text Object"); + m_TextComponent = textObject.AddComponent<TextMeshPro>(); + + m_TextComponent.fontSize = 18; + } + else + { + Debug.Log("Skipping over Editor tests as TMP Essential Resources are missing from the current test project."); + Assert.Ignore(); + + return; + } + } + + + [Test] + [TestCase("/Package Resources/TMP Essential Resources.unitypackage", "ce4ff17ca867d2b48b5c8a4181611901")] + [TestCase("/Package Resources/TMP Examples & Extras.unitypackage", "bc00e25696e4132499f56528d3fed2e3")] + [TestCase("/PackageConversionData.json", "05f5bfd584002f948982a1498890f9a9")] + public void InternalResourceCheck(string filePath, string guid) + { + string packageRelativePath = EditorUtilities.TMP_EditorUtility.packageRelativePath; + string packageFullPath = EditorUtilities.TMP_EditorUtility.packageFullPath; + + Assert.AreEqual(AssetDatabase.AssetPathToGUID(packageRelativePath + filePath), guid); + Assert.IsTrue(System.IO.File.Exists(packageFullPath + filePath)); + + } + + + [Test] + [TestCase(4, 3423, 453, 500, 1)] + [TestCase(3, 2500, 343, 370, 1)] + [TestCase(2, 1500, 228, 241, 1)] + [TestCase(1, 104, 14, 15, 1)] + [TestCase(0, 22, 4, 5, 1)] + public void TextParsing_TextInfoTest_WordWrappingDisabled(int sourceTextIndex, int characterCount, int spaceCount, int wordCount, int lineCount) + { + m_TextComponent.text = testStrings[sourceTextIndex]; + m_TextComponent.enableWordWrapping = false; + m_TextComponent.alignment = TextAlignmentOptions.TopLeft; + + // Size the RectTransform + m_TextComponent.rectTransform.sizeDelta = new Vector2(50, 5); + + // Force text generation to populate the TextInfo data structure. + m_TextComponent.ForceMeshUpdate(); + + Assert.AreEqual(m_TextComponent.textInfo.characterCount, characterCount); + Assert.AreEqual(m_TextComponent.textInfo.spaceCount, spaceCount); + Assert.AreEqual(m_TextComponent.textInfo.wordCount, wordCount); + Assert.AreEqual(m_TextComponent.textInfo.lineCount, lineCount); + } + + + [Test] + [TestCase(4, 3423, 453, 500, 29)] + [TestCase(3, 2500, 343, 370, 21)] + [TestCase(2, 1500, 228, 241, 13)] + [TestCase(1, 104, 14, 15, 1)] + [TestCase(0, 22, 4, 5, 1)] + public void TextParsing_TextInfoTest_WordWrappingEnabled(int sourceTextIndex, int characterCount, int spaceCount, int wordCount, int lineCount) + { + m_TextComponent.text = testStrings[sourceTextIndex]; + m_TextComponent.enableWordWrapping = true; + m_TextComponent.alignment = TextAlignmentOptions.TopLeft; + + // Size the RectTransform + m_TextComponent.rectTransform.sizeDelta = new Vector2(100, 50); + + // Force text generation to populate the TextInfo data structure. + m_TextComponent.ForceMeshUpdate(); + + Assert.AreEqual(m_TextComponent.textInfo.characterCount, characterCount); + Assert.AreEqual(m_TextComponent.textInfo.spaceCount, spaceCount); + Assert.AreEqual(m_TextComponent.textInfo.wordCount, wordCount); + Assert.AreEqual(m_TextComponent.textInfo.lineCount, lineCount); + } + + + [Test] + [TestCase(4, 3423, 453, 500, 27)] + [TestCase(3, 2500, 343, 370, 20)] + [TestCase(2, 1500, 228, 241, 13)] + public void TextParsing_TextInfoTest_TopJustifiedAlignment(int sourceTextIndex, int characterCount, int spaceCount, int wordCount, int lineCount) + { + m_TextComponent.text = testStrings[sourceTextIndex]; + m_TextComponent.enableWordWrapping = true; + m_TextComponent.alignment = TextAlignmentOptions.TopJustified; + + // Size the RectTransform + m_TextComponent.rectTransform.sizeDelta = new Vector2(100, 50); + + // Force text generation to populate the TextInfo data structure. + m_TextComponent.ForceMeshUpdate(); + + Assert.AreEqual(m_TextComponent.textInfo.characterCount, characterCount); + Assert.AreEqual(m_TextComponent.textInfo.spaceCount, spaceCount); + Assert.AreEqual(m_TextComponent.textInfo.wordCount, wordCount); + Assert.AreEqual(m_TextComponent.textInfo.lineCount, lineCount); + } + + + [Test] + [TestCase(6, 768, 124, 126, 14)] + [TestCase(5, 59, 8, 9, 1)] + public void TextParsing_TextInfoTest_RichText(int sourceTextIndex, int characterCount, int spaceCount, int wordCount, int lineCount) + { + m_TextComponent.text = testStrings[sourceTextIndex]; + m_TextComponent.enableWordWrapping = true; + m_TextComponent.alignment = TextAlignmentOptions.TopLeft; + + // Size the RectTransform + m_TextComponent.rectTransform.sizeDelta = new Vector2(70, 35); + + // Force text generation to populate the TextInfo data structure. + m_TextComponent.ForceMeshUpdate(); + + Assert.AreEqual(m_TextComponent.textInfo.characterCount, characterCount); + Assert.AreEqual(m_TextComponent.textInfo.spaceCount, spaceCount); + Assert.AreEqual(m_TextComponent.textInfo.wordCount, wordCount); + Assert.AreEqual(m_TextComponent.textInfo.lineCount, lineCount); + } + + + // Add tests that check position of individual characters in a complex block of text. + // These test also use the data contained inside the TMP_TextInfo class. + + + //[OneTimeTearDown] + //public void Cleanup() + //{ + // // Remove TMP Essential Resources if they were imported in the project as a result of running tests. + // if (TMPro_EventManager.temporaryResourcesImported == true) + // { + // if (Directory.Exists(Path.GetFullPath("Assets/TextMesh Pro"))) + // { + // AssetDatabase.DeleteAsset("Assets/TextMesh Pro"); + // TMPro_EventManager.temporaryResourcesImported = false; + // } + // } + //} + + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Editor/TMP_EditorTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Editor/TMP_EditorTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..99b09c856748e79736583250fd7d0395fcd76728 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Editor/TMP_EditorTests.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 592f7288ed0df2c4b884e2cd9baac023 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Editor/Unity.TextMeshPro.Editor.Tests.asmdef b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Editor/Unity.TextMeshPro.Editor.Tests.asmdef new file mode 100644 index 0000000000000000000000000000000000000000..3f090505a14e2cf838079198e88851be8e1b1dc1 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Editor/Unity.TextMeshPro.Editor.Tests.asmdef @@ -0,0 +1,14 @@ +{ + "name": "Unity.TextMeshPro.Editor.Tests", + "references": [ + "Unity.TextMeshPro", + "Unity.TextMeshPro.Editor" + ], + "optionalUnityReferences": [ + "TestAssemblies" + ], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [] +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Editor/Unity.TextMeshPro.Editor.Tests.asmdef.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Editor/Unity.TextMeshPro.Editor.Tests.asmdef.meta new file mode 100644 index 0000000000000000000000000000000000000000..ddfe991f56762feb1a881f97a278ec02449b8daa --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Editor/Unity.TextMeshPro.Editor.Tests.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 656e461844099ae43a609ff6109b0877 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Runtime.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Runtime.meta new file mode 100644 index 0000000000000000000000000000000000000000..811f0a6c8d119a88f5c59eff2ae5e9ff750c4c4a --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Runtime.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f5600e6ae5a1464da659eca36bef9d64 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Runtime/TMP_RuntimeTests.cs b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Runtime/TMP_RuntimeTests.cs new file mode 100644 index 0000000000000000000000000000000000000000..7b1834d2c9f72cd1b9171e955d37474d89afa988 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Runtime/TMP_RuntimeTests.cs @@ -0,0 +1,207 @@ +using UnityEngine; +using UnityEngine.TestTools; +using NUnit.Framework; +using System.IO; +using System.Collections; +using System.Collections.Generic; + +namespace TMPro +{ + [Category("Text Parsing & Layout")] + class TMP_RuntimeTests + { + private TextMeshPro m_TextComponent; + + // Characters: 22 Spaces: 4 Words: 5 Lines: + private const string m_TextBlock_00 = "A simple line of text."; + + // Characters: 104 Spaces: 14 Words: 15 Lines: + private const string m_TextBlock_01 = "Unity 2017 introduces new features that help teams of artists and developers build experiences together."; + + // Characters: 1500 Spaces: 228 Words: 241 + private const string m_TextBlock_02 = "The European languages are members of the same family. Their separate existence is a myth. For science, music, sport, etc, Europe uses the same vocabulary. The languages only differ in their grammar, their pronunciation and their most common words." + + "Everyone realizes why a new common language would be desirable: one could refuse to pay expensive translators.To achieve this, it would be necessary to have uniform grammar, pronunciation and more common words.If several languages coalesce, the grammar of the resulting language is more simple and regular than that of the individual languages." + + "The new common language will be more simple and regular than the existing European languages.It will be as simple as Occidental; in fact, it will be Occidental.To an English person, it will seem like simplified English, as a skeptical Cambridge friend of mine told me what Occidental is. The European languages are members of the same family." + + "Their separate existence is a myth. For science, music, sport, etc, Europe uses the same vocabulary.The languages only differ in their grammar, their pronunciation and their most common words.Everyone realizes why a new common language would be desirable: one could refuse to pay expensive translators.To achieve this, it would be necessary to" + + "have uniform grammar, pronunciation and more common words.If several languages coalesce, the grammar of the resulting language is more simple and regular than that of the individual languages.The new common language will be"; + + // Characters: 2500 Spaces: 343 Words: 370 + private const string m_TextBlock_03 = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. " + + "Nullam dictum felis eu pede mollis pretium.Integer tincidunt.Cras dapibus.Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim.Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus.Phasellus viverra nulla ut metus varius laoreet.Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue.Curabitur ullamcorper ultricies nisi. " + + "Nam eget dui.Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum.Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem.Maecenas nec odio et ante tincidunt tempus.Donec vitae sapien ut libero venenatis faucibus.Nullam quis ante.Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. " + + "Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus.Nullam accumsan lorem in dui.Cras ultricies mi eu turpis hendrerit fringilla.Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Nam pretium turpis et arcu. " + + "Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris.Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris.Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc.Nunc nonummy metus.Vestibulum volutpat pretium libero. Cras id dui.Aenean ut eros et nisl sagittis vestibulum.Nullam nulla eros, ultricies sit amet, nonummy id, imperdiet feugiat, pede.Sed lectus. Donec mollis hendrerit risus. Phasellus nec sem in justo pellentesque facilisis. " + + "Etiam imperdiet imperdiet orci. Nunc nec neque.Phasellus leo dolor, tempus non, auctor et, hendrerit quis, nisi.Curabitur ligula sapien, tincidunt non, euismod vitae, posuere imperdiet, leo.Maecenas malesuada. Praesent nan. The end of this of this long block of text."; + + // Characters: 3423 Spaces: 453 Words: 500 + private const string m_TextBlock_04 = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit.Aenean commodo ligula eget dolor.Aenean massa.Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.Nulla consequat massa quis enim.Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu.In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo.Nullam dictum felis eu pede mollis pretium.Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus." + + "Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim.Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus.Phasellus viverra nulla ut metus varius laoreet.Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue.Curabitur ullamcorper ultricies nisi. Nam eget dui.Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum.Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem.Maecenas nec odio et ante tincidunt tempus.Donec vitae sapien ut libero venenatis faucibus.Nullam quis ante." + + "Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus.Nullam accumsan lorem in dui.Cras ultricies mi eu turpis hendrerit fringilla.Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia.Nam pretium turpis et arcu." + + "Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris.Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris.Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc.Nunc nonummy metus.Vestibulum volutpat pretium libero. Cras id dui.Aenean ut eros et nisl sagittis vestibulum.Nullam nulla eros, ultricies sit amet, nonummy id, imperdiet feugiat, pede.Sed lectus. Donec mollis hendrerit risus. Phasellus nec sem in justo pellentesque facilisis.Etiam imperdiet imperdiet orci. Nunc nec neque." + + "Phasellus leo dolor, tempus non, auctor et, hendrerit quis, nisi.Curabitur ligula sapien, tincidunt non, euismod vitae, posuere imperdiet, leo.Maecenas malesuada. Praesent congue erat at massa.Sed cursus turpis vitae tortor.Donec posuere vulputate arcu. Phasellus accumsan cursus velit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Sed aliquam, nisi quis porttitor congue, elit erat euismod orci, ac placerat dolor lectus quis orci.Phasellus consectetuer vestibulum elit.Aenean tellus metus, bibendum sed, posuere ac, mattis non, nunc.Vestibulum fringilla pede sit amet augue." + + "In turpis. Pellentesque posuere. Praesent turpis. Aenean posuere, tortor sed cursus feugiat, nunc augue blandit nunc, eu sollicitudin urna dolor sagittis lacus. Donec elit libero, sodales nec, volutpat a, suscipit non, turpis.Nullam sagittis. Suspendisse pulvinar, augue ac venenatis condimentum, sem libero volutpat nibh, nec pellentesque velit pede quis nunc. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Fusce id purus.Ut varius tincidunt libero.Phasellus dolor.Maecenas vestibulum mollis"; + + // + private const string m_TextBlock_05 = "This block of text contains <b>bold</b> and <i>italicized</i> characters."; + + private const string m_TextBlock_06 = "<align=center><style=H1><#ffffff><u>Multiple<#80f0ff> Alignment</color> per text object</u></color></style></align><line-height=2em>\n" + + "</line-height> The <<#ffffa0>align</color>> tag in TextMesh<#40a0ff>Pro</color> provides the ability to control the alignment of lines and paragraphs which is essential when working with text.\n" + + "<align=left> You may want some block of text to be<#80f0ff>left aligned</color> <<#ffffa0>align=<#80f0ff>left</color></color>> which is sort of the standard.</align>\n" + + "<style=Quote><#ffffa0>\"Using <#80f0ff>Center Alignment</color> <<#ffffa0>align=<#80f0ff>center</color></color>> for a title or displaying a quote is another good example of text alignment.\"</color></style>\n" + + "<align=right><#80f0ff>Right Alignment</color> <<#ffffa0>align=<#80f0ff>right</color></color>> can be useful to create contrast between lines and paragraphs of text.\n" + + "<align=justified><#80f0ff>Justified Alignment</color> <<#ffffa0>align=<#80f0ff>justified</color></color>> results in text that is flush on both the left and right margins. Used well, justified type can look clean and classy.\n" + + "<style=Quote><align=left><#ffffa0>\"Text formatting and alignment has a huge impact on how people will read and perceive your text.\"</color>\n" + + "<size=65%><align=right> -Stephan Bouchard</style>"; + + private readonly string[] testStrings = new string[] { m_TextBlock_00, m_TextBlock_01, m_TextBlock_02, m_TextBlock_03, m_TextBlock_04, m_TextBlock_05, m_TextBlock_06 }; + + [OneTimeSetUp] + public void Setup() + { + if (Directory.Exists(Path.GetFullPath("Assets/TextMesh Pro")) || Directory.Exists(Path.GetFullPath("Packages/com.unity.textmeshpro.tests/TextMesh Pro"))) + { + GameObject textObject = new GameObject("Text Object"); + m_TextComponent = textObject.AddComponent<TextMeshPro>(); + + m_TextComponent.fontSize = 18; + } + else + { + Debug.Log("Skipping over Editor tests as TMP Essential Resources are missing from the current test project."); + Assert.Ignore(); + + return; + } + } + + public static IEnumerable<object[]> TestCases_Parsing_TextInfo_WordWrapDisabled() + { + yield return new object[] { 0, 22, 4, 5, 1 }; + yield return new object[] { 1, 104, 14, 15, 1 }; + yield return new object[] { 2, 1500, 228, 241, 1 }; + yield return new object[] { 3, 2500, 343, 370, 1 }; + yield return new object[] { 4, 3423, 453, 500, 1 }; + } + + [Test, TestCaseSource("TestCases_Parsing_TextInfo_WordWrapDisabled")] + public void Parsing_TextInfo_WordWrapDisabled(int sourceTextIndex, int characterCount, int spaceCount, int wordCount, int lineCount) + { + m_TextComponent.text = testStrings[sourceTextIndex]; + m_TextComponent.enableWordWrapping = false; + m_TextComponent.alignment = TextAlignmentOptions.TopLeft; + + // Size the RectTransform + m_TextComponent.rectTransform.sizeDelta = new Vector2(50, 5); + + // Force text generation to populate the TextInfo data structure. + m_TextComponent.ForceMeshUpdate(); + + Assert.AreEqual(m_TextComponent.textInfo.characterCount, characterCount); + Assert.AreEqual(m_TextComponent.textInfo.spaceCount, spaceCount); + Assert.AreEqual(m_TextComponent.textInfo.wordCount, wordCount); + Assert.AreEqual(m_TextComponent.textInfo.lineCount, lineCount); + } + + + public static IEnumerable<object[]> TestCases_Parsing_TextInfo_WordWrapEnabled() + { + yield return new object[] { 0, 22, 4, 5, 1 }; + yield return new object[] { 1, 104, 14, 15, 1 }; + yield return new object[] { 2, 1500, 228, 241, 13 }; + yield return new object[] { 3, 2500, 343, 370, 21 }; + yield return new object[] { 4, 3423, 453, 500, 29 }; + } + + [Test, TestCaseSource("TestCases_Parsing_TextInfo_WordWrapEnabled")] + public void Parsing_TextInfo_WordWrapEnabled(int sourceTextIndex, int characterCount, int spaceCount, int wordCount, int lineCount) + { + m_TextComponent.text = testStrings[sourceTextIndex]; + m_TextComponent.enableWordWrapping = true; + m_TextComponent.alignment = TextAlignmentOptions.TopLeft; + + // Size the RectTransform + m_TextComponent.rectTransform.sizeDelta = new Vector2(100, 50); + + // Force text generation to populate the TextInfo data structure. + m_TextComponent.ForceMeshUpdate(); + + Assert.AreEqual(m_TextComponent.textInfo.characterCount, characterCount); + Assert.AreEqual(m_TextComponent.textInfo.spaceCount, spaceCount); + Assert.AreEqual(m_TextComponent.textInfo.wordCount, wordCount); + Assert.AreEqual(m_TextComponent.textInfo.lineCount, lineCount); + } + + + public static IEnumerable<object[]> TestCases_Parsing_TextInfo_AlignmentTopJustified() + { + yield return new object[] { 2, 1500, 228, 241, 13 }; + yield return new object[] { 3, 2500, 343, 370, 20 }; + yield return new object[] { 4, 3423, 453, 500, 27 }; + } + + [Test, TestCaseSource("TestCases_Parsing_TextInfo_AlignmentTopJustified")] + public void Parsing_TextInfo_AlignmentTopJustified(int sourceTextIndex, int characterCount, int spaceCount, int wordCount, int lineCount) + { + m_TextComponent.text = testStrings[sourceTextIndex]; + m_TextComponent.enableWordWrapping = true; + m_TextComponent.alignment = TextAlignmentOptions.TopJustified; + + // Size the RectTransform + m_TextComponent.rectTransform.sizeDelta = new Vector2(100, 50); + + // Force text generation to populate the TextInfo data structure. + m_TextComponent.ForceMeshUpdate(); + + Assert.AreEqual(m_TextComponent.textInfo.characterCount, characterCount); + Assert.AreEqual(m_TextComponent.textInfo.spaceCount, spaceCount); + Assert.AreEqual(m_TextComponent.textInfo.wordCount, wordCount); + Assert.AreEqual(m_TextComponent.textInfo.lineCount, lineCount); + } + + + public static IEnumerable<object[]> TestCases_Parsing_TextInfo_RichText() + { + yield return new object[] { 5, 59, 8, 9, 1 }; + yield return new object[] { 6, 768, 124, 126, 14 }; + } + + [Test, TestCaseSource("TestCases_Parsing_TextInfo_RichText")] + public void Parsing_TextInfo_RichText(int sourceTextIndex, int characterCount, int spaceCount, int wordCount, int lineCount) + { + m_TextComponent.text = testStrings[sourceTextIndex]; + m_TextComponent.enableWordWrapping = true; + m_TextComponent.alignment = TextAlignmentOptions.TopLeft; + + // Size the RectTransform + m_TextComponent.rectTransform.sizeDelta = new Vector2(70, 35); + + // Force text generation to populate the TextInfo data structure. + m_TextComponent.ForceMeshUpdate(); + + Assert.AreEqual(m_TextComponent.textInfo.characterCount, characterCount); + Assert.AreEqual(m_TextComponent.textInfo.spaceCount, spaceCount); + Assert.AreEqual(m_TextComponent.textInfo.wordCount, wordCount); + Assert.AreEqual(m_TextComponent.textInfo.lineCount, lineCount); + } + + + //[OneTimeTearDown] + //public void Cleanup() + //{ + // // Remove TMP Essential Resources if they were imported in the project as a result of running tests. + // if (TMPro_EventManager.temporaryResourcesImported == true) + // { + // string testResourceFolderPath = Path.GetFullPath("Assets/TextMesh Pro"); + + // if (Directory.Exists(testResourceFolderPath)) + // { + // Directory.Delete(testResourceFolderPath); + // File.Delete(Path.GetFullPath("Assets/TextMesh Pro.meta")); + // } + + // TMPro_EventManager.temporaryResourcesImported = false; + // } + //} + + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Runtime/TMP_RuntimeTests.cs.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Runtime/TMP_RuntimeTests.cs.meta new file mode 100644 index 0000000000000000000000000000000000000000..e004fed6722cae1c0fb3add293e4cbdcf52b9dd5 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Runtime/TMP_RuntimeTests.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 9de24983a2c6cbe4f925c3e98a79b804 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Runtime/Unity.TextMeshPro.Tests.asmdef b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Runtime/Unity.TextMeshPro.Tests.asmdef new file mode 100644 index 0000000000000000000000000000000000000000..9fef4d66e00d60bea98a5e067b602a487c8eaac6 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Runtime/Unity.TextMeshPro.Tests.asmdef @@ -0,0 +1,11 @@ +{ + "name": "Unity.TextMeshPro.Tests", + "references": [ + "Unity.TextMeshPro" + ], + "optionalUnityReferences": [ + "TestAssemblies" + ], + "includePlatforms": [], + "excludePlatforms": [] +} \ No newline at end of file diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Runtime/Unity.TextMeshPro.Tests.asmdef.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Runtime/Unity.TextMeshPro.Tests.asmdef.meta new file mode 100644 index 0000000000000000000000000000000000000000..9b4d7a1b1a53245f7e2446d7a6862de037ca7626 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/Tests/Runtime/Unity.TextMeshPro.Tests.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bb05cab7d802aa5468f8f2f86840d984 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/package.json b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/package.json new file mode 100644 index 0000000000000000000000000000000000000000..9f25072e7227d77d27d32047daf69c476f3ae073 --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/package.json @@ -0,0 +1,20 @@ +{ + "name": "com.unity.textmeshpro", + "displayName": "TextMesh Pro", + "version": "1.4.1", + "unity": "2018.3", + "description": "TextMesh Pro is the ultimate text solution for Unity. It's the perfect replacement for Unity's UI Text and the legacy Text Mesh.\n\nPowerful and easy to use, TextMesh Pro uses Advanced Text Rendering techniques along with a set of custom shaders; delivering substantial visual quality improvements while giving users incredible flexibility when it comes to text styling and texturing.\n\nTextMesh Pro provides Improved Control over text formatting and layout with features like character, word, line and paragraph spacing, kerning, justified text, Links, over 30 Rich Text Tags available, support for Multi Font & Sprites, Custom Styles and more.\n\nGreat performance. Since the geometry created by TextMesh Pro uses two triangles per character just like Unity's text components, this improved visual quality and flexibility comes at no additional performance cost.", + "keywords": [ + "TextMeshPro", + "TextMesh Pro", + "Text", + "SDF" + ], + "category": "Text Rendering", + "dependencies": {}, + "repository": { + "type": "git", + "url": "https://gitlab.cds.internal.unity3d.com/upm-packages/text/com.unity.textmeshpro.git", + "revision": "42654af0" + } +} diff --git a/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/package.json.meta b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/package.json.meta new file mode 100644 index 0000000000000000000000000000000000000000..b1dc0d196b0c26ada5000d82d11f9766ae01364b --- /dev/null +++ b/Roll a Ball/Library/PackageCache/com.unity.textmeshpro@1.4.1/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 220e9325710f4235a43492dd1ee4980d +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Roll a Ball/Library/ProjectSettings.asset b/Roll a Ball/Library/ProjectSettings.asset new file mode 100644 index 0000000000000000000000000000000000000000..66c2094406bcadda49814057bd8bcee6ae3d7a20 --- /dev/null +++ b/Roll a Ball/Library/ProjectSettings.asset @@ -0,0 +1,632 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!129 &1 +PlayerSettings: + m_ObjectHideFlags: 0 + serializedVersion: 18 + productGUID: 13f38c6bf9a54d34e82c9dacaaa72571 + AndroidProfiler: 0 + AndroidFilterTouchesWhenObscured: 0 + AndroidEnableSustainedPerformanceMode: 0 + defaultScreenOrientation: 4 + targetDevice: 2 + useOnDemandResources: 0 + accelerometerFrequency: 60 + companyName: DefaultCompany + productName: Roll a Ball + defaultCursor: {fileID: 0} + cursorHotspot: {x: 0, y: 0} + m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} + m_ShowUnitySplashScreen: 1 + m_ShowUnitySplashLogo: 1 + m_SplashScreenOverlayOpacity: 1 + m_SplashScreenAnimation: 1 + m_SplashScreenLogoStyle: 1 + m_SplashScreenDrawMode: 0 + m_SplashScreenBackgroundAnimationZoom: 1 + m_SplashScreenLogoAnimationZoom: 1 + m_SplashScreenBackgroundLandscapeAspect: 1 + m_SplashScreenBackgroundPortraitAspect: 1 + m_SplashScreenBackgroundLandscapeUvs: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + m_SplashScreenBackgroundPortraitUvs: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + m_SplashScreenLogos: [] + m_VirtualRealitySplashScreen: {fileID: 0} + m_HolographicTrackingLossScreen: {fileID: 0} + defaultScreenWidth: 1024 + defaultScreenHeight: 768 + defaultScreenWidthWeb: 960 + defaultScreenHeightWeb: 600 + m_StereoRenderingPath: 0 + m_ActiveColorSpace: 0 + m_MTRendering: 1 + m_StackTraceTypes: 010000000100000001000000010000000100000001000000 + iosShowActivityIndicatorOnLoading: -1 + androidShowActivityIndicatorOnLoading: -1 + displayResolutionDialog: 1 + iosUseCustomAppBackgroundBehavior: 0 + iosAllowHTTPDownload: 1 + allowedAutorotateToPortrait: 1 + allowedAutorotateToPortraitUpsideDown: 1 + allowedAutorotateToLandscapeRight: 1 + allowedAutorotateToLandscapeLeft: 1 + useOSAutorotation: 1 + use32BitDisplayBuffer: 1 + preserveFramebufferAlpha: 0 + disableDepthAndStencilBuffers: 0 + androidStartInFullscreen: 1 + androidRenderOutsideSafeArea: 0 + androidBlitType: 0 + defaultIsNativeResolution: 1 + macRetinaSupport: 1 + runInBackground: 1 + captureSingleScreen: 0 + muteOtherAudioSources: 0 + Prepare IOS For Recording: 0 + Force IOS Speakers When Recording: 0 + deferSystemGesturesMode: 0 + hideHomeButton: 0 + submitAnalytics: 1 + usePlayerLog: 1 + bakeCollisionMeshes: 0 + forceSingleInstance: 0 + resizableWindow: 0 + useMacAppStoreValidation: 0 + macAppStoreCategory: public.app-category.games + gpuSkinning: 1 + graphicsJobs: 0 + xboxPIXTextureCapture: 0 + xboxEnableAvatar: 0 + xboxEnableKinect: 0 + xboxEnableKinectAutoTracking: 0 + xboxEnableFitness: 0 + visibleInBackground: 1 + allowFullscreenSwitch: 1 + graphicsJobMode: 0 + fullscreenMode: 1 + xboxSpeechDB: 0 + xboxEnableHeadOrientation: 0 + xboxEnableGuest: 0 + xboxEnablePIXSampling: 0 + metalFramebufferOnly: 0 + xboxOneResolution: 0 + xboxOneSResolution: 0 + xboxOneXResolution: 3 + xboxOneMonoLoggingLevel: 0 + xboxOneLoggingLevel: 1 + xboxOneDisableEsram: 0 + xboxOnePresentImmediateThreshold: 0 + switchQueueCommandMemory: 0 + switchQueueControlMemory: 16384 + switchQueueComputeMemory: 262144 + switchNVNShaderPoolsGranularity: 33554432 + switchNVNDefaultPoolsGranularity: 16777216 + switchNVNOtherPoolsGranularity: 16777216 + vulkanEnableSetSRGBWrite: 0 + m_SupportedAspectRatios: + 4:3: 1 + 5:4: 1 + 16:10: 1 + 16:9: 1 + Others: 1 + bundleVersion: 0.1 + preloadedAssets: [] + metroInputSource: 0 + wsaTransparentSwapchain: 0 + m_HolographicPauseOnTrackingLoss: 1 + xboxOneDisableKinectGpuReservation: 1 + xboxOneEnable7thCore: 1 + isWsaHolographicRemotingEnabled: 0 + vrSettings: + cardboard: + depthFormat: 0 + enableTransitionView: 0 + daydream: + depthFormat: 0 + useSustainedPerformanceMode: 0 + enableVideoLayer: 0 + useProtectedVideoMemory: 0 + minimumSupportedHeadTracking: 0 + maximumSupportedHeadTracking: 1 + hololens: + depthFormat: 1 + depthBufferSharingEnabled: 1 + oculus: + sharedDepthBuffer: 1 + dashSupport: 1 + lowOverheadMode: 0 + protectedContext: 0 + v2Signing: 0 + enable360StereoCapture: 0 + protectGraphicsMemory: 0 + enableFrameTimingStats: 0 + useHDRDisplay: 0 + m_ColorGamuts: 00000000 + targetPixelDensity: 30 + resolutionScalingMode: 0 + androidSupportedAspectRatio: 1 + androidMaxAspectRatio: 2.1 + applicationIdentifier: {} + buildNumber: {} + AndroidBundleVersionCode: 1 + AndroidMinSdkVersion: 16 + AndroidTargetSdkVersion: 0 + AndroidPreferredInstallLocation: 1 + aotOptions: + stripEngineCode: 1 + iPhoneStrippingLevel: 0 + iPhoneScriptCallOptimization: 0 + ForceInternetPermission: 0 + ForceSDCardPermission: 0 + CreateWallpaper: 0 + APKExpansionFiles: 0 + keepLoadedShadersAlive: 0 + StripUnusedMeshComponents: 1 + VertexChannelCompressionMask: 4054 + iPhoneSdkVersion: 988 + iOSTargetOSVersionString: 9.0 + tvOSSdkVersion: 0 + tvOSRequireExtendedGameController: 0 + tvOSTargetOSVersionString: 9.0 + uIPrerenderedIcon: 0 + uIRequiresPersistentWiFi: 0 + uIRequiresFullScreen: 1 + uIStatusBarHidden: 1 + uIExitOnSuspend: 0 + uIStatusBarStyle: 0 + iPhoneSplashScreen: {fileID: 0} + iPhoneHighResSplashScreen: {fileID: 0} + iPhoneTallHighResSplashScreen: {fileID: 0} + iPhone47inSplashScreen: {fileID: 0} + iPhone55inPortraitSplashScreen: {fileID: 0} + iPhone55inLandscapeSplashScreen: {fileID: 0} + iPhone58inPortraitSplashScreen: {fileID: 0} + iPhone58inLandscapeSplashScreen: {fileID: 0} + iPadPortraitSplashScreen: {fileID: 0} + iPadHighResPortraitSplashScreen: {fileID: 0} + iPadLandscapeSplashScreen: {fileID: 0} + iPadHighResLandscapeSplashScreen: {fileID: 0} + appleTVSplashScreen: {fileID: 0} + appleTVSplashScreen2x: {fileID: 0} + tvOSSmallIconLayers: [] + tvOSSmallIconLayers2x: [] + tvOSLargeIconLayers: [] + tvOSLargeIconLayers2x: [] + tvOSTopShelfImageLayers: [] + tvOSTopShelfImageLayers2x: [] + tvOSTopShelfImageWideLayers: [] + tvOSTopShelfImageWideLayers2x: [] + iOSLaunchScreenType: 0 + iOSLaunchScreenPortrait: {fileID: 0} + iOSLaunchScreenLandscape: {fileID: 0} + iOSLaunchScreenBackgroundColor: + serializedVersion: 2 + rgba: 0 + iOSLaunchScreenFillPct: 100 + iOSLaunchScreenSize: 100 + iOSLaunchScreenCustomXibPath: + iOSLaunchScreeniPadType: 0 + iOSLaunchScreeniPadImage: {fileID: 0} + iOSLaunchScreeniPadBackgroundColor: + serializedVersion: 2 + rgba: 0 + iOSLaunchScreeniPadFillPct: 100 + iOSLaunchScreeniPadSize: 100 + iOSLaunchScreeniPadCustomXibPath: + iOSUseLaunchScreenStoryboard: 0 + iOSLaunchScreenCustomStoryboardPath: + iOSDeviceRequirements: [] + iOSURLSchemes: [] + iOSBackgroundModes: 0 + iOSMetalForceHardShadows: 0 + metalEditorSupport: 1 + metalAPIValidation: 1 + iOSRenderExtraFrameOnPause: 0 + appleDeveloperTeamID: + iOSManualSigningProvisioningProfileID: + tvOSManualSigningProvisioningProfileID: + iOSManualSigningProvisioningProfileType: 0 + tvOSManualSigningProvisioningProfileType: 0 + appleEnableAutomaticSigning: 0 + iOSRequireARKit: 0 + iOSAutomaticallyDetectAndAddCapabilities: 1 + appleEnableProMotion: 0 + clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea + templatePackageId: com.unity.template.3d@1.3.0 + templateDefaultScene: Assets/Scenes/SampleScene.unity + AndroidTargetArchitectures: 5 + AndroidSplashScreenScale: 0 + androidSplashScreen: {fileID: 0} + AndroidKeystoreName: + AndroidKeyaliasName: + AndroidBuildApkPerCpuArchitecture: 0 + AndroidTVCompatibility: 1 + AndroidIsGame: 1 + AndroidEnableTango: 0 + androidEnableBanner: 1 + androidUseLowAccuracyLocation: 0 + m_AndroidBanners: + - width: 320 + height: 180 + banner: {fileID: 0} + androidGamepadSupportLevel: 0 + resolutionDialogBanner: {fileID: 0} + m_BuildTargetIcons: [] + m_BuildTargetPlatformIcons: [] + m_BuildTargetBatching: + - m_BuildTarget: Standalone + m_StaticBatching: 1 + m_DynamicBatching: 0 + - m_BuildTarget: tvOS + m_StaticBatching: 1 + m_DynamicBatching: 0 + - m_BuildTarget: Android + m_StaticBatching: 1 + m_DynamicBatching: 0 + - m_BuildTarget: iPhone + m_StaticBatching: 1 + m_DynamicBatching: 0 + - m_BuildTarget: WebGL + m_StaticBatching: 0 + m_DynamicBatching: 0 + m_BuildTargetGraphicsAPIs: + - m_BuildTarget: AndroidPlayer + m_APIs: 0b00000008000000 + m_Automatic: 1 + - m_BuildTarget: iOSSupport + m_APIs: 10000000 + m_Automatic: 1 + - m_BuildTarget: AppleTVSupport + m_APIs: 10000000 + m_Automatic: 0 + - m_BuildTarget: WebGLSupport + m_APIs: 0b000000 + m_Automatic: 1 + m_BuildTargetVRSettings: + - m_BuildTarget: Standalone + m_Enabled: 0 + m_Devices: + - Oculus + - OpenVR + m_BuildTargetEnableVuforiaSettings: [] + openGLRequireES31: 0 + openGLRequireES31AEP: 0 + m_TemplateCustomTags: {} + mobileMTRendering: + Android: 1 + iPhone: 1 + tvOS: 1 + m_BuildTargetGroupLightmapEncodingQuality: [] + m_BuildTargetGroupLightmapSettings: [] + playModeTestRunnerEnabled: 0 + runPlayModeTestAsEditModeTest: 0 + actionOnDotNetUnhandledException: 1 + enableInternalProfiler: 0 + logObjCUncaughtExceptions: 1 + enableCrashReportAPI: 0 + cameraUsageDescription: + locationUsageDescription: + microphoneUsageDescription: + switchNetLibKey: + switchSocketMemoryPoolSize: 6144 + switchSocketAllocatorPoolSize: 128 + switchSocketConcurrencyLimit: 14 + switchScreenResolutionBehavior: 2 + switchUseCPUProfiler: 0 + switchApplicationID: 0x01004b9000490000 + switchNSODependencies: + switchTitleNames_0: + switchTitleNames_1: + switchTitleNames_2: + switchTitleNames_3: + switchTitleNames_4: + switchTitleNames_5: + switchTitleNames_6: + switchTitleNames_7: + switchTitleNames_8: + switchTitleNames_9: + switchTitleNames_10: + switchTitleNames_11: + switchTitleNames_12: + switchTitleNames_13: + switchTitleNames_14: + switchPublisherNames_0: + switchPublisherNames_1: + switchPublisherNames_2: + switchPublisherNames_3: + switchPublisherNames_4: + switchPublisherNames_5: + switchPublisherNames_6: + switchPublisherNames_7: + switchPublisherNames_8: + switchPublisherNames_9: + switchPublisherNames_10: + switchPublisherNames_11: + switchPublisherNames_12: + switchPublisherNames_13: + switchPublisherNames_14: + switchIcons_0: {fileID: 0} + switchIcons_1: {fileID: 0} + switchIcons_2: {fileID: 0} + switchIcons_3: {fileID: 0} + switchIcons_4: {fileID: 0} + switchIcons_5: {fileID: 0} + switchIcons_6: {fileID: 0} + switchIcons_7: {fileID: 0} + switchIcons_8: {fileID: 0} + switchIcons_9: {fileID: 0} + switchIcons_10: {fileID: 0} + switchIcons_11: {fileID: 0} + switchIcons_12: {fileID: 0} + switchIcons_13: {fileID: 0} + switchIcons_14: {fileID: 0} + switchSmallIcons_0: {fileID: 0} + switchSmallIcons_1: {fileID: 0} + switchSmallIcons_2: {fileID: 0} + switchSmallIcons_3: {fileID: 0} + switchSmallIcons_4: {fileID: 0} + switchSmallIcons_5: {fileID: 0} + switchSmallIcons_6: {fileID: 0} + switchSmallIcons_7: {fileID: 0} + switchSmallIcons_8: {fileID: 0} + switchSmallIcons_9: {fileID: 0} + switchSmallIcons_10: {fileID: 0} + switchSmallIcons_11: {fileID: 0} + switchSmallIcons_12: {fileID: 0} + switchSmallIcons_13: {fileID: 0} + switchSmallIcons_14: {fileID: 0} + switchManualHTML: + switchAccessibleURLs: + switchLegalInformation: + switchMainThreadStackSize: 1048576 + switchPresenceGroupId: + switchLogoHandling: 0 + switchReleaseVersion: 0 + switchDisplayVersion: 1.0.0 + switchStartupUserAccount: 0 + switchTouchScreenUsage: 0 + switchSupportedLanguagesMask: 0 + switchLogoType: 0 + switchApplicationErrorCodeCategory: + switchUserAccountSaveDataSize: 0 + switchUserAccountSaveDataJournalSize: 0 + switchApplicationAttribute: 0 + switchCardSpecSize: -1 + switchCardSpecClock: -1 + switchRatingsMask: 0 + switchRatingsInt_0: 0 + switchRatingsInt_1: 0 + switchRatingsInt_2: 0 + switchRatingsInt_3: 0 + switchRatingsInt_4: 0 + switchRatingsInt_5: 0 + switchRatingsInt_6: 0 + switchRatingsInt_7: 0 + switchRatingsInt_8: 0 + switchRatingsInt_9: 0 + switchRatingsInt_10: 0 + switchRatingsInt_11: 0 + switchRatingsInt_12: 0 + switchLocalCommunicationIds_0: + switchLocalCommunicationIds_1: + switchLocalCommunicationIds_2: + switchLocalCommunicationIds_3: + switchLocalCommunicationIds_4: + switchLocalCommunicationIds_5: + switchLocalCommunicationIds_6: + switchLocalCommunicationIds_7: + switchParentalControl: 0 + switchAllowsScreenshot: 1 + switchAllowsVideoCapturing: 1 + switchAllowsRuntimeAddOnContentInstall: 0 + switchDataLossConfirmation: 0 + switchUserAccountLockEnabled: 0 + switchSystemResourceMemory: 16777216 + switchSupportedNpadStyles: 3 + switchNativeFsCacheSize: 32 + switchIsHoldTypeHorizontal: 0 + switchSupportedNpadCount: 8 + switchSocketConfigEnabled: 0 + switchTcpInitialSendBufferSize: 32 + switchTcpInitialReceiveBufferSize: 64 + switchTcpAutoSendBufferSizeMax: 256 + switchTcpAutoReceiveBufferSizeMax: 256 + switchUdpSendBufferSize: 9 + switchUdpReceiveBufferSize: 42 + switchSocketBufferEfficiency: 4 + switchSocketInitializeEnabled: 1 + switchNetworkInterfaceManagerInitializeEnabled: 1 + switchPlayerConnectionEnabled: 1 + ps4NPAgeRating: 12 + ps4NPTitleSecret: + ps4NPTrophyPackPath: + ps4ParentalLevel: 11 + ps4ContentID: ED1633-NPXX51362_00-0000000000000000 + ps4Category: 0 + ps4MasterVersion: 01.00 + ps4AppVersion: 01.00 + ps4AppType: 0 + ps4ParamSfxPath: + ps4VideoOutPixelFormat: 0 + ps4VideoOutInitialWidth: 1920 + ps4VideoOutBaseModeInitialWidth: 1920 + ps4VideoOutReprojectionRate: 60 + ps4PronunciationXMLPath: + ps4PronunciationSIGPath: + ps4BackgroundImagePath: + ps4StartupImagePath: + ps4StartupImagesFolder: + ps4IconImagesFolder: + ps4SaveDataImagePath: + ps4SdkOverride: + ps4BGMPath: + ps4ShareFilePath: + ps4ShareOverlayImagePath: + ps4PrivacyGuardImagePath: + ps4NPtitleDatPath: + ps4RemotePlayKeyAssignment: -1 + ps4RemotePlayKeyMappingDir: + ps4PlayTogetherPlayerCount: 0 + ps4EnterButtonAssignment: 1 + ps4ApplicationParam1: 0 + ps4ApplicationParam2: 0 + ps4ApplicationParam3: 0 + ps4ApplicationParam4: 0 + ps4DownloadDataSize: 0 + ps4GarlicHeapSize: 2048 + ps4ProGarlicHeapSize: 2560 + ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ + ps4pnSessions: 1 + ps4pnPresence: 1 + ps4pnFriends: 1 + ps4pnGameCustomData: 1 + playerPrefsSupport: 0 + enableApplicationExit: 0 + resetTempFolder: 1 + restrictedAudioUsageRights: 0 + ps4UseResolutionFallback: 0 + ps4ReprojectionSupport: 0 + ps4UseAudio3dBackend: 0 + ps4SocialScreenEnabled: 0 + ps4ScriptOptimizationLevel: 0 + ps4Audio3dVirtualSpeakerCount: 14 + ps4attribCpuUsage: 0 + ps4PatchPkgPath: + ps4PatchLatestPkgPath: + ps4PatchChangeinfoPath: + ps4PatchDayOne: 0 + ps4attribUserManagement: 0 + ps4attribMoveSupport: 0 + ps4attrib3DSupport: 0 + ps4attribShareSupport: 0 + ps4attribExclusiveVR: 0 + ps4disableAutoHideSplash: 0 + ps4videoRecordingFeaturesUsed: 0 + ps4contentSearchFeaturesUsed: 0 + ps4attribEyeToEyeDistanceSettingVR: 0 + ps4IncludedModules: [] + monoEnv: + splashScreenBackgroundSourceLandscape: {fileID: 0} + splashScreenBackgroundSourcePortrait: {fileID: 0} + spritePackerPolicy: + webGLMemorySize: 256 + webGLExceptionSupport: 1 + webGLNameFilesAsHashes: 0 + webGLDataCaching: 1 + webGLDebugSymbols: 0 + webGLEmscriptenArgs: + webGLModulesDirectory: + webGLTemplate: APPLICATION:Default + webGLAnalyzeBuildSize: 0 + webGLUseEmbeddedResources: 0 + webGLCompressionFormat: 1 + webGLLinkerTarget: 1 + webGLThreadsSupport: 0 + scriptingDefineSymbols: {} + platformArchitecture: {} + scriptingBackend: {} + il2cppCompilerConfiguration: {} + managedStrippingLevel: {} + incrementalIl2cppBuild: {} + allowUnsafeCode: 0 + additionalIl2CppArgs: + scriptingRuntimeVersion: 1 + apiCompatibilityLevelPerPlatform: {} + m_RenderingPath: 1 + m_MobileRenderingPath: 1 + metroPackageName: Template_3D + metroPackageVersion: + metroCertificatePath: + metroCertificatePassword: + metroCertificateSubject: + metroCertificateIssuer: + metroCertificateNotAfter: 0000000000000000 + metroApplicationDescription: Template_3D + wsaImages: {} + metroTileShortName: + metroTileShowName: 0 + metroMediumTileShowName: 0 + metroLargeTileShowName: 0 + metroWideTileShowName: 0 + metroSupportStreamingInstall: 0 + metroLastRequiredScene: 0 + metroDefaultTileSize: 1 + metroTileForegroundText: 2 + metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} + metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, + a: 1} + metroSplashScreenUseBackgroundColor: 0 + platformCapabilities: {} + metroTargetDeviceFamilies: {} + metroFTAName: + metroFTAFileTypes: [] + metroProtocolName: + metroCompilationOverrides: 1 + XboxOneProductId: + XboxOneUpdateKey: + XboxOneSandboxId: + XboxOneContentId: + XboxOneTitleId: + XboxOneSCId: + XboxOneGameOsOverridePath: + XboxOnePackagingOverridePath: + XboxOneAppManifestOverridePath: + XboxOneVersion: 1.0.0.0 + XboxOnePackageEncryption: 0 + XboxOnePackageUpdateGranularity: 2 + XboxOneDescription: + XboxOneLanguage: + - enus + XboxOneCapability: [] + XboxOneGameRating: {} + XboxOneIsContentPackage: 0 + XboxOneEnableGPUVariability: 1 + XboxOneSockets: {} + XboxOneSplashScreen: {fileID: 0} + XboxOneAllowedProductIds: [] + XboxOnePersistentLocalStorageSize: 0 + XboxOneXTitleMemory: 8 + xboxOneScriptCompiler: 1 + XboxOneOverrideIdentityName: + vrEditorSettings: + daydream: + daydreamIconForeground: {fileID: 0} + daydreamIconBackground: {fileID: 0} + cloudServicesEnabled: + UNet: 1 + luminIcon: + m_Name: + m_ModelFolderPath: + m_PortalFolderPath: + luminCert: + m_CertPath: + m_PrivateKeyPath: + luminIsChannelApp: 0 + luminVersion: + m_VersionCode: 1 + m_VersionName: + facebookSdkVersion: 7.9.4 + facebookAppId: + facebookCookies: 1 + facebookLogging: 1 + facebookStatus: 1 + facebookXfbml: 0 + facebookFrictionlessRequests: 1 + apiCompatibilityLevel: 6 + cloudProjectId: + framebufferDepthMemorylessMode: 0 + projectName: + organizationId: + cloudEnabled: 0 + enableNativePlatformBackendsForNewInputSystem: 0 + disableOldInputManagerSupport: 0 + legacyClampBlendShapeWeights: 0 diff --git a/Roll a Ball/Library/ScriptAssemblies/Assembly-CSharp.dll b/Roll a Ball/Library/ScriptAssemblies/Assembly-CSharp.dll new file mode 100644 index 0000000000000000000000000000000000000000..c3a4f8d45d5e283d34355b44d8ada83454295622 Binary files /dev/null and b/Roll a Ball/Library/ScriptAssemblies/Assembly-CSharp.dll differ diff --git a/Roll a Ball/Library/ScriptAssemblies/BuiltinAssemblies.stamp b/Roll a Ball/Library/ScriptAssemblies/BuiltinAssemblies.stamp new file mode 100644 index 0000000000000000000000000000000000000000..bd8d28a25bb4dd8d483c05c513b13f77869cab25 --- /dev/null +++ b/Roll a Ball/Library/ScriptAssemblies/BuiltinAssemblies.stamp @@ -0,0 +1 @@ +08d79ff5d96fc800.08d79ff5dbd22200 \ No newline at end of file diff --git a/Roll a Ball/Library/ScriptAssemblies/Unity.Analytics.DataPrivacy.dll b/Roll a Ball/Library/ScriptAssemblies/Unity.Analytics.DataPrivacy.dll new file mode 100644 index 0000000000000000000000000000000000000000..378007f3485dc69de88fa2ee1e7a33d42a43ca6a Binary files /dev/null and b/Roll a Ball/Library/ScriptAssemblies/Unity.Analytics.DataPrivacy.dll differ diff --git a/Roll a Ball/Library/ScriptAssemblies/Unity.CollabProxy.Editor.dll b/Roll a Ball/Library/ScriptAssemblies/Unity.CollabProxy.Editor.dll new file mode 100644 index 0000000000000000000000000000000000000000..7c92a66a5272a08875dc25ac64fc3e5ea121919f Binary files /dev/null and b/Roll a Ball/Library/ScriptAssemblies/Unity.CollabProxy.Editor.dll differ diff --git a/Roll a Ball/Library/ScriptAssemblies/Unity.PackageManagerUI.Editor.dll b/Roll a Ball/Library/ScriptAssemblies/Unity.PackageManagerUI.Editor.dll new file mode 100644 index 0000000000000000000000000000000000000000..a63d13d50da7bb7104896be0b6e2311f20f58e15 Binary files /dev/null and b/Roll a Ball/Library/ScriptAssemblies/Unity.PackageManagerUI.Editor.dll differ diff --git a/Roll a Ball/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll b/Roll a Ball/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll new file mode 100644 index 0000000000000000000000000000000000000000..193b0dabcc2e54731575d4632e15ba5b09223810 Binary files /dev/null and b/Roll a Ball/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll differ diff --git a/Roll a Ball/Library/ScriptAssemblies/Unity.TextMeshPro.dll b/Roll a Ball/Library/ScriptAssemblies/Unity.TextMeshPro.dll new file mode 100644 index 0000000000000000000000000000000000000000..215a600f8bd770956f2d7dab93d1fc1f4d1fdd8f Binary files /dev/null and b/Roll a Ball/Library/ScriptAssemblies/Unity.TextMeshPro.dll differ diff --git a/Roll a Ball/Library/ScriptMapper b/Roll a Ball/Library/ScriptMapper new file mode 100644 index 0000000000000000000000000000000000000000..2ece55bb07660af07ea2b950f7c2a4fafc134736 Binary files /dev/null and b/Roll a Ball/Library/ScriptMapper differ diff --git a/Roll a Ball/Library/ShaderCache.db b/Roll a Ball/Library/ShaderCache.db new file mode 100644 index 0000000000000000000000000000000000000000..93f0bb989e3b90d0827199cf545b87b9f8594b7a Binary files /dev/null and b/Roll a Ball/Library/ShaderCache.db differ diff --git a/Roll a Ball/Library/ShaderCache/1/1ee8cd1a5a2bdaf3432ce92003b42983.bin b/Roll a Ball/Library/ShaderCache/1/1ee8cd1a5a2bdaf3432ce92003b42983.bin new file mode 100644 index 0000000000000000000000000000000000000000..6d7ed85e2bed69dac59f00a1884dbd2d6eec0b34 Binary files /dev/null and b/Roll a Ball/Library/ShaderCache/1/1ee8cd1a5a2bdaf3432ce92003b42983.bin differ diff --git a/Roll a Ball/Library/ShaderCache/2/2342a991db8d7299ab6f2879d7e6ff92.bin b/Roll a Ball/Library/ShaderCache/2/2342a991db8d7299ab6f2879d7e6ff92.bin new file mode 100644 index 0000000000000000000000000000000000000000..949a795c5178689c4178770feca870186d70b381 Binary files /dev/null and b/Roll a Ball/Library/ShaderCache/2/2342a991db8d7299ab6f2879d7e6ff92.bin differ diff --git a/Roll a Ball/Library/ShaderCache/3/384ec7e2ddfe01f6107ff9b187189fad.bin b/Roll a Ball/Library/ShaderCache/3/384ec7e2ddfe01f6107ff9b187189fad.bin new file mode 100644 index 0000000000000000000000000000000000000000..f50bf49fdf3ac5b053f55aa3c1b499ddbd66b7f5 Binary files /dev/null and b/Roll a Ball/Library/ShaderCache/3/384ec7e2ddfe01f6107ff9b187189fad.bin differ diff --git a/Roll a Ball/Library/ShaderCache/3/39a6a28d980d3ca42248ec13046c89b9.bin b/Roll a Ball/Library/ShaderCache/3/39a6a28d980d3ca42248ec13046c89b9.bin new file mode 100644 index 0000000000000000000000000000000000000000..e7794639fb11dd34cf0bc6d8078eff0457a8c8d6 Binary files /dev/null and b/Roll a Ball/Library/ShaderCache/3/39a6a28d980d3ca42248ec13046c89b9.bin differ diff --git a/Roll a Ball/Library/ShaderCache/4/4693bf969be43b028618064f80a6dfd1.bin b/Roll a Ball/Library/ShaderCache/4/4693bf969be43b028618064f80a6dfd1.bin new file mode 100644 index 0000000000000000000000000000000000000000..2027d768d922caccd18c6a3baa2719eb537ac513 Binary files /dev/null and b/Roll a Ball/Library/ShaderCache/4/4693bf969be43b028618064f80a6dfd1.bin differ diff --git a/Roll a Ball/Library/ShaderCache/5/5626aad7f51b081d70543b386be4f195.bin b/Roll a Ball/Library/ShaderCache/5/5626aad7f51b081d70543b386be4f195.bin new file mode 100644 index 0000000000000000000000000000000000000000..f81cda2e11dcb2a9c81c67de569e43589d508b94 Binary files /dev/null and b/Roll a Ball/Library/ShaderCache/5/5626aad7f51b081d70543b386be4f195.bin differ diff --git a/Roll a Ball/Library/ShaderCache/5/56ea302b005d117f635800dd05388543.bin b/Roll a Ball/Library/ShaderCache/5/56ea302b005d117f635800dd05388543.bin new file mode 100644 index 0000000000000000000000000000000000000000..fef95ada798be78c31f56c0b1cc6e550759d6fb8 Binary files /dev/null and b/Roll a Ball/Library/ShaderCache/5/56ea302b005d117f635800dd05388543.bin differ diff --git a/Roll a Ball/Library/ShaderCache/6/6520c2e074ca0723fac9841b2954154f.bin b/Roll a Ball/Library/ShaderCache/6/6520c2e074ca0723fac9841b2954154f.bin new file mode 100644 index 0000000000000000000000000000000000000000..2b2a4c08b7c08103ec60de2153db4a49b4c19cda Binary files /dev/null and b/Roll a Ball/Library/ShaderCache/6/6520c2e074ca0723fac9841b2954154f.bin differ diff --git a/Roll a Ball/Library/ShaderCache/6/68c457e329bd8ffdb03b16d8b7060f79.bin b/Roll a Ball/Library/ShaderCache/6/68c457e329bd8ffdb03b16d8b7060f79.bin new file mode 100644 index 0000000000000000000000000000000000000000..39bd0f2128e005372521a10c3fa252069f731921 Binary files /dev/null and b/Roll a Ball/Library/ShaderCache/6/68c457e329bd8ffdb03b16d8b7060f79.bin differ diff --git a/Roll a Ball/Library/ShaderCache/6/6b338927cb898693b4ecd44cf1319eea.bin b/Roll a Ball/Library/ShaderCache/6/6b338927cb898693b4ecd44cf1319eea.bin new file mode 100644 index 0000000000000000000000000000000000000000..95f7f78558cf2852015b6359c88faa61a8d2c251 Binary files /dev/null and b/Roll a Ball/Library/ShaderCache/6/6b338927cb898693b4ecd44cf1319eea.bin differ diff --git a/Roll a Ball/Library/ShaderCache/7/72ff61e1bf23f1898a9e372a62b768f8.bin b/Roll a Ball/Library/ShaderCache/7/72ff61e1bf23f1898a9e372a62b768f8.bin new file mode 100644 index 0000000000000000000000000000000000000000..fbb1c556d7abb36d556bf9999dfdfeb95799fd7a Binary files /dev/null and b/Roll a Ball/Library/ShaderCache/7/72ff61e1bf23f1898a9e372a62b768f8.bin differ diff --git a/Roll a Ball/Library/ShaderCache/7/7582f779a33383eb9314499ff7e0b739.bin b/Roll a Ball/Library/ShaderCache/7/7582f779a33383eb9314499ff7e0b739.bin new file mode 100644 index 0000000000000000000000000000000000000000..e546154bc1b83560d44e99fee5b6b9f7a5bf267d Binary files /dev/null and b/Roll a Ball/Library/ShaderCache/7/7582f779a33383eb9314499ff7e0b739.bin differ diff --git a/Roll a Ball/Library/ShaderCache/8/8373b95dcb38a3f0b04433f7f76cb79f.bin b/Roll a Ball/Library/ShaderCache/8/8373b95dcb38a3f0b04433f7f76cb79f.bin new file mode 100644 index 0000000000000000000000000000000000000000..b7ffe379803fb3274c21b13e9b74c8711151de94 Binary files /dev/null and b/Roll a Ball/Library/ShaderCache/8/8373b95dcb38a3f0b04433f7f76cb79f.bin differ diff --git a/Roll a Ball/Library/ShaderCache/8/880ad43237edf09be5e2686e424927bb.bin b/Roll a Ball/Library/ShaderCache/8/880ad43237edf09be5e2686e424927bb.bin new file mode 100644 index 0000000000000000000000000000000000000000..7b64a18daf0ba8f7265f773ac6bb779c4207a323 Binary files /dev/null and b/Roll a Ball/Library/ShaderCache/8/880ad43237edf09be5e2686e424927bb.bin differ diff --git a/Roll a Ball/Library/ShaderCache/9/9086ad79242f5eee1aa56bceebeb2205.bin b/Roll a Ball/Library/ShaderCache/9/9086ad79242f5eee1aa56bceebeb2205.bin new file mode 100644 index 0000000000000000000000000000000000000000..6dccfd4f21eac38361d2801526426e1dc03b9f0c Binary files /dev/null and b/Roll a Ball/Library/ShaderCache/9/9086ad79242f5eee1aa56bceebeb2205.bin differ diff --git a/Roll a Ball/Library/ShaderCache/a/aac7e18b28d36e30b9f37d90fba6ed60.bin b/Roll a Ball/Library/ShaderCache/a/aac7e18b28d36e30b9f37d90fba6ed60.bin new file mode 100644 index 0000000000000000000000000000000000000000..ad466fdcaa55f6fd569e6d77bca33d99fef72886 Binary files /dev/null and b/Roll a Ball/Library/ShaderCache/a/aac7e18b28d36e30b9f37d90fba6ed60.bin differ diff --git a/Roll a Ball/Library/ShaderCache/a/ae724b5b73af360a8faa9be8eb0ae4c4.bin b/Roll a Ball/Library/ShaderCache/a/ae724b5b73af360a8faa9be8eb0ae4c4.bin new file mode 100644 index 0000000000000000000000000000000000000000..7e7f82341d019fe95ecaf99b00711e8caf662dba Binary files /dev/null and b/Roll a Ball/Library/ShaderCache/a/ae724b5b73af360a8faa9be8eb0ae4c4.bin differ diff --git a/Roll a Ball/Library/ShaderCache/b/b012a75e540df3a5283c5de11c9f4b14.bin b/Roll a Ball/Library/ShaderCache/b/b012a75e540df3a5283c5de11c9f4b14.bin new file mode 100644 index 0000000000000000000000000000000000000000..401f7e38379c169514def0d5e6ee30521de2a8dd Binary files /dev/null and b/Roll a Ball/Library/ShaderCache/b/b012a75e540df3a5283c5de11c9f4b14.bin differ diff --git a/Roll a Ball/Library/ShaderCache/b/b2c9c2efa4c6098177bd7908744c16f7.bin b/Roll a Ball/Library/ShaderCache/b/b2c9c2efa4c6098177bd7908744c16f7.bin new file mode 100644 index 0000000000000000000000000000000000000000..83503d3102ecc79aeae2fdea6482c2dda5bf623a Binary files /dev/null and b/Roll a Ball/Library/ShaderCache/b/b2c9c2efa4c6098177bd7908744c16f7.bin differ diff --git a/Roll a Ball/Library/ShaderCache/b/b324ed9725d02a9015c85ca2cf97a3b3.bin b/Roll a Ball/Library/ShaderCache/b/b324ed9725d02a9015c85ca2cf97a3b3.bin new file mode 100644 index 0000000000000000000000000000000000000000..c6eea633a17e63ad0a12745253adb121f893af3e Binary files /dev/null and b/Roll a Ball/Library/ShaderCache/b/b324ed9725d02a9015c85ca2cf97a3b3.bin differ diff --git a/Roll a Ball/Library/ShaderCache/b/b3369ad922d9216f52759f1a35e869c9.bin b/Roll a Ball/Library/ShaderCache/b/b3369ad922d9216f52759f1a35e869c9.bin new file mode 100644 index 0000000000000000000000000000000000000000..d5efc2d405af0e0e427f649b9f05856cd9193ffd Binary files /dev/null and b/Roll a Ball/Library/ShaderCache/b/b3369ad922d9216f52759f1a35e869c9.bin differ diff --git a/Roll a Ball/Library/ShaderCache/b/be5b6c117cb9e32d8b7eef6bb72497dd.bin b/Roll a Ball/Library/ShaderCache/b/be5b6c117cb9e32d8b7eef6bb72497dd.bin new file mode 100644 index 0000000000000000000000000000000000000000..c46c5d6c5746cd6fd1dd9142aa61b0c26ce3b217 Binary files /dev/null and b/Roll a Ball/Library/ShaderCache/b/be5b6c117cb9e32d8b7eef6bb72497dd.bin differ diff --git a/Roll a Ball/Library/ShaderCache/c/c7f628d8937e958ecd63b87108c92a0e.bin b/Roll a Ball/Library/ShaderCache/c/c7f628d8937e958ecd63b87108c92a0e.bin new file mode 100644 index 0000000000000000000000000000000000000000..b812cc115d0df2c2ddfd2314f90443021a8b670d Binary files /dev/null and b/Roll a Ball/Library/ShaderCache/c/c7f628d8937e958ecd63b87108c92a0e.bin differ diff --git a/Roll a Ball/Library/ShaderCache/c/ce0f1933661a6b9eb7ff0d417e0f5757.bin b/Roll a Ball/Library/ShaderCache/c/ce0f1933661a6b9eb7ff0d417e0f5757.bin new file mode 100644 index 0000000000000000000000000000000000000000..f9cc30e4439f5e84b122a218ac1db49c0da8c465 Binary files /dev/null and b/Roll a Ball/Library/ShaderCache/c/ce0f1933661a6b9eb7ff0d417e0f5757.bin differ diff --git a/Roll a Ball/Library/SpriteAtlasDatabase.asset b/Roll a Ball/Library/SpriteAtlasDatabase.asset new file mode 100644 index 0000000000000000000000000000000000000000..d482e1e874342178da69a7e886f25b9f57f940a2 Binary files /dev/null and b/Roll a Ball/Library/SpriteAtlasDatabase.asset differ diff --git a/Roll a Ball/Library/StateCache/Hierarchy/8f55b3-mainStage.json b/Roll a Ball/Library/StateCache/Hierarchy/8f55b3-mainStage.json new file mode 100644 index 0000000000000000000000000000000000000000..4461fa5f1bb8381d1f2522c3a5d4f6ddda3056fb --- /dev/null +++ b/Roll a Ball/Library/StateCache/Hierarchy/8f55b3-mainStage.json @@ -0,0 +1 @@ +{"m_ExpandedPrefabGameObjectFileIDs":[],"m_ExpandedSceneGameObjectInstanceIDs":[],"m_ScrollY":0.0,"m_LastClickedFileID":0,"m_LastClickedInstanceID":0} \ No newline at end of file diff --git a/Roll a Ball/Library/StateCache/SceneView/6d541f-mainStage.json b/Roll a Ball/Library/StateCache/SceneView/6d541f-mainStage.json new file mode 100644 index 0000000000000000000000000000000000000000..4bdb4ba9db9d6569a6209e781eccf772f017104d --- /dev/null +++ b/Roll a Ball/Library/StateCache/SceneView/6d541f-mainStage.json @@ -0,0 +1 @@ +{"cameraMode":{"drawMode":0,"name":"Shaded","section":"Shading Mode"},"sceneLighting":true,"audioPlay":false,"sceneViewState":{"showFog":true,"showMaterialUpdate":false,"showSkybox":true,"showFlares":true,"showImageEffects":true,"showParticleSystems":true},"in2DMode":false,"pivot":{"x":0.0,"y":0.0,"z":0.0},"rotation":{"x":0.3140794336795807,"y":0.008544470183551312,"z":-0.0028267959132790567,"w":0.9493540525436401},"size":29.047746658325197,"orthographic":false} \ No newline at end of file diff --git a/Roll a Ball/Library/TilemapEditorUserSettings.asset b/Roll a Ball/Library/TilemapEditorUserSettings.asset new file mode 100644 index 0000000000000000000000000000000000000000..52ff18f25dac5b367d8992490d85355f2f61c31f Binary files /dev/null and b/Roll a Ball/Library/TilemapEditorUserSettings.asset differ diff --git a/Roll a Ball/Library/assetDatabase3 b/Roll a Ball/Library/assetDatabase3 new file mode 100644 index 0000000000000000000000000000000000000000..294962fd1cff75d2efffbc7f57d6715fa45488f8 Binary files /dev/null and b/Roll a Ball/Library/assetDatabase3 differ diff --git a/Roll a Ball/Library/expandedItems b/Roll a Ball/Library/expandedItems new file mode 100644 index 0000000000000000000000000000000000000000..22c5bf56ad07bfc14e64bc462d38584bafd7af81 Binary files /dev/null and b/Roll a Ball/Library/expandedItems differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000001000000000000000 b/Roll a Ball/Library/metadata/00/00000000000000001000000000000000 new file mode 100644 index 0000000000000000000000000000000000000000..c053c5b561cba630de0676cd9e3baafb5301b7dc Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000001000000000000000 differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000001000000000000000.info b/Roll a Ball/Library/metadata/00/00000000000000001000000000000000.info new file mode 100644 index 0000000000000000000000000000000000000000..0a194ff369911efcb80ba20cf2678acc0d539d64 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000001000000000000000.info differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000002000000000000000 b/Roll a Ball/Library/metadata/00/00000000000000002000000000000000 new file mode 100644 index 0000000000000000000000000000000000000000..c72bf49b6efadc7643c87cd424eb330b07ef11b7 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000002000000000000000 differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000002000000000000000.info b/Roll a Ball/Library/metadata/00/00000000000000002000000000000000.info new file mode 100644 index 0000000000000000000000000000000000000000..593e5d41d4d2ede0cce8331be4a358b1ecbb4262 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000002000000000000000.info differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000003000000000000000 b/Roll a Ball/Library/metadata/00/00000000000000003000000000000000 new file mode 100644 index 0000000000000000000000000000000000000000..cd9a67c37fd6d710402266da75892378589a6e9c Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000003000000000000000 differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000003000000000000000.info b/Roll a Ball/Library/metadata/00/00000000000000003000000000000000.info new file mode 100644 index 0000000000000000000000000000000000000000..ec51f964c811ebf1c0ad5d4b2004d9e30bdcb63c Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000003000000000000000.info differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000004000000000000000 b/Roll a Ball/Library/metadata/00/00000000000000004000000000000000 new file mode 100644 index 0000000000000000000000000000000000000000..781ad323876fa6de71ff3e06e583e34597ed3b13 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000004000000000000000 differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000004000000000000000.info b/Roll a Ball/Library/metadata/00/00000000000000004000000000000000.info new file mode 100644 index 0000000000000000000000000000000000000000..fc11fd0f6c69d06f53c015af498de1c395dd4639 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000004000000000000000.info differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000004100000000000000 b/Roll a Ball/Library/metadata/00/00000000000000004100000000000000 new file mode 100644 index 0000000000000000000000000000000000000000..557a0b2ffed51fa3ec4596204669e4e6a1208424 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000004100000000000000 differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000004100000000000000.info b/Roll a Ball/Library/metadata/00/00000000000000004100000000000000.info new file mode 100644 index 0000000000000000000000000000000000000000..65ed8e2eee94670d00db87a6f8916b765724b703 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000004100000000000000.info differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000005000000000000000 b/Roll a Ball/Library/metadata/00/00000000000000005000000000000000 new file mode 100644 index 0000000000000000000000000000000000000000..a01120d5104eb09fc78b0c2d60e49ab629a9d7e2 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000005000000000000000 differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000005000000000000000.info b/Roll a Ball/Library/metadata/00/00000000000000005000000000000000.info new file mode 100644 index 0000000000000000000000000000000000000000..fade0c91985afc95f5f1c8f3b97f23601dedb096 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000005000000000000000.info differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000005100000000000000 b/Roll a Ball/Library/metadata/00/00000000000000005100000000000000 new file mode 100644 index 0000000000000000000000000000000000000000..a6282b29233bbeef414250dbcce35a41c69d71d4 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000005100000000000000 differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000005100000000000000.info b/Roll a Ball/Library/metadata/00/00000000000000005100000000000000.info new file mode 100644 index 0000000000000000000000000000000000000000..5db0c0ba0c405bac68735397f4365e89d2f0a86a Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000005100000000000000.info differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000006000000000000000 b/Roll a Ball/Library/metadata/00/00000000000000006000000000000000 new file mode 100644 index 0000000000000000000000000000000000000000..bb4823b4fc63b19d3bcdd5c717400e7a6dcdb09a Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000006000000000000000 differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000006000000000000000.info b/Roll a Ball/Library/metadata/00/00000000000000006000000000000000.info new file mode 100644 index 0000000000000000000000000000000000000000..bb46964a34ed58d425991a5684773df9590ceb96 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000006000000000000000.info differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000006100000000000000 b/Roll a Ball/Library/metadata/00/00000000000000006100000000000000 new file mode 100644 index 0000000000000000000000000000000000000000..07cb83853d5c04580bc1d45d38c8407538873dd3 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000006100000000000000 differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000006100000000000000.info b/Roll a Ball/Library/metadata/00/00000000000000006100000000000000.info new file mode 100644 index 0000000000000000000000000000000000000000..dfb760a0f86286dc632833c571af8f1439c7df9a Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000006100000000000000.info differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000007000000000000000 b/Roll a Ball/Library/metadata/00/00000000000000007000000000000000 new file mode 100644 index 0000000000000000000000000000000000000000..2dbf52dca363865ab0a1360d9ea43348f8b57427 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000007000000000000000 differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000007000000000000000.info b/Roll a Ball/Library/metadata/00/00000000000000007000000000000000.info new file mode 100644 index 0000000000000000000000000000000000000000..a80c7dd368e3a8f6d8ad8082975f55bd26a5adc6 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000007000000000000000.info differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000007100000000000000 b/Roll a Ball/Library/metadata/00/00000000000000007100000000000000 new file mode 100644 index 0000000000000000000000000000000000000000..f4241dc7dd77ebaf45c2be79832cedc312097f38 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000007100000000000000 differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000007100000000000000.info b/Roll a Ball/Library/metadata/00/00000000000000007100000000000000.info new file mode 100644 index 0000000000000000000000000000000000000000..1b7d26b057759066e271e34dfe5feffb0085affa Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000007100000000000000.info differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000008000000000000000 b/Roll a Ball/Library/metadata/00/00000000000000008000000000000000 new file mode 100644 index 0000000000000000000000000000000000000000..98db6efe057ae2554b2c30d5bc25822fba82e7fd Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000008000000000000000 differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000008000000000000000.info b/Roll a Ball/Library/metadata/00/00000000000000008000000000000000.info new file mode 100644 index 0000000000000000000000000000000000000000..5dc930f76b7aac065f2998879405b22a54282ad4 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000008000000000000000.info differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000009000000000000000 b/Roll a Ball/Library/metadata/00/00000000000000009000000000000000 new file mode 100644 index 0000000000000000000000000000000000000000..6a5a8fc060ca161ae3de4935101064613933e35f Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000009000000000000000 differ diff --git a/Roll a Ball/Library/metadata/00/00000000000000009000000000000000.info b/Roll a Ball/Library/metadata/00/00000000000000009000000000000000.info new file mode 100644 index 0000000000000000000000000000000000000000..bd8d03ac456692e6f14d16f20cf36b8c1b6d6b15 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00000000000000009000000000000000.info differ diff --git a/Roll a Ball/Library/metadata/00/0000000000000000a100000000000000 b/Roll a Ball/Library/metadata/00/0000000000000000a100000000000000 new file mode 100644 index 0000000000000000000000000000000000000000..ca4122561c5c4d3a871071afce517bf46611f487 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/0000000000000000a100000000000000 differ diff --git a/Roll a Ball/Library/metadata/00/0000000000000000a100000000000000.info b/Roll a Ball/Library/metadata/00/0000000000000000a100000000000000.info new file mode 100644 index 0000000000000000000000000000000000000000..552089bc71a143e9cd848450ae68ac206e16cecd Binary files /dev/null and b/Roll a Ball/Library/metadata/00/0000000000000000a100000000000000.info differ diff --git a/Roll a Ball/Library/metadata/00/0000000000000000b000000000000000 b/Roll a Ball/Library/metadata/00/0000000000000000b000000000000000 new file mode 100644 index 0000000000000000000000000000000000000000..ce1b5d129b096ebcbbc1edbe859f4bfbb4e48bdc Binary files /dev/null and b/Roll a Ball/Library/metadata/00/0000000000000000b000000000000000 differ diff --git a/Roll a Ball/Library/metadata/00/0000000000000000b000000000000000.info b/Roll a Ball/Library/metadata/00/0000000000000000b000000000000000.info new file mode 100644 index 0000000000000000000000000000000000000000..3d0ea61a3518b49e6899339b03b88e54e1bc3a6b Binary files /dev/null and b/Roll a Ball/Library/metadata/00/0000000000000000b000000000000000.info differ diff --git a/Roll a Ball/Library/metadata/00/0000000000000000b100000000000000 b/Roll a Ball/Library/metadata/00/0000000000000000b100000000000000 new file mode 100644 index 0000000000000000000000000000000000000000..81562c30466b5c22c0129c13f02b59c42fe52948 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/0000000000000000b100000000000000 differ diff --git a/Roll a Ball/Library/metadata/00/0000000000000000b100000000000000.info b/Roll a Ball/Library/metadata/00/0000000000000000b100000000000000.info new file mode 100644 index 0000000000000000000000000000000000000000..6b2e706e3b1bf9dd7b8a462cbac7ac7572a0f186 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/0000000000000000b100000000000000.info differ diff --git a/Roll a Ball/Library/metadata/00/0000000000000000c000000000000000 b/Roll a Ball/Library/metadata/00/0000000000000000c000000000000000 new file mode 100644 index 0000000000000000000000000000000000000000..983ef8e77687979a093bafd283b225aebe75af2c Binary files /dev/null and b/Roll a Ball/Library/metadata/00/0000000000000000c000000000000000 differ diff --git a/Roll a Ball/Library/metadata/00/0000000000000000c000000000000000.info b/Roll a Ball/Library/metadata/00/0000000000000000c000000000000000.info new file mode 100644 index 0000000000000000000000000000000000000000..1af637d536c5ed1cd18a66b6ee456e8ea5053284 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/0000000000000000c000000000000000.info differ diff --git a/Roll a Ball/Library/metadata/00/0000000000000000c100000000000000 b/Roll a Ball/Library/metadata/00/0000000000000000c100000000000000 new file mode 100644 index 0000000000000000000000000000000000000000..058533e1b73812a850f309b680bc69d9bcf897fd Binary files /dev/null and b/Roll a Ball/Library/metadata/00/0000000000000000c100000000000000 differ diff --git a/Roll a Ball/Library/metadata/00/0000000000000000c100000000000000.info b/Roll a Ball/Library/metadata/00/0000000000000000c100000000000000.info new file mode 100644 index 0000000000000000000000000000000000000000..2e597e3f3432a579e73d20d9d546419960aa16ea Binary files /dev/null and b/Roll a Ball/Library/metadata/00/0000000000000000c100000000000000.info differ diff --git a/Roll a Ball/Library/metadata/00/005c4d80949154e5c87348bb9f5d15eb b/Roll a Ball/Library/metadata/00/005c4d80949154e5c87348bb9f5d15eb new file mode 100644 index 0000000000000000000000000000000000000000..5e2e5d7031a8ea85e8b4cfe0981dcf9d5dc8b4a5 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/005c4d80949154e5c87348bb9f5d15eb differ diff --git a/Roll a Ball/Library/metadata/00/005c4d80949154e5c87348bb9f5d15eb.info b/Roll a Ball/Library/metadata/00/005c4d80949154e5c87348bb9f5d15eb.info new file mode 100644 index 0000000000000000000000000000000000000000..26dd89c77a0c98cd3d5c8a99aeb9918eb50ba384 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/005c4d80949154e5c87348bb9f5d15eb.info differ diff --git a/Roll a Ball/Library/metadata/00/00ed25e3298ac440eb327c706a964e3a b/Roll a Ball/Library/metadata/00/00ed25e3298ac440eb327c706a964e3a new file mode 100644 index 0000000000000000000000000000000000000000..b3fec4c1c4114377980b26ca391dc605de6ec4f2 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00ed25e3298ac440eb327c706a964e3a differ diff --git a/Roll a Ball/Library/metadata/00/00ed25e3298ac440eb327c706a964e3a.info b/Roll a Ball/Library/metadata/00/00ed25e3298ac440eb327c706a964e3a.info new file mode 100644 index 0000000000000000000000000000000000000000..ec821c83427fe5f0f9dc52be5a0e6f58a9232691 Binary files /dev/null and b/Roll a Ball/Library/metadata/00/00ed25e3298ac440eb327c706a964e3a.info differ diff --git a/Roll a Ball/Library/metadata/01/015812e983113a84b95773e55f3cec13 b/Roll a Ball/Library/metadata/01/015812e983113a84b95773e55f3cec13 new file mode 100644 index 0000000000000000000000000000000000000000..680c23588119a7e223346d2f3cf1561862645aa5 Binary files /dev/null and b/Roll a Ball/Library/metadata/01/015812e983113a84b95773e55f3cec13 differ diff --git a/Roll a Ball/Library/metadata/01/015812e983113a84b95773e55f3cec13.info b/Roll a Ball/Library/metadata/01/015812e983113a84b95773e55f3cec13.info new file mode 100644 index 0000000000000000000000000000000000000000..98ea0dba7d205bc2ee19b44e787a7543b162dc7f Binary files /dev/null and b/Roll a Ball/Library/metadata/01/015812e983113a84b95773e55f3cec13.info differ diff --git a/Roll a Ball/Library/metadata/01/01ada73c4792aba4c937ff5d92cce866 b/Roll a Ball/Library/metadata/01/01ada73c4792aba4c937ff5d92cce866 new file mode 100644 index 0000000000000000000000000000000000000000..94f20e1f8a106b0f4ffd09d33a431933233daf8f Binary files /dev/null and b/Roll a Ball/Library/metadata/01/01ada73c4792aba4c937ff5d92cce866 differ diff --git a/Roll a Ball/Library/metadata/01/01ada73c4792aba4c937ff5d92cce866.info b/Roll a Ball/Library/metadata/01/01ada73c4792aba4c937ff5d92cce866.info new file mode 100644 index 0000000000000000000000000000000000000000..749be4ea9f26f632e1d8e7ee3a1e61d39125c351 Binary files /dev/null and b/Roll a Ball/Library/metadata/01/01ada73c4792aba4c937ff5d92cce866.info differ diff --git a/Roll a Ball/Library/metadata/01/01cd264c206ae482393dc9d04b26eca0 b/Roll a Ball/Library/metadata/01/01cd264c206ae482393dc9d04b26eca0 new file mode 100644 index 0000000000000000000000000000000000000000..4f2d935b13696a452f8376a6de6bcd3d89f5a726 Binary files /dev/null and b/Roll a Ball/Library/metadata/01/01cd264c206ae482393dc9d04b26eca0 differ diff --git a/Roll a Ball/Library/metadata/01/01cd264c206ae482393dc9d04b26eca0.info b/Roll a Ball/Library/metadata/01/01cd264c206ae482393dc9d04b26eca0.info new file mode 100644 index 0000000000000000000000000000000000000000..fc9b0325f624f4292e84d3057ffd1306f9fe9042 Binary files /dev/null and b/Roll a Ball/Library/metadata/01/01cd264c206ae482393dc9d04b26eca0.info differ diff --git a/Roll a Ball/Library/metadata/01/01e02995805eb483690380a911a657e2 b/Roll a Ball/Library/metadata/01/01e02995805eb483690380a911a657e2 new file mode 100644 index 0000000000000000000000000000000000000000..b4626ae2604d3a022ec6d0c7b4ba4b6cd5be8f21 Binary files /dev/null and b/Roll a Ball/Library/metadata/01/01e02995805eb483690380a911a657e2 differ diff --git a/Roll a Ball/Library/metadata/01/01e02995805eb483690380a911a657e2.info b/Roll a Ball/Library/metadata/01/01e02995805eb483690380a911a657e2.info new file mode 100644 index 0000000000000000000000000000000000000000..bac431b4010bcaec88fff4cbb8d04b2d30a7156d Binary files /dev/null and b/Roll a Ball/Library/metadata/01/01e02995805eb483690380a911a657e2.info differ diff --git a/Roll a Ball/Library/metadata/02/0217a80286f79419daa202f69409f19b b/Roll a Ball/Library/metadata/02/0217a80286f79419daa202f69409f19b new file mode 100644 index 0000000000000000000000000000000000000000..fa3198eb278f8e89d164b0f7a849a33460a7caf1 Binary files /dev/null and b/Roll a Ball/Library/metadata/02/0217a80286f79419daa202f69409f19b differ diff --git a/Roll a Ball/Library/metadata/02/0217a80286f79419daa202f69409f19b.info b/Roll a Ball/Library/metadata/02/0217a80286f79419daa202f69409f19b.info new file mode 100644 index 0000000000000000000000000000000000000000..d1a04bbf732dfeb48300cb24f9963e3d8dbcb8d0 Binary files /dev/null and b/Roll a Ball/Library/metadata/02/0217a80286f79419daa202f69409f19b.info differ diff --git a/Roll a Ball/Library/metadata/02/02893ffb522b490a9fa28eedd2584309 b/Roll a Ball/Library/metadata/02/02893ffb522b490a9fa28eedd2584309 new file mode 100644 index 0000000000000000000000000000000000000000..8725531388ff09953809e6125dc73bbd16cc6273 Binary files /dev/null and b/Roll a Ball/Library/metadata/02/02893ffb522b490a9fa28eedd2584309 differ diff --git a/Roll a Ball/Library/metadata/02/02893ffb522b490a9fa28eedd2584309.info b/Roll a Ball/Library/metadata/02/02893ffb522b490a9fa28eedd2584309.info new file mode 100644 index 0000000000000000000000000000000000000000..91ca1a02f1c50281924752081f00975b7e0669af Binary files /dev/null and b/Roll a Ball/Library/metadata/02/02893ffb522b490a9fa28eedd2584309.info differ diff --git a/Roll a Ball/Library/metadata/03/036d03e26977243fa9a2d7af48e51e08 b/Roll a Ball/Library/metadata/03/036d03e26977243fa9a2d7af48e51e08 new file mode 100644 index 0000000000000000000000000000000000000000..bfb8b0f047293376bda7929ce08a8b215aa4de80 Binary files /dev/null and b/Roll a Ball/Library/metadata/03/036d03e26977243fa9a2d7af48e51e08 differ diff --git a/Roll a Ball/Library/metadata/03/036d03e26977243fa9a2d7af48e51e08.info b/Roll a Ball/Library/metadata/03/036d03e26977243fa9a2d7af48e51e08.info new file mode 100644 index 0000000000000000000000000000000000000000..330b17a1ab57e11e9c3e718b7547e2c20b38dba6 Binary files /dev/null and b/Roll a Ball/Library/metadata/03/036d03e26977243fa9a2d7af48e51e08.info differ diff --git a/Roll a Ball/Library/metadata/03/0386b6eb838c47138cd51d1c1b879a35 b/Roll a Ball/Library/metadata/03/0386b6eb838c47138cd51d1c1b879a35 new file mode 100644 index 0000000000000000000000000000000000000000..fcea595336cb612ee306e83a32298d7ceb982472 Binary files /dev/null and b/Roll a Ball/Library/metadata/03/0386b6eb838c47138cd51d1c1b879a35 differ diff --git a/Roll a Ball/Library/metadata/03/0386b6eb838c47138cd51d1c1b879a35.info b/Roll a Ball/Library/metadata/03/0386b6eb838c47138cd51d1c1b879a35.info new file mode 100644 index 0000000000000000000000000000000000000000..bf38bfd525fcf46d8a968d2683fe24c23b9134e3 Binary files /dev/null and b/Roll a Ball/Library/metadata/03/0386b6eb838c47138cd51d1c1b879a35.info differ diff --git a/Roll a Ball/Library/metadata/03/03ffb9844f8d40e8a2f59dd2aff561eb b/Roll a Ball/Library/metadata/03/03ffb9844f8d40e8a2f59dd2aff561eb new file mode 100644 index 0000000000000000000000000000000000000000..2263f7f4f4f656b14a17348fe62065b3d04bf268 Binary files /dev/null and b/Roll a Ball/Library/metadata/03/03ffb9844f8d40e8a2f59dd2aff561eb differ diff --git a/Roll a Ball/Library/metadata/03/03ffb9844f8d40e8a2f59dd2aff561eb.info b/Roll a Ball/Library/metadata/03/03ffb9844f8d40e8a2f59dd2aff561eb.info new file mode 100644 index 0000000000000000000000000000000000000000..97973d6dba53c8c8c10548dd03d233988809bdbe Binary files /dev/null and b/Roll a Ball/Library/metadata/03/03ffb9844f8d40e8a2f59dd2aff561eb.info differ diff --git a/Roll a Ball/Library/metadata/05/056819c66570ca54cadb72330a354050 b/Roll a Ball/Library/metadata/05/056819c66570ca54cadb72330a354050 new file mode 100644 index 0000000000000000000000000000000000000000..3e540d903d9cc0d28d753d049c3ec8120f2e69bb Binary files /dev/null and b/Roll a Ball/Library/metadata/05/056819c66570ca54cadb72330a354050 differ diff --git a/Roll a Ball/Library/metadata/05/056819c66570ca54cadb72330a354050.info b/Roll a Ball/Library/metadata/05/056819c66570ca54cadb72330a354050.info new file mode 100644 index 0000000000000000000000000000000000000000..f2da211f19d877d3a191ae75aa4a7f20ea1ba21c Binary files /dev/null and b/Roll a Ball/Library/metadata/05/056819c66570ca54cadb72330a354050.info differ diff --git a/Roll a Ball/Library/metadata/05/058cba836c1846c3aa1c5fd2e28aea77 b/Roll a Ball/Library/metadata/05/058cba836c1846c3aa1c5fd2e28aea77 new file mode 100644 index 0000000000000000000000000000000000000000..e776aa80a213f60925a5b8fe495e979eb4b30c80 Binary files /dev/null and b/Roll a Ball/Library/metadata/05/058cba836c1846c3aa1c5fd2e28aea77 differ diff --git a/Roll a Ball/Library/metadata/05/058cba836c1846c3aa1c5fd2e28aea77.info b/Roll a Ball/Library/metadata/05/058cba836c1846c3aa1c5fd2e28aea77.info new file mode 100644 index 0000000000000000000000000000000000000000..d355b47227368d3e985c73ce3c04c3555e7fd991 Binary files /dev/null and b/Roll a Ball/Library/metadata/05/058cba836c1846c3aa1c5fd2e28aea77.info differ diff --git a/Roll a Ball/Library/metadata/05/05f5bfd584002f948982a1498890f9a9 b/Roll a Ball/Library/metadata/05/05f5bfd584002f948982a1498890f9a9 new file mode 100644 index 0000000000000000000000000000000000000000..3b914ccfaf463ff653196a162845a895140a572d Binary files /dev/null and b/Roll a Ball/Library/metadata/05/05f5bfd584002f948982a1498890f9a9 differ diff --git a/Roll a Ball/Library/metadata/05/05f5bfd584002f948982a1498890f9a9.info b/Roll a Ball/Library/metadata/05/05f5bfd584002f948982a1498890f9a9.info new file mode 100644 index 0000000000000000000000000000000000000000..90bd3fb16d6aa72a69ff76302666c272c86c0348 Binary files /dev/null and b/Roll a Ball/Library/metadata/05/05f5bfd584002f948982a1498890f9a9.info differ diff --git a/Roll a Ball/Library/metadata/05/05f7f519769978b79b31d063a7fc6fa1 b/Roll a Ball/Library/metadata/05/05f7f519769978b79b31d063a7fc6fa1 new file mode 100644 index 0000000000000000000000000000000000000000..c6983daa105aa84e20023ff145e94c4eb114c6e0 Binary files /dev/null and b/Roll a Ball/Library/metadata/05/05f7f519769978b79b31d063a7fc6fa1 differ diff --git a/Roll a Ball/Library/metadata/05/05f7f519769978b79b31d063a7fc6fa1.info b/Roll a Ball/Library/metadata/05/05f7f519769978b79b31d063a7fc6fa1.info new file mode 100644 index 0000000000000000000000000000000000000000..87af4d13c2b7297c2a2fba9803be055b06ee7476 Binary files /dev/null and b/Roll a Ball/Library/metadata/05/05f7f519769978b79b31d063a7fc6fa1.info differ diff --git a/Roll a Ball/Library/metadata/06/063b1587caa4a47f396741f4e69d108c b/Roll a Ball/Library/metadata/06/063b1587caa4a47f396741f4e69d108c new file mode 100644 index 0000000000000000000000000000000000000000..d11dbedf914bd2f66fbe1dadfeddcf6d66783683 Binary files /dev/null and b/Roll a Ball/Library/metadata/06/063b1587caa4a47f396741f4e69d108c differ diff --git a/Roll a Ball/Library/metadata/06/063b1587caa4a47f396741f4e69d108c.info b/Roll a Ball/Library/metadata/06/063b1587caa4a47f396741f4e69d108c.info new file mode 100644 index 0000000000000000000000000000000000000000..c61b0d7648a1b7b5b402712cf08b4e72af2262b9 Binary files /dev/null and b/Roll a Ball/Library/metadata/06/063b1587caa4a47f396741f4e69d108c.info differ diff --git a/Roll a Ball/Library/metadata/06/066619c9c9c84f89acb1b48c11a7efe2 b/Roll a Ball/Library/metadata/06/066619c9c9c84f89acb1b48c11a7efe2 new file mode 100644 index 0000000000000000000000000000000000000000..6fba720e005f39e6a3e40a71200970fd60c135eb Binary files /dev/null and b/Roll a Ball/Library/metadata/06/066619c9c9c84f89acb1b48c11a7efe2 differ diff --git a/Roll a Ball/Library/metadata/06/066619c9c9c84f89acb1b48c11a7efe2.info b/Roll a Ball/Library/metadata/06/066619c9c9c84f89acb1b48c11a7efe2.info new file mode 100644 index 0000000000000000000000000000000000000000..73ef4947affa3e4f473679ec86f3e8f61387eb0b Binary files /dev/null and b/Roll a Ball/Library/metadata/06/066619c9c9c84f89acb1b48c11a7efe2.info differ diff --git a/Roll a Ball/Library/metadata/06/06b575597b644fe8ba88495149d01b66 b/Roll a Ball/Library/metadata/06/06b575597b644fe8ba88495149d01b66 new file mode 100644 index 0000000000000000000000000000000000000000..06a0b24e1ac3453623a4a1895b17355eb8128a89 Binary files /dev/null and b/Roll a Ball/Library/metadata/06/06b575597b644fe8ba88495149d01b66 differ diff --git a/Roll a Ball/Library/metadata/06/06b575597b644fe8ba88495149d01b66.info b/Roll a Ball/Library/metadata/06/06b575597b644fe8ba88495149d01b66.info new file mode 100644 index 0000000000000000000000000000000000000000..34fb2d4d8df9d8e63fe7465464a18f985680d69f Binary files /dev/null and b/Roll a Ball/Library/metadata/06/06b575597b644fe8ba88495149d01b66.info differ diff --git a/Roll a Ball/Library/metadata/06/06f8e3404d534cab82fe852ff33dad77 b/Roll a Ball/Library/metadata/06/06f8e3404d534cab82fe852ff33dad77 new file mode 100644 index 0000000000000000000000000000000000000000..f5c10e3754ef5dc70e3e06bf598060850a9ef019 Binary files /dev/null and b/Roll a Ball/Library/metadata/06/06f8e3404d534cab82fe852ff33dad77 differ diff --git a/Roll a Ball/Library/metadata/06/06f8e3404d534cab82fe852ff33dad77.info b/Roll a Ball/Library/metadata/06/06f8e3404d534cab82fe852ff33dad77.info new file mode 100644 index 0000000000000000000000000000000000000000..3b5a952804cb4d9181547dcea3f75776d2b225f6 Binary files /dev/null and b/Roll a Ball/Library/metadata/06/06f8e3404d534cab82fe852ff33dad77.info differ diff --git a/Roll a Ball/Library/metadata/07/07994bfe8b0e4adb97d706de5dea48d5 b/Roll a Ball/Library/metadata/07/07994bfe8b0e4adb97d706de5dea48d5 new file mode 100644 index 0000000000000000000000000000000000000000..0600f87c8867fb5d0189882cfc16c5524379b326 Binary files /dev/null and b/Roll a Ball/Library/metadata/07/07994bfe8b0e4adb97d706de5dea48d5 differ diff --git a/Roll a Ball/Library/metadata/07/07994bfe8b0e4adb97d706de5dea48d5.info b/Roll a Ball/Library/metadata/07/07994bfe8b0e4adb97d706de5dea48d5.info new file mode 100644 index 0000000000000000000000000000000000000000..12be9d74d4140dd02bcf0223aaf3b895092fab7b Binary files /dev/null and b/Roll a Ball/Library/metadata/07/07994bfe8b0e4adb97d706de5dea48d5.info differ diff --git a/Roll a Ball/Library/metadata/08/08e9894bdf0834710b22d3c0aa245ac0 b/Roll a Ball/Library/metadata/08/08e9894bdf0834710b22d3c0aa245ac0 new file mode 100644 index 0000000000000000000000000000000000000000..b54ac1b1c15500a0d58d9681c733a194c6ea1135 Binary files /dev/null and b/Roll a Ball/Library/metadata/08/08e9894bdf0834710b22d3c0aa245ac0 differ diff --git a/Roll a Ball/Library/metadata/08/08e9894bdf0834710b22d3c0aa245ac0.info b/Roll a Ball/Library/metadata/08/08e9894bdf0834710b22d3c0aa245ac0.info new file mode 100644 index 0000000000000000000000000000000000000000..a38ab3f14ccfb0d02b350bce49ada7ced564caf8 Binary files /dev/null and b/Roll a Ball/Library/metadata/08/08e9894bdf0834710b22d3c0aa245ac0.info differ diff --git a/Roll a Ball/Library/metadata/09/09e28640d754a611467eebfb261ed749 b/Roll a Ball/Library/metadata/09/09e28640d754a611467eebfb261ed749 new file mode 100644 index 0000000000000000000000000000000000000000..5898bd9f24000c9eb4106575ee047bc1b7868808 Binary files /dev/null and b/Roll a Ball/Library/metadata/09/09e28640d754a611467eebfb261ed749 differ diff --git a/Roll a Ball/Library/metadata/09/09e28640d754a611467eebfb261ed749.info b/Roll a Ball/Library/metadata/09/09e28640d754a611467eebfb261ed749.info new file mode 100644 index 0000000000000000000000000000000000000000..4e1262413f11769f625ace874d4ad72eda15f2fc Binary files /dev/null and b/Roll a Ball/Library/metadata/09/09e28640d754a611467eebfb261ed749.info differ diff --git a/Roll a Ball/Library/metadata/0a/0a017569bfe174e4890797b4d64cbabc b/Roll a Ball/Library/metadata/0a/0a017569bfe174e4890797b4d64cbabc new file mode 100644 index 0000000000000000000000000000000000000000..9a6ea66907732f0d0a230a3383b6021f997d7b80 Binary files /dev/null and b/Roll a Ball/Library/metadata/0a/0a017569bfe174e4890797b4d64cbabc differ diff --git a/Roll a Ball/Library/metadata/0a/0a017569bfe174e4890797b4d64cbabc.info b/Roll a Ball/Library/metadata/0a/0a017569bfe174e4890797b4d64cbabc.info new file mode 100644 index 0000000000000000000000000000000000000000..907202579052d69efded14a813e6077524dfd1a5 Binary files /dev/null and b/Roll a Ball/Library/metadata/0a/0a017569bfe174e4890797b4d64cbabc.info differ diff --git a/Roll a Ball/Library/metadata/0a/0a1161a2ab6569948a0aa7899197218c b/Roll a Ball/Library/metadata/0a/0a1161a2ab6569948a0aa7899197218c new file mode 100644 index 0000000000000000000000000000000000000000..333cb2093e8bc87d8e1a2269db3df02bc8a07c57 Binary files /dev/null and b/Roll a Ball/Library/metadata/0a/0a1161a2ab6569948a0aa7899197218c differ diff --git a/Roll a Ball/Library/metadata/0a/0a1161a2ab6569948a0aa7899197218c.info b/Roll a Ball/Library/metadata/0a/0a1161a2ab6569948a0aa7899197218c.info new file mode 100644 index 0000000000000000000000000000000000000000..e4923fb93f43e5f1b8811c95f38232511c4a4a71 Binary files /dev/null and b/Roll a Ball/Library/metadata/0a/0a1161a2ab6569948a0aa7899197218c.info differ diff --git a/Roll a Ball/Library/metadata/0a/0a2c7bcbdfe0a438999cb0653789cdf4 b/Roll a Ball/Library/metadata/0a/0a2c7bcbdfe0a438999cb0653789cdf4 new file mode 100644 index 0000000000000000000000000000000000000000..57dcd4ffb316776af2166dc5f56b91ca81998e72 Binary files /dev/null and b/Roll a Ball/Library/metadata/0a/0a2c7bcbdfe0a438999cb0653789cdf4 differ diff --git a/Roll a Ball/Library/metadata/0a/0a2c7bcbdfe0a438999cb0653789cdf4.info b/Roll a Ball/Library/metadata/0a/0a2c7bcbdfe0a438999cb0653789cdf4.info new file mode 100644 index 0000000000000000000000000000000000000000..052a222f30f54225a8fd32c681f39aad8d4f8f1d Binary files /dev/null and b/Roll a Ball/Library/metadata/0a/0a2c7bcbdfe0a438999cb0653789cdf4.info differ diff --git a/Roll a Ball/Library/metadata/0a/0a822dba3d5c4c85b150866e5442a5ec b/Roll a Ball/Library/metadata/0a/0a822dba3d5c4c85b150866e5442a5ec new file mode 100644 index 0000000000000000000000000000000000000000..e8e28a69a004a660f0b7af8f086a2f3fa476a642 Binary files /dev/null and b/Roll a Ball/Library/metadata/0a/0a822dba3d5c4c85b150866e5442a5ec differ diff --git a/Roll a Ball/Library/metadata/0a/0a822dba3d5c4c85b150866e5442a5ec.info b/Roll a Ball/Library/metadata/0a/0a822dba3d5c4c85b150866e5442a5ec.info new file mode 100644 index 0000000000000000000000000000000000000000..6db6b9172eaa98e15c05b2d3d061219442b4c559 Binary files /dev/null and b/Roll a Ball/Library/metadata/0a/0a822dba3d5c4c85b150866e5442a5ec.info differ diff --git a/Roll a Ball/Library/metadata/0d/0d2d0f36e67d4518a07df76235e91f9a b/Roll a Ball/Library/metadata/0d/0d2d0f36e67d4518a07df76235e91f9a new file mode 100644 index 0000000000000000000000000000000000000000..ef2edffd5b9e8890aed111a9f8216dfe3890c3d5 Binary files /dev/null and b/Roll a Ball/Library/metadata/0d/0d2d0f36e67d4518a07df76235e91f9a differ diff --git a/Roll a Ball/Library/metadata/0d/0d2d0f36e67d4518a07df76235e91f9a.info b/Roll a Ball/Library/metadata/0d/0d2d0f36e67d4518a07df76235e91f9a.info new file mode 100644 index 0000000000000000000000000000000000000000..855ffcc8e8e0bb9fbf48f7db106d878cd655e04b Binary files /dev/null and b/Roll a Ball/Library/metadata/0d/0d2d0f36e67d4518a07df76235e91f9a.info differ diff --git a/Roll a Ball/Library/metadata/0d/0d9a36012a224080966c7b55896aa0f9 b/Roll a Ball/Library/metadata/0d/0d9a36012a224080966c7b55896aa0f9 new file mode 100644 index 0000000000000000000000000000000000000000..44b69942d7e22e03a2c4641ac6e08799c19405b6 Binary files /dev/null and b/Roll a Ball/Library/metadata/0d/0d9a36012a224080966c7b55896aa0f9 differ diff --git a/Roll a Ball/Library/metadata/0d/0d9a36012a224080966c7b55896aa0f9.info b/Roll a Ball/Library/metadata/0d/0d9a36012a224080966c7b55896aa0f9.info new file mode 100644 index 0000000000000000000000000000000000000000..f2f23c92a6961b9280a0336c88c450547a4d37cd Binary files /dev/null and b/Roll a Ball/Library/metadata/0d/0d9a36012a224080966c7b55896aa0f9.info differ diff --git a/Roll a Ball/Library/metadata/0e/0e0afa652c0031c48896a97b424d027b b/Roll a Ball/Library/metadata/0e/0e0afa652c0031c48896a97b424d027b new file mode 100644 index 0000000000000000000000000000000000000000..046f43ededcf099e34084a132b434fa90a059987 Binary files /dev/null and b/Roll a Ball/Library/metadata/0e/0e0afa652c0031c48896a97b424d027b differ diff --git a/Roll a Ball/Library/metadata/0e/0e0afa652c0031c48896a97b424d027b.info b/Roll a Ball/Library/metadata/0e/0e0afa652c0031c48896a97b424d027b.info new file mode 100644 index 0000000000000000000000000000000000000000..6c24f37e22e1bda1531ebc4264851438d251614b Binary files /dev/null and b/Roll a Ball/Library/metadata/0e/0e0afa652c0031c48896a97b424d027b.info differ diff --git a/Roll a Ball/Library/metadata/0e/0e372f1bbea04aa9bd68055d4105bd84 b/Roll a Ball/Library/metadata/0e/0e372f1bbea04aa9bd68055d4105bd84 new file mode 100644 index 0000000000000000000000000000000000000000..47cfbb915aac5a3cb82e8da901ce3dfb0aa1f964 Binary files /dev/null and b/Roll a Ball/Library/metadata/0e/0e372f1bbea04aa9bd68055d4105bd84 differ diff --git a/Roll a Ball/Library/metadata/0e/0e372f1bbea04aa9bd68055d4105bd84.info b/Roll a Ball/Library/metadata/0e/0e372f1bbea04aa9bd68055d4105bd84.info new file mode 100644 index 0000000000000000000000000000000000000000..3a895eaee258eabd7b47c64430c9ad7f5a903f84 Binary files /dev/null and b/Roll a Ball/Library/metadata/0e/0e372f1bbea04aa9bd68055d4105bd84.info differ diff --git a/Roll a Ball/Library/metadata/0e/0e751e877ed14d71a6b8e63ac54949cf b/Roll a Ball/Library/metadata/0e/0e751e877ed14d71a6b8e63ac54949cf new file mode 100644 index 0000000000000000000000000000000000000000..d16911f625e15322c3216fb164bb59821552172e Binary files /dev/null and b/Roll a Ball/Library/metadata/0e/0e751e877ed14d71a6b8e63ac54949cf differ diff --git a/Roll a Ball/Library/metadata/0e/0e751e877ed14d71a6b8e63ac54949cf.info b/Roll a Ball/Library/metadata/0e/0e751e877ed14d71a6b8e63ac54949cf.info new file mode 100644 index 0000000000000000000000000000000000000000..2761bff30f84c404cee4a3d2d96541ae555b84a4 Binary files /dev/null and b/Roll a Ball/Library/metadata/0e/0e751e877ed14d71a6b8e63ac54949cf.info differ diff --git a/Roll a Ball/Library/metadata/0e/0edd86f97b0648f685604a5582cff608 b/Roll a Ball/Library/metadata/0e/0edd86f97b0648f685604a5582cff608 new file mode 100644 index 0000000000000000000000000000000000000000..d996ef3a04e211e940ddc421b9c716875a5631c1 Binary files /dev/null and b/Roll a Ball/Library/metadata/0e/0edd86f97b0648f685604a5582cff608 differ diff --git a/Roll a Ball/Library/metadata/0e/0edd86f97b0648f685604a5582cff608.info b/Roll a Ball/Library/metadata/0e/0edd86f97b0648f685604a5582cff608.info new file mode 100644 index 0000000000000000000000000000000000000000..9bc0509fa3ea2818af7b320f957f7b635074befb Binary files /dev/null and b/Roll a Ball/Library/metadata/0e/0edd86f97b0648f685604a5582cff608.info differ diff --git a/Roll a Ball/Library/metadata/0f/0fda7ebe61ab2164383d10e32efb9c6e b/Roll a Ball/Library/metadata/0f/0fda7ebe61ab2164383d10e32efb9c6e new file mode 100644 index 0000000000000000000000000000000000000000..64b3d9cd554ffeef411bd4284c71689c0c1a449c Binary files /dev/null and b/Roll a Ball/Library/metadata/0f/0fda7ebe61ab2164383d10e32efb9c6e differ diff --git a/Roll a Ball/Library/metadata/0f/0fda7ebe61ab2164383d10e32efb9c6e.info b/Roll a Ball/Library/metadata/0f/0fda7ebe61ab2164383d10e32efb9c6e.info new file mode 100644 index 0000000000000000000000000000000000000000..c28775ccbc5bf740e848778238aa2367d549c7c4 Binary files /dev/null and b/Roll a Ball/Library/metadata/0f/0fda7ebe61ab2164383d10e32efb9c6e.info differ diff --git a/Roll a Ball/Library/metadata/0f/0fe4c527c3aa3eb42912a1caafbbc6a0 b/Roll a Ball/Library/metadata/0f/0fe4c527c3aa3eb42912a1caafbbc6a0 new file mode 100644 index 0000000000000000000000000000000000000000..4241579be3d45bae521426813f1e25b10245b1da Binary files /dev/null and b/Roll a Ball/Library/metadata/0f/0fe4c527c3aa3eb42912a1caafbbc6a0 differ diff --git a/Roll a Ball/Library/metadata/0f/0fe4c527c3aa3eb42912a1caafbbc6a0.info b/Roll a Ball/Library/metadata/0f/0fe4c527c3aa3eb42912a1caafbbc6a0.info new file mode 100644 index 0000000000000000000000000000000000000000..ad97a33b27d0f511fa3db77f743ff2b666919e24 Binary files /dev/null and b/Roll a Ball/Library/metadata/0f/0fe4c527c3aa3eb42912a1caafbbc6a0.info differ diff --git a/Roll a Ball/Library/metadata/10/10145f279f90346bbb61712ff585828b b/Roll a Ball/Library/metadata/10/10145f279f90346bbb61712ff585828b new file mode 100644 index 0000000000000000000000000000000000000000..8468b527acc37006c42e8df358263526fff2fdf9 Binary files /dev/null and b/Roll a Ball/Library/metadata/10/10145f279f90346bbb61712ff585828b differ diff --git a/Roll a Ball/Library/metadata/10/10145f279f90346bbb61712ff585828b.info b/Roll a Ball/Library/metadata/10/10145f279f90346bbb61712ff585828b.info new file mode 100644 index 0000000000000000000000000000000000000000..1bc676b143a482f8fb610f48b14b7f904b656000 Binary files /dev/null and b/Roll a Ball/Library/metadata/10/10145f279f90346bbb61712ff585828b.info differ diff --git a/Roll a Ball/Library/metadata/10/1048a87135154606808bf2030da32d18 b/Roll a Ball/Library/metadata/10/1048a87135154606808bf2030da32d18 new file mode 100644 index 0000000000000000000000000000000000000000..44dbe33b1a8811fbfcabacd75e362377b88c2bc8 Binary files /dev/null and b/Roll a Ball/Library/metadata/10/1048a87135154606808bf2030da32d18 differ diff --git a/Roll a Ball/Library/metadata/10/1048a87135154606808bf2030da32d18.info b/Roll a Ball/Library/metadata/10/1048a87135154606808bf2030da32d18.info new file mode 100644 index 0000000000000000000000000000000000000000..2d2ec97dfa647054cbd05f7148160bd12fc98c5a Binary files /dev/null and b/Roll a Ball/Library/metadata/10/1048a87135154606808bf2030da32d18.info differ diff --git a/Roll a Ball/Library/metadata/10/1067213df0c64b319bc81e73be809b1a b/Roll a Ball/Library/metadata/10/1067213df0c64b319bc81e73be809b1a new file mode 100644 index 0000000000000000000000000000000000000000..71b50fb67a862d645e3adbbc6e6caf84a762d61d Binary files /dev/null and b/Roll a Ball/Library/metadata/10/1067213df0c64b319bc81e73be809b1a differ diff --git a/Roll a Ball/Library/metadata/10/1067213df0c64b319bc81e73be809b1a.info b/Roll a Ball/Library/metadata/10/1067213df0c64b319bc81e73be809b1a.info new file mode 100644 index 0000000000000000000000000000000000000000..93e881d853260b1ef6d3f1de653094bbe3ef7709 Binary files /dev/null and b/Roll a Ball/Library/metadata/10/1067213df0c64b319bc81e73be809b1a.info differ diff --git a/Roll a Ball/Library/metadata/10/10bf81265ad87424d946598c575f45a0 b/Roll a Ball/Library/metadata/10/10bf81265ad87424d946598c575f45a0 new file mode 100644 index 0000000000000000000000000000000000000000..33d65e7041f19fcc0237081737e8bcccc57afac1 Binary files /dev/null and b/Roll a Ball/Library/metadata/10/10bf81265ad87424d946598c575f45a0 differ diff --git a/Roll a Ball/Library/metadata/10/10bf81265ad87424d946598c575f45a0.info b/Roll a Ball/Library/metadata/10/10bf81265ad87424d946598c575f45a0.info new file mode 100644 index 0000000000000000000000000000000000000000..eac930007b81ea45219246c43a97b550e639a031 Binary files /dev/null and b/Roll a Ball/Library/metadata/10/10bf81265ad87424d946598c575f45a0.info differ diff --git a/Roll a Ball/Library/metadata/11/1158e311a3101950348dcecb1bebc42d b/Roll a Ball/Library/metadata/11/1158e311a3101950348dcecb1bebc42d new file mode 100644 index 0000000000000000000000000000000000000000..ca24073337f79efa719eb7e18caa64f3c5e3ef17 Binary files /dev/null and b/Roll a Ball/Library/metadata/11/1158e311a3101950348dcecb1bebc42d differ diff --git a/Roll a Ball/Library/metadata/11/1158e311a3101950348dcecb1bebc42d.info b/Roll a Ball/Library/metadata/11/1158e311a3101950348dcecb1bebc42d.info new file mode 100644 index 0000000000000000000000000000000000000000..32ea3f8843c85814862a4f62264d55ea59f9cafd Binary files /dev/null and b/Roll a Ball/Library/metadata/11/1158e311a3101950348dcecb1bebc42d.info differ diff --git a/Roll a Ball/Library/metadata/11/11a6a034ab84493cbed6af5ae7aae78b b/Roll a Ball/Library/metadata/11/11a6a034ab84493cbed6af5ae7aae78b new file mode 100644 index 0000000000000000000000000000000000000000..72859f12916dba95a1798ef7a66f03501a60f758 Binary files /dev/null and b/Roll a Ball/Library/metadata/11/11a6a034ab84493cbed6af5ae7aae78b differ diff --git a/Roll a Ball/Library/metadata/11/11a6a034ab84493cbed6af5ae7aae78b.info b/Roll a Ball/Library/metadata/11/11a6a034ab84493cbed6af5ae7aae78b.info new file mode 100644 index 0000000000000000000000000000000000000000..1a0ae04b34c377a53d347598d0d952b3a1b2371d Binary files /dev/null and b/Roll a Ball/Library/metadata/11/11a6a034ab84493cbed6af5ae7aae78b.info differ diff --git a/Roll a Ball/Library/metadata/12/12736c98af174f91827a26b66d2b01b9 b/Roll a Ball/Library/metadata/12/12736c98af174f91827a26b66d2b01b9 new file mode 100644 index 0000000000000000000000000000000000000000..587f42388fa9c0b92051e6386dfede882fb57bbf Binary files /dev/null and b/Roll a Ball/Library/metadata/12/12736c98af174f91827a26b66d2b01b9 differ diff --git a/Roll a Ball/Library/metadata/12/12736c98af174f91827a26b66d2b01b9.info b/Roll a Ball/Library/metadata/12/12736c98af174f91827a26b66d2b01b9.info new file mode 100644 index 0000000000000000000000000000000000000000..3d6caecfbd77b657e97fb7b2fdd4490ffcd4f904 Binary files /dev/null and b/Roll a Ball/Library/metadata/12/12736c98af174f91827a26b66d2b01b9.info differ diff --git a/Roll a Ball/Library/metadata/13/1322fd896bbb15bb6e335591b766ae62 b/Roll a Ball/Library/metadata/13/1322fd896bbb15bb6e335591b766ae62 new file mode 100644 index 0000000000000000000000000000000000000000..32019a5236f76df1140df9f92f863069c08990df Binary files /dev/null and b/Roll a Ball/Library/metadata/13/1322fd896bbb15bb6e335591b766ae62 differ diff --git a/Roll a Ball/Library/metadata/13/1322fd896bbb15bb6e335591b766ae62.info b/Roll a Ball/Library/metadata/13/1322fd896bbb15bb6e335591b766ae62.info new file mode 100644 index 0000000000000000000000000000000000000000..5fb663ce0ed81b168e96e3deb58e77a9a2030cb7 Binary files /dev/null and b/Roll a Ball/Library/metadata/13/1322fd896bbb15bb6e335591b766ae62.info differ diff --git a/Roll a Ball/Library/metadata/13/1369382d2c5e64dc5b2ec0b6b0a94531 b/Roll a Ball/Library/metadata/13/1369382d2c5e64dc5b2ec0b6b0a94531 new file mode 100644 index 0000000000000000000000000000000000000000..0185c571d52ff2cf0330077f16aa66f4c2c45a9d Binary files /dev/null and b/Roll a Ball/Library/metadata/13/1369382d2c5e64dc5b2ec0b6b0a94531 differ diff --git a/Roll a Ball/Library/metadata/13/1369382d2c5e64dc5b2ec0b6b0a94531.info b/Roll a Ball/Library/metadata/13/1369382d2c5e64dc5b2ec0b6b0a94531.info new file mode 100644 index 0000000000000000000000000000000000000000..00fe87f8dcf3b3efce9d8755fbcbcb18b7365111 Binary files /dev/null and b/Roll a Ball/Library/metadata/13/1369382d2c5e64dc5b2ec0b6b0a94531.info differ diff --git a/Roll a Ball/Library/metadata/13/138961c4434d141a987d96df1f8d7342 b/Roll a Ball/Library/metadata/13/138961c4434d141a987d96df1f8d7342 new file mode 100644 index 0000000000000000000000000000000000000000..c417db3ea0150fcc06111daf77bb04a0861ab7cf Binary files /dev/null and b/Roll a Ball/Library/metadata/13/138961c4434d141a987d96df1f8d7342 differ diff --git a/Roll a Ball/Library/metadata/13/138961c4434d141a987d96df1f8d7342.info b/Roll a Ball/Library/metadata/13/138961c4434d141a987d96df1f8d7342.info new file mode 100644 index 0000000000000000000000000000000000000000..dfdb1ac02b45da9d76dfe76ba216d95a474e7679 Binary files /dev/null and b/Roll a Ball/Library/metadata/13/138961c4434d141a987d96df1f8d7342.info differ diff --git a/Roll a Ball/Library/metadata/13/13eb80ce50ac9c43cdbaf2109c0ec7db b/Roll a Ball/Library/metadata/13/13eb80ce50ac9c43cdbaf2109c0ec7db new file mode 100644 index 0000000000000000000000000000000000000000..6a1a4edb6d2cd9d20053789ce78b976a941af450 Binary files /dev/null and b/Roll a Ball/Library/metadata/13/13eb80ce50ac9c43cdbaf2109c0ec7db differ diff --git a/Roll a Ball/Library/metadata/13/13eb80ce50ac9c43cdbaf2109c0ec7db.info b/Roll a Ball/Library/metadata/13/13eb80ce50ac9c43cdbaf2109c0ec7db.info new file mode 100644 index 0000000000000000000000000000000000000000..ab4a8975801786231903cc561ff6857a457f1b9c Binary files /dev/null and b/Roll a Ball/Library/metadata/13/13eb80ce50ac9c43cdbaf2109c0ec7db.info differ diff --git a/Roll a Ball/Library/metadata/15/15a615c733aa240909fe0b28b0d5143c b/Roll a Ball/Library/metadata/15/15a615c733aa240909fe0b28b0d5143c new file mode 100644 index 0000000000000000000000000000000000000000..f3ffa5fc6d87479c17f5cc1a0061f2d92382504e Binary files /dev/null and b/Roll a Ball/Library/metadata/15/15a615c733aa240909fe0b28b0d5143c differ diff --git a/Roll a Ball/Library/metadata/15/15a615c733aa240909fe0b28b0d5143c.info b/Roll a Ball/Library/metadata/15/15a615c733aa240909fe0b28b0d5143c.info new file mode 100644 index 0000000000000000000000000000000000000000..edc35d241ec02a32c454ce2a32d6cd6464574472 Binary files /dev/null and b/Roll a Ball/Library/metadata/15/15a615c733aa240909fe0b28b0d5143c.info differ diff --git a/Roll a Ball/Library/metadata/15/15bf9c691b85b41a39c18bee2f87e21b b/Roll a Ball/Library/metadata/15/15bf9c691b85b41a39c18bee2f87e21b new file mode 100644 index 0000000000000000000000000000000000000000..cd7d93173b54750649e6101b10aa12e82d9a2d30 Binary files /dev/null and b/Roll a Ball/Library/metadata/15/15bf9c691b85b41a39c18bee2f87e21b differ diff --git a/Roll a Ball/Library/metadata/15/15bf9c691b85b41a39c18bee2f87e21b.info b/Roll a Ball/Library/metadata/15/15bf9c691b85b41a39c18bee2f87e21b.info new file mode 100644 index 0000000000000000000000000000000000000000..7480e98e518878658d2237156cd7ef8cf692c5d6 Binary files /dev/null and b/Roll a Ball/Library/metadata/15/15bf9c691b85b41a39c18bee2f87e21b.info differ diff --git a/Roll a Ball/Library/metadata/17/178008567c08e6d84014fa87825d10bb b/Roll a Ball/Library/metadata/17/178008567c08e6d84014fa87825d10bb new file mode 100644 index 0000000000000000000000000000000000000000..97eb2bd2c6f04749385573bbc6840289533f1b0f Binary files /dev/null and b/Roll a Ball/Library/metadata/17/178008567c08e6d84014fa87825d10bb differ diff --git a/Roll a Ball/Library/metadata/17/178008567c08e6d84014fa87825d10bb.info b/Roll a Ball/Library/metadata/17/178008567c08e6d84014fa87825d10bb.info new file mode 100644 index 0000000000000000000000000000000000000000..d3ad6556a1ec8b1cf782a58c96948670b2d154d3 Binary files /dev/null and b/Roll a Ball/Library/metadata/17/178008567c08e6d84014fa87825d10bb.info differ diff --git a/Roll a Ball/Library/metadata/17/17b632677410799367a53dc7ab96a8c2 b/Roll a Ball/Library/metadata/17/17b632677410799367a53dc7ab96a8c2 new file mode 100644 index 0000000000000000000000000000000000000000..76fba686c7358d6e34a5d919c055d4393cf380f7 Binary files /dev/null and b/Roll a Ball/Library/metadata/17/17b632677410799367a53dc7ab96a8c2 differ diff --git a/Roll a Ball/Library/metadata/17/17b632677410799367a53dc7ab96a8c2.info b/Roll a Ball/Library/metadata/17/17b632677410799367a53dc7ab96a8c2.info new file mode 100644 index 0000000000000000000000000000000000000000..469960870622f6fc62924d2c80993440414aa167 Binary files /dev/null and b/Roll a Ball/Library/metadata/17/17b632677410799367a53dc7ab96a8c2.info differ diff --git a/Roll a Ball/Library/metadata/18/18775b51e3bd42299fd30bd036ea982f b/Roll a Ball/Library/metadata/18/18775b51e3bd42299fd30bd036ea982f new file mode 100644 index 0000000000000000000000000000000000000000..19574573df1db724ce4122a9b313db7d024599fb Binary files /dev/null and b/Roll a Ball/Library/metadata/18/18775b51e3bd42299fd30bd036ea982f differ diff --git a/Roll a Ball/Library/metadata/18/18775b51e3bd42299fd30bd036ea982f.info b/Roll a Ball/Library/metadata/18/18775b51e3bd42299fd30bd036ea982f.info new file mode 100644 index 0000000000000000000000000000000000000000..fb6a640e53cfad9fd3cd186cf26884f51f0ec1a9 Binary files /dev/null and b/Roll a Ball/Library/metadata/18/18775b51e3bd42299fd30bd036ea982f.info differ diff --git a/Roll a Ball/Library/metadata/18/18a4fadfef534684d5af39ca8dc48fe9 b/Roll a Ball/Library/metadata/18/18a4fadfef534684d5af39ca8dc48fe9 new file mode 100644 index 0000000000000000000000000000000000000000..2b510ffa7e0ed0e034dfae0ae9059b2933af2873 Binary files /dev/null and b/Roll a Ball/Library/metadata/18/18a4fadfef534684d5af39ca8dc48fe9 differ diff --git a/Roll a Ball/Library/metadata/18/18a4fadfef534684d5af39ca8dc48fe9.info b/Roll a Ball/Library/metadata/18/18a4fadfef534684d5af39ca8dc48fe9.info new file mode 100644 index 0000000000000000000000000000000000000000..81368beb5e6be3634e425f96efe17542d4e19523 Binary files /dev/null and b/Roll a Ball/Library/metadata/18/18a4fadfef534684d5af39ca8dc48fe9.info differ diff --git a/Roll a Ball/Library/metadata/19/191a2a53e28fd314c98eb818f59e3b96 b/Roll a Ball/Library/metadata/19/191a2a53e28fd314c98eb818f59e3b96 new file mode 100644 index 0000000000000000000000000000000000000000..5f723cf904da41cb983a1f65544f0f9bbc815e2a Binary files /dev/null and b/Roll a Ball/Library/metadata/19/191a2a53e28fd314c98eb818f59e3b96 differ diff --git a/Roll a Ball/Library/metadata/19/191a2a53e28fd314c98eb818f59e3b96.info b/Roll a Ball/Library/metadata/19/191a2a53e28fd314c98eb818f59e3b96.info new file mode 100644 index 0000000000000000000000000000000000000000..ae60b385e5993caa621f368c05bf0830261db16c Binary files /dev/null and b/Roll a Ball/Library/metadata/19/191a2a53e28fd314c98eb818f59e3b96.info differ diff --git a/Roll a Ball/Library/metadata/1a/1a4266815e998967becf686f9c71f0a6 b/Roll a Ball/Library/metadata/1a/1a4266815e998967becf686f9c71f0a6 new file mode 100644 index 0000000000000000000000000000000000000000..c786eb6ba39b35c1311ddc5f8c908b5653d2ee56 Binary files /dev/null and b/Roll a Ball/Library/metadata/1a/1a4266815e998967becf686f9c71f0a6 differ diff --git a/Roll a Ball/Library/metadata/1a/1a4266815e998967becf686f9c71f0a6.info b/Roll a Ball/Library/metadata/1a/1a4266815e998967becf686f9c71f0a6.info new file mode 100644 index 0000000000000000000000000000000000000000..815d68f731e219258e09b3fe56840fca88a30a28 Binary files /dev/null and b/Roll a Ball/Library/metadata/1a/1a4266815e998967becf686f9c71f0a6.info differ diff --git a/Roll a Ball/Library/metadata/1a/1adad61bfb44214ee3e887b5febc4396 b/Roll a Ball/Library/metadata/1a/1adad61bfb44214ee3e887b5febc4396 new file mode 100644 index 0000000000000000000000000000000000000000..ffee499a069c8c65fea70b2777d0966ff5cc3f02 Binary files /dev/null and b/Roll a Ball/Library/metadata/1a/1adad61bfb44214ee3e887b5febc4396 differ diff --git a/Roll a Ball/Library/metadata/1a/1adad61bfb44214ee3e887b5febc4396.info b/Roll a Ball/Library/metadata/1a/1adad61bfb44214ee3e887b5febc4396.info new file mode 100644 index 0000000000000000000000000000000000000000..417d3e1e095e129fb09caeab95e2bc322d105c44 Binary files /dev/null and b/Roll a Ball/Library/metadata/1a/1adad61bfb44214ee3e887b5febc4396.info differ diff --git a/Roll a Ball/Library/metadata/1b/1b32bcce201b4494ea8848326290c5d5 b/Roll a Ball/Library/metadata/1b/1b32bcce201b4494ea8848326290c5d5 new file mode 100644 index 0000000000000000000000000000000000000000..f3435b43fb27db409dbc47b9e80ac4501724bc75 Binary files /dev/null and b/Roll a Ball/Library/metadata/1b/1b32bcce201b4494ea8848326290c5d5 differ diff --git a/Roll a Ball/Library/metadata/1b/1b32bcce201b4494ea8848326290c5d5.info b/Roll a Ball/Library/metadata/1b/1b32bcce201b4494ea8848326290c5d5.info new file mode 100644 index 0000000000000000000000000000000000000000..b0c125a3473b912b7e8592120920892542f73d61 Binary files /dev/null and b/Roll a Ball/Library/metadata/1b/1b32bcce201b4494ea8848326290c5d5.info differ diff --git a/Roll a Ball/Library/metadata/1b/1b355da31ea043feba0c03e35dd4bc62 b/Roll a Ball/Library/metadata/1b/1b355da31ea043feba0c03e35dd4bc62 new file mode 100644 index 0000000000000000000000000000000000000000..9cd39bb958638473ce2c26ed05a8922813840a3a Binary files /dev/null and b/Roll a Ball/Library/metadata/1b/1b355da31ea043feba0c03e35dd4bc62 differ diff --git a/Roll a Ball/Library/metadata/1b/1b355da31ea043feba0c03e35dd4bc62.info b/Roll a Ball/Library/metadata/1b/1b355da31ea043feba0c03e35dd4bc62.info new file mode 100644 index 0000000000000000000000000000000000000000..57d20fcf23ad8c396c08365343cbd49490f58884 Binary files /dev/null and b/Roll a Ball/Library/metadata/1b/1b355da31ea043feba0c03e35dd4bc62.info differ diff --git a/Roll a Ball/Library/metadata/1c/1c147d10db452eb4b854a35f84472017 b/Roll a Ball/Library/metadata/1c/1c147d10db452eb4b854a35f84472017 new file mode 100644 index 0000000000000000000000000000000000000000..bd99d0467e5eeb8929af7696c1a760c9b545b5ba Binary files /dev/null and b/Roll a Ball/Library/metadata/1c/1c147d10db452eb4b854a35f84472017 differ diff --git a/Roll a Ball/Library/metadata/1c/1c147d10db452eb4b854a35f84472017.info b/Roll a Ball/Library/metadata/1c/1c147d10db452eb4b854a35f84472017.info new file mode 100644 index 0000000000000000000000000000000000000000..88999344e223b007a809ca5c36ec71d14b67e9c4 Binary files /dev/null and b/Roll a Ball/Library/metadata/1c/1c147d10db452eb4b854a35f84472017.info differ diff --git a/Roll a Ball/Library/metadata/1c/1cf2469083ffa484da4d78dd70d708e8 b/Roll a Ball/Library/metadata/1c/1cf2469083ffa484da4d78dd70d708e8 new file mode 100644 index 0000000000000000000000000000000000000000..2f655b3d5490c56f4feec813bc9dac3388e794e8 Binary files /dev/null and b/Roll a Ball/Library/metadata/1c/1cf2469083ffa484da4d78dd70d708e8 differ diff --git a/Roll a Ball/Library/metadata/1c/1cf2469083ffa484da4d78dd70d708e8.info b/Roll a Ball/Library/metadata/1c/1cf2469083ffa484da4d78dd70d708e8.info new file mode 100644 index 0000000000000000000000000000000000000000..e5b04a7269910dda4bd9bdf07925451de7a087d6 Binary files /dev/null and b/Roll a Ball/Library/metadata/1c/1cf2469083ffa484da4d78dd70d708e8.info differ diff --git a/Roll a Ball/Library/metadata/1c/1cf679539c5e5499e8856aaacf1fc32f b/Roll a Ball/Library/metadata/1c/1cf679539c5e5499e8856aaacf1fc32f new file mode 100644 index 0000000000000000000000000000000000000000..54b295e51b2d2824a7ae47dda6a4ce79589664d4 Binary files /dev/null and b/Roll a Ball/Library/metadata/1c/1cf679539c5e5499e8856aaacf1fc32f differ diff --git a/Roll a Ball/Library/metadata/1c/1cf679539c5e5499e8856aaacf1fc32f.info b/Roll a Ball/Library/metadata/1c/1cf679539c5e5499e8856aaacf1fc32f.info new file mode 100644 index 0000000000000000000000000000000000000000..ad0034621436902d51ab8039a31ad712959ed6aa Binary files /dev/null and b/Roll a Ball/Library/metadata/1c/1cf679539c5e5499e8856aaacf1fc32f.info differ diff --git a/Roll a Ball/Library/metadata/20/202d758d102b6854a9710c8b93db742c b/Roll a Ball/Library/metadata/20/202d758d102b6854a9710c8b93db742c new file mode 100644 index 0000000000000000000000000000000000000000..656d30d36ef354e28936ef72f99a5d30d14fcba2 Binary files /dev/null and b/Roll a Ball/Library/metadata/20/202d758d102b6854a9710c8b93db742c differ diff --git a/Roll a Ball/Library/metadata/20/202d758d102b6854a9710c8b93db742c.info b/Roll a Ball/Library/metadata/20/202d758d102b6854a9710c8b93db742c.info new file mode 100644 index 0000000000000000000000000000000000000000..ac766dcf3060e2b61cb953fc349bc7e71717aae1 Binary files /dev/null and b/Roll a Ball/Library/metadata/20/202d758d102b6854a9710c8b93db742c.info differ diff --git a/Roll a Ball/Library/metadata/20/20a8ca0a6d82545f6bfd6f2d898d61f7 b/Roll a Ball/Library/metadata/20/20a8ca0a6d82545f6bfd6f2d898d61f7 new file mode 100644 index 0000000000000000000000000000000000000000..717be6cfed67005073105c946ca25758b6526704 Binary files /dev/null and b/Roll a Ball/Library/metadata/20/20a8ca0a6d82545f6bfd6f2d898d61f7 differ diff --git a/Roll a Ball/Library/metadata/20/20a8ca0a6d82545f6bfd6f2d898d61f7.info b/Roll a Ball/Library/metadata/20/20a8ca0a6d82545f6bfd6f2d898d61f7.info new file mode 100644 index 0000000000000000000000000000000000000000..fa4009451cefabbf0b1d168e55cffaa73159d60f Binary files /dev/null and b/Roll a Ball/Library/metadata/20/20a8ca0a6d82545f6bfd6f2d898d61f7.info differ diff --git a/Roll a Ball/Library/metadata/20/20a9b557a46149dfbfa04a3a7080f5aa b/Roll a Ball/Library/metadata/20/20a9b557a46149dfbfa04a3a7080f5aa new file mode 100644 index 0000000000000000000000000000000000000000..607a5cb6d871cbc7c803de9c84aa81ffc7fc07b1 Binary files /dev/null and b/Roll a Ball/Library/metadata/20/20a9b557a46149dfbfa04a3a7080f5aa differ diff --git a/Roll a Ball/Library/metadata/20/20a9b557a46149dfbfa04a3a7080f5aa.info b/Roll a Ball/Library/metadata/20/20a9b557a46149dfbfa04a3a7080f5aa.info new file mode 100644 index 0000000000000000000000000000000000000000..23dcded5499c8c1ac6bc74ce30e8fb304a87ca04 Binary files /dev/null and b/Roll a Ball/Library/metadata/20/20a9b557a46149dfbfa04a3a7080f5aa.info differ diff --git a/Roll a Ball/Library/metadata/21/21c0044a7f964773be90d197a78e4703 b/Roll a Ball/Library/metadata/21/21c0044a7f964773be90d197a78e4703 new file mode 100644 index 0000000000000000000000000000000000000000..7107b979b3c5d8a844a97c4f1a30fa528e1e4184 Binary files /dev/null and b/Roll a Ball/Library/metadata/21/21c0044a7f964773be90d197a78e4703 differ diff --git a/Roll a Ball/Library/metadata/21/21c0044a7f964773be90d197a78e4703.info b/Roll a Ball/Library/metadata/21/21c0044a7f964773be90d197a78e4703.info new file mode 100644 index 0000000000000000000000000000000000000000..5cbe650d01729455098cbc603a8320e7a8bdc450 Binary files /dev/null and b/Roll a Ball/Library/metadata/21/21c0044a7f964773be90d197a78e4703.info differ diff --git a/Roll a Ball/Library/metadata/22/220224b43fc464c28bc0e8de8f54a432 b/Roll a Ball/Library/metadata/22/220224b43fc464c28bc0e8de8f54a432 new file mode 100644 index 0000000000000000000000000000000000000000..c490be4b178a7f0c6a5586507874bde486890ac6 Binary files /dev/null and b/Roll a Ball/Library/metadata/22/220224b43fc464c28bc0e8de8f54a432 differ diff --git a/Roll a Ball/Library/metadata/22/220224b43fc464c28bc0e8de8f54a432.info b/Roll a Ball/Library/metadata/22/220224b43fc464c28bc0e8de8f54a432.info new file mode 100644 index 0000000000000000000000000000000000000000..129295e6ff40e2d6a7110ebefe7239711d0de6ab Binary files /dev/null and b/Roll a Ball/Library/metadata/22/220224b43fc464c28bc0e8de8f54a432.info differ diff --git a/Roll a Ball/Library/metadata/22/220e9325710f4235a43492dd1ee4980d b/Roll a Ball/Library/metadata/22/220e9325710f4235a43492dd1ee4980d new file mode 100644 index 0000000000000000000000000000000000000000..26ecf6d340c37faeb3e536a5d3052f8159d1e7dd Binary files /dev/null and b/Roll a Ball/Library/metadata/22/220e9325710f4235a43492dd1ee4980d differ diff --git a/Roll a Ball/Library/metadata/22/220e9325710f4235a43492dd1ee4980d.info b/Roll a Ball/Library/metadata/22/220e9325710f4235a43492dd1ee4980d.info new file mode 100644 index 0000000000000000000000000000000000000000..aa17b7edf11632087417890f53a2e078c8cfcb86 Binary files /dev/null and b/Roll a Ball/Library/metadata/22/220e9325710f4235a43492dd1ee4980d.info differ diff --git a/Roll a Ball/Library/metadata/22/22464cf7ab0243a6bf9c79851183b002 b/Roll a Ball/Library/metadata/22/22464cf7ab0243a6bf9c79851183b002 new file mode 100644 index 0000000000000000000000000000000000000000..c2a80acc15998fb1523b26c97a37b34577939099 Binary files /dev/null and b/Roll a Ball/Library/metadata/22/22464cf7ab0243a6bf9c79851183b002 differ diff --git a/Roll a Ball/Library/metadata/22/22464cf7ab0243a6bf9c79851183b002.info b/Roll a Ball/Library/metadata/22/22464cf7ab0243a6bf9c79851183b002.info new file mode 100644 index 0000000000000000000000000000000000000000..c74eeb601291fdb2ee77e841173bc1872b1d5c61 Binary files /dev/null and b/Roll a Ball/Library/metadata/22/22464cf7ab0243a6bf9c79851183b002.info differ diff --git a/Roll a Ball/Library/metadata/22/224ede67b4f3a4109bfec4d5cb161b05 b/Roll a Ball/Library/metadata/22/224ede67b4f3a4109bfec4d5cb161b05 new file mode 100644 index 0000000000000000000000000000000000000000..b1b1dfda7c4b7560bd2766b1b60cde1ff412cfcc Binary files /dev/null and b/Roll a Ball/Library/metadata/22/224ede67b4f3a4109bfec4d5cb161b05 differ diff --git a/Roll a Ball/Library/metadata/22/224ede67b4f3a4109bfec4d5cb161b05.info b/Roll a Ball/Library/metadata/22/224ede67b4f3a4109bfec4d5cb161b05.info new file mode 100644 index 0000000000000000000000000000000000000000..cb8d0352bf037afb712255c97eaf37cc3d893523 Binary files /dev/null and b/Roll a Ball/Library/metadata/22/224ede67b4f3a4109bfec4d5cb161b05.info differ diff --git a/Roll a Ball/Library/metadata/23/2300e75732d74890b38a8ff257a3ae15 b/Roll a Ball/Library/metadata/23/2300e75732d74890b38a8ff257a3ae15 new file mode 100644 index 0000000000000000000000000000000000000000..57be31f7dd87e190e387512d8dbcdb69c0e3ca7e Binary files /dev/null and b/Roll a Ball/Library/metadata/23/2300e75732d74890b38a8ff257a3ae15 differ diff --git a/Roll a Ball/Library/metadata/23/2300e75732d74890b38a8ff257a3ae15.info b/Roll a Ball/Library/metadata/23/2300e75732d74890b38a8ff257a3ae15.info new file mode 100644 index 0000000000000000000000000000000000000000..efa7796c90c41495bea261820555b9e4f668ef84 Binary files /dev/null and b/Roll a Ball/Library/metadata/23/2300e75732d74890b38a8ff257a3ae15.info differ diff --git a/Roll a Ball/Library/metadata/23/23805a7a1623842b0b7b21158066bd90 b/Roll a Ball/Library/metadata/23/23805a7a1623842b0b7b21158066bd90 new file mode 100644 index 0000000000000000000000000000000000000000..ed09768fb0952622e61b0fa513332239fc2462e6 Binary files /dev/null and b/Roll a Ball/Library/metadata/23/23805a7a1623842b0b7b21158066bd90 differ diff --git a/Roll a Ball/Library/metadata/23/23805a7a1623842b0b7b21158066bd90.info b/Roll a Ball/Library/metadata/23/23805a7a1623842b0b7b21158066bd90.info new file mode 100644 index 0000000000000000000000000000000000000000..b7a6a30f020a03437f670fd5c18076a7cdc356d1 Binary files /dev/null and b/Roll a Ball/Library/metadata/23/23805a7a1623842b0b7b21158066bd90.info differ diff --git a/Roll a Ball/Library/metadata/23/23a562f2cac6401f9f91251c68a1a794 b/Roll a Ball/Library/metadata/23/23a562f2cac6401f9f91251c68a1a794 new file mode 100644 index 0000000000000000000000000000000000000000..dbb7b401d157d1290d5f7229064708966013799e Binary files /dev/null and b/Roll a Ball/Library/metadata/23/23a562f2cac6401f9f91251c68a1a794 differ diff --git a/Roll a Ball/Library/metadata/23/23a562f2cac6401f9f91251c68a1a794.info b/Roll a Ball/Library/metadata/23/23a562f2cac6401f9f91251c68a1a794.info new file mode 100644 index 0000000000000000000000000000000000000000..f3590faef3b3dd1947a3a9b49cf56a36caa44d79 Binary files /dev/null and b/Roll a Ball/Library/metadata/23/23a562f2cac6401f9f91251c68a1a794.info differ diff --git a/Roll a Ball/Library/metadata/23/23a56a19774ed42b6b65646af08a003c b/Roll a Ball/Library/metadata/23/23a56a19774ed42b6b65646af08a003c new file mode 100644 index 0000000000000000000000000000000000000000..e3afadba03827cfceeafdcad2035795a5ae648be Binary files /dev/null and b/Roll a Ball/Library/metadata/23/23a56a19774ed42b6b65646af08a003c differ diff --git a/Roll a Ball/Library/metadata/23/23a56a19774ed42b6b65646af08a003c.info b/Roll a Ball/Library/metadata/23/23a56a19774ed42b6b65646af08a003c.info new file mode 100644 index 0000000000000000000000000000000000000000..4962ab9d3a5659c27ca95341ed7cc1e6cf3ece89 Binary files /dev/null and b/Roll a Ball/Library/metadata/23/23a56a19774ed42b6b65646af08a003c.info differ diff --git a/Roll a Ball/Library/metadata/24/240551e3142f04b0ca801ce8eb645ba2 b/Roll a Ball/Library/metadata/24/240551e3142f04b0ca801ce8eb645ba2 new file mode 100644 index 0000000000000000000000000000000000000000..569c6ad15c71198146875f5f63e8f2ba8eda06e0 Binary files /dev/null and b/Roll a Ball/Library/metadata/24/240551e3142f04b0ca801ce8eb645ba2 differ diff --git a/Roll a Ball/Library/metadata/24/240551e3142f04b0ca801ce8eb645ba2.info b/Roll a Ball/Library/metadata/24/240551e3142f04b0ca801ce8eb645ba2.info new file mode 100644 index 0000000000000000000000000000000000000000..1f2f6ab3c71d077ad7ea7ae6226c5f8d99b36661 Binary files /dev/null and b/Roll a Ball/Library/metadata/24/240551e3142f04b0ca801ce8eb645ba2.info differ diff --git a/Roll a Ball/Library/metadata/25/25ebe415cc14c4f4ea15c34a796b75bb b/Roll a Ball/Library/metadata/25/25ebe415cc14c4f4ea15c34a796b75bb new file mode 100644 index 0000000000000000000000000000000000000000..697add6360f523d945b2bab0d7362aba5e29a487 Binary files /dev/null and b/Roll a Ball/Library/metadata/25/25ebe415cc14c4f4ea15c34a796b75bb differ diff --git a/Roll a Ball/Library/metadata/25/25ebe415cc14c4f4ea15c34a796b75bb.info b/Roll a Ball/Library/metadata/25/25ebe415cc14c4f4ea15c34a796b75bb.info new file mode 100644 index 0000000000000000000000000000000000000000..92d5c55422e5ecbf12a765e0b343bbf015459052 Binary files /dev/null and b/Roll a Ball/Library/metadata/25/25ebe415cc14c4f4ea15c34a796b75bb.info differ diff --git a/Roll a Ball/Library/metadata/26/2622838afa3284cc882c48ceea4c8220 b/Roll a Ball/Library/metadata/26/2622838afa3284cc882c48ceea4c8220 new file mode 100644 index 0000000000000000000000000000000000000000..c7b11b13b9e018b6dc5bc74c7e06672dfcf51d02 Binary files /dev/null and b/Roll a Ball/Library/metadata/26/2622838afa3284cc882c48ceea4c8220 differ diff --git a/Roll a Ball/Library/metadata/26/2622838afa3284cc882c48ceea4c8220.info b/Roll a Ball/Library/metadata/26/2622838afa3284cc882c48ceea4c8220.info new file mode 100644 index 0000000000000000000000000000000000000000..5fb112e890b4644e3033dcbf17b271e65e47d1e1 Binary files /dev/null and b/Roll a Ball/Library/metadata/26/2622838afa3284cc882c48ceea4c8220.info differ diff --git a/Roll a Ball/Library/metadata/26/26a4f29db434fd79025c91f6126382cc b/Roll a Ball/Library/metadata/26/26a4f29db434fd79025c91f6126382cc new file mode 100644 index 0000000000000000000000000000000000000000..86e973629a1b816a2b86fb633dfcf18b1a982904 Binary files /dev/null and b/Roll a Ball/Library/metadata/26/26a4f29db434fd79025c91f6126382cc differ diff --git a/Roll a Ball/Library/metadata/26/26a4f29db434fd79025c91f6126382cc.info b/Roll a Ball/Library/metadata/26/26a4f29db434fd79025c91f6126382cc.info new file mode 100644 index 0000000000000000000000000000000000000000..047600ffdd7898f91ede8a3ee9eee1088b92d211 Binary files /dev/null and b/Roll a Ball/Library/metadata/26/26a4f29db434fd79025c91f6126382cc.info differ diff --git a/Roll a Ball/Library/metadata/27/2705215ac5b84b70bacc50632be6e391 b/Roll a Ball/Library/metadata/27/2705215ac5b84b70bacc50632be6e391 new file mode 100644 index 0000000000000000000000000000000000000000..36e3ccf6a7b5fa269d34444a3f02bf2c33522cce Binary files /dev/null and b/Roll a Ball/Library/metadata/27/2705215ac5b84b70bacc50632be6e391 differ diff --git a/Roll a Ball/Library/metadata/27/2705215ac5b84b70bacc50632be6e391.info b/Roll a Ball/Library/metadata/27/2705215ac5b84b70bacc50632be6e391.info new file mode 100644 index 0000000000000000000000000000000000000000..ae61269cc25f35290c3056d2cd7ee1273444890f Binary files /dev/null and b/Roll a Ball/Library/metadata/27/2705215ac5b84b70bacc50632be6e391.info differ diff --git a/Roll a Ball/Library/metadata/27/27a0335dab59ec542aadd6636a5b4ebd b/Roll a Ball/Library/metadata/27/27a0335dab59ec542aadd6636a5b4ebd new file mode 100644 index 0000000000000000000000000000000000000000..10cd6da41989d47efe4792f8ebabbfa33dee95d0 Binary files /dev/null and b/Roll a Ball/Library/metadata/27/27a0335dab59ec542aadd6636a5b4ebd differ diff --git a/Roll a Ball/Library/metadata/27/27a0335dab59ec542aadd6636a5b4ebd.info b/Roll a Ball/Library/metadata/27/27a0335dab59ec542aadd6636a5b4ebd.info new file mode 100644 index 0000000000000000000000000000000000000000..e2c28147465ff3df8aefbe7f9b90a04611dae4a5 Binary files /dev/null and b/Roll a Ball/Library/metadata/27/27a0335dab59ec542aadd6636a5b4ebd.info differ diff --git a/Roll a Ball/Library/metadata/27/27df3b12f30d0b74a9b10a3968c402ff b/Roll a Ball/Library/metadata/27/27df3b12f30d0b74a9b10a3968c402ff new file mode 100644 index 0000000000000000000000000000000000000000..aface8d85e3791cac311aa713f42e9a7c3797b93 Binary files /dev/null and b/Roll a Ball/Library/metadata/27/27df3b12f30d0b74a9b10a3968c402ff differ diff --git a/Roll a Ball/Library/metadata/27/27df3b12f30d0b74a9b10a3968c402ff.info b/Roll a Ball/Library/metadata/27/27df3b12f30d0b74a9b10a3968c402ff.info new file mode 100644 index 0000000000000000000000000000000000000000..1da925dd91d48c86f09c69a345fb4b7f6ca4ff7f Binary files /dev/null and b/Roll a Ball/Library/metadata/27/27df3b12f30d0b74a9b10a3968c402ff.info differ diff --git a/Roll a Ball/Library/metadata/28/2808ba6bccb2478ec9c7209d8bf1f3cc b/Roll a Ball/Library/metadata/28/2808ba6bccb2478ec9c7209d8bf1f3cc new file mode 100644 index 0000000000000000000000000000000000000000..072cf72934bdb63ab73156cd568c977ec0e9a501 Binary files /dev/null and b/Roll a Ball/Library/metadata/28/2808ba6bccb2478ec9c7209d8bf1f3cc differ diff --git a/Roll a Ball/Library/metadata/28/2808ba6bccb2478ec9c7209d8bf1f3cc.info b/Roll a Ball/Library/metadata/28/2808ba6bccb2478ec9c7209d8bf1f3cc.info new file mode 100644 index 0000000000000000000000000000000000000000..3d03b4eb106427bb7c24fad3e62faf487f549dde Binary files /dev/null and b/Roll a Ball/Library/metadata/28/2808ba6bccb2478ec9c7209d8bf1f3cc.info differ diff --git a/Roll a Ball/Library/metadata/28/28375447bcea455c9b51a6650b10c9d7 b/Roll a Ball/Library/metadata/28/28375447bcea455c9b51a6650b10c9d7 new file mode 100644 index 0000000000000000000000000000000000000000..cd0cc32bdcc7bc57ca3732e2eb3b8c0760a09fee Binary files /dev/null and b/Roll a Ball/Library/metadata/28/28375447bcea455c9b51a6650b10c9d7 differ diff --git a/Roll a Ball/Library/metadata/28/28375447bcea455c9b51a6650b10c9d7.info b/Roll a Ball/Library/metadata/28/28375447bcea455c9b51a6650b10c9d7.info new file mode 100644 index 0000000000000000000000000000000000000000..9418068069963564c532f255ff368d41de354fb4 Binary files /dev/null and b/Roll a Ball/Library/metadata/28/28375447bcea455c9b51a6650b10c9d7.info differ diff --git a/Roll a Ball/Library/metadata/28/28542eca5f1b4c64813acfbd512524b6 b/Roll a Ball/Library/metadata/28/28542eca5f1b4c64813acfbd512524b6 new file mode 100644 index 0000000000000000000000000000000000000000..3b0cb154c974f1d7152471b9b67e9f661948b604 Binary files /dev/null and b/Roll a Ball/Library/metadata/28/28542eca5f1b4c64813acfbd512524b6 differ diff --git a/Roll a Ball/Library/metadata/28/28542eca5f1b4c64813acfbd512524b6.info b/Roll a Ball/Library/metadata/28/28542eca5f1b4c64813acfbd512524b6.info new file mode 100644 index 0000000000000000000000000000000000000000..2c4e4b63f688a834ccf7546151eb3d0af10758d1 Binary files /dev/null and b/Roll a Ball/Library/metadata/28/28542eca5f1b4c64813acfbd512524b6.info differ diff --git a/Roll a Ball/Library/metadata/29/293182c4d29604c05b6724ae00fd121a b/Roll a Ball/Library/metadata/29/293182c4d29604c05b6724ae00fd121a new file mode 100644 index 0000000000000000000000000000000000000000..68a6462d3c92ce9e75d8c13ad5b34f5e758d8770 Binary files /dev/null and b/Roll a Ball/Library/metadata/29/293182c4d29604c05b6724ae00fd121a differ diff --git a/Roll a Ball/Library/metadata/29/293182c4d29604c05b6724ae00fd121a.info b/Roll a Ball/Library/metadata/29/293182c4d29604c05b6724ae00fd121a.info new file mode 100644 index 0000000000000000000000000000000000000000..290898320e5b8b0b09f1fb31a37fc3ebd0577302 Binary files /dev/null and b/Roll a Ball/Library/metadata/29/293182c4d29604c05b6724ae00fd121a.info differ diff --git a/Roll a Ball/Library/metadata/29/29e279dd35192ab4a8145d74356b893b b/Roll a Ball/Library/metadata/29/29e279dd35192ab4a8145d74356b893b new file mode 100644 index 0000000000000000000000000000000000000000..7f2ace061ad2e5ab2b7013712f2c4a354e74bc68 Binary files /dev/null and b/Roll a Ball/Library/metadata/29/29e279dd35192ab4a8145d74356b893b differ diff --git a/Roll a Ball/Library/metadata/29/29e279dd35192ab4a8145d74356b893b.info b/Roll a Ball/Library/metadata/29/29e279dd35192ab4a8145d74356b893b.info new file mode 100644 index 0000000000000000000000000000000000000000..c3c44293ed6a73872d1137cced5205a5904c86b6 Binary files /dev/null and b/Roll a Ball/Library/metadata/29/29e279dd35192ab4a8145d74356b893b.info differ diff --git a/Roll a Ball/Library/metadata/2a/2a3f4f8c4e2df41108f55825c24ff694 b/Roll a Ball/Library/metadata/2a/2a3f4f8c4e2df41108f55825c24ff694 new file mode 100644 index 0000000000000000000000000000000000000000..a84fb311f785d8b29a5cf825af406066f0404f05 Binary files /dev/null and b/Roll a Ball/Library/metadata/2a/2a3f4f8c4e2df41108f55825c24ff694 differ diff --git a/Roll a Ball/Library/metadata/2a/2a3f4f8c4e2df41108f55825c24ff694.info b/Roll a Ball/Library/metadata/2a/2a3f4f8c4e2df41108f55825c24ff694.info new file mode 100644 index 0000000000000000000000000000000000000000..e416801ea8f36ee3cf96894918a7a097bc8bf143 Binary files /dev/null and b/Roll a Ball/Library/metadata/2a/2a3f4f8c4e2df41108f55825c24ff694.info differ diff --git a/Roll a Ball/Library/metadata/2b/2b2be9ee9f41a4b2db6b502697ba31b1 b/Roll a Ball/Library/metadata/2b/2b2be9ee9f41a4b2db6b502697ba31b1 new file mode 100644 index 0000000000000000000000000000000000000000..41c35067161d90f2842daf8df6c01de9e1b4c2d3 Binary files /dev/null and b/Roll a Ball/Library/metadata/2b/2b2be9ee9f41a4b2db6b502697ba31b1 differ diff --git a/Roll a Ball/Library/metadata/2b/2b2be9ee9f41a4b2db6b502697ba31b1.info b/Roll a Ball/Library/metadata/2b/2b2be9ee9f41a4b2db6b502697ba31b1.info new file mode 100644 index 0000000000000000000000000000000000000000..96e71b32ecaf4d919d6c99d7776d8a55e0073b24 Binary files /dev/null and b/Roll a Ball/Library/metadata/2b/2b2be9ee9f41a4b2db6b502697ba31b1.info differ diff --git a/Roll a Ball/Library/metadata/2b/2b3002c18d29d41b0898ab58bc6ee10d b/Roll a Ball/Library/metadata/2b/2b3002c18d29d41b0898ab58bc6ee10d new file mode 100644 index 0000000000000000000000000000000000000000..a9dff18549802427d4867f8d90c120757ff94738 Binary files /dev/null and b/Roll a Ball/Library/metadata/2b/2b3002c18d29d41b0898ab58bc6ee10d differ diff --git a/Roll a Ball/Library/metadata/2b/2b3002c18d29d41b0898ab58bc6ee10d.info b/Roll a Ball/Library/metadata/2b/2b3002c18d29d41b0898ab58bc6ee10d.info new file mode 100644 index 0000000000000000000000000000000000000000..5c14574f506a929b3380897c283e77b625250a41 Binary files /dev/null and b/Roll a Ball/Library/metadata/2b/2b3002c18d29d41b0898ab58bc6ee10d.info differ diff --git a/Roll a Ball/Library/metadata/2c/2c814623cb42764d304be0c5ddd03ceb b/Roll a Ball/Library/metadata/2c/2c814623cb42764d304be0c5ddd03ceb new file mode 100644 index 0000000000000000000000000000000000000000..75eaad0b393dd25e1518044a44f1579cfa063d3c Binary files /dev/null and b/Roll a Ball/Library/metadata/2c/2c814623cb42764d304be0c5ddd03ceb differ diff --git a/Roll a Ball/Library/metadata/2c/2c814623cb42764d304be0c5ddd03ceb.info b/Roll a Ball/Library/metadata/2c/2c814623cb42764d304be0c5ddd03ceb.info new file mode 100644 index 0000000000000000000000000000000000000000..0b97d787d07eeeb505292b0353b5ae994ac43177 Binary files /dev/null and b/Roll a Ball/Library/metadata/2c/2c814623cb42764d304be0c5ddd03ceb.info differ diff --git a/Roll a Ball/Library/metadata/2c/2ce4bbcc4722440890a03312706037fe b/Roll a Ball/Library/metadata/2c/2ce4bbcc4722440890a03312706037fe new file mode 100644 index 0000000000000000000000000000000000000000..4945ec63b25170e041a0bc26991c309c68029129 Binary files /dev/null and b/Roll a Ball/Library/metadata/2c/2ce4bbcc4722440890a03312706037fe differ diff --git a/Roll a Ball/Library/metadata/2c/2ce4bbcc4722440890a03312706037fe.info b/Roll a Ball/Library/metadata/2c/2ce4bbcc4722440890a03312706037fe.info new file mode 100644 index 0000000000000000000000000000000000000000..12a8c827ac44636ba3c364447eac7556baaa668a Binary files /dev/null and b/Roll a Ball/Library/metadata/2c/2ce4bbcc4722440890a03312706037fe.info differ diff --git a/Roll a Ball/Library/metadata/2d/2d142b475fbfb8cf12ba3a795194300a b/Roll a Ball/Library/metadata/2d/2d142b475fbfb8cf12ba3a795194300a new file mode 100644 index 0000000000000000000000000000000000000000..da18a5477cfa8a856adedff24c664187400dce0a Binary files /dev/null and b/Roll a Ball/Library/metadata/2d/2d142b475fbfb8cf12ba3a795194300a differ diff --git a/Roll a Ball/Library/metadata/2d/2d142b475fbfb8cf12ba3a795194300a.info b/Roll a Ball/Library/metadata/2d/2d142b475fbfb8cf12ba3a795194300a.info new file mode 100644 index 0000000000000000000000000000000000000000..f4aa9537aa098e4ccaa4b3e5ce95c38a21a3efe1 Binary files /dev/null and b/Roll a Ball/Library/metadata/2d/2d142b475fbfb8cf12ba3a795194300a.info differ diff --git a/Roll a Ball/Library/metadata/2d/2d4d46c70fdd242668a56e99799e8540 b/Roll a Ball/Library/metadata/2d/2d4d46c70fdd242668a56e99799e8540 new file mode 100644 index 0000000000000000000000000000000000000000..979090164e2eb5f9fc690f4a24d19ce55002c5e8 Binary files /dev/null and b/Roll a Ball/Library/metadata/2d/2d4d46c70fdd242668a56e99799e8540 differ diff --git a/Roll a Ball/Library/metadata/2d/2d4d46c70fdd242668a56e99799e8540.info b/Roll a Ball/Library/metadata/2d/2d4d46c70fdd242668a56e99799e8540.info new file mode 100644 index 0000000000000000000000000000000000000000..b8db6a0f5394aea91d709d7ee4695086e71a1452 Binary files /dev/null and b/Roll a Ball/Library/metadata/2d/2d4d46c70fdd242668a56e99799e8540.info differ diff --git a/Roll a Ball/Library/metadata/2d/2d6ba5cbe47e6ad3c87474c56174d4e0 b/Roll a Ball/Library/metadata/2d/2d6ba5cbe47e6ad3c87474c56174d4e0 new file mode 100644 index 0000000000000000000000000000000000000000..ef2696827eafb9a067787b3bdf0466f9a4174732 Binary files /dev/null and b/Roll a Ball/Library/metadata/2d/2d6ba5cbe47e6ad3c87474c56174d4e0 differ diff --git a/Roll a Ball/Library/metadata/2d/2d6ba5cbe47e6ad3c87474c56174d4e0.info b/Roll a Ball/Library/metadata/2d/2d6ba5cbe47e6ad3c87474c56174d4e0.info new file mode 100644 index 0000000000000000000000000000000000000000..5c8c773ba917da3b0b27b81c0e68948929c19c38 Binary files /dev/null and b/Roll a Ball/Library/metadata/2d/2d6ba5cbe47e6ad3c87474c56174d4e0.info differ diff --git a/Roll a Ball/Library/metadata/2d/2d77b2d58287d46a6a61f12c861bfc2f b/Roll a Ball/Library/metadata/2d/2d77b2d58287d46a6a61f12c861bfc2f new file mode 100644 index 0000000000000000000000000000000000000000..cee60ccda2be178d2bbc39d303431e91fbd7e738 Binary files /dev/null and b/Roll a Ball/Library/metadata/2d/2d77b2d58287d46a6a61f12c861bfc2f differ diff --git a/Roll a Ball/Library/metadata/2d/2d77b2d58287d46a6a61f12c861bfc2f.info b/Roll a Ball/Library/metadata/2d/2d77b2d58287d46a6a61f12c861bfc2f.info new file mode 100644 index 0000000000000000000000000000000000000000..b296643dd66628d9a702f5ad1daddd534228aacf Binary files /dev/null and b/Roll a Ball/Library/metadata/2d/2d77b2d58287d46a6a61f12c861bfc2f.info differ diff --git a/Roll a Ball/Library/metadata/2d/2da0c512f12947e489f739169773d7ca b/Roll a Ball/Library/metadata/2d/2da0c512f12947e489f739169773d7ca new file mode 100644 index 0000000000000000000000000000000000000000..ee2d7bd05112a167180edfb0c993955762f8d729 Binary files /dev/null and b/Roll a Ball/Library/metadata/2d/2da0c512f12947e489f739169773d7ca differ diff --git a/Roll a Ball/Library/metadata/2d/2da0c512f12947e489f739169773d7ca.info b/Roll a Ball/Library/metadata/2d/2da0c512f12947e489f739169773d7ca.info new file mode 100644 index 0000000000000000000000000000000000000000..971f3ef63476172febf31d18dd0a6bdb6fc527e0 Binary files /dev/null and b/Roll a Ball/Library/metadata/2d/2da0c512f12947e489f739169773d7ca.info differ diff --git a/Roll a Ball/Library/metadata/2d/2da27f5fe80a3a549ac7331d9f52f5f0 b/Roll a Ball/Library/metadata/2d/2da27f5fe80a3a549ac7331d9f52f5f0 new file mode 100644 index 0000000000000000000000000000000000000000..9f82b434ec3edfa7b668739d4b33c7e6f94a5ea5 Binary files /dev/null and b/Roll a Ball/Library/metadata/2d/2da27f5fe80a3a549ac7331d9f52f5f0 differ diff --git a/Roll a Ball/Library/metadata/2d/2da27f5fe80a3a549ac7331d9f52f5f0.info b/Roll a Ball/Library/metadata/2d/2da27f5fe80a3a549ac7331d9f52f5f0.info new file mode 100644 index 0000000000000000000000000000000000000000..f2849809ed883db163f5b4b4dfaf4247d60e95c3 Binary files /dev/null and b/Roll a Ball/Library/metadata/2d/2da27f5fe80a3a549ac7331d9f52f5f0.info differ diff --git a/Roll a Ball/Library/metadata/2f/2f1849b9179b464381598f68663790d3 b/Roll a Ball/Library/metadata/2f/2f1849b9179b464381598f68663790d3 new file mode 100644 index 0000000000000000000000000000000000000000..45edd58d099b2b2ba079b93e9413334f64c262cd Binary files /dev/null and b/Roll a Ball/Library/metadata/2f/2f1849b9179b464381598f68663790d3 differ diff --git a/Roll a Ball/Library/metadata/2f/2f1849b9179b464381598f68663790d3.info b/Roll a Ball/Library/metadata/2f/2f1849b9179b464381598f68663790d3.info new file mode 100644 index 0000000000000000000000000000000000000000..cde28d7758a349014d52239441a629612dd608e4 Binary files /dev/null and b/Roll a Ball/Library/metadata/2f/2f1849b9179b464381598f68663790d3.info differ diff --git a/Roll a Ball/Library/metadata/2f/2f1d33abb004b44cb90ec83a2bfe872e b/Roll a Ball/Library/metadata/2f/2f1d33abb004b44cb90ec83a2bfe872e new file mode 100644 index 0000000000000000000000000000000000000000..2f62f58c84f970b9dd8cefeecd320a170581f46b Binary files /dev/null and b/Roll a Ball/Library/metadata/2f/2f1d33abb004b44cb90ec83a2bfe872e differ diff --git a/Roll a Ball/Library/metadata/2f/2f1d33abb004b44cb90ec83a2bfe872e.info b/Roll a Ball/Library/metadata/2f/2f1d33abb004b44cb90ec83a2bfe872e.info new file mode 100644 index 0000000000000000000000000000000000000000..532671c1680f9857981f6f286d13a03dc3599bb5 Binary files /dev/null and b/Roll a Ball/Library/metadata/2f/2f1d33abb004b44cb90ec83a2bfe872e.info differ diff --git a/Roll a Ball/Library/metadata/2f/2fd6421f253b4ef1a19526541f9ffc0c b/Roll a Ball/Library/metadata/2f/2fd6421f253b4ef1a19526541f9ffc0c new file mode 100644 index 0000000000000000000000000000000000000000..bd9b67f2edd1b795f2eca38203c6f1753d86b042 Binary files /dev/null and b/Roll a Ball/Library/metadata/2f/2fd6421f253b4ef1a19526541f9ffc0c differ diff --git a/Roll a Ball/Library/metadata/2f/2fd6421f253b4ef1a19526541f9ffc0c.info b/Roll a Ball/Library/metadata/2f/2fd6421f253b4ef1a19526541f9ffc0c.info new file mode 100644 index 0000000000000000000000000000000000000000..10280a4b08ad94355e0e8b50fc4cba72837593cc Binary files /dev/null and b/Roll a Ball/Library/metadata/2f/2fd6421f253b4ef1a19526541f9ffc0c.info differ diff --git a/Roll a Ball/Library/metadata/30/301fbaa0e62e44fd2a7383bd338a2898 b/Roll a Ball/Library/metadata/30/301fbaa0e62e44fd2a7383bd338a2898 new file mode 100644 index 0000000000000000000000000000000000000000..4e9993df38427395fe0769986694ed2b3084d216 Binary files /dev/null and b/Roll a Ball/Library/metadata/30/301fbaa0e62e44fd2a7383bd338a2898 differ diff --git a/Roll a Ball/Library/metadata/30/301fbaa0e62e44fd2a7383bd338a2898.info b/Roll a Ball/Library/metadata/30/301fbaa0e62e44fd2a7383bd338a2898.info new file mode 100644 index 0000000000000000000000000000000000000000..d00adced65bbd44ba75d2e1b18f4eda02f4b608e Binary files /dev/null and b/Roll a Ball/Library/metadata/30/301fbaa0e62e44fd2a7383bd338a2898.info differ diff --git a/Roll a Ball/Library/metadata/30/3069a00b8c364df395994d7d379e0a99 b/Roll a Ball/Library/metadata/30/3069a00b8c364df395994d7d379e0a99 new file mode 100644 index 0000000000000000000000000000000000000000..9130d5c184e9343bd19e185dccab96af3d8238b4 Binary files /dev/null and b/Roll a Ball/Library/metadata/30/3069a00b8c364df395994d7d379e0a99 differ diff --git a/Roll a Ball/Library/metadata/30/3069a00b8c364df395994d7d379e0a99.info b/Roll a Ball/Library/metadata/30/3069a00b8c364df395994d7d379e0a99.info new file mode 100644 index 0000000000000000000000000000000000000000..b1d92fe58bdcaaf414aec5950622a819ba85fc07 Binary files /dev/null and b/Roll a Ball/Library/metadata/30/3069a00b8c364df395994d7d379e0a99.info differ diff --git a/Roll a Ball/Library/metadata/30/30a939dce2fd4073955f2f20e659d506 b/Roll a Ball/Library/metadata/30/30a939dce2fd4073955f2f20e659d506 new file mode 100644 index 0000000000000000000000000000000000000000..2b2c739510fa3ad5fea61e66326124cb01d80b71 Binary files /dev/null and b/Roll a Ball/Library/metadata/30/30a939dce2fd4073955f2f20e659d506 differ diff --git a/Roll a Ball/Library/metadata/30/30a939dce2fd4073955f2f20e659d506.info b/Roll a Ball/Library/metadata/30/30a939dce2fd4073955f2f20e659d506.info new file mode 100644 index 0000000000000000000000000000000000000000..d7cd41764bc1cb1eac407ff8762ccb35acc3bfbd Binary files /dev/null and b/Roll a Ball/Library/metadata/30/30a939dce2fd4073955f2f20e659d506.info differ diff --git a/Roll a Ball/Library/metadata/30/30aa3194afbe44a72aa7ec76cb2bab8a b/Roll a Ball/Library/metadata/30/30aa3194afbe44a72aa7ec76cb2bab8a new file mode 100644 index 0000000000000000000000000000000000000000..e2881a868e7b659a057dd08ca96326b151f8dbd4 Binary files /dev/null and b/Roll a Ball/Library/metadata/30/30aa3194afbe44a72aa7ec76cb2bab8a differ diff --git a/Roll a Ball/Library/metadata/30/30aa3194afbe44a72aa7ec76cb2bab8a.info b/Roll a Ball/Library/metadata/30/30aa3194afbe44a72aa7ec76cb2bab8a.info new file mode 100644 index 0000000000000000000000000000000000000000..c5c1dbe15ad8ca403f2021c454962d083c8f97f3 Binary files /dev/null and b/Roll a Ball/Library/metadata/30/30aa3194afbe44a72aa7ec76cb2bab8a.info differ diff --git a/Roll a Ball/Library/metadata/30/30bed781e402439ab8ce4e3357708115 b/Roll a Ball/Library/metadata/30/30bed781e402439ab8ce4e3357708115 new file mode 100644 index 0000000000000000000000000000000000000000..0b40676751098949ed47308205cfc015d3f45d0a Binary files /dev/null and b/Roll a Ball/Library/metadata/30/30bed781e402439ab8ce4e3357708115 differ diff --git a/Roll a Ball/Library/metadata/30/30bed781e402439ab8ce4e3357708115.info b/Roll a Ball/Library/metadata/30/30bed781e402439ab8ce4e3357708115.info new file mode 100644 index 0000000000000000000000000000000000000000..d09191e778b7be1e2a1d70e33407bbc4b6fdb616 Binary files /dev/null and b/Roll a Ball/Library/metadata/30/30bed781e402439ab8ce4e3357708115.info differ diff --git a/Roll a Ball/Library/metadata/32/322392995be44d23a3c86cfd972f838f b/Roll a Ball/Library/metadata/32/322392995be44d23a3c86cfd972f838f new file mode 100644 index 0000000000000000000000000000000000000000..327c5611ccd5346f612218d6efdda5e83087b383 Binary files /dev/null and b/Roll a Ball/Library/metadata/32/322392995be44d23a3c86cfd972f838f differ diff --git a/Roll a Ball/Library/metadata/32/322392995be44d23a3c86cfd972f838f.info b/Roll a Ball/Library/metadata/32/322392995be44d23a3c86cfd972f838f.info new file mode 100644 index 0000000000000000000000000000000000000000..88eb16c00e011d04580dd9dff2d91f110ab08889 Binary files /dev/null and b/Roll a Ball/Library/metadata/32/322392995be44d23a3c86cfd972f838f.info differ diff --git a/Roll a Ball/Library/metadata/32/32d40088a6124c578ad6b428df586e2e b/Roll a Ball/Library/metadata/32/32d40088a6124c578ad6b428df586e2e new file mode 100644 index 0000000000000000000000000000000000000000..f9d3f446a274c57553bddbcd4a79860f9a9e94bd Binary files /dev/null and b/Roll a Ball/Library/metadata/32/32d40088a6124c578ad6b428df586e2e differ diff --git a/Roll a Ball/Library/metadata/32/32d40088a6124c578ad6b428df586e2e.info b/Roll a Ball/Library/metadata/32/32d40088a6124c578ad6b428df586e2e.info new file mode 100644 index 0000000000000000000000000000000000000000..1d5032c28c4ef166ba1e4470984bc93b8917411c Binary files /dev/null and b/Roll a Ball/Library/metadata/32/32d40088a6124c578ad6b428df586e2e.info differ diff --git a/Roll a Ball/Library/metadata/33/336d6395d0228d64e87d76fe616a31b7 b/Roll a Ball/Library/metadata/33/336d6395d0228d64e87d76fe616a31b7 new file mode 100644 index 0000000000000000000000000000000000000000..26893f758f8c486d54bc55af4cbb7e84462723f6 Binary files /dev/null and b/Roll a Ball/Library/metadata/33/336d6395d0228d64e87d76fe616a31b7 differ diff --git a/Roll a Ball/Library/metadata/33/336d6395d0228d64e87d76fe616a31b7.info b/Roll a Ball/Library/metadata/33/336d6395d0228d64e87d76fe616a31b7.info new file mode 100644 index 0000000000000000000000000000000000000000..df988dbc90e3103eb4cbf283962a666fdaa0ca40 Binary files /dev/null and b/Roll a Ball/Library/metadata/33/336d6395d0228d64e87d76fe616a31b7.info differ diff --git a/Roll a Ball/Library/metadata/33/3385f7527e5be4c65b3a5294e8995ff8 b/Roll a Ball/Library/metadata/33/3385f7527e5be4c65b3a5294e8995ff8 new file mode 100644 index 0000000000000000000000000000000000000000..3722e39b3e3f304f0d320359831b3d5150365bb5 Binary files /dev/null and b/Roll a Ball/Library/metadata/33/3385f7527e5be4c65b3a5294e8995ff8 differ diff --git a/Roll a Ball/Library/metadata/33/3385f7527e5be4c65b3a5294e8995ff8.info b/Roll a Ball/Library/metadata/33/3385f7527e5be4c65b3a5294e8995ff8.info new file mode 100644 index 0000000000000000000000000000000000000000..3d615113d3dc25c692149c63a861f444a8f14da2 Binary files /dev/null and b/Roll a Ball/Library/metadata/33/3385f7527e5be4c65b3a5294e8995ff8.info differ diff --git a/Roll a Ball/Library/metadata/34/342a0f8aca7f4f0691338912faec0494 b/Roll a Ball/Library/metadata/34/342a0f8aca7f4f0691338912faec0494 new file mode 100644 index 0000000000000000000000000000000000000000..f6b0a4b865318b2f945323cfcfa4911b57070903 Binary files /dev/null and b/Roll a Ball/Library/metadata/34/342a0f8aca7f4f0691338912faec0494 differ diff --git a/Roll a Ball/Library/metadata/34/342a0f8aca7f4f0691338912faec0494.info b/Roll a Ball/Library/metadata/34/342a0f8aca7f4f0691338912faec0494.info new file mode 100644 index 0000000000000000000000000000000000000000..89151cfdb6f8bd192e700447093867ebe2f30d5f Binary files /dev/null and b/Roll a Ball/Library/metadata/34/342a0f8aca7f4f0691338912faec0494.info differ diff --git a/Roll a Ball/Library/metadata/34/34e150112c1c42ac83170b52d898e322 b/Roll a Ball/Library/metadata/34/34e150112c1c42ac83170b52d898e322 new file mode 100644 index 0000000000000000000000000000000000000000..d8a9e80b8e4226c64e25fd69a79daccc815dd786 Binary files /dev/null and b/Roll a Ball/Library/metadata/34/34e150112c1c42ac83170b52d898e322 differ diff --git a/Roll a Ball/Library/metadata/34/34e150112c1c42ac83170b52d898e322.info b/Roll a Ball/Library/metadata/34/34e150112c1c42ac83170b52d898e322.info new file mode 100644 index 0000000000000000000000000000000000000000..7280a055ca4878fa36a4d8f26f67971163a18eb9 Binary files /dev/null and b/Roll a Ball/Library/metadata/34/34e150112c1c42ac83170b52d898e322.info differ diff --git a/Roll a Ball/Library/metadata/34/34e2c9b9d9e44953933afe37461f44e6 b/Roll a Ball/Library/metadata/34/34e2c9b9d9e44953933afe37461f44e6 new file mode 100644 index 0000000000000000000000000000000000000000..0a06ed3cd4383959a69d01f8fca9d800ee281476 Binary files /dev/null and b/Roll a Ball/Library/metadata/34/34e2c9b9d9e44953933afe37461f44e6 differ diff --git a/Roll a Ball/Library/metadata/34/34e2c9b9d9e44953933afe37461f44e6.info b/Roll a Ball/Library/metadata/34/34e2c9b9d9e44953933afe37461f44e6.info new file mode 100644 index 0000000000000000000000000000000000000000..972dd4b2cf01c1d56a21ab2585c25fa8d65f3ef6 Binary files /dev/null and b/Roll a Ball/Library/metadata/34/34e2c9b9d9e44953933afe37461f44e6.info differ diff --git a/Roll a Ball/Library/metadata/34/34f6695d37a94370a3697f6b068f5d5e b/Roll a Ball/Library/metadata/34/34f6695d37a94370a3697f6b068f5d5e new file mode 100644 index 0000000000000000000000000000000000000000..ee1048ca93671ad67ef9cc89f5a34c3385c64190 Binary files /dev/null and b/Roll a Ball/Library/metadata/34/34f6695d37a94370a3697f6b068f5d5e differ diff --git a/Roll a Ball/Library/metadata/34/34f6695d37a94370a3697f6b068f5d5e.info b/Roll a Ball/Library/metadata/34/34f6695d37a94370a3697f6b068f5d5e.info new file mode 100644 index 0000000000000000000000000000000000000000..050558b60a7abacca4207fbf4100befbce1a42a7 Binary files /dev/null and b/Roll a Ball/Library/metadata/34/34f6695d37a94370a3697f6b068f5d5e.info differ diff --git a/Roll a Ball/Library/metadata/35/35b4e72ca46f44581b85082c4dc21d13 b/Roll a Ball/Library/metadata/35/35b4e72ca46f44581b85082c4dc21d13 new file mode 100644 index 0000000000000000000000000000000000000000..8b9ff1a379ecf5da8492cb9e43df43dacb1377b8 Binary files /dev/null and b/Roll a Ball/Library/metadata/35/35b4e72ca46f44581b85082c4dc21d13 differ diff --git a/Roll a Ball/Library/metadata/35/35b4e72ca46f44581b85082c4dc21d13.info b/Roll a Ball/Library/metadata/35/35b4e72ca46f44581b85082c4dc21d13.info new file mode 100644 index 0000000000000000000000000000000000000000..220eb813cdf24665e1cdebac0bc3fd6d98a64d6e Binary files /dev/null and b/Roll a Ball/Library/metadata/35/35b4e72ca46f44581b85082c4dc21d13.info differ diff --git a/Roll a Ball/Library/metadata/35/35ff0937876540d3bd4b6a941df62a92 b/Roll a Ball/Library/metadata/35/35ff0937876540d3bd4b6a941df62a92 new file mode 100644 index 0000000000000000000000000000000000000000..c60e0fdb175e8c6f1914792014bb12e4b181ffb9 Binary files /dev/null and b/Roll a Ball/Library/metadata/35/35ff0937876540d3bd4b6a941df62a92 differ diff --git a/Roll a Ball/Library/metadata/35/35ff0937876540d3bd4b6a941df62a92.info b/Roll a Ball/Library/metadata/35/35ff0937876540d3bd4b6a941df62a92.info new file mode 100644 index 0000000000000000000000000000000000000000..bcdcaaab05eed74cdf9857b820265c48b99973b7 Binary files /dev/null and b/Roll a Ball/Library/metadata/35/35ff0937876540d3bd4b6a941df62a92.info differ diff --git a/Roll a Ball/Library/metadata/36/36e8bb3feb5e6402185947b817a6ed8d b/Roll a Ball/Library/metadata/36/36e8bb3feb5e6402185947b817a6ed8d new file mode 100644 index 0000000000000000000000000000000000000000..b44acf4eb210a023065def79b4f212d648170651 Binary files /dev/null and b/Roll a Ball/Library/metadata/36/36e8bb3feb5e6402185947b817a6ed8d differ diff --git a/Roll a Ball/Library/metadata/36/36e8bb3feb5e6402185947b817a6ed8d.info b/Roll a Ball/Library/metadata/36/36e8bb3feb5e6402185947b817a6ed8d.info new file mode 100644 index 0000000000000000000000000000000000000000..bb31f4063024d4b609c7c44b31e089a1da610c0b Binary files /dev/null and b/Roll a Ball/Library/metadata/36/36e8bb3feb5e6402185947b817a6ed8d.info differ diff --git a/Roll a Ball/Library/metadata/37/376c84ea405e0f2b80562c23bb977216 b/Roll a Ball/Library/metadata/37/376c84ea405e0f2b80562c23bb977216 new file mode 100644 index 0000000000000000000000000000000000000000..50ee45721954052a783520146eead84afed5740d Binary files /dev/null and b/Roll a Ball/Library/metadata/37/376c84ea405e0f2b80562c23bb977216 differ diff --git a/Roll a Ball/Library/metadata/37/376c84ea405e0f2b80562c23bb977216.info b/Roll a Ball/Library/metadata/37/376c84ea405e0f2b80562c23bb977216.info new file mode 100644 index 0000000000000000000000000000000000000000..12e4ca2640c65778e0059c84eb60f858b48e19ce Binary files /dev/null and b/Roll a Ball/Library/metadata/37/376c84ea405e0f2b80562c23bb977216.info differ diff --git a/Roll a Ball/Library/metadata/37/37cff9f5a86ae494c8cb04423580480d b/Roll a Ball/Library/metadata/37/37cff9f5a86ae494c8cb04423580480d new file mode 100644 index 0000000000000000000000000000000000000000..cc8973e3d466b20f164fe4e64145141bd01b53fb Binary files /dev/null and b/Roll a Ball/Library/metadata/37/37cff9f5a86ae494c8cb04423580480d differ diff --git a/Roll a Ball/Library/metadata/37/37cff9f5a86ae494c8cb04423580480d.info b/Roll a Ball/Library/metadata/37/37cff9f5a86ae494c8cb04423580480d.info new file mode 100644 index 0000000000000000000000000000000000000000..e5f347eaa4769ebfa4335d05b2e322a07e9b2ab9 Binary files /dev/null and b/Roll a Ball/Library/metadata/37/37cff9f5a86ae494c8cb04423580480d.info differ diff --git a/Roll a Ball/Library/metadata/38/383966e89d344865a36addd5d378ffd3 b/Roll a Ball/Library/metadata/38/383966e89d344865a36addd5d378ffd3 new file mode 100644 index 0000000000000000000000000000000000000000..e38ced5cbafa12635747fb85c88d79f4775bbfe3 Binary files /dev/null and b/Roll a Ball/Library/metadata/38/383966e89d344865a36addd5d378ffd3 differ diff --git a/Roll a Ball/Library/metadata/38/383966e89d344865a36addd5d378ffd3.info b/Roll a Ball/Library/metadata/38/383966e89d344865a36addd5d378ffd3.info new file mode 100644 index 0000000000000000000000000000000000000000..7d15b5902fa92ecd8804205e9df67c02cd5087f9 Binary files /dev/null and b/Roll a Ball/Library/metadata/38/383966e89d344865a36addd5d378ffd3.info differ diff --git a/Roll a Ball/Library/metadata/38/3877b2be7ee07495d8918dc8937e6de2 b/Roll a Ball/Library/metadata/38/3877b2be7ee07495d8918dc8937e6de2 new file mode 100644 index 0000000000000000000000000000000000000000..72d6f3dbfdaf6e89fd3a920e83501a972306990c Binary files /dev/null and b/Roll a Ball/Library/metadata/38/3877b2be7ee07495d8918dc8937e6de2 differ diff --git a/Roll a Ball/Library/metadata/38/3877b2be7ee07495d8918dc8937e6de2.info b/Roll a Ball/Library/metadata/38/3877b2be7ee07495d8918dc8937e6de2.info new file mode 100644 index 0000000000000000000000000000000000000000..00bce50c4eb7eaad23c8b4e305049040072eb8b2 Binary files /dev/null and b/Roll a Ball/Library/metadata/38/3877b2be7ee07495d8918dc8937e6de2.info differ diff --git a/Roll a Ball/Library/metadata/38/38c8faf1788024c02930a0c68a6e0edc b/Roll a Ball/Library/metadata/38/38c8faf1788024c02930a0c68a6e0edc new file mode 100644 index 0000000000000000000000000000000000000000..2647689bae66434a022c896ed4697ced8f685651 Binary files /dev/null and b/Roll a Ball/Library/metadata/38/38c8faf1788024c02930a0c68a6e0edc differ diff --git a/Roll a Ball/Library/metadata/38/38c8faf1788024c02930a0c68a6e0edc.info b/Roll a Ball/Library/metadata/38/38c8faf1788024c02930a0c68a6e0edc.info new file mode 100644 index 0000000000000000000000000000000000000000..0daa3ef54974ec9fa6d51fd046b5091b07f0f3a8 Binary files /dev/null and b/Roll a Ball/Library/metadata/38/38c8faf1788024c02930a0c68a6e0edc.info differ diff --git a/Roll a Ball/Library/metadata/38/38e3a8976f0b9c586b6dfbcef4e4066c b/Roll a Ball/Library/metadata/38/38e3a8976f0b9c586b6dfbcef4e4066c new file mode 100644 index 0000000000000000000000000000000000000000..c0b6abaac2e80949170a164acf7d9a3ca989b1a8 Binary files /dev/null and b/Roll a Ball/Library/metadata/38/38e3a8976f0b9c586b6dfbcef4e4066c differ diff --git a/Roll a Ball/Library/metadata/38/38e3a8976f0b9c586b6dfbcef4e4066c.info b/Roll a Ball/Library/metadata/38/38e3a8976f0b9c586b6dfbcef4e4066c.info new file mode 100644 index 0000000000000000000000000000000000000000..85cab2a0be690f9d35e9a6e32db57e658d1be518 Binary files /dev/null and b/Roll a Ball/Library/metadata/38/38e3a8976f0b9c586b6dfbcef4e4066c.info differ diff --git a/Roll a Ball/Library/metadata/39/39728903e57c60021f80449a8bbc0096 b/Roll a Ball/Library/metadata/39/39728903e57c60021f80449a8bbc0096 new file mode 100644 index 0000000000000000000000000000000000000000..ff53ce2932e9ac8367c257abec876e3f54ae94d9 Binary files /dev/null and b/Roll a Ball/Library/metadata/39/39728903e57c60021f80449a8bbc0096 differ diff --git a/Roll a Ball/Library/metadata/39/39728903e57c60021f80449a8bbc0096.info b/Roll a Ball/Library/metadata/39/39728903e57c60021f80449a8bbc0096.info new file mode 100644 index 0000000000000000000000000000000000000000..acd0311c79a6887653ed5b50dce09102ed49447f Binary files /dev/null and b/Roll a Ball/Library/metadata/39/39728903e57c60021f80449a8bbc0096.info differ diff --git a/Roll a Ball/Library/metadata/3a/3a2bf0128e2dd664f91dfba49e36a012 b/Roll a Ball/Library/metadata/3a/3a2bf0128e2dd664f91dfba49e36a012 new file mode 100644 index 0000000000000000000000000000000000000000..ed47e32ec155bcfcb5ef6acf256cbe41cf0aa865 Binary files /dev/null and b/Roll a Ball/Library/metadata/3a/3a2bf0128e2dd664f91dfba49e36a012 differ diff --git a/Roll a Ball/Library/metadata/3a/3a2bf0128e2dd664f91dfba49e36a012.info b/Roll a Ball/Library/metadata/3a/3a2bf0128e2dd664f91dfba49e36a012.info new file mode 100644 index 0000000000000000000000000000000000000000..30150f0346c1a79ee4acd543706e322b7eb6aa74 Binary files /dev/null and b/Roll a Ball/Library/metadata/3a/3a2bf0128e2dd664f91dfba49e36a012.info differ diff --git a/Roll a Ball/Library/metadata/3a/3a2d94c8977984b67984caeff9fa666e b/Roll a Ball/Library/metadata/3a/3a2d94c8977984b67984caeff9fa666e new file mode 100644 index 0000000000000000000000000000000000000000..5f51e1d40ea52ba69495d7ff4ba531899aa6dbc1 Binary files /dev/null and b/Roll a Ball/Library/metadata/3a/3a2d94c8977984b67984caeff9fa666e differ diff --git a/Roll a Ball/Library/metadata/3a/3a2d94c8977984b67984caeff9fa666e.info b/Roll a Ball/Library/metadata/3a/3a2d94c8977984b67984caeff9fa666e.info new file mode 100644 index 0000000000000000000000000000000000000000..c050b64678baa1a594c0aa93f8416bcb59818059 Binary files /dev/null and b/Roll a Ball/Library/metadata/3a/3a2d94c8977984b67984caeff9fa666e.info differ diff --git a/Roll a Ball/Library/metadata/3a/3a84de5cd0624681b6b6dcd8921d912a b/Roll a Ball/Library/metadata/3a/3a84de5cd0624681b6b6dcd8921d912a new file mode 100644 index 0000000000000000000000000000000000000000..13dc115a0b4a0b6f5a51dc15d346403bf28576a9 Binary files /dev/null and b/Roll a Ball/Library/metadata/3a/3a84de5cd0624681b6b6dcd8921d912a differ diff --git a/Roll a Ball/Library/metadata/3a/3a84de5cd0624681b6b6dcd8921d912a.info b/Roll a Ball/Library/metadata/3a/3a84de5cd0624681b6b6dcd8921d912a.info new file mode 100644 index 0000000000000000000000000000000000000000..affdbd8b4c602f9035a51c3a6ea64a1c491c9d72 Binary files /dev/null and b/Roll a Ball/Library/metadata/3a/3a84de5cd0624681b6b6dcd8921d912a.info differ diff --git a/Roll a Ball/Library/metadata/3a/3ab6e6972ecb54e2cbd505692415a7ba b/Roll a Ball/Library/metadata/3a/3ab6e6972ecb54e2cbd505692415a7ba new file mode 100644 index 0000000000000000000000000000000000000000..7f5ac634209ce5477405b71bba55a37ffe633c5c Binary files /dev/null and b/Roll a Ball/Library/metadata/3a/3ab6e6972ecb54e2cbd505692415a7ba differ diff --git a/Roll a Ball/Library/metadata/3a/3ab6e6972ecb54e2cbd505692415a7ba.info b/Roll a Ball/Library/metadata/3a/3ab6e6972ecb54e2cbd505692415a7ba.info new file mode 100644 index 0000000000000000000000000000000000000000..f6c0cee8f914af8b221d6fb4a77ab063546b88a8 Binary files /dev/null and b/Roll a Ball/Library/metadata/3a/3ab6e6972ecb54e2cbd505692415a7ba.info differ diff --git a/Roll a Ball/Library/metadata/3a/3aba9fe1ad29b42ffb0eea781318a626 b/Roll a Ball/Library/metadata/3a/3aba9fe1ad29b42ffb0eea781318a626 new file mode 100644 index 0000000000000000000000000000000000000000..96d37892c2263fcb2652a83f51c677291883aa67 Binary files /dev/null and b/Roll a Ball/Library/metadata/3a/3aba9fe1ad29b42ffb0eea781318a626 differ diff --git a/Roll a Ball/Library/metadata/3a/3aba9fe1ad29b42ffb0eea781318a626.info b/Roll a Ball/Library/metadata/3a/3aba9fe1ad29b42ffb0eea781318a626.info new file mode 100644 index 0000000000000000000000000000000000000000..db9bf004c3837f3fa5ab2adc4a217299e852b9e2 Binary files /dev/null and b/Roll a Ball/Library/metadata/3a/3aba9fe1ad29b42ffb0eea781318a626.info differ diff --git a/Roll a Ball/Library/metadata/3a/3abc8faab9f5cbe4db0336c99fef85ca b/Roll a Ball/Library/metadata/3a/3abc8faab9f5cbe4db0336c99fef85ca new file mode 100644 index 0000000000000000000000000000000000000000..024ce793fc02a9b7aa45549df5af2639ae391ee6 Binary files /dev/null and b/Roll a Ball/Library/metadata/3a/3abc8faab9f5cbe4db0336c99fef85ca differ diff --git a/Roll a Ball/Library/metadata/3a/3abc8faab9f5cbe4db0336c99fef85ca.info b/Roll a Ball/Library/metadata/3a/3abc8faab9f5cbe4db0336c99fef85ca.info new file mode 100644 index 0000000000000000000000000000000000000000..bcc5ca6131cd791eade6f44b86fb7090ba2ae694 Binary files /dev/null and b/Roll a Ball/Library/metadata/3a/3abc8faab9f5cbe4db0336c99fef85ca.info differ diff --git a/Roll a Ball/Library/metadata/3b/3b07d432cba2a4c4f8a2fdea984620b8 b/Roll a Ball/Library/metadata/3b/3b07d432cba2a4c4f8a2fdea984620b8 new file mode 100644 index 0000000000000000000000000000000000000000..a32582041ca06e09b89c876f542734bb0c586dcd Binary files /dev/null and b/Roll a Ball/Library/metadata/3b/3b07d432cba2a4c4f8a2fdea984620b8 differ diff --git a/Roll a Ball/Library/metadata/3b/3b07d432cba2a4c4f8a2fdea984620b8.info b/Roll a Ball/Library/metadata/3b/3b07d432cba2a4c4f8a2fdea984620b8.info new file mode 100644 index 0000000000000000000000000000000000000000..54fac742ac6ad1805f7386155ed46cfceaa5e843 Binary files /dev/null and b/Roll a Ball/Library/metadata/3b/3b07d432cba2a4c4f8a2fdea984620b8.info differ diff --git a/Roll a Ball/Library/metadata/3b/3bb0254b9671413d9d08a855c5090237 b/Roll a Ball/Library/metadata/3b/3bb0254b9671413d9d08a855c5090237 new file mode 100644 index 0000000000000000000000000000000000000000..9cfed0f253232b52aab36930aa677fcb7af3886a Binary files /dev/null and b/Roll a Ball/Library/metadata/3b/3bb0254b9671413d9d08a855c5090237 differ diff --git a/Roll a Ball/Library/metadata/3b/3bb0254b9671413d9d08a855c5090237.info b/Roll a Ball/Library/metadata/3b/3bb0254b9671413d9d08a855c5090237.info new file mode 100644 index 0000000000000000000000000000000000000000..ba15ae0ead3ec60796d2f74ef94860735842815a Binary files /dev/null and b/Roll a Ball/Library/metadata/3b/3bb0254b9671413d9d08a855c5090237.info differ diff --git a/Roll a Ball/Library/metadata/3b/3bda1886f58f4e0ab1139400b160c3ee b/Roll a Ball/Library/metadata/3b/3bda1886f58f4e0ab1139400b160c3ee new file mode 100644 index 0000000000000000000000000000000000000000..f73d00b00a38298041a8122b1ac7020f143550d2 Binary files /dev/null and b/Roll a Ball/Library/metadata/3b/3bda1886f58f4e0ab1139400b160c3ee differ diff --git a/Roll a Ball/Library/metadata/3b/3bda1886f58f4e0ab1139400b160c3ee.info b/Roll a Ball/Library/metadata/3b/3bda1886f58f4e0ab1139400b160c3ee.info new file mode 100644 index 0000000000000000000000000000000000000000..f9c78e95215b12ad025521b6628c4535c8faf6c1 Binary files /dev/null and b/Roll a Ball/Library/metadata/3b/3bda1886f58f4e0ab1139400b160c3ee.info differ diff --git a/Roll a Ball/Library/metadata/3c/3c61c79a991f84470843243e9710743e b/Roll a Ball/Library/metadata/3c/3c61c79a991f84470843243e9710743e new file mode 100644 index 0000000000000000000000000000000000000000..cfb166e22ce748dcb710ffddd3f75446a440f090 Binary files /dev/null and b/Roll a Ball/Library/metadata/3c/3c61c79a991f84470843243e9710743e differ diff --git a/Roll a Ball/Library/metadata/3c/3c61c79a991f84470843243e9710743e.info b/Roll a Ball/Library/metadata/3c/3c61c79a991f84470843243e9710743e.info new file mode 100644 index 0000000000000000000000000000000000000000..e50132536f0f0911d53d783d278a5115b6017ed6 Binary files /dev/null and b/Roll a Ball/Library/metadata/3c/3c61c79a991f84470843243e9710743e.info differ diff --git a/Roll a Ball/Library/metadata/3c/3c6c403084eacec478a1129ce20061ea b/Roll a Ball/Library/metadata/3c/3c6c403084eacec478a1129ce20061ea new file mode 100644 index 0000000000000000000000000000000000000000..7f23a24d7c15f8fdb0d01c81b95b0137ef4aed13 Binary files /dev/null and b/Roll a Ball/Library/metadata/3c/3c6c403084eacec478a1129ce20061ea differ diff --git a/Roll a Ball/Library/metadata/3c/3c6c403084eacec478a1129ce20061ea.info b/Roll a Ball/Library/metadata/3c/3c6c403084eacec478a1129ce20061ea.info new file mode 100644 index 0000000000000000000000000000000000000000..096094e1b42e19e8a454acc49d480cda380f7879 Binary files /dev/null and b/Roll a Ball/Library/metadata/3c/3c6c403084eacec478a1129ce20061ea.info differ diff --git a/Roll a Ball/Library/metadata/3c/3c737f7a9d78541d1ab25f28f045dd32 b/Roll a Ball/Library/metadata/3c/3c737f7a9d78541d1ab25f28f045dd32 new file mode 100644 index 0000000000000000000000000000000000000000..1feb86c1f2609edc444435443e7bb730ec26de22 Binary files /dev/null and b/Roll a Ball/Library/metadata/3c/3c737f7a9d78541d1ab25f28f045dd32 differ diff --git a/Roll a Ball/Library/metadata/3c/3c737f7a9d78541d1ab25f28f045dd32.info b/Roll a Ball/Library/metadata/3c/3c737f7a9d78541d1ab25f28f045dd32.info new file mode 100644 index 0000000000000000000000000000000000000000..264f3052a9f328f83508e14ad1f9abbf994663a7 Binary files /dev/null and b/Roll a Ball/Library/metadata/3c/3c737f7a9d78541d1ab25f28f045dd32.info differ diff --git a/Roll a Ball/Library/metadata/3c/3cebe1a96232b44388b30b2f72dde434 b/Roll a Ball/Library/metadata/3c/3cebe1a96232b44388b30b2f72dde434 new file mode 100644 index 0000000000000000000000000000000000000000..cee934dbf0232eed85073978ece421d6c5e2a832 Binary files /dev/null and b/Roll a Ball/Library/metadata/3c/3cebe1a96232b44388b30b2f72dde434 differ diff --git a/Roll a Ball/Library/metadata/3c/3cebe1a96232b44388b30b2f72dde434.info b/Roll a Ball/Library/metadata/3c/3cebe1a96232b44388b30b2f72dde434.info new file mode 100644 index 0000000000000000000000000000000000000000..a042f2bb2053740073801869d32ef21db295f9dc Binary files /dev/null and b/Roll a Ball/Library/metadata/3c/3cebe1a96232b44388b30b2f72dde434.info differ diff --git a/Roll a Ball/Library/metadata/3c/3cf132d4fa07f4f0cb2883499c5c7dd0 b/Roll a Ball/Library/metadata/3c/3cf132d4fa07f4f0cb2883499c5c7dd0 new file mode 100644 index 0000000000000000000000000000000000000000..c96df2a8fd08ef6cbd6731e824a728ba9e8a3851 Binary files /dev/null and b/Roll a Ball/Library/metadata/3c/3cf132d4fa07f4f0cb2883499c5c7dd0 differ diff --git a/Roll a Ball/Library/metadata/3c/3cf132d4fa07f4f0cb2883499c5c7dd0.info b/Roll a Ball/Library/metadata/3c/3cf132d4fa07f4f0cb2883499c5c7dd0.info new file mode 100644 index 0000000000000000000000000000000000000000..a8d9dcc0c57fce4e579f8597d4b290979ebe1c9c Binary files /dev/null and b/Roll a Ball/Library/metadata/3c/3cf132d4fa07f4f0cb2883499c5c7dd0.info differ diff --git a/Roll a Ball/Library/metadata/3d/3dcbbc060dea46168ffc09a580836240 b/Roll a Ball/Library/metadata/3d/3dcbbc060dea46168ffc09a580836240 new file mode 100644 index 0000000000000000000000000000000000000000..d4fda551b72681889e73f3e767622b6af90771d6 Binary files /dev/null and b/Roll a Ball/Library/metadata/3d/3dcbbc060dea46168ffc09a580836240 differ diff --git a/Roll a Ball/Library/metadata/3d/3dcbbc060dea46168ffc09a580836240.info b/Roll a Ball/Library/metadata/3d/3dcbbc060dea46168ffc09a580836240.info new file mode 100644 index 0000000000000000000000000000000000000000..48680862794ab008b5deaec90443cf3324c5cfce Binary files /dev/null and b/Roll a Ball/Library/metadata/3d/3dcbbc060dea46168ffc09a580836240.info differ diff --git a/Roll a Ball/Library/metadata/3e/3e9a2175e0404f7ea30b2b694850bae0 b/Roll a Ball/Library/metadata/3e/3e9a2175e0404f7ea30b2b694850bae0 new file mode 100644 index 0000000000000000000000000000000000000000..d027ae0bac56df9978580aca603edb5f48771a6d Binary files /dev/null and b/Roll a Ball/Library/metadata/3e/3e9a2175e0404f7ea30b2b694850bae0 differ diff --git a/Roll a Ball/Library/metadata/3e/3e9a2175e0404f7ea30b2b694850bae0.info b/Roll a Ball/Library/metadata/3e/3e9a2175e0404f7ea30b2b694850bae0.info new file mode 100644 index 0000000000000000000000000000000000000000..5a99412c692ee80c49d3fec0bae7667aba275a77 Binary files /dev/null and b/Roll a Ball/Library/metadata/3e/3e9a2175e0404f7ea30b2b694850bae0.info differ diff --git a/Roll a Ball/Library/metadata/3e/3ee40aa79cd242a5b53b0b0ca4f13f0f b/Roll a Ball/Library/metadata/3e/3ee40aa79cd242a5b53b0b0ca4f13f0f new file mode 100644 index 0000000000000000000000000000000000000000..a16ed6692005cd5368668efc44705c5162b6f586 Binary files /dev/null and b/Roll a Ball/Library/metadata/3e/3ee40aa79cd242a5b53b0b0ca4f13f0f differ diff --git a/Roll a Ball/Library/metadata/3e/3ee40aa79cd242a5b53b0b0ca4f13f0f.info b/Roll a Ball/Library/metadata/3e/3ee40aa79cd242a5b53b0b0ca4f13f0f.info new file mode 100644 index 0000000000000000000000000000000000000000..e321bda299f0db558cb3cc01f9d298a92a3f615d Binary files /dev/null and b/Roll a Ball/Library/metadata/3e/3ee40aa79cd242a5b53b0b0ca4f13f0f.info differ diff --git a/Roll a Ball/Library/metadata/3f/3f0c4389c854bcaf848af1ea310dbada b/Roll a Ball/Library/metadata/3f/3f0c4389c854bcaf848af1ea310dbada new file mode 100644 index 0000000000000000000000000000000000000000..c863e10c4ae2d4edac37da95d1809f1db595b198 Binary files /dev/null and b/Roll a Ball/Library/metadata/3f/3f0c4389c854bcaf848af1ea310dbada differ diff --git a/Roll a Ball/Library/metadata/3f/3f0c4389c854bcaf848af1ea310dbada.info b/Roll a Ball/Library/metadata/3f/3f0c4389c854bcaf848af1ea310dbada.info new file mode 100644 index 0000000000000000000000000000000000000000..3bed3c1d86ccf653e045a5663bcdd26b2c31bd18 Binary files /dev/null and b/Roll a Ball/Library/metadata/3f/3f0c4389c854bcaf848af1ea310dbada.info differ diff --git a/Roll a Ball/Library/metadata/3f/3f3e22b18940a4e828a5170574a3617e b/Roll a Ball/Library/metadata/3f/3f3e22b18940a4e828a5170574a3617e new file mode 100644 index 0000000000000000000000000000000000000000..c73b10b0587e6efb98a6b56a6b7d4fe28141a157 Binary files /dev/null and b/Roll a Ball/Library/metadata/3f/3f3e22b18940a4e828a5170574a3617e differ diff --git a/Roll a Ball/Library/metadata/3f/3f3e22b18940a4e828a5170574a3617e.info b/Roll a Ball/Library/metadata/3f/3f3e22b18940a4e828a5170574a3617e.info new file mode 100644 index 0000000000000000000000000000000000000000..d0a89d2e4d395bc81dc3ef52b823f9a2a13d86d6 Binary files /dev/null and b/Roll a Ball/Library/metadata/3f/3f3e22b18940a4e828a5170574a3617e.info differ diff --git a/Roll a Ball/Library/metadata/3f/3fdd83b151eb8d25c5e2f82fc39dcb04 b/Roll a Ball/Library/metadata/3f/3fdd83b151eb8d25c5e2f82fc39dcb04 new file mode 100644 index 0000000000000000000000000000000000000000..dd5abdd2127595ae75d215006c17e2299969b873 Binary files /dev/null and b/Roll a Ball/Library/metadata/3f/3fdd83b151eb8d25c5e2f82fc39dcb04 differ diff --git a/Roll a Ball/Library/metadata/3f/3fdd83b151eb8d25c5e2f82fc39dcb04.info b/Roll a Ball/Library/metadata/3f/3fdd83b151eb8d25c5e2f82fc39dcb04.info new file mode 100644 index 0000000000000000000000000000000000000000..50a85d7428f959d578daa5b59930ec8597e262c2 Binary files /dev/null and b/Roll a Ball/Library/metadata/3f/3fdd83b151eb8d25c5e2f82fc39dcb04.info differ diff --git a/Roll a Ball/Library/metadata/40/405b9b51bb344a128608d968297df79c b/Roll a Ball/Library/metadata/40/405b9b51bb344a128608d968297df79c new file mode 100644 index 0000000000000000000000000000000000000000..fca6498c40a529d3e5f10ddd8f696dad10fe62f4 Binary files /dev/null and b/Roll a Ball/Library/metadata/40/405b9b51bb344a128608d968297df79c differ diff --git a/Roll a Ball/Library/metadata/40/405b9b51bb344a128608d968297df79c.info b/Roll a Ball/Library/metadata/40/405b9b51bb344a128608d968297df79c.info new file mode 100644 index 0000000000000000000000000000000000000000..d181f74bc0931b810b6988e23bbc86553ff4ef90 Binary files /dev/null and b/Roll a Ball/Library/metadata/40/405b9b51bb344a128608d968297df79c.info differ diff --git a/Roll a Ball/Library/metadata/40/40bf3cec17fa0b49fe04443c8332d638 b/Roll a Ball/Library/metadata/40/40bf3cec17fa0b49fe04443c8332d638 new file mode 100644 index 0000000000000000000000000000000000000000..aedb797dd87a63c55e8295da6ab7c063fdc4178d Binary files /dev/null and b/Roll a Ball/Library/metadata/40/40bf3cec17fa0b49fe04443c8332d638 differ diff --git a/Roll a Ball/Library/metadata/40/40bf3cec17fa0b49fe04443c8332d638.info b/Roll a Ball/Library/metadata/40/40bf3cec17fa0b49fe04443c8332d638.info new file mode 100644 index 0000000000000000000000000000000000000000..62ef5a77f51d1d68366b526609f3b00bd92d4dc5 Binary files /dev/null and b/Roll a Ball/Library/metadata/40/40bf3cec17fa0b49fe04443c8332d638.info differ diff --git a/Roll a Ball/Library/metadata/40/40f980217d9196e4baa9ebd2ac1328af b/Roll a Ball/Library/metadata/40/40f980217d9196e4baa9ebd2ac1328af new file mode 100644 index 0000000000000000000000000000000000000000..cd085234e40186b99ba7b57fd9c693fcf10006c3 Binary files /dev/null and b/Roll a Ball/Library/metadata/40/40f980217d9196e4baa9ebd2ac1328af differ diff --git a/Roll a Ball/Library/metadata/40/40f980217d9196e4baa9ebd2ac1328af.info b/Roll a Ball/Library/metadata/40/40f980217d9196e4baa9ebd2ac1328af.info new file mode 100644 index 0000000000000000000000000000000000000000..948cffecf9976a34b7681f30b1e84f9f00d08a23 Binary files /dev/null and b/Roll a Ball/Library/metadata/40/40f980217d9196e4baa9ebd2ac1328af.info differ diff --git a/Roll a Ball/Library/metadata/41/4113173d5e95493ab8765d7b08371de4 b/Roll a Ball/Library/metadata/41/4113173d5e95493ab8765d7b08371de4 new file mode 100644 index 0000000000000000000000000000000000000000..ada3c5ebb68e857ed8e5db976f5389fa2e4dc4cd Binary files /dev/null and b/Roll a Ball/Library/metadata/41/4113173d5e95493ab8765d7b08371de4 differ diff --git a/Roll a Ball/Library/metadata/41/4113173d5e95493ab8765d7b08371de4.info b/Roll a Ball/Library/metadata/41/4113173d5e95493ab8765d7b08371de4.info new file mode 100644 index 0000000000000000000000000000000000000000..3b34c0afab3dfafade6fd0f4c4a829c34aba415d Binary files /dev/null and b/Roll a Ball/Library/metadata/41/4113173d5e95493ab8765d7b08371de4.info differ diff --git a/Roll a Ball/Library/metadata/41/41b96614b2e6494ba995ddcd252d11ae b/Roll a Ball/Library/metadata/41/41b96614b2e6494ba995ddcd252d11ae new file mode 100644 index 0000000000000000000000000000000000000000..0f4a8ff2982e7c97e51bd105a87dc0fec56a1c0b Binary files /dev/null and b/Roll a Ball/Library/metadata/41/41b96614b2e6494ba995ddcd252d11ae differ diff --git a/Roll a Ball/Library/metadata/41/41b96614b2e6494ba995ddcd252d11ae.info b/Roll a Ball/Library/metadata/41/41b96614b2e6494ba995ddcd252d11ae.info new file mode 100644 index 0000000000000000000000000000000000000000..07eec5e8f94a9af77272ed106923620b6d5dbfa7 Binary files /dev/null and b/Roll a Ball/Library/metadata/41/41b96614b2e6494ba995ddcd252d11ae.info differ diff --git a/Roll a Ball/Library/metadata/42/42064bc130be4c44b288d249a44b356f b/Roll a Ball/Library/metadata/42/42064bc130be4c44b288d249a44b356f new file mode 100644 index 0000000000000000000000000000000000000000..79257658939c5309a6f1a689c71e771041885b55 Binary files /dev/null and b/Roll a Ball/Library/metadata/42/42064bc130be4c44b288d249a44b356f differ diff --git a/Roll a Ball/Library/metadata/42/42064bc130be4c44b288d249a44b356f.info b/Roll a Ball/Library/metadata/42/42064bc130be4c44b288d249a44b356f.info new file mode 100644 index 0000000000000000000000000000000000000000..31e5b0765a25413f81b8490141d4b82a9ddd33a9 Binary files /dev/null and b/Roll a Ball/Library/metadata/42/42064bc130be4c44b288d249a44b356f.info differ diff --git a/Roll a Ball/Library/metadata/42/42fe78c8fe682715a2cb531422e6ccb3 b/Roll a Ball/Library/metadata/42/42fe78c8fe682715a2cb531422e6ccb3 new file mode 100644 index 0000000000000000000000000000000000000000..b43837110f9a3e18c5a0a70e175689c25b07563c Binary files /dev/null and b/Roll a Ball/Library/metadata/42/42fe78c8fe682715a2cb531422e6ccb3 differ diff --git a/Roll a Ball/Library/metadata/42/42fe78c8fe682715a2cb531422e6ccb3.info b/Roll a Ball/Library/metadata/42/42fe78c8fe682715a2cb531422e6ccb3.info new file mode 100644 index 0000000000000000000000000000000000000000..ea0149c455faa62848d5bbf12322e8779f37a3f3 Binary files /dev/null and b/Roll a Ball/Library/metadata/42/42fe78c8fe682715a2cb531422e6ccb3.info differ diff --git a/Roll a Ball/Library/metadata/43/438efd46088d408d8a53f707fa68d976 b/Roll a Ball/Library/metadata/43/438efd46088d408d8a53f707fa68d976 new file mode 100644 index 0000000000000000000000000000000000000000..e6358fba696f2eaab6fd2a710bced6176e53c064 Binary files /dev/null and b/Roll a Ball/Library/metadata/43/438efd46088d408d8a53f707fa68d976 differ diff --git a/Roll a Ball/Library/metadata/43/438efd46088d408d8a53f707fa68d976.info b/Roll a Ball/Library/metadata/43/438efd46088d408d8a53f707fa68d976.info new file mode 100644 index 0000000000000000000000000000000000000000..260961b808878cbc57a8f7df7b266a15160add69 Binary files /dev/null and b/Roll a Ball/Library/metadata/43/438efd46088d408d8a53f707fa68d976.info differ diff --git a/Roll a Ball/Library/metadata/44/448aaa781aea44811a5d66e3edac37e4 b/Roll a Ball/Library/metadata/44/448aaa781aea44811a5d66e3edac37e4 new file mode 100644 index 0000000000000000000000000000000000000000..4af31abf5b3d5e5dc76deb7f150e007fb28704f0 Binary files /dev/null and b/Roll a Ball/Library/metadata/44/448aaa781aea44811a5d66e3edac37e4 differ diff --git a/Roll a Ball/Library/metadata/44/448aaa781aea44811a5d66e3edac37e4.info b/Roll a Ball/Library/metadata/44/448aaa781aea44811a5d66e3edac37e4.info new file mode 100644 index 0000000000000000000000000000000000000000..9e7bf4b655180041f89d0ca2153c1c5eae3f863e Binary files /dev/null and b/Roll a Ball/Library/metadata/44/448aaa781aea44811a5d66e3edac37e4.info differ diff --git a/Roll a Ball/Library/metadata/44/44e1d646473a40178712cb2150f54cec b/Roll a Ball/Library/metadata/44/44e1d646473a40178712cb2150f54cec new file mode 100644 index 0000000000000000000000000000000000000000..3e932ef9aec386682407fc548cee9bcc61aad7c9 Binary files /dev/null and b/Roll a Ball/Library/metadata/44/44e1d646473a40178712cb2150f54cec differ diff --git a/Roll a Ball/Library/metadata/44/44e1d646473a40178712cb2150f54cec.info b/Roll a Ball/Library/metadata/44/44e1d646473a40178712cb2150f54cec.info new file mode 100644 index 0000000000000000000000000000000000000000..d84964d43bc51ef06159d4756494357c1e80f028 Binary files /dev/null and b/Roll a Ball/Library/metadata/44/44e1d646473a40178712cb2150f54cec.info differ diff --git a/Roll a Ball/Library/metadata/44/44f39a74ca5ee4bf5936b17e901f251c b/Roll a Ball/Library/metadata/44/44f39a74ca5ee4bf5936b17e901f251c new file mode 100644 index 0000000000000000000000000000000000000000..35d1081c5a19df3f1f4064f9c4757f48154a5231 Binary files /dev/null and b/Roll a Ball/Library/metadata/44/44f39a74ca5ee4bf5936b17e901f251c differ diff --git a/Roll a Ball/Library/metadata/44/44f39a74ca5ee4bf5936b17e901f251c.info b/Roll a Ball/Library/metadata/44/44f39a74ca5ee4bf5936b17e901f251c.info new file mode 100644 index 0000000000000000000000000000000000000000..9cbf3503669f62ab761a13e93e4746c38511e191 Binary files /dev/null and b/Roll a Ball/Library/metadata/44/44f39a74ca5ee4bf5936b17e901f251c.info differ diff --git a/Roll a Ball/Library/metadata/45/4506ac79f5b274cb1b249ed7f4abfb9a b/Roll a Ball/Library/metadata/45/4506ac79f5b274cb1b249ed7f4abfb9a new file mode 100644 index 0000000000000000000000000000000000000000..bcd41414e0cbdefe8c9e0fafdc3b95f5c04107f5 Binary files /dev/null and b/Roll a Ball/Library/metadata/45/4506ac79f5b274cb1b249ed7f4abfb9a differ diff --git a/Roll a Ball/Library/metadata/45/4506ac79f5b274cb1b249ed7f4abfb9a.info b/Roll a Ball/Library/metadata/45/4506ac79f5b274cb1b249ed7f4abfb9a.info new file mode 100644 index 0000000000000000000000000000000000000000..52ae891a2e4f221537edb8e6092ce0d2264ff6e2 Binary files /dev/null and b/Roll a Ball/Library/metadata/45/4506ac79f5b274cb1b249ed7f4abfb9a.info differ diff --git a/Roll a Ball/Library/metadata/45/453f100e6bdae4dfd9e655927819dc85 b/Roll a Ball/Library/metadata/45/453f100e6bdae4dfd9e655927819dc85 new file mode 100644 index 0000000000000000000000000000000000000000..9b47444091b4c8628b2887fce7cabcc8a4874cb1 Binary files /dev/null and b/Roll a Ball/Library/metadata/45/453f100e6bdae4dfd9e655927819dc85 differ diff --git a/Roll a Ball/Library/metadata/45/453f100e6bdae4dfd9e655927819dc85.info b/Roll a Ball/Library/metadata/45/453f100e6bdae4dfd9e655927819dc85.info new file mode 100644 index 0000000000000000000000000000000000000000..c9cef47060dc439f761625555d3f6422765f1157 Binary files /dev/null and b/Roll a Ball/Library/metadata/45/453f100e6bdae4dfd9e655927819dc85.info differ diff --git a/Roll a Ball/Library/metadata/46/46098a81a64a45c5b756320e10a22f13 b/Roll a Ball/Library/metadata/46/46098a81a64a45c5b756320e10a22f13 new file mode 100644 index 0000000000000000000000000000000000000000..9ead4c5aab26eb9bbb5d03a0c396a61ab4c5205c Binary files /dev/null and b/Roll a Ball/Library/metadata/46/46098a81a64a45c5b756320e10a22f13 differ diff --git a/Roll a Ball/Library/metadata/46/46098a81a64a45c5b756320e10a22f13.info b/Roll a Ball/Library/metadata/46/46098a81a64a45c5b756320e10a22f13.info new file mode 100644 index 0000000000000000000000000000000000000000..c336c6068ee5dc647284e676c09f72873d0638de Binary files /dev/null and b/Roll a Ball/Library/metadata/46/46098a81a64a45c5b756320e10a22f13.info differ diff --git a/Roll a Ball/Library/metadata/46/46c02d8d6499b4309ac1ec5d0b818585 b/Roll a Ball/Library/metadata/46/46c02d8d6499b4309ac1ec5d0b818585 new file mode 100644 index 0000000000000000000000000000000000000000..c14f1d04207753153d6d8c9abd210e140e558e13 Binary files /dev/null and b/Roll a Ball/Library/metadata/46/46c02d8d6499b4309ac1ec5d0b818585 differ diff --git a/Roll a Ball/Library/metadata/46/46c02d8d6499b4309ac1ec5d0b818585.info b/Roll a Ball/Library/metadata/46/46c02d8d6499b4309ac1ec5d0b818585.info new file mode 100644 index 0000000000000000000000000000000000000000..2689ece602beda21f738ecb40eaae88db04f94a3 Binary files /dev/null and b/Roll a Ball/Library/metadata/46/46c02d8d6499b4309ac1ec5d0b818585.info differ diff --git a/Roll a Ball/Library/metadata/47/470530e667ad4475786b28fa3187ce95 b/Roll a Ball/Library/metadata/47/470530e667ad4475786b28fa3187ce95 new file mode 100644 index 0000000000000000000000000000000000000000..70087b68b43d85892615de60e06393fe7195a323 Binary files /dev/null and b/Roll a Ball/Library/metadata/47/470530e667ad4475786b28fa3187ce95 differ diff --git a/Roll a Ball/Library/metadata/47/470530e667ad4475786b28fa3187ce95.info b/Roll a Ball/Library/metadata/47/470530e667ad4475786b28fa3187ce95.info new file mode 100644 index 0000000000000000000000000000000000000000..603a5fa6674958e150421f96f6eaabf9b5a48d35 Binary files /dev/null and b/Roll a Ball/Library/metadata/47/470530e667ad4475786b28fa3187ce95.info differ diff --git a/Roll a Ball/Library/metadata/48/48986928cc2a449dbaecdd1654bc9bf6 b/Roll a Ball/Library/metadata/48/48986928cc2a449dbaecdd1654bc9bf6 new file mode 100644 index 0000000000000000000000000000000000000000..f13f8682be6542f0c4d544795b40506f75b55a2b Binary files /dev/null and b/Roll a Ball/Library/metadata/48/48986928cc2a449dbaecdd1654bc9bf6 differ diff --git a/Roll a Ball/Library/metadata/48/48986928cc2a449dbaecdd1654bc9bf6.info b/Roll a Ball/Library/metadata/48/48986928cc2a449dbaecdd1654bc9bf6.info new file mode 100644 index 0000000000000000000000000000000000000000..6076edf1f4627935e9fd45a5182c591263f3aaf1 Binary files /dev/null and b/Roll a Ball/Library/metadata/48/48986928cc2a449dbaecdd1654bc9bf6.info differ diff --git a/Roll a Ball/Library/metadata/48/48b10b41f58d5b49717f376cda59eeb8 b/Roll a Ball/Library/metadata/48/48b10b41f58d5b49717f376cda59eeb8 new file mode 100644 index 0000000000000000000000000000000000000000..08f1ca3d0d37158098d18e2c7eaffe52cd666678 Binary files /dev/null and b/Roll a Ball/Library/metadata/48/48b10b41f58d5b49717f376cda59eeb8 differ diff --git a/Roll a Ball/Library/metadata/48/48b10b41f58d5b49717f376cda59eeb8.info b/Roll a Ball/Library/metadata/48/48b10b41f58d5b49717f376cda59eeb8.info new file mode 100644 index 0000000000000000000000000000000000000000..14b42803ef0647f16be8d4b597d307a6f2aea4c9 Binary files /dev/null and b/Roll a Ball/Library/metadata/48/48b10b41f58d5b49717f376cda59eeb8.info differ diff --git a/Roll a Ball/Library/metadata/48/48d034c499ee4697af9dd6e327110249 b/Roll a Ball/Library/metadata/48/48d034c499ee4697af9dd6e327110249 new file mode 100644 index 0000000000000000000000000000000000000000..8303d964677f23dad82a36f476c222b766610300 Binary files /dev/null and b/Roll a Ball/Library/metadata/48/48d034c499ee4697af9dd6e327110249 differ diff --git a/Roll a Ball/Library/metadata/48/48d034c499ee4697af9dd6e327110249.info b/Roll a Ball/Library/metadata/48/48d034c499ee4697af9dd6e327110249.info new file mode 100644 index 0000000000000000000000000000000000000000..f3c6a5006f41b92842d5c75d02745e295c11961c Binary files /dev/null and b/Roll a Ball/Library/metadata/48/48d034c499ee4697af9dd6e327110249.info differ diff --git a/Roll a Ball/Library/metadata/49/490fe93dbc954e3ba3651b7f55eaba70 b/Roll a Ball/Library/metadata/49/490fe93dbc954e3ba3651b7f55eaba70 new file mode 100644 index 0000000000000000000000000000000000000000..24710a064dab05577e0de139a07af8c17337629d Binary files /dev/null and b/Roll a Ball/Library/metadata/49/490fe93dbc954e3ba3651b7f55eaba70 differ diff --git a/Roll a Ball/Library/metadata/49/490fe93dbc954e3ba3651b7f55eaba70.info b/Roll a Ball/Library/metadata/49/490fe93dbc954e3ba3651b7f55eaba70.info new file mode 100644 index 0000000000000000000000000000000000000000..eedccbda3680d502aed6e4f22e258823cf2d707c Binary files /dev/null and b/Roll a Ball/Library/metadata/49/490fe93dbc954e3ba3651b7f55eaba70.info differ diff --git a/Roll a Ball/Library/metadata/49/49679f302ac6408697f6b9314a38985c b/Roll a Ball/Library/metadata/49/49679f302ac6408697f6b9314a38985c new file mode 100644 index 0000000000000000000000000000000000000000..7dff07aae44a54a56c9efd97beaf29fff032779e Binary files /dev/null and b/Roll a Ball/Library/metadata/49/49679f302ac6408697f6b9314a38985c differ diff --git a/Roll a Ball/Library/metadata/49/49679f302ac6408697f6b9314a38985c.info b/Roll a Ball/Library/metadata/49/49679f302ac6408697f6b9314a38985c.info new file mode 100644 index 0000000000000000000000000000000000000000..d83cc2ccc6d113ea53f669fca5301ceecb6c4406 Binary files /dev/null and b/Roll a Ball/Library/metadata/49/49679f302ac6408697f6b9314a38985c.info differ diff --git a/Roll a Ball/Library/metadata/4a/4a3ecb1425d14502837abea459cf2b70 b/Roll a Ball/Library/metadata/4a/4a3ecb1425d14502837abea459cf2b70 new file mode 100644 index 0000000000000000000000000000000000000000..37172c0ee8650e9227f6bc8cf35f3d1e736cb95c Binary files /dev/null and b/Roll a Ball/Library/metadata/4a/4a3ecb1425d14502837abea459cf2b70 differ diff --git a/Roll a Ball/Library/metadata/4a/4a3ecb1425d14502837abea459cf2b70.info b/Roll a Ball/Library/metadata/4a/4a3ecb1425d14502837abea459cf2b70.info new file mode 100644 index 0000000000000000000000000000000000000000..54adf87e77b9798af7ea16d1aaee2cbb32f088e7 Binary files /dev/null and b/Roll a Ball/Library/metadata/4a/4a3ecb1425d14502837abea459cf2b70.info differ diff --git a/Roll a Ball/Library/metadata/4a/4ac5b6a65aaeb59478e3b78660e9f134 b/Roll a Ball/Library/metadata/4a/4ac5b6a65aaeb59478e3b78660e9f134 new file mode 100644 index 0000000000000000000000000000000000000000..9e849ac2b3a49b044cea64ba56b314c82c366229 Binary files /dev/null and b/Roll a Ball/Library/metadata/4a/4ac5b6a65aaeb59478e3b78660e9f134 differ diff --git a/Roll a Ball/Library/metadata/4a/4ac5b6a65aaeb59478e3b78660e9f134.info b/Roll a Ball/Library/metadata/4a/4ac5b6a65aaeb59478e3b78660e9f134.info new file mode 100644 index 0000000000000000000000000000000000000000..f66cafedae128c64d61973c44109d0fcc97ca8dd Binary files /dev/null and b/Roll a Ball/Library/metadata/4a/4ac5b6a65aaeb59478e3b78660e9f134.info differ diff --git a/Roll a Ball/Library/metadata/4a/4ae64f3f72004807a9f919f9c27af0db b/Roll a Ball/Library/metadata/4a/4ae64f3f72004807a9f919f9c27af0db new file mode 100644 index 0000000000000000000000000000000000000000..550a23b3b6431f3864bff4529e44a87a7603b7ac Binary files /dev/null and b/Roll a Ball/Library/metadata/4a/4ae64f3f72004807a9f919f9c27af0db differ diff --git a/Roll a Ball/Library/metadata/4a/4ae64f3f72004807a9f919f9c27af0db.info b/Roll a Ball/Library/metadata/4a/4ae64f3f72004807a9f919f9c27af0db.info new file mode 100644 index 0000000000000000000000000000000000000000..3a7b1028067ad6be941fe6856e2ad665f8160df8 Binary files /dev/null and b/Roll a Ball/Library/metadata/4a/4ae64f3f72004807a9f919f9c27af0db.info differ diff --git a/Roll a Ball/Library/metadata/4a/4aed8adb6a5c5464287b996ec7ba74a8 b/Roll a Ball/Library/metadata/4a/4aed8adb6a5c5464287b996ec7ba74a8 new file mode 100644 index 0000000000000000000000000000000000000000..50281695e2e4d50f0603650c60d915c6cccb1fe4 Binary files /dev/null and b/Roll a Ball/Library/metadata/4a/4aed8adb6a5c5464287b996ec7ba74a8 differ diff --git a/Roll a Ball/Library/metadata/4a/4aed8adb6a5c5464287b996ec7ba74a8.info b/Roll a Ball/Library/metadata/4a/4aed8adb6a5c5464287b996ec7ba74a8.info new file mode 100644 index 0000000000000000000000000000000000000000..bacaf714029dd94ae77c5e4f0114c1accefc2ba4 Binary files /dev/null and b/Roll a Ball/Library/metadata/4a/4aed8adb6a5c5464287b996ec7ba74a8.info differ diff --git a/Roll a Ball/Library/metadata/4a/4aef0654412f5724581bb426d35a9949 b/Roll a Ball/Library/metadata/4a/4aef0654412f5724581bb426d35a9949 new file mode 100644 index 0000000000000000000000000000000000000000..24380ea1b40b81bdf0d23829587ecc7b92b5f041 Binary files /dev/null and b/Roll a Ball/Library/metadata/4a/4aef0654412f5724581bb426d35a9949 differ diff --git a/Roll a Ball/Library/metadata/4a/4aef0654412f5724581bb426d35a9949.info b/Roll a Ball/Library/metadata/4a/4aef0654412f5724581bb426d35a9949.info new file mode 100644 index 0000000000000000000000000000000000000000..2b0a48231476ccff7ed69375ff4d004478a523bf Binary files /dev/null and b/Roll a Ball/Library/metadata/4a/4aef0654412f5724581bb426d35a9949.info differ diff --git a/Roll a Ball/Library/metadata/4b/4b3fa4bde7f1451a8218c03ee6a8ded8 b/Roll a Ball/Library/metadata/4b/4b3fa4bde7f1451a8218c03ee6a8ded8 new file mode 100644 index 0000000000000000000000000000000000000000..342a9607402d85ab88ff818fa4fe054b30a54170 Binary files /dev/null and b/Roll a Ball/Library/metadata/4b/4b3fa4bde7f1451a8218c03ee6a8ded8 differ diff --git a/Roll a Ball/Library/metadata/4b/4b3fa4bde7f1451a8218c03ee6a8ded8.info b/Roll a Ball/Library/metadata/4b/4b3fa4bde7f1451a8218c03ee6a8ded8.info new file mode 100644 index 0000000000000000000000000000000000000000..d419994f563fc7cde8ad668a1f75a8a00771ef93 Binary files /dev/null and b/Roll a Ball/Library/metadata/4b/4b3fa4bde7f1451a8218c03ee6a8ded8.info differ diff --git a/Roll a Ball/Library/metadata/4b/4b518b37798c97b0f860962cbf615533 b/Roll a Ball/Library/metadata/4b/4b518b37798c97b0f860962cbf615533 new file mode 100644 index 0000000000000000000000000000000000000000..dc8a4e7b776ab48f68de832a7c35bb1145c0cef2 Binary files /dev/null and b/Roll a Ball/Library/metadata/4b/4b518b37798c97b0f860962cbf615533 differ diff --git a/Roll a Ball/Library/metadata/4b/4b518b37798c97b0f860962cbf615533.info b/Roll a Ball/Library/metadata/4b/4b518b37798c97b0f860962cbf615533.info new file mode 100644 index 0000000000000000000000000000000000000000..fa8cee0c4517f5dda71f5dfca6b7f494ea8d68a7 Binary files /dev/null and b/Roll a Ball/Library/metadata/4b/4b518b37798c97b0f860962cbf615533.info differ diff --git a/Roll a Ball/Library/metadata/4b/4ba2329b63d54f0187bcaa12486b1b0f b/Roll a Ball/Library/metadata/4b/4ba2329b63d54f0187bcaa12486b1b0f new file mode 100644 index 0000000000000000000000000000000000000000..c90b88adbefc6c124f58c6d98352c3230976d000 Binary files /dev/null and b/Roll a Ball/Library/metadata/4b/4ba2329b63d54f0187bcaa12486b1b0f differ diff --git a/Roll a Ball/Library/metadata/4b/4ba2329b63d54f0187bcaa12486b1b0f.info b/Roll a Ball/Library/metadata/4b/4ba2329b63d54f0187bcaa12486b1b0f.info new file mode 100644 index 0000000000000000000000000000000000000000..20ea559d61eb79c102029f278f0d8af767ea766a Binary files /dev/null and b/Roll a Ball/Library/metadata/4b/4ba2329b63d54f0187bcaa12486b1b0f.info differ diff --git a/Roll a Ball/Library/metadata/4c/4c433abcdb28444ebb7bd395ba5c76fc b/Roll a Ball/Library/metadata/4c/4c433abcdb28444ebb7bd395ba5c76fc new file mode 100644 index 0000000000000000000000000000000000000000..3b8229fcc950a62a414d7bd0048f065c32f11ef4 Binary files /dev/null and b/Roll a Ball/Library/metadata/4c/4c433abcdb28444ebb7bd395ba5c76fc differ diff --git a/Roll a Ball/Library/metadata/4c/4c433abcdb28444ebb7bd395ba5c76fc.info b/Roll a Ball/Library/metadata/4c/4c433abcdb28444ebb7bd395ba5c76fc.info new file mode 100644 index 0000000000000000000000000000000000000000..9012d0a6d904b6fea7b594071ea3e8dfdefd459d Binary files /dev/null and b/Roll a Ball/Library/metadata/4c/4c433abcdb28444ebb7bd395ba5c76fc.info differ diff --git a/Roll a Ball/Library/metadata/4c/4c6fe94acbb24417c988bab18cbd5209 b/Roll a Ball/Library/metadata/4c/4c6fe94acbb24417c988bab18cbd5209 new file mode 100644 index 0000000000000000000000000000000000000000..9cb2a42426de327a4c198a69b27265fabf43c4a4 Binary files /dev/null and b/Roll a Ball/Library/metadata/4c/4c6fe94acbb24417c988bab18cbd5209 differ diff --git a/Roll a Ball/Library/metadata/4c/4c6fe94acbb24417c988bab18cbd5209.info b/Roll a Ball/Library/metadata/4c/4c6fe94acbb24417c988bab18cbd5209.info new file mode 100644 index 0000000000000000000000000000000000000000..f0c1fbb6ffa9f60c24b29d259114688b71a3cb0f Binary files /dev/null and b/Roll a Ball/Library/metadata/4c/4c6fe94acbb24417c988bab18cbd5209.info differ diff --git a/Roll a Ball/Library/metadata/4d/4dfd3f5da88944ec6ac5977d676c30c6 b/Roll a Ball/Library/metadata/4d/4dfd3f5da88944ec6ac5977d676c30c6 new file mode 100644 index 0000000000000000000000000000000000000000..e8a2bf1d394e3e08876060e0400427c8dae5304e Binary files /dev/null and b/Roll a Ball/Library/metadata/4d/4dfd3f5da88944ec6ac5977d676c30c6 differ diff --git a/Roll a Ball/Library/metadata/4d/4dfd3f5da88944ec6ac5977d676c30c6.info b/Roll a Ball/Library/metadata/4d/4dfd3f5da88944ec6ac5977d676c30c6.info new file mode 100644 index 0000000000000000000000000000000000000000..3d0e7e62ec2b136186475d20ec7b50122c73c068 Binary files /dev/null and b/Roll a Ball/Library/metadata/4d/4dfd3f5da88944ec6ac5977d676c30c6.info differ diff --git a/Roll a Ball/Library/metadata/4e/4e830e2dbc3315b4b97cd5311a54e4fe b/Roll a Ball/Library/metadata/4e/4e830e2dbc3315b4b97cd5311a54e4fe new file mode 100644 index 0000000000000000000000000000000000000000..d6defd4625832ce3f349028023c006e37999cb2a Binary files /dev/null and b/Roll a Ball/Library/metadata/4e/4e830e2dbc3315b4b97cd5311a54e4fe differ diff --git a/Roll a Ball/Library/metadata/4e/4e830e2dbc3315b4b97cd5311a54e4fe.info b/Roll a Ball/Library/metadata/4e/4e830e2dbc3315b4b97cd5311a54e4fe.info new file mode 100644 index 0000000000000000000000000000000000000000..027f6c219ab443dabf44054a4c1a5b492760c821 Binary files /dev/null and b/Roll a Ball/Library/metadata/4e/4e830e2dbc3315b4b97cd5311a54e4fe.info differ diff --git a/Roll a Ball/Library/metadata/4f/4f0ca6874aa74540bb3d4fe5a0f86bcc b/Roll a Ball/Library/metadata/4f/4f0ca6874aa74540bb3d4fe5a0f86bcc new file mode 100644 index 0000000000000000000000000000000000000000..5848b6b917d8c0e370bd8e26f3c194144297d0b1 Binary files /dev/null and b/Roll a Ball/Library/metadata/4f/4f0ca6874aa74540bb3d4fe5a0f86bcc differ diff --git a/Roll a Ball/Library/metadata/4f/4f0ca6874aa74540bb3d4fe5a0f86bcc.info b/Roll a Ball/Library/metadata/4f/4f0ca6874aa74540bb3d4fe5a0f86bcc.info new file mode 100644 index 0000000000000000000000000000000000000000..8a396e4e773140ac9f83576583bede91aeab2df3 Binary files /dev/null and b/Roll a Ball/Library/metadata/4f/4f0ca6874aa74540bb3d4fe5a0f86bcc.info differ diff --git a/Roll a Ball/Library/metadata/4f/4f0f9b9f3ed97ad2b9ba8f1a8e4666c2 b/Roll a Ball/Library/metadata/4f/4f0f9b9f3ed97ad2b9ba8f1a8e4666c2 new file mode 100644 index 0000000000000000000000000000000000000000..2f2f1e71a502f78e8ae2f74b1f3bb832a5498fc4 Binary files /dev/null and b/Roll a Ball/Library/metadata/4f/4f0f9b9f3ed97ad2b9ba8f1a8e4666c2 differ diff --git a/Roll a Ball/Library/metadata/4f/4f0f9b9f3ed97ad2b9ba8f1a8e4666c2.info b/Roll a Ball/Library/metadata/4f/4f0f9b9f3ed97ad2b9ba8f1a8e4666c2.info new file mode 100644 index 0000000000000000000000000000000000000000..db9dbb621f18f1b2f51dbfdd9fa2aa415fe53b2b Binary files /dev/null and b/Roll a Ball/Library/metadata/4f/4f0f9b9f3ed97ad2b9ba8f1a8e4666c2.info differ diff --git a/Roll a Ball/Library/metadata/4f/4f234578336894dc081edf696f2ff5f2 b/Roll a Ball/Library/metadata/4f/4f234578336894dc081edf696f2ff5f2 new file mode 100644 index 0000000000000000000000000000000000000000..b7e1ddbc4e8f11883810de19440688441b6de75f Binary files /dev/null and b/Roll a Ball/Library/metadata/4f/4f234578336894dc081edf696f2ff5f2 differ diff --git a/Roll a Ball/Library/metadata/4f/4f234578336894dc081edf696f2ff5f2.info b/Roll a Ball/Library/metadata/4f/4f234578336894dc081edf696f2ff5f2.info new file mode 100644 index 0000000000000000000000000000000000000000..15de5bc3727e0382478af68f97a74bef8799a17b Binary files /dev/null and b/Roll a Ball/Library/metadata/4f/4f234578336894dc081edf696f2ff5f2.info differ diff --git a/Roll a Ball/Library/metadata/4f/4f5362359d4548b44a34a45f19efb4bf b/Roll a Ball/Library/metadata/4f/4f5362359d4548b44a34a45f19efb4bf new file mode 100644 index 0000000000000000000000000000000000000000..349b4505849259a883f365c08e349709c3f4e6c1 Binary files /dev/null and b/Roll a Ball/Library/metadata/4f/4f5362359d4548b44a34a45f19efb4bf differ diff --git a/Roll a Ball/Library/metadata/4f/4f5362359d4548b44a34a45f19efb4bf.info b/Roll a Ball/Library/metadata/4f/4f5362359d4548b44a34a45f19efb4bf.info new file mode 100644 index 0000000000000000000000000000000000000000..b7b986fbb21fda41f353d2e1828e012f4cac0a21 Binary files /dev/null and b/Roll a Ball/Library/metadata/4f/4f5362359d4548b44a34a45f19efb4bf.info differ diff --git a/Roll a Ball/Library/metadata/4f/4f768b64e6c37495699fffe3007e4379 b/Roll a Ball/Library/metadata/4f/4f768b64e6c37495699fffe3007e4379 new file mode 100644 index 0000000000000000000000000000000000000000..ffe8b82073d8bb39ed481f8aca9a952447ea241e Binary files /dev/null and b/Roll a Ball/Library/metadata/4f/4f768b64e6c37495699fffe3007e4379 differ diff --git a/Roll a Ball/Library/metadata/4f/4f768b64e6c37495699fffe3007e4379.info b/Roll a Ball/Library/metadata/4f/4f768b64e6c37495699fffe3007e4379.info new file mode 100644 index 0000000000000000000000000000000000000000..0c3f2909f25b83c0d5123abbe31407dca43a2b48 Binary files /dev/null and b/Roll a Ball/Library/metadata/4f/4f768b64e6c37495699fffe3007e4379.info differ diff --git a/Roll a Ball/Library/metadata/4f/4fc12201ddc4b4d45b9bdecdf7f00ea5 b/Roll a Ball/Library/metadata/4f/4fc12201ddc4b4d45b9bdecdf7f00ea5 new file mode 100644 index 0000000000000000000000000000000000000000..0a39d11ca8f4584b162df2838e780f6be1d9cc7b Binary files /dev/null and b/Roll a Ball/Library/metadata/4f/4fc12201ddc4b4d45b9bdecdf7f00ea5 differ diff --git a/Roll a Ball/Library/metadata/4f/4fc12201ddc4b4d45b9bdecdf7f00ea5.info b/Roll a Ball/Library/metadata/4f/4fc12201ddc4b4d45b9bdecdf7f00ea5.info new file mode 100644 index 0000000000000000000000000000000000000000..fa1c2974cbb2d108b2aa8744ce35073a48972839 Binary files /dev/null and b/Roll a Ball/Library/metadata/4f/4fc12201ddc4b4d45b9bdecdf7f00ea5.info differ diff --git a/Roll a Ball/Library/metadata/50/5075cb5aa3254b099b11b2840d7cd46e b/Roll a Ball/Library/metadata/50/5075cb5aa3254b099b11b2840d7cd46e new file mode 100644 index 0000000000000000000000000000000000000000..593f9e9285850d153b0a853fe49e4df3c5cf8506 Binary files /dev/null and b/Roll a Ball/Library/metadata/50/5075cb5aa3254b099b11b2840d7cd46e differ diff --git a/Roll a Ball/Library/metadata/50/5075cb5aa3254b099b11b2840d7cd46e.info b/Roll a Ball/Library/metadata/50/5075cb5aa3254b099b11b2840d7cd46e.info new file mode 100644 index 0000000000000000000000000000000000000000..1d2c74dc4d17beb84450a2a05c35dbd430f93d46 Binary files /dev/null and b/Roll a Ball/Library/metadata/50/5075cb5aa3254b099b11b2840d7cd46e.info differ diff --git a/Roll a Ball/Library/metadata/50/50de529b6a28f4a7093045e08810a5df b/Roll a Ball/Library/metadata/50/50de529b6a28f4a7093045e08810a5df new file mode 100644 index 0000000000000000000000000000000000000000..ba24b950f61f4b2b851855fb4dd91abe13d7fddc Binary files /dev/null and b/Roll a Ball/Library/metadata/50/50de529b6a28f4a7093045e08810a5df differ diff --git a/Roll a Ball/Library/metadata/50/50de529b6a28f4a7093045e08810a5df.info b/Roll a Ball/Library/metadata/50/50de529b6a28f4a7093045e08810a5df.info new file mode 100644 index 0000000000000000000000000000000000000000..9f6702d4214303c6ab3c2bb8e38f26b323f86c60 Binary files /dev/null and b/Roll a Ball/Library/metadata/50/50de529b6a28f4a7093045e08810a5df.info differ diff --git a/Roll a Ball/Library/metadata/51/510d1d319d2754ea4a47c6dd8c421ea0 b/Roll a Ball/Library/metadata/51/510d1d319d2754ea4a47c6dd8c421ea0 new file mode 100644 index 0000000000000000000000000000000000000000..7a65438a518252980e062072a02b879ec864777e Binary files /dev/null and b/Roll a Ball/Library/metadata/51/510d1d319d2754ea4a47c6dd8c421ea0 differ diff --git a/Roll a Ball/Library/metadata/51/510d1d319d2754ea4a47c6dd8c421ea0.info b/Roll a Ball/Library/metadata/51/510d1d319d2754ea4a47c6dd8c421ea0.info new file mode 100644 index 0000000000000000000000000000000000000000..8eda38c4248bc0ffef8e8830c87699acd49f2a61 Binary files /dev/null and b/Roll a Ball/Library/metadata/51/510d1d319d2754ea4a47c6dd8c421ea0.info differ diff --git a/Roll a Ball/Library/metadata/51/5143f58107604835ab1a5efa2d8818fd b/Roll a Ball/Library/metadata/51/5143f58107604835ab1a5efa2d8818fd new file mode 100644 index 0000000000000000000000000000000000000000..1683deb54f8bbe682e3d39d652060eb6ede9483f Binary files /dev/null and b/Roll a Ball/Library/metadata/51/5143f58107604835ab1a5efa2d8818fd differ diff --git a/Roll a Ball/Library/metadata/51/5143f58107604835ab1a5efa2d8818fd.info b/Roll a Ball/Library/metadata/51/5143f58107604835ab1a5efa2d8818fd.info new file mode 100644 index 0000000000000000000000000000000000000000..49596b868a1afe1113b17e7cf92d2c91b46fbce3 Binary files /dev/null and b/Roll a Ball/Library/metadata/51/5143f58107604835ab1a5efa2d8818fd.info differ diff --git a/Roll a Ball/Library/metadata/51/515638b803bef8599dbd6d5c8bdaa53e b/Roll a Ball/Library/metadata/51/515638b803bef8599dbd6d5c8bdaa53e new file mode 100644 index 0000000000000000000000000000000000000000..650ee763d0f24a46606f1ac1c7e76b80867b050f Binary files /dev/null and b/Roll a Ball/Library/metadata/51/515638b803bef8599dbd6d5c8bdaa53e differ diff --git a/Roll a Ball/Library/metadata/51/515638b803bef8599dbd6d5c8bdaa53e.info b/Roll a Ball/Library/metadata/51/515638b803bef8599dbd6d5c8bdaa53e.info new file mode 100644 index 0000000000000000000000000000000000000000..7b1239573d96315cecaade24845c55aa7d3837d7 Binary files /dev/null and b/Roll a Ball/Library/metadata/51/515638b803bef8599dbd6d5c8bdaa53e.info differ diff --git a/Roll a Ball/Library/metadata/53/536c0048c80e8407084e29942e15685b b/Roll a Ball/Library/metadata/53/536c0048c80e8407084e29942e15685b new file mode 100644 index 0000000000000000000000000000000000000000..b550d44814de57c3b1f8dfac478a484781ba9113 Binary files /dev/null and b/Roll a Ball/Library/metadata/53/536c0048c80e8407084e29942e15685b differ diff --git a/Roll a Ball/Library/metadata/53/536c0048c80e8407084e29942e15685b.info b/Roll a Ball/Library/metadata/53/536c0048c80e8407084e29942e15685b.info new file mode 100644 index 0000000000000000000000000000000000000000..ec57ca4c535e8f48f5fdd2014810ac8f26b17e44 Binary files /dev/null and b/Roll a Ball/Library/metadata/53/536c0048c80e8407084e29942e15685b.info differ diff --git a/Roll a Ball/Library/metadata/53/53ebcfaa2e1e4e2dbc85882cd5a73fa1 b/Roll a Ball/Library/metadata/53/53ebcfaa2e1e4e2dbc85882cd5a73fa1 new file mode 100644 index 0000000000000000000000000000000000000000..177969006f457d049c712905aabc3b63700f3972 Binary files /dev/null and b/Roll a Ball/Library/metadata/53/53ebcfaa2e1e4e2dbc85882cd5a73fa1 differ diff --git a/Roll a Ball/Library/metadata/53/53ebcfaa2e1e4e2dbc85882cd5a73fa1.info b/Roll a Ball/Library/metadata/53/53ebcfaa2e1e4e2dbc85882cd5a73fa1.info new file mode 100644 index 0000000000000000000000000000000000000000..0f282bd0e275329068aa358e491f9875084550b8 Binary files /dev/null and b/Roll a Ball/Library/metadata/53/53ebcfaa2e1e4e2dbc85882cd5a73fa1.info differ diff --git a/Roll a Ball/Library/metadata/54/543674eec776b1442a192c932e6cd9b3 b/Roll a Ball/Library/metadata/54/543674eec776b1442a192c932e6cd9b3 new file mode 100644 index 0000000000000000000000000000000000000000..fdc4ca1c9174943defb76ed3e8d77fad70016522 Binary files /dev/null and b/Roll a Ball/Library/metadata/54/543674eec776b1442a192c932e6cd9b3 differ diff --git a/Roll a Ball/Library/metadata/54/543674eec776b1442a192c932e6cd9b3.info b/Roll a Ball/Library/metadata/54/543674eec776b1442a192c932e6cd9b3.info new file mode 100644 index 0000000000000000000000000000000000000000..55843719ed6cd202f76f71e425259292a2f07fde Binary files /dev/null and b/Roll a Ball/Library/metadata/54/543674eec776b1442a192c932e6cd9b3.info differ diff --git a/Roll a Ball/Library/metadata/54/5469ef0820152a4ae45d400fdc4626e4 b/Roll a Ball/Library/metadata/54/5469ef0820152a4ae45d400fdc4626e4 new file mode 100644 index 0000000000000000000000000000000000000000..cf50345a4ec5022cb16e5f7a0b99c5d6212654bd Binary files /dev/null and b/Roll a Ball/Library/metadata/54/5469ef0820152a4ae45d400fdc4626e4 differ diff --git a/Roll a Ball/Library/metadata/54/5469ef0820152a4ae45d400fdc4626e4.info b/Roll a Ball/Library/metadata/54/5469ef0820152a4ae45d400fdc4626e4.info new file mode 100644 index 0000000000000000000000000000000000000000..8922b1cde1d38c9c2ab12bd8d3729d8ab106c639 Binary files /dev/null and b/Roll a Ball/Library/metadata/54/5469ef0820152a4ae45d400fdc4626e4.info differ diff --git a/Roll a Ball/Library/metadata/54/54d21f6ece3b46479f0c328f8c6007e0 b/Roll a Ball/Library/metadata/54/54d21f6ece3b46479f0c328f8c6007e0 new file mode 100644 index 0000000000000000000000000000000000000000..ca8e53d54a7bb91ac7c1454d5ccdaf841f754ed0 Binary files /dev/null and b/Roll a Ball/Library/metadata/54/54d21f6ece3b46479f0c328f8c6007e0 differ diff --git a/Roll a Ball/Library/metadata/54/54d21f6ece3b46479f0c328f8c6007e0.info b/Roll a Ball/Library/metadata/54/54d21f6ece3b46479f0c328f8c6007e0.info new file mode 100644 index 0000000000000000000000000000000000000000..255db2403f15cc32a24ed2bbafcc87e4ce094ea2 Binary files /dev/null and b/Roll a Ball/Library/metadata/54/54d21f6ece3b46479f0c328f8c6007e0.info differ diff --git a/Roll a Ball/Library/metadata/54/54e5fc61925bc4ca3b2c1e82dfb35eb5 b/Roll a Ball/Library/metadata/54/54e5fc61925bc4ca3b2c1e82dfb35eb5 new file mode 100644 index 0000000000000000000000000000000000000000..2b39b6605fc6187b355aded9fe4965f51e16ae4f Binary files /dev/null and b/Roll a Ball/Library/metadata/54/54e5fc61925bc4ca3b2c1e82dfb35eb5 differ diff --git a/Roll a Ball/Library/metadata/54/54e5fc61925bc4ca3b2c1e82dfb35eb5.info b/Roll a Ball/Library/metadata/54/54e5fc61925bc4ca3b2c1e82dfb35eb5.info new file mode 100644 index 0000000000000000000000000000000000000000..c197d8c7ceb00aba76e19fd3f331bba895392c92 Binary files /dev/null and b/Roll a Ball/Library/metadata/54/54e5fc61925bc4ca3b2c1e82dfb35eb5.info differ diff --git a/Roll a Ball/Library/metadata/56/566f8bae715954c65a2a7a4b5818fc7a b/Roll a Ball/Library/metadata/56/566f8bae715954c65a2a7a4b5818fc7a new file mode 100644 index 0000000000000000000000000000000000000000..d1e8787faf841e70231102e04e66b71700e3d298 Binary files /dev/null and b/Roll a Ball/Library/metadata/56/566f8bae715954c65a2a7a4b5818fc7a differ diff --git a/Roll a Ball/Library/metadata/56/566f8bae715954c65a2a7a4b5818fc7a.info b/Roll a Ball/Library/metadata/56/566f8bae715954c65a2a7a4b5818fc7a.info new file mode 100644 index 0000000000000000000000000000000000000000..a052cf79a0018d2db3d1d4e9447645803e5cccdb Binary files /dev/null and b/Roll a Ball/Library/metadata/56/566f8bae715954c65a2a7a4b5818fc7a.info differ diff --git a/Roll a Ball/Library/metadata/57/57b0c806ba25b48aa8a6ecb3345a4a9b b/Roll a Ball/Library/metadata/57/57b0c806ba25b48aa8a6ecb3345a4a9b new file mode 100644 index 0000000000000000000000000000000000000000..501c61b6bedc6160420441ce4e5d93c67b165cc7 Binary files /dev/null and b/Roll a Ball/Library/metadata/57/57b0c806ba25b48aa8a6ecb3345a4a9b differ diff --git a/Roll a Ball/Library/metadata/57/57b0c806ba25b48aa8a6ecb3345a4a9b.info b/Roll a Ball/Library/metadata/57/57b0c806ba25b48aa8a6ecb3345a4a9b.info new file mode 100644 index 0000000000000000000000000000000000000000..dd5ec48f6455165da0b1ffbd0d603984e4f746fa Binary files /dev/null and b/Roll a Ball/Library/metadata/57/57b0c806ba25b48aa8a6ecb3345a4a9b.info differ diff --git a/Roll a Ball/Library/metadata/58/585b70cb75dd43efbfead809c30a1731 b/Roll a Ball/Library/metadata/58/585b70cb75dd43efbfead809c30a1731 new file mode 100644 index 0000000000000000000000000000000000000000..144cc274b5430f1590d6e4fdc29c94a78eb6e545 Binary files /dev/null and b/Roll a Ball/Library/metadata/58/585b70cb75dd43efbfead809c30a1731 differ diff --git a/Roll a Ball/Library/metadata/58/585b70cb75dd43efbfead809c30a1731.info b/Roll a Ball/Library/metadata/58/585b70cb75dd43efbfead809c30a1731.info new file mode 100644 index 0000000000000000000000000000000000000000..48fb0dd12bb203bdb61a01cb35e29f4856f3ae0f Binary files /dev/null and b/Roll a Ball/Library/metadata/58/585b70cb75dd43efbfead809c30a1731.info differ diff --git a/Roll a Ball/Library/metadata/58/589b3ddef1e4d44cea68e0144bd95434 b/Roll a Ball/Library/metadata/58/589b3ddef1e4d44cea68e0144bd95434 new file mode 100644 index 0000000000000000000000000000000000000000..34319daef40e35f549a8bc4dc714b8e4b2a7b3e3 Binary files /dev/null and b/Roll a Ball/Library/metadata/58/589b3ddef1e4d44cea68e0144bd95434 differ diff --git a/Roll a Ball/Library/metadata/58/589b3ddef1e4d44cea68e0144bd95434.info b/Roll a Ball/Library/metadata/58/589b3ddef1e4d44cea68e0144bd95434.info new file mode 100644 index 0000000000000000000000000000000000000000..c1889012a7804105919aacda83933cad08be6702 Binary files /dev/null and b/Roll a Ball/Library/metadata/58/589b3ddef1e4d44cea68e0144bd95434.info differ diff --git a/Roll a Ball/Library/metadata/59/592f7288ed0df2c4b884e2cd9baac023 b/Roll a Ball/Library/metadata/59/592f7288ed0df2c4b884e2cd9baac023 new file mode 100644 index 0000000000000000000000000000000000000000..e894ab3cbecfbeb0ada812a379580392a21978a8 Binary files /dev/null and b/Roll a Ball/Library/metadata/59/592f7288ed0df2c4b884e2cd9baac023 differ diff --git a/Roll a Ball/Library/metadata/59/592f7288ed0df2c4b884e2cd9baac023.info b/Roll a Ball/Library/metadata/59/592f7288ed0df2c4b884e2cd9baac023.info new file mode 100644 index 0000000000000000000000000000000000000000..ccbb38fb6eaaba602cc18b9abf628b3e3640a627 Binary files /dev/null and b/Roll a Ball/Library/metadata/59/592f7288ed0df2c4b884e2cd9baac023.info differ diff --git a/Roll a Ball/Library/metadata/59/5941c79cb78c34a0d9c677ece9784f15 b/Roll a Ball/Library/metadata/59/5941c79cb78c34a0d9c677ece9784f15 new file mode 100644 index 0000000000000000000000000000000000000000..a83f6b0ee8a07537f5cbde91ae61fc07b368b3c9 Binary files /dev/null and b/Roll a Ball/Library/metadata/59/5941c79cb78c34a0d9c677ece9784f15 differ diff --git a/Roll a Ball/Library/metadata/59/5941c79cb78c34a0d9c677ece9784f15.info b/Roll a Ball/Library/metadata/59/5941c79cb78c34a0d9c677ece9784f15.info new file mode 100644 index 0000000000000000000000000000000000000000..0fc69e1a7b65d0db0ff38b591545f5dab5e5b832 Binary files /dev/null and b/Roll a Ball/Library/metadata/59/5941c79cb78c34a0d9c677ece9784f15.info differ diff --git a/Roll a Ball/Library/metadata/59/599a5fd92bab81a4ab02e52d0b1b1c60 b/Roll a Ball/Library/metadata/59/599a5fd92bab81a4ab02e52d0b1b1c60 new file mode 100644 index 0000000000000000000000000000000000000000..6a5c8f17b91e89f9c5a01695363c4b0d84c77089 Binary files /dev/null and b/Roll a Ball/Library/metadata/59/599a5fd92bab81a4ab02e52d0b1b1c60 differ diff --git a/Roll a Ball/Library/metadata/59/599a5fd92bab81a4ab02e52d0b1b1c60.info b/Roll a Ball/Library/metadata/59/599a5fd92bab81a4ab02e52d0b1b1c60.info new file mode 100644 index 0000000000000000000000000000000000000000..334bece2204bf6ab820756af2819cccb6b7f2cfc Binary files /dev/null and b/Roll a Ball/Library/metadata/59/599a5fd92bab81a4ab02e52d0b1b1c60.info differ diff --git a/Roll a Ball/Library/metadata/5a/5afb9687033af4bca957216add3fe854 b/Roll a Ball/Library/metadata/5a/5afb9687033af4bca957216add3fe854 new file mode 100644 index 0000000000000000000000000000000000000000..6c86406360feed7875cd1b50474623855c68f4c6 Binary files /dev/null and b/Roll a Ball/Library/metadata/5a/5afb9687033af4bca957216add3fe854 differ diff --git a/Roll a Ball/Library/metadata/5a/5afb9687033af4bca957216add3fe854.info b/Roll a Ball/Library/metadata/5a/5afb9687033af4bca957216add3fe854.info new file mode 100644 index 0000000000000000000000000000000000000000..50ef7c30a2111c8083762d0d3c8572b32bf288cf Binary files /dev/null and b/Roll a Ball/Library/metadata/5a/5afb9687033af4bca957216add3fe854.info differ diff --git a/Roll a Ball/Library/metadata/5b/5b5c6a576605b3c4aab7d27193785f27 b/Roll a Ball/Library/metadata/5b/5b5c6a576605b3c4aab7d27193785f27 new file mode 100644 index 0000000000000000000000000000000000000000..7482b68154522ca4629b8f0b1caab1251fa05b61 Binary files /dev/null and b/Roll a Ball/Library/metadata/5b/5b5c6a576605b3c4aab7d27193785f27 differ diff --git a/Roll a Ball/Library/metadata/5b/5b5c6a576605b3c4aab7d27193785f27.info b/Roll a Ball/Library/metadata/5b/5b5c6a576605b3c4aab7d27193785f27.info new file mode 100644 index 0000000000000000000000000000000000000000..77d6b7bef432249701df729608698bc3dd7a9171 Binary files /dev/null and b/Roll a Ball/Library/metadata/5b/5b5c6a576605b3c4aab7d27193785f27.info differ diff --git a/Roll a Ball/Library/metadata/5c/5c38c5679d98faa4ae7df9fae0a8226e b/Roll a Ball/Library/metadata/5c/5c38c5679d98faa4ae7df9fae0a8226e new file mode 100644 index 0000000000000000000000000000000000000000..c9c1329aa27b9f69480e0f2228ed8d85b9e0a3c5 Binary files /dev/null and b/Roll a Ball/Library/metadata/5c/5c38c5679d98faa4ae7df9fae0a8226e differ diff --git a/Roll a Ball/Library/metadata/5c/5c38c5679d98faa4ae7df9fae0a8226e.info b/Roll a Ball/Library/metadata/5c/5c38c5679d98faa4ae7df9fae0a8226e.info new file mode 100644 index 0000000000000000000000000000000000000000..d22abd981577aabe4e9bf7706c03acbf4696de3a Binary files /dev/null and b/Roll a Ball/Library/metadata/5c/5c38c5679d98faa4ae7df9fae0a8226e.info differ diff --git a/Roll a Ball/Library/metadata/5e/5e57a6c62c1ec47d0bceb70495845164 b/Roll a Ball/Library/metadata/5e/5e57a6c62c1ec47d0bceb70495845164 new file mode 100644 index 0000000000000000000000000000000000000000..77df7b60f54b4b91f938897afd91eb5f583e710d Binary files /dev/null and b/Roll a Ball/Library/metadata/5e/5e57a6c62c1ec47d0bceb70495845164 differ diff --git a/Roll a Ball/Library/metadata/5e/5e57a6c62c1ec47d0bceb70495845164.info b/Roll a Ball/Library/metadata/5e/5e57a6c62c1ec47d0bceb70495845164.info new file mode 100644 index 0000000000000000000000000000000000000000..3049260ac8dd70cb23d2c3d02ae2f872aa5f7a05 Binary files /dev/null and b/Roll a Ball/Library/metadata/5e/5e57a6c62c1ec47d0bceb70495845164.info differ diff --git a/Roll a Ball/Library/metadata/5e/5e7a49a6952af4d4ab2c3b038be68141 b/Roll a Ball/Library/metadata/5e/5e7a49a6952af4d4ab2c3b038be68141 new file mode 100644 index 0000000000000000000000000000000000000000..da839e6a8d1482744dc28d286aee895013bd3b92 Binary files /dev/null and b/Roll a Ball/Library/metadata/5e/5e7a49a6952af4d4ab2c3b038be68141 differ diff --git a/Roll a Ball/Library/metadata/5e/5e7a49a6952af4d4ab2c3b038be68141.info b/Roll a Ball/Library/metadata/5e/5e7a49a6952af4d4ab2c3b038be68141.info new file mode 100644 index 0000000000000000000000000000000000000000..217e3e2fb00a8ac2857d8eb709c66638db9415b5 Binary files /dev/null and b/Roll a Ball/Library/metadata/5e/5e7a49a6952af4d4ab2c3b038be68141.info differ diff --git a/Roll a Ball/Library/metadata/5e/5e7c9ab97e5884e4eaa5967e9024f39d b/Roll a Ball/Library/metadata/5e/5e7c9ab97e5884e4eaa5967e9024f39d new file mode 100644 index 0000000000000000000000000000000000000000..5914ed275fd422928c56aa36c847990e0e9bc8cc Binary files /dev/null and b/Roll a Ball/Library/metadata/5e/5e7c9ab97e5884e4eaa5967e9024f39d differ diff --git a/Roll a Ball/Library/metadata/5e/5e7c9ab97e5884e4eaa5967e9024f39d.info b/Roll a Ball/Library/metadata/5e/5e7c9ab97e5884e4eaa5967e9024f39d.info new file mode 100644 index 0000000000000000000000000000000000000000..7232e27da54546b0c635bfac4bd5834b764b4cb3 Binary files /dev/null and b/Roll a Ball/Library/metadata/5e/5e7c9ab97e5884e4eaa5967e9024f39d.info differ diff --git a/Roll a Ball/Library/metadata/5e/5ea9f573d4b800a49b9d83a1f61c0a88 b/Roll a Ball/Library/metadata/5e/5ea9f573d4b800a49b9d83a1f61c0a88 new file mode 100644 index 0000000000000000000000000000000000000000..b955bfb9678adac2da0613edc3375cdf0f68e041 Binary files /dev/null and b/Roll a Ball/Library/metadata/5e/5ea9f573d4b800a49b9d83a1f61c0a88 differ diff --git a/Roll a Ball/Library/metadata/5e/5ea9f573d4b800a49b9d83a1f61c0a88.info b/Roll a Ball/Library/metadata/5e/5ea9f573d4b800a49b9d83a1f61c0a88.info new file mode 100644 index 0000000000000000000000000000000000000000..bdebb56124578ce8268d5155292d47552050dc74 Binary files /dev/null and b/Roll a Ball/Library/metadata/5e/5ea9f573d4b800a49b9d83a1f61c0a88.info differ diff --git a/Roll a Ball/Library/metadata/5e/5ec95f4d5b2d1f14e9ff8682562553f9 b/Roll a Ball/Library/metadata/5e/5ec95f4d5b2d1f14e9ff8682562553f9 new file mode 100644 index 0000000000000000000000000000000000000000..8ce46668dfd1670041de9525ff890bfc0c94474f Binary files /dev/null and b/Roll a Ball/Library/metadata/5e/5ec95f4d5b2d1f14e9ff8682562553f9 differ diff --git a/Roll a Ball/Library/metadata/5e/5ec95f4d5b2d1f14e9ff8682562553f9.info b/Roll a Ball/Library/metadata/5e/5ec95f4d5b2d1f14e9ff8682562553f9.info new file mode 100644 index 0000000000000000000000000000000000000000..3dbe26e4f7121c6447f830bfabffffc500ad6e42 Binary files /dev/null and b/Roll a Ball/Library/metadata/5e/5ec95f4d5b2d1f14e9ff8682562553f9.info differ diff --git a/Roll a Ball/Library/metadata/5f/5f32cd94baa94578a686d4b9d6b660f7 b/Roll a Ball/Library/metadata/5f/5f32cd94baa94578a686d4b9d6b660f7 new file mode 100644 index 0000000000000000000000000000000000000000..292932b20a420ed13c4efd82948ff2d1bee1a080 Binary files /dev/null and b/Roll a Ball/Library/metadata/5f/5f32cd94baa94578a686d4b9d6b660f7 differ diff --git a/Roll a Ball/Library/metadata/5f/5f32cd94baa94578a686d4b9d6b660f7.info b/Roll a Ball/Library/metadata/5f/5f32cd94baa94578a686d4b9d6b660f7.info new file mode 100644 index 0000000000000000000000000000000000000000..a7442037f6fde88379650ea23466ab982df486c9 Binary files /dev/null and b/Roll a Ball/Library/metadata/5f/5f32cd94baa94578a686d4b9d6b660f7.info differ diff --git a/Roll a Ball/Library/metadata/5f/5fa87e412ea970a4f8af53db4e1aed67 b/Roll a Ball/Library/metadata/5f/5fa87e412ea970a4f8af53db4e1aed67 new file mode 100644 index 0000000000000000000000000000000000000000..02a50e09a34b5f3f4d012079f05cb6065284ee4c Binary files /dev/null and b/Roll a Ball/Library/metadata/5f/5fa87e412ea970a4f8af53db4e1aed67 differ diff --git a/Roll a Ball/Library/metadata/5f/5fa87e412ea970a4f8af53db4e1aed67.info b/Roll a Ball/Library/metadata/5f/5fa87e412ea970a4f8af53db4e1aed67.info new file mode 100644 index 0000000000000000000000000000000000000000..615ab89d07cc4e47160ff4c0c2190eda82f28b29 Binary files /dev/null and b/Roll a Ball/Library/metadata/5f/5fa87e412ea970a4f8af53db4e1aed67.info differ diff --git a/Roll a Ball/Library/metadata/5f/5fc988a1d5b04aee9a5222502b201a45 b/Roll a Ball/Library/metadata/5f/5fc988a1d5b04aee9a5222502b201a45 new file mode 100644 index 0000000000000000000000000000000000000000..c56575349ca022772376a95881ce95692dabcdab Binary files /dev/null and b/Roll a Ball/Library/metadata/5f/5fc988a1d5b04aee9a5222502b201a45 differ diff --git a/Roll a Ball/Library/metadata/5f/5fc988a1d5b04aee9a5222502b201a45.info b/Roll a Ball/Library/metadata/5f/5fc988a1d5b04aee9a5222502b201a45.info new file mode 100644 index 0000000000000000000000000000000000000000..1f0b4ef567d43f9f5d3a48c6f8f7a6eec1af3aac Binary files /dev/null and b/Roll a Ball/Library/metadata/5f/5fc988a1d5b04aee9a5222502b201a45.info differ diff --git a/Roll a Ball/Library/metadata/5f/5ffd2adf615994485991e37bacbf735c b/Roll a Ball/Library/metadata/5f/5ffd2adf615994485991e37bacbf735c new file mode 100644 index 0000000000000000000000000000000000000000..c999ef426dc54cfa8899f7ffe86a254e5aa1c51e Binary files /dev/null and b/Roll a Ball/Library/metadata/5f/5ffd2adf615994485991e37bacbf735c differ diff --git a/Roll a Ball/Library/metadata/5f/5ffd2adf615994485991e37bacbf735c.info b/Roll a Ball/Library/metadata/5f/5ffd2adf615994485991e37bacbf735c.info new file mode 100644 index 0000000000000000000000000000000000000000..0e653737579e19b85160c0d91d7cd90c11d829ee Binary files /dev/null and b/Roll a Ball/Library/metadata/5f/5ffd2adf615994485991e37bacbf735c.info differ diff --git a/Roll a Ball/Library/metadata/60/6055be8ebefd69e48b49212b09b47b2f b/Roll a Ball/Library/metadata/60/6055be8ebefd69e48b49212b09b47b2f new file mode 100644 index 0000000000000000000000000000000000000000..11ca9c83bb47dbd03142d6fbcfb1538aec329ce7 Binary files /dev/null and b/Roll a Ball/Library/metadata/60/6055be8ebefd69e48b49212b09b47b2f differ diff --git a/Roll a Ball/Library/metadata/60/6055be8ebefd69e48b49212b09b47b2f.info b/Roll a Ball/Library/metadata/60/6055be8ebefd69e48b49212b09b47b2f.info new file mode 100644 index 0000000000000000000000000000000000000000..47f9d6c8161b2ab87dd1c0259fa356608f79896a Binary files /dev/null and b/Roll a Ball/Library/metadata/60/6055be8ebefd69e48b49212b09b47b2f.info differ diff --git a/Roll a Ball/Library/metadata/61/617202f4e2bed4ef8acccfd6c1ecd6fa b/Roll a Ball/Library/metadata/61/617202f4e2bed4ef8acccfd6c1ecd6fa new file mode 100644 index 0000000000000000000000000000000000000000..2f62677849f6f8d6eaf1387155c0c8f1edf74551 Binary files /dev/null and b/Roll a Ball/Library/metadata/61/617202f4e2bed4ef8acccfd6c1ecd6fa differ diff --git a/Roll a Ball/Library/metadata/61/617202f4e2bed4ef8acccfd6c1ecd6fa.info b/Roll a Ball/Library/metadata/61/617202f4e2bed4ef8acccfd6c1ecd6fa.info new file mode 100644 index 0000000000000000000000000000000000000000..3b7ad1422deb2a8b93f92b048340b6061110163e Binary files /dev/null and b/Roll a Ball/Library/metadata/61/617202f4e2bed4ef8acccfd6c1ecd6fa.info differ diff --git a/Roll a Ball/Library/metadata/61/61d72cb49da3040d5ade3edfd6eccfc1 b/Roll a Ball/Library/metadata/61/61d72cb49da3040d5ade3edfd6eccfc1 new file mode 100644 index 0000000000000000000000000000000000000000..4b575a0bd8f62f6ca6a1241102ebe96a26f35b80 Binary files /dev/null and b/Roll a Ball/Library/metadata/61/61d72cb49da3040d5ade3edfd6eccfc1 differ diff --git a/Roll a Ball/Library/metadata/61/61d72cb49da3040d5ade3edfd6eccfc1.info b/Roll a Ball/Library/metadata/61/61d72cb49da3040d5ade3edfd6eccfc1.info new file mode 100644 index 0000000000000000000000000000000000000000..4f6789b90f681b704c78ed1005652aa37b31e4b5 Binary files /dev/null and b/Roll a Ball/Library/metadata/61/61d72cb49da3040d5ade3edfd6eccfc1.info differ diff --git a/Roll a Ball/Library/metadata/62/62772aad98ed04f0d955b7d20de61f7f b/Roll a Ball/Library/metadata/62/62772aad98ed04f0d955b7d20de61f7f new file mode 100644 index 0000000000000000000000000000000000000000..7af5a9e00064e0b6a6f516714f68521cae03a24c Binary files /dev/null and b/Roll a Ball/Library/metadata/62/62772aad98ed04f0d955b7d20de61f7f differ diff --git a/Roll a Ball/Library/metadata/62/62772aad98ed04f0d955b7d20de61f7f.info b/Roll a Ball/Library/metadata/62/62772aad98ed04f0d955b7d20de61f7f.info new file mode 100644 index 0000000000000000000000000000000000000000..5fa5483b866bba384c5bcadc84090a64095f4936 Binary files /dev/null and b/Roll a Ball/Library/metadata/62/62772aad98ed04f0d955b7d20de61f7f.info differ diff --git a/Roll a Ball/Library/metadata/62/6277a751c6c9f46359fc7004b3ee12f0 b/Roll a Ball/Library/metadata/62/6277a751c6c9f46359fc7004b3ee12f0 new file mode 100644 index 0000000000000000000000000000000000000000..825bdea9c39fa53643c3d68e2d63e4eb92d682ef Binary files /dev/null and b/Roll a Ball/Library/metadata/62/6277a751c6c9f46359fc7004b3ee12f0 differ diff --git a/Roll a Ball/Library/metadata/62/6277a751c6c9f46359fc7004b3ee12f0.info b/Roll a Ball/Library/metadata/62/6277a751c6c9f46359fc7004b3ee12f0.info new file mode 100644 index 0000000000000000000000000000000000000000..cac0fafa47ab35f9ae3c0b1e07cad4efc8e3e2bc Binary files /dev/null and b/Roll a Ball/Library/metadata/62/6277a751c6c9f46359fc7004b3ee12f0.info differ diff --git a/Roll a Ball/Library/metadata/63/6366ee97f6b541449155028b9487355a b/Roll a Ball/Library/metadata/63/6366ee97f6b541449155028b9487355a new file mode 100644 index 0000000000000000000000000000000000000000..dbe3162bc4166a790519e279b37722b5b906c24a Binary files /dev/null and b/Roll a Ball/Library/metadata/63/6366ee97f6b541449155028b9487355a differ diff --git a/Roll a Ball/Library/metadata/63/6366ee97f6b541449155028b9487355a.info b/Roll a Ball/Library/metadata/63/6366ee97f6b541449155028b9487355a.info new file mode 100644 index 0000000000000000000000000000000000000000..da01b50e0aad991379fe0fd05dbbb3d8516c3779 Binary files /dev/null and b/Roll a Ball/Library/metadata/63/6366ee97f6b541449155028b9487355a.info differ diff --git a/Roll a Ball/Library/metadata/63/63e8a6023745e4347bb661e87a9be1d9 b/Roll a Ball/Library/metadata/63/63e8a6023745e4347bb661e87a9be1d9 new file mode 100644 index 0000000000000000000000000000000000000000..ee653280632182fa77906dec5ef55519ad0cefc8 Binary files /dev/null and b/Roll a Ball/Library/metadata/63/63e8a6023745e4347bb661e87a9be1d9 differ diff --git a/Roll a Ball/Library/metadata/63/63e8a6023745e4347bb661e87a9be1d9.info b/Roll a Ball/Library/metadata/63/63e8a6023745e4347bb661e87a9be1d9.info new file mode 100644 index 0000000000000000000000000000000000000000..c6ee27a2c57e3a73b34fc1a66ec875a4c784300d Binary files /dev/null and b/Roll a Ball/Library/metadata/63/63e8a6023745e4347bb661e87a9be1d9.info differ diff --git a/Roll a Ball/Library/metadata/64/645165c8169474bfbbeb8fb0bcfd26f5 b/Roll a Ball/Library/metadata/64/645165c8169474bfbbeb8fb0bcfd26f5 new file mode 100644 index 0000000000000000000000000000000000000000..adba1fc56dc5f1bcfeec439c9887d522da7c4eac Binary files /dev/null and b/Roll a Ball/Library/metadata/64/645165c8169474bfbbeb8fb0bcfd26f5 differ diff --git a/Roll a Ball/Library/metadata/64/645165c8169474bfbbeb8fb0bcfd26f5.info b/Roll a Ball/Library/metadata/64/645165c8169474bfbbeb8fb0bcfd26f5.info new file mode 100644 index 0000000000000000000000000000000000000000..05e841f9c5eba4ec358cb5f5408e310034c47434 Binary files /dev/null and b/Roll a Ball/Library/metadata/64/645165c8169474bfbbeb8fb0bcfd26f5.info differ diff --git a/Roll a Ball/Library/metadata/64/64b9fad609434c489c32b1cdf2004a1c b/Roll a Ball/Library/metadata/64/64b9fad609434c489c32b1cdf2004a1c new file mode 100644 index 0000000000000000000000000000000000000000..c1ffe4618d5a3c3bfda9851f9064f0523b946af4 Binary files /dev/null and b/Roll a Ball/Library/metadata/64/64b9fad609434c489c32b1cdf2004a1c differ diff --git a/Roll a Ball/Library/metadata/64/64b9fad609434c489c32b1cdf2004a1c.info b/Roll a Ball/Library/metadata/64/64b9fad609434c489c32b1cdf2004a1c.info new file mode 100644 index 0000000000000000000000000000000000000000..ba8126faa08cdb17355e7191cfe201bfb3b9556f Binary files /dev/null and b/Roll a Ball/Library/metadata/64/64b9fad609434c489c32b1cdf2004a1c.info differ diff --git a/Roll a Ball/Library/metadata/65/650ea1d167b834d0f86d94e1e8c3b80f b/Roll a Ball/Library/metadata/65/650ea1d167b834d0f86d94e1e8c3b80f new file mode 100644 index 0000000000000000000000000000000000000000..399207b7e48e931c8011b1e5abda40694e7743b7 Binary files /dev/null and b/Roll a Ball/Library/metadata/65/650ea1d167b834d0f86d94e1e8c3b80f differ diff --git a/Roll a Ball/Library/metadata/65/650ea1d167b834d0f86d94e1e8c3b80f.info b/Roll a Ball/Library/metadata/65/650ea1d167b834d0f86d94e1e8c3b80f.info new file mode 100644 index 0000000000000000000000000000000000000000..c20e502cce52c229e0c191203dcaa83bc152f708 Binary files /dev/null and b/Roll a Ball/Library/metadata/65/650ea1d167b834d0f86d94e1e8c3b80f.info differ diff --git a/Roll a Ball/Library/metadata/65/6546d7765b4165b40850b3667f981c26 b/Roll a Ball/Library/metadata/65/6546d7765b4165b40850b3667f981c26 new file mode 100644 index 0000000000000000000000000000000000000000..ec3c913498433f34d168fd496cd388ff61a83b33 Binary files /dev/null and b/Roll a Ball/Library/metadata/65/6546d7765b4165b40850b3667f981c26 differ diff --git a/Roll a Ball/Library/metadata/65/6546d7765b4165b40850b3667f981c26.info b/Roll a Ball/Library/metadata/65/6546d7765b4165b40850b3667f981c26.info new file mode 100644 index 0000000000000000000000000000000000000000..fa49ce12b93b4cb68dc009a2a81e8e4bc6f30337 Binary files /dev/null and b/Roll a Ball/Library/metadata/65/6546d7765b4165b40850b3667f981c26.info differ diff --git a/Roll a Ball/Library/metadata/65/656e461844099ae43a609ff6109b0877 b/Roll a Ball/Library/metadata/65/656e461844099ae43a609ff6109b0877 new file mode 100644 index 0000000000000000000000000000000000000000..c06c7f78dd15372ae31eb8af7e0970fe3f9de2f4 Binary files /dev/null and b/Roll a Ball/Library/metadata/65/656e461844099ae43a609ff6109b0877 differ diff --git a/Roll a Ball/Library/metadata/65/656e461844099ae43a609ff6109b0877.info b/Roll a Ball/Library/metadata/65/656e461844099ae43a609ff6109b0877.info new file mode 100644 index 0000000000000000000000000000000000000000..858661cf15262db171d493654c84c3514bf659bd Binary files /dev/null and b/Roll a Ball/Library/metadata/65/656e461844099ae43a609ff6109b0877.info differ diff --git a/Roll a Ball/Library/metadata/65/658c1fb149e7498aa072b0c0f3bf13f0 b/Roll a Ball/Library/metadata/65/658c1fb149e7498aa072b0c0f3bf13f0 new file mode 100644 index 0000000000000000000000000000000000000000..a4bec7b5d9cd5115299a07e8cc22c7bc7d1fb830 Binary files /dev/null and b/Roll a Ball/Library/metadata/65/658c1fb149e7498aa072b0c0f3bf13f0 differ diff --git a/Roll a Ball/Library/metadata/65/658c1fb149e7498aa072b0c0f3bf13f0.info b/Roll a Ball/Library/metadata/65/658c1fb149e7498aa072b0c0f3bf13f0.info new file mode 100644 index 0000000000000000000000000000000000000000..fd8d334eca35ed591eead702e2a7c30472280f88 Binary files /dev/null and b/Roll a Ball/Library/metadata/65/658c1fb149e7498aa072b0c0f3bf13f0.info differ diff --git a/Roll a Ball/Library/metadata/65/6597c6ea86d36477081342001145d8d9 b/Roll a Ball/Library/metadata/65/6597c6ea86d36477081342001145d8d9 new file mode 100644 index 0000000000000000000000000000000000000000..58c255ae169a34015f24c19f32364d4685d1fb07 Binary files /dev/null and b/Roll a Ball/Library/metadata/65/6597c6ea86d36477081342001145d8d9 differ diff --git a/Roll a Ball/Library/metadata/65/6597c6ea86d36477081342001145d8d9.info b/Roll a Ball/Library/metadata/65/6597c6ea86d36477081342001145d8d9.info new file mode 100644 index 0000000000000000000000000000000000000000..748d9c86dd61b0b6dbedc2ad6b69011baa2f6318 Binary files /dev/null and b/Roll a Ball/Library/metadata/65/6597c6ea86d36477081342001145d8d9.info differ diff --git a/Roll a Ball/Library/metadata/65/65d58d50c3db54f979b1ffae3777d74b b/Roll a Ball/Library/metadata/65/65d58d50c3db54f979b1ffae3777d74b new file mode 100644 index 0000000000000000000000000000000000000000..b1412d19c9ff367fc682785dbfbbea26edf5c7e3 Binary files /dev/null and b/Roll a Ball/Library/metadata/65/65d58d50c3db54f979b1ffae3777d74b differ diff --git a/Roll a Ball/Library/metadata/65/65d58d50c3db54f979b1ffae3777d74b.info b/Roll a Ball/Library/metadata/65/65d58d50c3db54f979b1ffae3777d74b.info new file mode 100644 index 0000000000000000000000000000000000000000..b40857153eeaab59ad7434a84903900eef7c68bc Binary files /dev/null and b/Roll a Ball/Library/metadata/65/65d58d50c3db54f979b1ffae3777d74b.info differ diff --git a/Roll a Ball/Library/metadata/66/66083b7f6dc2e433eae33f3244b2ce88 b/Roll a Ball/Library/metadata/66/66083b7f6dc2e433eae33f3244b2ce88 new file mode 100644 index 0000000000000000000000000000000000000000..846ed8273af672a91aaeb0d3b6ea12c69e3ad57e Binary files /dev/null and b/Roll a Ball/Library/metadata/66/66083b7f6dc2e433eae33f3244b2ce88 differ diff --git a/Roll a Ball/Library/metadata/66/66083b7f6dc2e433eae33f3244b2ce88.info b/Roll a Ball/Library/metadata/66/66083b7f6dc2e433eae33f3244b2ce88.info new file mode 100644 index 0000000000000000000000000000000000000000..d78973be5c82c77b454e1bea1621c05fc7eabfb2 Binary files /dev/null and b/Roll a Ball/Library/metadata/66/66083b7f6dc2e433eae33f3244b2ce88.info differ diff --git a/Roll a Ball/Library/metadata/66/669717f3193a457b9bad9665ebcae836 b/Roll a Ball/Library/metadata/66/669717f3193a457b9bad9665ebcae836 new file mode 100644 index 0000000000000000000000000000000000000000..b139113022ade487edbed40e31ecbfc72f5b2d90 Binary files /dev/null and b/Roll a Ball/Library/metadata/66/669717f3193a457b9bad9665ebcae836 differ diff --git a/Roll a Ball/Library/metadata/66/669717f3193a457b9bad9665ebcae836.info b/Roll a Ball/Library/metadata/66/669717f3193a457b9bad9665ebcae836.info new file mode 100644 index 0000000000000000000000000000000000000000..ed46092d052c09085c37076b0b7206cb5547d800 Binary files /dev/null and b/Roll a Ball/Library/metadata/66/669717f3193a457b9bad9665ebcae836.info differ diff --git a/Roll a Ball/Library/metadata/68/68eedd4e5b33b37429c02c4add0036fe b/Roll a Ball/Library/metadata/68/68eedd4e5b33b37429c02c4add0036fe new file mode 100644 index 0000000000000000000000000000000000000000..354c9b5dff75fb2875693793d977f3ac7969d4d8 Binary files /dev/null and b/Roll a Ball/Library/metadata/68/68eedd4e5b33b37429c02c4add0036fe differ diff --git a/Roll a Ball/Library/metadata/68/68eedd4e5b33b37429c02c4add0036fe.info b/Roll a Ball/Library/metadata/68/68eedd4e5b33b37429c02c4add0036fe.info new file mode 100644 index 0000000000000000000000000000000000000000..9280ce16540df4a91c97f003f207a027e69eb469 Binary files /dev/null and b/Roll a Ball/Library/metadata/68/68eedd4e5b33b37429c02c4add0036fe.info differ diff --git a/Roll a Ball/Library/metadata/69/691475c57a824010be0c6f474caeb7e1 b/Roll a Ball/Library/metadata/69/691475c57a824010be0c6f474caeb7e1 new file mode 100644 index 0000000000000000000000000000000000000000..fd97879c41099120ad0fcaa4a2b15b20476f40ee Binary files /dev/null and b/Roll a Ball/Library/metadata/69/691475c57a824010be0c6f474caeb7e1 differ diff --git a/Roll a Ball/Library/metadata/69/691475c57a824010be0c6f474caeb7e1.info b/Roll a Ball/Library/metadata/69/691475c57a824010be0c6f474caeb7e1.info new file mode 100644 index 0000000000000000000000000000000000000000..c6b4043f9130b4f986b85bd7e857bb33385b3d37 Binary files /dev/null and b/Roll a Ball/Library/metadata/69/691475c57a824010be0c6f474caeb7e1.info differ diff --git a/Roll a Ball/Library/metadata/69/691db8cb70c4426a8ae718465c21345f b/Roll a Ball/Library/metadata/69/691db8cb70c4426a8ae718465c21345f new file mode 100644 index 0000000000000000000000000000000000000000..00ee81958ae980933d02221e43537fad799877f6 Binary files /dev/null and b/Roll a Ball/Library/metadata/69/691db8cb70c4426a8ae718465c21345f differ diff --git a/Roll a Ball/Library/metadata/69/691db8cb70c4426a8ae718465c21345f.info b/Roll a Ball/Library/metadata/69/691db8cb70c4426a8ae718465c21345f.info new file mode 100644 index 0000000000000000000000000000000000000000..c5ba7102791a6cfd9f53e1e6d3007ddafa97408d Binary files /dev/null and b/Roll a Ball/Library/metadata/69/691db8cb70c4426a8ae718465c21345f.info differ diff --git a/Roll a Ball/Library/metadata/6a/6a10b2909283487f913b00d94cd3faf5 b/Roll a Ball/Library/metadata/6a/6a10b2909283487f913b00d94cd3faf5 new file mode 100644 index 0000000000000000000000000000000000000000..1784492fcf3c8d6916425db58502e6fc72adf861 Binary files /dev/null and b/Roll a Ball/Library/metadata/6a/6a10b2909283487f913b00d94cd3faf5 differ diff --git a/Roll a Ball/Library/metadata/6a/6a10b2909283487f913b00d94cd3faf5.info b/Roll a Ball/Library/metadata/6a/6a10b2909283487f913b00d94cd3faf5.info new file mode 100644 index 0000000000000000000000000000000000000000..bfed484830621133f060bc82fce476a9f70705c8 Binary files /dev/null and b/Roll a Ball/Library/metadata/6a/6a10b2909283487f913b00d94cd3faf5.info differ diff --git a/Roll a Ball/Library/metadata/6a/6ace62d30f494c948b71d5594afce11d b/Roll a Ball/Library/metadata/6a/6ace62d30f494c948b71d5594afce11d new file mode 100644 index 0000000000000000000000000000000000000000..99b954a8103702a001ce55204ef0dadc24e5482f Binary files /dev/null and b/Roll a Ball/Library/metadata/6a/6ace62d30f494c948b71d5594afce11d differ diff --git a/Roll a Ball/Library/metadata/6a/6ace62d30f494c948b71d5594afce11d.info b/Roll a Ball/Library/metadata/6a/6ace62d30f494c948b71d5594afce11d.info new file mode 100644 index 0000000000000000000000000000000000000000..0098171ad2dfaa1f80d19b68850d8a438b905714 Binary files /dev/null and b/Roll a Ball/Library/metadata/6a/6ace62d30f494c948b71d5594afce11d.info differ diff --git a/Roll a Ball/Library/metadata/6a/6ad632cbcc87f634d9b86006cdffdaf5 b/Roll a Ball/Library/metadata/6a/6ad632cbcc87f634d9b86006cdffdaf5 new file mode 100644 index 0000000000000000000000000000000000000000..312d10161c41f4c34ce6921f50bf25c9153cec72 Binary files /dev/null and b/Roll a Ball/Library/metadata/6a/6ad632cbcc87f634d9b86006cdffdaf5 differ diff --git a/Roll a Ball/Library/metadata/6a/6ad632cbcc87f634d9b86006cdffdaf5.info b/Roll a Ball/Library/metadata/6a/6ad632cbcc87f634d9b86006cdffdaf5.info new file mode 100644 index 0000000000000000000000000000000000000000..fdeb4f954e9f84e09f6451ebc23b7ec3efdc4d9f Binary files /dev/null and b/Roll a Ball/Library/metadata/6a/6ad632cbcc87f634d9b86006cdffdaf5.info differ diff --git a/Roll a Ball/Library/metadata/6a/6afb166a156df2d20433d981f4bb2832 b/Roll a Ball/Library/metadata/6a/6afb166a156df2d20433d981f4bb2832 new file mode 100644 index 0000000000000000000000000000000000000000..8da52dc99a7554424982614b711526773ca8ccb8 Binary files /dev/null and b/Roll a Ball/Library/metadata/6a/6afb166a156df2d20433d981f4bb2832 differ diff --git a/Roll a Ball/Library/metadata/6a/6afb166a156df2d20433d981f4bb2832.info b/Roll a Ball/Library/metadata/6a/6afb166a156df2d20433d981f4bb2832.info new file mode 100644 index 0000000000000000000000000000000000000000..22facec2599166a6bf52d46f7f2c22dd2d6f5186 Binary files /dev/null and b/Roll a Ball/Library/metadata/6a/6afb166a156df2d20433d981f4bb2832.info differ diff --git a/Roll a Ball/Library/metadata/6b/6b01141ed8f74d198965c86f25eb7040 b/Roll a Ball/Library/metadata/6b/6b01141ed8f74d198965c86f25eb7040 new file mode 100644 index 0000000000000000000000000000000000000000..276715a3573c87a7732c4f42ef47c4a44dfa8aaa Binary files /dev/null and b/Roll a Ball/Library/metadata/6b/6b01141ed8f74d198965c86f25eb7040 differ diff --git a/Roll a Ball/Library/metadata/6b/6b01141ed8f74d198965c86f25eb7040.info b/Roll a Ball/Library/metadata/6b/6b01141ed8f74d198965c86f25eb7040.info new file mode 100644 index 0000000000000000000000000000000000000000..fc1720d906e21eab4283063bc5bdf2fa2b5aeecb Binary files /dev/null and b/Roll a Ball/Library/metadata/6b/6b01141ed8f74d198965c86f25eb7040.info differ diff --git a/Roll a Ball/Library/metadata/6b/6b1ae1e78552c459d9ce27048ff51c7f b/Roll a Ball/Library/metadata/6b/6b1ae1e78552c459d9ce27048ff51c7f new file mode 100644 index 0000000000000000000000000000000000000000..60587cc9fc1de3459d7b02425578e9f21a6dbe86 Binary files /dev/null and b/Roll a Ball/Library/metadata/6b/6b1ae1e78552c459d9ce27048ff51c7f differ diff --git a/Roll a Ball/Library/metadata/6b/6b1ae1e78552c459d9ce27048ff51c7f.info b/Roll a Ball/Library/metadata/6b/6b1ae1e78552c459d9ce27048ff51c7f.info new file mode 100644 index 0000000000000000000000000000000000000000..8166002f62122fc5ef3c0435a9d274e2598b32e9 Binary files /dev/null and b/Roll a Ball/Library/metadata/6b/6b1ae1e78552c459d9ce27048ff51c7f.info differ diff --git a/Roll a Ball/Library/metadata/6b/6b259c4003a802847b9ada90744e34c5 b/Roll a Ball/Library/metadata/6b/6b259c4003a802847b9ada90744e34c5 new file mode 100644 index 0000000000000000000000000000000000000000..8bac249ef293f83e7d41fd755e842a44b3bf1bad Binary files /dev/null and b/Roll a Ball/Library/metadata/6b/6b259c4003a802847b9ada90744e34c5 differ diff --git a/Roll a Ball/Library/metadata/6b/6b259c4003a802847b9ada90744e34c5.info b/Roll a Ball/Library/metadata/6b/6b259c4003a802847b9ada90744e34c5.info new file mode 100644 index 0000000000000000000000000000000000000000..5805cec634ff2486a4ef6c54c61c5dc2fa39c242 Binary files /dev/null and b/Roll a Ball/Library/metadata/6b/6b259c4003a802847b9ada90744e34c5.info differ diff --git a/Roll a Ball/Library/metadata/6d/6d437b997e074079b4b2f6e395394f4b b/Roll a Ball/Library/metadata/6d/6d437b997e074079b4b2f6e395394f4b new file mode 100644 index 0000000000000000000000000000000000000000..774d85ba4fd3cc3214153c2db117c364ce92c68b Binary files /dev/null and b/Roll a Ball/Library/metadata/6d/6d437b997e074079b4b2f6e395394f4b differ diff --git a/Roll a Ball/Library/metadata/6d/6d437b997e074079b4b2f6e395394f4b.info b/Roll a Ball/Library/metadata/6d/6d437b997e074079b4b2f6e395394f4b.info new file mode 100644 index 0000000000000000000000000000000000000000..5b028e1c95a790a379fad30879691361829a1f29 Binary files /dev/null and b/Roll a Ball/Library/metadata/6d/6d437b997e074079b4b2f6e395394f4b.info differ diff --git a/Roll a Ball/Library/metadata/6d/6d56244f8c39a851975d3c0bd432c66f b/Roll a Ball/Library/metadata/6d/6d56244f8c39a851975d3c0bd432c66f new file mode 100644 index 0000000000000000000000000000000000000000..3542515cd60cf441cb9fd20d88aa7e52f2508233 Binary files /dev/null and b/Roll a Ball/Library/metadata/6d/6d56244f8c39a851975d3c0bd432c66f differ diff --git a/Roll a Ball/Library/metadata/6d/6d56244f8c39a851975d3c0bd432c66f.info b/Roll a Ball/Library/metadata/6d/6d56244f8c39a851975d3c0bd432c66f.info new file mode 100644 index 0000000000000000000000000000000000000000..f43963aba47d153d4d635240e60cb6fc24add591 Binary files /dev/null and b/Roll a Ball/Library/metadata/6d/6d56244f8c39a851975d3c0bd432c66f.info differ diff --git a/Roll a Ball/Library/metadata/6d/6d6f82a762acb4417b895d3babc790f9 b/Roll a Ball/Library/metadata/6d/6d6f82a762acb4417b895d3babc790f9 new file mode 100644 index 0000000000000000000000000000000000000000..42ef4a13c8c952ff66575fd962ba9b727d6427d5 Binary files /dev/null and b/Roll a Ball/Library/metadata/6d/6d6f82a762acb4417b895d3babc790f9 differ diff --git a/Roll a Ball/Library/metadata/6d/6d6f82a762acb4417b895d3babc790f9.info b/Roll a Ball/Library/metadata/6d/6d6f82a762acb4417b895d3babc790f9.info new file mode 100644 index 0000000000000000000000000000000000000000..cad88730e89415b2a61caf4b0e64786fc2a789a5 Binary files /dev/null and b/Roll a Ball/Library/metadata/6d/6d6f82a762acb4417b895d3babc790f9.info differ diff --git a/Roll a Ball/Library/metadata/6d/6d9df2bc198c417db00037803568139c b/Roll a Ball/Library/metadata/6d/6d9df2bc198c417db00037803568139c new file mode 100644 index 0000000000000000000000000000000000000000..eb1aabdf2c6c40030ebf43f292122ef984fd4fee Binary files /dev/null and b/Roll a Ball/Library/metadata/6d/6d9df2bc198c417db00037803568139c differ diff --git a/Roll a Ball/Library/metadata/6d/6d9df2bc198c417db00037803568139c.info b/Roll a Ball/Library/metadata/6d/6d9df2bc198c417db00037803568139c.info new file mode 100644 index 0000000000000000000000000000000000000000..860fb6cde616085082751bcbf305a585fa895833 Binary files /dev/null and b/Roll a Ball/Library/metadata/6d/6d9df2bc198c417db00037803568139c.info differ diff --git a/Roll a Ball/Library/metadata/6d/6dbcf248c987476181a37f01a1814975 b/Roll a Ball/Library/metadata/6d/6dbcf248c987476181a37f01a1814975 new file mode 100644 index 0000000000000000000000000000000000000000..ca7eadd12b0a4cd8763bf6cf34d18f6470fd98c3 Binary files /dev/null and b/Roll a Ball/Library/metadata/6d/6dbcf248c987476181a37f01a1814975 differ diff --git a/Roll a Ball/Library/metadata/6d/6dbcf248c987476181a37f01a1814975.info b/Roll a Ball/Library/metadata/6d/6dbcf248c987476181a37f01a1814975.info new file mode 100644 index 0000000000000000000000000000000000000000..c65c715d756821e62f4ec28373327a4ee0462356 Binary files /dev/null and b/Roll a Ball/Library/metadata/6d/6dbcf248c987476181a37f01a1814975.info differ diff --git a/Roll a Ball/Library/metadata/6e/6e1c8b97ec8aa0464e92506ffe099558 b/Roll a Ball/Library/metadata/6e/6e1c8b97ec8aa0464e92506ffe099558 new file mode 100644 index 0000000000000000000000000000000000000000..8b984b74e969c274acbfa067b1aaf0351f8e8934 Binary files /dev/null and b/Roll a Ball/Library/metadata/6e/6e1c8b97ec8aa0464e92506ffe099558 differ diff --git a/Roll a Ball/Library/metadata/6e/6e1c8b97ec8aa0464e92506ffe099558.info b/Roll a Ball/Library/metadata/6e/6e1c8b97ec8aa0464e92506ffe099558.info new file mode 100644 index 0000000000000000000000000000000000000000..9ecca9edb9f79d45c57742b60a196672bd9f86a6 Binary files /dev/null and b/Roll a Ball/Library/metadata/6e/6e1c8b97ec8aa0464e92506ffe099558.info differ diff --git a/Roll a Ball/Library/metadata/6e/6e2d432c5ea14e75aa3a79f90f704442 b/Roll a Ball/Library/metadata/6e/6e2d432c5ea14e75aa3a79f90f704442 new file mode 100644 index 0000000000000000000000000000000000000000..82c4d6fd6131b78be6b7c089dc16b3cef0ce84b5 Binary files /dev/null and b/Roll a Ball/Library/metadata/6e/6e2d432c5ea14e75aa3a79f90f704442 differ diff --git a/Roll a Ball/Library/metadata/6e/6e2d432c5ea14e75aa3a79f90f704442.info b/Roll a Ball/Library/metadata/6e/6e2d432c5ea14e75aa3a79f90f704442.info new file mode 100644 index 0000000000000000000000000000000000000000..9a76bf066372afc3e872e2ad45ceb949d9bdaae7 Binary files /dev/null and b/Roll a Ball/Library/metadata/6e/6e2d432c5ea14e75aa3a79f90f704442.info differ diff --git a/Roll a Ball/Library/metadata/6e/6e7c8cfeedae74eb3a562055e069e441 b/Roll a Ball/Library/metadata/6e/6e7c8cfeedae74eb3a562055e069e441 new file mode 100644 index 0000000000000000000000000000000000000000..6145d0e0899e34fca34fc68ce19808b1a1a7674d Binary files /dev/null and b/Roll a Ball/Library/metadata/6e/6e7c8cfeedae74eb3a562055e069e441 differ diff --git a/Roll a Ball/Library/metadata/6e/6e7c8cfeedae74eb3a562055e069e441.info b/Roll a Ball/Library/metadata/6e/6e7c8cfeedae74eb3a562055e069e441.info new file mode 100644 index 0000000000000000000000000000000000000000..a2808532fab16bb16a316ee9495cc7f4cee1d948 Binary files /dev/null and b/Roll a Ball/Library/metadata/6e/6e7c8cfeedae74eb3a562055e069e441.info differ diff --git a/Roll a Ball/Library/metadata/6f/6f1c7ebc8ac78cb951be24c238cbd3ba b/Roll a Ball/Library/metadata/6f/6f1c7ebc8ac78cb951be24c238cbd3ba new file mode 100644 index 0000000000000000000000000000000000000000..d77c7ab103d8f33bfc09dcd496b69f89ff2ae763 Binary files /dev/null and b/Roll a Ball/Library/metadata/6f/6f1c7ebc8ac78cb951be24c238cbd3ba differ diff --git a/Roll a Ball/Library/metadata/6f/6f1c7ebc8ac78cb951be24c238cbd3ba.info b/Roll a Ball/Library/metadata/6f/6f1c7ebc8ac78cb951be24c238cbd3ba.info new file mode 100644 index 0000000000000000000000000000000000000000..bf38c747bc316454c639eaac63a9823671e9005f Binary files /dev/null and b/Roll a Ball/Library/metadata/6f/6f1c7ebc8ac78cb951be24c238cbd3ba.info differ diff --git a/Roll a Ball/Library/metadata/6f/6f516f1ec21a54a59a92bf99db2d9535 b/Roll a Ball/Library/metadata/6f/6f516f1ec21a54a59a92bf99db2d9535 new file mode 100644 index 0000000000000000000000000000000000000000..ffa096b1bc9c5df7e87497bb959639bc67f7c78b Binary files /dev/null and b/Roll a Ball/Library/metadata/6f/6f516f1ec21a54a59a92bf99db2d9535 differ diff --git a/Roll a Ball/Library/metadata/6f/6f516f1ec21a54a59a92bf99db2d9535.info b/Roll a Ball/Library/metadata/6f/6f516f1ec21a54a59a92bf99db2d9535.info new file mode 100644 index 0000000000000000000000000000000000000000..cb57d4fb6dd3f0112b2e89bf35a14ad721d9a16c Binary files /dev/null and b/Roll a Ball/Library/metadata/6f/6f516f1ec21a54a59a92bf99db2d9535.info differ diff --git a/Roll a Ball/Library/metadata/6f/6fdea2af3daa40fe8f88e5e9cfc17abb b/Roll a Ball/Library/metadata/6f/6fdea2af3daa40fe8f88e5e9cfc17abb new file mode 100644 index 0000000000000000000000000000000000000000..e2b236d34256026e1a71570fd7a43a3a427f83c1 Binary files /dev/null and b/Roll a Ball/Library/metadata/6f/6fdea2af3daa40fe8f88e5e9cfc17abb differ diff --git a/Roll a Ball/Library/metadata/6f/6fdea2af3daa40fe8f88e5e9cfc17abb.info b/Roll a Ball/Library/metadata/6f/6fdea2af3daa40fe8f88e5e9cfc17abb.info new file mode 100644 index 0000000000000000000000000000000000000000..23633e6d51330fd8ed498ac034b071e827abfb18 Binary files /dev/null and b/Roll a Ball/Library/metadata/6f/6fdea2af3daa40fe8f88e5e9cfc17abb.info differ diff --git a/Roll a Ball/Library/metadata/6f/6fe576b47d8b47688ec5d02bccd15cf9 b/Roll a Ball/Library/metadata/6f/6fe576b47d8b47688ec5d02bccd15cf9 new file mode 100644 index 0000000000000000000000000000000000000000..3acbc75a1149ebbb631b81a1465d8ac9008874e7 Binary files /dev/null and b/Roll a Ball/Library/metadata/6f/6fe576b47d8b47688ec5d02bccd15cf9 differ diff --git a/Roll a Ball/Library/metadata/6f/6fe576b47d8b47688ec5d02bccd15cf9.info b/Roll a Ball/Library/metadata/6f/6fe576b47d8b47688ec5d02bccd15cf9.info new file mode 100644 index 0000000000000000000000000000000000000000..96ee7fd88b0b19aaf007f437047c61e530a51830 Binary files /dev/null and b/Roll a Ball/Library/metadata/6f/6fe576b47d8b47688ec5d02bccd15cf9.info differ diff --git a/Roll a Ball/Library/metadata/70/7065397ff8184621aa3ca4f854491259 b/Roll a Ball/Library/metadata/70/7065397ff8184621aa3ca4f854491259 new file mode 100644 index 0000000000000000000000000000000000000000..f3706e4451ebc67e197254cb9c4266d7af23d6b7 Binary files /dev/null and b/Roll a Ball/Library/metadata/70/7065397ff8184621aa3ca4f854491259 differ diff --git a/Roll a Ball/Library/metadata/70/7065397ff8184621aa3ca4f854491259.info b/Roll a Ball/Library/metadata/70/7065397ff8184621aa3ca4f854491259.info new file mode 100644 index 0000000000000000000000000000000000000000..afba0ad8a5ee3e82fe564826d2096142686691ef Binary files /dev/null and b/Roll a Ball/Library/metadata/70/7065397ff8184621aa3ca4f854491259.info differ diff --git a/Roll a Ball/Library/metadata/70/70d4d75a2877243758b0750cbc75b6eb b/Roll a Ball/Library/metadata/70/70d4d75a2877243758b0750cbc75b6eb new file mode 100644 index 0000000000000000000000000000000000000000..c579b84b966e518983a133671839027655f7f216 Binary files /dev/null and b/Roll a Ball/Library/metadata/70/70d4d75a2877243758b0750cbc75b6eb differ diff --git a/Roll a Ball/Library/metadata/70/70d4d75a2877243758b0750cbc75b6eb.info b/Roll a Ball/Library/metadata/70/70d4d75a2877243758b0750cbc75b6eb.info new file mode 100644 index 0000000000000000000000000000000000000000..7cd9b6a799487e80fedc00173e153b8ade914c85 Binary files /dev/null and b/Roll a Ball/Library/metadata/70/70d4d75a2877243758b0750cbc75b6eb.info differ diff --git a/Roll a Ball/Library/metadata/71/71b11355001648444b41d17fd36c150d b/Roll a Ball/Library/metadata/71/71b11355001648444b41d17fd36c150d new file mode 100644 index 0000000000000000000000000000000000000000..85f64a7877741a288a85322c95a541881ef69c5f Binary files /dev/null and b/Roll a Ball/Library/metadata/71/71b11355001648444b41d17fd36c150d differ diff --git a/Roll a Ball/Library/metadata/71/71b11355001648444b41d17fd36c150d.info b/Roll a Ball/Library/metadata/71/71b11355001648444b41d17fd36c150d.info new file mode 100644 index 0000000000000000000000000000000000000000..ac76ad266019f79b0d0596ce2afc26556c04efcc Binary files /dev/null and b/Roll a Ball/Library/metadata/71/71b11355001648444b41d17fd36c150d.info differ diff --git a/Roll a Ball/Library/metadata/71/71c1514a6bd24e1e882cebbe1904ce04 b/Roll a Ball/Library/metadata/71/71c1514a6bd24e1e882cebbe1904ce04 new file mode 100644 index 0000000000000000000000000000000000000000..61442cfc15a356bcb8569050d4419f5551a648b2 Binary files /dev/null and b/Roll a Ball/Library/metadata/71/71c1514a6bd24e1e882cebbe1904ce04 differ diff --git a/Roll a Ball/Library/metadata/71/71c1514a6bd24e1e882cebbe1904ce04.info b/Roll a Ball/Library/metadata/71/71c1514a6bd24e1e882cebbe1904ce04.info new file mode 100644 index 0000000000000000000000000000000000000000..47a6ebf4efc2471c1553de2692169952149f4d99 Binary files /dev/null and b/Roll a Ball/Library/metadata/71/71c1514a6bd24e1e882cebbe1904ce04.info differ diff --git a/Roll a Ball/Library/metadata/72/7241c7dc25374fc1a6ab3ef9da79c363 b/Roll a Ball/Library/metadata/72/7241c7dc25374fc1a6ab3ef9da79c363 new file mode 100644 index 0000000000000000000000000000000000000000..4ad953c57f9d414d93b04569510951a76de5b763 Binary files /dev/null and b/Roll a Ball/Library/metadata/72/7241c7dc25374fc1a6ab3ef9da79c363 differ diff --git a/Roll a Ball/Library/metadata/72/7241c7dc25374fc1a6ab3ef9da79c363.info b/Roll a Ball/Library/metadata/72/7241c7dc25374fc1a6ab3ef9da79c363.info new file mode 100644 index 0000000000000000000000000000000000000000..ca5bce12ba1b10f834223088d2f9bf7df33e1999 Binary files /dev/null and b/Roll a Ball/Library/metadata/72/7241c7dc25374fc1a6ab3ef9da79c363.info differ diff --git a/Roll a Ball/Library/metadata/74/7496af95dfe67cf429ac65edaaf99106 b/Roll a Ball/Library/metadata/74/7496af95dfe67cf429ac65edaaf99106 new file mode 100644 index 0000000000000000000000000000000000000000..e1287c6ced2630b3f44c0e24249767c3911dc8e5 Binary files /dev/null and b/Roll a Ball/Library/metadata/74/7496af95dfe67cf429ac65edaaf99106 differ diff --git a/Roll a Ball/Library/metadata/74/7496af95dfe67cf429ac65edaaf99106.info b/Roll a Ball/Library/metadata/74/7496af95dfe67cf429ac65edaaf99106.info new file mode 100644 index 0000000000000000000000000000000000000000..b80b22ae2a1d3c5325d26a2b9f8ab60649850a2a Binary files /dev/null and b/Roll a Ball/Library/metadata/74/7496af95dfe67cf429ac65edaaf99106.info differ diff --git a/Roll a Ball/Library/metadata/75/75938f72739584ed9925bf4ae8989079 b/Roll a Ball/Library/metadata/75/75938f72739584ed9925bf4ae8989079 new file mode 100644 index 0000000000000000000000000000000000000000..4190e6e9092b9800f6e72a259db22917df4efae9 Binary files /dev/null and b/Roll a Ball/Library/metadata/75/75938f72739584ed9925bf4ae8989079 differ diff --git a/Roll a Ball/Library/metadata/75/75938f72739584ed9925bf4ae8989079.info b/Roll a Ball/Library/metadata/75/75938f72739584ed9925bf4ae8989079.info new file mode 100644 index 0000000000000000000000000000000000000000..db1b84c04f0a13ed2e233fdef7b7f2932886854c Binary files /dev/null and b/Roll a Ball/Library/metadata/75/75938f72739584ed9925bf4ae8989079.info differ diff --git a/Roll a Ball/Library/metadata/76/76078ddafb924ce19edc6034201cb15b b/Roll a Ball/Library/metadata/76/76078ddafb924ce19edc6034201cb15b new file mode 100644 index 0000000000000000000000000000000000000000..2329e915a0ebe0dc44c102141feac244b283dd82 Binary files /dev/null and b/Roll a Ball/Library/metadata/76/76078ddafb924ce19edc6034201cb15b differ diff --git a/Roll a Ball/Library/metadata/76/76078ddafb924ce19edc6034201cb15b.info b/Roll a Ball/Library/metadata/76/76078ddafb924ce19edc6034201cb15b.info new file mode 100644 index 0000000000000000000000000000000000000000..d31b175df33bc06cecb0cc1bebee4c811745b6b1 Binary files /dev/null and b/Roll a Ball/Library/metadata/76/76078ddafb924ce19edc6034201cb15b.info differ diff --git a/Roll a Ball/Library/metadata/76/760934a36e5f490db3c9fcaf497625a4 b/Roll a Ball/Library/metadata/76/760934a36e5f490db3c9fcaf497625a4 new file mode 100644 index 0000000000000000000000000000000000000000..5dcecb54ace246df79797c4c91fa04489ef7cf90 Binary files /dev/null and b/Roll a Ball/Library/metadata/76/760934a36e5f490db3c9fcaf497625a4 differ diff --git a/Roll a Ball/Library/metadata/76/760934a36e5f490db3c9fcaf497625a4.info b/Roll a Ball/Library/metadata/76/760934a36e5f490db3c9fcaf497625a4.info new file mode 100644 index 0000000000000000000000000000000000000000..76cb7da2c81d32571db54ae78cf616f883738dc9 Binary files /dev/null and b/Roll a Ball/Library/metadata/76/760934a36e5f490db3c9fcaf497625a4.info differ diff --git a/Roll a Ball/Library/metadata/76/7668179ede524d6396c8b7d84461ea29 b/Roll a Ball/Library/metadata/76/7668179ede524d6396c8b7d84461ea29 new file mode 100644 index 0000000000000000000000000000000000000000..85ecde451780173893492813c3924c3719e60396 Binary files /dev/null and b/Roll a Ball/Library/metadata/76/7668179ede524d6396c8b7d84461ea29 differ diff --git a/Roll a Ball/Library/metadata/76/7668179ede524d6396c8b7d84461ea29.info b/Roll a Ball/Library/metadata/76/7668179ede524d6396c8b7d84461ea29.info new file mode 100644 index 0000000000000000000000000000000000000000..7770956074b58004589f4cd880107a624497ff0e Binary files /dev/null and b/Roll a Ball/Library/metadata/76/7668179ede524d6396c8b7d84461ea29.info differ diff --git a/Roll a Ball/Library/metadata/76/768d77435df35443bad74aedc993c0cf b/Roll a Ball/Library/metadata/76/768d77435df35443bad74aedc993c0cf new file mode 100644 index 0000000000000000000000000000000000000000..11620328fc5b3fb8c17fc758305cb036bd5dffa9 Binary files /dev/null and b/Roll a Ball/Library/metadata/76/768d77435df35443bad74aedc993c0cf differ diff --git a/Roll a Ball/Library/metadata/76/768d77435df35443bad74aedc993c0cf.info b/Roll a Ball/Library/metadata/76/768d77435df35443bad74aedc993c0cf.info new file mode 100644 index 0000000000000000000000000000000000000000..16ddf9f38fe9288d123695f226680c18b90e2b62 Binary files /dev/null and b/Roll a Ball/Library/metadata/76/768d77435df35443bad74aedc993c0cf.info differ diff --git a/Roll a Ball/Library/metadata/77/77476292f9fa4905a787e6417853846b b/Roll a Ball/Library/metadata/77/77476292f9fa4905a787e6417853846b new file mode 100644 index 0000000000000000000000000000000000000000..8b99a8cd508287890e44b344bc43341ace0ca5bd Binary files /dev/null and b/Roll a Ball/Library/metadata/77/77476292f9fa4905a787e6417853846b differ diff --git a/Roll a Ball/Library/metadata/77/77476292f9fa4905a787e6417853846b.info b/Roll a Ball/Library/metadata/77/77476292f9fa4905a787e6417853846b.info new file mode 100644 index 0000000000000000000000000000000000000000..e214952adbe7aff3bb2c4ae6c19e666b1fb992d0 Binary files /dev/null and b/Roll a Ball/Library/metadata/77/77476292f9fa4905a787e6417853846b.info differ diff --git a/Roll a Ball/Library/metadata/78/782c49e6e68074dc7ba12c95537825ce b/Roll a Ball/Library/metadata/78/782c49e6e68074dc7ba12c95537825ce new file mode 100644 index 0000000000000000000000000000000000000000..91e75e4d6e74345d0a79efb2f5cfd96bfcfd8203 Binary files /dev/null and b/Roll a Ball/Library/metadata/78/782c49e6e68074dc7ba12c95537825ce differ diff --git a/Roll a Ball/Library/metadata/78/782c49e6e68074dc7ba12c95537825ce.info b/Roll a Ball/Library/metadata/78/782c49e6e68074dc7ba12c95537825ce.info new file mode 100644 index 0000000000000000000000000000000000000000..0364df11e58b697092e60977a06047dc5b867e09 Binary files /dev/null and b/Roll a Ball/Library/metadata/78/782c49e6e68074dc7ba12c95537825ce.info differ diff --git a/Roll a Ball/Library/metadata/78/782de34c17796430ba8d0ceddb60944e b/Roll a Ball/Library/metadata/78/782de34c17796430ba8d0ceddb60944e new file mode 100644 index 0000000000000000000000000000000000000000..a04cb1fb6a2b447e9dabe950cc582e1f3001af17 Binary files /dev/null and b/Roll a Ball/Library/metadata/78/782de34c17796430ba8d0ceddb60944e differ diff --git a/Roll a Ball/Library/metadata/78/782de34c17796430ba8d0ceddb60944e.info b/Roll a Ball/Library/metadata/78/782de34c17796430ba8d0ceddb60944e.info new file mode 100644 index 0000000000000000000000000000000000000000..754f44b6816a237a29872aebae3fa40d59b18c30 Binary files /dev/null and b/Roll a Ball/Library/metadata/78/782de34c17796430ba8d0ceddb60944e.info differ diff --git a/Roll a Ball/Library/metadata/78/78759e25237a7430587982cd92a2a0d8 b/Roll a Ball/Library/metadata/78/78759e25237a7430587982cd92a2a0d8 new file mode 100644 index 0000000000000000000000000000000000000000..19c36cf4e6d0187a23c8a8aa123fdeb67fb83925 Binary files /dev/null and b/Roll a Ball/Library/metadata/78/78759e25237a7430587982cd92a2a0d8 differ diff --git a/Roll a Ball/Library/metadata/78/78759e25237a7430587982cd92a2a0d8.info b/Roll a Ball/Library/metadata/78/78759e25237a7430587982cd92a2a0d8.info new file mode 100644 index 0000000000000000000000000000000000000000..9eab182aa5775f092587c32c9382be4a24bfbef8 Binary files /dev/null and b/Roll a Ball/Library/metadata/78/78759e25237a7430587982cd92a2a0d8.info differ diff --git a/Roll a Ball/Library/metadata/78/78e267bad6d564d49803ba3e9c13ff2e b/Roll a Ball/Library/metadata/78/78e267bad6d564d49803ba3e9c13ff2e new file mode 100644 index 0000000000000000000000000000000000000000..e6b55b192fe35bf34618e9204af42c72ad1a1d4c Binary files /dev/null and b/Roll a Ball/Library/metadata/78/78e267bad6d564d49803ba3e9c13ff2e differ diff --git a/Roll a Ball/Library/metadata/78/78e267bad6d564d49803ba3e9c13ff2e.info b/Roll a Ball/Library/metadata/78/78e267bad6d564d49803ba3e9c13ff2e.info new file mode 100644 index 0000000000000000000000000000000000000000..51db78ab2f4521a0818ddd10810b278ceefe3139 Binary files /dev/null and b/Roll a Ball/Library/metadata/78/78e267bad6d564d49803ba3e9c13ff2e.info differ diff --git a/Roll a Ball/Library/metadata/79/7927683d1fc5848b5abfb54ebb1028ec b/Roll a Ball/Library/metadata/79/7927683d1fc5848b5abfb54ebb1028ec new file mode 100644 index 0000000000000000000000000000000000000000..91c849cb61f40d3cf12304d9696458f1dadabf4b Binary files /dev/null and b/Roll a Ball/Library/metadata/79/7927683d1fc5848b5abfb54ebb1028ec differ diff --git a/Roll a Ball/Library/metadata/79/7927683d1fc5848b5abfb54ebb1028ec.info b/Roll a Ball/Library/metadata/79/7927683d1fc5848b5abfb54ebb1028ec.info new file mode 100644 index 0000000000000000000000000000000000000000..3dcc585865c88986ad7aac28b6914c5f352b0ebf Binary files /dev/null and b/Roll a Ball/Library/metadata/79/7927683d1fc5848b5abfb54ebb1028ec.info differ diff --git a/Roll a Ball/Library/metadata/79/797cf0c5f1b7e4e1ab17481bd9b698eb b/Roll a Ball/Library/metadata/79/797cf0c5f1b7e4e1ab17481bd9b698eb new file mode 100644 index 0000000000000000000000000000000000000000..48fb4a2bddc077037b5c3f8062cf0d671739b3fc Binary files /dev/null and b/Roll a Ball/Library/metadata/79/797cf0c5f1b7e4e1ab17481bd9b698eb differ diff --git a/Roll a Ball/Library/metadata/79/797cf0c5f1b7e4e1ab17481bd9b698eb.info b/Roll a Ball/Library/metadata/79/797cf0c5f1b7e4e1ab17481bd9b698eb.info new file mode 100644 index 0000000000000000000000000000000000000000..8e504b47d9d91936966ca165c11e7d19f56c6896 Binary files /dev/null and b/Roll a Ball/Library/metadata/79/797cf0c5f1b7e4e1ab17481bd9b698eb.info differ diff --git a/Roll a Ball/Library/metadata/79/79ff392d1bde4ad78a3836a4a480392d b/Roll a Ball/Library/metadata/79/79ff392d1bde4ad78a3836a4a480392d new file mode 100644 index 0000000000000000000000000000000000000000..fe088bc5fc300886ad269853cd10b5a34d965e84 Binary files /dev/null and b/Roll a Ball/Library/metadata/79/79ff392d1bde4ad78a3836a4a480392d differ diff --git a/Roll a Ball/Library/metadata/79/79ff392d1bde4ad78a3836a4a480392d.info b/Roll a Ball/Library/metadata/79/79ff392d1bde4ad78a3836a4a480392d.info new file mode 100644 index 0000000000000000000000000000000000000000..a7d77bfa42a54dea13ee9d293bc8d9ab9cfb259c Binary files /dev/null and b/Roll a Ball/Library/metadata/79/79ff392d1bde4ad78a3836a4a480392d.info differ diff --git a/Roll a Ball/Library/metadata/7a/7a573b834e2608c4f982daf527bdb47a b/Roll a Ball/Library/metadata/7a/7a573b834e2608c4f982daf527bdb47a new file mode 100644 index 0000000000000000000000000000000000000000..32f9264ade98e322b0e35105208b126661538336 Binary files /dev/null and b/Roll a Ball/Library/metadata/7a/7a573b834e2608c4f982daf527bdb47a differ diff --git a/Roll a Ball/Library/metadata/7a/7a573b834e2608c4f982daf527bdb47a.info b/Roll a Ball/Library/metadata/7a/7a573b834e2608c4f982daf527bdb47a.info new file mode 100644 index 0000000000000000000000000000000000000000..156bd330ec240cc3335b45b57eadfb7cd2a7a6a0 Binary files /dev/null and b/Roll a Ball/Library/metadata/7a/7a573b834e2608c4f982daf527bdb47a.info differ diff --git a/Roll a Ball/Library/metadata/7a/7a74094b34f74992a5121c0586ccf6ea b/Roll a Ball/Library/metadata/7a/7a74094b34f74992a5121c0586ccf6ea new file mode 100644 index 0000000000000000000000000000000000000000..98502e45a4fc104347be1ae240e469eef0074032 Binary files /dev/null and b/Roll a Ball/Library/metadata/7a/7a74094b34f74992a5121c0586ccf6ea differ diff --git a/Roll a Ball/Library/metadata/7a/7a74094b34f74992a5121c0586ccf6ea.info b/Roll a Ball/Library/metadata/7a/7a74094b34f74992a5121c0586ccf6ea.info new file mode 100644 index 0000000000000000000000000000000000000000..728e1a4b5afe9e5d6fedad548c4281e8ea8c3b58 Binary files /dev/null and b/Roll a Ball/Library/metadata/7a/7a74094b34f74992a5121c0586ccf6ea.info differ diff --git a/Roll a Ball/Library/metadata/7a/7aad9e80c95b4991a1f4d017c8caf386 b/Roll a Ball/Library/metadata/7a/7aad9e80c95b4991a1f4d017c8caf386 new file mode 100644 index 0000000000000000000000000000000000000000..6ee19d2d43744397bd2260b6eea705cab51f9b79 Binary files /dev/null and b/Roll a Ball/Library/metadata/7a/7aad9e80c95b4991a1f4d017c8caf386 differ diff --git a/Roll a Ball/Library/metadata/7a/7aad9e80c95b4991a1f4d017c8caf386.info b/Roll a Ball/Library/metadata/7a/7aad9e80c95b4991a1f4d017c8caf386.info new file mode 100644 index 0000000000000000000000000000000000000000..9ac7c619451d47f930e31a64ad26dd71b33db312 Binary files /dev/null and b/Roll a Ball/Library/metadata/7a/7aad9e80c95b4991a1f4d017c8caf386.info differ diff --git a/Roll a Ball/Library/metadata/7b/7b186a0d29a784d81809e8a5471d155e b/Roll a Ball/Library/metadata/7b/7b186a0d29a784d81809e8a5471d155e new file mode 100644 index 0000000000000000000000000000000000000000..0b699b78b8ed9b24645e6a9be74f227b10b683c3 Binary files /dev/null and b/Roll a Ball/Library/metadata/7b/7b186a0d29a784d81809e8a5471d155e differ diff --git a/Roll a Ball/Library/metadata/7b/7b186a0d29a784d81809e8a5471d155e.info b/Roll a Ball/Library/metadata/7b/7b186a0d29a784d81809e8a5471d155e.info new file mode 100644 index 0000000000000000000000000000000000000000..33ed435389532e41b150f2671a35931c6da2effd Binary files /dev/null and b/Roll a Ball/Library/metadata/7b/7b186a0d29a784d81809e8a5471d155e.info differ diff --git a/Roll a Ball/Library/metadata/7b/7b743370ac3e4ec2a1668f5455a8ef8a b/Roll a Ball/Library/metadata/7b/7b743370ac3e4ec2a1668f5455a8ef8a new file mode 100644 index 0000000000000000000000000000000000000000..f88f843df48a823ba641e4c66dc5cde53bcddbe0 Binary files /dev/null and b/Roll a Ball/Library/metadata/7b/7b743370ac3e4ec2a1668f5455a8ef8a differ diff --git a/Roll a Ball/Library/metadata/7b/7b743370ac3e4ec2a1668f5455a8ef8a.info b/Roll a Ball/Library/metadata/7b/7b743370ac3e4ec2a1668f5455a8ef8a.info new file mode 100644 index 0000000000000000000000000000000000000000..604c700e851c9b0451c0e60571fb48aaa29cacc8 Binary files /dev/null and b/Roll a Ball/Library/metadata/7b/7b743370ac3e4ec2a1668f5455a8ef8a.info differ diff --git a/Roll a Ball/Library/metadata/7b/7b87dac66d6e74d5f848d26f169bbe89 b/Roll a Ball/Library/metadata/7b/7b87dac66d6e74d5f848d26f169bbe89 new file mode 100644 index 0000000000000000000000000000000000000000..edca30985feb069bb2430196532a99ed8d29319e Binary files /dev/null and b/Roll a Ball/Library/metadata/7b/7b87dac66d6e74d5f848d26f169bbe89 differ diff --git a/Roll a Ball/Library/metadata/7b/7b87dac66d6e74d5f848d26f169bbe89.info b/Roll a Ball/Library/metadata/7b/7b87dac66d6e74d5f848d26f169bbe89.info new file mode 100644 index 0000000000000000000000000000000000000000..ae4c5e2c2550e576912770ef62afd07488bb66ae Binary files /dev/null and b/Roll a Ball/Library/metadata/7b/7b87dac66d6e74d5f848d26f169bbe89.info differ diff --git a/Roll a Ball/Library/metadata/7c/7c3a5d6e39b874f468b2691537168513 b/Roll a Ball/Library/metadata/7c/7c3a5d6e39b874f468b2691537168513 new file mode 100644 index 0000000000000000000000000000000000000000..4653603f600794173739d35d44a15a09bc457f51 Binary files /dev/null and b/Roll a Ball/Library/metadata/7c/7c3a5d6e39b874f468b2691537168513 differ diff --git a/Roll a Ball/Library/metadata/7c/7c3a5d6e39b874f468b2691537168513.info b/Roll a Ball/Library/metadata/7c/7c3a5d6e39b874f468b2691537168513.info new file mode 100644 index 0000000000000000000000000000000000000000..be83f1d78d5f0c6db8061b388d73db8315b2565d Binary files /dev/null and b/Roll a Ball/Library/metadata/7c/7c3a5d6e39b874f468b2691537168513.info differ diff --git a/Roll a Ball/Library/metadata/7d/7d22934bf84ccd14082fd2d5a9f5951e b/Roll a Ball/Library/metadata/7d/7d22934bf84ccd14082fd2d5a9f5951e new file mode 100644 index 0000000000000000000000000000000000000000..a54ec4878e3ca58a195f9d3c3ac6a5731a916b06 Binary files /dev/null and b/Roll a Ball/Library/metadata/7d/7d22934bf84ccd14082fd2d5a9f5951e differ diff --git a/Roll a Ball/Library/metadata/7d/7d22934bf84ccd14082fd2d5a9f5951e.info b/Roll a Ball/Library/metadata/7d/7d22934bf84ccd14082fd2d5a9f5951e.info new file mode 100644 index 0000000000000000000000000000000000000000..4e8c1c555bbf5bd08b55486391cd5ae8942b8417 Binary files /dev/null and b/Roll a Ball/Library/metadata/7d/7d22934bf84ccd14082fd2d5a9f5951e.info differ diff --git a/Roll a Ball/Library/metadata/7d/7da0c11c52b4044de81c175887699282 b/Roll a Ball/Library/metadata/7d/7da0c11c52b4044de81c175887699282 new file mode 100644 index 0000000000000000000000000000000000000000..df2ecf53a6a40c8da699f73066f85b9b41eddba1 Binary files /dev/null and b/Roll a Ball/Library/metadata/7d/7da0c11c52b4044de81c175887699282 differ diff --git a/Roll a Ball/Library/metadata/7d/7da0c11c52b4044de81c175887699282.info b/Roll a Ball/Library/metadata/7d/7da0c11c52b4044de81c175887699282.info new file mode 100644 index 0000000000000000000000000000000000000000..0aab4ee364b56a0da5c742bff589236537ccaceb Binary files /dev/null and b/Roll a Ball/Library/metadata/7d/7da0c11c52b4044de81c175887699282.info differ diff --git a/Roll a Ball/Library/metadata/7e/7ed48dcc992234c659018e00590315b7 b/Roll a Ball/Library/metadata/7e/7ed48dcc992234c659018e00590315b7 new file mode 100644 index 0000000000000000000000000000000000000000..d5d91b53d60d176a60d7faa83bbd831bc50cc83e Binary files /dev/null and b/Roll a Ball/Library/metadata/7e/7ed48dcc992234c659018e00590315b7 differ diff --git a/Roll a Ball/Library/metadata/7e/7ed48dcc992234c659018e00590315b7.info b/Roll a Ball/Library/metadata/7e/7ed48dcc992234c659018e00590315b7.info new file mode 100644 index 0000000000000000000000000000000000000000..35dbc108d5ebe41c05ce454f7592e06145dfc0a3 Binary files /dev/null and b/Roll a Ball/Library/metadata/7e/7ed48dcc992234c659018e00590315b7.info differ diff --git a/Roll a Ball/Library/metadata/7e/7ef8348b8ea834d7e1bc214b07f7fb87 b/Roll a Ball/Library/metadata/7e/7ef8348b8ea834d7e1bc214b07f7fb87 new file mode 100644 index 0000000000000000000000000000000000000000..7fb219083b6bc7373b8f2d72731343777318953c Binary files /dev/null and b/Roll a Ball/Library/metadata/7e/7ef8348b8ea834d7e1bc214b07f7fb87 differ diff --git a/Roll a Ball/Library/metadata/7e/7ef8348b8ea834d7e1bc214b07f7fb87.info b/Roll a Ball/Library/metadata/7e/7ef8348b8ea834d7e1bc214b07f7fb87.info new file mode 100644 index 0000000000000000000000000000000000000000..e8a1ad58c3579195bc405ba6c5e76211e9d95275 Binary files /dev/null and b/Roll a Ball/Library/metadata/7e/7ef8348b8ea834d7e1bc214b07f7fb87.info differ diff --git a/Roll a Ball/Library/metadata/7f/7fd5e77e7e7ea4eea8198138cd9cc814 b/Roll a Ball/Library/metadata/7f/7fd5e77e7e7ea4eea8198138cd9cc814 new file mode 100644 index 0000000000000000000000000000000000000000..e93cf900603f3d167852498056b762c2995c8b7e Binary files /dev/null and b/Roll a Ball/Library/metadata/7f/7fd5e77e7e7ea4eea8198138cd9cc814 differ diff --git a/Roll a Ball/Library/metadata/7f/7fd5e77e7e7ea4eea8198138cd9cc814.info b/Roll a Ball/Library/metadata/7f/7fd5e77e7e7ea4eea8198138cd9cc814.info new file mode 100644 index 0000000000000000000000000000000000000000..985892274f06f39c2f34ff52395602fac89c3436 Binary files /dev/null and b/Roll a Ball/Library/metadata/7f/7fd5e77e7e7ea4eea8198138cd9cc814.info differ diff --git a/Roll a Ball/Library/metadata/80/806de5a9211448c8b65c8435ebb48dd4 b/Roll a Ball/Library/metadata/80/806de5a9211448c8b65c8435ebb48dd4 new file mode 100644 index 0000000000000000000000000000000000000000..b59b7ac7116dcc51399fb9fe4c29bf4fe8c41891 Binary files /dev/null and b/Roll a Ball/Library/metadata/80/806de5a9211448c8b65c8435ebb48dd4 differ diff --git a/Roll a Ball/Library/metadata/80/806de5a9211448c8b65c8435ebb48dd4.info b/Roll a Ball/Library/metadata/80/806de5a9211448c8b65c8435ebb48dd4.info new file mode 100644 index 0000000000000000000000000000000000000000..9d232411f3bb668bebf7b74f61bccd89cfa59f71 Binary files /dev/null and b/Roll a Ball/Library/metadata/80/806de5a9211448c8b65c8435ebb48dd4.info differ diff --git a/Roll a Ball/Library/metadata/80/80a3616ca19596e4da0f10f14d241e9f b/Roll a Ball/Library/metadata/80/80a3616ca19596e4da0f10f14d241e9f new file mode 100644 index 0000000000000000000000000000000000000000..9e73a1ce91adbd3ac796827570d693d75e062a08 Binary files /dev/null and b/Roll a Ball/Library/metadata/80/80a3616ca19596e4da0f10f14d241e9f differ diff --git a/Roll a Ball/Library/metadata/80/80a3616ca19596e4da0f10f14d241e9f.info b/Roll a Ball/Library/metadata/80/80a3616ca19596e4da0f10f14d241e9f.info new file mode 100644 index 0000000000000000000000000000000000000000..beedd87c9323f4ac3934ade0bd7cc249368477cb Binary files /dev/null and b/Roll a Ball/Library/metadata/80/80a3616ca19596e4da0f10f14d241e9f.info differ diff --git a/Roll a Ball/Library/metadata/80/80beef77cb19e713c7c2d481b65ed485 b/Roll a Ball/Library/metadata/80/80beef77cb19e713c7c2d481b65ed485 new file mode 100644 index 0000000000000000000000000000000000000000..5d51b0037fe91c5bf1091fa9cbb76503ee3c4f31 Binary files /dev/null and b/Roll a Ball/Library/metadata/80/80beef77cb19e713c7c2d481b65ed485 differ diff --git a/Roll a Ball/Library/metadata/80/80beef77cb19e713c7c2d481b65ed485.info b/Roll a Ball/Library/metadata/80/80beef77cb19e713c7c2d481b65ed485.info new file mode 100644 index 0000000000000000000000000000000000000000..f05bda2701c8858530ef2e1db097e27df1afd6c2 Binary files /dev/null and b/Roll a Ball/Library/metadata/80/80beef77cb19e713c7c2d481b65ed485.info differ diff --git a/Roll a Ball/Library/metadata/81/811f7f1f5920641c0a9233503492c9ba b/Roll a Ball/Library/metadata/81/811f7f1f5920641c0a9233503492c9ba new file mode 100644 index 0000000000000000000000000000000000000000..06383b008d3942c2d4e49f1929e3d4e6728c0f23 Binary files /dev/null and b/Roll a Ball/Library/metadata/81/811f7f1f5920641c0a9233503492c9ba differ diff --git a/Roll a Ball/Library/metadata/81/811f7f1f5920641c0a9233503492c9ba.info b/Roll a Ball/Library/metadata/81/811f7f1f5920641c0a9233503492c9ba.info new file mode 100644 index 0000000000000000000000000000000000000000..9c4ee54d20486fdb924b74caa573aae6cdb2599c Binary files /dev/null and b/Roll a Ball/Library/metadata/81/811f7f1f5920641c0a9233503492c9ba.info differ diff --git a/Roll a Ball/Library/metadata/81/81ed8c76d2bc4a4c95d092c98af4e58f b/Roll a Ball/Library/metadata/81/81ed8c76d2bc4a4c95d092c98af4e58f new file mode 100644 index 0000000000000000000000000000000000000000..5dfbad7b92d240d9c841d7df21ae1abb0e061192 Binary files /dev/null and b/Roll a Ball/Library/metadata/81/81ed8c76d2bc4a4c95d092c98af4e58f differ diff --git a/Roll a Ball/Library/metadata/81/81ed8c76d2bc4a4c95d092c98af4e58f.info b/Roll a Ball/Library/metadata/81/81ed8c76d2bc4a4c95d092c98af4e58f.info new file mode 100644 index 0000000000000000000000000000000000000000..585c214da7f31b074047b186153c1497363cc30f Binary files /dev/null and b/Roll a Ball/Library/metadata/81/81ed8c76d2bc4a4c95d092c98af4e58f.info differ diff --git a/Roll a Ball/Library/metadata/82/821f5482c5a3f4389885f4432433f56f b/Roll a Ball/Library/metadata/82/821f5482c5a3f4389885f4432433f56f new file mode 100644 index 0000000000000000000000000000000000000000..4bb0780615da49a7aefce4603fdb714364a8bd00 Binary files /dev/null and b/Roll a Ball/Library/metadata/82/821f5482c5a3f4389885f4432433f56f differ diff --git a/Roll a Ball/Library/metadata/82/821f5482c5a3f4389885f4432433f56f.info b/Roll a Ball/Library/metadata/82/821f5482c5a3f4389885f4432433f56f.info new file mode 100644 index 0000000000000000000000000000000000000000..92c5c454ad0332f1d243397afaf69495eb595f52 Binary files /dev/null and b/Roll a Ball/Library/metadata/82/821f5482c5a3f4389885f4432433f56f.info differ diff --git a/Roll a Ball/Library/metadata/84/8413ca0e506d42a1a4bd9769f204ad16 b/Roll a Ball/Library/metadata/84/8413ca0e506d42a1a4bd9769f204ad16 new file mode 100644 index 0000000000000000000000000000000000000000..592fc5d27e260f320fb37e634a5db5cb00d84746 Binary files /dev/null and b/Roll a Ball/Library/metadata/84/8413ca0e506d42a1a4bd9769f204ad16 differ diff --git a/Roll a Ball/Library/metadata/84/8413ca0e506d42a1a4bd9769f204ad16.info b/Roll a Ball/Library/metadata/84/8413ca0e506d42a1a4bd9769f204ad16.info new file mode 100644 index 0000000000000000000000000000000000000000..d214ab816f7b83be60edb16401b81b242ac0ddc9 Binary files /dev/null and b/Roll a Ball/Library/metadata/84/8413ca0e506d42a1a4bd9769f204ad16.info differ diff --git a/Roll a Ball/Library/metadata/84/844f815391db42d49455cbf1a7bfc434 b/Roll a Ball/Library/metadata/84/844f815391db42d49455cbf1a7bfc434 new file mode 100644 index 0000000000000000000000000000000000000000..8fb7c14bddd763853e7d5b3435202eadc81acc54 Binary files /dev/null and b/Roll a Ball/Library/metadata/84/844f815391db42d49455cbf1a7bfc434 differ diff --git a/Roll a Ball/Library/metadata/84/844f815391db42d49455cbf1a7bfc434.info b/Roll a Ball/Library/metadata/84/844f815391db42d49455cbf1a7bfc434.info new file mode 100644 index 0000000000000000000000000000000000000000..bb8effc3d122477789b02f035c00ed7a1cc927da Binary files /dev/null and b/Roll a Ball/Library/metadata/84/844f815391db42d49455cbf1a7bfc434.info differ diff --git a/Roll a Ball/Library/metadata/84/84a92b25f83d49b9bc132d206b370281 b/Roll a Ball/Library/metadata/84/84a92b25f83d49b9bc132d206b370281 new file mode 100644 index 0000000000000000000000000000000000000000..1bc9836e96ade6d09c56ca1a9f1010aec9286c80 Binary files /dev/null and b/Roll a Ball/Library/metadata/84/84a92b25f83d49b9bc132d206b370281 differ diff --git a/Roll a Ball/Library/metadata/84/84a92b25f83d49b9bc132d206b370281.info b/Roll a Ball/Library/metadata/84/84a92b25f83d49b9bc132d206b370281.info new file mode 100644 index 0000000000000000000000000000000000000000..32b992994acd37eb294c9d63347ea97def912b8b Binary files /dev/null and b/Roll a Ball/Library/metadata/84/84a92b25f83d49b9bc132d206b370281.info differ diff --git a/Roll a Ball/Library/metadata/85/850c54ee0b9e1aa740b1c67792eb1f26 b/Roll a Ball/Library/metadata/85/850c54ee0b9e1aa740b1c67792eb1f26 new file mode 100644 index 0000000000000000000000000000000000000000..2bebc75d14c8a0c6b0e4979de5726b89e6b93988 Binary files /dev/null and b/Roll a Ball/Library/metadata/85/850c54ee0b9e1aa740b1c67792eb1f26 differ diff --git a/Roll a Ball/Library/metadata/85/850c54ee0b9e1aa740b1c67792eb1f26.info b/Roll a Ball/Library/metadata/85/850c54ee0b9e1aa740b1c67792eb1f26.info new file mode 100644 index 0000000000000000000000000000000000000000..4eb057391ec7999de3ed06dbceeb6afc84dcca86 Binary files /dev/null and b/Roll a Ball/Library/metadata/85/850c54ee0b9e1aa740b1c67792eb1f26.info differ diff --git a/Roll a Ball/Library/metadata/85/85dba6b2d7204a7f9a1f976eb0a6b4d2 b/Roll a Ball/Library/metadata/85/85dba6b2d7204a7f9a1f976eb0a6b4d2 new file mode 100644 index 0000000000000000000000000000000000000000..76c096dfb58cacbf27ab8c3ab607e77570a829f5 Binary files /dev/null and b/Roll a Ball/Library/metadata/85/85dba6b2d7204a7f9a1f976eb0a6b4d2 differ diff --git a/Roll a Ball/Library/metadata/85/85dba6b2d7204a7f9a1f976eb0a6b4d2.info b/Roll a Ball/Library/metadata/85/85dba6b2d7204a7f9a1f976eb0a6b4d2.info new file mode 100644 index 0000000000000000000000000000000000000000..72fb35d130d31964b79ef7e1a1adb7eb8c015abf Binary files /dev/null and b/Roll a Ball/Library/metadata/85/85dba6b2d7204a7f9a1f976eb0a6b4d2.info differ diff --git a/Roll a Ball/Library/metadata/86/86c008322e7c647149878156c5b81940 b/Roll a Ball/Library/metadata/86/86c008322e7c647149878156c5b81940 new file mode 100644 index 0000000000000000000000000000000000000000..62729c320a04fac26575a22f873e627537169634 Binary files /dev/null and b/Roll a Ball/Library/metadata/86/86c008322e7c647149878156c5b81940 differ diff --git a/Roll a Ball/Library/metadata/86/86c008322e7c647149878156c5b81940.info b/Roll a Ball/Library/metadata/86/86c008322e7c647149878156c5b81940.info new file mode 100644 index 0000000000000000000000000000000000000000..97d10560ad073d6709ecc1b2e1ebdddacf2147e0 Binary files /dev/null and b/Roll a Ball/Library/metadata/86/86c008322e7c647149878156c5b81940.info differ diff --git a/Roll a Ball/Library/metadata/86/86c18994495874297b469aaa57ef9b44 b/Roll a Ball/Library/metadata/86/86c18994495874297b469aaa57ef9b44 new file mode 100644 index 0000000000000000000000000000000000000000..1fdf9a9f1c9079609eaf157871510ff44dcd3cb3 Binary files /dev/null and b/Roll a Ball/Library/metadata/86/86c18994495874297b469aaa57ef9b44 differ diff --git a/Roll a Ball/Library/metadata/86/86c18994495874297b469aaa57ef9b44.info b/Roll a Ball/Library/metadata/86/86c18994495874297b469aaa57ef9b44.info new file mode 100644 index 0000000000000000000000000000000000000000..ef28d71654a4e2b6fc10a881dd8f57483ce7126b Binary files /dev/null and b/Roll a Ball/Library/metadata/86/86c18994495874297b469aaa57ef9b44.info differ diff --git a/Roll a Ball/Library/metadata/86/86d0242b70e6ab24aaf5a0e67edf2a61 b/Roll a Ball/Library/metadata/86/86d0242b70e6ab24aaf5a0e67edf2a61 new file mode 100644 index 0000000000000000000000000000000000000000..665e04d2d44568d9ba869ecdef3cfc52188503f9 Binary files /dev/null and b/Roll a Ball/Library/metadata/86/86d0242b70e6ab24aaf5a0e67edf2a61 differ diff --git a/Roll a Ball/Library/metadata/86/86d0242b70e6ab24aaf5a0e67edf2a61.info b/Roll a Ball/Library/metadata/86/86d0242b70e6ab24aaf5a0e67edf2a61.info new file mode 100644 index 0000000000000000000000000000000000000000..f322c9b95d78cd2eb0d0f3a7028dabd7697cac68 Binary files /dev/null and b/Roll a Ball/Library/metadata/86/86d0242b70e6ab24aaf5a0e67edf2a61.info differ diff --git a/Roll a Ball/Library/metadata/87/870353891bb340e2b2a9c8707e7419ba b/Roll a Ball/Library/metadata/87/870353891bb340e2b2a9c8707e7419ba new file mode 100644 index 0000000000000000000000000000000000000000..8e74a0a18351b1ab47e27ad48e2b89aa0eb05312 Binary files /dev/null and b/Roll a Ball/Library/metadata/87/870353891bb340e2b2a9c8707e7419ba differ diff --git a/Roll a Ball/Library/metadata/87/870353891bb340e2b2a9c8707e7419ba.info b/Roll a Ball/Library/metadata/87/870353891bb340e2b2a9c8707e7419ba.info new file mode 100644 index 0000000000000000000000000000000000000000..a35de2ac569bfe56f9d278120a86009e5ac37e17 Binary files /dev/null and b/Roll a Ball/Library/metadata/87/870353891bb340e2b2a9c8707e7419ba.info differ diff --git a/Roll a Ball/Library/metadata/87/871f8edd56e84b8fb295b10cc3c78f36 b/Roll a Ball/Library/metadata/87/871f8edd56e84b8fb295b10cc3c78f36 new file mode 100644 index 0000000000000000000000000000000000000000..00a04ecb001b8d95c9208f34aee414b58451a809 Binary files /dev/null and b/Roll a Ball/Library/metadata/87/871f8edd56e84b8fb295b10cc3c78f36 differ diff --git a/Roll a Ball/Library/metadata/87/871f8edd56e84b8fb295b10cc3c78f36.info b/Roll a Ball/Library/metadata/87/871f8edd56e84b8fb295b10cc3c78f36.info new file mode 100644 index 0000000000000000000000000000000000000000..d3460bc71fa6942f8607e01897452776beea453d Binary files /dev/null and b/Roll a Ball/Library/metadata/87/871f8edd56e84b8fb295b10cc3c78f36.info differ diff --git a/Roll a Ball/Library/metadata/87/876d47a520ae34f81a97792e1afed14b b/Roll a Ball/Library/metadata/87/876d47a520ae34f81a97792e1afed14b new file mode 100644 index 0000000000000000000000000000000000000000..bd8895ae41b916df723fba5aed1fa04c5bf43579 Binary files /dev/null and b/Roll a Ball/Library/metadata/87/876d47a520ae34f81a97792e1afed14b differ diff --git a/Roll a Ball/Library/metadata/87/876d47a520ae34f81a97792e1afed14b.info b/Roll a Ball/Library/metadata/87/876d47a520ae34f81a97792e1afed14b.info new file mode 100644 index 0000000000000000000000000000000000000000..3ad6b2f95cf0d2ee3447c7ad206aad4b70c5932c Binary files /dev/null and b/Roll a Ball/Library/metadata/87/876d47a520ae34f81a97792e1afed14b.info differ diff --git a/Roll a Ball/Library/metadata/87/87738e82a4f047cc947cff8a2ccea594 b/Roll a Ball/Library/metadata/87/87738e82a4f047cc947cff8a2ccea594 new file mode 100644 index 0000000000000000000000000000000000000000..639133fc7aaa5340aa49aea1bc557e4791edf96d Binary files /dev/null and b/Roll a Ball/Library/metadata/87/87738e82a4f047cc947cff8a2ccea594 differ diff --git a/Roll a Ball/Library/metadata/87/87738e82a4f047cc947cff8a2ccea594.info b/Roll a Ball/Library/metadata/87/87738e82a4f047cc947cff8a2ccea594.info new file mode 100644 index 0000000000000000000000000000000000000000..42e2c763b8b03f1338143b5433e6945608ae0065 Binary files /dev/null and b/Roll a Ball/Library/metadata/87/87738e82a4f047cc947cff8a2ccea594.info differ diff --git a/Roll a Ball/Library/metadata/87/87ab1bebe13f41f89d5427e7d2c34d58 b/Roll a Ball/Library/metadata/87/87ab1bebe13f41f89d5427e7d2c34d58 new file mode 100644 index 0000000000000000000000000000000000000000..c893b59aff468fef1b94d09d23e342b009f15ec4 Binary files /dev/null and b/Roll a Ball/Library/metadata/87/87ab1bebe13f41f89d5427e7d2c34d58 differ diff --git a/Roll a Ball/Library/metadata/87/87ab1bebe13f41f89d5427e7d2c34d58.info b/Roll a Ball/Library/metadata/87/87ab1bebe13f41f89d5427e7d2c34d58.info new file mode 100644 index 0000000000000000000000000000000000000000..b0af915aabb437646be38fdab159b77b58708649 Binary files /dev/null and b/Roll a Ball/Library/metadata/87/87ab1bebe13f41f89d5427e7d2c34d58.info differ diff --git a/Roll a Ball/Library/metadata/87/87d720faa37005c08600090e04d8c739 b/Roll a Ball/Library/metadata/87/87d720faa37005c08600090e04d8c739 new file mode 100644 index 0000000000000000000000000000000000000000..7ba20fdbd9d57ba658cc48f679bf3cf967b99216 Binary files /dev/null and b/Roll a Ball/Library/metadata/87/87d720faa37005c08600090e04d8c739 differ diff --git a/Roll a Ball/Library/metadata/87/87d720faa37005c08600090e04d8c739.info b/Roll a Ball/Library/metadata/87/87d720faa37005c08600090e04d8c739.info new file mode 100644 index 0000000000000000000000000000000000000000..25b02c1fc043d4370e93783a20838d0020e8c849 Binary files /dev/null and b/Roll a Ball/Library/metadata/87/87d720faa37005c08600090e04d8c739.info differ diff --git a/Roll a Ball/Library/metadata/88/880f2fc52037c4fe09edb80cfe84ac7c b/Roll a Ball/Library/metadata/88/880f2fc52037c4fe09edb80cfe84ac7c new file mode 100644 index 0000000000000000000000000000000000000000..71a569d2a791717c06ee3acf7502333025680694 Binary files /dev/null and b/Roll a Ball/Library/metadata/88/880f2fc52037c4fe09edb80cfe84ac7c differ diff --git a/Roll a Ball/Library/metadata/88/880f2fc52037c4fe09edb80cfe84ac7c.info b/Roll a Ball/Library/metadata/88/880f2fc52037c4fe09edb80cfe84ac7c.info new file mode 100644 index 0000000000000000000000000000000000000000..86c927a755d1d1167efdd60c096b51ddc67c4918 Binary files /dev/null and b/Roll a Ball/Library/metadata/88/880f2fc52037c4fe09edb80cfe84ac7c.info differ diff --git a/Roll a Ball/Library/metadata/88/882f1a4147a284f028899b9c018e63eb b/Roll a Ball/Library/metadata/88/882f1a4147a284f028899b9c018e63eb new file mode 100644 index 0000000000000000000000000000000000000000..67d543813793c6df2fcabb96264e524ac9315a71 Binary files /dev/null and b/Roll a Ball/Library/metadata/88/882f1a4147a284f028899b9c018e63eb differ diff --git a/Roll a Ball/Library/metadata/88/882f1a4147a284f028899b9c018e63eb.info b/Roll a Ball/Library/metadata/88/882f1a4147a284f028899b9c018e63eb.info new file mode 100644 index 0000000000000000000000000000000000000000..9673d008fd8dd36b3cdf2771f64eff6f6b16b261 Binary files /dev/null and b/Roll a Ball/Library/metadata/88/882f1a4147a284f028899b9c018e63eb.info differ diff --git a/Roll a Ball/Library/metadata/88/884f8f0e4025a420893d3a8d1d3063e1 b/Roll a Ball/Library/metadata/88/884f8f0e4025a420893d3a8d1d3063e1 new file mode 100644 index 0000000000000000000000000000000000000000..8cf7e5f6539954a3b7d46f7a4efef556b7245f60 Binary files /dev/null and b/Roll a Ball/Library/metadata/88/884f8f0e4025a420893d3a8d1d3063e1 differ diff --git a/Roll a Ball/Library/metadata/88/884f8f0e4025a420893d3a8d1d3063e1.info b/Roll a Ball/Library/metadata/88/884f8f0e4025a420893d3a8d1d3063e1.info new file mode 100644 index 0000000000000000000000000000000000000000..64bd3190e22e0fa500ecb1aefa4c907734aab238 Binary files /dev/null and b/Roll a Ball/Library/metadata/88/884f8f0e4025a420893d3a8d1d3063e1.info differ diff --git a/Roll a Ball/Library/metadata/88/88ed537c17c34f339121fe9a7d6d7a0e b/Roll a Ball/Library/metadata/88/88ed537c17c34f339121fe9a7d6d7a0e new file mode 100644 index 0000000000000000000000000000000000000000..79dbc05fe93311a76bbaa11e2e249c94177895d0 Binary files /dev/null and b/Roll a Ball/Library/metadata/88/88ed537c17c34f339121fe9a7d6d7a0e differ diff --git a/Roll a Ball/Library/metadata/88/88ed537c17c34f339121fe9a7d6d7a0e.info b/Roll a Ball/Library/metadata/88/88ed537c17c34f339121fe9a7d6d7a0e.info new file mode 100644 index 0000000000000000000000000000000000000000..e8413f372677219c72ef3786e27468d9ed848bd8 Binary files /dev/null and b/Roll a Ball/Library/metadata/88/88ed537c17c34f339121fe9a7d6d7a0e.info differ diff --git a/Roll a Ball/Library/metadata/8a/8aa8171e088f94069bbd1978a053f7dd b/Roll a Ball/Library/metadata/8a/8aa8171e088f94069bbd1978a053f7dd new file mode 100644 index 0000000000000000000000000000000000000000..801d1d0b90e996e34c2f5c7ea061c69ad0e8acda Binary files /dev/null and b/Roll a Ball/Library/metadata/8a/8aa8171e088f94069bbd1978a053f7dd differ diff --git a/Roll a Ball/Library/metadata/8a/8aa8171e088f94069bbd1978a053f7dd.info b/Roll a Ball/Library/metadata/8a/8aa8171e088f94069bbd1978a053f7dd.info new file mode 100644 index 0000000000000000000000000000000000000000..14436adbebf30c17bb830fa796f38bfe75bfb893 Binary files /dev/null and b/Roll a Ball/Library/metadata/8a/8aa8171e088f94069bbd1978a053f7dd.info differ diff --git a/Roll a Ball/Library/metadata/8a/8aafd27f78c12564281bac0d0067df8d b/Roll a Ball/Library/metadata/8a/8aafd27f78c12564281bac0d0067df8d new file mode 100644 index 0000000000000000000000000000000000000000..e755a7aee3483e6a4ed23b351f1d486d7a0c36fe Binary files /dev/null and b/Roll a Ball/Library/metadata/8a/8aafd27f78c12564281bac0d0067df8d differ diff --git a/Roll a Ball/Library/metadata/8a/8aafd27f78c12564281bac0d0067df8d.info b/Roll a Ball/Library/metadata/8a/8aafd27f78c12564281bac0d0067df8d.info new file mode 100644 index 0000000000000000000000000000000000000000..24c8c38eaeb74b403679169a61e2a1bfde77a622 Binary files /dev/null and b/Roll a Ball/Library/metadata/8a/8aafd27f78c12564281bac0d0067df8d.info differ diff --git a/Roll a Ball/Library/metadata/8b/8b0f0c8689876421c90e7b60f096325a b/Roll a Ball/Library/metadata/8b/8b0f0c8689876421c90e7b60f096325a new file mode 100644 index 0000000000000000000000000000000000000000..32c17c37916b851c3a26f898df743d54ea67a07a Binary files /dev/null and b/Roll a Ball/Library/metadata/8b/8b0f0c8689876421c90e7b60f096325a differ diff --git a/Roll a Ball/Library/metadata/8b/8b0f0c8689876421c90e7b60f096325a.info b/Roll a Ball/Library/metadata/8b/8b0f0c8689876421c90e7b60f096325a.info new file mode 100644 index 0000000000000000000000000000000000000000..18699a5af5fd9c77f289d3d9a82342b1285637fa Binary files /dev/null and b/Roll a Ball/Library/metadata/8b/8b0f0c8689876421c90e7b60f096325a.info differ diff --git a/Roll a Ball/Library/metadata/8b/8b4a8234f532f4b34aba0ab70400d90d b/Roll a Ball/Library/metadata/8b/8b4a8234f532f4b34aba0ab70400d90d new file mode 100644 index 0000000000000000000000000000000000000000..40341c9004d3f9253889baebb41f837c5e2df8c8 Binary files /dev/null and b/Roll a Ball/Library/metadata/8b/8b4a8234f532f4b34aba0ab70400d90d differ diff --git a/Roll a Ball/Library/metadata/8b/8b4a8234f532f4b34aba0ab70400d90d.info b/Roll a Ball/Library/metadata/8b/8b4a8234f532f4b34aba0ab70400d90d.info new file mode 100644 index 0000000000000000000000000000000000000000..a2f8dcf6b0da1b999e17461c669ae79a13cc461d Binary files /dev/null and b/Roll a Ball/Library/metadata/8b/8b4a8234f532f4b34aba0ab70400d90d.info differ diff --git a/Roll a Ball/Library/metadata/8b/8bc2b083b068f3546a9509c805e0541c b/Roll a Ball/Library/metadata/8b/8bc2b083b068f3546a9509c805e0541c new file mode 100644 index 0000000000000000000000000000000000000000..97c4d0cd1ce47140a62d7f28c0f48de486678b0c Binary files /dev/null and b/Roll a Ball/Library/metadata/8b/8bc2b083b068f3546a9509c805e0541c differ diff --git a/Roll a Ball/Library/metadata/8b/8bc2b083b068f3546a9509c805e0541c.info b/Roll a Ball/Library/metadata/8b/8bc2b083b068f3546a9509c805e0541c.info new file mode 100644 index 0000000000000000000000000000000000000000..95746ed593cbeaa1740bb1ee6399ac39e7b8a5dd Binary files /dev/null and b/Roll a Ball/Library/metadata/8b/8bc2b083b068f3546a9509c805e0541c.info differ diff --git a/Roll a Ball/Library/metadata/8b/8bc445bb79654bf496c92d0407840a92 b/Roll a Ball/Library/metadata/8b/8bc445bb79654bf496c92d0407840a92 new file mode 100644 index 0000000000000000000000000000000000000000..3b55c20c65b842c0484c5fdab8f0f58595013e25 Binary files /dev/null and b/Roll a Ball/Library/metadata/8b/8bc445bb79654bf496c92d0407840a92 differ diff --git a/Roll a Ball/Library/metadata/8b/8bc445bb79654bf496c92d0407840a92.info b/Roll a Ball/Library/metadata/8b/8bc445bb79654bf496c92d0407840a92.info new file mode 100644 index 0000000000000000000000000000000000000000..a45a3cc3307cf5359f4d5005a2a77bfdf4796402 Binary files /dev/null and b/Roll a Ball/Library/metadata/8b/8bc445bb79654bf496c92d0407840a92.info differ diff --git a/Roll a Ball/Library/metadata/8c/8c25f8b5c9da143328c516248414b95d b/Roll a Ball/Library/metadata/8c/8c25f8b5c9da143328c516248414b95d new file mode 100644 index 0000000000000000000000000000000000000000..0a7d5b648729ae4f7bbdb5c848938ed86b3c894a Binary files /dev/null and b/Roll a Ball/Library/metadata/8c/8c25f8b5c9da143328c516248414b95d differ diff --git a/Roll a Ball/Library/metadata/8c/8c25f8b5c9da143328c516248414b95d.info b/Roll a Ball/Library/metadata/8c/8c25f8b5c9da143328c516248414b95d.info new file mode 100644 index 0000000000000000000000000000000000000000..258e7b0f52fe99ba010d475b1fa4e6ac5e17ef76 Binary files /dev/null and b/Roll a Ball/Library/metadata/8c/8c25f8b5c9da143328c516248414b95d.info differ diff --git a/Roll a Ball/Library/metadata/8d/8d65a43500ec84d9186cb6d9ab681277 b/Roll a Ball/Library/metadata/8d/8d65a43500ec84d9186cb6d9ab681277 new file mode 100644 index 0000000000000000000000000000000000000000..f469a9fa9c28de30bc60e1d651070b137a7956b0 Binary files /dev/null and b/Roll a Ball/Library/metadata/8d/8d65a43500ec84d9186cb6d9ab681277 differ diff --git a/Roll a Ball/Library/metadata/8d/8d65a43500ec84d9186cb6d9ab681277.info b/Roll a Ball/Library/metadata/8d/8d65a43500ec84d9186cb6d9ab681277.info new file mode 100644 index 0000000000000000000000000000000000000000..78030d230f80d63adee94fd2c49128c56af86f8f Binary files /dev/null and b/Roll a Ball/Library/metadata/8d/8d65a43500ec84d9186cb6d9ab681277.info differ diff --git a/Roll a Ball/Library/metadata/8f/8f8b248abe6b4dcebd6cdd0d754717f4 b/Roll a Ball/Library/metadata/8f/8f8b248abe6b4dcebd6cdd0d754717f4 new file mode 100644 index 0000000000000000000000000000000000000000..729927f0510b83352fc32e328a879953e8fc0340 Binary files /dev/null and b/Roll a Ball/Library/metadata/8f/8f8b248abe6b4dcebd6cdd0d754717f4 differ diff --git a/Roll a Ball/Library/metadata/8f/8f8b248abe6b4dcebd6cdd0d754717f4.info b/Roll a Ball/Library/metadata/8f/8f8b248abe6b4dcebd6cdd0d754717f4.info new file mode 100644 index 0000000000000000000000000000000000000000..f2d786d4b5c611661f74f3b43c300d5061218d77 Binary files /dev/null and b/Roll a Ball/Library/metadata/8f/8f8b248abe6b4dcebd6cdd0d754717f4.info differ diff --git a/Roll a Ball/Library/metadata/90/900f1a451c764dc3bdcc0de815a15935 b/Roll a Ball/Library/metadata/90/900f1a451c764dc3bdcc0de815a15935 new file mode 100644 index 0000000000000000000000000000000000000000..de5209773613a0bed75fc9c2a9c4ac7d68f25af3 Binary files /dev/null and b/Roll a Ball/Library/metadata/90/900f1a451c764dc3bdcc0de815a15935 differ diff --git a/Roll a Ball/Library/metadata/90/900f1a451c764dc3bdcc0de815a15935.info b/Roll a Ball/Library/metadata/90/900f1a451c764dc3bdcc0de815a15935.info new file mode 100644 index 0000000000000000000000000000000000000000..fd4f8c165fd921e366ea675859c105b719ffee20 Binary files /dev/null and b/Roll a Ball/Library/metadata/90/900f1a451c764dc3bdcc0de815a15935.info differ diff --git a/Roll a Ball/Library/metadata/90/906c12bc9cd95d3963c6d58f62522c78 b/Roll a Ball/Library/metadata/90/906c12bc9cd95d3963c6d58f62522c78 new file mode 100644 index 0000000000000000000000000000000000000000..c180b389b80c5d56de08c4fff1bf9f15a17f39a3 Binary files /dev/null and b/Roll a Ball/Library/metadata/90/906c12bc9cd95d3963c6d58f62522c78 differ diff --git a/Roll a Ball/Library/metadata/90/906c12bc9cd95d3963c6d58f62522c78.info b/Roll a Ball/Library/metadata/90/906c12bc9cd95d3963c6d58f62522c78.info new file mode 100644 index 0000000000000000000000000000000000000000..fd135f0b13301a59bbe678ad06f287949bbc0a76 Binary files /dev/null and b/Roll a Ball/Library/metadata/90/906c12bc9cd95d3963c6d58f62522c78.info differ diff --git a/Roll a Ball/Library/metadata/90/907731821455c4fa989ac14278e02251 b/Roll a Ball/Library/metadata/90/907731821455c4fa989ac14278e02251 new file mode 100644 index 0000000000000000000000000000000000000000..a5a2c516cfe0e9ef8e83e731781f2c9ca1d4157e Binary files /dev/null and b/Roll a Ball/Library/metadata/90/907731821455c4fa989ac14278e02251 differ diff --git a/Roll a Ball/Library/metadata/90/907731821455c4fa989ac14278e02251.info b/Roll a Ball/Library/metadata/90/907731821455c4fa989ac14278e02251.info new file mode 100644 index 0000000000000000000000000000000000000000..acd889beb50f7d6748b407b1399220fdeec0e7ef Binary files /dev/null and b/Roll a Ball/Library/metadata/90/907731821455c4fa989ac14278e02251.info differ diff --git a/Roll a Ball/Library/metadata/90/90791303b72ec4ae198f99d637dfdf6c b/Roll a Ball/Library/metadata/90/90791303b72ec4ae198f99d637dfdf6c new file mode 100644 index 0000000000000000000000000000000000000000..0d30627d4229986d57e01d652cfecbdfac9c0716 Binary files /dev/null and b/Roll a Ball/Library/metadata/90/90791303b72ec4ae198f99d637dfdf6c differ diff --git a/Roll a Ball/Library/metadata/90/90791303b72ec4ae198f99d637dfdf6c.info b/Roll a Ball/Library/metadata/90/90791303b72ec4ae198f99d637dfdf6c.info new file mode 100644 index 0000000000000000000000000000000000000000..02ab77f68e6e328681e31b6481ec44c64f435ccc Binary files /dev/null and b/Roll a Ball/Library/metadata/90/90791303b72ec4ae198f99d637dfdf6c.info differ diff --git a/Roll a Ball/Library/metadata/90/90fe1c65e6bb3bc4e90862df7297719e b/Roll a Ball/Library/metadata/90/90fe1c65e6bb3bc4e90862df7297719e new file mode 100644 index 0000000000000000000000000000000000000000..7b7ebac4c87df3bd6cfe41e3eeb175591f720bde Binary files /dev/null and b/Roll a Ball/Library/metadata/90/90fe1c65e6bb3bc4e90862df7297719e differ diff --git a/Roll a Ball/Library/metadata/90/90fe1c65e6bb3bc4e90862df7297719e.info b/Roll a Ball/Library/metadata/90/90fe1c65e6bb3bc4e90862df7297719e.info new file mode 100644 index 0000000000000000000000000000000000000000..8db2d1825281ee678ce6a424d692fd091669909c Binary files /dev/null and b/Roll a Ball/Library/metadata/90/90fe1c65e6bb3bc4e90862df7297719e.info differ diff --git a/Roll a Ball/Library/metadata/91/91950f78729ab144aa36e94690b28fad b/Roll a Ball/Library/metadata/91/91950f78729ab144aa36e94690b28fad new file mode 100644 index 0000000000000000000000000000000000000000..cc780804a88fb3501bd23aa68d07fa50f31aeed8 Binary files /dev/null and b/Roll a Ball/Library/metadata/91/91950f78729ab144aa36e94690b28fad differ diff --git a/Roll a Ball/Library/metadata/91/91950f78729ab144aa36e94690b28fad.info b/Roll a Ball/Library/metadata/91/91950f78729ab144aa36e94690b28fad.info new file mode 100644 index 0000000000000000000000000000000000000000..73af3ff58d827343be7222d26b401443a3de7ff0 Binary files /dev/null and b/Roll a Ball/Library/metadata/91/91950f78729ab144aa36e94690b28fad.info differ diff --git a/Roll a Ball/Library/metadata/92/92027f7f8cfc4feaa477da0dc38d3d46 b/Roll a Ball/Library/metadata/92/92027f7f8cfc4feaa477da0dc38d3d46 new file mode 100644 index 0000000000000000000000000000000000000000..6b018371718fba31a48eb3fd9a53b9c3aa5d90f7 Binary files /dev/null and b/Roll a Ball/Library/metadata/92/92027f7f8cfc4feaa477da0dc38d3d46 differ diff --git a/Roll a Ball/Library/metadata/92/92027f7f8cfc4feaa477da0dc38d3d46.info b/Roll a Ball/Library/metadata/92/92027f7f8cfc4feaa477da0dc38d3d46.info new file mode 100644 index 0000000000000000000000000000000000000000..81e6876eb7e6149ca72666af82c391475587e8b2 Binary files /dev/null and b/Roll a Ball/Library/metadata/92/92027f7f8cfc4feaa477da0dc38d3d46.info differ diff --git a/Roll a Ball/Library/metadata/92/9288066c33474b94b6ee5465f4df1cc0 b/Roll a Ball/Library/metadata/92/9288066c33474b94b6ee5465f4df1cc0 new file mode 100644 index 0000000000000000000000000000000000000000..5acb08f9c7c76d3ce7887f7b841af64d41b63bb2 Binary files /dev/null and b/Roll a Ball/Library/metadata/92/9288066c33474b94b6ee5465f4df1cc0 differ diff --git a/Roll a Ball/Library/metadata/92/9288066c33474b94b6ee5465f4df1cc0.info b/Roll a Ball/Library/metadata/92/9288066c33474b94b6ee5465f4df1cc0.info new file mode 100644 index 0000000000000000000000000000000000000000..b7e118aeefe3590cc0838267d2096bb48c80f164 Binary files /dev/null and b/Roll a Ball/Library/metadata/92/9288066c33474b94b6ee5465f4df1cc0.info differ diff --git a/Roll a Ball/Library/metadata/92/92a378669877c05c6071d0fed687bb95 b/Roll a Ball/Library/metadata/92/92a378669877c05c6071d0fed687bb95 new file mode 100644 index 0000000000000000000000000000000000000000..bd94a18501082ef8fb1d19a0023d377fc514c95c Binary files /dev/null and b/Roll a Ball/Library/metadata/92/92a378669877c05c6071d0fed687bb95 differ diff --git a/Roll a Ball/Library/metadata/92/92a378669877c05c6071d0fed687bb95.info b/Roll a Ball/Library/metadata/92/92a378669877c05c6071d0fed687bb95.info new file mode 100644 index 0000000000000000000000000000000000000000..4f2d08fa932fd3024ff0b0f2f36858fcca4c07c1 Binary files /dev/null and b/Roll a Ball/Library/metadata/92/92a378669877c05c6071d0fed687bb95.info differ diff --git a/Roll a Ball/Library/metadata/93/931f3395378214a6c94333853bd0659b b/Roll a Ball/Library/metadata/93/931f3395378214a6c94333853bd0659b new file mode 100644 index 0000000000000000000000000000000000000000..b7897622c9ad2e6aaab8af3353434f3def0142cb Binary files /dev/null and b/Roll a Ball/Library/metadata/93/931f3395378214a6c94333853bd0659b differ diff --git a/Roll a Ball/Library/metadata/93/931f3395378214a6c94333853bd0659b.info b/Roll a Ball/Library/metadata/93/931f3395378214a6c94333853bd0659b.info new file mode 100644 index 0000000000000000000000000000000000000000..7c9b71096251792e0d9fe30abd18f1ad0f32662e Binary files /dev/null and b/Roll a Ball/Library/metadata/93/931f3395378214a6c94333853bd0659b.info differ diff --git a/Roll a Ball/Library/metadata/93/93c1370867fcb45079592da39e0994c5 b/Roll a Ball/Library/metadata/93/93c1370867fcb45079592da39e0994c5 new file mode 100644 index 0000000000000000000000000000000000000000..a4d084e137d73b1a9320263529b7e976a7ed3688 Binary files /dev/null and b/Roll a Ball/Library/metadata/93/93c1370867fcb45079592da39e0994c5 differ diff --git a/Roll a Ball/Library/metadata/93/93c1370867fcb45079592da39e0994c5.info b/Roll a Ball/Library/metadata/93/93c1370867fcb45079592da39e0994c5.info new file mode 100644 index 0000000000000000000000000000000000000000..08d7ca699827d71b81d8d57b058aef8db965db5b Binary files /dev/null and b/Roll a Ball/Library/metadata/93/93c1370867fcb45079592da39e0994c5.info differ diff --git a/Roll a Ball/Library/metadata/93/93f7ca1a9c5c945a89e884f9611c70f0 b/Roll a Ball/Library/metadata/93/93f7ca1a9c5c945a89e884f9611c70f0 new file mode 100644 index 0000000000000000000000000000000000000000..b4a9a54aa4f42a03d77e0134e244eccdf4dc6e7d Binary files /dev/null and b/Roll a Ball/Library/metadata/93/93f7ca1a9c5c945a89e884f9611c70f0 differ diff --git a/Roll a Ball/Library/metadata/93/93f7ca1a9c5c945a89e884f9611c70f0.info b/Roll a Ball/Library/metadata/93/93f7ca1a9c5c945a89e884f9611c70f0.info new file mode 100644 index 0000000000000000000000000000000000000000..0153959d3ada0996fa73a42f477ca1a6d3ca76a2 Binary files /dev/null and b/Roll a Ball/Library/metadata/93/93f7ca1a9c5c945a89e884f9611c70f0.info differ diff --git a/Roll a Ball/Library/metadata/94/9405b416c158444b19157040fd664533 b/Roll a Ball/Library/metadata/94/9405b416c158444b19157040fd664533 new file mode 100644 index 0000000000000000000000000000000000000000..e8b6391e556f84d200ebfe4f527c1c69fa16769c Binary files /dev/null and b/Roll a Ball/Library/metadata/94/9405b416c158444b19157040fd664533 differ diff --git a/Roll a Ball/Library/metadata/94/9405b416c158444b19157040fd664533.info b/Roll a Ball/Library/metadata/94/9405b416c158444b19157040fd664533.info new file mode 100644 index 0000000000000000000000000000000000000000..9f46a06a721396bc1587d624aa4b75f26e243b77 Binary files /dev/null and b/Roll a Ball/Library/metadata/94/9405b416c158444b19157040fd664533.info differ diff --git a/Roll a Ball/Library/metadata/95/953fab16d15d5885b3600fcd6388b2ad b/Roll a Ball/Library/metadata/95/953fab16d15d5885b3600fcd6388b2ad new file mode 100644 index 0000000000000000000000000000000000000000..70ef13d575aae596279fc945ba12e4a438d38924 Binary files /dev/null and b/Roll a Ball/Library/metadata/95/953fab16d15d5885b3600fcd6388b2ad differ diff --git a/Roll a Ball/Library/metadata/95/953fab16d15d5885b3600fcd6388b2ad.info b/Roll a Ball/Library/metadata/95/953fab16d15d5885b3600fcd6388b2ad.info new file mode 100644 index 0000000000000000000000000000000000000000..a665a8515e6662470f3a7f1aa38bb3744758bdac Binary files /dev/null and b/Roll a Ball/Library/metadata/95/953fab16d15d5885b3600fcd6388b2ad.info differ diff --git a/Roll a Ball/Library/metadata/95/9541d86e2fd84c1d9990edf0852d74ab b/Roll a Ball/Library/metadata/95/9541d86e2fd84c1d9990edf0852d74ab new file mode 100644 index 0000000000000000000000000000000000000000..50330e9a00741ecbc8e75163e364268c60f07b26 Binary files /dev/null and b/Roll a Ball/Library/metadata/95/9541d86e2fd84c1d9990edf0852d74ab differ diff --git a/Roll a Ball/Library/metadata/95/9541d86e2fd84c1d9990edf0852d74ab.info b/Roll a Ball/Library/metadata/95/9541d86e2fd84c1d9990edf0852d74ab.info new file mode 100644 index 0000000000000000000000000000000000000000..e065b4c95656bae1a88433d1264a1d303b257c1a Binary files /dev/null and b/Roll a Ball/Library/metadata/95/9541d86e2fd84c1d9990edf0852d74ab.info differ diff --git a/Roll a Ball/Library/metadata/95/9545c9eb3bf94265810463794fec8334 b/Roll a Ball/Library/metadata/95/9545c9eb3bf94265810463794fec8334 new file mode 100644 index 0000000000000000000000000000000000000000..0831a878e3beebe7bbdc94a72b9a9508703ce9a5 Binary files /dev/null and b/Roll a Ball/Library/metadata/95/9545c9eb3bf94265810463794fec8334 differ diff --git a/Roll a Ball/Library/metadata/95/9545c9eb3bf94265810463794fec8334.info b/Roll a Ball/Library/metadata/95/9545c9eb3bf94265810463794fec8334.info new file mode 100644 index 0000000000000000000000000000000000000000..2f48b06afa2d37215e02a6cff5937f2e899f49e0 Binary files /dev/null and b/Roll a Ball/Library/metadata/95/9545c9eb3bf94265810463794fec8334.info differ diff --git a/Roll a Ball/Library/metadata/95/95f85adeda79e994f011eb2152cf4fc9 b/Roll a Ball/Library/metadata/95/95f85adeda79e994f011eb2152cf4fc9 new file mode 100644 index 0000000000000000000000000000000000000000..34026c198fbe1aacff16ca4f226beecfa8976939 Binary files /dev/null and b/Roll a Ball/Library/metadata/95/95f85adeda79e994f011eb2152cf4fc9 differ diff --git a/Roll a Ball/Library/metadata/95/95f85adeda79e994f011eb2152cf4fc9.info b/Roll a Ball/Library/metadata/95/95f85adeda79e994f011eb2152cf4fc9.info new file mode 100644 index 0000000000000000000000000000000000000000..0809e55a28e3df8acf62b0463300a0c23ea8767a Binary files /dev/null and b/Roll a Ball/Library/metadata/95/95f85adeda79e994f011eb2152cf4fc9.info differ diff --git a/Roll a Ball/Library/metadata/96/96626a3e271e94e76a848c68828fbbac b/Roll a Ball/Library/metadata/96/96626a3e271e94e76a848c68828fbbac new file mode 100644 index 0000000000000000000000000000000000000000..a5d769f462d416ef9311768e05934d0584e50b0e Binary files /dev/null and b/Roll a Ball/Library/metadata/96/96626a3e271e94e76a848c68828fbbac differ diff --git a/Roll a Ball/Library/metadata/96/96626a3e271e94e76a848c68828fbbac.info b/Roll a Ball/Library/metadata/96/96626a3e271e94e76a848c68828fbbac.info new file mode 100644 index 0000000000000000000000000000000000000000..c7039250086a89f887bde6540402ab66a04105a3 Binary files /dev/null and b/Roll a Ball/Library/metadata/96/96626a3e271e94e76a848c68828fbbac.info differ diff --git a/Roll a Ball/Library/metadata/96/968a09f153574430a6e15ae975145768 b/Roll a Ball/Library/metadata/96/968a09f153574430a6e15ae975145768 new file mode 100644 index 0000000000000000000000000000000000000000..af24fe01bd13bc580a55ff87b6e8eca73ee3973f Binary files /dev/null and b/Roll a Ball/Library/metadata/96/968a09f153574430a6e15ae975145768 differ diff --git a/Roll a Ball/Library/metadata/96/968a09f153574430a6e15ae975145768.info b/Roll a Ball/Library/metadata/96/968a09f153574430a6e15ae975145768.info new file mode 100644 index 0000000000000000000000000000000000000000..aae4d47d16be3e13db7019c47fd50935b8164906 Binary files /dev/null and b/Roll a Ball/Library/metadata/96/968a09f153574430a6e15ae975145768.info differ diff --git a/Roll a Ball/Library/metadata/96/96b44f7d98314b139324a8a87eb66067 b/Roll a Ball/Library/metadata/96/96b44f7d98314b139324a8a87eb66067 new file mode 100644 index 0000000000000000000000000000000000000000..debf6f36133bae95158afaf5df9b04f592a47001 Binary files /dev/null and b/Roll a Ball/Library/metadata/96/96b44f7d98314b139324a8a87eb66067 differ diff --git a/Roll a Ball/Library/metadata/96/96b44f7d98314b139324a8a87eb66067.info b/Roll a Ball/Library/metadata/96/96b44f7d98314b139324a8a87eb66067.info new file mode 100644 index 0000000000000000000000000000000000000000..9094b18bf7989d99fbff640a16f612cf739cc5bc Binary files /dev/null and b/Roll a Ball/Library/metadata/96/96b44f7d98314b139324a8a87eb66067.info differ diff --git a/Roll a Ball/Library/metadata/96/96d14b71b907bb52333b2886e665aba6 b/Roll a Ball/Library/metadata/96/96d14b71b907bb52333b2886e665aba6 new file mode 100644 index 0000000000000000000000000000000000000000..396d4b640fed31aaada9b371c7f1947c611bed4a Binary files /dev/null and b/Roll a Ball/Library/metadata/96/96d14b71b907bb52333b2886e665aba6 differ diff --git a/Roll a Ball/Library/metadata/96/96d14b71b907bb52333b2886e665aba6.info b/Roll a Ball/Library/metadata/96/96d14b71b907bb52333b2886e665aba6.info new file mode 100644 index 0000000000000000000000000000000000000000..4dbddc9c8ff7559c6464621866b8f871bf0cdcbe Binary files /dev/null and b/Roll a Ball/Library/metadata/96/96d14b71b907bb52333b2886e665aba6.info differ diff --git a/Roll a Ball/Library/metadata/96/96e9072453a441618754c478755b3028 b/Roll a Ball/Library/metadata/96/96e9072453a441618754c478755b3028 new file mode 100644 index 0000000000000000000000000000000000000000..0997eda4060b57be3cea2ef108b52c09814c65ad Binary files /dev/null and b/Roll a Ball/Library/metadata/96/96e9072453a441618754c478755b3028 differ diff --git a/Roll a Ball/Library/metadata/96/96e9072453a441618754c478755b3028.info b/Roll a Ball/Library/metadata/96/96e9072453a441618754c478755b3028.info new file mode 100644 index 0000000000000000000000000000000000000000..79d9bf755f730a9b9986fca01d7e3b51f8ef10c3 Binary files /dev/null and b/Roll a Ball/Library/metadata/96/96e9072453a441618754c478755b3028.info differ diff --git a/Roll a Ball/Library/metadata/97/97dff1b5ae41ee84886ae7a80ae21499 b/Roll a Ball/Library/metadata/97/97dff1b5ae41ee84886ae7a80ae21499 new file mode 100644 index 0000000000000000000000000000000000000000..0df9ded5589021e2a00977539648a6116d1ce8f1 Binary files /dev/null and b/Roll a Ball/Library/metadata/97/97dff1b5ae41ee84886ae7a80ae21499 differ diff --git a/Roll a Ball/Library/metadata/97/97dff1b5ae41ee84886ae7a80ae21499.info b/Roll a Ball/Library/metadata/97/97dff1b5ae41ee84886ae7a80ae21499.info new file mode 100644 index 0000000000000000000000000000000000000000..0a165ddd0fa937787dab260feac2d49d98cd20e8 Binary files /dev/null and b/Roll a Ball/Library/metadata/97/97dff1b5ae41ee84886ae7a80ae21499.info differ diff --git a/Roll a Ball/Library/metadata/98/983d491088dbb4db8b83c926939a08c5 b/Roll a Ball/Library/metadata/98/983d491088dbb4db8b83c926939a08c5 new file mode 100644 index 0000000000000000000000000000000000000000..e32f7acd50d69e3f4e5de9224851c56aa1028add Binary files /dev/null and b/Roll a Ball/Library/metadata/98/983d491088dbb4db8b83c926939a08c5 differ diff --git a/Roll a Ball/Library/metadata/98/983d491088dbb4db8b83c926939a08c5.info b/Roll a Ball/Library/metadata/98/983d491088dbb4db8b83c926939a08c5.info new file mode 100644 index 0000000000000000000000000000000000000000..d9bcd73f5e36d49af5c8fd5a12a9433a56948c70 Binary files /dev/null and b/Roll a Ball/Library/metadata/98/983d491088dbb4db8b83c926939a08c5.info differ diff --git a/Roll a Ball/Library/metadata/99/99ddb49592ff84811804420a1910cb89 b/Roll a Ball/Library/metadata/99/99ddb49592ff84811804420a1910cb89 new file mode 100644 index 0000000000000000000000000000000000000000..1a73a77ee13106a624f5610af3a5f026a0c1984a Binary files /dev/null and b/Roll a Ball/Library/metadata/99/99ddb49592ff84811804420a1910cb89 differ diff --git a/Roll a Ball/Library/metadata/99/99ddb49592ff84811804420a1910cb89.info b/Roll a Ball/Library/metadata/99/99ddb49592ff84811804420a1910cb89.info new file mode 100644 index 0000000000000000000000000000000000000000..bd823ad0749b642041345e00c90e06e591b4f16c Binary files /dev/null and b/Roll a Ball/Library/metadata/99/99ddb49592ff84811804420a1910cb89.info differ diff --git a/Roll a Ball/Library/metadata/9a/9a2c874c382e2419184b302497279dd9 b/Roll a Ball/Library/metadata/9a/9a2c874c382e2419184b302497279dd9 new file mode 100644 index 0000000000000000000000000000000000000000..90d40b82e8e07fff46e6da9904734567060daf0c Binary files /dev/null and b/Roll a Ball/Library/metadata/9a/9a2c874c382e2419184b302497279dd9 differ diff --git a/Roll a Ball/Library/metadata/9a/9a2c874c382e2419184b302497279dd9.info b/Roll a Ball/Library/metadata/9a/9a2c874c382e2419184b302497279dd9.info new file mode 100644 index 0000000000000000000000000000000000000000..26098db78660e279dfb54d3d0679defb2e9c7a34 Binary files /dev/null and b/Roll a Ball/Library/metadata/9a/9a2c874c382e2419184b302497279dd9.info differ diff --git a/Roll a Ball/Library/metadata/9c/9c4a050f089abb04ebd4125e419f4548 b/Roll a Ball/Library/metadata/9c/9c4a050f089abb04ebd4125e419f4548 new file mode 100644 index 0000000000000000000000000000000000000000..af8ec3100ee3d429714018680585cc194e8b5901 Binary files /dev/null and b/Roll a Ball/Library/metadata/9c/9c4a050f089abb04ebd4125e419f4548 differ diff --git a/Roll a Ball/Library/metadata/9c/9c4a050f089abb04ebd4125e419f4548.info b/Roll a Ball/Library/metadata/9c/9c4a050f089abb04ebd4125e419f4548.info new file mode 100644 index 0000000000000000000000000000000000000000..b654b4e65385b241e9265211529ac8416ae45015 Binary files /dev/null and b/Roll a Ball/Library/metadata/9c/9c4a050f089abb04ebd4125e419f4548.info differ diff --git a/Roll a Ball/Library/metadata/9c/9c7c268fa6492449654839df69f2a2f4 b/Roll a Ball/Library/metadata/9c/9c7c268fa6492449654839df69f2a2f4 new file mode 100644 index 0000000000000000000000000000000000000000..5261633db254a716973a9ea37180fad9497890c1 Binary files /dev/null and b/Roll a Ball/Library/metadata/9c/9c7c268fa6492449654839df69f2a2f4 differ diff --git a/Roll a Ball/Library/metadata/9c/9c7c268fa6492449654839df69f2a2f4.info b/Roll a Ball/Library/metadata/9c/9c7c268fa6492449654839df69f2a2f4.info new file mode 100644 index 0000000000000000000000000000000000000000..af416f036bf1cc7d5d668cbf41213ce46815aced Binary files /dev/null and b/Roll a Ball/Library/metadata/9c/9c7c268fa6492449654839df69f2a2f4.info differ diff --git a/Roll a Ball/Library/metadata/9d/9da568db70dafa345a908282554b3672 b/Roll a Ball/Library/metadata/9d/9da568db70dafa345a908282554b3672 new file mode 100644 index 0000000000000000000000000000000000000000..60a2100fe54982323d4ee10dcdfd79ed7b9c203c Binary files /dev/null and b/Roll a Ball/Library/metadata/9d/9da568db70dafa345a908282554b3672 differ diff --git a/Roll a Ball/Library/metadata/9d/9da568db70dafa345a908282554b3672.info b/Roll a Ball/Library/metadata/9d/9da568db70dafa345a908282554b3672.info new file mode 100644 index 0000000000000000000000000000000000000000..c5e88c2802a541db5a8c46f51398a65cc55f1da5 Binary files /dev/null and b/Roll a Ball/Library/metadata/9d/9da568db70dafa345a908282554b3672.info differ diff --git a/Roll a Ball/Library/metadata/9d/9de24983a2c6cbe4f925c3e98a79b804 b/Roll a Ball/Library/metadata/9d/9de24983a2c6cbe4f925c3e98a79b804 new file mode 100644 index 0000000000000000000000000000000000000000..922ccda501cf146925eb9dad433b364484786302 Binary files /dev/null and b/Roll a Ball/Library/metadata/9d/9de24983a2c6cbe4f925c3e98a79b804 differ diff --git a/Roll a Ball/Library/metadata/9d/9de24983a2c6cbe4f925c3e98a79b804.info b/Roll a Ball/Library/metadata/9d/9de24983a2c6cbe4f925c3e98a79b804.info new file mode 100644 index 0000000000000000000000000000000000000000..e61ea0abe45b24089e5b6e40b1bc9541aea06ac7 Binary files /dev/null and b/Roll a Ball/Library/metadata/9d/9de24983a2c6cbe4f925c3e98a79b804.info differ diff --git a/Roll a Ball/Library/metadata/9d/9de9e8523c82543c5b3e40a4b51aa2c9 b/Roll a Ball/Library/metadata/9d/9de9e8523c82543c5b3e40a4b51aa2c9 new file mode 100644 index 0000000000000000000000000000000000000000..d18cb5fc3537a51924885d3866cde4e97b70b81c Binary files /dev/null and b/Roll a Ball/Library/metadata/9d/9de9e8523c82543c5b3e40a4b51aa2c9 differ diff --git a/Roll a Ball/Library/metadata/9d/9de9e8523c82543c5b3e40a4b51aa2c9.info b/Roll a Ball/Library/metadata/9d/9de9e8523c82543c5b3e40a4b51aa2c9.info new file mode 100644 index 0000000000000000000000000000000000000000..00a9db7ca36131d210c2e3bc19c792f02b30605e Binary files /dev/null and b/Roll a Ball/Library/metadata/9d/9de9e8523c82543c5b3e40a4b51aa2c9.info differ diff --git a/Roll a Ball/Library/metadata/9e/9e69df8ff024a4dc1a9e5c22725e4863 b/Roll a Ball/Library/metadata/9e/9e69df8ff024a4dc1a9e5c22725e4863 new file mode 100644 index 0000000000000000000000000000000000000000..a7f00d6640161e6c9cd7e8a656d2fb696c9019cf Binary files /dev/null and b/Roll a Ball/Library/metadata/9e/9e69df8ff024a4dc1a9e5c22725e4863 differ diff --git a/Roll a Ball/Library/metadata/9e/9e69df8ff024a4dc1a9e5c22725e4863.info b/Roll a Ball/Library/metadata/9e/9e69df8ff024a4dc1a9e5c22725e4863.info new file mode 100644 index 0000000000000000000000000000000000000000..f535e80ca1b0aec40ec04e82d99a6b95a6492c5e Binary files /dev/null and b/Roll a Ball/Library/metadata/9e/9e69df8ff024a4dc1a9e5c22725e4863.info differ diff --git a/Roll a Ball/Library/metadata/9e/9ec5dc72125424af38a9bfaca532acc8 b/Roll a Ball/Library/metadata/9e/9ec5dc72125424af38a9bfaca532acc8 new file mode 100644 index 0000000000000000000000000000000000000000..9b82b80083afdea188ea7417be78e046a758f3cd Binary files /dev/null and b/Roll a Ball/Library/metadata/9e/9ec5dc72125424af38a9bfaca532acc8 differ diff --git a/Roll a Ball/Library/metadata/9e/9ec5dc72125424af38a9bfaca532acc8.info b/Roll a Ball/Library/metadata/9e/9ec5dc72125424af38a9bfaca532acc8.info new file mode 100644 index 0000000000000000000000000000000000000000..6bf97cd7abfa5d047687bf2a018e3a808f24d6c3 Binary files /dev/null and b/Roll a Ball/Library/metadata/9e/9ec5dc72125424af38a9bfaca532acc8.info differ diff --git a/Roll a Ball/Library/metadata/9e/9edc9283e7d6409fab242fe8fb6a822c b/Roll a Ball/Library/metadata/9e/9edc9283e7d6409fab242fe8fb6a822c new file mode 100644 index 0000000000000000000000000000000000000000..066294adda4a776799aa38bdc8a463d0e60b32e7 Binary files /dev/null and b/Roll a Ball/Library/metadata/9e/9edc9283e7d6409fab242fe8fb6a822c differ diff --git a/Roll a Ball/Library/metadata/9e/9edc9283e7d6409fab242fe8fb6a822c.info b/Roll a Ball/Library/metadata/9e/9edc9283e7d6409fab242fe8fb6a822c.info new file mode 100644 index 0000000000000000000000000000000000000000..b9491cf47a7e0ca63da0d7e253da493f57444fbc Binary files /dev/null and b/Roll a Ball/Library/metadata/9e/9edc9283e7d6409fab242fe8fb6a822c.info differ diff --git a/Roll a Ball/Library/metadata/9f/9f091dea68a1452cb6c04a6dfa73d5f5 b/Roll a Ball/Library/metadata/9f/9f091dea68a1452cb6c04a6dfa73d5f5 new file mode 100644 index 0000000000000000000000000000000000000000..4e454ff589586ade83761bb2ef974c2d61f6ce32 Binary files /dev/null and b/Roll a Ball/Library/metadata/9f/9f091dea68a1452cb6c04a6dfa73d5f5 differ diff --git a/Roll a Ball/Library/metadata/9f/9f091dea68a1452cb6c04a6dfa73d5f5.info b/Roll a Ball/Library/metadata/9f/9f091dea68a1452cb6c04a6dfa73d5f5.info new file mode 100644 index 0000000000000000000000000000000000000000..0f9e75bbc52caeab6ebcd69ba2f14238a1c27c01 Binary files /dev/null and b/Roll a Ball/Library/metadata/9f/9f091dea68a1452cb6c04a6dfa73d5f5.info differ diff --git a/Roll a Ball/Library/metadata/9f/9f17a0688211d476f8d8c9742bb9f992 b/Roll a Ball/Library/metadata/9f/9f17a0688211d476f8d8c9742bb9f992 new file mode 100644 index 0000000000000000000000000000000000000000..2c8c34271b34ada2a93f5d5f50fa2c477ee3da6c Binary files /dev/null and b/Roll a Ball/Library/metadata/9f/9f17a0688211d476f8d8c9742bb9f992 differ diff --git a/Roll a Ball/Library/metadata/9f/9f17a0688211d476f8d8c9742bb9f992.info b/Roll a Ball/Library/metadata/9f/9f17a0688211d476f8d8c9742bb9f992.info new file mode 100644 index 0000000000000000000000000000000000000000..e53987b65b89a380b92372c1cdb943a90ca3bf03 Binary files /dev/null and b/Roll a Ball/Library/metadata/9f/9f17a0688211d476f8d8c9742bb9f992.info differ diff --git a/Roll a Ball/Library/metadata/a1/a10564aae782c458cbf1de024f4870f7 b/Roll a Ball/Library/metadata/a1/a10564aae782c458cbf1de024f4870f7 new file mode 100644 index 0000000000000000000000000000000000000000..fe04a644b2d1ebb23b3f24e88fb82ead886a2da8 Binary files /dev/null and b/Roll a Ball/Library/metadata/a1/a10564aae782c458cbf1de024f4870f7 differ diff --git a/Roll a Ball/Library/metadata/a1/a10564aae782c458cbf1de024f4870f7.info b/Roll a Ball/Library/metadata/a1/a10564aae782c458cbf1de024f4870f7.info new file mode 100644 index 0000000000000000000000000000000000000000..85eb259a19be74c84992a60861bc6a21f12aa2d9 Binary files /dev/null and b/Roll a Ball/Library/metadata/a1/a10564aae782c458cbf1de024f4870f7.info differ diff --git a/Roll a Ball/Library/metadata/a3/a30e59ca9f68d46db88323ac18f49e31 b/Roll a Ball/Library/metadata/a3/a30e59ca9f68d46db88323ac18f49e31 new file mode 100644 index 0000000000000000000000000000000000000000..c81ca1a21664d7f1b95a16e08e4ca8561ae9ee73 Binary files /dev/null and b/Roll a Ball/Library/metadata/a3/a30e59ca9f68d46db88323ac18f49e31 differ diff --git a/Roll a Ball/Library/metadata/a3/a30e59ca9f68d46db88323ac18f49e31.info b/Roll a Ball/Library/metadata/a3/a30e59ca9f68d46db88323ac18f49e31.info new file mode 100644 index 0000000000000000000000000000000000000000..8c09a57614e899db347687b0db93441970be47a0 Binary files /dev/null and b/Roll a Ball/Library/metadata/a3/a30e59ca9f68d46db88323ac18f49e31.info differ diff --git a/Roll a Ball/Library/metadata/a3/a342381d77833427fa10621e38fbae10 b/Roll a Ball/Library/metadata/a3/a342381d77833427fa10621e38fbae10 new file mode 100644 index 0000000000000000000000000000000000000000..bbc8b2e395578190d10d7a6a90d485f91d73c40f Binary files /dev/null and b/Roll a Ball/Library/metadata/a3/a342381d77833427fa10621e38fbae10 differ diff --git a/Roll a Ball/Library/metadata/a3/a342381d77833427fa10621e38fbae10.info b/Roll a Ball/Library/metadata/a3/a342381d77833427fa10621e38fbae10.info new file mode 100644 index 0000000000000000000000000000000000000000..a8d4a9f8c5cb26e72ac8ba93345f0d886c4dc615 Binary files /dev/null and b/Roll a Ball/Library/metadata/a3/a342381d77833427fa10621e38fbae10.info differ diff --git a/Roll a Ball/Library/metadata/a3/a37e18887fa954edf92bc36bc353b879 b/Roll a Ball/Library/metadata/a3/a37e18887fa954edf92bc36bc353b879 new file mode 100644 index 0000000000000000000000000000000000000000..e1b35655a717e891eb41909297a01b56109f8421 Binary files /dev/null and b/Roll a Ball/Library/metadata/a3/a37e18887fa954edf92bc36bc353b879 differ diff --git a/Roll a Ball/Library/metadata/a3/a37e18887fa954edf92bc36bc353b879.info b/Roll a Ball/Library/metadata/a3/a37e18887fa954edf92bc36bc353b879.info new file mode 100644 index 0000000000000000000000000000000000000000..99b8c82abfe6f8de73af2aaf220fa1b907de9b06 Binary files /dev/null and b/Roll a Ball/Library/metadata/a3/a37e18887fa954edf92bc36bc353b879.info differ diff --git a/Roll a Ball/Library/metadata/a4/a483595b0257945278dc75c5ff7d82ee b/Roll a Ball/Library/metadata/a4/a483595b0257945278dc75c5ff7d82ee new file mode 100644 index 0000000000000000000000000000000000000000..563aec540c750a03461f1ea686ed74b057df964e Binary files /dev/null and b/Roll a Ball/Library/metadata/a4/a483595b0257945278dc75c5ff7d82ee differ diff --git a/Roll a Ball/Library/metadata/a4/a483595b0257945278dc75c5ff7d82ee.info b/Roll a Ball/Library/metadata/a4/a483595b0257945278dc75c5ff7d82ee.info new file mode 100644 index 0000000000000000000000000000000000000000..697757b49d67bc16dafd0634f38bb81fa53dac36 Binary files /dev/null and b/Roll a Ball/Library/metadata/a4/a483595b0257945278dc75c5ff7d82ee.info differ diff --git a/Roll a Ball/Library/metadata/a5/a55fb7b4961a425381d1282fc424f966 b/Roll a Ball/Library/metadata/a5/a55fb7b4961a425381d1282fc424f966 new file mode 100644 index 0000000000000000000000000000000000000000..1f3698666f50ac0dfb565d890b2dce04068b8ee9 Binary files /dev/null and b/Roll a Ball/Library/metadata/a5/a55fb7b4961a425381d1282fc424f966 differ diff --git a/Roll a Ball/Library/metadata/a5/a55fb7b4961a425381d1282fc424f966.info b/Roll a Ball/Library/metadata/a5/a55fb7b4961a425381d1282fc424f966.info new file mode 100644 index 0000000000000000000000000000000000000000..cd988052eafab7e9814413169ae9e4dd3385e926 Binary files /dev/null and b/Roll a Ball/Library/metadata/a5/a55fb7b4961a425381d1282fc424f966.info differ diff --git a/Roll a Ball/Library/metadata/a5/a571de1bea3cb4c9784493c6f1b0b76c b/Roll a Ball/Library/metadata/a5/a571de1bea3cb4c9784493c6f1b0b76c new file mode 100644 index 0000000000000000000000000000000000000000..6c0f4ece17ae0a845c97aae440d324e5062d44f1 Binary files /dev/null and b/Roll a Ball/Library/metadata/a5/a571de1bea3cb4c9784493c6f1b0b76c differ diff --git a/Roll a Ball/Library/metadata/a5/a571de1bea3cb4c9784493c6f1b0b76c.info b/Roll a Ball/Library/metadata/a5/a571de1bea3cb4c9784493c6f1b0b76c.info new file mode 100644 index 0000000000000000000000000000000000000000..e2aa8d0b54a212f9f3e9a032370bf2c536ac8c5a Binary files /dev/null and b/Roll a Ball/Library/metadata/a5/a571de1bea3cb4c9784493c6f1b0b76c.info differ diff --git a/Roll a Ball/Library/metadata/a5/a592d27ead6884163839d4f8da3977ef b/Roll a Ball/Library/metadata/a5/a592d27ead6884163839d4f8da3977ef new file mode 100644 index 0000000000000000000000000000000000000000..26a9a16708cd494d104ad14b85f00fc405818541 Binary files /dev/null and b/Roll a Ball/Library/metadata/a5/a592d27ead6884163839d4f8da3977ef differ diff --git a/Roll a Ball/Library/metadata/a5/a592d27ead6884163839d4f8da3977ef.info b/Roll a Ball/Library/metadata/a5/a592d27ead6884163839d4f8da3977ef.info new file mode 100644 index 0000000000000000000000000000000000000000..761aa27a0c03147d6a82ebdc4ad48cf7ab78c5ee Binary files /dev/null and b/Roll a Ball/Library/metadata/a5/a592d27ead6884163839d4f8da3977ef.info differ diff --git a/Roll a Ball/Library/metadata/a5/a5ebb11c6fc3a2f498bd89593f7744aa b/Roll a Ball/Library/metadata/a5/a5ebb11c6fc3a2f498bd89593f7744aa new file mode 100644 index 0000000000000000000000000000000000000000..943a5a7f59a35ffe5a0ab5e25910e9def775548a Binary files /dev/null and b/Roll a Ball/Library/metadata/a5/a5ebb11c6fc3a2f498bd89593f7744aa differ diff --git a/Roll a Ball/Library/metadata/a5/a5ebb11c6fc3a2f498bd89593f7744aa.info b/Roll a Ball/Library/metadata/a5/a5ebb11c6fc3a2f498bd89593f7744aa.info new file mode 100644 index 0000000000000000000000000000000000000000..787fc3268721a912baf21a04cd586f3de57329dd Binary files /dev/null and b/Roll a Ball/Library/metadata/a5/a5ebb11c6fc3a2f498bd89593f7744aa.info differ diff --git a/Roll a Ball/Library/metadata/a5/a5edd19845e0e426eb775477a7988a4a b/Roll a Ball/Library/metadata/a5/a5edd19845e0e426eb775477a7988a4a new file mode 100644 index 0000000000000000000000000000000000000000..3dd86fc0a510150dad001a78fe10c6938986a93b Binary files /dev/null and b/Roll a Ball/Library/metadata/a5/a5edd19845e0e426eb775477a7988a4a differ diff --git a/Roll a Ball/Library/metadata/a5/a5edd19845e0e426eb775477a7988a4a.info b/Roll a Ball/Library/metadata/a5/a5edd19845e0e426eb775477a7988a4a.info new file mode 100644 index 0000000000000000000000000000000000000000..eeb7f3b4e3add4067fd4c524bbdd058bb0889876 Binary files /dev/null and b/Roll a Ball/Library/metadata/a5/a5edd19845e0e426eb775477a7988a4a.info differ diff --git a/Roll a Ball/Library/metadata/a6/a6842a74831964edc8fefa1c0aed89dc b/Roll a Ball/Library/metadata/a6/a6842a74831964edc8fefa1c0aed89dc new file mode 100644 index 0000000000000000000000000000000000000000..b11bc5485f2fc569fbc1e1646119354b1d25d8fb Binary files /dev/null and b/Roll a Ball/Library/metadata/a6/a6842a74831964edc8fefa1c0aed89dc differ diff --git a/Roll a Ball/Library/metadata/a6/a6842a74831964edc8fefa1c0aed89dc.info b/Roll a Ball/Library/metadata/a6/a6842a74831964edc8fefa1c0aed89dc.info new file mode 100644 index 0000000000000000000000000000000000000000..42a95b32ed3a7369264cc5ec6d79d0bc3135ef0a Binary files /dev/null and b/Roll a Ball/Library/metadata/a6/a6842a74831964edc8fefa1c0aed89dc.info differ diff --git a/Roll a Ball/Library/metadata/a6/a6ab6fd2b91214e8a9c8ec2224a528de b/Roll a Ball/Library/metadata/a6/a6ab6fd2b91214e8a9c8ec2224a528de new file mode 100644 index 0000000000000000000000000000000000000000..1f6be56257d66d830152f67d4d95be7c406cbd7e Binary files /dev/null and b/Roll a Ball/Library/metadata/a6/a6ab6fd2b91214e8a9c8ec2224a528de differ diff --git a/Roll a Ball/Library/metadata/a6/a6ab6fd2b91214e8a9c8ec2224a528de.info b/Roll a Ball/Library/metadata/a6/a6ab6fd2b91214e8a9c8ec2224a528de.info new file mode 100644 index 0000000000000000000000000000000000000000..dba6251024035034aa38def85b31347f3b5c49a8 Binary files /dev/null and b/Roll a Ball/Library/metadata/a6/a6ab6fd2b91214e8a9c8ec2224a528de.info differ diff --git a/Roll a Ball/Library/metadata/a7/a7b89acd74e047778b42209a7a733d39 b/Roll a Ball/Library/metadata/a7/a7b89acd74e047778b42209a7a733d39 new file mode 100644 index 0000000000000000000000000000000000000000..8ad4c882b113012c4ba88da46d017ae6d78f5fdb Binary files /dev/null and b/Roll a Ball/Library/metadata/a7/a7b89acd74e047778b42209a7a733d39 differ diff --git a/Roll a Ball/Library/metadata/a7/a7b89acd74e047778b42209a7a733d39.info b/Roll a Ball/Library/metadata/a7/a7b89acd74e047778b42209a7a733d39.info new file mode 100644 index 0000000000000000000000000000000000000000..77c18a56a04dcd6d9cc8f5f25c73cf059a5cf9e2 Binary files /dev/null and b/Roll a Ball/Library/metadata/a7/a7b89acd74e047778b42209a7a733d39.info differ diff --git a/Roll a Ball/Library/metadata/a7/a7c91a123806d41a0873fcdcb629b1c4 b/Roll a Ball/Library/metadata/a7/a7c91a123806d41a0873fcdcb629b1c4 new file mode 100644 index 0000000000000000000000000000000000000000..7d7d3e587a296e118f0f36fe42ec6b14c17f8c9f Binary files /dev/null and b/Roll a Ball/Library/metadata/a7/a7c91a123806d41a0873fcdcb629b1c4 differ diff --git a/Roll a Ball/Library/metadata/a7/a7c91a123806d41a0873fcdcb629b1c4.info b/Roll a Ball/Library/metadata/a7/a7c91a123806d41a0873fcdcb629b1c4.info new file mode 100644 index 0000000000000000000000000000000000000000..87a22ec900f89390770a0bbdede8c498a933e0be Binary files /dev/null and b/Roll a Ball/Library/metadata/a7/a7c91a123806d41a0873fcdcb629b1c4.info differ diff --git a/Roll a Ball/Library/metadata/a7/a7ec9e7ad8b847b7ae4510af83c5d868 b/Roll a Ball/Library/metadata/a7/a7ec9e7ad8b847b7ae4510af83c5d868 new file mode 100644 index 0000000000000000000000000000000000000000..98cf2c437a28494efe107f2e2c6679b99ac59d4f Binary files /dev/null and b/Roll a Ball/Library/metadata/a7/a7ec9e7ad8b847b7ae4510af83c5d868 differ diff --git a/Roll a Ball/Library/metadata/a7/a7ec9e7ad8b847b7ae4510af83c5d868.info b/Roll a Ball/Library/metadata/a7/a7ec9e7ad8b847b7ae4510af83c5d868.info new file mode 100644 index 0000000000000000000000000000000000000000..d4279531a3e06464643a058b2ceda3dc0485c036 Binary files /dev/null and b/Roll a Ball/Library/metadata/a7/a7ec9e7ad8b847b7ae4510af83c5d868.info differ diff --git a/Roll a Ball/Library/metadata/a8/a8d9e44eff3f447db9448925617ccb44 b/Roll a Ball/Library/metadata/a8/a8d9e44eff3f447db9448925617ccb44 new file mode 100644 index 0000000000000000000000000000000000000000..d268d9331d29a0348c1c3d32d7bcc8e4e4ae1a5d Binary files /dev/null and b/Roll a Ball/Library/metadata/a8/a8d9e44eff3f447db9448925617ccb44 differ diff --git a/Roll a Ball/Library/metadata/a8/a8d9e44eff3f447db9448925617ccb44.info b/Roll a Ball/Library/metadata/a8/a8d9e44eff3f447db9448925617ccb44.info new file mode 100644 index 0000000000000000000000000000000000000000..4e00c1c497eabcbadde373742eaee7e95ab46a77 Binary files /dev/null and b/Roll a Ball/Library/metadata/a8/a8d9e44eff3f447db9448925617ccb44.info differ diff --git a/Roll a Ball/Library/metadata/a9/a98bc92072da64d49a393088e55ce2a0 b/Roll a Ball/Library/metadata/a9/a98bc92072da64d49a393088e55ce2a0 new file mode 100644 index 0000000000000000000000000000000000000000..046cdb0c4b8222616d647f6cbef2cf87a3a74a6c Binary files /dev/null and b/Roll a Ball/Library/metadata/a9/a98bc92072da64d49a393088e55ce2a0 differ diff --git a/Roll a Ball/Library/metadata/a9/a98bc92072da64d49a393088e55ce2a0.info b/Roll a Ball/Library/metadata/a9/a98bc92072da64d49a393088e55ce2a0.info new file mode 100644 index 0000000000000000000000000000000000000000..875dde4985e52230378e2b72c5c324e783cb1db5 Binary files /dev/null and b/Roll a Ball/Library/metadata/a9/a98bc92072da64d49a393088e55ce2a0.info differ diff --git a/Roll a Ball/Library/metadata/aa/aa160f27c3fe4052a5850e21108811b6 b/Roll a Ball/Library/metadata/aa/aa160f27c3fe4052a5850e21108811b6 new file mode 100644 index 0000000000000000000000000000000000000000..87349497df4fe58260373406260cd2589d34217e Binary files /dev/null and b/Roll a Ball/Library/metadata/aa/aa160f27c3fe4052a5850e21108811b6 differ diff --git a/Roll a Ball/Library/metadata/aa/aa160f27c3fe4052a5850e21108811b6.info b/Roll a Ball/Library/metadata/aa/aa160f27c3fe4052a5850e21108811b6.info new file mode 100644 index 0000000000000000000000000000000000000000..1b74647257bdb800ac41a3bf0efde3f8ec3fea21 Binary files /dev/null and b/Roll a Ball/Library/metadata/aa/aa160f27c3fe4052a5850e21108811b6.info differ diff --git a/Roll a Ball/Library/metadata/aa/aa76955fe5bb44f7915d91db8c7043c4 b/Roll a Ball/Library/metadata/aa/aa76955fe5bb44f7915d91db8c7043c4 new file mode 100644 index 0000000000000000000000000000000000000000..0aad6677a5f76f5dda1f10f6afea1acecafbc0ef Binary files /dev/null and b/Roll a Ball/Library/metadata/aa/aa76955fe5bb44f7915d91db8c7043c4 differ diff --git a/Roll a Ball/Library/metadata/aa/aa76955fe5bb44f7915d91db8c7043c4.info b/Roll a Ball/Library/metadata/aa/aa76955fe5bb44f7915d91db8c7043c4.info new file mode 100644 index 0000000000000000000000000000000000000000..52e62ecbfe6894f214c4b2213ca212f696612bbe Binary files /dev/null and b/Roll a Ball/Library/metadata/aa/aa76955fe5bb44f7915d91db8c7043c4.info differ diff --git a/Roll a Ball/Library/metadata/ab/ab2114bdc8544297b417dfefe9f1e410 b/Roll a Ball/Library/metadata/ab/ab2114bdc8544297b417dfefe9f1e410 new file mode 100644 index 0000000000000000000000000000000000000000..d0eebd4d4616739d3e1d465e5c36742683a05aeb Binary files /dev/null and b/Roll a Ball/Library/metadata/ab/ab2114bdc8544297b417dfefe9f1e410 differ diff --git a/Roll a Ball/Library/metadata/ab/ab2114bdc8544297b417dfefe9f1e410.info b/Roll a Ball/Library/metadata/ab/ab2114bdc8544297b417dfefe9f1e410.info new file mode 100644 index 0000000000000000000000000000000000000000..4de42ab998605bbff9b3fc6a5b894d87fc4f6405 Binary files /dev/null and b/Roll a Ball/Library/metadata/ab/ab2114bdc8544297b417dfefe9f1e410.info differ diff --git a/Roll a Ball/Library/metadata/ab/ab866bd39382069418f5c179c1e1ab3e b/Roll a Ball/Library/metadata/ab/ab866bd39382069418f5c179c1e1ab3e new file mode 100644 index 0000000000000000000000000000000000000000..1995987d073728c6a0c7b748ab6a91272dc930bb Binary files /dev/null and b/Roll a Ball/Library/metadata/ab/ab866bd39382069418f5c179c1e1ab3e differ diff --git a/Roll a Ball/Library/metadata/ab/ab866bd39382069418f5c179c1e1ab3e.info b/Roll a Ball/Library/metadata/ab/ab866bd39382069418f5c179c1e1ab3e.info new file mode 100644 index 0000000000000000000000000000000000000000..27c84b74a1dfb9b86e70955c2a654ae229474ddc Binary files /dev/null and b/Roll a Ball/Library/metadata/ab/ab866bd39382069418f5c179c1e1ab3e.info differ diff --git a/Roll a Ball/Library/metadata/ab/abdc053b8e3644f299aedc641d609a84 b/Roll a Ball/Library/metadata/ab/abdc053b8e3644f299aedc641d609a84 new file mode 100644 index 0000000000000000000000000000000000000000..e96df1fbb8e47d9ccdb32ccfcc4d73cb8e47aafa Binary files /dev/null and b/Roll a Ball/Library/metadata/ab/abdc053b8e3644f299aedc641d609a84 differ diff --git a/Roll a Ball/Library/metadata/ab/abdc053b8e3644f299aedc641d609a84.info b/Roll a Ball/Library/metadata/ab/abdc053b8e3644f299aedc641d609a84.info new file mode 100644 index 0000000000000000000000000000000000000000..024d7d57808e7e17b778e011e942aee4c3fe1145 Binary files /dev/null and b/Roll a Ball/Library/metadata/ab/abdc053b8e3644f299aedc641d609a84.info differ diff --git a/Roll a Ball/Library/metadata/ac/ac281230df7b14becb40b3c479f1b429 b/Roll a Ball/Library/metadata/ac/ac281230df7b14becb40b3c479f1b429 new file mode 100644 index 0000000000000000000000000000000000000000..f2eff095dde5ec9ae551ecc35a444620f26d5883 Binary files /dev/null and b/Roll a Ball/Library/metadata/ac/ac281230df7b14becb40b3c479f1b429 differ diff --git a/Roll a Ball/Library/metadata/ac/ac281230df7b14becb40b3c479f1b429.info b/Roll a Ball/Library/metadata/ac/ac281230df7b14becb40b3c479f1b429.info new file mode 100644 index 0000000000000000000000000000000000000000..3a84736365c669fb9490009b02d5bb9d64f2ad5f Binary files /dev/null and b/Roll a Ball/Library/metadata/ac/ac281230df7b14becb40b3c479f1b429.info differ diff --git a/Roll a Ball/Library/metadata/ac/acc34040a66fe4170bc8885268860cfe b/Roll a Ball/Library/metadata/ac/acc34040a66fe4170bc8885268860cfe new file mode 100644 index 0000000000000000000000000000000000000000..d81e53ca9e3921dba93670e9611f1e2d65e1fc55 Binary files /dev/null and b/Roll a Ball/Library/metadata/ac/acc34040a66fe4170bc8885268860cfe differ diff --git a/Roll a Ball/Library/metadata/ac/acc34040a66fe4170bc8885268860cfe.info b/Roll a Ball/Library/metadata/ac/acc34040a66fe4170bc8885268860cfe.info new file mode 100644 index 0000000000000000000000000000000000000000..5527e62448bd218339317d8b40c9301ee68f8c27 Binary files /dev/null and b/Roll a Ball/Library/metadata/ac/acc34040a66fe4170bc8885268860cfe.info differ diff --git a/Roll a Ball/Library/metadata/ad/adee0c1377ef8b2489060e152dd0d119 b/Roll a Ball/Library/metadata/ad/adee0c1377ef8b2489060e152dd0d119 new file mode 100644 index 0000000000000000000000000000000000000000..e00e86b1637af7d0da7fdc5b6422060f5660c141 Binary files /dev/null and b/Roll a Ball/Library/metadata/ad/adee0c1377ef8b2489060e152dd0d119 differ diff --git a/Roll a Ball/Library/metadata/ad/adee0c1377ef8b2489060e152dd0d119.info b/Roll a Ball/Library/metadata/ad/adee0c1377ef8b2489060e152dd0d119.info new file mode 100644 index 0000000000000000000000000000000000000000..d4c5d002015c5af3a723ee54dac61ec8d52b00d2 Binary files /dev/null and b/Roll a Ball/Library/metadata/ad/adee0c1377ef8b2489060e152dd0d119.info differ diff --git a/Roll a Ball/Library/metadata/af/afd7697844f4142f9aa91471c1fba506 b/Roll a Ball/Library/metadata/af/afd7697844f4142f9aa91471c1fba506 new file mode 100644 index 0000000000000000000000000000000000000000..d71c52cfaa8225e3af692977fb2bbdecb9c68b92 Binary files /dev/null and b/Roll a Ball/Library/metadata/af/afd7697844f4142f9aa91471c1fba506 differ diff --git a/Roll a Ball/Library/metadata/af/afd7697844f4142f9aa91471c1fba506.info b/Roll a Ball/Library/metadata/af/afd7697844f4142f9aa91471c1fba506.info new file mode 100644 index 0000000000000000000000000000000000000000..b2f76ceb5dd7d4e3f80e18dba450eb82d5a07492 Binary files /dev/null and b/Roll a Ball/Library/metadata/af/afd7697844f4142f9aa91471c1fba506.info differ diff --git a/Roll a Ball/Library/metadata/b0/b025f6f8a47be46418bcb0ed1050cfb4 b/Roll a Ball/Library/metadata/b0/b025f6f8a47be46418bcb0ed1050cfb4 new file mode 100644 index 0000000000000000000000000000000000000000..9b172522373b3a5e8e6403b75f8003ab798cb741 Binary files /dev/null and b/Roll a Ball/Library/metadata/b0/b025f6f8a47be46418bcb0ed1050cfb4 differ diff --git a/Roll a Ball/Library/metadata/b0/b025f6f8a47be46418bcb0ed1050cfb4.info b/Roll a Ball/Library/metadata/b0/b025f6f8a47be46418bcb0ed1050cfb4.info new file mode 100644 index 0000000000000000000000000000000000000000..741d3c3ffd0f12fbfaf20a4742adf2bdec43fb76 Binary files /dev/null and b/Roll a Ball/Library/metadata/b0/b025f6f8a47be46418bcb0ed1050cfb4.info differ diff --git a/Roll a Ball/Library/metadata/b0/b09be1f217d34247af54863a2f5587e1 b/Roll a Ball/Library/metadata/b0/b09be1f217d34247af54863a2f5587e1 new file mode 100644 index 0000000000000000000000000000000000000000..57031b9921bb3c92d306fa663066b15064ae71a3 Binary files /dev/null and b/Roll a Ball/Library/metadata/b0/b09be1f217d34247af54863a2f5587e1 differ diff --git a/Roll a Ball/Library/metadata/b0/b09be1f217d34247af54863a2f5587e1.info b/Roll a Ball/Library/metadata/b0/b09be1f217d34247af54863a2f5587e1.info new file mode 100644 index 0000000000000000000000000000000000000000..e357afd892b37d9e84883825c799f60c4fa56b50 Binary files /dev/null and b/Roll a Ball/Library/metadata/b0/b09be1f217d34247af54863a2f5587e1.info differ diff --git a/Roll a Ball/Library/metadata/b0/b0bb2afc5cd494e6f9b44455a0fc22f8 b/Roll a Ball/Library/metadata/b0/b0bb2afc5cd494e6f9b44455a0fc22f8 new file mode 100644 index 0000000000000000000000000000000000000000..6d27d17a290cc3f4317f388dd53dc897705f6792 Binary files /dev/null and b/Roll a Ball/Library/metadata/b0/b0bb2afc5cd494e6f9b44455a0fc22f8 differ diff --git a/Roll a Ball/Library/metadata/b0/b0bb2afc5cd494e6f9b44455a0fc22f8.info b/Roll a Ball/Library/metadata/b0/b0bb2afc5cd494e6f9b44455a0fc22f8.info new file mode 100644 index 0000000000000000000000000000000000000000..b21df6cda9c174b635ec0e8e28367a27d29eaef1 Binary files /dev/null and b/Roll a Ball/Library/metadata/b0/b0bb2afc5cd494e6f9b44455a0fc22f8.info differ diff --git a/Roll a Ball/Library/metadata/b0/b0c12f0066bd444a1b3a900679169f30 b/Roll a Ball/Library/metadata/b0/b0c12f0066bd444a1b3a900679169f30 new file mode 100644 index 0000000000000000000000000000000000000000..86db41d4947c993cf63534310da904f043653b24 Binary files /dev/null and b/Roll a Ball/Library/metadata/b0/b0c12f0066bd444a1b3a900679169f30 differ diff --git a/Roll a Ball/Library/metadata/b0/b0c12f0066bd444a1b3a900679169f30.info b/Roll a Ball/Library/metadata/b0/b0c12f0066bd444a1b3a900679169f30.info new file mode 100644 index 0000000000000000000000000000000000000000..6c6dc53658623994f4a27ed2d3056905ff059ed0 Binary files /dev/null and b/Roll a Ball/Library/metadata/b0/b0c12f0066bd444a1b3a900679169f30.info differ diff --git a/Roll a Ball/Library/metadata/b2/b219c86ce508e478367c0a46e1aa9fe4 b/Roll a Ball/Library/metadata/b2/b219c86ce508e478367c0a46e1aa9fe4 new file mode 100644 index 0000000000000000000000000000000000000000..f84a130bc978fc95282fee9e46a6c260e7e3a041 Binary files /dev/null and b/Roll a Ball/Library/metadata/b2/b219c86ce508e478367c0a46e1aa9fe4 differ diff --git a/Roll a Ball/Library/metadata/b2/b219c86ce508e478367c0a46e1aa9fe4.info b/Roll a Ball/Library/metadata/b2/b219c86ce508e478367c0a46e1aa9fe4.info new file mode 100644 index 0000000000000000000000000000000000000000..c7faea27c9b78479f85b9f9097053f05a0d0fa24 Binary files /dev/null and b/Roll a Ball/Library/metadata/b2/b219c86ce508e478367c0a46e1aa9fe4.info differ diff --git a/Roll a Ball/Library/metadata/b2/b274f3d1ea05d4bd8a13f4556f7797d2 b/Roll a Ball/Library/metadata/b2/b274f3d1ea05d4bd8a13f4556f7797d2 new file mode 100644 index 0000000000000000000000000000000000000000..29193cd9e3d2dce826206c54d2af81b4948b214e Binary files /dev/null and b/Roll a Ball/Library/metadata/b2/b274f3d1ea05d4bd8a13f4556f7797d2 differ diff --git a/Roll a Ball/Library/metadata/b2/b274f3d1ea05d4bd8a13f4556f7797d2.info b/Roll a Ball/Library/metadata/b2/b274f3d1ea05d4bd8a13f4556f7797d2.info new file mode 100644 index 0000000000000000000000000000000000000000..b65d8b4ec03fdf1505cbda9fc6531ddc8e17e8f1 Binary files /dev/null and b/Roll a Ball/Library/metadata/b2/b274f3d1ea05d4bd8a13f4556f7797d2.info differ diff --git a/Roll a Ball/Library/metadata/b2/b2b693dffac3a4433b3114fea0b7fd4e b/Roll a Ball/Library/metadata/b2/b2b693dffac3a4433b3114fea0b7fd4e new file mode 100644 index 0000000000000000000000000000000000000000..2c9420cc630a626a3db2b3d06bbb37549291adf2 Binary files /dev/null and b/Roll a Ball/Library/metadata/b2/b2b693dffac3a4433b3114fea0b7fd4e differ diff --git a/Roll a Ball/Library/metadata/b2/b2b693dffac3a4433b3114fea0b7fd4e.info b/Roll a Ball/Library/metadata/b2/b2b693dffac3a4433b3114fea0b7fd4e.info new file mode 100644 index 0000000000000000000000000000000000000000..d172e8471d570f15fd1b2f1530754b202f9e76ba Binary files /dev/null and b/Roll a Ball/Library/metadata/b2/b2b693dffac3a4433b3114fea0b7fd4e.info differ diff --git a/Roll a Ball/Library/metadata/b3/b32abd1c9d73a4cce8389f084ac12b11 b/Roll a Ball/Library/metadata/b3/b32abd1c9d73a4cce8389f084ac12b11 new file mode 100644 index 0000000000000000000000000000000000000000..d842c2103480af7a59b55e8a8c8c5c8a0b97b3ce Binary files /dev/null and b/Roll a Ball/Library/metadata/b3/b32abd1c9d73a4cce8389f084ac12b11 differ diff --git a/Roll a Ball/Library/metadata/b3/b32abd1c9d73a4cce8389f084ac12b11.info b/Roll a Ball/Library/metadata/b3/b32abd1c9d73a4cce8389f084ac12b11.info new file mode 100644 index 0000000000000000000000000000000000000000..8415f44c5b9bba1f253e5273c3382f398ec023f3 Binary files /dev/null and b/Roll a Ball/Library/metadata/b3/b32abd1c9d73a4cce8389f084ac12b11.info differ diff --git a/Roll a Ball/Library/metadata/b4/b456c9352c572254eb167422d3d67e8d b/Roll a Ball/Library/metadata/b4/b456c9352c572254eb167422d3d67e8d new file mode 100644 index 0000000000000000000000000000000000000000..fd217238551795547c37a30208b8b73317e4f4de Binary files /dev/null and b/Roll a Ball/Library/metadata/b4/b456c9352c572254eb167422d3d67e8d differ diff --git a/Roll a Ball/Library/metadata/b4/b456c9352c572254eb167422d3d67e8d.info b/Roll a Ball/Library/metadata/b4/b456c9352c572254eb167422d3d67e8d.info new file mode 100644 index 0000000000000000000000000000000000000000..683d96dd87f501c91ff0e350b22b9398afb6a266 Binary files /dev/null and b/Roll a Ball/Library/metadata/b4/b456c9352c572254eb167422d3d67e8d.info differ diff --git a/Roll a Ball/Library/metadata/b4/b458b2c7f196bdc4581b2f9fd6a5d931 b/Roll a Ball/Library/metadata/b4/b458b2c7f196bdc4581b2f9fd6a5d931 new file mode 100644 index 0000000000000000000000000000000000000000..5a577a1365a65ea18bf19efe4029e736474d9883 Binary files /dev/null and b/Roll a Ball/Library/metadata/b4/b458b2c7f196bdc4581b2f9fd6a5d931 differ diff --git a/Roll a Ball/Library/metadata/b4/b458b2c7f196bdc4581b2f9fd6a5d931.info b/Roll a Ball/Library/metadata/b4/b458b2c7f196bdc4581b2f9fd6a5d931.info new file mode 100644 index 0000000000000000000000000000000000000000..b3ac9071841602831407bc008f0a73b87648759c Binary files /dev/null and b/Roll a Ball/Library/metadata/b4/b458b2c7f196bdc4581b2f9fd6a5d931.info differ diff --git a/Roll a Ball/Library/metadata/b5/b52bde26a83564960bcb90217f72b910 b/Roll a Ball/Library/metadata/b5/b52bde26a83564960bcb90217f72b910 new file mode 100644 index 0000000000000000000000000000000000000000..3fb846bf5396d727e8eb9d776de64053d4c8839a Binary files /dev/null and b/Roll a Ball/Library/metadata/b5/b52bde26a83564960bcb90217f72b910 differ diff --git a/Roll a Ball/Library/metadata/b5/b52bde26a83564960bcb90217f72b910.info b/Roll a Ball/Library/metadata/b5/b52bde26a83564960bcb90217f72b910.info new file mode 100644 index 0000000000000000000000000000000000000000..98ed535640a46e6b936911287e7955126f8c2b35 Binary files /dev/null and b/Roll a Ball/Library/metadata/b5/b52bde26a83564960bcb90217f72b910.info differ diff --git a/Roll a Ball/Library/metadata/b5/b52e557db2c2b4eebb10444f1d582029 b/Roll a Ball/Library/metadata/b5/b52e557db2c2b4eebb10444f1d582029 new file mode 100644 index 0000000000000000000000000000000000000000..290061ab3d59e8bf784ffd4539cdbf512c07b72c Binary files /dev/null and b/Roll a Ball/Library/metadata/b5/b52e557db2c2b4eebb10444f1d582029 differ diff --git a/Roll a Ball/Library/metadata/b5/b52e557db2c2b4eebb10444f1d582029.info b/Roll a Ball/Library/metadata/b5/b52e557db2c2b4eebb10444f1d582029.info new file mode 100644 index 0000000000000000000000000000000000000000..3e40686f63024573621a525676db656bc2cbde25 Binary files /dev/null and b/Roll a Ball/Library/metadata/b5/b52e557db2c2b4eebb10444f1d582029.info differ diff --git a/Roll a Ball/Library/metadata/b5/b5366b8adc0f44b3c9cb261a3f752d7a b/Roll a Ball/Library/metadata/b5/b5366b8adc0f44b3c9cb261a3f752d7a new file mode 100644 index 0000000000000000000000000000000000000000..beb58acf7f5dcbaca5baa51a93eba3cf5907b43d Binary files /dev/null and b/Roll a Ball/Library/metadata/b5/b5366b8adc0f44b3c9cb261a3f752d7a differ diff --git a/Roll a Ball/Library/metadata/b5/b5366b8adc0f44b3c9cb261a3f752d7a.info b/Roll a Ball/Library/metadata/b5/b5366b8adc0f44b3c9cb261a3f752d7a.info new file mode 100644 index 0000000000000000000000000000000000000000..23673340c296d220b65f3cb9db4ebeb2d8140fde Binary files /dev/null and b/Roll a Ball/Library/metadata/b5/b5366b8adc0f44b3c9cb261a3f752d7a.info differ diff --git a/Roll a Ball/Library/metadata/b5/b5d6c28ed7b94775be9e2560f300247c b/Roll a Ball/Library/metadata/b5/b5d6c28ed7b94775be9e2560f300247c new file mode 100644 index 0000000000000000000000000000000000000000..15d60492fc6a3ffb0d84d62b62ce315237cad735 Binary files /dev/null and b/Roll a Ball/Library/metadata/b5/b5d6c28ed7b94775be9e2560f300247c differ diff --git a/Roll a Ball/Library/metadata/b5/b5d6c28ed7b94775be9e2560f300247c.info b/Roll a Ball/Library/metadata/b5/b5d6c28ed7b94775be9e2560f300247c.info new file mode 100644 index 0000000000000000000000000000000000000000..389834eaad5331d04393c51659dd2e93c7c63f15 Binary files /dev/null and b/Roll a Ball/Library/metadata/b5/b5d6c28ed7b94775be9e2560f300247c.info differ diff --git a/Roll a Ball/Library/metadata/b5/b5da970776034f77a070d99423d68791 b/Roll a Ball/Library/metadata/b5/b5da970776034f77a070d99423d68791 new file mode 100644 index 0000000000000000000000000000000000000000..f68d7c795b95bcf80907c7d9645dba6900e787e3 Binary files /dev/null and b/Roll a Ball/Library/metadata/b5/b5da970776034f77a070d99423d68791 differ diff --git a/Roll a Ball/Library/metadata/b5/b5da970776034f77a070d99423d68791.info b/Roll a Ball/Library/metadata/b5/b5da970776034f77a070d99423d68791.info new file mode 100644 index 0000000000000000000000000000000000000000..eab10b5f81c23e34a57c94b7cb45c19b8bf1a3e8 Binary files /dev/null and b/Roll a Ball/Library/metadata/b5/b5da970776034f77a070d99423d68791.info differ diff --git a/Roll a Ball/Library/metadata/b5/b5f4343795a0e4626ac1fe4a9e6fce59 b/Roll a Ball/Library/metadata/b5/b5f4343795a0e4626ac1fe4a9e6fce59 new file mode 100644 index 0000000000000000000000000000000000000000..85b23d71315d7cc748a6eed98dec5a2eb7674cc2 Binary files /dev/null and b/Roll a Ball/Library/metadata/b5/b5f4343795a0e4626ac1fe4a9e6fce59 differ diff --git a/Roll a Ball/Library/metadata/b5/b5f4343795a0e4626ac1fe4a9e6fce59.info b/Roll a Ball/Library/metadata/b5/b5f4343795a0e4626ac1fe4a9e6fce59.info new file mode 100644 index 0000000000000000000000000000000000000000..2964e985f9bcfec941a5b37b8ac621b312a6baa8 Binary files /dev/null and b/Roll a Ball/Library/metadata/b5/b5f4343795a0e4626ac1fe4a9e6fce59.info differ diff --git a/Roll a Ball/Library/metadata/b6/b6295675042094715ad9cc104210aeb7 b/Roll a Ball/Library/metadata/b6/b6295675042094715ad9cc104210aeb7 new file mode 100644 index 0000000000000000000000000000000000000000..24a32becdddaf10164de8585d4a765a4324d1d06 Binary files /dev/null and b/Roll a Ball/Library/metadata/b6/b6295675042094715ad9cc104210aeb7 differ diff --git a/Roll a Ball/Library/metadata/b6/b6295675042094715ad9cc104210aeb7.info b/Roll a Ball/Library/metadata/b6/b6295675042094715ad9cc104210aeb7.info new file mode 100644 index 0000000000000000000000000000000000000000..79fd48795804ba7e3d5cad2c22e30114df4ecdaa Binary files /dev/null and b/Roll a Ball/Library/metadata/b6/b6295675042094715ad9cc104210aeb7.info differ diff --git a/Roll a Ball/Library/metadata/b6/b6d1682724bab428496b2bd2d8c7b194 b/Roll a Ball/Library/metadata/b6/b6d1682724bab428496b2bd2d8c7b194 new file mode 100644 index 0000000000000000000000000000000000000000..e380ba23133b7e963a3ad3bdca6d9350db020706 Binary files /dev/null and b/Roll a Ball/Library/metadata/b6/b6d1682724bab428496b2bd2d8c7b194 differ diff --git a/Roll a Ball/Library/metadata/b6/b6d1682724bab428496b2bd2d8c7b194.info b/Roll a Ball/Library/metadata/b6/b6d1682724bab428496b2bd2d8c7b194.info new file mode 100644 index 0000000000000000000000000000000000000000..4f2db6bffb760c9a7569eb6e935fffee58aa1192 Binary files /dev/null and b/Roll a Ball/Library/metadata/b6/b6d1682724bab428496b2bd2d8c7b194.info differ diff --git a/Roll a Ball/Library/metadata/b6/b6e75d7f429a4e7e9e1ffb4f85cff49f b/Roll a Ball/Library/metadata/b6/b6e75d7f429a4e7e9e1ffb4f85cff49f new file mode 100644 index 0000000000000000000000000000000000000000..09f4b15b172682e6391c82ec6bd3ef6d1fe12142 Binary files /dev/null and b/Roll a Ball/Library/metadata/b6/b6e75d7f429a4e7e9e1ffb4f85cff49f differ diff --git a/Roll a Ball/Library/metadata/b6/b6e75d7f429a4e7e9e1ffb4f85cff49f.info b/Roll a Ball/Library/metadata/b6/b6e75d7f429a4e7e9e1ffb4f85cff49f.info new file mode 100644 index 0000000000000000000000000000000000000000..ee3b99c4c89248dfa2fe818f684c0c9153952ba3 Binary files /dev/null and b/Roll a Ball/Library/metadata/b6/b6e75d7f429a4e7e9e1ffb4f85cff49f.info differ diff --git a/Roll a Ball/Library/metadata/b7/b77b1ad9c05af0412725856c6c53b037 b/Roll a Ball/Library/metadata/b7/b77b1ad9c05af0412725856c6c53b037 new file mode 100644 index 0000000000000000000000000000000000000000..d8e38242236b0560b0cd15976ad2499b5630fc4e Binary files /dev/null and b/Roll a Ball/Library/metadata/b7/b77b1ad9c05af0412725856c6c53b037 differ diff --git a/Roll a Ball/Library/metadata/b7/b77b1ad9c05af0412725856c6c53b037.info b/Roll a Ball/Library/metadata/b7/b77b1ad9c05af0412725856c6c53b037.info new file mode 100644 index 0000000000000000000000000000000000000000..357cb88345427e94c9fa6f879add73d0f0bf8459 Binary files /dev/null and b/Roll a Ball/Library/metadata/b7/b77b1ad9c05af0412725856c6c53b037.info differ diff --git a/Roll a Ball/Library/metadata/b7/b7c10e584b708734ba6141e7d4797931 b/Roll a Ball/Library/metadata/b7/b7c10e584b708734ba6141e7d4797931 new file mode 100644 index 0000000000000000000000000000000000000000..2671bd782af37acb43fa5ca3da3ce29e7c82f2a7 Binary files /dev/null and b/Roll a Ball/Library/metadata/b7/b7c10e584b708734ba6141e7d4797931 differ diff --git a/Roll a Ball/Library/metadata/b7/b7c10e584b708734ba6141e7d4797931.info b/Roll a Ball/Library/metadata/b7/b7c10e584b708734ba6141e7d4797931.info new file mode 100644 index 0000000000000000000000000000000000000000..c10435a645db74d5488daf903d91834b138bebd2 Binary files /dev/null and b/Roll a Ball/Library/metadata/b7/b7c10e584b708734ba6141e7d4797931.info differ diff --git a/Roll a Ball/Library/metadata/b7/b7e8a8fb69eacee439474914ea54bf9b b/Roll a Ball/Library/metadata/b7/b7e8a8fb69eacee439474914ea54bf9b new file mode 100644 index 0000000000000000000000000000000000000000..181bf96c5939ea0ae157c877610ca716243269de Binary files /dev/null and b/Roll a Ball/Library/metadata/b7/b7e8a8fb69eacee439474914ea54bf9b differ diff --git a/Roll a Ball/Library/metadata/b7/b7e8a8fb69eacee439474914ea54bf9b.info b/Roll a Ball/Library/metadata/b7/b7e8a8fb69eacee439474914ea54bf9b.info new file mode 100644 index 0000000000000000000000000000000000000000..73e4f6d22f5aef43d35833985002d49616e79966 Binary files /dev/null and b/Roll a Ball/Library/metadata/b7/b7e8a8fb69eacee439474914ea54bf9b.info differ diff --git a/Roll a Ball/Library/metadata/b8/b83f06ac0c0696e9563230865ca72b81 b/Roll a Ball/Library/metadata/b8/b83f06ac0c0696e9563230865ca72b81 new file mode 100644 index 0000000000000000000000000000000000000000..133028044c6f860b5925f9710db6b9da986e0705 Binary files /dev/null and b/Roll a Ball/Library/metadata/b8/b83f06ac0c0696e9563230865ca72b81 differ diff --git a/Roll a Ball/Library/metadata/b8/b83f06ac0c0696e9563230865ca72b81.info b/Roll a Ball/Library/metadata/b8/b83f06ac0c0696e9563230865ca72b81.info new file mode 100644 index 0000000000000000000000000000000000000000..7916ac74a513e6ed007efefbcd3d14cab8a45c97 Binary files /dev/null and b/Roll a Ball/Library/metadata/b8/b83f06ac0c0696e9563230865ca72b81.info differ diff --git a/Roll a Ball/Library/metadata/b8/b8ecd0c93f4708542a22dde86bcc4421 b/Roll a Ball/Library/metadata/b8/b8ecd0c93f4708542a22dde86bcc4421 new file mode 100644 index 0000000000000000000000000000000000000000..513f6163bae187452f5570092a8c3a54c55a0854 Binary files /dev/null and b/Roll a Ball/Library/metadata/b8/b8ecd0c93f4708542a22dde86bcc4421 differ diff --git a/Roll a Ball/Library/metadata/b8/b8ecd0c93f4708542a22dde86bcc4421.info b/Roll a Ball/Library/metadata/b8/b8ecd0c93f4708542a22dde86bcc4421.info new file mode 100644 index 0000000000000000000000000000000000000000..d2069a59152ae4304e39b725775c57522f298de2 Binary files /dev/null and b/Roll a Ball/Library/metadata/b8/b8ecd0c93f4708542a22dde86bcc4421.info differ diff --git a/Roll a Ball/Library/metadata/b9/b9374526debed24449d75f8cc6d0103f b/Roll a Ball/Library/metadata/b9/b9374526debed24449d75f8cc6d0103f new file mode 100644 index 0000000000000000000000000000000000000000..7c1e1f8c1eb9578fbc61ff684c741289ec1c2797 Binary files /dev/null and b/Roll a Ball/Library/metadata/b9/b9374526debed24449d75f8cc6d0103f differ diff --git a/Roll a Ball/Library/metadata/b9/b9374526debed24449d75f8cc6d0103f.info b/Roll a Ball/Library/metadata/b9/b9374526debed24449d75f8cc6d0103f.info new file mode 100644 index 0000000000000000000000000000000000000000..ac223d2544815e88af4d3fb978153f716fa8ad7a Binary files /dev/null and b/Roll a Ball/Library/metadata/b9/b9374526debed24449d75f8cc6d0103f.info differ diff --git a/Roll a Ball/Library/metadata/b9/b95ab00277ee47c687d710a3bb623d0a b/Roll a Ball/Library/metadata/b9/b95ab00277ee47c687d710a3bb623d0a new file mode 100644 index 0000000000000000000000000000000000000000..37a8904c3acfe6f913ccbc54847c0464fa4f815f Binary files /dev/null and b/Roll a Ball/Library/metadata/b9/b95ab00277ee47c687d710a3bb623d0a differ diff --git a/Roll a Ball/Library/metadata/b9/b95ab00277ee47c687d710a3bb623d0a.info b/Roll a Ball/Library/metadata/b9/b95ab00277ee47c687d710a3bb623d0a.info new file mode 100644 index 0000000000000000000000000000000000000000..34b7f2af95c0a4781435d68b4c7a9e406eaa9458 Binary files /dev/null and b/Roll a Ball/Library/metadata/b9/b95ab00277ee47c687d710a3bb623d0a.info differ diff --git a/Roll a Ball/Library/metadata/b9/b9f324f08cd904ec986357c98dd9eaa6 b/Roll a Ball/Library/metadata/b9/b9f324f08cd904ec986357c98dd9eaa6 new file mode 100644 index 0000000000000000000000000000000000000000..d2afb3d5eeae767d68f4172a2ab24c1557b9187a Binary files /dev/null and b/Roll a Ball/Library/metadata/b9/b9f324f08cd904ec986357c98dd9eaa6 differ diff --git a/Roll a Ball/Library/metadata/b9/b9f324f08cd904ec986357c98dd9eaa6.info b/Roll a Ball/Library/metadata/b9/b9f324f08cd904ec986357c98dd9eaa6.info new file mode 100644 index 0000000000000000000000000000000000000000..35f031210331bac9052ac1e6bca9e6c1a8548ad3 Binary files /dev/null and b/Roll a Ball/Library/metadata/b9/b9f324f08cd904ec986357c98dd9eaa6.info differ diff --git a/Roll a Ball/Library/metadata/ba/bac185a28e198c1419b649ca946942ea b/Roll a Ball/Library/metadata/ba/bac185a28e198c1419b649ca946942ea new file mode 100644 index 0000000000000000000000000000000000000000..815adafdcdea3afe2e1463526e15211c9a7e5ad4 Binary files /dev/null and b/Roll a Ball/Library/metadata/ba/bac185a28e198c1419b649ca946942ea differ diff --git a/Roll a Ball/Library/metadata/ba/bac185a28e198c1419b649ca946942ea.info b/Roll a Ball/Library/metadata/ba/bac185a28e198c1419b649ca946942ea.info new file mode 100644 index 0000000000000000000000000000000000000000..19dc1ad17cc4042176ed7d1b7ed3fbd5687fe97f Binary files /dev/null and b/Roll a Ball/Library/metadata/ba/bac185a28e198c1419b649ca946942ea.info differ diff --git a/Roll a Ball/Library/metadata/bb/bb05cab7d802aa5468f8f2f86840d984 b/Roll a Ball/Library/metadata/bb/bb05cab7d802aa5468f8f2f86840d984 new file mode 100644 index 0000000000000000000000000000000000000000..43e7fda39b50ee57f2c90461e7d3eebce69915d8 Binary files /dev/null and b/Roll a Ball/Library/metadata/bb/bb05cab7d802aa5468f8f2f86840d984 differ diff --git a/Roll a Ball/Library/metadata/bb/bb05cab7d802aa5468f8f2f86840d984.info b/Roll a Ball/Library/metadata/bb/bb05cab7d802aa5468f8f2f86840d984.info new file mode 100644 index 0000000000000000000000000000000000000000..7fcd260346d0c601e82b3f5e8ad09e49dedbea0c Binary files /dev/null and b/Roll a Ball/Library/metadata/bb/bb05cab7d802aa5468f8f2f86840d984.info differ diff --git a/Roll a Ball/Library/metadata/bb/bb15697a279504a90b825c44dc355047 b/Roll a Ball/Library/metadata/bb/bb15697a279504a90b825c44dc355047 new file mode 100644 index 0000000000000000000000000000000000000000..6a6823dbff6f86c2fdc973fd0248bdb715719dfb Binary files /dev/null and b/Roll a Ball/Library/metadata/bb/bb15697a279504a90b825c44dc355047 differ diff --git a/Roll a Ball/Library/metadata/bb/bb15697a279504a90b825c44dc355047.info b/Roll a Ball/Library/metadata/bb/bb15697a279504a90b825c44dc355047.info new file mode 100644 index 0000000000000000000000000000000000000000..24631541770ceaf4a37369fb820b447f26060a69 Binary files /dev/null and b/Roll a Ball/Library/metadata/bb/bb15697a279504a90b825c44dc355047.info differ diff --git a/Roll a Ball/Library/metadata/bb/bb42b2d967d6427983c901a4ffc8ecd9 b/Roll a Ball/Library/metadata/bb/bb42b2d967d6427983c901a4ffc8ecd9 new file mode 100644 index 0000000000000000000000000000000000000000..eb4d0dfd5e61981ccff05d8eff247c8abec264ae Binary files /dev/null and b/Roll a Ball/Library/metadata/bb/bb42b2d967d6427983c901a4ffc8ecd9 differ diff --git a/Roll a Ball/Library/metadata/bb/bb42b2d967d6427983c901a4ffc8ecd9.info b/Roll a Ball/Library/metadata/bb/bb42b2d967d6427983c901a4ffc8ecd9.info new file mode 100644 index 0000000000000000000000000000000000000000..663cedebb9b238c3556b5d9eb8d73e1f6671eaa4 Binary files /dev/null and b/Roll a Ball/Library/metadata/bb/bb42b2d967d6427983c901a4ffc8ecd9.info differ diff --git a/Roll a Ball/Library/metadata/bb/bbec1324b05a54939ad2fea2d7e11063 b/Roll a Ball/Library/metadata/bb/bbec1324b05a54939ad2fea2d7e11063 new file mode 100644 index 0000000000000000000000000000000000000000..ddc3a2e8e96ae8884c7d02b1a97769b05b0a67c5 Binary files /dev/null and b/Roll a Ball/Library/metadata/bb/bbec1324b05a54939ad2fea2d7e11063 differ diff --git a/Roll a Ball/Library/metadata/bb/bbec1324b05a54939ad2fea2d7e11063.info b/Roll a Ball/Library/metadata/bb/bbec1324b05a54939ad2fea2d7e11063.info new file mode 100644 index 0000000000000000000000000000000000000000..31004f06c05c54090beed65b72cc358419230705 Binary files /dev/null and b/Roll a Ball/Library/metadata/bb/bbec1324b05a54939ad2fea2d7e11063.info differ diff --git a/Roll a Ball/Library/metadata/bc/bc00e25696e4132499f56528d3fed2e3 b/Roll a Ball/Library/metadata/bc/bc00e25696e4132499f56528d3fed2e3 new file mode 100644 index 0000000000000000000000000000000000000000..1046cf671ee4bffb3585f194d5e14acebd742643 Binary files /dev/null and b/Roll a Ball/Library/metadata/bc/bc00e25696e4132499f56528d3fed2e3 differ diff --git a/Roll a Ball/Library/metadata/bc/bc00e25696e4132499f56528d3fed2e3.info b/Roll a Ball/Library/metadata/bc/bc00e25696e4132499f56528d3fed2e3.info new file mode 100644 index 0000000000000000000000000000000000000000..b0254bb649e8ee119b0f2da1889beb472f7d0655 Binary files /dev/null and b/Roll a Ball/Library/metadata/bc/bc00e25696e4132499f56528d3fed2e3.info differ diff --git a/Roll a Ball/Library/metadata/bc/bcd27da1c9ae94d2cafe094482a20792 b/Roll a Ball/Library/metadata/bc/bcd27da1c9ae94d2cafe094482a20792 new file mode 100644 index 0000000000000000000000000000000000000000..11f6c2df8f60354e028140fab828df8582bc3ef6 Binary files /dev/null and b/Roll a Ball/Library/metadata/bc/bcd27da1c9ae94d2cafe094482a20792 differ diff --git a/Roll a Ball/Library/metadata/bc/bcd27da1c9ae94d2cafe094482a20792.info b/Roll a Ball/Library/metadata/bc/bcd27da1c9ae94d2cafe094482a20792.info new file mode 100644 index 0000000000000000000000000000000000000000..c4322a937acfb1f41f41abdde13c746b0a57ca19 Binary files /dev/null and b/Roll a Ball/Library/metadata/bc/bcd27da1c9ae94d2cafe094482a20792.info differ diff --git a/Roll a Ball/Library/metadata/bd/bdb9800e7f8ad874d81a3d32ea20c370 b/Roll a Ball/Library/metadata/bd/bdb9800e7f8ad874d81a3d32ea20c370 new file mode 100644 index 0000000000000000000000000000000000000000..363712f36b11a889bf5d40c566694fda200c831f Binary files /dev/null and b/Roll a Ball/Library/metadata/bd/bdb9800e7f8ad874d81a3d32ea20c370 differ diff --git a/Roll a Ball/Library/metadata/bd/bdb9800e7f8ad874d81a3d32ea20c370.info b/Roll a Ball/Library/metadata/bd/bdb9800e7f8ad874d81a3d32ea20c370.info new file mode 100644 index 0000000000000000000000000000000000000000..236bd8dc596b0f45d4584e32efaa32cdd701780b Binary files /dev/null and b/Roll a Ball/Library/metadata/bd/bdb9800e7f8ad874d81a3d32ea20c370.info differ diff --git a/Roll a Ball/Library/metadata/be/be4b06d1ee51e4ac2a01a0e499d4c214 b/Roll a Ball/Library/metadata/be/be4b06d1ee51e4ac2a01a0e499d4c214 new file mode 100644 index 0000000000000000000000000000000000000000..e436f34b02a42ae78d56dd2db8b44832c132d861 Binary files /dev/null and b/Roll a Ball/Library/metadata/be/be4b06d1ee51e4ac2a01a0e499d4c214 differ diff --git a/Roll a Ball/Library/metadata/be/be4b06d1ee51e4ac2a01a0e499d4c214.info b/Roll a Ball/Library/metadata/be/be4b06d1ee51e4ac2a01a0e499d4c214.info new file mode 100644 index 0000000000000000000000000000000000000000..5bab1d222917f3e25287c7b3c3368d7642037cab Binary files /dev/null and b/Roll a Ball/Library/metadata/be/be4b06d1ee51e4ac2a01a0e499d4c214.info differ diff --git a/Roll a Ball/Library/metadata/bf/bfd567a3d1631a761bca9e99fa53d86d b/Roll a Ball/Library/metadata/bf/bfd567a3d1631a761bca9e99fa53d86d new file mode 100644 index 0000000000000000000000000000000000000000..7e13b743ac15246b1def9420d9ebae41527a70b2 Binary files /dev/null and b/Roll a Ball/Library/metadata/bf/bfd567a3d1631a761bca9e99fa53d86d differ diff --git a/Roll a Ball/Library/metadata/bf/bfd567a3d1631a761bca9e99fa53d86d.info b/Roll a Ball/Library/metadata/bf/bfd567a3d1631a761bca9e99fa53d86d.info new file mode 100644 index 0000000000000000000000000000000000000000..40b5c1bbef779a13204cc4b208e7c8d17f6e6643 Binary files /dev/null and b/Roll a Ball/Library/metadata/bf/bfd567a3d1631a761bca9e99fa53d86d.info differ diff --git a/Roll a Ball/Library/metadata/bf/bfd715cd54ab84c22b128149c12b516c b/Roll a Ball/Library/metadata/bf/bfd715cd54ab84c22b128149c12b516c new file mode 100644 index 0000000000000000000000000000000000000000..d1550cd134e5f0f2be9212583e9d1672c0b0eb23 Binary files /dev/null and b/Roll a Ball/Library/metadata/bf/bfd715cd54ab84c22b128149c12b516c differ diff --git a/Roll a Ball/Library/metadata/bf/bfd715cd54ab84c22b128149c12b516c.info b/Roll a Ball/Library/metadata/bf/bfd715cd54ab84c22b128149c12b516c.info new file mode 100644 index 0000000000000000000000000000000000000000..4e43ed428739c906825f27ff931f965259743fa0 Binary files /dev/null and b/Roll a Ball/Library/metadata/bf/bfd715cd54ab84c22b128149c12b516c.info differ diff --git a/Roll a Ball/Library/metadata/bf/bff25ea4cf0d3d841b6787b9f649f21b b/Roll a Ball/Library/metadata/bf/bff25ea4cf0d3d841b6787b9f649f21b new file mode 100644 index 0000000000000000000000000000000000000000..3f6928fa131dc4b54f307006640e29dbabe37e5e Binary files /dev/null and b/Roll a Ball/Library/metadata/bf/bff25ea4cf0d3d841b6787b9f649f21b differ diff --git a/Roll a Ball/Library/metadata/bf/bff25ea4cf0d3d841b6787b9f649f21b.info b/Roll a Ball/Library/metadata/bf/bff25ea4cf0d3d841b6787b9f649f21b.info new file mode 100644 index 0000000000000000000000000000000000000000..816016db1353b1eb720c64414250fcb3c26a4497 Binary files /dev/null and b/Roll a Ball/Library/metadata/bf/bff25ea4cf0d3d841b6787b9f649f21b.info differ diff --git a/Roll a Ball/Library/metadata/c0/c060426bfd6e82575228df6656368eaa b/Roll a Ball/Library/metadata/c0/c060426bfd6e82575228df6656368eaa new file mode 100644 index 0000000000000000000000000000000000000000..0546597eca7cf53f64665179f42488725389bb91 Binary files /dev/null and b/Roll a Ball/Library/metadata/c0/c060426bfd6e82575228df6656368eaa differ diff --git a/Roll a Ball/Library/metadata/c0/c060426bfd6e82575228df6656368eaa.info b/Roll a Ball/Library/metadata/c0/c060426bfd6e82575228df6656368eaa.info new file mode 100644 index 0000000000000000000000000000000000000000..7e2f80725d8be26568e8300e2090e2cbcac4964e Binary files /dev/null and b/Roll a Ball/Library/metadata/c0/c060426bfd6e82575228df6656368eaa.info differ diff --git a/Roll a Ball/Library/metadata/c0/c09652e660b34484cb10d35ed2206df5 b/Roll a Ball/Library/metadata/c0/c09652e660b34484cb10d35ed2206df5 new file mode 100644 index 0000000000000000000000000000000000000000..5d4571bec401ba8cf3d20026f5bc5a7f26b12aab Binary files /dev/null and b/Roll a Ball/Library/metadata/c0/c09652e660b34484cb10d35ed2206df5 differ diff --git a/Roll a Ball/Library/metadata/c0/c09652e660b34484cb10d35ed2206df5.info b/Roll a Ball/Library/metadata/c0/c09652e660b34484cb10d35ed2206df5.info new file mode 100644 index 0000000000000000000000000000000000000000..4d2d106a778ed1a7060e60be1667c2acd4b6872c Binary files /dev/null and b/Roll a Ball/Library/metadata/c0/c09652e660b34484cb10d35ed2206df5.info differ diff --git a/Roll a Ball/Library/metadata/c1/c1615df4b22758c48b07b9ca96c5aab7 b/Roll a Ball/Library/metadata/c1/c1615df4b22758c48b07b9ca96c5aab7 new file mode 100644 index 0000000000000000000000000000000000000000..5b286ebe770307a70c9f72c8e88c925c73b3ee1e Binary files /dev/null and b/Roll a Ball/Library/metadata/c1/c1615df4b22758c48b07b9ca96c5aab7 differ diff --git a/Roll a Ball/Library/metadata/c1/c1615df4b22758c48b07b9ca96c5aab7.info b/Roll a Ball/Library/metadata/c1/c1615df4b22758c48b07b9ca96c5aab7.info new file mode 100644 index 0000000000000000000000000000000000000000..e660cc268d58b16006ef7c0aa20f2e85157bcf59 Binary files /dev/null and b/Roll a Ball/Library/metadata/c1/c1615df4b22758c48b07b9ca96c5aab7.info differ diff --git a/Roll a Ball/Library/metadata/c1/c18cb9388313e4287ad5895ee735c47d b/Roll a Ball/Library/metadata/c1/c18cb9388313e4287ad5895ee735c47d new file mode 100644 index 0000000000000000000000000000000000000000..5e96974d9bc8fea137f1284239863aaf2950b788 Binary files /dev/null and b/Roll a Ball/Library/metadata/c1/c18cb9388313e4287ad5895ee735c47d differ diff --git a/Roll a Ball/Library/metadata/c1/c18cb9388313e4287ad5895ee735c47d.info b/Roll a Ball/Library/metadata/c1/c18cb9388313e4287ad5895ee735c47d.info new file mode 100644 index 0000000000000000000000000000000000000000..fa7ba8c2a890076f7885fd3b1bbf947b6bc63c4d Binary files /dev/null and b/Roll a Ball/Library/metadata/c1/c18cb9388313e4287ad5895ee735c47d.info differ diff --git a/Roll a Ball/Library/metadata/c2/c2f7f6a88b4c4f20a53deb72f3d9144c b/Roll a Ball/Library/metadata/c2/c2f7f6a88b4c4f20a53deb72f3d9144c new file mode 100644 index 0000000000000000000000000000000000000000..80670274c8d83a43c50c50f472778e3426b284ff Binary files /dev/null and b/Roll a Ball/Library/metadata/c2/c2f7f6a88b4c4f20a53deb72f3d9144c differ diff --git a/Roll a Ball/Library/metadata/c2/c2f7f6a88b4c4f20a53deb72f3d9144c.info b/Roll a Ball/Library/metadata/c2/c2f7f6a88b4c4f20a53deb72f3d9144c.info new file mode 100644 index 0000000000000000000000000000000000000000..7c08a9f616b01e6a3bef6a9df5dc7d224eb84f88 Binary files /dev/null and b/Roll a Ball/Library/metadata/c2/c2f7f6a88b4c4f20a53deb72f3d9144c.info differ diff --git a/Roll a Ball/Library/metadata/c4/c4777500b5da6094e956c3d4f04de4db b/Roll a Ball/Library/metadata/c4/c4777500b5da6094e956c3d4f04de4db new file mode 100644 index 0000000000000000000000000000000000000000..c3f179f4be7a0089f7d5b98af1070f6426217d2c Binary files /dev/null and b/Roll a Ball/Library/metadata/c4/c4777500b5da6094e956c3d4f04de4db differ diff --git a/Roll a Ball/Library/metadata/c4/c4777500b5da6094e956c3d4f04de4db.info b/Roll a Ball/Library/metadata/c4/c4777500b5da6094e956c3d4f04de4db.info new file mode 100644 index 0000000000000000000000000000000000000000..0fbfaab025d2dbbfdc8e508f1d9f533cd53eeab4 Binary files /dev/null and b/Roll a Ball/Library/metadata/c4/c4777500b5da6094e956c3d4f04de4db.info differ diff --git a/Roll a Ball/Library/metadata/c4/c4c1445ee948a4124bfa9fb818a17e36 b/Roll a Ball/Library/metadata/c4/c4c1445ee948a4124bfa9fb818a17e36 new file mode 100644 index 0000000000000000000000000000000000000000..abb0d8a93ab2cf332eb7bc030cf82af30b706290 Binary files /dev/null and b/Roll a Ball/Library/metadata/c4/c4c1445ee948a4124bfa9fb818a17e36 differ diff --git a/Roll a Ball/Library/metadata/c4/c4c1445ee948a4124bfa9fb818a17e36.info b/Roll a Ball/Library/metadata/c4/c4c1445ee948a4124bfa9fb818a17e36.info new file mode 100644 index 0000000000000000000000000000000000000000..96c7abf30c06109f0aa03603f349ca878a8d2907 Binary files /dev/null and b/Roll a Ball/Library/metadata/c4/c4c1445ee948a4124bfa9fb818a17e36.info differ diff --git a/Roll a Ball/Library/metadata/c4/c4df1124e2787ee0c8d1a911de17ee73 b/Roll a Ball/Library/metadata/c4/c4df1124e2787ee0c8d1a911de17ee73 new file mode 100644 index 0000000000000000000000000000000000000000..9655650e2028d26e3efb228e6271ba590ceb29d9 Binary files /dev/null and b/Roll a Ball/Library/metadata/c4/c4df1124e2787ee0c8d1a911de17ee73 differ diff --git a/Roll a Ball/Library/metadata/c4/c4df1124e2787ee0c8d1a911de17ee73.info b/Roll a Ball/Library/metadata/c4/c4df1124e2787ee0c8d1a911de17ee73.info new file mode 100644 index 0000000000000000000000000000000000000000..21366871ff05b31aacdc7a76c0c7ecc5c5aa4034 Binary files /dev/null and b/Roll a Ball/Library/metadata/c4/c4df1124e2787ee0c8d1a911de17ee73.info differ diff --git a/Roll a Ball/Library/metadata/c5/c522a644a29fcab2eaf63298c118a65b b/Roll a Ball/Library/metadata/c5/c522a644a29fcab2eaf63298c118a65b new file mode 100644 index 0000000000000000000000000000000000000000..1a8b4209c5eb007859b2635d07f9a0115e0131bc Binary files /dev/null and b/Roll a Ball/Library/metadata/c5/c522a644a29fcab2eaf63298c118a65b differ diff --git a/Roll a Ball/Library/metadata/c5/c522a644a29fcab2eaf63298c118a65b.info b/Roll a Ball/Library/metadata/c5/c522a644a29fcab2eaf63298c118a65b.info new file mode 100644 index 0000000000000000000000000000000000000000..f059ac953441254b232381c078be77e47adb8dbf Binary files /dev/null and b/Roll a Ball/Library/metadata/c5/c522a644a29fcab2eaf63298c118a65b.info differ diff --git a/Roll a Ball/Library/metadata/c5/c55a64c7570474f47a94abe39ebfef04 b/Roll a Ball/Library/metadata/c5/c55a64c7570474f47a94abe39ebfef04 new file mode 100644 index 0000000000000000000000000000000000000000..a4cadbde293b08b476166794a5454bdcd2bafa15 Binary files /dev/null and b/Roll a Ball/Library/metadata/c5/c55a64c7570474f47a94abe39ebfef04 differ diff --git a/Roll a Ball/Library/metadata/c5/c55a64c7570474f47a94abe39ebfef04.info b/Roll a Ball/Library/metadata/c5/c55a64c7570474f47a94abe39ebfef04.info new file mode 100644 index 0000000000000000000000000000000000000000..df6371fbdf21eb56e889dbd0132eef8022308087 Binary files /dev/null and b/Roll a Ball/Library/metadata/c5/c55a64c7570474f47a94abe39ebfef04.info differ diff --git a/Roll a Ball/Library/metadata/c5/c5ba7626a737840ff88a3bd84b100482 b/Roll a Ball/Library/metadata/c5/c5ba7626a737840ff88a3bd84b100482 new file mode 100644 index 0000000000000000000000000000000000000000..70d16fe1e2519f74781b78274b51a328ac43401f Binary files /dev/null and b/Roll a Ball/Library/metadata/c5/c5ba7626a737840ff88a3bd84b100482 differ diff --git a/Roll a Ball/Library/metadata/c5/c5ba7626a737840ff88a3bd84b100482.info b/Roll a Ball/Library/metadata/c5/c5ba7626a737840ff88a3bd84b100482.info new file mode 100644 index 0000000000000000000000000000000000000000..ffe989dd5ddc181a319ef204df964d8e22a0f463 Binary files /dev/null and b/Roll a Ball/Library/metadata/c5/c5ba7626a737840ff88a3bd84b100482.info differ diff --git a/Roll a Ball/Library/metadata/c6/c68ba5b432ef64e67ae0bf74960908a8 b/Roll a Ball/Library/metadata/c6/c68ba5b432ef64e67ae0bf74960908a8 new file mode 100644 index 0000000000000000000000000000000000000000..ab0c26c8226f62dc768d4571e52da18cd670678a Binary files /dev/null and b/Roll a Ball/Library/metadata/c6/c68ba5b432ef64e67ae0bf74960908a8 differ diff --git a/Roll a Ball/Library/metadata/c6/c68ba5b432ef64e67ae0bf74960908a8.info b/Roll a Ball/Library/metadata/c6/c68ba5b432ef64e67ae0bf74960908a8.info new file mode 100644 index 0000000000000000000000000000000000000000..ae47c17dc27061f69fef0f88f1795291e9bac167 Binary files /dev/null and b/Roll a Ball/Library/metadata/c6/c68ba5b432ef64e67ae0bf74960908a8.info differ diff --git a/Roll a Ball/Library/metadata/c7/c754112a02f354a6696fa4f2b99e95a5 b/Roll a Ball/Library/metadata/c7/c754112a02f354a6696fa4f2b99e95a5 new file mode 100644 index 0000000000000000000000000000000000000000..fa68d612a3a210276b62f84ccd3410113c51c042 Binary files /dev/null and b/Roll a Ball/Library/metadata/c7/c754112a02f354a6696fa4f2b99e95a5 differ diff --git a/Roll a Ball/Library/metadata/c7/c754112a02f354a6696fa4f2b99e95a5.info b/Roll a Ball/Library/metadata/c7/c754112a02f354a6696fa4f2b99e95a5.info new file mode 100644 index 0000000000000000000000000000000000000000..ede4e66650849ff82f5f3b3dfdf1f27fea9315c0 Binary files /dev/null and b/Roll a Ball/Library/metadata/c7/c754112a02f354a6696fa4f2b99e95a5.info differ diff --git a/Roll a Ball/Library/metadata/c7/c7559cdbc33f04af1a5a42d2aa5b40a5 b/Roll a Ball/Library/metadata/c7/c7559cdbc33f04af1a5a42d2aa5b40a5 new file mode 100644 index 0000000000000000000000000000000000000000..10e43f4b119d52e1a6a34278902c76c04fe8127d Binary files /dev/null and b/Roll a Ball/Library/metadata/c7/c7559cdbc33f04af1a5a42d2aa5b40a5 differ diff --git a/Roll a Ball/Library/metadata/c7/c7559cdbc33f04af1a5a42d2aa5b40a5.info b/Roll a Ball/Library/metadata/c7/c7559cdbc33f04af1a5a42d2aa5b40a5.info new file mode 100644 index 0000000000000000000000000000000000000000..44da15a9314198144affca88d3a96c526aed1075 Binary files /dev/null and b/Roll a Ball/Library/metadata/c7/c7559cdbc33f04af1a5a42d2aa5b40a5.info differ diff --git a/Roll a Ball/Library/metadata/c7/c76700ea0062413d9f69409b4e9e151b b/Roll a Ball/Library/metadata/c7/c76700ea0062413d9f69409b4e9e151b new file mode 100644 index 0000000000000000000000000000000000000000..75378ae0bff142a53a01d966b32184d171af4405 Binary files /dev/null and b/Roll a Ball/Library/metadata/c7/c76700ea0062413d9f69409b4e9e151b differ diff --git a/Roll a Ball/Library/metadata/c7/c76700ea0062413d9f69409b4e9e151b.info b/Roll a Ball/Library/metadata/c7/c76700ea0062413d9f69409b4e9e151b.info new file mode 100644 index 0000000000000000000000000000000000000000..16a41feda7ec3b47f147c467166ed6f88c226d1b Binary files /dev/null and b/Roll a Ball/Library/metadata/c7/c76700ea0062413d9f69409b4e9e151b.info differ diff --git a/Roll a Ball/Library/metadata/c7/c786248494be6489bbfa006bdf59c773 b/Roll a Ball/Library/metadata/c7/c786248494be6489bbfa006bdf59c773 new file mode 100644 index 0000000000000000000000000000000000000000..42932b4de66b76b789d92a42f8545911fef963ab Binary files /dev/null and b/Roll a Ball/Library/metadata/c7/c786248494be6489bbfa006bdf59c773 differ diff --git a/Roll a Ball/Library/metadata/c7/c786248494be6489bbfa006bdf59c773.info b/Roll a Ball/Library/metadata/c7/c786248494be6489bbfa006bdf59c773.info new file mode 100644 index 0000000000000000000000000000000000000000..c92e109c67e8088fafdf875175b1aa11d98cafaa Binary files /dev/null and b/Roll a Ball/Library/metadata/c7/c786248494be6489bbfa006bdf59c773.info differ diff --git a/Roll a Ball/Library/metadata/c9/c99bfe4fc4e5c4dc3917c14075acd117 b/Roll a Ball/Library/metadata/c9/c99bfe4fc4e5c4dc3917c14075acd117 new file mode 100644 index 0000000000000000000000000000000000000000..4a9636c7b4bed049aa88c4c6b99239f07b4ca05f Binary files /dev/null and b/Roll a Ball/Library/metadata/c9/c99bfe4fc4e5c4dc3917c14075acd117 differ diff --git a/Roll a Ball/Library/metadata/c9/c99bfe4fc4e5c4dc3917c14075acd117.info b/Roll a Ball/Library/metadata/c9/c99bfe4fc4e5c4dc3917c14075acd117.info new file mode 100644 index 0000000000000000000000000000000000000000..757fcf48eed28c586a03909f7283874118f97338 Binary files /dev/null and b/Roll a Ball/Library/metadata/c9/c99bfe4fc4e5c4dc3917c14075acd117.info differ diff --git a/Roll a Ball/Library/metadata/ca/ca51b19024094d1b87f3e07edb0a75fb b/Roll a Ball/Library/metadata/ca/ca51b19024094d1b87f3e07edb0a75fb new file mode 100644 index 0000000000000000000000000000000000000000..1fa23e5401c71c039baa8598318c153d287d19d5 Binary files /dev/null and b/Roll a Ball/Library/metadata/ca/ca51b19024094d1b87f3e07edb0a75fb differ diff --git a/Roll a Ball/Library/metadata/ca/ca51b19024094d1b87f3e07edb0a75fb.info b/Roll a Ball/Library/metadata/ca/ca51b19024094d1b87f3e07edb0a75fb.info new file mode 100644 index 0000000000000000000000000000000000000000..32d81c8b435d5e54465dd0cbe45d91066a4fb053 Binary files /dev/null and b/Roll a Ball/Library/metadata/ca/ca51b19024094d1b87f3e07edb0a75fb.info differ diff --git a/Roll a Ball/Library/metadata/ca/ca53a6f1e29564d528bb56b92e0f181c b/Roll a Ball/Library/metadata/ca/ca53a6f1e29564d528bb56b92e0f181c new file mode 100644 index 0000000000000000000000000000000000000000..12d50a748b5807513d607f2959da1650110c1dd4 Binary files /dev/null and b/Roll a Ball/Library/metadata/ca/ca53a6f1e29564d528bb56b92e0f181c differ diff --git a/Roll a Ball/Library/metadata/ca/ca53a6f1e29564d528bb56b92e0f181c.info b/Roll a Ball/Library/metadata/ca/ca53a6f1e29564d528bb56b92e0f181c.info new file mode 100644 index 0000000000000000000000000000000000000000..6aea8e4302489c0c094839efb126379349139178 Binary files /dev/null and b/Roll a Ball/Library/metadata/ca/ca53a6f1e29564d528bb56b92e0f181c.info differ diff --git a/Roll a Ball/Library/metadata/ca/ca819640f53b48919bf7774744f7f15e b/Roll a Ball/Library/metadata/ca/ca819640f53b48919bf7774744f7f15e new file mode 100644 index 0000000000000000000000000000000000000000..dbc85ffdbf57bbe530457ad9aecfe2435710e0c7 Binary files /dev/null and b/Roll a Ball/Library/metadata/ca/ca819640f53b48919bf7774744f7f15e differ diff --git a/Roll a Ball/Library/metadata/ca/ca819640f53b48919bf7774744f7f15e.info b/Roll a Ball/Library/metadata/ca/ca819640f53b48919bf7774744f7f15e.info new file mode 100644 index 0000000000000000000000000000000000000000..ca25ca1e7a44eb89e82d0a455fcee7480412a39b Binary files /dev/null and b/Roll a Ball/Library/metadata/ca/ca819640f53b48919bf7774744f7f15e.info differ diff --git a/Roll a Ball/Library/metadata/ca/cabaa672b0e3ee91fa7b6da4daab7970 b/Roll a Ball/Library/metadata/ca/cabaa672b0e3ee91fa7b6da4daab7970 new file mode 100644 index 0000000000000000000000000000000000000000..917758db8a85f25286dd54e2adbe0a2f2e036f25 Binary files /dev/null and b/Roll a Ball/Library/metadata/ca/cabaa672b0e3ee91fa7b6da4daab7970 differ diff --git a/Roll a Ball/Library/metadata/ca/cabaa672b0e3ee91fa7b6da4daab7970.info b/Roll a Ball/Library/metadata/ca/cabaa672b0e3ee91fa7b6da4daab7970.info new file mode 100644 index 0000000000000000000000000000000000000000..ffca3d55af42a67d72a54768c598c9b87306b7f1 Binary files /dev/null and b/Roll a Ball/Library/metadata/ca/cabaa672b0e3ee91fa7b6da4daab7970.info differ diff --git a/Roll a Ball/Library/metadata/cc/cc16b487af8ff9c4898d48ae2f4a5b30 b/Roll a Ball/Library/metadata/cc/cc16b487af8ff9c4898d48ae2f4a5b30 new file mode 100644 index 0000000000000000000000000000000000000000..1d3e9ee67b463b5aba3f8c64c47b68829b9d0a2c Binary files /dev/null and b/Roll a Ball/Library/metadata/cc/cc16b487af8ff9c4898d48ae2f4a5b30 differ diff --git a/Roll a Ball/Library/metadata/cc/cc16b487af8ff9c4898d48ae2f4a5b30.info b/Roll a Ball/Library/metadata/cc/cc16b487af8ff9c4898d48ae2f4a5b30.info new file mode 100644 index 0000000000000000000000000000000000000000..9c5f01267aa2c8516726171ab7d9f5e28f0425b5 Binary files /dev/null and b/Roll a Ball/Library/metadata/cc/cc16b487af8ff9c4898d48ae2f4a5b30.info differ diff --git a/Roll a Ball/Library/metadata/cc/cc1b50b5501f748da8bec762294d9136 b/Roll a Ball/Library/metadata/cc/cc1b50b5501f748da8bec762294d9136 new file mode 100644 index 0000000000000000000000000000000000000000..49f733a405ab136836ca2981ce20e8e9032655d6 Binary files /dev/null and b/Roll a Ball/Library/metadata/cc/cc1b50b5501f748da8bec762294d9136 differ diff --git a/Roll a Ball/Library/metadata/cc/cc1b50b5501f748da8bec762294d9136.info b/Roll a Ball/Library/metadata/cc/cc1b50b5501f748da8bec762294d9136.info new file mode 100644 index 0000000000000000000000000000000000000000..18ed86df061414fd9c12fcc558a5d422d8d223d9 Binary files /dev/null and b/Roll a Ball/Library/metadata/cc/cc1b50b5501f748da8bec762294d9136.info differ diff --git a/Roll a Ball/Library/metadata/cd/cd44c1bc0fa624a39aa784af44c62180 b/Roll a Ball/Library/metadata/cd/cd44c1bc0fa624a39aa784af44c62180 new file mode 100644 index 0000000000000000000000000000000000000000..09aa1886c828b177ac7b74dfd07f934cbe56fed7 Binary files /dev/null and b/Roll a Ball/Library/metadata/cd/cd44c1bc0fa624a39aa784af44c62180 differ diff --git a/Roll a Ball/Library/metadata/cd/cd44c1bc0fa624a39aa784af44c62180.info b/Roll a Ball/Library/metadata/cd/cd44c1bc0fa624a39aa784af44c62180.info new file mode 100644 index 0000000000000000000000000000000000000000..ce898e66dd8088470d4ccfa574ba9b4cb83a7054 Binary files /dev/null and b/Roll a Ball/Library/metadata/cd/cd44c1bc0fa624a39aa784af44c62180.info differ diff --git a/Roll a Ball/Library/metadata/ce/ce4395ccdb12cf62fca756358be1a892 b/Roll a Ball/Library/metadata/ce/ce4395ccdb12cf62fca756358be1a892 new file mode 100644 index 0000000000000000000000000000000000000000..98113fefb747ab97d808d3b59646206db1bad3b4 Binary files /dev/null and b/Roll a Ball/Library/metadata/ce/ce4395ccdb12cf62fca756358be1a892 differ diff --git a/Roll a Ball/Library/metadata/ce/ce4395ccdb12cf62fca756358be1a892.info b/Roll a Ball/Library/metadata/ce/ce4395ccdb12cf62fca756358be1a892.info new file mode 100644 index 0000000000000000000000000000000000000000..7d1e1334025ad152849c887e073d8b1564dfd251 Binary files /dev/null and b/Roll a Ball/Library/metadata/ce/ce4395ccdb12cf62fca756358be1a892.info differ diff --git a/Roll a Ball/Library/metadata/ce/ce4ec0f498d1b1a4f90fe94e115b6f9a b/Roll a Ball/Library/metadata/ce/ce4ec0f498d1b1a4f90fe94e115b6f9a new file mode 100644 index 0000000000000000000000000000000000000000..933a040855bc47a28a526eaa123781c02b6d69db Binary files /dev/null and b/Roll a Ball/Library/metadata/ce/ce4ec0f498d1b1a4f90fe94e115b6f9a differ diff --git a/Roll a Ball/Library/metadata/ce/ce4ec0f498d1b1a4f90fe94e115b6f9a.info b/Roll a Ball/Library/metadata/ce/ce4ec0f498d1b1a4f90fe94e115b6f9a.info new file mode 100644 index 0000000000000000000000000000000000000000..a255a8243f1291369065ee33ac7cafcf2a46bb2c Binary files /dev/null and b/Roll a Ball/Library/metadata/ce/ce4ec0f498d1b1a4f90fe94e115b6f9a.info differ diff --git a/Roll a Ball/Library/metadata/ce/ce4ff17ca867d2b48b5c8a4181611901 b/Roll a Ball/Library/metadata/ce/ce4ff17ca867d2b48b5c8a4181611901 new file mode 100644 index 0000000000000000000000000000000000000000..9ce39ce8361a85a00e4b70aeb06ff9dc7486bdb4 Binary files /dev/null and b/Roll a Ball/Library/metadata/ce/ce4ff17ca867d2b48b5c8a4181611901 differ diff --git a/Roll a Ball/Library/metadata/ce/ce4ff17ca867d2b48b5c8a4181611901.info b/Roll a Ball/Library/metadata/ce/ce4ff17ca867d2b48b5c8a4181611901.info new file mode 100644 index 0000000000000000000000000000000000000000..0cc6e500959a176c4f5ff77c6ebe0cea2797d3ca Binary files /dev/null and b/Roll a Ball/Library/metadata/ce/ce4ff17ca867d2b48b5c8a4181611901.info differ diff --git a/Roll a Ball/Library/metadata/cf/cf1fe50a641faac4691bf49eb32ce333 b/Roll a Ball/Library/metadata/cf/cf1fe50a641faac4691bf49eb32ce333 new file mode 100644 index 0000000000000000000000000000000000000000..c1c59d001186dcee3ba71a1f8822f477c8cb473d Binary files /dev/null and b/Roll a Ball/Library/metadata/cf/cf1fe50a641faac4691bf49eb32ce333 differ diff --git a/Roll a Ball/Library/metadata/cf/cf1fe50a641faac4691bf49eb32ce333.info b/Roll a Ball/Library/metadata/cf/cf1fe50a641faac4691bf49eb32ce333.info new file mode 100644 index 0000000000000000000000000000000000000000..281ec90199e7b35c242dee5d27bf61ca893b764c Binary files /dev/null and b/Roll a Ball/Library/metadata/cf/cf1fe50a641faac4691bf49eb32ce333.info differ diff --git a/Roll a Ball/Library/metadata/cf/cf6aca931950a4a6a886e214e9e649c4 b/Roll a Ball/Library/metadata/cf/cf6aca931950a4a6a886e214e9e649c4 new file mode 100644 index 0000000000000000000000000000000000000000..46b7868380861e77be00e31e36b693fe2819df85 Binary files /dev/null and b/Roll a Ball/Library/metadata/cf/cf6aca931950a4a6a886e214e9e649c4 differ diff --git a/Roll a Ball/Library/metadata/cf/cf6aca931950a4a6a886e214e9e649c4.info b/Roll a Ball/Library/metadata/cf/cf6aca931950a4a6a886e214e9e649c4.info new file mode 100644 index 0000000000000000000000000000000000000000..f4e894cb876ef3f993accbcfcf0aa395f45a87f9 Binary files /dev/null and b/Roll a Ball/Library/metadata/cf/cf6aca931950a4a6a886e214e9e649c4.info differ diff --git a/Roll a Ball/Library/metadata/d0/d028fbbad11524d13a069f495ddcf01c b/Roll a Ball/Library/metadata/d0/d028fbbad11524d13a069f495ddcf01c new file mode 100644 index 0000000000000000000000000000000000000000..bc6debc66c5dd320c59282006643d323b9fe5b85 Binary files /dev/null and b/Roll a Ball/Library/metadata/d0/d028fbbad11524d13a069f495ddcf01c differ diff --git a/Roll a Ball/Library/metadata/d0/d028fbbad11524d13a069f495ddcf01c.info b/Roll a Ball/Library/metadata/d0/d028fbbad11524d13a069f495ddcf01c.info new file mode 100644 index 0000000000000000000000000000000000000000..9a71af5f5e89f968ed4673716f450d295c956fc2 Binary files /dev/null and b/Roll a Ball/Library/metadata/d0/d028fbbad11524d13a069f495ddcf01c.info differ diff --git a/Roll a Ball/Library/metadata/d0/d0e3ad91972c66f5238f5b9b7d5ae58a b/Roll a Ball/Library/metadata/d0/d0e3ad91972c66f5238f5b9b7d5ae58a new file mode 100644 index 0000000000000000000000000000000000000000..a4a8cc939c835df074c426fce59117919bf594df Binary files /dev/null and b/Roll a Ball/Library/metadata/d0/d0e3ad91972c66f5238f5b9b7d5ae58a differ diff --git a/Roll a Ball/Library/metadata/d0/d0e3ad91972c66f5238f5b9b7d5ae58a.info b/Roll a Ball/Library/metadata/d0/d0e3ad91972c66f5238f5b9b7d5ae58a.info new file mode 100644 index 0000000000000000000000000000000000000000..bd700f07bd44b22075fcd2d8a6ec3dd04a531c18 Binary files /dev/null and b/Roll a Ball/Library/metadata/d0/d0e3ad91972c66f5238f5b9b7d5ae58a.info differ diff --git a/Roll a Ball/Library/metadata/d1/d1114812d620342e1a4ad3eaae7e220c b/Roll a Ball/Library/metadata/d1/d1114812d620342e1a4ad3eaae7e220c new file mode 100644 index 0000000000000000000000000000000000000000..a26dc243664289624d71f202aabdbe2507ac5182 Binary files /dev/null and b/Roll a Ball/Library/metadata/d1/d1114812d620342e1a4ad3eaae7e220c differ diff --git a/Roll a Ball/Library/metadata/d1/d1114812d620342e1a4ad3eaae7e220c.info b/Roll a Ball/Library/metadata/d1/d1114812d620342e1a4ad3eaae7e220c.info new file mode 100644 index 0000000000000000000000000000000000000000..2c851bbf2a06cf1d1816c1421b5d17b98f3596be Binary files /dev/null and b/Roll a Ball/Library/metadata/d1/d1114812d620342e1a4ad3eaae7e220c.info differ diff --git a/Roll a Ball/Library/metadata/d1/d1a0a27327b54c3bac52a08929c33f81 b/Roll a Ball/Library/metadata/d1/d1a0a27327b54c3bac52a08929c33f81 new file mode 100644 index 0000000000000000000000000000000000000000..21c7011cbe0316bf2488f13e34c6e673bd0f1170 Binary files /dev/null and b/Roll a Ball/Library/metadata/d1/d1a0a27327b54c3bac52a08929c33f81 differ diff --git a/Roll a Ball/Library/metadata/d1/d1a0a27327b54c3bac52a08929c33f81.info b/Roll a Ball/Library/metadata/d1/d1a0a27327b54c3bac52a08929c33f81.info new file mode 100644 index 0000000000000000000000000000000000000000..eb23c1a0dffd590ee791ae1ba024edc68b5571ff Binary files /dev/null and b/Roll a Ball/Library/metadata/d1/d1a0a27327b54c3bac52a08929c33f81.info differ diff --git a/Roll a Ball/Library/metadata/d1/d1c1a2d988f5148fd9ab17b2460d271e b/Roll a Ball/Library/metadata/d1/d1c1a2d988f5148fd9ab17b2460d271e new file mode 100644 index 0000000000000000000000000000000000000000..4f2bee371325b56c884a985fdb95a19f4a682e5f Binary files /dev/null and b/Roll a Ball/Library/metadata/d1/d1c1a2d988f5148fd9ab17b2460d271e differ diff --git a/Roll a Ball/Library/metadata/d1/d1c1a2d988f5148fd9ab17b2460d271e.info b/Roll a Ball/Library/metadata/d1/d1c1a2d988f5148fd9ab17b2460d271e.info new file mode 100644 index 0000000000000000000000000000000000000000..27a7abcfcf73b7aa0cbdbe345d8fc7969f3dc65f Binary files /dev/null and b/Roll a Ball/Library/metadata/d1/d1c1a2d988f5148fd9ab17b2460d271e.info differ diff --git a/Roll a Ball/Library/metadata/d2/d256fa541faf5d4409992c631adb98a1 b/Roll a Ball/Library/metadata/d2/d256fa541faf5d4409992c631adb98a1 new file mode 100644 index 0000000000000000000000000000000000000000..1527537fa36548ae41bf375b2a3ce45cd62a4161 Binary files /dev/null and b/Roll a Ball/Library/metadata/d2/d256fa541faf5d4409992c631adb98a1 differ diff --git a/Roll a Ball/Library/metadata/d2/d256fa541faf5d4409992c631adb98a1.info b/Roll a Ball/Library/metadata/d2/d256fa541faf5d4409992c631adb98a1.info new file mode 100644 index 0000000000000000000000000000000000000000..fe8ef703fd9da414624d96a97b621cee659acef7 Binary files /dev/null and b/Roll a Ball/Library/metadata/d2/d256fa541faf5d4409992c631adb98a1.info differ diff --git a/Roll a Ball/Library/metadata/d3/d31e5d760880a4e52a3a75322481d0d2 b/Roll a Ball/Library/metadata/d3/d31e5d760880a4e52a3a75322481d0d2 new file mode 100644 index 0000000000000000000000000000000000000000..593c3bd785b0d1a29d7eaf0cf232a0094ae8e4f5 Binary files /dev/null and b/Roll a Ball/Library/metadata/d3/d31e5d760880a4e52a3a75322481d0d2 differ diff --git a/Roll a Ball/Library/metadata/d3/d31e5d760880a4e52a3a75322481d0d2.info b/Roll a Ball/Library/metadata/d3/d31e5d760880a4e52a3a75322481d0d2.info new file mode 100644 index 0000000000000000000000000000000000000000..d8e8990f4aa62f9eec2e957856317a024962cfe5 Binary files /dev/null and b/Roll a Ball/Library/metadata/d3/d31e5d760880a4e52a3a75322481d0d2.info differ diff --git a/Roll a Ball/Library/metadata/d3/d3cbe921f7b3d9a3257e7c61a5761796 b/Roll a Ball/Library/metadata/d3/d3cbe921f7b3d9a3257e7c61a5761796 new file mode 100644 index 0000000000000000000000000000000000000000..29ce2bcd73bc31bc585148bc8cb2abed2097a47b Binary files /dev/null and b/Roll a Ball/Library/metadata/d3/d3cbe921f7b3d9a3257e7c61a5761796 differ diff --git a/Roll a Ball/Library/metadata/d3/d3cbe921f7b3d9a3257e7c61a5761796.info b/Roll a Ball/Library/metadata/d3/d3cbe921f7b3d9a3257e7c61a5761796.info new file mode 100644 index 0000000000000000000000000000000000000000..e8d3e397a3a441a74732986e32136a7fe4859d3b Binary files /dev/null and b/Roll a Ball/Library/metadata/d3/d3cbe921f7b3d9a3257e7c61a5761796.info differ diff --git a/Roll a Ball/Library/metadata/d4/d437fe60bb34f45728664a5d930c1635 b/Roll a Ball/Library/metadata/d4/d437fe60bb34f45728664a5d930c1635 new file mode 100644 index 0000000000000000000000000000000000000000..735c210cb7198a2c7821124ac9dd76d4933e380e Binary files /dev/null and b/Roll a Ball/Library/metadata/d4/d437fe60bb34f45728664a5d930c1635 differ diff --git a/Roll a Ball/Library/metadata/d4/d437fe60bb34f45728664a5d930c1635.info b/Roll a Ball/Library/metadata/d4/d437fe60bb34f45728664a5d930c1635.info new file mode 100644 index 0000000000000000000000000000000000000000..a4d7f6746f7112400b3cf736482a151d8f744223 Binary files /dev/null and b/Roll a Ball/Library/metadata/d4/d437fe60bb34f45728664a5d930c1635.info differ diff --git a/Roll a Ball/Library/metadata/d4/d4ef26aa386b44923b61c9c4b505a67c b/Roll a Ball/Library/metadata/d4/d4ef26aa386b44923b61c9c4b505a67c new file mode 100644 index 0000000000000000000000000000000000000000..ad87ce65323ecde052e18135c353ca308254afb0 Binary files /dev/null and b/Roll a Ball/Library/metadata/d4/d4ef26aa386b44923b61c9c4b505a67c differ diff --git a/Roll a Ball/Library/metadata/d4/d4ef26aa386b44923b61c9c4b505a67c.info b/Roll a Ball/Library/metadata/d4/d4ef26aa386b44923b61c9c4b505a67c.info new file mode 100644 index 0000000000000000000000000000000000000000..2fe37c56061f213c5e369aa362d7008df1a040eb Binary files /dev/null and b/Roll a Ball/Library/metadata/d4/d4ef26aa386b44923b61c9c4b505a67c.info differ diff --git a/Roll a Ball/Library/metadata/d5/d5a61f8cc87394b28aec6b88b4083217 b/Roll a Ball/Library/metadata/d5/d5a61f8cc87394b28aec6b88b4083217 new file mode 100644 index 0000000000000000000000000000000000000000..4eac0e939697d1593da9b174e9ae0d92efa40436 Binary files /dev/null and b/Roll a Ball/Library/metadata/d5/d5a61f8cc87394b28aec6b88b4083217 differ diff --git a/Roll a Ball/Library/metadata/d5/d5a61f8cc87394b28aec6b88b4083217.info b/Roll a Ball/Library/metadata/d5/d5a61f8cc87394b28aec6b88b4083217.info new file mode 100644 index 0000000000000000000000000000000000000000..d6b67d5fa8ed691e6864be23c8d8c20ef2ee7aac Binary files /dev/null and b/Roll a Ball/Library/metadata/d5/d5a61f8cc87394b28aec6b88b4083217.info differ diff --git a/Roll a Ball/Library/metadata/d5/d5f0b0adc6826e9dd3b72e292e8438be b/Roll a Ball/Library/metadata/d5/d5f0b0adc6826e9dd3b72e292e8438be new file mode 100644 index 0000000000000000000000000000000000000000..bab558e2b6c2319994fd90d605f51e73fb86f27b Binary files /dev/null and b/Roll a Ball/Library/metadata/d5/d5f0b0adc6826e9dd3b72e292e8438be differ diff --git a/Roll a Ball/Library/metadata/d5/d5f0b0adc6826e9dd3b72e292e8438be.info b/Roll a Ball/Library/metadata/d5/d5f0b0adc6826e9dd3b72e292e8438be.info new file mode 100644 index 0000000000000000000000000000000000000000..5ab4668056f0ced4bf1366a413200b654b08a8eb Binary files /dev/null and b/Roll a Ball/Library/metadata/d5/d5f0b0adc6826e9dd3b72e292e8438be.info differ diff --git a/Roll a Ball/Library/metadata/d6/d607a67dc772b484da060e66a3d61a4e b/Roll a Ball/Library/metadata/d6/d607a67dc772b484da060e66a3d61a4e new file mode 100644 index 0000000000000000000000000000000000000000..7ef5035797124ce6d7a0764365f056742e476890 Binary files /dev/null and b/Roll a Ball/Library/metadata/d6/d607a67dc772b484da060e66a3d61a4e differ diff --git a/Roll a Ball/Library/metadata/d6/d607a67dc772b484da060e66a3d61a4e.info b/Roll a Ball/Library/metadata/d6/d607a67dc772b484da060e66a3d61a4e.info new file mode 100644 index 0000000000000000000000000000000000000000..edf7038b9140ab30777c57a2b19b4c07e767f417 Binary files /dev/null and b/Roll a Ball/Library/metadata/d6/d607a67dc772b484da060e66a3d61a4e.info differ diff --git a/Roll a Ball/Library/metadata/d6/d6a708dbb74414a6dbd60e07d9513c1c b/Roll a Ball/Library/metadata/d6/d6a708dbb74414a6dbd60e07d9513c1c new file mode 100644 index 0000000000000000000000000000000000000000..424fbe1d158db0cf13ed802ff259d3110c23c327 Binary files /dev/null and b/Roll a Ball/Library/metadata/d6/d6a708dbb74414a6dbd60e07d9513c1c differ diff --git a/Roll a Ball/Library/metadata/d6/d6a708dbb74414a6dbd60e07d9513c1c.info b/Roll a Ball/Library/metadata/d6/d6a708dbb74414a6dbd60e07d9513c1c.info new file mode 100644 index 0000000000000000000000000000000000000000..e53d3cd905fc463b0976f2b0f4398562e0b0dc6d Binary files /dev/null and b/Roll a Ball/Library/metadata/d6/d6a708dbb74414a6dbd60e07d9513c1c.info differ diff --git a/Roll a Ball/Library/metadata/d6/d6c6a000a805f00649b36b542e8426c2 b/Roll a Ball/Library/metadata/d6/d6c6a000a805f00649b36b542e8426c2 new file mode 100644 index 0000000000000000000000000000000000000000..88ad28c14f8130aa1598983affa07ce406ca1ec4 Binary files /dev/null and b/Roll a Ball/Library/metadata/d6/d6c6a000a805f00649b36b542e8426c2 differ diff --git a/Roll a Ball/Library/metadata/d6/d6c6a000a805f00649b36b542e8426c2.info b/Roll a Ball/Library/metadata/d6/d6c6a000a805f00649b36b542e8426c2.info new file mode 100644 index 0000000000000000000000000000000000000000..7d2a76adc0ad8b63fac1c2ca065e50047ced3c28 Binary files /dev/null and b/Roll a Ball/Library/metadata/d6/d6c6a000a805f00649b36b542e8426c2.info differ diff --git a/Roll a Ball/Library/metadata/d6/d6db7caf2e852b75ebb9c6098418179c b/Roll a Ball/Library/metadata/d6/d6db7caf2e852b75ebb9c6098418179c new file mode 100644 index 0000000000000000000000000000000000000000..8281db915ddeb2583465626d6b2d48f6cf60438f Binary files /dev/null and b/Roll a Ball/Library/metadata/d6/d6db7caf2e852b75ebb9c6098418179c differ diff --git a/Roll a Ball/Library/metadata/d6/d6db7caf2e852b75ebb9c6098418179c.info b/Roll a Ball/Library/metadata/d6/d6db7caf2e852b75ebb9c6098418179c.info new file mode 100644 index 0000000000000000000000000000000000000000..365e33c5aa55cacff9536773dbf475dfe462c5f1 Binary files /dev/null and b/Roll a Ball/Library/metadata/d6/d6db7caf2e852b75ebb9c6098418179c.info differ diff --git a/Roll a Ball/Library/metadata/d8/d85e5eeaf8f135aeaaebdc8aa3cff6c3 b/Roll a Ball/Library/metadata/d8/d85e5eeaf8f135aeaaebdc8aa3cff6c3 new file mode 100644 index 0000000000000000000000000000000000000000..96ef7a4bd686938e436e44af19fab2a0a5df1e71 Binary files /dev/null and b/Roll a Ball/Library/metadata/d8/d85e5eeaf8f135aeaaebdc8aa3cff6c3 differ diff --git a/Roll a Ball/Library/metadata/d8/d85e5eeaf8f135aeaaebdc8aa3cff6c3.info b/Roll a Ball/Library/metadata/d8/d85e5eeaf8f135aeaaebdc8aa3cff6c3.info new file mode 100644 index 0000000000000000000000000000000000000000..8034d9ab9d5c9bb8c0a9b7f712b48135a6bf94bd Binary files /dev/null and b/Roll a Ball/Library/metadata/d8/d85e5eeaf8f135aeaaebdc8aa3cff6c3.info differ diff --git a/Roll a Ball/Library/metadata/d9/d912d4873af534bd4a9d44bf1b52f14e b/Roll a Ball/Library/metadata/d9/d912d4873af534bd4a9d44bf1b52f14e new file mode 100644 index 0000000000000000000000000000000000000000..56bd1ca9c926a1f5c91b7d6bb869e2139511103b Binary files /dev/null and b/Roll a Ball/Library/metadata/d9/d912d4873af534bd4a9d44bf1b52f14e differ diff --git a/Roll a Ball/Library/metadata/d9/d912d4873af534bd4a9d44bf1b52f14e.info b/Roll a Ball/Library/metadata/d9/d912d4873af534bd4a9d44bf1b52f14e.info new file mode 100644 index 0000000000000000000000000000000000000000..b7e68545b7da7c8fb5e57a063b965469be4d8da1 Binary files /dev/null and b/Roll a Ball/Library/metadata/d9/d912d4873af534bd4a9d44bf1b52f14e.info differ diff --git a/Roll a Ball/Library/metadata/d9/d929147d9f78c487397abb40f2c257b0 b/Roll a Ball/Library/metadata/d9/d929147d9f78c487397abb40f2c257b0 new file mode 100644 index 0000000000000000000000000000000000000000..395b8a85d45c191652765daabc425c888114e0a2 Binary files /dev/null and b/Roll a Ball/Library/metadata/d9/d929147d9f78c487397abb40f2c257b0 differ diff --git a/Roll a Ball/Library/metadata/d9/d929147d9f78c487397abb40f2c257b0.info b/Roll a Ball/Library/metadata/d9/d929147d9f78c487397abb40f2c257b0.info new file mode 100644 index 0000000000000000000000000000000000000000..8924459fc1baab1742342effe83325ffa491fc80 Binary files /dev/null and b/Roll a Ball/Library/metadata/d9/d929147d9f78c487397abb40f2c257b0.info differ diff --git a/Roll a Ball/Library/metadata/d9/d9647b571c5e44729b71d756b3d55317 b/Roll a Ball/Library/metadata/d9/d9647b571c5e44729b71d756b3d55317 new file mode 100644 index 0000000000000000000000000000000000000000..3ac8a611bfe9763cb4398bf3288d23cf94e26050 Binary files /dev/null and b/Roll a Ball/Library/metadata/d9/d9647b571c5e44729b71d756b3d55317 differ diff --git a/Roll a Ball/Library/metadata/d9/d9647b571c5e44729b71d756b3d55317.info b/Roll a Ball/Library/metadata/d9/d9647b571c5e44729b71d756b3d55317.info new file mode 100644 index 0000000000000000000000000000000000000000..177f3262615e0a1c12471e0c027fe1f582f72457 Binary files /dev/null and b/Roll a Ball/Library/metadata/d9/d9647b571c5e44729b71d756b3d55317.info differ diff --git a/Roll a Ball/Library/metadata/da/da0b41deddf0a4414b09681018c171f1 b/Roll a Ball/Library/metadata/da/da0b41deddf0a4414b09681018c171f1 new file mode 100644 index 0000000000000000000000000000000000000000..82f3ca10403a699da081fe900ca47980e368a578 Binary files /dev/null and b/Roll a Ball/Library/metadata/da/da0b41deddf0a4414b09681018c171f1 differ diff --git a/Roll a Ball/Library/metadata/da/da0b41deddf0a4414b09681018c171f1.info b/Roll a Ball/Library/metadata/da/da0b41deddf0a4414b09681018c171f1.info new file mode 100644 index 0000000000000000000000000000000000000000..b8a02bc877541f72d960ba0cce49b31d080fb154 Binary files /dev/null and b/Roll a Ball/Library/metadata/da/da0b41deddf0a4414b09681018c171f1.info differ diff --git a/Roll a Ball/Library/metadata/dc/dc443db3e92b4983b9738c1131f555cb b/Roll a Ball/Library/metadata/dc/dc443db3e92b4983b9738c1131f555cb new file mode 100644 index 0000000000000000000000000000000000000000..b987aa38dc6226437994dfa8d9983bff376aab5e Binary files /dev/null and b/Roll a Ball/Library/metadata/dc/dc443db3e92b4983b9738c1131f555cb differ diff --git a/Roll a Ball/Library/metadata/dc/dc443db3e92b4983b9738c1131f555cb.info b/Roll a Ball/Library/metadata/dc/dc443db3e92b4983b9738c1131f555cb.info new file mode 100644 index 0000000000000000000000000000000000000000..ef29fd61cf96f7706bee677a6ce72fed46dbf0c0 Binary files /dev/null and b/Roll a Ball/Library/metadata/dc/dc443db3e92b4983b9738c1131f555cb.info differ diff --git a/Roll a Ball/Library/metadata/dc/dcc8c6e92b172a65719af5ddf47dd968 b/Roll a Ball/Library/metadata/dc/dcc8c6e92b172a65719af5ddf47dd968 new file mode 100644 index 0000000000000000000000000000000000000000..650bf1ea7372b24a10ecfca4b51304e99ac3478c Binary files /dev/null and b/Roll a Ball/Library/metadata/dc/dcc8c6e92b172a65719af5ddf47dd968 differ diff --git a/Roll a Ball/Library/metadata/dc/dcc8c6e92b172a65719af5ddf47dd968.info b/Roll a Ball/Library/metadata/dc/dcc8c6e92b172a65719af5ddf47dd968.info new file mode 100644 index 0000000000000000000000000000000000000000..a695fe2f20e8aae9c14e562b76831e90bb67488b Binary files /dev/null and b/Roll a Ball/Library/metadata/dc/dcc8c6e92b172a65719af5ddf47dd968.info differ diff --git a/Roll a Ball/Library/metadata/dc/dce91326f102345f3ba2f0987c0679c2 b/Roll a Ball/Library/metadata/dc/dce91326f102345f3ba2f0987c0679c2 new file mode 100644 index 0000000000000000000000000000000000000000..18934fef60be604209b5fa2f6f16c42f710b76a7 Binary files /dev/null and b/Roll a Ball/Library/metadata/dc/dce91326f102345f3ba2f0987c0679c2 differ diff --git a/Roll a Ball/Library/metadata/dc/dce91326f102345f3ba2f0987c0679c2.info b/Roll a Ball/Library/metadata/dc/dce91326f102345f3ba2f0987c0679c2.info new file mode 100644 index 0000000000000000000000000000000000000000..840efe0f13cad1030f3201da304b71342bd0e7b6 Binary files /dev/null and b/Roll a Ball/Library/metadata/dc/dce91326f102345f3ba2f0987c0679c2.info differ diff --git a/Roll a Ball/Library/metadata/dc/dced8f6ea9f964e8e8e61574ea889d21 b/Roll a Ball/Library/metadata/dc/dced8f6ea9f964e8e8e61574ea889d21 new file mode 100644 index 0000000000000000000000000000000000000000..c3f50dafaab5355f7a4d640ec9593592e70fcfae Binary files /dev/null and b/Roll a Ball/Library/metadata/dc/dced8f6ea9f964e8e8e61574ea889d21 differ diff --git a/Roll a Ball/Library/metadata/dc/dced8f6ea9f964e8e8e61574ea889d21.info b/Roll a Ball/Library/metadata/dc/dced8f6ea9f964e8e8e61574ea889d21.info new file mode 100644 index 0000000000000000000000000000000000000000..e7177503dd4e2e487908b420e9d3d8f8fdfe99c1 Binary files /dev/null and b/Roll a Ball/Library/metadata/dc/dced8f6ea9f964e8e8e61574ea889d21.info differ diff --git a/Roll a Ball/Library/metadata/dd/dd2fe74169b54bf58fca17288513ef38 b/Roll a Ball/Library/metadata/dd/dd2fe74169b54bf58fca17288513ef38 new file mode 100644 index 0000000000000000000000000000000000000000..fa42d386ee7fb6550f7ae68cc4b3cf2826a2000e Binary files /dev/null and b/Roll a Ball/Library/metadata/dd/dd2fe74169b54bf58fca17288513ef38 differ diff --git a/Roll a Ball/Library/metadata/dd/dd2fe74169b54bf58fca17288513ef38.info b/Roll a Ball/Library/metadata/dd/dd2fe74169b54bf58fca17288513ef38.info new file mode 100644 index 0000000000000000000000000000000000000000..3939d94aff17c9c81bb7f370671de739a6ae451d Binary files /dev/null and b/Roll a Ball/Library/metadata/dd/dd2fe74169b54bf58fca17288513ef38.info differ diff --git a/Roll a Ball/Library/metadata/e0/e05ace3bd15740cda0bad60d89092a5b b/Roll a Ball/Library/metadata/e0/e05ace3bd15740cda0bad60d89092a5b new file mode 100644 index 0000000000000000000000000000000000000000..3c14daefa808b979afa7953cb294b53d5ddcedbf Binary files /dev/null and b/Roll a Ball/Library/metadata/e0/e05ace3bd15740cda0bad60d89092a5b differ diff --git a/Roll a Ball/Library/metadata/e0/e05ace3bd15740cda0bad60d89092a5b.info b/Roll a Ball/Library/metadata/e0/e05ace3bd15740cda0bad60d89092a5b.info new file mode 100644 index 0000000000000000000000000000000000000000..457c8b9a2bd1e6ed1ac51b0e5b7432b351d63c91 Binary files /dev/null and b/Roll a Ball/Library/metadata/e0/e05ace3bd15740cda0bad60d89092a5b.info differ diff --git a/Roll a Ball/Library/metadata/e1/e1007cd261c84053beb0c3537782908d b/Roll a Ball/Library/metadata/e1/e1007cd261c84053beb0c3537782908d new file mode 100644 index 0000000000000000000000000000000000000000..c70e26823d217be77cfe16b68f92dac5d482e5ca Binary files /dev/null and b/Roll a Ball/Library/metadata/e1/e1007cd261c84053beb0c3537782908d differ diff --git a/Roll a Ball/Library/metadata/e1/e1007cd261c84053beb0c3537782908d.info b/Roll a Ball/Library/metadata/e1/e1007cd261c84053beb0c3537782908d.info new file mode 100644 index 0000000000000000000000000000000000000000..6ab7bdae2f59f147f88bc441e493daa7a4be169a Binary files /dev/null and b/Roll a Ball/Library/metadata/e1/e1007cd261c84053beb0c3537782908d.info differ diff --git a/Roll a Ball/Library/metadata/e1/e1ef8466c8fd01a549f10baa4d51fa17 b/Roll a Ball/Library/metadata/e1/e1ef8466c8fd01a549f10baa4d51fa17 new file mode 100644 index 0000000000000000000000000000000000000000..50937193a872cd1d81d551402af76fefd16c99de Binary files /dev/null and b/Roll a Ball/Library/metadata/e1/e1ef8466c8fd01a549f10baa4d51fa17 differ diff --git a/Roll a Ball/Library/metadata/e1/e1ef8466c8fd01a549f10baa4d51fa17.info b/Roll a Ball/Library/metadata/e1/e1ef8466c8fd01a549f10baa4d51fa17.info new file mode 100644 index 0000000000000000000000000000000000000000..1f0b1f9893cc0f506505127e36f14b5249438d85 Binary files /dev/null and b/Roll a Ball/Library/metadata/e1/e1ef8466c8fd01a549f10baa4d51fa17.info differ diff --git a/Roll a Ball/Library/metadata/e2/e21bec35f48a44298911b25ead550ce3 b/Roll a Ball/Library/metadata/e2/e21bec35f48a44298911b25ead550ce3 new file mode 100644 index 0000000000000000000000000000000000000000..33a7295375a6674ab8e7456d61fe5fdb26c502cb Binary files /dev/null and b/Roll a Ball/Library/metadata/e2/e21bec35f48a44298911b25ead550ce3 differ diff --git a/Roll a Ball/Library/metadata/e2/e21bec35f48a44298911b25ead550ce3.info b/Roll a Ball/Library/metadata/e2/e21bec35f48a44298911b25ead550ce3.info new file mode 100644 index 0000000000000000000000000000000000000000..d19cbdd4659d790556d0ec4777a050653210478c Binary files /dev/null and b/Roll a Ball/Library/metadata/e2/e21bec35f48a44298911b25ead550ce3.info differ diff --git a/Roll a Ball/Library/metadata/e3/e3882522a08b6f5459b4dea6f8791278 b/Roll a Ball/Library/metadata/e3/e3882522a08b6f5459b4dea6f8791278 new file mode 100644 index 0000000000000000000000000000000000000000..44d3cab32966517d8cd8dd5263f49ba181ef54b6 Binary files /dev/null and b/Roll a Ball/Library/metadata/e3/e3882522a08b6f5459b4dea6f8791278 differ diff --git a/Roll a Ball/Library/metadata/e3/e3882522a08b6f5459b4dea6f8791278.info b/Roll a Ball/Library/metadata/e3/e3882522a08b6f5459b4dea6f8791278.info new file mode 100644 index 0000000000000000000000000000000000000000..fbdaaeb0e79bae6f110b8a82b8cd50f914db1765 Binary files /dev/null and b/Roll a Ball/Library/metadata/e3/e3882522a08b6f5459b4dea6f8791278.info differ diff --git a/Roll a Ball/Library/metadata/e3/e3b0f810fdea84e40ab4ba20f256f7e8 b/Roll a Ball/Library/metadata/e3/e3b0f810fdea84e40ab4ba20f256f7e8 new file mode 100644 index 0000000000000000000000000000000000000000..b46076ae8220b1a8ee0414ad98b4d41ae5f60895 Binary files /dev/null and b/Roll a Ball/Library/metadata/e3/e3b0f810fdea84e40ab4ba20f256f7e8 differ diff --git a/Roll a Ball/Library/metadata/e3/e3b0f810fdea84e40ab4ba20f256f7e8.info b/Roll a Ball/Library/metadata/e3/e3b0f810fdea84e40ab4ba20f256f7e8.info new file mode 100644 index 0000000000000000000000000000000000000000..6bbe25f8a1da9eb605e52b55f31a64e39183de7b Binary files /dev/null and b/Roll a Ball/Library/metadata/e3/e3b0f810fdea84e40ab4ba20f256f7e8.info differ diff --git a/Roll a Ball/Library/metadata/e4/e426a33061f184a9785cd5d82f9fb486 b/Roll a Ball/Library/metadata/e4/e426a33061f184a9785cd5d82f9fb486 new file mode 100644 index 0000000000000000000000000000000000000000..3faca72fd7c1c369fdbb2cfb9df8ab63f0c95322 Binary files /dev/null and b/Roll a Ball/Library/metadata/e4/e426a33061f184a9785cd5d82f9fb486 differ diff --git a/Roll a Ball/Library/metadata/e4/e426a33061f184a9785cd5d82f9fb486.info b/Roll a Ball/Library/metadata/e4/e426a33061f184a9785cd5d82f9fb486.info new file mode 100644 index 0000000000000000000000000000000000000000..dee62ec5eb2255d45d1ced3f348cfe0965acf882 Binary files /dev/null and b/Roll a Ball/Library/metadata/e4/e426a33061f184a9785cd5d82f9fb486.info differ diff --git a/Roll a Ball/Library/metadata/e4/e45f79867376940b7ba31502238d8efa b/Roll a Ball/Library/metadata/e4/e45f79867376940b7ba31502238d8efa new file mode 100644 index 0000000000000000000000000000000000000000..e1c760c82be82707d56e2901eb78441d45541284 Binary files /dev/null and b/Roll a Ball/Library/metadata/e4/e45f79867376940b7ba31502238d8efa differ diff --git a/Roll a Ball/Library/metadata/e4/e45f79867376940b7ba31502238d8efa.info b/Roll a Ball/Library/metadata/e4/e45f79867376940b7ba31502238d8efa.info new file mode 100644 index 0000000000000000000000000000000000000000..2a8a75e8a699b266dbcecba6382f83f2b41c06c0 Binary files /dev/null and b/Roll a Ball/Library/metadata/e4/e45f79867376940b7ba31502238d8efa.info differ diff --git a/Roll a Ball/Library/metadata/e4/e4e0b1de1aee400d81ed4273141e7823 b/Roll a Ball/Library/metadata/e4/e4e0b1de1aee400d81ed4273141e7823 new file mode 100644 index 0000000000000000000000000000000000000000..e33b59281495268b7d92305f0ef3e94c07fa6ac4 Binary files /dev/null and b/Roll a Ball/Library/metadata/e4/e4e0b1de1aee400d81ed4273141e7823 differ diff --git a/Roll a Ball/Library/metadata/e4/e4e0b1de1aee400d81ed4273141e7823.info b/Roll a Ball/Library/metadata/e4/e4e0b1de1aee400d81ed4273141e7823.info new file mode 100644 index 0000000000000000000000000000000000000000..3b0077504b51cd8189efd7855f246e92551326e1 Binary files /dev/null and b/Roll a Ball/Library/metadata/e4/e4e0b1de1aee400d81ed4273141e7823.info differ diff --git a/Roll a Ball/Library/metadata/e4/e4f4cf1b9b434137a499903a7a1d651a b/Roll a Ball/Library/metadata/e4/e4f4cf1b9b434137a499903a7a1d651a new file mode 100644 index 0000000000000000000000000000000000000000..aa39aef09113bded0462624233e822ddb79a2df0 Binary files /dev/null and b/Roll a Ball/Library/metadata/e4/e4f4cf1b9b434137a499903a7a1d651a differ diff --git a/Roll a Ball/Library/metadata/e4/e4f4cf1b9b434137a499903a7a1d651a.info b/Roll a Ball/Library/metadata/e4/e4f4cf1b9b434137a499903a7a1d651a.info new file mode 100644 index 0000000000000000000000000000000000000000..ac20f9043e38eaec1597bb6f18d3caa23fa28a8e Binary files /dev/null and b/Roll a Ball/Library/metadata/e4/e4f4cf1b9b434137a499903a7a1d651a.info differ diff --git a/Roll a Ball/Library/metadata/e5/e53bc96d2d054b8cbc811f0d73e761eb b/Roll a Ball/Library/metadata/e5/e53bc96d2d054b8cbc811f0d73e761eb new file mode 100644 index 0000000000000000000000000000000000000000..c26019d6e860590351c16da443a46cc9af38dd0d Binary files /dev/null and b/Roll a Ball/Library/metadata/e5/e53bc96d2d054b8cbc811f0d73e761eb differ diff --git a/Roll a Ball/Library/metadata/e5/e53bc96d2d054b8cbc811f0d73e761eb.info b/Roll a Ball/Library/metadata/e5/e53bc96d2d054b8cbc811f0d73e761eb.info new file mode 100644 index 0000000000000000000000000000000000000000..c0dc5051bc9d4f4175453197051e2ef319b0ab48 Binary files /dev/null and b/Roll a Ball/Library/metadata/e5/e53bc96d2d054b8cbc811f0d73e761eb.info differ diff --git a/Roll a Ball/Library/metadata/e6/e69259f6ff914146ad610be5491eb44a b/Roll a Ball/Library/metadata/e6/e69259f6ff914146ad610be5491eb44a new file mode 100644 index 0000000000000000000000000000000000000000..d2463069db3136f0ee69e49ad2cc7945a5400d96 Binary files /dev/null and b/Roll a Ball/Library/metadata/e6/e69259f6ff914146ad610be5491eb44a differ diff --git a/Roll a Ball/Library/metadata/e6/e69259f6ff914146ad610be5491eb44a.info b/Roll a Ball/Library/metadata/e6/e69259f6ff914146ad610be5491eb44a.info new file mode 100644 index 0000000000000000000000000000000000000000..e8ec35c9867a697175e3cda00a284eebdbbd510f Binary files /dev/null and b/Roll a Ball/Library/metadata/e6/e69259f6ff914146ad610be5491eb44a.info differ diff --git a/Roll a Ball/Library/metadata/e6/e6925bb38494e6a43ba0921e65e424fe b/Roll a Ball/Library/metadata/e6/e6925bb38494e6a43ba0921e65e424fe new file mode 100644 index 0000000000000000000000000000000000000000..b977604c55a7da3d6011c518f77834252bcc78b7 Binary files /dev/null and b/Roll a Ball/Library/metadata/e6/e6925bb38494e6a43ba0921e65e424fe differ diff --git a/Roll a Ball/Library/metadata/e6/e6925bb38494e6a43ba0921e65e424fe.info b/Roll a Ball/Library/metadata/e6/e6925bb38494e6a43ba0921e65e424fe.info new file mode 100644 index 0000000000000000000000000000000000000000..63bddfd143ac5ea716e9edad1939104decafc85b Binary files /dev/null and b/Roll a Ball/Library/metadata/e6/e6925bb38494e6a43ba0921e65e424fe.info differ diff --git a/Roll a Ball/Library/metadata/e6/e6a1d1e3d2384453a7371b4a07a41ca4 b/Roll a Ball/Library/metadata/e6/e6a1d1e3d2384453a7371b4a07a41ca4 new file mode 100644 index 0000000000000000000000000000000000000000..5e7bc63a0288dde9078a27de43f256ab528bd724 Binary files /dev/null and b/Roll a Ball/Library/metadata/e6/e6a1d1e3d2384453a7371b4a07a41ca4 differ diff --git a/Roll a Ball/Library/metadata/e6/e6a1d1e3d2384453a7371b4a07a41ca4.info b/Roll a Ball/Library/metadata/e6/e6a1d1e3d2384453a7371b4a07a41ca4.info new file mode 100644 index 0000000000000000000000000000000000000000..28a628d0b38c37d59e039fc40f69b67feba95d8e Binary files /dev/null and b/Roll a Ball/Library/metadata/e6/e6a1d1e3d2384453a7371b4a07a41ca4.info differ diff --git a/Roll a Ball/Library/metadata/e9/e93ec7eb6de342aabd156833e253f838 b/Roll a Ball/Library/metadata/e9/e93ec7eb6de342aabd156833e253f838 new file mode 100644 index 0000000000000000000000000000000000000000..c6ee22249fcae6c516d3ece9eabc3c188b513fcd Binary files /dev/null and b/Roll a Ball/Library/metadata/e9/e93ec7eb6de342aabd156833e253f838 differ diff --git a/Roll a Ball/Library/metadata/e9/e93ec7eb6de342aabd156833e253f838.info b/Roll a Ball/Library/metadata/e9/e93ec7eb6de342aabd156833e253f838.info new file mode 100644 index 0000000000000000000000000000000000000000..fe4e3a1a9163ae729e5aaa35a47e2a286a809290 Binary files /dev/null and b/Roll a Ball/Library/metadata/e9/e93ec7eb6de342aabd156833e253f838.info differ diff --git a/Roll a Ball/Library/metadata/e9/e9df95f53f1c1d0c9199e235d6c42b50 b/Roll a Ball/Library/metadata/e9/e9df95f53f1c1d0c9199e235d6c42b50 new file mode 100644 index 0000000000000000000000000000000000000000..19ae6f4b3e65606e3131dc11664abb9bc6b139f0 Binary files /dev/null and b/Roll a Ball/Library/metadata/e9/e9df95f53f1c1d0c9199e235d6c42b50 differ diff --git a/Roll a Ball/Library/metadata/e9/e9df95f53f1c1d0c9199e235d6c42b50.info b/Roll a Ball/Library/metadata/e9/e9df95f53f1c1d0c9199e235d6c42b50.info new file mode 100644 index 0000000000000000000000000000000000000000..5a5f6c94840f93eaf4908fd817b4735dd6e9447f Binary files /dev/null and b/Roll a Ball/Library/metadata/e9/e9df95f53f1c1d0c9199e235d6c42b50.info differ diff --git a/Roll a Ball/Library/metadata/ea/ead147da21254ff9a0a936bdd75e1680 b/Roll a Ball/Library/metadata/ea/ead147da21254ff9a0a936bdd75e1680 new file mode 100644 index 0000000000000000000000000000000000000000..5a778d2db466288f03cd6ef53b80ad01074e09c7 Binary files /dev/null and b/Roll a Ball/Library/metadata/ea/ead147da21254ff9a0a936bdd75e1680 differ diff --git a/Roll a Ball/Library/metadata/ea/ead147da21254ff9a0a936bdd75e1680.info b/Roll a Ball/Library/metadata/ea/ead147da21254ff9a0a936bdd75e1680.info new file mode 100644 index 0000000000000000000000000000000000000000..76d990d627254a9728ab79f8eb7a6a4296ce7b2e Binary files /dev/null and b/Roll a Ball/Library/metadata/ea/ead147da21254ff9a0a936bdd75e1680.info differ diff --git a/Roll a Ball/Library/metadata/eb/eb5df0f4f4165454aa8d4a4d338f0eff b/Roll a Ball/Library/metadata/eb/eb5df0f4f4165454aa8d4a4d338f0eff new file mode 100644 index 0000000000000000000000000000000000000000..f295183a718ad728b4476b401bc0297c343c1d49 Binary files /dev/null and b/Roll a Ball/Library/metadata/eb/eb5df0f4f4165454aa8d4a4d338f0eff differ diff --git a/Roll a Ball/Library/metadata/eb/eb5df0f4f4165454aa8d4a4d338f0eff.info b/Roll a Ball/Library/metadata/eb/eb5df0f4f4165454aa8d4a4d338f0eff.info new file mode 100644 index 0000000000000000000000000000000000000000..287c6ef9ec8ba6f0e0f1ef9f956b654927efaa74 Binary files /dev/null and b/Roll a Ball/Library/metadata/eb/eb5df0f4f4165454aa8d4a4d338f0eff.info differ diff --git a/Roll a Ball/Library/metadata/ec/ec02776fe29df900b897106d61977735 b/Roll a Ball/Library/metadata/ec/ec02776fe29df900b897106d61977735 new file mode 100644 index 0000000000000000000000000000000000000000..9b4602672b30846c604ecaf28fb65fa81c1a4877 Binary files /dev/null and b/Roll a Ball/Library/metadata/ec/ec02776fe29df900b897106d61977735 differ diff --git a/Roll a Ball/Library/metadata/ec/ec02776fe29df900b897106d61977735.info b/Roll a Ball/Library/metadata/ec/ec02776fe29df900b897106d61977735.info new file mode 100644 index 0000000000000000000000000000000000000000..7b69a828df80ca6223bdc464f45912df1e9564f2 Binary files /dev/null and b/Roll a Ball/Library/metadata/ec/ec02776fe29df900b897106d61977735.info differ diff --git a/Roll a Ball/Library/metadata/ec/ec7c645d93308c04d8840982af12101e b/Roll a Ball/Library/metadata/ec/ec7c645d93308c04d8840982af12101e new file mode 100644 index 0000000000000000000000000000000000000000..bde2fc7f469266478ff9f8ecc795ea1ac160bf03 Binary files /dev/null and b/Roll a Ball/Library/metadata/ec/ec7c645d93308c04d8840982af12101e differ diff --git a/Roll a Ball/Library/metadata/ec/ec7c645d93308c04d8840982af12101e.info b/Roll a Ball/Library/metadata/ec/ec7c645d93308c04d8840982af12101e.info new file mode 100644 index 0000000000000000000000000000000000000000..4485095919834b47d0a3ec35c4306a426fa226fb Binary files /dev/null and b/Roll a Ball/Library/metadata/ec/ec7c645d93308c04d8840982af12101e.info differ diff --git a/Roll a Ball/Library/metadata/ed/ed041e68439749a69d0efa0e3d896c2e b/Roll a Ball/Library/metadata/ed/ed041e68439749a69d0efa0e3d896c2e new file mode 100644 index 0000000000000000000000000000000000000000..2a23dfc78eb321bd5e6d0b11d8786b8d4185ed01 Binary files /dev/null and b/Roll a Ball/Library/metadata/ed/ed041e68439749a69d0efa0e3d896c2e differ diff --git a/Roll a Ball/Library/metadata/ed/ed041e68439749a69d0efa0e3d896c2e.info b/Roll a Ball/Library/metadata/ed/ed041e68439749a69d0efa0e3d896c2e.info new file mode 100644 index 0000000000000000000000000000000000000000..d93bf4f4724b8143ca55f8fd4d9fb5dcef02f44c Binary files /dev/null and b/Roll a Ball/Library/metadata/ed/ed041e68439749a69d0efa0e3d896c2e.info differ diff --git a/Roll a Ball/Library/metadata/ed/ed7343f30e3843b3afda8f8b02669cea b/Roll a Ball/Library/metadata/ed/ed7343f30e3843b3afda8f8b02669cea new file mode 100644 index 0000000000000000000000000000000000000000..70bd6f14fe3416234cb6f3951453f1db428d426b Binary files /dev/null and b/Roll a Ball/Library/metadata/ed/ed7343f30e3843b3afda8f8b02669cea differ diff --git a/Roll a Ball/Library/metadata/ed/ed7343f30e3843b3afda8f8b02669cea.info b/Roll a Ball/Library/metadata/ed/ed7343f30e3843b3afda8f8b02669cea.info new file mode 100644 index 0000000000000000000000000000000000000000..b7a0dac0f199c3f80e3e391c91b0ef15f018e2bf Binary files /dev/null and b/Roll a Ball/Library/metadata/ed/ed7343f30e3843b3afda8f8b02669cea.info differ diff --git a/Roll a Ball/Library/metadata/ed/ede0462698a4a5643aa9872c074acd38 b/Roll a Ball/Library/metadata/ed/ede0462698a4a5643aa9872c074acd38 new file mode 100644 index 0000000000000000000000000000000000000000..2c49e7f879aac563a2386ea1fb8c4c25864dc65f Binary files /dev/null and b/Roll a Ball/Library/metadata/ed/ede0462698a4a5643aa9872c074acd38 differ diff --git a/Roll a Ball/Library/metadata/ed/ede0462698a4a5643aa9872c074acd38.info b/Roll a Ball/Library/metadata/ed/ede0462698a4a5643aa9872c074acd38.info new file mode 100644 index 0000000000000000000000000000000000000000..fbbfcf786600f691d88bc9fe4c2db98cf38743b0 Binary files /dev/null and b/Roll a Ball/Library/metadata/ed/ede0462698a4a5643aa9872c074acd38.info differ diff --git a/Roll a Ball/Library/metadata/ed/edf97aac6cc5a437ebf600a06a2e5ac7 b/Roll a Ball/Library/metadata/ed/edf97aac6cc5a437ebf600a06a2e5ac7 new file mode 100644 index 0000000000000000000000000000000000000000..82b5457a46c381cc38319425e840e52697d9676c Binary files /dev/null and b/Roll a Ball/Library/metadata/ed/edf97aac6cc5a437ebf600a06a2e5ac7 differ diff --git a/Roll a Ball/Library/metadata/ed/edf97aac6cc5a437ebf600a06a2e5ac7.info b/Roll a Ball/Library/metadata/ed/edf97aac6cc5a437ebf600a06a2e5ac7.info new file mode 100644 index 0000000000000000000000000000000000000000..1f5f4ad1b884e2ed49e4d782ff02b9471c26ce58 Binary files /dev/null and b/Roll a Ball/Library/metadata/ed/edf97aac6cc5a437ebf600a06a2e5ac7.info differ diff --git a/Roll a Ball/Library/metadata/ee/ee148e281f3c41c5b4ff5f8a5afe5a6c b/Roll a Ball/Library/metadata/ee/ee148e281f3c41c5b4ff5f8a5afe5a6c new file mode 100644 index 0000000000000000000000000000000000000000..e74a7da80ac62ed514722351f98e2f47b3f4e6a2 Binary files /dev/null and b/Roll a Ball/Library/metadata/ee/ee148e281f3c41c5b4ff5f8a5afe5a6c differ diff --git a/Roll a Ball/Library/metadata/ee/ee148e281f3c41c5b4ff5f8a5afe5a6c.info b/Roll a Ball/Library/metadata/ee/ee148e281f3c41c5b4ff5f8a5afe5a6c.info new file mode 100644 index 0000000000000000000000000000000000000000..9667a63e5d4454d87c22bc066bfa26edde63d32a Binary files /dev/null and b/Roll a Ball/Library/metadata/ee/ee148e281f3c41c5b4ff5f8a5afe5a6c.info differ diff --git a/Roll a Ball/Library/metadata/ee/eeeb4a12456c270409ed1a0786284f65 b/Roll a Ball/Library/metadata/ee/eeeb4a12456c270409ed1a0786284f65 new file mode 100644 index 0000000000000000000000000000000000000000..2dd56d1dfebb1794a0db278b1d597564db6aafcd Binary files /dev/null and b/Roll a Ball/Library/metadata/ee/eeeb4a12456c270409ed1a0786284f65 differ diff --git a/Roll a Ball/Library/metadata/ee/eeeb4a12456c270409ed1a0786284f65.info b/Roll a Ball/Library/metadata/ee/eeeb4a12456c270409ed1a0786284f65.info new file mode 100644 index 0000000000000000000000000000000000000000..c0e6a5a03efd1b84eeb41d0d4c6757e9c8db920c Binary files /dev/null and b/Roll a Ball/Library/metadata/ee/eeeb4a12456c270409ed1a0786284f65.info differ diff --git a/Roll a Ball/Library/metadata/ee/eeed6954b3c264ca0b28a92aa6289bf0 b/Roll a Ball/Library/metadata/ee/eeed6954b3c264ca0b28a92aa6289bf0 new file mode 100644 index 0000000000000000000000000000000000000000..3c11f4b5744c2018f7e4ad719355b122fa465333 Binary files /dev/null and b/Roll a Ball/Library/metadata/ee/eeed6954b3c264ca0b28a92aa6289bf0 differ diff --git a/Roll a Ball/Library/metadata/ee/eeed6954b3c264ca0b28a92aa6289bf0.info b/Roll a Ball/Library/metadata/ee/eeed6954b3c264ca0b28a92aa6289bf0.info new file mode 100644 index 0000000000000000000000000000000000000000..4d381dddb3de001bd3669f16ecc50e8f4f5f7dcd Binary files /dev/null and b/Roll a Ball/Library/metadata/ee/eeed6954b3c264ca0b28a92aa6289bf0.info differ diff --git a/Roll a Ball/Library/metadata/ef/ef5a2781610c4f12a79939f717f789cf b/Roll a Ball/Library/metadata/ef/ef5a2781610c4f12a79939f717f789cf new file mode 100644 index 0000000000000000000000000000000000000000..7bd381cf1d16ee2a93bcc1e0231330a9091c4870 Binary files /dev/null and b/Roll a Ball/Library/metadata/ef/ef5a2781610c4f12a79939f717f789cf differ diff --git a/Roll a Ball/Library/metadata/ef/ef5a2781610c4f12a79939f717f789cf.info b/Roll a Ball/Library/metadata/ef/ef5a2781610c4f12a79939f717f789cf.info new file mode 100644 index 0000000000000000000000000000000000000000..dc9a16ca8eceeeab42583843573e99fcbdbbff2e Binary files /dev/null and b/Roll a Ball/Library/metadata/ef/ef5a2781610c4f12a79939f717f789cf.info differ diff --git a/Roll a Ball/Library/metadata/ef/effb76e1937b45ff8adf45e51a4c08cf b/Roll a Ball/Library/metadata/ef/effb76e1937b45ff8adf45e51a4c08cf new file mode 100644 index 0000000000000000000000000000000000000000..fafb3dd85ede6b2dd8df0a3da38df5b13f60167b Binary files /dev/null and b/Roll a Ball/Library/metadata/ef/effb76e1937b45ff8adf45e51a4c08cf differ diff --git a/Roll a Ball/Library/metadata/ef/effb76e1937b45ff8adf45e51a4c08cf.info b/Roll a Ball/Library/metadata/ef/effb76e1937b45ff8adf45e51a4c08cf.info new file mode 100644 index 0000000000000000000000000000000000000000..520e3017a95d16e677e7195e58ae1f9e987f791f Binary files /dev/null and b/Roll a Ball/Library/metadata/ef/effb76e1937b45ff8adf45e51a4c08cf.info differ diff --git a/Roll a Ball/Library/metadata/f0/f03b3e03b69e74ef9bd0f20377217a73 b/Roll a Ball/Library/metadata/f0/f03b3e03b69e74ef9bd0f20377217a73 new file mode 100644 index 0000000000000000000000000000000000000000..ec727beb95f3d2513f8fa1279b487b3092382c4f Binary files /dev/null and b/Roll a Ball/Library/metadata/f0/f03b3e03b69e74ef9bd0f20377217a73 differ diff --git a/Roll a Ball/Library/metadata/f0/f03b3e03b69e74ef9bd0f20377217a73.info b/Roll a Ball/Library/metadata/f0/f03b3e03b69e74ef9bd0f20377217a73.info new file mode 100644 index 0000000000000000000000000000000000000000..92aca79b8c6f4d4c92abffd6f7b7e203f79509fe Binary files /dev/null and b/Roll a Ball/Library/metadata/f0/f03b3e03b69e74ef9bd0f20377217a73.info differ diff --git a/Roll a Ball/Library/metadata/f0/f0f13f2ab3d6d13cfc6e4656824bfca8 b/Roll a Ball/Library/metadata/f0/f0f13f2ab3d6d13cfc6e4656824bfca8 new file mode 100644 index 0000000000000000000000000000000000000000..338d048d3611a351f44dc7c13178f7680a4b7a4a Binary files /dev/null and b/Roll a Ball/Library/metadata/f0/f0f13f2ab3d6d13cfc6e4656824bfca8 differ diff --git a/Roll a Ball/Library/metadata/f0/f0f13f2ab3d6d13cfc6e4656824bfca8.info b/Roll a Ball/Library/metadata/f0/f0f13f2ab3d6d13cfc6e4656824bfca8.info new file mode 100644 index 0000000000000000000000000000000000000000..b655a7470f42d769a262008ad1e9be42dda6104d Binary files /dev/null and b/Roll a Ball/Library/metadata/f0/f0f13f2ab3d6d13cfc6e4656824bfca8.info differ diff --git a/Roll a Ball/Library/metadata/f1/f1045c695c5bf4fb7b8509687bc60fc0 b/Roll a Ball/Library/metadata/f1/f1045c695c5bf4fb7b8509687bc60fc0 new file mode 100644 index 0000000000000000000000000000000000000000..2505e844a9f50b8c32a224a078db0664feb81b88 Binary files /dev/null and b/Roll a Ball/Library/metadata/f1/f1045c695c5bf4fb7b8509687bc60fc0 differ diff --git a/Roll a Ball/Library/metadata/f1/f1045c695c5bf4fb7b8509687bc60fc0.info b/Roll a Ball/Library/metadata/f1/f1045c695c5bf4fb7b8509687bc60fc0.info new file mode 100644 index 0000000000000000000000000000000000000000..edec865fd6fd91d1a922e494c6db030444df36a7 Binary files /dev/null and b/Roll a Ball/Library/metadata/f1/f1045c695c5bf4fb7b8509687bc60fc0.info differ diff --git a/Roll a Ball/Library/metadata/f1/f1687bb24464840ae9e1d253685ae0f6 b/Roll a Ball/Library/metadata/f1/f1687bb24464840ae9e1d253685ae0f6 new file mode 100644 index 0000000000000000000000000000000000000000..298641d6d4e38991a5f2052b757adc312701761e Binary files /dev/null and b/Roll a Ball/Library/metadata/f1/f1687bb24464840ae9e1d253685ae0f6 differ diff --git a/Roll a Ball/Library/metadata/f1/f1687bb24464840ae9e1d253685ae0f6.info b/Roll a Ball/Library/metadata/f1/f1687bb24464840ae9e1d253685ae0f6.info new file mode 100644 index 0000000000000000000000000000000000000000..822c69e5c6fb7113e89ff3270be9f67ecc4201ea Binary files /dev/null and b/Roll a Ball/Library/metadata/f1/f1687bb24464840ae9e1d253685ae0f6.info differ diff --git a/Roll a Ball/Library/metadata/f1/f1ea944dcf8849ebab391e461b99ccb7 b/Roll a Ball/Library/metadata/f1/f1ea944dcf8849ebab391e461b99ccb7 new file mode 100644 index 0000000000000000000000000000000000000000..0ddcc0ba1258a14f76cf26e4df9167677fcf7851 Binary files /dev/null and b/Roll a Ball/Library/metadata/f1/f1ea944dcf8849ebab391e461b99ccb7 differ diff --git a/Roll a Ball/Library/metadata/f1/f1ea944dcf8849ebab391e461b99ccb7.info b/Roll a Ball/Library/metadata/f1/f1ea944dcf8849ebab391e461b99ccb7.info new file mode 100644 index 0000000000000000000000000000000000000000..c82a93a85de169d6e71f20460a7dbf1c4e037462 Binary files /dev/null and b/Roll a Ball/Library/metadata/f1/f1ea944dcf8849ebab391e461b99ccb7.info differ diff --git a/Roll a Ball/Library/metadata/f2/f2233ba26b028cc4b9e58681e7a22dac b/Roll a Ball/Library/metadata/f2/f2233ba26b028cc4b9e58681e7a22dac new file mode 100644 index 0000000000000000000000000000000000000000..1202a18404468e94623855f7994f80f93156baf6 Binary files /dev/null and b/Roll a Ball/Library/metadata/f2/f2233ba26b028cc4b9e58681e7a22dac differ diff --git a/Roll a Ball/Library/metadata/f2/f2233ba26b028cc4b9e58681e7a22dac.info b/Roll a Ball/Library/metadata/f2/f2233ba26b028cc4b9e58681e7a22dac.info new file mode 100644 index 0000000000000000000000000000000000000000..1e0b8a804c1ae9bd6fd20addc58fee8d44e2fcca Binary files /dev/null and b/Roll a Ball/Library/metadata/f2/f2233ba26b028cc4b9e58681e7a22dac.info differ diff --git a/Roll a Ball/Library/metadata/f2/f28fcced5af094cf78eb4e1109a71981 b/Roll a Ball/Library/metadata/f2/f28fcced5af094cf78eb4e1109a71981 new file mode 100644 index 0000000000000000000000000000000000000000..f57ccd8a96b2024f2013c17bbd95f167499a3113 Binary files /dev/null and b/Roll a Ball/Library/metadata/f2/f28fcced5af094cf78eb4e1109a71981 differ diff --git a/Roll a Ball/Library/metadata/f2/f28fcced5af094cf78eb4e1109a71981.info b/Roll a Ball/Library/metadata/f2/f28fcced5af094cf78eb4e1109a71981.info new file mode 100644 index 0000000000000000000000000000000000000000..d4fdbb120b3ceed852e416079919f515101d53c0 Binary files /dev/null and b/Roll a Ball/Library/metadata/f2/f28fcced5af094cf78eb4e1109a71981.info differ diff --git a/Roll a Ball/Library/metadata/f3/f34f5fa2437664b2a81b4a7f34df87ad b/Roll a Ball/Library/metadata/f3/f34f5fa2437664b2a81b4a7f34df87ad new file mode 100644 index 0000000000000000000000000000000000000000..da4fc7a86fb4467c041277b3ea81e823d406e976 Binary files /dev/null and b/Roll a Ball/Library/metadata/f3/f34f5fa2437664b2a81b4a7f34df87ad differ diff --git a/Roll a Ball/Library/metadata/f3/f34f5fa2437664b2a81b4a7f34df87ad.info b/Roll a Ball/Library/metadata/f3/f34f5fa2437664b2a81b4a7f34df87ad.info new file mode 100644 index 0000000000000000000000000000000000000000..bea2197cdf7d7b6c558561436e170301d56d47dd Binary files /dev/null and b/Roll a Ball/Library/metadata/f3/f34f5fa2437664b2a81b4a7f34df87ad.info differ diff --git a/Roll a Ball/Library/metadata/f4/f4688fdb7df04437aeb418b961361dc5 b/Roll a Ball/Library/metadata/f4/f4688fdb7df04437aeb418b961361dc5 new file mode 100644 index 0000000000000000000000000000000000000000..d25433763a78fa960e75eae611c5411045379111 Binary files /dev/null and b/Roll a Ball/Library/metadata/f4/f4688fdb7df04437aeb418b961361dc5 differ diff --git a/Roll a Ball/Library/metadata/f4/f4688fdb7df04437aeb418b961361dc5.info b/Roll a Ball/Library/metadata/f4/f4688fdb7df04437aeb418b961361dc5.info new file mode 100644 index 0000000000000000000000000000000000000000..06ec8844313bb803ebf02cd24a4da1ef72b935f7 Binary files /dev/null and b/Roll a Ball/Library/metadata/f4/f4688fdb7df04437aeb418b961361dc5.info differ diff --git a/Roll a Ball/Library/metadata/f4/f4935fb862d54980b1bcbca942962642 b/Roll a Ball/Library/metadata/f4/f4935fb862d54980b1bcbca942962642 new file mode 100644 index 0000000000000000000000000000000000000000..8fe1eb3aa2195ab6d885038e9f5cf799a94ffa39 Binary files /dev/null and b/Roll a Ball/Library/metadata/f4/f4935fb862d54980b1bcbca942962642 differ diff --git a/Roll a Ball/Library/metadata/f4/f4935fb862d54980b1bcbca942962642.info b/Roll a Ball/Library/metadata/f4/f4935fb862d54980b1bcbca942962642.info new file mode 100644 index 0000000000000000000000000000000000000000..47663e09610574e8d87443ccb96b2a2802b17b6a Binary files /dev/null and b/Roll a Ball/Library/metadata/f4/f4935fb862d54980b1bcbca942962642.info differ diff --git a/Roll a Ball/Library/metadata/f4/f499e12eaeb145bf9022f581c0b7fa5b b/Roll a Ball/Library/metadata/f4/f499e12eaeb145bf9022f581c0b7fa5b new file mode 100644 index 0000000000000000000000000000000000000000..f42507a433c094190e628853b2cd84640b436946 Binary files /dev/null and b/Roll a Ball/Library/metadata/f4/f499e12eaeb145bf9022f581c0b7fa5b differ diff --git a/Roll a Ball/Library/metadata/f4/f499e12eaeb145bf9022f581c0b7fa5b.info b/Roll a Ball/Library/metadata/f4/f499e12eaeb145bf9022f581c0b7fa5b.info new file mode 100644 index 0000000000000000000000000000000000000000..6632a136c0afc4adadcaaf7e18b2d8f93cc37495 Binary files /dev/null and b/Roll a Ball/Library/metadata/f4/f499e12eaeb145bf9022f581c0b7fa5b.info differ diff --git a/Roll a Ball/Library/metadata/f4/f4c7193663918411c8f78e3cf844cb9e b/Roll a Ball/Library/metadata/f4/f4c7193663918411c8f78e3cf844cb9e new file mode 100644 index 0000000000000000000000000000000000000000..cb85c69fad7390173299b30734cb9a3abbcdc332 Binary files /dev/null and b/Roll a Ball/Library/metadata/f4/f4c7193663918411c8f78e3cf844cb9e differ diff --git a/Roll a Ball/Library/metadata/f4/f4c7193663918411c8f78e3cf844cb9e.info b/Roll a Ball/Library/metadata/f4/f4c7193663918411c8f78e3cf844cb9e.info new file mode 100644 index 0000000000000000000000000000000000000000..52ebfb7dd383bdbf3c23a9588fec6fe6ff917c19 Binary files /dev/null and b/Roll a Ball/Library/metadata/f4/f4c7193663918411c8f78e3cf844cb9e.info differ diff --git a/Roll a Ball/Library/metadata/f5/f5600e6ae5a1464da659eca36bef9d64 b/Roll a Ball/Library/metadata/f5/f5600e6ae5a1464da659eca36bef9d64 new file mode 100644 index 0000000000000000000000000000000000000000..31be259a10bf83bb9ef8783150c4b9af916a996d Binary files /dev/null and b/Roll a Ball/Library/metadata/f5/f5600e6ae5a1464da659eca36bef9d64 differ diff --git a/Roll a Ball/Library/metadata/f5/f5600e6ae5a1464da659eca36bef9d64.info b/Roll a Ball/Library/metadata/f5/f5600e6ae5a1464da659eca36bef9d64.info new file mode 100644 index 0000000000000000000000000000000000000000..03d4ed2814d2f4dc41d454269895f8813c893669 Binary files /dev/null and b/Roll a Ball/Library/metadata/f5/f5600e6ae5a1464da659eca36bef9d64.info differ diff --git a/Roll a Ball/Library/metadata/f5/f5f67c52d1564df4a8936ccd202a3bd8 b/Roll a Ball/Library/metadata/f5/f5f67c52d1564df4a8936ccd202a3bd8 new file mode 100644 index 0000000000000000000000000000000000000000..047dbd0a035f4d9bdd4502113a677f4320669676 Binary files /dev/null and b/Roll a Ball/Library/metadata/f5/f5f67c52d1564df4a8936ccd202a3bd8 differ diff --git a/Roll a Ball/Library/metadata/f5/f5f67c52d1564df4a8936ccd202a3bd8.info b/Roll a Ball/Library/metadata/f5/f5f67c52d1564df4a8936ccd202a3bd8.info new file mode 100644 index 0000000000000000000000000000000000000000..311e931a918064329bd4b8c40b14b9f1c460b161 Binary files /dev/null and b/Roll a Ball/Library/metadata/f5/f5f67c52d1564df4a8936ccd202a3bd8.info differ diff --git a/Roll a Ball/Library/metadata/f6/f68d88b9933cd4204925b22192bf15b4 b/Roll a Ball/Library/metadata/f6/f68d88b9933cd4204925b22192bf15b4 new file mode 100644 index 0000000000000000000000000000000000000000..6856aefd579a425b687885b3022aad02294c8216 Binary files /dev/null and b/Roll a Ball/Library/metadata/f6/f68d88b9933cd4204925b22192bf15b4 differ diff --git a/Roll a Ball/Library/metadata/f6/f68d88b9933cd4204925b22192bf15b4.info b/Roll a Ball/Library/metadata/f6/f68d88b9933cd4204925b22192bf15b4.info new file mode 100644 index 0000000000000000000000000000000000000000..75b097bba895b038a14d861f2389200afa02d667 Binary files /dev/null and b/Roll a Ball/Library/metadata/f6/f68d88b9933cd4204925b22192bf15b4.info differ diff --git a/Roll a Ball/Library/metadata/f6/f695b5f9415c40b39ae877eaff41c96e b/Roll a Ball/Library/metadata/f6/f695b5f9415c40b39ae877eaff41c96e new file mode 100644 index 0000000000000000000000000000000000000000..0338fd0a1f6e3903db8a15632cf23b7fb191fce2 Binary files /dev/null and b/Roll a Ball/Library/metadata/f6/f695b5f9415c40b39ae877eaff41c96e differ diff --git a/Roll a Ball/Library/metadata/f6/f695b5f9415c40b39ae877eaff41c96e.info b/Roll a Ball/Library/metadata/f6/f695b5f9415c40b39ae877eaff41c96e.info new file mode 100644 index 0000000000000000000000000000000000000000..1c032fb42b2eca727af55bdbd42a5ac5e39452fe Binary files /dev/null and b/Roll a Ball/Library/metadata/f6/f695b5f9415c40b39ae877eaff41c96e.info differ diff --git a/Roll a Ball/Library/metadata/f7/f70555f144d8491a825f0804e09c671c b/Roll a Ball/Library/metadata/f7/f70555f144d8491a825f0804e09c671c new file mode 100644 index 0000000000000000000000000000000000000000..32d77827a718a687380cca3b834b3cca2c2b50ad Binary files /dev/null and b/Roll a Ball/Library/metadata/f7/f70555f144d8491a825f0804e09c671c differ diff --git a/Roll a Ball/Library/metadata/f7/f70555f144d8491a825f0804e09c671c.info b/Roll a Ball/Library/metadata/f7/f70555f144d8491a825f0804e09c671c.info new file mode 100644 index 0000000000000000000000000000000000000000..df250ee94b545787a81bd494fc043c730ddbf7b9 Binary files /dev/null and b/Roll a Ball/Library/metadata/f7/f70555f144d8491a825f0804e09c671c.info differ diff --git a/Roll a Ball/Library/metadata/f7/f74142ec8a4cd4fb1b0ff6cf5c3075af b/Roll a Ball/Library/metadata/f7/f74142ec8a4cd4fb1b0ff6cf5c3075af new file mode 100644 index 0000000000000000000000000000000000000000..cf371de594f5953e96de2da9d6c62dc2c1e7ca39 Binary files /dev/null and b/Roll a Ball/Library/metadata/f7/f74142ec8a4cd4fb1b0ff6cf5c3075af differ diff --git a/Roll a Ball/Library/metadata/f7/f74142ec8a4cd4fb1b0ff6cf5c3075af.info b/Roll a Ball/Library/metadata/f7/f74142ec8a4cd4fb1b0ff6cf5c3075af.info new file mode 100644 index 0000000000000000000000000000000000000000..d791acf2050432815410e265f51c69d1920a3a94 Binary files /dev/null and b/Roll a Ball/Library/metadata/f7/f74142ec8a4cd4fb1b0ff6cf5c3075af.info differ diff --git a/Roll a Ball/Library/metadata/f7/f7a8357347c80dc69c08d0b1a05e2122 b/Roll a Ball/Library/metadata/f7/f7a8357347c80dc69c08d0b1a05e2122 new file mode 100644 index 0000000000000000000000000000000000000000..288982354519a0dee0e30668a1fb6d7ad023da2d Binary files /dev/null and b/Roll a Ball/Library/metadata/f7/f7a8357347c80dc69c08d0b1a05e2122 differ diff --git a/Roll a Ball/Library/metadata/f7/f7a8357347c80dc69c08d0b1a05e2122.info b/Roll a Ball/Library/metadata/f7/f7a8357347c80dc69c08d0b1a05e2122.info new file mode 100644 index 0000000000000000000000000000000000000000..429760b935f57f98148745ee14249ca2cd21d2b1 Binary files /dev/null and b/Roll a Ball/Library/metadata/f7/f7a8357347c80dc69c08d0b1a05e2122.info differ diff --git a/Roll a Ball/Library/metadata/f8/f851ca8f9604f442aafccf60a6713ce9 b/Roll a Ball/Library/metadata/f8/f851ca8f9604f442aafccf60a6713ce9 new file mode 100644 index 0000000000000000000000000000000000000000..385e10164b77bae77045b887b641d4fb8b2eb397 Binary files /dev/null and b/Roll a Ball/Library/metadata/f8/f851ca8f9604f442aafccf60a6713ce9 differ diff --git a/Roll a Ball/Library/metadata/f8/f851ca8f9604f442aafccf60a6713ce9.info b/Roll a Ball/Library/metadata/f8/f851ca8f9604f442aafccf60a6713ce9.info new file mode 100644 index 0000000000000000000000000000000000000000..64c8ec5f6d7a03ce1f52762fcc24e5a075b3f595 Binary files /dev/null and b/Roll a Ball/Library/metadata/f8/f851ca8f9604f442aafccf60a6713ce9.info differ diff --git a/Roll a Ball/Library/metadata/f8/f8e6a2d47aba4c6c9b3c5a72d9f48da5 b/Roll a Ball/Library/metadata/f8/f8e6a2d47aba4c6c9b3c5a72d9f48da5 new file mode 100644 index 0000000000000000000000000000000000000000..0c9014cfbdfc25e727dfa522f523ae478de01adb Binary files /dev/null and b/Roll a Ball/Library/metadata/f8/f8e6a2d47aba4c6c9b3c5a72d9f48da5 differ diff --git a/Roll a Ball/Library/metadata/f8/f8e6a2d47aba4c6c9b3c5a72d9f48da5.info b/Roll a Ball/Library/metadata/f8/f8e6a2d47aba4c6c9b3c5a72d9f48da5.info new file mode 100644 index 0000000000000000000000000000000000000000..be5c771b1d418210e43c9df3ef98cb38546693be Binary files /dev/null and b/Roll a Ball/Library/metadata/f8/f8e6a2d47aba4c6c9b3c5a72d9f48da5.info differ diff --git a/Roll a Ball/Library/metadata/f8/f8eca3a711f4842eba0c52ea9885ef7f b/Roll a Ball/Library/metadata/f8/f8eca3a711f4842eba0c52ea9885ef7f new file mode 100644 index 0000000000000000000000000000000000000000..2c7f9170db30b6281d29e601bafa91d6f677c1be Binary files /dev/null and b/Roll a Ball/Library/metadata/f8/f8eca3a711f4842eba0c52ea9885ef7f differ diff --git a/Roll a Ball/Library/metadata/f8/f8eca3a711f4842eba0c52ea9885ef7f.info b/Roll a Ball/Library/metadata/f8/f8eca3a711f4842eba0c52ea9885ef7f.info new file mode 100644 index 0000000000000000000000000000000000000000..e12a39905c6feb772274abeb996e974ca375217f Binary files /dev/null and b/Roll a Ball/Library/metadata/f8/f8eca3a711f4842eba0c52ea9885ef7f.info differ diff --git a/Roll a Ball/Library/metadata/f9/f944311c8fff2479fa3ba741f6039fc8 b/Roll a Ball/Library/metadata/f9/f944311c8fff2479fa3ba741f6039fc8 new file mode 100644 index 0000000000000000000000000000000000000000..af189deb997d36f297378f37c48e09a3005a548a Binary files /dev/null and b/Roll a Ball/Library/metadata/f9/f944311c8fff2479fa3ba741f6039fc8 differ diff --git a/Roll a Ball/Library/metadata/f9/f944311c8fff2479fa3ba741f6039fc8.info b/Roll a Ball/Library/metadata/f9/f944311c8fff2479fa3ba741f6039fc8.info new file mode 100644 index 0000000000000000000000000000000000000000..a08b6c23407e30d6f0e80a75a583c132d3670935 Binary files /dev/null and b/Roll a Ball/Library/metadata/f9/f944311c8fff2479fa3ba741f6039fc8.info differ diff --git a/Roll a Ball/Library/metadata/fa/fa27413e9edb06a6058d6c894eca0338 b/Roll a Ball/Library/metadata/fa/fa27413e9edb06a6058d6c894eca0338 new file mode 100644 index 0000000000000000000000000000000000000000..84c3157d49611bd3e5c11a3396c02070dcb4d0c7 Binary files /dev/null and b/Roll a Ball/Library/metadata/fa/fa27413e9edb06a6058d6c894eca0338 differ diff --git a/Roll a Ball/Library/metadata/fa/fa27413e9edb06a6058d6c894eca0338.info b/Roll a Ball/Library/metadata/fa/fa27413e9edb06a6058d6c894eca0338.info new file mode 100644 index 0000000000000000000000000000000000000000..5c6f1f0c4260bd6eef34b261569b12d50fd46bba Binary files /dev/null and b/Roll a Ball/Library/metadata/fa/fa27413e9edb06a6058d6c894eca0338.info differ diff --git a/Roll a Ball/Library/metadata/fa/fa4ff09b6aaaa4df29a884efa38bce56 b/Roll a Ball/Library/metadata/fa/fa4ff09b6aaaa4df29a884efa38bce56 new file mode 100644 index 0000000000000000000000000000000000000000..8ca9d053529aeaa771750afe20b2a0b66689d73c Binary files /dev/null and b/Roll a Ball/Library/metadata/fa/fa4ff09b6aaaa4df29a884efa38bce56 differ diff --git a/Roll a Ball/Library/metadata/fa/fa4ff09b6aaaa4df29a884efa38bce56.info b/Roll a Ball/Library/metadata/fa/fa4ff09b6aaaa4df29a884efa38bce56.info new file mode 100644 index 0000000000000000000000000000000000000000..b65b05950030ff0594a1a685d2003cb23aabe9b9 Binary files /dev/null and b/Roll a Ball/Library/metadata/fa/fa4ff09b6aaaa4df29a884efa38bce56.info differ diff --git a/Roll a Ball/Library/metadata/fa/fa6bd40a216346b783a4cce741d277a5 b/Roll a Ball/Library/metadata/fa/fa6bd40a216346b783a4cce741d277a5 new file mode 100644 index 0000000000000000000000000000000000000000..47dd57cc590395ebc1533a5d8853d4de8acccbdc Binary files /dev/null and b/Roll a Ball/Library/metadata/fa/fa6bd40a216346b783a4cce741d277a5 differ diff --git a/Roll a Ball/Library/metadata/fa/fa6bd40a216346b783a4cce741d277a5.info b/Roll a Ball/Library/metadata/fa/fa6bd40a216346b783a4cce741d277a5.info new file mode 100644 index 0000000000000000000000000000000000000000..6ec0fd1059b471c52d118777726c8a1f96978ca5 Binary files /dev/null and b/Roll a Ball/Library/metadata/fa/fa6bd40a216346b783a4cce741d277a5.info differ diff --git a/Roll a Ball/Library/metadata/fb/fb5730e24283d0c489e5c7d0bee023d9 b/Roll a Ball/Library/metadata/fb/fb5730e24283d0c489e5c7d0bee023d9 new file mode 100644 index 0000000000000000000000000000000000000000..187df9c017263aa9b2ce76e036f334117fa456b6 Binary files /dev/null and b/Roll a Ball/Library/metadata/fb/fb5730e24283d0c489e5c7d0bee023d9 differ diff --git a/Roll a Ball/Library/metadata/fb/fb5730e24283d0c489e5c7d0bee023d9.info b/Roll a Ball/Library/metadata/fb/fb5730e24283d0c489e5c7d0bee023d9.info new file mode 100644 index 0000000000000000000000000000000000000000..3348ce39114ab501f6fc7e73209fea59c72337a9 Binary files /dev/null and b/Roll a Ball/Library/metadata/fb/fb5730e24283d0c489e5c7d0bee023d9.info differ diff --git a/Roll a Ball/Library/metadata/fc/fc3a810351931f5e6183e16b9beb5563 b/Roll a Ball/Library/metadata/fc/fc3a810351931f5e6183e16b9beb5563 new file mode 100644 index 0000000000000000000000000000000000000000..1985d67d5f884df08d33e40d6fb7c0a99dfc2517 Binary files /dev/null and b/Roll a Ball/Library/metadata/fc/fc3a810351931f5e6183e16b9beb5563 differ diff --git a/Roll a Ball/Library/metadata/fc/fc3a810351931f5e6183e16b9beb5563.info b/Roll a Ball/Library/metadata/fc/fc3a810351931f5e6183e16b9beb5563.info new file mode 100644 index 0000000000000000000000000000000000000000..8a7604cf4d19d080eb8da4453229f621c888832b Binary files /dev/null and b/Roll a Ball/Library/metadata/fc/fc3a810351931f5e6183e16b9beb5563.info differ diff --git a/Roll a Ball/Library/metadata/fc/fc46f91ea1e8e4ca2ab693fef9156dbe b/Roll a Ball/Library/metadata/fc/fc46f91ea1e8e4ca2ab693fef9156dbe new file mode 100644 index 0000000000000000000000000000000000000000..d18945910786c06b6ecbc047f8db87e68dde02c4 Binary files /dev/null and b/Roll a Ball/Library/metadata/fc/fc46f91ea1e8e4ca2ab693fef9156dbe differ diff --git a/Roll a Ball/Library/metadata/fc/fc46f91ea1e8e4ca2ab693fef9156dbe.info b/Roll a Ball/Library/metadata/fc/fc46f91ea1e8e4ca2ab693fef9156dbe.info new file mode 100644 index 0000000000000000000000000000000000000000..a49cb71668ee15b2f8c58ce90658f8942a50d028 Binary files /dev/null and b/Roll a Ball/Library/metadata/fc/fc46f91ea1e8e4ca2ab693fef9156dbe.info differ diff --git a/Roll a Ball/Library/metadata/fc/fcc60c1d6bb544d9b712b652f418ff3a b/Roll a Ball/Library/metadata/fc/fcc60c1d6bb544d9b712b652f418ff3a new file mode 100644 index 0000000000000000000000000000000000000000..bcdd65e094f65be160a878c2d9115566624e4ea1 Binary files /dev/null and b/Roll a Ball/Library/metadata/fc/fcc60c1d6bb544d9b712b652f418ff3a differ diff --git a/Roll a Ball/Library/metadata/fc/fcc60c1d6bb544d9b712b652f418ff3a.info b/Roll a Ball/Library/metadata/fc/fcc60c1d6bb544d9b712b652f418ff3a.info new file mode 100644 index 0000000000000000000000000000000000000000..ff31018836036631fb0f2ddb5a10d18706fe334d Binary files /dev/null and b/Roll a Ball/Library/metadata/fc/fcc60c1d6bb544d9b712b652f418ff3a.info differ diff --git a/Roll a Ball/Library/metadata/fd/fd0a39b4d296d4d509b4f1dbd08d0630 b/Roll a Ball/Library/metadata/fd/fd0a39b4d296d4d509b4f1dbd08d0630 new file mode 100644 index 0000000000000000000000000000000000000000..96d0f99d740137010e22ebd73c0d625af5343a97 Binary files /dev/null and b/Roll a Ball/Library/metadata/fd/fd0a39b4d296d4d509b4f1dbd08d0630 differ diff --git a/Roll a Ball/Library/metadata/fd/fd0a39b4d296d4d509b4f1dbd08d0630.info b/Roll a Ball/Library/metadata/fd/fd0a39b4d296d4d509b4f1dbd08d0630.info new file mode 100644 index 0000000000000000000000000000000000000000..37519b3eb72bfe26884531749209f3bcaf37442c Binary files /dev/null and b/Roll a Ball/Library/metadata/fd/fd0a39b4d296d4d509b4f1dbd08d0630.info differ diff --git a/Roll a Ball/Library/metadata/fd/fd382b8abbd6145c29e32af0e2a26d88 b/Roll a Ball/Library/metadata/fd/fd382b8abbd6145c29e32af0e2a26d88 new file mode 100644 index 0000000000000000000000000000000000000000..dd641e84c6fbfef649beb82faf27008e6f3ad568 Binary files /dev/null and b/Roll a Ball/Library/metadata/fd/fd382b8abbd6145c29e32af0e2a26d88 differ diff --git a/Roll a Ball/Library/metadata/fd/fd382b8abbd6145c29e32af0e2a26d88.info b/Roll a Ball/Library/metadata/fd/fd382b8abbd6145c29e32af0e2a26d88.info new file mode 100644 index 0000000000000000000000000000000000000000..8ed9e09d44f86d849df73dfea5b379fa6f74c303 Binary files /dev/null and b/Roll a Ball/Library/metadata/fd/fd382b8abbd6145c29e32af0e2a26d88.info differ diff --git a/Roll a Ball/Library/metadata/fd/fd871a8be47119612f7c254e96a822b7 b/Roll a Ball/Library/metadata/fd/fd871a8be47119612f7c254e96a822b7 new file mode 100644 index 0000000000000000000000000000000000000000..44460f81579055e71c24193e9824485397112772 Binary files /dev/null and b/Roll a Ball/Library/metadata/fd/fd871a8be47119612f7c254e96a822b7 differ diff --git a/Roll a Ball/Library/metadata/fd/fd871a8be47119612f7c254e96a822b7.info b/Roll a Ball/Library/metadata/fd/fd871a8be47119612f7c254e96a822b7.info new file mode 100644 index 0000000000000000000000000000000000000000..34db3616d38530c0cb29b6225ae4115a2a2d904a Binary files /dev/null and b/Roll a Ball/Library/metadata/fd/fd871a8be47119612f7c254e96a822b7.info differ diff --git a/Roll a Ball/Library/metadata/fe/fe684bbd80eab45778b9eb316893ff7c b/Roll a Ball/Library/metadata/fe/fe684bbd80eab45778b9eb316893ff7c new file mode 100644 index 0000000000000000000000000000000000000000..ef397d3b13e8e1c09272643cac675b06b6511049 Binary files /dev/null and b/Roll a Ball/Library/metadata/fe/fe684bbd80eab45778b9eb316893ff7c differ diff --git a/Roll a Ball/Library/metadata/fe/fe684bbd80eab45778b9eb316893ff7c.info b/Roll a Ball/Library/metadata/fe/fe684bbd80eab45778b9eb316893ff7c.info new file mode 100644 index 0000000000000000000000000000000000000000..ac9f6b9aa7548d16ba5a562a66d2a2a4952af2a2 Binary files /dev/null and b/Roll a Ball/Library/metadata/fe/fe684bbd80eab45778b9eb316893ff7c.info differ diff --git a/Roll a Ball/Library/metadata/fe/fea24dc53b50441a9b2a8f9473fede33 b/Roll a Ball/Library/metadata/fe/fea24dc53b50441a9b2a8f9473fede33 new file mode 100644 index 0000000000000000000000000000000000000000..37e56867a5c9b3ea073489c0c90e9ff01337b0ce Binary files /dev/null and b/Roll a Ball/Library/metadata/fe/fea24dc53b50441a9b2a8f9473fede33 differ diff --git a/Roll a Ball/Library/metadata/fe/fea24dc53b50441a9b2a8f9473fede33.info b/Roll a Ball/Library/metadata/fe/fea24dc53b50441a9b2a8f9473fede33.info new file mode 100644 index 0000000000000000000000000000000000000000..468babccddf0734bd62f109a7da83b751b868ccd Binary files /dev/null and b/Roll a Ball/Library/metadata/fe/fea24dc53b50441a9b2a8f9473fede33.info differ diff --git a/Roll a Ball/Library/metadata/fe/fea49a0730244a98bf1087f7ca9410a8 b/Roll a Ball/Library/metadata/fe/fea49a0730244a98bf1087f7ca9410a8 new file mode 100644 index 0000000000000000000000000000000000000000..7674ec43a92b4d2bb349654b013ac0f7549dccbc Binary files /dev/null and b/Roll a Ball/Library/metadata/fe/fea49a0730244a98bf1087f7ca9410a8 differ diff --git a/Roll a Ball/Library/metadata/fe/fea49a0730244a98bf1087f7ca9410a8.info b/Roll a Ball/Library/metadata/fe/fea49a0730244a98bf1087f7ca9410a8.info new file mode 100644 index 0000000000000000000000000000000000000000..044ecf7168f97473a307937ba9465680baa896ce Binary files /dev/null and b/Roll a Ball/Library/metadata/fe/fea49a0730244a98bf1087f7ca9410a8.info differ diff --git a/Roll a Ball/Library/metadata/fe/fec197bad419341558f81f2ec8a05e18 b/Roll a Ball/Library/metadata/fe/fec197bad419341558f81f2ec8a05e18 new file mode 100644 index 0000000000000000000000000000000000000000..141d507b473ca9ab577367ae44909808fd2e6917 Binary files /dev/null and b/Roll a Ball/Library/metadata/fe/fec197bad419341558f81f2ec8a05e18 differ diff --git a/Roll a Ball/Library/metadata/fe/fec197bad419341558f81f2ec8a05e18.info b/Roll a Ball/Library/metadata/fe/fec197bad419341558f81f2ec8a05e18.info new file mode 100644 index 0000000000000000000000000000000000000000..f2e3bcd5c0a7a0fa1021054da461bf9803d66fb0 Binary files /dev/null and b/Roll a Ball/Library/metadata/fe/fec197bad419341558f81f2ec8a05e18.info differ diff --git a/Roll a Ball/Library/metadata/fe/fed9dda667cab45d398d06402bba03f4 b/Roll a Ball/Library/metadata/fe/fed9dda667cab45d398d06402bba03f4 new file mode 100644 index 0000000000000000000000000000000000000000..c1390daa7fd9c879a07d71bcd2fc7d08c64ed870 Binary files /dev/null and b/Roll a Ball/Library/metadata/fe/fed9dda667cab45d398d06402bba03f4 differ diff --git a/Roll a Ball/Library/metadata/fe/fed9dda667cab45d398d06402bba03f4.info b/Roll a Ball/Library/metadata/fe/fed9dda667cab45d398d06402bba03f4.info new file mode 100644 index 0000000000000000000000000000000000000000..367ed7ad51f826c7b40df4e9ef73749865fae399 Binary files /dev/null and b/Roll a Ball/Library/metadata/fe/fed9dda667cab45d398d06402bba03f4.info differ diff --git a/Roll a Ball/Library/shadercompiler-UnityShaderCompiler.exe0.log b/Roll a Ball/Library/shadercompiler-UnityShaderCompiler.exe0.log new file mode 100644 index 0000000000000000000000000000000000000000..ba949fcc52b02009f69f41f963575f2be52b983f --- /dev/null +++ b/Roll a Ball/Library/shadercompiler-UnityShaderCompiler.exe0.log @@ -0,0 +1,75 @@ +Base path: D:/Unity/2018.4.16f1/Editor/Data +Cmd: initializeCompiler +Cmd: compileSnippet + api=4 type=0 insize=1582 outsize=690 kw= pd=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR ok=1 +Cmd: compileSnippet + api=4 type=1 insize=1582 outsize=354 kw= pd=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR ok=1 +Cmd: preprocess + insize=3207 outsize=1205 ok=1 +Cmd: compileSnippet + api=4 type=0 insize=2445 outsize=1350 kw= pd=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR ok=1 +Cmd: compileSnippet + api=4 type=1 insize=2445 outsize=998 kw= pd=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR ok=1 +Cmd: compileSnippet + api=4 type=0 insize=1842 outsize=1082 kw= pd=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR ok=1 +Cmd: compileSnippet + api=4 type=1 insize=1842 outsize=798 kw= pd=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR ok=1 +Cmd: compileSnippet + api=4 type=0 insize=1701 outsize=1094 kw= pd=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR ok=1 +Cmd: compileSnippet + api=4 type=1 insize=1701 outsize=522 kw= pd=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR ok=1 +Cmd: compileSnippet + api=4 type=0 insize=16605 outsize=5666 kw=_SUNDISK_SIMPLE pd=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR ok=1 +Cmd: compileSnippet + api=4 type=1 insize=16605 outsize=902 kw=_SUNDISK_SIMPLE pd=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR ok=1 +Cmd: compileSnippet + api=4 type=0 insize=1341 outsize=790 kw= pd=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR ok=1 +Cmd: compileSnippet + api=4 type=1 insize=1341 outsize=402 kw= pd=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR ok=1 +Cmd: compileSnippet + api=4 type=0 insize=1278 outsize=1414 kw=UNITY_PASS_SHADOWCASTER SHADOWS_DEPTH pd=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR ok=1 +Cmd: compileSnippet + api=4 type=1 insize=1278 outsize=218 kw=UNITY_PASS_SHADOWCASTER SHADOWS_DEPTH pd=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR ok=1 +Cmd: compileSnippet + api=4 type=0 insize=1564 outsize=1894 kw=UNITY_PASS_FORWARDBASE DIRECTIONAL LIGHTPROBE_SH pd=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR ok=1 +Cmd: compileSnippet + api=4 type=1 insize=1564 outsize=6814 kw=UNITY_PASS_FORWARDBASE DIRECTIONAL LIGHTPROBE_SH pd=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR ok=1 +Cmd: compileSnippet + api=4 type=0 insize=1426 outsize=1690 kw=UNITY_PASS_FORWARDADD DIRECTIONAL pd=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR ok=1 +Cmd: compileSnippet + api=4 type=1 insize=1426 outsize=3378 kw=UNITY_PASS_FORWARDADD DIRECTIONAL pd=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR ok=1 +Cmd: compileSnippet + api=4 type=0 insize=1878 outsize=1082 kw= pd=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR ok=1 +Cmd: compileSnippet + api=4 type=1 insize=1878 outsize=778 kw= pd=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR ok=1 +Cmd: compileSnippet + api=4 type=0 insize=11846 outsize=1258 kw=SHADOWS_SPLIT_SPHERES pd=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR ok=1 +Cmd: compileSnippet + api=4 type=1 insize=11846 outsize=5706 kw=SHADOWS_SPLIT_SPHERES pd=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR ok=1 +Cmd: compileSnippet + api=4 type=0 insize=1564 outsize=2002 kw=UNITY_PASS_FORWARDBASE DIRECTIONAL SHADOWS_SCREEN LIGHTPROBE_SH pd=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR ok=1 +Cmd: compileSnippet + api=4 type=1 insize=1564 outsize=7190 kw=UNITY_PASS_FORWARDBASE DIRECTIONAL SHADOWS_SCREEN LIGHTPROBE_SH pd=UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR ok=1 +Cmd: initializeCompiler +Cmd: initializeCompiler +Cmd: initializeCompiler +Cmd: initializeCompiler +Cmd: initializeCompiler +Cmd: initializeCompiler +Cmd: initializeCompiler +Cmd: initializeCompiler +Cmd: initializeCompiler +Cmd: initializeCompiler +Cmd: initializeCompiler +Cmd: initializeCompiler +Cmd: initializeCompiler +Cmd: initializeCompiler +Cmd: initializeCompiler +Cmd: initializeCompiler +Cmd: initializeCompiler +Cmd: initializeCompiler +Cmd: initializeCompiler +Cmd: initializeCompiler +Cmd: initializeCompiler +Cmd: initializeCompiler +Cmd: initializeCompiler diff --git a/Roll a Ball/Logs/Packages-Update.log b/Roll a Ball/Logs/Packages-Update.log new file mode 100644 index 0000000000000000000000000000000000000000..fb1ab1db5fad9ac0da202fb3e6e5ad5f9836dc10 --- /dev/null +++ b/Roll a Ball/Logs/Packages-Update.log @@ -0,0 +1,43 @@ + +=== Sun Feb 9 19:03:30 2020 + +Packages were changed. +Update Mode: mergeDefaultDependencies + +The following packages were added: + com.unity.analytics@3.2.2 + com.unity.purchasing@2.0.3 + com.unity.ads@2.0.8 + com.unity.textmeshpro@1.4.1 + com.unity.package-manager-ui@2.0.8 + com.unity.collab-proxy@1.2.15 + com.unity.modules.ai@1.0.0 + com.unity.modules.animation@1.0.0 + com.unity.modules.assetbundle@1.0.0 + com.unity.modules.audio@1.0.0 + com.unity.modules.cloth@1.0.0 + com.unity.modules.director@1.0.0 + com.unity.modules.imageconversion@1.0.0 + com.unity.modules.imgui@1.0.0 + com.unity.modules.jsonserialize@1.0.0 + com.unity.modules.particlesystem@1.0.0 + com.unity.modules.physics@1.0.0 + com.unity.modules.physics2d@1.0.0 + com.unity.modules.screencapture@1.0.0 + com.unity.modules.terrain@1.0.0 + com.unity.modules.terrainphysics@1.0.0 + com.unity.modules.tilemap@1.0.0 + com.unity.modules.ui@1.0.0 + com.unity.modules.uielements@1.0.0 + com.unity.modules.umbra@1.0.0 + com.unity.modules.unityanalytics@1.0.0 + com.unity.modules.unitywebrequest@1.0.0 + com.unity.modules.unitywebrequestassetbundle@1.0.0 + com.unity.modules.unitywebrequestaudio@1.0.0 + com.unity.modules.unitywebrequesttexture@1.0.0 + com.unity.modules.unitywebrequestwww@1.0.0 + com.unity.modules.vehicles@1.0.0 + com.unity.modules.video@1.0.0 + com.unity.modules.vr@1.0.0 + com.unity.modules.wind@1.0.0 + com.unity.modules.xr@1.0.0 diff --git a/Roll a Ball/Packages/manifest.json b/Roll a Ball/Packages/manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..215430d3e6b1337fee9c4029533a958be347c554 --- /dev/null +++ b/Roll a Ball/Packages/manifest.json @@ -0,0 +1,40 @@ +{ + "dependencies": { + "com.unity.ads": "2.0.8", + "com.unity.analytics": "3.2.2", + "com.unity.collab-proxy": "1.2.15", + "com.unity.package-manager-ui": "2.0.8", + "com.unity.purchasing": "2.0.3", + "com.unity.textmeshpro": "1.4.1", + "com.unity.modules.ai": "1.0.0", + "com.unity.modules.animation": "1.0.0", + "com.unity.modules.assetbundle": "1.0.0", + "com.unity.modules.audio": "1.0.0", + "com.unity.modules.cloth": "1.0.0", + "com.unity.modules.director": "1.0.0", + "com.unity.modules.imageconversion": "1.0.0", + "com.unity.modules.imgui": "1.0.0", + "com.unity.modules.jsonserialize": "1.0.0", + "com.unity.modules.particlesystem": "1.0.0", + "com.unity.modules.physics": "1.0.0", + "com.unity.modules.physics2d": "1.0.0", + "com.unity.modules.screencapture": "1.0.0", + "com.unity.modules.terrain": "1.0.0", + "com.unity.modules.terrainphysics": "1.0.0", + "com.unity.modules.tilemap": "1.0.0", + "com.unity.modules.ui": "1.0.0", + "com.unity.modules.uielements": "1.0.0", + "com.unity.modules.umbra": "1.0.0", + "com.unity.modules.unityanalytics": "1.0.0", + "com.unity.modules.unitywebrequest": "1.0.0", + "com.unity.modules.unitywebrequestassetbundle": "1.0.0", + "com.unity.modules.unitywebrequestaudio": "1.0.0", + "com.unity.modules.unitywebrequesttexture": "1.0.0", + "com.unity.modules.unitywebrequestwww": "1.0.0", + "com.unity.modules.vehicles": "1.0.0", + "com.unity.modules.video": "1.0.0", + "com.unity.modules.vr": "1.0.0", + "com.unity.modules.wind": "1.0.0", + "com.unity.modules.xr": "1.0.0" + } +} diff --git a/Roll a Ball/ProjectSettings/AudioManager.asset b/Roll a Ball/ProjectSettings/AudioManager.asset new file mode 100644 index 0000000000000000000000000000000000000000..4f31e74482c3d4d56765906783bd5e3145a44679 --- /dev/null +++ b/Roll a Ball/ProjectSettings/AudioManager.asset @@ -0,0 +1,17 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!11 &1 +AudioManager: + m_ObjectHideFlags: 0 + m_Volume: 1 + Rolloff Scale: 1 + Doppler Factor: 1 + Default Speaker Mode: 2 + m_SampleRate: 0 + m_DSPBufferSize: 1024 + m_VirtualVoiceCount: 512 + m_RealVoiceCount: 32 + m_SpatializerPlugin: + m_AmbisonicDecoderPlugin: + m_DisableAudio: 0 + m_VirtualizeEffects: 1 diff --git a/Roll a Ball/ProjectSettings/ClusterInputManager.asset b/Roll a Ball/ProjectSettings/ClusterInputManager.asset new file mode 100644 index 0000000000000000000000000000000000000000..e7886b266a005f4d9d80f2fef8d1649dcfd3ed2b --- /dev/null +++ b/Roll a Ball/ProjectSettings/ClusterInputManager.asset @@ -0,0 +1,6 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!236 &1 +ClusterInputManager: + m_ObjectHideFlags: 0 + m_Inputs: [] diff --git a/Roll a Ball/ProjectSettings/DynamicsManager.asset b/Roll a Ball/ProjectSettings/DynamicsManager.asset new file mode 100644 index 0000000000000000000000000000000000000000..b3c263d37b6ad4db52bcc2926c22abce4c79a72f --- /dev/null +++ b/Roll a Ball/ProjectSettings/DynamicsManager.asset @@ -0,0 +1,30 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!55 &1 +PhysicsManager: + m_ObjectHideFlags: 0 + serializedVersion: 8 + m_Gravity: {x: 0, y: -9.81, z: 0} + m_DefaultMaterial: {fileID: 0} + m_BounceThreshold: 2 + m_SleepThreshold: 0.005 + m_DefaultContactOffset: 0.01 + m_DefaultSolverIterations: 6 + m_DefaultSolverVelocityIterations: 1 + m_QueriesHitBackfaces: 0 + m_QueriesHitTriggers: 1 + m_EnableAdaptiveForce: 0 + m_ClothInterCollisionDistance: 0 + m_ClothInterCollisionStiffness: 0 + m_ContactsGeneration: 1 + m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff + m_AutoSimulation: 1 + m_AutoSyncTransforms: 0 + m_ReuseCollisionCallbacks: 1 + m_ClothInterCollisionSettingsToggle: 0 + m_ContactPairsMode: 0 + m_BroadphaseType: 0 + m_WorldBounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 250, y: 250, z: 250} + m_WorldSubdivisions: 8 diff --git a/Roll a Ball/ProjectSettings/EditorBuildSettings.asset b/Roll a Ball/ProjectSettings/EditorBuildSettings.asset new file mode 100644 index 0000000000000000000000000000000000000000..0147887ef4b113c3a3b8da44ef30e3208f1e9120 --- /dev/null +++ b/Roll a Ball/ProjectSettings/EditorBuildSettings.asset @@ -0,0 +1,8 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1045 &1 +EditorBuildSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Scenes: [] + m_configObjects: {} diff --git a/Roll a Ball/ProjectSettings/EditorSettings.asset b/Roll a Ball/ProjectSettings/EditorSettings.asset new file mode 100644 index 0000000000000000000000000000000000000000..29dea5296c3023f21ade3f1ae8099a2ccac59617 --- /dev/null +++ b/Roll a Ball/ProjectSettings/EditorSettings.asset @@ -0,0 +1,21 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!159 &1 +EditorSettings: + m_ObjectHideFlags: 0 + serializedVersion: 7 + m_ExternalVersionControlSupport: Visible Meta Files + m_SerializationMode: 2 + m_LineEndingsForNewScripts: 2 + m_DefaultBehaviorMode: 0 + m_SpritePackerMode: 0 + m_SpritePackerPaddingPower: 1 + m_EtcTextureCompressorBehavior: 1 + m_EtcTextureFastCompressor: 1 + m_EtcTextureNormalCompressor: 2 + m_EtcTextureBestCompressor: 4 + m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd + m_ProjectGenerationRootNamespace: + m_UserGeneratedProjectSuffix: + m_CollabEditorSettings: + inProgressEnabled: 1 diff --git a/Roll a Ball/ProjectSettings/GraphicsSettings.asset b/Roll a Ball/ProjectSettings/GraphicsSettings.asset new file mode 100644 index 0000000000000000000000000000000000000000..cd1c3d65a9b9a0d6b214fcf8369b770726e87470 --- /dev/null +++ b/Roll a Ball/ProjectSettings/GraphicsSettings.asset @@ -0,0 +1,62 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!30 &1 +GraphicsSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_Deferred: + m_Mode: 1 + m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} + m_DeferredReflections: + m_Mode: 1 + m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} + m_ScreenSpaceShadows: + m_Mode: 1 + m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} + m_LegacyDeferred: + m_Mode: 1 + m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} + m_DepthNormals: + m_Mode: 1 + m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} + m_MotionVectors: + m_Mode: 1 + m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} + m_LightHalo: + m_Mode: 1 + m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} + m_LensFlare: + m_Mode: 1 + m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} + m_AlwaysIncludedShaders: + - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} + - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0} + m_PreloadedShaders: [] + m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, + type: 0} + m_CustomRenderPipeline: {fileID: 0} + m_TransparencySortMode: 0 + m_TransparencySortAxis: {x: 0, y: 0, z: 1} + m_DefaultRenderingPath: 1 + m_DefaultMobileRenderingPath: 1 + m_TierSettings: [] + m_LightmapStripping: 0 + m_FogStripping: 0 + m_InstancingStripping: 0 + m_LightmapKeepPlain: 1 + m_LightmapKeepDirCombined: 1 + m_LightmapKeepDynamicPlain: 1 + m_LightmapKeepDynamicDirCombined: 1 + m_LightmapKeepShadowMask: 1 + m_LightmapKeepSubtractive: 1 + m_FogKeepLinear: 1 + m_FogKeepExp: 1 + m_FogKeepExp2: 1 + m_AlbedoSwatchInfos: [] + m_LightsUseLinearIntensity: 0 + m_LightsUseColorTemperature: 0 diff --git a/Roll a Ball/ProjectSettings/InputManager.asset b/Roll a Ball/ProjectSettings/InputManager.asset new file mode 100644 index 0000000000000000000000000000000000000000..17c8f538e2152c0a0310b4870979eeecece2153c --- /dev/null +++ b/Roll a Ball/ProjectSettings/InputManager.asset @@ -0,0 +1,295 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!13 &1 +InputManager: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Axes: + - serializedVersion: 3 + m_Name: Horizontal + descriptiveName: + descriptiveNegativeName: + negativeButton: left + positiveButton: right + altNegativeButton: a + altPositiveButton: d + gravity: 3 + dead: 0.001 + sensitivity: 3 + snap: 1 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Vertical + descriptiveName: + descriptiveNegativeName: + negativeButton: down + positiveButton: up + altNegativeButton: s + altPositiveButton: w + gravity: 3 + dead: 0.001 + sensitivity: 3 + snap: 1 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire1 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left ctrl + altNegativeButton: + altPositiveButton: mouse 0 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire2 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left alt + altNegativeButton: + altPositiveButton: mouse 1 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire3 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: left shift + altNegativeButton: + altPositiveButton: mouse 2 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Jump + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: space + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Mouse X + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0 + sensitivity: 0.1 + snap: 0 + invert: 0 + type: 1 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Mouse Y + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0 + sensitivity: 0.1 + snap: 0 + invert: 0 + type: 1 + axis: 1 + joyNum: 0 + - serializedVersion: 3 + m_Name: Mouse ScrollWheel + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0 + sensitivity: 0.1 + snap: 0 + invert: 0 + type: 1 + axis: 2 + joyNum: 0 + - serializedVersion: 3 + m_Name: Horizontal + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0.19 + sensitivity: 1 + snap: 0 + invert: 0 + type: 2 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Vertical + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: + altNegativeButton: + altPositiveButton: + gravity: 0 + dead: 0.19 + sensitivity: 1 + snap: 0 + invert: 1 + type: 2 + axis: 1 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire1 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 0 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire2 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 1 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Fire3 + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 2 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Jump + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: joystick button 3 + altNegativeButton: + altPositiveButton: + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Submit + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: return + altNegativeButton: + altPositiveButton: joystick button 0 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Submit + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: enter + altNegativeButton: + altPositiveButton: space + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 + - serializedVersion: 3 + m_Name: Cancel + descriptiveName: + descriptiveNegativeName: + negativeButton: + positiveButton: escape + altNegativeButton: + altPositiveButton: joystick button 1 + gravity: 1000 + dead: 0.001 + sensitivity: 1000 + snap: 0 + invert: 0 + type: 0 + axis: 0 + joyNum: 0 diff --git a/Roll a Ball/ProjectSettings/NavMeshAreas.asset b/Roll a Ball/ProjectSettings/NavMeshAreas.asset new file mode 100644 index 0000000000000000000000000000000000000000..3b0b7c3d183abdd300112f56965916ef11667f54 --- /dev/null +++ b/Roll a Ball/ProjectSettings/NavMeshAreas.asset @@ -0,0 +1,91 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!126 &1 +NavMeshProjectSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + areas: + - name: Walkable + cost: 1 + - name: Not Walkable + cost: 1 + - name: Jump + cost: 2 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + - name: + cost: 1 + m_LastAgentTypeID: -887442657 + m_Settings: + - serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.75 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + debug: + m_Flags: 0 + m_SettingNames: + - Humanoid diff --git a/Roll a Ball/ProjectSettings/NetworkManager.asset b/Roll a Ball/ProjectSettings/NetworkManager.asset new file mode 100644 index 0000000000000000000000000000000000000000..5dc6a831d9f2a11f08ed96571e0f602e3c3908b5 --- /dev/null +++ b/Roll a Ball/ProjectSettings/NetworkManager.asset @@ -0,0 +1,8 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!149 &1 +NetworkManager: + m_ObjectHideFlags: 0 + m_DebugLevel: 0 + m_Sendrate: 15 + m_AssetToPrefab: {} diff --git a/Roll a Ball/ProjectSettings/Physics2DSettings.asset b/Roll a Ball/ProjectSettings/Physics2DSettings.asset new file mode 100644 index 0000000000000000000000000000000000000000..57760e2eb7580eea52de49db5bcd980df1b7b64c --- /dev/null +++ b/Roll a Ball/ProjectSettings/Physics2DSettings.asset @@ -0,0 +1,38 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!19 &1 +Physics2DSettings: + m_ObjectHideFlags: 0 + serializedVersion: 4 + m_Gravity: {x: 0, y: -9.81} + m_DefaultMaterial: {fileID: 0} + m_VelocityIterations: 8 + m_PositionIterations: 3 + m_VelocityThreshold: 1 + m_MaxLinearCorrection: 0.2 + m_MaxAngularCorrection: 8 + m_MaxTranslationSpeed: 100 + m_MaxRotationSpeed: 360 + m_BaumgarteScale: 0.2 + m_BaumgarteTimeOfImpactScale: 0.75 + m_TimeToSleep: 0.5 + m_LinearSleepTolerance: 0.01 + m_AngularSleepTolerance: 2 + m_DefaultContactOffset: 0.01 + m_AutoSimulation: 1 + m_QueriesHitTriggers: 1 + m_QueriesStartInColliders: 1 + m_ChangeStopsCallbacks: 0 + m_CallbacksOnDisable: 1 + m_ReuseCollisionCallbacks: 1 + m_AutoSyncTransforms: 0 + m_AlwaysShowColliders: 0 + m_ShowColliderSleep: 1 + m_ShowColliderContacts: 0 + m_ShowColliderAABB: 0 + m_ContactArrowScale: 0.2 + m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} + m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} + m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} + m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} + m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff diff --git a/Roll a Ball/ProjectSettings/PresetManager.asset b/Roll a Ball/ProjectSettings/PresetManager.asset new file mode 100644 index 0000000000000000000000000000000000000000..820e662d5571a26665760f07406d061551e8af02 --- /dev/null +++ b/Roll a Ball/ProjectSettings/PresetManager.asset @@ -0,0 +1,27 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1386491679 &1 +PresetManager: + m_ObjectHideFlags: 0 + m_DefaultList: + - type: + m_NativeTypeID: 108 + m_ManagedTypePPtr: {fileID: 0} + m_ManagedTypeFallback: + defaultPresets: + - m_Preset: {fileID: 2655988077585873504, guid: c1cf8506f04ef2c4a88b64b6c4202eea, + type: 2} + - type: + m_NativeTypeID: 1020 + m_ManagedTypePPtr: {fileID: 0} + m_ManagedTypeFallback: + defaultPresets: + - m_Preset: {fileID: 2655988077585873504, guid: 0cd792cc87e492d43b4e95b205fc5cc6, + type: 2} + - type: + m_NativeTypeID: 1006 + m_ManagedTypePPtr: {fileID: 0} + m_ManagedTypeFallback: + defaultPresets: + - m_Preset: {fileID: 2655988077585873504, guid: 7a99f8aa944efe94cb9bd74562b7d5f9, + type: 2} diff --git a/Roll a Ball/ProjectSettings/ProjectSettings.asset b/Roll a Ball/ProjectSettings/ProjectSettings.asset new file mode 100644 index 0000000000000000000000000000000000000000..66c2094406bcadda49814057bd8bcee6ae3d7a20 --- /dev/null +++ b/Roll a Ball/ProjectSettings/ProjectSettings.asset @@ -0,0 +1,632 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!129 &1 +PlayerSettings: + m_ObjectHideFlags: 0 + serializedVersion: 18 + productGUID: 13f38c6bf9a54d34e82c9dacaaa72571 + AndroidProfiler: 0 + AndroidFilterTouchesWhenObscured: 0 + AndroidEnableSustainedPerformanceMode: 0 + defaultScreenOrientation: 4 + targetDevice: 2 + useOnDemandResources: 0 + accelerometerFrequency: 60 + companyName: DefaultCompany + productName: Roll a Ball + defaultCursor: {fileID: 0} + cursorHotspot: {x: 0, y: 0} + m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} + m_ShowUnitySplashScreen: 1 + m_ShowUnitySplashLogo: 1 + m_SplashScreenOverlayOpacity: 1 + m_SplashScreenAnimation: 1 + m_SplashScreenLogoStyle: 1 + m_SplashScreenDrawMode: 0 + m_SplashScreenBackgroundAnimationZoom: 1 + m_SplashScreenLogoAnimationZoom: 1 + m_SplashScreenBackgroundLandscapeAspect: 1 + m_SplashScreenBackgroundPortraitAspect: 1 + m_SplashScreenBackgroundLandscapeUvs: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + m_SplashScreenBackgroundPortraitUvs: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 + m_SplashScreenLogos: [] + m_VirtualRealitySplashScreen: {fileID: 0} + m_HolographicTrackingLossScreen: {fileID: 0} + defaultScreenWidth: 1024 + defaultScreenHeight: 768 + defaultScreenWidthWeb: 960 + defaultScreenHeightWeb: 600 + m_StereoRenderingPath: 0 + m_ActiveColorSpace: 0 + m_MTRendering: 1 + m_StackTraceTypes: 010000000100000001000000010000000100000001000000 + iosShowActivityIndicatorOnLoading: -1 + androidShowActivityIndicatorOnLoading: -1 + displayResolutionDialog: 1 + iosUseCustomAppBackgroundBehavior: 0 + iosAllowHTTPDownload: 1 + allowedAutorotateToPortrait: 1 + allowedAutorotateToPortraitUpsideDown: 1 + allowedAutorotateToLandscapeRight: 1 + allowedAutorotateToLandscapeLeft: 1 + useOSAutorotation: 1 + use32BitDisplayBuffer: 1 + preserveFramebufferAlpha: 0 + disableDepthAndStencilBuffers: 0 + androidStartInFullscreen: 1 + androidRenderOutsideSafeArea: 0 + androidBlitType: 0 + defaultIsNativeResolution: 1 + macRetinaSupport: 1 + runInBackground: 1 + captureSingleScreen: 0 + muteOtherAudioSources: 0 + Prepare IOS For Recording: 0 + Force IOS Speakers When Recording: 0 + deferSystemGesturesMode: 0 + hideHomeButton: 0 + submitAnalytics: 1 + usePlayerLog: 1 + bakeCollisionMeshes: 0 + forceSingleInstance: 0 + resizableWindow: 0 + useMacAppStoreValidation: 0 + macAppStoreCategory: public.app-category.games + gpuSkinning: 1 + graphicsJobs: 0 + xboxPIXTextureCapture: 0 + xboxEnableAvatar: 0 + xboxEnableKinect: 0 + xboxEnableKinectAutoTracking: 0 + xboxEnableFitness: 0 + visibleInBackground: 1 + allowFullscreenSwitch: 1 + graphicsJobMode: 0 + fullscreenMode: 1 + xboxSpeechDB: 0 + xboxEnableHeadOrientation: 0 + xboxEnableGuest: 0 + xboxEnablePIXSampling: 0 + metalFramebufferOnly: 0 + xboxOneResolution: 0 + xboxOneSResolution: 0 + xboxOneXResolution: 3 + xboxOneMonoLoggingLevel: 0 + xboxOneLoggingLevel: 1 + xboxOneDisableEsram: 0 + xboxOnePresentImmediateThreshold: 0 + switchQueueCommandMemory: 0 + switchQueueControlMemory: 16384 + switchQueueComputeMemory: 262144 + switchNVNShaderPoolsGranularity: 33554432 + switchNVNDefaultPoolsGranularity: 16777216 + switchNVNOtherPoolsGranularity: 16777216 + vulkanEnableSetSRGBWrite: 0 + m_SupportedAspectRatios: + 4:3: 1 + 5:4: 1 + 16:10: 1 + 16:9: 1 + Others: 1 + bundleVersion: 0.1 + preloadedAssets: [] + metroInputSource: 0 + wsaTransparentSwapchain: 0 + m_HolographicPauseOnTrackingLoss: 1 + xboxOneDisableKinectGpuReservation: 1 + xboxOneEnable7thCore: 1 + isWsaHolographicRemotingEnabled: 0 + vrSettings: + cardboard: + depthFormat: 0 + enableTransitionView: 0 + daydream: + depthFormat: 0 + useSustainedPerformanceMode: 0 + enableVideoLayer: 0 + useProtectedVideoMemory: 0 + minimumSupportedHeadTracking: 0 + maximumSupportedHeadTracking: 1 + hololens: + depthFormat: 1 + depthBufferSharingEnabled: 1 + oculus: + sharedDepthBuffer: 1 + dashSupport: 1 + lowOverheadMode: 0 + protectedContext: 0 + v2Signing: 0 + enable360StereoCapture: 0 + protectGraphicsMemory: 0 + enableFrameTimingStats: 0 + useHDRDisplay: 0 + m_ColorGamuts: 00000000 + targetPixelDensity: 30 + resolutionScalingMode: 0 + androidSupportedAspectRatio: 1 + androidMaxAspectRatio: 2.1 + applicationIdentifier: {} + buildNumber: {} + AndroidBundleVersionCode: 1 + AndroidMinSdkVersion: 16 + AndroidTargetSdkVersion: 0 + AndroidPreferredInstallLocation: 1 + aotOptions: + stripEngineCode: 1 + iPhoneStrippingLevel: 0 + iPhoneScriptCallOptimization: 0 + ForceInternetPermission: 0 + ForceSDCardPermission: 0 + CreateWallpaper: 0 + APKExpansionFiles: 0 + keepLoadedShadersAlive: 0 + StripUnusedMeshComponents: 1 + VertexChannelCompressionMask: 4054 + iPhoneSdkVersion: 988 + iOSTargetOSVersionString: 9.0 + tvOSSdkVersion: 0 + tvOSRequireExtendedGameController: 0 + tvOSTargetOSVersionString: 9.0 + uIPrerenderedIcon: 0 + uIRequiresPersistentWiFi: 0 + uIRequiresFullScreen: 1 + uIStatusBarHidden: 1 + uIExitOnSuspend: 0 + uIStatusBarStyle: 0 + iPhoneSplashScreen: {fileID: 0} + iPhoneHighResSplashScreen: {fileID: 0} + iPhoneTallHighResSplashScreen: {fileID: 0} + iPhone47inSplashScreen: {fileID: 0} + iPhone55inPortraitSplashScreen: {fileID: 0} + iPhone55inLandscapeSplashScreen: {fileID: 0} + iPhone58inPortraitSplashScreen: {fileID: 0} + iPhone58inLandscapeSplashScreen: {fileID: 0} + iPadPortraitSplashScreen: {fileID: 0} + iPadHighResPortraitSplashScreen: {fileID: 0} + iPadLandscapeSplashScreen: {fileID: 0} + iPadHighResLandscapeSplashScreen: {fileID: 0} + appleTVSplashScreen: {fileID: 0} + appleTVSplashScreen2x: {fileID: 0} + tvOSSmallIconLayers: [] + tvOSSmallIconLayers2x: [] + tvOSLargeIconLayers: [] + tvOSLargeIconLayers2x: [] + tvOSTopShelfImageLayers: [] + tvOSTopShelfImageLayers2x: [] + tvOSTopShelfImageWideLayers: [] + tvOSTopShelfImageWideLayers2x: [] + iOSLaunchScreenType: 0 + iOSLaunchScreenPortrait: {fileID: 0} + iOSLaunchScreenLandscape: {fileID: 0} + iOSLaunchScreenBackgroundColor: + serializedVersion: 2 + rgba: 0 + iOSLaunchScreenFillPct: 100 + iOSLaunchScreenSize: 100 + iOSLaunchScreenCustomXibPath: + iOSLaunchScreeniPadType: 0 + iOSLaunchScreeniPadImage: {fileID: 0} + iOSLaunchScreeniPadBackgroundColor: + serializedVersion: 2 + rgba: 0 + iOSLaunchScreeniPadFillPct: 100 + iOSLaunchScreeniPadSize: 100 + iOSLaunchScreeniPadCustomXibPath: + iOSUseLaunchScreenStoryboard: 0 + iOSLaunchScreenCustomStoryboardPath: + iOSDeviceRequirements: [] + iOSURLSchemes: [] + iOSBackgroundModes: 0 + iOSMetalForceHardShadows: 0 + metalEditorSupport: 1 + metalAPIValidation: 1 + iOSRenderExtraFrameOnPause: 0 + appleDeveloperTeamID: + iOSManualSigningProvisioningProfileID: + tvOSManualSigningProvisioningProfileID: + iOSManualSigningProvisioningProfileType: 0 + tvOSManualSigningProvisioningProfileType: 0 + appleEnableAutomaticSigning: 0 + iOSRequireARKit: 0 + iOSAutomaticallyDetectAndAddCapabilities: 1 + appleEnableProMotion: 0 + clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea + templatePackageId: com.unity.template.3d@1.3.0 + templateDefaultScene: Assets/Scenes/SampleScene.unity + AndroidTargetArchitectures: 5 + AndroidSplashScreenScale: 0 + androidSplashScreen: {fileID: 0} + AndroidKeystoreName: + AndroidKeyaliasName: + AndroidBuildApkPerCpuArchitecture: 0 + AndroidTVCompatibility: 1 + AndroidIsGame: 1 + AndroidEnableTango: 0 + androidEnableBanner: 1 + androidUseLowAccuracyLocation: 0 + m_AndroidBanners: + - width: 320 + height: 180 + banner: {fileID: 0} + androidGamepadSupportLevel: 0 + resolutionDialogBanner: {fileID: 0} + m_BuildTargetIcons: [] + m_BuildTargetPlatformIcons: [] + m_BuildTargetBatching: + - m_BuildTarget: Standalone + m_StaticBatching: 1 + m_DynamicBatching: 0 + - m_BuildTarget: tvOS + m_StaticBatching: 1 + m_DynamicBatching: 0 + - m_BuildTarget: Android + m_StaticBatching: 1 + m_DynamicBatching: 0 + - m_BuildTarget: iPhone + m_StaticBatching: 1 + m_DynamicBatching: 0 + - m_BuildTarget: WebGL + m_StaticBatching: 0 + m_DynamicBatching: 0 + m_BuildTargetGraphicsAPIs: + - m_BuildTarget: AndroidPlayer + m_APIs: 0b00000008000000 + m_Automatic: 1 + - m_BuildTarget: iOSSupport + m_APIs: 10000000 + m_Automatic: 1 + - m_BuildTarget: AppleTVSupport + m_APIs: 10000000 + m_Automatic: 0 + - m_BuildTarget: WebGLSupport + m_APIs: 0b000000 + m_Automatic: 1 + m_BuildTargetVRSettings: + - m_BuildTarget: Standalone + m_Enabled: 0 + m_Devices: + - Oculus + - OpenVR + m_BuildTargetEnableVuforiaSettings: [] + openGLRequireES31: 0 + openGLRequireES31AEP: 0 + m_TemplateCustomTags: {} + mobileMTRendering: + Android: 1 + iPhone: 1 + tvOS: 1 + m_BuildTargetGroupLightmapEncodingQuality: [] + m_BuildTargetGroupLightmapSettings: [] + playModeTestRunnerEnabled: 0 + runPlayModeTestAsEditModeTest: 0 + actionOnDotNetUnhandledException: 1 + enableInternalProfiler: 0 + logObjCUncaughtExceptions: 1 + enableCrashReportAPI: 0 + cameraUsageDescription: + locationUsageDescription: + microphoneUsageDescription: + switchNetLibKey: + switchSocketMemoryPoolSize: 6144 + switchSocketAllocatorPoolSize: 128 + switchSocketConcurrencyLimit: 14 + switchScreenResolutionBehavior: 2 + switchUseCPUProfiler: 0 + switchApplicationID: 0x01004b9000490000 + switchNSODependencies: + switchTitleNames_0: + switchTitleNames_1: + switchTitleNames_2: + switchTitleNames_3: + switchTitleNames_4: + switchTitleNames_5: + switchTitleNames_6: + switchTitleNames_7: + switchTitleNames_8: + switchTitleNames_9: + switchTitleNames_10: + switchTitleNames_11: + switchTitleNames_12: + switchTitleNames_13: + switchTitleNames_14: + switchPublisherNames_0: + switchPublisherNames_1: + switchPublisherNames_2: + switchPublisherNames_3: + switchPublisherNames_4: + switchPublisherNames_5: + switchPublisherNames_6: + switchPublisherNames_7: + switchPublisherNames_8: + switchPublisherNames_9: + switchPublisherNames_10: + switchPublisherNames_11: + switchPublisherNames_12: + switchPublisherNames_13: + switchPublisherNames_14: + switchIcons_0: {fileID: 0} + switchIcons_1: {fileID: 0} + switchIcons_2: {fileID: 0} + switchIcons_3: {fileID: 0} + switchIcons_4: {fileID: 0} + switchIcons_5: {fileID: 0} + switchIcons_6: {fileID: 0} + switchIcons_7: {fileID: 0} + switchIcons_8: {fileID: 0} + switchIcons_9: {fileID: 0} + switchIcons_10: {fileID: 0} + switchIcons_11: {fileID: 0} + switchIcons_12: {fileID: 0} + switchIcons_13: {fileID: 0} + switchIcons_14: {fileID: 0} + switchSmallIcons_0: {fileID: 0} + switchSmallIcons_1: {fileID: 0} + switchSmallIcons_2: {fileID: 0} + switchSmallIcons_3: {fileID: 0} + switchSmallIcons_4: {fileID: 0} + switchSmallIcons_5: {fileID: 0} + switchSmallIcons_6: {fileID: 0} + switchSmallIcons_7: {fileID: 0} + switchSmallIcons_8: {fileID: 0} + switchSmallIcons_9: {fileID: 0} + switchSmallIcons_10: {fileID: 0} + switchSmallIcons_11: {fileID: 0} + switchSmallIcons_12: {fileID: 0} + switchSmallIcons_13: {fileID: 0} + switchSmallIcons_14: {fileID: 0} + switchManualHTML: + switchAccessibleURLs: + switchLegalInformation: + switchMainThreadStackSize: 1048576 + switchPresenceGroupId: + switchLogoHandling: 0 + switchReleaseVersion: 0 + switchDisplayVersion: 1.0.0 + switchStartupUserAccount: 0 + switchTouchScreenUsage: 0 + switchSupportedLanguagesMask: 0 + switchLogoType: 0 + switchApplicationErrorCodeCategory: + switchUserAccountSaveDataSize: 0 + switchUserAccountSaveDataJournalSize: 0 + switchApplicationAttribute: 0 + switchCardSpecSize: -1 + switchCardSpecClock: -1 + switchRatingsMask: 0 + switchRatingsInt_0: 0 + switchRatingsInt_1: 0 + switchRatingsInt_2: 0 + switchRatingsInt_3: 0 + switchRatingsInt_4: 0 + switchRatingsInt_5: 0 + switchRatingsInt_6: 0 + switchRatingsInt_7: 0 + switchRatingsInt_8: 0 + switchRatingsInt_9: 0 + switchRatingsInt_10: 0 + switchRatingsInt_11: 0 + switchRatingsInt_12: 0 + switchLocalCommunicationIds_0: + switchLocalCommunicationIds_1: + switchLocalCommunicationIds_2: + switchLocalCommunicationIds_3: + switchLocalCommunicationIds_4: + switchLocalCommunicationIds_5: + switchLocalCommunicationIds_6: + switchLocalCommunicationIds_7: + switchParentalControl: 0 + switchAllowsScreenshot: 1 + switchAllowsVideoCapturing: 1 + switchAllowsRuntimeAddOnContentInstall: 0 + switchDataLossConfirmation: 0 + switchUserAccountLockEnabled: 0 + switchSystemResourceMemory: 16777216 + switchSupportedNpadStyles: 3 + switchNativeFsCacheSize: 32 + switchIsHoldTypeHorizontal: 0 + switchSupportedNpadCount: 8 + switchSocketConfigEnabled: 0 + switchTcpInitialSendBufferSize: 32 + switchTcpInitialReceiveBufferSize: 64 + switchTcpAutoSendBufferSizeMax: 256 + switchTcpAutoReceiveBufferSizeMax: 256 + switchUdpSendBufferSize: 9 + switchUdpReceiveBufferSize: 42 + switchSocketBufferEfficiency: 4 + switchSocketInitializeEnabled: 1 + switchNetworkInterfaceManagerInitializeEnabled: 1 + switchPlayerConnectionEnabled: 1 + ps4NPAgeRating: 12 + ps4NPTitleSecret: + ps4NPTrophyPackPath: + ps4ParentalLevel: 11 + ps4ContentID: ED1633-NPXX51362_00-0000000000000000 + ps4Category: 0 + ps4MasterVersion: 01.00 + ps4AppVersion: 01.00 + ps4AppType: 0 + ps4ParamSfxPath: + ps4VideoOutPixelFormat: 0 + ps4VideoOutInitialWidth: 1920 + ps4VideoOutBaseModeInitialWidth: 1920 + ps4VideoOutReprojectionRate: 60 + ps4PronunciationXMLPath: + ps4PronunciationSIGPath: + ps4BackgroundImagePath: + ps4StartupImagePath: + ps4StartupImagesFolder: + ps4IconImagesFolder: + ps4SaveDataImagePath: + ps4SdkOverride: + ps4BGMPath: + ps4ShareFilePath: + ps4ShareOverlayImagePath: + ps4PrivacyGuardImagePath: + ps4NPtitleDatPath: + ps4RemotePlayKeyAssignment: -1 + ps4RemotePlayKeyMappingDir: + ps4PlayTogetherPlayerCount: 0 + ps4EnterButtonAssignment: 1 + ps4ApplicationParam1: 0 + ps4ApplicationParam2: 0 + ps4ApplicationParam3: 0 + ps4ApplicationParam4: 0 + ps4DownloadDataSize: 0 + ps4GarlicHeapSize: 2048 + ps4ProGarlicHeapSize: 2560 + ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ + ps4pnSessions: 1 + ps4pnPresence: 1 + ps4pnFriends: 1 + ps4pnGameCustomData: 1 + playerPrefsSupport: 0 + enableApplicationExit: 0 + resetTempFolder: 1 + restrictedAudioUsageRights: 0 + ps4UseResolutionFallback: 0 + ps4ReprojectionSupport: 0 + ps4UseAudio3dBackend: 0 + ps4SocialScreenEnabled: 0 + ps4ScriptOptimizationLevel: 0 + ps4Audio3dVirtualSpeakerCount: 14 + ps4attribCpuUsage: 0 + ps4PatchPkgPath: + ps4PatchLatestPkgPath: + ps4PatchChangeinfoPath: + ps4PatchDayOne: 0 + ps4attribUserManagement: 0 + ps4attribMoveSupport: 0 + ps4attrib3DSupport: 0 + ps4attribShareSupport: 0 + ps4attribExclusiveVR: 0 + ps4disableAutoHideSplash: 0 + ps4videoRecordingFeaturesUsed: 0 + ps4contentSearchFeaturesUsed: 0 + ps4attribEyeToEyeDistanceSettingVR: 0 + ps4IncludedModules: [] + monoEnv: + splashScreenBackgroundSourceLandscape: {fileID: 0} + splashScreenBackgroundSourcePortrait: {fileID: 0} + spritePackerPolicy: + webGLMemorySize: 256 + webGLExceptionSupport: 1 + webGLNameFilesAsHashes: 0 + webGLDataCaching: 1 + webGLDebugSymbols: 0 + webGLEmscriptenArgs: + webGLModulesDirectory: + webGLTemplate: APPLICATION:Default + webGLAnalyzeBuildSize: 0 + webGLUseEmbeddedResources: 0 + webGLCompressionFormat: 1 + webGLLinkerTarget: 1 + webGLThreadsSupport: 0 + scriptingDefineSymbols: {} + platformArchitecture: {} + scriptingBackend: {} + il2cppCompilerConfiguration: {} + managedStrippingLevel: {} + incrementalIl2cppBuild: {} + allowUnsafeCode: 0 + additionalIl2CppArgs: + scriptingRuntimeVersion: 1 + apiCompatibilityLevelPerPlatform: {} + m_RenderingPath: 1 + m_MobileRenderingPath: 1 + metroPackageName: Template_3D + metroPackageVersion: + metroCertificatePath: + metroCertificatePassword: + metroCertificateSubject: + metroCertificateIssuer: + metroCertificateNotAfter: 0000000000000000 + metroApplicationDescription: Template_3D + wsaImages: {} + metroTileShortName: + metroTileShowName: 0 + metroMediumTileShowName: 0 + metroLargeTileShowName: 0 + metroWideTileShowName: 0 + metroSupportStreamingInstall: 0 + metroLastRequiredScene: 0 + metroDefaultTileSize: 1 + metroTileForegroundText: 2 + metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} + metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, + a: 1} + metroSplashScreenUseBackgroundColor: 0 + platformCapabilities: {} + metroTargetDeviceFamilies: {} + metroFTAName: + metroFTAFileTypes: [] + metroProtocolName: + metroCompilationOverrides: 1 + XboxOneProductId: + XboxOneUpdateKey: + XboxOneSandboxId: + XboxOneContentId: + XboxOneTitleId: + XboxOneSCId: + XboxOneGameOsOverridePath: + XboxOnePackagingOverridePath: + XboxOneAppManifestOverridePath: + XboxOneVersion: 1.0.0.0 + XboxOnePackageEncryption: 0 + XboxOnePackageUpdateGranularity: 2 + XboxOneDescription: + XboxOneLanguage: + - enus + XboxOneCapability: [] + XboxOneGameRating: {} + XboxOneIsContentPackage: 0 + XboxOneEnableGPUVariability: 1 + XboxOneSockets: {} + XboxOneSplashScreen: {fileID: 0} + XboxOneAllowedProductIds: [] + XboxOnePersistentLocalStorageSize: 0 + XboxOneXTitleMemory: 8 + xboxOneScriptCompiler: 1 + XboxOneOverrideIdentityName: + vrEditorSettings: + daydream: + daydreamIconForeground: {fileID: 0} + daydreamIconBackground: {fileID: 0} + cloudServicesEnabled: + UNet: 1 + luminIcon: + m_Name: + m_ModelFolderPath: + m_PortalFolderPath: + luminCert: + m_CertPath: + m_PrivateKeyPath: + luminIsChannelApp: 0 + luminVersion: + m_VersionCode: 1 + m_VersionName: + facebookSdkVersion: 7.9.4 + facebookAppId: + facebookCookies: 1 + facebookLogging: 1 + facebookStatus: 1 + facebookXfbml: 0 + facebookFrictionlessRequests: 1 + apiCompatibilityLevel: 6 + cloudProjectId: + framebufferDepthMemorylessMode: 0 + projectName: + organizationId: + cloudEnabled: 0 + enableNativePlatformBackendsForNewInputSystem: 0 + disableOldInputManagerSupport: 0 + legacyClampBlendShapeWeights: 0 diff --git a/Roll a Ball/ProjectSettings/ProjectVersion.txt b/Roll a Ball/ProjectSettings/ProjectVersion.txt new file mode 100644 index 0000000000000000000000000000000000000000..b7bf1294d6b0fc1b7bf490be0a56bec88afbd44d --- /dev/null +++ b/Roll a Ball/ProjectSettings/ProjectVersion.txt @@ -0,0 +1 @@ +m_EditorVersion: 2018.4.16f1 diff --git a/Roll a Ball/ProjectSettings/QualitySettings.asset b/Roll a Ball/ProjectSettings/QualitySettings.asset new file mode 100644 index 0000000000000000000000000000000000000000..0621bef18733701b4e7e560aaa4a000d9e2c4236 --- /dev/null +++ b/Roll a Ball/ProjectSettings/QualitySettings.asset @@ -0,0 +1,190 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!47 &1 +QualitySettings: + m_ObjectHideFlags: 0 + serializedVersion: 5 + m_CurrentQuality: 4 + m_QualitySettings: + - serializedVersion: 2 + name: Very Low + pixelLightCount: 0 + shadows: 0 + shadowResolution: 0 + shadowProjection: 1 + shadowCascades: 1 + shadowDistance: 15 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 0 + blendWeights: 1 + textureQuality: 1 + anisotropicTextures: 0 + antiAliasing: 0 + softParticles: 0 + softVegetation: 0 + realtimeReflectionProbes: 0 + billboardsFaceCameraPosition: 0 + vSyncCount: 0 + lodBias: 0.3 + maximumLODLevel: 0 + particleRaycastBudget: 4 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: Low + pixelLightCount: 0 + shadows: 0 + shadowResolution: 0 + shadowProjection: 1 + shadowCascades: 1 + shadowDistance: 20 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 0 + blendWeights: 2 + textureQuality: 0 + anisotropicTextures: 0 + antiAliasing: 0 + softParticles: 0 + softVegetation: 0 + realtimeReflectionProbes: 0 + billboardsFaceCameraPosition: 0 + vSyncCount: 0 + lodBias: 0.4 + maximumLODLevel: 0 + particleRaycastBudget: 16 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: Medium + pixelLightCount: 1 + shadows: 1 + shadowResolution: 0 + shadowProjection: 1 + shadowCascades: 1 + shadowDistance: 20 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 0 + blendWeights: 2 + textureQuality: 0 + anisotropicTextures: 1 + antiAliasing: 0 + softParticles: 0 + softVegetation: 0 + realtimeReflectionProbes: 0 + billboardsFaceCameraPosition: 0 + vSyncCount: 1 + lodBias: 0.7 + maximumLODLevel: 0 + particleRaycastBudget: 64 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: High + pixelLightCount: 2 + shadows: 2 + shadowResolution: 1 + shadowProjection: 1 + shadowCascades: 2 + shadowDistance: 40 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 1 + blendWeights: 2 + textureQuality: 0 + anisotropicTextures: 1 + antiAliasing: 2 + softParticles: 0 + softVegetation: 1 + realtimeReflectionProbes: 1 + billboardsFaceCameraPosition: 1 + vSyncCount: 1 + lodBias: 1 + maximumLODLevel: 0 + particleRaycastBudget: 256 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: Very High + pixelLightCount: 3 + shadows: 2 + shadowResolution: 2 + shadowProjection: 1 + shadowCascades: 2 + shadowDistance: 40 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 1 + blendWeights: 4 + textureQuality: 0 + anisotropicTextures: 1 + antiAliasing: 4 + softParticles: 1 + softVegetation: 1 + realtimeReflectionProbes: 1 + billboardsFaceCameraPosition: 1 + vSyncCount: 1 + lodBias: 1.5 + maximumLODLevel: 0 + particleRaycastBudget: 1024 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + - serializedVersion: 2 + name: Ultra + pixelLightCount: 4 + shadows: 2 + shadowResolution: 2 + shadowProjection: 1 + shadowCascades: 4 + shadowDistance: 150 + shadowNearPlaneOffset: 3 + shadowCascade2Split: 0.33333334 + shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} + shadowmaskMode: 1 + blendWeights: 4 + textureQuality: 0 + anisotropicTextures: 1 + antiAliasing: 4 + softParticles: 1 + softVegetation: 1 + realtimeReflectionProbes: 1 + billboardsFaceCameraPosition: 1 + vSyncCount: 1 + lodBias: 2 + maximumLODLevel: 0 + particleRaycastBudget: 4096 + asyncUploadTimeSlice: 2 + asyncUploadBufferSize: 16 + resolutionScalingFixedDPIFactor: 1 + excludedTargetPlatforms: [] + m_PerPlatformDefaultQuality: + Android: 2 + Nintendo 3DS: 5 + Nintendo Switch: 5 + PS4: 5 + PSP2: 2 + Standalone: 5 + Tizen: 2 + WebGL: 3 + WiiU: 5 + Windows Store Apps: 5 + XboxOne: 5 + iPhone: 2 + tvOS: 2 diff --git a/Roll a Ball/ProjectSettings/TagManager.asset b/Roll a Ball/ProjectSettings/TagManager.asset new file mode 100644 index 0000000000000000000000000000000000000000..40a07c2b0fa5c5d4da859984353d1c72d4fa2b31 --- /dev/null +++ b/Roll a Ball/ProjectSettings/TagManager.asset @@ -0,0 +1,44 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!78 &1 +TagManager: + serializedVersion: 2 + tags: + - PickUp + layers: + - Default + - TransparentFX + - Ignore Raycast + - + - Water + - UI + - + - + - PostProcessing + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + m_SortingLayers: + - name: Default + uniqueID: 0 + locked: 0 diff --git a/Roll a Ball/ProjectSettings/TimeManager.asset b/Roll a Ball/ProjectSettings/TimeManager.asset new file mode 100644 index 0000000000000000000000000000000000000000..06bcc6d2953cf16c089324d3f547ce7b81f8807c --- /dev/null +++ b/Roll a Ball/ProjectSettings/TimeManager.asset @@ -0,0 +1,9 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!5 &1 +TimeManager: + m_ObjectHideFlags: 0 + Fixed Timestep: 0.02 + Maximum Allowed Timestep: 0.1 + m_TimeScale: 1 + Maximum Particle Timestep: 0.03 diff --git a/Roll a Ball/ProjectSettings/UnityConnectSettings.asset b/Roll a Ball/ProjectSettings/UnityConnectSettings.asset new file mode 100644 index 0000000000000000000000000000000000000000..fa0b146579fb787323d29e1d7b7768a0541031af --- /dev/null +++ b/Roll a Ball/ProjectSettings/UnityConnectSettings.asset @@ -0,0 +1,34 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!310 &1 +UnityConnectSettings: + m_ObjectHideFlags: 0 + serializedVersion: 1 + m_Enabled: 0 + m_TestMode: 0 + m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events + m_EventUrl: https://cdp.cloud.unity3d.com/v1/events + m_ConfigUrl: https://config.uca.cloud.unity3d.com + m_TestInitMode: 0 + CrashReportingSettings: + m_EventUrl: https://perf-events.cloud.unity3d.com + m_Enabled: 0 + m_LogBufferSize: 10 + m_CaptureEditorExceptions: 1 + UnityPurchasingSettings: + m_Enabled: 0 + m_TestMode: 0 + UnityAnalyticsSettings: + m_Enabled: 0 + m_TestMode: 0 + m_InitializeOnStartup: 1 + UnityAdsSettings: + m_Enabled: 0 + m_InitializeOnStartup: 1 + m_TestMode: 0 + m_IosGameId: + m_AndroidGameId: + m_GameIds: {} + m_GameId: + PerformanceReportingSettings: + m_Enabled: 0 diff --git a/Roll a Ball/ProjectSettings/VFXManager.asset b/Roll a Ball/ProjectSettings/VFXManager.asset new file mode 100644 index 0000000000000000000000000000000000000000..6e0eaca40d51a23fde75fc0183b34888ea942945 --- /dev/null +++ b/Roll a Ball/ProjectSettings/VFXManager.asset @@ -0,0 +1,11 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!937362698 &1 +VFXManager: + m_ObjectHideFlags: 0 + m_IndirectShader: {fileID: 0} + m_CopyBufferShader: {fileID: 0} + m_SortShader: {fileID: 0} + m_RenderPipeSettingsPath: + m_FixedTimeStep: 0.016666668 + m_MaxDeltaTime: 0.05