- Home /
What is an element in CopyTexture ?
I want to make a tiled map. I want to use the function CopyTexture to copy from a Texture2D (where is stored my tileset) to a RenderTexture.
I want to use the third overloading (with all the arguments) which allows me to choose from where in the source texture and where in the render texture I will copy. But I need to specify source & destination elements, and I have no idea what it is and what I should use here.
So what is an element here ? What should I use ?
Thanks !
Answer by kyle-misner-kriel · Nov 29, 2017 at 08:48 PM
The documentation is super unclear about this, but they are only used for something like a cube map which has multiple textures. Using the value of 0 for both srcElement and dstElement seemed to work for me though. I was just trying to set the srcMap and dstMap values.
"It also allows copying from an element (e.g. cubemap face) or a specific mip level, and from a subregion of a texture." Graphics.CopyTexture
Hope this helps.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
RenderTexutre to Skybox 2 Answers
Casting Error C# between Object[] and Texture2D[] 2 Answers
Texturing custom 2d sprite 0 Answers