Tanoda
NeuroMatManager.cs
Go to the documentation of this file.
1using System.Collections;
2using System.Collections.Generic;
3using UnityEngine;
4using NaughtyAttributes;
5#if !UNITY_WEBGL && DANA
6using NextMind.NeuroTags;
7#endif
8
9public class NeuroMatManager : MonoBehaviour
10{
11 public GameObject teszt;
12 public Material standardNeuro;
13
14 void Start()
15 {
16
17 }
18
19 [Button]
20 private void ToggleMatChange()
21 {
22#if !UNITY_WEBGL && DANA
23 var isNeuro = teszt.GetComponent<NeuroTag>();
24
25 if (isNeuro)
26 {
27
28 }
29 else
30 {
31 teszt.AddComponent<NeuroTag>();
32 var mr = teszt.GetComponent<MeshRenderer>();
33 var color = mr.material.color;
34 mr.material = standardNeuro;
35 mr.material.color = color;
36 }
37#endif
38 }
39}
UnityEngine.UI.Button Button
Definition: Pointer.cs:7
GameObject teszt
Material standardNeuro