Horje
material Array setter Code Example
material Array setter
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class MaterialArraySetter : MonoBehaviour {

    public Material Material1;

    void Start ()
    {
        Material[] materialsArray = GetComponent<Renderer>().materials;
        materialsArray[1] = Material1;
        GetComponent<Renderer>().materials = materialsArray;

    }

}




Csharp

Related
moment script unity Code Example moment script unity Code Example
private Vector3 direction; Code Example private Vector3 direction; Code Example
c# system.io check if file exists Code Example c# system.io check if file exists Code Example
dotcms contentidentifier Code Example dotcms contentidentifier Code Example
IEnumerable ForEach Code Example IEnumerable ForEach Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8