using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class disableshadow : MonoBehaviour {
MeshRenderer[] meshRenderer;
void Start () {
meshRenderer = GetComponentsInChildren<MeshRenderer> ();
foreach (MeshRenderer r in meshRenderer) {
r.receiveShadows = false;
r.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off;
}
}
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.