Author Topic: [SOLVED] UIScrollView not clipping in build version  (Read 1091 times)

Thronin

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
[SOLVED] UIScrollView not clipping in build version
« on: January 19, 2014, 01:38:36 PM »
First of all, thank you for an excellent product.  NGUI has really helped speed up the development of the gui for our game.

We have an options menu in which the user can select their preferred screen resolution. 

The user clicks a button, which when clicked tweens in a window under which is a UIPanel with a soft clip.  Child to the UIPanel is a grid.  This grid gets populated with prefabs at runtime corresponding to the various resolutions available to the user based on their monitor.  All these prefabs are instantiated properly with NGUITools.AddChild, and appear correctly in the hierarchy as they should, and are associated with the correct panel in the panel tool. 

Everything works and looks as intended in the unity editor when tested from within unity.

In the build version however, once the user moves the contents of the panel the clipping seems to stop, and all of the contents of the panel appear suddenly.  We cannot replicate this behavior in the editor during runtime, only in the build version.

Thoughts?
« Last Edit: January 19, 2014, 02:34:33 PM by Thronin »

Thronin

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: UIScrollView not clipping in build version
« Reply #1 on: January 19, 2014, 02:21:16 PM »
As an experiment we dropped a sprite under the panel and adjusted its size to be much larger than the clipping area.  In the scene view of the editor you can see the sprite being clipped appropriately, and when the game is played from within the editor it is also clipped appropriately.  However when played in a standalone build version the sprite isn't clipped at all.

Thronin

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: UIScrollView not clipping in build version
« Reply #2 on: January 19, 2014, 02:34:14 PM »
Solved!

We had to add all the different shaders used, (aphaclip, softclip, etc.) to the Project Settings/Graphic Settings/Always included shaders tab.

Apparently without being directly assigned to an object they were being left out of the build version in order o save size for mobile plarforms.