Is there a relative asset path for a Custom Editor to ensure that it can retrieve used assets?

My editor uses an image as part of the editor. I want to ensure that the users of my editor won’t break my editor simply by organizing their project the way that they wish. They may place my editor package into a subfolder which would break asset path relative file references.

As an example I often put packages in a “3rdParty” to distinguish it from my own code. I imagine others might do the same. They might choose a differentName, like “ThirdParty” or “Other” or some such such that would break an asset folder relative path reference.

As such, It would be nice to have a path relative to the editor itself as I would not expect a user to modify the contents of my package folder without expecting it to break. Is there such a thing?

I dont think you can ensure that… you can lookup the asset by name and use it, that way you’re not locked in a particular path.

Another option could be to have some sort of “config” file that will mark the root folder of your editor. You can use that to figure out where the user has moved the root folder of the editor.

Also, you can wrap the code in a .DLL and embed the texture into that (as an embedded resource), so you don’t care where the user placed your editor at all.

That seems like a deficiency of the editor.

One in many :slight_smile: there’s no “perfect” piece of software… but we just have to deal with that…