1.软件环境:unity3D2019.4.12f1,Visual Studio2019
2.新建两个脚本,目标是在ControlManager中调用ControlButton中的changeColor函数。
3.在ControlButton中定义一个可以改变物体颜色的函数
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ControlButton: MonoBehaviour
{
// Start is called before the first frame update
public