UnityEditor.FilePathAttribute.FilePathAttribute C# (CSharp) Method

FilePathAttribute() public method

public FilePathAttribute ( string relativePath, Location location ) : System
relativePath string
location Location
return System
        public FilePathAttribute(string relativePath, Location location)
        {
            if (string.IsNullOrEmpty(relativePath))
            {
                Debug.LogError("Invalid relative path! (its null or empty)");
            }
            else
            {
                if (relativePath[0] == '/')
                {
                    relativePath = relativePath.Substring(1);
                }
                if (location == Location.PreferencesFolder)
                {
                    this.filepath = InternalEditorUtility.unityPreferencesFolder + "/" + relativePath;
                }
                else
                {
                    this.filepath = relativePath;
                }
            }
        }
FilePathAttribute