1234567891011121314151617181920212223242526272829303132 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class TestGetMaterial : MonoBehaviour
- {
- Material oldmat;
- // Start is called before the first frame update
- void Start()
- {
- oldmat = gameObject.GetComponent<MeshRenderer>().material;
- StartCoroutine(Show());
- }
- private IEnumerator Show()
- {
- yield return new WaitForSeconds(3);
- Func();
- }
- private void Func()
- {
- Debug.Log("ÑÓʱ2sÖ´ÐÐ");
-
- }
- // Update is called once per frame
- void Update()
- {
-
- }
- }
|