Using the newest version of Unity (Unity 5 I believe) I’ve installed the Destroyed City Free asset from the asset store, and it’s getting coding errors. The first one was resolved, but it’s still not working. The issue is somewhere in this coding: enderer.sharedMaterial.SetTexture( “_RefractionTex”, m_RefractionTexture );
Did you read the error? It tells you exactly what’s wrong and how to fix it. =/
I tried using the solution provided, which was GetComponent() and I am still getting the error. I don’t know much about coding and I feel like I’m ruining the code by doing this
did you correct each instance of the error? the compiler stops and complains about the first one it finds, fix that and if it finds another it’ll complain again, with a different line number.
probably the easiest fix would be to setup a class level variable called “renderer” and use GetComponent() is the Start/Awake function… then the reference exists and all instances of that code will be happy
also, paste the code in rather than use an image, use [code ][/code ] tags when you do, there is a sticky about them at the top of the scripting forum.