Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - rakkarage

Pages: [1]
1
Support / tk2dGrid in PropertyDrawer
« on: June 16, 2014, 07:26:17 pm »
why does the grid disappear after 1 second? thanks

TestGrid.cs

Code: [Select]
[Serializable]
public struct TestGrid
{
public int Unused;
}
Editor/TestGridEditor.cs

Code: [Select]
[CustomPropertyDrawer(typeof(DataGrid))]
public class TestGridEditor : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
tk2dGrid.Draw(position);
}
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
{
return EditorGUIUtility.singleLineHeight;
}
}

2
Support / CustomPropertyDrawer & sprites & animations
« on: June 15, 2014, 02:58:17 pm »
has anyone made tk2dSpriteGuiUtility.SpriteList & SpriteCollectionList
work with CustomPropertyDrawer instead of CustomEditor which means
cannot use GUILayout or EditorGUILayout?

i got the animation drawer working by converting EditorGUILayour.Popup
to EditorGUI.Popup.
but the sprite drawer is more complicated...

thanks

Pages: [1]