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 - huevoquilmes

Pages: [1]
1
Here is the link to the repro case:



If you open the scene "MenuScene", and when the menu shows, press "Play", you will see the panel that comes in, not being shown properly.

Thanks again!

2
Hey Aren, thanks for the quick reply.

It has a TweenPosition attached to it, and as soon as its instantiated, it tweens into position (inside of the scrollview).

I'll make the repro case in a sec & upload it.

3
Hello,

I saw this problem in a lot of older posts, but none of the resolutions there helped me.

My hierarchy is as follows:

Root
     PanelA
     PanelB

Each panel, has soft clipping, and between the 2, cover up the whole screen (see below screenshot)



What im trying to do, is for example, instantiate a new widget, as a child of panel B, but off the screen (and off the clipping area), and have it tween into position. Whats happening is, after it gets to its position, it doesnt show in the game scene, even though its there. It will only show if you slightly move one of its child objects, or disable/enable the whole widget.

Here is a screenshot from when the panel just finishes moving into place (and nothing is showing :( )



And after moving it by hand, in the hierarchy, it finally shows



Whatever help I can get with this will greatly help me. If any other information or images are needed, I can post them asap. (Im using NGUI 3.9.8 & Unity 5.4) I tested with older versions of both NGUI & Unity, without luck

Thanks!

4
NGUI 3 Support / Re: Is there a grayscale shader for use with NGUI?
« on: September 23, 2015, 01:52:49 PM »

After looking around in the forum I realized that it lacks clipping, so here is a modified version that has clipping based on the Transparent Colored 1 NGUI shader.
Hope it helps!

  1. Shader "Hidden/Unlit/Transparent Gray 1"
  2. {
  3.    Properties
  4.    {
  5.       _MainTex ("Base (RGB), Alpha (A)", 2D) = "black" {}
  6.    }
  7.  
  8.  
  9.    SubShader
  10.    {
  11.       LOD 200
  12.  
  13.  
  14.       Tags
  15.       {
  16.          "Queue" = "Transparent"
  17.          "IgnoreProjector" = "True"
  18.          "RenderType" = "Transparent"
  19.       }
  20.      
  21.       Pass
  22.       {
  23.          Cull Off
  24.          Lighting Off
  25.          ZWrite Off
  26.          Offset -1, -1
  27.          Fog { Mode Off }
  28.          ColorMask RGB
  29.          Blend SrcAlpha OneMinusSrcAlpha
  30.  
  31.  
  32.          CGPROGRAM
  33.          #pragma vertex vert
  34.          #pragma fragment frag
  35.  
  36.  
  37.          #include "UnityCG.cginc"
  38.  
  39.  
  40.          sampler2D _MainTex;
  41.          float4 _ClipRange0 = float4(0.0, 0.0, 1.0, 1.0);
  42.          float2 _ClipArgs0 = float2(1000.0, 1000.0);
  43.  
  44.  
  45.          struct appdata_t
  46.          {
  47.             float4 vertex : POSITION;
  48.             half4 color : COLOR;
  49.             float2 texcoord : TEXCOORD0;
  50.          };
  51.  
  52.  
  53.          struct v2f
  54.          {
  55.             float4 vertex : POSITION;
  56.             half4 color : COLOR;
  57.             float2 texcoord : TEXCOORD0;
  58.             float2 worldPos : TEXCOORD1;
  59.          };
  60.  
  61.  
  62.          v2f o;
  63.  
  64.  
  65.          v2f vert (appdata_t v)
  66.          {
  67.             o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
  68.             o.color = v.color;
  69.             o.texcoord = v.texcoord;
  70.             o.worldPos = v.vertex.xy * _ClipRange0.zw + _ClipRange0.xy;
  71.             return o;
  72.          }
  73.  
  74.  
  75.          half4 frag (v2f IN) : COLOR
  76.          {
  77.             // Softness factor
  78.             float2 factor = (float2(1.0, 1.0) - abs(IN.worldPos)) * _ClipArgs0;
  79.          
  80.             // Sample the texture
  81.             half4 col = tex2D(_MainTex, IN.texcoord) * IN.color;
  82.              float grey = dot(col.rgb, float3(0.299, 0.587, 0.114));  
  83.             col.rgb = float3(grey, grey, grey);
  84.             col.a *= clamp( min(factor.x, factor.y), 0.0, 1.0);
  85.             return col;
  86.          }
  87.          ENDCG
  88.       }
  89.    }
  90.    
  91.    SubShader
  92.    {
  93.       LOD 100
  94.  
  95.  
  96.       Tags
  97.       {
  98.          "Queue" = "Transparent"
  99.          "IgnoreProjector" = "True"
  100.          "RenderType" = "Transparent"
  101.       }
  102.      
  103.       Pass
  104.       {
  105.          Cull Off
  106.          Lighting Off
  107.          ZWrite Off
  108.          Fog { Mode Off }
  109.          ColorMask RGB
  110.          Blend SrcAlpha OneMinusSrcAlpha
  111.          ColorMaterial AmbientAndDiffuse
  112.          
  113.          SetTexture [_MainTex]
  114.          {
  115.             Combine Texture * Primary
  116.          }
  117.       }
  118.    }
  119. }
  120.  

5
NGUI 3 Support / Re: Is there a grayscale shader for use with NGUI?
« on: September 23, 2015, 12:57:52 PM »
Hi guys, I'm using the gray shader above, but it doesn't work on scroll views. Any idea why this might be? I tried using normals in the scroll view but had no luck.
Thanks!

6
Sorry, maybe I should have explained better.

That is the profiler for my first scene in the game. It references some spritesheets, which nothing in the scenes references to them, making me wonder why they are there.

I did some research, and found some old issues of this happening in NGUI, and was wondering if it could be the same, and what a solution to this would be.

For example, this is one of the posts:
http://www.tasharen.com/forum/index.php?topic=5591.0

7
When I run the scene on the Unity Editor (freshly opened), with a simple scene, I get the following in the profiler:

(see attachment1)

If I then go, and run this on a device, with the profiler attached (Ipad, clean install), the reference count is now as follows:

(see attachment2)

I have read a lot of post on the forum, about older versions of NGUI, having old references to atlases/ spritesheets, and never letting go of them. Could this be the case again? I think I did have a reference to that spritesheet before in the scene, but not anymore, and I'm 100% certain that nothing is referencing those things anymore.

Whats the solution here?

Thanks

8
Other Packages / Re: Tasharen Water
« on: April 21, 2015, 12:27:50 PM »
I'm really glad to hear about the new update! :D It's already looking great on mobile, and it's by far the best water solution we found for mobile.
As for wp8, this line is not in the Awake()

mDepthTexSupport = SystemInfo.SupportsRenderTextureFormat(RenderTextureFormat.Depth);

However, mDepthTexSupport doesn't exist as well. (I have the latest version).

Let me know if there is anything I can do to make it work, or if I should wait for the update. We are currently waiting for this to be solved to finish with the porting of a couple of games to wp8 :)
Thanks for your help!

9
Other Packages / Re: Tasharen Water
« on: April 17, 2015, 09:23:23 AM »
Hello, first of all, I love you, this water is awesome, I'm using it in android and iOs for my games and is super performant and it looks great.
However, I'm porting my games to wp8 now, and I can't make it work there :/
On the editor, once I switched to wp8 it water went purple. Then I realized that If I changed to not using DX11 in web player (!?) it gets fixed in the editor. Apparently something is happening with DX11.
When I build to windows phone, the water doesn't appear at all. What can I do to detect the problem, and maybe tweak the shader so it works there?
Thanks!

10
NGUI 3 Support / Ui Render Issues when coming back to menu scene
« on: March 31, 2015, 12:19:10 PM »
I have a game, that follows this flow: SplashScreen -> Menu -> Level1 -> Menu

The first time the menu is opened, everything is fine:



After I come back from the game (I checked, and the same amount of objects are on the scene both times), this is what I get:



NOTE: This is on ios devices, both ipod touch & ipad. I'm using Unity 5.0 & NGUI 3.8

Pages: [1]