Jump to content


Photo

NGUI with Playmaker Managment


  • Please log in to reply
5 replies to this topic

#1 DIGI_Byte

DIGI_Byte

    Unitologist

  • Hosted
  • 1,747 posts
  • Location:Australia
  • Projects:GTFO
  •  Everybody do the Flop!

Posted 13 February 2013 - 07:24 AM

I'm trying to deal with an issue im facing in NGUI

to port it short and simple, normally the NGUI menu which is in manageable panels is iTweened off the scene, however i don't see a real need for that because if the panel is disabled in the correct way then the whole process can be avoided

the reason they animate the panels (iTween) is because it appears that even when its been disabled, the elements inside the panel are still active even though not rendering

I could upload the project but basically I need some way of sliding panels in and out dynamically or to disable them effectivly
by dynamic i mean some sort of script that calls if its being active which would translate its position to 0,0,0 and back again when its not active

playmaker uses a state called GET/SET properties that dynamically can access inherited functions of a script and that's how I'm doing it currently




I may upload a video on youtube so you can see it without having to download the entire project 


Edited by DIGI_Byte, 13 February 2013 - 06:01 PM.


Lyon-Fixed.gif
RIP 2323


#2 Nertea

Nertea

    ...lo sa raptor!

  • Hosted
  • 3,349 posts
  • Location:Vancouver, Canada
  • Projects:Star Villains and Space heroes, The Dwarf Holds
  •  T3A Chamber Member
  • Division:BFME/Unity

Posted 13 February 2013 - 01:52 PM

My experience with NGUI is that when you call NGUITools.SetActive() with the correct parameter (the gameObject containing the UIPanel component), it disables the panel completely (scripts, renderers, everything). If you are just using GameObject.enabled = false, it won't work right - check out the NGUI documentation, as it tells you that Unity apparently does it in the wrong order (top-down disabling in the hierarchy as opposed to bottom-up).

 

Mind you, I'm using the free NGUI implementation for my tests, and apparently it's very far behind the paid version. Might not be current anymore if you're using the better stuff.

 

 Additionally, you don't need to use iTween to do it, there's a whole set of NGUI-specific UI tweening functions.

 

its obvious that no-one else here knows anything about unity packages apart from myself

 

Harsh, much? 


sig.png
I really don't do requests and my Arnor Soldier is not fit for BFME. Don't ask me for either.


#3 DIGI_Byte

DIGI_Byte

    Unitologist

  • Hosted
  • 1,747 posts
  • Location:Australia
  • Projects:GTFO
  •  Everybody do the Flop!

Posted 13 February 2013 - 05:59 PM

Ya, it was a bit harsh, I'm sorry, its a mix of things going on that I'm disgruntled with, not your fault really

 

I'll look into it but i have a feeling I'm already doing it the way you suggested and its not working as it should

Attached is the disable in effect

[attachment=31962:NGUIvsPlayMaker.jpg]



Lyon-Fixed.gif
RIP 2323


#4 DIGI_Byte

DIGI_Byte

    Unitologist

  • Hosted
  • 1,747 posts
  • Location:Australia
  • Projects:GTFO
  •  Everybody do the Flop!

Posted 13 February 2013 - 06:24 PM

this is by far the biggest most obvious thing i've been doing wrong...

explained;
the Get/Set can disable things perfectly fine but its not a recursive (what ever that is)
i looked into it more and PlayMaker has a recursive disable/active script that can auto reverse on state exit
"Activate Game Object"

 

 

I need a moment to express myself...

HSJGHDgvbDZflrfsdjkldfgbokijlu fsdgbdn fsighdkkklkk....   vjmnfvnmvggnugvjkihgjnkbhrfsgh k



ok, i found the perfect solution and I AM AN IDIOT

FSDJOIHDZZZZzzzz
thanks for putting up with my lapse of stupid Nertea

-DIGI


Edited by DIGI_Byte, 13 February 2013 - 07:01 PM.


Lyon-Fixed.gif
RIP 2323


#5 Nertea

Nertea

    ...lo sa raptor!

  • Hosted
  • 3,349 posts
  • Location:Vancouver, Canada
  • Projects:Star Villains and Space heroes, The Dwarf Holds
  •  T3A Chamber Member
  • Division:BFME/Unity

Posted 13 February 2013 - 06:36 PM

Yep, that's why. Funny though, that's what NGUITools.SetActive() is, so that should have worked. Maybe you're doing something differently than my UI tests.


sig.png
I really don't do requests and my Arnor Soldier is not fit for BFME. Don't ask me for either.


#6 DIGI_Byte

DIGI_Byte

    Unitologist

  • Hosted
  • 1,747 posts
  • Location:Australia
  • Projects:GTFO
  •  Everybody do the Flop!

Posted 13 February 2013 - 06:38 PM

its 4am and i need to run around screaming in joy

 

Meta Tags for those poor people who are stuck like me
Playmaker NGUI disable panel doesn't won't work set active fail still works


Edited by DIGI_Byte, 13 February 2013 - 06:50 PM.


Lyon-Fixed.gif
RIP 2323





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users