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.


Topics - Malzbier

Pages: [1] 2
1
NGUI 3 Support / Tween Delay problem
« on: June 04, 2013, 04:49:42 AM »
Normal i would use the following code to start the tween.
  1. weenTransform TweenTwo = TweenTransform.Begin(this.gameObject,3f,animationAncorTwo);
The problem is that if i start the tween this way i can use the delay:
  1. TweenTwo.delay = 5f;

I tried to create the tween fist and start it later, like this:

  1. TweenTransform TweenTwo = new TweenTransform();
  2. TweenTwo.delay = 5f;
  3. TweenTwo.Play(true);
But i get errors...

  1. NullReferenceException
  2. UITweener.Play (Boolean forward) (at Assets/NGUI/Scripts/Tweening/UITweener.cs:283)
  3. HandDemo.SteppTwo () (at Assets/GUI/Scripts/HandDemo.cs:38)
  4. UnityEngine.GameObject:SendMessage(String, Object, SendMessageOptions)
  5. UITweener:Update() (at Assets/NGUI/Scripts/Tweening/UITweener.cs:188)
  6.  

What the correct way to use the delay ?


EDIT: If found out how:

  1. TweenTransform TweenTwo = this.gameObject.AddComponent<TweenTransform>();
  2. TweenTwo.delay = 5f;
  3. TweenTwo.Play(true);
  4.  
Using the keyword new was not a nice idea :)

2
NGUI 3 Support / UISlicedSprite + UIAncor = wired/wrong behavior
« on: January 16, 2013, 03:32:28 AM »
NGUI is missbahaving. in my case UISlicedSprite + UIAncor  does not work fine together in some case.
My case is:
1. Make UISlicedSprite + UIAncor.
2. Press save
3. Change resolution (form iphone to ipad or back)
4. Press run.

Gets me the result shown in PIC_Wrong.tiff.
It should be like PIC_Correct.tiff.

The same is happening if i save on a resolution thats not the device resolution.

Using NGUI 2.2.0
Unity 3.5.7f6

3
NGUI 3 Support / UIAncor and UIStrech improvment
« on: October 25, 2012, 07:26:24 AM »
I have a need idea for a handy function for UIAncor and UIStrech:

It would be need to have a function to calculate  the procedural values like the position(UIAncor) or the size(UIStrech) of the current transform settings.
That would massively improve the working speed of UIAncor and UIStrech, so i do not have to test or calculate the position / size for every element myself.

I found out shortly about this funtion:
  1. [ContextMenu ("Name of the Context menu entry")]
  2. void FuntionToCall()
  3. {
  4.  
  5. }
This generates a Context menu at the componten, so that the function can get call easy in the editor without a need for a custom inspector.

Greetings Malzbier


PS: Congratulations for your new job at unity ArenMook :)

4
NGUI 3 Support / UITexture Buged interface after coppy of gameobject
« on: October 17, 2012, 07:40:07 AM »
If i copy a Gamobject with a UITexture on it the interfface / inspector is Bugged.

The Texture inspector is gone.

5
NGUI 3 Support / Move whole gui screen
« on: September 26, 2012, 06:24:05 AM »
I need to move the whole GUI screen complete off-screen.
The problem is how to move the whole screen?
I tried:
Moving the UIRoot -> Faild because the camera is underneath the UIRoot.

Packing all panels onto an empty gamobject underneath the camera and move this-> dos not work because the whole GUI is constructed with UIAncor.

Putting the  empty gamobject  the panel and all widgets  underneath paralel to the gui camera ->  dos not work because the whole GUI is constructed with UIAncor.

So its looking like i need some help.

6
NGUI 3 Support / Sprite filter does not work on Reference atlas
« on: September 25, 2012, 03:42:53 AM »
It looks like the Sprite filter does not work on Reference atlas.
With Sprite filter i mean the filter the sprites in the "choose sprite window"  by text.

7
NGUI 3 Support / UIStretch Wrong calculation on widged
« on: September 21, 2012, 04:04:17 AM »
I have a UISliced Sprite, that sprite should have a relative size to a UISprite.

So i created a UIStretch at the UISliced Sprite and added the UISprite to the "Widget Container" field.
Style = Both
Relative size x= 0.5 y= 0.5

The UISprite have the size if x=345.6 y= 53.76 Z)=1

The new set / calculated size of the UISlized Sprite is X= 2468.571 y=384

My personal understanding the result should be X= 172,8 y=26,88.

Whats is going wrong with this?

Greetings Malzbier

8
NGUI 3 Support / UIRoot Automatic Changing in Editor
« on: September 19, 2012, 10:50:04 AM »
I having trouble again with the UIRoot and the Automatic function.

 I have set my Game view to 480x320(iPhone Wide)
So the automatic is setting the UIRoot to (manual size)320 / (Transform scale)  0.00625. Thats fine, thats what i expect.

If in now change to the Scene view And press save the UIRoot is setting up the (manual size)480 / (Transform scale)   0.004166667.
That changing is very annoying and does not help very much if i have to preview the screen in  the game view...

