Hyakugei Posted December 12, 2015 Share Posted December 12, 2015 Hello! I found a strange (to me) behaviour. The 'this.load.path' value is not reset to null or an empty string at the end/start of a new state. I guess i see why you might want to set it once, if you have 1 place that you store all your content, but this behaviour caught me out. Is there a reason why it is not cleared automatically? I'd just like to know why the decision was made to have it that way. I guess i have been setting it in each State so this hasn't bit me before! Thanks! Link to comment Share on other sites More sharing options...
ekeimaja Posted December 13, 2015 Share Posted December 13, 2015 Can you show your code. how you make state changing? Link to comment Share on other sites More sharing options...
strivinglife Posted December 31, 2015 Share Posted December 31, 2015 I'm not the OP, but I found this as well.this.game.state.start('Preloader', true, false);The way I move between states is given above (for example, the above is in my Boot state). I got hung up briefly the first time I ran into this, but then I figured the load manager was probably for the entirety of the game, so it makes sense it would persist between state changes. Link to comment Share on other sites More sharing options...
Hyakugei Posted January 2, 2016 Author Share Posted January 2, 2016 Sorry, lost the thread on this one. I also came to the same conclusion that Strivinglife came to, and simply ensure that the first thing in any preload section is setting/resetting the load.path value to something specific for that state. Link to comment Share on other sites More sharing options...
Recommended Posts