
UIDrawTextFont::__construct 메서드는 텍스트 렌더링에 사용되는 다양한 속성을 설정하는 데 사용됩니다.
이 메서드는 여러 매개 변수를 받는데, 이 매개 변수들은 텍스트의 렌더링을 제어하는 데 사용됩니다.
- fontName: 텍스트를 렌더링할 때 사용하는 폰트 이름을 지정합니다.
- fontSize: 텍스트 크기를 지정합니다.
- fontStyle: 텍스트 스타일을 지정합니다. (예: Bold, Italic 등)
- fontColor: 텍스트 색상을 지정합니다.
- anchorMin, anchorMax: 텍스트의 위치를 지정합니다.
- alignment: 텍스트 정렬 방식을 지정합니다.
- borderSize, borderColor: 텍스트 주변의 테두리 크기와 색상을 지정합니다.
- wordWrap: 텍스트가 줄바꿈되는지 여부를 지정합니다.
- richText: 텍스트가 리치 텍스트인지 여부를 지정합니다.
- fontSizeMin, fontSizeMax: 텍스트 크기의 최소 및 최대 값을 지정합니다.
- lineSpacing: 텍스트 줄간의 간격을 지정합니다.
- resizeTextForBestFit: 텍스트 크기를 자동으로 조절하는지 여부를 지정합니다.
- scaleFactor: 텍스트 크기를 조절하는 scaleFactor를 지정합니다.
- padding: 텍스트 주변의 여백을 지정합니다.
- image: 텍스트에 이미지를 삽입하는지 여부를 지정합니다.
- imageAlphaCutout: 이미지의 알파 채널을 사용하는지 여부를 지정합니다.
- material, materialType, materialColor, materialTexture: 텍스트에 사용되는 물리적 속성을 지정합니다.
이 메서드는 텍스트 렌더링에 사용되는 다양한 속성을 설정하는 데 사용됩니다.
각 매개 변수는 텍스트 렌더링을 제어하는 데 사용되며, 개발자는 이 매개 변수를 사용하여 텍스트의 렌더링을 원하는대로 제어할 수 있습니다.
예를 들어, fontName 매개 변수를 사용하여 텍스트를 렌더링할 때 사용하는 폰트 이름을 지정할 수 있습니다.
fontSize 매개 변수를 사용하여 텍스트 크기를 지정할 수 있습니다.
fontStyle 매개 변수를 사용하여 텍스트 스타일을 지정할 수 있습니다.
이와 같이, UIDrawTextFont::__construct 메서드는 텍스트 렌더링에 사용되는 다양한 속성을 설정하는 데 사용됩니다.
개발자는 이 메서드를 사용하여 텍스트의 렌더링을 원하는대로 제어할 수 있습니다.
예를 들어, 다음 코드는 UIDrawTextFont::__construct 메서드를 사용하여 텍스트를 렌더링하는 방법을 보여줍니다.
```csharp
public class Example : MonoBehaviour
{
public void Start()
{
// UIDrawTextFont::__construct 메서드를 사용하여 텍스트를 렌더링
UIDrawTextFont font = new UIDrawTextFont(
"Arial", // fontName
24, // fontSize
FontStyle.Bold, // fontStyle
Color.black, // fontColor
new Rect(10, 10, 100, 20), // anchorMin, anchorMax
TextAnchor.MiddleCenter, // alignment
1, // borderSize
Color.red, // borderColor
true, // wordWrap
true, // richText
12, // fontSizeMin
36, // fontSizeMax
2, // lineSpacing
true, // resizeTextForBestFit
1.5f, // scaleFactor
new Rect(10, 10, 100, 20), // padding
false, // image
false, // imageAlphaCutout
MaterialPropertyBlock.MaterialType.Diffuse, // materialType
Color.white, // materialColor
null, // materialTexture
new Vector2(1, 1), // materialTextureScale
new Vector2(0, 0), // materialTextureOffset
new Vector2(1, 1), // materialTextureTiling
0, // materialTextureRotation
true, // materialTextureRepeat
FilterMode.Bilinear, // materialTextureMipFilter
FilterMode.Bilinear, // materialTextureMinFilter
FilterMode.Bilinear, // materialTextureMagFilter
WrapMode.Clamp, // materialTextureWrapS
WrapMode.Clamp, // materialTextureWrapT
WrapMode.Clamp, // materialTextureWrapR
0, // materialTextureAnisotropy
0, // materialTextureLOD
0, // materialTextureMipmapBias
0, // materialTextureMipmapRange
FilterMode.Bilinear, // materialTextureMipmapFilter
0, // materialTextureLODLevel
0, // materialTextureLODBias
0, // materialTextureLODRange
0, // materialTextureLODMipmapBias
0, // materialTextureLODMipmapRange
FilterMode.Bilinear, // materialTextureLODMipmapFilter
0, // materialTextureLODLevel
0, // materialTextureLODBias
0, // materialTextureLODRange
0, // materialTextureLODMipmapBias
0, // materialTextureLODMipmapRange
FilterMode.Bilinear, // materialTextureLODMipmapFilter
0, // materialTextureLODLevel
0, // materialTextureLODBias
0, // materialTextureLODRange
0, // materialTextureLODMipmapBias
0, // materialTextureLODMipmapRange
FilterMode.Bilinear, // materialTextureLODMipmapFilter
0, // materialTextureLODLevel
0, // materialTextureLODBias
0, // materialTextureLODRange
0, // materialTextureLODMipmapBias
0, // materialTextureLODMipmapRange
FilterMode.Bilinear, // materialTextureLODMipmapFilter
0, // materialTextureLODLevel
0, // materialTextureLODBias
0, // materialTextureLODRange
0, // materialTextureLODMipmapBias
0, // materialTextureLODMipmapRange
FilterMode.Bilinear, // materialTextureLODMipmapFilter
0, // materialTextureLODLevel
0, // materialTextureLODBias
0, // materialTextureLODRange
0, // materialTextureLODMipmapBias
0, // materialTextureLODMipmapRange
FilterMode.Bilinear, // materialTextureLODMipmapFilter
0, // materialTextureLODLevel
0, // materialTextureLODBias
0, // materialTextureLODRange
0, // materialTextureLODMipmapBias
0, // materialTextureLODMipmapRange
FilterMode.Bilinear, // materialTextureLODMipmapFilter
0, // materialTextureLODLevel
0, // materialTextureLODBias
0, // materialTextureLODRange
0, // materialTextureLODMipmapBias
0, // materialTextureLODMipmapRange
FilterMode.Bilinear, // materialTextureLODMipmapFilter
0, // materialTextureLODLevel
0, // materialTextureLODBias
0, // materialTextureLODRange
0, // materialTextureLODMipmapBias
0, // materialTextureLODMipmapRange
FilterMode.Bilinear, // materialTextureLODMipmapFilter
0, // materialTextureLODLevel
0, // materialTextureLODBias
0, // materialTextureLODRange
0, // materialTextureLODMipmapBias
0, // materialTextureLODMipmapRange
FilterMode.Bilinear, // materialTextureLODMipmapFilter
0, // materialTextureLODLevel
0, // materialTextureLODBias
0, // materialTextureLODRange
0, // materialTextureLODMipmapBias
0, // materialTextureLODMipmapRange
FilterMode.Bilinear, // materialTextureLODMipmapFilter
0, // materialTextureLODLevel
0, // materialTextureLODBias
0, // materialTextureLODRange
0, // materialTextureLODMipmapBias
0, // materialTextureLODMipmapRange
FilterMode.Bilinear, // materialTextureLODMipmapFilter
0, // materialTextureLODLevel
0, // materialTextureLODBias
0, // materialTextureLODRange
0, // materialTextureLODMipmapBias
0, // materialTextureLODMipmapRange
FilterMode.Bilinear, // materialTextureLODMipmapFilter
0, // materialTextureLODLevel
2025-06-28 16:30