Sign in to follow this  
GrosSacASacs

Why is there a name required for many Object creation ?

Recommended Posts

Hi GSAS!  Yes, take a look here...

http://doc.babylonjs.com/classes/2.3/Scene

Now use your browser's "search this page" feature... for 'byName'.  You'll see that there are many "byName" methods.  If your project doesn't need any getMeshByName calling, then mesh names are not important for any other reason.  You can have many mesh with the same name... in a scene.  Under nearly ALL circumstances, it doesn't matter.

When using a loop to produce an array of meshes, many people add the loop's indexer to each mesh name... like this:

http://playground.babylonjs.com/#2JKYWK#1

Perhaps others will have different opinions, though.  I may have forgotten some issues, but I don't think so.

You can also add tags to scene items, and use our powerful get-by-tags system.  It is MUCH more versatile than getByName or getById methods. 

Share this post


Link to post
Share on other sites

My short answer: names are necessary if you import a scene - e.g. because it was made in Blender, or because you've loaded a scene that was previously serialized.

If you're just creating a scene and managing your own references then you don't need to worry about them.

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.