public bool fillCenter ;

描述

是否渲染平铺或切片图像的中心。

仅当 Image.sprite 有边框时,这才会有效。

using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class FillCenterScript : MonoBehaviour { public Image xmasCalenderDoor;

// removes the center of the image to reveal the image behind it void OpenCalendarDoor() { xmasCalenderDoor.fillCenter = false; } }