Hey there, im trying to make an object half transparent by reducing its alpha channel by 0.5 with this code i get error " Assets/Scripts/transparent.cs(10,17): error CS0131: The left-hand side of an assignment must be a variable, a property or an indexer"
Also are there any other ways to fill an area with color so player can detect there is a zone there ? right now im trying to make a field when players enters will be forced to go in one direction but i want that fields size to be clear.
using UnityEngine;
using System.Collections;
public class transparent : MonoBehaviour {
// Use this for initialization
void Start () {
GetComponent<Renderer.material.color.a>()=0.5f;
}
// Update is called once per frame
void Update () {
}
}