PlayMaker News > General Discussion

Nested Prefabs

<< < (2/3) > >>

jeanfabre:
Hi,

 And why not creating levels? and load them on demand? each portion would be a level and you load it asynchronously when required.

bye,

 Jean

FractalCore:
I'm not sure what's possible with that, I haven't tried it. Do you mean you can load a section or environment as a level in the distance while you're still on the current level. Treating squares of land as levels that are already in the right place and fit around each other, is that possible?

FractalCore:
Holy crap. I just tried that out. It works. This will require more investigation.

jeanfabre:
Hi,

 yep, that's how they do on big games, they load asynchronously on demand. But also don't forget that you will need some kind of system to also destroy areas you don't see or as far from the use, else you will have memory problems. It depends if you reuse prefafs between these portions or not tho.

bye,

 Jean

FractalCore:
It worked at first, then I remembered the landscape (level) I was loading had no foliage objects. It was just the landscape and my Playmaker system which was still instantiating the non prefabbed foliage. And of course the purpose of this is to be able to have thousands of prefabs sitting in the level ready to be loaded in the distance.

So I brought them all in, individual LOD's all set up so they won't even display when they appear (out of range). And there's a big pause while it loads. I didn't have the Async option ticked. So I tried it but nothing changed, instead it gave this message in the console;

LoadLevelAdditiveAsyc: _Scene-02
UnityEngine.Debug:Log(Object)
HutongGames.PlayMaker.Actions.LoadLevel:OnEnter() (at Assets/PlayMaker/Actions/LoadLevel.cs:54)
HutongGames.PlayMaker.FsmState:OnEnter()
HutongGames.PlayMaker.Fsm:EnterState(FsmState)
HutongGames.PlayMaker.Fsm:SwitchState(FsmState)
HutongGames.PlayMaker.Fsm:DoTransition(FsmTransition, Boolean)
HutongGames.PlayMaker.Fsm:ChangeState(FsmEvent)

_Scene-02 is the level being brought in, in the distance. The Asynchronous loading is supposed to load the level in the background so it can appear instantly, right? So this might be a bug, or is that not what the Async option is for?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version