텍스트에 최대 4가지 컬러의 그레디언트를 적용할 수 있습니다.컬러 그레디언트를 추가하면 TextCore에서 텍스트 문자열의 각 문자에 그레디언트 컬러를 적용합니다.
텍스트 오브젝트에 컬러 그레디언트 프리셋을 적용하려면 <gradient>
리치 텍스트 태그를 사용합니다.그레디언트 프리셋은 텍스트의 로컬 그레디언트 타입 및 컬러를 오버라이드합니다.
하나 이상의 컬러로 컬러 그레디언트를 만들어 특정 폴더에 배치하려면 다음 단계를 따르십시오.
메뉴에서 Assets > Create > Text > Color Gradient를 선택하여 새 컬러 그레디언트 프리셋을 추가합니다.
컬러 그레디언트의 인스펙터 창에 있는 드롭다운 메뉴에서 원하는 컬러 모드를 선택합니다.
그레디언트 컬러를 설정합니다.Colors 필드에서 사용할 수 있는 컬러의 수는 선택한 그레디언트 모드에 따라 다릅니다.각 견본은 문자 스프라이트에서 컬러의 원점에 해당합니다.
컬러 그라데이션 에셋을 패널 텍스트 설정 에셋에서 Color Gradient Presets에 대해 설정된 경로에 배치합니다.
텍스트에 컬러 그레디언트 프리셋을 적용하려면 ’<gradient="name-of-the-color-gradient">Your text</gradient>
라는 이름으로 컬러 그레디언트를 레퍼런스합니다.이와 같이 컬러 그레디언트를 적용하면 텍스트의 컬러에 해당 오브젝트의 현재 버텍스 컬러가 곱해집니다.
선택한 텍스트에 순수한 그레디언트를 적용하려면 <color>
태그를 사용하여 컬러를 흰색으로 재설정합니다.예제:
<color=white><gradient="Light to Dark Green - Vertical">Light to Dark Green gradient</gradient></color>
다음은 각 모드의 컬러 그레디언트 예제입니다.
단일 컬러 그레디언트입니다.
두 가지 컬러의 좌우 그레디언트.
두 가지 컬러의 상하 그레디언트.
4개의 컬러가 있는 그레디언트입니다.각 컬러가 한쪽 코너에서 발산되며가장 다양한 용도로 사용되는 그레디언트 타입입니다.일부 컬러를 변경하고 다른 컬러는 동일하게 유지하여 다양한 종류의 그레디언트를 만들 수 있습니다.
이 예에서는 세 코너는 한 가지 컬러로, 네 번째 코너는 다른 컬러로 표시합니다.
이 예는 동일한 컬러의 인접한 코너 쌍을 사용하여 수평 또는 수직 그레디언트를 만드는 방법을 보여줍니다.
이 예는 대각선 반대쪽 코너 쌍을 같은 컬러로 사용하여 대각선 그레디언트를 만드는 방법을 보여줍니다.
이 예제에서는 한쪽 끝에는 우세 컬러가 있고 다른 쪽 끝에는 두 컬러 사이의 전환이 있는 수평 및 수직으로 된 3가지 컬러 그레디언트를 만듭니다.
이 예에서는 대각선으로 마주 보는 두 코너는 같은 컬러로, 다른 두 코너는 다른 컬러로 지정하여 대각선 스트라이프 3가지 컬러 그레디언트를 만듭니다.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.