import { _decorator , Component , Sprite , Material , Vec4 } from 'cc' ; const { ccclass , property , executeInEditMode } = _decorator ; import { Utils } from "../../utils/utils" ; @ ccclass ( 'SpirteOutline' ) @ executeInEditMode export default class SpirteOutline extends Component { @ property outlineColor : string = "0xffffff" ; @ property outlineSize : number = 2 ; img : Sprite | null = null ; material : Material | null = null ; onLoad ( ) { this . img = this . getComponent ( Sprite ) ; console . log ( this . img ?. sharedMaterial ) ; } }