playMaker

Author Topic: iOS loadlevel Jean, you posted about this on Unity Answers.  (Read 13516 times)

Slater

  • Full Member
  • ***
  • Posts: 123
iOS loadlevel Jean, you posted about this on Unity Answers.
« on: September 03, 2012, 08:09:50 PM »
http://answers.unity3d.com/questions/50562/iPad-real-memory-accumulation-how-to-prevent-this.html

How would I go about to do this in Playmaker. Can you give some more info please.

Thanks

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: iOS loadlevel Jean, you posted about this on Unity Answers.
« Reply #1 on: September 04, 2012, 03:57:03 AM »
Hi,

 Yes, basically, I found that critical memory leak happens if you simply load levels one after the other, the content of previous levels is not properly collected, which leads to memory crash 100% of the time. I must say that I neven had any confirmation of my findings by unity or other developers, so I am still not sure how that can actually be this way since it's so important... AND I haven0t done any benchmark since, so it might have been cleared by the latest update, but not sure.

anyway... I am thinking that I should simply provide an action that does all of this, so that you don't have to worry about the process. Allow me few days and I'll do it. If don't hear anything back before the end of the week, bump this thread next week ok? thanks :)

bye,

 Jean

Slater

  • Full Member
  • ***
  • Posts: 123
Re: iOS loadlevel Jean, you posted about this on Unity Answers.
« Reply #2 on: September 09, 2012, 06:20:54 PM »
Bumpety Bump :)

As you said, Im not sure that this is still needed, but if it is it would be great. Will you check it out and if it still is useful, create an action for it.

Thanks Jean, your the best!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: iOS loadlevel Jean, you posted about this on Unity Answers.
« Reply #3 on: September 10, 2012, 03:31:58 AM »
Hi,

 Thanks for bumping this, I will check it out, only trying to catch up at the moment, Keep bumping if you don't hear anything by the end of this week ( sorry... in the middle of traveling as well, which doesn't help...)

bye,

 Jean

Slater

  • Full Member
  • ***
  • Posts: 123
Re: iOS loadlevel Jean, you posted about this on Unity Answers.
« Reply #4 on: October 02, 2012, 10:49:05 AM »
Bumping this again. Not sure if it is needed.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: iOS loadlevel Jean, you posted about this on Unity Answers.
« Reply #5 on: October 02, 2012, 12:17:39 PM »
Hi,

 Thanks, very much needed indeed :) I am in the middle of releasing the  prime 31 in app purchase set of playmaker actions, once that done, this is next!

bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: iOS loadlevel Jean, you posted about this on Unity Answers.
« Reply #6 on: October 09, 2012, 10:43:42 AM »
Hi,

 ok, managed to find the time to do this :) sorry for the delay ( prime31 will wiat, I have a bug with what apple is returning me.... crap)


Instructions:

1: add scene_manager to the scenes' build as the first scene
2: add the other scenes (__emptyLevel__ scene_cube and scene_sphere)
3: run on IOS with profiler on with the memory section
4: as you load watch that it doesn't leak

Fair enough the scenes are rather dull :) but the goal is that you try with your scenes and see if it stack up

 I had trouble making it into an action , so I had to make a script that I call using send message.

 I found that on the device the screen flickers as you switch, I'll try to see if I can improve this situation ( I don't have that on my other projects, this is odd).

Give me some feedback, as I haven't yet totally stress tested this, this is straight coming out of another project, so testing more needs to be conducted for proper validation of the technic

bye,

 Jean

 bye,

 Jean
« Last Edit: October 15, 2012, 05:24:56 AM by jeanfabre »

mickman

  • Junior Playmaker
  • **
  • Posts: 62
Re: iOS loadlevel Jean, you posted about this on Unity Answers.
« Reply #7 on: October 14, 2012, 10:10:17 PM »
Hi,

I am loading scenes with Playmaker.  I have a Gui button to change scenes.  The issue I'm having is when each scene opens, it brings in the other scenes camera.. so i end up with 5+ cameras in one scene.  

