Giter VIP home page Giter VIP logo

csharpluaforunity's People

Contributors

mybios avatar yanghuan avatar zjkzxy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

csharpluaforunity's Issues

报错: Your code is startling,17 temporary variables is not enough, please refactor your code.

我的文件内容如下:
`using System.Collections.Generic;

public class MyElement
{
public int value1;
public int value2;
public bool value3;
public string value4;
public string value5;

public MyElement()
{

}

}

public class MyClass
{

public MyClass()
{
    Init();
}

public void Init()
{
    Dictionary<int, List<MyElement>> dic = new Dictionary<int, List<MyElement>>{

        {1,
            new List<MyElement>()
            {
                new MyElement()
                {
                    value1 = 1,
                    value2 = 2,
                    value3 = true,
                    value4 = "A Dictionary<TKey,TValue> can support multiple readers concurrently",
                    value5 = "as long as the collection is not modified"
                }
            }

        },
        {2,
            new List<MyElement>()
            {
                new MyElement()
                {
                    value1 = 1,
                    value2 = 2,
                    value3 = true,
                    value4 = "A Dictionary<TKey,TValue> can support multiple readers concurrently",
                    value5 = "as long as the collection is not modified"
                }
            }

        },
        {3,
            new List<MyElement>()
            {
                new MyElement()
                {
                    value1 = 1,
                    value2 = 2,
                    value3 = true,
                    value4 = "A Dictionary<TKey,TValue> can support multiple readers concurrently",
                    value5 = "as long as the collection is not modified"
                }
            }

        },
        {4,
            new List<MyElement>()
            {
                new MyElement()
                {
                    value1 = 1,
                    value2 = 2,
                    value3 = true,
                    value4 = "A Dictionary<TKey,TValue> can support multiple readers concurrently",
                    value5 = "as long as the collection is not modified"
                }
            }

        },
        {5,
            new List<MyElement>()
            {
                new MyElement()
                {
                    value1 = 1,
                    value2 = 2,
                    value3 = true,
                    value4 = "A Dictionary<TKey,TValue> can support multiple readers concurrently",
                    value5 = "as long as the collection is not modified"
                }
            }

        },
        {6,
            new List<MyElement>()
            {
                new MyElement()
                {
                    value1 = 1,
                    value2 = 2,
                    value3 = true,
                    value4 = "A Dictionary<TKey,TValue> can support multiple readers concurrently",
                    value5 = "as long as the collection is not modified"
                }
            }

        },
        {7,
            new List<MyElement>()
            {
                new MyElement()
                {
                    value1 = 1,
                    value2 = 2,
                    value3 = true,
                    value4 = "A Dictionary<TKey,TValue> can support multiple readers concurrently",
                    value5 = "as long as the collection is not modified"
                }
            }

        },
        {8,
            new List<MyElement>()
            {
                new MyElement()
                {
                    value1 = 1,
                    value2 = 2,
                    value3 = true,
                    value4 = "A Dictionary<TKey,TValue> can support multiple readers concurrently",
                    value5 = "as long as the collection is not modified"
                }
            }

        },
        {9,
            new List<MyElement>()
            {
                new MyElement()
                {
                    value1 = 1,
                    value2 = 2,
                    value3 = true,
                    value4 = "A Dictionary<TKey,TValue> can support multiple readers concurrently",
                    value5 = "as long as the collection is not modified"
                }
            }

        },
        {10,
            new List<MyElement>()
            {
                new MyElement()
                {
                    value1 = 1,
                    value2 = 2,
                    value3 = true,
                    value4 = "A Dictionary<TKey,TValue> can support multiple readers concurrently",
                    value5 = "as long as the collection is not modified"
                }
            }

        },
        {11,
            new List<MyElement>()
            {
                new MyElement()
                {
                    value1 = 1,
                    value2 = 2,
                    value3 = true,
                    value4 = "A Dictionary<TKey,TValue> can support multiple readers concurrently",
                    value5 = "as long as the collection is not modified"
                }
            }

        },
        {12,
            new List<MyElement>()
            {
                new MyElement()
                {
                    value1 = 1,
                    value2 = 2,
                    value3 = true,
                    value4 = "A Dictionary<TKey,TValue> can support multiple readers concurrently",
                    value5 = "as long as the collection is not modified"
                }
            }

        },
        {13,
            new List<MyElement>()
            {
                new MyElement()
                {
                    value1 = 1,
                    value2 = 2,
                    value3 = true,
                    value4 = "A Dictionary<TKey,TValue> can support multiple readers concurrently",
                    value5 = "as long as the collection is not modified"
                }
            }

        },
        {14,
            new List<MyElement>()
            {
                new MyElement()
                {
                    value1 = 1,
                    value2 = 2,
                    value3 = true,
                    value4 = "A Dictionary<TKey,TValue> can support multiple readers concurrently",
                    value5 = "as long as the collection is not modified"
                }
            }

        },
        {15,
            new List<MyElement>()
            {
                new MyElement()
                {
                    value1 = 1,
                    value2 = 2,
                    value3 = true,
                    value4 = "A Dictionary<TKey,TValue> can support multiple readers concurrently",
                    value5 = "as long as the collection is not modified"
                }
            }

        }
    };
}

}
`
报错信息如下:
SourceLocation(/Users/infosunny/Documents/TestCsharpLua/Assets/Compiled/MyClass.cs@142:17)"new List()
{
new MyElement()
{
value1 = 1,
value2 = 2,
value3 = true,
value4 = "A Dictionary<TKey,TValue> can support multiple readers concurrently",
value5 = "as long as the collection is not modified"
}
}": Your code is startling,17 temporary variables is not enough, please refactor your code.

yield return IEnumerator函数的bug

在C#中
IEnumerator ttt1()
{
yield return null;
yield return ttt2();
}
可以正常执行,但是转成lua后ttt2()不会执行。
必须写成
IEnumerator ttt1()
{
yield return null;
yield return StartCoroutine(ttt2());
}
的形式才可以

Lambda表达式中使用泛型的bug

C#:
public class AAA
{
}
public class ZxyTest
{
public void Main()
{
AAA aaa;
Action action = (T t) =>
{
aaa = new AAA();
};
}
}

生成的lua编译不通过:
local System = System
System.namespace("", function (namespace)
namespace.class("AAA_1", function (namespace)
return function (T)
return {}
end
end)
end)
System.namespace("", function (namespace)
namespace.class("ZxyTest", function (namespace)
local Main
local AAA_1T = AAA_1(T)
Main = function (this, T)
local aaa
local action = function (t)
aaa = AAA_1T()
end
end
return {
Main = Main
}
end)
end)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.