gpt4 book ai didi

c# - 无法从 'method group' 转换为 'IEnumerator'

转载 作者:太空宇宙 更新时间:2023-11-03 22:46:54 25 4
gpt4 key购买 nike

<分区>

我真的是 Unity 的新手。

我已按照教程将 Google 映射到原始图像的脚本。但是我遇到了一个错误,不知道如何解决。

谁能帮帮我?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class GoogleAPI : MonoBehaviour
{
public string url;

public RawImage img;

public float lon;
public float lat;

public int zoom = 14;
public int mapWidth = 600;
public int mapHeight = 620;

LocationInfo li;

public enum mapType { roadMap, satelite, hybrid, terrain };
public mapType MapSelected;

public int scale;

IEnumerator Map()
{
url = "https://maps.googleapis.com/maps/api /staticmap?center=Brooklyn+Bridge,New+York,NY&zoom=13&size=600x300&maptype=roadmap \n" +
" & markers = color:blue % 7Clabel: S % 7C40.702147,-74.015794 & markers = color:green % 7Clabel: G % 7C40.711614,-74.012318 \n" +
" & markers = color:red % 7Clabel: C % 7C40.718217,-73.998284 & key = AIzaSyDh1_nS-l7nWOFWvt0Gg9-9dY_11qWzK_Q ";
WWW www = new WWW(url);
yield return www;
img.texture = www.texture;
img.SetNativeSize();
}


// Use this for initialization
void Start()
{
img = gameObject.GetComponent<RawImage>();
StartCoroutine(Map);

}

// Update is called once per frame
void Update()
{

}
}

错误在StartCoroutine(Map);

( map )。我收到“参数 1:无法将‘方法组’转换为‘IEnumerator’”

在视频中,这个家伙做到了,而且效果很好,所有的评论似乎都是用这种方法取得成功的人。我没有。

提前致谢!

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com