9
NGUI 3 Support / Function Request
« on: September 19, 2012, 02:26:23 AM »
Unity have multi editing support (edit multiple game objects and there components at once).
How much work is it to enable that for the NGUI components?

I often have to change a lot of sprites at one , like a lot off little star sprites, if if have to change them i have to do it one by one ca X 100 times.
Multi editing would be very nice.

Greetings Malzbier

10
NGUI 3 Support / Dynamicly place Sprites in text
« on: September 11, 2012, 02:57:28 AM »
I have a big text , about 100 lines with formations and some very text related sprites.

The problem is that the text must be Localizeable.
But with different length of text the placement of the sprites must be happen automatically.

Is there a need way to implement something like : ==Sprite name:scalex:scaley:scalez==

Greetings Malzbier.

11
NGUI 3 Support / UISprite Change sprite
« on: August 20, 2012, 07:04:10 AM »
Hallo everyone,

I'm trying to exchange the sprite on a UISprite but it does not seem to work.

void Start ()
  1. UISprite uiSpriteCoponent = (UISprite)stagesButtons[i].transform.FindChild("Icon").GetComponent("UISprite");
  2. uiSpriteCoponent.sprite = uiSpriteCoponent.atlas.GetSprite(spriteName);
  3. Debug.Log(uiSpriteCoponent.sprite.name + " VS " + uiSpriteCoponent.spriteName);

gives me this

Quote
Country VS Icon_City

What is the difference between UISprite.sprite.name and UISprite.spriteName ?

Maybe its important but this sprite is instantiated in the Start function too , so its the same frame.


Edit:
Looks like im doing the wrong aproach...  "uiSpriteCoponent.spriteName = spriteName; " is the right way.

12
NGUI 3 Support / Some informations about fonts
« on: August 16, 2012, 06:30:23 AM »
Hallo everyone.

In the past i had some very annoying problem with the bitmap fonts.
The character spacing was wrong and not consistent.
I did use Hiero 3.0.

So i searched for a solution and found: TWL Theme Editor.
It comes with an Bitmap font generator that is making way better results.
http://twl.l33tlabs.org/themer/themer.jnlp

13
NGUI 3 Support / Force Update UILable with UILocalize in editor
« on: August 09, 2012, 05:03:15 AM »
I like to force update a(or multible) UILable with UILocalize in editor.

So i wrote a custom inspector for UILocalize:

  1. [CustomEditor(typeof(UILocalize))]
  2. public class UILocalizeInspector : Editor
  3. {
  4.        
  5.         UILocalize mUILocalize;
  6.         public override void OnInspectorGUI ()
  7.         {
  8.                 DrawDefaultInspector();
  9.                 EditorGUIUtility.LookLikeControls(80f);
  10.                 mUILocalize = target as UILocalize;
  11.                 if(GUILayout.Button("Localize!"))
  12.                 {
  13.                         mUILocalize.Localize();
  14.                         mUILocalize.gameObject.GetComponent<UILabel>().MarkAsChanged();
  15.                 }
  16.         }
  17. }

My problem is that the update process of UILabel sheems to call the UIRoot Scritp witch is Producing the following error in the editor around 10 times:


  1. !IsPlayingOrAllowExecuteInEditMode ()
  2. UnityEngine.Component:BroadcastMessage(String, Object, SendMessageOptions)
  3. UIRoot:Broadcast(String, Object) (at Assets/NGUI/Scripts/UI/UIRoot.cs:91)
  4. Localization:Load(TextAsset) (at Assets/NGUI/Scripts/Internal/Localization.cs:157)
  5. Localization:set_currentLanguage(String) (at Assets/NGUI/Scripts/Internal/Localization.cs:100)
  6. Localization:get_currentLanguage() (at Assets/NGUI/Scripts/Internal/Localization.cs:69)
  7. UILocalize:Localize() (at Assets/NGUI/Scripts/UI/UILocalize.cs:73)
  8. UILocalizeInspector:OnInspectorGUI() (at Assets/Scripts/GUI/Editor/UILocalizeInspector.cs:24)
  9. UnityEditor.DockArea:OnGUI()

Without:
  1.  mUILocalize.gameObject.GetComponent<UILabel>().MarkAsChanged();
there are no errors.

14
NGUI 3 Support / UISlicedSprite Tillable Border instead of stretched
« on: August 06, 2012, 09:23:54 AM »
Is there an nice way to tile the border part of the UISlicedSprite?
I need this for a dotted line and 50X the same dot-line element seems wrong to me.

Is there any place where i can get the change log of the newts NGUI version (beside inside the asset folder and the asset store(the list is not complete ))?

15
NGUI 3 Support / clipRange.Set() assistance needed
« on: August 06, 2012, 07:13:57 AM »
I like to update the size of the clipping of a UIPanel.
  1. UIPanel thispennel = GetComponent<UIPanel>();
  2. thispennel.clipRange.Set(thispennel.clipRange.x,thispennel.clipRange.y,thispennel.clipRange.z,(thispennel.clipRange.z/ 320) *Screen.currentResolution.height);
  3.  
This does not have any effect.
Is there anyting that have to benn done after setting this?
Ps: This is called in the start routine of a script.

Pages: [1] 2