ND_SimulationAutomaticControl/Assets/Scripts/Line/ConnectionPointInterfaceRef...

28 lines
926 B
C#
Raw Blame History

using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
/// <summary>
/// <20><><EFBFBD>ӵ<EFBFBD>ӿ<EFBFBD><D3BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڹ<EFBFBD><DAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD><D3B5>Ŀ<EFBFBD><C4BF>ӿ<EFBFBD>
/// </summary>
public class ConnectionPointInterfaceReference : MonoBehaviour
{
public GameObject targetInterface; // Ŀ<><C4BF>ӿڶ<D3BF><DAB6><EFBFBD>
private MeshRenderer meshRenderer;
// public List<Material> materials = new List<Material>();
public void Start()
{
//materials = Resources.LoadAll<Material>("Material").ToList();
if (GetComponent<MeshRenderer>() != null)
{
meshRenderer = GetComponent<MeshRenderer>();
GameObject Cylinder = transform.parent.Find("WireCylinder").gameObject;
meshRenderer.materials[1].color = Cylinder.GetComponent<MeshRenderer>().material.color;
//meshRenderer.materials[1]
}
}
}