Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
LeviMoore

How to read all info/values from components

Question

Hi fellow geeks

I want to read all the info/values of all components on a game object but I can't seem to get around to how it is done.

Can anybody give me an hint/example of how it is done.

--

Mr. Geek

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

You don't have to answer this, but why everything? But anyways, You can access another component by putting for example var Health : HealthScript; ("name of the script your trying to access being HealthScript"), then putting for example Health.hitPoints to access the hitPoints in that script. There is a few other ways depending on what you're trying to accomplish and how many scripts you're trying to access.

Share this post


Link to post
Share on other sites

  • 0
Please login or register to see this quote.

I am going to use it in a saving system I am making, so I can't use your method, because I don't always know the valuables

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.

Guest
Answer this question...

×   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.

Sign in to follow this  

×
×
  • Create New...