Regarding crashes.. I noticed flicking between scenes does crash a lot.  First time I've experienced my app crash in ages and this in the only time, since I started using the Load Scene action.

   p.s can't wait to get my hands on Prime 31 in app. purchase.. sounds promising.. hope it won't crash between scenes ..   ;)

 ENJOY
« Last Edit: October 14, 2012, 10:13:06 PM by mickman »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: iOS loadlevel Jean, you posted about this on Unity Answers.
« Reply #8 on: October 15, 2012, 05:29:29 AM »
Hi,

 This is very odd, the package I sent you is corrupted, I am not what's going on here.

Please redownload it from the post above. It uses another technic that I feel is more secure.

as for the cameras, this is very odd, maybe you have set the camera ( or one of its component is without you knowing it) to not destroy. You are using your own level now right?

bye,

 Jean

mickman

  • Junior Playmaker
  • **
  • Posts: 62
Re: iOS loadlevel Jean, you posted about this on Unity Answers.
« Reply #9 on: October 16, 2012, 03:59:08 AM »
Hi Jean,

Being new to PM I'm  probably doing something wrong.. like over designing. I should be keeping it simple with basic primitives & then once all is operating accordingly to plan move on.

note: I have several AR scenes, so my cameras are AR cameras. Each scene only contains one object  700 polys.

 Mick

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: iOS loadlevel Jean, you posted about this on Unity Answers.
« Reply #10 on: October 16, 2012, 05:26:27 AM »
Hi,

 what AR framework are you using, It's likely that one of the component set the gameObject to not destroy itself and survive scene reload.

The solution would be to  either find and edit the component in question. The other solution would be to manually delete the camera as a first step towards loading, that is fine. Your application will have to have that kind fo higher level awarness about what's going on to marshall your scene's content.

You need a camera in each scene to test the scene, but hopefully all them cameras are identically set up, so in your manager, simply keep only one camera, and when loading a new scene, either delete the current and let the scene take over with its camera or load the scene and delete everything you don't need in the scene. It can be done in each scene, or it can be done in a manager independently from the scene.

Does all of this make sense to you?

bye,

 Jean
bye,

 Jean

mickman

  • Junior Playmaker
  • **
  • Posts: 62
Re: iOS loadlevel Jean, you posted about this on Unity Answers.
« Reply #11 on: October 18, 2012, 03:17:40 AM »
HI Jean,
            I'm using " Vuforia " AR camera.  I understand how you say delete the camera before opening a new scene. I'll give it a try and let you know shortly the outcome. As I'm new to PM I have loads to learn & am sure there are many ways to get around this.  

 I'm still playing with GUI buttons at the moment. making sure my scenes are optimised etc.. since they're running on iOS.  Pity there's no check box that stipulates  "stay visible" after a transition.

Thanks so much for your time.  ( awesome Plugin )
« Last Edit: October 18, 2012, 03:20:50 AM by mickman »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: iOS loadlevel Jean, you posted about this on Unity Answers.
« Reply #12 on: October 19, 2012, 02:44:20 AM »
Hi,

 re the gui. I strongly recommand you use something like nGUI or EZGUI or 2dToolkit, and similar. Don't know your exact needs. but on IOS, stay away from Unity GUI system big time.

The sample I did do use unity gui, but this is an example to show the feature, as a real implementation, this is a no no. If you only ever need two three buttons, then ok, fine, but anything above that could start affecting performances. It is more work in may cases, but it will pay off.

bye,

 Jean

marcos

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 199
Re: iOS loadlevel Jean, you posted about this on Unity Answers.
« Reply #13 on: November 21, 2012, 06:01:08 PM »
Hey,

Any idea if this is still an issue with Unity 4.0?

Cheers,
Mark

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: iOS loadlevel Jean, you posted about this on Unity Answers.
« Reply #14 on: November 22, 2012, 07:35:05 AM »
Hi,

 not tested, but will try, come back to me next week if I forget :)

bye,

 Jean