Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by beloto · Oct 19, 2010 at 07:24 PM · arraytutorials

Anyone knows a good tutorial about JS Array class and how to use it?

I know basic things about Array class, but i got stuck often on things like what happen with index that stored game object that got destroyed.

edit: the slot that the game object got destroyed returns null. still i appreciate a good tutorial about Array class :P

thanks in advance.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by Herman-Tulleken · Oct 20, 2010 at 02:34 PM

Also check out this article: http://robotduck.wordpress.com/2009/11/04/88/

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image beloto · Oct 20, 2010 at 06:16 PM 0
Share

thank you. perfect answer. perfect tutorial.

avatar image
0

Answer by Bravini · Oct 20, 2010 at 01:24 AM

The properties of a destroyed object become null cause they lose the reference and are cleaned on the next call of garbage collector. I hope these are of some use for you: http://www.unifycommunity.com/wiki/index.php?title=JavascriptMultiDimArrays

http://answers.unity3d.com/questions/7929/geting-the-closest-object-from-a-array

also for in depth knowledge of js I recommend the book Head First Javascript, it have a lot of content and an easy to catch language, you can find it cheap on amazon.com :]

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image beloto · Oct 20, 2010 at 02:00 AM 0
Share

thanks ill check the book. but is it the same in unity JS like in JS? http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_splice for instance in this example there is a splice function that don't exist in unity JS Array (or i cant find it). and it is a nice function :D i did some function to do the same by creating temporary Array to hold the second part, then add the element at the end, and then add the temp array at the end off the original array. but i think splice is a lot better solution then my noobish function.in other words a unity JS array tutorial will be appreciated.thanks

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

AudioClip.SetData not working 2 Answers

Instantiate from flexible array 0 Answers

Wrong object always Instantiated 1 Answer

passing multi-dimensional arrays from one script to another? 1 Answer

How to make an array list set to false gradually instead of instantly? 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges