public ProductBlock(SerializedProperty property, ItemModule module) : base(property, module) { productInfo = property.FindAutoPropertyRelative("ProductInfo"); product = property.FindPropertyRelative("product"); float lineHeight = EditorGUIUtility.singleLineHeight; float lineHeightSpace = lineHeight + EditorGUIUtility.standardVerticalSpacing; list = new DropItemListDrawer(serializedObject, product, lineHeight, lineHeightSpace); }
private void OnEnable() { lineHeight = EditorGUIUtility.singleLineHeight; lineHeightSpace = lineHeight + 2; info = target as ResourceInformation; _ID = serializedObject.FindProperty("_ID"); _name = serializedObject.FindProperty("_name"); gatherType = serializedObject.FindProperty("gatherType"); gatherTime = serializedObject.FindProperty("gatherTime"); refreshTime = serializedObject.FindProperty("refreshTime"); lootPrefab = serializedObject.FindProperty("lootPrefab"); productItems = serializedObject.FindProperty("productItems"); dropList = new DropItemListDrawer(serializedObject, productItems, lineHeight, lineHeightSpace); gathering = Resources.LoadAll <ResourceInformation>("Configuration"); }
private void OnEnable() { remark = serializedObject.FindProperty("remark"); products = serializedObject.FindProperty("products"); listDrawer = new DropItemListDrawer(serializedObject, products, EditorGUIUtility.singleLineHeight, EditorGUIUtility.singleLineHeight + 2); }