Richard C Posted March 10, 2017 Share Posted March 10, 2017 @Deltakosh Has something changed in BJS or is there a new bug perhaps. Today, xxx.getChildren is throwing an error message "xxx.getChildren is not a function". The script I used is directly linked to Babylon.com site. The PG is throwing the same error. If I use Babylon 2.5 locally I don't get the message and all works fine. I have not had this issue before today Thanks Richard C Quote Link to comment Share on other sites More sharing options...
gryff Posted March 10, 2017 Share Posted March 10, 2017 @Richard C: Hi Richard How about xxx.getChildren() cheers, gryff Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 10, 2017 Share Posted March 10, 2017 Yes, this function has been deleted for 3.0. I do not know the replacement function. Quote Link to comment Share on other sites More sharing options...
adam Posted March 10, 2017 Share Posted March 10, 2017 It was deprecated: https://github.com/BabylonJS/Babylon.js/commit/582d21e43967e6740e01ca267aa546107e4bce6c#diff-a924ac169e6c559246fb90e4dcf876d7 Use getDescendants instead gryff 1 Quote Link to comment Share on other sites More sharing options...
gryff Posted March 10, 2017 Share Posted March 10, 2017 @adam : so I gather. The second piece of BJS functionality that has been deprecated and I have run across in the last two weeks Node Wonder how many more I'm going to find ? cheers, gryff Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 10, 2017 Share Posted March 10, 2017 I'm ok to keep it if we think it is worth it Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 10, 2017 Share Posted March 10, 2017 These functions were logging warnings since 2.4 so this is why I thought it was ok to remove them after one year of warnings;) Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 10, 2017 Share Posted March 10, 2017 I think it is by habit of using his former function. If there are alternative functions, it is not necessary to keep his former function. I think a list of functions remove and replace with, might be a good idea. adam 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 10, 2017 Share Posted March 10, 2017 I will prepare that Dad72 and adam 2 Quote Link to comment Share on other sites More sharing options...
adam Posted March 10, 2017 Share Posted March 10, 2017 You can also use getChildMeshes() Quote Link to comment Share on other sites More sharing options...
Richard C Posted March 11, 2017 Author Share Posted March 11, 2017 Thanks everyone. @Deltakosh I think an ongoing list of functions that have been deprecated and replaced with something else would be extremely useful. If there is an unexpected error message then the first place to go would be to that list and not have to bother forum users. Many thanks as ever Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 11, 2017 Share Posted March 11, 2017 The more I think about the more I'm convinced we should keep the getChildren function. it is a convenient way to deal with getDescendants(true) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 11, 2017 Share Posted March 11, 2017 I reverted back getChildren...Function will stay Your PG should work again Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.