See my post here:
http://forum.unity3d.com/viewtopic.php?p=107670
After the latest Unity player update, the vertical bar button is showing where I had a GUI.Label with texture data. I suspect memory corruption, or a bad reference.
I have full source in the forum post above.
The core issue is this texture works on the mac, but is corrupted on Vista:
http://tagenigma.com/qa/Unity3d/TextureTest001/TextureTest001.html
The texture is rendered in a label:
if (null != _Texture)
{
GUI.Label(new Rect(20,40,_TextureWidth,_TextureHeight), _Texture);
}
The texture is generated with SetPixel and applied:
void GenerateTexture()
{
if (_TextureWidth > 0
_TextureHeight > 0)
{
_Texture =
new Texture2D(
Mathf.Min(4096,_TextureWidth),
Mathf.Min(4096,_TextureHeight),
TextureFormat.ARGB32, false);
FractalNoise fn =
new FractalNoise(_FractalIncrement, _Lacunarity, _Octaves);//, new Perlin());
System.Diagnostics.Stopwatch thinkWatch =
new System.Diagnostics.Stopwatch();
thinkWatch.Start();
for (int y = 0; y < _TextureHeight; ++y)
{
for (int x = 0; x < _TextureWidth; ++x)
{
if (thinkWatch.ElapsedMilliseconds > 7000)
{
break;
}
float noiseF = 0;
switch (_TextureGenerationType)
{
case TextureGenerationTypes.PerlinNoise:
noiseF =
Perlin.NoiseNormalized(
x*_ScaleWidth/(float)_TextureWidth + _RandomX, //fake randomness
y*_ScaleHeight/(float)_TextureHeight + _RandomY); //fake randomness
break;
case TextureGenerationTypes.PerlinBrownianMotion:
noiseF =
fn.BrownianMotion(
x*_ScaleWidth/(float)_TextureWidth + _RandomX, //fake randomness
y*_ScaleHeight/(float)_TextureHeight + _RandomY); //fake randomness
break;
case TextureGenerationTypes.PerlinHybridMultifractal:
noiseF =
fn.HybridMultifractal(
x*_ScaleWidth/(float)_TextureWidth + _RandomX, //fake randomness
y*_ScaleHeight/(float)_TextureHeight + _RandomY, //fake randomness
_Offset);
break;
case TextureGenerationTypes.PerlinRidgedMultifractal:
noiseF =
fn.RidgedMultifractal(
x*_ScaleWidth/(float)_TextureWidth + _RandomX, //fake randomness
y*_ScaleHeight/(float)_TextureHeight + _RandomY, //fake randomnesss
_Offset,
_Gain);
break;
}
Color color =
new Color(noiseF, noiseF, noiseF, 1);
_Texture.SetPixel(x, y, color);
}
}
_Texture.Apply(false);
}