[FolderPath] Clicking the select folder Icon when ParentFolder is specified and the path is relative, throws a null reference excerption.

Issue #262 resolved
Bjarke Elias created an issue
  1. Create the thing.
  2. Try and select a folder.
    [CreateAssetMenu]
    public class FolderPath : ScriptableObject
    {
        [SerializeField]
        private FolderPath parent;

        [SerializeField]
        [FolderPath(ParentFolder = "$GetParentFolder")]
        private string path;

        [BoxGroup(""), DisplayAsString, HideLabel]
        public string Path { get { return this.GetParentFolder().TrimEnd('/') + '/' + this.path.TrimStart('/'); } }

        private string GetParentFolder()
        {
            return (this.parent == null || this.parent == this) ? "" : this.parent.Path;
        }
    }

Comments (3)

  1. Log in to comment