|
For example, I have a function which takes in a Texture
And I have a texture named "Canvas" in my project. Is there any code I can use to get that texture and pass it to my function, hypothetically something like this?
Edit: The texture is not attached to any game object or part of any models. It just exists in the project's Assets folder.
(comments are locked)
|
|
I believe assets has to be attached to a game component somehow, otherwise it will not be included in the built game. On the component you are creating, you could create an array of textures, and assign the possible textures to the elements in the array. In C#:
If you don't want to attach the textures to the component, an alternative is to add the textures to a resource folder, and Resource.Load to load the texture
(comments are locked)
|
