diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark01.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark01.cs deleted file mode 100644 index b48ebbdbea..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark01.cs +++ /dev/null @@ -1,128 +0,0 @@ -using UnityEngine; -using System.Collections; - - -namespace TMPro.Examples -{ - - public class Benchmark01 : MonoBehaviour - { - - public int BenchmarkType = 0; - - public TMP_FontAsset TMProFont; - public Font TextMeshFont; - - private TextMeshPro m_textMeshPro; - private TextContainer m_textContainer; - private TextMesh m_textMesh; - - private const string label01 = "The <#0050FF>count is: {0}"; - private const string label02 = "The count is: "; - - //private string m_string; - //private int m_frame; - - private Material m_material01; - private Material m_material02; - - - - IEnumerator Start() - { - - - - if (BenchmarkType == 0) // TextMesh Pro Component - { - m_textMeshPro = gameObject.AddComponent(); - m_textMeshPro.autoSizeTextContainer = true; - - //m_textMeshPro.anchorDampening = true; - - if (TMProFont != null) - m_textMeshPro.font = TMProFont; - - //m_textMeshPro.font = Resources.Load("Fonts & Materials/Anton SDF", typeof(TextMeshProFont)) as TextMeshProFont; // Make sure the Anton SDF exists before calling this... - //m_textMeshPro.fontSharedMaterial = Resources.Load("Fonts & Materials/Anton SDF", typeof(Material)) as Material; // Same as above make sure this material exists. - - m_textMeshPro.fontSize = 48; - m_textMeshPro.alignment = TextAlignmentOptions.Center; - //m_textMeshPro.anchor = AnchorPositions.Center; - m_textMeshPro.extraPadding = true; - //m_textMeshPro.outlineWidth = 0.25f; - //m_textMeshPro.fontSharedMaterial.SetFloat("_OutlineWidth", 0.2f); - //m_textMeshPro.fontSharedMaterial.EnableKeyword("UNDERLAY_ON"); - //m_textMeshPro.lineJustification = LineJustificationTypes.Center; - m_textMeshPro.enableWordWrapping = false; - //m_textMeshPro.lineLength = 60; - //m_textMeshPro.characterSpacing = 0.2f; - //m_textMeshPro.fontColor = new Color32(255, 255, 255, 255); - - m_material01 = m_textMeshPro.font.material; - m_material02 = Resources.Load("Fonts & Materials/LiberationSans SDF - Drop Shadow"); // Make sure the LiberationSans SDF exists before calling this... - - - } - else if (BenchmarkType == 1) // TextMesh - { - m_textMesh = gameObject.AddComponent(); - - if (TextMeshFont != null) - { - m_textMesh.font = TextMeshFont; - m_textMesh.GetComponent().sharedMaterial = m_textMesh.font.material; - } - else - { - m_textMesh.font = Resources.Load("Fonts/ARIAL", typeof(Font)) as Font; - m_textMesh.GetComponent().sharedMaterial = m_textMesh.font.material; - } - - m_textMesh.fontSize = 48; - m_textMesh.anchor = TextAnchor.MiddleCenter; - - //m_textMesh.color = new Color32(255, 255, 0, 255); - } - - - - for (int i = 0; i <= 1000000; i++) - { - if (BenchmarkType == 0) - { - m_textMeshPro.SetText(label01, i % 1000); - if (i % 1000 == 999) - m_textMeshPro.fontSharedMaterial = m_textMeshPro.fontSharedMaterial == m_material01 ? m_textMeshPro.fontSharedMaterial = m_material02 : m_textMeshPro.fontSharedMaterial = m_material01; - - - - } - else if (BenchmarkType == 1) - m_textMesh.text = label02 + (i % 1000).ToString(); - - yield return null; - } - - - yield return null; - } - - - /* - void Update() - { - if (BenchmarkType == 0) - { - m_textMeshPro.text = (m_frame % 1000).ToString(); - } - else if (BenchmarkType == 1) - { - m_textMesh.text = (m_frame % 1000).ToString(); - } - - m_frame += 1; - } - */ - } -} diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark01.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark01.cs.meta deleted file mode 100644 index 9910676e69..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark01.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: f970ea55f9f84bf79b05dab180b8c125 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark01_UGUI.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark01_UGUI.cs deleted file mode 100644 index 38f4a275e0..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark01_UGUI.cs +++ /dev/null @@ -1,135 +0,0 @@ -using UnityEngine; -using System.Collections; -using UnityEngine.UI; - - -namespace TMPro.Examples -{ - - public class Benchmark01_UGUI : MonoBehaviour - { - - public int BenchmarkType = 0; - - public Canvas canvas; - public TMP_FontAsset TMProFont; - public Font TextMeshFont; - - private TextMeshProUGUI m_textMeshPro; - //private TextContainer m_textContainer; - private Text m_textMesh; - - private const string label01 = "The <#0050FF>count is: "; - private const string label02 = "The count is: "; - - //private const string label01 = "TextMesh <#0050FF>Pro! The count is: {0}"; - //private const string label02 = "Text Mesh The count is: "; - - //private string m_string; - //private int m_frame; - - private Material m_material01; - private Material m_material02; - - - - IEnumerator Start() - { - - - - if (BenchmarkType == 0) // TextMesh Pro Component - { - m_textMeshPro = gameObject.AddComponent(); - //m_textContainer = GetComponent(); - - - //m_textMeshPro.anchorDampening = true; - - if (TMProFont != null) - m_textMeshPro.font = TMProFont; - - //m_textMeshPro.font = Resources.Load("Fonts & Materials/Anton SDF", typeof(TextMeshProFont)) as TextMeshProFont; // Make sure the Anton SDF exists before calling this... - //m_textMeshPro.fontSharedMaterial = Resources.Load("Fonts & Materials/Anton SDF", typeof(Material)) as Material; // Same as above make sure this material exists. - - m_textMeshPro.fontSize = 48; - m_textMeshPro.alignment = TextAlignmentOptions.Center; - //m_textMeshPro.anchor = AnchorPositions.Center; - m_textMeshPro.extraPadding = true; - //m_textMeshPro.outlineWidth = 0.25f; - //m_textMeshPro.fontSharedMaterial.SetFloat("_OutlineWidth", 0.2f); - //m_textMeshPro.fontSharedMaterial.EnableKeyword("UNDERLAY_ON"); - //m_textMeshPro.lineJustification = LineJustificationTypes.Center; - //m_textMeshPro.enableWordWrapping = true; - //m_textMeshPro.lineLength = 60; - //m_textMeshPro.characterSpacing = 0.2f; - //m_textMeshPro.fontColor = new Color32(255, 255, 255, 255); - - m_material01 = m_textMeshPro.font.material; - m_material02 = Resources.Load("Fonts & Materials/LiberationSans SDF - BEVEL"); // Make sure the LiberationSans SDF exists before calling this... - - - } - else if (BenchmarkType == 1) // TextMesh - { - m_textMesh = gameObject.AddComponent(); - - if (TextMeshFont != null) - { - m_textMesh.font = TextMeshFont; - //m_textMesh.renderer.sharedMaterial = m_textMesh.font.material; - } - else - { - //m_textMesh.font = Resources.Load("Fonts/ARIAL", typeof(Font)) as Font; - //m_textMesh.renderer.sharedMaterial = m_textMesh.font.material; - } - - m_textMesh.fontSize = 48; - m_textMesh.alignment = TextAnchor.MiddleCenter; - - //m_textMesh.color = new Color32(255, 255, 0, 255); - } - - - - for (int i = 0; i <= 1000000; i++) - { - if (BenchmarkType == 0) - { - m_textMeshPro.text = label01 + (i % 1000); - if (i % 1000 == 999) - m_textMeshPro.fontSharedMaterial = m_textMeshPro.fontSharedMaterial == m_material01 ? m_textMeshPro.fontSharedMaterial = m_material02 : m_textMeshPro.fontSharedMaterial = m_material01; - - - - } - else if (BenchmarkType == 1) - m_textMesh.text = label02 + (i % 1000).ToString(); - - yield return null; - } - - - yield return null; - } - - - /* - void Update() - { - if (BenchmarkType == 0) - { - m_textMeshPro.text = (m_frame % 1000).ToString(); - } - else if (BenchmarkType == 1) - { - m_textMesh.text = (m_frame % 1000).ToString(); - } - - m_frame += 1; - } - */ - } - -} diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark01_UGUI.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark01_UGUI.cs.meta deleted file mode 100644 index 5a26304a7a..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark01_UGUI.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 8ef7be1c625941f7ba8ed7cc71718c0d -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark02.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark02.cs deleted file mode 100644 index 29d75b6727..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark02.cs +++ /dev/null @@ -1,97 +0,0 @@ -using UnityEngine; -using System.Collections; - - -namespace TMPro.Examples -{ - - public class Benchmark02 : MonoBehaviour - { - - public int SpawnType = 0; - public int NumberOfNPC = 12; - - public bool IsTextObjectScaleStatic; - private TextMeshProFloatingText floatingText_Script; - - - void Start() - { - - for (int i = 0; i < NumberOfNPC; i++) - { - - - if (SpawnType == 0) - { - // TextMesh Pro Implementation - GameObject go = new GameObject(); - go.transform.position = new Vector3(Random.Range(-95f, 95f), 0.25f, Random.Range(-95f, 95f)); - - TextMeshPro textMeshPro = go.AddComponent(); - - textMeshPro.autoSizeTextContainer = true; - textMeshPro.rectTransform.pivot = new Vector2(0.5f, 0); - - textMeshPro.alignment = TextAlignmentOptions.Bottom; - textMeshPro.fontSize = 96; - textMeshPro.enableKerning = false; - - textMeshPro.color = new Color32(255, 255, 0, 255); - textMeshPro.text = "!"; - textMeshPro.isTextObjectScaleStatic = IsTextObjectScaleStatic; - - // Spawn Floating Text - floatingText_Script = go.AddComponent(); - floatingText_Script.SpawnType = 0; - floatingText_Script.IsTextObjectScaleStatic = IsTextObjectScaleStatic; - } - else if (SpawnType == 1) - { - // TextMesh Implementation - GameObject go = new GameObject(); - go.transform.position = new Vector3(Random.Range(-95f, 95f), 0.25f, Random.Range(-95f, 95f)); - - TextMesh textMesh = go.AddComponent(); - textMesh.font = Resources.Load("Fonts/ARIAL"); - textMesh.GetComponent().sharedMaterial = textMesh.font.material; - - textMesh.anchor = TextAnchor.LowerCenter; - textMesh.fontSize = 96; - - textMesh.color = new Color32(255, 255, 0, 255); - textMesh.text = "!"; - - // Spawn Floating Text - floatingText_Script = go.AddComponent(); - floatingText_Script.SpawnType = 1; - } - else if (SpawnType == 2) - { - // Canvas WorldSpace Camera - GameObject go = new GameObject(); - Canvas canvas = go.AddComponent(); - canvas.worldCamera = Camera.main; - - go.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f); - go.transform.position = new Vector3(Random.Range(-95f, 95f), 5f, Random.Range(-95f, 95f)); - - TextMeshProUGUI textObject = new GameObject().AddComponent(); - textObject.rectTransform.SetParent(go.transform, false); - - textObject.color = new Color32(255, 255, 0, 255); - textObject.alignment = TextAlignmentOptions.Bottom; - textObject.fontSize = 96; - textObject.text = "!"; - - // Spawn Floating Text - floatingText_Script = go.AddComponent(); - floatingText_Script.SpawnType = 0; - } - - - - } - } - } -} diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark02.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark02.cs.meta deleted file mode 100644 index a5d5a10f48..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark02.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: e8538afcddc14efbb5d9e94b7ae50197 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - TheFont: {instanceID: 0} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark03.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark03.cs deleted file mode 100644 index 7a3e1b9737..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark03.cs +++ /dev/null @@ -1,92 +0,0 @@ -using UnityEngine; -using System.Collections; -using UnityEngine.TextCore.LowLevel; - - -namespace TMPro.Examples -{ - - public class Benchmark03 : MonoBehaviour - { - public enum BenchmarkType { TMP_SDF_MOBILE = 0, TMP_SDF__MOBILE_SSD = 1, TMP_SDF = 2, TMP_BITMAP_MOBILE = 3, TEXTMESH_BITMAP = 4 } - - public int NumberOfSamples = 100; - public BenchmarkType Benchmark; - - public Font SourceFont; - - - void Awake() - { - - } - - - void Start() - { - TMP_FontAsset fontAsset = null; - - // Create Dynamic Font Asset for the given font file. - switch (Benchmark) - { - case BenchmarkType.TMP_SDF_MOBILE: - fontAsset = TMP_FontAsset.CreateFontAsset(SourceFont, 90, 9, GlyphRenderMode.SDFAA, 256, 256, AtlasPopulationMode.Dynamic); - break; - case BenchmarkType.TMP_SDF__MOBILE_SSD: - fontAsset = TMP_FontAsset.CreateFontAsset(SourceFont, 90, 9, GlyphRenderMode.SDFAA, 256, 256, AtlasPopulationMode.Dynamic); - fontAsset.material.shader = Shader.Find("TextMeshPro/Mobile/Distance Field SSD"); - break; - case BenchmarkType.TMP_SDF: - fontAsset = TMP_FontAsset.CreateFontAsset(SourceFont, 90, 9, GlyphRenderMode.SDFAA, 256, 256, AtlasPopulationMode.Dynamic); - fontAsset.material.shader = Shader.Find("TextMeshPro/Distance Field"); - break; - case BenchmarkType.TMP_BITMAP_MOBILE: - fontAsset = TMP_FontAsset.CreateFontAsset(SourceFont, 90, 9, GlyphRenderMode.SMOOTH, 256, 256, AtlasPopulationMode.Dynamic); - break; - } - - for (int i = 0; i < NumberOfSamples; i++) - { - switch (Benchmark) - { - case BenchmarkType.TMP_SDF_MOBILE: - case BenchmarkType.TMP_SDF__MOBILE_SSD: - case BenchmarkType.TMP_SDF: - case BenchmarkType.TMP_BITMAP_MOBILE: - { - GameObject go = new GameObject(); - go.transform.position = new Vector3(0, 1.2f, 0); - - TextMeshPro textComponent = go.AddComponent(); - textComponent.font = fontAsset; - textComponent.fontSize = 128; - textComponent.text = "@"; - textComponent.alignment = TextAlignmentOptions.Center; - textComponent.color = new Color32(255, 255, 0, 255); - - if (Benchmark == BenchmarkType.TMP_BITMAP_MOBILE) - textComponent.fontSize = 132; - - } - break; - case BenchmarkType.TEXTMESH_BITMAP: - { - GameObject go = new GameObject(); - go.transform.position = new Vector3(0, 1.2f, 0); - - TextMesh textMesh = go.AddComponent(); - textMesh.GetComponent().sharedMaterial = SourceFont.material; - textMesh.font = SourceFont; - textMesh.anchor = TextAnchor.MiddleCenter; - textMesh.fontSize = 130; - - textMesh.color = new Color32(255, 255, 0, 255); - textMesh.text = "@"; - } - break; - } - } - } - - } -} diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark03.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark03.cs.meta deleted file mode 100644 index 8883bcda10..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark03.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a73109742c8d47ac822895a473300c29 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - TheFont: {instanceID: 0} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark04.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark04.cs deleted file mode 100644 index e56714d503..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark04.cs +++ /dev/null @@ -1,85 +0,0 @@ -using UnityEngine; -using System.Collections; - - -namespace TMPro.Examples -{ - - public class Benchmark04 : MonoBehaviour - { - - public int SpawnType = 0; - - public int MinPointSize = 12; - public int MaxPointSize = 64; - public int Steps = 4; - - private Transform m_Transform; - //private TextMeshProFloatingText floatingText_Script; - //public Material material; - - - void Start() - { - m_Transform = transform; - - float lineHeight = 0; - float orthoSize = Camera.main.orthographicSize = Screen.height / 2; - float ratio = (float)Screen.width / Screen.height; - - for (int i = MinPointSize; i <= MaxPointSize; i += Steps) - { - if (SpawnType == 0) - { - // TextMesh Pro Implementation - GameObject go = new GameObject("Text - " + i + " Pts"); - - if (lineHeight > orthoSize * 2) return; - - go.transform.position = m_Transform.position + new Vector3(ratio * -orthoSize * 0.975f, orthoSize * 0.975f - lineHeight, 0); - - TextMeshPro textMeshPro = go.AddComponent(); - - //textMeshPro.fontSharedMaterial = material; - //textMeshPro.font = Resources.Load("Fonts & Materials/LiberationSans SDF", typeof(TextMeshProFont)) as TextMeshProFont; - //textMeshPro.anchor = AnchorPositions.Left; - textMeshPro.rectTransform.pivot = new Vector2(0, 0.5f); - - textMeshPro.enableWordWrapping = false; - textMeshPro.extraPadding = true; - textMeshPro.isOrthographic = true; - textMeshPro.fontSize = i; - - textMeshPro.text = i + " pts - Lorem ipsum dolor sit..."; - textMeshPro.color = new Color32(255, 255, 255, 255); - - lineHeight += i; - } - else - { - // TextMesh Implementation - // Causes crashes since atlas needed exceeds 4096 X 4096 - /* - GameObject go = new GameObject("Arial " + i); - - //if (lineHeight > orthoSize * 2 * 0.9f) return; - - go.transform.position = m_Transform.position + new Vector3(ratio * -orthoSize * 0.975f, orthoSize * 0.975f - lineHeight, 1); - - TextMesh textMesh = go.AddComponent(); - textMesh.font = Resources.Load("Fonts/ARIAL", typeof(Font)) as Font; - textMesh.renderer.sharedMaterial = textMesh.font.material; - textMesh.anchor = TextAnchor.MiddleLeft; - textMesh.fontSize = i * 10; - - textMesh.color = new Color32(255, 255, 255, 255); - textMesh.text = i + " pts - Lorem ipsum dolor sit..."; - - lineHeight += i; - */ - } - } - } - - } -} diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark04.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark04.cs.meta deleted file mode 100644 index cc271d7eec..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/Benchmark04.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: dc20866c0d5e413ab7559440e15333ae -MonoImporter: - serializedVersion: 2 - defaultReferences: - - TheFont: {instanceID: 0} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/CameraController.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/CameraController.cs deleted file mode 100644 index dad148236b..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/CameraController.cs +++ /dev/null @@ -1,292 +0,0 @@ -using UnityEngine; -using System.Collections; - - -namespace TMPro.Examples -{ - - public class CameraController : MonoBehaviour - { - public enum CameraModes { Follow, Isometric, Free } - - private Transform cameraTransform; - private Transform dummyTarget; - - public Transform CameraTarget; - - public float FollowDistance = 30.0f; - public float MaxFollowDistance = 100.0f; - public float MinFollowDistance = 2.0f; - - public float ElevationAngle = 30.0f; - public float MaxElevationAngle = 85.0f; - public float MinElevationAngle = 0f; - - public float OrbitalAngle = 0f; - - public CameraModes CameraMode = CameraModes.Follow; - - public bool MovementSmoothing = true; - public bool RotationSmoothing = false; - private bool previousSmoothing; - - public float MovementSmoothingValue = 25f; - public float RotationSmoothingValue = 5.0f; - - public float MoveSensitivity = 2.0f; - - private Vector3 currentVelocity = Vector3.zero; - private Vector3 desiredPosition; - private float mouseX; - private float mouseY; - private Vector3 moveVector; - private float mouseWheel; - - // Controls for Touches on Mobile devices - //private float prev_ZoomDelta; - - - private const string event_SmoothingValue = "Slider - Smoothing Value"; - private const string event_FollowDistance = "Slider - Camera Zoom"; - - - void Awake() - { - if (QualitySettings.vSyncCount > 0) - Application.targetFrameRate = 60; - else - Application.targetFrameRate = -1; - - if (Application.platform == RuntimePlatform.IPhonePlayer || Application.platform == RuntimePlatform.Android) - Input.simulateMouseWithTouches = false; - - cameraTransform = transform; - previousSmoothing = MovementSmoothing; - } - - - // Use this for initialization - void Start() - { - if (CameraTarget == null) - { - // If we don't have a target (assigned by the player, create a dummy in the center of the scene). - dummyTarget = new GameObject("Camera Target").transform; - CameraTarget = dummyTarget; - } - } - - // Update is called once per frame - void LateUpdate() - { - GetPlayerInput(); - - - // Check if we still have a valid target - if (CameraTarget != null) - { - if (CameraMode == CameraModes.Isometric) - { - desiredPosition = CameraTarget.position + Quaternion.Euler(ElevationAngle, OrbitalAngle, 0f) * new Vector3(0, 0, -FollowDistance); - } - else if (CameraMode == CameraModes.Follow) - { - desiredPosition = CameraTarget.position + CameraTarget.TransformDirection(Quaternion.Euler(ElevationAngle, OrbitalAngle, 0f) * (new Vector3(0, 0, -FollowDistance))); - } - else - { - // Free Camera implementation - } - - if (MovementSmoothing == true) - { - // Using Smoothing - cameraTransform.position = Vector3.SmoothDamp(cameraTransform.position, desiredPosition, ref currentVelocity, MovementSmoothingValue * Time.fixedDeltaTime); - //cameraTransform.position = Vector3.Lerp(cameraTransform.position, desiredPosition, Time.deltaTime * 5.0f); - } - else - { - // Not using Smoothing - cameraTransform.position = desiredPosition; - } - - if (RotationSmoothing == true) - cameraTransform.rotation = Quaternion.Lerp(cameraTransform.rotation, Quaternion.LookRotation(CameraTarget.position - cameraTransform.position), RotationSmoothingValue * Time.deltaTime); - else - { - cameraTransform.LookAt(CameraTarget); - } - - } - - } - - - - void GetPlayerInput() - { - moveVector = Vector3.zero; - - // Check Mouse Wheel Input prior to Shift Key so we can apply multiplier on Shift for Scrolling - mouseWheel = Input.GetAxis("Mouse ScrollWheel"); - - float touchCount = Input.touchCount; - - if (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift) || touchCount > 0) - { - mouseWheel *= 10; - - if (Input.GetKeyDown(KeyCode.I)) - CameraMode = CameraModes.Isometric; - - if (Input.GetKeyDown(KeyCode.F)) - CameraMode = CameraModes.Follow; - - if (Input.GetKeyDown(KeyCode.S)) - MovementSmoothing = !MovementSmoothing; - - - // Check for right mouse button to change camera follow and elevation angle - if (Input.GetMouseButton(1)) - { - mouseY = Input.GetAxis("Mouse Y"); - mouseX = Input.GetAxis("Mouse X"); - - if (mouseY > 0.01f || mouseY < -0.01f) - { - ElevationAngle -= mouseY * MoveSensitivity; - // Limit Elevation angle between min & max values. - ElevationAngle = Mathf.Clamp(ElevationAngle, MinElevationAngle, MaxElevationAngle); - } - - if (mouseX > 0.01f || mouseX < -0.01f) - { - OrbitalAngle += mouseX * MoveSensitivity; - if (OrbitalAngle > 360) - OrbitalAngle -= 360; - if (OrbitalAngle < 0) - OrbitalAngle += 360; - } - } - - // Get Input from Mobile Device - if (touchCount == 1 && Input.GetTouch(0).phase == TouchPhase.Moved) - { - Vector2 deltaPosition = Input.GetTouch(0).deltaPosition; - - // Handle elevation changes - if (deltaPosition.y > 0.01f || deltaPosition.y < -0.01f) - { - ElevationAngle -= deltaPosition.y * 0.1f; - // Limit Elevation angle between min & max values. - ElevationAngle = Mathf.Clamp(ElevationAngle, MinElevationAngle, MaxElevationAngle); - } - - - // Handle left & right - if (deltaPosition.x > 0.01f || deltaPosition.x < -0.01f) - { - OrbitalAngle += deltaPosition.x * 0.1f; - if (OrbitalAngle > 360) - OrbitalAngle -= 360; - if (OrbitalAngle < 0) - OrbitalAngle += 360; - } - - } - - // Check for left mouse button to select a new CameraTarget or to reset Follow position - if (Input.GetMouseButton(0)) - { - Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); - RaycastHit hit; - - if (Physics.Raycast(ray, out hit, 300, 1 << 10 | 1 << 11 | 1 << 12 | 1 << 14)) - { - if (hit.transform == CameraTarget) - { - // Reset Follow Position - OrbitalAngle = 0; - } - else - { - CameraTarget = hit.transform; - OrbitalAngle = 0; - MovementSmoothing = previousSmoothing; - } - - } - } - - - if (Input.GetMouseButton(2)) - { - if (dummyTarget == null) - { - // We need a Dummy Target to anchor the Camera - dummyTarget = new GameObject("Camera Target").transform; - dummyTarget.position = CameraTarget.position; - dummyTarget.rotation = CameraTarget.rotation; - CameraTarget = dummyTarget; - previousSmoothing = MovementSmoothing; - MovementSmoothing = false; - } - else if (dummyTarget != CameraTarget) - { - // Move DummyTarget to CameraTarget - dummyTarget.position = CameraTarget.position; - dummyTarget.rotation = CameraTarget.rotation; - CameraTarget = dummyTarget; - previousSmoothing = MovementSmoothing; - MovementSmoothing = false; - } - - - mouseY = Input.GetAxis("Mouse Y"); - mouseX = Input.GetAxis("Mouse X"); - - moveVector = cameraTransform.TransformDirection(mouseX, mouseY, 0); - - dummyTarget.Translate(-moveVector, Space.World); - - } - - } - - // Check Pinching to Zoom in - out on Mobile device - if (touchCount == 2) - { - Touch touch0 = Input.GetTouch(0); - Touch touch1 = Input.GetTouch(1); - - Vector2 touch0PrevPos = touch0.position - touch0.deltaPosition; - Vector2 touch1PrevPos = touch1.position - touch1.deltaPosition; - - float prevTouchDelta = (touch0PrevPos - touch1PrevPos).magnitude; - float touchDelta = (touch0.position - touch1.position).magnitude; - - float zoomDelta = prevTouchDelta - touchDelta; - - if (zoomDelta > 0.01f || zoomDelta < -0.01f) - { - FollowDistance += zoomDelta * 0.25f; - // Limit FollowDistance between min & max values. - FollowDistance = Mathf.Clamp(FollowDistance, MinFollowDistance, MaxFollowDistance); - } - - - } - - // Check MouseWheel to Zoom in-out - if (mouseWheel < -0.01f || mouseWheel > 0.01f) - { - - FollowDistance -= mouseWheel * 5.0f; - // Limit FollowDistance between min & max values. - FollowDistance = Mathf.Clamp(FollowDistance, MinFollowDistance, MaxFollowDistance); - } - - - } - } -} \ No newline at end of file diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/CameraController.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/CameraController.cs.meta deleted file mode 100644 index 75fa178635..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/CameraController.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 2d687537154440a3913a9a3c7977978c -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/ChatController.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/ChatController.cs deleted file mode 100644 index 2915c96743..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/ChatController.cs +++ /dev/null @@ -1,51 +0,0 @@ -using UnityEngine; -using UnityEngine.UI; -using TMPro; - -public class ChatController : MonoBehaviour { - - - public TMP_InputField ChatInputField; - - public TMP_Text ChatDisplayOutput; - - public Scrollbar ChatScrollbar; - - void OnEnable() - { - ChatInputField.onSubmit.AddListener(AddToChatOutput); - } - - void OnDisable() - { - ChatInputField.onSubmit.RemoveListener(AddToChatOutput); - } - - - void AddToChatOutput(string newText) - { - // Clear Input Field - ChatInputField.text = string.Empty; - - var timeNow = System.DateTime.Now; - - string formattedInput = "[<#FFFF80>" + timeNow.Hour.ToString("d2") + ":" + timeNow.Minute.ToString("d2") + ":" + timeNow.Second.ToString("d2") + "] " + newText; - - if (ChatDisplayOutput != null) - { - // No special formatting for first entry - // Add line feed before each subsequent entries - if (ChatDisplayOutput.text == string.Empty) - ChatDisplayOutput.text = formattedInput; - else - ChatDisplayOutput.text += "\n" + formattedInput; - } - - // Keep Chat input field active - ChatInputField.ActivateInputField(); - - // Set the scrollbar to the bottom when next text is submitted. - ChatScrollbar.value = 0; - } - -} diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/ChatController.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/ChatController.cs.meta deleted file mode 100644 index fd1d42061f..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/ChatController.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 53d91f98a2664f5cb9af11de72ac54ec -timeCreated: 1487197841 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/DropdownSample.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/DropdownSample.cs deleted file mode 100644 index f9ac60b515..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/DropdownSample.cs +++ /dev/null @@ -1,19 +0,0 @@ -using TMPro; -using UnityEngine; - -public class DropdownSample: MonoBehaviour -{ - [SerializeField] - private TextMeshProUGUI text = null; - - [SerializeField] - private TMP_Dropdown dropdownWithoutPlaceholder = null; - - [SerializeField] - private TMP_Dropdown dropdownWithPlaceholder = null; - - public void OnButtonClick() - { - text.text = dropdownWithPlaceholder.value > -1 ? "Selected values:\n" + dropdownWithoutPlaceholder.value + " - " + dropdownWithPlaceholder.value : "Error: Please make a selection"; - } -} diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/EnvMapAnimator.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/EnvMapAnimator.cs deleted file mode 100644 index 4117707768..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/EnvMapAnimator.cs +++ /dev/null @@ -1,35 +0,0 @@ -using UnityEngine; -using System.Collections; -using TMPro; - -public class EnvMapAnimator : MonoBehaviour { - - //private Vector3 TranslationSpeeds; - public Vector3 RotationSpeeds; - private TMP_Text m_textMeshPro; - private Material m_material; - - - void Awake() - { - //Debug.Log("Awake() on Script called."); - m_textMeshPro = GetComponent(); - m_material = m_textMeshPro.fontSharedMaterial; - } - - // Use this for initialization - IEnumerator Start () - { - Matrix4x4 matrix = new Matrix4x4(); - - while (true) - { - //matrix.SetTRS(new Vector3 (Time.time * TranslationSpeeds.x, Time.time * TranslationSpeeds.y, Time.time * TranslationSpeeds.z), Quaternion.Euler(Time.time * RotationSpeeds.x, Time.time * RotationSpeeds.y , Time.time * RotationSpeeds.z), Vector3.one); - matrix.SetTRS(Vector3.zero, Quaternion.Euler(Time.time * RotationSpeeds.x, Time.time * RotationSpeeds.y , Time.time * RotationSpeeds.z), Vector3.one); - - m_material.SetMatrix("_EnvMatrix", matrix); - - yield return null; - } - } -} diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/EnvMapAnimator.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/EnvMapAnimator.cs.meta deleted file mode 100644 index f42808a42e..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/EnvMapAnimator.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: a4b6f99e8bc54541bbd149b014ff441c -timeCreated: 1449025325 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/ObjectSpin.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/ObjectSpin.cs deleted file mode 100644 index f7e33fea41..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/ObjectSpin.cs +++ /dev/null @@ -1,69 +0,0 @@ -using UnityEngine; -using System.Collections; - - -namespace TMPro.Examples -{ - - public class ObjectSpin : MonoBehaviour - { - -#pragma warning disable 0414 - - public float SpinSpeed = 5; - public int RotationRange = 15; - private Transform m_transform; - - private float m_time; - private Vector3 m_prevPOS; - private Vector3 m_initial_Rotation; - private Vector3 m_initial_Position; - private Color32 m_lightColor; - private int frames = 0; - - public enum MotionType { Rotation, BackAndForth, Translation }; - public MotionType Motion; - - void Awake() - { - m_transform = transform; - m_initial_Rotation = m_transform.rotation.eulerAngles; - m_initial_Position = m_transform.position; - - Light light = GetComponent(); - m_lightColor = light != null ? light.color : Color.black; - } - - - // Update is called once per frame - void Update() - { - if (Motion == MotionType.Rotation) - { - m_transform.Rotate(0, SpinSpeed * Time.deltaTime, 0); - } - else if (Motion == MotionType.BackAndForth) - { - m_time += SpinSpeed * Time.deltaTime; - m_transform.rotation = Quaternion.Euler(m_initial_Rotation.x, Mathf.Sin(m_time) * RotationRange + m_initial_Rotation.y, m_initial_Rotation.z); - } - else - { - m_time += SpinSpeed * Time.deltaTime; - - float x = 15 * Mathf.Cos(m_time * .95f); - float y = 10; // *Mathf.Sin(m_time * 1f) * Mathf.Cos(m_time * 1f); - float z = 0f; // *Mathf.Sin(m_time * .9f); - - m_transform.position = m_initial_Position + new Vector3(x, z, y); - - // Drawing light patterns because they can be cool looking. - //if (frames > 2) - // Debug.DrawLine(m_transform.position, m_prevPOS, m_lightColor, 100f); - - m_prevPOS = m_transform.position; - frames += 1; - } - } - } -} \ No newline at end of file diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/ObjectSpin.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/ObjectSpin.cs.meta deleted file mode 100644 index 43c45a1b82..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/ObjectSpin.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 4f19c7f94c794c5097d8bd11e39c750d -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/ShaderPropAnimator.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/ShaderPropAnimator.cs deleted file mode 100644 index d8e56a44ae..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/ShaderPropAnimator.cs +++ /dev/null @@ -1,51 +0,0 @@ -using UnityEngine; -using System.Collections; - - -namespace TMPro.Examples -{ - - public class ShaderPropAnimator : MonoBehaviour - { - - private Renderer m_Renderer; - private Material m_Material; - - public AnimationCurve GlowCurve; - - public float m_frame; - - void Awake() - { - // Cache a reference to object's renderer - m_Renderer = GetComponent(); - - // Cache a reference to object's material and create an instance by doing so. - m_Material = m_Renderer.material; - } - - void Start() - { - StartCoroutine(AnimateProperties()); - } - - IEnumerator AnimateProperties() - { - //float lightAngle; - float glowPower; - m_frame = Random.Range(0f, 1f); - - while (true) - { - //lightAngle = (m_Material.GetFloat(ShaderPropertyIDs.ID_LightAngle) + Time.deltaTime) % 6.2831853f; - //m_Material.SetFloat(ShaderPropertyIDs.ID_LightAngle, lightAngle); - - glowPower = GlowCurve.Evaluate(m_frame); - m_Material.SetFloat(ShaderUtilities.ID_GlowPower, glowPower); - - m_frame += Time.deltaTime * Random.Range(0.2f, 0.3f); - yield return new WaitForEndOfFrame(); - } - } - } -} diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/ShaderPropAnimator.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/ShaderPropAnimator.cs.meta deleted file mode 100644 index 29547c6a4b..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/ShaderPropAnimator.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 2787a46a4dc848c1b4b7b9307b614bfd -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/SimpleScript.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/SimpleScript.cs deleted file mode 100644 index 1c71c489c6..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/SimpleScript.cs +++ /dev/null @@ -1,58 +0,0 @@ -using UnityEngine; -using System.Collections; - - -namespace TMPro.Examples -{ - - public class SimpleScript : MonoBehaviour - { - - private TextMeshPro m_textMeshPro; - //private TMP_FontAsset m_FontAsset; - - private const string label = "The <#0050FF>count is: {0:2}"; - private float m_frame; - - - void Start() - { - // Add new TextMesh Pro Component - m_textMeshPro = gameObject.AddComponent(); - - m_textMeshPro.autoSizeTextContainer = true; - - // Load the Font Asset to be used. - //m_FontAsset = Resources.Load("Fonts & Materials/LiberationSans SDF", typeof(TMP_FontAsset)) as TMP_FontAsset; - //m_textMeshPro.font = m_FontAsset; - - // Assign Material to TextMesh Pro Component - //m_textMeshPro.fontSharedMaterial = Resources.Load("Fonts & Materials/LiberationSans SDF - Bevel", typeof(Material)) as Material; - //m_textMeshPro.fontSharedMaterial.EnableKeyword("BEVEL_ON"); - - // Set various font settings. - m_textMeshPro.fontSize = 48; - - m_textMeshPro.alignment = TextAlignmentOptions.Center; - - //m_textMeshPro.anchorDampening = true; // Has been deprecated but under consideration for re-implementation. - //m_textMeshPro.enableAutoSizing = true; - - //m_textMeshPro.characterSpacing = 0.2f; - //m_textMeshPro.wordSpacing = 0.1f; - - //m_textMeshPro.enableCulling = true; - m_textMeshPro.enableWordWrapping = false; - - //textMeshPro.fontColor = new Color32(255, 255, 255, 255); - } - - - void Update() - { - m_textMeshPro.SetText(label, m_frame % 1000); - m_frame += 1 * Time.deltaTime; - } - - } -} diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/SimpleScript.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/SimpleScript.cs.meta deleted file mode 100644 index 7fbe336954..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/SimpleScript.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 9eff140b25d64601aabc6ba32245d099 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/SkewTextExample.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/SkewTextExample.cs deleted file mode 100644 index 205b0fd14c..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/SkewTextExample.cs +++ /dev/null @@ -1,158 +0,0 @@ -using UnityEngine; -using System.Collections; - - -namespace TMPro.Examples -{ - - public class SkewTextExample : MonoBehaviour - { - - private TMP_Text m_TextComponent; - - public AnimationCurve VertexCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.25f, 2.0f), new Keyframe(0.5f, 0), new Keyframe(0.75f, 2.0f), new Keyframe(1, 0f)); - //public float AngleMultiplier = 1.0f; - //public float SpeedMultiplier = 1.0f; - public float CurveScale = 1.0f; - public float ShearAmount = 1.0f; - - void Awake() - { - m_TextComponent = gameObject.GetComponent(); - } - - - void Start() - { - StartCoroutine(WarpText()); - } - - - private AnimationCurve CopyAnimationCurve(AnimationCurve curve) - { - AnimationCurve newCurve = new AnimationCurve(); - - newCurve.keys = curve.keys; - - return newCurve; - } - - - /// - /// Method to curve text along a Unity animation curve. - /// - /// - /// - IEnumerator WarpText() - { - VertexCurve.preWrapMode = WrapMode.Clamp; - VertexCurve.postWrapMode = WrapMode.Clamp; - - //Mesh mesh = m_TextComponent.textInfo.meshInfo[0].mesh; - - Vector3[] vertices; - Matrix4x4 matrix; - - m_TextComponent.havePropertiesChanged = true; // Need to force the TextMeshPro Object to be updated. - CurveScale *= 10; - float old_CurveScale = CurveScale; - float old_ShearValue = ShearAmount; - AnimationCurve old_curve = CopyAnimationCurve(VertexCurve); - - while (true) - { - if (!m_TextComponent.havePropertiesChanged && old_CurveScale == CurveScale && old_curve.keys[1].value == VertexCurve.keys[1].value && old_ShearValue == ShearAmount) - { - yield return null; - continue; - } - - old_CurveScale = CurveScale; - old_curve = CopyAnimationCurve(VertexCurve); - old_ShearValue = ShearAmount; - - m_TextComponent.ForceMeshUpdate(); // Generate the mesh and populate the textInfo with data we can use and manipulate. - - TMP_TextInfo textInfo = m_TextComponent.textInfo; - int characterCount = textInfo.characterCount; - - - if (characterCount == 0) continue; - - //vertices = textInfo.meshInfo[0].vertices; - //int lastVertexIndex = textInfo.characterInfo[characterCount - 1].vertexIndex; - - float boundsMinX = m_TextComponent.bounds.min.x; //textInfo.meshInfo[0].mesh.bounds.min.x; - float boundsMaxX = m_TextComponent.bounds.max.x; //textInfo.meshInfo[0].mesh.bounds.max.x; - - - - for (int i = 0; i < characterCount; i++) - { - if (!textInfo.characterInfo[i].isVisible) - continue; - - int vertexIndex = textInfo.characterInfo[i].vertexIndex; - - // Get the index of the mesh used by this character. - int materialIndex = textInfo.characterInfo[i].materialReferenceIndex; - - vertices = textInfo.meshInfo[materialIndex].vertices; - - // Compute the baseline mid point for each character - Vector3 offsetToMidBaseline = new Vector2((vertices[vertexIndex + 0].x + vertices[vertexIndex + 2].x) / 2, textInfo.characterInfo[i].baseLine); - //float offsetY = VertexCurve.Evaluate((float)i / characterCount + loopCount / 50f); // Random.Range(-0.25f, 0.25f); - - // Apply offset to adjust our pivot point. - vertices[vertexIndex + 0] += -offsetToMidBaseline; - vertices[vertexIndex + 1] += -offsetToMidBaseline; - vertices[vertexIndex + 2] += -offsetToMidBaseline; - vertices[vertexIndex + 3] += -offsetToMidBaseline; - - // Apply the Shearing FX - float shear_value = ShearAmount * 0.01f; - Vector3 topShear = new Vector3(shear_value * (textInfo.characterInfo[i].topRight.y - textInfo.characterInfo[i].baseLine), 0, 0); - Vector3 bottomShear = new Vector3(shear_value * (textInfo.characterInfo[i].baseLine - textInfo.characterInfo[i].bottomRight.y), 0, 0); - - vertices[vertexIndex + 0] += -bottomShear; - vertices[vertexIndex + 1] += topShear; - vertices[vertexIndex + 2] += topShear; - vertices[vertexIndex + 3] += -bottomShear; - - - // Compute the angle of rotation for each character based on the animation curve - float x0 = (offsetToMidBaseline.x - boundsMinX) / (boundsMaxX - boundsMinX); // Character's position relative to the bounds of the mesh. - float x1 = x0 + 0.0001f; - float y0 = VertexCurve.Evaluate(x0) * CurveScale; - float y1 = VertexCurve.Evaluate(x1) * CurveScale; - - Vector3 horizontal = new Vector3(1, 0, 0); - //Vector3 normal = new Vector3(-(y1 - y0), (x1 * (boundsMaxX - boundsMinX) + boundsMinX) - offsetToMidBaseline.x, 0); - Vector3 tangent = new Vector3(x1 * (boundsMaxX - boundsMinX) + boundsMinX, y1) - new Vector3(offsetToMidBaseline.x, y0); - - float dot = Mathf.Acos(Vector3.Dot(horizontal, tangent.normalized)) * 57.2957795f; - Vector3 cross = Vector3.Cross(horizontal, tangent); - float angle = cross.z > 0 ? dot : 360 - dot; - - matrix = Matrix4x4.TRS(new Vector3(0, y0, 0), Quaternion.Euler(0, 0, angle), Vector3.one); - - vertices[vertexIndex + 0] = matrix.MultiplyPoint3x4(vertices[vertexIndex + 0]); - vertices[vertexIndex + 1] = matrix.MultiplyPoint3x4(vertices[vertexIndex + 1]); - vertices[vertexIndex + 2] = matrix.MultiplyPoint3x4(vertices[vertexIndex + 2]); - vertices[vertexIndex + 3] = matrix.MultiplyPoint3x4(vertices[vertexIndex + 3]); - - vertices[vertexIndex + 0] += offsetToMidBaseline; - vertices[vertexIndex + 1] += offsetToMidBaseline; - vertices[vertexIndex + 2] += offsetToMidBaseline; - vertices[vertexIndex + 3] += offsetToMidBaseline; - } - - - // Upload the mesh with the revised information - m_TextComponent.UpdateVertexData(); - - yield return null; // new WaitForSeconds(0.025f); - } - } - } -} diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/SkewTextExample.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/SkewTextExample.cs.meta deleted file mode 100644 index 461110590f..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/SkewTextExample.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: d412675cfb3441efa3bf8dcd9b7624dc -timeCreated: 1458801336 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_DigitValidator.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_DigitValidator.cs deleted file mode 100644 index ad76118f67..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_DigitValidator.cs +++ /dev/null @@ -1,27 +0,0 @@ -using UnityEngine; -using System; - - -namespace TMPro -{ - /// - /// EXample of a Custom Character Input Validator to only allow digits from 0 to 9. - /// - [Serializable] - //[CreateAssetMenu(fileName = "InputValidator - Digits.asset", menuName = "TextMeshPro/Input Validators/Digits", order = 100)] - public class TMP_DigitValidator : TMP_InputValidator - { - // Custom text input validation function - public override char Validate(ref string text, ref int pos, char ch) - { - if (ch >= '0' && ch <= '9') - { - text += ch; - pos += 1; - return ch; - } - - return (char)0; - } - } -} diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_DigitValidator.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_DigitValidator.cs.meta deleted file mode 100644 index f013655a25..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_DigitValidator.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 1a7eb92a01ed499a987bde9def05fbce -timeCreated: 1473112765 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_ExampleScript_01.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_ExampleScript_01.cs deleted file mode 100644 index 9f022f30a8..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_ExampleScript_01.cs +++ /dev/null @@ -1,64 +0,0 @@ -using UnityEngine; -using UnityEngine.UI; -using System.Collections; -using TMPro; - - -namespace TMPro.Examples -{ - - public class TMP_ExampleScript_01 : MonoBehaviour - { - public enum objectType { TextMeshPro = 0, TextMeshProUGUI = 1 }; - - public objectType ObjectType; - public bool isStatic; - - private TMP_Text m_text; - - //private TMP_InputField m_inputfield; - - - private const string k_label = "The count is <#0080ff>{0}"; - private int count; - - void Awake() - { - // Get a reference to the TMP text component if one already exists otherwise add one. - // This example show the convenience of having both TMP components derive from TMP_Text. - if (ObjectType == 0) - m_text = GetComponent() ?? gameObject.AddComponent(); - else - m_text = GetComponent() ?? gameObject.AddComponent(); - - // Load a new font asset and assign it to the text object. - m_text.font = Resources.Load("Fonts & Materials/Anton SDF"); - - // Load a new material preset which was created with the context menu duplicate. - m_text.fontSharedMaterial = Resources.Load("Fonts & Materials/Anton SDF - Drop Shadow"); - - // Set the size of the font. - m_text.fontSize = 120; - - // Set the text - m_text.text = "A <#0080ff>simple line of text."; - - // Get the preferred width and height based on the supplied width and height as opposed to the actual size of the current text container. - Vector2 size = m_text.GetPreferredValues(Mathf.Infinity, Mathf.Infinity); - - // Set the size of the RectTransform based on the new calculated values. - m_text.rectTransform.sizeDelta = new Vector2(size.x, size.y); - } - - - void Update() - { - if (!isStatic) - { - m_text.SetText(k_label, count % 1000); - count += 1; - } - } - - } -} diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_ExampleScript_01.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_ExampleScript_01.cs.meta deleted file mode 100644 index af5c4d4f7f..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_ExampleScript_01.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 6f2c5b59b6874405865e2616e4ec276a -timeCreated: 1449625634 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_FrameRateCounter.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_FrameRateCounter.cs deleted file mode 100644 index 4a858b506a..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_FrameRateCounter.cs +++ /dev/null @@ -1,134 +0,0 @@ -using UnityEngine; -using System.Collections; - - -namespace TMPro.Examples -{ - - public class TMP_FrameRateCounter : MonoBehaviour - { - public float UpdateInterval = 5.0f; - private float m_LastInterval = 0; - private int m_Frames = 0; - - public enum FpsCounterAnchorPositions { TopLeft, BottomLeft, TopRight, BottomRight }; - - public FpsCounterAnchorPositions AnchorPosition = FpsCounterAnchorPositions.TopRight; - - private string htmlColorTag; - private const string fpsLabel = "{0:2} <#8080ff>FPS \n<#FF8000>{1:2} <#8080ff>MS"; - - private TextMeshPro m_TextMeshPro; - private Transform m_frameCounter_transform; - private Camera m_camera; - - private FpsCounterAnchorPositions last_AnchorPosition; - - void Awake() - { - if (!enabled) - return; - - m_camera = Camera.main; - Application.targetFrameRate = 9999; - - GameObject frameCounter = new GameObject("Frame Counter"); - - m_TextMeshPro = frameCounter.AddComponent(); - m_TextMeshPro.font = Resources.Load("Fonts & Materials/LiberationSans SDF"); - m_TextMeshPro.fontSharedMaterial = Resources.Load("Fonts & Materials/LiberationSans SDF - Overlay"); - - - m_frameCounter_transform = frameCounter.transform; - m_frameCounter_transform.SetParent(m_camera.transform); - m_frameCounter_transform.localRotation = Quaternion.identity; - - m_TextMeshPro.enableWordWrapping = false; - m_TextMeshPro.fontSize = 24; - //m_TextMeshPro.FontColor = new Color32(255, 255, 255, 128); - //m_TextMeshPro.edgeWidth = .15f; - //m_TextMeshPro.isOverlay = true; - - //m_TextMeshPro.FaceColor = new Color32(255, 128, 0, 0); - //m_TextMeshPro.EdgeColor = new Color32(0, 255, 0, 255); - //m_TextMeshPro.FontMaterial.renderQueue = 4000; - - //m_TextMeshPro.CreateSoftShadowClone(new Vector2(1f, -1f)); - - Set_FrameCounter_Position(AnchorPosition); - last_AnchorPosition = AnchorPosition; - - - } - - void Start() - { - m_LastInterval = Time.realtimeSinceStartup; - m_Frames = 0; - } - - void Update() - { - if (AnchorPosition != last_AnchorPosition) - Set_FrameCounter_Position(AnchorPosition); - - last_AnchorPosition = AnchorPosition; - - m_Frames += 1; - float timeNow = Time.realtimeSinceStartup; - - if (timeNow > m_LastInterval + UpdateInterval) - { - // display two fractional digits (f2 format) - float fps = m_Frames / (timeNow - m_LastInterval); - float ms = 1000.0f / Mathf.Max(fps, 0.00001f); - - if (fps < 30) - htmlColorTag = ""; - else if (fps < 10) - htmlColorTag = ""; - else - htmlColorTag = ""; - - //string format = System.String.Format(htmlColorTag + "{0:F2} FPS \n{1:F2} <#8080ff>MS",fps, ms); - //m_TextMeshPro.text = format; - - m_TextMeshPro.SetText(htmlColorTag + fpsLabel, fps, ms); - - m_Frames = 0; - m_LastInterval = timeNow; - } - } - - - void Set_FrameCounter_Position(FpsCounterAnchorPositions anchor_position) - { - //Debug.Log("Changing frame counter anchor position."); - m_TextMeshPro.margin = new Vector4(1f, 1f, 1f, 1f); - - switch (anchor_position) - { - case FpsCounterAnchorPositions.TopLeft: - m_TextMeshPro.alignment = TextAlignmentOptions.TopLeft; - m_TextMeshPro.rectTransform.pivot = new Vector2(0, 1); - m_frameCounter_transform.position = m_camera.ViewportToWorldPoint(new Vector3(0, 1, 100.0f)); - break; - case FpsCounterAnchorPositions.BottomLeft: - m_TextMeshPro.alignment = TextAlignmentOptions.BottomLeft; - m_TextMeshPro.rectTransform.pivot = new Vector2(0, 0); - m_frameCounter_transform.position = m_camera.ViewportToWorldPoint(new Vector3(0, 0, 100.0f)); - break; - case FpsCounterAnchorPositions.TopRight: - m_TextMeshPro.alignment = TextAlignmentOptions.TopRight; - m_TextMeshPro.rectTransform.pivot = new Vector2(1, 1); - m_frameCounter_transform.position = m_camera.ViewportToWorldPoint(new Vector3(1, 1, 100.0f)); - break; - case FpsCounterAnchorPositions.BottomRight: - m_TextMeshPro.alignment = TextAlignmentOptions.BottomRight; - m_TextMeshPro.rectTransform.pivot = new Vector2(1, 0); - m_frameCounter_transform.position = m_camera.ViewportToWorldPoint(new Vector3(1, 0, 100.0f)); - break; - } - } - } -} diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_FrameRateCounter.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_FrameRateCounter.cs.meta deleted file mode 100644 index 48fa11981f..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_FrameRateCounter.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 686ec78b56aa445795335fbadafcfaa4 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_PhoneNumberValidator.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_PhoneNumberValidator.cs deleted file mode 100644 index 0d363cea13..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_PhoneNumberValidator.cs +++ /dev/null @@ -1,105 +0,0 @@ -using UnityEngine; -using System.Collections; -using System; - -namespace TMPro -{ - /// - /// Example of a Custom Character Input Validator to only allow phone number in the (800) 555-1212 format. - /// - [Serializable] - //[CreateAssetMenu(fileName = "InputValidator - Phone Numbers.asset", menuName = "TextMeshPro/Input Validators/Phone Numbers")] - public class TMP_PhoneNumberValidator : TMP_InputValidator - { - // Custom text input validation function - public override char Validate(ref string text, ref int pos, char ch) - { - Debug.Log("Trying to validate..."); - - // Return unless the character is a valid digit - if (ch < '0' && ch > '9') return (char)0; - - int length = text.Length; - - // Enforce Phone Number format for every character input. - for (int i = 0; i < length + 1; i++) - { - switch (i) - { - case 0: - if (i == length) - text = "(" + ch; - pos = 2; - break; - case 1: - if (i == length) - text += ch; - pos = 2; - break; - case 2: - if (i == length) - text += ch; - pos = 3; - break; - case 3: - if (i == length) - text += ch + ") "; - pos = 6; - break; - case 4: - if (i == length) - text += ") " + ch; - pos = 7; - break; - case 5: - if (i == length) - text += " " + ch; - pos = 7; - break; - case 6: - if (i == length) - text += ch; - pos = 7; - break; - case 7: - if (i == length) - text += ch; - pos = 8; - break; - case 8: - if (i == length) - text += ch + "-"; - pos = 10; - break; - case 9: - if (i == length) - text += "-" + ch; - pos = 11; - break; - case 10: - if (i == length) - text += ch; - pos = 11; - break; - case 11: - if (i == length) - text += ch; - pos = 12; - break; - case 12: - if (i == length) - text += ch; - pos = 13; - break; - case 13: - if (i == length) - text += ch; - pos = 14; - break; - } - } - - return ch; - } - } -} diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_PhoneNumberValidator.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_PhoneNumberValidator.cs.meta deleted file mode 100644 index 66324f096b..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_PhoneNumberValidator.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 83680ab1a69f4102ac67d1459fe76e1f -timeCreated: 1473056437 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextEventCheck.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextEventCheck.cs deleted file mode 100644 index abbe6580c8..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextEventCheck.cs +++ /dev/null @@ -1,73 +0,0 @@ -using UnityEngine; - - -namespace TMPro.Examples -{ - public class TMP_TextEventCheck : MonoBehaviour - { - - public TMP_TextEventHandler TextEventHandler; - - private TMP_Text m_TextComponent; - - void OnEnable() - { - if (TextEventHandler != null) - { - // Get a reference to the text component - m_TextComponent = TextEventHandler.GetComponent(); - - TextEventHandler.onCharacterSelection.AddListener(OnCharacterSelection); - TextEventHandler.onSpriteSelection.AddListener(OnSpriteSelection); - TextEventHandler.onWordSelection.AddListener(OnWordSelection); - TextEventHandler.onLineSelection.AddListener(OnLineSelection); - TextEventHandler.onLinkSelection.AddListener(OnLinkSelection); - } - } - - - void OnDisable() - { - if (TextEventHandler != null) - { - TextEventHandler.onCharacterSelection.RemoveListener(OnCharacterSelection); - TextEventHandler.onSpriteSelection.RemoveListener(OnSpriteSelection); - TextEventHandler.onWordSelection.RemoveListener(OnWordSelection); - TextEventHandler.onLineSelection.RemoveListener(OnLineSelection); - TextEventHandler.onLinkSelection.RemoveListener(OnLinkSelection); - } - } - - - void OnCharacterSelection(char c, int index) - { - Debug.Log("Character [" + c + "] at Index: " + index + " has been selected."); - } - - void OnSpriteSelection(char c, int index) - { - Debug.Log("Sprite [" + c + "] at Index: " + index + " has been selected."); - } - - void OnWordSelection(string word, int firstCharacterIndex, int length) - { - Debug.Log("Word [" + word + "] with first character index of " + firstCharacterIndex + " and length of " + length + " has been selected."); - } - - void OnLineSelection(string lineText, int firstCharacterIndex, int length) - { - Debug.Log("Line [" + lineText + "] with first character index of " + firstCharacterIndex + " and length of " + length + " has been selected."); - } - - void OnLinkSelection(string linkID, string linkText, int linkIndex) - { - if (m_TextComponent != null) - { - TMP_LinkInfo linkInfo = m_TextComponent.textInfo.linkInfo[linkIndex]; - } - - Debug.Log("Link Index: " + linkIndex + " with ID [" + linkID + "] and Text \"" + linkText + "\" has been selected."); - } - - } -} diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextEventCheck.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextEventCheck.cs.meta deleted file mode 100644 index 9012a15dcf..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextEventCheck.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: d736ce056cf444ca96e424f4d9c42b76 -timeCreated: 1480416736 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextEventHandler.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextEventHandler.cs deleted file mode 100644 index 505bf64dd1..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextEventHandler.cs +++ /dev/null @@ -1,254 +0,0 @@ -using UnityEngine; -using UnityEngine.Events; -using UnityEngine.EventSystems; -using System; - - -namespace TMPro -{ - - public class TMP_TextEventHandler : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler - { - [Serializable] - public class CharacterSelectionEvent : UnityEvent { } - - [Serializable] - public class SpriteSelectionEvent : UnityEvent { } - - [Serializable] - public class WordSelectionEvent : UnityEvent { } - - [Serializable] - public class LineSelectionEvent : UnityEvent { } - - [Serializable] - public class LinkSelectionEvent : UnityEvent { } - - - /// - /// Event delegate triggered when pointer is over a character. - /// - public CharacterSelectionEvent onCharacterSelection - { - get { return m_OnCharacterSelection; } - set { m_OnCharacterSelection = value; } - } - [SerializeField] - private CharacterSelectionEvent m_OnCharacterSelection = new CharacterSelectionEvent(); - - - /// - /// Event delegate triggered when pointer is over a sprite. - /// - public SpriteSelectionEvent onSpriteSelection - { - get { return m_OnSpriteSelection; } - set { m_OnSpriteSelection = value; } - } - [SerializeField] - private SpriteSelectionEvent m_OnSpriteSelection = new SpriteSelectionEvent(); - - - /// - /// Event delegate triggered when pointer is over a word. - /// - public WordSelectionEvent onWordSelection - { - get { return m_OnWordSelection; } - set { m_OnWordSelection = value; } - } - [SerializeField] - private WordSelectionEvent m_OnWordSelection = new WordSelectionEvent(); - - - /// - /// Event delegate triggered when pointer is over a line. - /// - public LineSelectionEvent onLineSelection - { - get { return m_OnLineSelection; } - set { m_OnLineSelection = value; } - } - [SerializeField] - private LineSelectionEvent m_OnLineSelection = new LineSelectionEvent(); - - - /// - /// Event delegate triggered when pointer is over a link. - /// - public LinkSelectionEvent onLinkSelection - { - get { return m_OnLinkSelection; } - set { m_OnLinkSelection = value; } - } - [SerializeField] - private LinkSelectionEvent m_OnLinkSelection = new LinkSelectionEvent(); - - - - private TMP_Text m_TextComponent; - - private Camera m_Camera; - private Canvas m_Canvas; - - private int m_selectedLink = -1; - private int m_lastCharIndex = -1; - private int m_lastWordIndex = -1; - private int m_lastLineIndex = -1; - - void Awake() - { - // Get a reference to the text component. - m_TextComponent = gameObject.GetComponent(); - - // Get a reference to the camera rendering the text taking into consideration the text component type. - if (m_TextComponent.GetType() == typeof(TextMeshProUGUI)) - { - m_Canvas = gameObject.GetComponentInParent(); - if (m_Canvas != null) - { - if (m_Canvas.renderMode == RenderMode.ScreenSpaceOverlay) - m_Camera = null; - else - m_Camera = m_Canvas.worldCamera; - } - } - else - { - m_Camera = Camera.main; - } - } - - - void LateUpdate() - { - if (TMP_TextUtilities.IsIntersectingRectTransform(m_TextComponent.rectTransform, Input.mousePosition, m_Camera)) - { - #region Example of Character or Sprite Selection - int charIndex = TMP_TextUtilities.FindIntersectingCharacter(m_TextComponent, Input.mousePosition, m_Camera, true); - if (charIndex != -1 && charIndex != m_lastCharIndex) - { - m_lastCharIndex = charIndex; - - TMP_TextElementType elementType = m_TextComponent.textInfo.characterInfo[charIndex].elementType; - - // Send event to any event listeners depending on whether it is a character or sprite. - if (elementType == TMP_TextElementType.Character) - SendOnCharacterSelection(m_TextComponent.textInfo.characterInfo[charIndex].character, charIndex); - else if (elementType == TMP_TextElementType.Sprite) - SendOnSpriteSelection(m_TextComponent.textInfo.characterInfo[charIndex].character, charIndex); - } - #endregion - - - #region Example of Word Selection - // Check if Mouse intersects any words and if so assign a random color to that word. - int wordIndex = TMP_TextUtilities.FindIntersectingWord(m_TextComponent, Input.mousePosition, m_Camera); - if (wordIndex != -1 && wordIndex != m_lastWordIndex) - { - m_lastWordIndex = wordIndex; - - // Get the information about the selected word. - TMP_WordInfo wInfo = m_TextComponent.textInfo.wordInfo[wordIndex]; - - // Send the event to any listeners. - SendOnWordSelection(wInfo.GetWord(), wInfo.firstCharacterIndex, wInfo.characterCount); - } - #endregion - - - #region Example of Line Selection - // Check if Mouse intersects any words and if so assign a random color to that word. - int lineIndex = TMP_TextUtilities.FindIntersectingLine(m_TextComponent, Input.mousePosition, m_Camera); - if (lineIndex != -1 && lineIndex != m_lastLineIndex) - { - m_lastLineIndex = lineIndex; - - // Get the information about the selected word. - TMP_LineInfo lineInfo = m_TextComponent.textInfo.lineInfo[lineIndex]; - - // Send the event to any listeners. - char[] buffer = new char[lineInfo.characterCount]; - for (int i = 0; i < lineInfo.characterCount && i < m_TextComponent.textInfo.characterInfo.Length; i++) - { - buffer[i] = m_TextComponent.textInfo.characterInfo[i + lineInfo.firstCharacterIndex].character; - } - - string lineText = new string(buffer); - SendOnLineSelection(lineText, lineInfo.firstCharacterIndex, lineInfo.characterCount); - } - #endregion - - - #region Example of Link Handling - // Check if mouse intersects with any links. - int linkIndex = TMP_TextUtilities.FindIntersectingLink(m_TextComponent, Input.mousePosition, m_Camera); - - // Handle new Link selection. - if (linkIndex != -1 && linkIndex != m_selectedLink) - { - m_selectedLink = linkIndex; - - // Get information about the link. - TMP_LinkInfo linkInfo = m_TextComponent.textInfo.linkInfo[linkIndex]; - - // Send the event to any listeners. - SendOnLinkSelection(linkInfo.GetLinkID(), linkInfo.GetLinkText(), linkIndex); - } - #endregion - } - else - { - // Reset all selections given we are hovering outside the text container bounds. - m_selectedLink = -1; - m_lastCharIndex = -1; - m_lastWordIndex = -1; - m_lastLineIndex = -1; - } - } - - - public void OnPointerEnter(PointerEventData eventData) - { - //Debug.Log("OnPointerEnter()"); - } - - - public void OnPointerExit(PointerEventData eventData) - { - //Debug.Log("OnPointerExit()"); - } - - - private void SendOnCharacterSelection(char character, int characterIndex) - { - if (onCharacterSelection != null) - onCharacterSelection.Invoke(character, characterIndex); - } - - private void SendOnSpriteSelection(char character, int characterIndex) - { - if (onSpriteSelection != null) - onSpriteSelection.Invoke(character, characterIndex); - } - - private void SendOnWordSelection(string word, int charIndex, int length) - { - if (onWordSelection != null) - onWordSelection.Invoke(word, charIndex, length); - } - - private void SendOnLineSelection(string line, int charIndex, int length) - { - if (onLineSelection != null) - onLineSelection.Invoke(line, charIndex, length); - } - - private void SendOnLinkSelection(string linkID, string linkText, int linkIndex) - { - if (onLinkSelection != null) - onLinkSelection.Invoke(linkID, linkText, linkIndex); - } - - } -} diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextEventHandler.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextEventHandler.cs.meta deleted file mode 100644 index 03c5199f77..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextEventHandler.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 1312ae25639a4bae8e25ae223209cc50 -timeCreated: 1452811039 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextInfoDebugTool.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextInfoDebugTool.cs deleted file mode 100644 index 64e75af675..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextInfoDebugTool.cs +++ /dev/null @@ -1,652 +0,0 @@ -using System; -using UnityEngine; -using System.Collections; -using UnityEditor; - - -namespace TMPro.Examples -{ - - public class TMP_TextInfoDebugTool : MonoBehaviour - { - // Since this script is used for debugging, we exclude it from builds. - // TODO: Rework this script to make it into an editor utility. - #if UNITY_EDITOR - public bool ShowCharacters; - public bool ShowWords; - public bool ShowLinks; - public bool ShowLines; - public bool ShowMeshBounds; - public bool ShowTextBounds; - [Space(10)] - [TextArea(2, 2)] - public string ObjectStats; - - [SerializeField] - private TMP_Text m_TextComponent; - - private Transform m_Transform; - private TMP_TextInfo m_TextInfo; - - private float m_ScaleMultiplier; - private float m_HandleSize; - - - void OnDrawGizmos() - { - if (m_TextComponent == null) - { - m_TextComponent = GetComponent(); - - if (m_TextComponent == null) - return; - } - - m_Transform = m_TextComponent.transform; - - // Get a reference to the text object's textInfo - m_TextInfo = m_TextComponent.textInfo; - - // Update Text Statistics - ObjectStats = "Characters: " + m_TextInfo.characterCount + " Words: " + m_TextInfo.wordCount + " Spaces: " + m_TextInfo.spaceCount + " Sprites: " + m_TextInfo.spriteCount + " Links: " + m_TextInfo.linkCount - + "\nLines: " + m_TextInfo.lineCount + " Pages: " + m_TextInfo.pageCount; - - // Get the handle size for drawing the various - m_ScaleMultiplier = m_TextComponent.GetType() == typeof(TextMeshPro) ? 1 : 0.1f; - m_HandleSize = HandleUtility.GetHandleSize(m_Transform.position) * m_ScaleMultiplier; - - // Draw line metrics - #region Draw Lines - if (ShowLines) - DrawLineBounds(); - #endregion - - // Draw word metrics - #region Draw Words - if (ShowWords) - DrawWordBounds(); - #endregion - - // Draw character metrics - #region Draw Characters - if (ShowCharacters) - DrawCharactersBounds(); - #endregion - - // Draw Quads around each of the words - #region Draw Links - if (ShowLinks) - DrawLinkBounds(); - #endregion - - // Draw Quad around the bounds of the text - #region Draw Bounds - if (ShowMeshBounds) - DrawBounds(); - #endregion - - // Draw Quad around the rendered region of the text. - #region Draw Text Bounds - if (ShowTextBounds) - DrawTextBounds(); - #endregion - } - - - /// - /// Method to draw a rectangle around each character. - /// - /// - void DrawCharactersBounds() - { - int characterCount = m_TextInfo.characterCount; - - for (int i = 0; i < characterCount; i++) - { - // Draw visible as well as invisible characters - TMP_CharacterInfo characterInfo = m_TextInfo.characterInfo[i]; - - bool isCharacterVisible = i < m_TextComponent.maxVisibleCharacters && - characterInfo.lineNumber < m_TextComponent.maxVisibleLines && - i >= m_TextComponent.firstVisibleCharacter; - - if (m_TextComponent.overflowMode == TextOverflowModes.Page) - isCharacterVisible = isCharacterVisible && characterInfo.pageNumber + 1 == m_TextComponent.pageToDisplay; - - if (!isCharacterVisible) - continue; - - float dottedLineSize = 6; - - // Get Bottom Left and Top Right position of the current character - Vector3 bottomLeft = m_Transform.TransformPoint(characterInfo.bottomLeft); - Vector3 topLeft = m_Transform.TransformPoint(new Vector3(characterInfo.topLeft.x, characterInfo.topLeft.y, 0)); - Vector3 topRight = m_Transform.TransformPoint(characterInfo.topRight); - Vector3 bottomRight = m_Transform.TransformPoint(new Vector3(characterInfo.bottomRight.x, characterInfo.bottomRight.y, 0)); - - // Draw character bounds - if (characterInfo.isVisible) - { - Color color = Color.green; - DrawDottedRectangle(bottomLeft, topRight, color); - } - else - { - Color color = Color.grey; - - float whiteSpaceAdvance = Math.Abs(characterInfo.origin - characterInfo.xAdvance) > 0.01f ? characterInfo.xAdvance : characterInfo.origin + (characterInfo.ascender - characterInfo.descender) * 0.03f; - DrawDottedRectangle(m_Transform.TransformPoint(new Vector3(characterInfo.origin, characterInfo.descender, 0)), m_Transform.TransformPoint(new Vector3(whiteSpaceAdvance, characterInfo.ascender, 0)), color, 4); - } - - float origin = characterInfo.origin; - float advance = characterInfo.xAdvance; - float ascentline = characterInfo.ascender; - float baseline = characterInfo.baseLine; - float descentline = characterInfo.descender; - - //Draw Ascent line - Vector3 ascentlineStart = m_Transform.TransformPoint(new Vector3(origin, ascentline, 0)); - Vector3 ascentlineEnd = m_Transform.TransformPoint(new Vector3(advance, ascentline, 0)); - - Handles.color = Color.cyan; - Handles.DrawDottedLine(ascentlineStart, ascentlineEnd, dottedLineSize); - - // Draw Cap Height & Mean line - float capline = characterInfo.fontAsset == null ? 0 : baseline + characterInfo.fontAsset.faceInfo.capLine * characterInfo.scale; - Vector3 capHeightStart = new Vector3(topLeft.x, m_Transform.TransformPoint(new Vector3(0, capline, 0)).y, 0); - Vector3 capHeightEnd = new Vector3(topRight.x, m_Transform.TransformPoint(new Vector3(0, capline, 0)).y, 0); - - float meanline = characterInfo.fontAsset == null ? 0 : baseline + characterInfo.fontAsset.faceInfo.meanLine * characterInfo.scale; - Vector3 meanlineStart = new Vector3(topLeft.x, m_Transform.TransformPoint(new Vector3(0, meanline, 0)).y, 0); - Vector3 meanlineEnd = new Vector3(topRight.x, m_Transform.TransformPoint(new Vector3(0, meanline, 0)).y, 0); - - if (characterInfo.isVisible) - { - // Cap line - Handles.color = Color.cyan; - Handles.DrawDottedLine(capHeightStart, capHeightEnd, dottedLineSize); - - // Mean line - Handles.color = Color.cyan; - Handles.DrawDottedLine(meanlineStart, meanlineEnd, dottedLineSize); - } - - //Draw Base line - Vector3 baselineStart = m_Transform.TransformPoint(new Vector3(origin, baseline, 0)); - Vector3 baselineEnd = m_Transform.TransformPoint(new Vector3(advance, baseline, 0)); - - Handles.color = Color.cyan; - Handles.DrawDottedLine(baselineStart, baselineEnd, dottedLineSize); - - //Draw Descent line - Vector3 descentlineStart = m_Transform.TransformPoint(new Vector3(origin, descentline, 0)); - Vector3 descentlineEnd = m_Transform.TransformPoint(new Vector3(advance, descentline, 0)); - - Handles.color = Color.cyan; - Handles.DrawDottedLine(descentlineStart, descentlineEnd, dottedLineSize); - - // Draw Origin - Vector3 originPosition = m_Transform.TransformPoint(new Vector3(origin, baseline, 0)); - DrawCrosshair(originPosition, 0.05f / m_ScaleMultiplier, Color.cyan); - - // Draw Horizontal Advance - Vector3 advancePosition = m_Transform.TransformPoint(new Vector3(advance, baseline, 0)); - DrawSquare(advancePosition, 0.025f / m_ScaleMultiplier, Color.yellow); - DrawCrosshair(advancePosition, 0.0125f / m_ScaleMultiplier, Color.yellow); - - // Draw text labels for metrics - if (m_HandleSize < 0.5f) - { - GUIStyle style = new GUIStyle(GUI.skin.GetStyle("Label")); - style.normal.textColor = new Color(0.6f, 0.6f, 0.6f, 1.0f); - style.fontSize = 12; - style.fixedWidth = 200; - style.fixedHeight = 20; - - Vector3 labelPosition; - float center = (origin + advance) / 2; - - //float baselineMetrics = 0; - //float ascentlineMetrics = ascentline - baseline; - //float caplineMetrics = capline - baseline; - //float meanlineMetrics = meanline - baseline; - //float descentlineMetrics = descentline - baseline; - - // Ascent Line - labelPosition = m_Transform.TransformPoint(new Vector3(center, ascentline, 0)); - style.alignment = TextAnchor.UpperCenter; - Handles.Label(labelPosition, "Ascent Line", style); - //Handles.Label(labelPosition, "Ascent Line (" + ascentlineMetrics.ToString("f3") + ")" , style); - - // Base Line - labelPosition = m_Transform.TransformPoint(new Vector3(center, baseline, 0)); - Handles.Label(labelPosition, "Base Line", style); - //Handles.Label(labelPosition, "Base Line (" + baselineMetrics.ToString("f3") + ")" , style); - - // Descent line - labelPosition = m_Transform.TransformPoint(new Vector3(center, descentline, 0)); - Handles.Label(labelPosition, "Descent Line", style); - //Handles.Label(labelPosition, "Descent Line (" + descentlineMetrics.ToString("f3") + ")" , style); - - if (characterInfo.isVisible) - { - // Cap Line - labelPosition = m_Transform.TransformPoint(new Vector3(center, capline, 0)); - style.alignment = TextAnchor.UpperCenter; - Handles.Label(labelPosition, "Cap Line", style); - //Handles.Label(labelPosition, "Cap Line (" + caplineMetrics.ToString("f3") + ")" , style); - - // Mean Line - labelPosition = m_Transform.TransformPoint(new Vector3(center, meanline, 0)); - style.alignment = TextAnchor.UpperCenter; - Handles.Label(labelPosition, "Mean Line", style); - //Handles.Label(labelPosition, "Mean Line (" + ascentlineMetrics.ToString("f3") + ")" , style); - - // Origin - labelPosition = m_Transform.TransformPoint(new Vector3(origin, baseline, 0)); - style.alignment = TextAnchor.UpperRight; - Handles.Label(labelPosition, "Origin ", style); - - // Advance - labelPosition = m_Transform.TransformPoint(new Vector3(advance, baseline, 0)); - style.alignment = TextAnchor.UpperLeft; - Handles.Label(labelPosition, " Advance", style); - } - } - } - } - - - /// - /// Method to draw rectangles around each word of the text. - /// - /// - void DrawWordBounds() - { - for (int i = 0; i < m_TextInfo.wordCount; i++) - { - TMP_WordInfo wInfo = m_TextInfo.wordInfo[i]; - - bool isBeginRegion = false; - - Vector3 bottomLeft = Vector3.zero; - Vector3 topLeft = Vector3.zero; - Vector3 bottomRight = Vector3.zero; - Vector3 topRight = Vector3.zero; - - float maxAscender = -Mathf.Infinity; - float minDescender = Mathf.Infinity; - - Color wordColor = Color.green; - - // Iterate through each character of the word - for (int j = 0; j < wInfo.characterCount; j++) - { - int characterIndex = wInfo.firstCharacterIndex + j; - TMP_CharacterInfo currentCharInfo = m_TextInfo.characterInfo[characterIndex]; - int currentLine = currentCharInfo.lineNumber; - - bool isCharacterVisible = characterIndex > m_TextComponent.maxVisibleCharacters || - currentCharInfo.lineNumber > m_TextComponent.maxVisibleLines || - (m_TextComponent.overflowMode == TextOverflowModes.Page && currentCharInfo.pageNumber + 1 != m_TextComponent.pageToDisplay) ? false : true; - - // Track Max Ascender and Min Descender - maxAscender = Mathf.Max(maxAscender, currentCharInfo.ascender); - minDescender = Mathf.Min(minDescender, currentCharInfo.descender); - - if (isBeginRegion == false && isCharacterVisible) - { - isBeginRegion = true; - - bottomLeft = new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.descender, 0); - topLeft = 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; - - topLeft = m_Transform.TransformPoint(new Vector3(topLeft.x, maxAscender, 0)); - bottomLeft = m_Transform.TransformPoint(new Vector3(bottomLeft.x, minDescender, 0)); - bottomRight = m_Transform.TransformPoint(new Vector3(currentCharInfo.topRight.x, minDescender, 0)); - topRight = m_Transform.TransformPoint(new Vector3(currentCharInfo.topRight.x, maxAscender, 0)); - - // Draw Region - DrawRectangle(bottomLeft, topLeft, topRight, bottomRight, wordColor); - - //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); - } - } - - // Last Character of Word - if (isBeginRegion && j == wInfo.characterCount - 1) - { - isBeginRegion = false; - - topLeft = m_Transform.TransformPoint(new Vector3(topLeft.x, maxAscender, 0)); - bottomLeft = m_Transform.TransformPoint(new Vector3(bottomLeft.x, minDescender, 0)); - bottomRight = m_Transform.TransformPoint(new Vector3(currentCharInfo.topRight.x, minDescender, 0)); - topRight = m_Transform.TransformPoint(new Vector3(currentCharInfo.topRight.x, maxAscender, 0)); - - // Draw Region - DrawRectangle(bottomLeft, topLeft, topRight, bottomRight, wordColor); - - //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); - } - // If Word is split on more than one line. - else if (isBeginRegion && currentLine != m_TextInfo.characterInfo[characterIndex + 1].lineNumber) - { - isBeginRegion = false; - - topLeft = m_Transform.TransformPoint(new Vector3(topLeft.x, maxAscender, 0)); - bottomLeft = m_Transform.TransformPoint(new Vector3(bottomLeft.x, minDescender, 0)); - bottomRight = m_Transform.TransformPoint(new Vector3(currentCharInfo.topRight.x, minDescender, 0)); - topRight = m_Transform.TransformPoint(new Vector3(currentCharInfo.topRight.x, maxAscender, 0)); - - // Draw Region - DrawRectangle(bottomLeft, topLeft, topRight, bottomRight, wordColor); - //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); - maxAscender = -Mathf.Infinity; - minDescender = Mathf.Infinity; - - } - } - - //Debug.Log(wInfo.GetWord(m_TextMeshPro.textInfo.characterInfo)); - } - - - } - - - /// - /// Draw rectangle around each of the links contained in the text. - /// - /// - void DrawLinkBounds() - { - TMP_TextInfo textInfo = m_TextComponent.textInfo; - - for (int i = 0; i < textInfo.linkCount; i++) - { - TMP_LinkInfo linkInfo = textInfo.linkInfo[i]; - - bool isBeginRegion = false; - - Vector3 bottomLeft = Vector3.zero; - Vector3 topLeft = Vector3.zero; - Vector3 bottomRight = Vector3.zero; - Vector3 topRight = Vector3.zero; - - float maxAscender = -Mathf.Infinity; - float minDescender = Mathf.Infinity; - - Color32 linkColor = Color.cyan; - - // Iterate through each character of the link text - for (int j = 0; j < linkInfo.linkTextLength; j++) - { - int characterIndex = linkInfo.linkTextfirstCharacterIndex + j; - TMP_CharacterInfo currentCharInfo = textInfo.characterInfo[characterIndex]; - int currentLine = currentCharInfo.lineNumber; - - bool isCharacterVisible = characterIndex > m_TextComponent.maxVisibleCharacters || - currentCharInfo.lineNumber > m_TextComponent.maxVisibleLines || - (m_TextComponent.overflowMode == TextOverflowModes.Page && currentCharInfo.pageNumber + 1 != m_TextComponent.pageToDisplay) ? false : true; - - // Track Max Ascender and Min Descender - maxAscender = Mathf.Max(maxAscender, currentCharInfo.ascender); - minDescender = Mathf.Min(minDescender, currentCharInfo.descender); - - if (isBeginRegion == false && isCharacterVisible) - { - isBeginRegion = true; - - bottomLeft = new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.descender, 0); - topLeft = new Vector3(currentCharInfo.bottomLeft.x, currentCharInfo.ascender, 0); - - //Debug.Log("Start Word Region at [" + currentCharInfo.character + "]"); - - // If Link is one character - if (linkInfo.linkTextLength == 1) - { - isBeginRegion = false; - - topLeft = m_Transform.TransformPoint(new Vector3(topLeft.x, maxAscender, 0)); - bottomLeft = m_Transform.TransformPoint(new Vector3(bottomLeft.x, minDescender, 0)); - bottomRight = m_Transform.TransformPoint(new Vector3(currentCharInfo.topRight.x, minDescender, 0)); - topRight = m_Transform.TransformPoint(new Vector3(currentCharInfo.topRight.x, maxAscender, 0)); - - // Draw Region - DrawRectangle(bottomLeft, topLeft, topRight, bottomRight, linkColor); - - //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); - } - } - - // Last Character of Link - if (isBeginRegion && j == linkInfo.linkTextLength - 1) - { - isBeginRegion = false; - - topLeft = m_Transform.TransformPoint(new Vector3(topLeft.x, maxAscender, 0)); - bottomLeft = m_Transform.TransformPoint(new Vector3(bottomLeft.x, minDescender, 0)); - bottomRight = m_Transform.TransformPoint(new Vector3(currentCharInfo.topRight.x, minDescender, 0)); - topRight = m_Transform.TransformPoint(new Vector3(currentCharInfo.topRight.x, maxAscender, 0)); - - // Draw Region - DrawRectangle(bottomLeft, topLeft, topRight, bottomRight, linkColor); - - //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); - } - // If Link is split on more than one line. - else if (isBeginRegion && currentLine != textInfo.characterInfo[characterIndex + 1].lineNumber) - { - isBeginRegion = false; - - topLeft = m_Transform.TransformPoint(new Vector3(topLeft.x, maxAscender, 0)); - bottomLeft = m_Transform.TransformPoint(new Vector3(bottomLeft.x, minDescender, 0)); - bottomRight = m_Transform.TransformPoint(new Vector3(currentCharInfo.topRight.x, minDescender, 0)); - topRight = m_Transform.TransformPoint(new Vector3(currentCharInfo.topRight.x, maxAscender, 0)); - - // Draw Region - DrawRectangle(bottomLeft, topLeft, topRight, bottomRight, linkColor); - - maxAscender = -Mathf.Infinity; - minDescender = Mathf.Infinity; - //Debug.Log("End Word Region at [" + currentCharInfo.character + "]"); - } - } - - //Debug.Log(wInfo.GetWord(m_TextMeshPro.textInfo.characterInfo)); - } - } - - - /// - /// Draw Rectangles around each lines of the text. - /// - /// - void DrawLineBounds() - { - int lineCount = m_TextInfo.lineCount; - - for (int i = 0; i < lineCount; i++) - { - TMP_LineInfo lineInfo = m_TextInfo.lineInfo[i]; - TMP_CharacterInfo firstCharacterInfo = m_TextInfo.characterInfo[lineInfo.firstCharacterIndex]; - TMP_CharacterInfo lastCharacterInfo = m_TextInfo.characterInfo[lineInfo.lastCharacterIndex]; - - bool isLineVisible = (lineInfo.characterCount == 1 && (firstCharacterInfo.character == 10 || firstCharacterInfo.character == 11 || firstCharacterInfo.character == 0x2028 || firstCharacterInfo.character == 0x2029)) || - i > m_TextComponent.maxVisibleLines || - (m_TextComponent.overflowMode == TextOverflowModes.Page && firstCharacterInfo.pageNumber + 1 != m_TextComponent.pageToDisplay) ? false : true; - - if (!isLineVisible) continue; - - float lineBottomLeft = firstCharacterInfo.bottomLeft.x; - float lineTopRight = lastCharacterInfo.topRight.x; - - float ascentline = lineInfo.ascender; - float baseline = lineInfo.baseline; - float descentline = lineInfo.descender; - - float dottedLineSize = 12; - - // Draw line extents - DrawDottedRectangle(m_Transform.TransformPoint(lineInfo.lineExtents.min), m_Transform.TransformPoint(lineInfo.lineExtents.max), Color.green, 4); - - // Draw Ascent line - Vector3 ascentlineStart = m_Transform.TransformPoint(new Vector3(lineBottomLeft, ascentline, 0)); - Vector3 ascentlineEnd = m_Transform.TransformPoint(new Vector3(lineTopRight, ascentline, 0)); - - Handles.color = Color.yellow; - Handles.DrawDottedLine(ascentlineStart, ascentlineEnd, dottedLineSize); - - // Draw Base line - Vector3 baseLineStart = m_Transform.TransformPoint(new Vector3(lineBottomLeft, baseline, 0)); - Vector3 baseLineEnd = m_Transform.TransformPoint(new Vector3(lineTopRight, baseline, 0)); - - Handles.color = Color.yellow; - Handles.DrawDottedLine(baseLineStart, baseLineEnd, dottedLineSize); - - // Draw Descent line - Vector3 descentLineStart = m_Transform.TransformPoint(new Vector3(lineBottomLeft, descentline, 0)); - Vector3 descentLineEnd = m_Transform.TransformPoint(new Vector3(lineTopRight, descentline, 0)); - - Handles.color = Color.yellow; - Handles.DrawDottedLine(descentLineStart, descentLineEnd, dottedLineSize); - - // Draw text labels for metrics - if (m_HandleSize < 1.0f) - { - GUIStyle style = new GUIStyle(); - style.normal.textColor = new Color(0.8f, 0.8f, 0.8f, 1.0f); - style.fontSize = 12; - style.fixedWidth = 200; - style.fixedHeight = 20; - Vector3 labelPosition; - - // Ascent Line - labelPosition = m_Transform.TransformPoint(new Vector3(lineBottomLeft, ascentline, 0)); - style.padding = new RectOffset(0, 10, 0, 5); - style.alignment = TextAnchor.MiddleRight; - Handles.Label(labelPosition, "Ascent Line", style); - - // Base Line - labelPosition = m_Transform.TransformPoint(new Vector3(lineBottomLeft, baseline, 0)); - Handles.Label(labelPosition, "Base Line", style); - - // Descent line - labelPosition = m_Transform.TransformPoint(new Vector3(lineBottomLeft, descentline, 0)); - Handles.Label(labelPosition, "Descent Line", style); - } - } - } - - - /// - /// Draw Rectangle around the bounds of the text object. - /// - void DrawBounds() - { - Bounds meshBounds = m_TextComponent.bounds; - - // Get Bottom Left and Top Right position of each word - Vector3 bottomLeft = m_TextComponent.transform.position + meshBounds.min; - Vector3 topRight = m_TextComponent.transform.position + meshBounds.max; - - DrawRectangle(bottomLeft, topRight, new Color(1, 0.5f, 0)); - } - - - void DrawTextBounds() - { - Bounds textBounds = m_TextComponent.textBounds; - - Vector3 bottomLeft = m_TextComponent.transform.position + (textBounds.center - textBounds.extents); - Vector3 topRight = m_TextComponent.transform.position + (textBounds.center + textBounds.extents); - - DrawRectangle(bottomLeft, topRight, new Color(0f, 0.5f, 0.5f)); - } - - - // Draw Rectangles - void DrawRectangle(Vector3 BL, Vector3 TR, Color color) - { - Gizmos.color = color; - - Gizmos.DrawLine(new Vector3(BL.x, BL.y, 0), new Vector3(BL.x, TR.y, 0)); - Gizmos.DrawLine(new Vector3(BL.x, TR.y, 0), new Vector3(TR.x, TR.y, 0)); - Gizmos.DrawLine(new Vector3(TR.x, TR.y, 0), new Vector3(TR.x, BL.y, 0)); - Gizmos.DrawLine(new Vector3(TR.x, BL.y, 0), new Vector3(BL.x, BL.y, 0)); - } - - void DrawDottedRectangle(Vector3 bottomLeft, Vector3 topRight, Color color, float size = 5.0f) - { - Handles.color = color; - Handles.DrawDottedLine(bottomLeft, new Vector3(bottomLeft.x, topRight.y, bottomLeft.z), size); - Handles.DrawDottedLine(new Vector3(bottomLeft.x, topRight.y, bottomLeft.z), topRight, size); - Handles.DrawDottedLine(topRight, new Vector3(topRight.x, bottomLeft.y, bottomLeft.z), size); - Handles.DrawDottedLine(new Vector3(topRight.x, bottomLeft.y, bottomLeft.z), bottomLeft, size); - } - - void DrawSolidRectangle(Vector3 bottomLeft, Vector3 topRight, Color color, float size = 5.0f) - { - Handles.color = color; - Rect rect = new Rect(bottomLeft, topRight - bottomLeft); - Handles.DrawSolidRectangleWithOutline(rect, color, Color.black); - } - - void DrawSquare(Vector3 position, float size, Color color) - { - Handles.color = color; - Vector3 bottomLeft = new Vector3(position.x - size, position.y - size, position.z); - Vector3 topLeft = new Vector3(position.x - size, position.y + size, position.z); - Vector3 topRight = new Vector3(position.x + size, position.y + size, position.z); - Vector3 bottomRight = new Vector3(position.x + size, position.y - size, position.z); - - Handles.DrawLine(bottomLeft, topLeft); - Handles.DrawLine(topLeft, topRight); - Handles.DrawLine(topRight, bottomRight); - Handles.DrawLine(bottomRight, bottomLeft); - } - - void DrawCrosshair(Vector3 position, float size, Color color) - { - Handles.color = color; - - Handles.DrawLine(new Vector3(position.x - size, position.y, position.z), new Vector3(position.x + size, position.y, position.z)); - Handles.DrawLine(new Vector3(position.x, position.y - size, position.z), new Vector3(position.x, position.y + size, position.z)); - } - - - // Draw Rectangles - void DrawRectangle(Vector3 bl, Vector3 tl, Vector3 tr, Vector3 br, Color color) - { - Gizmos.color = color; - - Gizmos.DrawLine(bl, tl); - Gizmos.DrawLine(tl, tr); - Gizmos.DrawLine(tr, br); - Gizmos.DrawLine(br, bl); - } - - - // Draw Rectangles - void DrawDottedRectangle(Vector3 bl, Vector3 tl, Vector3 tr, Vector3 br, Color color) - { - var cam = Camera.current; - float dotSpacing = (cam.WorldToScreenPoint(br).x - cam.WorldToScreenPoint(bl).x) / 75f; - UnityEditor.Handles.color = color; - - UnityEditor.Handles.DrawDottedLine(bl, tl, dotSpacing); - UnityEditor.Handles.DrawDottedLine(tl, tr, dotSpacing); - UnityEditor.Handles.DrawDottedLine(tr, br, dotSpacing); - UnityEditor.Handles.DrawDottedLine(br, bl, dotSpacing); - } - #endif - } -} - diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextInfoDebugTool.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextInfoDebugTool.cs.meta deleted file mode 100644 index 12400bfef9..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextInfoDebugTool.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 21256c5b62f346f18640dad779911e20 -timeCreated: 1430348781 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextSelector_A.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextSelector_A.cs deleted file mode 100644 index 33d56e4cc3..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextSelector_A.cs +++ /dev/null @@ -1,157 +0,0 @@ -using UnityEngine; -using UnityEngine.EventSystems; -using System.Collections; - - -namespace TMPro.Examples -{ - - public class TMP_TextSelector_A : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler - { - private TextMeshPro m_TextMeshPro; - - private Camera m_Camera; - - private bool m_isHoveringObject; - private int m_selectedLink = -1; - private int m_lastCharIndex = -1; - private int m_lastWordIndex = -1; - - void Awake() - { - m_TextMeshPro = gameObject.GetComponent(); - m_Camera = Camera.main; - - // Force generation of the text object so we have valid data to work with. This is needed since LateUpdate() will be called before the text object has a chance to generated when entering play mode. - m_TextMeshPro.ForceMeshUpdate(); - } - - - void LateUpdate() - { - m_isHoveringObject = false; - - if (TMP_TextUtilities.IsIntersectingRectTransform(m_TextMeshPro.rectTransform, Input.mousePosition, Camera.main)) - { - m_isHoveringObject = true; - } - - if (m_isHoveringObject) - { - #region Example of Character Selection - int charIndex = TMP_TextUtilities.FindIntersectingCharacter(m_TextMeshPro, Input.mousePosition, Camera.main, true); - if (charIndex != -1 && charIndex != m_lastCharIndex && (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift))) - { - //Debug.Log("[" + m_TextMeshPro.textInfo.characterInfo[charIndex].character + "] has been selected."); - - m_lastCharIndex = charIndex; - - int meshIndex = m_TextMeshPro.textInfo.characterInfo[charIndex].materialReferenceIndex; - - int vertexIndex = m_TextMeshPro.textInfo.characterInfo[charIndex].vertexIndex; - - Color32 c = new Color32((byte)Random.Range(0, 255), (byte)Random.Range(0, 255), (byte)Random.Range(0, 255), 255); - - Color32[] vertexColors = m_TextMeshPro.textInfo.meshInfo[meshIndex].colors32; - - vertexColors[vertexIndex + 0] = c; - vertexColors[vertexIndex + 1] = c; - vertexColors[vertexIndex + 2] = c; - vertexColors[vertexIndex + 3] = c; - - //m_TextMeshPro.mesh.colors32 = vertexColors; - m_TextMeshPro.textInfo.meshInfo[meshIndex].mesh.colors32 = vertexColors; - } - #endregion - - #region Example of Link Handling - // Check if mouse intersects with any links. - int linkIndex = TMP_TextUtilities.FindIntersectingLink(m_TextMeshPro, Input.mousePosition, m_Camera); - - // Clear previous link selection if one existed. - if ((linkIndex == -1 && m_selectedLink != -1) || linkIndex != m_selectedLink) - { - //m_TextPopup_RectTransform.gameObject.SetActive(false); - m_selectedLink = -1; - } - - // Handle new Link selection. - if (linkIndex != -1 && linkIndex != m_selectedLink) - { - m_selectedLink = linkIndex; - - TMP_LinkInfo linkInfo = m_TextMeshPro.textInfo.linkInfo[linkIndex]; - - // The following provides an example of how to access the link properties. - //Debug.Log("Link ID: \"" + linkInfo.GetLinkID() + "\" Link Text: \"" + linkInfo.GetLinkText() + "\""); // Example of how to retrieve the Link ID and Link Text. - - Vector3 worldPointInRectangle; - - RectTransformUtility.ScreenPointToWorldPointInRectangle(m_TextMeshPro.rectTransform, Input.mousePosition, m_Camera, out worldPointInRectangle); - - switch (linkInfo.GetLinkID()) - { - case "id_01": // 100041637: // id_01 - //m_TextPopup_RectTransform.position = worldPointInRectangle; - //m_TextPopup_RectTransform.gameObject.SetActive(true); - //m_TextPopup_TMPComponent.text = k_LinkText + " ID 01"; - break; - case "id_02": // 100041638: // id_02 - //m_TextPopup_RectTransform.position = worldPointInRectangle; - //m_TextPopup_RectTransform.gameObject.SetActive(true); - //m_TextPopup_TMPComponent.text = k_LinkText + " ID 02"; - break; - } - } - #endregion - - - #region Example of Word Selection - // Check if Mouse intersects any words and if so assign a random color to that word. - int wordIndex = TMP_TextUtilities.FindIntersectingWord(m_TextMeshPro, Input.mousePosition, Camera.main); - if (wordIndex != -1 && wordIndex != m_lastWordIndex) - { - m_lastWordIndex = wordIndex; - - TMP_WordInfo wInfo = m_TextMeshPro.textInfo.wordInfo[wordIndex]; - - Vector3 wordPOS = m_TextMeshPro.transform.TransformPoint(m_TextMeshPro.textInfo.characterInfo[wInfo.firstCharacterIndex].bottomLeft); - wordPOS = Camera.main.WorldToScreenPoint(wordPOS); - - //Debug.Log("Mouse Position: " + Input.mousePosition.ToString("f3") + " Word Position: " + wordPOS.ToString("f3")); - - Color32[] vertexColors = m_TextMeshPro.textInfo.meshInfo[0].colors32; - - Color32 c = new Color32((byte)Random.Range(0, 255), (byte)Random.Range(0, 255), (byte)Random.Range(0, 255), 255); - for (int i = 0; i < wInfo.characterCount; i++) - { - int vertexIndex = m_TextMeshPro.textInfo.characterInfo[wInfo.firstCharacterIndex + i].vertexIndex; - - vertexColors[vertexIndex + 0] = c; - vertexColors[vertexIndex + 1] = c; - vertexColors[vertexIndex + 2] = c; - vertexColors[vertexIndex + 3] = c; - } - - m_TextMeshPro.mesh.colors32 = vertexColors; - } - #endregion - } - } - - - public void OnPointerEnter(PointerEventData eventData) - { - Debug.Log("OnPointerEnter()"); - m_isHoveringObject = true; - } - - - public void OnPointerExit(PointerEventData eventData) - { - Debug.Log("OnPointerExit()"); - m_isHoveringObject = false; - } - - } -} diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextSelector_A.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextSelector_A.cs.meta deleted file mode 100644 index da25ec4eb0..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextSelector_A.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 103e0a6a1d404693b9fb1a5173e0e979 -timeCreated: 1452811039 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextSelector_B.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextSelector_B.cs deleted file mode 100644 index e41fbfa126..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextSelector_B.cs +++ /dev/null @@ -1,547 +0,0 @@ -using UnityEngine; -using UnityEngine.Events; -using UnityEngine.EventSystems; -using System.Collections; -using System.Collections.Generic; - - -#pragma warning disable 0618 // Disabled warning due to SetVertices being deprecated until new release with SetMesh() is available. - -namespace TMPro.Examples -{ - - public class TMP_TextSelector_B : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerClickHandler, IPointerUpHandler - { - public RectTransform TextPopup_Prefab_01; - - private RectTransform m_TextPopup_RectTransform; - private TextMeshProUGUI m_TextPopup_TMPComponent; - private const string k_LinkText = "You have selected link <#ffff00>"; - private const string k_WordText = "Word Index: <#ffff00>"; - - - private TextMeshProUGUI m_TextMeshPro; - private Canvas m_Canvas; - private Camera m_Camera; - - // Flags - private bool isHoveringObject; - private int m_selectedWord = -1; - private int m_selectedLink = -1; - private int m_lastIndex = -1; - - private Matrix4x4 m_matrix; - - private TMP_MeshInfo[] m_cachedMeshInfoVertexData; - - void Awake() - { - m_TextMeshPro = gameObject.GetComponent(); - - - m_Canvas = gameObject.GetComponentInParent(); - - // Get a reference to the camera if Canvas Render Mode is not ScreenSpace Overlay. - if (m_Canvas.renderMode == RenderMode.ScreenSpaceOverlay) - m_Camera = null; - else - m_Camera = m_Canvas.worldCamera; - - // Create pop-up text object which is used to show the link information. - m_TextPopup_RectTransform = Instantiate(TextPopup_Prefab_01) as RectTransform; - m_TextPopup_RectTransform.SetParent(m_Canvas.transform, false); - m_TextPopup_TMPComponent = m_TextPopup_RectTransform.GetComponentInChildren(); - m_TextPopup_RectTransform.gameObject.SetActive(false); - } - - - void OnEnable() - { - // Subscribe to event fired when text object has been regenerated. - TMPro_EventManager.TEXT_CHANGED_EVENT.Add(ON_TEXT_CHANGED); - } - - void OnDisable() - { - // UnSubscribe to event fired when text object has been regenerated. - TMPro_EventManager.TEXT_CHANGED_EVENT.Remove(ON_TEXT_CHANGED); - } - - - void ON_TEXT_CHANGED(Object obj) - { - if (obj == m_TextMeshPro) - { - // Update cached vertex data. - m_cachedMeshInfoVertexData = m_TextMeshPro.textInfo.CopyMeshInfoVertexData(); - } - } - - - void LateUpdate() - { - if (isHoveringObject) - { - // Check if Mouse Intersects any of the characters. If so, assign a random color. - #region Handle Character Selection - int charIndex = TMP_TextUtilities.FindIntersectingCharacter(m_TextMeshPro, Input.mousePosition, m_Camera, true); - - // Undo Swap and Vertex Attribute changes. - if (charIndex == -1 || charIndex != m_lastIndex) - { - RestoreCachedVertexAttributes(m_lastIndex); - m_lastIndex = -1; - } - - if (charIndex != -1 && charIndex != m_lastIndex && (Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift))) - { - m_lastIndex = charIndex; - - // Get the index of the material / sub text object used by this character. - int materialIndex = m_TextMeshPro.textInfo.characterInfo[charIndex].materialReferenceIndex; - - // Get the index of the first vertex of the selected character. - int vertexIndex = m_TextMeshPro.textInfo.characterInfo[charIndex].vertexIndex; - - // Get a reference to the vertices array. - Vector3[] vertices = m_TextMeshPro.textInfo.meshInfo[materialIndex].vertices; - - // Determine the center point of the character. - Vector2 charMidBasline = (vertices[vertexIndex + 0] + vertices[vertexIndex + 2]) / 2; - - // Need to translate all 4 vertices of the character to aligned with middle of character / baseline. - // This is needed so the matrix TRS is applied at the origin for each character. - Vector3 offset = charMidBasline; - - // Translate the character to the middle baseline. - vertices[vertexIndex + 0] = vertices[vertexIndex + 0] - offset; - vertices[vertexIndex + 1] = vertices[vertexIndex + 1] - offset; - vertices[vertexIndex + 2] = vertices[vertexIndex + 2] - offset; - vertices[vertexIndex + 3] = vertices[vertexIndex + 3] - offset; - - float zoomFactor = 1.5f; - - // Setup the Matrix for the scale change. - m_matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, Vector3.one * zoomFactor); - - // Apply Matrix operation on the given character. - vertices[vertexIndex + 0] = m_matrix.MultiplyPoint3x4(vertices[vertexIndex + 0]); - vertices[vertexIndex + 1] = m_matrix.MultiplyPoint3x4(vertices[vertexIndex + 1]); - vertices[vertexIndex + 2] = m_matrix.MultiplyPoint3x4(vertices[vertexIndex + 2]); - vertices[vertexIndex + 3] = m_matrix.MultiplyPoint3x4(vertices[vertexIndex + 3]); - - // Translate the character back to its original position. - vertices[vertexIndex + 0] = vertices[vertexIndex + 0] + offset; - vertices[vertexIndex + 1] = vertices[vertexIndex + 1] + offset; - vertices[vertexIndex + 2] = vertices[vertexIndex + 2] + offset; - vertices[vertexIndex + 3] = vertices[vertexIndex + 3] + offset; - - // Change Vertex Colors of the highlighted character - Color32 c = new Color32(255, 255, 192, 255); - - // Get a reference to the vertex color - Color32[] vertexColors = m_TextMeshPro.textInfo.meshInfo[materialIndex].colors32; - - vertexColors[vertexIndex + 0] = c; - vertexColors[vertexIndex + 1] = c; - vertexColors[vertexIndex + 2] = c; - vertexColors[vertexIndex + 3] = c; - - - // Get a reference to the meshInfo of the selected character. - TMP_MeshInfo meshInfo = m_TextMeshPro.textInfo.meshInfo[materialIndex]; - - // Get the index of the last character's vertex attributes. - int lastVertexIndex = vertices.Length - 4; - - // Swap the current character's vertex attributes with those of the last element in the vertex attribute arrays. - // We do this to make sure this character is rendered last and over other characters. - meshInfo.SwapVertexData(vertexIndex, lastVertexIndex); - - // Need to update the appropriate - m_TextMeshPro.UpdateVertexData(TMP_VertexDataUpdateFlags.All); - } - #endregion - - - #region Word Selection Handling - //Check if Mouse intersects any words and if so assign a random color to that word. - int wordIndex = TMP_TextUtilities.FindIntersectingWord(m_TextMeshPro, Input.mousePosition, m_Camera); - - // Clear previous word selection. - if (m_TextPopup_RectTransform != null && m_selectedWord != -1 && (wordIndex == -1 || wordIndex != m_selectedWord)) - { - TMP_WordInfo wInfo = m_TextMeshPro.textInfo.wordInfo[m_selectedWord]; - - // Iterate through each of the characters of the word. - for (int i = 0; i < wInfo.characterCount; i++) - { - int characterIndex = wInfo.firstCharacterIndex + i; - - // Get the index of the material / sub text object used by this character. - int meshIndex = m_TextMeshPro.textInfo.characterInfo[characterIndex].materialReferenceIndex; - - // Get the index of the first vertex of this character. - int vertexIndex = m_TextMeshPro.textInfo.characterInfo[characterIndex].vertexIndex; - - // Get a reference to the vertex color - Color32[] vertexColors = m_TextMeshPro.textInfo.meshInfo[meshIndex].colors32; - - Color32 c = vertexColors[vertexIndex + 0].Tint(1.33333f); - - vertexColors[vertexIndex + 0] = c; - vertexColors[vertexIndex + 1] = c; - vertexColors[vertexIndex + 2] = c; - vertexColors[vertexIndex + 3] = c; - } - - // Update Geometry - m_TextMeshPro.UpdateVertexData(TMP_VertexDataUpdateFlags.All); - - m_selectedWord = -1; - } - - - // Word Selection Handling - if (wordIndex != -1 && wordIndex != m_selectedWord && !(Input.GetKey(KeyCode.LeftShift) || Input.GetKey(KeyCode.RightShift))) - { - m_selectedWord = wordIndex; - - TMP_WordInfo wInfo = m_TextMeshPro.textInfo.wordInfo[wordIndex]; - - // Iterate through each of the characters of the word. - for (int i = 0; i < wInfo.characterCount; i++) - { - int characterIndex = wInfo.firstCharacterIndex + i; - - // Get the index of the material / sub text object used by this character. - int meshIndex = m_TextMeshPro.textInfo.characterInfo[characterIndex].materialReferenceIndex; - - int vertexIndex = m_TextMeshPro.textInfo.characterInfo[characterIndex].vertexIndex; - - // Get a reference to the vertex color - Color32[] vertexColors = m_TextMeshPro.textInfo.meshInfo[meshIndex].colors32; - - Color32 c = vertexColors[vertexIndex + 0].Tint(0.75f); - - vertexColors[vertexIndex + 0] = c; - vertexColors[vertexIndex + 1] = c; - vertexColors[vertexIndex + 2] = c; - vertexColors[vertexIndex + 3] = c; - } - - // Update Geometry - m_TextMeshPro.UpdateVertexData(TMP_VertexDataUpdateFlags.All); - - } - #endregion - - - #region Example of Link Handling - // Check if mouse intersects with any links. - int linkIndex = TMP_TextUtilities.FindIntersectingLink(m_TextMeshPro, Input.mousePosition, m_Camera); - - // Clear previous link selection if one existed. - if ((linkIndex == -1 && m_selectedLink != -1) || linkIndex != m_selectedLink) - { - m_TextPopup_RectTransform.gameObject.SetActive(false); - m_selectedLink = -1; - } - - // Handle new Link selection. - if (linkIndex != -1 && linkIndex != m_selectedLink) - { - m_selectedLink = linkIndex; - - TMP_LinkInfo linkInfo = m_TextMeshPro.textInfo.linkInfo[linkIndex]; - - // Debug.Log("Link ID: \"" + linkInfo.GetLinkID() + "\" Link Text: \"" + linkInfo.GetLinkText() + "\""); // Example of how to retrieve the Link ID and Link Text. - - Vector3 worldPointInRectangle; - RectTransformUtility.ScreenPointToWorldPointInRectangle(m_TextMeshPro.rectTransform, Input.mousePosition, m_Camera, out worldPointInRectangle); - - switch (linkInfo.GetLinkID()) - { - case "id_01": // 100041637: // id_01 - m_TextPopup_RectTransform.position = worldPointInRectangle; - m_TextPopup_RectTransform.gameObject.SetActive(true); - m_TextPopup_TMPComponent.text = k_LinkText + " ID 01"; - break; - case "id_02": // 100041638: // id_02 - m_TextPopup_RectTransform.position = worldPointInRectangle; - m_TextPopup_RectTransform.gameObject.SetActive(true); - m_TextPopup_TMPComponent.text = k_LinkText + " ID 02"; - break; - } - } - #endregion - - } - else - { - // Restore any character that may have been modified - if (m_lastIndex != -1) - { - RestoreCachedVertexAttributes(m_lastIndex); - m_lastIndex = -1; - } - } - - } - - - public void OnPointerEnter(PointerEventData eventData) - { - //Debug.Log("OnPointerEnter()"); - isHoveringObject = true; - } - - - public void OnPointerExit(PointerEventData eventData) - { - //Debug.Log("OnPointerExit()"); - isHoveringObject = false; - } - - - public void OnPointerClick(PointerEventData eventData) - { - //Debug.Log("Click at POS: " + eventData.position + " World POS: " + eventData.worldPosition); - - // Check if Mouse Intersects any of the characters. If so, assign a random color. - #region Character Selection Handling - /* - int charIndex = TMP_TextUtilities.FindIntersectingCharacter(m_TextMeshPro, Input.mousePosition, m_Camera, true); - if (charIndex != -1 && charIndex != m_lastIndex) - { - //Debug.Log("Character [" + m_TextMeshPro.textInfo.characterInfo[index].character + "] was selected at POS: " + eventData.position); - m_lastIndex = charIndex; - - Color32 c = new Color32((byte)Random.Range(0, 255), (byte)Random.Range(0, 255), (byte)Random.Range(0, 255), 255); - int vertexIndex = m_TextMeshPro.textInfo.characterInfo[charIndex].vertexIndex; - - UIVertex[] uiVertices = m_TextMeshPro.textInfo.meshInfo.uiVertices; - - uiVertices[vertexIndex + 0].color = c; - uiVertices[vertexIndex + 1].color = c; - uiVertices[vertexIndex + 2].color = c; - uiVertices[vertexIndex + 3].color = c; - - m_TextMeshPro.canvasRenderer.SetVertices(uiVertices, uiVertices.Length); - } - */ - #endregion - - - #region Word Selection Handling - //Check if Mouse intersects any words and if so assign a random color to that word. - /* - int wordIndex = TMP_TextUtilities.FindIntersectingWord(m_TextMeshPro, Input.mousePosition, m_Camera); - - // Clear previous word selection. - if (m_TextPopup_RectTransform != null && m_selectedWord != -1 && (wordIndex == -1 || wordIndex != m_selectedWord)) - { - TMP_WordInfo wInfo = m_TextMeshPro.textInfo.wordInfo[m_selectedWord]; - - // Get a reference to the uiVertices array. - UIVertex[] uiVertices = m_TextMeshPro.textInfo.meshInfo.uiVertices; - - // Iterate through each of the characters of the word. - for (int i = 0; i < wInfo.characterCount; i++) - { - int vertexIndex = m_TextMeshPro.textInfo.characterInfo[wInfo.firstCharacterIndex + i].vertexIndex; - - Color32 c = uiVertices[vertexIndex + 0].color.Tint(1.33333f); - - uiVertices[vertexIndex + 0].color = c; - uiVertices[vertexIndex + 1].color = c; - uiVertices[vertexIndex + 2].color = c; - uiVertices[vertexIndex + 3].color = c; - } - - m_TextMeshPro.canvasRenderer.SetVertices(uiVertices, uiVertices.Length); - - m_selectedWord = -1; - } - - // Handle word selection - if (wordIndex != -1 && wordIndex != m_selectedWord) - { - m_selectedWord = wordIndex; - - TMP_WordInfo wInfo = m_TextMeshPro.textInfo.wordInfo[wordIndex]; - - // Get a reference to the uiVertices array. - UIVertex[] uiVertices = m_TextMeshPro.textInfo.meshInfo.uiVertices; - - // Iterate through each of the characters of the word. - for (int i = 0; i < wInfo.characterCount; i++) - { - int vertexIndex = m_TextMeshPro.textInfo.characterInfo[wInfo.firstCharacterIndex + i].vertexIndex; - - Color32 c = uiVertices[vertexIndex + 0].color.Tint(0.75f); - - uiVertices[vertexIndex + 0].color = c; - uiVertices[vertexIndex + 1].color = c; - uiVertices[vertexIndex + 2].color = c; - uiVertices[vertexIndex + 3].color = c; - } - - m_TextMeshPro.canvasRenderer.SetVertices(uiVertices, uiVertices.Length); - } - */ - #endregion - - - #region Link Selection Handling - /* - // Check if Mouse intersects any words and if so assign a random color to that word. - int linkIndex = TMP_TextUtilities.FindIntersectingLink(m_TextMeshPro, Input.mousePosition, m_Camera); - if (linkIndex != -1) - { - TMP_LinkInfo linkInfo = m_TextMeshPro.textInfo.linkInfo[linkIndex]; - int linkHashCode = linkInfo.hashCode; - - //Debug.Log(TMP_TextUtilities.GetSimpleHashCode("id_02")); - - switch (linkHashCode) - { - case 291445: // id_01 - if (m_LinkObject01 == null) - m_LinkObject01 = Instantiate(Link_01_Prefab); - else - { - m_LinkObject01.gameObject.SetActive(true); - } - - break; - case 291446: // id_02 - break; - - } - - // Example of how to modify vertex attributes like colors - #region Vertex Attribute Modification Example - UIVertex[] uiVertices = m_TextMeshPro.textInfo.meshInfo.uiVertices; - - Color32 c = new Color32((byte)Random.Range(0, 255), (byte)Random.Range(0, 255), (byte)Random.Range(0, 255), 255); - for (int i = 0; i < linkInfo.characterCount; i++) - { - TMP_CharacterInfo cInfo = m_TextMeshPro.textInfo.characterInfo[linkInfo.firstCharacterIndex + i]; - - if (!cInfo.isVisible) continue; // Skip invisible characters. - - int vertexIndex = cInfo.vertexIndex; - - uiVertices[vertexIndex + 0].color = c; - uiVertices[vertexIndex + 1].color = c; - uiVertices[vertexIndex + 2].color = c; - uiVertices[vertexIndex + 3].color = c; - } - - m_TextMeshPro.canvasRenderer.SetVertices(uiVertices, uiVertices.Length); - #endregion - } - */ - #endregion - } - - - public void OnPointerUp(PointerEventData eventData) - { - //Debug.Log("OnPointerUp()"); - } - - - void RestoreCachedVertexAttributes(int index) - { - if (index == -1 || index > m_TextMeshPro.textInfo.characterCount - 1) return; - - // Get the index of the material / sub text object used by this character. - int materialIndex = m_TextMeshPro.textInfo.characterInfo[index].materialReferenceIndex; - - // Get the index of the first vertex of the selected character. - int vertexIndex = m_TextMeshPro.textInfo.characterInfo[index].vertexIndex; - - // Restore Vertices - // Get a reference to the cached / original vertices. - Vector3[] src_vertices = m_cachedMeshInfoVertexData[materialIndex].vertices; - - // Get a reference to the vertices that we need to replace. - Vector3[] dst_vertices = m_TextMeshPro.textInfo.meshInfo[materialIndex].vertices; - - // Restore / Copy vertices from source to destination - dst_vertices[vertexIndex + 0] = src_vertices[vertexIndex + 0]; - dst_vertices[vertexIndex + 1] = src_vertices[vertexIndex + 1]; - dst_vertices[vertexIndex + 2] = src_vertices[vertexIndex + 2]; - dst_vertices[vertexIndex + 3] = src_vertices[vertexIndex + 3]; - - // Restore Vertex Colors - // Get a reference to the vertex colors we need to replace. - Color32[] dst_colors = m_TextMeshPro.textInfo.meshInfo[materialIndex].colors32; - - // Get a reference to the cached / original vertex colors. - Color32[] src_colors = m_cachedMeshInfoVertexData[materialIndex].colors32; - - // Copy the vertex colors from source to destination. - dst_colors[vertexIndex + 0] = src_colors[vertexIndex + 0]; - dst_colors[vertexIndex + 1] = src_colors[vertexIndex + 1]; - dst_colors[vertexIndex + 2] = src_colors[vertexIndex + 2]; - dst_colors[vertexIndex + 3] = src_colors[vertexIndex + 3]; - - // Restore UV0S - // UVS0 - Vector2[] src_uv0s = m_cachedMeshInfoVertexData[materialIndex].uvs0; - Vector2[] dst_uv0s = m_TextMeshPro.textInfo.meshInfo[materialIndex].uvs0; - dst_uv0s[vertexIndex + 0] = src_uv0s[vertexIndex + 0]; - dst_uv0s[vertexIndex + 1] = src_uv0s[vertexIndex + 1]; - dst_uv0s[vertexIndex + 2] = src_uv0s[vertexIndex + 2]; - dst_uv0s[vertexIndex + 3] = src_uv0s[vertexIndex + 3]; - - // UVS2 - Vector2[] src_uv2s = m_cachedMeshInfoVertexData[materialIndex].uvs2; - Vector2[] dst_uv2s = m_TextMeshPro.textInfo.meshInfo[materialIndex].uvs2; - dst_uv2s[vertexIndex + 0] = src_uv2s[vertexIndex + 0]; - dst_uv2s[vertexIndex + 1] = src_uv2s[vertexIndex + 1]; - dst_uv2s[vertexIndex + 2] = src_uv2s[vertexIndex + 2]; - dst_uv2s[vertexIndex + 3] = src_uv2s[vertexIndex + 3]; - - - // Restore last vertex attribute as we swapped it as well - int lastIndex = (src_vertices.Length / 4 - 1) * 4; - - // Vertices - dst_vertices[lastIndex + 0] = src_vertices[lastIndex + 0]; - dst_vertices[lastIndex + 1] = src_vertices[lastIndex + 1]; - dst_vertices[lastIndex + 2] = src_vertices[lastIndex + 2]; - dst_vertices[lastIndex + 3] = src_vertices[lastIndex + 3]; - - // Vertex Colors - src_colors = m_cachedMeshInfoVertexData[materialIndex].colors32; - dst_colors = m_TextMeshPro.textInfo.meshInfo[materialIndex].colors32; - dst_colors[lastIndex + 0] = src_colors[lastIndex + 0]; - dst_colors[lastIndex + 1] = src_colors[lastIndex + 1]; - dst_colors[lastIndex + 2] = src_colors[lastIndex + 2]; - dst_colors[lastIndex + 3] = src_colors[lastIndex + 3]; - - // UVS0 - src_uv0s = m_cachedMeshInfoVertexData[materialIndex].uvs0; - dst_uv0s = m_TextMeshPro.textInfo.meshInfo[materialIndex].uvs0; - dst_uv0s[lastIndex + 0] = src_uv0s[lastIndex + 0]; - dst_uv0s[lastIndex + 1] = src_uv0s[lastIndex + 1]; - dst_uv0s[lastIndex + 2] = src_uv0s[lastIndex + 2]; - dst_uv0s[lastIndex + 3] = src_uv0s[lastIndex + 3]; - - // UVS2 - src_uv2s = m_cachedMeshInfoVertexData[materialIndex].uvs2; - dst_uv2s = m_TextMeshPro.textInfo.meshInfo[materialIndex].uvs2; - dst_uv2s[lastIndex + 0] = src_uv2s[lastIndex + 0]; - dst_uv2s[lastIndex + 1] = src_uv2s[lastIndex + 1]; - dst_uv2s[lastIndex + 2] = src_uv2s[lastIndex + 2]; - dst_uv2s[lastIndex + 3] = src_uv2s[lastIndex + 3]; - - // Need to update the appropriate - m_TextMeshPro.UpdateVertexData(TMP_VertexDataUpdateFlags.All); - } - } -} diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextSelector_B.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextSelector_B.cs.meta deleted file mode 100644 index 0fc3741cde..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_TextSelector_B.cs.meta +++ /dev/null @@ -1,14 +0,0 @@ -fileFormatVersion: 2 -guid: a05dcd8be7ec4ccbb35c26219884aa37 -timeCreated: 1435531209 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: - - TextPopup_Prefab_01: {fileID: 22450954, guid: b06f0e6c1dfa4356ac918da1bb32c603, - type: 2} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_UiFrameRateCounter.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_UiFrameRateCounter.cs deleted file mode 100644 index 586e8be2a7..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_UiFrameRateCounter.cs +++ /dev/null @@ -1,125 +0,0 @@ -using UnityEngine; -using System.Collections; - - -namespace TMPro.Examples -{ - - public class TMP_UiFrameRateCounter : MonoBehaviour - { - public float UpdateInterval = 5.0f; - private float m_LastInterval = 0; - private int m_Frames = 0; - - public enum FpsCounterAnchorPositions { TopLeft, BottomLeft, TopRight, BottomRight }; - - public FpsCounterAnchorPositions AnchorPosition = FpsCounterAnchorPositions.TopRight; - - private string htmlColorTag; - private const string fpsLabel = "{0:2} <#8080ff>FPS \n<#FF8000>{1:2} <#8080ff>MS"; - - private TextMeshProUGUI m_TextMeshPro; - private RectTransform m_frameCounter_transform; - - private FpsCounterAnchorPositions last_AnchorPosition; - - void Awake() - { - if (!enabled) - return; - - Application.targetFrameRate = 1000; - - GameObject frameCounter = new GameObject("Frame Counter"); - m_frameCounter_transform = frameCounter.AddComponent(); - - m_frameCounter_transform.SetParent(this.transform, false); - - m_TextMeshPro = frameCounter.AddComponent(); - m_TextMeshPro.font = Resources.Load("Fonts & Materials/LiberationSans SDF"); - m_TextMeshPro.fontSharedMaterial = Resources.Load("Fonts & Materials/LiberationSans SDF - Overlay"); - - m_TextMeshPro.enableWordWrapping = false; - m_TextMeshPro.fontSize = 36; - - m_TextMeshPro.isOverlay = true; - - Set_FrameCounter_Position(AnchorPosition); - last_AnchorPosition = AnchorPosition; - } - - - void Start() - { - m_LastInterval = Time.realtimeSinceStartup; - m_Frames = 0; - } - - - void Update() - { - if (AnchorPosition != last_AnchorPosition) - Set_FrameCounter_Position(AnchorPosition); - - last_AnchorPosition = AnchorPosition; - - m_Frames += 1; - float timeNow = Time.realtimeSinceStartup; - - if (timeNow > m_LastInterval + UpdateInterval) - { - // display two fractional digits (f2 format) - float fps = m_Frames / (timeNow - m_LastInterval); - float ms = 1000.0f / Mathf.Max(fps, 0.00001f); - - if (fps < 30) - htmlColorTag = ""; - else if (fps < 10) - htmlColorTag = ""; - else - htmlColorTag = ""; - - m_TextMeshPro.SetText(htmlColorTag + fpsLabel, fps, ms); - - m_Frames = 0; - m_LastInterval = timeNow; - } - } - - - void Set_FrameCounter_Position(FpsCounterAnchorPositions anchor_position) - { - switch (anchor_position) - { - case FpsCounterAnchorPositions.TopLeft: - m_TextMeshPro.alignment = TextAlignmentOptions.TopLeft; - m_frameCounter_transform.pivot = new Vector2(0, 1); - m_frameCounter_transform.anchorMin = new Vector2(0.01f, 0.99f); - m_frameCounter_transform.anchorMax = new Vector2(0.01f, 0.99f); - m_frameCounter_transform.anchoredPosition = new Vector2(0, 1); - break; - case FpsCounterAnchorPositions.BottomLeft: - m_TextMeshPro.alignment = TextAlignmentOptions.BottomLeft; - m_frameCounter_transform.pivot = new Vector2(0, 0); - m_frameCounter_transform.anchorMin = new Vector2(0.01f, 0.01f); - m_frameCounter_transform.anchorMax = new Vector2(0.01f, 0.01f); - m_frameCounter_transform.anchoredPosition = new Vector2(0, 0); - break; - case FpsCounterAnchorPositions.TopRight: - m_TextMeshPro.alignment = TextAlignmentOptions.TopRight; - m_frameCounter_transform.pivot = new Vector2(1, 1); - m_frameCounter_transform.anchorMin = new Vector2(0.99f, 0.99f); - m_frameCounter_transform.anchorMax = new Vector2(0.99f, 0.99f); - m_frameCounter_transform.anchoredPosition = new Vector2(1, 1); - break; - case FpsCounterAnchorPositions.BottomRight: - m_TextMeshPro.alignment = TextAlignmentOptions.BottomRight; - m_frameCounter_transform.pivot = new Vector2(1, 0); - m_frameCounter_transform.anchorMin = new Vector2(0.99f, 0.01f); - m_frameCounter_transform.anchorMax = new Vector2(0.99f, 0.01f); - m_frameCounter_transform.anchoredPosition = new Vector2(1, 0); - break; - } - } - } -} \ No newline at end of file diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_UiFrameRateCounter.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_UiFrameRateCounter.cs.meta deleted file mode 100644 index baad0f6fa4..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMP_UiFrameRateCounter.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 24b0dc2d1d494adbbec1f4db26b4cf83 -timeCreated: 1448607572 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMPro_InstructionOverlay.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMPro_InstructionOverlay.cs deleted file mode 100644 index 2367dcfdcb..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMPro_InstructionOverlay.cs +++ /dev/null @@ -1,84 +0,0 @@ -using UnityEngine; -using System.Collections; - - -namespace TMPro.Examples -{ - - public class TMPro_InstructionOverlay : MonoBehaviour - { - - public enum FpsCounterAnchorPositions { TopLeft, BottomLeft, TopRight, BottomRight }; - - public FpsCounterAnchorPositions AnchorPosition = FpsCounterAnchorPositions.BottomLeft; - - private const string instructions = "Camera Control - <#ffff00>Shift + RMB\nZoom - <#ffff00>Mouse wheel."; - - private TextMeshPro m_TextMeshPro; - private TextContainer m_textContainer; - private Transform m_frameCounter_transform; - private Camera m_camera; - - //private FpsCounterAnchorPositions last_AnchorPosition; - - void Awake() - { - if (!enabled) - return; - - m_camera = Camera.main; - - GameObject frameCounter = new GameObject("Frame Counter"); - m_frameCounter_transform = frameCounter.transform; - m_frameCounter_transform.parent = m_camera.transform; - m_frameCounter_transform.localRotation = Quaternion.identity; - - - m_TextMeshPro = frameCounter.AddComponent(); - m_TextMeshPro.font = Resources.Load("Fonts & Materials/LiberationSans SDF"); - m_TextMeshPro.fontSharedMaterial = Resources.Load("Fonts & Materials/LiberationSans SDF - Overlay"); - - m_TextMeshPro.fontSize = 30; - - m_TextMeshPro.isOverlay = true; - m_textContainer = frameCounter.GetComponent(); - - Set_FrameCounter_Position(AnchorPosition); - //last_AnchorPosition = AnchorPosition; - - m_TextMeshPro.text = instructions; - - } - - - - - void Set_FrameCounter_Position(FpsCounterAnchorPositions anchor_position) - { - - switch (anchor_position) - { - case FpsCounterAnchorPositions.TopLeft: - //m_TextMeshPro.anchor = AnchorPositions.TopLeft; - m_textContainer.anchorPosition = TextContainerAnchors.TopLeft; - m_frameCounter_transform.position = m_camera.ViewportToWorldPoint(new Vector3(0, 1, 100.0f)); - break; - case FpsCounterAnchorPositions.BottomLeft: - //m_TextMeshPro.anchor = AnchorPositions.BottomLeft; - m_textContainer.anchorPosition = TextContainerAnchors.BottomLeft; - m_frameCounter_transform.position = m_camera.ViewportToWorldPoint(new Vector3(0, 0, 100.0f)); - break; - case FpsCounterAnchorPositions.TopRight: - //m_TextMeshPro.anchor = AnchorPositions.TopRight; - m_textContainer.anchorPosition = TextContainerAnchors.TopRight; - m_frameCounter_transform.position = m_camera.ViewportToWorldPoint(new Vector3(1, 1, 100.0f)); - break; - case FpsCounterAnchorPositions.BottomRight: - //m_TextMeshPro.anchor = AnchorPositions.BottomRight; - m_textContainer.anchorPosition = TextContainerAnchors.BottomRight; - m_frameCounter_transform.position = m_camera.ViewportToWorldPoint(new Vector3(1, 0, 100.0f)); - break; - } - } - } -} diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMPro_InstructionOverlay.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMPro_InstructionOverlay.cs.meta deleted file mode 100644 index d0e5e2c396..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TMPro_InstructionOverlay.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: c3c1afeda5e545e0b19add5373896d2e -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TeleType.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TeleType.cs deleted file mode 100644 index 0d94197b5d..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TeleType.cs +++ /dev/null @@ -1,83 +0,0 @@ -using UnityEngine; -using System.Collections; - - -namespace TMPro.Examples -{ - - public class TeleType : MonoBehaviour - { - - - //[Range(0, 100)] - //public int RevealSpeed = 50; - - private string label01 = "Example of using <#ffa000>Graphics Inline with Text in TextMesh<#40a0ff>Pro and Unity"; - private string label02 = "Example of using <#ffa000>Graphics Inline with Text in TextMesh<#40a0ff>Pro and Unity"; - - - private TMP_Text m_textMeshPro; - - - void Awake() - { - // Get Reference to TextMeshPro Component - m_textMeshPro = GetComponent(); - m_textMeshPro.text = label01; - m_textMeshPro.enableWordWrapping = true; - m_textMeshPro.alignment = TextAlignmentOptions.Top; - - - - //if (GetComponentInParent(typeof(Canvas)) as Canvas == null) - //{ - // GameObject canvas = new GameObject("Canvas", typeof(Canvas)); - // gameObject.transform.SetParent(canvas.transform); - // canvas.GetComponent().renderMode = RenderMode.ScreenSpaceOverlay; - - // // Set RectTransform Size - // gameObject.GetComponent().sizeDelta = new Vector2(500, 300); - // m_textMeshPro.fontSize = 48; - //} - - - } - - - IEnumerator Start() - { - - // Force and update of the mesh to get valid information. - m_textMeshPro.ForceMeshUpdate(); - - - int totalVisibleCharacters = m_textMeshPro.textInfo.characterCount; // Get # of Visible Character in text object - int counter = 0; - int visibleCount = 0; - - while (true) - { - visibleCount = counter % (totalVisibleCharacters + 1); - - m_textMeshPro.maxVisibleCharacters = visibleCount; // How many characters should TextMeshPro display? - - // Once the last character has been revealed, wait 1.0 second and start over. - if (visibleCount >= totalVisibleCharacters) - { - yield return new WaitForSeconds(1.0f); - m_textMeshPro.text = label02; - yield return new WaitForSeconds(1.0f); - m_textMeshPro.text = label01; - yield return new WaitForSeconds(1.0f); - } - - counter += 1; - - yield return new WaitForSeconds(0.05f); - } - - //Debug.Log("Done revealing the text."); - } - - } -} \ No newline at end of file diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TeleType.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TeleType.cs.meta deleted file mode 100644 index 562609bc80..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TeleType.cs.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: e32c266ee6204b21a427753cb0694c81 -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TextConsoleSimulator.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TextConsoleSimulator.cs deleted file mode 100644 index 883990e9a6..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TextConsoleSimulator.cs +++ /dev/null @@ -1,121 +0,0 @@ -using UnityEngine; -using System.Collections; - - -namespace TMPro.Examples -{ - public class TextConsoleSimulator : MonoBehaviour - { - private TMP_Text m_TextComponent; - private bool hasTextChanged; - - void Awake() - { - m_TextComponent = gameObject.GetComponent(); - } - - - void Start() - { - StartCoroutine(RevealCharacters(m_TextComponent)); - //StartCoroutine(RevealWords(m_TextComponent)); - } - - - void OnEnable() - { - // Subscribe to event fired when text object has been regenerated. - TMPro_EventManager.TEXT_CHANGED_EVENT.Add(ON_TEXT_CHANGED); - } - - void OnDisable() - { - TMPro_EventManager.TEXT_CHANGED_EVENT.Remove(ON_TEXT_CHANGED); - } - - - // Event received when the text object has changed. - void ON_TEXT_CHANGED(Object obj) - { - hasTextChanged = true; - } - - - /// - /// Method revealing the text one character at a time. - /// - /// - IEnumerator RevealCharacters(TMP_Text textComponent) - { - textComponent.ForceMeshUpdate(); - - TMP_TextInfo textInfo = textComponent.textInfo; - - int totalVisibleCharacters = textInfo.characterCount; // Get # of Visible Character in text object - int visibleCount = 0; - - while (true) - { - if (hasTextChanged) - { - totalVisibleCharacters = textInfo.characterCount; // Update visible character count. - hasTextChanged = false; - } - - if (visibleCount > totalVisibleCharacters) - { - yield return new WaitForSeconds(1.0f); - visibleCount = 0; - } - - textComponent.maxVisibleCharacters = visibleCount; // How many characters should TextMeshPro display? - - visibleCount += 1; - - yield return null; - } - } - - - /// - /// Method revealing the text one word at a time. - /// - /// - IEnumerator RevealWords(TMP_Text textComponent) - { - textComponent.ForceMeshUpdate(); - - int totalWordCount = textComponent.textInfo.wordCount; - int totalVisibleCharacters = textComponent.textInfo.characterCount; // Get # of Visible Character in text object - int counter = 0; - int currentWord = 0; - int visibleCount = 0; - - while (true) - { - currentWord = counter % (totalWordCount + 1); - - // Get last character index for the current word. - if (currentWord == 0) // Display no words. - visibleCount = 0; - else if (currentWord < totalWordCount) // Display all other words with the exception of the last one. - visibleCount = textComponent.textInfo.wordInfo[currentWord - 1].lastCharacterIndex + 1; - else if (currentWord == totalWordCount) // Display last word and all remaining characters. - visibleCount = totalVisibleCharacters; - - textComponent.maxVisibleCharacters = visibleCount; // How many characters should TextMeshPro display? - - // Once the last character has been revealed, wait 1.0 second and start over. - if (visibleCount >= totalVisibleCharacters) - { - yield return new WaitForSeconds(1.0f); - } - - counter += 1; - - yield return new WaitForSeconds(0.1f); - } - } - - } -} \ No newline at end of file diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TextConsoleSimulator.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TextConsoleSimulator.cs.meta deleted file mode 100644 index 3d83e76bf2..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TextConsoleSimulator.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 43bcd35a1c0c40ccb6d472893fe2093f -timeCreated: 1435298333 -licenseType: Store -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TextMeshProFloatingText.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TextMeshProFloatingText.cs deleted file mode 100644 index f961113e87..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TextMeshProFloatingText.cs +++ /dev/null @@ -1,223 +0,0 @@ -using UnityEngine; -using System.Collections; - - -namespace TMPro.Examples -{ - - public class TextMeshProFloatingText : MonoBehaviour - { - public Font TheFont; - - private GameObject m_floatingText; - private TextMeshPro m_textMeshPro; - private TextMesh m_textMesh; - - private Transform m_transform; - private Transform m_floatingText_Transform; - private Transform m_cameraTransform; - - Vector3 lastPOS = Vector3.zero; - Quaternion lastRotation = Quaternion.identity; - - public int SpawnType; - public bool IsTextObjectScaleStatic; - - //private int m_frame = 0; - - static WaitForEndOfFrame k_WaitForEndOfFrame = new WaitForEndOfFrame(); - static WaitForSeconds[] k_WaitForSecondsRandom = new WaitForSeconds[] - { - new WaitForSeconds(0.05f), new WaitForSeconds(0.1f), new WaitForSeconds(0.15f), new WaitForSeconds(0.2f), new WaitForSeconds(0.25f), - new WaitForSeconds(0.3f), new WaitForSeconds(0.35f), new WaitForSeconds(0.4f), new WaitForSeconds(0.45f), new WaitForSeconds(0.5f), - new WaitForSeconds(0.55f), new WaitForSeconds(0.6f), new WaitForSeconds(0.65f), new WaitForSeconds(0.7f), new WaitForSeconds(0.75f), - new WaitForSeconds(0.8f), new WaitForSeconds(0.85f), new WaitForSeconds(0.9f), new WaitForSeconds(0.95f), new WaitForSeconds(1.0f), - }; - - void Awake() - { - m_transform = transform; - m_floatingText = new GameObject(this.name + " floating text"); - - // Reference to Transform is lost when TMP component is added since it replaces it by a RectTransform. - //m_floatingText_Transform = m_floatingText.transform; - //m_floatingText_Transform.position = m_transform.position + new Vector3(0, 15f, 0); - - m_cameraTransform = Camera.main.transform; - } - - void Start() - { - if (SpawnType == 0) - { - // TextMesh Pro Implementation - m_textMeshPro = m_floatingText.AddComponent(); - m_textMeshPro.rectTransform.sizeDelta = new Vector2(3, 3); - - m_floatingText_Transform = m_floatingText.transform; - m_floatingText_Transform.position = m_transform.position + new Vector3(0, 15f, 0); - - //m_textMeshPro.fontAsset = Resources.Load("Fonts & Materials/JOKERMAN SDF", typeof(TextMeshProFont)) as TextMeshProFont; // User should only provide a string to the resource. - //m_textMeshPro.fontSharedMaterial = Resources.Load("Fonts & Materials/LiberationSans SDF", typeof(Material)) as Material; - - m_textMeshPro.alignment = TextAlignmentOptions.Center; - m_textMeshPro.color = new Color32((byte)Random.Range(0, 255), (byte)Random.Range(0, 255), (byte)Random.Range(0, 255), 255); - m_textMeshPro.fontSize = 24; - //m_textMeshPro.enableExtraPadding = true; - //m_textMeshPro.enableShadows = false; - m_textMeshPro.enableKerning = false; - m_textMeshPro.text = string.Empty; - m_textMeshPro.isTextObjectScaleStatic = IsTextObjectScaleStatic; - - StartCoroutine(DisplayTextMeshProFloatingText()); - } - else if (SpawnType == 1) - { - //Debug.Log("Spawning TextMesh Objects."); - - m_floatingText_Transform = m_floatingText.transform; - m_floatingText_Transform.position = m_transform.position + new Vector3(0, 15f, 0); - - m_textMesh = m_floatingText.AddComponent(); - m_textMesh.font = Resources.Load("Fonts/ARIAL"); - m_textMesh.GetComponent().sharedMaterial = m_textMesh.font.material; - m_textMesh.color = new Color32((byte)Random.Range(0, 255), (byte)Random.Range(0, 255), (byte)Random.Range(0, 255), 255); - m_textMesh.anchor = TextAnchor.LowerCenter; - m_textMesh.fontSize = 24; - - StartCoroutine(DisplayTextMeshFloatingText()); - } - else if (SpawnType == 2) - { - - } - - } - - - //void Update() - //{ - // if (SpawnType == 0) - // { - // m_textMeshPro.SetText("{0}", m_frame); - // } - // else - // { - // m_textMesh.text = m_frame.ToString(); - // } - // m_frame = (m_frame + 1) % 1000; - - //} - - - public IEnumerator DisplayTextMeshProFloatingText() - { - float CountDuration = 2.0f; // How long is the countdown alive. - float starting_Count = Random.Range(5f, 20f); // At what number is the counter starting at. - float current_Count = starting_Count; - - Vector3 start_pos = m_floatingText_Transform.position; - Color32 start_color = m_textMeshPro.color; - float alpha = 255; - int int_counter = 0; - - - float fadeDuration = 3 / starting_Count * CountDuration; - - while (current_Count > 0) - { - current_Count -= (Time.deltaTime / CountDuration) * starting_Count; - - if (current_Count <= 3) - { - //Debug.Log("Fading Counter ... " + current_Count.ToString("f2")); - alpha = Mathf.Clamp(alpha - (Time.deltaTime / fadeDuration) * 255, 0, 255); - } - - int_counter = (int)current_Count; - m_textMeshPro.text = int_counter.ToString(); - //m_textMeshPro.SetText("{0}", (int)current_Count); - - m_textMeshPro.color = new Color32(start_color.r, start_color.g, start_color.b, (byte)alpha); - - // Move the floating text upward each update - m_floatingText_Transform.position += new Vector3(0, starting_Count * Time.deltaTime, 0); - - // Align floating text perpendicular to Camera. - if (!lastPOS.Compare(m_cameraTransform.position, 1000) || !lastRotation.Compare(m_cameraTransform.rotation, 1000)) - { - lastPOS = m_cameraTransform.position; - lastRotation = m_cameraTransform.rotation; - m_floatingText_Transform.rotation = lastRotation; - Vector3 dir = m_transform.position - lastPOS; - m_transform.forward = new Vector3(dir.x, 0, dir.z); - } - - yield return k_WaitForEndOfFrame; - } - - //Debug.Log("Done Counting down."); - - yield return k_WaitForSecondsRandom[Random.Range(0, 19)]; - - m_floatingText_Transform.position = start_pos; - - StartCoroutine(DisplayTextMeshProFloatingText()); - } - - - public IEnumerator DisplayTextMeshFloatingText() - { - float CountDuration = 2.0f; // How long is the countdown alive. - float starting_Count = Random.Range(5f, 20f); // At what number is the counter starting at. - float current_Count = starting_Count; - - Vector3 start_pos = m_floatingText_Transform.position; - Color32 start_color = m_textMesh.color; - float alpha = 255; - int int_counter = 0; - - float fadeDuration = 3 / starting_Count * CountDuration; - - while (current_Count > 0) - { - current_Count -= (Time.deltaTime / CountDuration) * starting_Count; - - if (current_Count <= 3) - { - //Debug.Log("Fading Counter ... " + current_Count.ToString("f2")); - alpha = Mathf.Clamp(alpha - (Time.deltaTime / fadeDuration) * 255, 0, 255); - } - - int_counter = (int)current_Count; - m_textMesh.text = int_counter.ToString(); - //Debug.Log("Current Count:" + current_Count.ToString("f2")); - - m_textMesh.color = new Color32(start_color.r, start_color.g, start_color.b, (byte)alpha); - - // Move the floating text upward each update - m_floatingText_Transform.position += new Vector3(0, starting_Count * Time.deltaTime, 0); - - // Align floating text perpendicular to Camera. - if (!lastPOS.Compare(m_cameraTransform.position, 1000) || !lastRotation.Compare(m_cameraTransform.rotation, 1000)) - { - lastPOS = m_cameraTransform.position; - lastRotation = m_cameraTransform.rotation; - m_floatingText_Transform.rotation = lastRotation; - Vector3 dir = m_transform.position - lastPOS; - m_transform.forward = new Vector3(dir.x, 0, dir.z); - } - - yield return k_WaitForEndOfFrame; - } - - //Debug.Log("Done Counting down."); - - yield return k_WaitForSecondsRandom[Random.Range(0, 20)]; - - m_floatingText_Transform.position = start_pos; - - StartCoroutine(DisplayTextMeshFloatingText()); - } - } -} diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TextMeshProFloatingText.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TextMeshProFloatingText.cs.meta deleted file mode 100644 index da60e2f70f..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TextMeshProFloatingText.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a4d4c76e63944cba8c7d00f56334b98c -MonoImporter: - serializedVersion: 2 - defaultReferences: - - TheFont: {instanceID: 0} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TextMeshSpawner.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TextMeshSpawner.cs deleted file mode 100644 index 0aa450d60c..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TextMeshSpawner.cs +++ /dev/null @@ -1,79 +0,0 @@ -using UnityEngine; -using System.Collections; - - -namespace TMPro.Examples -{ - - public class TextMeshSpawner : MonoBehaviour - { - - public int SpawnType = 0; - public int NumberOfNPC = 12; - - public Font TheFont; - - private TextMeshProFloatingText floatingText_Script; - - void Awake() - { - - } - - void Start() - { - - for (int i = 0; i < NumberOfNPC; i++) - { - if (SpawnType == 0) - { - // TextMesh Pro Implementation - //go.transform.localScale = new Vector3(2, 2, 2); - GameObject go = new GameObject(); //"NPC " + i); - go.transform.position = new Vector3(Random.Range(-95f, 95f), 0.5f, Random.Range(-95f, 95f)); - - //go.transform.position = new Vector3(0, 1.01f, 0); - //go.renderer.castShadows = false; - //go.renderer.receiveShadows = false; - //go.transform.rotation = Quaternion.Euler(0, Random.Range(0, 360), 0); - - TextMeshPro textMeshPro = go.AddComponent(); - //textMeshPro.FontAsset = Resources.Load("Fonts & Materials/LiberationSans SDF", typeof(TextMeshProFont)) as TextMeshProFont; - //textMeshPro.anchor = AnchorPositions.Bottom; - textMeshPro.fontSize = 96; - - textMeshPro.text = "!"; - textMeshPro.color = new Color32(255, 255, 0, 255); - //textMeshPro.Text = "!"; - - - // Spawn Floating Text - floatingText_Script = go.AddComponent(); - floatingText_Script.SpawnType = 0; - } - else - { - // TextMesh Implementation - GameObject go = new GameObject(); //"NPC " + i); - go.transform.position = new Vector3(Random.Range(-95f, 95f), 0.5f, Random.Range(-95f, 95f)); - - //go.transform.position = new Vector3(0, 1.01f, 0); - - TextMesh textMesh = go.AddComponent(); - textMesh.GetComponent().sharedMaterial = TheFont.material; - textMesh.font = TheFont; - textMesh.anchor = TextAnchor.LowerCenter; - textMesh.fontSize = 96; - - textMesh.color = new Color32(255, 255, 0, 255); - textMesh.text = "!"; - - // Spawn Floating Text - floatingText_Script = go.AddComponent(); - floatingText_Script.SpawnType = 1; - } - } - } - - } -} diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TextMeshSpawner.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TextMeshSpawner.cs.meta deleted file mode 100644 index dd5a8cbc79..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/TextMeshSpawner.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 76c11bbcfddf44e0ba17d6c2751c8d84 -MonoImporter: - serializedVersion: 2 - defaultReferences: - - TheFont: {instanceID: 0} - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexColorCycler.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexColorCycler.cs deleted file mode 100644 index ac66647905..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexColorCycler.cs +++ /dev/null @@ -1,84 +0,0 @@ -using UnityEngine; -using System.Collections; - - -namespace TMPro.Examples -{ - - public class VertexColorCycler : MonoBehaviour - { - - private TMP_Text m_TextComponent; - - void Awake() - { - m_TextComponent = GetComponent(); - } - - - void Start() - { - StartCoroutine(AnimateVertexColors()); - } - - - /// - /// Method to animate vertex colors of a TMP Text object. - /// - /// - IEnumerator AnimateVertexColors() - { - // Force the text object to update right away so we can have geometry to modify right from the start. - m_TextComponent.ForceMeshUpdate(); - - TMP_TextInfo textInfo = m_TextComponent.textInfo; - int currentCharacter = 0; - - Color32[] newVertexColors; - Color32 c0 = m_TextComponent.color; - - while (true) - { - int characterCount = textInfo.characterCount; - - // If No Characters then just yield and wait for some text to be added - if (characterCount == 0) - { - yield return new WaitForSeconds(0.25f); - continue; - } - - // Get the index of the material used by the current character. - int materialIndex = textInfo.characterInfo[currentCharacter].materialReferenceIndex; - - // Get the vertex colors of the mesh used by this text element (character or sprite). - newVertexColors = textInfo.meshInfo[materialIndex].colors32; - - // Get the index of the first vertex used by this text element. - int vertexIndex = textInfo.characterInfo[currentCharacter].vertexIndex; - - // Only change the vertex color if the text element is visible. - if (textInfo.characterInfo[currentCharacter].isVisible) - { - c0 = new Color32((byte)Random.Range(0, 255), (byte)Random.Range(0, 255), (byte)Random.Range(0, 255), 255); - - newVertexColors[vertexIndex + 0] = c0; - newVertexColors[vertexIndex + 1] = c0; - newVertexColors[vertexIndex + 2] = c0; - newVertexColors[vertexIndex + 3] = c0; - - // New function which pushes (all) updated vertex data to the appropriate meshes when using either the Mesh Renderer or CanvasRenderer. - m_TextComponent.UpdateVertexData(TMP_VertexDataUpdateFlags.Colors32); - - // This last process could be done to only update the vertex data that has changed as opposed to all of the vertex data but it would require extra steps and knowing what type of renderer is used. - // These extra steps would be a performance optimization but it is unlikely that such optimization will be necessary. - } - - currentCharacter = (currentCharacter + 1) % characterCount; - - yield return new WaitForSeconds(0.05f); - } - } - - } -} diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexColorCycler.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexColorCycler.cs.meta deleted file mode 100644 index 7ba50b8ec5..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexColorCycler.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 91b8ba3d52e041fab2d0e0f169855539 -timeCreated: 1457047157 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexJitter.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexJitter.cs deleted file mode 100644 index 7ed8230cbb..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexJitter.cs +++ /dev/null @@ -1,175 +0,0 @@ -using UnityEngine; -using System.Collections; - - -namespace TMPro.Examples -{ - - public class VertexJitter : MonoBehaviour - { - - public float AngleMultiplier = 1.0f; - public float SpeedMultiplier = 1.0f; - public float CurveScale = 1.0f; - - private TMP_Text m_TextComponent; - private bool hasTextChanged; - - /// - /// Structure to hold pre-computed animation data. - /// - private struct VertexAnim - { - public float angleRange; - public float angle; - public float speed; - } - - void Awake() - { - m_TextComponent = GetComponent(); - } - - void OnEnable() - { - // Subscribe to event fired when text object has been regenerated. - TMPro_EventManager.TEXT_CHANGED_EVENT.Add(ON_TEXT_CHANGED); - } - - void OnDisable() - { - TMPro_EventManager.TEXT_CHANGED_EVENT.Remove(ON_TEXT_CHANGED); - } - - - void Start() - { - StartCoroutine(AnimateVertexColors()); - } - - - void ON_TEXT_CHANGED(Object obj) - { - if (obj == m_TextComponent) - hasTextChanged = true; - } - - /// - /// Method to animate vertex colors of a TMP Text object. - /// - /// - IEnumerator AnimateVertexColors() - { - - // We force an update of the text object since it would only be updated at the end of the frame. Ie. before this code is executed on the first frame. - // Alternatively, we could yield and wait until the end of the frame when the text object will be generated. - m_TextComponent.ForceMeshUpdate(); - - TMP_TextInfo textInfo = m_TextComponent.textInfo; - - Matrix4x4 matrix; - - int loopCount = 0; - hasTextChanged = true; - - // Create an Array which contains pre-computed Angle Ranges and Speeds for a bunch of characters. - VertexAnim[] vertexAnim = new VertexAnim[1024]; - for (int i = 0; i < 1024; i++) - { - vertexAnim[i].angleRange = Random.Range(10f, 25f); - vertexAnim[i].speed = Random.Range(1f, 3f); - } - - // Cache the vertex data of the text object as the Jitter FX is applied to the original position of the characters. - TMP_MeshInfo[] cachedMeshInfo = textInfo.CopyMeshInfoVertexData(); - - while (true) - { - // Get new copy of vertex data if the text has changed. - if (hasTextChanged) - { - // Update the copy of the vertex data for the text object. - cachedMeshInfo = textInfo.CopyMeshInfoVertexData(); - - hasTextChanged = false; - } - - int characterCount = textInfo.characterCount; - - // If No Characters then just yield and wait for some text to be added - if (characterCount == 0) - { - yield return new WaitForSeconds(0.25f); - continue; - } - - - for (int i = 0; i < characterCount; i++) - { - TMP_CharacterInfo charInfo = textInfo.characterInfo[i]; - - // Skip characters that are not visible and thus have no geometry to manipulate. - if (!charInfo.isVisible) - continue; - - // Retrieve the pre-computed animation data for the given character. - VertexAnim vertAnim = vertexAnim[i]; - - // Get the index of the material used by the current character. - int materialIndex = textInfo.characterInfo[i].materialReferenceIndex; - - // Get the index of the first vertex used by this text element. - int vertexIndex = textInfo.characterInfo[i].vertexIndex; - - // Get the cached vertices of the mesh used by this text element (character or sprite). - Vector3[] sourceVertices = cachedMeshInfo[materialIndex].vertices; - - // Determine the center point of each character at the baseline. - //Vector2 charMidBasline = new Vector2((sourceVertices[vertexIndex + 0].x + sourceVertices[vertexIndex + 2].x) / 2, charInfo.baseLine); - // Determine the center point of each character. - Vector2 charMidBasline = (sourceVertices[vertexIndex + 0] + sourceVertices[vertexIndex + 2]) / 2; - - // Need to translate all 4 vertices of each quad to aligned with middle of character / baseline. - // This is needed so the matrix TRS is applied at the origin for each character. - Vector3 offset = charMidBasline; - - Vector3[] destinationVertices = textInfo.meshInfo[materialIndex].vertices; - - destinationVertices[vertexIndex + 0] = sourceVertices[vertexIndex + 0] - offset; - destinationVertices[vertexIndex + 1] = sourceVertices[vertexIndex + 1] - offset; - destinationVertices[vertexIndex + 2] = sourceVertices[vertexIndex + 2] - offset; - destinationVertices[vertexIndex + 3] = sourceVertices[vertexIndex + 3] - offset; - - vertAnim.angle = Mathf.SmoothStep(-vertAnim.angleRange, vertAnim.angleRange, Mathf.PingPong(loopCount / 25f * vertAnim.speed, 1f)); - Vector3 jitterOffset = new Vector3(Random.Range(-.25f, .25f), Random.Range(-.25f, .25f), 0); - - matrix = Matrix4x4.TRS(jitterOffset * CurveScale, Quaternion.Euler(0, 0, Random.Range(-5f, 5f) * AngleMultiplier), Vector3.one); - - destinationVertices[vertexIndex + 0] = matrix.MultiplyPoint3x4(destinationVertices[vertexIndex + 0]); - destinationVertices[vertexIndex + 1] = matrix.MultiplyPoint3x4(destinationVertices[vertexIndex + 1]); - destinationVertices[vertexIndex + 2] = matrix.MultiplyPoint3x4(destinationVertices[vertexIndex + 2]); - destinationVertices[vertexIndex + 3] = matrix.MultiplyPoint3x4(destinationVertices[vertexIndex + 3]); - - destinationVertices[vertexIndex + 0] += offset; - destinationVertices[vertexIndex + 1] += offset; - destinationVertices[vertexIndex + 2] += offset; - destinationVertices[vertexIndex + 3] += offset; - - vertexAnim[i] = vertAnim; - } - - // Push changes into meshes - for (int i = 0; i < textInfo.meshInfo.Length; i++) - { - textInfo.meshInfo[i].mesh.vertices = textInfo.meshInfo[i].vertices; - m_TextComponent.UpdateGeometry(textInfo.meshInfo[i].mesh, i); - } - - loopCount += 1; - - yield return new WaitForSeconds(0.1f); - } - } - - } -} \ No newline at end of file diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexJitter.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexJitter.cs.meta deleted file mode 100644 index 2ba768cde9..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexJitter.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 2ed57967c52645d390a89dcf8f61ba73 -timeCreated: 1461286718 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexShakeA.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexShakeA.cs deleted file mode 100644 index a4022a5843..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexShakeA.cs +++ /dev/null @@ -1,161 +0,0 @@ -using UnityEngine; -using System.Collections; - - -namespace TMPro.Examples -{ - - public class VertexShakeA : MonoBehaviour - { - - public float AngleMultiplier = 1.0f; - public float SpeedMultiplier = 1.0f; - public float ScaleMultiplier = 1.0f; - public float RotationMultiplier = 1.0f; - - private TMP_Text m_TextComponent; - private bool hasTextChanged; - - - void Awake() - { - m_TextComponent = GetComponent(); - } - - void OnEnable() - { - // Subscribe to event fired when text object has been regenerated. - TMPro_EventManager.TEXT_CHANGED_EVENT.Add(ON_TEXT_CHANGED); - } - - void OnDisable() - { - TMPro_EventManager.TEXT_CHANGED_EVENT.Remove(ON_TEXT_CHANGED); - } - - - void Start() - { - StartCoroutine(AnimateVertexColors()); - } - - - void ON_TEXT_CHANGED(Object obj) - { - if (obj = m_TextComponent) - hasTextChanged = true; - } - - /// - /// Method to animate vertex colors of a TMP Text object. - /// - /// - IEnumerator AnimateVertexColors() - { - - // We force an update of the text object since it would only be updated at the end of the frame. Ie. before this code is executed on the first frame. - // Alternatively, we could yield and wait until the end of the frame when the text object will be generated. - m_TextComponent.ForceMeshUpdate(); - - TMP_TextInfo textInfo = m_TextComponent.textInfo; - - Matrix4x4 matrix; - Vector3[][] copyOfVertices = new Vector3[0][]; - - hasTextChanged = true; - - while (true) - { - // Allocate new vertices - if (hasTextChanged) - { - if (copyOfVertices.Length < textInfo.meshInfo.Length) - copyOfVertices = new Vector3[textInfo.meshInfo.Length][]; - - for (int i = 0; i < textInfo.meshInfo.Length; i++) - { - int length = textInfo.meshInfo[i].vertices.Length; - copyOfVertices[i] = new Vector3[length]; - } - - hasTextChanged = false; - } - - int characterCount = textInfo.characterCount; - - // If No Characters then just yield and wait for some text to be added - if (characterCount == 0) - { - yield return new WaitForSeconds(0.25f); - continue; - } - - int lineCount = textInfo.lineCount; - - // Iterate through each line of the text. - for (int i = 0; i < lineCount; i++) - { - - int first = textInfo.lineInfo[i].firstCharacterIndex; - int last = textInfo.lineInfo[i].lastCharacterIndex; - - // Determine the center of each line - Vector3 centerOfLine = (textInfo.characterInfo[first].bottomLeft + textInfo.characterInfo[last].topRight) / 2; - Quaternion rotation = Quaternion.Euler(0, 0, Random.Range(-0.25f, 0.25f) * RotationMultiplier); - - // Iterate through each character of the line. - for (int j = first; j <= last; j++) - { - // Skip characters that are not visible and thus have no geometry to manipulate. - if (!textInfo.characterInfo[j].isVisible) - continue; - - // Get the index of the material used by the current character. - int materialIndex = textInfo.characterInfo[j].materialReferenceIndex; - - // Get the index of the first vertex used by this text element. - int vertexIndex = textInfo.characterInfo[j].vertexIndex; - - // Get the vertices of the mesh used by this text element (character or sprite). - Vector3[] sourceVertices = textInfo.meshInfo[materialIndex].vertices; - - // Need to translate all 4 vertices of each quad to aligned with center of character. - // This is needed so the matrix TRS is applied at the origin for each character. - copyOfVertices[materialIndex][vertexIndex + 0] = sourceVertices[vertexIndex + 0] - centerOfLine; - copyOfVertices[materialIndex][vertexIndex + 1] = sourceVertices[vertexIndex + 1] - centerOfLine; - copyOfVertices[materialIndex][vertexIndex + 2] = sourceVertices[vertexIndex + 2] - centerOfLine; - copyOfVertices[materialIndex][vertexIndex + 3] = sourceVertices[vertexIndex + 3] - centerOfLine; - - // Determine the random scale change for each character. - float randomScale = Random.Range(0.995f - 0.001f * ScaleMultiplier, 1.005f + 0.001f * ScaleMultiplier); - - // Setup the matrix rotation. - matrix = Matrix4x4.TRS(Vector3.one, rotation, Vector3.one * randomScale); - - // Apply the matrix TRS to the individual characters relative to the center of the current line. - copyOfVertices[materialIndex][vertexIndex + 0] = matrix.MultiplyPoint3x4(copyOfVertices[materialIndex][vertexIndex + 0]); - copyOfVertices[materialIndex][vertexIndex + 1] = matrix.MultiplyPoint3x4(copyOfVertices[materialIndex][vertexIndex + 1]); - copyOfVertices[materialIndex][vertexIndex + 2] = matrix.MultiplyPoint3x4(copyOfVertices[materialIndex][vertexIndex + 2]); - copyOfVertices[materialIndex][vertexIndex + 3] = matrix.MultiplyPoint3x4(copyOfVertices[materialIndex][vertexIndex + 3]); - - // Revert the translation change. - copyOfVertices[materialIndex][vertexIndex + 0] += centerOfLine; - copyOfVertices[materialIndex][vertexIndex + 1] += centerOfLine; - copyOfVertices[materialIndex][vertexIndex + 2] += centerOfLine; - copyOfVertices[materialIndex][vertexIndex + 3] += centerOfLine; - } - } - - // Push changes into meshes - for (int i = 0; i < textInfo.meshInfo.Length; i++) - { - textInfo.meshInfo[i].mesh.vertices = copyOfVertices[i]; - m_TextComponent.UpdateGeometry(textInfo.meshInfo[i].mesh, i); - } - - yield return new WaitForSeconds(0.1f); - } - } - - } -} \ No newline at end of file diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexShakeA.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexShakeA.cs.meta deleted file mode 100644 index 25aceb5363..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexShakeA.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: f7cfa58e417a46ea8889989684c2522e -timeCreated: 1462089320 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexShakeB.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexShakeB.cs deleted file mode 100644 index fd3b1c4ac6..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexShakeB.cs +++ /dev/null @@ -1,185 +0,0 @@ -using UnityEngine; -using System.Collections; - - -namespace TMPro.Examples -{ - - public class VertexShakeB : MonoBehaviour - { - - public float AngleMultiplier = 1.0f; - public float SpeedMultiplier = 1.0f; - public float CurveScale = 1.0f; - - private TMP_Text m_TextComponent; - private bool hasTextChanged; - - - void Awake() - { - m_TextComponent = GetComponent(); - } - - void OnEnable() - { - // Subscribe to event fired when text object has been regenerated. - TMPro_EventManager.TEXT_CHANGED_EVENT.Add(ON_TEXT_CHANGED); - } - - void OnDisable() - { - TMPro_EventManager.TEXT_CHANGED_EVENT.Remove(ON_TEXT_CHANGED); - } - - - void Start() - { - StartCoroutine(AnimateVertexColors()); - } - - - void ON_TEXT_CHANGED(Object obj) - { - if (obj = m_TextComponent) - hasTextChanged = true; - } - - /// - /// Method to animate vertex colors of a TMP Text object. - /// - /// - IEnumerator AnimateVertexColors() - { - - // We force an update of the text object since it would only be updated at the end of the frame. Ie. before this code is executed on the first frame. - // Alternatively, we could yield and wait until the end of the frame when the text object will be generated. - m_TextComponent.ForceMeshUpdate(); - - TMP_TextInfo textInfo = m_TextComponent.textInfo; - - Matrix4x4 matrix; - Vector3[][] copyOfVertices = new Vector3[0][]; - - hasTextChanged = true; - - while (true) - { - // Allocate new vertices - if (hasTextChanged) - { - if (copyOfVertices.Length < textInfo.meshInfo.Length) - copyOfVertices = new Vector3[textInfo.meshInfo.Length][]; - - for (int i = 0; i < textInfo.meshInfo.Length; i++) - { - int length = textInfo.meshInfo[i].vertices.Length; - copyOfVertices[i] = new Vector3[length]; - } - - hasTextChanged = false; - } - - int characterCount = textInfo.characterCount; - - // If No Characters then just yield and wait for some text to be added - if (characterCount == 0) - { - yield return new WaitForSeconds(0.25f); - continue; - } - - int lineCount = textInfo.lineCount; - - // Iterate through each line of the text. - for (int i = 0; i < lineCount; i++) - { - - int first = textInfo.lineInfo[i].firstCharacterIndex; - int last = textInfo.lineInfo[i].lastCharacterIndex; - - // Determine the center of each line - Vector3 centerOfLine = (textInfo.characterInfo[first].bottomLeft + textInfo.characterInfo[last].topRight) / 2; - Quaternion rotation = Quaternion.Euler(0, 0, Random.Range(-0.25f, 0.25f)); - - // Iterate through each character of the line. - for (int j = first; j <= last; j++) - { - // Skip characters that are not visible and thus have no geometry to manipulate. - if (!textInfo.characterInfo[j].isVisible) - continue; - - // Get the index of the material used by the current character. - int materialIndex = textInfo.characterInfo[j].materialReferenceIndex; - - // Get the index of the first vertex used by this text element. - int vertexIndex = textInfo.characterInfo[j].vertexIndex; - - // Get the vertices of the mesh used by this text element (character or sprite). - Vector3[] sourceVertices = textInfo.meshInfo[materialIndex].vertices; - - // Determine the center point of each character at the baseline. - Vector3 charCenter = (sourceVertices[vertexIndex + 0] + sourceVertices[vertexIndex + 2]) / 2; - - // Need to translate all 4 vertices of each quad to aligned with center of character. - // This is needed so the matrix TRS is applied at the origin for each character. - copyOfVertices[materialIndex][vertexIndex + 0] = sourceVertices[vertexIndex + 0] - charCenter; - copyOfVertices[materialIndex][vertexIndex + 1] = sourceVertices[vertexIndex + 1] - charCenter; - copyOfVertices[materialIndex][vertexIndex + 2] = sourceVertices[vertexIndex + 2] - charCenter; - copyOfVertices[materialIndex][vertexIndex + 3] = sourceVertices[vertexIndex + 3] - charCenter; - - // Determine the random scale change for each character. - float randomScale = Random.Range(0.95f, 1.05f); - - // Setup the matrix for the scale change. - matrix = Matrix4x4.TRS(Vector3.one, Quaternion.identity, Vector3.one * randomScale); - - // Apply the scale change relative to the center of each character. - copyOfVertices[materialIndex][vertexIndex + 0] = matrix.MultiplyPoint3x4(copyOfVertices[materialIndex][vertexIndex + 0]); - copyOfVertices[materialIndex][vertexIndex + 1] = matrix.MultiplyPoint3x4(copyOfVertices[materialIndex][vertexIndex + 1]); - copyOfVertices[materialIndex][vertexIndex + 2] = matrix.MultiplyPoint3x4(copyOfVertices[materialIndex][vertexIndex + 2]); - copyOfVertices[materialIndex][vertexIndex + 3] = matrix.MultiplyPoint3x4(copyOfVertices[materialIndex][vertexIndex + 3]); - - // Revert the translation change. - copyOfVertices[materialIndex][vertexIndex + 0] += charCenter; - copyOfVertices[materialIndex][vertexIndex + 1] += charCenter; - copyOfVertices[materialIndex][vertexIndex + 2] += charCenter; - copyOfVertices[materialIndex][vertexIndex + 3] += charCenter; - - // Need to translate all 4 vertices of each quad to aligned with the center of the line. - // This is needed so the matrix TRS is applied from the center of the line. - copyOfVertices[materialIndex][vertexIndex + 0] -= centerOfLine; - copyOfVertices[materialIndex][vertexIndex + 1] -= centerOfLine; - copyOfVertices[materialIndex][vertexIndex + 2] -= centerOfLine; - copyOfVertices[materialIndex][vertexIndex + 3] -= centerOfLine; - - // Setup the matrix rotation. - matrix = Matrix4x4.TRS(Vector3.one, rotation, Vector3.one); - - // Apply the matrix TRS to the individual characters relative to the center of the current line. - copyOfVertices[materialIndex][vertexIndex + 0] = matrix.MultiplyPoint3x4(copyOfVertices[materialIndex][vertexIndex + 0]); - copyOfVertices[materialIndex][vertexIndex + 1] = matrix.MultiplyPoint3x4(copyOfVertices[materialIndex][vertexIndex + 1]); - copyOfVertices[materialIndex][vertexIndex + 2] = matrix.MultiplyPoint3x4(copyOfVertices[materialIndex][vertexIndex + 2]); - copyOfVertices[materialIndex][vertexIndex + 3] = matrix.MultiplyPoint3x4(copyOfVertices[materialIndex][vertexIndex + 3]); - - // Revert the translation change. - copyOfVertices[materialIndex][vertexIndex + 0] += centerOfLine; - copyOfVertices[materialIndex][vertexIndex + 1] += centerOfLine; - copyOfVertices[materialIndex][vertexIndex + 2] += centerOfLine; - copyOfVertices[materialIndex][vertexIndex + 3] += centerOfLine; - } - } - - // Push changes into meshes - for (int i = 0; i < textInfo.meshInfo.Length; i++) - { - textInfo.meshInfo[i].mesh.vertices = copyOfVertices[i]; - m_TextComponent.UpdateGeometry(textInfo.meshInfo[i].mesh, i); - } - - yield return new WaitForSeconds(0.1f); - } - } - - } -} \ No newline at end of file diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexShakeB.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexShakeB.cs.meta deleted file mode 100644 index f1fcf321a5..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexShakeB.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: e4e0d9ccee5f4950be8979268c9014e0 -timeCreated: 1462093319 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexZoom.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexZoom.cs deleted file mode 100644 index c4973fb1ad..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexZoom.cs +++ /dev/null @@ -1,192 +0,0 @@ -using UnityEngine; -using System.Linq; -using System.Collections; -using System.Collections.Generic; - - -namespace TMPro.Examples -{ - - public class VertexZoom : MonoBehaviour - { - public float AngleMultiplier = 1.0f; - public float SpeedMultiplier = 1.0f; - public float CurveScale = 1.0f; - - private TMP_Text m_TextComponent; - private bool hasTextChanged; - - - void Awake() - { - m_TextComponent = GetComponent(); - } - - void OnEnable() - { - // Subscribe to event fired when text object has been regenerated. - TMPro_EventManager.TEXT_CHANGED_EVENT.Add(ON_TEXT_CHANGED); - } - - void OnDisable() - { - // UnSubscribe to event fired when text object has been regenerated. - TMPro_EventManager.TEXT_CHANGED_EVENT.Remove(ON_TEXT_CHANGED); - } - - - void Start() - { - StartCoroutine(AnimateVertexColors()); - } - - - void ON_TEXT_CHANGED(Object obj) - { - if (obj == m_TextComponent) - hasTextChanged = true; - } - - /// - /// Method to animate vertex colors of a TMP Text object. - /// - /// - IEnumerator AnimateVertexColors() - { - - // We force an update of the text object since it would only be updated at the end of the frame. Ie. before this code is executed on the first frame. - // Alternatively, we could yield and wait until the end of the frame when the text object will be generated. - m_TextComponent.ForceMeshUpdate(); - - TMP_TextInfo textInfo = m_TextComponent.textInfo; - - Matrix4x4 matrix; - TMP_MeshInfo[] cachedMeshInfoVertexData = textInfo.CopyMeshInfoVertexData(); - - // Allocations for sorting of the modified scales - List modifiedCharScale = new List(); - List scaleSortingOrder = new List(); - - hasTextChanged = true; - - while (true) - { - // Allocate new vertices - if (hasTextChanged) - { - // Get updated vertex data - cachedMeshInfoVertexData = textInfo.CopyMeshInfoVertexData(); - - hasTextChanged = false; - } - - int characterCount = textInfo.characterCount; - - // If No Characters then just yield and wait for some text to be added - if (characterCount == 0) - { - yield return new WaitForSeconds(0.25f); - continue; - } - - // Clear list of character scales - modifiedCharScale.Clear(); - scaleSortingOrder.Clear(); - - for (int i = 0; i < characterCount; i++) - { - TMP_CharacterInfo charInfo = textInfo.characterInfo[i]; - - // Skip characters that are not visible and thus have no geometry to manipulate. - if (!charInfo.isVisible) - continue; - - // Get the index of the material used by the current character. - int materialIndex = textInfo.characterInfo[i].materialReferenceIndex; - - // Get the index of the first vertex used by this text element. - int vertexIndex = textInfo.characterInfo[i].vertexIndex; - - // Get the cached vertices of the mesh used by this text element (character or sprite). - Vector3[] sourceVertices = cachedMeshInfoVertexData[materialIndex].vertices; - - // Determine the center point of each character at the baseline. - //Vector2 charMidBasline = new Vector2((sourceVertices[vertexIndex + 0].x + sourceVertices[vertexIndex + 2].x) / 2, charInfo.baseLine); - // Determine the center point of each character. - Vector2 charMidBasline = (sourceVertices[vertexIndex + 0] + sourceVertices[vertexIndex + 2]) / 2; - - // Need to translate all 4 vertices of each quad to aligned with middle of character / baseline. - // This is needed so the matrix TRS is applied at the origin for each character. - Vector3 offset = charMidBasline; - - Vector3[] destinationVertices = textInfo.meshInfo[materialIndex].vertices; - - destinationVertices[vertexIndex + 0] = sourceVertices[vertexIndex + 0] - offset; - destinationVertices[vertexIndex + 1] = sourceVertices[vertexIndex + 1] - offset; - destinationVertices[vertexIndex + 2] = sourceVertices[vertexIndex + 2] - offset; - destinationVertices[vertexIndex + 3] = sourceVertices[vertexIndex + 3] - offset; - - //Vector3 jitterOffset = new Vector3(Random.Range(-.25f, .25f), Random.Range(-.25f, .25f), 0); - - // Determine the random scale change for each character. - float randomScale = Random.Range(1f, 1.5f); - - // Add modified scale and index - modifiedCharScale.Add(randomScale); - scaleSortingOrder.Add(modifiedCharScale.Count - 1); - - // Setup the matrix for the scale change. - //matrix = Matrix4x4.TRS(jitterOffset, Quaternion.Euler(0, 0, Random.Range(-5f, 5f)), Vector3.one * randomScale); - matrix = Matrix4x4.TRS(new Vector3(0, 0, 0), Quaternion.identity, Vector3.one * randomScale); - - destinationVertices[vertexIndex + 0] = matrix.MultiplyPoint3x4(destinationVertices[vertexIndex + 0]); - destinationVertices[vertexIndex + 1] = matrix.MultiplyPoint3x4(destinationVertices[vertexIndex + 1]); - destinationVertices[vertexIndex + 2] = matrix.MultiplyPoint3x4(destinationVertices[vertexIndex + 2]); - destinationVertices[vertexIndex + 3] = matrix.MultiplyPoint3x4(destinationVertices[vertexIndex + 3]); - - destinationVertices[vertexIndex + 0] += offset; - destinationVertices[vertexIndex + 1] += offset; - destinationVertices[vertexIndex + 2] += offset; - destinationVertices[vertexIndex + 3] += offset; - - // Restore Source UVS which have been modified by the sorting - Vector2[] sourceUVs0 = cachedMeshInfoVertexData[materialIndex].uvs0; - Vector2[] destinationUVs0 = textInfo.meshInfo[materialIndex].uvs0; - - destinationUVs0[vertexIndex + 0] = sourceUVs0[vertexIndex + 0]; - destinationUVs0[vertexIndex + 1] = sourceUVs0[vertexIndex + 1]; - destinationUVs0[vertexIndex + 2] = sourceUVs0[vertexIndex + 2]; - destinationUVs0[vertexIndex + 3] = sourceUVs0[vertexIndex + 3]; - - // Restore Source Vertex Colors - Color32[] sourceColors32 = cachedMeshInfoVertexData[materialIndex].colors32; - Color32[] destinationColors32 = textInfo.meshInfo[materialIndex].colors32; - - destinationColors32[vertexIndex + 0] = sourceColors32[vertexIndex + 0]; - destinationColors32[vertexIndex + 1] = sourceColors32[vertexIndex + 1]; - destinationColors32[vertexIndex + 2] = sourceColors32[vertexIndex + 2]; - destinationColors32[vertexIndex + 3] = sourceColors32[vertexIndex + 3]; - } - - // Push changes into meshes - for (int i = 0; i < textInfo.meshInfo.Length; i++) - { - //// Sort Quads based modified scale - scaleSortingOrder.Sort((a, b) => modifiedCharScale[a].CompareTo(modifiedCharScale[b])); - - textInfo.meshInfo[i].SortGeometry(scaleSortingOrder); - - // Updated modified vertex attributes - textInfo.meshInfo[i].mesh.vertices = textInfo.meshInfo[i].vertices; - textInfo.meshInfo[i].mesh.uv = textInfo.meshInfo[i].uvs0; - textInfo.meshInfo[i].mesh.colors32 = textInfo.meshInfo[i].colors32; - - m_TextComponent.UpdateGeometry(textInfo.meshInfo[i].mesh, i); - } - - yield return new WaitForSeconds(0.1f); - } - } - - } -} \ No newline at end of file diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexZoom.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexZoom.cs.meta deleted file mode 100644 index d9e3f969f9..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/VertexZoom.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 52ec835d14bd486f900952b77698b7eb -timeCreated: 1466280202 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/WarpTextExample.cs b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/WarpTextExample.cs deleted file mode 100644 index 18dba4c184..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/WarpTextExample.cs +++ /dev/null @@ -1,144 +0,0 @@ -using UnityEngine; -using System.Collections; - - -namespace TMPro.Examples -{ - - public class WarpTextExample : MonoBehaviour - { - - private TMP_Text m_TextComponent; - - public AnimationCurve VertexCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(0.25f, 2.0f), new Keyframe(0.5f, 0), new Keyframe(0.75f, 2.0f), new Keyframe(1, 0f)); - public float AngleMultiplier = 1.0f; - public float SpeedMultiplier = 1.0f; - public float CurveScale = 1.0f; - - void Awake() - { - m_TextComponent = gameObject.GetComponent(); - } - - - void Start() - { - StartCoroutine(WarpText()); - } - - - private AnimationCurve CopyAnimationCurve(AnimationCurve curve) - { - AnimationCurve newCurve = new AnimationCurve(); - - newCurve.keys = curve.keys; - - return newCurve; - } - - - /// - /// Method to curve text along a Unity animation curve. - /// - /// - /// - IEnumerator WarpText() - { - VertexCurve.preWrapMode = WrapMode.Clamp; - VertexCurve.postWrapMode = WrapMode.Clamp; - - //Mesh mesh = m_TextComponent.textInfo.meshInfo[0].mesh; - - Vector3[] vertices; - Matrix4x4 matrix; - - m_TextComponent.havePropertiesChanged = true; // Need to force the TextMeshPro Object to be updated. - CurveScale *= 10; - float old_CurveScale = CurveScale; - AnimationCurve old_curve = CopyAnimationCurve(VertexCurve); - - while (true) - { - if (!m_TextComponent.havePropertiesChanged && old_CurveScale == CurveScale && old_curve.keys[1].value == VertexCurve.keys[1].value) - { - yield return null; - continue; - } - - old_CurveScale = CurveScale; - old_curve = CopyAnimationCurve(VertexCurve); - - m_TextComponent.ForceMeshUpdate(); // Generate the mesh and populate the textInfo with data we can use and manipulate. - - TMP_TextInfo textInfo = m_TextComponent.textInfo; - int characterCount = textInfo.characterCount; - - - if (characterCount == 0) continue; - - //vertices = textInfo.meshInfo[0].vertices; - //int lastVertexIndex = textInfo.characterInfo[characterCount - 1].vertexIndex; - - float boundsMinX = m_TextComponent.bounds.min.x; //textInfo.meshInfo[0].mesh.bounds.min.x; - float boundsMaxX = m_TextComponent.bounds.max.x; //textInfo.meshInfo[0].mesh.bounds.max.x; - - - - for (int i = 0; i < characterCount; i++) - { - if (!textInfo.characterInfo[i].isVisible) - continue; - - int vertexIndex = textInfo.characterInfo[i].vertexIndex; - - // Get the index of the mesh used by this character. - int materialIndex = textInfo.characterInfo[i].materialReferenceIndex; - - vertices = textInfo.meshInfo[materialIndex].vertices; - - // Compute the baseline mid point for each character - Vector3 offsetToMidBaseline = new Vector2((vertices[vertexIndex + 0].x + vertices[vertexIndex + 2].x) / 2, textInfo.characterInfo[i].baseLine); - //float offsetY = VertexCurve.Evaluate((float)i / characterCount + loopCount / 50f); // Random.Range(-0.25f, 0.25f); - - // Apply offset to adjust our pivot point. - vertices[vertexIndex + 0] += -offsetToMidBaseline; - vertices[vertexIndex + 1] += -offsetToMidBaseline; - vertices[vertexIndex + 2] += -offsetToMidBaseline; - vertices[vertexIndex + 3] += -offsetToMidBaseline; - - // Compute the angle of rotation for each character based on the animation curve - float x0 = (offsetToMidBaseline.x - boundsMinX) / (boundsMaxX - boundsMinX); // Character's position relative to the bounds of the mesh. - float x1 = x0 + 0.0001f; - float y0 = VertexCurve.Evaluate(x0) * CurveScale; - float y1 = VertexCurve.Evaluate(x1) * CurveScale; - - Vector3 horizontal = new Vector3(1, 0, 0); - //Vector3 normal = new Vector3(-(y1 - y0), (x1 * (boundsMaxX - boundsMinX) + boundsMinX) - offsetToMidBaseline.x, 0); - Vector3 tangent = new Vector3(x1 * (boundsMaxX - boundsMinX) + boundsMinX, y1) - new Vector3(offsetToMidBaseline.x, y0); - - float dot = Mathf.Acos(Vector3.Dot(horizontal, tangent.normalized)) * 57.2957795f; - Vector3 cross = Vector3.Cross(horizontal, tangent); - float angle = cross.z > 0 ? dot : 360 - dot; - - matrix = Matrix4x4.TRS(new Vector3(0, y0, 0), Quaternion.Euler(0, 0, angle), Vector3.one); - - vertices[vertexIndex + 0] = matrix.MultiplyPoint3x4(vertices[vertexIndex + 0]); - vertices[vertexIndex + 1] = matrix.MultiplyPoint3x4(vertices[vertexIndex + 1]); - vertices[vertexIndex + 2] = matrix.MultiplyPoint3x4(vertices[vertexIndex + 2]); - vertices[vertexIndex + 3] = matrix.MultiplyPoint3x4(vertices[vertexIndex + 3]); - - vertices[vertexIndex + 0] += offsetToMidBaseline; - vertices[vertexIndex + 1] += offsetToMidBaseline; - vertices[vertexIndex + 2] += offsetToMidBaseline; - vertices[vertexIndex + 3] += offsetToMidBaseline; - } - - - // Upload the mesh with the revised information - m_TextComponent.UpdateVertexData(); - - yield return new WaitForSeconds(0.025f); - } - } - } -} diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/WarpTextExample.cs.meta b/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/WarpTextExample.cs.meta deleted file mode 100644 index 7b7958a45e..0000000000 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/WarpTextExample.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 790744c462254b7ba8038e6ed28b3db2 -timeCreated: 1458801336 -licenseType: Pro -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Assembly-CSharp-Assets.asmdef b/Assets/Assembly-CSharp-Assets.asmdef new file mode 100644 index 0000000000..7f206250de --- /dev/null +++ b/Assets/Assembly-CSharp-Assets.asmdef @@ -0,0 +1,62 @@ +{ + "name": "Assembly-CSharp-Assets", + "rootNamespace": "", + "references": [ + "GUID:0bb35fc3181999548a4abea731e00e89", + "GUID:36bccdedfe0feeb4daf43bef9e43b65b", + "GUID:17013b2a21298c14ea4808251346a38a", + "GUID:7c88a4a7926ee5145ad2dfa06f454c67", + "GUID:ff92eadc23e03cb4981819644b0ad66d", + "GUID:5fc9604920bae0a4e813087ad428c215", + "GUID:fa8dbf94b90efa1478e7c833397cb0b2", + "GUID:301929b7186ac9542b7511b3e4692309", + "GUID:3de88c88fbbb8f944b9210d496af9762", + "GUID:87c9414dc782f82419a783f415f5ee19", + "GUID:5350fc5f2dee5894c94015dbe725cf05", + "GUID:ebcad7e3972724c43aa595f17cf4d103", + "GUID:43c1375cedfd4704d8556970fe75a17e", + "GUID:d09c1089116f5374693eb84c17ba522d", + "GUID:eb242eaf9f292954eb8c6fbd63c46deb", + "GUID:6e00473804df0f0468c07310fbce5737", + "GUID:b8f9ecae9b4fef949a5027c83ac0ddae", + "GUID:1476e4af5b8d89d4c9963efe314428b9", + "GUID:130574052ac14665988758c150e28409", + "GUID:eb124556ba20d60469be9771eb1f0360", + "GUID:493bb11add906094faa30425cab7ce2e", + "GUID:7e8d9417d9898d94c959041f7e807a3a", + "GUID:0d835944b7c304149ad6e6fd114de512", + "GUID:ca7dfa56d1d490249a5fe56aee92a13c", + "GUID:9a1080b2b38c7e741a8b9dfda7f5f683", + "GUID:92a1e40b8cccf8645adbdd275ac6371a", + "GUID:84651a3751eca9349aac36a66bba901b", + "GUID:9e24947de15b9834991c9d8411ea37cf", + "GUID:df380645f10b7bc4b97d4f5eb6303d95", + "GUID:46a67ded66a63de48b9329c593fc08de", + "GUID:75469ad4d38634e559750d17036d5f7c", + "GUID:d60799ab2a985554ea1a39cd38695018", + "GUID:5c1ff9bd975acec488150743d53a93ca", + "GUID:1104de264d522446f8274872ebf70b3d", + "GUID:fe25561d224ed4743af4c60938a59d0b", + "GUID:70ea675efa2644cef98c7ece24158333", + "GUID:de1079f91ae5b43499b7c7e4f1269884", + "GUID:6055be8ebefd69e48b49212b09b47b2f", + "GUID:593a5b492d29ac6448b1ebf7f035ef33", + "GUID:029c1c1b674aaae47a6841a0b89ad80e", + "GUID:dc47925d1a5fa2946bdd37746b2b5d48", + "GUID:5c01796d064528144a599661eaab93a6", + "GUID:f51ebe6a0ceec4240a699833d6309b23", + "GUID:b46779583a009f04ba9f5f31d0e7e6ac", + "GUID:607e5fc428cee124e9280c8cd460767b", + "GUID:343deaaf83e0cee4ca978e7df0b80d21", + "GUID:2bafac87e7f4b9b418d9448d219b01ab" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": false, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/Assembly-CSharp-Assets.asmdef.meta b/Assets/Assembly-CSharp-Assets.asmdef.meta new file mode 100644 index 0000000000..51ddf9887d --- /dev/null +++ b/Assets/Assembly-CSharp-Assets.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1afcca41054d49544a1bb897103e7155 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/AssemblyInfo.cs b/Assets/AssemblyInfo.cs new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Assets/Scripts/SS3D/Analysers/dummy.cs.meta b/Assets/AssemblyInfo.cs.meta similarity index 83% rename from Assets/Scripts/SS3D/Analysers/dummy.cs.meta rename to Assets/AssemblyInfo.cs.meta index fc89d1b8b1..c9e78a5798 100644 --- a/Assets/Scripts/SS3D/Analysers/dummy.cs.meta +++ b/Assets/AssemblyInfo.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 419be303b7a5975408faecff7e1c06fe +guid: 769d4c045eaf4404d94477e62c25f0f6 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Content/Data/Databases/Scenes.asset b/Assets/Content/Data/Databases/Scenes.asset index 91ec55369f..0492e7ea3b 100644 --- a/Assets/Content/Data/Databases/Scenes.asset +++ b/Assets/Content/Data/Databases/Scenes.asset @@ -16,12 +16,14 @@ MonoBehaviour: AssetGroup: {fileID: 11400000, guid: bacca0c47905ef441803065410c8978e, type: 2} Assets: _list: - - _key: Boot - _value: {fileID: 102900000, guid: 9fc0d4010bbf28b4594072e72b8655ab, type: 3} + - _key: Intro + _value: {fileID: 102900000, guid: 61687ab4465bb6e4d8164057bedc63db, type: 3} - _key: Game _value: {fileID: 102900000, guid: c7d05c35cd4853643a09333ecceff608, type: 3} + - _key: Boot + _value: {fileID: 102900000, guid: 9fc0d4010bbf28b4594072e72b8655ab, type: 3} + - _key: Empty + _value: {fileID: 102900000, guid: a7a0fb29f301d364a822be64003a90cb, type: 3} - _key: Launcher _value: {fileID: 102900000, guid: d03a300180bde5646b09bfa4c392679f, type: 3} - - _key: Intro - _value: {fileID: 102900000, guid: 61687ab4465bb6e4d8164057bedc63db, type: 3} _new: diff --git a/Assets/Default.ruleset b/Assets/Default.ruleset deleted file mode 100644 index 07f5d7473f..0000000000 --- a/Assets/Default.ruleset +++ /dev/null @@ -1,450 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Assets/ExternalRules.ruleset b/Assets/ExternalRules.ruleset new file mode 100644 index 0000000000..40f118ed5b --- /dev/null +++ b/Assets/ExternalRules.ruleset @@ -0,0 +1,280 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/ExternalRules.ruleset.meta b/Assets/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..e4773cd4d4 --- /dev/null +++ b/Assets/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 831f4454de8fb684989582b063b72674 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FishNet/CodeGenerating/ExternalRules.ruleset b/Assets/FishNet/CodeGenerating/ExternalRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/FishNet/CodeGenerating/ExternalRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/FishNet/CodeGenerating/ExternalRules.ruleset.meta b/Assets/FishNet/CodeGenerating/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..86359333ab --- /dev/null +++ b/Assets/FishNet/CodeGenerating/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bc54ad6100b3afe4cae74976890c0f69 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FishNet/CodeGenerating/cecil-0.11.4/ExternalRules.ruleset b/Assets/FishNet/CodeGenerating/cecil-0.11.4/ExternalRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/FishNet/CodeGenerating/cecil-0.11.4/ExternalRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/FishNet/CodeGenerating/cecil-0.11.4/ExternalRules.ruleset.meta b/Assets/FishNet/CodeGenerating/cecil-0.11.4/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..c1f84b5609 --- /dev/null +++ b/Assets/FishNet/CodeGenerating/cecil-0.11.4/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 03f038be4b0a4d74cab4b4fb0e955e64 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FishNet/Demos/ExternalRules.ruleset b/Assets/FishNet/Demos/ExternalRules.ruleset new file mode 100644 index 0000000000..3f37a202b1 --- /dev/null +++ b/Assets/FishNet/Demos/ExternalRules.ruleset @@ -0,0 +1,282 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/FishNet/Demos/ExternalRules.ruleset.meta b/Assets/FishNet/Demos/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..f514fdba88 --- /dev/null +++ b/Assets/FishNet/Demos/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8c7024ed8989f61409c149864017582a +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FishNet/Plugins/GameKit/Dependencies/ExternalRules.ruleset b/Assets/FishNet/Plugins/GameKit/Dependencies/ExternalRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/FishNet/Plugins/GameKit/Dependencies/ExternalRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/FishNet/Plugins/GameKit/Dependencies/ExternalRules.ruleset.meta b/Assets/FishNet/Plugins/GameKit/Dependencies/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..cc2c9ed021 --- /dev/null +++ b/Assets/FishNet/Plugins/GameKit/Dependencies/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c8deabe96d9a3c84ca2c3751caa30544 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FishNet/Plugins/GameKit/Utilities/ExternalRules.ruleset b/Assets/FishNet/Plugins/GameKit/Utilities/ExternalRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/FishNet/Plugins/GameKit/Utilities/ExternalRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/FishNet/Plugins/GameKit/Utilities/ExternalRules.ruleset.meta b/Assets/FishNet/Plugins/GameKit/Utilities/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..f212e3b9c0 --- /dev/null +++ b/Assets/FishNet/Plugins/GameKit/Utilities/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f4c3783a964a69345aa378dfbe867f39 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FishNet/Runtime/ExternalRules.ruleset b/Assets/FishNet/Runtime/ExternalRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/FishNet/Runtime/ExternalRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/FishNet/Runtime/ExternalRules.ruleset.meta b/Assets/FishNet/Runtime/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..695923f1ba --- /dev/null +++ b/Assets/FishNet/Runtime/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f3bf6b0924f878148832c147f697e8ef +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FishNet/Upgrading/ExternalRules.ruleset b/Assets/FishNet/Upgrading/ExternalRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/FishNet/Upgrading/ExternalRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/FishNet/Upgrading/ExternalRules.ruleset.meta b/Assets/FishNet/Upgrading/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..1283334154 --- /dev/null +++ b/Assets/FishNet/Upgrading/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d91e7a948c909aa47af2cff7f5fb73c8 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/FishNet/Upgrading/Fishnet.Upgrading.asmdef b/Assets/FishNet/Upgrading/Fishnet.Upgrading.asmdef new file mode 100644 index 0000000000..8876e210e8 --- /dev/null +++ b/Assets/FishNet/Upgrading/Fishnet.Upgrading.asmdef @@ -0,0 +1,16 @@ +{ + "name": "Fishnet.Upgrading", + "rootNamespace": "", + "references": [ + "GUID:7c88a4a7926ee5145ad2dfa06f454c67" + ], + "includePlatforms": [], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": true, + "defineConstraints": [], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/FishNet/Upgrading/Fishnet.Upgrading.asmdef.meta b/Assets/FishNet/Upgrading/Fishnet.Upgrading.asmdef.meta new file mode 100644 index 0000000000..aaffa5def3 --- /dev/null +++ b/Assets/FishNet/Upgrading/Fishnet.Upgrading.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: fcab602347368db44bc46b81c09d7d1c +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/EditorTools/ExternalRules.ruleset b/Assets/Scripts/EditorTools/ExternalRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/EditorTools/ExternalRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/EditorTools/ExternalRules.ruleset.meta b/Assets/Scripts/EditorTools/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..aa55a12891 --- /dev/null +++ b/Assets/Scripts/EditorTools/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d1fbeb8211e84154999f905308d12d08 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/EditorTools/RuleSetManager.cs b/Assets/Scripts/EditorTools/RuleSetManager.cs index 711d579933..2a4b8fef23 100644 --- a/Assets/Scripts/EditorTools/RuleSetManager.cs +++ b/Assets/Scripts/EditorTools/RuleSetManager.cs @@ -1,6 +1,8 @@ #if UNITY_EDITOR using EditorTools; +using JetBrains.Annotations; +using System; using System.Collections; using System.Collections.Generic; using System.IO; @@ -11,14 +13,22 @@ // TODO : Add a list of excluded assemblies from the SS3D folder. public class RuleSetManager : EditorWindow { - private static readonly string OriginalRulesetPath = "Assets/Scripts/SS3D/Analysers/CustomRuleSetInitializer/SS3DRules.ruleset"; + private const string RulesetRootPath = "Assets/Scripts/SS3D/Analysers/CustomRuleSetInitializer/"; // Define the root folder where you want to copy the ruleset files - private static string TargetRootFolder = "Assets\\Scripts\\SS3D"; + private const string ScriptsRootFolder = @"Assets\Scripts\SS3D"; + private const string TestsRootFolder = @"Assets\Scripts\Tests"; - private static string RulesetName = "SS3DRules.ruleset"; + private const string RulesetName = "SS3DRules.ruleset"; + private const string ExternalRulesetName = "ExternalRules.ruleset"; - private static string DisplayMessage = "Find the source ruleset at " + OriginalRulesetPath; + private const string DisplayMessage = "Find the source ruleset at " + RulesetRootPath; + + [NotNull] + private static string Ss3DRulesetPath => RulesetRootPath + RulesetName; + + [NotNull] + private static string ExternalRulesetPath => RulesetRootPath + ExternalRulesetName; [MenuItem("Tools/SS3D/RuleSetManager")] public static void ShowWindow() @@ -46,15 +56,21 @@ public void CreateGUI() root.Add(buttonRemove); buttonAdd.clicked += ButtonAddClicked; - buttonRemove.clicked += buttonRemoveClicked; + buttonRemove.clicked += ButtonRemoveClicked; } private void ButtonAddClicked() { // Check if the XML file exists - if (!File.Exists(OriginalRulesetPath)) + if (!File.Exists(Ss3DRulesetPath)) + { + Debug.LogError($"The source {Ss3DRulesetPath} does not exist."); + return; + } + + if (!File.Exists(ExternalRulesetPath)) { - Debug.LogWarning("The source ruleset does not exist."); + Debug.LogError($"The source {ExternalRulesetPath} does not exist."); return; } @@ -66,23 +82,39 @@ private void ButtonAddClicked() // Get the directory containing the .asmdef file string asmdefDirectory = Path.GetDirectoryName(asmdefFile); + if (asmdefDirectory == null) + { + Debug.LogError($"Asmdef directory us null for {asmdefFile}"); + return; + } + // Check if the directory exists and is under the target root folder - if (asmdefDirectory.StartsWith(TargetRootFolder)) + if (asmdefDirectory.StartsWith(ScriptsRootFolder, StringComparison.Ordinal) || asmdefDirectory.StartsWith(TestsRootFolder, StringComparison.Ordinal)) { // Create the target path for the XML file in the assembly folder - string targetXMLPath = Path.Combine(asmdefDirectory, Path.GetFileName(OriginalRulesetPath)); + string targetXMLPath = Path.Combine(asmdefDirectory, Path.GetFileName(Ss3DRulesetPath)); // Copy the XML file to the assembly folder - File.Copy(OriginalRulesetPath, targetXMLPath, true); + File.Copy(Ss3DRulesetPath, targetXMLPath, true); Debug.Log("Copied ruleset file to: " + targetXMLPath); } + else + { + // Create the target path for the XML file in the assembly folder + string targetXMLPath = Path.Combine(asmdefDirectory, Path.GetFileName(ExternalRulesetPath)); + + // Copy the XML file to the assembly folder + File.Copy(ExternalRulesetPath, targetXMLPath, true); + + Debug.Log("Copied ruleset file to: " + targetXMLPath); + } } AssetDatabase.Refresh(); } - private void buttonRemoveClicked() + private void ButtonRemoveClicked() { // Get all .asmdef files in the project string[] asmdefFiles = Directory.GetFiles("Assets", "*.asmdef", SearchOption.AllDirectories); @@ -93,7 +125,7 @@ private void buttonRemoveClicked() string asmdefDirectory = Path.GetDirectoryName(asmdefFile); // Check if the directory exists and is under the target root folder - if (asmdefDirectory.StartsWith(TargetRootFolder)) + if (asmdefDirectory.StartsWith(ScriptsRootFolder, StringComparison.Ordinal) || asmdefDirectory.StartsWith(TestsRootFolder, StringComparison.Ordinal)) { // Create the target path for the XML file in the assembly folder string targetXMLPath = Path.Combine(asmdefDirectory, Path.GetFileName(RulesetName)); diff --git a/Assets/Scripts/External/DOTween/Default.ruleset b/Assets/Scripts/External/DOTween/Default.ruleset new file mode 100644 index 0000000000..7f07ad6cb4 --- /dev/null +++ b/Assets/Scripts/External/DOTween/Default.ruleset @@ -0,0 +1,450 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/External/DOTween/Default.ruleset.meta b/Assets/Scripts/External/DOTween/Default.ruleset.meta new file mode 100644 index 0000000000..d74336f7f0 --- /dev/null +++ b/Assets/Scripts/External/DOTween/Default.ruleset.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 9a4f2ae050fb4305be7a130170079f24 +timeCreated: 1695448136 \ No newline at end of file diff --git a/Assets/Scripts/External/DOTween/Modules/ExternalRules.ruleset b/Assets/Scripts/External/DOTween/Modules/ExternalRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/External/DOTween/Modules/ExternalRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/External/DOTween/Modules/ExternalRules.ruleset.meta b/Assets/Scripts/External/DOTween/Modules/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..f8f2aac6af --- /dev/null +++ b/Assets/Scripts/External/DOTween/Modules/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f04639959db71fe47b534edbbbb6183a +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/External/Discord/Plugins/DiscordGameSDK/ExternalRules.ruleset b/Assets/Scripts/External/Discord/Plugins/DiscordGameSDK/ExternalRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/External/Discord/Plugins/DiscordGameSDK/ExternalRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/External/Discord/Plugins/DiscordGameSDK/ExternalRules.ruleset.meta b/Assets/Scripts/External/Discord/Plugins/DiscordGameSDK/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..278530e481 --- /dev/null +++ b/Assets/Scripts/External/Discord/Plugins/DiscordGameSDK/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 082e955182a70a64bb1cf01d042f6ab9 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/External/DynamicPanels/Editor/ExternalRules.ruleset b/Assets/Scripts/External/DynamicPanels/Editor/ExternalRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/External/DynamicPanels/Editor/ExternalRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/External/DynamicPanels/Editor/ExternalRules.ruleset.meta b/Assets/Scripts/External/DynamicPanels/Editor/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..19f5e1e170 --- /dev/null +++ b/Assets/Scripts/External/DynamicPanels/Editor/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1b337c0033831494e9cc8f64a9f13501 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/External/DynamicPanels/ExternalRules.ruleset b/Assets/Scripts/External/DynamicPanels/ExternalRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/External/DynamicPanels/ExternalRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/External/DynamicPanels/ExternalRules.ruleset.meta b/Assets/Scripts/External/DynamicPanels/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..5751c0e50a --- /dev/null +++ b/Assets/Scripts/External/DynamicPanels/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0f10c6b080dd8864e9758ca47c83f10c +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/External/External.asmdef b/Assets/Scripts/External/External.asmdef new file mode 100644 index 0000000000..4021b3a5f8 --- /dev/null +++ b/Assets/Scripts/External/External.asmdef @@ -0,0 +1,3 @@ +{ + "name": "External" +} diff --git a/Assets/Scripts/External/External.asmdef.meta b/Assets/Scripts/External/External.asmdef.meta new file mode 100644 index 0000000000..5a0a77d529 --- /dev/null +++ b/Assets/Scripts/External/External.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 54ec403e9745b3a4a8179463b07f7b73 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/External/ExternalRules.ruleset b/Assets/Scripts/External/ExternalRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/External/ExternalRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/External/ExternalRules.ruleset.meta b/Assets/Scripts/External/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..9bed26f504 --- /dev/null +++ b/Assets/Scripts/External/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: b88d5919604b8dc41b50400fa799881f +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/External/Hierarchy 2/Default.ruleset b/Assets/Scripts/External/Hierarchy 2/Default.ruleset new file mode 100644 index 0000000000..7f07ad6cb4 --- /dev/null +++ b/Assets/Scripts/External/Hierarchy 2/Default.ruleset @@ -0,0 +1,450 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/External/Hierarchy 2/Default.ruleset.meta b/Assets/Scripts/External/Hierarchy 2/Default.ruleset.meta new file mode 100644 index 0000000000..89c94317ae --- /dev/null +++ b/Assets/Scripts/External/Hierarchy 2/Default.ruleset.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 2453728abdb94a2f83062ce91e6135f1 +timeCreated: 1695448135 \ No newline at end of file diff --git a/Assets/Scripts/External/Hierarchy 2/Editor/ExternalRules.ruleset b/Assets/Scripts/External/Hierarchy 2/Editor/ExternalRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/External/Hierarchy 2/Editor/ExternalRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/External/Hierarchy 2/Editor/ExternalRules.ruleset.meta b/Assets/Scripts/External/Hierarchy 2/Editor/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..239ecaed14 --- /dev/null +++ b/Assets/Scripts/External/Hierarchy 2/Editor/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d653f02d38a3ff047af9d901380bc2d4 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/External/Hierarchy 2/Runtime/ExternalRules.ruleset b/Assets/Scripts/External/Hierarchy 2/Runtime/ExternalRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/External/Hierarchy 2/Runtime/ExternalRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/External/Hierarchy 2/Runtime/ExternalRules.ruleset.meta b/Assets/Scripts/External/Hierarchy 2/Runtime/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..01287c71ec --- /dev/null +++ b/Assets/Scripts/External/Hierarchy 2/Runtime/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 11da0b8cac3e57049b844a1c2581be7f +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/External/IngameDebugConsole/Default.ruleset b/Assets/Scripts/External/IngameDebugConsole/Default.ruleset new file mode 100644 index 0000000000..7f07ad6cb4 --- /dev/null +++ b/Assets/Scripts/External/IngameDebugConsole/Default.ruleset @@ -0,0 +1,450 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Default.ruleset.meta b/Assets/Scripts/External/IngameDebugConsole/Default.ruleset.meta similarity index 75% rename from Assets/Default.ruleset.meta rename to Assets/Scripts/External/IngameDebugConsole/Default.ruleset.meta index 1511540890..3ce9ade647 100644 --- a/Assets/Default.ruleset.meta +++ b/Assets/Scripts/External/IngameDebugConsole/Default.ruleset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 11d97295ad7ff8446878a0c2466eb214 +guid: fcf52f4df3bbc0941a83e092f7a5f887 RuleSetFileImporter: externalObjects: {} userData: diff --git a/Assets/Scripts/External/IngameDebugConsole/Editor/ExternalRules.ruleset b/Assets/Scripts/External/IngameDebugConsole/Editor/ExternalRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/External/IngameDebugConsole/Editor/ExternalRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/External/IngameDebugConsole/Editor/ExternalRules.ruleset.meta b/Assets/Scripts/External/IngameDebugConsole/Editor/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..a197d35efa --- /dev/null +++ b/Assets/Scripts/External/IngameDebugConsole/Editor/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 6ffc8b2f656f72e4d84a91a450b9461c +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/External/IngameDebugConsole/ExternalRules.ruleset b/Assets/Scripts/External/IngameDebugConsole/ExternalRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/External/IngameDebugConsole/ExternalRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/External/IngameDebugConsole/ExternalRules.ruleset.meta b/Assets/Scripts/External/IngameDebugConsole/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..198e5e6711 --- /dev/null +++ b/Assets/Scripts/External/IngameDebugConsole/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: bb9dc07c5629b29458c06310c5c154cb +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/External/IngameDebugConsole/Scripts/Default.ruleset b/Assets/Scripts/External/IngameDebugConsole/Scripts/Default.ruleset new file mode 100644 index 0000000000..7f07ad6cb4 --- /dev/null +++ b/Assets/Scripts/External/IngameDebugConsole/Scripts/Default.ruleset @@ -0,0 +1,450 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/External/IngameDebugConsole/Scripts/Default.ruleset.meta b/Assets/Scripts/External/IngameDebugConsole/Scripts/Default.ruleset.meta new file mode 100644 index 0000000000..6b8520f16a --- /dev/null +++ b/Assets/Scripts/External/IngameDebugConsole/Scripts/Default.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 974fdb2881c466b428ca2bc2c33f3142 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/External/InspectPlus/Default.ruleset b/Assets/Scripts/External/InspectPlus/Default.ruleset new file mode 100644 index 0000000000..7f07ad6cb4 --- /dev/null +++ b/Assets/Scripts/External/InspectPlus/Default.ruleset @@ -0,0 +1,450 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/External/InspectPlus/Default.ruleset.meta b/Assets/Scripts/External/InspectPlus/Default.ruleset.meta new file mode 100644 index 0000000000..ff90415620 --- /dev/null +++ b/Assets/Scripts/External/InspectPlus/Default.ruleset.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 5e3a710c211047adac126c7a55234bbe +timeCreated: 1695448131 \ No newline at end of file diff --git a/Assets/Scripts/External/InspectPlus/Editor/ExternalRules.ruleset b/Assets/Scripts/External/InspectPlus/Editor/ExternalRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/External/InspectPlus/Editor/ExternalRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/External/InspectPlus/Editor/ExternalRules.ruleset.meta b/Assets/Scripts/External/InspectPlus/Editor/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..e5b8b1065e --- /dev/null +++ b/Assets/Scripts/External/InspectPlus/Editor/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: dd8820f0a04c1754c80fa9e8b3647376 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/External/InspectPlus/ExternalRules.ruleset b/Assets/Scripts/External/InspectPlus/ExternalRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/External/InspectPlus/ExternalRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/External/InspectPlus/ExternalRules.ruleset.meta b/Assets/Scripts/External/InspectPlus/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..011e04aea4 --- /dev/null +++ b/Assets/Scripts/External/InspectPlus/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 62acd5e079be9bf42ba2d04754909a16 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/External/QuickGraph.meta b/Assets/Scripts/External/QuickGraph.meta index d6bc6ae67e..3fd0575396 100644 --- a/Assets/Scripts/External/QuickGraph.meta +++ b/Assets/Scripts/External/QuickGraph.meta @@ -1,5 +1,9 @@ fileFormatVersion: 2 +<<<<<<<< HEAD:Assets/Scripts/External/QuickGraph.meta guid: 1c9645dd020187d498b6940b92436a09 +======== +guid: 3ee16513138959b40857a827e11dd4a8 +>>>>>>>> 38d64305 (Revert code changes and add code linting back):Assets/Scripts/Tests/AssetAudit.meta folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Scripts/External/QuickGraph/ExternalRules.ruleset b/Assets/Scripts/External/QuickGraph/ExternalRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/External/QuickGraph/ExternalRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/External/QuickGraph/ExternalRules.ruleset.meta b/Assets/Scripts/External/QuickGraph/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..af1b343fc0 --- /dev/null +++ b/Assets/Scripts/External/QuickGraph/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ed5ed29f5716d8347b1176c5af4cb646 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/External/RuntimeInspector/Default.ruleset b/Assets/Scripts/External/RuntimeInspector/Default.ruleset new file mode 100644 index 0000000000..7f07ad6cb4 --- /dev/null +++ b/Assets/Scripts/External/RuntimeInspector/Default.ruleset @@ -0,0 +1,450 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/External/RuntimeInspector/Default.ruleset.meta b/Assets/Scripts/External/RuntimeInspector/Default.ruleset.meta new file mode 100644 index 0000000000..3f1669f417 --- /dev/null +++ b/Assets/Scripts/External/RuntimeInspector/Default.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e8e3f974134b0c545990e9d1eefc94ed +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/External/RuntimeInspector/ExternalRules.ruleset b/Assets/Scripts/External/RuntimeInspector/ExternalRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/External/RuntimeInspector/ExternalRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/External/RuntimeInspector/ExternalRules.ruleset.meta b/Assets/Scripts/External/RuntimeInspector/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..da3c2ffff7 --- /dev/null +++ b/Assets/Scripts/External/RuntimeInspector/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f58bfcf32b18681489d773da02520d67 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/External/RuntimeInspector/Scripts/Default.ruleset b/Assets/Scripts/External/RuntimeInspector/Scripts/Default.ruleset new file mode 100644 index 0000000000..7f07ad6cb4 --- /dev/null +++ b/Assets/Scripts/External/RuntimeInspector/Scripts/Default.ruleset @@ -0,0 +1,450 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/External/RuntimeInspector/Scripts/Default.ruleset.meta b/Assets/Scripts/External/RuntimeInspector/Scripts/Default.ruleset.meta new file mode 100644 index 0000000000..7942e83722 --- /dev/null +++ b/Assets/Scripts/External/RuntimeInspector/Scripts/Default.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9209fd5c56d813a4fa905be0f26a179e +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/External/Serilog/Default.ruleset b/Assets/Scripts/External/Serilog/Default.ruleset new file mode 100644 index 0000000000..7f07ad6cb4 --- /dev/null +++ b/Assets/Scripts/External/Serilog/Default.ruleset @@ -0,0 +1,450 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/External/Serilog/Default.ruleset.meta b/Assets/Scripts/External/Serilog/Default.ruleset.meta new file mode 100644 index 0000000000..81887f3797 --- /dev/null +++ b/Assets/Scripts/External/Serilog/Default.ruleset.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 8cb2d9a47a0f4fc28309b789ebba601c +timeCreated: 1695448141 \ No newline at end of file diff --git a/Assets/Scripts/External/Serilog/ExternalRules.ruleset b/Assets/Scripts/External/Serilog/ExternalRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/External/Serilog/ExternalRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/External/Serilog/ExternalRules.ruleset.meta b/Assets/Scripts/External/Serilog/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..6d2a75a492 --- /dev/null +++ b/Assets/Scripts/External/Serilog/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e87ac82cb57a197468fbb28ac77cd153 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/External/Serilog/Serilog.Sinks.Unity3D/ExternalRules.ruleset b/Assets/Scripts/External/Serilog/Serilog.Sinks.Unity3D/ExternalRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/External/Serilog/Serilog.Sinks.Unity3D/ExternalRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/External/Serilog/Serilog.Sinks.Unity3D/ExternalRules.ruleset.meta b/Assets/Scripts/External/Serilog/Serilog.Sinks.Unity3D/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..faeff7ea2d --- /dev/null +++ b/Assets/Scripts/External/Serilog/Serilog.Sinks.Unity3D/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a9358f68d64f0f844acddc12b3565ce2 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/External/UnityToolbarExtender/Default.ruleset b/Assets/Scripts/External/UnityToolbarExtender/Default.ruleset new file mode 100644 index 0000000000..7f07ad6cb4 --- /dev/null +++ b/Assets/Scripts/External/UnityToolbarExtender/Default.ruleset @@ -0,0 +1,450 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/External/UnityToolbarExtender/Default.ruleset.meta b/Assets/Scripts/External/UnityToolbarExtender/Default.ruleset.meta new file mode 100644 index 0000000000..1305a48694 --- /dev/null +++ b/Assets/Scripts/External/UnityToolbarExtender/Default.ruleset.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 4ef75fde83444d6e852079f1877c2290 +timeCreated: 1695448143 \ No newline at end of file diff --git a/Assets/Scripts/External/UnityToolbarExtender/unity-toolbar-extender-1.4.1/Editor/ExternalRules.ruleset b/Assets/Scripts/External/UnityToolbarExtender/unity-toolbar-extender-1.4.1/Editor/ExternalRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/External/UnityToolbarExtender/unity-toolbar-extender-1.4.1/Editor/ExternalRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/External/UnityToolbarExtender/unity-toolbar-extender-1.4.1/Editor/ExternalRules.ruleset.meta b/Assets/Scripts/External/UnityToolbarExtender/unity-toolbar-extender-1.4.1/Editor/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..356fff4dd6 --- /dev/null +++ b/Assets/Scripts/External/UnityToolbarExtender/unity-toolbar-extender-1.4.1/Editor/ExternalRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9091b032c07b11f42b920a53c5e8cc67 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Analysers/Analysers.asmdef b/Assets/Scripts/SS3D/Analysers/Analysers.asmdef index 9244f87fc7..5ec7ecc86e 100644 --- a/Assets/Scripts/SS3D/Analysers/Analysers.asmdef +++ b/Assets/Scripts/SS3D/Analysers/Analysers.asmdef @@ -1,3 +1,19 @@ { - "name": "Analysers" -} + "name": "Analysers", + "rootNamespace": "", + "references": [], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [], + "autoReferenced": false, + "defineConstraints": [ + "UNITY_EDITOR", + "UNITY_INCLUDE_TESTS" + ], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Analysers/CustomRuleSetInitializer/ExternalRules.ruleset b/Assets/Scripts/SS3D/Analysers/CustomRuleSetInitializer/ExternalRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/SS3D/Analysers/CustomRuleSetInitializer/ExternalRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Analysers/CustomRuleSetInitializer/ExternalRules.ruleset.meta b/Assets/Scripts/SS3D/Analysers/CustomRuleSetInitializer/ExternalRules.ruleset.meta new file mode 100644 index 0000000000..ff18c76b48 --- /dev/null +++ b/Assets/Scripts/SS3D/Analysers/CustomRuleSetInitializer/ExternalRules.ruleset.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 558f82d0c4864e928ca1dc21227c83cf +timeCreated: 1708460100 \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Analysers/CustomRuleSetInitializer/SS3DRules.ruleset b/Assets/Scripts/SS3D/Analysers/CustomRuleSetInitializer/SS3DRules.ruleset index 109ed6386f..c6bd298a99 100644 --- a/Assets/Scripts/SS3D/Analysers/CustomRuleSetInitializer/SS3DRules.ruleset +++ b/Assets/Scripts/SS3D/Analysers/CustomRuleSetInitializer/SS3DRules.ruleset @@ -1,211 +1,281 @@  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Analysers/SS3DRules.ruleset b/Assets/Scripts/SS3D/Analysers/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/SS3D/Analysers/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Analysers/SS3DRules.ruleset.meta b/Assets/Scripts/SS3D/Analysers/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..21ee0b5dac --- /dev/null +++ b/Assets/Scripts/SS3D/Analysers/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a093f9f6c22a77040bc669da3d6c02f4 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Analysers/StyleCop.Analyzers.dll b/Assets/Scripts/SS3D/Analysers/StyleCop.Analyzers.dll deleted file mode 100644 index 88b2c9d94c..0000000000 Binary files a/Assets/Scripts/SS3D/Analysers/StyleCop.Analyzers.dll and /dev/null differ diff --git a/Assets/Scripts/SS3D/Analysers/dummy.cs b/Assets/Scripts/SS3D/Analysers/dummy.cs deleted file mode 100644 index 5c65e90f3b..0000000000 --- a/Assets/Scripts/SS3D/Analysers/dummy.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class dummy : MonoBehaviour -{ - // Start is called before the first frame update - void Start() - { - - } - - // Update is called once per frame - void Update() - { - - } -} diff --git a/Assets/Scripts/SS3D/Application.meta b/Assets/Scripts/SS3D/Application.meta index 81baeec775..9dfa836126 100644 --- a/Assets/Scripts/SS3D/Application.meta +++ b/Assets/Scripts/SS3D/Application.meta @@ -1,5 +1,9 @@ fileFormatVersion: 2 +<<<<<<<< HEAD:Assets/Scripts/SS3D/Application.meta guid: 45e3ca56ffb946a44bc85f5ac5482dd3 +======== +guid: 3958892eecab2dc4bb25cae8722d4443 +>>>>>>>> 38d64305 (Revert code changes and add code linting back):Assets/Scripts/Tests/EditMode.meta folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Scripts/SS3D/Application/SS3DRules.ruleset b/Assets/Scripts/SS3D/Application/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/SS3D/Application/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Application/SS3DRules.ruleset.meta b/Assets/Scripts/SS3D/Application/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..073d8a705d --- /dev/null +++ b/Assets/Scripts/SS3D/Application/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c44d41fa76f52db4db21508393ee08b4 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Attributes/SS3DRules.ruleset b/Assets/Scripts/SS3D/Attributes/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/SS3D/Attributes/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Attributes/SS3DRules.ruleset.meta b/Assets/Scripts/SS3D/Attributes/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..05a5b19943 --- /dev/null +++ b/Assets/Scripts/SS3D/Attributes/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 01509c1353a6ca749ab7a72c95472e07 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/CodeGeneration/SS3DRules.ruleset b/Assets/Scripts/SS3D/CodeGeneration/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/SS3D/CodeGeneration/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/CodeGeneration/SS3DRules.ruleset.meta b/Assets/Scripts/SS3D/CodeGeneration/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..8535effeb2 --- /dev/null +++ b/Assets/Scripts/SS3D/CodeGeneration/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0723c4bd243480e45a893f054dd4127f +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/CommandLine/SS3DRules.ruleset b/Assets/Scripts/SS3D/CommandLine/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/SS3D/CommandLine/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/CommandLine/SS3DRules.ruleset.meta b/Assets/Scripts/SS3D/CommandLine/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..5021e8208c --- /dev/null +++ b/Assets/Scripts/SS3D/CommandLine/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c2c6845f2fee0c5429c3f71bffe82ac0 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Core/SS3DRules.ruleset b/Assets/Scripts/SS3D/Core/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/SS3D/Core/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Core/SS3DRules.ruleset.meta b/Assets/Scripts/SS3D/Core/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..8e939d2b12 --- /dev/null +++ b/Assets/Scripts/SS3D/Core/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 88c5a516e004bb44e98a38f59544284b +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Data/SS3DRules.ruleset b/Assets/Scripts/SS3D/Data/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/SS3D/Data/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Data/SS3DRules.ruleset.meta b/Assets/Scripts/SS3D/Data/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..b5cea8123b --- /dev/null +++ b/Assets/Scripts/SS3D/Data/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f3208b9093a646e42879fb9c444022d4 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Editor/SS3DRules.ruleset b/Assets/Scripts/SS3D/Editor/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/SS3D/Editor/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Editor/SS3DRules.ruleset.meta b/Assets/Scripts/SS3D/Editor/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..57f44d4c78 --- /dev/null +++ b/Assets/Scripts/SS3D/Editor/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 8798d7da42317244b86592c1011e14c8 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Hacks/SS3DRules.ruleset b/Assets/Scripts/SS3D/Hacks/SS3DRules.ruleset new file mode 100644 index 0000000000..fe04ed2a3f --- /dev/null +++ b/Assets/Scripts/SS3D/Hacks/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Hacks/SS3DRules.ruleset.meta b/Assets/Scripts/SS3D/Hacks/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..49c80bc547 --- /dev/null +++ b/Assets/Scripts/SS3D/Hacks/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 5a53313fbe9dd3d479042e3b47068b93 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Interactions/SS3D.Interactions.asmdef b/Assets/Scripts/SS3D/Interactions/SS3D.Interactions.asmdef index 115674f638..42ccdf7067 100644 --- a/Assets/Scripts/SS3D/Interactions/SS3D.Interactions.asmdef +++ b/Assets/Scripts/SS3D/Interactions/SS3D.Interactions.asmdef @@ -8,6 +8,7 @@ "GUID:6aabbee860c32c64d9bbd52d0704ed2c", "GUID:b763ff73a93a62c4ea128e32ed2cd0d6", "GUID:46e20dca70571ce4e817a6b5874168a0", + "GUID:51c75093236923944914d00b50c0a35b", "GUID:6e00473804df0f0468c07310fbce5737" ], "includePlatforms": [], diff --git a/Assets/Scripts/SS3D/Interactions/SS3DRules.ruleset b/Assets/Scripts/SS3D/Interactions/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/SS3D/Interactions/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Interactions/SS3DRules.ruleset.meta b/Assets/Scripts/SS3D/Interactions/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..a5757114be --- /dev/null +++ b/Assets/Scripts/SS3D/Interactions/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: cabb16319722a444e9ac6b56b8f32ef9 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Launcher/SS3DRules.ruleset b/Assets/Scripts/SS3D/Launcher/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/SS3D/Launcher/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Launcher/SS3DRules.ruleset.meta b/Assets/Scripts/SS3D/Launcher/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..4a4286d6da --- /dev/null +++ b/Assets/Scripts/SS3D/Launcher/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 39d70bcc2168dc54aa129906ad0fcafb +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Logging/Log.cs b/Assets/Scripts/SS3D/Logging/Log.cs index 85dd0a0fa4..972ead73b3 100644 --- a/Assets/Scripts/SS3D/Logging/Log.cs +++ b/Assets/Scripts/SS3D/Logging/Log.cs @@ -24,7 +24,7 @@ public static class Log /// public static void Verbose(object sender, string messageTemplate, Logs infoLog = Logs.Generic, params object[] propertyValues) { - var properties = new object[]{infoLog}.Concat(propertyValues).ToArray(); + object[] properties = new object[]{infoLog}.Concat(propertyValues).ToArray(); Serilog.Log.ForContext(Constants.SourceContextPropertyName, sender.GetType().Name).Verbose("{InfoLog}" + messageTemplate, properties); } @@ -40,7 +40,7 @@ public static void Verbose(object sender, string messageTemplate, Logs infoLog = /// public static void Verbose(object sender, Exception exception, string messageTemplate, Logs infoLog = Logs.Generic, params object[] propertyValues) { - var properties = new object[] { infoLog }.Concat(propertyValues).ToArray(); + object[] properties = new object[] { infoLog }.Concat(propertyValues).ToArray(); Serilog.Log.ForContext(Constants.SourceContextPropertyName, sender.GetType().Name).Verbose(exception,"{InfoLog}" + messageTemplate, properties); } @@ -55,7 +55,7 @@ public static void Verbose(object sender, Exception exception, string messageTem /// public static void Debug(object sender, string messageTemplate, Logs infoLog = Logs.Generic, params object[] propertyValues) { - var properties = new object[] { infoLog }.Concat(propertyValues).ToArray(); + object[] properties = new object[] { infoLog }.Concat(propertyValues).ToArray(); Serilog.Log.ForContext(Constants.SourceContextPropertyName, sender.GetType().Name).Debug("{InfoLog}" + messageTemplate, properties); } @@ -70,7 +70,7 @@ public static void Debug(object sender, string messageTemplate, Logs infoLog = L /// public static void Debug(object sender, Exception exception, string messageTemplate, Logs infoLog = Logs.Generic, params object[] propertyValues) { - var properties = new object[] { infoLog }.Concat(propertyValues).ToArray(); + object[] properties = new object[] { infoLog }.Concat(propertyValues).ToArray(); Serilog.Log.ForContext(Constants.SourceContextPropertyName, sender.GetType().Name).Debug(exception, "{InfoLog}" + messageTemplate, properties); } @@ -85,7 +85,7 @@ public static void Debug(object sender, Exception exception, string messageTempl /// public static void Information(object sender, string messageTemplate, Logs infoLog = Logs.Generic, params object[] propertyValues) { - var properties = new object[] { infoLog }.Concat(propertyValues).ToArray(); + object[] properties = new object[] { infoLog }.Concat(propertyValues).ToArray(); Serilog.Log.ForContext(Constants.SourceContextPropertyName, sender.GetType().Name).Information("{InfoLog}" + messageTemplate, properties); } @@ -100,7 +100,7 @@ public static void Information(object sender, string messageTemplate, Logs infoL /// public static void Information(object sender, Exception exception, string messageTemplate, Logs infoLog = Logs.Generic, params object[] propertyValues) { - var properties = new object[] { infoLog }.Concat(propertyValues).ToArray(); + object[] properties = new object[] { infoLog }.Concat(propertyValues).ToArray(); Serilog.Log.ForContext(Constants.SourceContextPropertyName, sender.GetType().Name).Debug(exception, "{InfoLog}" + messageTemplate, properties); } @@ -115,7 +115,7 @@ public static void Information(object sender, Exception exception, string messag /// public static void Warning(object sender, string messageTemplate, Logs infoLog = Logs.Generic, params object[] propertyValues) { - var properties = new object[] { infoLog }.Concat(propertyValues).ToArray(); + object[] properties = new object[] { infoLog }.Concat(propertyValues).ToArray(); Serilog.Log.ForContext(Constants.SourceContextPropertyName, sender.GetType().Name).Warning("{InfoLog}" + messageTemplate, properties); } @@ -130,7 +130,7 @@ public static void Warning(object sender, string messageTemplate, Logs infoLog = /// public static void Warning(object sender, Exception exception, string messageTemplate, Logs infoLog = Logs.Generic, params object[] propertyValues) { - var properties = new object[] { infoLog }.Concat(propertyValues).ToArray(); + object[] properties = new object[] { infoLog }.Concat(propertyValues).ToArray(); Serilog.Log.ForContext(Constants.SourceContextPropertyName, sender.GetType().Name).Debug(exception, "{InfoLog}" + messageTemplate, properties); } @@ -145,7 +145,7 @@ public static void Warning(object sender, Exception exception, string messageTem /// public static void Error(object sender, string messageTemplate, Logs infoLog = Logs.Generic, params object[] propertyValues) { - var properties = new object[] { infoLog }.Concat(propertyValues).ToArray(); + object[] properties = new object[] { infoLog }.Concat(propertyValues).ToArray(); Serilog.Log.ForContext(Constants.SourceContextPropertyName, sender.GetType().Name).Error("{InfoLog}" + messageTemplate, properties); } @@ -160,7 +160,7 @@ public static void Error(object sender, string messageTemplate, Logs infoLog = L /// public static void Error(object sender, Exception exception, string messageTemplate, Logs infoLog = Logs.Generic, params object[] propertyValues) { - var properties = new object[] { infoLog }.Concat(propertyValues).ToArray(); + object[] properties = new object[] { infoLog }.Concat(propertyValues).ToArray(); Serilog.Log.ForContext(Constants.SourceContextPropertyName, sender.GetType().Name).Error(exception, "{InfoLog}" + messageTemplate, properties); } @@ -175,7 +175,7 @@ public static void Error(object sender, Exception exception, string messageTempl /// public static void Fatal(object sender, string messageTemplate, Logs infoLog = Logs.Generic, params object[] propertyValues) { - var properties = new object[] { infoLog }.Concat(propertyValues).ToArray(); + object[] properties = new object[] { infoLog }.Concat(propertyValues).ToArray(); Serilog.Log.ForContext(Constants.SourceContextPropertyName, sender.GetType().Name).Fatal("{InfoLog}" + messageTemplate, properties); } @@ -190,7 +190,7 @@ public static void Fatal(object sender, string messageTemplate, Logs infoLog = L /// public static void Fatal(object sender, Exception exception, string messageTemplate, Logs infoLog = Logs.Generic, params object[] propertyValues) { - var properties = new object[] { infoLog }.Concat(propertyValues).ToArray(); + object[] properties = new object[] { infoLog }.Concat(propertyValues).ToArray(); Serilog.Log.ForContext(Constants.SourceContextPropertyName, sender.GetType().Name).Fatal(exception, "{InfoLog}" + messageTemplate, properties); } diff --git a/Assets/Scripts/SS3D/Logging/LogColors.cs b/Assets/Scripts/SS3D/Logging/LogColors.cs index f2e73ae0a6..fd366bf50f 100644 --- a/Assets/Scripts/SS3D/Logging/LogColors.cs +++ b/Assets/Scripts/SS3D/Logging/LogColors.cs @@ -4,20 +4,35 @@ namespace SS3D.Logging { public static class LogColors { - private const string UndefinedLogColor = "#FFFFFF"; public const string Blue = "#90C4FE"; public const string Green = "#88B36B"; public const string Red = "#8D3131"; + private const string UndefinedLogColor = "#FFFFFF"; + private static readonly Dictionary Colors = new() { - { Logs.None, "#FFFFFF"}, - { Logs.Generic, "#FFFFFF"}, - { Logs.Important, "#8D3131"}, - { Logs.ServerOnly, "#A645A6"}, - { Logs.External, "#E6DC33"}, - { Logs.ClientOnly, "#B94949"}, - { Logs.Physics, "#678DB8"} + { + Logs.None, "#FFFFFF" + }, + { + Logs.Generic, "#FFFFFF" + }, + { + Logs.Important, "#8D3131" + }, + { + Logs.ServerOnly, "#A645A6" + }, + { + Logs.External, "#E6DC33" + }, + { + Logs.ClientOnly, "#B94949" + }, + { + Logs.Physics, "#678DB8" + }, }; public static string GetLogColor(Logs logs) @@ -25,6 +40,6 @@ public static string GetLogColor(Logs logs) Colors.TryGetValue(logs, out string color); return color != string.Empty ? color : UndefinedLogColor; - } + } } } \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Logging/LogManager.cs b/Assets/Scripts/SS3D/Logging/LogManager.cs index 9c190c3488..d4f9cffeca 100644 --- a/Assets/Scripts/SS3D/Logging/LogManager.cs +++ b/Assets/Scripts/SS3D/Logging/LogManager.cs @@ -71,7 +71,7 @@ private static LoggerConfiguration ConfigureForPlayMode(LoggerConfiguration conf // Does not apply override if the logging level corresponds to the global minimum level. foreach (NamespaceLogLevel levelForNameSpace in Settings.SS3DNameSpaces) { - if (levelForNameSpace.Level == Settings.defaultLogLevel) continue; + if (levelForNameSpace.Level == Settings.DefaultLogLevel) continue; configuration = configuration.MinimumLevel.Override(levelForNameSpace.Name, levelForNameSpace.Level); } @@ -85,25 +85,22 @@ private static LoggerConfiguration ConfigureForPlayMode(LoggerConfiguration conf { path = overrideLogPath; } - else + else if (InstanceFinder.IsHost) { - if (InstanceFinder.IsHost) - { - path = "LogHost.json"; - } - else if (InstanceFinder.IsClientOnly) - { - path = "LogClient" + InstanceFinder.NetworkManager.ClientManager.Connection.ClientId + ".json"; - } - else if (InstanceFinder.IsServerOnly) - { - path = "LogServer.json"; - } + path = "LogHost.json"; + } + else if (InstanceFinder.IsClientOnly) + { + path = "LogClient" + InstanceFinder.NetworkManager.ClientManager.Connection.ClientId + ".json"; + } + else if (InstanceFinder.IsServerOnly) + { + path = "LogServer.json"; } path = LogFolderPath + path; - configuration = configuration.WriteTo.File(new CompactJsonFormatter(), LogFolderPath + path); + configuration.WriteTo.File(new CompactJsonFormatter(), LogFolderPath + path); return configuration; } @@ -113,7 +110,7 @@ private static LoggerConfiguration ConfigureForPlayMode(LoggerConfiguration conf /// private static LoggerConfiguration ConfigureMinimumLevel(LoggerConfiguration loggerConfiguration) { - switch (Settings.defaultLogLevel) + switch (Settings.DefaultLogLevel) { case LogEventLevel.Verbose: return loggerConfiguration.MinimumLevel.Verbose(); case LogEventLevel.Debug: return loggerConfiguration.MinimumLevel.Debug(); diff --git a/Assets/Scripts/SS3D/Logging/LogSettings/InspectorEditor/LogSettingsInspectorEditor.cs b/Assets/Scripts/SS3D/Logging/LogSettings/InspectorEditor/LogSettingsInspectorEditor.cs index b63156a1d2..56b3ab58ec 100644 --- a/Assets/Scripts/SS3D/Logging/LogSettings/InspectorEditor/LogSettingsInspectorEditor.cs +++ b/Assets/Scripts/SS3D/Logging/LogSettings/InspectorEditor/LogSettingsInspectorEditor.cs @@ -11,7 +11,7 @@ namespace SS3D.Logging.LogSettings.InspectorEditor { /// /// Custom inspector for the log settings, allow to show the list of namespaces in a convenient manner, - /// as well as resetting easily all namespaces logging level. + /// as well as resetting easily all namespaces logging level. /// [CustomEditor(typeof(LogSettings))] public class LogSettingsInspectorEditor : Editor @@ -20,16 +20,14 @@ public override void OnInspectorGUI() { serializedObject.Update(); - var spDefaultLevel = serializedObject.FindProperty("defaultLogLevel"); + SerializedProperty spDefaultLevel = serializedObject.FindProperty("defaultLogLevel"); // default log level, the log level at which all namespace will be by default. - LogEventLevel defaultLevel = (LogEventLevel)EditorGUILayout.EnumPopup( - new GUIContent("Default log level") - , (LogEventLevel)spDefaultLevel.enumValueIndex ); + LogEventLevel defaultLevel = (LogEventLevel)EditorGUILayout.EnumPopup(new GUIContent("Default log level"), (LogEventLevel)spDefaultLevel.enumValueIndex); spDefaultLevel.enumValueIndex = (int)defaultLevel; - var sp = serializedObject.FindProperty("SS3DNameSpaces"); + SerializedProperty sp = serializedObject.FindProperty("SS3DNameSpaces"); // Button to reset all namespaces to the default log level. if (GUILayout.Button("Reset to default log level")) @@ -38,17 +36,15 @@ public override void OnInspectorGUI() { sp.GetArrayElementAtIndex(i).FindPropertyRelative("_level").enumValueIndex = (int)defaultLevel; } - } + // show all namespaces along the log level in the inspector. for (int i = 0; i < sp.arraySize; i++) { EditorGUILayout.PropertyField(sp.GetArrayElementAtIndex(i)); } - - serializedObject.ApplyModifiedProperties(); - + serializedObject.ApplyModifiedProperties(); } } } diff --git a/Assets/Scripts/SS3D/Logging/LogSettings/LogSettings.cs b/Assets/Scripts/SS3D/Logging/LogSettings/LogSettings.cs index 48ebb4d4e8..0a91bb0b55 100644 --- a/Assets/Scripts/SS3D/Logging/LogSettings/LogSettings.cs +++ b/Assets/Scripts/SS3D/Logging/LogSettings/LogSettings.cs @@ -6,6 +6,7 @@ using System.Linq; using Serilog.Events; using System.Reflection; +using UnityEngine.Serialization; namespace SS3D.Logging.LogSettings { @@ -17,14 +18,14 @@ namespace SS3D.Logging.LogSettings [ProjectSettings("SS3D")] public sealed class LogSettings : ScriptableSettings { - [SerializeField] - public List SS3DNameSpaces = GetAllSs3DNamespaces(); - public LogEventLevel defaultLogLevel = LogEventLevel.Verbose; + public List SS3DNameSpaces = GetAllSs3DNamespaces(); + + [FormerlySerializedAs("defaultLogLevel")] + public LogEventLevel DefaultLogLevel = LogEventLevel.Verbose; /// /// Get all the name of the SS3D namespaces in alphanumerical order. /// - /// [NotNull] private static List GetAllSs3DNamespaces() { @@ -42,22 +43,4 @@ private static List GetAllSs3DNamespaces() } // structure to associate to each namespace a log level. - [Serializable] - public struct NamespaceLogLevel - { - public NamespaceLogLevel(string name, LogEventLevel level) - { - _name = name; - _level = level; - } - - [SerializeField] - private string _name; - - [SerializeField] - private LogEventLevel _level; - - public string Name => _name; - public LogEventLevel Level => _level; - } } diff --git a/Assets/Scripts/SS3D/Logging/LogSettings/NamespaceLogLevel.cs b/Assets/Scripts/SS3D/Logging/LogSettings/NamespaceLogLevel.cs new file mode 100644 index 0000000000..def02070f1 --- /dev/null +++ b/Assets/Scripts/SS3D/Logging/LogSettings/NamespaceLogLevel.cs @@ -0,0 +1,26 @@ +using Serilog.Events; +using System; +using UnityEngine; + +namespace SS3D.Logging.LogSettings +{ + [Serializable] + public struct NamespaceLogLevel + { + [SerializeField] + private string _name; + + [SerializeField] + private LogEventLevel _level; + + public NamespaceLogLevel(string name, LogEventLevel level) + { + _name = name; + _level = level; + } + + public string Name => _name; + + public LogEventLevel Level => _level; + } +} \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Logging/LogSettings/NamespaceLogLevel.cs.meta b/Assets/Scripts/SS3D/Logging/LogSettings/NamespaceLogLevel.cs.meta new file mode 100644 index 0000000000..a038577db7 --- /dev/null +++ b/Assets/Scripts/SS3D/Logging/LogSettings/NamespaceLogLevel.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 8f21142d96e7490191b13d72bf8df766 +timeCreated: 1696113740 \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Logging/SS3DRules.ruleset b/Assets/Scripts/SS3D/Logging/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/SS3D/Logging/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Logging/SS3DRules.ruleset.meta b/Assets/Scripts/SS3D/Logging/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..083665f9c5 --- /dev/null +++ b/Assets/Scripts/SS3D/Logging/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9b17fa073596a164c860cb061a108ddb +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Logging/SS3DUnityTextFormatter.cs b/Assets/Scripts/SS3D/Logging/SS3DUnityTextFormatter.cs index f5cb20cefb..1aa337779e 100644 --- a/Assets/Scripts/SS3D/Logging/SS3DUnityTextFormatter.cs +++ b/Assets/Scripts/SS3D/Logging/SS3DUnityTextFormatter.cs @@ -33,7 +33,7 @@ public SS3DUnityTextFormatter(string outputTemplate, IFormatProvider formatProvi public void Format(LogEvent logEvent, TextWriter output) { - foreach (var token in _outputTemplate.Tokens) + foreach (MessageTemplateToken token in _outputTemplate.Tokens) { if (token is TextToken tt) { @@ -41,7 +41,7 @@ public void Format(LogEvent logEvent, TextWriter output) continue; } - var pt = (PropertyToken)token; + PropertyToken pt = (PropertyToken)token; if (pt.PropertyName == OutputProperties.NewLinePropertyName) { @@ -59,14 +59,13 @@ public void Format(LogEvent logEvent, TextWriter output) } if (pt.PropertyName == OutputProperties.TimestampPropertyName) { - var scalarValue = new ScalarValue(logEvent.Timestamp); + ScalarValue scalarValue = new ScalarValue(logEvent.Timestamp); scalarValue.Render(output, pt.Format, _formatProvider); continue; } if(pt.PropertyName == "SourceContext") { RenderSourceContext(logEvent, output); - continue; } } } @@ -91,7 +90,7 @@ private void RenderTextToken(TextToken textToken, TextWriter output) /// private void RenderMessageTemplate(MessageTemplate messageTemplate, IReadOnlyDictionary properties, TextWriter output, string format = null) { - foreach (var token in messageTemplate.Tokens) + foreach (MessageTemplateToken token in messageTemplate.Tokens) { if (token is TextToken tt) { @@ -99,7 +98,7 @@ private void RenderMessageTemplate(MessageTemplate messageTemplate, IReadOnlyDic continue; } - var pt = (PropertyToken)token; + PropertyToken pt = (PropertyToken)token; //InfoLog property is only used to color SourceContext, see RenderSourceContext method. if (pt.PropertyName == "InfoLog") continue; @@ -110,7 +109,7 @@ private void RenderMessageTemplate(MessageTemplate messageTemplate, IReadOnlyDic private void RenderPropertyToken(PropertyToken pt, IReadOnlyDictionary properties, TextWriter output) { - if (!properties.TryGetValue(pt.PropertyName, out var propertyValue)) + if (!properties.TryGetValue(pt.PropertyName, out LogEventPropertyValue propertyValue)) { return; } @@ -129,11 +128,11 @@ private string Colorize(string text, Logs logs = Logs.Generic) /// private void RenderSourceContext(LogEvent logEvent, TextWriter output) { - logEvent.Properties.TryGetValue("InfoLog", out var InfoLogPropertyValue); - var ScalarInfoLogPropertyValue = InfoLogPropertyValue as ScalarValue; + logEvent.Properties.TryGetValue("InfoLog", out LogEventPropertyValue InfoLogPropertyValue); + ScalarValue ScalarInfoLogPropertyValue = InfoLogPropertyValue as ScalarValue; - logEvent.Properties.TryGetValue("SourceContext", out var SourceContextPropertyValue); - var ScalarSourceContextPropertyValue = SourceContextPropertyValue as ScalarValue; + logEvent.Properties.TryGetValue("SourceContext", out LogEventPropertyValue SourceContextPropertyValue); + ScalarValue ScalarSourceContextPropertyValue = SourceContextPropertyValue as ScalarValue; if (ScalarSourceContextPropertyValue?.Value is string sourceContext) { diff --git a/Assets/Scripts/SS3D/Networking/SS3DRules.ruleset b/Assets/Scripts/SS3D/Networking/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/SS3D/Networking/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Networking/SS3DRules.ruleset.meta b/Assets/Scripts/SS3D/Networking/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..0ccf87e6dd --- /dev/null +++ b/Assets/Scripts/SS3D/Networking/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2578494982e85794bb25b9f957b235d4 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Permissions/SS3DRules.ruleset b/Assets/Scripts/SS3D/Permissions/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/SS3D/Permissions/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Permissions/SS3DRules.ruleset.meta b/Assets/Scripts/SS3D/Permissions/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..00fbe96563 --- /dev/null +++ b/Assets/Scripts/SS3D/Permissions/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ae1cadc8de9713f42921592ca13862bd +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Rendering/SS3DRules.ruleset b/Assets/Scripts/SS3D/Rendering/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/SS3D/Rendering/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Rendering/SS3DRules.ruleset.meta b/Assets/Scripts/SS3D/Rendering/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..ec11f84152 --- /dev/null +++ b/Assets/Scripts/SS3D/Rendering/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 18980ef7c0f36c841b9f14fe1350382f +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/SS3D.asmdef b/Assets/Scripts/SS3D/SS3D.asmdef new file mode 100644 index 0000000000..2557671f04 --- /dev/null +++ b/Assets/Scripts/SS3D/SS3D.asmdef @@ -0,0 +1,3 @@ +{ + "name": "SS3D" +} diff --git a/Assets/Scripts/SS3D/SS3D.asmdef.meta b/Assets/Scripts/SS3D/SS3D.asmdef.meta new file mode 100644 index 0000000000..0fd455d419 --- /dev/null +++ b/Assets/Scripts/SS3D/SS3D.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c5ae446840ae9bc41baa3f689e9e3069 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/SS3DRules.ruleset b/Assets/Scripts/SS3D/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/SS3D/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/SS3DRules.ruleset.meta b/Assets/Scripts/SS3D/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..9602e4bf20 --- /dev/null +++ b/Assets/Scripts/SS3D/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ac556bcce740e684aa8dad59e89db874 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/SceneManagement/SS3DRules.ruleset b/Assets/Scripts/SS3D/SceneManagement/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/SS3D/SceneManagement/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/SceneManagement/SS3DRules.ruleset.meta b/Assets/Scripts/SS3D/SceneManagement/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..7e94274df0 --- /dev/null +++ b/Assets/Scripts/SS3D/SceneManagement/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 118efe0738f6d9149a247c214a0c9e54 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Systems/Chat/ChatChannels.cs b/Assets/Scripts/SS3D/Systems/Chat/ChatChannels.cs index 310808e449..2669791f58 100644 --- a/Assets/Scripts/SS3D/Systems/Chat/ChatChannels.cs +++ b/Assets/Scripts/SS3D/Systems/Chat/ChatChannels.cs @@ -5,6 +5,7 @@ namespace SS3D.Engine.Chat { [CreateAssetMenu(fileName = "New Chat Channels", menuName = "SS3D/UI/Chat/Channels")] + [ProjectSettings("SS3D/Assets", "Chat Channels")] public class ChatChannels : ScriptableSettings { public List allChannels = new List(); diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Containers/Editor/SS3DRules.ruleset b/Assets/Scripts/SS3D/Systems/Inventory/Containers/Editor/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/SS3D/Systems/Inventory/Containers/Editor/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Containers/Editor/SS3DRules.ruleset.meta b/Assets/Scripts/SS3D/Systems/Inventory/Containers/Editor/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..5a78a9fa78 --- /dev/null +++ b/Assets/Scripts/SS3D/Systems/Inventory/Containers/Editor/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3a6cbae1b59cd3b4684f22500964a182 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Systems/Inventory/Containers/ObserverConditions/ContainerViewedCondition.cs b/Assets/Scripts/SS3D/Systems/Inventory/Containers/ObserverConditions/ContainerViewedCondition.cs index ab18f8eda2..2eb20fe14f 100644 --- a/Assets/Scripts/SS3D/Systems/Inventory/Containers/ObserverConditions/ContainerViewedCondition.cs +++ b/Assets/Scripts/SS3D/Systems/Inventory/Containers/ObserverConditions/ContainerViewedCondition.cs @@ -1,3 +1,4 @@ + using FishNet.Connection; using FishNet.Object; using FishNet.Observing; diff --git a/Assets/Scripts/SS3D/Systems/Roles/Editor/SS3DRules.ruleset b/Assets/Scripts/SS3D/Systems/Roles/Editor/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/SS3D/Systems/Roles/Editor/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Systems/Roles/Editor/SS3DRules.ruleset.meta b/Assets/Scripts/SS3D/Systems/Roles/Editor/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..56ad8a1311 --- /dev/null +++ b/Assets/Scripts/SS3D/Systems/Roles/Editor/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e1a33b5eb5b5d734ead80d451337af08 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Systems/SS3DRules.ruleset b/Assets/Scripts/SS3D/Systems/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/SS3D/Systems/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Systems/SS3DRules.ruleset.meta b/Assets/Scripts/SS3D/Systems/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..2ff54eaed0 --- /dev/null +++ b/Assets/Scripts/SS3D/Systems/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 62216ed174959bb4cbf398acac030090 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Tweening/SS3DRules.ruleset b/Assets/Scripts/SS3D/Tweening/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/SS3D/Tweening/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Tweening/SS3DRules.ruleset.meta b/Assets/Scripts/SS3D/Tweening/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..249d278bc8 --- /dev/null +++ b/Assets/Scripts/SS3D/Tweening/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9f422cc78c3f4f145b88fc2934120308 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/UI/SS3DRules.ruleset b/Assets/Scripts/SS3D/UI/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/SS3D/UI/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/UI/SS3DRules.ruleset.meta b/Assets/Scripts/SS3D/UI/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..13c7ad8fb5 --- /dev/null +++ b/Assets/Scripts/SS3D/UI/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2dbcbf3987a5dc44eaf4aba02334a703 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/SS3D/Utils/SS3DRules.ruleset b/Assets/Scripts/SS3D/Utils/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/SS3D/Utils/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/SS3D/Utils/SS3DRules.ruleset.meta b/Assets/Scripts/SS3D/Utils/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..4316a8cd01 --- /dev/null +++ b/Assets/Scripts/SS3D/Utils/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 7d09f69641ff18a40950d514fcd30947 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Tests/AssetAudit.meta b/Assets/Scripts/Tests/AssetAudit.meta index 48be54f7a0..6cef1b6ab7 100644 --- a/Assets/Scripts/Tests/AssetAudit.meta +++ b/Assets/Scripts/Tests/AssetAudit.meta @@ -1,5 +1,9 @@ fileFormatVersion: 2 -guid: fd1416804fd837343b21146f242fb105 +<<<<<<<< HEAD:Assets/Scripts/External/QuickGraph.meta +guid: ed1436d749d4ba04ea0feabc81b644f5 +======== +guid: 3ee16513138959b40857a827e11dd4a8 +>>>>>>>> 38d64305 (Revert code changes and add code linting back):Assets/Scripts/Tests/AssetAudit.meta folderAsset: yes DefaultImporter: externalObjects: {} diff --git a/Assets/Scripts/Tests/AssetAudit/SS3DRules.ruleset b/Assets/Scripts/Tests/AssetAudit/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/Tests/AssetAudit/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/Tests/AssetAudit/SS3DRules.ruleset.meta b/Assets/Scripts/Tests/AssetAudit/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..65e68c9fdc --- /dev/null +++ b/Assets/Scripts/Tests/AssetAudit/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 9b3539486285cfb46bf25099c47cc9ec +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Tests/Common/SS3DRules.ruleset b/Assets/Scripts/Tests/Common/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/Tests/Common/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/Tests/Common/SS3DRules.ruleset.meta b/Assets/Scripts/Tests/Common/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..23c0265378 --- /dev/null +++ b/Assets/Scripts/Tests/Common/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1e75dd955318df64787e727cf96fee5b +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Tests/EditMode/ElectricityTests/CircuitTests.cs b/Assets/Scripts/Tests/EditMode/ElectricityTests/CircuitTests.cs index 0d1f6f09dc..8f30e3aba4 100644 --- a/Assets/Scripts/Tests/EditMode/ElectricityTests/CircuitTests.cs +++ b/Assets/Scripts/Tests/EditMode/ElectricityTests/CircuitTests.cs @@ -1,11 +1,8 @@ using NUnit.Framework; -using SS3D.Systems.Inventory.Containers; using SS3D.Systems.Tile; -using System.Collections; using System.Collections.Generic; using System.Electricity; using System.Linq; -using System.Reflection.Emit; using UnityEngine; namespace EditorTests @@ -13,9 +10,9 @@ namespace EditorTests public class CircuitTests { private const float Tolerance = 0.0000001f; - + /// - /// Check if batteries charge at equal rate, given they're not full. If they're close to be full, + /// Check if batteries charge at equal rate, given they're not full. If they're close to be full, /// check that they're provided with the amount needed to fill them fully, instead of the equal rate. /// [Test] diff --git a/Assets/Scripts/Tests/EditMode/SS3DRules.ruleset b/Assets/Scripts/Tests/EditMode/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/Tests/EditMode/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/Tests/EditMode/SS3DRules.ruleset.meta b/Assets/Scripts/Tests/EditMode/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..9c8d4ed549 --- /dev/null +++ b/Assets/Scripts/Tests/EditMode/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: de404d6529cfe214db748392b17d20c3 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Tests/EditMode/SubstanceContainerTests.cs.meta b/Assets/Scripts/Tests/EditMode/SubstanceContainerTests.cs.meta index 7c8f41ae97..f02a2f7de5 100644 --- a/Assets/Scripts/Tests/EditMode/SubstanceContainerTests.cs.meta +++ b/Assets/Scripts/Tests/EditMode/SubstanceContainerTests.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: da58aa05f783b5d4485aeb4182a7d7db +guid: 7b88a263d58f877469617675705eea37 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/Scripts/Tests/KnownIssueReproduction/SS3DRules.ruleset b/Assets/Scripts/Tests/KnownIssueReproduction/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/Tests/KnownIssueReproduction/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/Tests/KnownIssueReproduction/SS3DRules.ruleset.meta b/Assets/Scripts/Tests/KnownIssueReproduction/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..acde7bbce4 --- /dev/null +++ b/Assets/Scripts/Tests/KnownIssueReproduction/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 1a7b4e6019a8ef142b08d03b9847a972 +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Tests/PlayMode/SS3DRules.ruleset b/Assets/Scripts/Tests/PlayMode/SS3DRules.ruleset new file mode 100644 index 0000000000..c6bd298a99 --- /dev/null +++ b/Assets/Scripts/Tests/PlayMode/SS3DRules.ruleset @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/Tests/PlayMode/SS3DRules.ruleset.meta b/Assets/Scripts/Tests/PlayMode/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..241ffd7d4c --- /dev/null +++ b/Assets/Scripts/Tests/PlayMode/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 56e1fa1f4b4a30845ad8742fb285036b +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scripts/Tests/SS3DRules.ruleset b/Assets/Scripts/Tests/SS3DRules.ruleset new file mode 100644 index 0000000000..f78a5fc409 --- /dev/null +++ b/Assets/Scripts/Tests/SS3DRules.ruleset @@ -0,0 +1,262 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Assets/Scripts/Tests/SS3DRules.ruleset.meta b/Assets/Scripts/Tests/SS3DRules.ruleset.meta new file mode 100644 index 0000000000..6452be19c9 --- /dev/null +++ b/Assets/Scripts/Tests/SS3DRules.ruleset.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 0ec8b873254e656469a730a4ef3c14ce +RuleSetFileImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Content/Data/UI/Chat/ChatChannels.asset b/Assets/Settings/ChatChannelsSettings.asset similarity index 97% rename from Assets/Content/Data/UI/Chat/ChatChannels.asset rename to Assets/Settings/ChatChannelsSettings.asset index 8a7a0494a3..bd287e2994 100644 --- a/Assets/Content/Data/UI/Chat/ChatChannels.asset +++ b/Assets/Settings/ChatChannelsSettings.asset @@ -10,10 +10,10 @@ MonoBehaviour: m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: df12eddc03ad45cd9a7628f3caf4b5ce, type: 3} - m_Name: ChatChannels + m_Name: ChatChannelsSettings m_EditorClassIdentifier: _preload: 1 - _type: 0 + _type: 2 allChannels: - {fileID: 11400000, guid: f1d8f919b4075c24f8be32586f73abbb, type: 2} - {fileID: 11400000, guid: 28d5250e40955354bbc14aec69cc6f38, type: 2} diff --git a/Assets/Content/Data/UI/Chat/ChatChannels.asset.meta b/Assets/Settings/ChatChannelsSettings.asset.meta similarity index 79% rename from Assets/Content/Data/UI/Chat/ChatChannels.asset.meta rename to Assets/Settings/ChatChannelsSettings.asset.meta index 9830a40d38..3445174a22 100644 --- a/Assets/Content/Data/UI/Chat/ChatChannels.asset.meta +++ b/Assets/Settings/ChatChannelsSettings.asset.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f7e904ef16adea74c9689e8d0b84422d +guid: 71d1eb78bf0499946bccc4daad2531fa NativeFormatImporter: externalObjects: {} mainObjectFileID: 11400000 diff --git a/Assets/Settings/LogSettings.asset b/Assets/Settings/LogSettings.asset index 354a09abc3..f7b7714f17 100644 --- a/Assets/Settings/LogSettings.asset +++ b/Assets/Settings/LogSettings.asset @@ -147,4 +147,4 @@ MonoBehaviour: _level: 0 - _name: SS3D.Utils.Editor _level: 0 - defaultLogLevel: 0 + DefaultLogLevel: 0 diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts.meta b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting.meta similarity index 58% rename from Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts.meta rename to Packages/com.coimbrastudios.internal/CoimbraInternal.Linting.meta index 225345e9a0..5340cf340f 100644 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts.meta +++ b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting.meta @@ -1,9 +1,8 @@ fileFormatVersion: 2 -guid: 3979ce59e55144c89a2b3b3f8dcf7fd3 +guid: e2ff7d258a7ebf34489f4d9c6ec3364a folderAsset: yes -timeCreated: 1436068007 -licenseType: Pro DefaultImporter: + externalObjects: {} userData: assetBundleName: assetBundleVariant: diff --git a/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/AssemblyInfo.cs b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/AssemblyInfo.cs new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/DropdownSample.cs.meta b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/AssemblyInfo.cs.meta similarity index 83% rename from Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/DropdownSample.cs.meta rename to Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/AssemblyInfo.cs.meta index 8046101184..0362a91f98 100644 --- a/Assets/Art/Font/TextMesh Pro/Examples & Extras/Scripts/DropdownSample.cs.meta +++ b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/AssemblyInfo.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ac1eb05af6d391b4eb0f4c070a99f1d0 +guid: c76193596fe74c046ae41b2ec159c6a7 MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/CoimbraInternal.Linting.asmdef b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/CoimbraInternal.Linting.asmdef new file mode 100644 index 0000000000..6b237454ee --- /dev/null +++ b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/CoimbraInternal.Linting.asmdef @@ -0,0 +1,21 @@ +{ + "name": "CoimbraInternal.Linting", + "rootNamespace": "CoimbraInternal.Linting", + "references": [], + "includePlatforms": [ + "Editor" + ], + "excludePlatforms": [], + "allowUnsafeCode": false, + "overrideReferences": false, + "precompiledReferences": [ + "nunit.framework.dll" + ], + "autoReferenced": false, + "defineConstraints": [ + "UNITY_EDITOR", + "UNITY_INCLUDE_TESTS" + ], + "versionDefines": [], + "noEngineReferences": false +} \ No newline at end of file diff --git a/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/CoimbraInternal.Linting.asmdef.meta b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/CoimbraInternal.Linting.asmdef.meta new file mode 100644 index 0000000000..932b63ae05 --- /dev/null +++ b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/CoimbraInternal.Linting.asmdef.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e10668b017190974fa18141cc6f7bb36 +AssemblyDefinitionImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Microsoft.Unity.Analyzers.dll b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Microsoft.Unity.Analyzers.dll new file mode 100644 index 0000000000..1f40229eb0 Binary files /dev/null and b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Microsoft.Unity.Analyzers.dll differ diff --git a/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Microsoft.Unity.Analyzers.dll.meta b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Microsoft.Unity.Analyzers.dll.meta new file mode 100644 index 0000000000..6d333eb858 --- /dev/null +++ b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Microsoft.Unity.Analyzers.dll.meta @@ -0,0 +1,90 @@ +fileFormatVersion: 2 +guid: cec64dd155fa03042bf17f0c68d931f6 +labels: +- RoslynAnalyzer +- SourceGenerator +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 1 + validateReferences: 0 + platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 1 + Exclude Linux64: 1 + Exclude OSXUniversal: 1 + Exclude WebGL: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 1 + - first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Standalone: Linux64 + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: OSXUniversal + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + - first: + iPhone: iOS + second: + enabled: 0 + settings: + AddToEmbeddedBinaries: false + CPU: AnyCPU + CompileFlags: + FrameworkDependencies: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Roslynator.CSharp.Analyzers.dll b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Roslynator.CSharp.Analyzers.dll new file mode 100644 index 0000000000..daa57b216c Binary files /dev/null and b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Roslynator.CSharp.Analyzers.dll differ diff --git a/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Roslynator.CSharp.Analyzers.dll.meta b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Roslynator.CSharp.Analyzers.dll.meta new file mode 100644 index 0000000000..0c1ef6a6d3 --- /dev/null +++ b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Roslynator.CSharp.Analyzers.dll.meta @@ -0,0 +1,61 @@ +fileFormatVersion: 2 +guid: e4e491bb373f22b4ab0aa142d0d28317 +labels: +- RoslynAnalyzer +- SourceGenerator +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 1 + validateReferences: 0 + platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 1 + Exclude Linux64: 1 + Exclude OSXUniversal: 1 + Exclude WebGL: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 1 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Roslynator.CSharp.dll b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Roslynator.CSharp.dll new file mode 100644 index 0000000000..6eabe696ce Binary files /dev/null and b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Roslynator.CSharp.dll differ diff --git a/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Roslynator.CSharp.dll.meta b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Roslynator.CSharp.dll.meta new file mode 100644 index 0000000000..187837622a --- /dev/null +++ b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Roslynator.CSharp.dll.meta @@ -0,0 +1,61 @@ +fileFormatVersion: 2 +guid: 8e130555f8fb89c4099241f626f0e273 +labels: +- RoslynAnalyzer +- SourceGenerator +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 1 + validateReferences: 0 + platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 1 + Exclude Linux64: 1 + Exclude OSXUniversal: 1 + Exclude WebGL: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 1 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Roslynator.Common.dll b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Roslynator.Common.dll new file mode 100644 index 0000000000..d90024e452 Binary files /dev/null and b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Roslynator.Common.dll differ diff --git a/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Roslynator.Common.dll.meta b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Roslynator.Common.dll.meta new file mode 100644 index 0000000000..bcffa65327 --- /dev/null +++ b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Roslynator.Common.dll.meta @@ -0,0 +1,61 @@ +fileFormatVersion: 2 +guid: fb220613ba4755f4fa7c2f6c73ba06d9 +labels: +- RoslynAnalyzer +- SourceGenerator +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 1 + validateReferences: 0 + platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 1 + Exclude Linux64: 1 + Exclude OSXUniversal: 1 + Exclude WebGL: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 1 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Roslynator.Core.dll b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Roslynator.Core.dll new file mode 100644 index 0000000000..3b63ba32ab Binary files /dev/null and b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Roslynator.Core.dll differ diff --git a/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Roslynator.Core.dll.meta b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Roslynator.Core.dll.meta new file mode 100644 index 0000000000..55093287e2 --- /dev/null +++ b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/Roslynator.Core.dll.meta @@ -0,0 +1,61 @@ +fileFormatVersion: 2 +guid: 76c14319a9a559742920c23055ee3da6 +labels: +- RoslynAnalyzer +- SourceGenerator +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 1 + validateReferences: 0 + platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 1 + Exclude Linux64: 1 + Exclude OSXUniversal: 1 + Exclude WebGL: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 1 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/StyleCop.Analyzers.CodeFixes.dll b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/StyleCop.Analyzers.CodeFixes.dll new file mode 100644 index 0000000000..c5cdba3dca Binary files /dev/null and b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/StyleCop.Analyzers.CodeFixes.dll differ diff --git a/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/StyleCop.Analyzers.CodeFixes.dll.meta b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/StyleCop.Analyzers.CodeFixes.dll.meta new file mode 100644 index 0000000000..3c62e75d16 --- /dev/null +++ b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/StyleCop.Analyzers.CodeFixes.dll.meta @@ -0,0 +1,61 @@ +fileFormatVersion: 2 +guid: 581493c8fe2092b459f1e9b9d0400837 +labels: +- RoslynAnalyzer +- SourceGenerator +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 1 + validateReferences: 0 + platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 1 + Exclude Linux64: 1 + Exclude OSXUniversal: 1 + Exclude WebGL: 1 + Exclude Win: 1 + Exclude Win64: 1 + Exclude iOS: 1 + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 0 + settings: + DefaultValueInitialized: true + - first: + Standalone: Win + second: + enabled: 0 + settings: + CPU: None + - first: + Standalone: Win64 + second: + enabled: 0 + settings: + CPU: None + - first: + Windows Store Apps: WindowsStoreApps + second: + enabled: 0 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/StyleCop.Analyzers.dll b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/StyleCop.Analyzers.dll new file mode 100644 index 0000000000..c7ca8c75b8 Binary files /dev/null and b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/StyleCop.Analyzers.dll differ diff --git a/Assets/Scripts/SS3D/Analysers/StyleCop.Analyzers.dll.meta b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/StyleCop.Analyzers.dll.meta similarity index 73% rename from Assets/Scripts/SS3D/Analysers/StyleCop.Analyzers.dll.meta rename to Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/StyleCop.Analyzers.dll.meta index eb8ca31824..c9dd207030 100644 --- a/Assets/Scripts/SS3D/Analysers/StyleCop.Analyzers.dll.meta +++ b/Packages/com.coimbrastudios.internal/CoimbraInternal.Linting/StyleCop.Analyzers.dll.meta @@ -1,7 +1,8 @@ fileFormatVersion: 2 -guid: b8ca8bbba06b018479f56cc9654eb42a +guid: a85ef5b91b2e5224698f8a32404cc6b8 labels: - RoslynAnalyzer +- SourceGenerator PluginImporter: externalObjects: {} serializedVersion: 2 @@ -9,20 +10,23 @@ PluginImporter: executionOrder: {} defineConstraints: [] isPreloaded: 0 - isOverridable: 0 - isExplicitlyReferenced: 0 - validateReferences: 1 + isOverridable: 1 + isExplicitlyReferenced: 1 + validateReferences: 0 platformData: - first: : Any second: enabled: 0 settings: + Exclude Android: 1 Exclude Editor: 1 Exclude Linux64: 1 Exclude OSXUniversal: 1 + Exclude WebGL: 1 Exclude Win: 1 Exclude Win64: 1 + Exclude iOS: 1 - first: Any: second: @@ -33,21 +37,7 @@ PluginImporter: second: enabled: 0 settings: - CPU: AnyCPU DefaultValueInitialized: true - OS: AnyOS - - first: - Standalone: Linux64 - second: - enabled: 0 - settings: - CPU: None - - first: - Standalone: OSXUniversal - second: - enabled: 0 - settings: - CPU: None - first: Standalone: Win second: diff --git a/Packages/com.coimbrastudios.internal/package.json b/Packages/com.coimbrastudios.internal/package.json new file mode 100644 index 0000000000..fb50aa1e2f --- /dev/null +++ b/Packages/com.coimbrastudios.internal/package.json @@ -0,0 +1,11 @@ +{ + "name": "com.coimbrastudios.internal", + "displayName": "Coimbra Framework Internal", + "author": "Bruno Coimbra", + "version": "1.0.0", + "license": "MIT", + "type": "tool", + "unity": "2021.3", + "unityRelease": "5f1", + "description": "Internal tools to use when developing the Coimbra Framework." +} \ No newline at end of file diff --git a/Packages/com.coimbrastudios.internal/package.json.meta b/Packages/com.coimbrastudios.internal/package.json.meta new file mode 100644 index 0000000000..cb9d8730e2 --- /dev/null +++ b/Packages/com.coimbrastudios.internal/package.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: d0a5da37fe967d34c998e23abb53ca6a +PackageManifestImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/manifest.json b/Packages/manifest.json index 31882a2346..0b4d8e9417 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -11,7 +11,7 @@ "com.unity.inputsystem": "1.4.4", "com.unity.postprocessing": "3.2.2", "com.unity.shadergraph": "12.1.8", - "com.unity.test-framework": "1.1.31", + "com.unity.test-framework": "1.1.33", "com.unity.textmeshpro": "3.0.6", "com.unity.toolchain.linux-x86_64": "2.0.2", "com.unity.ugui": "1.0.0", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index aa13247ca8..ee0701b904 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -14,6 +14,12 @@ }, "url": "https://package.openupm.com" }, + "com.coimbrastudios.internal": { + "version": "file:com.coimbrastudios.internal", + "depth": 0, + "source": "embedded", + "dependencies": {} + }, "com.cysharp.unitask": { "version": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask", "depth": 0, @@ -182,7 +188,7 @@ "url": "https://packages.unity.com" }, "com.unity.test-framework": { - "version": "1.1.31", + "version": "1.1.33", "depth": 0, "source": "registry", "dependencies": { diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 21ad444caf..eaa54de21c 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -138,13 +138,17 @@ PlayerSettings: Others: 1 bundleVersion: 0.0.7.5 preloadedAssets: - - {fileID: 11400000, guid: 2b55e2e913cc78044a828c6fb589fb9e, type: 2} - {fileID: 11400000, guid: 2024dd0c65f45424f98ac0c8a6979181, type: 2} + - {fileID: 11400000, guid: 3c59f55e6898e694083e7a1ede49fe18, type: 2} + - {fileID: 11400000, guid: 443046479504c5640b8f5902a102c09f, type: 2} - {fileID: 11400000, guid: c15209f668bbfab479eb5184981c2bf7, type: 2} - {fileID: 11400000, guid: 97967903e9bd51b499aaa39639cc9bb2, type: 2} + - {fileID: 11400000, guid: 2b55e2e913cc78044a828c6fb589fb9e, type: 2} - {fileID: 11400000, guid: 443046479504c5640b8f5902a102c09f, type: 2} - {fileID: 11400000, guid: 3c59f55e6898e694083e7a1ede49fe18, type: 2} - - {fileID: 11400000, guid: f7e904ef16adea74c9689e8d0b84422d, type: 2} + - {fileID: 11400000, guid: 2024dd0c65f45424f98ac0c8a6979181, type: 2} + - {fileID: 11400000, guid: 97967903e9bd51b499aaa39639cc9bb2, type: 2} + - {fileID: 11400000, guid: 71d1eb78bf0499946bccc4daad2531fa, type: 2} metroInputSource: 0 wsaTransparentSwapchain: 0 m_HolographicPauseOnTrackingLoss: 1