Load assert: UID lookup during object creation in transition

0 favourites
  • 2 posts
From the Asset Store
Act on your instances, get/set their properties and variables only thanks to their UID. No more picking trouble! Plugin
  • Problem Description

    This bug report relates to the following thread : load-assert-getobjectbyuid-and-quot-wait-until-afterload-quot_t163350

    Performing an UID lookup in "on created" triggers during layout transition fires an assert "Do not call getObjectByUID in loadFromJSON: wait until afterLoad() to look up"

    Attach a Capx

    https://dl.dropboxusercontent.com/u/526 ... ssert.capx

    Description of Capx

    2 layouts, a "menu" and a "game level"

    Menu : Space to go to the "game level" layout ; F9 to load a game state

    Game level : 3 entities : ground, player, pickup. I'm not too sure if/how object creation/destruction works with game states, so having a player being able to collect pickups provides a quick way to "collect" some of the entities and try different "save/load" configurations. On creation, the pickup entity performs a UID lookup (pick by UID) with triggers the assert

    Steps to Reproduce Bug

    • Menu, press "space"
    • Game, press F6 to create a save state
    • Restart the game / reload the page
    • Menu, press F9 to load the save state > an assert is triggered
    • Menu, press "space"
    • Game, press F6 to create a save state
    • Restart the game / reload the page
    • Menu, press "space"
    • Game, press F9 to load the save state > the assert is NOT triggered

    Is seems the assert fires only during layout transition.

    Expected Result

    The assert seems to have no impact ; the event logic seens valid, therefore the developer expects no assert

    Affected Browsers

    • Chrome: YES

    Operating System and Service Pack

    Win10

    Construct 2 Version ID

    C2 r216 64b (Steam)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks, should be fixed in the next build.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)