- Home /
Problems With NGUI on MAC
I'm using the NGUI and there seems to be a problem with MAC builds where the NGUI elements are showing up in shape, BUT none of the actual images show up inside those elements. I was just wondering if anyone had else had this problem, and if you have how did you fix it?
Thanks in advance, Hans
Comment
Best Answer
Answer by HHameline · Mar 25, 2012 at 02:22 PM
This was a problem with the way that MACs handle the Unity Fog, the following code allowed me to fix it. I added a script to my GUICamera and no more fog in the way of my ui :D
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
private bool revertFogState = false;
void OnPreRender() {
revertFogState = RenderSettings.fog;
RenderSettings.fog = enabled;
}
void OnPostRender() {
RenderSettings.fog = revertFogState;
}
}
http://unity3d.com/support/documentation/ScriptReference/Camera.OnPreRender.html
Your answer
![](https://koobas.hobune.stream/wayback/20220613064745im_/https://answers.unity.com/themes/thub/images/avi.jpg)