Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Please help!

Discussion in 'Scripting' started by NOVA_POLARIS, Aug 16, 2015.

  1. NOVA_POLARIS

    NOVA_POLARIS

    Joined:
    Apr 13, 2015
    Posts:
    19
    I am trying to do a color changer script based off a tutorial I found online. I did exactly what the person in the tutorial did but yeah it didn't work... After I try to save it, it says that the script uses obsolete UPI's. I have to either click yes or no and either way I still get a bunch of errors. Can someone please help me? Thanks :)

    Link to code when I say yes- http://pastebin.com/iD7KbR1B

    Link to code when I say no- http://pastebin.com/QBMuc29u
     
  2. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,511
    Why is renderer lowercase in Awake() and uppercase in Update()?
     
  3. NOVA_POLARIS

    NOVA_POLARIS

    Joined:
    Apr 13, 2015
    Posts:
    19
  4. aer0ace

    aer0ace

    Joined:
    May 11, 2012
    Posts:
    1,511
    It's highly preferable to just post your code as text inline in your post, with [ code ] tags. You can click the Insert... button in the post toolbar next to the floppy disk icon, to get the code tag.

    I think your errors are simple syntax errors that you can discover for yourself. I'm not being mean, I'm teaching you how to fish. Just try to understand those errors and work through each of them one by one.
     
  5. NOVA_POLARIS

    NOVA_POLARIS

    Joined:
    Apr 13, 2015
    Posts:
    19
    Thanks I was able to fix them. I thought that it was caused by unity changing my code but I just misplaced a thing or two. Again thanks for pointing out that rendering thing though. That might of taken a while for me to notice.
     
  6. shaderop

    shaderop

    Joined:
    Nov 24, 2010
    Posts:
    942
    @NOVA_POLARIS, here's a couple of tips that would really boost your karma:
    1. Post in the right forum. This post belongs in the Scripting section.
    2. Use descriptive post thread titles that actually describe the problem. "Please help" is not it.
    3. Post actual code. Don't post pictures of code or links to it or files containing it. And learn how to use code tags.
    Good luck.
     
    LeftyRighty likes this.