无法设置自定义样式。这是prop customCSS的界面
using UnityEngine;
using System.Collections;
public class TestSphere : MonoBehaviour
{
public float speed = 3;
public Vector3 target = Vector3.zero;
private Vector3 origin;
void Start()
{
origin = transform.position;
}
void Update()
{
transform.position = Vector3.MoveTowards (transform.position, target, speed * Time.deltaTime);
if (transform.position == target) target = origin;
}
}
这是RichTextEditor组件,具有提供的样式和customCSS属性。
export interface RichTextStyles {
[key: string]: ElementStyles;
}
export interface ElementStyles ... {
color?: string;
fontFamily?: string;
fontSize?: number;
fontStyle?: "normal" | "italic";
...
}