private static void SetDefaultValue(QImage component) { if (component == null) { return; } component.raycastTarget = false; }
public static QImage AddComponent() { QImage component = UtilityEditor.ExtensionComponentWhenCreate <QImage>(typeof(QImage).Name.ToString()); //设置默认值 SetDefaultValue(component); return(component); }
protected override void OnEnable() { base.OnEnable(); ImageComponent = (QImage)target; key = serializedObject.FindProperty("key"); }