Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Other fields become readonly #6

Open
arnaud-jamin opened this issue Jun 10, 2018 · 2 comments
Open

Other fields become readonly #6

arnaud-jamin opened this issue Jun 10, 2018 · 2 comments

Comments

@arnaud-jamin
Copy link

arnaud-jamin commented Jun 10, 2018

Hello,

Nice library. It seems to work fine on most cases but I encounter an issue making all the other fields readonly:
image

When I remove the reoderable attribute the fields become enabled:
image

My class is a scriptable object:

    [Serializable]
    public class SpellNode : ScriptableObject
    {
        [Reorderable]
        [SerializeField]
        protected List<SpellSlotType> m_slotDefinition = null;

        [Header("General")]
        [SerializeField]
        protected string m_guid = string.Empty;

        [SerializeField]
        protected Sprite m_icon = null;

        [SerializeField]
        protected string m_name = string.Empty;

        [SerializeField]
        [TextArea]
        protected string m_rawDescription = string.Empty;

I tried uncommenting this, but it has no effect
#define EDIT_ALL_SCRIPTABLES

Thanks!

@ChemiKhazi
Copy link
Collaborator

I have limited time to work on this repo, but this is a legitimate issue. I'll see if I can address this when I have time to work on it.

@Hivemind9000
Copy link

I'm having the same issue. To circumvent it for now you need to change the following in ReorderableArrayInspector.cs (~line 733):

bool isStartProp = targetProp.propertyPath.StartsWith("m_");
using (new EditorGUI.DisabledScope(isStartProp))
{
    EditorGUILayout.PropertyField(targetProp, targetProp.isExpanded);
}

to

bool isStartProp = false;
using (new EditorGUI.DisabledScope(isStartProp))
{
    EditorGUILayout.PropertyField(targetProp, targetProp.isExpanded);
}

I'm not sure why this code is here, but it doesn't seem to affect anything by making this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants