Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialTojo Alex
Courses Plus Student 13,331 PointsI have a error which I don't understand
The console shows this error :
Assets/Standard Assets/ParticleSystems/Scripts/WaterHoseParticles.cs(41,48): error CS0619: UnityEngine.ParticleCollisionEvent.collider' is obsolete:
collider property is deprecated. Use colliderComponent instead, which supports Collider and Collider2D components (UnityUpgradable) -> colliderComponent'
I don't know what the problem is please help.
5 Answers
Steven Parker
231,268 PointsWithout seeing the code, but based solely on the error message, I'd look on line 41 of "WaterHoseParticles.cs" and try changing the term "collider" to "colliderComponent".
Tojo Alex
Courses Plus Student 13,331 PointsI didn't even open the script and there is an error I'm confused
Tojo Alex
Courses Plus Student 13,331 PointsI fixed the error though I got a new one:
Assets/Scripts/Screenshot.cs(10,25): error CS0619: UnityEngine.Application.CaptureScreenshot(string, int)' is obsolete:
Application.CaptureScreenshot is obsolete. Use ScreenCapture.CaptureScreenshot instead (UnityUpgradable) -> [UnityEngine] UnityEngine.ScreenCapture.CaptureScreenshot(*)'
Steven Parker
231,268 PointsI'd try handling this one the same way: on line 10 of "Screenshot.cs", change "Application.CaptureScreenshot" to "ScreenCapture.CaptureScreenshot".
Tojo Alex
Courses Plus Student 13,331 Pointsafter changing that, five more errors came with the same issue I'm confused why they keep on coming
Steven Parker
231,268 PointsIt sounds like you're using s different (and non-back-compatible) version of the Unity engine from the one the code was developed on. You might see if you can still get a copy of the exact same version and install that one. Also check the Unity website in case they have some available migration packages.
Otherwise, expect to spend some time doing conversions.
Tojo Alex
Courses Plus Student 13,331 Pointsi'm using 2017.3of3 that make any difference
Steven Parker
231,268 PointsIt's only important if it is not back-compatible with the version the code you are building was created with.