Texture.GetNativeTextureID Manual     Reference     Scripting  
Scripting > Runtime Classes > Texture
Texture.GetNativeTextureID

function GetNativeTextureID () : int

Description

Retrieve native ('hardware') handle to a texture

Use this function to retrieve an ID/handle corresponding to a particular texture as it is represented on the native graphics device level. This can be used to enable texture manipulation from native plugins. This function is only supported on OpenGL/ES devices.

JavaScripts
var mainTextureNativeId : int = renderer.material.mainTexture.GetNativeTextureID();

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
public int mainTextureNativeId = renderer.material.mainTexture.GetNativeTextureID();
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

public mainTextureNativeId as int = renderer.material.mainTexture.GetNativeTextureID()