Exemplo n.º 1
0
    static public void TestMethod1()
    {
        var tGoName = cPrefabName.Replace(".prefab", string.Empty);
        var tPrefab = GameObject.Find(tGoName);

        if (tPrefab == null)
        {
            throw new System.NullReferenceException("找不到" + tGoName);
        }
        var tTrans = YamlHelper.GetSpriteByIndex(tPrefab, Path.Combine(Application.dataPath, "Test/" + cPrefabName), "62adb30369acbf943a67cee0f69267a3", "Emoticon - Rambo", 5);

        if (tTrans != null)
        {
            Selection.activeTransform = tTrans.transform;
        }
        else
        {
            Debug.LogError("逻辑错误");
        }
    }