I need to swap between a few different textures, and for this I have been using the AssetsDatabase.GetAssetPath to retrive the path of a current texture, and then used AssetsDatabase.LoadAssetFromPath to load the textures.
How ever I just found out that if your using AssetsDatabase then you need to reference the UnityEditor( using UnityEditor ) which doesnt compile during a build and causes errors.
Do I have any alternatives to the AssetsDatabase in this case?.. basically what I need to do is to get the path of a texture and then load a path/file as a texture.
Im currently doing this with C# as the lang of choice… but I guess that I could translate any js-script as well if needed :).
Thanks in advance!