x


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

more ▼

asked Mar 04 '12 at 07:11 PM

HHameline gravatar image

HHameline
222 15 18 27

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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

more ▼

answered Mar 25 '12 at 02:22 PM

HHameline gravatar image

HHameline
222 15 18 27

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x337
x118
x116
x54
x18

asked: Mar 04 '12 at 07:11 PM

Seen: 1050 times

Last Updated: Mar 25 '12 at 02:22 PM