- Home /
Question by
Helliaca · Feb 12, 2021 at 09:06 PM ·
custom editordocumentationattribute
HelpURL with relative directory
With the HelpURL attribute I can link my own components to a custom documentation url. I want to them to open a local html file inside the project folder. I can do so like this:
[HelpURL("file:///C:/Users/Name/ProjectName/Assets/Documentation/page.html")]
class ClassName : MonoBehaviour {
...
}
This works perfectly fine, the problem is, it only works for my specific setup, as the path given in the HelpURL attribute is absolute. Is there a way to link to a relative path?
Using Application.datapath doesn't work, as it needs to be a constant. Simply inserting a relative path like so:
[HelpURL("/Documentation/page.html")]
also doesn't work.
Comment
Your answer
