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

Pages: [1]
1
@ArenMook

Hey. That is a distinct possibility. I have chosen not to update NGUI as I'm at the tail end of a project. However to clarify I've identified that this is an interesting corner case for the version of NGUI I'm using (I don't have the version number on me).

Basically if you have a string that is Test. It will always return mActive=true indefinitely. However if I add a space or another character before or after that string it works.

So, there is a work around, but it's also possible you've identified and resolved this error in your updates.

2
NGUI 3 Support / TypeWriterEffect Always Active When Using Color or URL
« on: October 09, 2015, 03:51:33 AM »
Hey there,

This is primarily targeted @ArenMook, but also to anyone who can assist me.

I am using the TypeWriterEffect class in order to create custom speech bubbles for my game. I have a function that is built around determining if the TypeWriterEffect "HasFinishedDisplayingText".

  1. public bool HasFinishedDisplayingText() {
  2.     bool hasFinishedDisplayingText = true;
  3.     if(IsInUse()) {
  4.         if(labelTypeWriterEffect != null) {
  5.             if(labelTypeWriterEffect.isActive) {
  6.                 hasFinishedDisplayingText = false;
  7.             }
  8.         }
  9.     }
  10.     return hasFinishedDisplayingText;
  11. }

This worked perfectly fine for a few months. However a design constraint occurred where I need to add a URL to the SpeechBubble UILabel text in order to have it drive users to an offer.

Previously when I relied on this function it would correctly determine the state of the TypeWriterText as having finished or not, but now when I use a test string that has a URL or color configured, it persists in being in the mActive state indefinitely. The test string being used is:
  1. [url=http://google.com]Test[/url]

More so what's interesting is that the UILabel itself will populate its text up to a certain point and doesn't seem to proceed past the closing bracket.

What I end up seeing for the UILabel text during game play is:
  1. [url=http://google.com]Test

I've been staring at the TypeWriterEffect code all day and I cannot seem to identify where there miscommunication is occurring. I do not understand why it "breaks" the second I add a URL to it.

My question is this:
  • Is there a better way to determine if the TypeWriterEffect has finished?
  • Is there a way to rectify the parsing for the TypeWriterEffect so that it will include the terminating [/url] or [-]?
  • Is there anything I may be overlooking in this effort?

I appreciate any input as I'm at my wits end and don't see any real alternatives.

Also in order to help provide more clarity, I have attached the TypeWriterEffect script that I'm using.

Best Regards.

3
NGUI 3 Support / Error Triggering UITween From UIButton
« on: April 12, 2014, 09:21:05 PM »
I hope that this isn't too vague, because I'm particularly confused by this.

I have watched the tutorials multiple times and I see that Tween animations are triggered for buttons by adding a reference to the sprite that already contains the script, and then sets it to Tween.position for playing. However I don't appear to have the same luck when performing that operation.

When I try to link a tween position script to my buttons onclick function I get these errors:
Quote
AmbiguousMatchException: Ambiguous matching in method resolution
System.Reflection.Binder.FindMostDerivedMatch (System.Reflection.MethodBase[] match) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System.Reflection/Binder.cs:106)
System.MonoType.GetMethodImpl (System.String name, BindingFlags bindingAttr, System.Reflection.Binder binder, CallingConventions callConvention, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System/MonoType.cs:245)
System.Type.GetMethod (System.String name, BindingFlags bindingAttr) (at /Users/builduser/buildslave/monoAndRuntimeClassLibs/build/mcs/class/corlib/System/Type.cs:787)
EventDelegate.Cache () (at Assets/NGUI/Scripts/Internal/EventDelegate.cs:336)
EventDelegate.get_parameters () (at Assets/NGUI/Scripts/Internal/EventDelegate.cs:156)
EventDelegateEditor.Field (UnityEngine.Object undoObject, .EventDelegate del, Boolean removeButton) (at Assets/NGUI/Scripts/Editor/EventDelegateEditor.cs:148)
EventDelegateEditor.Field (UnityEngine.Object undoObject, .EventDelegate del) (at Assets/NGUI/Scripts/Editor/EventDelegateEditor.cs:63)
EventDelegateEditor.Field (UnityEngine.Object undoObject, System.Collections.Generic.List`1 list, System.String noTarget, System.String notValid) (at Assets/NGUI/Scripts/Editor/EventDelegateEditor.cs:271)
NGUIEditorTools.DrawEvents (System.String text, UnityEngine.Object undoObject, System.Collections.Generic.List`1 list, System.String noTarget, System.String notValid) (at Assets/NGUI/Scripts/Editor/NGUIEditorTools.cs:1328)
NGUIEditorTools.DrawEvents (System.String text, UnityEngine.Object undoObject, System.Collections.Generic.List`1 list) (at Assets/NGUI/Scripts/Editor/NGUIEditorTools.cs:1317)
UIButtonEditor.DrawProperties () (at Assets/NGUI/Scripts/Editor/UIButtonEditor.cs:68)
UIButtonColorEditor.OnInspectorGUI () (at Assets/NGUI/Scripts/Editor/UIButtonColorEditor.cs:23)
UnityEditor.InspectorWindow.DrawEditors (Boolean isRepaintEvent, UnityEditor.Editor[] editors, Boolean eyeDropperDirty) (at C:/BuildAgent/work/d3d49558e4d408f4/Editor/Mono/Inspector/InspectorWindow.cs:850)
UnityEditor.DockArea:OnGUI()

Quote
Unexpected top level layout group! Missing GUILayout.EndScrollView/EndVertical/EndHorizontal?
UnityEditor.DockArea:OnGUI()

I don't really understand what I'm doing wrong.

If someone could I would appreciate having any mistakes I am making pointed out?

4
NGUI 3 Support / Re: Tween Changing Label Line Width
« on: February 07, 2013, 06:56:50 AM »
Hrm. It appears that I have to separately add the other image on account that the files cumulatively are over the attachment limit. This is the following image that shows the line width has for some reason changed to 390.

5
NGUI 3 Support / Tween Changing Label Line Width
« on: February 07, 2013, 06:55:42 AM »
Hello. I hope this isn't a confusing post. It's my first attempt at addressing this forum and if I make a mistake I would appreciate any help rectifying that.

So first, what I'm doing is playing with the Example 9 - Quest Log example in order to figure out how some components work. This is mainly for the UITable and its elements. I'm trying to make it so that the Quests are 2 column based so that they expand accordingly in a two column fashion. And, it seems to work for the most part, except I have issues with the "Label - Descriptions" when I expand them with the tween.

What happened is that I made it so the Initial Label - Title and SlicedSprite have all been changed to a 200 x scale. This made it so the elements would be smaller and would display correctly in the drag-able panel. Following that I figured I would set the line width of the Label - Description to 200 thinking that on tween it would just expand the description to the equal width specified. This was not the case. What happens is that on tween, it changes the line width to 390 and expands it all the way across the sub panel.

I have tried a number of different methods to try and resolve this, but I don't think I'm understanding what's causing the issue here. Attached are two images demonstrating this. The "Initial Configuration" shows the line width at 200, and then the "Configuration After Tween" shows the line width at 390. I just can't figure out what the issue is.

There is also a different concern I have altogether, I'm not quite sure how to also make it so the sliced sprite that serves as the background for the quest scales with the word wrapping of the label. Is there a way to make it so that the background scales with the word wrapped label accordingly?

Please forgive me if this has been asked in some form or variation before. I tried searching and came up with nothing.

I look forward to any help provided.

Pages: [1]