void OnEnable() { invDesign = target as InventoryDesign; invDesign.setVariables(); inventoryTitlePosX = serializedObject.FindProperty("inventoryTitlePosX"); inventoryTitlePosY = serializedObject.FindProperty("inventoryTitlePosY"); panelSizeX = serializedObject.FindProperty("panelSizeX"); panelSizeY = serializedObject.FindProperty("panelSizeY"); inventoryTitle = serializedObject.FindProperty("inventoryTitle"); inventoryCrossPosX = serializedObject.FindProperty("inventoryCrossPosX"); inventoryCrossPosY = serializedObject.FindProperty("inventoryCrossPosY"); showInventoryCross = serializedObject.FindProperty("showInventoryCross"); }