Author Topic: Example 3, and some tips for Newbie  (Read 3819 times)

fasadin

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Example 3, and some tips for Newbie
« on: January 16, 2014, 09:58:11 AM »
Hello everyone,
this is my first post here. Hope that this is my first and last newbie (and probably stupid) question. I am new in unity. Sorry for that long story but I am trying to describe everything that I know about my idea that you could help me in best way.

I am trying to do menu in unity something like example 3 that NGUI provides. First I wanted to make it with just pure unity, without ngui. Only what I managed to do is LoadLevel(1); when button is clicked. This is not that good because I want to have some animation in that menu menu will have 3 small windows to pickup something, like in Heartsone while picking cards in area (something like this).

Animation will be quite simple. I click on some panel one goes to x,y and two others fly out of the screen. With that left panel/window appear other window with some text on in and with some images on it.

I managed that doing in ngui but what I've done it's that I put everything in one panel and during start script I hide some things (like this second panel/window) and storage references in class named ReferenceHolder, what was really strange for me and not natural. when I was pressing button i done something like read that reference from that ReferenceHolder and set it active. It it working maybe not exactly that I want but it is working. Then I opened Example 3 from NGUI and it was really simple and nice. Somehow you manage hide everything and animated that with clicking options. I know that you using UIPlay Animation somehow with this. I understand reference, but somehow I fill that I don't get whole concept how to build that.

I also want more animation in this menu like opening menu (like a book or something like this), but idk how I can accomplish this

I was trying to do example 3 in pure unity but somehow i can not manage this.

1. It's possible to do example 3 in pure unity? If yes then how can you somehow put some links/instruction for that?
2. How to make a simple menu like this example3 (like only button with screen) with that hiding showing stuff? I need to disable everything like in example3 or can I just disable main parent or can I just not disable anything (i tried that options and for those 3 it's working well so idk why it's hidden in that way)
3. How the animation is done (window-back for example) because I can not open this in unity.
4. Any tips for me :)?

If you managed to read that and you are here then thank you for patient :)
Greetings

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Example 3, and some tips for Newbie
« Reply #1 on: January 16, 2014, 11:38:55 PM »
1. No, and this is an NGUI support forum. I can't tell you how to do something in Unity's GUI.
2. It uses UIPlayTween to activate a tween (TweenTransform). You can make it activate TweenAlpha instead, which would fade it in or out. Starlink UI kit has a windowing system that does just that, in addition to "popping" things in slightly.
3. TweenTransform. Look at the game object called "Window".
4. Watch the video tutorial. It covers tweens and how to use them.

fasadin

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Example 3, and some tips for Newbie
« Reply #2 on: January 19, 2014, 12:26:09 PM »
2. Ok, i am trying to accomplish that. And for now i can easly move things, but it's needed to be activated. In example 3 in Option's button I saw something like UIPlay Animation, that's somehow enabled and move things. Question is How to use that?
3. Object window does not have TweenTransform. Only has Transform and Box-Collider. And still I don't know how to open those animation that I mention in 2) like Window - Back or Window - Forward. It's really cool thing in this example, but I want to understand this more easly.
4. I watched some videos, but I can not find in this videos answer for those question.

also example3 has in panel's script for animation, why? And how add UIAnimationEditor?

Thanks for respond.
« Last Edit: January 19, 2014, 12:43:59 PM by fasadin »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Example 3, and some tips for Newbie
« Reply #3 on: January 20, 2014, 12:34:41 AM »
What UIAnimationEditor? Also... open those animations? Open what animations? I'm not sure what you mean.

I strongly advise you to watch the video tutorials that come with NGUI. I explain how to use and activate tweens along with many other topics.

UIPlayAnimation script on buttons plays an animation. It has a bunch of options.

UIPlayTween script on buttons plays a remote tween. It also has a bunch of options.

fasadin

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Example 3, and some tips for Newbie
« Reply #4 on: January 20, 2014, 03:23:34 AM »
http://i.imgur.com/xETv5i6.png

here you can see in Panel - Main in Animation section Window - Back. I tried to open those animation but I can't. Those is in NGUI/Examples/Animations.

I already watched videos with NGUI that what I found in here in website. I didn't saw anything about animation (toggle yes). If there are more than those what is here where I can find that?

because here I also watched many (not all)
http://www.youtube.com/user/ArenMookR5/videos


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Example 3, and some tips for Newbie
« Reply #5 on: January 20, 2014, 07:14:54 AM »
Judging by your screenshot, you are not running the latest version. Please update first.

To open the Animation window, hit CTRL+6 or open it from Window -> Animation.

fasadin

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 5
    • View Profile
Re: Example 3, and some tips for Newbie
« Reply #6 on: January 21, 2014, 03:23:37 AM »
after some time I figure out everything ;) thanks for respond and patience