Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: IDontKnow on December 03, 2013, 07:01:58 AM

Title: Get Name of Last Loaded Level With Path
Post by: IDontKnow on December 03, 2013, 07:01:58 AM
I was wondering is it was possible to get the name of the last loaded level with the path still intact.

Say for example I have a scene located in Assets/Scenes/Chapter 01/exampleScene.unity

I can use the action found here: http://hutonggames.com/playmakerforum/index.php?topic=816.msg3288#msg3288 to return "exampleScene" to a string, but what I'd like to get back in string form is this: "Assets/Scenes/Chapter 01/exampleScene".
Title: Re: Get Name of Last Loaded Level With Path
Post by: jeanfabre on December 04, 2013, 05:28:01 AM
Hi,

 nop, you can't actually, at least to my knowledge. I would do this another way.

have the chapter x referenced in your scene name and that's it, you can then parse the  loaded level name to know which chapter it is.

the other way ( likely more flexible) is to maintain for example a global variable, or a playerpref value that you set when the scene starts, so anyone interested would know what chapter is currently loaded.

bye,

 Jean
Title: Re: Get Name of Last Loaded Level With Path
Post by: IDontKnow on December 04, 2013, 06:08:19 AM
Thanks for the quick response as always Jean. :)