HTML5 Level Load, Variables in JS
I'm trying to handle multiple levels in my project for HTML5. Our export has been trimmed as much as possible of all unused content, reduced textures and lightmaps to accomodate the size restrictions, etc. We have two levels in our project, with an elevator that connects them. The plan was to have both levels connected by an elevator, with the player starting on the first floor at an external entrance to the building (so coming back down the elevator would spawn you in a different part of the level).
First, I looked up how to get the separate spawns working in Blueprints (though I am a programmer, I'm new to UE and don't want to add on code for a project that doesn't have any right now, expecially because of HTML5 exporting. I've learned quickly to stick with what works and not to fool around with it too much unless you want to start from scratch). I followed examples such as this one, but was unable to make any cast to objects such as MyCharacter or MyHUD (the project was based on the First Person Shooter example), be it in my project or others. I've read that this is a problem in 4.5, and even after fiddling with experimental menus and reinstalling/recompiling engines, I gave it up as a lost cause.
So instead I tried just a simple Open Level command on a box trigger. This worked well, except that the program crashes after making several trips through the elevator due to constantly expanding memory arrays going past the 32 bit limit. Seems there's some sort of memory leak, and I'm not sure where it could be since, aside from the level loads, all that's been added to the Shooter example were assets/maps. So I'm either missing a step in the open level process that requires you to clean up something or there's something else going on.
So, tl;dr: Having problems with loading levels. Open Level itself has memory issues, I can't do casting to change spawns like I want, and I don't know how to/if it's possible to access a Blueprint variable from the page's JS. The only other alternative I see is splitting the pages up and forcing users to manually cycle through levels when they're done, which is a poor user experience. Any insight on at least the memory issue? Solving that is likely easier that the JS one, unless it's a UE4.5 issue that I can't solve. Cannot upgrade beyond 4.5 because we can't export in 4.6 and don't have the time to convert the project anyway. I'd be extremely happy to know it's just some little cleanup operation that I have to do manually that was forgotten. Thanks for the help.
asked Jan 22 '15 at 03:44 PM in Packaging & Deployment
Are you still seeing this issue? Please feel free to upgrade to the newest version of the editor, but it is recommended that you do so by creating a copy, rather than converting the project.
answered Apr 17 '15 at 07:48 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here