1
This commit is contained in:
21
Unity/Scripts/Mesh/VirtualMeshRenderer.cs
Normal file
21
Unity/Scripts/Mesh/VirtualMeshRenderer.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
namespace BITKit
|
||||
{
|
||||
[RequireComponent(typeof(MeshFilter))]
|
||||
public class VirtualMeshRenderer : MonoBehaviour
|
||||
{
|
||||
public Material material;
|
||||
MeshFilter meshFilter;
|
||||
void Start()
|
||||
{
|
||||
meshFilter = GetComponent<MeshFilter>();
|
||||
}
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
Graphics.DrawMesh(meshFilter.sharedMesh, transform.position, transform.rotation, material, gameObject.layer);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user