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

Pages: [1]
1
NGUI 3 Support / Re: UI Draggable Panel with different sized objects
« on: November 16, 2013, 11:43:06 AM »
So what I did is a bit of a kluge but I added an sprite that is totally transparent and put it in the back of my element and added the TweenScale script to that. Then I had that update the UITable and all works as expected. Would be nice to be able to update the table based on the position though.

Thanks for your help ArenMook and UncleAcid!

2
NGUI 3 Support / Re: UI Draggable Panel with different sized objects
« on: November 16, 2013, 10:30:04 AM »
So far, I've done my entire UI in NGUI without touching the code. I've just been setting things up in prep for data. I looked at the TweenScale which has the UITable.repositionNow function but the TweenPosition does not. I'll go ahead and create my own mods to the position script unless I'm somehow missing it.

I've attached screens of my TweenPosition and my TweenScale. If this functionality is not in there now, I wonder if it would be a good update or if there are inherent reasons that this is bad?

3
NGUI 3 Support / Re: UI Draggable Panel with different sized objects
« on: November 15, 2013, 01:07:28 PM »
I see the example but they are using a tween scale on the object to know the height of the object. I'm using a tween position so it doesn't know the distance to space things. Also all of my sizes are all based on .something and not actual pixels so it's very hard to determine actual layouts.

I have a card that has a header, body and footer. This is stored in a prefab. In this prefab, the header is a button. On press, I tween the position of the body and the footer in the y. This moves it down and back up as I want. I have multiple of these objects in the UITable but the table doesn't react as the size of the object never changes, the elements inside just move.

Does this make sense?

I attached an Image

4
NGUI 3 Support / UI Draggable Panel with different sized objects
« on: November 15, 2013, 10:53:44 AM »
I'm trying to create a scrolling menu where the user can click on an object in my draggable panel and it expands, pushing the other objects below it downwards while maintaining the correct spacing between the objects.

I have the draggable panel working correctly now but I am unsure the best way to get this effect.

Thanks again!

5
Followed your advice, which totally makes sense. However, the same problem still happens. I even tried using the SetActiveChildren, Self and just SetActive.

When a character collides with a cube, I want to pop up the progress bar and have it at 0.0. When the character presses "y". the slider should go from 0.0 - 1.0. If the character stops colliding, the slider should fall back to 0.0 and disappear. If the user lets go of Y before the slider hits 1.0, I want to reset it to 0.0 and then disappear. If the slider hit's 1.0. I want to reset it to 0.0 and make it disappear.

Stack trace below.

Destroying GameObjects immediately is not permitted during physics trigger/contact, animation event callbacks or OnValidate. You must use Destroy instead.
UnityEngine.Object:DestroyImmediate(Object)
NGUITools:DestroyImmediate(Object) (at Assets/Plugins/NGUI/Internal/NGUITools.cs:514)
UIPanel:OnDisable() (at Assets/Plugins/NGUI/UI/UIPanel.cs:705)
UnityEngine.GameObject:SetActive(Boolean)
NGUITools:SetActiveSelf(GameObject, Boolean) (at Assets/Plugins/NGUI/Internal/NGUITools.cs:669)
AmountStolen:OnTriggerStay(Collider) (at Assets/Scripts/InGameHUD/Amount.js:53)

6
4.2.1f4 Pro Unity
NGUI 2.7

I get access to my anchor and I disable it. I am doing this for a bunch of other things in NGUI ann never have a problem, this is the first I've seen it.

On Start:
  this.pausedAnchor = GameObject.Find("PausedAnchor");

OnPauseGame:
  this.pausedAnchor.SetActive(true);

OnResumeGame:
  this.pausedAnchor.SetActive(false);

The anchor is set up like this:
  Anchor
    Panel
      Sprite with animation from right to left
      Sprite with animation from left to right
      Button
      Button
      Button
      ProgressBar

Thanks for the help!

7
I have a progress bar that progresses on an action. When the action is done, I setActive(false) the Anchor that it's in. Then, the progress bar won't go away. The only way to get it to go away is to restart Unity. I set the anchor to inactive and nothing helps. Is this common? Am I'm doing something silly?

8
NGUI 3 Support / UIButton adding components
« on: September 29, 2013, 04:24:08 PM »
~I just updated to 2.7~

I have a panel that has a button. The button has a TweenPosition script on it. So it comes in from the right of the screen. however, when I activate the panel that has the button, it animates normal but is then not clickable. I found the reason is the UIButton component keeps turning itself off and i'm not sure why.

Any suggestions would be awesome!

***
Update
***

So, I just wrote a function to turn the button back on and then called it with the event receiver and that worked... I can keep doing that but it seems like its a bit of a kluge. If there is a better method, I'll gladly take it.

***
Update
***

So now that I have a button, When I hover over it, the button gets a tween color script added to it. I'm not adding it anywhere, it's just adding itself. I think it's caused by the Hover color action.

Is this a strange buggy thing from 2.7?

9
NGUI 3 Support / Re: Drag & Drop from 2D to 3D Space
« on: June 07, 2013, 01:46:05 PM »
I've been working on a similar thing and what I have found works is to create my model with the anchor point at a different location so that any model I place shows up at the floor level and not hanging through the bottom

10
NGUI 3 Support / Re: iOS Build Black Screen - NGUI 2.0.9
« on: April 10, 2013, 03:47:57 PM »
Second that and thank you for being so precise with your changes. I did the exact same thing and ran into the exact same issue. This has solved it.

11
NGUI 3 Support / Re: Crazy camera issues
« on: April 10, 2013, 10:40:51 AM »
That sounds like it should work but it does not. Here is my setup.

For my setup, I have only one scene. All cameras are toggled on and off.

Main Camera is set to solid color and depth of -2
Background Camera is set to Depth only and is at -1
Hud Camera is set to Depth only and is at 5

This gets rid of the error that I was seeing before but it ruins the design of the game. What I want is to have nothing but the cube displayed by the main camera. And the main camera should only be shown while gameplay is happening.

I hope this makes sense.

12
NGUI 3 Support / Crazy camera issues
« on: April 09, 2013, 12:48:10 PM »
I'm working on a game that uses NGUI for the obvious reasons. Everything was fine but when I loaded it up again, it looks like the attachment, It of course, should not.

I've isolated this down to the clear flag setting on multiple cameras. The higher depth cameras are set to "Depth Only" to allow for transparency. If I change that setting to a solid color it seems to work ok but then I can't see other camera views.

At one point I played with the clipping planes of the cameras, which fixed it in the game view but then when I played it, it went like this again.

I'm really at a loss. Any help would be great!


Pages: [1]