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 - r.pedra

Pages: 1 ... 7 8 [9]
121
NGUI 3 Support / ScrollView + UISlider problem
« on: March 12, 2014, 01:52:20 PM »
Hi,
I updated NGUI on monday to the last version 3.5.3 but I have a problem I hadn't before.
I have an unrestricted UIScrollview that is linked to an UISlider.

Every time I scroll the panel by touch or click I got this error:
Quote
NullReferenceException: Object reference not set to an instance of an object
UIScrollView.UpdateScrollbars (.UIScrollBar sb, Single contentMin, Single contentMax, Single contentSize, Single viewSize, Boolean inverted) (at Assets/NGUI/Scripts/Interaction/UIScrollView.cs:494)
UIScrollView.UpdateScrollbars (Boolean recalculateBounds) (at Assets/NGUI/Scripts/Interaction/UIScrollView.cs:441)
UIScrollView.MoveRelative (Vector3 relative) (at Assets/NGUI/Scripts/Interaction/UIScrollView.cs:632)
UIScrollView.MoveAbsolute (Vector3 absolute) (at Assets/NGUI/Scripts/Interaction/UIScrollView.cs:643)
UIScrollView.LateUpdate () (at Assets/NGUI/Scripts/Interaction/UIScrollView.cs:874)
If I don't touch the ScrollView but I slide the UISlider, it does nothing.

I attached the configuration of the UIScrollView and UISlider to the topic.

Thank you.

EDIT: I did more tests and I debugged the variable 'sb' of the line throwing NullRefException
  1. Debug.Log ("HorizontalScrollBar:"+sb);
returns:
Quote
HorizontalScrollBar:
So the UIScrollbar seems to be NULL.
But when I debug it before the function call, it's not null...

EDIT2:
Little more test
  1. Debug.Log ("ScrollBar:"+ (horizontalScrollBar as UIScrollBar));
returns null. You're casting the UIProgressBar to UIScrollBar but it's breaking it... Can I remove the cast without breaking all NGUI?

122
NGUI 3 Support / Re: NGUI Buttons Jumping Around on LevelLoad
« on: March 08, 2014, 05:09:44 AM »
Are you sure one of your camera is not filming the content of the other?
Each camera should be set to film only one layer, and the layer of your two UI must be different two avoid one camera filming the other UI.
Don't know if I express myself correctly

123
NGUI 3 Support / Re: Sprite Alpha
« on: March 05, 2014, 08:26:33 AM »
I think his button is disable by default and he is "activating" it when the user is the host. So I think the button have an alpha of 0 at the start.

124
NGUI 3 Support / Re: 4K Atlas constantly crashing on Add/Update
« on: March 04, 2014, 07:13:36 AM »
Hi,
We've done what you were saying and it's working fine now. It's a good lesson for the future, thank you for your advises.
Moreover, by moving the larger textures out, the app is using less memory.
Thank you !

125
NGUI 3 Support / Re: 4K Atlas constantly crashing on Add/Update
« on: February 27, 2014, 05:18:11 PM »
Hi,
It's not very obvious here but the graphist made some specific things on some sprites that make them non "sliceable" (sorry I don't know if the word exists ^^ )
Same thing for the buttons with texts, if I didn't made a sliced sprite from the assets, the graphist give me, this is because the text, for example, have some effects that I can't reproduce with NGUI.
Anyway, could it be a good idea to split my atlas in two or more parts to prevent me from these Atlas Maker "WTF" problems? (I know by reading the forum that the problem is not from you but from something inside Unity that is fucking the textures during the build)

126
NGUI 3 Support / 4K Atlas constantly crashing on Add/Update
« on: February 27, 2014, 06:11:28 AM »
Hi,
I'm fighting with a 4K atlas for 2 days. It contains lots of sprites at the moment(114). Everytime I try to add a sprite, i get an error:
Quote
MissingReferenceException: The object of type 'Texture2D' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
  at (wrapper managed-to-native) UnityEngine.Texture:Internal_GetWidth (UnityEngine.Texture)
  at UnityEngine.Texture.get_width () [0x00000] in <filename unknown>:0
  at UIAtlasMaker.PackTextures (UnityEngine.Texture2D tex, System.Collections.Generic.List`1 sprites) [0x000ec] in /Users/romainpedra/Git/AM2_Mobile/Assets/NGUI/Scripts/Editor/UIAtlasMaker.cs:144
  at UIAtlasMaker.UpdateTexture (.UIAtlas atlas, System.Collections.Generic.List`1 sprites) [0x000b0] in /Users/romainpedra/Git/AM2_Mobile/Assets/NGUI/Scripts/Editor/UIAtlasMaker.cs:540
  at UIAtlasMaker.UpdateAtlas (.UIAtlas atlas, System.Collections.Generic.List`1 sprites) [0x0000c] in /Users/romainpedra/Git/AM2_Mobile/Assets/NGUI/Scripts/Editor/UIAtlasMaker.cs:640
  at UIAtlasMaker.UpdateAtlas (System.Collections.Generic.List`1 textures, Boolean keepSprites) [0x00024] in /Users/romainpedra/Git/AM2_Mobile/Assets/NGUI/Scripts/Editor/UIAtlasMaker.cs:623
  at UIAtlasMaker.OnGUI () [0x00bb5] in /Users/romainpedra/Git/AM2_Mobile/Assets/NGUI/Scripts/Editor/UIAtlasMaker.cs:985
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x000d0] in /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222

I have this error very often, but everytime I just retry and it's okay(more or less, I have to build the atlas 2 sprites by 2 sprites and Commit on Git between each update if I don't want to redo it everytime...)
It's not a size problem, because it's doing it with every sprite I want to add since I have 114 sprites.
The proof that there is still space in the atlas is attached to the topic.

Thank you.

127
NGUI 3 Support / Re: UIScrollView + FixedSize problem 3.5.0
« on: February 20, 2014, 08:49:13 AM »
I'm integrating some things right now so I can't test immediately but if I don't touch the property after updating, it should not break my UI right?

128
NGUI 3 Support / Re: Migrate from iOS to Android - textures disappears
« on: February 20, 2014, 08:23:09 AM »
I don't know what it can be. May be you should wait for an answer of the NGUI dev.

129
NGUI 3 Support / Re: Migrate from iOS to Android - textures disappears
« on: February 20, 2014, 08:00:57 AM »
Which version of Unity are you using? Pro? Are you using pro stuff like RenderTexture or some things?

130
NGUI 3 Support / Re: Migrate from iOS to Android - textures disappears
« on: February 20, 2014, 07:54:22 AM »
Is there some 4K atlases?

131
NGUI 3 Support / UIScrollView + FixedSize problem 3.5.0
« on: February 20, 2014, 05:23:46 AM »
Hi,
In the last updates you introduced ContentOrigin on UIScrollView.
Some weird thing is happening when the camera is set to FixedSize.
All my panels are f***ed when I'm using FixedSize. But the thing really weird is that when I change the ContentOrigin to another and then go back to the one I wanted, everything is fine.
For example, to test my UI in iPad Retina definition, I set the camera to FixedSize and the height to 1536. Before the update, everything was fine but now everything is broken.

Cordially,
Romain Pedra

Pages: 1 ... 7 8 [9]