MackeyK24 Posted November 15, 2017 Share Posted November 15, 2017 Has anyone been changing the BabylonJS Codebase that has to do with cloning or physics engine and may maybe abstract meshes... Something. I had a Space Shooter Demo Game (Some Have Seen It) all the Ships and Enemies were all being instantiated at runtime (Basically I clone a whole Mesh Hierarchy). If I just switch to the latest and greatest beta... Now none of ships or laser bolts or anything are visible... They show up in the mesh list (also the physics collision not working, problem because of something in the cloning... Dunno) Can you please tell me WHAT changed so I can try and redo the runtime instantiation. Its alot of work being there and now, something changed... I can fix it if I know what Update... Solved... I think... Will have to hammer at it once some of the 3.1 beta performance and cannon.js issues are fixed Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted November 15, 2017 Author Share Posted November 15, 2017 Its something to do the clones and isEnabled. If the the source of the clone (and all its children) has isEnabled = false; after I make cloned (with all children) I loop thru and set child.setEnabled(true)... but the clones (including children) all still stay isEnabled = false; Has Somebody been nothing with cloning and the isEnabled ??? Quote Link to comment Share on other sites More sharing options...
RaananW Posted November 15, 2017 Share Posted November 15, 2017 hey @MackeyK24, Could you reproduce it on the playground? Setting setEnabled(true) SHOULD get isEnabled to be true. if this isn't the case, we are just Houston. We have a Problem. Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted November 15, 2017 Author Share Posted November 15, 2017 No I cant really reproduce the whole toolkit instantiatePrefab on the playground. But I will try to come with something to show... SOMEBODY changed SOMETHING to do with setEnabled and cloning... Maybe not directly changed the cloning, but some consequence of those changes just killed my cloning. What I found out so far... if I set mesh.setEnabled(false) on a serialized mesh from scene (I am going to use the DISABLED mesh from scene the source for cloning). then clone that mesh and set clone.setEnabled(true) ... THE MESH IS STILL DISBALED, even though I called setEnabled(true)... If I look in Debugging... the clone is there and the little 'Blue Eye' is greyed out... I can click that and it will show. its weird ... Now if I DONT force the mesh disabled with mesh.setEnabled(false)... it seems to be working... Dunno for sure I Gott do more debugging... But sure as shit, something changed in setting the mesh enabled and disabled and cause it has on cloning the newly set disabled mesh... I will keep checking thru it EDIT... maybe is my code now getting called twice to disable the mesh for some reason. I will check the whole PROCESS again. Quote Link to comment Share on other sites More sharing options...
adam Posted November 15, 2017 Share Posted November 15, 2017 When something like this happens to me, I go to the github commits and look at the commit at the bottom of the page and press the <> button to look at the repo at that time. I go to the dist folder and download it. If that dist doesn't work I move onto the next page and so on until I find a dist that works. Then on the page where I found the dist that worked, I look at the commit half way up the page. If that worked I go half way up again, If that doesn't work I go half way down. This can be time consuming but waiting for an answer on the forum can be time consuming, too. Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted November 15, 2017 Author Share Posted November 15, 2017 1 minute ago, adam said: When something like this happens to me, I go to the github commits and look at the commit at the bottom of the page and press the <> button to look at the repo at that time. I go to the dist folder and download it. If that dist doesn't work I move onto the next page and so on until I find a dist that works. Then on the page where I found the dist that worked, I look at the commit half way up the page. If that worked I go half way up the again, If that doesn't work I go half way down. This can be time consuming but waiting for an answer on the forum can be time consuming, too. I am manually looking thru the source now... is a little tedious ... I just THANK GOD it was NOT a change in the setEnabled ... That scared the CRAP out of me... My whole LOD Group support relies heavily on setEnable true and false... I feel much better about that... Just gotta find the metadata change. Yo @Deltakosh What do think about adding ANOTHER field to NODE and SCENE like I asked you to do for metadata:any, but call it something like unity:any or toolkit:any ... Just basically a DEDICATED metadata field I can use for the toolkit ??? That field is very important to the toolkit, I wrote the entire toolkit feature set based on 'Unity Meta Data'. I am just thinking MAYBE the toolkit could have its own metadata field. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 15, 2017 Share Posted November 15, 2017 Unfortunately I cannot add specific extension fields Metadata is useful for everyone do it was fine to add it but we won't add an extension specific field (even for your great exporter ;)) Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted November 15, 2017 Author Share Posted November 15, 2017 But someone went ahead and added FULL serialization to my metadata field. That just killed all my metadata cloning I need for script component instances and a bunch of other stuff that the scene manager is based on. I needed that field to use as the heart and sole for the toolkit. Can we ADD ANY OTHER field with ANY OTHER NAME that is just a simple 'any' field. How about 'node aux:any' and 'scene aux:any' and just the Parsing code I had originally for metadata. Thats kinda messed up, I was using that field first. But I will go ahead and change all instances xxx.metadata to xxx.aux or anything you want me to call it. EDIT: Yo @Deltakosh Nevermind the new field... I think I can re-code scene manager to work around this little mishap Quote Link to comment Share on other sites More sharing options...
MackeyK24 Posted November 15, 2017 Author Share Posted November 15, 2017 Ok... Thats fixed, now I rely on the framework making a full serialized copy of metadata... then I clone that full serialized copy and apply my metadata state changes there. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 15, 2017 Share Posted November 15, 2017 Sounds good. I added serialization support to metadata because it was asked here (can't remember by whom) and because it makes sense to save it 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.