playMaker

Author Topic: UI, Levels, save and load  (Read 3170 times)

Sjones

  • Full Member
  • ***
  • Posts: 201
    • View Profile
UI, Levels, save and load
« on: August 29, 2012, 12:52:53 AM »
Hi, I am new to unity but have knowledge of other engines, I am a graphics artist working mostly in max and photoshop, I loved the way unity handles importing assets and playmaker looks to be extremely powerful.

I have watched most of the tutorials that are again fantastic, keep these up! however there are a few things I am in need of help with, as the title suggests I have 3 issues that I am not sure about with unity or PM.

I have watched the iOS UI video that gave a very good intro to UI, I have been trying to figure out how to make a GUI however the unity UI options are limited in terms of animation and PM's GUI I cant find the pixle offset. I have also tried to create pop-up buttons, so far the best I have been able to do is make sure they not being used and swapping a texture to none to hide it, its early stages yet however I am not sure how this will effect buttons that are pop-up (located atm) in the same position.

my next question is about levels, I understand that unity saves as a project and scenes, furthermore I would imagine that the scenes would be the so called levels.
I see there is a level load action and loads from name, im guessing this is the scene name added to the list?

with that in mind, how would you save and load progress, I see a fair few save game addons on the unity store so this may be the best option.
Watching the tutorials and reading up some, playerprefs are used to keep track in game but I got the impression that these where not saved when the app closes, could anyone give me some advice on this and how PM's level load would fit into loading players progress too.
If PM can not handle this itself is there any tools that people would recommend that would require little to no programming, same goes for UI addons.


Sjones

  • Full Member
  • ***
  • Posts: 201
    • View Profile
Re: UI, Levels, save and load
« Reply #1 on: September 03, 2012, 11:47:00 AM »
I have done some more work on this myself looking into things.

so I got level loaded to work, this is great, one question on this, when I done it the second level was a small simple level (plane and 1 other object) it loaded extremely quickly, my question is does it load all levels into memory at the start and swap out or as and when it is needed?

second I have been looking into NGUI, looks good, need to do more research into it as the example showed 1 UI, not sure if it can have several UI elements at different times (pop up menu's)

and the third I still need some help on, loading and saving, when the "load level" is called it loads the original un-edited level up, I was thinking of saving the data to a database of the objects state as a save function, my question is how would I load this along with the level loaded, I need object placements and states to be saved and loaded efficiently, preferably loaded before the player gets to see the world, though I could have 2 load states, one for the level and then another for populating it with a splash screen or similar.

Sjones

  • Full Member
  • ***
  • Posts: 201
    • View Profile
Re: UI, Levels, save and load
« Reply #2 on: September 03, 2012, 05:18:23 PM »
sorry to triple post, however I found out that GUI objects can be animated, this helps a lot in what I was trying to achieve.

so I have a few questions regarding UI with this in mind, probably more generic than playmaker specific.

So I need the most efficient way to create and use buttons as its for portable devices.

My first question is if I had UI elements of screen and NOT having a constant touch GUI event looking for its activation, instead only looking when that specific menu is activated, will this cause a performance hit?
dose unity handle it as a constant gui element outside of playmakers FSM? or is it just drawn by unity and playmaker handles all the interaction code?

-------------- I think I answered the above myself, the UI element is just a texture, so all the code is done by playmaker.

can NGUI also have iTween animations applied to each element?

what is more efficient unity GUI or NGUI? I know NGUI is supposed to handle it all in 1 pass instead of a pass for each UI element.
« Last Edit: September 03, 2012, 05:25:35 PM by Sjones »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 14698
  • Official Playmaker Support
    • View Profile
Re: UI, Levels, save and load
« Reply #3 on: September 04, 2012, 12:46:15 AM »
Hi,

 yes, prefer nGUI to GUI anytime you go mobile.

The second very important aspect is playmaker integration of gui. It's far from ideal unfortunatly, so for anything serious, you will have trouble with gui and playmaker, so prefer ngui or other, like SM2/EZGUI and the like.

 yes, ngui can have itween stuff, or any other animation system you can imagine, they are just gameObjects

bye,

 Jean