Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - kruncher

Pages: 1 ... 4 5 [6]
76
NGUI 3 Support / Large number of draw calls in panel?
« on: October 01, 2013, 09:07:22 AM »
Hey guys

I have created a relatively straightforward GUI using the provided editor windows. For some reason I am noticing multiple draw calls for the same atlas "Hud" and my font "Font Material". My object hierarchy is:

  1. Main GUI
  2. |--> Panel
  3. |------> Anchor
  4. |-----------> Slider
  5. |---------------> Background
  6. |---------------> Foreground
  7. |---------------> Frame
  8. |---------------> Percentage Label
  9. |---------------> Level Label
  10. |-----------> Statistics (empty game object)
  11. |---------------> Stat 1 Label
  12. |---------------> Stat 2 Label
  13. |---------------> Stat 3 Label
  14. |---------------> Stat 4 Label
  15. |---------------> Stat 5 Label

Any idea as to why there are so many draw calls?

77
NGUI 3 Support / Re: PPtr cast failed when dereferencing!
« on: December 02, 2012, 01:47:45 PM »
@ArenMook I have double checked my scripts but I cannot find any places where this might be an issue. By the way, this is probably not an issue with NGUI (even though I am using NGUI). I came across this thread and was hoping that there was an obvious solution.

I think that I have introduced this issue into one of my scripts. It doesn't seem to occur very frequently (which is a shame because that would make it easier to diagnose).

@dlewis If the error is because of GUI.BeginX and GUI.EndX then you might find that you just need to use EditorGUI.ExitGUI(); when you handle things like button clicks. In fact I find that the following is generally good practice because it avoids these issues:

  1. if (GUILayout.Button("Click Me")) {
  2.     // Do your stuff!
  3.     EditorGUI.ExitGUI();
  4. }

78
NGUI 3 Support / Re: PPtr cast failed when dereferencing!
« on: November 30, 2012, 09:40:28 PM »
Hey guys

I am experiencing the same issue intermittently. After some event occurs (whatever that might be) dragging the tabs of any editor windows will repeatedly display that error message in the console.

The error message always appears to repeat the exact same message on each line in the console. Though under different occasions the error varies:

  1. PPtr cast failed when dereferencing! Casting from Shader to MonoBehaviour!
  2. UnityEditor.DockArea:OnGUI()
  3.  
  4. PPtr cast failed when dereferencing! Casting from Mesh to MonoBehaviour!
  5. UnityEditor.DockArea:OnGUI()
  6.  
  7. PPtr cast failed when dereferencing! Casting from Prefab to MonoBehaviour!
  8. UnityEditor.DockArea:OnGUI()

Was any progress made on this previously?

Any ideas as to how I might track this issue down?

Pages: 1 ... 4 5 [6]