15 [CustomPropertyDrawer(typeof(LeapSpriteData))]
18 protected override void init(SerializedProperty property) {
22 Func<string> nameFunc = () => {
23 if (channelFeature ==
null) {
30 var spriteProp =
property.FindPropertyRelative(
"_sprite");
33 if (rect.height != 0) {
34 var indentedRect = EditorGUI.IndentedRect(rect);
35 EditorGUI.HelpBox(indentedRect,
"Sprite is not packed!", MessageType.Error);
38 Sprite sprite = spriteProp.objectReferenceValue as Sprite;
39 if (sprite !=
null && !sprite.packed) {
40 return EditorGUIUtility.singleLineHeight * 2;
void drawProperty(string name, bool includeChildren=true, bool disable=false)
void drawCustom(Action< Rect > drawFunc, float height)
static LeapGraphicFeatureBase currentFeature
override void init(SerializedProperty property)