chore: Assets 디렉토리 구조 정리 및 네이밍 컨벤션 적용
- Assets/_Game/ 하위로 게임 에셋 통합 - External/ 패키지 벤더별 분류 (Synty, Animations, UI) - 에셋 네이밍 컨벤션 확립 및 적용 (Data_Skill_, Data_SkillEffect_, Prefab_, Anim_, Model_, BT_ 등) - pre-commit hook으로 네이밍 컨벤션 자동 검사 추가 - RESTRUCTURE_CHECKLIST.md 작성 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
85
Assets/External/TextMesh Pro/Examples & Extras/Scripts/Benchmark04.cs
vendored
Normal file
85
Assets/External/TextMesh Pro/Examples & Extras/Scripts/Benchmark04.cs
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
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>();
|
||||
|
||||
//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.textWrappingMode = TextWrappingModes.NoWrap;
|
||||
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>();
|
||||
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;
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user