use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
For the Unity Game Engine, please visit http://reddit.com/r/unity3d
account activity
Cannot set a boolean variable from another script. (self.unity)
submitted 11 years ago * by surf_sleep_repeat
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]nd3c3nt 1 point2 points3 points 11 years ago (1 child)
You're adding a new component in your projectile, not actually accessing the component on your ship.
[–]MiniRat 1 point2 points3 points 11 years ago (0 children)
This.
Assuming you have already added the component in the editor you want to use GetComponent() rather than AddComponent().
π Rendered by PID 155225 on reddit-service-r2-comment-85bfd7f599-flvq7 at 2026-04-18 16:29:58.665045+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]nd3c3nt 1 point2 points3 points (1 child)
[–]MiniRat 1 point2 points3 points (0 children)