无法在Unity中获得UI.Image的图像或纹理

问题描述 投票:0回答:1

m_Image = GetComponent<Image>(); i am trying to put a list of images and whenever clicked i want to replace clicked image to a plain . as i am a beginner in unity please share your thoughts,,

As shown here the pen image should be replaced in the floor

unity3d textures
1个回答
0
投票

我相信您应该使用

GetComponent()。sprite

并设置一个精灵而不是图像。

© www.soinside.com 2019 - 2024. All rights reserved.