实例化时,Unity CanvasGroup的alpha设置为0

时间:2018-09-07 08:15:47

标签: c# unity3d

我创建了一个内部装有CanvasGroup组件的预制件。当我实例化它时,即使在预制中将其alpha设置为1,它的alpha也变为0。

RemoteDiffMenu remoteDiffPrefab = Resources.Load<RemoteDiffMenu>("Prefabs/Utils/UI/RemoteDiff");
RemoteDiffMenu remoteDiff = Instantiate(remoteDiffPrefab, transform);

它是在另一个CanvasGroup下实例化的。

Image

SettingsMenu和RemoteDiff都包含一个CanvasGroup

RemoteDiff的画布组:

RemoteDiff's Canvas Group

0 个答案:

没有答案