Description
The CreateTexture
method is a member of the Editor.ShaderGraph.TextureInput
class. It is used to create a texture input for a shader graph by specifying a name for the texture. This method returns a string that represents the created texture input.
Usage
To use the CreateTexture
method, you need to have an instance of the TextureInput
class. Call the method with a string parameter that specifies the name of the texture you want to create. The method will return a string that can be used to reference the created texture input in the shader graph.
Example
// Example of using the CreateTexture method
TextureInput textureInput = new TextureInput();
string textureName = "MyTexture";
string result = textureInput.CreateTexture(textureName);
// 'result' now contains the reference to the created texture input.