This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[CustomPropertyDrawer(typeof(Component))] | |
public class ComponentPropertyDrawer : PropertyDrawer | |
{ | |
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) | |
{ | |
EditorGUILayout.BeginHorizontal(); | |
var pos = new Rect(position); | |
pos.width = EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing; | |
pos.x = position.x + position.width - pos.width; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace UnityEngine.UI | |
{ | |
[AddComponentMenu("Layout/Auto Expand Grid Layout Group", 152)] | |
public class AutoExpandGridLayoutGroup : LayoutGroup | |
{ | |
public enum Corner { UpperLeft = 0, UpperRight = 1, LowerLeft = 2, LowerRight = 3 } | |
public enum Axis { Horizontal = 0, Vertical = 1 } | |
public enum Constraint { Flexible = 0, FixedColumnCount = 1, FixedRowCount = 2 } | |
[SerializeField] |