Merge remote-tracking branch 'origin/dev' into dev_lishuo
# Conflicts: # Assets/Cyp/Prefab.meta # Assets/Mapbox/Core/Plugins/Android.meta # Assets/Mapbox/Core/Plugins/Mapbox.meta # Assets/Mapbox/Core/Plugins/Mapbox/MapboxAccounts.meta # Assets/Plugins/Circle/ImageWithRoundedCorners.cs # Assets/Resources/Images/Devices.meta # Assets/Resources/UI/Prefab/Item.meta # Assets/Scripts/Devices/Ant/LegacyPages.meta # Assets/Scripts/UI/Prefab/Item.meta # Assets/StreamingAssets.meta # ProjectSettings/EditorBuildSettings.asset
This commit is contained in:
commit
ae9cefc645
144 files changed
+32337
-8064
No files matched your search
@@ -26,13 +26,12 @@ public class ImageWithRoundedCorners : MonoBehaviour {
|
||||
{
|
||||
var rect = ((RectTransform)transform).rect;
|
||||
material.SetVector(Props, new Vector4(rect.width, rect.height, radius*2, 0));
|
||||
|
||||
if (gameObject.GetComponent<Image>() != null)
|
||||
{
|
||||
gameObject.GetComponent<Image>().material = material;
|
||||
gameObject.GetComponent<Image>().sprite = null;
|
||||
}
|
||||
else if (gameObject.GetComponent<RawImage>() != null)
|
||||
else if (gameObject.GetComponent<RawImage>()!=null)
|
||||
{
|
||||
gameObject.GetComponent<RawImage>().material = material;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user