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 /
This question was closed Sep 23, 2013 at 12:22 PM by Ranger-Ori for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by Ranger-Ori · Aug 15, 2012 at 01:14 PM · componentaccess

Can I access components scripts?

What I mean is, can I see the script for the Particle System for instance?

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

3 Replies

  • Sort: 
avatar image
1
Best Answer

Answer by tr1stan · Aug 15, 2012 at 01:25 PM

The particle system attached to a gameobject is a build-in component of unity, just like a transform, an audio source or a camera component. There's no way you can browse and edit the source script of the particle system.

Comment
Add comment · Show 3 · 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 Ranger-Ori · Aug 15, 2012 at 04:58 PM 0
Share

Thank you for understanding my question. Why did Unity blocked it? and how come I could see some of their scripts? (like shaders and etc)

avatar image fafase · Aug 15, 2012 at 05:04 PM 0
Share

They block it because it is what makes Unity, if how it works would be open source, anyone with enough knowledge could simply use their codes and build his own engine. They protect their years of research and money spent this way. The shaders are probably available since most of them are widely known and available online. I may be wrong though but if I spent years and money developing a tool, I would make sure it does not slip through my fingers after 3 months.

avatar image tr1stan · Aug 16, 2012 at 03:15 AM 0
Share

To me, the particle system of unity and any other game engine is more likely artist driven. There's not much advantage you can take by using code over GUI. In unity, creating good particle effect is all about how to tweak the params in GUI and making good texture assets.

And as a close-source commercial game engine, you can't access any actual source from unity editor. All codes (except shaders) you see in unity editor either build-in or created on your own are interpreted scripts that helps you to write game logic. So unity make script api only if it's absolutely necessary, which I believe it's not for the particle system.

avatar image
0

Answer by Wekthor · Aug 15, 2012 at 03:46 PM

it should be something like this :

 ParticleSystem particleSystemComponent;
 
 void Start()
 {
   paricleSystemComponent = this.tranform.GetComponent<ParticleSystem>();
   particleSystemComponent.loop = true; //for example
 }
Comment
Add comment · 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
0

Answer by poncho · Aug 15, 2012 at 03:09 PM

you gan get the public components of any game object ie,

 GameObject myPlayer;
 myPlayer = GameObject.find("myPlayerGO");
 myPlayer.getComponent<rigidbody>().useGravity = false
 myPlayer.getComponent<oneOfMyPublicScripts>().moving = false;

hope you get the idea

Comment
Add comment · 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

Follow this Question

Answers Answers and Comments

12 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Access to variables from other script objects 3 Answers

Unity crashes when accessing a function of a script from another script 2 Answers

Declare Component type in GetComponent 2 Answers

Very simple component-access question 0 Answers

Painted Tree's Script Component 1 Answer


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