public SetPixel ( int x, int y, |
||
x | int | |
y | int | |
color | ||
return | void |
Texture2D texture = new Texture2D(2, 2); texture.SetPixel(0, 0, Color.red); texture.Apply();
Texture2D texture = GetComponentPackage Library: The Texture2D SetPixel method is part of the UnityEngine package, which is included in the Unity engine.().material.mainTexture as Texture2D; texture.SetPixel(1, 2, Color.green); texture.Apply();
Sets pixel color at coordinates (x,y).
public SetPixel ( int x, int y, |
||
x | int | |
y | int | |
color | ||
return | void |