Exemple #1
0
    public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
    {
        var target = (IdRangeAttribute)this.attribute;

        if (target.SupportType == typeof(AchievementData))
        {
            idNames = AchievementTool.GetDisplayNames().ToArray();
            ids     = AchievementTool.GetIDs().ToArray();
        }
        else
        {
            idNames = ActivityID.GetDisplayString;
            ids     = ActivityID.GetInt;
        }


        GUI.enabled = ((IdRangeAttribute)this.attribute).IsEditable;

        property.intValue = EditorGUI.IntPopup(position, "id", property.intValue, idNames, ids);

        GUI.enabled = true;
    }