Using texture on GridGraph

Hi
We have just upgraded to the Pro version so we can use the TextureSettings in a GridGraph.

However, when we save the graph, and then load it back as a TextAsset / bytes as suggested, or even load the file back in the editor, it does not set the Texture Source again.

I have made sure that the Texture is in the Resources folder.

I have opened up the ‘graph0.json’ file contained in the zip, and it includes the name of the file and all of the other TextureData… It just doesn’t seem to be getting set when the graph is deserielized.

Is this a deserielization problem?

We really would like to use this feature, it will save us lots and lots of time and headaches!!

Thanks

Hi

I see. It seems the Resources.Load method call takes a path, not a name of the file as I thought when I wrote the loading/saving code. My bad. For now you can place the texture at the top level in the Resource folder, so that the full path is something like Assets/Resources/myTexture.png

Ok, bad news. It seems I cannot find the full path to an asset. So it might be so that I need to force assets to the top-level…

Ok, thanks for looking into the issue.
We have managed to find a work around now, we are just building the graph from code, then checking pixels on a texture and setting the nodes to unwalkable from that.

I’d be interested to know if you find a fix for this though.

Thanks again.

The only fix I have now, and probably the only fix I will have is to force the textures to be on the top level of the Resources directory. I could theoretically also display a textbox for the user to write the path, but that would be so clunky and non-unity.