MoonFeature problem

Hello I want to solve this problem I have two errors one is - UNityEngine.Component.renderer is obsolete. Property renderer has been depreacated. Use GetComponent instead. Another error is ‘material’ is not a member of ‘UnityEngine.Component’. These two errors are in the same line.

///
///   Designed and Programmed by
///      Juan Ignacio Tel  (juanignaciotel.tamaroqblog@gmail.com)
///       tamaroq.blogspot.com
///
///   Copyright (C) 2013
///   Free to use and distribute
///

#pragma strict

public var phase : float;
public var moonDeclination : float;
public var sizeInRelationToMoon : float;
public var material : Material;
public var lightTint : Color = Color.white;
public var lightIntensity : float;

function Start () {
	this.renderer.material = material;
	var moonlight : Light = this.GetComponentInChildren(Light);
	moonlight.intensity = lightIntensity;
	moonlight.color = lightTint;
}

function Update () {

}

Errors are in 20 line! Thank you :slight_smile:

So start with following the instructions in the error message. Try replacing line 20 with

GetComponent(Renderer).material = material;

This was a breaking change introduced in the switch from 4.x to 5.0. There is also an API updater you can use.