Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: Maart on July 03, 2011, 07:06:15 AM

Title: CanStreamedLevelBeLoaded & GetStreamProgressForLevel
Post by: Maart on July 03, 2011, 07:06:15 AM
when I use the load level action in a webplayer it tries to open the level before it's fully loaded, there seems to be no check for can level be streamed
can you please update it with something like like

// Check if level at index 1 can be loaded.
// If it can be loaded then load it.
function Update() {
    if (Application.CanStreamedLevelBeLoaded(1)) {
          Application.LoadLevel(1);
    }
}


or we could use a GetStreamProgressForLevel action that fires of an event when a certain percentage is reached.
like:

function Update() {
    if(Application.GetStreamProgressForLevel(1) == 1) {
        guiText.text = "Level at index 1 has been fully streamed!";
    } else {
        percentageLoaded = Application.GetStreamProgressForLevel(1) * 100;
        guiText.text = percentageLoaded.ToString();
    }
}

thanks in advance
Title: Re: CanStreamedLevelBeLoaded & GetStreamProgressForLevel
Post by: Alex Chouls on July 03, 2011, 10:58:07 AM
Great suggestion!

I'm thinking a new action with streaming options would make sense: Load Streaming Level

It would test for streaming, store progress and send events...

Can you see a downside to using a new action for this?
Title: Re: CanStreamedLevelBeLoaded & GetStreamProgressForLevel
Post by: Maart on July 03, 2011, 07:55:12 PM
simply allowing me to check the streaming status would allow me to fix the bug I have, but something more advanced is always good. hope to find it in the next release.
Title: Re: CanStreamedLevelBeLoaded & GetStreamProgressForLevel
Post by: Maart on October 24, 2011, 06:52:20 PM
was this fixed in latest update? I couldn't find info about it. seems like i small fix to do.
Title: Re: CanStreamedLevelBeLoaded & GetStreamProgressForLevel
Post by: Andrew.Lukasik on October 25, 2011, 12:09:05 PM
I'm not a coder, but never the less this code looks like even I could implement it in about 15minutes (I mean - srsly)
Title: Re: CanStreamedLevelBeLoaded & GetStreamProgressForLevel
Post by: jeanfabre on September 13, 2013, 08:12:10 AM
Hi,

http://hutonggames.com/playmakerforum/index.php?topic=2647.msg23383;topicseen#msg23383

bye,

 Jean